3847 FindBugs-IDEA Tools integration 19 Andre Pfeiler 4.5 548613 andrep merz 2016-10-16 1.0.1

FindBugs-IDEA

Compatible with:  IntelliJ IDEA Android Studio
16.10.2016
548 613
The FindBugs plugin for IntelliJ IDEA
Provides static byte code analysis to look for bugs in Java code from within IntelliJ IDEA. FindBugs is a defect detection tool for Java that uses static analysis to look for more than 200 bug patterns, such as null pointer dereferences, infinite recursive loops, bad uses of the Java libraries and deadlocks. FindBugs can identify hundreds of serious defects in large applications (typically about 1 defect per 1000-2000 lines of non-commenting source statements). The name FindBugs™ and the FindBugs logo are trademarked by The University of Maryland. As of July, 2008, FindBugs has been downloaded more than 700,000 times. FindBugs-IDEA uses FindBugs™ under the hood. For more information see http://findbugs.sourceforge.net/.

..."We use IDEA inspections and FindBugs complementary. FindBugs is running in our continuous integration process and IDEA inspections are used during coding." What about using both during coding from within IntelliJ IDEA?

FindBugs-IDEA plugin features:

  • FindBugs 3 support
  • Quickfix: annotate, suppress findbugs patterns (GutterIcon and document markup (alt+enter))
  • idea 13.0 until the latest 15 EAP compatibility
  • configure findbugs on idea project and module level
  • jump to source from results shown in toolwindow including anonymous classes
  • bug descriptions, solutions
  • run analysis always in background
  • run findbugs analysis on all affected files after compile/automake
  • min. priority to report
  • background scanning
  • configurable effort run level
  • configurable detectors
  • bug categories to report
  • file filter (include, exclude, exclude baseline bugs)
  • load additional detector plugins like fb-contrib.jar
  • group results by: bug category, classname, package, priority, bug rank
  • intellij local history support
  • quick search within the result tree
  • basic Scala, Groovy and AspectJ support
  • Analyze actions (all actions are also available in the intellij project tree, toolbar menu, context menu):
    • analyze all modified files
    • analyze all files on the active changelist (available from FindBugs-IDEA main ToolWindow and the ChangelistToolWindow)
    • analyze class under cursor
    • analyze current editor file
    • analyze all files of an intellij project
    • analyze all files of an intellij module
    • analyze all files of the selected package
    • analyze a bunch of selected files (project tree)
    • analyze a scope
  • export a bug collection to html and/or xml with limited configurable dir based archive support
  • import a bug collection from xml
  • configurable : open an exported bug collection html page in the intellij configured browser
  • configurable : preview found bugs in an editor preview panel

Download plugin

Recent change notes

1.0.1
  • Issue 146: Support minimum rank
  • Issue 154: Fix possible classloader issue with dom4j
  • Issue 157: Fix possible ISE caused by after-compile hook
  • Issue 172: Fix possible ISE caused by Search Everywhere
  • Issue 176: Fix illegal toolwindow access outside EDT
  • Plugin compatibility: IDEA 15, IDEA 2016, Android Studio 2.2
1.0.0
  • Issue 129: Fix possible ISE caused by LineMarker
  • Issue 132: Fix issue with file-based IDEA project (.ipr) with IDEA 15
  • "Run analyze before commit" should only run when activated
  • Improved error submitter
0.9.999
  • Issue 112: Support test sources
  • Issue 116: Support run analyze before commit
  • Issue 120, 122, 126: Fix possible NPE
  • Issue 121: Fix bug in legacy settings converter
  • Issue 124: Fix possible ClassCastException caused by ShowQuickSearch
  • Issue 128: Fix possible ClassCastException caused by Abstract*Action
0.9.998
  • Issue 48, 108, 114, 118: UI settings rewrite
  • Note that the settings format was changed. The old format is still supported.
  • Issue 68: Introduce custom error report submitter
  • Issue 106: Improved error handling/feedback
  • Issue 115: Analyze per module
  • Issue 116: Compile before run analyze (enabled by default)
  • Issue 10, 111, 117: Minor fixes, cleanups and improvements
  • Update bundled custom plugins: fb-contrib 6.6.1 and find-sec-bugs 1.4.4
  • Note that IDEA must run with >= JRE 1.7 to use fb-contrib 6.6.1
  • Plugin compatibility: IDEA 15, IDEA 2016, Android Studio 2.1
  • Note that IDEA 13 and 14 is no longer supported
0.9.997
  • Issue 97: HiDPI improvements (incomplete, icons)
  • Issue 99: fix possible NPE
  • Issue 100: configurable notification
  • Issue 101: delaying auto-analyze after auto-compile by 30 seconds (default)
  • Issue 102: make deployment of bundled custom plugins more stable
  • Update bundled custom plugins: fb-contrib 6.2.1 and find-sec-bugs 1.4.1
  • Plugin compatibility: IDEA 13.0 (133.193) until the latest IDEA 15 EA (142.3230.1)
  • Minor fixes, cleanups and improvements
