Automated Source Code Processing

There's a tool called PMD that lets you do all sorts of nifty things to java code, looking for possible bugs, dead code, suboptimal code and overcomplicated expressions. Unfortunately (or fortunately), I don't code in Java, but there is an additional tool in the set, CPD which let's you find duplicate code sections.

Duplicate code sections are bad, because if you copy and paste something, and there's a bug, then you've copied the bug which might get missed in a bugfix. But all seasoned coders know such things. I always remember the phrase "Code duplication is an error.", and sometimes I even pay attention to it ;-).

The good thing about CPD is it works with C, C++, Java, JSP and PHP, so it should be a worthy tool to add to a programmers collection.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h4>
  • Lines and paragraphs break automatically.

More information about formatting options