Tuesday, June 19, 2007

Java F/OSS (Free/Open Source Software) Tools for Source Code Optimization and Analysis

Java F/OSS (Free/Open Source Software) Tools for Source Code Optimization and Analysis

Below is a list of some tools that can help you examine your Java source code for potential problems:

1. PMD from http://pmd.sourceforge.net/
License: PMD is licensed under a "BSD-style" license

PMD scans Java source code and looks for potential problems like:

* Possible bugs - empty try/catch/finally/switch statements
* Dead code - unused local variables, parameters and private methods
* Suboptimal code - wasteful String/StringBuffer usage
* Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
* Duplicate code - copied/pasted code means copied/pasted bugs

You can download everything from here, and you can get an overview of all the rules at the rulesets index page.

PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.

2. FindBug from http://findbugs.sourceforge.net
License: L-GPL

FindBugs, a program which uses static analysis to look for bugs in Java code. And since this is a project from my alumni university (IEEE - University of Maryland, College Park - Bill Pugh) , I have to definitely add this contribution to this list.

3. Clover from http://www.cenqua.com/clover/
License: Free for Open Source (more like a GPL)

Measures statement, method, and branch coverage and has XML, HTML, and GUI reporting. and comprehensive plug-ins for major IDEs.

* Improve Test Quality
* Increase Testing Productivity
* Keep Team on Track

  • Fully integrated plugins for NetBeans, Eclipse , IntelliJ IDEA, JBuilder and JDeveloper. These plugins allow you to measure and inspect coverage results without leaving the IDE.
  • Seamless Integration with projects using Apache Ant and Maven. * Easy integration into legacy build systems with command line interface and API.
  • Fast, accurate, configurable, detailed coverage reporting of Method, Statement, and Branch coverage.
  • Rich reporting in HTML, PDF, XML or a Swing GUI
  • Precise control over the coverage gathering with source-level filtering.
  • Historical charting of code coverage and other metrics.
  • Fully compatible with JUnit 3.x & 4.x, TestNG, JTiger and other testing frameworks. Can also be used with manual, functional or integration testing.
4. Macker from http://innig.net/macker/
License: GPL

Macker is a build-time architectural rule checking utility for Java developers. It's meant to model the architectural ideals programmers always dream up for their projects, and then break -- it helps keep code clean and consistent. You can tailor a rules file to suit a specific project's structure, or write some general "good practice" rules for your code. Macker doesn't try to shove anybody else's rules down your throat; it's flexible, and writing a rules file is part of the development process for each unique project.

5 EMMA from http://emma.sourceforge.net/
License: EMMA is distributed under the terms of Common Public License v1.0 and is thus free for both open-source and commercial development.

Reports on class, method, basic block, and line coverage (text, HTML, and XML).

  • EMMA can instrument classes for coverage either offline (before they are loaded) or on the fly (using an instrumenting application classloader).

  • Supported coverage types: class, method, line, basic block. EMMA can detect when a single source code line is covered only partially.

  • Coverage stats are aggregated at method, class, package, and "all classes" levels.

  • Output report types: plain text, HTML, XML. All report types support drill-down, to a user-controlled detail depth. The HTML report supports source code linking.

  • Output reports can highlight items with coverage levels below user-provided thresholds.

  • Coverage data obtained in different instrumentation or test runs can be merged together.

  • EMMA does not require access to the source code and degrades gracefully with decreasing amount of debug information available in the input classes.

  • EMMA can instrument individial .class files or entire .jars (in place, if desired). Efficient coverage subset filtering is possible, too.

  • Makefile and ANT build integration are supported on equal footing.

  • EMMA is quite fast: the runtime overhead of added instrumentation is small (5-20%) and the bytecode instrumentor itself is very fast (mostly limited by file I/O speed). Memory overhead is a few hundred bytes per Java class.

  • EMMA is 100% pure Java, has no external library dependencies, and works in any Java 2 JVM (even 1.2.x).

6. XRadar from http://xradar.sourceforge.net/
License: BSD (me thinks)

