void fireItemAdded(Object uid) { StoreEvent e = new StoreEvent(this, uid); // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == IStoreListener.class) { ((IStoreListener) listeners[i + 1]).itemAdded(e); } } } /** * Propagates an event to all registered listeners notifying them of a item * removal. */ protected void fireItemRemoved(Object uid) { StoreEvent e = new StoreEvent(this, uid); // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == IStoreListener.class) { ((IStoreListener) listeners[i + 1]).itemRemoved(e); } }
void fireItemRemoved(Object uid) { StoreEvent e = new StoreEvent(this, uid); // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == IStoreListener.class) { ((IStoreListener) listeners[i + 1]).itemRemoved(e); } } } /** * Propagates an event to all registered listeners notifying them of a item * change. */ protected void fireItemChanged(Object uid) { StoreEvent e = new StoreEvent(this, uid); // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == IStoreListener.class) { ((IStoreListener) listeners[i + 1]).itemChanged(e); } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/AbstractCalendarStore.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/AbstractCalendarStore.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void fireItemAdded(Object uid) {
1
void fireItemRemoved(Object uid) {
2
		StoreEvent e = new StoreEvent(this, uid);
2
		StoreEvent e = new StoreEvent(this, uid);
3
		// Guaranteed to return a non-null array
3
		// Guaranteed to return a non-null array
4
		Object[] listeners = listenerList.getListenerList();
4
		Object[] listeners = listenerList.getListenerList();
5
		// Process the listeners last to first, notifying
5
		// Process the listeners last to first, notifying
6
		// those that are interested in this event
6
		// those that are interested in this event
7
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
7
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
8
			if (listeners[i] == IStoreListener.class) {
8
			if (listeners[i] == IStoreListener.class) {
9
				((IStoreListener) listeners[i + 1]).itemAdded(e);
9
				((IStoreListener) listeners[i + 1]).itemRemoved(e);
10
			}
10
			}
11
		}
11
		}
12
	}
12
	}
13
	/**
13
	/**
14
	 * Propagates an event to all registered listeners notifying them of a item
14
	 * Propagates an event to all registered listeners notifying them of a item
15
	 * removal.
15
	 * change.
16
	 */
16
	 */
17
	protected void fireItemRemoved(Object uid) {
17
	protected void fireItemChanged(Object uid) {
18
		StoreEvent e = new StoreEvent(this, uid);
18
		StoreEvent e = new StoreEvent(this, uid);
19
		// Guaranteed to return a non-null array
19
		// Guaranteed to return a non-null array
20
		Object[] listeners = listenerList.getListenerList();
20
		Object[] listeners = listenerList.getListenerList();
21
		// Process the listeners last to first, notifying
21
		// Process the listeners last to first, notifying
22
		// those that are interested in this event
22
		// those that are interested in this event
23
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
23
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
24
			if (listeners[i] == IStoreListener.class) {
24
			if (listeners[i] == IStoreListener.class) {
25
				((IStoreListener) listeners[i + 1]).itemRemoved(e);
25
				((IStoreListener) listeners[i + 1]).itemChanged(e);
26
			}
26
			}
27
		}
27
		}
28
	
28
	
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