String commandName = (String) iter.next(); Set commandObjects = (Set) commands.get(commandName); if (commandObjects == null) { commandObjects = new HashSet(); commands.put(commandName, commandObjects); } commandObjects.add(command);
String commandName = (String) iter.next(); Set commandObjects = (Set) commands.get(commandName); if (commandObjects == null) { commandObjects = new HashSet(); commands.put(commandName, commandObjects); } commandObjects.add(command);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/ActionRouter.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportActionRouter.java
Method name: void populateCommandMap() Method name: void populateCommandMap()
Number of AST nodes: 6 Number of AST nodes: 6
1
String commandName = (String) iter.next();
1
String commandName = (String) iter.next();
2
                            Set commandObjects = (Set) commands.get(commandName);
2
                            Set commandObjects = (Set) commands.get(commandName);
3
                            if (commandObjects == null) {
3
                            if (commandObjects == null) {
4
                                commandObjects = new HashSet();
4
                                commandObjects = new HashSet();
5
                                commands.put(commandName, commandObjects);
5
                                commands.put(commandName, commandObjects);
6
                            }
6
                            }
7
                            commandObjects.add(command);
7
                            commandObjects.add(command);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons17
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    20
    String commandName = (String)iter.next();
    20
    String commandName = (String)iter.next();
    21
    Set commandObjects = (Set)commands.get(commandName);
    21
    Set commandObjects = (Set)commands.get(commandName);
    22
    if (commandObjects == null)
    22
    if (commandObjects == null)
    23
    commandObjects = new HashSet();
    23
    commandObjects = new HashSet();
    24
    commands.put(commandName, commandObjects);
    24
    commands.put(commandName, commandObjects);
    25
    commandObjects.add(command);
    25
    commandObjects.add(command);
    Precondition Violations (0)
    Row Violation