if (running) { // Pass request to new proxy thread Proxy thd = (Proxy) proxyClass.newInstance(); thd.configure(clientSocket, target, pageEncodings, formEncodings); thd.start(); }
if (menu.isSelected()) { menu.setPopupMenuVisible(false); menu.setSelected(false); break; }
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/jmeter/gui/ReportMainFrame.java
Method name: void run() Method name: void closeMenu()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (running) {
1
if (
2
						// Pass request to new proxy thread
3
						Proxy thd = (Proxy) proxyClass.newInstance();
4
                        thd.configure(clientSocket, target, pageEncodings, formEncodings);
5
						thd.start();
6
					
2
menu.isSelected()) {
3
                        menu.setPopupMenuVisible(false);
4
                        menu.setSelected(false);
5
                        break;
7
}
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.1
Clones locationClones are in different classes
Number of node comparisons17
  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 fragment3
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    if (running)
    13
    if (running)
    6
    if (menu.isSelected())
    Differences
    Expression1Expression2Difference
    runningmenu.isSelected()TYPE_COMPATIBLE_REPLACEMENT
    6
    if (menu.isSelected())
                                                                          
    7
    menu.setPopupMenuVisible(false);
                                                          
    8
    menu.setSelected(false);
                      
    9
    break;
    Preondition Violations
    Unmatched break;
    9
    break;
    14
    Proxy thd = (Proxy)proxyClass.newInstance();
                                                                                                
    15
    thd.configure(clientSocket, target, pageEncodings, formEncodings);
                                                                                                                                          
    16
    thd.start();
                                    
    Precondition Violations (1)
    Row Violation
    1Unmatched break;