CPD Results

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

Duplications

File Line
org/eclipse/aether/internal/test/util/ArtifactDefinition.java 40
org/eclipse/aether/internal/test/util/IniArtifactDataReader.java 257
ArtifactDefinition(String def) {
        this.definition = def.trim();

        if (definition.startsWith("(")) {
            int idx = definition.indexOf(')');
            this.id = definition.substring(1, idx);
            this.definition = definition.substring(idx + 1);
        } else if (definition.startsWith("^")) {
            this.reference = definition.substring(1);
            return;
        }

        String[] split = definition.split(":");
        if (split.length < 4) {
            throw new IllegalArgumentException(
                    "Need definition like 'gid:aid:ext:ver[:scope]', but was: " + definition);
        }
        groupId = split[0];
        artifactId = split[1];
        extension = split[2];
        version = split[3];
        if (split.length > 4) {
            scope = split[4];
        }
        if (split.length > 5) {