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());
}
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());
}
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: 5
|
|
1 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST);↵ | | 1 | 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);↵ | | 2 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR);↵
|
3 | while (st.hasMoreElements()) {↵ | | 3 | while (st.hasMoreElements()) {↵
|
4 | String el = (String) st.nextElement();↵ | | 4 | String el = (String) st.nextElement();↵
|
5 | doRemoteExit(el.trim());↵ | | 5 | doRemoteStop(el.trim());↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 12 |
-
{Non-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) | 1.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
31 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST); | | 23 | String remote_hosts_string = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST); |
32 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR); | | 24 | java.util.StringTokenizer st = new java.util.StringTokenizer(remote_hosts_string, REMOTE_HOSTS_SEPARATOR); |
33 | while (st.hasMoreElements()) | | 25 | while (st.hasMoreElements()) |
34 | String el = (String)st.nextElement(); | | 26 | String el = (String)st.nextElement(); |
35 | | | 27 | |
Precondition Violations (4)
Row |
Violation |
1 | Expression doRemoteExit(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression doRemoteStop(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression doRemoteExit(el.trim()) is a void method call, and thus it cannot be parameterized |
4 | Expression doRemoteStop(el.trim()) is a void method call, and thus it cannot be parameterized |