Called when a complete whitespace run has been scanned. pos and endPos
will mark the whitespace boundary.
322819
protected void processWhiteSpace(int pos, int endPos) {
        if (scannerDebug)
            System.out.println("processWhitespace(" + pos
                               + "," + endPos + ")=|" +
                               new String(reader.getRawCharacters(pos, endPos))
                               + "|");
    }
339000
def finish(self):
        ''

        self.finished = True
        self.update(self.maxval)
        self.fd.write('\n')
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
909115
private int skipAhead(RunContainer skippingOn, int pos, int targetToExceed) {
    int left = pos;
    int span = 1;
    int probePos = 0;
    int end;
    // jump ahead to find a spot where end > targetToExceed (if it exists)
    do {
      probePos = left + span;
      if (probePos >= skippingOn.nbrruns - 1) {
        // expect it might be quite common to find the container cannot be advanced as far as
        // requested. Optimize for it.
        probePos = skippingOn.nbrruns - 1;
        end = toIntUnsigned(skippingOn.getValue(probePos))
            + toIntUnsigned(skippingOn.getLength(probePos)) + 1;
        if (end <= targetToExceed) {
          return skippingOn.nbrruns;
        }
      }
      end = toIntUnsigned(skippingOn.getValue(probePos))
          + toIntUnsigned(skippingOn.getLength(probePos)) + 1;
      span *= 2;
    } while (end <= targetToExceed);
    int right = probePos;
    // left and right are both valid positions. Invariant: left <= targetToExceed && right >
    // targetToExceed
    // do a binary search to discover the spot where left and right are separated by 1, and
    // invariant is maintained.
    while (right - left > 1) {
      int mid = (right + left) / 2;
      int midVal = toIntUnsigned(skippingOn.getValue(mid))
          + toIntUnsigned(skippingOn.getLength(mid)) + 1;
      if (midVal > targetToExceed) {
        right = mid;
      } else {
        left = mid;
      }
    }
    return right;
  }
151065
private void scanTwoDigitSpecial() {

        if (mInput == '=' && (mType == TokenType.COMP || mType == TokenType.EQ || mType == TokenType.N_EQ)) {
            mOutput.append(mInput);
            mPos++;
        } else if (mInput == '/' && (mType == TokenType.SLASH)) {
            mOutput.append(mInput);
            mType = TokenType.DESC_STEP;
            mPos++;
        } else if (mInput == '.' && (mType == TokenType.POINT)) {
            mOutput.append(mInput);
            mType = TokenType.PARENT;
            mPos++;
        } else if (mInput == '<' && mOutput.toString().equals("<")) {
            mOutput.append(mInput);
            mType = TokenType.L_SHIFT;
            mPos++;
        } else if (mInput == '>' && mOutput.toString().equals(">")) {
            mOutput.append(mInput);
            mType = TokenType.R_SHIFT;
            mPos++;
        } else if (mInput == ':' && mType == TokenType.OPEN_BR) {
            // could be start of a comment
            mOutput = new StringBuilder();
            mType = TokenType.COMMENT;
            mCommentCount++;
            mState = State.COMMENT;
            mPos++;
        } else {
            mFinnished = true;
        }
    }
487411
private void maybeCollapseWhitespace(@Nullable String next) {
    if (basicStartOfWhitespace != -1) {
      if (basicHasNewline) {
        // Note: if we are replacing the whitespace we don't need to update our source location
        // information.  This is because
        // 1. if we are stripping leading whitespace, the next token will be the start token
        //    - note: if there is no next token, the whole raw text node will get dropped, so we
        //      won't need a source location
        // 2. if we are stripping trailing whitespace, the previously assigned location should be
        //    preserved
        // 3. if we are in the middle, then our location is irrelevant
        offsets.delete(basicStartOfWhitespace);
        if (basicStart == basicStartOfWhitespace || next == null) {
          // leading or trailing whitespace, remove it all
          buffer.setLength(basicStartOfWhitespace);
          if (next == null && endColumnAtStartOfWhitespace != -1) {
            // if this is trailing whitespace, then our end location will be wrong, so restore it to
            // what it was when we started accumulating whitespace (assuming we had one).
            offsets.setEndLocation(endLineAtStartOfWhitespace, endColumnAtStartOfWhitespace);
          }
        } else {
          // We are in the middle, we either remove the whole segment or replace it with a single
          // space character based on whether or not we appear to be butted up next to an html tag.
          // This logic is definitely suspicious but it is important to maintain for compatibility
          // reasons.
          if (next.charAt(0) == '<' || buffer.charAt(basicStartOfWhitespace - 1) == '>') {
            // we are immediately before or after an html tag.
            buffer.setLength(basicStartOfWhitespace);
          } else {
            // Otherwise, collapse to a single whitespace character.
            buffer.setLength(basicStartOfWhitespace);
            buffer.append(' ');
          }
        }
        discontinuityReason = Reason.WHITESPACE;
        basicHasNewline = false;
      }
      basicStartOfWhitespace = -1;
    }
  }
495392
def has_space(self, length=1, offset=0):
        """"""
        return self.pos + (length + offset) - 1 < self.length
