CPD Results

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

Duplications

File Line
org/codehaus/plexus/archiver/diags/NoOpArchiver.java 259
org/codehaus/plexus/archiver/diags/TrackingArchiver.java 363
public void setFilenameComparator(final Comparator<String> filenameComparator) {}

    @Override
    public void setOverrideUid(int uid) {}

    @Override
    public void setOverrideUserName(String userName) {}

    @Override
    public int getOverrideUid() {
        return 0;
    }

    @Override
    public String getOverrideUserName() {
        return null;
    }

    @Override
    public void setOverrideGid(int gid) {}

    @Override
    public void setOverrideGroupName(String groupName) {}

    @Override
    public int getOverrideGid() {
        return 0;
    }

    @Override
    public String getOverrideGroupName() {
        return null;
    }

    @Override
    public void setUmask(int umask) {}

    @Override
    public int getUmask() {
        return 0;
    }

    /**
     * @deprecated Use {@link #configureReproducibleBuild(FileTime)} instead.
     */
    @Override
    @Deprecated
    public void configureReproducible(Date lastModifiedDate) {}

    @Override
    public void configureReproducibleBuild(FileTime lastModifiedTime) {}
}
File Line
org/codehaus/plexus/archiver/xz/XZArchiver.java 37
org/codehaus/plexus/archiver/zstd/ZstdArchiver.java 43
public XZArchiver() {}

    @Override
    protected void execute() throws ArchiverException, IOException {
        if (!checkForced()) {
            return;
        }

        ResourceIterator iter = getResources();
        if (!iter.hasNext()) {
            throw new EmptyArchiveException("archive cannot be empty");
        }
        ArchiveEntry entry = iter.next();
        if (iter.hasNext()) {
            throw new ArchiverException("There is more than one file in input.");
        }
        compressor.setSource(entry.getResource());
        compressor.setDestFile(getDestFile());
        compressor.compress();
    }

    @Override
    public boolean isSupportingForced() {
        return true;
    }

    @Override
    protected void close() throws IOException {
        compressor.close();
    }

    @Override
    protected String getArchiveType() {
        return "xz";
File Line
org/codehaus/plexus/archiver/bzip2/BZip2Archiver.java 32
org/codehaus/plexus/archiver/snappy/SnappyArchiver.java 35
private final BZip2Compressor compressor = new BZip2Compressor();

    @Override
    public void execute() throws ArchiverException, IOException {
        if (!checkForced()) {
            return;
        }

        ResourceIterator iter = getResources();
        if (!iter.hasNext()) {
            throw new EmptyArchiveException("archive cannot be empty");
        }
        ArchiveEntry entry = iter.next();
        if (iter.hasNext()) {
            throw new ArchiverException("There is more than one file in input.");
        }
        compressor.setSource(entry.getResource());
        compressor.setDestFile(getDestFile());
        compressor.compress();
    }

    @Override
    public boolean isSupportingForced() {
        return true;
    }

    @Override
    protected void close() {
        compressor.close();
    }

    @Override
    protected String getArchiveType() {
        return "bzip2";
File Line
org/codehaus/plexus/archiver/bzip2/BZip2Archiver.java 35
org/codehaus/plexus/archiver/gzip/GZipArchiver.java 35
org/codehaus/plexus/archiver/snappy/SnappyArchiver.java 38
public void execute() throws ArchiverException, IOException {
        if (!checkForced()) {
            return;
        }

        ResourceIterator iter = getResources();
        if (!iter.hasNext()) {
            throw new EmptyArchiveException("archive cannot be empty");
        }
        ArchiveEntry entry = iter.next();
        if (iter.hasNext()) {
            throw new ArchiverException("There is more than one file in input.");
        }
        compressor.setSource(entry.getResource());
        compressor.setDestFile(getDestFile());
        compressor.compress();
    }

    @Override
    public boolean isSupportingForced() {
        return true;
    }

    @Override
    protected void close() {
        compressor.close();
    }

    @Override
    protected String getArchiveType() {
        return "bzip2";
File Line
org/codehaus/plexus/archiver/gzip/GZipArchiver.java 34
org/codehaus/plexus/archiver/xz/XZArchiver.java 39
org/codehaus/plexus/archiver/zstd/ZstdArchiver.java 45
@Override
    protected void execute() throws ArchiverException, IOException {
        if (!checkForced()) {
            return;
        }

        ResourceIterator iter = getResources();
        if (!iter.hasNext()) {
            throw new EmptyArchiveException("archive cannot be empty");
        }
        ArchiveEntry entry = iter.next();
        if (iter.hasNext()) {
            throw new ArchiverException("There is more than one file in input.");
        }
        compressor.setSource(entry.getResource());
        compressor.setDestFile(getDestFile());
        compressor.compress();
    }

    @Override
    public boolean isSupportingForced() {
        return true;
    }

    @Override
    protected void close() {
File Line
org/codehaus/plexus/archiver/bzip2/BZip2Archiver.java 35
org/codehaus/plexus/archiver/snappy/SnappyArchiver.java 38
org/codehaus/plexus/archiver/xz/XZArchiver.java 40
org/codehaus/plexus/archiver/zstd/ZstdArchiver.java 46
public void execute() throws ArchiverException, IOException {
        if (!checkForced()) {
            return;
        }

        ResourceIterator iter = getResources();
        if (!iter.hasNext()) {
            throw new EmptyArchiveException("archive cannot be empty");
        }
        ArchiveEntry entry = iter.next();
        if (iter.hasNext()) {
            throw new ArchiverException("There is more than one file in input.");
        }
        compressor.setSource(entry.getResource());
        compressor.setDestFile(getDestFile());
        compressor.compress();
    }

    @Override
    public boolean isSupportingForced() {
        return true;
    }

    @Override
    protected void close() {