E.g. withIncompleteCodon(3) == withIncompleteCodon(6) and withIncompleteCodon(1) == withIncompleteCodon(4)

@param inFramePosition position of first nucleotide in any of in-frame triplets
498405
public static TranslationParameters withoutIncompleteCodon(int inFramePosition) {
        byte frame = (byte) (inFramePosition % 3);
        switch (frame) {
            case 0:
                return FromLeftWithoutIncompleteCodon;
            case 1:
                return Frame1WO;
            case 2:
                return Frame2WO;
        }
        throw new IllegalArgumentException();
    }
417211
private void processFullNameINodes(DataInputStream in, ImageVisitor v,
       long numInodes, boolean skipBlocks) throws IOException {
     for(long i = 0; i < numInodes; i++) {
       processINode(in, v, skipBlocks, null);
     }
   }
1022915
private boolean goToNextStartPosition() throws IOException {
    int nextSpans1StartPosition;
    int nextSpans1EndPosition;
    while ((nextSpans1StartPosition = spans1.spans
        .nextStartPosition()) != NO_MORE_POSITIONS) {
      nextSpans1EndPosition = spans1.spans.endPosition();
      if (nextSpans1EndPosition == lastSpans2StartPosition) {
        return true;
      } else {
        // clean up
        if (lastSpans2StartPosition < nextSpans1StartPosition) {
          previousSpans2StartPositions.clear();
        } else if (previousSpans2StartPositions
            .contains(nextSpans1EndPosition)) {
          return true;
        }
        // try to find match
        while (lastSpans2StartPosition < nextSpans1EndPosition) {
          if (lastSpans2StartPosition != NO_MORE_POSITIONS) {
            lastSpans2StartPosition = spans2.spans.nextStartPosition();
          }
          if (lastSpans2StartPosition == NO_MORE_POSITIONS) {
            if (previousSpans2StartPositions.isEmpty()) {
              noMorePositions = true;
              return false;
            }
          } else {
            if (lastSpans2StartPosition >= nextSpans1StartPosition) {
              previousSpans2StartPositions.add(lastSpans2StartPosition);
            }
            if (nextSpans1EndPosition == lastSpans2StartPosition) {
              return true;
            }
          }
        }
      }
    }
    return false;
  }
4760
private void apply(HyphenationPattern pattern, int pos) {

    int internalOffset = pos - 2;
    HyphenationPatternPosition[] positions = pattern.getHyphenationPositions();
    for (HyphenationPatternPosition hyphenationPosition : positions) {
      int i = hyphenationPosition.index + internalOffset;
      if ((i >= 0) && (i < this.rankings.length) && (hyphenationPosition.ranking > this.rankings[i])) {
        this.rankings[i] = hyphenationPosition.ranking;
      }
    }
  }
831514
private String _insdc_feature_position_string(Point location, int increment) {
			StringBuilder sb = new StringBuilder();
			Formatter formatter = new Formatter(sb,Locale.US);
			formatter.format("%s", location.getPosition() + increment);
			String output = formatter.toString();
			formatter.close();
			return output;

	/*
	if isinstance(pos, SeqFeature.ExactPosition):
		return "%i" % (pos.position+offset)
	elif isinstance(pos, SeqFeature.WithinPosition):
		return "(%i.%i)" % (pos.position + offset,
							pos.position + pos.extension + offset)
	elif isinstance(pos, SeqFeature.BetweenPosition):
		return "(%i^%i)" % (pos.position + offset,
							pos.position + pos.extension + offset)
	elif isinstance(pos, SeqFeature.BeforePosition):
		return "<%i" % (pos.position + offset)
	elif isinstance(pos, SeqFeature.AfterPosition):
		return ">%i" % (pos.position + offset)
	elif isinstance(pos, SeqFeature.OneOfPosition):
		return "one-of(%s)" \
			   % ",".join([_insdc_feature_position_string(p,offset) \
						   for p in pos.position_choices])
	elif isinstance(pos, SeqFeature.AbstractPosition):
		raise NotImplementedError("Please report this as a bug in Biopython.")
	else:
		raise ValueError("Expected a SeqFeature position object.")
		 */
	}
