Program: 146857
Project: 146857
Buggy source:
public static void main(String[] args){
  int mode=-1;
  if (args.length == 0) {
    mode=MODE_SCHEMA;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_SCHEMA;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_SUMMARY_TEXT;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_CSV_DUMP;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_CSV_IMPORT;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_VALIDATE_MODEL;
  }
 else {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  if (mode == MODE_VALIDATE_MODEL) {
    String formPath=args[1];
    String modelPath=args[2];
    FileInputStream formInput=null;
    FileInputStream instanceInput=null;
    try {
      formInput=new FileInputStream(formPath);
    }
 catch (    FileNotFoundException e) {
      System.out.println("String_Node_Str" + formPath);
      System.exit(1);
    }
    try {
      instanceInput=new FileInputStream(modelPath);
    }
 catch (    FileNotFoundException e) {
      System.out.println("String_Node_Str" + modelPath);
      System.exit(1);
    }
    try {
      FormInstanceValidator validator=new FormInstanceValidator(formInput,instanceInput);
      validator.simulateEntryTest();
    }
 catch (    Exception e) {
      e.printStackTrace();
      System.exit(1);
    }
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  PrintStream sysOut=System.out;
  System.setOut(System.err);
  if (mode == MODE_CSV_IMPORT) {
    System.setOut(sysOut);
    if (args.length > 1) {
      String delimeter=args[1];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,null,null);
    }
 else     if (args.length > 2) {
      String delimeter=args[1];
      String encoding=args[2];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,encoding,null);
    }
 else     if (args.length > 3) {
      String delimeter=args[1];
      String incoding=args[2];
      String outcoding=args[3];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,incoding,outcoding);
    }
 else {
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out);
    }
    System.exit(0);
  }
  FormDef f=XFormUtils.getFormFromInputStream(System.in);
  System.setOut(sysOut);
  if (mode == MODE_SCHEMA) {
    Document schemaDoc=InstanceSchema.generateInstanceSchema(f);
    KXmlSerializer serializer=new KXmlSerializer();
    try {
      serializer.setOutput(System.out,null);
      schemaDoc.write(serializer);
      serializer.flush();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else   if (mode == MODE_SUMMARY_TEXT) {
    System.out.println(FormOverview.overview(f));
  }
 else   if (mode == MODE_CSV_DUMP) {
    System.out.println(FormTranslationFormatter.dumpTranslationsIntoCSV(f));
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  int mode=-1;
  if (args.length == 0) {
    mode=MODE_SCHEMA;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_SCHEMA;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_SUMMARY_TEXT;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_CSV_DUMP;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_CSV_IMPORT;
  }
 else   if (args[0].equals("String_Node_Str")) {
    mode=MODE_VALIDATE_MODEL;
  }
 else {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  if (mode == MODE_VALIDATE_MODEL) {
    String formPath=args[1];
    String modelPath=args[2];
    FileInputStream formInput=null;
    FileInputStream instanceInput=null;
    try {
      formInput=new FileInputStream(formPath);
    }
 catch (    FileNotFoundException e) {
      System.out.println("String_Node_Str" + formPath);
      System.exit(1);
    }
    try {
      instanceInput=new FileInputStream(modelPath);
    }
 catch (    FileNotFoundException e) {
      System.out.println("String_Node_Str" + modelPath);
      System.exit(1);
    }
    try {
      FormInstanceValidator validator=new FormInstanceValidator(formInput,instanceInput);
      validator.simulateEntryTest();
    }
 catch (    Exception e) {
      e.printStackTrace();
      System.exit(1);
    }
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  PrintStream sysOut=System.out;
  System.setOut(System.err);
  if (mode == MODE_CSV_IMPORT) {
    System.setOut(sysOut);
    if (args.length > 1) {
      String delimeter=args[1];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,null,null);
    }
 else     if (args.length > 2) {
      String delimeter=args[1];
      String encoding=args[2];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,encoding,null);
    }
 else     if (args.length > 3) {
      String delimeter=args[1];
      String incoding=args[2];
      String outcoding=args[3];
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out,delimeter,incoding,outcoding);
    }
 else {
      FormTranslationFormatter.turnTranslationsCSVtoItext(System.in,System.out);
    }
    System.exit(0);
  }
  InputStream inputStream=System.in;
  if (args.length > 1) {
    String formPath=args[1];
    FileInputStream formInput=null;
    try {
      inputStream=new FileInputStream(formPath);
    }
 catch (    FileNotFoundException e) {
      System.out.println("String_Node_Str" + formPath);
      System.exit(1);
    }
  }
  FormDef f=XFormUtils.getFormFromInputStream(inputStream);
  System.setOut(sysOut);
  if (mode == MODE_SCHEMA) {
    Document schemaDoc=InstanceSchema.generateInstanceSchema(f);
    KXmlSerializer serializer=new KXmlSerializer();
    try {
      serializer.setOutput(System.out,null);
      schemaDoc.write(serializer);
      serializer.flush();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else   if (mode == MODE_SUMMARY_TEXT) {
    System.out.println(FormOverview.overview(f));
  }
 else   if (mode == MODE_CSV_DUMP) {
    System.out.println(FormTranslationFormatter.dumpTranslationsIntoCSV(f));
  }
  System.exit(0);
}