Search code examples
sonarqubecpd

What's CPD of the Sonarqube?


I works with Sonarqube every day in my job. But, I realized that I don't know what means CPD. Phrases like "INFO: CPD calculation finished", etc. I would like some help to know this.


Solution

  • Copy/Paste Detection?

    Wikipedia: Copy/Paste Detector (CPD)

    From Sonarqube docs: Analysis Parameters, Duplication:

    A piece of code is considered duplicated as soon as there are at least 100 duplicated tokens in a row (override with sonar.cpd.${language}.minimumTokens) spread across at least 10 lines of code