public void setAdapterFactory(AdapterFactory adapterFactory) { if (this.adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier)this.adapterFactory).removeListener(this); } if (adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier)adapterFactory).addListener(this); } this.adapterFactory = adapterFactory; } /** * This returns the wrapped factory. */ public AdapterFactory getAdapterFactory() { return adapterFactory;
public void setAdapterFactory(AdapterFactory adapterFactory) { if (this.adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier)this.adapterFactory).removeListener(this); } if (adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier)adapterFactory).addListener(this); } this.adapterFactory = adapterFactory; } /** * Return the default font. */ public Font getDefaultFont() { return defaultFont;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryContentProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryLabelProvider.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void setAdapterFactory(AdapterFactory adapterFactory)
1
public void setAdapterFactory(AdapterFactory adapterFactory)
2
  {
2
  {
3
    if (this.adapterFactory instanceof IChangeNotifier)
3
    if (this.adapterFactory instanceof IChangeNotifier)
4
    {
4
    {
5
      ((IChangeNotifier)this.adapterFactory).removeListener(this);
5
      ((IChangeNotifier)this.adapterFactory).removeListener(this);
6
    }
6
    }
7
    if (adapterFactory instanceof IChangeNotifier)
7
    if (adapterFactory instanceof IChangeNotifier)
8
    {
8
    {
9
      ((IChangeNotifier)adapterFactory).addListener(this);
9
      ((IChangeNotifier)adapterFactory).addListener(this);
10
    }
10
    }
11
    this.adapterFactory = adapterFactory;
11
    this.adapterFactory = adapterFactory;
12
  }
12
  }
13
  /**
13
  /**
14
   * This returns the wrapped factory.
14
   * Return the default font.
15
   */
15
   */
16
  public AdapterFactory getAdapterFactory()
16
  public Font getDefaultFont()
17
  {
17
  {
18
    return adapterFactory;
18
    return defaultFont;
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