CloneSet299


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32210.981method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132321
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/provider/AdapterFactoryItemDelegator.java
232358
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/provider/AdapterFactoryItemDelegator.java
Next
Last
Clone Instance
1
Line Count
32
Source Line
321
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/provider/AdapterFactoryItemDelegator.java

/**
 * This does the same thing as ITableColorProvider.getForeground.
 */
public Object getForeground(Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProvider.class );
  // No color is a good default.
  //
  Object result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = tableItemColorProvider.getForeground(object, columnIndex);
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProvider.class );
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = itemColorProvider.getForeground(object);
    }
  }
  return result;
}


First
Previous
Clone Instance
2
Line Count
32
Source Line
358
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/provider/AdapterFactoryItemDelegator.java

/**
 * This does the same thing as ITableColorProvider.getBackground.
 */
public Object getBackground(Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProvider.class );
  // No color is a good default.
  //
  Object result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = tableItemColorProvider.getBackground(object, columnIndex);
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProvider.class );
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = itemColorProvider.getBackground(object);
    }
  }
  return result;
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
   * This does the same thing as ITableColorProvider.getBackground.
   */
/**
   * This does the same thing as ITableColorProvider.getForeground.
   */
public Object  [[#variable172661c0]](Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProvider.class );
  // No color is a good default.
  //
  Object result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = tableItemColorProvider. [[#variable172661c0]](object, columnIndex);
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProvider.class );
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = itemColorProvider. [[#variable172661c0]](object);
    }
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#172661c0]]
getForeground 
12[[#172661c0]]
getBackground