for (int i = 0; i < domainAxisCount; i++) { Axis axis = (Axis) this.domainAxes.get(i); if (axis != null) { axis.setPlot(this); axis.addChangeListener(this); } }
for (int i = 0; i < rangeAxisCount; i++) { Axis axis = (Axis) this.rangeAxes.get(i); if (axis != null) { axis.setPlot(this); axis.addChangeListener(this); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: void readObject(ObjectInputStream) Method name: void readObject(ObjectInputStream)
Number of AST nodes: 5 Number of AST nodes: 5
1
for (int i = 0; i < domainAxisCount; i++) {
1
for (int i = 0; i < rangeAxisCount; i++) {
2
            Axis axis = (Axis) this.domainAxes.get(i);
2
            Axis axis = (Axis) this.rangeAxes.get(i);
3
            if (axis != null) {
3
            if (axis != null) {
4
                axis.setPlot(this);
4
                axis.setPlot(this);
5
                axis.addChangeListener(this);
5
                axis.addChangeListener(this);
6
            }
6
            }
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.2
Clones locationClones are in the same method
Number of node comparisons13
  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)4.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    for (int i = 0; i < domainAxisCount; i++)
    21
    for (int i = 0; i < domainAxisCount; i++)
    27
    for (int i = 0; i < rangeAxisCount; i++)
    Differences
    Expression1Expression2Difference
    domainAxisCountrangeAxisCountVARIABLE_NAME_MISMATCH
    27
    for (int i = 0; i < rangeAxisCount; i++)
    22
    Axis axis = (Axis)this.domainAxes.get(i);
    22
    Axis axis = (Axis)this.domainAxes.get(i);
    28
    Axis axis = (Axis)this.rangeAxes.get(i);
    Differences
    Expression1Expression2Difference
    domainAxesrangeAxesVARIABLE_NAME_MISMATCH
    28
    Axis axis = (Axis)this.rangeAxes.get(i);
    23
    if (axis != null)
    29
    if (axis != null)
    24
    axis.setPlot(this);
    30
    axis.setPlot(this);
    25
    axis.addChangeListener(this);
    31
    axis.addChangeListener(this);
    Precondition Violations (0)
    Row Violation