Program: 9146
Project: 9146
Buggy source:
/** 
 * This constructs an AjcTest.Spec assuming we are at the start of a test definition in reader and taking the parent directory of the reader as the base directory for the test suite root. 
 * @return the next AjcTest in reader, or null
 * @see org.aspectj.testing.harness.bridge.SFileReader.Maker#make(LineReader)
 */
public Object make(final LineReader reader) throws AbortException, IOException {
  final AjcTest.Spec result=new AjcTest.Spec();
  boolean usingEclipse=false;
  /** 
 * handle read errors by throwing AbortException with context info 
 */
class R {
    public String read(    String context) throws IOException {
      return read(context,true);
    }
    public String read(    String context,    boolean required) throws IOException {
      final boolean skipEmpties=false;
      String result=reader.nextLine(skipEmpties);
      if ((null != result) && (0 == result.length())) {
        result=null;
      }
      if ((null == result) && required) {
        String s="String_Node_Str" + context + "String_Node_Str"+ reader;
        throw new AbortException(s);
      }
      return result;
    }
  }
  final R r=new R();
  String line;
  String[] words;
  final int startLine=reader.getLineNumber() - 1;
  result.description=reader.lastLine();
  if (null == result.description) {
    throw new AbortException("String_Node_Str" + reader);
  }
  line=r.read("String_Node_Str");
  words=LangUtil.split(line);
  if ((null == words) || (0 == words.length)) {
    throw new AbortException("String_Node_Str" + reader);
  }
  result.setTestDirOffset(words[0]);
  String[] compileOptions=new String[words.length - 1];
  System.arraycopy(words,1,compileOptions,0,words.length - 1);
  CompilerRun.Spec lastCompileSpec=null;
  File lastFile=null;
  while (null != (line=r.read("String_Node_Str"))) {
    words=LangUtil.split(line);
    if (0 == FileUtil.sourceSuffixLength(words[0])) {
      break;
    }
 else {
      lastCompileSpec=new CompilerRun.Spec();
      lastCompileSpec.testSrcDirOffset=null;
      lastCompileSpec.addOptions(compileOptions);
      lastCompileSpec.addPaths(words);
      lastFile=new File(words[words.length - 1]);
      result.addChild(lastCompileSpec);
    }
  }
  if (null == lastCompileSpec) {
    throw new AbortException("String_Node_Str" + reader);
  }
  ArrayList exp=new ArrayList();
  String first=words[0];
  if ("String_Node_Str".equals(first)) {
  }
 else   if ("String_Node_Str".equals(first)) {
  }
 else   if (isNumber(first) || (-1 != first.indexOf("String_Node_Str"))) {
    exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
  }
 else {
    String[] args=new String[words.length - 1];
    System.arraycopy(words,0,args,0,args.length);
    JavaRun.Spec spec=new JavaRun.Spec();
    spec.className=first;
    spec.addOptions(args);
    result.addChild(spec);
  }
  boolean gotErrors=false;
  while (null != (line=r.read("String_Node_Str",false))) {
    words=LangUtil.split(line);
    first=words[0];
    if ("String_Node_Str".equals(first)) {
      if (usingEclipse) {
        exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
      }
    }
 else     if ("String_Node_Str".equals(first)) {
      if (usingEclipse) {
        exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
      }
    }
 else     if ("String_Node_Str".equals(first)) {
      exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
    }
 else     if (gotErrors) {
      exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
    }
 else {
      exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
      gotErrors=true;
    }
  }
  lastCompileSpec.addMessages(exp);
  int endLine=reader.getLineNumber();
  File sourceFile=reader.getFile();
  ISourceLocation sl=new SourceLocation(sourceFile,startLine,endLine,0);
  result.setSourceLocation(sl);
  if (clean) {
    cleanup(result,reader);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * This constructs an AjcTest.Spec assuming we are at the start of a test definition in reader and taking the parent directory of the reader as the base directory for the test suite root. 
 * @return the next AjcTest in reader, or null
 * @see org.aspectj.testing.harness.bridge.SFileReader.Maker#make(UtilLineReader)
 */
public Object make(final UtilLineReader reader) throws AbortException, IOException {
  final AjcTest.Spec result=new AjcTest.Spec();
  boolean usingEclipse=false;
  /** 
 * handle read errors by throwing AbortException with context info 
 */
class R {
    public String read(    String context) throws IOException {
      return read(context,true);
    }
    public String read(    String context,    boolean required) throws IOException {
      final boolean skipEmpties=false;
      String result=reader.nextLine(skipEmpties);
      if ((null != result) && (0 == result.length())) {
        result=null;
      }
      if ((null == result) && required) {
        String s="String_Node_Str" + context + "String_Node_Str"+ reader;
        throw new AbortException(s);
      }
      return result;
    }
  }
  final R r=new R();
  String line;
  String[] words;
  final int startLine=reader.getLineNumber() - 1;
  result.description=reader.lastLine();
  if (null == result.description) {
    throw new AbortException("String_Node_Str" + reader);
  }
  line=r.read("String_Node_Str");
  words=LangUtil.split(line);
  if ((null == words) || (0 == words.length)) {
    throw new AbortException("String_Node_Str" + reader);
  }
  result.setTestDirOffset(words[0]);
  String[] compileOptions=new String[words.length - 1];
  System.arraycopy(words,1,compileOptions,0,words.length - 1);
  CompilerRun.Spec lastCompileSpec=null;
  File lastFile=null;
  while (null != (line=r.read("String_Node_Str"))) {
    words=LangUtil.split(line);
    if (0 == FileUtil.sourceSuffixLength(words[0])) {
      break;
    }
 else {
      lastCompileSpec=new CompilerRun.Spec();
      lastCompileSpec.testSrcDirOffset=null;
      lastCompileSpec.addOptions(compileOptions);
      lastCompileSpec.addPaths(words);
      lastFile=new File(words[words.length - 1]);
      result.addChild(lastCompileSpec);
    }
  }
  if (null == lastCompileSpec) {
    throw new AbortException("String_Node_Str" + reader);
  }
  ArrayList exp=new ArrayList();
  String first=words[0];
  if ("String_Node_Str".equals(first)) {
  }
 else   if ("String_Node_Str".equals(first)) {
  }
 else   if (isNumber(first) || (-1 != first.indexOf("String_Node_Str"))) {
    exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
  }
 else {
    String[] args=new String[words.length - 1];
    System.arraycopy(words,0,args,0,args.length);
    JavaRun.Spec spec=new JavaRun.Spec();
    spec.className=first;
    spec.addOptions(args);
    result.addChild(spec);
  }
  boolean gotErrors=false;
  while (null != (line=r.read("String_Node_Str",false))) {
    words=LangUtil.split(line);
    first=words[0];
    if ("String_Node_Str".equals(first)) {
      if (usingEclipse) {
        exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
      }
    }
 else     if ("String_Node_Str".equals(first)) {
      if (usingEclipse) {
        exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
      }
    }
 else     if ("String_Node_Str".equals(first)) {
      exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
    }
 else     if (gotErrors) {
      exp.addAll(makeMessages(IMessage.WARNING,words,0,lastFile));
    }
 else {
      exp.addAll(makeMessages(IMessage.ERROR,words,0,lastFile));
      gotErrors=true;
    }
  }
  lastCompileSpec.addMessages(exp);
  int endLine=reader.getLineNumber();
  File sourceFile=reader.getFile();
  ISourceLocation sl=new SourceLocation(sourceFile,startLine,endLine,0);
  result.setSourceLocation(sl);
  if (clean) {
    cleanup(result,reader);
  }
  return result;
}