public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setBorder((cellHasFocus) ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder); // id = org.columba.example.HelloWorld$HelloWorldPlugin String id = (String) value; IExtension extension = pluginHandler.getExtension(id); String userVisibleName = extension.getMetadata().getId(); setText(userVisibleName); return this;
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setBorder((cellHasFocus) ? UIManager .getBorder("List.focusCellHighlightBorder") : noFocusBorder); // id = org.columba.example.HelloWorld$HelloWorldPlugin String id = (String) value; IExtension extension = pluginHandler.getExtension(id); String userVisibleName = extension.getMetadata().getId(); setText(userVisibleName); return this;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/importfilter/PluginListCellRenderer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/mailboximport/PluginListCellRenderer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public Component getListCellRendererComponent(JList list, Object value,
1
public Component getListCellRendererComponent(JList list, Object value,
2
        int index, boolean isSelected, boolean cellHasFocus) {
2
			int index, boolean isSelected, boolean cellHasFocus) {
3
        if (isSelected) {
3
		if (isSelected) {
4
            setBackground(list.getSelectionBackground());
4
			setBackground(list.getSelectionBackground());
5
            setForeground(list.getSelectionForeground());
5
			setForeground(list.getSelectionForeground());
6
        } else {
6
		} else {
7
            setBackground(list.getBackground());
7
			setBackground(list.getBackground());
8
            setForeground(list.getForeground());
8
			setForeground(list.getForeground());
9
        }
10
        
9
		}
11
setBorder((cellHasFocus)
10
		setBorder((cellHasFocus)
12
            ? UIManager
11
 ? UIManager
13
.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
12
				.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
14
        // id = org.columba.example.HelloWorld$HelloWorldPlugin
13
		// id = org.columba.example.HelloWorld$HelloWorldPlugin
15
        String id = (String) value;
14
		String id = (String) value;
16
        IExtension extension = pluginHandler.getExtension(id);
15
		IExtension extension = pluginHandler.getExtension(id);
17
        String userVisibleName = extension.getMetadata().getId();
16
		String userVisibleName = extension.getMetadata().getId();
18
        setText(userVisibleName);
17
		setText(userVisibleName);
19
        return this;
18
		return this;
20
    
19
	
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