109499
protected boolean semanticallyEquivalent(BioPAXElement element)
	{
		if (!(element instanceof sequenceSite))
		{
			return false;
		}

		final sequenceSite that = (sequenceSite) element;
		return
			(SEQUENCE_POSITION == that.getSEQUENCE_POSITION()) &&
				(POSITION_STATUS != null ?
					POSITION_STATUS.equals(that.getPOSITION_STATUS()) :
					that.getPOSITION_STATUS() == null);
	}
642933
function isType3or5(frameData) {
    var zeroPositions = [2, 3, 14, 15, 34, 35, 62, 63, 98, 99, 142, 143, 194, 195, 254, 255];
    for (var i = 0; i < zeroPositions.length; i++) {
        if (frameData[zeroPositions[i]] !== 0) {
            return false;
        }
    }

    return true;
}
961519
function firstComposedNode(insertionPoint) {
    var n$ = insertionPoint.assignedNodes({flatten: true});
    var root = this.getRootNode(insertionPoint);
    for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
      // means that we're composed to this spot.
      if (root.isFinalDestination(insertionPoint, n)) {
        return n;
      }
    }
  }
303770
private void checkInvariants() {
        for (int i = 0; i < tokens.size(); i++) {
            Token token = tokens.get(i);

            Preconditions.checkArgument(token.getID() == i + 1,
                    String.format("Tokens should be numbered consecutively, starting at 1: %s", token));

            checkHead(token, token.getHead());
            checkHead(token, token.getPHead());
        }
    }
1086778
private void initFinalPositionAndOffset(BufferObjectDataInput in, ClassDefinition cd) {
        int fieldCount;
        try {
            // final position after portable is read
            finalPosition = in.readInt();
            fieldCount = in.readInt();
        } catch (IOException e) {
            throw new HazelcastSerializationException(e);
        }
        if (fieldCount != cd.getFieldCount()) {
            throw new IllegalStateException("Field count[" + fieldCount + "] in stream does not match " + cd);
        }
        offset = in.position();
    }
430414
private boolean goToNextStartPosition() throws IOException {
    int basicStartPositionMin;
    int basicStartPositionMax;
    int basicEndPosition;
    int basicEndPositionMin;
    int basicEndPositionMax;
    if (docId == -1 || docId == NO_MORE_DOCS) {
      throw new IOException("no document");
    } else {
      if (lastCollectedStartPosition < NO_MORE_POSITIONS
          && (collectedPositions.isEmpty()
              || (collectedPositions.firstKey() >= (lastCollectedStartPosition
                  - query.maximumLeft)))) {
        // collect new positions
        while ((lastCollectedStartPosition = subSpans
            .nextStartPosition()) != NO_MORE_POSITIONS) {
          basicEndPosition = subSpans.endPosition();
          basicStartPositionMin = Math.max(minPosition,
              lastCollectedStartPosition - query.maximumLeft);
          basicStartPositionMax = lastCollectedStartPosition
              - query.minimumLeft;
          basicEndPositionMin = basicEndPosition + query.minimumRight;
          basicEndPositionMax = Math.min(maxPosition + 1,
              basicEndPosition + query.maximumRight);
          for (int cLeft = basicStartPositionMin; cLeft <= basicStartPositionMax; cLeft++) {
            for (int cRight = basicEndPositionMin; cRight <= basicEndPositionMax; cRight++) {
              if (!collectedPositions.containsKey(cLeft)) {
                collectedPositions.put(cLeft, new ArrayList<Integer>());
              }
              collectedPositions.get(cLeft).add(cRight);
            }
          }
          if (!collectedPositions.isEmpty() && (collectedPositions
              .firstKey() < (lastCollectedStartPosition - query.maximumLeft))) {
            break;
          }
        }
      }
      if (collectedPositions.isEmpty()) {
        return false;
      } else {
        startPosition = collectedPositions.firstKey();
        endPosition = collectedPositions.get(startPosition).remove(0);
        if (collectedPositions.get(startPosition).isEmpty()) {
          collectedPositions.remove(startPosition);
        }
        return true;
      }
    }
  }
