JMeterProperty prop = (JMeterProperty) propMap.get(key); if (prop == null) { prop = new NullProperty(key); } return prop;
Integer order = (Integer) beanInfo.getBeanDescriptor().getValue(ORDER(group)); if (order == null) { order = new Integer(0); } return order;
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: Integer groupOrder(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
JMeterProperty prop = (JMeterProperty) propMap.get(key);
1
Integer order = (Integer) beanInfo.getBeanDescriptor().getValue(ORDER(group));
2
		if (prop == null) {
2
			if (order == null) {
3
			prop = new NullProperty(key);
3
				order = new Integer(0);
4
		}
4
			}
5
		return prop;
5
			return order;
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
    Integer order = (Integer)beanInfo.getBeanDescriptor().getValue(ORDER(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 (order == null)
    Differences
    Expression1Expression2Difference
    proporderVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.property.JMeterPropertyjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.testelement.property.JMeterProperty of variable prop does not match with type java.lang.Integer of variable order
    • Make classes org.apache.jmeter.testelement.property.JMeterProperty and java.lang.Integer extend a common superclass
    2
    if (order == null)
                                                    
    3
    order = new Integer(0);
    Preondition Violations
    Unmatched statement order=new Integer(0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    order = new Integer(0);
    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 order;
    Preondition Violations
    Unmatched return order;
    4
    return order;
    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.Integer of variable order
    3Unmatched statement order=new Integer(0); 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 order;
    6Unmatched return prop;
    7The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero