Buggy code:
@ Component ( "ListJobWorker" ) @ Scope ( "prototype" ) public class ListJobWorker extends ProjectJobWorker { private ThreadPoolTaskExecutor taskExecutor ; @ Override public void checkAndStartInactiveProject ( ) { List < Project > projectsToProcess ; List < URL > urlList ; long lastRunTimeStamp = 0 ; ArrayList < Integer > warnMessages = null ; projectManager = ( ( ProjectManager ) ( AppContext . getApplicationContext ( ) . getBean ( "ProjectManager" ) ) ) ; lock . lock ( ) ; try { projectsToProcess = projectManager . getActiveAndNotRunningURLListProjects ( ) ; if ( ( projectsToProcess == null ) || ( projectsToProcess . isEmpty ( ) ) ) return ; boolean anyProjectToStart = checkIfProjectAvailableToStart ( projectsToProcess , false ) ; if ( ! anyProjectToStart ) return ; urlManager = ( ( URLListManager ) ( AppContext . getApplicationContext ( ) . getBean ( "URLListManager" ) ) ) ; urlManager . setProjectId ( project . getProjectId ( ) ) ; urlManager . setDefaultLocale ( project . getDefaultLocale ( ) ) ; ( ( URLListManager ) ( urlManager ) ) . createListURLTableForGivenProject ( ) ; urlList = ( ( URLListManager ) ( urlManager ) ) . getAllURLs ( null , true ) ; if ( urlList == null ) return ; ( ( URLListManager ) ( urlManager ) ) . deleteRecords ( true ) ; lastRunTimeStamp = Calendar . getInstance ( ) . getTimeInMillis ( ) ; project . setRunning ( true ) ; projectManager . saveOrUpdateProject ( project ) ; } finally { lock . unlock ( ) ; } try { logger . info ( ( ( ( ( ( "Started<seq2seq4repair_space>list-crawling<seq2seq4repair_space>for<seq2seq4repair_space>project:<seq2seq4repair_space>" + ( project . getProjectName ( ) ) ) + "<seq2seq4repair_space>id:<seq2seq4repair_space>" ) + ( project . getProjectId ( ) ) ) + "<seq2seq4repair_space>" ) + ( project . getRootDomainToCrawlWithoutProtocol ( ) ) ) ) ; AtomicInteger runningThreads = new AtomicInteger ( ) ; int maxParallelThreads = 2 ; initHttpClient ( ) ; thisUserAgent = ( ( ( project . getBotUserAgent ( ) ) + "(" ) + ( project . getProjectId ( ) ) ) + ")" ; taskExecutor = ( ( ThreadPoolTaskExecutor ) ( AppContext . getApplicationContext ( ) . getBean ( "taskExecutor" ) ) ) ; DomainAnalyzer da = new DomainAnalyzer ( this ) ; summary = new de . solidsearch . bot . data . ProjectSummary ( lastRunTimeStamp , project . getProjectId ( ) ) ; summary . setDomainBrandName ( da . extractBrandFromDomain ( project . getRootDomainToCrawl ( ) ) ) ; warnMessages = project . getInfoMessageCodes ( ) ; boolean stopBecauseRobotsTxtIsNotAvailableOrBlocksOurBot = false ; urlChecker = checkRobotsTxt ( da , warnMessages , stopBecauseRobotsTxtIsNotAvailableOrBlocksOurBot , project . getErrorCount ( ) ) ; if ( stopBecauseRobotsTxtIsNotAvailableOrBlocksOurBot == true ) return ; if ( ( urlChecker ) == null ) urlChecker = new de . solidsearch . bot . utils . URLChecker ( project . isIgnoreImages ( ) , project . isIgnoreCSS ( ) , project . isIgnoreJS ( ) , project . isIgnoreRobotsTxt ( ) , project . getRobotsRegex ( ) ) ; taskExecutor . setCorePoolSize ( maxParallelThreads ) ; taskExecutor . setMaxPoolSize ( maxParallelThreads ) ; for ( int i = 0 ; i < ( urlList . size ( ) ) ; i ++ ) { try { if ( ! ( urlChecker . isURLAllowed ( urlList . get ( i ) . getURLName ( ) ) ) ) { URL newURL = urlList . get ( i ) ; URL oldURL = null ; try { oldURL = urlList . get ( i ) . clone ( ) ; } catch ( CloneNotSupportedException e ) { e . printStackTrace ( ) ; } newURL . setBlockedByRobotsTxt ( true ) ; urlManager . updateURL ( newURL , oldURL ) ; continue ; } taskExecutor . execute ( new SourceCodeAnalyzer ( this , urlList . get ( i ) , runningThreads ) ) ; runningThreads . incrementAndGet ( ) ; } catch ( TaskRejectedException e ) { logger . info ( ( ( ( "Thread<seq2seq4repair_space>queue<seq2seq4repair_space>was<seq2seq4repair_space>full!<seq2seq4repair_space>Project:<seq2seq4repair_space>" + ( project . getProjectId ( ) ) ) + "<seq2seq4repair_space>this<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>happend!<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; i -- ; } while ( ( runningThreads . get ( ) ) >= maxParallelThreads ) { try { Thread . sleep ( 1 ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } } } while ( ( runningThreads . get ( ) ) > 0 ) { try { Thread . sleep ( 1 ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { if ( ( taskExecutor ) != null ) { taskExecutor . shutdown ( ) ; } releaseHttpClientResources ( ) ; } lock . lock ( ) ; try { List < URL > changedUrls = ( ( URLListManager ) ( urlManager ) ) . getChangedURLs ( ) ; boolean anyChanges = false ; if ( changedUrls != null ) anyChanges = true ; <START_BUG> warnMessages . remove ( CRAWLINGISRUNNING ) ; <END_BUG> project . setInfoMessageCodes ( warnMessages ) ; project . setRunning ( false ) ; project . setListJobLastRunTimestamp ( lastRunTimeStamp ) ; project . setChangesInListCrawling ( anyChanges ) ; projectManager . saveOrUpdateProject ( project ) ; if ( anyChanges && ( project . isNotificationEnabled ( ) ) ) { AlarmAnalyzer alarmAnalyzer = ( ( AlarmAnalyzer ) ( AppContext . getApplicationContext ( ) . getBean ( "AlarmAnalyzer" ) ) ) ; alarmAnalyzer . generateListAlarm ( project , changedUrls ) ; } logger . info ( ( ( ( ( ( "Finished<seq2seq4repair_space>list-crawling<seq2seq4repair_space>for<seq2seq4repair_space>project:<seq2seq4repair_space>" + ( project . getProjectName ( ) ) ) + "<seq2seq4repair_space>id:<seq2seq4repair_space>" ) + ( project . getProjectId ( ) ) ) + "<seq2seq4repair_space>,#<seq2seq4repair_space>of<seq2seq4repair_space>crawled<seq2seq4repair_space>urls:<seq2seq4repair_space>" ) + ( urlList . size ( ) ) ) ) ; } finally { lock . unlock ( ) ; } } }

Fix:
warnMessages . remove ( ( ( Integer ) ( CRAWLINGISRUNNING . getInfoMessageCode ( ) ) ) ) ;