Program: 178562
Project: 178562
Buggy source:
/** 
 * Parse a TAP line.
 * @param tapLine TAP line
 */
public void parseLine(String tapLine){
  Matcher matcher=null;
  matcher=Constants.COMMENT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onComment(matcher.group(1));
    return;
  }
  if (state.getBaseIndentationLevel() > -1) {
    matcher=Constants.INDENTANTION_PATTERN.matcher(tapLine);
    if (matcher.matches()) {
      int indentation=matcher.group(1).length();
      state.setCurrentIndentationLevel(indentation);
      if (indentation > state.getBaseIndentationLevel()) {
        if (tapLine.trim().equals("String_Node_Str")) {
          state.setCurrentlyInYaml(true);
          return;
        }
 else         if (tapLine.trim().equals("String_Node_Str")) {
          state.setCurrentlyInYaml(false);
          return;
        }
 else         if (state.isCurrentlyInYaml()) {
          this.appendTapLineToDiagnosticBuffer(tapLine);
          return;
        }
 else {
          if (this.subtestsEnabled && state.getLastParsedElement() instanceof TestResult) {
            indentation=state.getBaseIndentationLevel();
            TestResult lastTestResult=(TestResult)state.getLastParsedElement();
            this.pushMemento();
            lastTestResult.setSubtest(state.getTestSet());
          }
        }
      }
      this.checkIndentationLevel(indentation,tapLine);
    }
  }
  this.parseDiagnostics();
  state.setLastLine(tapLine);
  matcher=Constants.BAIL_OUT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onBailOut(matcher.group(1),matcher.group(3));
    return;
  }
  matcher=Constants.HEADER_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onHeader(Integer.parseInt(matcher.group(1)),matcher.group(3));
    return;
  }
  matcher=Constants.PLAN_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onPlan(Integer.parseInt(matcher.group(1)),Integer.parseInt(matcher.group(3)),matcher.group(5),matcher.group(7));
    return;
  }
  matcher=Constants.TEST_RESULT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onTestResult(StatusValues.get(matcher.group(1)),Integer.parseInt(matcher.group(2)),matcher.group(3),DirectiveValues.get(matcher.group(5)),matcher.group(6),matcher.group(8));
    return;
  }
  matcher=Constants.FOOTER_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onFooter(matcher.group(1),matcher.group(3));
    return;
  }
  final Text text=new Text(tapLine);
  getTestSet().getTapLines().add(text);
  state.setLastParsedElement(text);
}

Fixed version (ground truth):
/** 
 * Parse a TAP line.
 * @param tapLine TAP line
 */
public void parseLine(String tapLine){
  Matcher matcher=null;
  matcher=Constants.COMMENT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onComment(matcher.group(1));
    return;
  }
  if (state.getBaseIndentationLevel() > -1) {
    matcher=Constants.INDENTANTION_PATTERN.matcher(tapLine);
    if (matcher.matches()) {
      int indentation=matcher.group(1).length();
      state.setCurrentIndentationLevel(indentation);
      if (indentation > state.getBaseIndentationLevel()) {
        if (tapLine.trim().equals("String_Node_Str")) {
          state.setCurrentlyInYaml(true);
          return;
        }
 else         if (tapLine.trim().equals("String_Node_Str")) {
          state.setCurrentlyInYaml(false);
          return;
        }
 else         if (state.isCurrentlyInYaml()) {
          this.appendTapLineToDiagnosticBuffer(tapLine);
          return;
        }
 else {
          if (this.subtestsEnabled && state.getLastParsedElement() instanceof TestResult) {
            indentation=state.getBaseIndentationLevel();
            TestResult lastTestResult=(TestResult)state.getLastParsedElement();
            this.pushMemento();
            lastTestResult.setSubtest(state.getTestSet());
          }
        }
      }
      this.checkIndentationLevel(indentation,tapLine);
    }
  }
  this.parseDiagnostics();
  state.setLastLine(tapLine);
  matcher=Constants.BAIL_OUT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onBailOut(matcher.group(1),matcher.group(3));
    return;
  }
  matcher=Constants.HEADER_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onHeader(Integer.parseInt(matcher.group(1)),matcher.group(3));
    return;
  }
  matcher=Constants.PLAN_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onPlan(Integer.parseInt(matcher.group(1)),Integer.parseInt(matcher.group(3)),matcher.group(6),matcher.group(8));
    return;
  }
  matcher=Constants.TEST_RESULT_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onTestResult(StatusValues.get(matcher.group(1)),Integer.parseInt(matcher.group(2)),matcher.group(3),DirectiveValues.get(matcher.group(5)),matcher.group(6),matcher.group(8));
    return;
  }
  matcher=Constants.FOOTER_PATTERN.matcher(tapLine);
  if (matcher.matches()) {
    onFooter(matcher.group(1),matcher.group(3));
    return;
  }
  final Text text=new Text(tapLine);
  getTestSet().getTapLines().add(text);
  state.setLastParsedElement(text);
}