Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12738

Dry Plugin reports code duplicates twice

    Details

    • Similar Issues:

      Description

      I have used CPD to detect duplicate codes in my project and Dry plugin is used. The plugin is reporting the duplicate codes , but it reports twice for a duplicate code-snippet. I have attached the screenshot of our files reported. Please let me know is this the expected behaviour or it needs any correction. But I feel this is somewhat not an expected behavior and needs your attention.

      Thanks,
      Santosh

        Attachments

          Issue Links

            Activity

            Hide
            kumar0112 Kumar n added a comment -

            here are the lines from cpd.xml: they show there are no multiple warnings:

            ..............
            .............
            <duplication lines="155" tokens="1205">
            <file line="2995" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/>
            <file line="3612" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/>
            <codefragment>
            ....
            ...
            </codefragment>

            <duplication lines="99" tokens="468">
            <file line="3166" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/>
            <file line="3836" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/>
            <codefragment>
            ....
            ....
            </codefragment>

            Show
            kumar0112 Kumar n added a comment - here are the lines from cpd.xml: they show there are no multiple warnings: .............. ............. <duplication lines="155" tokens="1205"> <file line="2995" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/> <file line="3612" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/> <codefragment> .... ... </codefragment> <duplication lines="99" tokens="468"> <file line="3166" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/> <file line="3836" path="C:\Program Files (x86)\Jenkins\jobs\RasterLib\workspace\hpldrlgl\library\Src\job.cpp"/> <codefragment> .... .... </codefragment>
            Hide
            kumar0112 Kumar n added a comment -

            Thanks for the comments. I have attached extracted xml for your reference, where it shows the lines for duplicate code and which are not repeated. that is, there are no multiple warnings. the lines in the attached xml show the duplicated code for the warnings attached in my previous message(for the file job.cpp).

            Please have a look.

            Thanks,
            Santosh.

            Show
            kumar0112 Kumar n added a comment - Thanks for the comments. I have attached extracted xml for your reference, where it shows the lines for duplicate code and which are not repeated. that is, there are no multiple warnings. the lines in the attached xml show the duplicated code for the warnings attached in my previous message(for the file job.cpp). Please have a look. Thanks, Santosh.
            Hide
            drulli Ulli Hafner added a comment - - edited

            Please attach as watchee JENKINS-11376.

            Show
            drulli Ulli Hafner added a comment - - edited Please attach as watchee JENKINS-11376 .

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                kumar0112 Kumar n
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: