Buggy code:
protected Long hostId ; protected String _cluster ; protected long _memCapacity ; protected long _cpuCapacity ; protected long _cpuNum ; protected String _mac ; protected String _username ; protected String _password ; protected String _ip ; protected boolean _isEchoScAgent ; protected IAgentControl _agentControl ; protected Script2 _pingCommand ; protected Script2 _setPxeBootCommand ; protected Script2 _setDiskBootCommand ; protected Script2 _rebootCommand ; protected Script2 _getStatusCommand ; protected Script2 _powerOnCommand ; protected Script2 _powerOffCommand ; protected Script2 _forcePowerOffCommand ; protected Script2 _bootOrRebootCommand ; protected String _vmName ; protected int ipmiRetryTimes = 5 ; protected boolean provisionDoneNotificationOn = false ; protected int isProvisionDoneNotificationTimeout = 1800 ; protected ConfigurationDao configDao ; protected VMInstanceDao vmDao ; @ Override public boolean configure ( String name , Map < String , Object > params ) throws ConfigurationException { _name = name ; _uuid = ( ( String ) ( params . get ( "guid" ) ) ) ; try { _memCapacity = ( ( Long . parseLong ( ( ( String ) ( params . get ( MEMORY ) ) ) ) ) * 1024L ) * 1024L ; _cpuCapacity = Long . parseLong ( ( ( String ) ( params . get ( CPU_SPEED ) ) ) ) ; _cpuNum = Long . parseLong ( ( ( String ) ( params . get ( CPU_NUMBER ) ) ) ) ; } catch ( NumberFormatException e ) { throw new ConfigurationException ( String . format ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>CPU<seq2seq4repair_space>or<seq2seq4repair_space>memory<seq2seq4repair_space>capacity<seq2seq4repair_space>" + "or<seq2seq4repair_space>cpu<seq2seq4repair_space>capacity(cpu<seq2seq4repair_space>number<seq2seq4repair_space>=<seq2seq4repair_space>%1$s<seq2seq4repair_space>memCapacity=%2$s,<seq2seq4repair_space>cpuCapacity=%3$s" ) , params . get ( CPU_NUMBER ) , params . get ( MEMORY ) , params . get ( CPU_SPEED ) ) ) ; } _zone = ( ( String ) ( params . get ( "zone" ) ) ) ; _pod = ( ( String ) ( params . get ( "pod" ) ) ) ; _cluster = ( ( String ) ( params . get ( "cluster" ) ) ) ; hostId = ( ( Long ) ( params . get ( "hostId" ) ) ) ; _ip = ( ( String ) ( params . get ( PRIVATE_IP ) ) ) ; _mac = ( ( String ) ( params . get ( HOST_MAC ) ) ) ; _username = ( ( String ) ( params . get ( USERNAME ) ) ) ; _password = ( ( String ) ( params . get ( PASSWORD ) ) ) ; _vmName = ( ( String ) ( params . get ( "vmName" ) ) ) ; String echoScAgent = ( ( String ) ( params . get ( EchoSecurityGroupAgent ) ) ) ; vmDao = ( ( VMInstanceDao ) ( params . get ( "vmDao" ) ) ) ; configDao = ( ( ConfigurationDao ) ( params . get ( "configDao" ) ) ) ; if ( ( _pod ) == null ) { throw new ConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>pod" ) ; } if ( ( _cluster ) == null ) { throw new ConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>pod" ) ; } if ( ( _ip ) == null ) { throw new ConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>host<seq2seq4repair_space>address" ) ; } if ( _mac . equalsIgnoreCase ( "unknown" ) ) { throw new ConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>host<seq2seq4repair_space>mac<seq2seq4repair_space>address" ) ; } if ( ( _mac . split ( ":" ) . length ) != 6 ) { throw new ConfigurationException ( ( ( "Wrong<seq2seq4repair_space>MAC<seq2seq4repair_space>format(" + ( _mac ) ) + ").<seq2seq4repair_space>It<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>of<seq2seq4repair_space>for<seq2seq4repair_space>example<seq2seq4repair_space>00:11:ba:33:aa:dd<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>case<seq2seq4repair_space>sensitive" ) ) ; } if ( ( _uuid ) == null ) { throw new ConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>uuid" ) ; } if ( echoScAgent != null ) { _isEchoScAgent = Boolean . valueOf ( echoScAgent ) ; } String ipmiIface = "default" ; try { ipmiIface = configDao . getValue ( BaremetalIpmiLanInterface . key ( ) ) ; } catch ( Exception e ) { BareMetalResourceBase . s_logger . debug ( e . getMessage ( ) , e ) ; } try { <START_BUG> ipmiRetryTimes = Integer . valueOf ( configDao . getValue ( BaremetalIpmiRetryTimes . key ( ) ) ) ; <END_BUG> } catch ( Exception e ) { BareMetalResourceBase . s_logger . debug ( e . getMessage ( ) , e ) ; } try { provisionDoneNotificationOn = Boolean . valueOf ( configDao . getValue ( BaremetalProvisionDoneNotificationEnabled . key ( ) ) ) ; isProvisionDoneNotificationTimeout = Integer . valueOf ( configDao . getValue ( BaremetalProvisionDoneNotificationTimeout . key ( ) ) ) ; } catch ( Exception e ) { BareMetalResourceBase . s_logger . debug ( e . getMessage ( ) , e ) ; } String injectScript = "scripts//util//ipmi.py" ; String scriptPath = Script . findScript ( "" , injectScript ) ; if ( scriptPath == null ) { throw new ConfigurationException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>ping<seq2seq4repair_space>script<seq2seq4repair_space>" + scriptPath ) ) ; } String pythonPath = "//usr//bin//python" ; _pingCommand = new Script2 ( pythonPath , BareMetalResourceBase . s_logger ) ; _pingCommand . add ( scriptPath ) ; _pingCommand . add ( "ping" ) ; _pingCommand . add ( ( "interface=" + ipmiIface ) ) ; _pingCommand . add ( ( "hostname=" + ( _ip ) ) ) ; _pingCommand . add ( ( "usrname=" + ( _username ) ) ) ; _pingCommand . add ( ( "password=" + ( _password ) ) , ParamType . PASSWORD ) ; _setPxeBootCommand = new Script2 ( pythonPath , BareMetalResourceBase . s_logger ) ; _setPxeBootCommand . add ( scriptPath ) ; _setPxeBootCommand . add ( "boot_dev" ) ; _setPxeBootCommand . add ( ( "interface=" + ipmiIface ) ) ; _setPxeBootCommand . add ( ( "hostname=" + ( _ip ) ) ) ; _setPxeBootCommand . add ( ( "usrname=" + ( _username ) ) ) ; _setPxeBootCommand . add ( ( "password=" + ( _password ) ) , ParamType . PASSWORD ) ; _setPxeBootCommand . add ( "dev=pxe" ) ; _setDiskBootCommand = new Script2 ( pythonPath , BareMetalResourceBase . s_logger ) ; _setDiskBootCommand . add ( scriptPath ) ; _setDiskBootCommand . add ( "boot_dev" ) ; _setDiskBootCommand . add ( ( "interface=" + ipmiIface ) ) ;

Fix:
ipmiRetryTimes = Integer . parseInt ( configDao . getValue ( BaremetalIpmiRetryTimes . key ( ) ) ) ;