if (this.bottomBlock != null) { RectangleConstraint c2 = new RectangleConstraint(w[0], null, LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint.getHeight() - h[0]), LengthConstraintType.RANGE); Size2D size = this.bottomBlock.arrange(g2, c2); h[1] = size.height; }
RectangleConstraint c4 = new RectangleConstraint(0.0, new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)), LengthConstraintType.RANGE, h[2], null, LengthConstraintType.FIXED); Size2D size = this.rightBlock.arrange(g2, c4); w[3] = size.width;
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 arrangeFF(BlockContainer, Graphics2D, RectangleConstraint) Method name: Size2D arrangeFF(BlockContainer, Graphics2D, RectangleConstraint)
Number of AST nodes: 4 Number of AST nodes: 3
1
if (this.bottomBlock != null) {
2
            RectangleConstraint c2 = new RectangleConstraint(w[0], null,
1
RectangleConstraint c4 = new RectangleConstraint(0.0,
3
                    LengthConstraintType.FIXED, 0.0, new Range(0.0,
2
                    new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)),
4
                    constraint.getHeight() - h[0]),
3
                    LengthConstraintType.RANGE, h[2], null,
5
 LengthConstraintType.RANGE);
4
                    LengthConstraintType.FIXED);
6
            Size2D size = this.bottomBlock.arrange(g2, c2);
5
            Size2D size = this.rightBlock.arrange(g2, c4);
7
            h[1] = size.height;
6
            w[3] = size.
8
        }
7
width;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    RectangleConstraint c2 = new RectangleConstraint(w[0], null, LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint.getHeight() - h[0]), LengthConstraintType.RANGE);
    10
    RectangleConstraint c2 = new RectangleConstraint(w[0], null, LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint.getHeight() - h[0]), LengthConstraintType.RANGE);
    20
    RectangleConstraint c4 = new RectangleConstraint(0.0, new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)), LengthConstraintType.RANGE, h[2], null, LengthConstraintType.FIXED);
    Differences
    Expression1Expression2Difference
    c2c4VARIABLE_NAME_MISMATCH
    w[0]0.0TYPE_COMPATIBLE_REPLACEMENT
    nullnew Range(0.0,Math.max(constraint.getWidth() - w[2],0.0))TYPE_COMPATIBLE_REPLACEMENT
    FIXEDRANGEVARIABLE_NAME_MISMATCH
    0.0h[2]TYPE_COMPATIBLE_REPLACEMENT
    new Range(0.0,constraint.getHeight() - h[0])nullTYPE_COMPATIBLE_REPLACEMENT
    RANGEFIXEDVARIABLE_NAME_MISMATCH
    20
    RectangleConstraint c4 = new RectangleConstraint(0.0, new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)), LengthConstraintType.RANGE, h[2], null, LengthConstraintType.FIXED);
    11
    Size2D size = this.bottomBlock.arrange(g2, c2);
    11
    Size2D size = this.bottomBlock.arrange(g2, c2);
    21
    Size2D size = this.rightBlock.arrange(g2, c4);
    Differences
    Expression1Expression2Difference
    c2c4VARIABLE_NAME_MISMATCH
    bottomBlockrightBlockVARIABLE_NAME_MISMATCH
    21
    Size2D size = this.rightBlock.arrange(g2, c4);
    12
    h[1] = size.height;
    12
    h[1] = size.height;
    22
    w[3] = size.width;
    Differences
    Expression1Expression2Difference
    hwVARIABLE_NAME_MISMATCH
    13LITERAL_VALUE_MISMATCH
    heightwidthVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression size.height cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression size.width cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22
    w[3] = size.width;
    Precondition Violations (2)
    Row Violation
    1Expression size.height cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression size.width cannot be parameterized, because it has dependencies to/from statements that will be extracted