Program: 3586
Project: 3586
Buggy source:
/** 
 * Given a contents file and an item, stuffing it with bitstreams from the contents file
 */
private void processContentsFile(Context c,Item i,String path,String filename) throws SQLException, IOException, AuthorizeException {
  String contentspath=path + File.separatorChar + filename;
  String line="String_Node_Str";
  System.out.println("String_Node_Str" + contentspath);
  BufferedReader is=null;
  try {
    is=new BufferedReader(new FileReader(contentspath));
    while ((line=is.readLine()) != null) {
      if ("String_Node_Str".equals(line.trim())) {
        continue;
      }
      if (line.trim().startsWith("String_Node_Str")) {
        String sRegistrationLine=line.trim();
        int iAssetstore=-1;
        String sFilePath=null;
        String sBundle=null;
        StringTokenizer tokenizer=new StringTokenizer(sRegistrationLine);
        while (tokenizer.hasMoreTokens()) {
          String sToken=tokenizer.nextToken();
          if (sToken.equals("String_Node_Str")) {
            continue;
          }
 else           if (sToken.equals("String_Node_Str") && tokenizer.hasMoreTokens()) {
            try {
              iAssetstore=Integer.parseInt(tokenizer.nextToken());
            }
 catch (            NumberFormatException e) {
            }
          }
 else           if (sToken.equals("String_Node_Str") && tokenizer.hasMoreTokens()) {
            sFilePath=tokenizer.nextToken();
          }
 else           if (sToken.startsWith("String_Node_Str")) {
            sBundle=sToken.substring(7);
          }
 else {
          }
        }
        if (iAssetstore == -1 || sFilePath == null) {
          System.out.println("String_Node_Str");
          System.out.println("String_Node_Str" + sRegistrationLine);
          continue;
        }
        registerBitstream(c,i,iAssetstore,sFilePath,sBundle);
        System.out.println("String_Node_Str" + sFilePath + "String_Node_Str"+ iAssetstore+ "String_Node_Str"+ sBundle);
        continue;
      }
      String bundleMarker="String_Node_Str";
      int markerIndex=line.indexOf(bundleMarker);
      if (markerIndex == -1) {
        processContentFileEntry(c,i,path,line,null);
        System.out.println("String_Node_Str" + line);
      }
 else {
        String bundleName=line.substring(markerIndex + bundleMarker.length());
        String bitstreamName=line.substring(0,markerIndex);
        processContentFileEntry(c,i,path,bitstreamName,bundleName);
        System.out.println("String_Node_Str" + bitstreamName + "String_Node_Str"+ bundleName);
      }
    }
  }
  finally {
    if (is != null) {
      is.close();
    }
  }
}

Fixed version (ground truth):
/** 
 * Given a contents file and an item, stuffing it with bitstreams from the contents file
 */
private void processContentsFile(Context c,Item i,String path,String filename) throws SQLException, IOException, AuthorizeException {
  String contentspath=path + File.separatorChar + filename;
  String line="String_Node_Str";
  System.out.println("String_Node_Str" + contentspath);
  BufferedReader is=null;
  try {
    is=new BufferedReader(new FileReader(contentspath));
    while ((line=is.readLine()) != null) {
      if ("String_Node_Str".equals(line.trim())) {
        continue;
      }
      if (line.trim().startsWith("String_Node_Str")) {
        String sRegistrationLine=line.trim();
        int iAssetstore=-1;
        String sFilePath=null;
        String sBundle=null;
        StringTokenizer tokenizer=new StringTokenizer(sRegistrationLine);
        while (tokenizer.hasMoreTokens()) {
          String sToken=tokenizer.nextToken();
          if (sToken.equals("String_Node_Str")) {
            continue;
          }
 else           if (sToken.equals("String_Node_Str") && tokenizer.hasMoreTokens()) {
            try {
              iAssetstore=Integer.parseInt(tokenizer.nextToken());
            }
 catch (            NumberFormatException e) {
            }
          }
 else           if (sToken.equals("String_Node_Str") && tokenizer.hasMoreTokens()) {
            sFilePath=tokenizer.nextToken();
          }
 else           if (sToken.startsWith("String_Node_Str")) {
            sBundle=sToken.substring(7);
          }
 else {
          }
        }
        if (iAssetstore == -1 || sFilePath == null) {
          System.out.println("String_Node_Str");
          System.out.println("String_Node_Str" + sRegistrationLine);
          continue;
        }
        registerBitstream(c,i,iAssetstore,sFilePath,sBundle);
        System.out.println("String_Node_Str" + sFilePath + "String_Node_Str"+ iAssetstore+ "String_Node_Str"+ sBundle);
        continue;
      }
      String bundleMarker="String_Node_Str";
      int markerIndex=line.indexOf(bundleMarker);
      if (markerIndex == -1) {
        processContentFileEntry(c,i,path,line,null);
        System.out.println("String_Node_Str" + line);
      }
 else {
        String bundleName=line.substring(markerIndex + bundleMarker.length());
        String bitstreamName=line.substring(0,markerIndex);
        bitstreamName=bitstreamName.trim();
        processContentFileEntry(c,i,path,bitstreamName,bundleName);
        System.out.println("String_Node_Str" + bitstreamName + "String_Node_Str"+ bundleName);
      }
    }
  }
  finally {
    if (is != null) {
      is.close();
    }
  }
}