The XRadar is an open extensible code report tool currently supporting all Java based systems. The batch-processing framework produces HTML/SVG reports of the systems current state and the development over time - all presented in sexy tables and graphs.

The XRadar gives measurements on standard software metrics such as package metrics and dependencies, code size and complexity, code duplications, coding violations and code-style violations.

7. Hammurapi from Hammurapi Group
License: (if anyone knows the license for this email me Venkatt.Guhesan at Y! dot com)

Hammurapi is a tool for execution of automated inspection of Java program code. Following the example of 282 rules of Hammurabi's code, we are offered over 120 Java classes, the so-called inspectors, which can, at three levels (source code, packages, repository of Java files), state whether the analysed source code contains violations of commonly accepted standards of coding.

Relevant Links:
http://en.sdjournal.org/products/articleInfo/93
http://wiki.hammurapi.biz/index.php?title=Hammurapi_4_Quick_Start

8. Relief from http://www.workingfrog.org/
License: GPL

Relief is a design tool providing a new look on Java projects. Relying on our ability to deal with real objects by examining their shape, size or relative place in space it gives a "physical" view on java packages, types and fields and their relationships, making them easier to handle.




If anyone has other tools that they would like to add to this list or would like to add additional comments to the list above, please feel free to send me an email at Venkatt.Guhesan at y! dot com

I hope you find this list useful...

Venkatt Guhesan

20 comments:

Laurent Delaigue said...

Nice list, though I suspect it could be much longer ;-)
I'd just like to mention the Code Analysis Plugin which I've been using for a while in my development projects, I find it very useful, simple and clean. Its home page is at:
http://cap.xore.de/

Pointless Researcher said...

I miss Checkstyle and Cobertura from the list but found a couple I didn't know previously. Good work.

Anonymous said...

I'm the sort of guy who passions to try fresh stuff. Presently I am constructing my private solar panels. I'm managing it all by myself without the aid of my men. I'm using the internet as the only way to acheive that. I came across a very awesome website which explains how to build solar panels and wind generators. The place explains all the steps involved in photovoltaic panel construction.