0.9.996
  • Bundle with patched FindBugs 3.0.1 (compiled with JDK 6)
  • Issue 79: fix possible AE on "Suppress for class"
  • Issue 90: fix open maven project (POM file)
  • Issue 91: make BugInstance.writeXML more robust (patched FindBugs)
  • Issue 92: fix possible NPE on regroup while analysis is running
  • Issue 95: fix error caused by TypeQualifier detector (patched FindBugs)
  • Update bundled custom plugin find-sec-bugs 1.4.0
  • Plugin compatibility: IDEA 13.0 (133.193) until the latest IDEA 14 EA (141.498.1)
  • Minor fixes, cleanups and improvements
0.9.995
  • Bundle with FindBugs 3.0.1-rc2 compiled with JDK 6
  • Issue 31: X-button should clear UI
  • Issue 78: avoid assertion error
  • Issue 87: support -Didea.is.internal=true
  • Support analyze after auto make (replacement for the inspection)
  • Basic Scala, Groovy and AspectJ support
  • Update bundled custom plugin find-sec-bugs 1.3.0
  • Plugin compatibility: IDEA 13.0 (133.193) until the latest IDEA 14 release (140.2683.2)
  • Note that IDEA 12.x is no longer supported
  • Minor fixes, cleanups and improvements
0.9.994
  • Bundle with FindBugs 3.0.1 EAP (Rev. 11189b911ff3) compiled with JDK 6
  • Issue 77
  • Update bundled custom plugins: fb-contrib 6.0.0 and find-sec-bugs 1.2.1
  • Plugin compatibility: IDEA 12.1.4 (129.713) until the latest IDEA 14 release (139.224)
0.9.993
  • Bundle with FindBugs 3.0.0
  • Issue 51
  • Issue 62
  • Issue 63
  • Issue 64
  • Issue 65
  • Bundled with custom plugins: findbugs-for-android 0.5, fb-contrib 5.2.1 and find-sec-bugs 1.2.0
  • Minor fixes, cleanups and improvements
  • Plugin compatibility: IDEA 12.1.4 (129.713) until the newest IDEA 13 release 13.1.3 (135.909) inclusive the latest EAP 13.1.4 (135.1146) and 14 (138.777)
0.9.992
  • Issue 46: support import findbugs settings from sonar profile xml
  • Issue 50: bundle with findbugs 2.0.3
  • Issue 52: Fix NPE and make element visitor more defensive
  • Issue 55: new default SuppressFBWarnings
  • Issue 56: disable "Analyze Package" action on invalid VirtualFile selection (f.e module directory selected)
  • Minor cleanups and improvements
  • Plugin compatibility: IDEA 12.1.4 (129.713) until the newest IDEA 13 release 13.0.2 (133.969) inclusive the latest EAP 13.1 (134.1160)
0.9.991
  • Issue 29: annotation color: do not change foreground and background - make only use of effect color and effect type (dark color theme problems)
  • Issue 41: compilemanager fixed (after hook idea 12)
  • some cleanups
  • Issue 47: New "Analyze Scope" action
  • IDEA 13 RC3 (133.162) compatibility (builds/works with 129.713 too)
0.9.99
  • mainly and many UI fixes/adaptations for the dark side of idea
  • some release management stuff
  • thanks to Reto Merz for contributing lot of fixes, enhancements and compatibility issues fixes
  • Issue 25
  • apply patch Issue 29 (settings panel) contributed by simon@billingsley.me.uk
  • apply patch Issue 38 IntelliJ FileChooser (dark theme osx) contributed by
0.9.98
  • thanks to Reto Merz for contributing lot of fixes, enhancements and compatibility issues fixes
  • removed idea8 compatibility
  • for details see revision: r201 - r219
  • import/export plugins findbugs settings
  • make plugin searchable
0.9.97
  • findbugs-2 support
  • Quickfix: annotate, suppress findbugs patterns
  • idea 9 until idea 12 compatibility
0.9.96
  • JumpToSource now works for anonymous classes (per default findbugs does not report any source line annotation for anonymous classes)
  • add preview support: preview bug in source file (Preview panel inside toolwindow)
  • add import bug collection from xml
  • export a bug collection to html and/or xml with limited configurable dir based archive support
  • fix export (xml, html)
  • fix Issue 14 (Inspection ID must satisfy [a-zA-Z_0-9.]+ pattern)
  • fix exclude- include filter settings and exclude base line bugs
  • fix issue 15 IDEA hangs when user closes FindBugs tab.
  • add persistence action states (scrollTosource, GroupBy, preview)
  • add bug pattern abbr to bug pattern result explanation view matching preference bug pattern category
  • configurable : open an exported bug collection html page in the intellij configured browser
  • configurable : default export dir
  • some performance improvements (non blocking Grouping and JavaPsiFacade.getInstance(...).findClass)
0.9.95
  • add export (xml html)
  • fix possible npe (balloontip)
  • add support for directory based config format
  • made openjdk-7 compatible
  • apdated some deprecated usages
0.9.94
  • fixed ClassCastException (unregister ChangelistAction)
