question: public void addBug ( BugInstance bug ) { SourceLineAnnotation source = bug . getPrimarySourceLineAnnotation ( ) ; PackageStats stat = getPackageStats ( source . getPackageName ( ) ) ; stat . addError ( bug ) ; ++ totalErrors [ 0 ] ; int priority = bug . getPriority ( ) ; if ( priority >= 1 ) { ++ totalErrors [ Math . min ( priority , totalErrors . length - 1 ) ] ; } }
target:  Called when a bug is reported.