if (localHostIP == null) { getLocalHostDetails(); } return localHostIP;
if (localHostName == null) { getLocalHostDetails(); } return localHostName;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/JMeterUtils.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/JMeterUtils.java
Method name: String getLocalHostIP() Method name: String getLocalHostName()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (localHostIP == null) {
1
if (localHostName == null) {
2
			getLocalHostDetails();
2
			getLocalHostDetails();
3
		}
3
		}
4
		return localHostIP;
4
		return localHostName;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (localHostIP == null)
    1
    if (localHostIP == null)
    1
    if (localHostName == null)
    Differences
    Expression1Expression2Difference
    localHostIPlocalHostNameVARIABLE_NAME_MISMATCH
    1
    if (localHostName == null)
    2
    getLocalHostDetails();
    2
    getLocalHostDetails();
    3
    return localHostIP;
    3
    return localHostIP;
    3
    return localHostName;
    Differences
    Expression1Expression2Difference
    localHostIPlocalHostNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression localHostIP cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression localHostName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    return localHostName;
    Precondition Violations (2)
    Row Violation
    1Expression localHostIP cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression localHostName cannot be parameterized, because it has dependencies to/from statements that will be extracted