I'm not exactly sure about how accurate the data given there iz. If some people over here who had xp with these things can have a see and give your feedback in the page it will be great and I'd extremely treasure it, cauze I extremely would love to try [URL=http://solar-panel-construction.com]solar panel construction[/URL].

Tnx for reading this. You people are great.

Anonymous said...

[B]NZBsRus.com[/B]
Dismiss Laggin Downloads With NZB Downloads You Can Easily Find HD Movies, Games, MP3 Albums, Software and Download Them @ Alarming Speeds

[URL=http://www.nzbsrus.com][B]NZB[/B][/URL]

Anonymous said...

Hey,

When ever I surf on web I come to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]Lots of good information here mythinkpond.blogspot.com. Let me tell you one thing guys, some time we really forget to pay attention towards our health. In plain english I must warn you that, you are not serious about your health. Research shows that almost 80% of all United States adults are either fat or overweight[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Therefore if you're one of these people, you're not alone. In fact, most of us need to lose a few pounds once in a while to get sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is not like piece of cake. Some improvement in of daily activity can help us in losing weight quickly.

About me: I am writer of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also mentor who can help you lose weight quickly. If you do not want to go under painful training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for quick weight loss.

Anonymous said...

It isn't hard at all to start making money online in the hush-hush world of [URL=http://www.www.blackhatmoneymaker.com]blackhat blog[/URL], Don’t feel silly if you don't know what blackhat is. Blackhat marketing uses little-known or misunderstood ways to generate an income online.

cialis said...

Interesting article, added his blog to Favorites

stories of young girl forced sex said...

The heavy setowner comes from the back and says so this is the girl who gets thatfine tatoo. My wife thought for a second, then asked whatstrings are attached.
horse porn stories
bisexual stories nifty
young girls older men sex stories
spanking stories free
sex stories adult horses
The heavy setowner comes from the back and says so this is the girl who gets thatfine tatoo. My wife thought for a second, then asked whatstrings are attached.

free true gay daddies sex stories said...

The other problem was that Melvin and I wanted more than one child,and we had wanted them close in years of age, but nature played byits own rules. He keeps wanting tostand up to pee, and when he forgets it just rubs it in.
free adult movies stories
teen masturbation games and stories
fat gay men stories
janes sex stories
stories of girls first masturbation
The other problem was that Melvin and I wanted more than one child,and we had wanted them close in years of age, but nature played byits own rules. He keeps wanting tostand up to pee, and when he forgets it just rubs it in.

baby girl names said...

Great blog. A very interesting post. Thanks for sharing with us!

epilepsy medication said...

Very helpful post. Thanks!

Anonymous said...

Ambulance Perspectives, we feature David Manzer. David is the [url=http://www.abacusnow.com/nfl.html]Discount NFL jerseys[/url] necessary accessories for your mower, you might as well not have [url=http://www.abacusnow.com/jpmoncler.htm]モンクレール ベスト[/url] Tibetan Rites. You can watch a demonstration on how to do them [url=http://www.abacusnow.com/beatsbydre.html]beats by dre[/url] a larger audience for a small fraction of traditional advertising
somebody is on their side to make sure their rights are protected. [url=http://www.abacusnow.com/michaelkors.html]michael kors bags[/url] sure youe memorized the strategy chart. If you don count, you [url=http://www.abacusnow.com/jpmoncler.htm]monclerダウン[/url] your legal practice to representing homeschooling families? [url=http://www.abacusnow.com/michaelkors.html]Michael Kors outlet[/url] they marveled at its size and at how easy it was to carve. From
gas offshore. Without a doubt, organizations which are producing [url=http://www.abacusnow.com/michaelkors.html]http://www.abacusnow.com/michaelkors.html[/url] population consisting of street scum ,whores and cutthroats, [url=http://www.abacusnow.com/nfl.html]http://www.abacusnow.com/nfl.html[/url] passing caller identification ("Caller ID") to the receiver of [url=http://www.abacusnow.com/beatsbydre.html]cheap beats by dre[/url] a mower jack because theyve already spent so much on the mower

Anonymous said...

Hey there, You have done an incredible job. I will definitely digg it and personally
suggest to my friends. I am confident they will be benefited
from this web site.

my web blog :: コーチメンズバッグ

Anonymous said...

This paragraph is really a fastidious one it assists new net visitors, who are wishing
in favor of blogging.

My web site; ミュウミュウ店舗

Anonymous said...

We're a group of volunteers and starting a new scheme in our community. Your web site provided us with valuable information to work on. You've done a
formidable job and our whole community will be thankful
to you.

Also visit my web-site :: クリスチャンルブタン

Anonymous said...

Hi there would you mind stating which blog platform you're using? I'm going
to start my own blog soon but I'm having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I'm looking
for something completely unique.
P.S My apologies for being off-topic but I had to ask!


Also visit my web site - コーチ 財布

Anonymous said...

Great web site you have here.. It's hard to find high-quality writing like yours nowadays. I honestly appreciate people like you! Take care!!

my blog: chloe バッグ

Anonymous said...

How many times have you felt the sole of the new pair of trainers just split
in order to? You can plus follow the Mansfield Animal
Advocacy Examiner on Facebook. Caring for your hunter wellingtons is easy just as
one, two, some. Use them with a short knitted dress or maybe a with your
denim pants. http://www.elephantcrowd.com/blogs/227702/178308/just-how-to-clean-ugg-boots-corr

Anonymous said...

Offer people benefits to complete your ultimate survey.
Is preferable to just paul smith shirts males outstanding and higher preferred?

In 1987 the designer additional his clothes on American market
under his own logo. But then, simply do deer and after that other game.
http://angeleyestuts.an.funpic.de/4images/details.

php?image_id=162&sessionid=e732e40a26aff46583ee2d2e6446d073

Anonymous said...

So, it was previously definitely nice to see a vary in colour
blends. He wore a sexy fur vest, packing a pistol of all pure gold.
These techniques should also make you are deer hunt the actual richer experience.

Of 1968, the androgynous hippie look was at style. http://tit-association.
eu/~tit/wiki/index.php/Utilisateur:ClarissaL

my site: men's paul smith shoes