if (bestOffset != invocationLocation) { resultingAnnotations.clear(); bestOffset= invocationLocation; } resultingAnnotations.add(annot); } else if (goToClosest && bestOffset != invocationLocation) {
return invocationLocation; } else if (bestOffset != invocationLocation) {
	private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset, boolean goToClosest, ArrayList resultingAnnotations) {		int posBegin= pos.offset;		int posEnd= posBegin + pos.length;		if (isInside(invocationLocation, posBegin, posEnd)) { // covers invocation location?			if (bestOffset != invocationLocation) {				resultingAnnotations.clear();				bestOffset= invocationLocation;			}			resultingAnnotations.add(annot); // don't do the 'hasCorrections' test		} else if (goToClosest && bestOffset != invocationLocation) {			int newClosestPosition= computeBestOffset(posBegin, invocationLocation, bestOffset);			if (newClosestPosition != -1) { 				if (newClosestPosition != bestOffset) { // new best					if (JavaCorrectionProcessor.hasCorrections(annot)) { // only jump to it if there are proposals						resultingAnnotations.clear();						bestOffset= newClosestPosition;						resultingAnnotations.add(annot);					}				} else { // as good as previous, don't do the 'hasCorrections' test					resultingAnnotations.add(annot);				}			}		}		return bestOffset;	}