if (edge == RectangleEdge.BOTTOM) { delta1 = this.labelInfo[band].getPadding().calculateTopOutset( fm.getHeight()); } else if (edge == RectangleEdge.TOP) { delta1 = this.labelInfo[band].getPadding().calculateBottomOutset( fm.getHeight()); }
if (edge == RectangleEdge.BOTTOM) { used += this.labelInfo[band].getPadding().calculateBottomOutset( fm.getHeight()); } else if (edge == RectangleEdge.TOP) { used += this.labelInfo[band].getPadding().calculateTopOutset( fm.getHeight()); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java
Method name: AxisState drawTickLabels(int, Graphics2D, AxisState, Rectangle2D, RectangleEdge) Method name: AxisState drawTickLabels(int, Graphics2D, AxisState, Rectangle2D, RectangleEdge)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (edge == RectangleEdge.BOTTOM) {
1
if (edge == RectangleEdge.BOTTOM) {
2
            delta1 = this.labelInfo[band].getPadding().calculateTopOutset(
2
                used += this.labelInfo[band].getPadding().calculateBottomOutset(
3
                    fm.getHeight());   
3
                        fm.getHeight());   
4
        }
4
            }
5
        else if (edge == RectangleEdge.TOP) {
5
            else if (edge == RectangleEdge.TOP) {
6
            delta1 = this.labelInfo[band].getPadding().calculateBottomOutset(
6
                used += this.labelInfo[band].getPadding().calculateTopOutset(
7
                    fm.getHeight());   
7
                        fm.getHeight());   
8
        }
8
            }
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.4
Clones locationClones are in the same method
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (edge == RectangleEdge.BOTTOM)
    71
    if (edge == RectangleEdge.BOTTOM)
    4
    delta1 = this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight());
    4
    delta1 = this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight());
    Preondition Violations
    Unmatched statement delta1=this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                                                                                  
                                                                                                                                                                        
    72
    used += this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight());
    Preondition Violations
    Unmatched statement used+=this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
    72
    used += this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight());
    5
    else if (edge == RectangleEdge.TOP)
    73
    else if (edge == RectangleEdge.TOP)
    6
    delta1 = this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight());
    6
    delta1 = this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight());
    Preondition Violations
    Unmatched statement delta1=this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                                                                                        
                                                                                                                                                                  
    74
    used += this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight());
    Preondition Violations
    Unmatched statement used+=this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
    74
    used += this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight());
    Precondition Violations (4)
    Row Violation
    1Unmatched statement delta1=this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
    2Unmatched statement delta1=this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
    3Unmatched statement used+=this.labelInfo[band].getPadding().calculateBottomOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements
    4Unmatched statement used+=this.labelInfo[band].getPadding().calculateTopOutset(fm.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements