JPopupMenu pop = new JPopupMenu(); ReportMenuFactory.addFileMenu(pop); ReportMenuFactory.addEditMenu(pop,true); return pop;
if (running) { // Pass request to new proxy thread Proxy thd = (Proxy) proxyClass.newInstance(); thd.configure(clientSocket, target, pageEncodings, formEncodings); thd.start(); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/LineGraphGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/Daemon.java
Method name: JPopupMenu createPopupMenu() Method name: void run()
Number of AST nodes: 4 Number of AST nodes: 4
1
JPopupMenu pop = new JPopupMenu();
2
        ReportMenuFactory.addFileMenu(pop);
3
        ReportMenuFactory.addEditMenu(pop,true);
4
        return pop;
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
					}
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    JPopupMenu pop = new JPopupMenu();
    1
    JPopupMenu pop = new JPopupMenu();
    14
    Proxy thd = (Proxy)proxyClass.newInstance();
    Differences
    Expression1Expression2Difference
    javax.swing.JPopupMenuorg.apache.jmeter.protocol.http.proxy.ProxySUBCLASS_TYPE_MISMATCH
    popthdVARIABLE_NAME_MISMATCH
    javax.swing.JPopupMenuorg.apache.jmeter.protocol.http.proxy.ProxySUBCLASS_TYPE_MISMATCH
    new JPopupMenu()(Proxy)proxyClass.newInstance()TYPE_COMPATIBLE_REPLACEMENT
    14
    Proxy thd = (Proxy)proxyClass.newInstance();
    2
    ReportMenuFactory.addFileMenu(pop);
                                                                                
    3
    ReportMenuFactory.addEditMenu(pop, true);
                                                                                          
    4
    return pop;
                                
                                                                                                                                          
    15
    thd.configure(clientSocket, target, pageEncodings, formEncodings);
    Preondition Violations
    Unmatched statement thd.configure(clientSocket,target,pageEncodings,formEncodings); 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);
                                    
    16
    thd.start();
    Preondition Violations
    Unmatched statement thd.start(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    16
    thd.start();
    Precondition Violations (3)
    Row Violation
    1Unmatched statement thd.configure(clientSocket,target,pageEncodings,formEncodings); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement thd.start(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Clone fragment #1 returns variable pop with type javax.swing.JPopupMenu , while Clone fragment #2 returns variable thd with type org.apache.jmeter.protocol.http.proxy.Proxy