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);
int ldy = (int) (height - (height * (model.getLoad() / 100.0))); int lastldy = (int) (height - (height * (last.getLoad() / 100.0))); g.setColor(Color.blue); g.drawLine(lastx, lastldy, xaxis, ldy);
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: 4 Number of AST nodes: 4
1
int hly = (int) (height - (height * (model.getHealth() / 3.0)));
1
int ldy = (int) (height - (height * (model.getLoad() / 100.0)));
2
			int lasty = (int) (height - (height * (last.getHealth() / 3.0)));
2
			int lastldy = (int) (height - (height * (last.getLoad() / 100.0)));
3
			g.setColor(Color.green);
3
			g.setColor(Color.blue);
4
			g.drawLine(lastx, lasty, xaxis, hly);
4
			g.drawLine(lastx, lastldy, xaxis, ldy);
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.0
Clones locationClones are in the same method
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    int hly = (int)(height - (height * (model.getHealth() / 3.0)));
    22
    int hly = (int)(height - (height * (model.getHealth() / 3.0)));
    27
    int ldy = (int)(height - (height * (model.getLoad() / 100.0)));
    Differences
    Expression1Expression2Difference
    hlyldyVARIABLE_NAME_MISMATCH
    getHealthgetLoadMETHOD_INVOCATION_NAME_MISMATCH
    3.0100.0LITERAL_VALUE_MISMATCH
    27
    int ldy = (int)(height - (height * (model.getLoad() / 100.0)));
    23
    int lasty = (int)(height - (height * (last.getHealth() / 3.0)));
    23
    int lasty = (int)(height - (height * (last.getHealth() / 3.0)));
    28
    int lastldy = (int)(height - (height * (last.getLoad() / 100.0)));
    Differences
    Expression1Expression2Difference
    lastylastldyVARIABLE_NAME_MISMATCH
    getHealthgetLoadMETHOD_INVOCATION_NAME_MISMATCH
    3.0100.0LITERAL_VALUE_MISMATCH
    28
    int lastldy = (int)(height - (height * (last.getLoad() / 100.0)));
    24
    g.setColor(Color.green);
    24
    g.setColor(Color.green);
    29
    g.setColor(Color.blue);
    Differences
    Expression1Expression2Difference
    greenblueVARIABLE_NAME_MISMATCH
    29
    g.setColor(Color.blue);
    25
    g.drawLine(lastx, lasty, xaxis, hly);
    25
    g.drawLine(lastx, lasty, xaxis, hly);
    30
    g.drawLine(lastx, lastldy, xaxis, ldy);
    Differences
    Expression1Expression2Difference
    lastylastldyVARIABLE_NAME_MISMATCH
    hlyldyVARIABLE_NAME_MISMATCH
    30
    g.drawLine(lastx, lastldy, xaxis, ldy);
    Precondition Violations (0)
    Row Violation