Buggy code:
public class CloudML implements PropertyChangeListener { protected static final Logger logger = LoggerFactory . getLogger ( CloudML . class ) ; private CloudML . WSClient wsClient ; public static void main ( String [ ] args ) { } private static final Random RND = new Random ( ) ; public static int oneAmong ( int ... vals ) { } public String getTierStatus ( String tier ) { } public String getTierIp ( String tier ) { } private void printStatus ( ) { } private void waitUntilDone ( CloudML . Command cmd , long timeout ) { } public CloudML ( String ip , int port ) { } public void terminate ( ) { } private void pushDeploymentModel ( Object ... substitutions ) { } protected static String getDeploymentModelFromFile ( Object ... substitutions ) { } public void send ( String command ) { } public void sendBlocking ( String command , CloudML . Command cmd ) { wsClient . sendBlocking ( command , cmd ) ; } public void deploy ( Object ... substitutions ) { } private void scaleOut ( String vmId , int times ) { } public void getDeploymentModel ( ) { } private void getInstanceInfo ( String id ) { } private void stopInstances ( List < String > instances ) { } public void terminateAllInstances ( ) { } private void startInstances ( List < String > instances ) { } private static boolean isReachable ( String ip ) { } private Map < CloudML . Command , Integer > waitingPerCommand = new HashMap < CloudML . Command , Integer > ( ) ; private void signalClearWaiting ( ) { } public class WSClient extends WebSocketClient { public WSClient ( String serverURI ) throws InterruptedException , URISyntaxException { } private void parseRuntimeDeploymentModel ( String body ) throws Exception { } private void parseInstanceInformation ( String body ) throws Exception { } private boolean parseUpdate ( String body ) throws Exception { } @ Override public void send ( String command ) throws NotYetConnectedException { } public void sendBlocking ( String command , CloudML . Command cmd ) throws NotYetConnectedException { <START_BUG> sendBlocking ( command , 180000 , cmd ) ; <END_BUG> } public void sendBlocking ( String command , long timeout , CloudML . Command cmd ) throws NotYetConnectedException { } @ Override public void onOpen ( ServerHandshake serverHandshake ) { } private final PropertyChangeSupport pcs = new PropertyChangeSupport ( this ) ; public void addPropertyChangeListener ( PropertyChangeListener listener ) { } public void removePropertyChangeListener ( PropertyChangeListener listener ) { } private static final String RESULT_SNAPSHOT = "###return<seq2seq4repair_space>of<seq2seq4repair_space>GetSnapshot###" ; @ Override public void onMessage ( String s ) { } @ Override public void onClose ( int i , String s , boolean b ) { } @ Override public void onError ( Exception e ) { } public boolean isConnected ( ) { } } public static enum Command { SCALE ( "SCALE" , null , false , true ) , SCALE_OUT ( "SCALE_OUT" , "!extended<seq2seq4repair_space>{<seq2seq4repair_space>name:<seq2seq4repair_space>ScaleOut,<seq2seq4repair_space>params:<seq2seq4repair_space>[<seq2seq4repair_space>%1$s<seq2seq4repair_space>,<seq2seq4repair_space>%2$s<seq2seq4repair_space>]<seq2seq4repair_space>}" , true , true ) , START_INSTANCE ( "START_INSTANCE" , "!extended<seq2seq4repair_space>{<seq2seq4repair_space>name:<seq2seq4repair_space>StartComponent,<seq2seq4repair_space>params:<seq2seq4repair_space>[<seq2seq4repair_space>%1$s<seq2seq4repair_space>]<seq2seq4repair_space>}" , true , true ) , STOP_INSTANCE ( "STOP_INSTANCE" , "!extended<seq2seq4repair_space>{<seq2seq4repair_space>name:<seq2seq4repair_space>StopComponent,<seq2seq4repair_space>params:<seq2seq4repair_space>[<seq2seq4repair_space>%1$s<seq2seq4repair_space>]<seq2seq4repair_space>}" , true , true ) , GET_STATUS ( "GET_STATUS" , "!getSnapshot<seq2seq4repair_space>{<seq2seq4repair_space>path<seq2seq4repair_space>:<seq2seq4repair_space>//<seq2seq4repair_space>}" , true , true ) , GET_INSTANCE_STATUS ( "GET_INSTANCE_STATUS" , ( "!getSnapshot\n" + ( "path<seq2seq4repair_space>:<seq2seq4repair_space>//componentInstances[id=\'%1$s\']\n" + "multimaps<seq2seq4repair_space>:<seq2seq4repair_space>{<seq2seq4repair_space>vm<seq2seq4repair_space>:<seq2seq4repair_space>name,<seq2seq4repair_space>tier<seq2seq4repair_space>:<seq2seq4repair_space>type//name,<seq2seq4repair_space>id<seq2seq4repair_space>:<seq2seq4repair_space>id,<seq2seq4repair_space>status<seq2seq4repair_space>:<seq2seq4repair_space>status,<seq2seq4repair_space>ip<seq2seq4repair_space>:<seq2seq4repair_space>publicAddress<seq2seq4repair_space>}" ) ) , true , false ) , DEPLOY ( "DEPLOY" , null , false , true ) ; public String name ; public String command ; public boolean actualCommand ; public boolean blocking ; private Command ( String name , String command , boolean actualCommand , boolean blocking ) { } public static CloudML . Command getByName ( String name ) { } public static String getList ( ) { } } private Map < CloudML . Command , String > commandParam ; private Map < String , CloudML . Instances > instancesPerTier ; private class Instances { String vm = null ; String tier = null ; List < String > running = new ArrayList < String > ( ) ; List < String > stopped = new ArrayList < String > ( ) ; Map < String , String > ipPerId = new HashMap < String , String > ( ) ; Map < String , String > idPerName = new HashMap < String , String > ( ) ; Map < String , String > statusPerId = new HashMap < String , String > ( ) ; public CloudML . Instances clone ( ) { } public String toString ( ) { } public int count ( ) { } public String getTierStatus ( ) { } public String getTierIp ( ) { } } public boolean scale ( String id , int n ) { } private void signalWaiting ( CloudML . Command what ) { } private void signalCompleted ( CloudML . Command what ) { } private void signalCompleted ( CloudML . Command what , String reason ) { } @ Override public void propertyChange ( PropertyChangeEvent evt ) { } }

Fix:
sendBlocking ( command , 300000 , cmd ) ;