Program: 75133
Project: 75133
Buggy source:
private void _handleDeclaration(ASTNode node,List bodyDeclarations,TypeAnalyzerState state){
  Class currentClass=state.getCurrentClass();
  List newDeclarations=new LinkedList();
  Iterator bodyIter=bodyDeclarations.iterator();
  while (bodyIter.hasNext()) {
    Object nextDeclaration=bodyIter.next();
    if (nextDeclaration instanceof FieldDeclaration) {
      FieldDeclaration fieldDecl=(FieldDeclaration)nextDeclaration;
      boolean isStatic=Modifier.isStatic(fieldDecl.getModifiers());
      if (isStatic && HANDLE_STATIC_FIELDS != true)       continue;
      if (Modifier.isPrivate(fieldDecl.getModifiers())) {
        AST ast=fieldDecl.getAST();
        Type type=Type.getType(fieldDecl);
        Iterator fragmentIter=fieldDecl.fragments().iterator();
        while (fragmentIter.hasNext()) {
          VariableDeclarationFragment fragment=(VariableDeclarationFragment)fragmentIter.next();
          String fieldName=fragment.getName().getIdentifier();
          List indicesList=_getAccessedField(currentClass.getName(),fieldName);
          if (indicesList == null)           continue;
          Iterator indicesIter=indicesList.iterator();
          while (indicesIter.hasNext()) {
            int indices=((Integer)indicesIter.next()).intValue();
            newDeclarations.add(_createAssignMethod(currentClass,ast,fieldName,type,indices,isStatic,state.getClassLoader()));
            newDeclarations.add(_createFieldRecord(currentClass,ast,fieldName,indices,isStatic));
          }
        }
      }
    }
  }
  bodyDeclarations.addAll(newDeclarations);
  AST ast=node.getAST();
  VariableDeclarationFragment fragment=ast.newVariableDeclarationFragment();
  fragment.setName(ast.newSimpleName(CHECKPOINT_NAME));
  FieldDeclaration checkpointField=ast.newFieldDeclaration(fragment);
  checkpointField.setType(_createType(ast,Checkpoint.class.getName()));
  checkpointField.setModifiers(Modifier.PRIVATE);
  bodyDeclarations.add(checkpointField);
}

Fixed version (ground truth):
private void _handleDeclaration(ASTNode node,List bodyDeclarations,TypeAnalyzerState state){
  Class currentClass=state.getCurrentClass();
  List newMethods=new LinkedList();
  List newFields=new LinkedList();
  Iterator bodyIter=bodyDeclarations.iterator();
  while (bodyIter.hasNext()) {
    Object nextDeclaration=bodyIter.next();
    if (nextDeclaration instanceof FieldDeclaration) {
      FieldDeclaration fieldDecl=(FieldDeclaration)nextDeclaration;
      boolean isStatic=Modifier.isStatic(fieldDecl.getModifiers());
      if (isStatic && HANDLE_STATIC_FIELDS != true)       continue;
      if (Modifier.isPrivate(fieldDecl.getModifiers())) {
        AST ast=fieldDecl.getAST();
        Type type=Type.getType(fieldDecl);
        Iterator fragmentIter=fieldDecl.fragments().iterator();
        while (fragmentIter.hasNext()) {
          VariableDeclarationFragment fragment=(VariableDeclarationFragment)fragmentIter.next();
          String fieldName=fragment.getName().getIdentifier();
          List indicesList=_getAccessedField(currentClass.getName(),fieldName);
          if (indicesList == null)           continue;
          Iterator indicesIter=indicesList.iterator();
          while (indicesIter.hasNext()) {
            int indices=((Integer)indicesIter.next()).intValue();
            newMethods.add(_createAssignMethod(currentClass,ast,fieldName,type,indices,isStatic,state.getClassLoader()));
            newFields.add(_createFieldRecord(currentClass,ast,fieldName,indices,isStatic));
          }
        }
      }
    }
  }
  bodyDeclarations.addAll(newMethods);
  bodyDeclarations.addAll(newFields);
  AST ast=node.getAST();
  VariableDeclarationFragment fragment=ast.newVariableDeclarationFragment();
  fragment.setName(ast.newSimpleName(CHECKPOINT_NAME));
  FieldDeclaration checkpointField=ast.newFieldDeclaration(fragment);
  checkpointField.setType(_createType(ast,Checkpoint.class.getName()));
  checkpointField.setModifiers(Modifier.PRIVATE);
  bodyDeclarations.add(checkpointField);
}