Program: 9449
Project: 9449
Buggy source:
static void decorateHTMLFile(File file) throws IOException {
  System.out.println("String_Node_Str" + file.getCanonicalPath() + "String_Node_Str");
  BufferedReader reader=new BufferedReader(new FileReader(file));
  StringBuffer fileContents=new StringBuffer();
  String line=reader.readLine();
  while (line != null) {
    fileContents.append(line + "String_Node_Str");
    line=reader.readLine();
  }
  boolean isSecond=false;
  int index=0;
  IProgramElement decl;
  while (true) {
    String contents=fileContents.toString();
    int start=contents.indexOf(Config.DECL_ID_STRING,index);
    int end=contents.indexOf(Config.DECL_ID_TERMINATOR,index);
    if (start == -1)     decl=null;
 else     if (end == -1)     throw new Error("String_Node_Str");
 else {
      String tid=contents.substring(start + Config.DECL_ID_STRING.length(),end);
      decl=(IProgramElement)declIDTable.get(tid);
      index=start;
    }
    if (decl == null)     break;
    fileContents.delete(start,end + Config.DECL_ID_TERMINATOR.length());
    if (decl.getKind().isType()) {
      isSecond=true;
      addAspectDocumentation(decl,fileContents,index);
    }
 else {
      decorateMemberDocumentation(decl,fileContents,index);
    }
  }
  int classStartIndex=fileContents.toString().indexOf("String_Node_Str");
  if (classStartIndex != -1 && fileContents.toString().indexOf("String_Node_Str") != -1) {
    int classEndIndex=fileContents.toString().indexOf("String_Node_Str",classStartIndex);
    if (classStartIndex != -1 && classEndIndex != -1) {
      String classLine=fileContents.toString().substring(classStartIndex,classEndIndex);
      String aspectLine="String_Node_Str" + "String_Node_Str" + classLine.substring(11,classLine.length());
      fileContents.delete(classStartIndex,classEndIndex);
      fileContents.insert(classStartIndex,aspectLine);
    }
  }
  file.delete();
  FileOutputStream fos=new FileOutputStream(file);
  fos.write(fileContents.toString().getBytes());
}

Fixed version (ground truth):
/** 
 * Skips files that are public in the model but not public in the source, e.g. nested aspects.
 */
static void decorateHTMLFile(File file) throws IOException {
  if (!file.exists())   return;
  System.out.println("String_Node_Str" + file.getCanonicalPath() + "String_Node_Str");
  BufferedReader reader=new BufferedReader(new FileReader(file));
  StringBuffer fileContents=new StringBuffer();
  String line=reader.readLine();
  while (line != null) {
    fileContents.append(line + "String_Node_Str");
    line=reader.readLine();
  }
  boolean isSecond=false;
  int index=0;
  IProgramElement decl;
  while (true) {
    String contents=fileContents.toString();
    int start=contents.indexOf(Config.DECL_ID_STRING,index);
    int end=contents.indexOf(Config.DECL_ID_TERMINATOR,index);
    if (start == -1)     decl=null;
 else     if (end == -1)     throw new Error("String_Node_Str");
 else {
      String tid=contents.substring(start + Config.DECL_ID_STRING.length(),end);
      decl=(IProgramElement)declIDTable.get(tid);
      index=start;
    }
    if (decl == null)     break;
    fileContents.delete(start,end + Config.DECL_ID_TERMINATOR.length());
    if (decl.getKind().isType()) {
      isSecond=true;
      addAspectDocumentation(decl,fileContents,index);
    }
 else {
      decorateMemberDocumentation(decl,fileContents,index);
    }
  }
  int classStartIndex=fileContents.toString().indexOf("String_Node_Str");
  if (classStartIndex != -1 && fileContents.toString().indexOf("String_Node_Str") != -1) {
    int classEndIndex=fileContents.toString().indexOf("String_Node_Str",classStartIndex);
    if (classStartIndex != -1 && classEndIndex != -1) {
      String classLine=fileContents.toString().substring(classStartIndex,classEndIndex);
      String aspectLine="String_Node_Str" + "String_Node_Str" + classLine.substring(11,classLine.length());
      fileContents.delete(classStartIndex,classEndIndex);
      fileContents.insert(classStartIndex,aspectLine);
    }
  }
  file.delete();
  FileOutputStream fos=new FileOutputStream(file);
  fos.write(fileContents.toString().getBytes());
}