mfkvfn - 2014-03-13

refer to https://sourceforge.net/p/pmd-eclipse/bugs/20/

An internal error occurred during: "DetectCutAndPaste".
Exception Stack Trace : net.sourceforge.pmd.ast.TokenMgrError: Lexical
error at line XXX, column YYY. Encountered: "\r" (13), after :ZZZ

I found it's because of the encoding of *.java it not the same as default
encoding base upon locale.
for example,my locale is zh_CN,so the default encoding is GBK,but my java
file encoding is UTF-8,so an error occured.if my java file encoding is
GBK,the CPD runs rightly.

but there is no setting in the perferrence of eclipse to tell PMD "what's
my file encoding is".

the only way to use CPD is click the "Lunch CPD..." button in the eclipse
menu 'window--perference--PMD--CPD preference'.and in the dialog input
"UTF-8" in the "file encoding(defaults base upon locale)"