super.getListCellRendererComponent(list,value,index, isSelected,cellHasFocus); IconListEntry icon = (IconListEntry)value; setIcon(icon.icon); return this;
super.getListCellRendererComponent(list,value,index, isSelected,cellHasFocus); Button button = (Button)value; setIcon(button.icon); return this;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean) Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
super.getListCellRendererComponent(list,value,index,
1
super.getListCellRendererComponent(list,value,index,
2
				isSelected,cellHasFocus);
2
				isSelected,cellHasFocus);
3
			IconListEntry icon = (IconListEntry)value;
3
			Button button = (Button)value;
4
			setIcon(icon.icon);
4
			setIcon(button.icon);
5
			return this;
5
			return this;
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 the same java file
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    1
    super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                                                                  
    2
    Button button = (Button)value;
    2
    IconListEntry icon = (IconListEntry)value;
                                                                                          
    3
    setIcon(icon.icon);
    3
    setIcon(icon.icon);
    3
    setIcon(button.icon);
    Differences
    Expression1Expression2Difference
    iconbuttonVARIABLE_NAME_MISMATCH
    org.gjt.sp.jedit.options.ToolBarOptionPane.IconListEntryorg.gjt.sp.jedit.options.ToolBarOptionPane.ButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.gjt.sp.jedit.options.ToolBarOptionPane.IconListEntry of variable icon does not match with type org.gjt.sp.jedit.options.ToolBarOptionPane.Button of variable button
    • Make classes org.gjt.sp.jedit.options.ToolBarOptionPane.IconListEntry and org.gjt.sp.jedit.options.ToolBarOptionPane.Button extend a common superclass
    3
    setIcon(button.icon);
    4
    return this;
    4
    return this;
    Precondition Violations (1)
    Row Violation
    1Type org.gjt.sp.jedit.options.ToolBarOptionPane.IconListEntry of variable icon does not match with type org.gjt.sp.jedit.options.ToolBarOptionPane.Button of variable button