if (getLogger().isDebugEnabled()) {
Iterator argsIt = context.getParameterNamesIterator();
while (argsIt.hasNext()) {
String name = (String) argsIt.next();
getLogger().debug(name + "=" + context.getParameter(name));
}
}
if (getLogger().isDebugEnabled()) {
Iterator argsIt = context.getParameterNamesIterator();
while (argsIt.hasNext()) {
String name = (String) argsIt.next();
getLogger().debug(name + "=" + context.getParameter(name));
}
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/test/JavaTest.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/test/SleepTest.java
|
Method name: void listParameters(JavaSamplerContext)
|
|
Method name: void listParameters(JavaSamplerContext)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (getLogger().isDebugEnabled()) {↵ | | 1 | if (getLogger().isDebugEnabled()) {↵
|
2 | Iterator argsIt = context.getParameterNamesIterator();↵ | | 2 | Iterator argsIt = context.getParameterNamesIterator();↵
|
3 | while (argsIt.hasNext()) {↵ | | 3 | while (argsIt.hasNext()) {↵
|
4 | String name = (String) argsIt.next();↵ | | 4 | String name = (String) argsIt.next();↵
|
5 | getLogger().debug(name + "=" + context.getParameter(name));↵ | | 5 | getLogger().debug(name + "=" + context.getParameter(name));↵
|
6 | }↵ | | 6 | }↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 6.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (getLogger().isDebugEnabled()) | | 1 | if (getLogger().isDebugEnabled()) |
2 | Iterator argsIt = context.getParameterNamesIterator(); | | 2 | Iterator argsIt = context.getParameterNamesIterator(); |
3 | | | 3 | |
4 | String name = (String)argsIt.next(); | | 4 | String name = (String)argsIt.next(); |
5 | getLogger().debug(name + "=" + context.getParameter(name)); | | 5 | getLogger().debug(name + "=" + context.getParameter(name)); |
Precondition Violations (0)
Row |
Violation |