if (THREAD) { int thy = (int) (height - (height * (model.getThreadload() / 100.0))); int lastthy = (int) (height - (height * (last.getThreadload() / 100.0))); g.setColor(Color.red); g.drawLine(lastx, lastthy, xaxis, thy); }
if (HEALTH) { int hly = (int) (height - (height * (model.getHealth() / 3.0))); int lasty = (int) (height - (height * (last.getHealth() / 3.0))); g.setColor(Color.green); g.drawLine(lastx, lasty, xaxis, hly); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/MonitorGraph.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/MonitorGraph.java
Method name: void drawSample(int, MonitorModel, Graphics, MonitorModel) Method name: void drawSample(int, MonitorModel, Graphics, MonitorModel)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (THREAD) {
1
if (HEALTH) {
2
			int thy = (int) (height - (height * (model.getThreadload() / 100.0)));
2
			int hly = (int) (height - (height * (model.getHealth() / 3.0)));
3
			int lastthy = (int) (height - (height * (last.getThreadload() / 100.0)));
3
			int lasty = (int) (height - (height * (last.getHealth() / 3.0)));
4
			g.setColor(Color.red);
4
			g.setColor(Color.green);
5
			g.drawLine(lastx, lastthy, xaxis, thy);
5
			g.drawLine(lastx, lasty, xaxis, hly);
6
		}
6
		}
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 comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    36
    if (THREAD)
    36
    if (THREAD)
    21
    if (HEALTH)
    Differences
    Expression1Expression2Difference
    THREADHEALTHVARIABLE_NAME_MISMATCH
    21
    if (HEALTH)
    37
    int thy = (int)(height - (height * (model.getThreadload() / 100.0)));
    37
    int thy = (int)(height - (height * (model.getThreadload() / 100.0)));
    22
    int hly = (int)(height - (height * (model.getHealth() / 3.0)));
    Differences
    Expression1Expression2Difference
    thyhlyVARIABLE_NAME_MISMATCH
    getThreadloadgetHealthMETHOD_INVOCATION_NAME_MISMATCH
    100.03.0LITERAL_VALUE_MISMATCH
    22
    int hly = (int)(height - (height * (model.getHealth() / 3.0)));
    38
    int lastthy = (int)(height - (height * (last.getThreadload() / 100.0)));
    38
    int lastthy = (int)(height - (height * (last.getThreadload() / 100.0)));
    23
    int lasty = (int)(height - (height * (last.getHealth() / 3.0)));
    Differences
    Expression1Expression2Difference
    lastthylastyVARIABLE_NAME_MISMATCH
    getThreadloadgetHealthMETHOD_INVOCATION_NAME_MISMATCH
    100.03.0LITERAL_VALUE_MISMATCH
    23
    int lasty = (int)(height - (height * (last.getHealth() / 3.0)));
    39
    g.setColor(Color.red);
    39
    g.setColor(Color.red);
    24
    g.setColor(Color.green);
    Differences
    Expression1Expression2Difference
    redgreenVARIABLE_NAME_MISMATCH
    24
    g.setColor(Color.green);
    40
    g.drawLine(lastx, lastthy, xaxis, thy);
    40
    g.drawLine(lastx, lastthy, xaxis, thy);
    25
    g.drawLine(lastx, lasty, xaxis, hly);
    Differences
    Expression1Expression2Difference
    lastthylastyVARIABLE_NAME_MISMATCH
    thyhlyVARIABLE_NAME_MISMATCH
    25
    g.drawLine(lastx, lasty, xaxis, hly);
    Precondition Violations (0)
    Row Violation