String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST);
java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR);
while (st.hasMoreElements()) {
String el = (String) st.nextElement();
doRemoteStop(el.trim());
}
if (action.equals(ActionNames.REMOTE_EXIT_ALL)) {
String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST);
java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR);
while (st.hasMoreElements()) {
String el = (String) st.nextElement();
doRemoteExit(el.trim());
}
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/RemoteStart.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/RemoteStart.java
|
Method name: void doAction(ActionEvent)
|
|
Method name: void doAction(ActionEvent)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
| | | 1 | if (action.equals(ActionNames.REMOTE_EXIT_ALL)) {↵
|
1 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST);↵ | | 2 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST);↵
|
2 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR);↵ | | 3 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR);↵
|
3 | while (st.hasMoreElements()) {↵ | | 4 | while (st.hasMoreElements()) {↵
|
4 | String el = (String) st.nextElement();↵ | | 5 | String el = (String) st.nextElement();↵
|
5 | doRemoteStop(el.trim());↵ | | 6 | doRemoteExit(el.trim());↵
|
6 | } | | 7 | }↵
|
| | | 8 | }
|
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 the same method |
Number of node comparisons | 12 |
-
{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) | 2.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
23 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST); | | 31 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST); |
24 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR); | | 32 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR); |
25 | while (st.hasMoreElements()) | | 33 | while (st.hasMoreElements()) |
26 | String el = (String)st.nextElement(); | | 34 | String el = (String)st.nextElement(); |
27 | | | 35 | |
Precondition Violations (4)
Row |
Violation |
1 | Expression doRemoteStop(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression doRemoteExit(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression doRemoteStop(el.trim()) is a void method call, and thus it cannot be parameterized |
4 | Expression doRemoteExit(el.trim()) is a void method call, and thus it cannot be parameterized |