7

I am trying to run the GUI version of CPD on my python codebase, but no duplicate code is returned even when i set the min chunk size to 1.

My code isnt that good.

has anyone ever had any success running CPD on a python project?

1
  • Could you show your current configuration for CPD? Commented Nov 3, 2017 at 16:29

2 Answers 2

2

Python is natively supported since PMD v5.3.0 (January 2015) : https://pmd.github.io/latest/pmd-python/index.html It can be run like this :

.\cpd.bat --minimum-tokens 75 --files C:\Path\to\your\project\ --language python

Sign up to request clarification or add additional context in comments.

Comments

1
+50

Can't help you with CPD. Consider trying our CloneDR duplicate code detector. It has a Python front end, and there are sample results from clone detection runs at the site. Pretty much CloneDR manages to find clones in everybody's code, especially if it "isn't that good".

2 Comments

nice, i will evaluate it. I got emailed a download link with an exe, but the trouble is that we use osx at work! ill try it at home though
No guarantees, but our tools do seem to work under Wine on OSX.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.