Program: 12034
Project: 12034
Buggy source:
private void setPublicModifierToSourceMemberType(ITypeBinding typeBinding){
  TypeDeclaration[] memberTypes=sourceTypeDeclaration.getTypes();
  for (  TypeDeclaration memberType : memberTypes) {
    if (typeBinding.isEqualTo(memberType.resolveBinding())) {
      ASTRewrite sourceRewriter=ASTRewrite.create(sourceTypeDeclaration.getAST());
      ListRewrite modifierRewrite=sourceRewriter.getListRewrite(memberType,TypeDeclaration.MODIFIERS2_PROPERTY);
      Modifier publicModifier=memberType.getAST().newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
      boolean modifierFound=false;
      List<IExtendedModifier> modifiers=memberType.modifiers();
      for (      IExtendedModifier extendedModifier : modifiers) {
        if (extendedModifier.isModifier()) {
          Modifier modifier=(Modifier)extendedModifier;
          if (modifier.getKeyword().equals(Modifier.ModifierKeyword.PUBLIC_KEYWORD)) {
            modifierFound=true;
          }
 else           if (modifier.getKeyword().equals(Modifier.ModifierKeyword.PRIVATE_KEYWORD)) {
            if (!memberTypeDeclarationsChangedWithPublicModifier.contains(memberType)) {
              memberTypeDeclarationsChangedWithPublicModifier.add(memberType);
              modifierFound=true;
              modifierRewrite.replace(modifier,publicModifier,null);
              try {
                TextEdit sourceEdit=sourceRewriter.rewriteAST();
                ICompilationUnit sourceICompilationUnit=(ICompilationUnit)sourceCompilationUnit.getJavaElement();
                CompilationUnitChange change=compilationUnitChanges.get(sourceICompilationUnit);
                change.getEdit().addChild(sourceEdit);
                change.addTextEditGroup(new TextEditGroup("String_Node_Str",new TextEdit[]{sourceEdit}));
              }
 catch (              JavaModelException e) {
                e.printStackTrace();
              }
            }
          }
 else           if (modifier.getKeyword().equals(Modifier.ModifierKeyword.PROTECTED_KEYWORD)) {
            modifierFound=true;
          }
        }
      }
      if (!modifierFound) {
        if (!memberTypeDeclarationsChangedWithPublicModifier.contains(memberType)) {
          memberTypeDeclarationsChangedWithPublicModifier.add(memberType);
          modifierRewrite.insertFirst(publicModifier,null);
          try {
            TextEdit sourceEdit=sourceRewriter.rewriteAST();
            ICompilationUnit sourceICompilationUnit=(ICompilationUnit)sourceCompilationUnit.getJavaElement();
            CompilationUnitChange change=compilationUnitChanges.get(sourceICompilationUnit);
            change.getEdit().addChild(sourceEdit);
            change.addTextEditGroup(new TextEditGroup("String_Node_Str",new TextEdit[]{sourceEdit}));
          }
 catch (          JavaModelException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void setPublicModifierToSourceMemberType(ITypeBinding typeBinding){
  List<BodyDeclaration> bodyDeclarations=sourceTypeDeclaration.bodyDeclarations();
  for (  BodyDeclaration bodyDeclaration : bodyDeclarations) {
    if (bodyDeclaration instanceof TypeDeclaration) {
      TypeDeclaration memberType=(TypeDeclaration)bodyDeclaration;
      ITypeBinding memberTypeBinding=memberType.resolveBinding();
      if (typeBinding.isEqualTo(memberTypeBinding)) {
        updateBodyDeclarationAccessModifier(memberType,TypeDeclaration.MODIFIERS2_PROPERTY);
      }
    }
 else     if (bodyDeclaration instanceof EnumDeclaration) {
      EnumDeclaration memberEnum=(EnumDeclaration)bodyDeclaration;
      ITypeBinding memberTypeBinding=memberEnum.resolveBinding();
      if (typeBinding.isEqualTo(memberTypeBinding)) {
        updateBodyDeclarationAccessModifier(memberEnum,EnumDeclaration.MODIFIERS2_PROPERTY);
      }
    }
  }
}