row = (Calculator) tableRows.get(sampleLabel); if (row == null) { row = new Calculator(sampleLabel); tableRows.put(row.getLabel(), row); model.insertRow(row, model.getRowCount() - 1); }
row = (SamplingStatCalculator) tableRows.get(sampleLabel); if (row == null) { row = new SamplingStatCalculator(sampleLabel); tableRows.put(row.getLabel(), row); model.insertRow(row, model.getRowCount() - 1); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/SummaryReport.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/StatGraphVisualizer.java
Method name: void add(SampleResult) Method name: void add(SampleResult)
Number of AST nodes: 5 Number of AST nodes: 5
1
row = (Calculator) tableRows.get(sampleLabel);
1
row = (SamplingStatCalculator) tableRows.get(sampleLabel);
2
			if (row == null) {
2
			if (row == null) {
3
				row = new Calculator(sampleLabel);
3
				row = new SamplingStatCalculator(sampleLabel);
4
				tableRows.put(row.getLabel(), row);
4
				tableRows.put(row.getLabel(), row);
5
				model.insertRow(row, model.getRowCount() - 1);
5
				model.insertRow(row, model.getRowCount() - 1);
6
			}
6
			}
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)3.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                        
    4
    row = (SamplingStatCalculator)tableRows.get(sampleLabel);
    Preondition Violations
    Unmatched statement row=(SamplingStatCalculator)tableRows.get(sampleLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4
    row = (SamplingStatCalculator)tableRows.get(sampleLabel);
    4
    row = (Calculator)tableRows.get(sampleLabel);
    4
    row = (Calculator)tableRows.get(sampleLabel);
    Preondition Violations
    Unmatched statement row=(Calculator)tableRows.get(sampleLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                
    5
    if (row == null)
    5
    if (row == null)
    5
    if (row == null)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.util.Calculatororg.apache.jmeter.visualizers.SamplingStatCalculatorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    • Make classes org.apache.jmeter.util.Calculator and org.apache.jmeter.visualizers.SamplingStatCalculator extend a common superclass
    5
    if (row == null)
                                                                                                  
    6
    row = new SamplingStatCalculator(sampleLabel);
    Preondition Violations
    Unmatched statement row=new SamplingStatCalculator(sampleLabel); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    row = new SamplingStatCalculator(sampleLabel);
    6
    row = new Calculator(sampleLabel);
    6
    row = new Calculator(sampleLabel);
    Preondition Violations
    Unmatched statement row=new Calculator(sampleLabel); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                          
    7
    tableRows.put(row.getLabel(), row);
    7
    tableRows.put(row.getLabel(), row);
    7
    tableRows.put(row.getLabel(), row);
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.util.Calculatororg.apache.jmeter.visualizers.SamplingStatCalculatorVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.util.Calculatororg.apache.jmeter.visualizers.SamplingStatCalculatorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    • Make classes org.apache.jmeter.util.Calculator and org.apache.jmeter.visualizers.SamplingStatCalculator extend a common superclass
    Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    • Make classes org.apache.jmeter.util.Calculator and org.apache.jmeter.visualizers.SamplingStatCalculator extend a common superclass
    7
    tableRows.put(row.getLabel(), row);
    8
    model.insertRow(row, model.getRowCount() - 1);
    8
    model.insertRow(row, model.getRowCount() - 1);
    8
    model.insertRow(row, model.getRowCount() - 1);
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.util.Calculatororg.apache.jmeter.visualizers.SamplingStatCalculatorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    • Make classes org.apache.jmeter.util.Calculator and org.apache.jmeter.visualizers.SamplingStatCalculator extend a common superclass
    8
    model.insertRow(row, model.getRowCount() - 1);
    Precondition Violations (8)
    Row Violation
    1Unmatched statement row=(SamplingStatCalculator)tableRows.get(sampleLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement row=(Calculator)tableRows.get(sampleLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    4Unmatched statement row=new SamplingStatCalculator(sampleLabel); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement row=new Calculator(sampleLabel); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    7Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row
    8Type org.apache.jmeter.util.Calculator of variable row does not match with type org.apache.jmeter.visualizers.SamplingStatCalculator of variable row