Fork me on GitHub

CPD Results

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

Duplications

File Line
com/github/mikkoi/maven/plugins/enforcer/rule/propertyusage/PropertyFiles.java 132
com/github/mikkoi/maven/plugins/enforcer/rule/propertyusage/PropertyFiles.java 193
        final Map<String, Integer> results = new HashMap<>();
        List<String> rows = Files.readAllLines(Paths.get(filename), charset);
        boolean readingMultiLineDefinition = false;
        int linenumber = 0;
        for (String row : rows) {
            linenumber++;
            log.debug("    Reading property row '" + row + "' (" + linenumber + ").");
            Matcher commentLineM = commentLineP.matcher(row);
            if (commentLineM.find()) {
                log.debug("        This is comment line.");
                continue;
            }
            Matcher multiLineM = multiLineP.matcher(row);
            if (multiLineM.find()) {
                if (readingMultiLineDefinition) {
                    log.debug("        This is multirow (not first row)");
                    continue;
                } else {
                    log.debug("        This is multirow (first row).");
                    readingMultiLineDefinition = true;
                }
            } else {
                if (readingMultiLineDefinition) {
                    log.debug("        This is multirow (last row).");
                    readingMultiLineDefinition = false;
                    continue;
                }
            }
            Matcher simplePropertyLineM = simplePropertyLineP.matcher(row);
            if (simplePropertyLineM.find()) {
                log.debug("        This is simple property line.");
                final String key = simplePropertyLineM.group(1).trim();