Program: 85499
Project: 85499
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(final String[] args) throws ParseException, DataDefenderException, AnonymizerException, IOException, SAXException, TikaException, java.text.ParseException {
  final long startTime=System.currentTimeMillis();
  final ApplicationLock al=new ApplicationLock("String_Node_Str");
  if (al.isAppActive()) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  log.info("String_Node_Str" + Arrays.toString(args));
  final Options options=createOptions();
  final CommandLine line=getCommandLine(options,args);
  @SuppressWarnings("String_Node_Str") List<String> unparsedArgs=line.getArgList();
  if (line.hasOption("String_Node_Str") || args.length == 0 || unparsedArgs.size() < 1) {
    help(options);
    return;
  }
  if (line.hasOption("String_Node_Str")) {
    LogManager.getRootLogger().setLevel(Level.DEBUG);
  }
 else {
    LogManager.getRootLogger().setLevel(Level.INFO);
  }
  final String cmd=unparsedArgs.get(0);
  unparsedArgs=unparsedArgs.subList(1,unparsedArgs.size());
  List<String> errors=new ArrayList();
  if ("String_Node_Str".equals(cmd)) {
    errors=PropertyCheck.check(cmd,' ');
    if (errors.size() > 0) {
      displayErrors(errors);
      return;
    }
    final String fileDiscoveryPropertyFile=line.getOptionValue('F',"String_Node_Str");
    final Properties fileDiscoveryProperties=loadProperties(fileDiscoveryPropertyFile);
    final FileDiscoverer discoverer=new FileDiscoverer();
    discoverer.discover(fileDiscoveryProperties);
    return;
  }
  errors=PropertyCheck.checkDtabaseProperties();
  if (errors.size() > 0) {
    displayErrors(errors);
    return;
  }
  final Properties props=loadProperties(line.getOptionValue('P',"String_Node_Str"));
  try (final IDBFactory dbFactory=IDBFactory.get(props)){
switch (cmd) {
case "String_Node_Str":
      errors=PropertyCheck.check(cmd,' ');
    if (errors.size() > 0) {
      displayErrors(errors);
      return;
    }
  final String anonymizerPropertyFile=line.getOptionValue('A',"String_Node_Str");
final Properties anonymizerProperties=loadProperties(anonymizerPropertyFile);
final IAnonymizer anonymizer=new DatabaseAnonymizer();
anonymizer.anonymize(dbFactory,anonymizerProperties,getTableNames(unparsedArgs,anonymizerProperties));
break;
case "String_Node_Str":
errors=PropertyCheck.check(cmd,' ');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final IGenerator generator=new DataGenerator();
final String generatorPropertyFile=line.getOptionValue('A',"String_Node_Str");
final Properties generatorProperties=loadProperties(generatorPropertyFile);
generator.generate(dbFactory,generatorProperties);
break;
case "String_Node_Str":
if (line.hasOption('c')) {
errors=PropertyCheck.check(cmd,'c');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final String columnPropertyFile=line.getOptionValue('C',"String_Node_Str");
final Properties columnProperties=loadProperties(columnPropertyFile);
final ColumnDiscoverer discoverer=new ColumnDiscoverer();
discoverer.discover(dbFactory,columnProperties,getTableNames(unparsedArgs,columnProperties));
log.debug("String_Node_Str" + line.getOptionValue('R',"String_Node_Str"));
if (line.hasOption('r')) {
discoverer.createRequirement(line.getOptionValue('R',"String_Node_Str"));
}
}
 else if (line.hasOption('d')) {
errors=PropertyCheck.check(cmd,'d');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final String datadiscoveryPropertyFile=line.getOptionValue('D',"String_Node_Str");
final Properties dataDiscoveryProperties=loadProperties(datadiscoveryPropertyFile);
final DatabaseDiscoverer discoverer=new DatabaseDiscoverer();
discoverer.discover(dbFactory,dataDiscoveryProperties,getTableNames(unparsedArgs,dataDiscoveryProperties));
if (line.hasOption('r')) {
discoverer.createRequirement(line.getOptionValue('R',"String_Node_Str"));
}
}
break;
default :
help(options);
break;
}
}
 final long endTime=System.currentTimeMillis();
final NumberFormat formatter=new DecimalFormat("String_Node_Str");
log.info("String_Node_Str" + formatter.format((endTime - startTime) / 1000d) + "String_Node_Str");
log.info("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(final String[] args) throws ParseException, DataDefenderException, AnonymizerException, IOException, SAXException, TikaException, java.text.ParseException {
  final long startTime=System.currentTimeMillis();
  final ApplicationLock al=new ApplicationLock("String_Node_Str");
  if (al.isAppActive()) {
    log.error("String_Node_Str");
    System.exit(1);
  }
  log.info("String_Node_Str" + Arrays.toString(args));
  final Options options=createOptions();
  final CommandLine line=getCommandLine(options,args);
  @SuppressWarnings("String_Node_Str") List<String> unparsedArgs=line.getArgList();
  if (line.hasOption("String_Node_Str") || args.length == 0 || unparsedArgs.size() < 1) {
    help(options);
    return;
  }
  if (line.hasOption("String_Node_Str")) {
    LogManager.getRootLogger().setLevel(Level.DEBUG);
  }
 else {
    LogManager.getRootLogger().setLevel(Level.INFO);
  }
  final String cmd=unparsedArgs.get(0);
  unparsedArgs=unparsedArgs.subList(1,unparsedArgs.size());
  List<String> errors=new ArrayList();
  if ("String_Node_Str".equals(cmd)) {
    errors=PropertyCheck.check(cmd,' ');
    if (errors.size() > 0) {
      displayErrors(errors);
      return;
    }
    final String fileDiscoveryPropertyFile=line.getOptionValue('F',"String_Node_Str");
    final Properties fileDiscoveryProperties=loadProperties(fileDiscoveryPropertyFile);
    final FileDiscoverer discoverer=new FileDiscoverer();
    discoverer.discover(fileDiscoveryProperties);
    return;
  }
  errors=PropertyCheck.checkDtabaseProperties();
  if (errors.size() > 0) {
    displayErrors(errors);
    return;
  }
  final Properties props=loadProperties(line.getOptionValue('P',"String_Node_Str"));
  try (final IDBFactory dbFactory=IDBFactory.get(props)){
switch (cmd) {
case "String_Node_Str":
      errors=PropertyCheck.check(cmd,' ');
    if (errors.size() > 0) {
      displayErrors(errors);
      return;
    }
  final String anonymizerPropertyFile=line.getOptionValue('A',"String_Node_Str");
final Properties anonymizerProperties=loadProperties(anonymizerPropertyFile);
final IAnonymizer anonymizer=new DatabaseAnonymizer();
anonymizer.anonymize(dbFactory,anonymizerProperties,getTableNames(unparsedArgs,anonymizerProperties));
break;
case "String_Node_Str":
errors=PropertyCheck.check(cmd,' ');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final IGenerator generator=new DataGenerator();
final String generatorPropertyFile=line.getOptionValue('A',"String_Node_Str");
final Properties generatorProperties=loadProperties(generatorPropertyFile);
generator.generate(dbFactory,generatorProperties);
break;
case "String_Node_Str":
if (line.hasOption('c')) {
errors=PropertyCheck.check(cmd,'c');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final String columnPropertyFile=line.getOptionValue('C',"String_Node_Str");
final Properties columnProperties=loadProperties(columnPropertyFile);
final ColumnDiscoverer discoverer=new ColumnDiscoverer();
discoverer.discover(dbFactory,columnProperties,getTableNames(unparsedArgs,columnProperties));
if (line.hasOption('r')) {
discoverer.createRequirement("String_Node_Str");
}
}
 else if (line.hasOption('d')) {
errors=PropertyCheck.check(cmd,'d');
if (errors.size() > 0) {
displayErrors(errors);
return;
}
final String datadiscoveryPropertyFile=line.getOptionValue('D',"String_Node_Str");
final Properties dataDiscoveryProperties=loadProperties(datadiscoveryPropertyFile);
final DatabaseDiscoverer discoverer=new DatabaseDiscoverer();
discoverer.discover(dbFactory,dataDiscoveryProperties,getTableNames(unparsedArgs,dataDiscoveryProperties));
if (line.hasOption('r')) {
discoverer.createRequirement("String_Node_Str");
}
}
break;
default :
help(options);
break;
}
}
 final long endTime=System.currentTimeMillis();
final NumberFormat formatter=new DecimalFormat("String_Node_Str");
log.info("String_Node_Str" + formatter.format((endTime - startTime) / 1000d) + "String_Node_Str");
log.info("String_Node_Str");
}