Over a million developers have joined DZone.

Save your reputation, eliminate non-Java bugs

· Java Zone

Discover how AppDynamics steps in to upgrade your performance game and prevent your enterprise from these top 10 Java performance problems, brought to you in partnership with AppDynamics.

Recently, when we talked about Static Code Analysis, I made a promise to come back with some more examples on how to find bugs automatically in non-Java code. We've seen already how static code analysis engines parse your code into an Abstract Syntax Tree (AST) and then search for known bug patterns in that AST. They can help you either on-demand to provide an interactive colorful report, or on-the-fly, while you edit the code, shape it, refactor and polish.

A natural demand once you get addicted to having your code inspected automatically is to obtain the same assistance outside of the Java code.

I don't know your exact situation, but chances are high that a great deal of the code on your Java projects these days is written in other languages. Think of all the JavaScript code out there, XML documents, HTML pages, SQL or HQL queries, CSS definitions or plain property files, not mentioning the increasing number of Groovy, Ruby and Scala files. Or Clojure anyone?

What a limitation it would be for a tool if it ignored such a large portion of your code-base and let you suffer without any help!

In IntelliJ IDEA, a great deal of the bug patterns in the database target non-Java languages.

So you can search for bugs in JavaScript,

tune your HTML,

fix CSS,


improve Hibernate queries

or type Groovy without fear.

The list of supported technologies obviously doesn't end here, but you've seen enough to get an idea. Being able to spot such problems in code can be virtually a life-saver.

The last important point to mention here. You might have noticed that Static Code Analysis in non-Java code feels exactly the same as in Java code. Same markers, behavior and keyboard shortcuts. Don't waste time learning the tool, just straight use it.


The Java Zone is brought to you in partnership with AppDynamics. AppDynamics helps you gain the fundamentals behind application performance, and implement best practices so you can proactively analyze and act on performance problems as they arise, and more specifically with your Java applications. Start a Free Trial.


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}