if (transY0 == transY1) {
// this represents the situation
// for drawing a horizontal bar.
drawLine(g2, state.workingLine, transY0, transX0, transY1,
transX1);
}
else { //this handles the need to perform a 'step'.
// calculate the step point
double transXs = transX0 + (getStepPoint()
* (transX1 - transX0));
drawLine(g2, state.workingLine, transY0, transX0, transY0,
transXs);
drawLine(g2, state.workingLine, transY0, transXs, transY1,
transXs);
drawLine(g2, state.workingLine, transY1, transXs, transY1,
transX1);
}
if (transY0 == transY1) { // this represents the situation
// for drawing a horizontal bar.
drawLine(g2, state.workingLine, transX0, transY0, transX1,
transY1);
}
else { //this handles the need to perform a 'step'.
// calculate the step point
double transXs = transX0 + (getStepPoint()
* (transX1 - transX0));
drawLine(g2, state.workingLine, transX0, transY0, transXs,
transY0);
drawLine(g2, state.workingLine, transXs, transY0, transXs,
transY1);
drawLine(g2, state.workingLine, transXs, transY1, transX1,
transY1);
}
Clone fragments detected by clone detection tool
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
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 |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |