if (nameMap.containsKey(key)) {
String newName = nameMap.getProperty(key);
log.info("Upgrading property " + propertyName + " to " + newName);
return newName;
}
if (nameMap.containsKey(key)) {
String newName = nameMap.getProperty(key);
log.info("Upgrading " + key + " 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 getCurrentTestName(String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (nameMap.containsKey(key)) {↵ | | 1 | if (nameMap.containsKey(key)) {↵
|
2 | String newName = nameMap.getProperty(key);↵ | | 2 | String newName = nameMap.getProperty(key);↵
|
3 | log.info("Upgrading property " + propertyName + " to " + newName);↵ | | 3 | log.info("Upgrading " + key + " to " + newName);↵
|
4 | return newName;↵ | | 4 | return newName;↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (nameMap.containsKey(key)) | | 2 | if (nameMap.containsKey(key)) |
3 | String newName = nameMap.getProperty(key); | | 3 | String newName = nameMap.getProperty(key); |
4 | log.info("Upgrading property " + propertyName + " to " + newName); | | 4 | log.info("Upgrading " + key + " to " + newName); |
5 | | | 5 | |
Precondition Violations (0)
Row |
Violation |