res.sampleStart(); ldap.modifyTest(getUserModAttributes(), getPropertyAsString(BASE_ENTRY_DN)); res.sampleEnd();
res.sampleStart(); ldap.createTest(getUserAttributes(), getPropertyAsString(BASE_ENTRY_DN)); res.sampleEnd();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/sampler/LDAPSampler.java
Method name: void modifyTest(LdapClient, SampleResult) Method name: void addTest(LdapClient, SampleResult)
Number of AST nodes: 3 Number of AST nodes: 3
1
res.sampleStart();
1
res.sampleStart();
2
			ldap.modifyTest(getUserModAttributes(), getPropertyAsString(BASE_ENTRY_DN));
2
			ldap.createTest(getUserAttributes(), getPropertyAsString(BASE_ENTRY_DN));
3
			res.sampleEnd();
3
			res.sampleEnd();
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.0
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Non-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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    res.sampleStart();
    2
    res.sampleStart();
    3
    ldap.modifyTest(getUserModAttributes(), getPropertyAsString(BASE_ENTRY_DN));
    3
    ldap.modifyTest(getUserModAttributes(), getPropertyAsString(BASE_ENTRY_DN));
    3
    ldap.createTest(getUserAttributes(), getPropertyAsString(BASE_ENTRY_DN));
    Differences
    Expression1Expression2Difference
    getUserModAttributesgetUserAttributesMETHOD_INVOCATION_NAME_MISMATCH
    javax.naming.directory.ModificationItem[]javax.naming.directory.BasicAttributesVARIABLE_TYPE_MISMATCH
    modifyTestcreateTestMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Type javax.naming.directory.ModificationItem[] of variable getUserModAttributes() does not match with type javax.naming.directory.BasicAttributes of variable getUserAttributes()
    • Make classes javax.naming.directory.ModificationItem[] and javax.naming.directory.BasicAttributes extend a common superclass
    Expression ldap.modifyTest(getUserModAttributes(),getPropertyAsString(BASE_ENTRY_DN)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ldap.createTest(getUserAttributes(),getPropertyAsString(BASE_ENTRY_DN)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ldap.modifyTest(getUserModAttributes(),getPropertyAsString(BASE_ENTRY_DN)) is a void method call, and thus it cannot be parameterized
    Expression ldap.createTest(getUserAttributes(),getPropertyAsString(BASE_ENTRY_DN)) is a void method call, and thus it cannot be parameterized
    3
    ldap.createTest(getUserAttributes(), getPropertyAsString(BASE_ENTRY_DN));
    4
    res.sampleEnd();
    4
    res.sampleEnd();
    Precondition Violations (5)
    Row Violation
    1Type javax.naming.directory.ModificationItem[] of variable getUserModAttributes() does not match with type javax.naming.directory.BasicAttributes of variable getUserAttributes()
    2Expression ldap.modifyTest(getUserModAttributes(),getPropertyAsString(BASE_ENTRY_DN)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ldap.createTest(getUserAttributes(),getPropertyAsString(BASE_ENTRY_DN)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression ldap.modifyTest(getUserModAttributes(),getPropertyAsString(BASE_ENTRY_DN)) is a void method call, and thus it cannot be parameterized
    5Expression ldap.createTest(getUserAttributes(),getPropertyAsString(BASE_ENTRY_DN)) is a void method call, and thus it cannot be parameterized