@Override protected void reportBug(BugInstance bug) { reporter.reportBug(bug); }
@Override public void logError(String message, Throwable e) { if (e instanceof MethodUnprofitableException) { return; } delegate.logError(message, e); }
public static XClass findImplementor(XClass clazz, String name, String signature, boolean isStatic, BugReporter bugReporter) { try { return findImplementor(clazz, name, signature, isStatic); } catch (MissingClassException e) { bugReporter.reportMissingClass(e.getClassDescriptor()); return clazz; } catch (CheckedAnalysisException e) { bugReporter.logError("Error finding " + clazz + "." + name + signature, e); return clazz; } }
public FindBugsSummaryStats(BugReporter bugReporter) { this.stats = bugReporter.getProjectStats(); bugReporter.addObserver(this); }
Profiler profiler = bugReporter.getProjectStats().getProfiler(); profiler.start(this.getClass()); AnalysisContext.currentXFactory().canonicalizeAll(); bugReporter.getProjectStats().setReferencedClasses(referencedClassSet.size()); for (Iterator<AnalysisPass> passIterator = executionPlan.passIterator(); passIterator.hasNext();) { AnalysisPass pass = passIterator.next(); bugReporter.reportBug(new BugInstance("SKIPPED_CLASS_TOO_BIG", Priorities.NORMAL_PRIORITY) .addClass(classDescriptor)); bugReporter.finish(); bugReporter.reportQueuedErrors(); profiler.end(this.getClass()); if (PROGRESS) {
@Override public void reportMissingClass(ClassNotFoundException ex) { delegate.reportMissingClass(ex); }
@Override public void visitClassContext(ClassContext classContext) { if (!enabled()) { return; } JavaClass jClass = classContext.getJavaClass(); XClass xClass = classContext.getXClass(); try { if (!isJunit3TestCase(xClass)) { return; } if ((jClass.getAccessFlags() & Const.ACC_ABSTRACT) == 0) { if (!hasTestMethods(jClass)) { bugReporter.reportBug(new BugInstance(this, "IJU_NO_TESTS", LOW_PRIORITY).addClass(jClass)); } } directChildOfTestCase = "junit.framework.TestCase".equals(jClass.getSuperclassName()); jClass.accept(this); } catch (ClassNotFoundException cnfe) { bugReporter.reportMissingClass(cnfe); } }
reporter.getProjectStats().getProfiler().start(findbugs.getClass()); reporter.setPriorityThreshold(Detector.LOW_PRIORITY); findbugs.setBugReporter(reporter); findbugs.setDetectorFactoryCollection(
Profiler profiler = bugReporter.getProjectStats().getProfiler(); bugReporter.reportQueuedErrors(); throw e;
@Override public void setPriorityThreshold(int threshold) { delegate.setPriorityThreshold(threshold); }
@Override public ProjectStats getProjectStats() { return delegate.getProjectStats(); }
@Override public @CheckForNull BugCollection getBugCollection() { return delegate.getBugCollection(); } }
public ErrorCountingBugReporter(BugReporter realBugReporter) { super(realBugReporter); this.bugCount = 0; // Add an observer to record when bugs make it through // all priority and filter criteria, so our bug count is // accurate. realBugReporter.addObserver(bugInstance -> ++bugCount); }
@Override public void observeClass(ClassDescriptor classDescriptor) { delegate.observeClass(classDescriptor); }
@Override public void finish() { delegate.finish(); }
Profiler profiler = bugReporter.getProjectStats().getProfiler(); profiler.start(this.getClass()); AnalysisContext.currentXFactory().canonicalizeAll(); bugReporter.getProjectStats().setReferencedClasses(referencedClassSet.size()); for (Iterator<AnalysisPass> passIterator = executionPlan.passIterator(); passIterator.hasNext();) { AnalysisPass pass = passIterator.next(); bugReporter.reportBug(new BugInstance("SKIPPED_CLASS_TOO_BIG", Priorities.NORMAL_PRIORITY) .addClass(classDescriptor)); bugReporter.finish(); bugReporter.reportQueuedErrors(); profiler.end(this.getClass()); if (PROGRESS) {
@Override public void reportMissingClass(ClassDescriptor classDescriptor) { delegate.reportMissingClass(classDescriptor); }
reporter.getProjectStats().getProfiler().start(findbugs.getClass()); reporter.setPriorityThreshold(Detector.LOW_PRIORITY); findbugs.setBugReporter(reporter); findbugs.setDetectorFactoryCollection(
public FindBugsSummaryStats(BugReporter bugReporter) { this.stats = bugReporter.getProjectStats(); bugReporter.addObserver(this); }
Profiler profiler = bugReporter.getProjectStats().getProfiler(); bugReporter.reportQueuedErrors(); throw e;