Buggy code:
public class SolrCmdDistributor { private static final int MAX_RETRIES_ON_FORWARD = 6 ; public static Logger log = LoggerFactory . getLogger ( SolrCmdDistributor . class ) ; static SolrCmdDistributor . BoundedExecutor commExecutor ; static final HttpClient client ; 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 ) { Set < SolrCmdDistributor . Node > removeNodes = new HashSet < SolrCmdDistributor . Node > ( ) ; Set < SolrCmdDistributor . Node > nodes = adds . keySet ( ) ; for ( SolrCmdDistributor . Node node : nodes ) { List < SolrCmdDistributor . AddRequest > alist = adds . get ( node ) ; if ( ( alist == null ) || ( ( alist . size ( ) ) < limit ) ) <START_BUG> return false ; <END_BUG> UpdateRequestExt ureq = new UpdateRequestExt ( ) ; ModifiableSolrParams combinedParams = new ModifiableSolrParams ( ) ; for ( SolrCmdDistributor . AddRequest aReq : alist ) { AddUpdateCommand cmd = aReq . cmd ; combinedParams . add ( aReq . params ) ; ureq . add ( cmd . solrDoc , cmd . commitWithin , cmd . overwrite ) ; } if ( ( ureq . getParams ( ) ) == null ) ureq . setParams ( new ModifiableSolrParams ( ) ) ; ureq . getParams ( ) . add ( combinedParams ) ; removeNodes . add ( node ) ; submit ( ureq , node ) ; } for ( SolrCmdDistributor . Node node : removeNodes ) { adds . remove ( node ) ; } return true ; } boolean flushDeletes ( int limit ) { } 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 ( ) { } } public class BoundedExecutor extends ThreadPoolExecutor { private final Semaphore semaphore ; public BoundedExecutor ( int corePoolSize , int maximumPoolSize , long keepAliveTime , TimeUnit unit , BlockingQueue < Runnable > workQueue , ThreadFactory threadFactory ) { } @ Override public void execute ( final Runnable command ) { } } }

Fix:
continue ;