CloneSet429


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28210.981method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
129232
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDouble.java
228236
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeFloat.java
Next
Last
Clone Instance
1
Line Count
29
Source Line
232
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDouble.java

/**
 * Implement the interface for validating and converting to internal object.
 * Null is a valid successful return, so errors are indicated only by
 * existance or not of a message in the messageBuffer.
 */
public Object validateAndConvert(String value, Object originalValue, StringBuffer messageBuffer) {
  // handle null, which is shown as the special string "<null>"
  if (value.equals("<null>") || value.equals(""))
    return null;
  // Do the conversion into the object in a safe manner
  try {
    Double obj;
    if (useJavaDefaultFormat) {
      obj = new Double(value);
    }
    else {
      obj = new Double("" + _numberFormat.parse(value));
    }
    return obj;
  }
  catch (Exception
         e) {
    messageBuffer.append(e.toString() + "\n");
    //?? do we need the message also, or is it automatically part of the toString()?
    //messageBuffer.append(e.getMessage());
    return null;
  }
}


First
Previous
Clone Instance
2
Line Count
28
Source Line
236
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeFloat.java

/**
 * Implement the interface for validating and converting to internal object.
 * Null is a valid successful return, so errors are indicated only by
 * existance or not of a message in the messageBuffer.
 */
public Object validateAndConvert(String value, Object originalValue, StringBuffer messageBuffer) {
  // handle null, which is shown as the special string "<null>"
  if (value.equals("<null>") || value.equals(""))
    return null;
  // Do the conversion into the object in a safe manner
  try {
    Float obj;
    if (useJavaDefaultFormat) {
      obj = new Float(value);
    }
    else {
      obj = new Float("" + _numberFormat.parse(value));
    }
    return obj;
  }
  catch (Exception
         e) {
    messageBuffer.append(e.toString() + "\n");
    //?? do we need the message also, or is it automatically part of the toString()?
    //messageBuffer.append(e.getMessage());
    return null;
  }
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
    * Implement the interface for validating and converting to internal object.
    * Null is a valid successful return, so errors are indicated only by
    * existance or not of a message in the messageBuffer.
    */
public Object validateAndConvert(String value, Object originalValue, StringBuffer messageBuffer) {
  // handle null, which is shown as the special string "<null>"
  if (value.equals("<null>") || value.equals(""))
    return null;
  // Do the conversion into the object in a safe manner
  try {
     [[#variable1ce3cb80]] obj;
    if (useJavaDefaultFormat) {
      obj = new [[#variable1ce3cb80]](value);
    }
    else {
      obj = new [[#variable1ce3cb80]]("" + _numberFormat.parse(value));
    }
    return obj;
  }
  catch (Exception
         e) {
    messageBuffer.append(e.toString() + "\n");
    //?? do we need the message also, or is it automatically part of the toString()?
    //messageBuffer.append(e.getMessage());
    return null;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1ce3cb80]]
Double 
12[[#1ce3cb80]]
Float