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 setTickLabelFont(Font)
|
Method name: void setFont(Font)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (font == null) {↵ | 1 | if (font == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'font' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'font' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!this.tickLabelFont.equals(font)) {↵ | 4 | if (!this.font.equals(font)) {↵ | |
5 | this.tickLabelFont = font;↵ | 5 | this.font = font;↵ | |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 15 |
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) | 14.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (font == null) | 1 | if (font == null) | |||||||||||||||
2 | throw new IllegalArgumentException("Null 'font' argument."); | 2 | throw new IllegalArgumentException("Null 'font' argument."); | |||||||||||||||
3 | if (!this.tickLabelFont.equals(font)) |
| 3 | if (!this.font.equals(font)) | ||||||||||||||
4 | this.tickLabelFont = font; |
| 4 | this.font = font; | ||||||||||||||
5 | notifyListeners(new AxisChangeEvent(this)); |
| 5 | notifyListeners(new TitleChangeEvent(this)); |
Row | Violation |
---|---|
1 | Expression this.tickLabelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.tickLabelFont is a field being modified, and thus it cannot be parameterized |
4 | Expression this.font is a field being modified, and thus it cannot be parameterized |
5 | 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) |
6 | 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 |