if (!statements.isEmpty()) { int nodeType= ((ASTNode) statements.get(0)).getNodeType(); if (nodeType == ASTNode.CONSTRUCTOR_INVOCATION || nodeType == ASTNode.SUPER_CONSTRUCTOR_INVOCATION) { return 1;
HashSet paramsBefore= new HashSet(); List params = ((MethodDeclaration) fNodeToAssign.getParent()).parameters(); for (int i = 0; i < params.size() && (params.get(i) != fNodeToAssign); i++) { SingleVariableDeclaration decl= (SingleVariableDeclaration) params.get(i); paramsBefore.add(decl.getName().getIdentifier()); }  int i= 0; for (i = 0; i < statements.size(); i++) { Statement curr= (Statement) statements.get(i); switch (curr.getNodeType()) { case ASTNode.CONSTRUCTOR_INVOCATION: case ASTNode.SUPER_CONSTRUCTOR_INVOCATION: break; case ASTNode.EXPRESSION_STATEMENT: Expression expr= ((ExpressionStatement) curr).getExpression(); if (expr instanceof Assignment) { Assignment assignment= (Assignment) expr; Expression rightHand = assignment.getRightHandSide(); if (rightHand instanceof SimpleName && paramsBefore.contains(((SimpleName) rightHand).getIdentifier())) { IVariableBinding binding = Bindings.getAssignedVariable(assignment); if (binding == null || binding.isField()) { break; } } } return i; default: return i;
	private int findAssignmentInsertIndex(List statements) {		if (!statements.isEmpty()) {			int nodeType= ((ASTNode) statements.get(0)).getNodeType();			if (nodeType == ASTNode.CONSTRUCTOR_INVOCATION || nodeType == ASTNode.SUPER_CONSTRUCTOR_INVOCATION) {				return 1;			}		}		return 0;	}