context = JMeterContextService.getContext(); mod = new URLRewritingModifier(); mod.setThreadContext(context);
super.setUp(); jmctx = JMeterContextService.getContext(); man = new CookieManager(); man.setThreadContext(jmctx);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java
Method name: void setUp() Method name: void setUp()
Number of AST nodes: 3 Number of AST nodes: 4
1
context
1
super.setUp();
2
 = JMeterContextService.getContext();
2
            jmctx = JMeterContextService.getContext();
3
			mod = new URLRewritingModifier();
4
			mod
3
            man = new CookieManager();
5
.setThreadContext(context);
4
            man.setThreadContext(jmctx);
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 in different classes having the same super class
Number of node comparisons5
  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 fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                      
    1
    super.setUp();
    1
    context = JMeterContextService.getContext();
    1
    context = JMeterContextService.getContext();
    2
    jmctx = JMeterContextService.getContext();
    Differences
    Expression1Expression2Difference
    contextjmctxVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression context is a field being modified, and thus it cannot be parameterized
    Expression jmctx is a field being modified, and thus it cannot be parameterized
    2
    jmctx = JMeterContextService.getContext();
    2
    mod = new URLRewritingModifier();
    2
    mod = new URLRewritingModifier();
    3
    man = new CookieManager();
    Differences
    Expression1Expression2Difference
    modmanVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.modifier.URLRewritingModifierorg.apache.jmeter.protocol.http.control.CookieManagerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.modifier.URLRewritingModifierorg.apache.jmeter.protocol.http.control.CookieManagerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression mod is a field being modified, and thus it cannot be parameterized
    Expression man is a field being modified, and thus it cannot be parameterized
    3
    man = new CookieManager();
    3
    mod.setThreadContext(context);
    3
    mod.setThreadContext(context);
    4
    man.setThreadContext(jmctx);
    Differences
    Expression1Expression2Difference
    contextjmctxVARIABLE_NAME_MISMATCH
    modmanVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.modifier.URLRewritingModifierorg.apache.jmeter.protocol.http.control.CookieManagerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression context cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression jmctx cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression mod cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression man cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    man.setThreadContext(jmctx);
    Precondition Violations (8)
    Row Violation
    1Expression context is a field being modified, and thus it cannot be parameterized
    2Expression jmctx is a field being modified, and thus it cannot be parameterized
    3Expression mod is a field being modified, and thus it cannot be parameterized
    4Expression man is a field being modified, and thus it cannot be parameterized
    5Expression context cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression jmctx cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression mod cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression man cannot be parameterized, because it has dependencies to/from statements that will be extracted