CloneSet349


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16220.989method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116645
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeString.java
216439
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLUtilities.java
Next
Last
Clone Instance
1
Line Count
16
Source Line
645
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeString.java

/**
 * When strings are used in the WHERE clause, any single quote characters must be
 * "escaped" so that they are not confused with the "end of string"
 * single quote used by SQL.  The escape sequence is that a single quote
 * is represented by two single quotes in a row.
 */
static public String escapeLine(String s, ISQLDatabaseMetaData md) {
  String retvalue = s;
  if (s.indexOf("\'") != -1) {
    StringBuffer hold = new StringBuffer();
    char c;
    for (int i = 0; i < s.length(); i++) {
      if ((c = s.charAt(i)) == '\'') {
        hold.append("\'\'");
      }
      else {
        hold.append(c);
      }
    }
    retvalue = hold.toString();
  }
  return DatabaseSpecificEscape.escapeSQL(retvalue, md);
}


First
Previous
Clone Instance
2
Line Count
16
Source Line
439
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLUtilities.java

/**
 * When strings are used in the WHERE clause, any single quote characters must be
 * "escaped" so that they are not confused with the "end of string"
 * single quote used by SQL.  The escape sequence is that a single quote
 * is represented by two single quotes in a row.
 */
public static String escapeLine(String s, ISQLDatabaseMetaData md) {
  String retvalue = s;
  if (s.indexOf("\'") != -1) {
    StringBuffer hold = new StringBuffer();
    char c;
    for (int i = 0; i < s.length(); i++) {
      if ((c = s.charAt(i)) == '\'') {
        hold.append("\'\'");
      }
      else {
        hold.append(c);
      }
    }
    retvalue = hold.toString();
  }
  return DatabaseSpecificEscape.escapeSQL(retvalue, md);
}


Clone AbstractionParameter Count: 2Parameter Bindings

 [[#variable1af84220]] [[#variable1af853a0]]String escapeLine(String s, ISQLDatabaseMetaData md) {
  String retvalue = s;
  if (s.indexOf("\'") != -1) {
    StringBuffer hold = new StringBuffer();
    char c;
    for (int i = 0; i < s.length(); i++) {
      if ((c = s.charAt(i)) == '\'') {
        hold.append("\'\'");
      }
      else {
        hold.append(c);
      }
    }
    retvalue = hold.toString();
  }
  return DatabaseSpecificEscape.escapeSQL(retvalue, md);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1af84220]]
/**
 * When strings are used in the WHERE clause, any single quote characters must be
 * "escaped" so that they are not confused with the "end of string"
 * single quote used by SQL.  The escape sequence is that a single quote
 * is represented by two single quotes in a row.
 */
static 
12[[#1af84220]]
/**
 * When strings are used in the WHERE clause, any single quote characters must be
 * "escaped" so that they are not confused with the "end of string"
 * single quote used by SQL.  The escape sequence is that a single quote
 * is represented by two single quotes in a row.
 */
public 
21[[#1af853a0]]
public 
22[[#1af853a0]]
static