{@inheritDoc}
Split and stopwatch are logger to log template is enabled.

@param split Split
@param sample Stopwatch sample
437704
@Override
	public void onStopwatchStop(Split split, StopwatchSample sample) {
		getStopwatchLogTemplate(split.getStopwatch()).log(split, stopwatchLogMessageSource);
	}
493827
private void splitAt(long t) {
        if (data.containsKey(t)) return; // already split at this timestamp

        SortedMap<Long, int[]> head = data.headMap(t);

        int v = head.isEmpty() ? 0 : data.get(head.lastKey())[0];
        data.put(t, new int[]{v});
    }
376258
public static Iterable<String> split(String separator, String stringToSplit) {

    String[] StringArray = stringToSplit.split(separator);

    Iterable<String> iterable = Arrays.asList(StringArray);

    return iterable;
  }
428638
private List<TimephasedWork> splitDays(ProjectCalendar calendar, List<TimephasedWork> list, TimephasedWork first, TimephasedWork last)
   {
      List<TimephasedWork> result = new LinkedList<TimephasedWork>();

      for (TimephasedWork assignment : list)
      {
         Date startDate = assignment.getStart();
         Date finishDate = assignment.getFinish();
         Date startDay = DateHelper.getDayStartDate(startDate);
         Date finishDay = DateHelper.getDayStartDate(finishDate);
         if (startDay.getTime() == finishDay.getTime())
         {
            Date startTime = calendar.getStartTime(startDay);
            Date currentStart = DateHelper.setTime(startDay, startTime);
            if (startDate.getTime() > currentStart.getTime())
            {
               boolean paddingRequired = true;

               if (last != null)
               {
                  Date lastFinish = last.getFinish();
                  if (lastFinish.getTime() == startDate.getTime())
                  {
                     paddingRequired = false;
                  }
                  else
                  {
                     Date lastFinishDay = DateHelper.getDayStartDate(lastFinish);
                     if (startDay.getTime() == lastFinishDay.getTime())
                     {
                        currentStart = lastFinish;
                     }
                  }
               }

               if (paddingRequired)
               {
                  Duration zeroHours = Duration.getInstance(0, TimeUnit.HOURS);
                  TimephasedWork padding = new TimephasedWork();
                  padding.setStart(currentStart);
                  padding.setFinish(startDate);
                  padding.setTotalAmount(zeroHours);
                  padding.setAmountPerDay(zeroHours);
                  result.add(padding);
               }
            }

            result.add(assignment);

            Date endTime = calendar.getFinishTime(startDay);
            Date currentFinish = DateHelper.setTime(startDay, endTime);
            if (finishDate.getTime() < currentFinish.getTime())
            {
               boolean paddingRequired = true;

               if (first != null)
               {
                  Date firstStart = first.getStart();
                  if (firstStart.getTime() == finishDate.getTime())
                  {
                     paddingRequired = false;
                  }
                  else
                  {
                     Date firstStartDay = DateHelper.getDayStartDate(firstStart);
                     if (finishDay.getTime() == firstStartDay.getTime())
                     {
                        currentFinish = firstStart;
                     }
                  }
               }

               if (paddingRequired)
               {
                  Duration zeroHours = Duration.getInstance(0, TimeUnit.HOURS);
                  TimephasedWork padding = new TimephasedWork();
                  padding.setStart(finishDate);
                  padding.setFinish(currentFinish);
                  padding.setTotalAmount(zeroHours);
                  padding.setAmountPerDay(zeroHours);
                  result.add(padding);
               }
            }
         }
         else
         {
            Date currentStart = startDate;
            boolean isWorking = calendar.isWorkingDate(currentStart);
            while (currentStart.getTime() < finishDate.getTime())
            {
               if (isWorking)
               {
                  Date endTime = calendar.getFinishTime(currentStart);
                  Date currentFinish = DateHelper.setTime(currentStart, endTime);
                  if (currentFinish.getTime() > finishDate.getTime())
                  {
                     currentFinish = finishDate;
                  }

                  TimephasedWork split = new TimephasedWork();
                  split.setStart(currentStart);
                  split.setFinish(currentFinish);
                  split.setTotalAmount(assignment.getAmountPerDay());
                  split.setAmountPerDay(assignment.getAmountPerDay());
                  result.add(split);
               }

               Calendar cal = DateHelper.popCalendar(currentStart);
               cal.add(Calendar.DAY_OF_YEAR, 1);
               currentStart = cal.getTime();
               isWorking = calendar.isWorkingDate(currentStart);
               if (isWorking)
               {
                  Date startTime = calendar.getStartTime(currentStart);
                  DateHelper.setTime(cal, startTime);
                  currentStart = cal.getTime();
               }
               DateHelper.pushCalendar(cal);
            }
         }
      }

      return result;
   }
425959
public static void splitFile(String filePath, long[] splitPoints, String storageFolder) throws IOException {
        splitFile(new File(filePath), splitPoints, storageFolder);
    }
