CloneSet380


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
92330.974class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1117454
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeJavaObject.java
295436
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeOther.java
392425
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeUnknown.java
Next
Last
Clone Instance
1
Line Count
117
Source Line
454
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeJavaObject.java

/*
 * File IO related functions
 */
/**
 * Say whether or not object can be exported to and imported from
 * a file.  We put both export and import together in one test
 * on the assumption that all conversions can be done both ways.
 */
public boolean canDoFileIO() {
  return false;
}

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be printable text characters,
 * possibly including newlines and tabs but not characters
 * that would require a binary representation to display
 * to user.
 */
public String importObject(FileInputStream inStream) throws IOException {
  /*               You can try those code:
                 java.io.ObjectInputStream objectInputStream = null;
                 try {
                     objectInputStream = new java.io.ObjectInputStream(inStream);
                     return objectInputStream.readObject()+"";
                 }catch (ClassNotFoundException cnfe) {
  //                 throw new IOException("Class not found: "+ cnfe.toString()+" while reading serialized object");
                   throw new IOException("Can not import data type JAVA_OBJECT");
                 }catch (IOException ioe) {
  //                 throw new IOException( ioe.toString() +" while reading serialized object");
                   throw new IOException("Can not import data type JAVA_OBJECT");
                 }               */
  throw new IOException("Can not import data type JAVA_OBJECT");
}

/**
 * Construct an appropriate external representation of the object
 * and write it to a file.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the given text
 * text from a Popup JTextArea can be converted to an object.
 * This text-to-object conversion is the same as validateAndConvertInPopup,
 * which may be used internally by the object to do the validation.
 * <P>
 * The DataType object must flush and close the output stream before returning.
 * Typically it will create another object (e.g. an OutputWriter), and
 * that is the object that must be flushed and closed.
 *
 * <P>
 * File is assumed to be printable text characters,
 * possibly including newlines and tabs but not characters
 * that would require a binary representation to display
 * to user.
 */
public void exportObject(FileOutputStream outStream, String text) throws IOException {
  /* You can try those code:
                 java.io.ObjectOutputStream objectOutputStream=null;
                 try {
                     objectOutputStream = new java.io.ObjectOutputStream(outStream);
                     objectOutputStream.writeObject(text);
                     objectOutputStream.flush();
                 }catch (IOException e) {
                   throw new IOException("Can not export data type JAVA_OBJECT");
                 }                */
  throw new IOException("Can not export data type JAVA_OBJECT");
}

/*
 * Property change control panel
 */
/**
 * Generate a JPanel containing controls that allow the user
 * to adjust the properties for this DataType.
 * All properties are static accross all instances of this DataType.
 * However, the class may choose to apply the information differentially,
 * such as keeping a list (also entered by the user) of table/column names
 * for which certain properties should be used.
 * <P>
 * This is called ONLY if there is at least one property entered into the DTProperties
 * for this class.
 * <P>
 * Since this method is called by reflection on the Method object derived from this class,
 * it does not need to be included in the Interface.
 * It would be nice to include this in the Interface for consistancy, documentation, etc,
 * but the Interface does not seem to like static methods.
 */
public static OkJPanel getControlPanel() {
  /*
   * If you add this method to one of the standard DataTypes in the
   * fw/datasetviewer/cellcomponent directory, you must also add the name
   * of that DataType class to the list in CellComponentFactory, method
   * getControlPanels, variable named initialClassNameList.
   * If the class is being registered with the factory using registerDataType,
   * then you should not include the class name in the list (it will be found
   * automatically), but if the DataType is part of the case statement in the
   * factory method getDataTypeObject, then it does need to be explicitly listed
   * in the getControlPanels method also.
   */
  // if this panel is called before any instances of the class have been
  // created, we need to load the properties from the DTProperties.
  loadProperties();
  return new SQLJavaObjectOkJPanel();
}


Next
Previous
Clone Instance
2
Line Count
95
Source Line
436
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeOther.java

/*
 * File IO related functions
 */
/**
 * Say whether or not object can be exported to and imported from
 * a file.  We put both export and import together in one test
 * on the assumption that all conversions can be done both ways.
 */
