File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java | |||
Method name: void getRemoteItems()
|
Method name: void getRemoteItems()
|
|||
Number of AST nodes: 26 | Number of AST nodes: 26 | |||
1 | if (remoteHosts.length > 0) {↵ | 1 | if (remoteHosts.length > 0) {↵ | |
2 | remote_start = new JMenu(JMeterUtils.getResString("remote_start"));↵ | 2 | remote_start = new JMenu(JMeterUtils.getResString("remote_start")); //$NON-NLS-1$↵ | |
3 | remote_stop = new JMenu(JMeterUtils.getResString("remote_stop"));↵ | 3 | remote_stop = new JMenu(JMeterUtils.getResString("remote_stop")); //$NON-NLS-1$↵ | |
4 | remote_exit = new JMenu(JMeterUtils.getResString("remote_exit"));↵ | 4 | remote_exit = new JMenu(JMeterUtils.getResString("remote_exit")); //$NON-NLS-1$↵ | |
5 | for (int i = 0; i < remoteHosts.length; i++) {↵ | 5 | for (int i = 0; i < remoteHosts.length; i++) {↵ | |
6 | remoteHosts[i] = remoteHosts[i].trim();↵ | 6 | remoteHosts[i] = remoteHosts[i].trim();↵ | |
7 | JMenuItem item = new JMenuItem(remoteHosts[i]);↵ | 7 | JMenuItem item = new JMenuItem(remoteHosts[i]);↵ | |
8 | item.setActionCommand("remote_start");↵ | 8 | item.setActionCommand(ActionNames.REMOTE_START);↵ | |
9 | item.setName(remoteHosts[i]);↵ | 9 | item.setName(remoteHosts[i]);↵ | |
10 | item.addActionListener(ReportActionRouter.getInstance());↵ | 10 | item.addActionListener(ActionRouter.getInstance());↵ | |
11 | remote_engine_start.add(item);↵ | 11 | remote_engine_start.add(item);↵ | |
12 | remote_start.add(item);↵ | 12 | remote_start.add(item);↵ | |
13 | item = new JMenuItem(remoteHosts[i]);↵ | 13 | item = new JMenuItem(remoteHosts[i]);↵ | |
14 | item.setActionCommand("remote_stop");↵ | 14 | item.setActionCommand(ActionNames.REMOTE_STOP);↵ | |
15 | item.setName(remoteHosts[i]);↵ | 15 | item.setName(remoteHosts[i]);↵ | |
16 | item.addActionListener(ReportActionRouter.getInstance());↵ | 16 | item.addActionListener(ActionRouter.getInstance());↵ | |
17 | item.setEnabled(false);↵ | 17 | item.setEnabled(false);↵ | |
18 | remote_engine_stop.add(item);↵ | 18 | remote_engine_stop.add(item);↵ | |
19 | remote_stop.add(item);↵ | 19 | remote_stop.add(item);↵ | |
20 | item = new JMenuItem(remoteHosts[i]);↵ | 20 | item = new JMenuItem(remoteHosts[i]);↵ | |
21 | item.setActionCommand("remote_exit");↵ | 21 | item.setActionCommand(ActionNames.REMOTE_EXIT);↵ | |
22 | item.setName(remoteHosts[i]);↵ | 22 | item.setName(remoteHosts[i]);↵ | |
23 | item.addActionListener(ReportActionRouter.getInstance());↵ | 23 | item.addActionListener(ActionRouter.getInstance());↵ | |
24 | item.setEnabled(false);↵ | 24 | item.setEnabled(false);↵ | |
25 | remote_engine_exit.add(item);↵ | 25 | remote_engine_exit.add(item);↵ | |
26 | remote_exit.add(item);↵ | 26 | remote_exit.add(item);↵ | |
27 | }↵ | 27 | }↵ | |
28 | } | 28 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 500 |
Number of mapped statements | 26 |
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) | 428.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (remoteHosts.length > 0) | 1 | if (remoteHosts.length > 0) | |||||||||||||||||||
2 | remote_start = new JMenu(JMeterUtils.getResString("remote_start")); | 2 | remote_start = new JMenu(JMeterUtils.getResString("remote_start")); | |||||||||||||||||||
3 | remote_stop = new JMenu(JMeterUtils.getResString("remote_stop")); | 3 | remote_stop = new JMenu(JMeterUtils.getResString("remote_stop")); | |||||||||||||||||||
4 | remote_exit = new JMenu(JMeterUtils.getResString("remote_exit")); | 4 | remote_exit = new JMenu(JMeterUtils.getResString("remote_exit")); | |||||||||||||||||||
5 | for (int i = 0; i < remoteHosts.length; i++) | 5 | for (int i = 0; i < remoteHosts.length; i++) | |||||||||||||||||||
6 | remoteHosts[i] = remoteHosts[i].trim(); | 6 | remoteHosts[i] = remoteHosts[i].trim(); | |||||||||||||||||||
7 | JMenuItem item = new JMenuItem(remoteHosts[i]); | 7 | JMenuItem item = new JMenuItem(remoteHosts[i]); | |||||||||||||||||||
8 | item.setActionCommand("remote_start"); |
| 8 | item.setActionCommand(ActionNames.REMOTE_START); | ||||||||||||||||||
9 | item.setName(remoteHosts[i]); | 15 | item.setName(remoteHosts[i]); | |||||||||||||||||||
10 | item.addActionListener(ReportActionRouter.getInstance()); |
| 16 | item.addActionListener(ActionRouter.getInstance()); | ||||||||||||||||||
11 | remote_engine_start.add(item); | 11 | remote_engine_start.add(item); | |||||||||||||||||||
12 | remote_start.add(item); | 12 | remote_start.add(item); | |||||||||||||||||||
13 | item = new JMenuItem(remoteHosts[i]); | 20 | item = new JMenuItem(remoteHosts[i]); | |||||||||||||||||||
14 | item.setActionCommand("remote_stop"); |
| 9 | item.setName(remoteHosts[i]); | ||||||||||||||||||
15 | item.setName(remoteHosts[i]); | 22 | item.setName(remoteHosts[i]); | |||||||||||||||||||
16 | item.addActionListener(ReportActionRouter.getInstance()); |
| 23 | item.addActionListener(ActionRouter.getInstance()); | ||||||||||||||||||
17 | item.setEnabled(false); | 17 | item.setEnabled(false); | |||||||||||||||||||
18 | remote_engine_stop.add(item); | 18 | remote_engine_stop.add(item); | |||||||||||||||||||
19 | remote_stop.add(item); | 19 | remote_stop.add(item); | |||||||||||||||||||
20 | item = new JMenuItem(remoteHosts[i]); | 13 | item = new JMenuItem(remoteHosts[i]); | |||||||||||||||||||
21 | item.setActionCommand("remote_exit"); |
| 21 | item.setActionCommand(ActionNames.REMOTE_EXIT); | ||||||||||||||||||
22 | item.setName(remoteHosts[i]); |
| 14 | item.setActionCommand(ActionNames.REMOTE_STOP); | ||||||||||||||||||
23 | item.addActionListener(ReportActionRouter.getInstance()); |
| 10 | item.addActionListener(ActionRouter.getInstance()); | ||||||||||||||||||
24 | item.setEnabled(false); | 24 | item.setEnabled(false); | |||||||||||||||||||
25 | remote_engine_exit.add(item); | 25 | remote_engine_exit.add(item); | |||||||||||||||||||
26 | remote_exit.add(item); | 26 | remote_exit.add(item); |
Row | Violation |
---|---|
1 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
4 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
5 | Expression item.setActionCommand("remote_stop") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression item.setName(remoteHosts[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression item.setActionCommand("remote_stop") is a void method call, and thus it cannot be parameterized |
8 | Expression item.setName(remoteHosts[i]) is a void method call, and thus it cannot be parameterized |
9 | Expression remoteHosts[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
13 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
14 | Expression item.setName(remoteHosts[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression item.setActionCommand(ActionNames.REMOTE_STOP) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression item.setName(remoteHosts[i]) is a void method call, and thus it cannot be parameterized |
17 | Expression item.setActionCommand(ActionNames.REMOTE_STOP) is a void method call, and thus it cannot be parameterized |
18 | Expression remoteHosts[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
22 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |