CPD Results

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

Duplications

File Line
org\jtheque\core\managers\view\impl\components\filthy\FilthyCardPanel.java 43
org\jtheque\core\managers\view\impl\components\filthy\FilthyPanel.java 53
        super(layoutManager);

        setOpaque(false);
        setBorder(Borders.createEmptyBorder(10));
    }

    @Override
    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;

        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);

        super.paint(g);
    }

    @Override
    protected void paintComponent(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;

        Composite composite = g2.getComposite();
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f));

        g2.setColor(Color.white);

        RoundRectangle2D background;
        background = new RoundRectangle2D.Double(3.0, 3.0,
                (double) getWidth() - 10.0 - 3.0,
                (double) getHeight() - 6.0,
                12, 12);

        g2.fill(background);

        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f));
        Stroke stroke = g2.getStroke();
        g2.setStroke(new BasicStroke(3.0f));
        g2.draw(background);
        g2.setStroke(stroke);

        g2.setComposite(composite);
    }
}

File Line
org\jtheque\core\utils\file\jt\JTFileWriter.java 34
org\jtheque\core\utils\file\jt\JTZippedFileWriter.java 33
public abstract class JTZippedFileWriter implements IJTFileWriter {
    @Override
    public final void writeFile(File file, BasicDataSource source) throws FileException {
        try {
            writeFile(new FileOutputStream(file), source);
        } catch (FileNotFoundException e) {
            throw new FileException("File not found", e);
        }
    }

    @Override
    public final void writeFile(String path, BasicDataSource source) throws FileException {
        writeFile(new File(path), source);
    }

    @Override
    public final void writeFile(FileOutputStream stream, BasicDataSource source) throws FileException {
        writeFile(new BufferedOutputStream(stream), source);
    }