File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java | |||
Method name: void drawTasks(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int)
|
Method name: void drawTask(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 12 | |||
1 | if (state.getInfo() != null) {↵ | 1 | if (state.getInfo() != null) {↵ | |
2 | EntityCollection entities = state.getEntityCollection();↵ | 2 | EntityCollection entities = state.getEntityCollection();↵ | |
3 | if (entities != null) {↵ | 3 | if (entities != null) {↵ | |
4 | String tip = null;↵ | 4 | String tip = null;↵ | |
5 | if (getToolTipGenerator(row, column)↵ | 5 | CategoryToolTipGenerator tipster = getToolTipGenerator(row,↵ | |
6 | column);↵ | |||
6 | != null) {↵ | 7 | if (tipster != null) {↵ | |
7 | tip = getToolTipGenerator(row, column).generateToolTip(↵ | 8 | tip = ↵ | |
8 | dataset, row, column);↵ | 9 | tipster.generateToolTip(dataset, row, column);↵ | |
9 | }↵ | 10 | ↵ | |
10 | ↵ | 11 | }↵ | |
11 | String url = null;↵ | 12 | String url = null;↵ | |
12 | if (getItemURLGenerator(row, column) != null) {↵ | 13 | if (getItemURLGenerator(row, column) != null) {↵ | |
13 | url = getItemURLGenerator(row, column).generateURL(↵ | 14 | url = getItemURLGenerator(row, column).generateURL(↵ | |
14 | dataset, row, column);↵ | 15 | dataset, row, column);↵ | |
15 | }↵ | 16 | }↵ | |
16 | CategoryItemEntity entity = new CategoryItemEntity(↵ | 17 | CategoryItemEntity entity = new CategoryItemEntity(bar, tip,↵ | |
17 | bar, tip, url, dataset, dataset.getRowKey(row),↵ | 18 | url, dataset, dataset.getRowKey(row),↵ | |
18 | dataset.getColumnKey(column));↵ | 19 | dataset.getColumnKey(column));↵ | |
19 | entities.add(entity);↵ | 20 | entities.add(entity);↵ | |
20 | }↵ | 21 | ↵ | |
21 | ↵ | 22 | }↵ | |
22 | } | 23 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 47 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 77.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
52 | if (state.getInfo() != null) | 58 | if (state.getInfo() != null) | |||||||||||||
53 | EntityCollection entities = state.getEntityCollection(); | 59 | EntityCollection entities = state.getEntityCollection(); | |||||||||||||
54 | if (entities != null) | 60 | if (entities != null) | |||||||||||||
55 | String tip = null; | 61 | String tip = null; | |||||||||||||
| 62 | CategoryToolTipGenerator tipster = getToolTipGenerator(row, column); | ||||||||||||||
56 | if (getToolTipGenerator(row, column) != null) |
| 63 | if (tipster != null) | ||||||||||||
57 | tip = getToolTipGenerator(row, column).generateToolTip(dataset, row, column); |
| 64 | tip = tipster.generateToolTip(dataset, row, column); | ||||||||||||
58 | String url = null; | 65 | String url = null; | |||||||||||||
59 | if (getItemURLGenerator(row, column) != null) | 66 | if (getItemURLGenerator(row, column) != null) | |||||||||||||
60 | url = getItemURLGenerator(row, column).generateURL(dataset, row, column); | 67 | url = getItemURLGenerator(row, column).generateURL(dataset, row, column); | |||||||||||||
61 | CategoryItemEntity entity = new CategoryItemEntity(bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column)); | 68 | CategoryItemEntity entity = new CategoryItemEntity(bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column)); | |||||||||||||
62 | entities.add(entity); | 69 | entities.add(entity); |
Row | Violation |
---|---|
1 | Expression tipster cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getToolTipGenerator(row,column) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression tipster cannot be parameterized, because it has dependencies to/from statements that will be extracted |