if (insets == null) {
throw new IllegalArgumentException("Null 'insets' argument.");
}
if (!insets.equals(this.labelInsets)) {
this.labelInsets = insets;
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
if (range == null) {
throw new IllegalArgumentException("Null 'range' argument.");
}
if (turnOffAutoRange) {
this.autoRange = false;
}
this.range = range;
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java
|
Method name: void setLabelInsets(RectangleInsets, boolean)
|
|
Method name: void setRange(Range, boolean, boolean)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 7
|
|
1 | if (insets == null) {↵ | | 1 | if (range == null) {↵
|
2 | throw new IllegalArgumentException("Null 'insets' argument.");↵ | | 2 | throw new IllegalArgumentException("Null 'range' argument.");↵
|
3 | }↵ | | 3 | }↵
|
4 | if (!insets.equals(this.labelInsets)) {↵ | | 4 | if (↵
|
5 | this.labelInsets = insets;↵ | | |
|
6 | ↵ | | 5 | turnOffAutoRange) {↵
|
| | | 6 | this.autoRange = false;↵
|
| | | 7 | }↵
|
| | | 8 | this.range = range;↵
|
7 | if (notify) {↵ | | 9 | if (notify) {↵
|
8 | notifyListeners(new AxisChangeEvent(this));↵ | | 10 | notifyListeners(new AxisChangeEvent(this));↵
|
9 | }↵ | | |
|
10 | } | | 11 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 7 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | this.labelInsets = insets; | | | |
| | | 5 | this.range = range; |
5 | if (notify) | | 6 | if (notify) |
6 | notifyListeners(new AxisChangeEvent(this)); | | 7 | notifyListeners(new AxisChangeEvent(this)); |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched statement this.labelInsets=insets; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement this.range=range; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |