Buggy code:
@ Override public List < CompositeSearchResult > apply ( List < CompositeSearchResult > results ) { SearchResultsFilterHelper . validateFilters ( filters ) ; final List < CompositeSearchResult > filteredResults = new ArrayList ( results . size ( ) ) ; if ( ( filters . size ( ) ) == 0 ) { filteredResults . addAll ( results ) ; return filteredResults ; } final Set < UUID > forSetCustomCollection = new HashSet < > ( ) ; for ( CompositeSearchResult result : results ) { forSetCustomCollection . add ( result . getContainingConcept ( ) . getPrimordialUuid ( ) ) ; } final ForSetSpecification forSetSpecification = new ForSetSpecification ( ComponentCollectionTypes . CUSTOM_SET ) ; forSetSpecification . setCustomCollection ( forSetCustomCollection ) ; Query q = null ; q = new Query ( ) { @ Override public void Let ( ) throws IOException { for ( NonSearchTypeFilter < ? > filter : filters ) { if ( filter instanceof IsDescendantOfFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsDescendantOfFilter ) ( filter ) ) . getNid ( ) ) ; let ( concept . getPrimordialUuid ( ) . toString ( ) , new org . ihtsdo . otf . tcc . api . spec . ConceptSpec ( OTFUtility . getDescription ( concept ) , concept . getPrimordialUuid ( ) ) ) ; } else if ( filter instanceof IsAFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsAFilter ) ( filter ) ) . getNid ( ) ) ; let ( concept . getPrimordialUuid ( ) . toString ( ) , new org . ihtsdo . otf . tcc . api . spec . ConceptSpec ( OTFUtility . getDescription ( concept ) , concept . getPrimordialUuid ( ) ) ) ; } else if ( filter instanceof IsRefsetMemberFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsRefsetMemberFilter ) ( filter ) ) . getNid ( ) ) ; let ( concept . getPrimordialUuid ( ) . toString ( ) , new org . ihtsdo . otf . tcc . api . spec . ConceptSpec ( OTFUtility . getDescription ( concept ) , concept . getPrimordialUuid ( ) ) ) ; } else { throw new RuntimeException ( new SearchResultsFilterException ( QueryBasedSearchResultsIntersectionFilter . this , ( ( "Unsupported<seq2seq4repair_space>NonSearchTypeFilter<seq2seq4repair_space>" + ( filter . getClass ( ) . getName ( ) ) ) + ".<seq2seq4repair_space>Curently<seq2seq4repair_space>only<seq2seq4repair_space>IsDescendantOfFilter<seq2seq4repair_space>and<seq2seq4repair_space>IsAFilter<seq2seq4repair_space>supported" ) ) ) ; } } } @ Override public Clause Where ( ) { ArrayList < Clause > subclauses = new ArrayList < > ( ) ; for ( NonSearchTypeFilter < ? > filter : filters ) { Clause currentClause = null ; if ( filter instanceof IsDescendantOfFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsDescendantOfFilter ) ( filter ) ) . getNid ( ) ) ; currentClause = ConceptIsDescendentOf ( concept . getPrimordialUuid ( ) . toString ( ) ) ; } else if ( filter instanceof IsAFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsAFilter ) ( filter ) ) . getNid ( ) ) ; currentClause = ConceptIs ( concept . getPrimordialUuid ( ) . toString ( ) ) ; } else if ( filter instanceof IsRefsetMemberFilter ) { ConceptVersionBI concept = OTFUtility . getConceptVersion ( ( ( IsRefsetMemberFilter ) ( filter ) ) . getNid ( ) ) ; currentClause = RefsetContainsConcept ( concept . getPrimordialUuid ( ) . toString ( ) , "dummy" ) ; } else { String msg = ( "Unsupported<seq2seq4repair_space>NonSearchTypeFilter<seq2seq4repair_space>" + ( filter . getClass ( ) . getName ( ) ) ) + ".<seq2seq4repair_space>Curently<seq2seq4repair_space>only<seq2seq4repair_space>IsDescendantOfFilter<seq2seq4repair_space>and<seq2seq4repair_space>IsAFilter<seq2seq4repair_space>supported" ; QueryBasedSearchResultsIntersectionFilter . LOG . error ( msg ) ; throw new RuntimeException ( new SearchResultsFilterException ( QueryBasedSearchResultsIntersectionFilter . this , msg ) ) ; } if ( ( filter instanceof Invertable ) && ( ( ( Invertable ) ( filter ) ) . getInvert ( ) ) ) { currentClause = Not ( currentClause ) ; } subclauses . add ( currentClause ) ; } if ( ( subclauses . size ( ) ) > 1 ) { return And ( subclauses . toArray ( new Clause [ subclauses . size ( ) ] ) ) ; } else if ( ( subclauses . size ( ) ) == 1 ) { return subclauses . get ( 0 ) ; } else { QueryBasedSearchResultsIntersectionFilter . LOG . error ( ( ( ( "No<seq2seq4repair_space>clauses<seq2seq4repair_space>generated<seq2seq4repair_space>for<seq2seq4repair_space>" + ( filters . size ( ) ) ) + "<seq2seq4repair_space>filters:<seq2seq4repair_space>" ) + ( Arrays . toString ( filters . toArray ( ) ) ) ) ) ; return null ; } } @ Override protected ForSetSpecification ForSetSpecification ( ) throws IOException { return forSetSpecification ; } } ; NativeIdSetBI outputNids = null ; try { SearchResultsFilterHelper . LOG . debug ( ( ( ( ( "Applying<seq2seq4repair_space>" + ( filters . size ( ) ) ) + "<seq2seq4repair_space>clauses<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( forSetCustomCollection . size ( ) ) ) + "<seq2seq4repair_space>uuids" ) ) ; outputNids = q . compute ( ) ; <START_BUG> SearchResultsFilterHelper . LOG . debug ( ( ( ( ( ( ( outputNids . size ( ) ) + "<seq2seq4repair_space>nids<seq2seq4repair_space>remained<seq2seq4repair_space>after<seq2seq4repair_space>applying<seq2seq4repair_space>" ) + ( filters . size ( ) ) ) + "<seq2seq4repair_space>clauses<seq2seq4repair_space>to<seq2seq4repair_space>filtering<seq2seq4repair_space>a<seq2seq4repair_space>total<seq2seq4repair_space>of<seq2seq4repair_space>" ) + forSetCustomCollection ) + "<seq2seq4repair_space>uuids" ) ) ; <END_BUG> } catch ( Exception e ) { String msg = ( ( "Failed<seq2seq4repair_space>calling<seq2seq4repair_space>Query.compute()<seq2seq4repair_space>for<seq2seq4repair_space>" + ( filters . size ( ) ) ) + "<seq2seq4repair_space>filters:<seq2seq4repair_space>" ) + ( Arrays . toString ( filters . toArray ( ) ) ) ; QueryBasedSearchResultsIntersectionFilter . LOG . error ( msg ) ; throw new SearchResultsFilterException ( this , msg , e ) ; } for ( CompositeSearchResult result : results ) { if ( outputNids . contains ( result . getContainingConcept ( ) . getNid ( ) ) ) { filteredResults . add ( result ) ; } } return filteredResults ; } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
SearchResultsFilterHelper . LOG . debug ( ( ( ( ( ( ( outputNids . size ( ) ) + "<seq2seq4repair_space>nids<seq2seq4repair_space>remained<seq2seq4repair_space>after<seq2seq4repair_space>applying<seq2seq4repair_space>" ) + ( filters . size ( ) ) ) + "<seq2seq4repair_space>clauses<seq2seq4repair_space>to<seq2seq4repair_space>filtering<seq2seq4repair_space>a<seq2seq4repair_space>total<seq2seq4repair_space>of<seq2seq4repair_space>" ) + ( forSetCustomCollection . size ( ) ) ) + "<seq2seq4repair_space>uuids" ) ) ;