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
				}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.9
    Clone typeType 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);
    else
    else
    24
    g.drawLine((previousPts[0].x) % width, previousPts[0].y, x % width, d.height - data);
    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);
    Differences
    Expression1Expression2Difference
    0currPreviousPtsTYPE_COMPATIBLE_REPLACEMENT
    0currPreviousPtsTYPE_COMPATIBLE_REPLACEMENT
    68
    g.drawLine((previousPts[currPreviousPts].x) % width, previousPts[currPreviousPts].y, x % width, d.height - data);
    Precondition Violations (0)
    Row Violation