File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java | |||
Method name: void setTickLabelInsets(RectangleInsets)
|
Method name: void setPaint(Paint)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (insets == null) {↵ | 1 | if (paint == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'insets' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'paint' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!this.tickLabelInsets.equals(insets)) {↵ | 4 | if (!this.paint.equals(paint)) {↵ | |
5 | this.tickLabelInsets = insets;↵ | 5 | this.paint = paint;↵ | |
6 | notifyListeners(new AxisChangeEvent(this));↵ | 6 | notifyListeners(new TitleChangeEvent(this));↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 15 |
Number of mapped statements | 4 |
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) | 9.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (insets == null) |
| 1 | if (paint == null) | |||||||||||||||||||||
2 | throw new IllegalArgumentException("Null 'insets' argument."); |
| 2 | throw new IllegalArgumentException("Null 'paint' argument."); | |||||||||||||||||||||
3 | if (!this.tickLabelInsets.equals(insets)) |
| 3 | if (!this.paint.equals(paint)) | |||||||||||||||||||||
|
| 4 | this.paint = paint; | ||||||||||||||||||||||
4 | this.tickLabelInsets = insets; |
| | ||||||||||||||||||||||
5 | notifyListeners(new AxisChangeEvent(this)); |
| 5 | notifyListeners(new TitleChangeEvent(this)); |
Row | Violation |
---|---|
1 | Type org.jfree.ui.RectangleInsets of variable insets does not match with type java.awt.Paint of variable paint |
2 | Type org.jfree.ui.RectangleInsets of variable insets does not match with type java.awt.Paint of variable paint |
3 | Type org.jfree.ui.RectangleInsets of variable this.tickLabelInsets does not match with type java.awt.Paint of variable this.paint |
4 | Unmatched statement this.paint=paint; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement this.tickLabelInsets=insets; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Expression new AxisChangeEvent(this) cannot be unified with expression new TitleChangeEvent(this) , because common superclass type org.jfree.chart.event.ChartChangeEvent cannot be passed as an argument to protected void notifyListeners(org.jfree.chart.event.AxisChangeEvent) |
7 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.Axis and org.jfree.chart.title.TextTitle do not have a common superclass |