Buggy code:
public class Test { private static final Logger logger = LoggerFactory . getLogger ( Test . class ) ; private MonitoringPlatform monitoringPlatform ; private CloudML cloudML ; private String cloudMLIp ; private int cloudMLPort ; private String monitoringPlatformIp ; private int monitoringPlatformPort ; private static boolean isReachable ( String ip ) { } public Test ( String cloudMLIp , int cloudMLPort , String monitoringPlatformIp , int monitoringPlatformPort , int clients , String size ) throws Exception { } public static boolean performTest ( String cloudMLIp , int cloudMLPort , String monitoringPlatformIp , int monitoringPlatformPort , int clients , Path baseJmx , String data , boolean useOnDemand , boolean reuseInstances , boolean leaveInstancesOn , boolean onlyStartMachines , String size ) { } private String loadBalancer ; private void createLoadBalancer ( ) { } private void destroyLoadBalancer ( ) { } private String getTierStatus ( String tier ) { } private VirtualMachine mpl ; private VirtualMachine clients ; private boolean running = false ; private boolean initialized = false ; public void startMachines ( boolean startAsOnDemand ) { } public void considerRunningMachines ( ) { } public void stopMachines ( ) { } public void stopCloudMLInstances ( ) { } public void initSystem ( ) throws Exception { if ( ! ( running ) ) throw new RuntimeException ( "The<seq2seq4repair_space>system<seq2seq4repair_space>isn't<seq2seq4repair_space>running<seq2seq4repair_space>yet!" ) ; if ( initialized ) throw new RuntimeException ( "The<seq2seq4repair_space>system<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>initialized!" ) ; Test . logger . info ( "Deleting<seq2seq4repair_space>the<seq2seq4repair_space>files<seq2seq4repair_space>set<seq2seq4repair_space>for<seq2seq4repair_space>removal<seq2seq4repair_space>before<seq2seq4repair_space>the<seq2seq4repair_space>test..." ) ; if ( ( monitoringPlatformIp ) == null ) mpl . deleteFiles ( ) ; clients . deleteFiles ( ) ; Test . logger . info ( "Initializing<seq2seq4repair_space>the<seq2seq4repair_space>system..." ) ; String mplIp ; if ( ( monitoringPlatformIp ) == null ) { Instance impl = mpl . getInstances ( ) . get ( 0 ) ; impl . waitUntilSshAvailable ( ) ; impl . exec ( mpl . getParameter ( "STARTER" ) ) ; mplIp = impl . getIp ( ) ; } else { mplIp = monitoringPlatformIp ; } if ( ( cloudMLIp ) == null ) { cloudMLIp = mplIp ; try { cloudML = new CloudML ( cloudMLIp , cloudMLPort ) ; } catch ( Exception e ) { <START_BUG> Ssh . exec ( mplIp , mpl , String . format ( mpl . getParameter ( "CLOUDML_STARTER" ) , cloudMLPort ) ) ; <END_BUG> try { Thread . sleep ( 3000 ) ; } catch ( Exception e1 ) { } cloudML = new CloudML ( cloudMLIp , cloudMLPort ) ; } } monitoringPlatform = new MonitoringPlatform ( mplIp , monitoringPlatformPort ) ; cloudML . deploy ( it . polimi . modaclouds . scalingrules . Configuration . getAsFile ( CLOUDML_DEPLOYMENT_MODEL ) , MIC_AMI , REGION , String . format ( MIC_STARTER . replaceAll ( "&&" , "<seq2seq4repair_space>;<seq2seq4repair_space>" ) , mplIp ) , String . format ( MIC_ADD_TO_LOAD_BALANCER . replaceAll ( "&&" , "<seq2seq4repair_space>;<seq2seq4repair_space>" ) , AWS_CREDENTIALS . getAWSAccessKeyId ( ) , AWS_CREDENTIALS . getAWSSecretKey ( ) , REGION , loadBalancer ) , String . format ( MIC_DEL_FROM_LOAD_BALANCER . replaceAll ( "&&" , "<seq2seq4repair_space>;<seq2seq4repair_space>" ) , AWS_CREDENTIALS . getAWSAccessKeyId ( ) , AWS_CREDENTIALS . getAWSSecretKey ( ) , REGION , loadBalancer ) ) ; Test . logger . info ( "System<seq2seq4repair_space>initialized!" ) ; initialized = true ; } public void stopInfrastructure ( ) { } private static List < MonitoringRule > getMonitoringRulesFromFile ( String fileName , Object ... substitutions ) throws Exception { } public void addCPUUtilizationMonitoringRules ( double aboveValue , double underValue ) throws Exception { } public void addCPUUtilizationMonitoringRules ( ) throws Exception { } public static int getPeakFromData ( String data ) { } public void runTest ( Path baseJmx , String data ) throws Exception { } }

Fix:
Ssh . execInBackground ( mplIp , mpl , String . format ( mpl . getParameter ( "CLOUDML_STARTER" ) , cloudMLPort ) ) ;