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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
21 | for (int i = 0; i < domainAxisCount; i++) | | 27 | for (int i = 0; i < rangeAxisCount; i++) |
22 | Axis axis = (Axis)this.domainAxes.get(i); | | 28 | Axis axis = (Axis)this.rangeAxes.get(i); |
23 | | | 29 | |
24 | | | 30 | |
25 | axis.addChangeListener(this); | | 31 | axis.addChangeListener(this); |
Precondition Violations (0)
Row |
Violation |