389180
public void add(int[] positions) {
    SortedSet<Integer> list = new TreeSet<>();
    for (int p : positions) {
      list.add(p);
    }
    if (mtasPositionType.equals(POSITION_SINGLE)) {
      mtasPositionType = POSITION_SET;
      list.add(mtasPositionStart);
    } else if (mtasPositionType.equals(POSITION_RANGE)) {
      mtasPositionType = POSITION_SET;
      for (int i = mtasPositionStart; i <= mtasPositionEnd; i++) {
        list.add(i);
      }
    } else if (mtasPositionType.equals(POSITION_SET)) {
      for (int p : mtasPositionList) {
        list.add(p);
      }
    }
    mtasPositionList = ArrayUtils
        .toPrimitive(list.toArray(new Integer[list.size()]));
    mtasPositionStart = list.first();
    mtasPositionEnd = list.last();
    if (list.size() == 1) {
      mtasPositionType = POSITION_SINGLE;
      mtasPositionList = null;
    } else if (list.size() == (1 + mtasPositionEnd - mtasPositionStart)) {
      mtasPositionType = POSITION_RANGE;
      mtasPositionList = null;
    }
  }
463455
int getNextSentencePosition(int numberOfParagraph, int startOfSentencePosition) {
    for (CacheEntry anEntry : entries) {
      if (anEntry.numberOfParagraph == numberOfParagraph && anEntry.startOfSentencePosition == startOfSentencePosition) {
        return anEntry.nextSentencePosition;
      }
    }
    return -1;
  }
1330423
def _position_in_feature(pos_a, pos_b):
    """"""
    strd = "-"
    if pos_a[2] in pos_b[2]:
        strd = "+"
    if pos_a[2] in "+" and pos_b[2] in "+":
        lento5 = pos_a[0] - pos_b[1] + 1
        lento3 = pos_a[1] - pos_b[1] + 1
    if pos_a[2] in "+" and pos_b[2] in "-":
        lento5 = pos_a[1] - pos_b[0] + 1
        lento3 = pos_a[0] - pos_b[1] + 1
    if pos_a[2] in "-" and pos_b[2] in "+":
        lento5 = pos_a[0] - pos_b[1] + 1
        lento3 = pos_a[1] - pos_b[0] + 1
    if pos_a[2] in "-" and pos_b[2] in "-":
        lento3 = pos_a[0] - pos_b[0] + 1
        lento5 = pos_a[1] - pos_b[1] + 1
    else:
        lento5 = pos_a[0] - pos_b[0] + 1
        lento3 = pos_a[1] - pos_b[1] + 1
    return lento5, lento3, strd
1167053
public void checkInvariants(CallStack frame, Expr... invariants) {
		for (int i = 0; i != invariants.length; ++i) {
			RValue.Bool b = executeExpression(BOOL_T, invariants[i], frame);
			if (b == RValue.False) {
				// FIXME: need to do more here
				throw new AssertionError();
			}
		}
	}
236612
boolean inSameSubroutine(final Label block) {
        for (int i = 0; i < srcAndRefPositions.length; ++i) {
            if ((srcAndRefPositions[i] & block.srcAndRefPositions[i]) != 0) {
                return true;
            }
        }
        return false;
    }
795447
private void preorderTreeDepth(INode root, HashMap<INode, Integer> order, HashMap<INode, Integer> depth) {
        order.clear();
        depth.clear();

        int num = 1;

        Deque<INode> stack = new ArrayDeque<INode>();
        stack.push(root);
        while (!stack.isEmpty()) {
            INode v = stack.pop();

            order.put(v, num++);
            if (!v.hasParent()) {
                depth.put(v, 0);
            } else {
                depth.put(v, depth.get(v.getParent()) + 1);
            }

            for (int i = v.getChildCount() - 1; i >= 0; i--) {
                stack.push(v.getChildAt(i));
            }
        }
    }