Program: 134354
Project: 134354
Buggy source:
public CreateIndex(){
  HashMap<String,String> hashResult=new HashMap<String,String>();
  File dirFile=new File("String_Node_Str");
  File[] fileList=dirFile.listFiles();
  if (fileList != null) {
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    for (int i=0; i < fileList.length; i++) {
      String fileName=fileList[i].getName();
      System.out.println("String_Node_Str" + fileName + "String_Node_Str");
      HashMap<String,Integer> hashMap=new HashMap<String,Integer>();
      String content=ReadAndWrite.readFileByChars("String_Node_Str" + fileName,"String_Node_Str");
      String[] wordArray=content.split("String_Node_Str");
      for (int j=0; j < wordArray.length; j++) {
        if (hashMap.keySet().contains(wordArray[j])) {
          Integer integer=(Integer)hashMap.get(wordArray[j]);
          int value=integer.intValue() + 1;
          hashMap.put(wordArray[j],new Integer(value));
        }
 else {
          hashMap.put(wordArray[j],new Integer(1));
        }
      }
      String title_origin=ReadAndWrite.readFileByChars("String_Node_Str" + fileName,"String_Node_Str");
      String fullContent_origin=ReadAndWrite.readFileByChars("String_Node_Str" + fileName,"String_Node_Str");
      for (      String str : hashMap.keySet()) {
        String title=title_origin;
        String fullContent=fullContent_origin;
        String partContent="String_Node_Str";
        int wordStart=fullContent.indexOf(str);
        while (wordStart > 0) {
          String strTmp;
          int s=0, e=fullContent.length();
          if (wordStart > 10) {
            s=wordStart - 10;
          }
 else {
            s=0;
          }
          if (e > (wordStart + 10)) {
            e=wordStart + 10;
          }
          strTmp=fullContent.substring(s,e);
          partContent+=(strTmp + "String_Node_Str");
          fullContent=fullContent.substring(e);
          wordStart=fullContent.indexOf(str);
        }
        String tmp=fileName + "String_Node_Str" + title+ "String_Node_Str"+ partContent+ "String_Node_Str"+ hashMap.get(str);
        if (hashResult.keySet().contains(str)) {
          String value=(String)hashResult.get(str);
          value+=("String_Node_Str" + tmp);
          hashResult.put(str,value);
        }
 else {
          hashResult.put(str,tmp);
        }
      }
    }
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
  }
  if (hashResult.size() > 0) {
    StringBuilder value=new StringBuilder("String_Node_Str");
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    for (    String str : hashResult.keySet()) {
      StringBuilder tmp=new StringBuilder(str).append("String_Node_Str").append(hashResult.get(str));
      value.append(tmp).append("String_Node_Str");
    }
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    this.writeFileByChars("String_Node_Str",value.toString());
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
  }
}

Fixed version (ground truth):
public CreateIndex() throws IOException {
  HashMap<String,String> hashResult=new HashMap<String,String>();
  File dirFile=new File("String_Node_Str");
  File[] fileList=dirFile.listFiles();
  if (fileList != null) {
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    for (int i=0; i < fileList.length; i++) {
      String fileName=fileList[i].getName();
      System.out.println("String_Node_Str" + fileName + "String_Node_Str");
      HashMap<String,Integer> hashMap=new HashMap<String,Integer>();
      String content=FileUtils.readFileToString(new File("String_Node_Str" + fileName),"String_Node_Str");
      String[] wordArray=content.split("String_Node_Str");
      for (int j=0; j < wordArray.length; j++) {
        if (hashMap.keySet().contains(wordArray[j])) {
          Integer integer=(Integer)hashMap.get(wordArray[j]);
          int value=integer.intValue() + 1;
          hashMap.put(wordArray[j],new Integer(value));
        }
 else {
          hashMap.put(wordArray[j],new Integer(1));
        }
      }
      String titleOrigin=FileUtils.readFileToString(new File("String_Node_Str" + fileName),"String_Node_Str");
      String fullContentOrigin=FileUtils.readFileToString(new File("String_Node_Str" + fileName),"String_Node_Str");
      for (      String str : hashMap.keySet()) {
        String title=titleOrigin;
        String fullContent=fullContentOrigin;
        String partContent="String_Node_Str";
        int wordStart=fullContent.indexOf(str);
        while (wordStart > 0) {
          String strTmp;
          int s=0, e=fullContent.length();
          if (wordStart > 10) {
            s=wordStart - 10;
          }
 else {
            s=0;
          }
          if (e > (wordStart + 10)) {
            e=wordStart + 10;
          }
          strTmp=fullContent.substring(s,e);
          partContent+=(strTmp + "String_Node_Str");
          fullContent=fullContent.substring(e);
          wordStart=fullContent.indexOf(str);
        }
        String tmp=fileName + "String_Node_Str" + title+ "String_Node_Str"+ partContent+ "String_Node_Str"+ hashMap.get(str);
        if (hashResult.keySet().contains(str)) {
          String value=(String)hashResult.get(str);
          value+=("String_Node_Str" + tmp);
          hashResult.put(str,value);
        }
 else {
          hashResult.put(str,tmp);
        }
      }
    }
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
  }
  if (hashResult.size() > 0) {
    StringBuilder value=new StringBuilder("String_Node_Str");
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    for (    String str : hashResult.keySet()) {
      StringBuilder tmp=new StringBuilder(str).append("String_Node_Str").append(hashResult.get(str));
      value.append(tmp).append("String_Node_Str");
    }
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
    System.out.println("String_Node_Str");
    start=System.currentTimeMillis();
    this.writeFileByChars("String_Node_Str",value.toString());
    end=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (end - start) + "String_Node_Str");
  }
}