649221
private int scanToken(int startPos) {
        int position = startPos;
        while (position < maxPosition) {
            if (!hasSurrogates) {
                char c = str.charAt(position);
                if ((c <= maxDelimCodePoint) && (delimiters.indexOf(c) >= 0))
                    break;
                position++;
            } else {
                int c = str.codePointAt(position);
                if ((c <= maxDelimCodePoint) && isDelimiter(c))
                    break;
                position += Character.charCount(c);
            }
        }
        if (retDelims && (startPos == position)) {
            if (!hasSurrogates) {
                char c = str.charAt(position);
                if ((c <= maxDelimCodePoint) && (delimiters.indexOf(c) >= 0))
                    position++;
            } else {
                int c = str.codePointAt(position);
                if ((c <= maxDelimCodePoint) && isDelimiter(c))
                    position += Character.charCount(c);
            }
        }
        return position;
    }
873312
def extend_selection_to_complete_lines(self):
        """"""
        cursor = self.textCursor()
        start_pos, end_pos = cursor.selectionStart(), cursor.selectionEnd()
        cursor.setPosition(start_pos)
        cursor.setPosition(end_pos, QTextCursor.KeepAnchor)
        if cursor.atBlockStart():
            cursor.movePosition(QTextCursor.PreviousBlock,
                                QTextCursor.KeepAnchor)
            cursor.movePosition(QTextCursor.EndOfBlock,
                                QTextCursor.KeepAnchor)
        self.setTextCursor(cursor)
1215801
public void process(FastQueue<PositionPatternNode> pps , T gray ) {
		gridReader.setImage(gray);
		storageQR.reset();
		successes.clear();
		failures.clear();

		for (int i = 0; i < pps.size; i++) {
			PositionPatternNode ppn = pps.get(i);

			for (int j = 3,k=0; k < 4; j=k,k++) {
				if( ppn.edges[j] != null && ppn.edges[k] != null ) {
					QrCode qr = storageQR.grow();
					qr.reset();

					setPositionPatterns(ppn, j, k, qr);
					computeBoundingBox(qr);

					// Decode the entire marker now
					if( decode(gray,qr)) {
						successes.add(qr);
					} else {
						failures.add(qr);
					}

				}
			}
		}
	}
1143148
@Override
  public void seek(long pos) throws IOException {
    int n = (int) (real_pos - pos);
    if (n >= 0 && n <= buf_end) {
      buf_pos = buf_end - n;
    } else {
      super.seek(pos);
      invalidate();
    }
  }
398251
function saveAfter(pos) {
        if (self.history.textAfter(pos.node).length > pos.offset) {
          self.line = pos.node;
          self.offset = pos.offset + 1;
        }
        else {
          self.line = self.history.nodeAfter(pos.node);
          self.offset = 0;
        }
      }
1293837
private void recoverRoomsInRange(int begin, int end) {
    if (end + 1 < this.nbrruns) {
      copyValuesLength(this.valueslength, end + 1, this.valueslength, begin + 1,
          this.nbrruns - 1 - end);
    }
    this.nbrruns -= end - begin;
  }
1140902
def _skip_whitespace(self):
        """"""
        i = 0
        while self._cur_token['type'] is TT.ws and not self._finished:
            self._increment()
            i += 1

        return i
319145
def position_after_whitespace(body, start_position):
    # type: (str, int) -> int
    """"""
    body_length = len(body)
    position = start_position
    while position < body_length:
        code = char_code_at(body, position)
        if code in ignored_whitespace_characters:
            position += 1

        elif code == 35:  # #, skip comments
            position += 1
            while position < body_length:
                code = char_code_at(body, position)
                if not (
                    code is not None
                    and (code > 0x001F or code == 0x0009)
                    and code not in (0x000A, 0x000D)
                ):
                    break

                position += 1
        else:
            break
    return position
851062
def finish(end_time = ::Instana::Util.now_in_ms)
      if ::Instana.tracer.current_span.id != id
        ::Instana.logger.debug "Closing a span that isn't active. This will result in a broken trace: #{self.inspect}"
      end

      if is_root?
        # This is the root span for the trace.  Call log_end to close
        # out and queue the trace
        ::Instana.tracer.log_end(name, {}, end_time)
      else
        ::Instana.tracer.current_trace.end_span({}, end_time)
      end
      self
    end
1307766
protected function finishLastPoint()
    {
        // Measurements are more accurate
        $stopTime = microtime(true);

        if($this->currentPoint)
        {
            // Get point
            $point = $this->currentPoint;

            if($point->isActive())
            {
                // Set query log items
                $this->setQueryLogItemsToPoint($point);

                // Check if message in label text
                $this->checkAndSetMessageInToLabel($point);

                // Finish point
                $point->setStopTime($stopTime);
                $point->finish();

                $this->pointStack[] = $point;

                // Trigger presenter listener
                $this->presenter->finishPointTrigger($point);
            }
        }
    }
1052806
@SuppressWarnings("fallthrough")
    private boolean findSection(int offset, Position pos)
    {
        int i = offset, len = rawBytes.length;
        int last = offset;
        int next;
        boolean allBlank = true;

        pos.endOfFirstLine = -1;

        while (i < len) {
            byte b = rawBytes[i];
            switch(b) {
            case '\r':
                if (pos.endOfFirstLine == -1)
                    pos.endOfFirstLine = i-1;
                if ((i < len) &&  (rawBytes[i+1] == '\n'))
                    i++;
                /* fall through */
            case '\n':
                if (pos.endOfFirstLine == -1)
                    pos.endOfFirstLine = i-1;
                if (allBlank || (i == len-1)) {
                    if (i == len-1)
                        pos.endOfSection = i;
                    else
                        pos.endOfSection = last;
                    pos.startOfNext = i+1;
                    return true;
                }
                else {
                    // start of a new line
                    last = i;
                    allBlank = true;
                }
                break;
            default:
                allBlank = false;
                break;
            }
            i++;
        }
        return false;
    }