File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepRenderer.java | |||
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (transY0 == transY1) {↵ | 1 | if (transY0 == transY1) {↵ | |
2 | // this represents the situation↵ | 2 | // this represents the situation↵ | |
3 | // for drawing a horizontal bar.↵ | 3 | // for drawing a horizontal bar.↵ | |
4 | drawLine(g2, state.workingLine, transY0, transX0, transY1,↵ | 4 | drawLine(g2, state.workingLine, transX0, transY0, transX1,↵ | |
5 | transX1);↵ | 5 | transY1);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else { //this handles the need to perform a 'step'.↵ | 7 | else { //this handles the need to perform a 'step'.↵ | |
8 | // calculate the step point↵ | 8 | // calculate the step point↵ | |
9 | double transXs = transX0 + (getStepPoint()↵ | 9 | double transXs = transX0 + (getStepPoint()↵ | |
10 | * (transX1 - transX0));↵ | 10 | * (transX1 - transX0));↵ | |
11 | drawLine(g2, state.workingLine, transY0, transX0, transY0,↵ | 11 | drawLine(g2, state.workingLine, transX0, transY0, transXs,↵ | |
12 | transXs);↵ | 12 | transY0);↵ | |
13 | drawLine(g2, state.workingLine, transY0, transXs, transY1,↵ | 13 | drawLine(g2, state.workingLine, transXs, transY0, transXs,↵ | |
14 | transXs);↵ | 14 | transY1);↵ | |
15 | drawLine(g2, state.workingLine, transY1, transXs, transY1,↵ | 15 | drawLine(g2, state.workingLine, transXs, transY1, transX1,↵ | |
16 | transX1);↵ | 16 | transY1);↵ | |
17 | } | 17 |
| |
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 the same method |
Number of node comparisons | 37 |
Number of mapped statements | 6 |
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) | 4.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | if (transY0 == transY1) | 27 | if (transY0 == transY1) | |||||||||||||||||||||||
21 | drawLine(g2, state.workingLine, transY0, transX0, transY1, transX1); |
| 28 | drawLine(g2, state.workingLine, transX0, transY0, transX1, transY1); | ||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
22 | double transXs = transX0 + (getStepPoint() * (transX1 - transX0)); | 29 | double transXs = transX0 + (getStepPoint() * (transX1 - transX0)); | |||||||||||||||||||||||
23 | drawLine(g2, state.workingLine, transY0, transX0, transY0, transXs); |
| 31 | drawLine(g2, state.workingLine, transXs, transY0, transXs, transY1); | ||||||||||||||||||||||
24 | drawLine(g2, state.workingLine, transY0, transXs, transY1, transXs); |
| 32 | drawLine(g2, state.workingLine, transXs, transY1, transX1, transY1); | ||||||||||||||||||||||
25 | drawLine(g2, state.workingLine, transY1, transXs, transY1, transX1); |
| 30 | drawLine(g2, state.workingLine, transX0, transY0, transXs, transY0); |
Row | Violation |
---|---|
1 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression transXs cannot be parameterized, because it has dependencies to/from statements that will be extracted |