Add cpd to the build
Fix duplicated code in DBMSMetadata
Exclude generated sources from checkstyle