File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/HtmlViewerPanel.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/ObjectCache.java | |||
Method name: void fireURLChanged()
|
Method name: void fireObjectRemoved(IHasIdentifier)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
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 | HtmlViewerPanelListenerEvent evt = null;↵ | 4 | ObjectCacheChangeEvent evt = null;↵ | |
5 | for (int i = listeners.length - 2; i >= 0; i-=2 )↵ | 5 | for (int i = listeners.length - 2; i >= 0; i-=2 )↵ | |
6 | {↵ | 6 | {↵ | |
7 | if (listeners[i] == IHtmlViewerPanelListener.class)↵ | 7 | if (listeners[i] == IObjectCacheChangeListener.class)↵ | |
8 | {↵ | 8 | {↵ | |
9 | // Lazily create the event.↵ | 9 | // Lazily create the event↵ | |
10 | :↵ | |||
10 | if (evt == null)↵ | 11 | if (evt == null)↵ | |
11 | {↵ | 12 | {↵ | |
12 | evt = new HtmlViewerPanelListenerEvent(this);↵ | 13 | evt = new ObjectCacheChangeEvent(ObjectCache.this, obj);↵ | |
13 | }↵ | 14 | }↵ | |
14 | ((IHtmlViewerPanelListener)listeners[i + 1]).currentURLHasChanged(evt);↵ | 15 | ((IObjectCacheChangeListener)listeners[i + 1]).objectRemoved(evt);↵ | |
15 | }↵ | 16 | }↵ | |
16 | } | 17 | } | |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Object[] listeners = _listenerList.getListenerList(); | 1 | Object[] listeners = _listenerList.getListenerList(); | ||||||||||||||||||||||||
2 | HtmlViewerPanelListenerEvent evt = null; |
| 2 | ObjectCacheChangeEvent evt = null; | |||||||||||||||||||||||
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] == IHtmlViewerPanelListener.class) |
| 4 | if (listeners[i] == IObjectCacheChangeListener.class) | |||||||||||||||||||||||
5 | if (evt == null) |
| 5 | if (evt == null) | |||||||||||||||||||||||
6 | evt = new HtmlViewerPanelListenerEvent(this); |
| 6 | evt = new ObjectCacheChangeEvent(ObjectCache.this, obj); | |||||||||||||||||||||||
7 | ((IHtmlViewerPanelListener)listeners[i + 1]).currentURLHasChanged(evt); |
| 7 | ((IObjectCacheChangeListener)listeners[i + 1]).objectRemoved(evt); |
Row | Violation |
---|---|
1 | Expression new HtmlViewerPanelListenerEvent(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new ObjectCacheChangeEvent(ObjectCache.this,obj) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new HtmlViewerPanelListenerEvent(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new ObjectCacheChangeEvent(ObjectCache.this,obj) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression ((IHtmlViewerPanelListener)listeners[i + 1]).currentURLHasChanged(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ((IObjectCacheChangeListener)listeners[i + 1]).objectRemoved(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression ((IHtmlViewerPanelListener)listeners[i + 1]).currentURLHasChanged(evt) is a void method call, and thus it cannot be parameterized |
8 | Expression ((IObjectCacheChangeListener)listeners[i + 1]).objectRemoved(evt) is a void method call, and thus it cannot be parameterized |
9 | Expression (IHtmlViewerPanelListener)listeners[i + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression (IObjectCacheChangeListener)listeners[i + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type net.sourceforge.squirrel_sql.client.gui.IHtmlViewerPanelListener does not match with type net.sourceforge.squirrel_sql.fw.util.IObjectCacheChangeListener |
12 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.HtmlViewerPanel and net.sourceforge.squirrel_sql.fw.util.ObjectCache.CacheEntry do not have a common superclass |