742625
public void splitStart(long stamp)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "splitStart", new Object[] {Long.valueOf(stamp), Integer.valueOf(cursor)});

    RangeObject ro = (RangeObject) blockVector.get(cursor);
    if (ro.startstamp == stamp)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "splitStart");
      return;
    }

    if (stamp > ro.endstamp)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(
          tc,
          "splitStart",
          new Object[] { "A", Long.valueOf(stamp), Long.valueOf(ro.endstamp)});

      SIErrorException e = 
        new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.gd.ARangeList",
              "1:445:1.25" },
            null));

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.exception(tc, e);
        
      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
        new Object[] {
          "com.ibm.ws.sib.processor.gd.ARangeList",
          "1:454:1.25" });

      // FFDC
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.gd.ARangeList.splitStart",
        "1:460:1.25",
        this);

      throw e;
    }
    if (stamp < ro.startstamp)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(
          tc,
          "splitStart",
          new Object[] { "B", Long.valueOf(stamp), Long.valueOf(ro.startstamp)});

      SIErrorException e =
        new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.gd.ARangeList",
              "1:479:1.25" },
            null));

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.exception(tc, e);
      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
        new Object[] {
          "com.ibm.ws.sib.processor.gd.ARangeList",
          "1:487:1.25" });

      // FFDC
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.gd.ARangeList.splitStart",
        "1:493:1.25",
        this);

      throw e;

    }

    RangeObject ro2 = (RangeObject) ro.clone();
    ro2.endstamp = stamp - 1;
    ro.startstamp = stamp;
    blockVector.insertNullElementsAt(cursor, 1);
    blockVector.set(cursor, ro2);
    cursor++;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "splitStart", Integer.valueOf(cursor));
  }
1231597
public static Stream<String> splitAsStream(Pattern splitPattern,
            String text) {
        return splitPattern.splitAsStream(text);
    }
822121
void sampleReceived(SolverAggregatorInterface aggregator,
			SampleMessage sample) {
		if (!this.sampleQueue.offer(sample) && this.warnBufferFull) {
			log.warn("Unable to insert a sample due to a full buffer.");
		}
	}
1112851
@Override
	public void onStopwatchStop(Split split, StopwatchSample sample) {
		logger.log(level, "SIMON STOP: " + sample.simonToString() + " (" + split.runningFor() + ")");
	}
1189954
@Override
	public void onStopwatchStop(Split split, StopwatchSample sample) {
		logger.debug(marker, "SIMON STOP: {} ({})", sample.toString(), split.runningFor());
	}
1075567
protected Object processInvoke(MethodInvocation invocation, Split split) throws Throwable {
		try {
			return invocation.proceed();
		} catch (Throwable t) {
			split.stop(tagByExceptionType ? t.getClass().getSimpleName() : EXCEPTION_TAG);
			throw t;
		}
	}
634492
@Override
	public void open(FileInputSplit split) throws IOException {
		// read Excel
		super.open(split);
		// infer schema (requires to read file again)
		if (this.customSchema == null) {
			ExcelFlinkFileInputFormat effif = new ExcelFlinkFileInputFormat(this.shocr);
			effif.open(split);
			SpreadSheetCellDAO[] currentRow = effif.nextRecord(null);
			int i = 0;
			while ((currentRow != null) && (i != this.maxInferRows)) {
				this.converter.updateSpreadSheetCellRowToInferSchemaInformation(currentRow);
				i++;
				currentRow = effif.nextRecord(null);
			}
			effif.close();
			this.customSchema = this.converter.getSchemaRow();
		} else {
			this.converter.setSchemaRow(this.customSchema);
		}
	}
1306525
public com.google.appengine.v1.TrafficSplit getSplit() {
    return split_ == null ? com.google.appengine.v1.TrafficSplit.getDefaultInstance() : split_;
  }
995654
public static void main(String[] args) {
		Stopwatch stopwatch = SimonManager.getStopwatch("stopwatch");
		for (int i = 1; i <= 10; i++) {
			try (Split ignored = SimonManager.getStopwatch("stopwatch").start()) {
				ExampleUtils.waitRandomlySquared(50);
			}
			System.out.println("Stopwatch after round " + i + ": " + stopwatch);
		}
		System.out.println("stopwatch.sample() = " + stopwatch.sample());
	}
988832
protected NumberedSplit<InputSplit> allocateSplit(final String evaluatorId,
      final BlockingQueue<NumberedSplit<InputSplit>> value) {
    if (value == null) {
      LOG.log(Level.FINE, "Queue of splits can't be empty. Returning null");
      return null;
    }
    while (true) {
      final NumberedSplit<InputSplit> split = value.poll();
      if (split == null) {
        return null;
      }
      if (value == unallocatedSplits || unallocatedSplits.remove(split)) {
        LOG.log(Level.FINE, "Found split-" + split.getIndex() + " in the queue");
        final NumberedSplit<InputSplit> old = evaluatorToSplits.putIfAbsent(evaluatorId, split);
        if (old != null) {
          throw new RuntimeException("Trying to assign different splits to the same evaluator is not supported");
        } else {
          LOG.log(Level.FINE, "Returning " + split.getIndex());
          return split;
        }
      }
    }
  }
642176
private void addStopwatchSplits(Stopwatch stopwatch, int splitWidth) {
		final int splits = randomInt(splitWidth / 2, splitWidth);
		try {
			lock.lock();
			System.out.print(stopwatch.getName() + " " + splits + ": ");
			for (int i = 0; i < splits; i++) {
				System.out.print(addStopwatchSplit(stopwatch) + ",");
			}
			System.out.println();
		} finally {
			lock.unlock();
		}
	}
861509
public static void main(String[] args) {
		// Starts the sampler
		Sampler sampler = new Sampler();
		sampler.setDaemon(true);
		sampler.start();

		// Starts the measuring
		while (true) {
			try (Split ignored = SimonManager.getStopwatch("sampled-stopwatch").start()) {
				ExampleUtils.waitRandomlySquared(50);
			}
		}
	}