if (index == 0 && location == null) {
throw new IllegalArgumentException(
"Null 'location' for index 0 not permitted.");
}
this.rangeAxisLocations.set(index, location);
if (notify) {
fireChangeEvent();
}
if (index == 0 && location == null) {
throw new IllegalArgumentException(
"Null 'location' for index 0 not permitted.");
}
this.rangeAxisLocations.set(index, location);
if (notify) {
fireChangeEvent();
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
|
Method name: void setRangeAxisLocation(int, AxisLocation, boolean)
|
|
Method name: void setRangeAxisLocation(int, AxisLocation, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (index == 0 && location == null) {↵ | | 1 | if (index == 0 && location == null) {↵
|
2 | throw new IllegalArgumentException(↵ | | 2 | throw new IllegalArgumentException(↵
|
3 | "Null 'location' for index 0 not permitted.");↵ | | 3 | "Null 'location' for index 0 not permitted.");↵
|
4 | }↵ | | 4 | }↵
|
5 | this.rangeAxisLocations.set(index, location);↵ | | 5 | this.rangeAxisLocations.set(index, location);↵
|
6 | if (notify) {↵ | | 6 | if (notify) {↵
|
7 | fireChangeEvent();↵ | | 7 | fireChangeEvent();↵
|
8 | } | | 8 | }
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
-
{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) | 18.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (index == 0 && location == null) | | 1 | if (index == 0 && location == null) |
2 | throw new IllegalArgumentException("Null 'location' for index 0 not permitted."); | | 2 | throw new IllegalArgumentException("Null 'location' for index 0 not permitted."); |
3 | this.rangeAxisLocations.set(index, location); | | 3 | this.rangeAxisLocations.set(index, location); |
4 | if (notify) | | 4 | if (notify) |
5 | | | 5 | |
Precondition Violations (0)
Row |
Violation |