private int findFieldInsertIndex(List decls, int currPos) { for (int i= decls.size() - 1; i >= 0; i--) { ASTNode curr= (ASTNode) decls.get(i); if (curr instanceof FieldDeclaration) { if (currPos > curr.getStartPosition() + curr.getLength()) { return i + 1;
private int findFieldInsertIndex(List decls, FieldDeclaration newDecl, int maxOffset) { if (maxOffset != -1) { for (int i= 0; i < decls.size(); i++) { ASTNode node= (ASTNode) decls.get(i); if (node.getStartPosition() < maxOffset) { return  ASTNodes.getInsertionIndex(newDecl, decls.subList(0, i));
	private int findFieldInsertIndex(List decls, int currPos) {		for (int i= decls.size() - 1; i >= 0; i--) {			ASTNode curr= (ASTNode) decls.get(i);			if (curr instanceof FieldDeclaration) {				if (currPos > curr.getStartPosition() + curr.getLength()) {					return i + 1;				}			}		}		return 0;	}