protected void assertReportedBugs(String expectedBugType,int expectedBugCount,IProject project) throws CoreException {
  int seenBugCount=0;
  SortedBugCollection bugs=FindbugsPlugin.getBugCollection(project,null,false);
  for (  BugInstance bug : bugs) {
    if (expectedBugType.equals(bug.getType())) {
      seenBugCount++;
    }
  }
  assertEquals("Expected " + expectedBugCount + " of bugs "+ expectedBugType+ " but seen "+ seenBugCount,expectedBugCount,seenBugCount);
}

protected void assertReportedBugs ( String expectedBugType , int expectedBugCount , IProject project ) throws CoreException { int seenBugCount = 0 ; SortedBugCollection bugs = FindbugsPlugin . getBugCollection ( project , null , false ) ; for ( BugInstance bug : bugs ) { if ( expectedBugType . equals ( bug . getType ( ) ) ) { seenBugCount ++ ; } } assertEquals ( "Expected " + expectedBugCount + " of bugs " + expectedBugType + " but seen " + seenBugCount , expectedBugCount , seenBugCount ) ; }
asserts that the number of detected bugs of the given type match the given expected count .
