g.setColor(currColor);
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[1].x) % width, previousPts[1].y, x % width, d.height - data);
}
// Store load time without components
previousPts[1] = new Point(x % width, d.height - data);
g.setColor(currColor);
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);
}
// Store current total time point
previousPts[0] = new Point(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: 5
|
|
Number of AST nodes: 5
|
|
1 | g.setColor(currColor);↵ | | 1 | g.setColor(currColor);↵
|
2 | if (!previousPtsAlloc) {↵ | | 2 | if (!previousPtsAlloc) {↵
|
3 | // If first dot, just draw the point↵ | | 3 | // If first dot, just draw the point.↵
|
4 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);↵ | | 4 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1);↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | // Otherwise, draw from previous point↵ | | 6 | // Otherwise, draw from previous point.↵
|
7 | g.drawLine((previousPts[1].x) % width, previousPts[1].y, x % width, d.height - data);↵ | | 7 | g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, d.height - data);↵
|
8 | }↵ | | 8 | }↵
|
|
9 | // Store load time without components↵ | | 9 | // Store current total time point↵
|
10 | previousPts[1] = new Point(x % width, d.height - data); | | 10 | previousPts[0] = new Point(x % width, d.height - data);
|
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 | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 2.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
40 | g.setColor(currColor); | | 21 | g.setColor(currColor); |
41 | if (!previousPtsAlloc) | | 22 | if (!previousPtsAlloc) |
42 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1); | | 23 | g.drawLine(x % width, d.height - data, x % width, d.height - data - 1); |
| | | | |
43 | g.drawLine((previousPts[1].x) % width, previousPts[1].y, x % width, d.height - data); | | 24 | g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, d.height - data); |
44 | previousPts[1] = new Point(x % width, d.height - data); | | 25 | previousPts[0] = new Point(x % width, d.height - data); |
Precondition Violations (0)
Row |
Violation |