Program: 180457
Project: 180457
Buggy source:
public static void main(String[] args) throws Exception {
  Logging.setLoggingDefaults(Level.WARN);
  CommandLineParser parser=new PosixParser();
  Options options=createCommandLineOptions();
  String deviceType=null;
  String port=null;
  String macAddressLower16String=null;
  Map<String,String> configuration=newHashMap();
  boolean use16BitMode=true;
  try {
    CommandLine line=parser.parse(options,args,true);
    if (line.hasOption('h')) {
      printUsageAndExit(DeviceMacWriterCLI.class,options,0);
    }
    if (line.hasOption('v')) {
      org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);
    }
    if (line.hasOption('l')) {
      Level level=Level.toLevel(line.getOptionValue('l'));
      org.apache.log4j.Logger.getRootLogger().setLevel(level);
    }
    if (line.hasOption('c')) {
      final String configurationFileString=line.getOptionValue('c');
      final File configurationFile=new File(configurationFileString);
      final Properties configurationProperties=new Properties();
      configurationProperties.load(new FileReader(configurationFile));
      for (      Map.Entry<Object,Object> entry : configurationProperties.entrySet()) {
        configuration.put((String)entry.getKey(),(String)entry.getValue());
      }
    }
    assertParametersPresent(line,'t','p','m');
    deviceType=line.getOptionValue('t');
    port=line.getOptionValue('p');
    macAddressLower16String=line.getOptionValue('m');
    use16BitMode=!line.hasOption('x');
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e);
    printUsageAndExit(DeviceMacWriterCLI.class,options,1);
  }
  long macAddressLower16=StringUtils.parseHexOrDecLong(macAddressLower16String);
  final MacAddress macAddress=new MacAddress(new byte[]{0,0,0,0,0,0,(byte)(0xFF & (macAddressLower16 >> 8)),(byte)(0xFF & (macAddressLower16))});
  final ExecutorService executorService=Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build());
  final Injector injector=Guice.createInjector(new DeviceUtilsModule(executorService,null,use16BitMode));
  final Device device=injector.getInstance(DeviceFactory.class).create(executorService,deviceType,configuration);
  device.connect(port);
  if (!device.isConnected()) {
    throw new RuntimeException("String_Node_Str" + args[1] + "String_Node_Str");
  }
  final String finalDeviceType=deviceType;
  final String finalPort=port;
  OperationListener<Void> callback=new OperationListener<Void>(){
    private int lastProgress=-1;
    @Override public void onProgressChange(    float fraction){
      int newProgress=(int)Math.floor(fraction * 100);
      if (lastProgress < newProgress) {
        lastProgress=newProgress;
        log.info("String_Node_Str",newProgress);
      }
    }
    @Override public void onSuccess(    Void result){
      log.info("String_Node_Str",new Object[]{macAddress,finalDeviceType,finalPort});
    }
    @Override public void onFailure(    Throwable throwable){
      log.error("String_Node_Str" + throwable,throwable);
    }
    @Override public void onExecute(){
      log.info("String_Node_Str");
    }
    @Override public void onCancel(){
      log.info("String_Node_Str");
    }
    @Override public void beforeStateChanged(    final StateChangedEvent<Void> stateChangedEvent){
      log.info("String_Node_Str",stateChangedEvent);
    }
    @Override public void afterStateChanged(    final StateChangedEvent<Void> stateChangedEvent){
      log.info("String_Node_Str",stateChangedEvent);
    }
  }
;
  try {
    device.writeMac(macAddress,120000,callback).get();
  }
  finally {
    closeConnection(device,executorService);
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Logging.setLoggingDefaults(Level.WARN);
  CommandLineParser parser=new PosixParser();
  Options options=createCommandLineOptions();
  String deviceType=null;
  String port=null;
  String macAddressLower16String=null;
  Map<String,String> configuration=newHashMap();
  boolean use16BitMode=true;
  try {
    CommandLine line=parser.parse(options,args,true);
    if (line.hasOption('h')) {
      printUsageAndExit(DeviceMacWriterCLI.class,options,0);
    }
    if (line.hasOption('v')) {
      org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);
    }
    if (line.hasOption('l')) {
      Level level=Level.toLevel(line.getOptionValue('l'));
      org.apache.log4j.Logger.getRootLogger().setLevel(level);
    }
    if (line.hasOption('c')) {
      final String configurationFileString=line.getOptionValue('c');
      final File configurationFile=new File(configurationFileString);
      final Properties configurationProperties=new Properties();
      configurationProperties.load(new FileReader(configurationFile));
      for (      Map.Entry<Object,Object> entry : configurationProperties.entrySet()) {
        configuration.put((String)entry.getKey(),(String)entry.getValue());
      }
    }
    assertParametersPresent(line,'t','p','m');
    deviceType=line.getOptionValue('t');
    port=line.getOptionValue('p');
    macAddressLower16String=line.getOptionValue('m');
    use16BitMode=!line.hasOption('x');
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e);
    printUsageAndExit(DeviceMacWriterCLI.class,options,1);
  }
  long macAddressLower16=StringUtils.parseHexOrDecLong(macAddressLower16String);
  final MacAddress macAddress=new MacAddress(new byte[]{0,0,0,0,0,0,(byte)(0xFF & (macAddressLower16 >> 8)),(byte)(0xFF & (macAddressLower16))});
  final ExecutorService executorService=Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("String_Node_Str").build());
  final Injector injector=Guice.createInjector(new DeviceFactoryModule(),new DeviceUtilsModule(executorService,null,use16BitMode));
  final Device device=injector.getInstance(DeviceFactory.class).create(executorService,deviceType,configuration);
  device.connect(port);
  if (!device.isConnected()) {
    throw new RuntimeException("String_Node_Str" + args[1] + "String_Node_Str");
  }
  final String finalDeviceType=deviceType;
  final String finalPort=port;
  OperationListener<Void> callback=new OperationListener<Void>(){
    private int lastProgress=-1;
    @Override public void onProgressChange(    float fraction){
      int newProgress=(int)Math.floor(fraction * 100);
      if (lastProgress < newProgress) {
        lastProgress=newProgress;
        log.info("String_Node_Str",newProgress);
      }
    }
    @Override public void onSuccess(    Void result){
      log.info("String_Node_Str",new Object[]{macAddress,finalDeviceType,finalPort});
    }
    @Override public void onFailure(    Throwable throwable){
      log.error("String_Node_Str" + throwable,throwable);
    }
    @Override public void onExecute(){
      log.info("String_Node_Str");
    }
    @Override public void onCancel(){
      log.info("String_Node_Str");
    }
    @Override public void beforeStateChanged(    final StateChangedEvent<Void> stateChangedEvent){
      log.info("String_Node_Str",stateChangedEvent);
    }
    @Override public void afterStateChanged(    final StateChangedEvent<Void> stateChangedEvent){
      log.info("String_Node_Str",stateChangedEvent);
    }
  }
;
  try {
    device.writeMac(macAddress,120000,callback).get();
  }
  finally {
    closeConnection(device,executorService);
  }
}