Buggy code:
public class SolrCmdDistributor { private static final int MAX_RETRIES_ON_FORWARD = 6 ; public static Logger log = LoggerFactory . getLogger ( SolrCmdDistributor . class ) ; static ThreadPoolExecutor commExecutor = new ThreadPoolExecutor ( 0 , Integer . MAX_VALUE , 5 , TimeUnit . SECONDS , new SynchronousQueue < Runnable > ( ) , new DefaultSolrThreadFactory ( "cmdDistribExecutor" ) ) ; static final HttpClient client ; static AdjustableSemaphore semaphore = new AdjustableSemaphore ( 8 ) ; CompletionService < SolrCmdDistributor . Request > completionService ; Set < Future < SolrCmdDistributor . Request > > pending ; int maxBufferedAddsPerServer = 10 ; int maxBufferedDeletesPerServer = 10 ; private SolrCmdDistributor . Response response = new SolrCmdDistributor . Response ( ) ; private final Map < SolrCmdDistributor . Node , List < SolrCmdDistributor . AddRequest > > adds = new HashMap < SolrCmdDistributor . Node , List < SolrCmdDistributor . AddRequest > > ( ) ; private final Map < SolrCmdDistributor . Node , List < SolrCmdDistributor . DeleteRequest > > deletes = new HashMap < SolrCmdDistributor . Node , List < SolrCmdDistributor . DeleteRequest > > ( ) ; class AddRequest { AddUpdateCommand cmd ; ModifiableSolrParams params ; } class DeleteRequest { DeleteUpdateCommand cmd ; ModifiableSolrParams params ; } public SolrCmdDistributor ( int numHosts ) { } public void finish ( ) { } public void distribDelete ( DeleteUpdateCommand cmd , List < SolrCmdDistributor . Node > urls , ModifiableSolrParams params ) throws IOException { } public void distribAdd ( AddUpdateCommand cmd , List < SolrCmdDistributor . Node > nodes , ModifiableSolrParams params ) throws IOException { } public void distribCommit ( CommitUpdateCommand cmd , List < SolrCmdDistributor . Node > nodes , ModifiableSolrParams params ) throws IOException { } private void doDelete ( DeleteUpdateCommand cmd , List < SolrCmdDistributor . Node > nodes , ModifiableSolrParams params ) { } void addCommit ( UpdateRequestExt ureq , CommitUpdateCommand cmd ) { } boolean flushAdds ( int limit ) { } boolean flushDeletes ( int limit ) { Set < SolrCmdDistributor . Node > removeNodes = new HashSet < SolrCmdDistributor . Node > ( ) ; Set < SolrCmdDistributor . Node > nodes = deletes . keySet ( ) ; for ( SolrCmdDistributor . Node node : nodes ) { List < SolrCmdDistributor . DeleteRequest > dlist = deletes . get ( node ) ; if ( ( dlist == null ) || ( ( dlist . size ( ) ) < limit ) ) <START_BUG> return false ; <END_BUG> UpdateRequestExt ureq = new UpdateRequestExt ( ) ; ModifiableSolrParams combinedParams = new ModifiableSolrParams ( ) ; for ( SolrCmdDistributor . DeleteRequest dReq : dlist ) { DeleteUpdateCommand cmd = dReq . cmd ; combinedParams . add ( dReq . params ) ; if ( cmd . isDeleteById ( ) ) { ureq . deleteById ( cmd . getId ( ) , cmd . getVersion ( ) ) ; } else { ureq . deleteByQuery ( cmd . query ) ; } if ( ( ureq . getParams ( ) ) == null ) ureq . setParams ( new ModifiableSolrParams ( ) ) ; ureq . getParams ( ) . add ( combinedParams ) ; } removeNodes . add ( node ) ; submit ( ureq , node ) ; } for ( SolrCmdDistributor . Node node : removeNodes ) { deletes . remove ( node ) ; } return true ; } private DeleteUpdateCommand clone ( DeleteUpdateCommand cmd ) { } public static class Request { public SolrCmdDistributor . Node node ; UpdateRequestExt ureq ; NamedList < Object > ursp ; int rspCode ; public Exception exception ; int retries ; } void submit ( UpdateRequestExt ureq , SolrCmdDistributor . Node node ) { } public void submit ( final SolrCmdDistributor . Request sreq ) { } void checkResponses ( boolean block ) { } public static class Response { public SolrCmdDistributor . Request sreq ; public List < SolrCmdDistributor . Error > errors = new ArrayList < SolrCmdDistributor . Error > ( ) ; } public static class Error { public SolrCmdDistributor . Node node ; public Exception e ; } public SolrCmdDistributor . Response getResponse ( ) { } public abstract static class Node { public abstract String getUrl ( ) { } public abstract boolean checkRetry ( ) { } public abstract String getCoreName ( ) { } public abstract String getBaseUrl ( ) { } public abstract ZkCoreNodeProps getNodeProps ( ) { } } public static class StdNode extends SolrCmdDistributor . Node { protected String url ; protected String baseUrl ; protected String coreName ; private ZkCoreNodeProps nodeProps ; public StdNode ( ZkCoreNodeProps nodeProps ) { } @ Override public String getUrl ( ) { } @ Override public String toString ( ) { } @ Override public boolean checkRetry ( ) { } @ Override public String getBaseUrl ( ) { } @ Override public String getCoreName ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public ZkCoreNodeProps getNodeProps ( ) { } } }

Fix:
continue ;