int y = selectedDate.get(Calendar.YEAR); int y0 = minDate.get(Calendar.YEAR); int m = selectedDate.get(Calendar.MONTH); int m0 = minDate.get(Calendar.MONTH);
int y = selectedDate.get(Calendar.YEAR); int y1 = maxDate.get(Calendar.YEAR); int m = selectedDate.get(Calendar.MONTH); int m1 = maxDate.get(Calendar.MONTH);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/DateChooser.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/DateChooser.java
Method name: void _refresh() Method name: void _refresh()
Number of AST nodes: 4 Number of AST nodes: 4
1
int y = selectedDate.get(Calendar.YEAR);
1
int y = selectedDate.get(Calendar.YEAR);
2
			int y0 = minDate.get(Calendar.YEAR);
2
			int y1 = maxDate.get(Calendar.YEAR);
3
			int m = selectedDate.get(Calendar.MONTH);
3
			int m = selectedDate.get(Calendar.MONTH);
4
			int m0 = minDate.get(Calendar.MONTH);
4
			int m1 = maxDate.get(Calendar.MONTH);
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 comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    8
    int y = selectedDate.get(Calendar.YEAR);
    21
    int y = selectedDate.get(Calendar.YEAR);
    9
    int y0 = minDate.get(Calendar.YEAR);
    9
    int y0 = minDate.get(Calendar.YEAR);
    22
    int y1 = maxDate.get(Calendar.YEAR);
    Differences
    Expression1Expression2Difference
    y0y1VARIABLE_NAME_MISMATCH
    minDatemaxDateVARIABLE_NAME_MISMATCH
    22
    int y1 = maxDate.get(Calendar.YEAR);
    10
    int m = selectedDate.get(Calendar.MONTH);
    23
    int m = selectedDate.get(Calendar.MONTH);
    11
    int m0 = minDate.get(Calendar.MONTH);
    11
    int m0 = minDate.get(Calendar.MONTH);
    24
    int m1 = maxDate.get(Calendar.MONTH);
    Differences
    Expression1Expression2Difference
    m0m1VARIABLE_NAME_MISMATCH
    minDatemaxDateVARIABLE_NAME_MISMATCH
    24
    int m1 = maxDate.get(Calendar.MONTH);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables y, y0, m, m0 , while Clone fragment #2 returns variables y, y1, m, m1