public boolean canDoFileIO() {
  return false;
}

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be printable text characters,
 * possibly including newlines and tabs but not characters
 * that would require a binary representation to display
 * to user.
 */
public String importObject(FileInputStream inStream) throws IOException {
  throw new IOException("Can not import data type OTHER");
}

/**
 * Construct an appropriate external representation of the object
 * and write it to a file.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the given text
 * text from a Popup JTextArea can be converted to an object.
 * This text-to-object conversion is the same as validateAndConvertInPopup,
 * which may be used internally by the object to do the validation.
 * <P>
 * The DataType object must flush and close the output stream before returning.
 * Typically it will create another object (e.g. an OutputWriter), and
 * that is the object that must be flushed and closed.
 * 
 * <P>
 * File is assumed to be printable text characters,
 * possibly including newlines and tabs but not characters
 * that would require a binary representation to display
 * to user.
 */
public void exportObject(FileOutputStream outStream, String text) throws IOException {
  throw new IOException("Can not export data type OTHER");
}

/*
 * Property change control panel
 */
/**
 * Generate a JPanel containing controls that allow the user
 * to adjust the properties for this DataType.
 * All properties are static accross all instances of this DataType. 
 * However, the class may choose to apply the information differentially,
 * such as keeping a list (also entered by the user) of table/column names
 * for which certain properties should be used.
 * <P>
 * This is called ONLY if there is at least one property entered into the DTProperties
 * for this class.
 * <P>
 * Since this method is called by reflection on the Method object derived from this class,
 * it does not need to be included in the Interface.
 * It would be nice to include this in the Interface for consistancy, documentation, etc,
 * but the Interface does not seem to like static methods.
 */
public static OkJPanel getControlPanel() {
  /*
   * If you add this method to one of the standard DataTypes in the
   * fw/datasetviewer/cellcomponent directory, you must also add the name
   * of that DataType class to the list in CellComponentFactory, method
   * getControlPanels, variable named initialClassNameList.
   * If the class is being registered with the factory using registerDataType,
   * then you should not include the class name in the list (it will be found
   * automatically), but if the DataType is part of the case statement in the
   * factory method getDataTypeObject, then it does need to be explicitly listed
   * in the getControlPanels method also.
   */
  // if this panel is called before any instances of the class have been
  // created, we need to load the properties from the DTProperties.
  loadProperties();
  return new SQLOtherOkJPanel();
}


First
Previous
Clone Instance
3
Line Count
92
Source Line
425
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeUnknown.java

/*
 * File IO related functions
 */
/**
 * Say whether or not object can be exported to and imported from
 * a file.  We put both export and import together in one test
 * on the assumption that all conversions can be done both ways.
 * Since we do not understand data of type Unknown, we cannot safely
 * export or import it.
 */
public boolean canDoFileIO() {
  return false;
}

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  throw new IOException("Can not import data type OTHER");
}

/**
 * Construct an appropriate external representation of the object
 * and write it to a file.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the given text
 * text from a Popup JTextArea can be converted to an object.
 * This text-to-object conversion is the same as validateAndConvertInPopup,
 * which may be used internally by the object to do the validation.
 * <P>
 * The DataType object must flush and close the output stream before returning.
 * Typically it will create another object (e.g. an OutputWriter), and
 * that is the object that must be flushed and closed.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public void exportObject(FileOutputStream outStream, String text) throws IOException {
  throw new IOException("Can not export data type OTHER");
}

/*
 * Property change control panel
 */
/**
 * Generate a JPanel containing controls that allow the user
 * to adjust the properties for this DataType.
 * All properties are static accross all instances of this DataType. 
 * However, the class may choose to apply the information differentially,
 * such as keeping a list (also entered by the user) of table/column names
 * for which certain properties should be used.
 * <P>
 * This is called ONLY if there is at least one property entered into the DTProperties
 * for this class.
 * <P>
 * Since this method is called by reflection on the Method object derived from this class,
 * it does not need to be included in the Interface.
 * It would be nice to include this in the Interface for consistancy, documentation, etc,
 * but the Interface does not seem to like static methods.
 */
