Buggy code:
public class IssueQueryService implements ServerComponent { private final DbClient dbClient ; private final ComponentService componentService ; public IssueQueryService ( DbClient dbClient , ComponentService componentService ) { } public IssueQuery createFromMap ( Map < String , Object > params ) { } public IssueQuery createFromRequest ( Request request ) { } private void addComponentUuids ( IssueQuery . Builder builder , DbSession session , @ Nullable Collection < String > componentUuids , @ Nullable Collection < String > components , @ Nullable Collection < String > componentRootUuids , @ Nullable Collection < String > componentRoots , @ Nullable Collection < String > projectUuids , @ Nullable Collection < String > projects , @ Nullable Collection < String > moduleUuids , @ Nullable Collection < String > directories , @ Nullable Collection < String > fileUuids ) { Set < String > allComponentUuids = Sets . newHashSet ( ) ; if ( ( componentUuids != null ) || ( componentRootUuids != null ) ) { if ( ( components != null ) || ( componentRoots != null ) ) { throw new IllegalArgumentException ( "components<seq2seq4repair_space>and<seq2seq4repair_space>componentUuids<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>simultaneously" ) ; } allComponentUuids . addAll ( ( ( Collection < String > ) ( ObjectUtils . defaultIfNull ( componentUuids , Sets . newHashSet ( ) ) ) ) ) ; allComponentUuids . addAll ( ( ( Collection < String > ) ( ObjectUtils . defaultIfNull ( componentRootUuids , Sets . newHashSet ( ) ) ) ) ) ; } else { Set < String > allComponents = Sets . newHashSet ( ) ; allComponents . addAll ( ( ( Collection < String > ) ( ObjectUtils . defaultIfNull ( components , Sets . newHashSet ( ) ) ) ) ) ; allComponents . addAll ( ( ( Collection < String > ) ( ObjectUtils . defaultIfNull ( componentRoots , Sets . newHashSet ( ) ) ) ) ) ; allComponentUuids . addAll ( componentUuids ( session , allComponents ) ) ; } if ( allComponentUuids . isEmpty ( ) ) { builder . setContextualized ( false ) ; addComponentsBelowView ( builder , session , projects , projectUuids , moduleUuids , directories , fileUuids ) ; } else { builder . setContextualized ( true ) ; Set < String > qualifiers = componentService . getDistinctQualifiers ( session , allComponentUuids ) ; if ( qualifiers . isEmpty ( ) ) { builder . componentUuids ( allComponentUuids ) ; return ; } if ( ( qualifiers . size ( ) ) > 1 ) { throw new IllegalArgumentException ( ( "All<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>qualifier,<seq2seq4repair_space>found<seq2seq4repair_space>" + ( Joiner . on ( ',' ) . join ( qualifiers ) ) ) ) ; } String uniqueQualifier = qualifiers . iterator ( ) . next ( ) ; if ( VIEW . equals ( uniqueQualifier ) ) { addComponentsBelowView ( builder , session , projects , projectUuids , moduleUuids , directories , fileUuids ) ; } else if ( "DEV" . equals ( uniqueQualifier ) ) { } else if ( PROJECT . equals ( uniqueQualifier ) ) { builder . projectUuids ( allComponentUuids ) ; addComponentsBelowModule ( builder , moduleUuids , directories , fileUuids ) ; } else if ( MODULE . equals ( uniqueQualifier ) ) { builder . moduleRootUuids ( allComponentUuids ) ; addComponentsBelowModule ( builder , moduleUuids , directories , fileUuids ) ; } else if ( DIRECTORY . equals ( uniqueQualifier ) ) { Collection < String > directoryModuleUuids = Sets . newHashSet ( ) ; Collection < String > directoryPaths = Sets . newHashSet ( ) ; for ( ComponentDto directory : componentService . getByUuids ( session , allComponentUuids ) ) { directoryModuleUuids . add ( directory . moduleUuid ( ) ) ; directoryPaths . add ( directory . path ( ) ) ; } builder . moduleUuids ( directoryModuleUuids ) ; builder . directories ( directoryPaths ) ; addComponentsBelowDirectory ( builder , fileUuids ) ; } else <START_BUG> if ( FILE . equals ( uniqueQualifier ) ) { <END_BUG> builder . fileUuids ( allComponentUuids ) ; } else { throw new IllegalArgumentException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>search<seq2seq4repair_space>root<seq2seq4repair_space>context<seq2seq4repair_space>for<seq2seq4repair_space>components<seq2seq4repair_space>" + ( Joiner . on ( ',' ) . join ( allComponentUuids ) ) ) ) ; } } } private void addComponentsBelowView ( Builder builder , DbSession session , @ Nullable Collection < String > projects , @ Nullable Collection < String > projectUuids , @ Nullable Collection < String > moduleUuids , Collection < String > directories , Collection < String > fileUuids ) { } private void addComponentsBelowModule ( Builder builder , @ Nullable Collection < String > moduleUuids , @ Nullable Collection < String > directories , @ Nullable Collection < String > fileUuids ) { } private void addComponentsBelowModule ( Builder builder , @ Nullable Collection < String > directories , @ Nullable Collection < String > fileUuids ) { } private void addComponentsBelowDirectory ( Builder builder , @ Nullable Collection < String > fileUuids ) { } private Collection < String > componentUuids ( DbSession session , @ Nullable Collection < String > componentKeys ) { } @ VisibleForTesting static Collection < RuleKey > toRules ( @ Nullable Object o ) { } @ CheckForNull private static Collection < RuleKey > stringsToRules ( @ Nullable Collection < String > rules ) { } }

Fix:
if ( ( FILE . equals ( uniqueQualifier ) ) || ( UNIT_TEST_FILE . equals ( uniqueQualifier ) ) ) {