Program: 72590
Project: 72590
Buggy source:
/** 
 * Read in .nc xml files, generate .moml files.
 * @param args A series of command line arguments, see theclass comment for details.
 * @exception IOException If there is a problem reading orwriting a file.
 */
public static void main(String[] args) throws IOException {
  if (args.length < 5) {
    System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    return;
  }
  int index=0;
  String inputPrefix=args[index++].trim();
  String inputSuffix=args[index++].trim();
  String subPrefix=args[index++].trim();
  String outputPrefix=args[index++].trim();
  String inputFiles=args[index++].trim();
  BufferedReader in=null;
  try {
    in=new BufferedReader(new FileReader(inputFiles));
    String inputFileName;
    while ((inputFileName=in.readLine()) != null) {
      String xmlSuffix=inputFileName.replaceFirst("String_Node_Str",inputSuffix);
      String xmlInputFile=inputPrefix + _FILESEPARATOR + xmlSuffix;
      String pathToNCFile=subPrefix + _FILESEPARATOR + inputFileName;
      String[] subdirs=inputFileName.split(_FILESEPARATOR);
      String componentName=subdirs[subdirs.length - 1];
      componentName=componentName.replaceFirst("String_Node_Str","String_Node_Str");
      String momlSuffix=inputFileName.replaceFirst("String_Node_Str","String_Node_Str");
      String momlOutputFile=outputPrefix + _FILESEPARATOR + momlSuffix;
      try {
        if (new NDReader().parse(xmlInputFile)) {
          System.out.println("String_Node_Str" + xmlInputFile);
        }
 else {
          System.out.println("String_Node_Str" + xmlInputFile);
        }
        try {
          generateComponent(pathToNCFile,componentName,momlOutputFile);
        }
 catch (        Exception ex) {
          System.err.println("String_Node_Str" + momlOutputFile + "String_Node_Str"+ ex);
        }
      }
 catch (      SAXException ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str");
      }
catch (      FileNotFoundException ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str");
      }
catch (      Exception ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str"+ ex);
      }
    }
  }
 catch (  IOException ex) {
    System.err.println("String_Node_Str" + inputFiles);
    System.err.println("String_Node_Str" + ex);
  }
 finally {
    if (in != null) {
      in.close();
    }
  }
}

Fixed version (ground truth):
/** 
 * Read in .nc xml files, generate .moml files.
 * @param args A series of command line arguments, see theclass comment for details.
 * @exception IOException If there is a problem reading orwriting a file.
 */
public static void main(String[] args) throws IOException {
  if (args.length < 5) {
    System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    return;
  }
  int index=0;
  String inputPrefix=args[index++].trim();
  String inputSuffix=args[index++].trim();
  String subPrefix=args[index++].trim();
  String outputPrefix=args[index++].trim();
  String inputFiles=args[index++].trim();
  BufferedReader in=null;
  try {
    in=new BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(inputFiles),java.nio.charset.Charset.defaultCharset()));
    String inputFileName;
    while ((inputFileName=in.readLine()) != null) {
      String xmlSuffix=inputFileName.replaceFirst("String_Node_Str",inputSuffix);
      String xmlInputFile=inputPrefix + _FILESEPARATOR + xmlSuffix;
      String pathToNCFile=subPrefix + _FILESEPARATOR + inputFileName;
      String[] subdirs=inputFileName.split(_FILESEPARATOR);
      String componentName=subdirs[subdirs.length - 1];
      componentName=componentName.replaceFirst("String_Node_Str","String_Node_Str");
      String momlSuffix=inputFileName.replaceFirst("String_Node_Str","String_Node_Str");
      String momlOutputFile=outputPrefix + _FILESEPARATOR + momlSuffix;
      try {
        if (new NDReader().parse(xmlInputFile)) {
          System.out.println("String_Node_Str" + xmlInputFile);
        }
 else {
          System.out.println("String_Node_Str" + xmlInputFile);
        }
        try {
          generateComponent(pathToNCFile,componentName,momlOutputFile);
        }
 catch (        Exception ex) {
          System.err.println("String_Node_Str" + momlOutputFile + "String_Node_Str"+ ex);
        }
      }
 catch (      SAXException ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str");
      }
catch (      FileNotFoundException ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str");
      }
catch (      Exception ex) {
        System.err.println("String_Node_Str" + xmlInputFile + "String_Node_Str"+ ex);
      }
    }
  }
 catch (  IOException ex) {
    System.err.println("String_Node_Str" + inputFiles);
    System.err.println("String_Node_Str" + ex);
  }
 finally {
    if (in != null) {
      in.close();
    }
  }
}