class ButtonCellRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list,value,index, isSelected,cellHasFocus); Button button = (Button)value; setIcon(button.icon); return this; } }
class IconCellRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list,value,index, isSelected,cellHasFocus); IconListEntry icon = (IconListEntry)value; setIcon(icon.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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
class ButtonCellRenderer extends DefaultListCellRenderer
1
class IconCellRenderer extends DefaultListCellRenderer
2
	{
2
	{
3
		public Component getListCellRendererComponent(JList list,
3
		public Component getListCellRendererComponent(JList list,
4
			Object value, int index, boolean isSelected,
4
			Object value, int index, boolean isSelected,
5
			boolean cellHasFocus)
5
			boolean cellHasFocus)
6
		{
6
		{
7
			super.getListCellRendererComponent(list,value,index,
7
			super.getListCellRendererComponent(list,value,index,
8
				isSelected,cellHasFocus);
8
				isSelected,cellHasFocus);
9
			Button button = (Button)value;
9
			IconListEntry icon = (IconListEntry)value;
10
			setIcon(button.icon);
10
			setIcon(icon.icon);
11
			return this;
11
			return this;
12
		}
12
		}
13
	}
13
	}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0