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: 11 | Number of AST nodes: 11 | |||
1 | commandClass = Class.forName(strClassName);↵ | 1 | commandClass = Class.forName(strClassName);↵ | |
2 | if (!Modifier.isAbstract(commandClass.getModifiers())) {↵ | 2 | if (!Modifier.isAbstract(commandClass.getModifiers())) {↵ | |
3 | command = (Command) commandClass.newInstance();↵ | 3 | command = (Command) commandClass.newInstance();↵ | |
4 | Iterator iter = command.getActionNames().iterator();↵ | 4 | Iterator iter = command.getActionNames().iterator();↵ | |
5 | while (iter.hasNext()) {↵ | 5 | while (iter.hasNext()) {↵ | |
6 | String commandName = (String) iter.next();↵ | 6 | String commandName = (String) iter.next();↵ | |
7 | Set commandObjects = (Set) commands.get(commandName);↵ | 7 | Set commandObjects = (Set) commands.get(commandName);↵ | |
8 | if (commandObjects == null) {↵ | 8 | if (commandObjects == null) {↵ | |
9 | commandObjects = new HashSet();↵ | 9 | commandObjects = new HashSet();↵ | |
10 | commands.put(commandName, commandObjects);↵ | 10 | commands.put(commandName, commandObjects);↵ | |
11 | }↵ | 11 | }↵ | |
12 | commandObjects.add(command);↵ | 12 | commandObjects.add(command);↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 39 |
Number of mapped statements | 11 |
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) | 16.1 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
15 | commandClass = Class.forName(strClassName); | 15 | commandClass = Class.forName(strClassName); | |
16 | if (!Modifier.isAbstract(commandClass.getModifiers())) | 16 | if (!Modifier.isAbstract(commandClass.getModifiers())) | |
17 | command = (Command)commandClass.newInstance(); | 17 | command = (Command)commandClass.newInstance(); | |
18 | Iterator iter = command.getActionNames().iterator(); | 18 | Iterator iter = command.getActionNames().iterator(); | |
19 | while (iter.hasNext()) | 19 | while (iter.hasNext()) | |
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); |
Row | Violation |
---|