public static OkJPanel getControlPanel() {
  /*
   * If you add this method to one of the standard DataTypes in the
   * fw/datasetviewer/cellcomponent directory, you must also add the name
   * of that DataType class to the list in CellComponentFactory, method
   * getControlPanels, variable named initialClassNameList.
   * If the class is being registered with the factory using registerDataType,
   * then you should not include the class name in the list (it will be found
   * automatically), but if the DataType is part of the case statement in the
   * factory method getDataTypeObject, then it does need to be explicitly listed
   * in the getControlPanels method also.
   */
  // if this panel is called before any instances of the class have been
  // created, we need to load the properties from the DTProperties.
  loadProperties();
  return new UnknownOkJPanel();
}


Clone AbstractionParameter Count: 3Parameter Bindings

/*
         * File IO related functions
         */
/**
          * Say whether or not object can be exported to and imported from
          * a file.  We put both export and import together in one test
          * on the assumption that all conversions can be done both ways.
          * Since we do not understand data of type Unknown, we cannot safely
          * export or import it.
          */
/**
          * Say whether or not object can be exported to and imported from
          * a file.  We put both export and import together in one test
          * on the assumption that all conversions can be done both ways.
          */
public boolean canDoFileIO() {
  return false;
}

/**
          * Read a file and construct a valid object from its contents.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the imported
          * data can be converted to an object, and then must return
          * a text string that can be used in the Popup window text area.
          * This object-to-text conversion is the same as is done by
          * the DataType object internally in the getJTextArea() method.
          * 
          * <P>
          * File is assumed to be and ASCII string of digits
          * representing a value of this data type.
          */
/**
          * Read a file and construct a valid object from its contents.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the imported
          * data can be converted to an object, and then must return
          * a text string that can be used in the Popup window text area.
          * This object-to-text conversion is the same as is done by
          * the DataType object internally in the getJTextArea() method.
          * 
          * <P>
          * File is assumed to be printable text characters,
          * possibly including newlines and tabs but not characters
          * that would require a binary representation to display
          * to user.
          */
/**
          * Read a file and construct a valid object from its contents.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the imported
          * data can be converted to an object, and then must return
          * a text string that can be used in the Popup window text area.
          * This object-to-text conversion is the same as is done by
          * the DataType object internally in the getJTextArea() method.
          *
          * <P>
          * File is assumed to be printable text characters,
          * possibly including newlines and tabs but not characters
          * that would require a binary representation to display
          * to user.
          */
