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
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 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
    doRemoteExit(el.trim());
    35
    doRemoteExit(el.trim());
    27
    doRemoteStop(el.trim());
    Differences
    Expression1Expression2Difference
    doRemoteExitdoRemoteStopMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression doRemoteExit(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method doRemoteExit
    Expression doRemoteStop(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method doRemoteStop
    Expression doRemoteExit(el.trim()) is a void method call, and thus it cannot be parameterized
    Expression doRemoteStop(el.trim()) is a void method call, and thus it cannot be parameterized
    27
    doRemoteStop(el.trim());
    Precondition Violations (4)
    Row Violation
    1Expression doRemoteExit(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression doRemoteStop(el.trim()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression doRemoteExit(el.trim()) is a void method call, and thus it cannot be parameterized
    4Expression doRemoteStop(el.trim()) is a void method call, and thus it cannot be parameterized