item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none")); item.setEnabled(false); add(item); return;
item = new NSMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none"),null,""); item.setEnabled(false); addItem(item); return;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/jars/MacOS/macos/menu/ShowRecentDirMenu.java File path: /jEdit-4.2/jars/MacOS/macos/Delegate.java
Method name: void construct() Method name: void updateMenu()
Number of AST nodes: 4 Number of AST nodes: 4
1
item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none"));
1
item = new NSMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none"),null,"");
2
			item.setEnabled(false);
2
				item.setEnabled(false);
3
			add(item);
3
				addItem(item);
4
			return;
4
				return;
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 comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none"));
                                                                                                                                                            
                                                                                                                                                                          
    10
    item = new NSMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none"), null, "");
    7
    item.setEnabled(false);
    7
    item.setEnabled(false);
    11
    item.setEnabled(false);
    Differences
    Expression1Expression2Difference
    javax.swing.JMenuItemcom.apple.cocoa.application.NSMenuItemVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.JMenuItem of variable item does not match with type com.apple.cocoa.application.NSMenuItem of variable item
    • Make classes javax.swing.JMenuItem and com.apple.cocoa.application.NSMenuItem extend a common superclass
    11
    item.setEnabled(false);
    8
    add(item);
                              
                                        
    12
    addItem(item);
    9
    return;
    9
    return;
    13
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    13
    return;
    Precondition Violations (3)
    Row Violation
    1Type javax.swing.JMenuItem of variable item does not match with type com.apple.cocoa.application.NSMenuItem of variable item
    2Conditional return;
    3Conditional return;