Program: 10520
Project: 10520
Buggy source:
/** 
 * The main executable.
 * @param args The command-line params.
 * @throws Exception If error occurs.
 */
public static void main(String[] args) throws Exception {
  argsString=Arrays.toString(args);
  consoleLogger.info("String_Node_Str" + Arrays.toString(args) + "String_Node_Str");
  if (args.length != 6) {
    if (args.length == 4) {
      try {
        algorithm=Integer.valueOf(args[0]);
        dataFName=args[1];
        ts=loadData(dataFName);
        windowSize=Integer.valueOf(args[2]);
        consoleLogger.info("String_Node_Str" + discordsToReport + "String_Node_Str"+ algorithm+ "String_Node_Str"+ dataFName+ "String_Node_Str"+ "String_Node_Str"+ windowSize);
      }
 catch (      Exception e) {
        System.err.println("String_Node_Str" + StackTrace.toString(e));
        System.exit(-1);
      }
    }
 else     if ((args.length == 7 && 3 == Integer.valueOf(args[0])) || (args.length == 6 && 3 == Integer.valueOf(args[0]))) {
      try {
        setParameters(args);
        outputRRAresults=false;
        if (args.length == 7) {
          String yesNoParam=args[6];
          if (yesNoParam.equalsIgnoreCase("String_Node_Str") || yesNoParam.equalsIgnoreCase("String_Node_Str")) {
            outputRRAresults=true;
          }
        }
      }
 catch (      Exception e) {
        System.err.println("String_Node_Str" + StackTrace.toString(e));
        System.exit(-1);
      }
    }
 else {
      System.err.println(getHelp());
      System.exit(-1);
    }
  }
 else {
    setParameters(args);
  }
  if (1 == algorithm) {
    findBruteForce();
  }
 else   if (2 == algorithm) {
    findHotSax();
  }
 else   if (3 == algorithm) {
    findSaxSequitur(null);
  }
 else   if (4 == algorithm) {
    findHotSaxWithHash();
  }
}

Fixed version (ground truth):
/** 
 * The main executable.
 * @param args The command-line params.
 * @throws Exception If error occurs.
 */
public static void main(String[] args) throws Exception {
  argsString=Arrays.toString(args);
  consoleLogger.info("String_Node_Str" + Arrays.toString(args) + "String_Node_Str");
  if (args.length != 6) {
    if (args.length == 4) {
      try {
        algorithm=Integer.valueOf(args[0]);
        dataFName=args[1];
        ts=loadData(dataFName);
        windowSize=Integer.valueOf(args[2]);
        consoleLogger.info("String_Node_Str" + discordsToReport + "String_Node_Str"+ algorithm+ "String_Node_Str"+ dataFName+ "String_Node_Str"+ "String_Node_Str"+ windowSize);
      }
 catch (      Exception e) {
        System.err.println("String_Node_Str" + StackTrace.toString(e));
        System.exit(-1);
      }
    }
 else     if ((args.length == 7 && 3 == Integer.valueOf(args[0])) || (args.length == 6 && 3 == Integer.valueOf(args[0]))) {
      try {
        setParameters(args);
        outputRRAresults=false;
        if (args.length == 7) {
          String yesNoParam=args[6];
          if (yesNoParam.equalsIgnoreCase("String_Node_Str") || yesNoParam.equalsIgnoreCase("String_Node_Str") || yesNoParam.equalsIgnoreCase("String_Node_Str")|| yesNoParam.equalsIgnoreCase("String_Node_Str")) {
            outputRRAresults=true;
          }
        }
      }
 catch (      Exception e) {
        System.err.println("String_Node_Str" + StackTrace.toString(e));
        System.exit(-1);
      }
    }
 else {
      System.err.println(getHelp());
      System.exit(-1);
    }
  }
 else {
    setParameters(args);
  }
  if (1 == algorithm) {
    findBruteForce();
  }
 else   if (2 == algorithm) {
    findHotSax();
  }
 else   if (3 == algorithm) {
    findSaxSequitur(null);
  }
 else   if (4 == algorithm) {
    findHotSaxWithHash();
  }
}