File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java | |||
Method name: void setTickLabelFont(Font)
|
Method name: void setTickMarkStroke(Stroke)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (font == null) {↵ | 1 | if (stroke == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'font' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'stroke' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!this.tickLabelFont.equals(font)) {↵ | 4 | if (!this.tickMarkStroke.equals(stroke)) {↵ | |
5 | this.tickLabelFont = font;↵ | 5 | this.tickMarkStroke = stroke;↵ | |
6 | notifyListeners(new AxisChangeEvent(this));↵ | 6 | notifyListeners(new AxisChangeEvent(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.3 |
Clones location | Clones are declared in the same class |
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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (font == null) |
| 1 | if (stroke == null) | |||||||||||||||||||||
2 | throw new IllegalArgumentException("Null 'font' argument."); |
| 2 | throw new IllegalArgumentException("Null 'stroke' argument."); | |||||||||||||||||||||
3 | if (!this.tickLabelFont.equals(font)) |
| 3 | if (!this.tickMarkStroke.equals(stroke)) | |||||||||||||||||||||
|
| 4 | this.tickMarkStroke = stroke; | ||||||||||||||||||||||
4 | this.tickLabelFont = font; |
| | ||||||||||||||||||||||
5 | notifyListeners(new AxisChangeEvent(this)); | 5 | notifyListeners(new AxisChangeEvent(this)); |
Row | Violation |
---|---|
1 | Type java.awt.Font of variable font does not match with type java.awt.Stroke of variable stroke |
2 | Type java.awt.Font of variable font does not match with type java.awt.Stroke of variable stroke |
3 | Type java.awt.Font of variable this.tickLabelFont does not match with type java.awt.Stroke of variable this.tickMarkStroke |
4 | Unmatched statement this.tickMarkStroke=stroke; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement this.tickLabelFont=font; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |