From b297bb366a543eb6d0bcd1af29bee9986ada4ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=BChne?= Date: Sun, 9 Jan 2005 13:24:02 +0000 Subject: [PATCH] improved intro blurb --- .../tools/checkstyle/checks/duplicates/package.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/package.html b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/package.html index e4b5e21a4..60800ece1 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/package.html +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/package.html @@ -1,6 +1,11 @@ -Duplicate code detection. +

+Duplicate code detection allows you to find +code that has been generated by Copy/Paste programming. Duplicate code typically +leads to higher maintainance cost because bugs will need to be fixed twice, +more code needs to be tested, etc. +

There are many trade-offs when writing a duplicate code detection tool. Some of the conflicting goals are: @@ -8,12 +13,12 @@ Some of the conflicting goals are:

  • Fast
  • Low memory usage
  • Avoid false alarms
  • -
  • Support multiple/arbitrary languages
  • +
  • Support multiple/arbitrary languages (Java, JSP, C++, ...)
  • Support Fuzzy matches (comments, whitespace, linebreaks, variable renaming, etc.)
  • -StrictDuplicateCodeCheck is fast enough to facilitate checking very large code +The check provided here, StrictDuplicateCode, is fast enough to facilitate checking very large code bases in acceptable time (minutes). It consumes very little memory, false alarms are not impossible but a really rare case. While it supports multiple languages it does not support fuzzy matches (that's why it's called Strict).