private class MyAliasesListener implements IObjectCacheChangeListener { /** * An alias has been added to the cache. * * @param evt Describes the event in the cache. */ public void objectAdded(ObjectCacheChangeEvent evt) { Object obj = evt.getObject(); if (obj instanceof ISQLAlias) { addAlias((ISQLAlias)obj); } } /** * An alias has been removed from the cache. * * @param evt Describes the event in the cache. */ public void objectRemoved(ObjectCacheChangeEvent evt) { Object obj = evt.getObject(); if (obj instanceof ISQLAlias) { removeAlias((ISQLAlias)obj)
private class MyDriversListener implements IObjectCacheChangeListener { /** * A driver has been added to the cache. * * @param evt Describes the event in the cache. */ public void objectAdded(ObjectCacheChangeEvent evt) { Object obj = evt.getObject(); if (obj instanceof ISQLDriver) { addDriver((ISQLDriver)obj); } } /** * A driver has been removed from the cache. * * @param evt Describes the event in the cache. */ public void objectRemoved(ObjectCacheChangeEvent evt) { Object obj = evt.getObject(); if (obj instanceof ISQLDriver) { removeDriver((ISQLDriver)obj)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/AliasesListModel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/DriversListModel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private class MyAliasesListener implements IObjectCacheChangeListener
1
private class MyDriversListener implements IObjectCacheChangeListener
2
	{
2
	{
3
		/**
3
		/**
4
		 * An alias has been added to the cache.
4
		 * A driver has been added to the cache.
5
		 *
5
		 *
6
		 * @param   evt	 Describes the event in the cache.
6
		 * @param	evt	 Describes the event in the cache.
7
		 */
7
		 */
8
		public void objectAdded(ObjectCacheChangeEvent evt)
8
		public void objectAdded(ObjectCacheChangeEvent evt)
9
		{
9
		{
10
			Object obj = evt.getObject();
10
			Object obj = evt.getObject();
11
			if (obj instanceof ISQLAlias)
11
			if (obj instanceof ISQLDriver)
12
			{
12
			{
13
				addAlias((ISQLAlias)obj);
13
				addDriver((ISQLDriver)obj);
14
			}
14
			}
15
		}
15
		}
16
		/**
16
		/**
17
		 * An alias has been removed from the cache.
17
		 * A driver has been removed from the cache.
18
		 *
18
		 *
19
		 * @param   evt	 Describes the event in the cache.
19
		 * @param	evt	 Describes the event in the cache.
20
		 */
20
		 */
21
		public void objectRemoved(ObjectCacheChangeEvent evt)
21
		public void objectRemoved(ObjectCacheChangeEvent evt)
22
		{
22
		{
23
			Object obj = evt.getObject();
23
			Object obj = evt.getObject();
24
			if (obj instanceof ISQLAlias)
24
			if (obj instanceof ISQLDriver)
25
			{
25
			{
26
				removeAlias((ISQLAlias)obj)
26
				removeDriver((ISQLDriver)obj)
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