#666 Too many duplicates

release_1.0
closed
nobody
None
5
2013-10-26
2011-12-12
No

The module "StrictDuplicateCode" finds too many duplicates in the case of identical lines repeated many times in a source file.

For example, if your have 81 identical lines in a file and you want to detect when at least 70 lines are repated, checkstyle will detect 70 duplicated lines and 71, 72, 73, 74, 75, 76, 77, 78, 79 and 80. I believe that checkstyle should detect 0 duplicated lines in that case. If you consider a file where all lines are identical and you have set to 70 the minimum of lines duplicated, that file shoul dhave at least 140 lines for checkstyle to report it.

See the attached files for the example and the configuration file.

Discussion

  • Roman Ivanov
    Roman Ivanov
    2013-10-26

    That Check need to be rewritten - it is not ideal, or I fear to say this but is useless,

    if you want smth to be solved, please provide on github code that should not raise problem, and discussion should be started at https://github.com/checkstyle/checkstyle/issues .

     
  • Roman Ivanov
    Roman Ivanov
    2013-10-26

    • status: open --> closed
    • Group: --> release_1.0