if (!previousPtsAlloc) {
// If first dot, just draw the point.
g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);
} else {
// Otherwise, draw from previous point.
g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, d.height - data);
}
if (!previousPtsAlloc) {
// If first dot, just draw the point
g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);
} else {
// Otherwise, draw from previous point
g.drawLine((previousPts[currPreviousPts].x) % width, previousPts[currPreviousPts].y, x % width,
d.height - data);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphAccum.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphAccum.java
|
Method name: void drawSample(int, SampleResult, Graphics)
|
|
Method name: void drawSample(int, SampleResult, Graphics)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (!previousPtsAlloc) {↵ | | 1 | if (!previousPtsAlloc) {↵
|
2 | // If first dot, just draw the point.↵ | | 2 | // If first dot, just draw the point↵
|
3 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);↵ | | 3 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | // Otherwise, draw from previous point.↵ | | 5 | // Otherwise, draw from previous point↵
|
6 | g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, ↵ | | 6 | g.drawLine((previousPts[currPreviousPts].x) % width, previousPts[currPreviousPts].y, x % width,↵
|
7 | d.height - data);↵ | | 7 | d.height - data);↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
22 | if (!previousPtsAlloc) | | 66 | if (!previousPtsAlloc) |
23 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1); | | 67 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1); |
| | | | |
24 | g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, d.height - data); | | 68 | g.drawLine((previousPts[currPreviousPts].x) % width, previousPts[currPreviousPts].y, x % width, d.height - data); |
Precondition Violations (0)
Row |
Violation |