public static List < MarkerParameter > createBugParameters ( IJavaProject project , BugCollection theCollection , IProgressMonitor monitor ) { List < MarkerParameter > bugParameters = new ArrayList <> ( ) ; if ( project == null ) { FindbugsPlugin . getDefault ( ) . logException ( new NullPointerException ( "project is null" ) , "project is null" ) ; return bugParameters ; } Iterator < BugInstance > iterator = theCollection . iterator ( ) ; while ( iterator . hasNext ( ) && ! monitor . isCanceled ( ) ) { BugInstance bug = iterator . next ( ) ; DetectorFactory detectorFactory = bug . getDetectorFactory ( ) ; if ( detectorFactory != null && ! detectorFactory . getPlugin ( ) . isGloballyEnabled ( ) ) { continue ; } MarkerParameter mp = createMarkerParameter ( project , bug ) ; if ( mp != null ) { bugParameters . add ( mp ) ; } } return bugParameters ; }
As a side - effect this method updates missing line information for some bugs stored in the given bug collection