Program: 7194
Project: 7194
Buggy source:
/** 
 * Parse the arguments from the command line and execute the different modes.
 * @param args command line arguments
 * @param conf default configuration
 * @return true if the arguments were parsed successfully and comply with the expected usage
 */
private boolean parseArgsAndExecMode(String[] args,Configuration conf){
  CommandLineParser parser=new GnuParser();
  try {
    CommandLine line=parser.parse(options,args);
    if (line.hasOption(HELP_OPTION)) {
      printUsage(false);
      return true;
    }
    hostname=line.getOptionValue(HOST_OPTION);
    existingFilename=line.getOptionValue(FILENAME_OPTION);
    persistingFilename=line.hasOption(SAVE_OPTION) ? line.getOptionValue(SAVE_OPTION) : null;
    showTxids=line.hasOption(IDS_OPTION);
    txId=line.hasOption(TRANSACTION_OPTION) ? Long.valueOf(line.getOptionValue(TRANSACTION_OPTION)) : null;
    accessToken=line.hasOption(TOKEN_OPTION) ? line.getOptionValue(TOKEN_OPTION).replaceAll("String_Node_Str","String_Node_Str") : null;
    tokenFile=line.hasOption(TOKEN_FILE_OPTION) ? line.getOptionValue(TOKEN_FILE_OPTION).replaceAll("String_Node_Str","String_Node_Str") : null;
    portNumber=line.hasOption(PORT_OPTION) ? Integer.valueOf(line.getOptionValue(PORT_OPTION)) : conf.getInt(Constants.Router.ROUTER_PORT,Integer.getInteger(Constants.Router.DEFAULT_ROUTER_PORT));
    if (tokenFile != null) {
      if (accessToken != null) {
        tokenFile=null;
      }
 else {
        readTokenFile();
      }
    }
switch (this.mode) {
case VIEW:
      if (!line.hasOption(HOST_OPTION) && !line.hasOption(FILENAME_OPTION)) {
        usage("String_Node_Str" + "String_Node_Str");
        return false;
      }
    executeViewMode();
  break;
case INVALIDATE:
if (!line.hasOption(HOST_OPTION) || !line.hasOption(TRANSACTION_OPTION)) {
  usage("String_Node_Str");
  return false;
}
executeInvalidateMode();
break;
case RESET:
if (!line.hasOption(HOST_OPTION)) {
usage("String_Node_Str");
return false;
}
executeResetMode();
break;
default :
printUsage(true);
return false;
}
}
 catch (ParseException e) {
printUsage(true);
return false;
}
return true;
}

Fixed version (ground truth):
/** 
 * Parse the arguments from the command line and execute the different modes.
 * @param args command line arguments
 * @param conf default configuration
 * @return true if the arguments were parsed successfully and comply with the expected usage
 */
private boolean parseArgsAndExecMode(String[] args,Configuration conf){
  CommandLineParser parser=new GnuParser();
  try {
    CommandLine line=parser.parse(options,args);
    if (line.hasOption(HELP_OPTION)) {
      printUsage(false);
      return true;
    }
    hostname=line.getOptionValue(HOST_OPTION);
    existingFilename=line.getOptionValue(FILENAME_OPTION);
    persistingFilename=line.hasOption(SAVE_OPTION) ? line.getOptionValue(SAVE_OPTION) : null;
    showTxids=line.hasOption(IDS_OPTION);
    txId=line.hasOption(TRANSACTION_OPTION) ? Long.valueOf(line.getOptionValue(TRANSACTION_OPTION)) : null;
    accessToken=line.hasOption(TOKEN_OPTION) ? line.getOptionValue(TOKEN_OPTION).replaceAll("String_Node_Str","String_Node_Str") : null;
    tokenFile=line.hasOption(TOKEN_FILE_OPTION) ? line.getOptionValue(TOKEN_FILE_OPTION).replaceAll("String_Node_Str","String_Node_Str") : null;
    portNumber=line.hasOption(PORT_OPTION) ? Integer.valueOf(line.getOptionValue(PORT_OPTION)) : conf.getInt(Constants.Router.ROUTER_PORT,Integer.parseInt(Constants.Router.DEFAULT_ROUTER_PORT));
    if (tokenFile != null) {
      if (accessToken != null) {
        tokenFile=null;
      }
 else {
        readTokenFile();
      }
    }
switch (this.mode) {
case VIEW:
      if (!line.hasOption(HOST_OPTION) && !line.hasOption(FILENAME_OPTION)) {
        usage("String_Node_Str" + "String_Node_Str");
        return false;
      }
    executeViewMode();
  break;
case INVALIDATE:
if (!line.hasOption(HOST_OPTION) || !line.hasOption(TRANSACTION_OPTION)) {
  usage("String_Node_Str");
  return false;
}
executeInvalidateMode();
break;
case RESET:
if (!line.hasOption(HOST_OPTION)) {
usage("String_Node_Str");
return false;
}
executeResetMode();
break;
default :
printUsage(true);
return false;
}
}
 catch (ParseException e) {
printUsage(true);
return false;
}
return true;
}