JMeterProperty prop = (JMeterProperty) propMap.get(key); if (prop == null) { prop = new NullProperty(key); } return prop;
String group = (String) d.getValue(GROUP); if (group == null){ group = DEFAULT_GROUP; } return group;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/AbstractTestElement.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java
Method name: JMeterProperty getProperty(String) Method name: String group(PropertyDescriptor)
Number of AST nodes: 4 Number of AST nodes: 4
1
JMeterProperty prop = (JMeterProperty) propMap.get(key);
1
String group = (String) d.getValue(GROUP);
2
		if (prop == null) {
2
		if (group == null){
3
			prop = new NullProperty(key);
3
			group = DEFAULT_GROUP;
4
		}
4
		}
5
		return prop;
5
		return group;
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
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                        
    1
    String group = (String)d.getValue(GROUP);
    1
    JMeterProperty prop = (JMeterProperty)propMap.get(key);
    1
    JMeterProperty prop = (JMeterProperty)propMap.get(key);
    Preondition Violations
    Unmatched statement JMeterProperty prop=(JMeterProperty)propMap.get(key); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                    
    2
    if (prop == null)
    2
    if (prop == null)
    2
    if (group == null)
    Differences
    Expression1Expression2Difference
    propgroupVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.property.JMeterPropertyjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.testelement.property.JMeterProperty of variable prop does not match with type java.lang.String of variable group
    • Make classes org.apache.jmeter.testelement.property.JMeterProperty and java.lang.String extend a common superclass
    2
    if (group == null)
                                                  
    3
    group = DEFAULT_GROUP;
    Preondition Violations
    Unmatched statement group=DEFAULT_GROUP; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    group = DEFAULT_GROUP;
    3
    prop = new NullProperty(key);
    3
    prop = new NullProperty(key);
    Preondition Violations
    Unmatched statement prop=new NullProperty(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
                                    
    4
    return group;
    Preondition Violations
    Unmatched return group;
    4
    return group;
    4
    return prop;
    4
    return prop;
    Preondition Violations
    Unmatched return prop;
                                  
    Precondition Violations (7)
    Row Violation
    1Unmatched statement JMeterProperty prop=(JMeterProperty)propMap.get(key); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Type org.apache.jmeter.testelement.property.JMeterProperty of variable prop does not match with type java.lang.String of variable group
    3Unmatched statement group=DEFAULT_GROUP; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement prop=new NullProperty(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched return group;
    6Unmatched return prop;
    7The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero