Program: 9352
Project: 9352
Buggy source:
/** 
 * Before attempting to decorate the HTML file we have to verify that it exists, which depends on the documentation visibility specified to c. Depending on docModifier, can document - public: only public - protected: protected and public (default) - package: package protected and public - private: everything
 */
static void decorateHTMLFromDecl(Declaration decl,String base,String docModifier,boolean exceededNestingLevel) throws IOException {
  boolean nestedClass=false;
  if (decl.isType()) {
    boolean decorateFile=true;
    if ((docModifier.equals("String_Node_Str")) || (docModifier.equals("String_Node_Str") && decl.getModifiers().indexOf("String_Node_Str") == -1) || (docModifier.equals("String_Node_Str") && (decl.getModifiers().indexOf("String_Node_Str") != -1 || decl.getModifiers().indexOf("String_Node_Str") != -1))|| (docModifier.equals("String_Node_Str") && decl.getModifiers().indexOf("String_Node_Str") != -1)) {
      visibleFileList.add(decl.getSignature());
      String packageName=decl.getPackageName();
      String filename="String_Node_Str";
      if (packageName != null) {
        int index1=base.lastIndexOf(Config.DIR_SEP_CHAR);
        int index2=base.lastIndexOf("String_Node_Str");
        String currFileClass="String_Node_Str";
        if (index1 > -1 && index2 > 0 && index1 < index2) {
          currFileClass=base.substring(index1 + 1,index2);
        }
        if (currFileClass.equals(decl.getDeclaringType())) {
          nestedClass=true;
          packageName=packageName.replace('.','/');
          String newBase="String_Node_Str";
          if (base.lastIndexOf(Config.DIR_SEP_CHAR) > 0) {
            newBase=base.substring(0,base.lastIndexOf(Config.DIR_SEP_CHAR));
          }
          String signature=constructNestedTypeName(decl.getNode());
          filename=newBase + Config.DIR_SEP_CHAR + packageName+ Config.DIR_SEP_CHAR+ currFileClass+ signature+ "String_Node_Str";
        }
 else {
          packageName=packageName.replace('.','/');
          filename=base + packageName + Config.DIR_SEP_CHAR+ decl.getSignature()+ "String_Node_Str";
        }
      }
 else {
        filename=base + decl.getSignature() + "String_Node_Str";
      }
      if (!exceededNestingLevel) {
        decorateHTMLFile(new File(filename));
        decorateHTMLFromDecls(decl.getDeclarations(),base + decl.getSignature() + "String_Node_Str",docModifier,nestedClass);
      }
 else {
        System.out.println("String_Node_Str" + "String_Node_Str" + decl.getSignature());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Before attempting to decorate the HTML file we have to verify that it exists, which depends on the documentation visibility specified to c. Depending on docModifier, can document - public: only public - protected: protected and public (default) - package: package protected and public - private: everything
 */
static void decorateHTMLFromDecl(Declaration decl,String base,String docModifier,boolean exceededNestingLevel) throws IOException {
  boolean nestedClass=false;
  if (decl.isType()) {
    boolean decorateFile=true;
    if (isAboveVisibility(decl.getNode())) {
      visibleFileList.add(decl.getSignature());
      String packageName=decl.getPackageName();
      String filename="String_Node_Str";
      if (packageName != null) {
        int index1=base.lastIndexOf(Config.DIR_SEP_CHAR);
        int index2=base.lastIndexOf("String_Node_Str");
        String currFileClass="String_Node_Str";
        if (index1 > -1 && index2 > 0 && index1 < index2) {
          currFileClass=base.substring(index1 + 1,index2);
        }
        if (currFileClass.equals(decl.getDeclaringType())) {
          nestedClass=true;
          packageName=packageName.replace('.','/');
          String newBase="String_Node_Str";
          if (base.lastIndexOf(Config.DIR_SEP_CHAR) > 0) {
            newBase=base.substring(0,base.lastIndexOf(Config.DIR_SEP_CHAR));
          }
          String signature=constructNestedTypeName(decl.getNode());
          filename=newBase + Config.DIR_SEP_CHAR + packageName+ Config.DIR_SEP_CHAR+ currFileClass+ signature+ "String_Node_Str";
        }
 else {
          packageName=packageName.replace('.','/');
          filename=base + packageName + Config.DIR_SEP_CHAR+ decl.getSignature()+ "String_Node_Str";
        }
      }
 else {
        filename=base + decl.getSignature() + "String_Node_Str";
      }
      if (!exceededNestingLevel) {
        decorateHTMLFile(new File(filename));
        decorateHTMLFromDecls(decl.getDeclarations(),base + decl.getSignature() + "String_Node_Str",docModifier,nestedClass);
      }
 else {
        System.out.println("String_Node_Str" + "String_Node_Str" + decl.getSignature());
      }
    }
  }
}