if (nameMap.containsKey(key)) { String newValue = nameMap.getProperty(key); log.info("Upgrading value " + value + " to " + newValue); return newValue; }
if (nameMap.containsKey(className)) { String newName = nameMap.getProperty(className); log.info("Upgrading class " + className + " to " + newName); return newName; }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/NameUpdater.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/NameUpdater.java
Method name: String getCurrentName(String, String, String) Method name: String getCurrentName(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (nameMap.containsKey(key)) {
1
if (nameMap.containsKey(className)) {
2
			String newValue = nameMap.getProperty(key);
2
			String newName = nameMap.getProperty(className);
3
			log.info("Upgrading value " + value + " to " + newValue);
3
			log.info("Upgrading class " + className + " to " + newName);
4
			return newValue;
4
			return newName;
5
		}
5
		}
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.1
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (nameMap.containsKey(key))
    2
    if (nameMap.containsKey(key))
    1
    if (nameMap.containsKey(className))
    Differences
    Expression1Expression2Difference
    keyclassNameVARIABLE_NAME_MISMATCH
    1
    if (nameMap.containsKey(className))
    3
    String newValue = nameMap.getProperty(key);
    3
    String newValue = nameMap.getProperty(key);
    2
    String newName = nameMap.getProperty(className);
    Differences
    Expression1Expression2Difference
    newValuenewNameVARIABLE_NAME_MISMATCH
    keyclassNameVARIABLE_NAME_MISMATCH
    2
    String newName = nameMap.getProperty(className);
    4
    log.info("Upgrading value " + value + " to " + newValue);
    4
    log.info("Upgrading value " + value + " to " + newValue);
    3
    log.info("Upgrading class " + className + " to " + newName);
    Differences
    Expression1Expression2Difference
    newValuenewNameVARIABLE_NAME_MISMATCH
    "Upgrading value ""Upgrading class "LITERAL_VALUE_MISMATCH
    valueclassNameVARIABLE_NAME_MISMATCH
    3
    log.info("Upgrading class " + className + " to " + newName);
    5
    return newValue;
    5
    return newValue;
    4
    return newName;
    Differences
    Expression1Expression2Difference
    newValuenewNameVARIABLE_NAME_MISMATCH
    4
    return newName;
    Precondition Violations (1)
    Row Violation
    1Not all possible execution flows end in a return statement