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] == IResultListener.class) { ((IResultListener) listeners[i + 1]).resultArrived(e); } } } protected void fireFinished() { IResultEvent e = new ResultEvent(this); // 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] == IResultListener.class) { ((IResultListener) listeners[i + 1]).finished(e); } } }
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] == IResultListener.class) { ((IResultListener) listeners[i + 1]).clearSearch(e); } } } protected void fireReset() { IResultEvent e = new ResultEvent(this); // 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] == IResultListener.class) { ((IResultListener) listeners[i + 1]).reset(e); } } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
Object[] listeners = listenerList.getListenerList();
1
Object[] listeners = listenerList.getListenerList();
2
		// Process the listeners last to first, notifying
2
		// Process the listeners last to first, notifying
3
		// those that are interested in this event
3
		// those that are interested in this event
4
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
4
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
5
			if (listeners[i] == IResultListener.class) {
5
			if (listeners[i] == IResultListener.class) {
6
				((IResultListener) listeners[i + 1]).resultArrived(e);
6
				((IResultListener) listeners[i + 1]).clearSearch(e);
7
			}
7
			}
8
		}
8
		}
9
	}
9
	}
10
	protected void fireFinished() {
10
	protected void fireReset() {
11
		IResultEvent e = new ResultEvent(this);
11
		IResultEvent e = new ResultEvent(this);
12
		// Guaranteed to return a non-null array
12
		// Guaranteed to return a non-null array
13
		Object[] listeners = listenerList.getListenerList();
13
		Object[] listeners = listenerList.getListenerList();
14
		// Process the listeners last to first, notifying
14
		// Process the listeners last to first, notifying
15
		// those that are interested in this event
15
		// those that are interested in this event
16
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
16
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
17
			if (listeners[i] == IResultListener.class) {
17
			if (listeners[i] == IResultListener.class) {
18
				((IResultListener) listeners[i + 1]).finished(e);
18
				((IResultListener) listeners[i + 1]).reset(e);
19
			}
19
			}
20
		}
20
		}
21
	}
21
	}
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