if (newOffset <= initalOffset && invocationOffset >= initalOffset) return newOffset;  if (newOffset <= initalOffset && invocationOffset < initalOffset) return Math.max(invocationOffset, newOffset);  if (invocationOffset <= initalOffset) return invocationOffset;  return Math.max(invocationOffset, newOffset);
return -1;
	private int computeBestOffset(int invocationOffset, Position pos, int initalOffset) {		int newOffset= pos.offset;		if (newOffset <= initalOffset && initalOffset <= newOffset + pos.length)			return initalOffset;		if (invocationOffset < 0)			return newOffset;		if (newOffset <= initalOffset && invocationOffset >= initalOffset)			return newOffset;		if (newOffset <= initalOffset && invocationOffset < initalOffset)			return Math.max(invocationOffset, newOffset);		if (invocationOffset <= initalOffset)			return invocationOffset;		return Math.max(invocationOffset, newOffset);	}