if (running) { // Pass request to new proxy thread Proxy thd = (Proxy) proxyClass.newInstance(); thd.configure(clientSocket, target, pageEncodings, formEncodings); thd.start(); }
super(); mTextField = createTextField(size); mLabel = new JLabel(pLabel); mLabel.setLabelFor(mTextField); init();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/Daemon.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledTextField.java
Method name: void run() Method name: void JLabeledTextField(String, int)
Number of AST nodes: 4 Number of AST nodes: 5
1
if (running) {
2
						// Pass request to new proxy thread
3
						Proxy thd = (Proxy) proxyClass.newInstance();
4
                        thd.configure(clientSocket, target, pageEncodings, formEncodings);
5
						thd.start();
6
					}
1
super();
2
		mTextField = createTextField(size);
3
		mLabel = new JLabel(pLabel);
4
		mLabel.setLabelFor(mTextField);
5
		init();
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
Number of node comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                          
    1
    super();
                                                                            
    2
    mTextField = createTextField(size);
                                                              
    3
    mLabel = new JLabel(pLabel);
    14
    Proxy thd = (Proxy)proxyClass.newInstance();
    14
    Proxy thd = (Proxy)proxyClass.newInstance();
    Preondition Violations
    Unmatched statement Proxy thd=(Proxy)proxyClass.newInstance(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                
    15
    thd.configure(clientSocket, target, pageEncodings, formEncodings);
    15
    thd.configure(clientSocket, target, pageEncodings, formEncodings);
    5
    init();
    Differences
    Expression1Expression2Difference
    configureinitMETHOD_INVOCATION_NAME_MISMATCH
    thd.configure(clientSocket,target,pageEncodings,formEncodings)init()ARGUMENT_NUMBER_MISMATCH
    thdMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression thd.configure(clientSocket,target,pageEncodings,formEncodings) is a void method call, and thus it cannot be parameterized
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression thd.configure(clientSocket,target,pageEncodings,formEncodings) is a void method call, and thus it cannot be parameterized
    Expression init() is a void method call, and thus it cannot be parameterized
    5
    init();
    16
    thd.start();
    16
    thd.start();
    4
    mLabel.setLabelFor(mTextField);
    Differences
    Expression1Expression2Difference
    startsetLabelForMETHOD_INVOCATION_NAME_MISMATCH
    thdmLabelVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.proxy.Proxyjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    thd.start()mLabel.setLabelFor(mTextField)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression thd.start() is a void method call, and thus it cannot be parameterized
    Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    Expression thd.start() is a void method call, and thus it cannot be parameterized
    Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    4
    mLabel.setLabelFor(mTextField);
    Precondition Violations (9)
    Row Violation
    1Unmatched statement Proxy thd=(Proxy)proxyClass.newInstance(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Expression thd.configure(clientSocket,target,pageEncodings,formEncodings) is a void method call, and thus it cannot be parameterized
    3Expression init() is a void method call, and thus it cannot be parameterized
    4Expression thd.configure(clientSocket,target,pageEncodings,formEncodings) is a void method call, and thus it cannot be parameterized
    5Expression init() is a void method call, and thus it cannot be parameterized
    6Expression thd.start() is a void method call, and thus it cannot be parameterized
    7Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    8Expression thd.start() is a void method call, and thus it cannot be parameterized
    9Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized