CPD Results

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

Duplications

File Line
org/woehlke/computer/kurzweil/tabs/cca/views/CyclicCellularAutomatonColorScheme.java 15
org/woehlke/computer/kurzweil/tabs/randomwalk/canvas/RandomWalkColorScheme.java 15
public CyclicCellularAutomatonColorScheme(){
        List<Color> stateColorList = new ArrayList<>();
        stateColorList.add(Color.BLACK);
        stateColorList.add(Color.DARK_GRAY);
        stateColorList.add(Color.GRAY);
        stateColorList.add(Color.LIGHT_GRAY);
        stateColorList.add(Color.WHITE);
        stateColorList.add(Color.MAGENTA);
        stateColorList.add(Color.RED);
        stateColorList.add(Color.ORANGE);
        stateColorList.add(Color.YELLOW);
        stateColorList.add(Color.PINK);
        stateColorList.add(Color.BLUE);
        stateColorList.add(Color.CYAN);
        stateColorList.add(Color.GREEN);
        stateColorList.add(new Color(54,12,88));
        stateColorList.add(new Color(154,112,38));
        stateColorList.add(new Color(234,123,254));
        stateColor = new Color[stateColorList.toArray().length];
        for(int i=0; i < stateColorList.toArray().length; i++){
            stateColor[i] = (Color) stateColorList.get(i);
        }
    }

    public int getMaxState(){
        return stateColor.length;
    }

    public Color getColorForState(int state){
        return stateColor[state];
    }
}
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 258
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 290
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 322
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 354
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 386
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 418
public static class Kochsnowflake {

        @Valid @Getter @Setter public View view = new View();
        @Valid @Getter @Setter public Control control = new Control();

        //@Validated
        @ToString
        public static class View {
            @NotBlank @Getter @Setter private String title;
            @NotBlank @Getter @Setter private String subtitle;

            @Valid @Getter @Setter public Neighborhood neighborhood = new Neighborhood();

            //@Validated
            @ToString
            public static class Neighborhood {
                @NotBlank @Getter @Setter private String title;
                @NotBlank @Getter @Setter private String typeVonNeumann;
                @NotBlank @Getter @Setter private String typeMoore;
                @NotBlank @Getter @Setter private String typeWoehlke;
            }
        }

        //@Validated
        @ToString
        public static class Control {
            @NotNull  @Getter @Setter private Integer threadSleepTime;
            @NotNull  @Getter @Setter private Integer numberOfParticles;
        }
    }

    @ToString
    public static class Samegame {
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 182
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 258
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 290
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 322
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 354
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 386
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 418
public static class Cca {

        @Valid @Getter @Setter public View view = new View();
        @Valid @Getter @Setter public Control control = new Control();

        //@Validated
        @ToString
        public static class View {

            @NotBlank @Getter @Setter private String title;
            @NotBlank @Getter @Setter private String subtitle;

            @Valid @Getter @Setter public Neighborhood neighborhood = new Neighborhood();

            //@Validated
            @ToString
            public static class Neighborhood {
                @NotBlank @Getter @Setter private String title;
                @NotBlank @Getter @Setter private String typeVonNeumann;
                @NotBlank @Getter @Setter private String typeMoore;
                @NotBlank @Getter @Setter private String typeWoehlke;
            }
        }

        ////@Validated
        @ToString
        public static class Control {
            @NotNull  @Getter @Setter private Integer threadSleepTime;
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilContext.java 66
org/woehlke/computer/kurzweil/commons/widgets/SubTabImpl.java 51
);
    }

    private CompoundBorder getDoubleBorder(){
        int left = this.getProperties().getAllinone().getView().getBorderPaddingX();
        int right = this.getProperties().getAllinone().getView().getBorderPaddingX();
        int top = this.getProperties().getAllinone().getView().getBorderPaddingY();
        int bottom = this.getProperties().getAllinone().getView().getBorderPaddingY();
        return BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(left,right,top,bottom),
            BorderFactory.createEmptyBorder(left,right,top,bottom)
        );
    }
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilContext.java 69
org/woehlke/computer/kurzweil/application/ComputerKurzweilContext.java 80
org/woehlke/computer/kurzweil/commons/widgets/SubTabImpl.java 54
private CompoundBorder getDoubleBorder(){
        int left = this.getProperties().getAllinone().getView().getBorderPaddingX();
        int right = this.getProperties().getAllinone().getView().getBorderPaddingX();
        int top = this.getProperties().getAllinone().getView().getBorderPaddingY();
        int bottom = this.getProperties().getAllinone().getView().getBorderPaddingY();
        return BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(left,right,top,bottom),
            BorderFactory.createEmptyBorder(left,right,top,bottom)
        );
    }