void addContact(IContactItem item) { if (item == null) throw new IllegalArgumentException("item == null"); list.add(item); } /* (non-Javadoc) * @see org.columba.addressbook.facade.IGroupItem#removeContact(org.columba.addressbook.facade.IContactItem) */ public void removeContact(IContactItem item) { if (item == null) throw new IllegalArgumentException("item == null"); list.remove(item); } /* (non-Javadoc) * @see org.columba.addressbook.facade.IGroupItem#getContactCount() */ public int getContactCount() { return list.size(); }
void addContact(IContactModelPartial modelPartial) { if ( modelPartial == null ) throw new IllegalArgumentException("modelPartial == null"); list.add(modelPartial); } public void removeContact(IContactModelPartial modelPartial) { if ( modelPartial == null ) throw new IllegalArgumentException("modelPartial == null"); list.remove(modelPartial); } public int getContactCount() { return list.size(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact-facade/src/main/java/org/columba/addressbook/facade/GroupItem.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/GroupModelPartial.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void addContact(IContactItem item) {
1
void addContact(IContact
2
		if (item
2
ModelPartial modelPartial) {
3
 == null)
3
		if ( modelPartial == null
4
			throw new IllegalArgumentException("item == null");
4
 ) throw new IllegalArgumentException("modelPartial == null");
5
		
5
		
6
list.add(item);
6
		list.add(
7
	}
8
	/* (non-Javadoc)
9
	 * @see org.columba.addressbook.facade.IGroupItem#removeContact(org.columba.addressbook.facade.IContactItem)
10
	 */
7
modelPartial);
8
	}
11
	public void removeContact(IContactItem item) {
9
	public void removeContact(IContact
12
		if (item
10
ModelPartial modelPartial) {
13
 == null)
11
		if ( modelPartial == null
14
			throw new IllegalArgumentException("item == null");
12
 ) throw new IllegalArgumentException("modelPartial == null");
15
		
13
		
16
list.remove(item);
14
		list.remove(
17
	}
18
	/* (non-Javadoc)
19
	 * @see org.columba.addressbook.facade.IGroupItem#getContactCount()
20
	 */
15
modelPartial);
16
	}
21
	public int getContactCount() {
17
	public int getContactCount() {
22
		return list.size();
18
		return list.size();
23
	}
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