public String importObject(FileInputStream inStream) throws IOException {
  /*               You can try those code:
                 java.io.ObjectInputStream objectInputStream = null;
                 try {
                     objectInputStream = new java.io.ObjectInputStream(inStream);
                     return objectInputStream.readObject()+"";
                 }catch (ClassNotFoundException cnfe) {
  //                 throw new IOException("Class not found: "+ cnfe.toString()+" while reading serialized object");
                   throw new IOException("Can not import data type JAVA_OBJECT");
                 }catch (IOException ioe) {
  //                 throw new IOException( ioe.toString() +" while reading serialized object");
                   throw new IOException("Can not import data type JAVA_OBJECT");
                 }               */
  throw new IOException( [[#variable1aff3200]]);
}

/**
          * Construct an appropriate external representation of the object
          * and write it to a file.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the given text
          * text from a Popup JTextArea can be converted to an object.
          * This text-to-object conversion is the same as validateAndConvertInPopup,
          * which may be used internally by the object to do the validation.
          * <P>
          * The DataType object must flush and close the output stream before returning.
          * Typically it will create another object (e.g. an OutputWriter), and
          * that is the object that must be flushed and closed.
          * 
          * <P>
          * File is assumed to be and ASCII string of digits
          * representing a value of this data type.
          */
/**
          * Construct an appropriate external representation of the object
          * and write it to a file.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the given text
          * text from a Popup JTextArea can be converted to an object.
          * This text-to-object conversion is the same as validateAndConvertInPopup,
          * which may be used internally by the object to do the validation.
          * <P>
          * The DataType object must flush and close the output stream before returning.
          * Typically it will create another object (e.g. an OutputWriter), and
          * that is the object that must be flushed and closed.
          * 
          * <P>
          * File is assumed to be printable text characters,
          * possibly including newlines and tabs but not characters
          * that would require a binary representation to display
          * to user.
          */
/**
          * Construct an appropriate external representation of the object
          * and write it to a file.
          * Errors are returned by throwing an IOException containing the
          * cause of the problem as its message.
          * <P>
          * DataType is responsible for validating that the given text
          * text from a Popup JTextArea can be converted to an object.
          * This text-to-object conversion is the same as validateAndConvertInPopup,
          * which may be used internally by the object to do the validation.
          * <P>
          * The DataType object must flush and close the output stream before returning.
          * Typically it will create another object (e.g. an OutputWriter), and
          * that is the object that must be flushed and closed.
          *
          * <P>
          * File is assumed to be printable text characters,
          * possibly including newlines and tabs but not characters
          * that would require a binary representation to display
          * to user.
          */
public void exportObject(FileOutputStream outStream, String text) throws IOException {
  /* You can try those code:
                 java.io.ObjectOutputStream objectOutputStream=null;
                 try {
                     objectOutputStream = new java.io.ObjectOutputStream(outStream);
                     objectOutputStream.writeObject(text);
                     objectOutputStream.flush();
                 }catch (IOException e) {
                   throw new IOException("Can not export data type JAVA_OBJECT");
                 }                */
  throw new IOException( [[#variable1aff3fa0]]);
}

/*
         * Property change control panel
         */
/**
          * Generate a JPanel containing controls that allow the user
          * to adjust the properties for this DataType.
          * All properties are static accross all instances of this DataType. 
          * However, the class may choose to apply the information differentially,
          * such as keeping a list (also entered by the user) of table/column names
          * for which certain properties should be used.
          * <P>
          * This is called ONLY if there is at least one property entered into the DTProperties
          * for this class.
          * <P>
          * Since this method is called by reflection on the Method object derived from this class,
          * it does not need to be included in the Interface.
          * It would be nice to include this in the Interface for consistancy, documentation, etc,
          * but the Interface does not seem to like static methods.
          */
/**
          * Generate a JPanel containing controls that allow the user
          * to adjust the properties for this DataType.
          * All properties are static accross all instances of this DataType.
          * However, the class may choose to apply the information differentially,
          * such as keeping a list (also entered by the user) of table/column names
          * for which certain properties should be used.
          * <P>
          * This is called ONLY if there is at least one property entered into the DTProperties
          * for this class.
          * <P>
          * Since this method is called by reflection on the Method object derived from this class,
          * it does not need to be included in the Interface.
          * It would be nice to include this in the Interface for consistancy, documentation, etc,
          * but the Interface does not seem to like static methods.
          */
public static OkJPanel getControlPanel() {
  /*
                   * If you add this method to one of the standard DataTypes in the
                   * fw/datasetviewer/cellcomponent directory, you must also add the name
                   * of that DataType class to the list in CellComponentFactory, method
                   * getControlPanels, variable named initialClassNameList.
                   * If the class is being registered with the factory using registerDataType,
                   * then you should not include the class name in the list (it will be found
                   * automatically), but if the DataType is part of the case statement in the
                   * factory method getDataTypeObject, then it does need to be explicitly listed
                   * in the getControlPanels method also.
                   */
  // if this panel is called before any instances of the class have been
  // created, we need to load the properties from the DTProperties.
  loadProperties();
  return new [[#variable1afe81a0]]();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1aff3200]]
"Can not import data type JAVA_OBJECT" 
12[[#1aff3200]]
"Can not import data type OTHER" 
13[[#1aff3200]]
"Can not import data type OTHER" 
21[[#1aff3fa0]]
"Can not export data type JAVA_OBJECT" 
22[[#1aff3fa0]]
"Can not export data type OTHER" 
23[[#1aff3fa0]]
"Can not export data type OTHER" 
31[[#1afe81a0]]
SQLJavaObjectOkJPanel 
32[[#1afe81a0]]
SQLOtherOkJPanel 
33[[#1afe81a0]]
UnknownOkJPanel