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()); } ISearchResult result = (ISearchResult) value; titleLabel.setText(result.getTitle()); iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER)); descriptionLabel.setText(result.getDescription()); 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()); } IContactModelPartial result = (IContactModelPartial) value; titleLabel.setText(result.getName()); iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER)); descriptionLabel.setText(result.getAddress()); return this;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/search/SearchResultList.java File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/gui/box/ContactList.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
			}
9
			}
10
			ISearchResult result = (ISearchResult) value;
10
			IContactModelPartial result = (IContactModelPartial) value;
11
			titleLabel.setText(result.getTitle());
11
			titleLabel.setText(result.getName());
12
			iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER));
12
			iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER));
13
			descriptionLabel.setText(result.getDescription());
13
			descriptionLabel.setText(result.getAddress());
14
			return this;
14
			return this;
15
		
15
		
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