if (h == LengthConstraintType.NONE) { throw new RuntimeException("Not implemented."); } else if (h == LengthConstraintType.FIXED) { return arrangeRF(container, g2, constraint); } else if (h == LengthConstraintType.RANGE) { return arrangeRR(container, g2, constraint); }
if (h == LengthConstraintType.NONE) { return arrangeNN(container, g2); } else if (h == LengthConstraintType.FIXED) { return arrangeNF(container, g2, constraint); } else if (h == LengthConstraintType.RANGE) { throw new RuntimeException("Not implemented."); }
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 arrange(BlockContainer, Graphics2D, RectangleConstraint) Method name: Size2D arrange(BlockContainer, Graphics2D, RectangleConstraint)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (h == LengthConstraintType.NONE) {
1
if (h == LengthConstraintType.NONE) {
2
                throw new RuntimeException("Not implemented.");  
2
                return arrangeNN(container, g2);  
3
            }
3
            }
4
            else if (h == LengthConstraintType.FIXED) {
4
            else if (h == LengthConstraintType.FIXED) {
5
                return arrangeRF(container, g2, constraint);  
5
                return arrangeNF(container, g2, constraint);  
6
            }
6
            }
7
            else if (h == LengthConstraintType.RANGE) {
7
            else if (h == LengthConstraintType.RANGE) {
8
                return arrangeRR(container, g2, constraint);  
8
                throw new RuntimeException("Not implemented.");  
9
            }
9
            }
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.7
Clones locationClones are in different classes
Number of node comparisons28
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    18
    if (h == LengthConstraintType.NONE)
    18
    if (h == LengthConstraintType.NONE)
    8
    if (h == LengthConstraintType.RANGE)
    Differences
    Expression1Expression2Difference
    NONERANGEVARIABLE_NAME_MISMATCH
    8
    if (h == LengthConstraintType.RANGE)
    19
    throw new RuntimeException("Not implemented.");
    9
    throw new RuntimeException("Not implemented.");
    20
    else if (h == LengthConstraintType.FIXED)
    6
    else if (h == LengthConstraintType.FIXED)
    21
    return arrangeRF(container, g2, constraint);
    21
    return arrangeRF(container, g2, constraint);
    7
    return arrangeNF(container, g2, constraint);
    Differences
    Expression1Expression2Difference
    arrangeRFarrangeNFMETHOD_INVOCATION_NAME_MISMATCH
    7
    return arrangeNF(container, g2, constraint);
    22
    else if (h == LengthConstraintType.RANGE)
    22
    else if (h == LengthConstraintType.RANGE)
    4
    else if (h == LengthConstraintType.NONE)
    Differences
    Expression1Expression2Difference
    RANGENONEVARIABLE_NAME_MISMATCH
    4
    else if (h == LengthConstraintType.NONE)
    23
    return arrangeRR(container, g2, constraint);
    23
    return arrangeRR(container, g2, constraint);
    5
    return arrangeNN(container, g2);
    Differences
    Expression1Expression2Difference
    arrangeRRarrangeNNMETHOD_INVOCATION_NAME_MISMATCH
    arrangeRR(container,g2,constraint)arrangeNN(container,g2)ARGUMENT_NUMBER_MISMATCH
    5
    return arrangeNN(container, g2);
    Precondition Violations (1)
    Row Violation
    1Not all possible execution flows end in a return statement