CPD Results

The following document contains the results of PMD's CPD 5.7.0.

Duplications

File Line
org/mycore/mods/merger/MCRNameMerger.java 122
org/mycore/mods/merger/MCRTextNormalizer.java 34
        String text = nameFragment.toLowerCase(Locale.getDefault());
        text = new MCRHyphenNormalizer().normalize(text).replace("-", " ");
        text = Normalizer.normalize(text, Form.NFD).replaceAll("\\p{M}", ""); // canonical decomposition, then remove accents
        text = text.replace("ue", "u").replace("oe", "o").replace("ae", "a").replace("ß", "s").replace("ss", "s");
        text = text.replaceAll("[^a-z0-9]\\s]", ""); //remove all non-alphabetic characters
        text = text.replaceAll("\\p{Punct}", " ").trim(); // remove all punctuation
        text = text.replaceAll("\\s+", " "); // normalize whitespace
        return text.trim();