@ Override public void visitCode ( Code obj ) { queryLocations . clear ( ) ; loops . clear ( ) ; super . visitCode ( obj ) ; for ( Integer qLoc : queryLocations ) { for ( LoopLocation lLoc : loops ) { if ( lLoc . isInLoop ( qLoc . intValue ( ) ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . SIL_SQL_IN_LOOP . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) . addSourceLine ( this , qLoc . intValue ( ) ) ) ; break ; } } } }
implements the visitor to clear the collections and report the query locations that are in loops