File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/ContextSearchManager.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/TableController.java | |||
Method name: void fireResultArrived(String)
|
Method name: void fireMessageListSelectionChangedEvent(List
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | final IContextResultEvent e = new ContextResultEvent(this, providerName);↵ | |||
2 | ↵ | 1 | IMessageListSelectionEvent e = new MessageListSelectionEvent(this, messageIds);↵ | |
3 | // Guaranteed to return a non-null array↵ | 2 | // Guaranteed to return a non-null array↵ | |
4 | final Object[] listeners = listenerList.getListenerList();↵ | 3 | Object[] listeners = listenerList.getListenerList();↵ | |
5 | // Process the listeners last to first, notifying↵ | 4 | // Process the listeners last to first, notifying↵ | |
6 | // those that are interested in this event↵ | 5 | // those that are interested in this event↵ | |
7 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵ | 6 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵ | |
8 | if (listeners[i] == IContextResultListener.class) {↵ | 7 | if (listeners[i] == I↵ | |
9 | ((IContextResult↵ | 8 | MessageListSelectionListener.class) {↵ | |
10 | Listener) listeners[i + 1]).resultArrived(e);↵ | 9 | ((IMessageListSelectionListener) listeners[i + 1]).↵ | |
11 | }↵ | |||
12 | ↵ | 10 | selectionChanged(e);↵ | |
11 | }↵ | |||
13 | } | 12 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | IMessageListSelectionEvent e = new MessageListSelectionEvent(this, messageIds); | ||||||||||||||||||||||||||
1 | final IContextResultEvent e = new ContextResultEvent(this, providerName); | | ||||||||||||||||||||||||||
| 2 | Object[] listeners = listenerList.getListenerList(); | ||||||||||||||||||||||||||
2 | final Object[] listeners = listenerList.getListenerList(); | | ||||||||||||||||||||||||||
3 | for (int i = listeners.length - 2; i >= 0; i -= 2) | 3 | for (int i = listeners.length - 2; i >= 0; i -= 2) | |||||||||||||||||||||||||
4 | if (listeners[i] == IContextResultListener.class) | 4 | if (listeners[i] == IMessageListSelectionListener.class) | |||||||||||||||||||||||||
5 | ((IContextResultListener)listeners[i + 1]).resultArrived(e); |
| 5 | ((IMessageListSelectionListener)listeners[i + 1]).selectionChanged(e); |
Row | Violation |
---|---|
1 | Expression ((IContextResultListener)listeners[i + 1]).resultArrived(e) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((IMessageListSelectionListener)listeners[i + 1]).selectionChanged(e) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((IContextResultListener)listeners[i + 1]).resultArrived(e) is a void method call, and thus it cannot be parameterized |
4 | Expression ((IMessageListSelectionListener)listeners[i + 1]).selectionChanged(e) is a void method call, and thus it cannot be parameterized |
5 | Type org.columba.core.context.api.IContextResultEvent of variable e does not match with type org.columba.mail.gui.table.IMessageListSelectionEvent of variable e |
6 | Expression (IContextResultListener)listeners[i + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression (IMessageListSelectionListener)listeners[i + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.columba.core.context.api.IContextResultListener of variable (IContextResultListener)listeners[i + 1] does not match with type org.columba.mail.gui.table.IMessageListSelectionListener of variable (IMessageListSelectionListener)listeners[i + 1] |