File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java | |||
Method name: String getToolTipText(MouseEvent)
|
Method name: String getToolTipText(org.eclipse.swt.events.MouseEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Insets insets = getInsets(); ↵ | 1 | Rectangle insets = getClientArea();↵ | |
2 | ChartEntity entity = entities.getEntity( ↵ | 2 | ChartEntity entity = entities.getEntity(↵ | |
3 | (int) ((e.getX() - insets.left) / this.scaleX), ↵ | 3 | (int) ((e.x - insets.x) / this.scaleX),↵ | |
4 | (int) ((e.getY() - insets.top) / this.scaleY)); ↵ | 4 | (int) ((e.y - insets.y) / this.scaleY));↵ | |
5 | if (entity != null) { ↵ | 5 | if (entity != null) {↵ | |
6 | result = entity.getToolTipText(); ↵ | 6 | result = entity.getToolTipText();↵ | |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
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) | 5.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5 | Rectangle insets = getClientArea(); | |||||||||||||||||||||||||||||||||
5 | Insets insets = getInsets(); | | |||||||||||||||||||||||||||||||||
6 | ChartEntity entity = entities.getEntity((int)((e.getX() - insets.left) / this.scaleX), (int)((e.getY() - insets.top) / this.scaleY)); |
| 6 | ChartEntity entity = entities.getEntity((int)((e.x - insets.x) / this.scaleX), (int)((e.y - insets.y) / this.scaleY)); | |||||||||||||||||||||||||||||||
7 | if (entity != null) | 7 | if (entity != null) | ||||||||||||||||||||||||||||||||
8 | result = entity.getToolTipText(); | 8 | result = entity.getToolTipText(); |
Row | Violation |
---|---|
1 | Type int of variable insets.left does not match with type int of variable insets.x |
2 | Expression insets.left cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression insets.x cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type int of variable insets.top does not match with type int of variable insets.y |
5 | Expression insets.top cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression insets.y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | The refactoring of the clones is infeasible, because classes org.jfree.chart.ChartPanel and org.jfree.experimental.chart.swt.ChartComposite do not have a common superclass |