CloneSet298


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
132572
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryLabelProvider.java
232613
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryLabelProvider.java
Next
Last
Clone Instance
1
Line Count
32
Source Line
572
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryLabelProvider.java

/**
 * This implements {@link ITableColorProvider}.getForeground by forwarding it to an object that implements 
 * {@link ITableItemColorProvider#getForeground ITableItemColorProvider.getForeground}
 * or failing that, an object that implements 
 * {@link IItemColorProvider#getForeground IItemColorProvider.getForeground}
 * where the columnIndex is ignored.
 */
public Color getForeground(Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProviderClass);
  // No color is a good default.
  //
  Color result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = getColorFromObject(tableItemColorProvider.getForeground(object, columnIndex));
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProviderClass);
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = getColorFromObject(itemColorProvider.getForeground(object));
    }
  }
  return result;
}


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

/**
 * This implements {@link ITableColorProvider}.getBackground by forwarding it to an object that implements 
 * {@link ITableItemColorProvider#getBackground ITableItemColorProvider.getBackground}
 * or failing that, an object that implements 
 * {@link IItemColorProvider#getBackground IItemColorProvider.getBackground}
 * where the columnIndex is ignored.
 */
public Color getBackground(Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProviderClass);
  // No color is a good default.
  //
  Color result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = getColorFromObject(tableItemColorProvider.getBackground(object, columnIndex));
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProviderClass);
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = getColorFromObject(itemColorProvider.getBackground(object));
    }
  }
  return result;
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
   * This implements {@link ITableColorProvider}.getBackground by forwarding it to an object that implements 
   * {@link ITableItemColorProvider#getBackground ITableItemColorProvider.getBackground}
   * or failing that, an object that implements 
   * {@link IItemColorProvider#getBackground IItemColorProvider.getBackground}
   * where the columnIndex is ignored.
   */
/**
   * This implements {@link ITableColorProvider}.getForeground by forwarding it to an object that implements 
   * {@link ITableItemColorProvider#getForeground ITableItemColorProvider.getForeground}
   * or failing that, an object that implements 
   * {@link IItemColorProvider#getForeground IItemColorProvider.getForeground}
   * where the columnIndex is ignored.
   */
public Color  [[#variable1725c1a0]](Object object, int columnIndex) {
  // Get the adapter from the factory.
  //
  ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProviderClass);
  // No color is a good default.
  //
  Color result = null;
  // Now we could check that the adapter implements interface ITableItemColorProvider.
  //
  if (tableItemColorProvider != null) {
    // And delegate the call.
    //
    result = getColorFromObject(tableItemColorProvider. [[#variable1725c1a0]](object, columnIndex));
  }
  // Otherwise, we could check that the adapter implements interface IItemColorProvider.
  //
  else {
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProviderClass);
    if (itemColorProvider != null) {
      // And delegate the call.
      //
      result = getColorFromObject(itemColorProvider. [[#variable1725c1a0]](object));
    }
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1725c1a0]]
getForeground 
12[[#1725c1a0]]
getBackground