Buggy code:
public class MemoryBenchmark { public static void main ( String [ ] args ) { <START_BUG> if ( ( args . length ) != 1 ) { <END_BUG> int objects = 10000 ; if ( ( args [ 0 ] ) != null ) { objects = Integer . parseInt ( args [ 0 ] ) ; } List objs = new LinkedList ( ) ; ObjectFactory of = ObjectFactory . getInstance ( ) ; long bfree = Runtime . getRuntime ( ) . freeMemory ( ) ; long btotal = Runtime . getRuntime ( ) . totalMemory ( ) ; long bmax = Runtime . getRuntime ( ) . maxMemory ( ) ; System . out . println ( "Before<seq2seq4repair_space>we<seq2seq4repair_space>create<seq2seq4repair_space>objects:" ) ; System . out . println ( "------------------------------" ) ; System . out . println ( ( "free:<seq2seq4repair_space>" + bfree ) ) ; System . out . println ( ( "total:<seq2seq4repair_space>" + btotal ) ) ; System . out . println ( ( "max:<seq2seq4repair_space>" + bmax ) ) ; for ( int idx = 0 ; idx < objects ; idx ++ ) { Connector cnn = of . createConnector ( ) ; Workers wkrs = of . createWorkers ( ) ; for ( int idz = 0 ; idz < 26 ; idz ++ ) { Worker wk0 = of . createWorker ( ) ; wk0 . setCurrentQueryString ( "//manager//status" ) ; wk0 . setCurrentUri ( "http:////localhost//manager//status" ) ; wk0 . setMethod ( "GET" ) ; wk0 . setProtocol ( "http" ) ; wk0 . setRemoteAddr ( "?" ) ; wk0 . setRequestBytesReceived ( 132 ) ; wk0 . setRequestBytesSent ( 18532 ) ; wk0 . setStage ( "K" ) ; wk0 . setVirtualHost ( "?" ) ; wkrs . getWorker ( ) . add ( wk0 ) ; } cnn . setWorkers ( wkrs ) ; RequestInfo rqinfo = of . createRequestInfo ( ) ; rqinfo . setBytesReceived ( 0 ) ; rqinfo . setBytesSent ( 434374 ) ; rqinfo . setErrorCount ( 10 ) ; rqinfo . setMaxTime ( 850 ) ; rqinfo . setProcessingTime ( 2634 ) ; rqinfo . setRequestCount ( 1002 ) ; cnn . setRequestInfo ( rqinfo ) ; ThreadInfo thinfo = of . createThreadInfo ( ) ; thinfo . setCurrentThreadCount ( 50 ) ; thinfo . setCurrentThreadsBusy ( 12 ) ; thinfo . setMaxSpareThreads ( 50 ) ; thinfo . setMaxThreads ( 150 ) ; thinfo . setMinSpareThreads ( 10 ) ; cnn . setThreadInfo ( thinfo ) ; Jvm vm = of . createJvm ( ) ; Memory mem = of . createMemory ( ) ; mem . setFree ( 77280 ) ; mem . setTotal ( 134210000 ) ; mem . setMax ( 134217728 ) ; vm . setMemory ( mem ) ; Status st = of . createStatus ( ) ; st . setJvm ( vm ) ; st . getConnector ( ) . add ( cnn ) ; MonitorStats mstats = new MonitorStats ( Stats . calculateStatus ( st ) , Stats . calculateLoad ( st ) , 0 , Stats . calculateMemoryLoad ( st ) , Stats . calculateThreadLoad ( st ) , "localhost" , "8080" , "http" , System . currentTimeMillis ( ) ) ; MonitorModel monmodel = new MonitorModel ( mstats ) ; objs . add ( monmodel ) ; } long afree = Runtime . getRuntime ( ) . freeMemory ( ) ; long atotal = Runtime . getRuntime ( ) . totalMemory ( ) ; long amax = Runtime . getRuntime ( ) . maxMemory ( ) ; long delta = ( atotal - afree ) - ( btotal - bfree ) ; System . out . println ( "After<seq2seq4repair_space>we<seq2seq4repair_space>create<seq2seq4repair_space>objects:" ) ; System . out . println ( "------------------------------" ) ; System . out . println ( ( "free:<seq2seq4repair_space>" + afree ) ) ; System . out . println ( ( "total:<seq2seq4repair_space>" + atotal ) ) ; System . out . println ( ( "max:<seq2seq4repair_space>" + amax ) ) ; System . out . println ( "------------------------------" ) ; System . out . println ( ( ( "delta:<seq2seq4repair_space>" + ( delta // 1024 ) ) + "<seq2seq4repair_space>kilobytes" ) ) ; System . out . println ( ( ( "delta:<seq2seq4repair_space>" + ( ( delta // 1024 ) // 1024 ) ) + "<seq2seq4repair_space>megabytes" ) ) ; System . out . println ( ( "number<seq2seq4repair_space>of<seq2seq4repair_space>objects:<seq2seq4repair_space>" + objects ) ) ; System . out . println ( ( "potential<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>servers:<seq2seq4repair_space>" + ( objects // 1000 ) ) ) ; } else { System . out . println ( "Please<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>objects" ) ; } } }

Fix:
if ( ( args . length ) == 1 ) {