HomeОбразованиеRelated VideosMore From: Philip Starritt

Java Clean Code Tutorial #2 - Static Analysis FindBugs Eclipse Plugin Setup

74 ratings | 7799 views
Episode 2 of the free Java Clean Code Training Series. In this tutorial I show you how to download and install the static analysis tool FindBugs and run it against your Java Programs in Eclipse or Spring Tool Suite. Findbugs looks for and identifies bugs in Java Programs. It is based on the concept of bug patterns. A bug pattern is a code idiom that is often an error. Findbugs will search for over 200 bug patterns in your code. Bug patterns arise for a variety of reasons: - Difficult language features - Misunderstood API methods - Misunderstood invariants when code is modified during maintenance - Garden variety mistakes: typos, use of the wrong boolean operator, dead code etc FindBugs uses static analysis to inspect Java bytecode for occurrences of bug patterns. Static analysis means that FindBugs can find bugs by simply inspecting a program's code: executing the program is not necessary. This makes FindBugs very easy to use: in general, you should be able to use it to look for bugs in your code within a few minutes of downloading it. Running findbugs will certainly help you write cleaner code by helping to identify bugs, typos, dead code or simple generic coding mistakes. I treat static analysis tools as first class citizens and always execute on my code, regardless if its fun home code or serious production code. Why clean code? Simple. Clean code allows us to confidently make changes and deliver more features quickly to our customers. Don’t forget to subscribe for your regular dose of Java Tutorials! STOP THE ROT. See you in episode 3, Philip http://findbugs.sourceforge.net/factSheet.html
Html code for embedding videos on your blog
Text Comments (8)
Marek Andreánsky (4 months ago)
It seems FindBugs was replaced with SpotBugs, even the official Eclipse plugin page now referring to it as it's successor. https://marketplace.eclipse.org/content/spotbugs-eclipse-plugin https://spotbugs.github.io/
Akash Sharma (2 years ago)
Thank you Philip :)
Philip Starritt (1 year ago)
Your welcome Akash
Smruthi M G (2 years ago)
Hi Phil, any idea what could be the problem if the find bugs option doesn't show up when you right click on the project? i have eclipse neon, java 8 and jre 1.8. Thank you!
ahmed henteti (2 years ago)
Thank you
Hông-Viêt Lê (2 years ago)
I prefer the new SonarLint plugin : - http://www.sonarlint.org/eclipse/ - contains rules from multiple repositories (including findbugs) - may be connected with a SonarQuber server thanks for all the other tutorials you've made so far :)
Josemalyson Oliveira (2 years ago)
Very cool the video, waiting the next.
Philip Starritt (2 years ago)
Josemalyson Antonio tonight Josemalyson, it will be Late PM GMT.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.