Program: 12089
Project: 12089
Buggy source:
public static List<GeneratingMethodInfo> getMethodNames(IFile javaFile) throws Exception {
  List<GeneratingMethodInfo> methodStringInfos=new ArrayList<GeneratingMethodInfo>();
  boolean enabled=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodGen.ENABLE);
  if (enabled) {
    InputStream is=null;
    InputStreamReader isr=null;
    BufferedReader br=null;
    try {
      is=javaFile.getContents();
      isr=new InputStreamReader(is);
      br=new BufferedReader(isr);
      StringBuffer tmpsb=new StringBuffer();
      String line=null;
      while ((line=br.readLine()) != null)       tmpsb.append(line + "String_Node_Str");
      String allSrc=tmpsb.toString();
      String[] publics=allSrc.split("String_Node_Str");
      for (      String publicsEach : publics) {
        publicsEach=publicsEach.replaceAll("String_Node_Str" + STR.COMMA,STR.COMMA).replaceAll(STR.COMMA + "String_Node_Str",STR.COMMA);
        publicsEach=publicsEach.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
        if (publicsEach.matches(RXP_SEARCH_METHOD)) {
          Matcher matcher=PAT_SEARCH_GROUP_METHOD.matcher(publicsEach);
          if (matcher.find()) {
            GeneratingMethodInfo each=new GeneratingMethodInfo();
            each.returnTypeName=getType(matcher.group(1));
            each.returnTypeNameInMethodName=getTypeAvailableInMethodName(matcher.group(1));
            each.methodName=matcher.group(2);
            each.testMethodName=each.methodName;
            String args=matcher.group(3);
            String[] argArr=args.split("String_Node_Str");
            int argArrLen=argArr.length;
            for (int i=0; i < argArrLen; i++) {
              each.argTypeNames.add(getType(argArr[i]));
              each.argTypeNamesInMethodName.add(getTypeAvailableInMethodName(argArr[i]));
            }
            methodStringInfos.add(each);
          }
        }
      }
    }
  finally {
      FileResourceUtil.close(br);
      FileResourceUtil.close(isr);
      FileResourceUtil.close(is);
    }
  }
  return methodStringInfos;
}

Fixed version (ground truth):
public static List<GeneratingMethodInfo> getMethodNames(IFile javaFile) throws Exception {
  List<GeneratingMethodInfo> methodStringInfos=new ArrayList<GeneratingMethodInfo>();
  boolean enabled=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodGen.ENABLE);
  boolean enabledNotBlankMethods=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodGen.METHOD_SAMPLE_IMPLEMENTATION);
  if (enabled) {
    InputStream is=null;
    InputStreamReader isr=null;
    BufferedReader br=null;
    try {
      is=javaFile.getContents();
      isr=new InputStreamReader(is);
      br=new BufferedReader(isr);
      StringBuffer tmpsb=new StringBuffer();
      String line=null;
      while ((line=br.readLine()) != null)       tmpsb.append(line + "String_Node_Str");
      String allSrc=tmpsb.toString();
      String[] publics=allSrc.split("String_Node_Str");
      for (      String publicsEach : publics) {
        publicsEach=publicsEach.replaceAll("String_Node_Str" + STR.COMMA,STR.COMMA).replaceAll(STR.COMMA + "String_Node_Str",STR.COMMA);
        publicsEach=publicsEach.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
        if (publicsEach.matches(RXP_SEARCH_METHOD)) {
          Matcher matcher=PAT_SEARCH_GROUP_METHOD.matcher(publicsEach);
          if (matcher.find()) {
            GeneratingMethodInfo each=new GeneratingMethodInfo();
            each.returnTypeName=getType(matcher.group(1));
            each.returnTypeNameInMethodName=getTypeAvailableInMethodName(matcher.group(1));
            each.methodName=matcher.group(2);
            each.testMethodName=each.methodName;
            String args=matcher.group(3);
            String[] argArr=args.split("String_Node_Str");
            int argArrLen=argArr.length;
            for (int i=0; i < argArrLen; i++) {
              each.argTypeNames.add(getType(argArr[i]));
              each.argTypeNamesInMethodName.add(getTypeAvailableInMethodName(argArr[i]));
            }
            methodStringInfos.add(each);
          }
        }
      }
      if (enabledNotBlankMethods) {
        String[] importStartLines=allSrc.split("String_Node_Str");
        for (        String importStartLine : importStartLines) {
          if (!importStartLine.matches("String_Node_Str")) {
            String importedPackage=importStartLine.split("String_Node_Str")[0];
            methodStringInfos.get(0).importList.add(importedPackage);
          }
        }
      }
    }
  finally {
      FileResourceUtil.close(br);
      FileResourceUtil.close(isr);
      FileResourceUtil.close(is);
    }
  }
  return methodStringInfos;
}