super.configure(element); final HTTPSamplerBase samplerBase = (HTTPSamplerBase) element; urlConfigGui.configure(element); getImages.setSelected(samplerBase.isImageParser()); isMon.setSelected(samplerBase.isMonitor()); useMD5.setSelected(samplerBase.useMD5()); embeddedRE.setText(samplerBase.getEmbeddedUrlRE());
te.clear(); this.configureTestElement(te); BSFSampler sampler = (BSFSampler) te; sampler.setFilename(filename.getText()); sampler.setScriptLanguage((String) langField.getSelectedItem()); sampler.setParameters(parameters.getText()); sampler.setScript(scriptField.getText());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BSFSamplerGui.java
Method name: void configure(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 7 Number of AST nodes: 7
1
super
1
te.clear();
2
.configure(element);
2
		this.configureTestElement(te);
3
        final HTTPSamplerBase samplerBase = (HTTPSamplerBase) element;
3
		BSFSampler sampler
4
		urlConfigGui.configure(element);
5
		getImages.setSelected(samplerBase.isImageParser());
6
		isMon.setSelected(samplerBase.isMonitor());
7
        useMD5.setSelected(samplerBase.useMD5());
8
		embeddedRE.setText(samplerBase.getEmbeddedUrlRE
4
 = (BSFSampler) te;
5
		sampler.setFilename(filename.getText());
6
		sampler.setScriptLanguage((String) langField.getSelectedItem());
7
		sampler.setParameters(parameters.getText());
9
());
8
		sampler.setScript(scriptField.getText());
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 comparisons49
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment5
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.configure(element);
    1
    super.configure(element);
    1
    te.clear();
    Differences
    Expression1Expression2Difference
    super.configure(element)te.clear()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    Expression te.clear() is a void method call, and thus it cannot be parameterized
    1
    te.clear();
    2
    final HTTPSamplerBase samplerBase = (HTTPSamplerBase)element;
                                                                                                                                
    3
    urlConfigGui.configure(element);
    3
    urlConfigGui.configure(element);
    2
    this.configureTestElement(te);
    Differences
    Expression1Expression2Difference
    configureconfigureTestElementMETHOD_INVOCATION_NAME_MISMATCH
    elementteVARIABLE_NAME_MISMATCH
    urlConfigGuithisTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.configureTestElement(te) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression urlConfigGui.configure(element) is a void method call, and thus it cannot be parameterized
    Expression this.configureTestElement(te) is a void method call, and thus it cannot be parameterized
    2
    this.configureTestElement(te);
                                                                              
    3
    BSFSampler sampler = (BSFSampler)te;
                                                                                          
    4
    sampler.setFilename(filename.getText());
    4
    getImages.setSelected(samplerBase.isImageParser());
                                                                                                                
                                                                                                                                        
    5
    sampler.setScriptLanguage((String)langField.getSelectedItem());
    5
    isMon.setSelected(samplerBase.isMonitor());
                                                                                                
                                                                                                  
    6
    sampler.setParameters(parameters.getText());
    6
    useMD5.setSelected(samplerBase.useMD5());
                                                                                            
                                                                                            
    7
    sampler.setScript(scriptField.getText());
    7
    embeddedRE.setText(samplerBase.getEmbeddedUrlRE());
                                                                                                                
    Precondition Violations (5)
    Row Violation
    1Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    2Expression te.clear() is a void method call, and thus it cannot be parameterized
    3Expression this.configureTestElement(te) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression urlConfigGui.configure(element) is a void method call, and thus it cannot be parameterized
    5Expression this.configureTestElement(te) is a void method call, and thus it cannot be parameterized