0.9.93
  • fixed AbstractMethodError due to API change (ChangeListListener)
0.9.92
  • initialize default properties on run if empty
  • configurable: analyze affected files after compile
0.9.91
  • maybe fix init default properties on first init
  • show settings dialog (no configured detectors, categories)
  • rename all target (build.xml)
  • configurable activate tool window on analyzis run property
0.9.9
  • time to configure ... treated some configuration options:
  • configure findbugs on idea project and module level
    •  min. priority to report
    •  background scanning
    •  configurable effort run level
    •  configurable detectors
    •  bug categories to report
    •  file filter (include, exclude, exclude baseline bugs)
    •  load additional detector plugins like fs-contrib.jar
  • updated findbugs under the hood to version 1.3.9
  • new action: run analysis on all changed files of the the active (selected) changelist (findbugs-idea toolwindow and changelist toolwindow)
  • new action: group by bug rank
0.9.84-dev
  • refix [Issue #4] jump to source not working in win environments
  • updated findbugs under the hood to version 1.3.8
  • add findbugs bug pattern running as inspection (note: this is an experimental feature, quickfix (FindBugs.SuppressWaring()) is not fully/finally implemented)
0.9.83-dev
  • some minor fixes
  • fix again [Issue #7] Exception while navigating results tree
0.9.82-dev 0.9.81-dev 0.9.31-dev 0.9.30-dev 0.9.21 0.9.2 0.9.1

General usage instructions

See article at DZone: http://jetbrains.dzone.com/tips/intellij-idea-finds-bugs
20.09.2016
EXCELLENT!! Intellij's (2016.3) inspection told me mehtod is too complex to analyze and did not any analyzation. I didn't know if too complex to analyze then do not any check like assign to null object. Fianally my code made error cause of null conditions!!! It was very simple code to figure out. (List list = null ; list.add("a"); ) So I tried to improve about it. But jetbrain told me 'Yes. just too complex to analyze so didn't find it.' that's all!!! But this plug-in detected it VERY WELL. Thank you very much!
23.09.2015
This is a good plugin, but it lacks polish. Also, a couple of features are missing: 1) select minimum RANK to report (as well as confidence/priority) 2) enable report creation even when zero bugs were found.
Anonymous
10.04.2015
findbugs 0.9.996 with ideaj 14 doesn't work. Even I click in class and ask to analyze it gives me "found 0 bugs in 0 classes"
12.01.2015
Works with intellij 14 64 bit version
Anonymous
29.10.2014
do not work with intellij 14 64 bit version
Anonymous
08.07.2014
The JRE that IntelliJ runs under in Mac OS X can be changed by modifying IntelliJ.app/Content/Info.plist: JVMVersion 1.6* IntelliJ on 1.8 seems to work on my system, but presumably there is a reason why JetBrains still runs under 1.6 on OS X by default, so there may be issues.
08.07.2014
0.9.992 was bundled with Findbugs 2.0.3 which run with JRE 1.6. 0.9.993 is bundled with FindBugs is 3.0.0 which needs at least JRE 1.7, see http://findbugs.sourceforge.net/ So we can not really fix this because the plugin run within the IDEA JRE. This should only be a problem for OS X users because IDEA OS X version is still bundled with JRE 1.6 (contrary to the windows and unix version), for more details see http://youtrack.jetbrains.com/issue/IDEA-126360 There is also a link to an OS X IDEA version bundled with JRE 1.7. Bill Pugh says: "For people who need to run FindBugs using a Java 5 or 6 runtime, you should stick with the FindBugs 2.0 branch." ( https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2014-July/004029.html ) So if you plan to run IDEA with JRE 1.6 download version 0.9.992 (click "show all updates")
Anonymous
08.07.2014
The 0.9.993 crashes with with the IntelliJ 13.1.3 community edition due to "Unsupported major.minor version 51.0". Don't update yet.
Anonymous
01.06.2014
Does this the latest version 0.9.922 support the latest IDEA which build is 135.909? If it does, why I run it always show that "no class files found" ? Thanks.
Anonymous
05.12.2013
great... works like charm with IDEA 13
19.08.2013
work in progress. in the settings press show advanced settings, the annotations-tab for color config etc. is already there but not functional.
18.08.2013
It's a great plugin, but it really needs move the hardcoded BLACK font to the settings dialog from http://code.google.com/p/findbugs-idea/source/browse/trunk/src/src/impl/org/twodividedbyzero/idea/findbugs/gui/editor/BugAnnotator.java?r=203 It's possible to edit/compile it and update the JAR as a workaround, but it's no good
Anonymous
30.07.2013
Is it possible to import settings from URL, like http://some-settings.xml?
Anonymous
27.03.2013
Plesse file a bug
26.03.2013
None of the buttons work; they all produce this error message: 5:51:28 PM NoSuchMethodError: Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(743,31),absolute(743,53),button=1,modifiers=Button1,clickCount=1] on frame2: com.yourkit.util.Asserts.notNull(Ljava/lang/Object;)V I'm using IDEA 12.1 EAP (build 129.60, the latest).
Please  sign in  to leave a comment.