Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 41400 invoked from network); 23 Jun 2006 15:09:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jun 2006 15:09:40 -0000 Received: (qmail 13662 invoked by uid 500); 23 Jun 2006 15:09:39 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 12915 invoked by uid 500); 23 Jun 2006 15:09:37 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 12901 invoked by uid 99); 23 Jun 2006 15:09:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jun 2006 08:09:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of anton.luht@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jun 2006 08:09:37 -0700 Received: by ug-out-1314.google.com with SMTP id q2so377142uge for ; Fri, 23 Jun 2006 08:09:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZzSHnYRPR1XAY4jxBD2SKcDEiHXPcQzbnKCdGYMCsivfrVnyDiFBwVAkFPeKG7jx0EStTgt0CVF0ixTSJfJ/Ud/XJR0T79PzbL/FQJIxYge4QbWlib0cTwP8f9v5l0z11VMBVeAn5J5ZQtYd56CEq0sBEOMNKVyGtRTHuu3QVjQ= Received: by 10.78.164.13 with SMTP id m13mr1307133hue; Fri, 23 Jun 2006 08:09:15 -0700 (PDT) Received: by 10.78.46.19 with HTTP; Fri, 23 Jun 2006 08:09:15 -0700 (PDT) Message-ID: Date: Fri, 23 Jun 2006 19:09:15 +0400 From: "Anton Luht" To: harmony-dev@incubator.apache.org Subject: Fwd: [jira] Created: (HARMONY-652) Remove code duplicates In-Reply-To: <20832075.1151073510664.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20832075.1151073510664.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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) 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