Program: 13658
Project: 13658
Buggy source:
/** 
 * Process EMBL file.
 * @param f the f
 * @param annotation the annotation
 * @throws Exception the exception
 */
private void processEMBLFile(File f,AnnotationSet annotation) throws Exception {
  int processedLines=0;
  int processedFeatures=0;
  BufferedReader br=new BufferedReader(new FileReader(f));
  Chromosome c=null;
  while ((c=parseChromosome(br)) != null) {
    processedLines++;
    String line;
    while ((line=br.readLine()) != null) {
      processedLines++;
      if (line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str")) {
        break;
      }
    }
    StringBuffer currentAttribute=new StringBuffer();
    boolean skipping=true;
    Feature feature=null;
    while ((line=br.readLine()) != null) {
      if (processedLines % 100000 == 0) {
        System.err.println("String_Node_Str" + processedLines + "String_Node_Str"+ processedFeatures+ "String_Node_Str");
      }
      processedLines++;
      if (line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str")) {
        skipToEntryEnd(br);
        break;
      }
      if (line.length() < 18)       continue;
      String type=line.substring(5,18).trim();
      if (type.length() > 0) {
        if (skipping) {
          skipping=false;
        }
 else {
          processAttributeReturnSkip(currentAttribute.toString(),feature);
          annotation.addFeature(feature);
          processedFeatures++;
        }
        if (prefs.loadAnnotation(type)) {
          feature=new Feature(type,c);
          currentAttribute=new StringBuffer("String_Node_Str");
          currentAttribute.append(line.substring(21).trim());
          continue;
        }
        skipping=true;
      }
      if (skipping)       continue;
      String data=line.substring(21).trim();
      if (data.startsWith("String_Node_Str")) {
        skipping=processAttributeReturnSkip(currentAttribute.toString(),feature);
        currentAttribute=new StringBuffer();
      }
      if (currentAttribute.indexOf("String_Node_Str") >= 0)       currentAttribute.append("String_Node_Str");
      currentAttribute.append(data);
    }
    if (!skipping) {
      processAttributeReturnSkip(currentAttribute.toString(),feature);
      annotation.addFeature(feature);
      processedFeatures++;
    }
  }
  br.close();
  System.err.println("String_Node_Str" + processedFeatures);
}

Fixed version (ground truth):
/** 
 * Process EMBL file.
 * @param f the f
 * @param annotation the annotation
 * @throws Exception the exception
 */
private void processEMBLFile(File f) throws Exception {
  int processedLines=0;
  int processedFeatures=0;
  BufferedReader br=new BufferedReader(new FileReader(f));
  Chromosome c=null;
  while ((c=parseChromosome(br)) != null) {
    processedLines++;
    String line;
    while ((line=br.readLine()) != null) {
      processedLines++;
      if (line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str")) {
        break;
      }
    }
    StringBuffer currentAttribute=new StringBuffer();
    boolean skipping=true;
    Feature feature=null;
    while ((line=br.readLine()) != null) {
      if (processedLines % 100000 == 0) {
        System.err.println("String_Node_Str" + processedLines + "String_Node_Str"+ processedFeatures+ "String_Node_Str");
      }
      processedLines++;
      if (line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str") || line.startsWith("String_Node_Str")) {
        skipToEntryEnd(br);
        break;
      }
      if (line.length() < 18)       continue;
      String type=line.substring(5,18).trim();
      if (type.length() > 0) {
        if (skipping) {
          skipping=false;
        }
 else {
          processAttributeReturnSkip(currentAttribute.toString(),feature);
          genome.annotationSet().addFeature(feature);
          processedFeatures++;
        }
        if (prefs.loadAnnotation(type)) {
          feature=new Feature(type,c);
          currentAttribute=new StringBuffer("String_Node_Str");
          currentAttribute.append(line.substring(21).trim());
          continue;
        }
        skipping=true;
      }
      if (skipping)       continue;
      String data=line.substring(21).trim();
      if (data.startsWith("String_Node_Str")) {
        skipping=processAttributeReturnSkip(currentAttribute.toString(),feature);
        currentAttribute=new StringBuffer();
      }
      if (currentAttribute.indexOf("String_Node_Str") >= 0)       currentAttribute.append("String_Node_Str");
      currentAttribute.append(data);
    }
    if (!skipping) {
      processAttributeReturnSkip(currentAttribute.toString(),feature);
      genome.annotationSet().addFeature(feature);
      processedFeatures++;
    }
  }
  br.close();
  System.err.println("String_Node_Str" + processedFeatures);
}