Buggy code:
class CreateExportGroupSchedulingThread implements Runnable { static final Logger _log = LoggerFactory . getLogger ( CreateExportGroupSchedulingThread . class ) ; private final ExportGroupService exportGroupService ; private VirtualArray virtualArray ; private Project project ; private ExportGroup exportGroup ; private Map < URI , Map < URI , Integer > > storageMap ; private List < URI > hosts ; private List < URI > clusters ; private List < URI > initiators ; private Map < URI , Integer > volumeMap ; private String task ; private TaskResourceRep taskRes ; private ExportPathParameters pathParam ; public CreateExportGroupSchedulingThread ( ExportGroupService exportGroupService , VirtualArray virtualArray , Project project , ExportGroup exportGroup , Map < URI , Map < URI , Integer > > storageMap , List < URI > clusters , List < URI > hosts , List < URI > initiators , Map < URI , Integer > volumeMap , ExportPathParameters pathParam , String task , TaskResourceRep taskRes ) { } @ Override public void run ( ) { CreateExportGroupSchedulingThread . _log . info ( "Starting<seq2seq4repair_space>scheduling<seq2seq4repair_space>for<seq2seq4repair_space>export<seq2seq4repair_space>group<seq2seq4repair_space>create<seq2seq4repair_space>thread..." ) ; try { <START_BUG> List < URI > affectedInitiators = this . exportGroupService . validateClientsAndPopulate ( exportGroup , project , virtualArray , storageMap . keySet ( ) , clusters , hosts , initiators , volumeMap . keySet ( ) ) ; <END_BUG> CreateExportGroupSchedulingThread . _log . info ( "Initiators<seq2seq4repair_space>{}<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>used." , affectedInitiators ) ; if ( ( ( pathParam ) != null ) && ( ! ( volumeMap . keySet ( ) . isEmpty ( ) ) ) ) { ExportPathParams exportPathParam = exportGroupService . validateAndCreateExportPathParam ( pathParam , exportGroup , volumeMap . keySet ( ) ) ; exportGroupService . addBlockObjectsToPathParamMap ( volumeMap . keySet ( ) , exportPathParam . getId ( ) , exportGroup ) ; exportGroupService . _dbClient . createObject ( exportPathParam ) ; } this . exportGroupService . _dbClient . persistObject ( exportGroup ) ; if ( ( storageMap . isEmpty ( ) ) || ( affectedInitiators . isEmpty ( ) ) ) { this . exportGroupService . _dbClient . ready ( ExportGroup . class , taskRes . getResource ( ) . getId ( ) , taskRes . getOpId ( ) ) ; return ; } BlockExportController exportController = this . exportGroupService . getExportController ( ) ; CreateExportGroupSchedulingThread . _log . info ( "createExportGroup<seq2seq4repair_space>request<seq2seq4repair_space>is<seq2seq4repair_space>submitted." ) ; exportController . exportGroupCreate ( exportGroup . getId ( ) , volumeMap , affectedInitiators , task ) ; } catch ( Exception ex ) { if ( ex instanceof ServiceCoded ) { this . exportGroupService . _dbClient . error ( ExportGroup . class , taskRes . getResource ( ) . getId ( ) , taskRes . getOpId ( ) , ( ( ServiceCoded ) ( ex ) ) ) ; } else { this . exportGroupService . _dbClient . error ( ExportGroup . class , taskRes . getResource ( ) . getId ( ) , taskRes . getOpId ( ) , internalServerErrors . unexpectedErrorExportGroupPlacement ( ex ) ) ; } CreateExportGroupSchedulingThread . _log . error ( ex . getMessage ( ) , ex ) ; taskRes . setMessage ( ex . getMessage ( ) ) ; this . exportGroupService . _dbClient . markForDeletion ( exportGroup ) ; } CreateExportGroupSchedulingThread . _log . info ( "Ending<seq2seq4repair_space>export<seq2seq4repair_space>group<seq2seq4repair_space>create<seq2seq4repair_space>scheduling<seq2seq4repair_space>thread..." ) ; } public static void executeApiTask ( ExportGroupService exportGroupService , ExecutorService executorService , DbClient dbClient , VirtualArray virtualArray , Project project , ExportGroup exportGroup , Map < URI , Map < URI , Integer > > storageMap , List < URI > clusters , List < URI > hosts , List < URI > initiators , Map < URI , Integer > volumeMap , ExportPathParameters pathParam , String task , TaskResourceRep taskRes ) { } No newline ; at end ; of file ; }

Fix:
List < URI > affectedInitiators = this . exportGroupService . validateClientsAndPopulate ( exportGroup , project , virtualArray , storageMap . keySet ( ) , clusters , hosts , initiators , volumeMap . keySet ( ) , pathParam ) ;