if (nameMap.containsKey(key)) { String newName = nameMap.getProperty(key); log.info("Upgrading property " + propertyName + " to " + newName); return newName; }
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) 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 newName = nameMap.getProperty(key);
2
			String newName = nameMap.getProperty(className);
3
			log.info("Upgrading property " + propertyName + " to " + newName);
3
			log.info("Upgrading class " + className + " to " + newName);
4
			return newName;
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)0.8
    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 newName = nameMap.getProperty(key);
    3
    String newName = nameMap.getProperty(key);
    2
    String newName = nameMap.getProperty(className);
    Differences
    Expression1Expression2Difference
    keyclassNameVARIABLE_NAME_MISMATCH
    2
    String newName = nameMap.getProperty(className);
    4
    log.info("Upgrading property " + propertyName + " to " + newName);
    4
    log.info("Upgrading property " + propertyName + " to " + newName);
    3
    log.info("Upgrading class " + className + " to " + newName);
    Differences
    Expression1Expression2Difference
    "Upgrading property ""Upgrading class "LITERAL_VALUE_MISMATCH
    propertyNameclassNameVARIABLE_NAME_MISMATCH
    3
    log.info("Upgrading class " + className + " to " + newName);
    5
    return newName;
    4
    return newName;
    Precondition Violations (1)
    Row Violation
    1Not all possible execution flows end in a return statement