Program: 12095
Project: 12095
Buggy source:
public static List<String> getTestMethodsFromTarget(IFile javaFile) throws Exception {
  List<String> testMethods=new ArrayList<String>();
  boolean enabled=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.ENABLE);
  String delimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.DELIMITER);
  boolean enabledArgs=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.ARGS);
  String argsPrefix=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.ARGS_PREFIX);
  String argsDelimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.ARGS_DELIMITER);
  boolean enabledReturn=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.RETURN);
  String returnPrefix=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.RETURN_PREFIX);
  String returnDelimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.RETURN_DELIMITER);
  if (enabled) {
    InputStream is=null;
    BufferedReader br=null;
    try {
      is=javaFile.getContents();
      br=new BufferedReader(new InputStreamReader(is));
      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) {
        if (publicsEach.matches("String_Node_Str")) {
          Matcher matcher=Pattern.compile("String_Node_Str").matcher(publicsEach);
          if (matcher.find()) {
            String methodReturnType=matcher.group(1);
            String methodName=matcher.group(2);
            String args=matcher.group(3);
            String[] argArr=args.split("String_Node_Str");
            String argTypes="String_Node_Str";
            for (int i=0; i < argArr.length; i+=2) {
              String arg="String_Node_Str";
              arg=argArr[i].replaceAll("String_Node_Str","String_Node_Str");
              arg=arg.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
              argTypes+=argsDelimiter + arg;
            }
            String testMethodName="String_Node_Str" + delimiter + methodName;
            if (enabledReturn) {
              methodReturnType=methodReturnType.replaceAll("String_Node_Str","String_Node_Str");
              testMethodName+=delimiter + returnPrefix + returnDelimiter+ methodReturnType;
            }
            if (enabledArgs)             testMethodName+=delimiter + argsPrefix + argTypes;
            testMethods.add(testMethodName);
          }
        }
      }
    }
  finally {
      if (is != null)       try {
        is.close();
      }
 catch (      Exception ignore) {
      }
      if (br != null)       try {
        br.close();
      }
 catch (      Exception ignore) {
      }
    }
  }
  return testMethods;
}

Fixed version (ground truth):
public static List<String> getTestMethodsFromTarget(IFile javaFile) throws Exception {
  List<String> testMethods=new ArrayList<String>();
  boolean enabled=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.ENABLE);
  String delimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.DELIMITER);
  boolean enabledArgs=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.ARGS);
  String argsPrefix=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.ARGS_PREFIX);
  String argsDelimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.ARGS_DELIMITER);
  boolean enabledReturn=Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.RETURN);
  String returnPrefix=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.RETURN_PREFIX);
  String returnDelimiter=Activator.getDefault().getPreferenceStore().getString(STR.Preference.TestMethodAutoGenerate.RETURN_DELIMITER);
  if (enabled) {
    InputStream is=null;
    BufferedReader br=null;
    try {
      is=javaFile.getContents();
      br=new BufferedReader(new InputStreamReader(is));
      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) {
        if (publicsEach.matches(RXP_WS + RXP_ANY_RQ + "String_Node_Str"+ RXP_ANY_RQ+ RXP_WS+ "String_Node_Str"+ RXP_ANY_NRQ+ "String_Node_Str"+ RXP_WS+ RXP_ANY_NRQ+ RXP_WS+ RXP_ANY_NRQ+ "String_Node_Str")) {
          Matcher matcher=Pattern.compile(RXP_WS + "String_Node_Str" + RXP_ANY_RQ+ "String_Node_Str"+ RXP_ANY_RQ+ "String_Node_Str"+ RXP_WS+ "String_Node_Str"+ RXP_ANY_NRQ+ "String_Node_Str"+ RXP_WS+ RXP_ANY_NRQ+ RXP_WS+ RXP_ANY_NRQ+ "String_Node_Str").matcher(publicsEach);
          if (matcher.find()) {
            String methodReturnType=matcher.group(1);
            String methodName=matcher.group(2);
            if (methodReturnType.equals("String_Node_Str"))             methodName=methodName.split("String_Node_Str")[1];
            String args=matcher.group(3);
            String[] argArr=args.split("String_Node_Str");
            String argTypes=STR.EMPTY;
            for (int i=0; i < argArr.length; i+=2) {
              String arg=STR.EMPTY;
              arg=argArr[i].replaceAll("String_Node_Str",STR.EMPTY);
              arg=arg.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
              argTypes+=argsDelimiter + arg;
            }
            String testMethodName="String_Node_Str" + delimiter + methodName;
            if (enabledReturn) {
              methodReturnType=methodReturnType.replaceAll("String_Node_Str",STR.EMPTY);
              testMethodName+=delimiter + returnPrefix + returnDelimiter+ methodReturnType;
            }
            if (enabledArgs)             testMethodName+=delimiter + argsPrefix + argTypes;
            testMethods.add(testMethodName);
          }
        }
      }
    }
  finally {
      if (is != null)       try {
        is.close();
      }
 catch (      Exception ignore) {
      }
      if (br != null)       try {
        br.close();
      }
 catch (      Exception ignore) {
      }
    }
  }
  return testMethods;
}