if (this.horizontalAlignment != HorizontalAlignment.LEFT) { for (int i = 0; i < blocks.size(); i++) { //Block b = (Block) blocks.get(i); if (this.horizontalAlignment == HorizontalAlignment.CENTER) { //TODO: shift block right by half } else if (this.horizontalAlignment == HorizontalAlignment.RIGHT) { //TODO: shift block over to right } } }
if (this.verticalAlignment != VerticalAlignment.TOP) { for (int i = 0; i < blocks.size(); i++) { //Block b = (Block) blocks.get(i); if (this.verticalAlignment == VerticalAlignment.CENTER) { //TODO: shift block down by half } else if (this.verticalAlignment == VerticalAlignment.BOTTOM) { //TODO: shift block down to bottom } } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/block/ColumnArrangement.java File path: /jfreechart-1.0.10/src/org/jfree/chart/block/FlowArrangement.java
Method name: Size2D arrangeNN(BlockContainer, Graphics2D) Method name: Size2D arrangeNN(BlockContainer, Graphics2D)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (this.horizontalAlignment != HorizontalAlignment.LEFT) {
1
if (this.verticalAlignment != VerticalAlignment.TOP) {
2
                for (int i = 0; i < blocks.size(); i++) {
2
                for (int i = 0; i < blocks.size(); i++) {
3
                    //Block b = (Block) blocks.get(i);
3
                    //Block b = (Block) blocks.get(i);
4
                    if (this.horizontalAlignment 
4
                    if (this.verticalAlignment 
5
                            == HorizontalAlignment.CENTER) {
5
== VerticalAlignment.CENTER) {
6
                        //TODO: shift block right by half
6
                        //TODO: shift block down by half
7
                    }
7
                    }
8
                    else if (this.horizontalAlignment 
8
                    else if (this.verticalAlignment 
9
                            == HorizontalAlignment.RIGHT) {
9
                            == VerticalAlignment.BOTTOM) {
10
                        //TODO: shift block over to right
10
                        //TODO: shift block down to bottom
11
                    }
11
                    }
12
                }            
12
                }            
13
            }
13
            }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in different classes
Number of node comparisons4