CloneSet176


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
42230.964nested_class_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
142306
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/PropertyDescriptor.java
242355
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/PropertyDescriptor.java
Next
Last
Clone Instance
1
Line Count
42
Source Line
306
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/PropertyDescriptor.java

/**
 * This cell editor ensures that only Integer values are supported
 * @deprecated
 */
@Deprecated public static class IntegerCellEditor extends TextCellEditor {
  public IntegerCellEditor(Composite composite) {
    super(composite);
    setValidator(new ICellEditorValidator() {
                   public String isValid(Object object) {
                     if (object instanceof Integer) {
                       return null;
                     }
                     else {
                       String string = (String) object;
                       try {
                         Integer.parseInt(string);
                         return null;
                       }
                       catch (NumberFormatException
                              exception) {
                         return exception.getMessage();
                       }
                     }
                   }
                 } );
  }

  @Override public Object doGetValue() {
    return new Integer(Integer.parseInt((String) super.doGetValue()));
  }

  @Override public void doSetValue(Object value) {
    super.doSetValue(value.toString());
  }
}


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

/**
 * This cell editor ensures that only Float values are supported
 * @deprecated
 */
@Deprecated public static class FloatCellEditor extends TextCellEditor {
  public FloatCellEditor(Composite composite) {
    super(composite);
    setValidator(new ICellEditorValidator() {
                   public String isValid(Object object) {
                     if (object instanceof Float) {
                       return null;
                     }
                     else {
                       String string = (String) object;
                       try {
                         Float.parseFloat(string);
                         return null;
                       }
                       catch (NumberFormatException
                              exception) {
                         return exception.getMessage();
                       }
                     }
                   }
                 } );
  }

  @Override public Object doGetValue() {
    return new Float(Float.parseFloat((String) super.doGetValue()));
  }

  @Override public void doSetValue(Object value) {
    super.doSetValue(value.toString());
  }
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
   * This cell editor ensures that only Float values are supported
   * @deprecated
   */
/**
   * This cell editor ensures that only Integer values are supported
   * @deprecated
   */
@Deprecated public static class [[#variable17200580]]extends TextCellEditor {
  public [[#variable17200580]](Composite composite) {
    super(composite);
    setValidator(new ICellEditorValidator() {
                   public String isValid(Object object) {
                     if (object instanceof [[#variable17200520]]) {
                       return null;
                     }
                     else {
                       String string = (String) object;
                       try {
                          [[#variable17200520]]. [[#variable17200360]](string);
                         return null;
                       }
                       catch (NumberFormatException
                              exception) {
                         return exception.getMessage();
                       }
                     }
                   }
                 } );
  }

  @Override public Object doGetValue() {
    return new [[#variable17200520]]( [[#variable17200520]]. [[#variable17200360]]((String) super.doGetValue()));
  }

  @Override public void doSetValue(Object value) {
    super.doSetValue(value.toString());
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#17200580]]
IntegerCellEditor 
12[[#17200580]]
FloatCellEditor 
21[[#17200520]]
Integer 
22[[#17200520]]
Float 
31[[#17200360]]
parseInt 
32[[#17200360]]
parseFloat