CPD Results

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

Duplications

File Line
org/woehlke/computer/kurzweil/tabs/cca/canvas/CyclicCellularAutomatonColorScheme.java 13
org/woehlke/computer/kurzweil/tabs/randomwalk/canvas/RandomWalkColorScheme.java 13
    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/tabs/cca/CyclicCellularAutomatonController.java 44
org/woehlke/computer/kurzweil/tabs/randomwalk/RandomWalkController.java 40
        this.threadSleepTime = this.tabCtx.getCtx().getProperties().getCca().getControl().getThreadSleepTime();
    }

    public void run() {
        log.info("run() - begin");
        boolean doIt;
        do {
            synchronized (this.goOn) {
                doIt = goOn.booleanValue();
            }
            synchronized (this.tabCtx) {
                //log.info("running");
                this.tabCtx.getTabModel().exec();
                this.tabCtx.exec();
            }
            try { super.sleep( this.threadSleepTime ); }
            catch (InterruptedException e) { log.info(e.getMessage()); }
        }
        while (doIt);
        log.info("run() - finished");
    }

    public void exit() {
        log.info("exit");
        try {
            synchronized (goOn) {
                goOn = Boolean.FALSE;
            }
            log.info("join");
            join();
            log.info("joined");
        } catch (InterruptedException e){
            log.info(e.getMessage());
        }
        log.info("exited");
    }

}
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 256
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 288
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 320
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 352
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 384
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 416
    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 180
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 256
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 288
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 320
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 352
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 384
org/woehlke/computer/kurzweil/application/ComputerKurzweilProperties.java 416
    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 63
org/woehlke/computer/kurzweil/commons/widgets/SubTabImpl.java 49
        );
    }

    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/tabs/simulatedevolution/canvas/population/PopulationStatisticsElementsPanelCounted.java 47
org/woehlke/computer/kurzweil/tabs/simulatedevolution/canvas/population/PopulationStatisticsElementsPanelLifeCycle.java 52
        super(tabCtx.getCtx().getProperties().getSimulatedevolution().getPopulation().getPanelPopulationStatistics(),tabCtx.getCtx().getProperties());
        this.tabCtx = tabCtx;
        layoutSubPanel = new FlowLayout();
        this.setLayout(layoutSubPanel);
        borderLabel = this.tabCtx.getCtx().getProperties().getSimulatedevolution().getPopulation().getPanelPopulationStatistics();
        layout = new FlowLayoutCenter();
        border = tabCtx.getCtx().getBottomButtonsPanelBorder(borderLabel);
        this.setLayout(layout);
        this.setBorder(border);
        ComputerKurzweilProperties.SimulatedEvolution.Population cfg = this.tabCtx.getCtx().getProperties().getSimulatedevolution().getPopulation();
        initialPopulation = cfg.getInitialPopulation();
File Line
org/woehlke/computer/kurzweil/application/ComputerKurzweilContext.java 66
org/woehlke/computer/kurzweil/application/ComputerKurzweilContext.java 77
org/woehlke/computer/kurzweil/commons/widgets/SubTabImpl.java 52
    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)
        );
    }