Program: 47735
Project: 47735
Buggy source:
/** 
 * Parse a string into arguments as if it were provided on the command line.
 * @param commandLineString A command line string, e.g. "sqoop import --table test --connect jdbc:mysql://bogus/bogus"
 * @param variableSpace Context for resolving variable names. If {@code null}, no variable resolution we happen.
 * @param ignoreSqoopCommand If set, the first "sqoop <tool>" arguments will be ignored, e.g. "sqoop import" or "sqoop export".
 * @return List of parsed arguments
 * @throws IOException when the command line could not be parsed
 */
public static List<String> parseCommandLine(String commandLineString,VariableSpace variableSpace,boolean ignoreSqoopCommand) throws IOException {
  List<String> args=new ArrayList<String>();
  StringReader reader=new StringReader(commandLineString);
  try {
    StreamTokenizer tokenizer=new StreamTokenizer(reader);
    tokenizer.ordinaryChar('-');
    tokenizer.wordChars('\u0000','\uFFFF');
    tokenizer.whitespaceChars(0,' ');
    tokenizer.quoteChar('"');
    tokenizer.quoteChar('\'');
    boolean skipToken=false;
    while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
      if (tokenizer.sval != null) {
        String s=tokenizer.sval;
        if (variableSpace != null) {
          s=variableSpace.environmentSubstitute(s);
        }
        if (ignoreSqoopCommand && args.isEmpty()) {
          if ("String_Node_Str".equals(s)) {
            skipToken=true;
            continue;
          }
 else           if (skipToken) {
            ignoreSqoopCommand=false;
            skipToken=false;
            continue;
          }
        }
        args.add(escapeEscapeSequences(s));
      }
    }
  }
  finally {
    reader.close();
  }
  return args;
}

Fixed version (ground truth):
/** 
 * Parse a string into arguments as if it were provided on the command line.
 * @param commandLineString A command line string, e.g. "sqoop import --table test --connect jdbc:mysql://bogus/bogus"
 * @param variableSpace Context for resolving variable names. If {@code null}, no variable resolution we happen.
 * @param ignoreSqoopCommand If set, the first "sqoop <tool>" arguments will be ignored, e.g. "sqoop import" or "sqoop export".
 * @return List of parsed arguments
 * @throws IOException when the command line could not be parsed
 */
public static List<String> parseCommandLine(String commandLineString,VariableSpace variableSpace,boolean ignoreSqoopCommand) throws IOException {
  List<String> args=new ArrayList<String>();
  StringReader reader=new StringReader(commandLineString);
  try {
    StreamTokenizer tokenizer=new StreamTokenizer(reader);
    tokenizer.ordinaryChar('-');
    tokenizer.ordinaryChar('.');
    tokenizer.ordinaryChars('0','9');
    tokenizer.wordChars('\u0000','\uFFFF');
    tokenizer.whitespaceChars(0,' ');
    tokenizer.quoteChar('"');
    tokenizer.quoteChar('\'');
    boolean skipToken=false;
    while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
      if (tokenizer.sval != null) {
        String s=tokenizer.sval;
        if (variableSpace != null) {
          s=variableSpace.environmentSubstitute(s);
        }
        if (ignoreSqoopCommand && args.isEmpty()) {
          if ("String_Node_Str".equals(s)) {
            skipToken=true;
            continue;
          }
 else           if (skipToken) {
            ignoreSqoopCommand=false;
            skipToken=false;
            continue;
          }
        }
        args.add(escapeEscapeSequences(s));
      }
    }
  }
  finally {
    reader.close();
  }
  return args;
}