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());
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());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/SamplingStatCalculator.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/RunningSample.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.getCount() + "  ");
2
		mySB.append("Samples: " + this.getNumSamples() + "  ");
3
		mySB.append("Avg: " + this.getMean() + "  ");
3
		mySB.append("Avg: " + this.getAverage() + "  ");
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.getErrorPercentage() + "  ");
6
		mySB.append("Error Rate: " + this.getErrorPercentageString() + "  ");
7
		mySB.append("Sample Rate: " + this.getRate());
7
		mySB.append("Sample Rate: " + this.getRateString());
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.getCount() + "  ");
    2
    mySB.append("Samples: " + this.getCount() + " ");
    2
    mySB.append("Samples: " + this.getNumSamples() + " ");
    Differences
    Expression1Expression2Difference
    getCountgetNumSamplesMETHOD_INVOCATION_NAME_MISMATCH
    intlongVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable this.getCount() does not match with type long of variable this.getNumSamples()
    2
    mySB.append("Samples: " + this.getNumSamples() + "  ");
    3
    mySB.append("Avg: " + this.getMean() + "  ");
    3
    mySB.append("Avg: " + this.getMean() + " ");
    3
    mySB.append("Avg: " + this.getAverage() + " ");
    Differences
    Expression1Expression2Difference
    getMeangetAverageMETHOD_INVOCATION_NAME_MISMATCH
    doublelongVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.getMean() does not match with type long of variable this.getAverage()
    3
    mySB.append("Avg: " + this.getAverage() + "  ");
    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.getErrorPercentage() + "  ");
    6
    mySB.append("Error Rate: " + this.getErrorPercentage() + " ");
    6
    mySB.append("Error Rate: " + this.getErrorPercentageString() + " ");
    Differences
    Expression1Expression2Difference
    getErrorPercentagegetErrorPercentageStringMETHOD_INVOCATION_NAME_MISMATCH
    doublejava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression this.getErrorPercentageString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type double of variable this.getErrorPercentage() does not match with type java.lang.String of variable this.getErrorPercentageString()
    6
    mySB.append("Error Rate: " + this.getErrorPercentageString() + "  ");
    7
    mySB.append("Sample Rate: " + this.getRate());
    7
    mySB.append("Sample Rate: " + this.getRate());
    7
    mySB.append("Sample Rate: " + this.getRateString());
    Differences
    Expression1Expression2Difference
    getRategetRateStringMETHOD_INVOCATION_NAME_MISMATCH
    doublejava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression this.getRateString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type double of variable this.getRate() does not match with type java.lang.String of variable this.getRateString()
    7
    mySB.append("Sample Rate: " + this.getRateString());
    8
    return (mySB.toString());
    8
    return (mySB.toString());
    Precondition Violations (6)
    Row Violation
    1Type int of variable this.getCount() does not match with type long of variable this.getNumSamples()
    2Type double of variable this.getMean() does not match with type long of variable this.getAverage()
    3Expression this.getErrorPercentageString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type double of variable this.getErrorPercentage() does not match with type java.lang.String of variable this.getErrorPercentageString()
    5Expression this.getRateString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type double of variable this.getRate() does not match with type java.lang.String of variable this.getRateString()