if (this.leftBlock != null) { RectangleConstraint c3 = new RectangleConstraint(widthRange, heightRange3); Size2D size = this.leftBlock.arrange(g2, c3); w[2] = size.width; h[2] = size.height; }
if (this.centerBlock != null) { RectangleConstraint c5 = new RectangleConstraint(widthRange3, heightRange3); Size2D size = this.centerBlock.arrange(g2, c5); w[4] = size.width; h[4] = size.height; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java
Method name: Size2D arrangeRR(BlockContainer, Range, Range, Graphics2D) Method name: Size2D arrangeRR(BlockContainer, Range, Range, Graphics2D)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (this.leftBlock != null) {
1
if (this.centerBlock != null) {
2
            RectangleConstraint c3 = new RectangleConstraint(widthRange,
2
            RectangleConstraint c5 = new RectangleConstraint(widthRange3,
3
                    heightRange3);
3
                    heightRange3);
4
            Size2D size = this.leftBlock.arrange(g2, c3);
4
            Size2D size = this.centerBlock.arrange(g2, c5);
5
            w[2] = size.width;
5
            w[4] = size.width;
6
            h[2] = size.height;
6
            h[4] = size.height;
7
        }
7
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    if (this.leftBlock != null)
    15
    if (this.leftBlock != null)
    29
    if (this.centerBlock != null)
    Differences
    Expression1Expression2Difference
    leftBlockcenterBlockVARIABLE_NAME_MISMATCH
    29
    if (this.centerBlock != null)
    16
    RectangleConstraint c3 = new RectangleConstraint(widthRange, heightRange3);
    16
    RectangleConstraint c3 = new RectangleConstraint(widthRange, heightRange3);
    30
    RectangleConstraint c5 = new RectangleConstraint(widthRange3, heightRange3);
    Differences
    Expression1Expression2Difference
    c3c5VARIABLE_NAME_MISMATCH
    widthRangewidthRange3VARIABLE_NAME_MISMATCH
    30
    RectangleConstraint c5 = new RectangleConstraint(widthRange3, heightRange3);
    17
    Size2D size = this.leftBlock.arrange(g2, c3);
    17
    Size2D size = this.leftBlock.arrange(g2, c3);
    31
    Size2D size = this.centerBlock.arrange(g2, c5);
    Differences
    Expression1Expression2Difference
    c3c5VARIABLE_NAME_MISMATCH
    leftBlockcenterBlockVARIABLE_NAME_MISMATCH
    31
    Size2D size = this.centerBlock.arrange(g2, c5);
    18
    w[2] = size.width;
    18
    w[2] = size.width;
    32
    w[4] = size.width;
    Differences
    Expression1Expression2Difference
    24LITERAL_VALUE_MISMATCH
    32
    w[4] = size.width;
    19
    h[2] = size.height;
    19
    h[2] = size.height;
    33
    h[4] = size.height;
    Differences
    Expression1Expression2Difference
    24LITERAL_VALUE_MISMATCH
    33
    h[4] = size.height;
    Precondition Violations (0)
    Row Violation