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: 14 | Number of AST nodes: 14 | |||
1 | while (iterClasses.hasNext()) {↵ | 1 | while (iterClasses.hasNext()) {↵ | |
2 | String strClassName = (String) iterClasses.next();↵ | 2 | String strClassName = (String) iterClasses.next();↵ | |
3 | if (strClassName.startsWith("org.apache.jmeter.gui")) {↵ | 3 | if (strClassName.startsWith("org.apache.jmeter.report.gui.action")) {↵ | |
4 | // log.info("classname:: " + strClassName);↵ | |||
4 | commandClass = Class.forName(strClassName);↵ | 5 | commandClass = Class.forName(strClassName);↵ | |
5 | if (!Modifier.isAbstract(commandClass.getModifiers())) {↵ | 6 | if (!Modifier.isAbstract(commandClass.getModifiers())) {↵ | |
6 | command = (Command) commandClass.newInstance();↵ | 7 | command = (Command) commandClass.newInstance();↵ | |
7 | Iterator iter = command.getActionNames().iterator();↵ | 8 | Iterator iter = command.getActionNames().iterator();↵ | |
8 | while (iter.hasNext()) {↵ | 9 | while (iter.hasNext()) {↵ | |
9 | String commandName = (String) iter.next();↵ | 10 | String commandName = (String) iter.next();↵ | |
10 | Set commandObjects = (Set) commands.get(commandName);↵ | 11 | Set commandObjects = (Set) commands.get(commandName);↵ | |
11 | if (commandObjects == null) {↵ | 12 | if (commandObjects == null) {↵ | |
12 | commandObjects = new HashSet();↵ | 13 | commandObjects = new HashSet();↵ | |
13 | commands.put(commandName, commandObjects);↵ | 14 | commands.put(commandName, commandObjects);↵ | |
14 | }↵ | 15 | }↵ | |
15 | commandObjects.add(command);↵ | 16 | commandObjects.add(command);↵ | |
16 | }↵ | 17 | }↵ | |
17 | }↵ | 18 | }↵ | |
18 | }↵ | 19 | }↵ | |
19 | } | 20 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 45 |
Number of mapped statements | 14 |
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) | 25.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | while (iterClasses.hasNext()) | 12 | while (iterClasses.hasNext()) | |||||||||||
13 | String strClassName = (String)iterClasses.next(); | 13 | String strClassName = (String)iterClasses.next(); | |||||||||||
14 | if (strClassName.startsWith("org.apache.jmeter.gui")) |
| 14 | if (strClassName.startsWith("org.apache.jmeter.report.gui.action")) | ||||||||||
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 |
---|