harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht" <anton.l...@gmail.com>
Subject Fwd: [jira] Created: (HARMONY-652) Remove code duplicates
Date Fri, 23 Jun 2006 15:09:15 GMT
Good day,

PMD [1] has found lots of code duplicates in Harmony codebase. Of
course this is not a big problem but something that is a good
candidate for refactoring. The worst thing in copy-paste is that when
one of the copies modified (enhancement, bug fix, etc), others remain
unchanged which causes annoying deja vu bugs.

PMD also can find different kind of problems in code [2], for example
- empty try, catch, finally, synchronized blocks
- missing super...() calls where appropriate
- sun.* imports
- reassigning values to parameters

Maybe it's worth to select a set of rules that seem useful and check
code from time to time. Maybe it's worth to use not PMD but another
static analyzer.

[1] http://pmd.sourceforge.net/
[2] http://pmd.sourceforge.net/rules/index.html


-- 
Regards,
Anton Luht,
Intel Middleware Products Division

---------- Forwarded message ----------
From: Anton Luht (JIRA) <jira@apache.org>
Date: Jun 23, 2006 6:38 PM
Subject: [jira] Created: (HARMONY-652) Remove code duplicates

Remove code duplicates
-----------------------

        Key: HARMONY-652
        URL: http://issues.apache.org/jira/browse/HARMONY-652
    Project: Harmony
       Type: Improvement

Components: VM, Classlib
   Reporter: Anton Luht
   Priority: Minor
Attachments: pmd_results_nodupfiles.tgz

Checking source code of Harmony (rev. 416328) using Copy/Paste
detector included in PMD [1] revealed that some blocks of code are
copy-pasted. Most of copy-paste issues were found in tests.

I've searched copy-paste insde each module, not trying to find out if
there are similar pieces of code across modules.

The results of the scan are attached.

[1] http://pmd.sourceforge.net/

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
  http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
  http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message