Program: 9170
Project: 9170
Buggy source:
/** 
 * Entry point for a test. This reads in the arguments,  creates the test suite(s) from the input file(s), and for each suite does setup, run, report, and cleanup.  When arguments are read, any option ending with "-" causes option variants, a set of args with and another without the option. See   {@link LangUtil.optionVariants(String[])} for more details.
 * @param args the String[] for the test suite - use -help to get options,and use "-" suffixes for variants.
 * @param resultList List for IRunStatus results - ignored if null 
 */
public void runMain(String[] args,List resultList){
  LangUtil.throwIaxIfFalse(!LangUtil.isEmpty(args),"String_Node_Str");
  final ArrayList globals=new ArrayList();
  final ArrayList files=new ArrayList();
  final LinkedList argList=new LinkedList();
  argList.addAll(Arrays.asList(args));
  for (int i=0; i < argList.size(); i++) {
    String arg=(String)argList.get(i);
    List aliases=aliasOptions(arg);
    if (!LangUtil.isEmpty(aliases)) {
      argList.remove(i);
      argList.addAll(i,aliases);
      i--;
      continue;
    }
    if ("String_Node_Str".equals(arg)) {
      logln("String_Node_Str" + Harness.class.getName() + "String_Node_Str");
      printSyntax(getLogStream());
      return;
    }
 else     if (isSuiteFile(arg)) {
      files.add(arg);
    }
 else     if (!acceptOption(arg)) {
      globals.add(arg);
    }
  }
  if (0 == files.size()) {
    logln("String_Node_Str");
    logln("String_Node_Str" + Harness.class.getName() + "String_Node_Str");
    printSyntax(getLogStream());
    return;
  }
  String[] globalOptions=(String[])globals.toArray(new String[0]);
  String[][] globalOptionVariants=LangUtil.optionVariants(globalOptions);
  AbstractRunSpec.RT runtime=new AbstractRunSpec.RT();
  if (verboseHarness) {
    runtime.setVerbose(true);
  }
  AjcTest.Suite.Spec spec;
  for (Iterator iter=files.iterator(); iter.hasNext(); ) {
    File suiteFile=new File((String)iter.next());
    if (!suiteFile.canRead()) {
      logln("String_Node_Str" + suiteFile);
      continue;
    }
    if (null == (spec=readSuite(suiteFile))) {
      logln("String_Node_Str" + suiteFile);
      continue;
    }
    MessageHandler holder=new MessageHandler();
    for (int i=0; i < globalOptionVariants.length; i++) {
      runtime.setOptions(globalOptionVariants[i]);
      holder.init();
      boolean skip=!spec.adoptParentValues(runtime,holder);
      final List skipList=MessageUtil.getMessages(holder,IMessage.INFO,false,"String_Node_Str");
      if ((verboseHarness || skip || (0 < skipList.size()))) {
        final List curArgs=Arrays.asList(globalOptionVariants[i]);
        logln("String_Node_Str" + suiteFile + "String_Node_Str"+ curArgs+ "String_Node_Str");
        if (verboseHarness) {
          String format="String_Node_Str";
          SimpleDateFormat formatter=new SimpleDateFormat(format);
          String date=formatter.format(new Date());
          logln("String_Node_Str" + date);
          logln("String_Node_Str" + listFeatureNames());
          logln("String_Node_Str" + JAVA_VERSION);
          logln("String_Node_Str" + ASPECTJ_VERSION);
        }
        if (!(quietHarness || silentHarness) && holder.hasAnyMessage(null,true)) {
          MessageUtil.print(getLogStream(),holder,"String_Node_Str");
          MessageUtil.printMessageCounts(getLogStream(),holder,"String_Node_Str");
        }
      }
      if (!skip) {
        doStartSuite(suiteFile);
        long elapsed=0;
        RunResult result=null;
        try {
          final long startTime=System.currentTimeMillis();
          result=run(spec);
          if (null != resultList) {
            resultList.add(result);
          }
          elapsed=System.currentTimeMillis() - startTime;
          report(result.status,skipList.size(),result.numIncomplete,elapsed);
        }
  finally {
          doEndSuite(suiteFile,elapsed);
        }
        if (exitOnFailure && (null != result)) {
          int numFailures=RunUtils.numFailures(result.status,true);
          if (0 < numFailures) {
            System.exit(numFailures);
          }
          Object value=result.status.getResult();
          if ((value instanceof Boolean) && !((Boolean)value).booleanValue()) {
            System.exit(-1);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Entry point for a test. This reads in the arguments,  creates the test suite(s) from the input file(s), and for each suite does setup, run, report, and cleanup.  When arguments are read, any option ending with "-" causes option variants, a set of args with and another without the option. See   {@link LangUtil.optionVariants(String[])} for more details.
 * @param args the String[] for the test suite - use -help to get options,and use "-" suffixes for variants.
 * @param resultList List for IRunStatus results - ignored if null 
 */
public void runMain(String[] args,List resultList){
  LangUtil.throwIaxIfFalse(!LangUtil.isEmpty(args),"String_Node_Str");
  final ArrayList globals=new ArrayList();
  final ArrayList files=new ArrayList();
  final LinkedList argList=new LinkedList();
  argList.addAll(Arrays.asList(args));
  for (int i=0; i < argList.size(); i++) {
    String arg=(String)argList.get(i);
    List aliases=aliasOptions(arg);
    if (!LangUtil.isEmpty(aliases)) {
      argList.remove(i);
      argList.addAll(i,aliases);
      i--;
      continue;
    }
    if ("String_Node_Str".equals(arg)) {
      logln("String_Node_Str" + Harness.class.getName() + "String_Node_Str");
      printSyntax(getLogStream());
      return;
    }
 else     if (isSuiteFile(arg)) {
      files.add(arg);
    }
 else     if (!acceptOption(arg)) {
      globals.add(arg);
    }
  }
  if (0 == files.size()) {
    logln("String_Node_Str");
    logln("String_Node_Str" + Harness.class.getName() + "String_Node_Str");
    printSyntax(getLogStream());
    return;
  }
  String[] globalOptions=(String[])globals.toArray(new String[0]);
  String[][] globalOptionVariants=optionVariants(globalOptions);
  AbstractRunSpec.RT runtime=new AbstractRunSpec.RT();
  if (verboseHarness) {
    runtime.setVerbose(true);
  }
  AjcTest.Suite.Spec spec;
  for (Iterator iter=files.iterator(); iter.hasNext(); ) {
    File suiteFile=new File((String)iter.next());
    if (!suiteFile.canRead()) {
      logln("String_Node_Str" + suiteFile);
      continue;
    }
    if (null == (spec=readSuite(suiteFile))) {
      logln("String_Node_Str" + suiteFile);
      continue;
    }
    MessageHandler holder=new MessageHandler();
    for (int i=0; i < globalOptionVariants.length; i++) {
      runtime.setOptions(globalOptionVariants[i]);
      holder.init();
      boolean skip=!spec.adoptParentValues(runtime,holder);
      final List skipList=MessageUtil.getMessages(holder,IMessage.INFO,false,"String_Node_Str");
      if ((verboseHarness || skip || (0 < skipList.size()))) {
        final List curArgs=Arrays.asList(globalOptionVariants[i]);
        logln("String_Node_Str" + suiteFile + "String_Node_Str"+ curArgs+ "String_Node_Str");
        if (verboseHarness) {
          String format="String_Node_Str";
          SimpleDateFormat formatter=new SimpleDateFormat(format);
          String date=formatter.format(new Date());
          logln("String_Node_Str" + date);
          logln("String_Node_Str" + listFeatureNames());
          logln("String_Node_Str" + JAVA_VERSION);
          logln("String_Node_Str" + ASPECTJ_VERSION);
        }
        if (!(quietHarness || silentHarness) && holder.hasAnyMessage(null,true)) {
          MessageUtil.print(getLogStream(),holder,"String_Node_Str");
          MessageUtil.printMessageCounts(getLogStream(),holder,"String_Node_Str");
        }
      }
      if (!skip) {
        doStartSuite(suiteFile);
        long elapsed=0;
        RunResult result=null;
        try {
          final long startTime=System.currentTimeMillis();
          result=run(spec);
          if (null != resultList) {
            resultList.add(result);
          }
          elapsed=System.currentTimeMillis() - startTime;
          report(result.status,skipList.size(),result.numIncomplete,elapsed);
        }
  finally {
          doEndSuite(suiteFile,elapsed);
        }
        if (exitOnFailure) {
          int numFailures=RunUtils.numFailures(result.status,true);
          if (0 < numFailures) {
            System.exit(numFailures);
          }
          Object value=result.status.getResult();
          if ((value instanceof Boolean) && !((Boolean)value).booleanValue()) {
            System.exit(-1);
          }
        }
      }
    }
  }
}