Findbugs, PMD and CheckStyle

Findbugs, PMD and CheckStyle – These are static code analysis tools which are widely used in JAVA development. Each of them is mainly targeting a certain type of coding rules : Checkstyle for “conventions”, PMD for “bad practices” and Findbugs for “potential bugs”.


– finds bugs in JAVA byte code. It finds the real defects. It is very fast because of byte code. It helps us to detect what is not clearly visible in the code and understand why sequences of code leads to potential bugs. Example: Synchronization and Boolean could lead to deadlock.

Findbugs is a kind of analyst for our source code.


– looks for potential problems, possible bugs, unused and sub-optimal code and over-complicated expressions in the Java source code. Bad practices type consists of well known behaviors that almost systematically lead to difficulties over time.
Examples: too many complex methods, direct uses of implementation rather via interfaces and unwantedly catching exceptions.

PMD always looks over your shoulder to remind you of bad practices.


– scans source code and looks for coding standards, e.g. the Sun Code Conventions, JavaDoc. It covers naming, comments and format conventions.

Examples: Is there javadoc on public methods?, Is the code written with a consistent format?

NOTE: This article is not completed, will come up with more soon… 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: