StringBuffer mySB = new StringBuffer(); mySB.append("Samples: " + this.getNumSamples() + " "); mySB.append("Avg: " + this.getAverage() + " "); mySB.append("Min: " + this.getMin() + " "); mySB.append("Max: " + this.getMax() + " "); mySB.append("Error Rate: " + this.getErrorPercentageString() + " "); mySB.append("Sample Rate: " + this.getRateString()); return (mySB.toString());
StringBuffer mySB = new StringBuffer(); mySB.append("Samples: " + this.getCount() + " "); mySB.append("Avg: " + this.getMean() + " "); mySB.append("Min: " + this.getMin() + " "); mySB.append("Max: " + this.getMax() + " "); mySB.append("Error Rate: " + this.getErrorPercentage() + " "); mySB.append("Sample Rate: " + this.getRate()); return (mySB.toString());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/RunningSample.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/SamplingStatCalculator.java
Method name: String toString() Method name: String toString()
Number of AST nodes: 8 Number of AST nodes: 8
1
StringBuffer mySB = new StringBuffer();
1
StringBuffer mySB = new StringBuffer();
2
		mySB.append("Samples: " + this.getNumSamples() + "  ");
2
		mySB.append("Samples: " + this.getCount() + "  ");
3
		mySB.append("Avg: " + this.getAverage() + "  ");
3
		mySB.append("Avg: " + this.getMean() + "  ");
4
		mySB.append("Min: " + this.getMin() + "  ");
4
		mySB.append("Min: " + this.getMin() + "  ");
5
		mySB.append("Max: " + this.getMax() + "  ");
5
		mySB.append("Max: " + this.getMax() + "  ");
6
		mySB.append("Error Rate: " + this.getErrorPercentageString() + "  ");
6
		mySB.append("Error Rate: " + this.getErrorPercentage() + "  ");
7
		mySB.append("Sample Rate: " + this.getRateString());
7
		mySB.append("Sample Rate: " + this.getRate());
8
		return (mySB.toString());
8
		return (mySB.toString());
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons64
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    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
    1
    StringBuffer mySB = new StringBuffer();
    1
    StringBuffer mySB = new StringBuffer();
    2
    mySB.append("Samples: " + this.getNumSamples() + "  ");
    2
    mySB.append("Samples: " + this.getNumSamples() + " ");
    2
    mySB.append("Samples: " + this.getCount() + " ");
    Differences
    Expression1Expression2Difference
    getNumSamplesgetCountMETHOD_INVOCATION_NAME_MISMATCH
    longintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type long of variable this.getNumSamples() does not match with type int of variable this.getCount()
    2
    mySB.append("Samples: " + this.getCount() + "  ");
    3
    mySB.append("Avg: " + this.getAverage() + "  ");
    3
    mySB.append("Avg: " + this.getAverage() + " ");
    3
    mySB.append("Avg: " + this.getMean() + " ");
    Differences
    Expression1Expression2Difference
    getAveragegetMeanMETHOD_INVOCATION_NAME_MISMATCH
    longdoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type long of variable this.getAverage() does not match with type double of variable this.getMean()
    3
    mySB.append("Avg: " + this.getMean() + "  ");
    4
    mySB.append("Min: " + this.getMin() + "  ");
    4
    mySB.append("Min: " + this.getMin() + "  ");
    5
    mySB.append("Max: " + this.getMax() + "  ");
    5
    mySB.append("Max: " + this.getMax() + "  ");
    6
    mySB.append("Error Rate: " + this.getErrorPercentageString() + "  ");
    6
    mySB.append("Error Rate: " + this.getErrorPercentageString() + " ");
    6
    mySB.append("Error Rate: " + this.getErrorPercentage() + " ");
    Differences
    Expression1Expression2Difference
    getErrorPercentageStringgetErrorPercentageMETHOD_INVOCATION_NAME_MISMATCH
    java.lang.StringdoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable this.getErrorPercentageString() does not match with type double of variable this.getErrorPercentage()
    6
    mySB.append("Error Rate: " + this.getErrorPercentage() + "  ");
    7
    mySB.append("Sample Rate: " + this.getRateString());
    7
    mySB.append("Sample Rate: " + this.getRateString());
    7
    mySB.append("Sample Rate: " + this.getRate());
    Differences
    Expression1Expression2Difference
    getRateStringgetRateMETHOD_INVOCATION_NAME_MISMATCH
    java.lang.StringdoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable this.getRateString() does not match with type double of variable this.getRate()
    7
    mySB.append("Sample Rate: " + this.getRate());
    8
    return (mySB.toString());
    8
    return (mySB.toString());
    Precondition Violations (4)
    Row Violation
    1Type long of variable this.getNumSamples() does not match with type int of variable this.getCount()
    2Type long of variable this.getAverage() does not match with type double of variable this.getMean()
    3Type java.lang.String of variable this.getErrorPercentageString() does not match with type double of variable this.getErrorPercentage()
    4Type java.lang.String of variable this.getRateString() does not match with type double of variable this.getRate()