while(i.hasNext()) { JMeterProperty prop = i.next(); sb.append(prop.getName()); sb.append("="); sb.append(prop.getStringValue()); sb.append("\n"); }
Map.Entry me = (Map.Entry) i.next(); sb.append(me.getKey()); sb.append("="); sb.append(me.getValue()); sb.append("\n");
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/DebugPostProcessor.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/sampler/DebugSampler.java
Method name: void process() Method name: void formatSet(StringBuffer, Set)
Number of AST nodes: 6 Number of AST nodes: 5
1
while(i.hasNext())
2
		{
3
		    JMeterProperty prop = i.next();
1
Map.Entry me = (Map.Entry) i.next();
4
		    sb.append(prop.getName());
2
			sb.append(me.getKey());
5
		    sb.append("=");
3
			sb.append("=");
6
		    sb.append(prop.getStringValue());
4
			sb.append(me.getValue());
7
		    sb.append("\n");
5
			sb.append("\n");
8
		 }
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 having the same super class
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                            
    5
    Map.Entry me = (Map.Entry)i.next();
    5
    JMeterProperty prop = i.next();
    5
    JMeterProperty prop = i.next();
    Preondition Violations
    Unmatched statement JMeterProperty prop=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                    
                                                        
    6
    sb.append(me.getKey());
    Preondition Violations
    Unmatched statement sb.append(me.getKey()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    sb.append(me.getKey());
                                                            
    8
    sb.append(me.getValue());
    Preondition Violations
    Unmatched statement sb.append(me.getValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    sb.append(me.getValue());
    6
    sb.append(prop.getName());
    6
    sb.append(prop.getName());
    9
    sb.append("\n");
    Differences
    Expression1Expression2Difference
    prop.getName()"\n"TYPE_COMPATIBLE_REPLACEMENT
    9
    sb.append("\n");
    7
    sb.append("=");
    7
    sb.append("=");
    8
    sb.append(prop.getStringValue());
    8
    sb.append(prop.getStringValue());
    Preondition Violations
    Unmatched statement sb.append(prop.getStringValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    9
    sb.append("\n");
                                          
    Precondition Violations (4)
    Row Violation
    1Unmatched statement JMeterProperty prop=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement sb.append(me.getKey()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement sb.append(me.getValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement sb.append(prop.getStringValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted