nus-yam/ex-repair huggingface dataset:
Program: 84257
Project: 84257
Buggy source:
/** 
 * Returns the type name and any parameters suitable for SQL.
 */
public String getDataTypeString(Database database){
  List<Integer> noParens=Arrays.asList(Types.ARRAY,Types.BIGINT,Types.BINARY,Types.BIT,Types.BLOB,Types.BOOLEAN,Types.CLOB,Types.DATALINK,Types.DATE,Types.DISTINCT,Types.INTEGER,Types.JAVA_OBJECT,Types.LONGVARBINARY,Types.NULL,Types.OTHER,Types.REF,Types.SMALLINT,Types.STRUCT,Types.TIME,Types.TIMESTAMP,Types.TINYINT,Types.VARBINARY);
  List<Integer> oneParam=Arrays.asList(Types.CHAR,Types.LONGVARCHAR,Types.VARCHAR);
  List<Integer> twoParams=Arrays.asList(Types.DECIMAL,Types.DOUBLE,Types.FLOAT,Types.NUMERIC,Types.REAL);
  String translatedTypeName=this.getTypeName();
  if (database instanceof PostgresDatabase) {
    if ("String_Node_Str".equals(translatedTypeName)) {
      translatedTypeName="String_Node_Str";
    }
  }
  String dataType;
  if (noParens.contains(this.getDataType())) {
    dataType=translatedTypeName;
  }
 else   if (oneParam.contains(this.getDataType())) {
    dataType=translatedTypeName + "String_Node_Str" + this.getColumnSize()+ "String_Node_Str";
  }
 else   if (twoParams.contains(this.getDataType())) {
    dataType=translatedTypeName + "String_Node_Str" + this.getColumnSize()+ "String_Node_Str"+ this.getDecimalDigits()+ "String_Node_Str";
  }
 else {
    throw new RuntimeException("String_Node_Str" + this.getDataType() + "String_Node_Str"+ this.getTypeName()+ "String_Node_Str");
  }
  return dataType;
}

Fixed version (ground truth):
/** 
 * Returns the type name and any parameters suitable for SQL.
 */
public String getDataTypeString(Database database){
  List<Integer> noParens=Arrays.asList(Types.ARRAY,Types.BIGINT,Types.BINARY,Types.BIT,Types.BLOB,Types.BOOLEAN,Types.CLOB,Types.DATALINK,Types.DATE,Types.DISTINCT,Types.INTEGER,Types.JAVA_OBJECT,Types.LONGVARBINARY,Types.NULL,Types.OTHER,Types.REF,Types.SMALLINT,Types.STRUCT,Types.TIME,Types.TIMESTAMP,Types.TINYINT,Types.LONGVARCHAR);
  List<Integer> oneParam=Arrays.asList(Types.CHAR,Types.VARCHAR,Types.VARBINARY);
  List<Integer> twoParams=Arrays.asList(Types.DECIMAL,Types.DOUBLE,Types.FLOAT,Types.NUMERIC,Types.REAL);
  String translatedTypeName=this.getTypeName();
  if (database instanceof PostgresDatabase) {
    if ("String_Node_Str".equals(translatedTypeName)) {
      translatedTypeName="String_Node_Str";
    }
  }
  String dataType;
  if (noParens.contains(this.getDataType())) {
    dataType=translatedTypeName;
  }
 else   if (oneParam.contains(this.getDataType())) {
    dataType=translatedTypeName + "String_Node_Str" + this.getColumnSize()+ "String_Node_Str";
  }
 else   if (twoParams.contains(this.getDataType())) {
    dataType=translatedTypeName + "String_Node_Str" + this.getColumnSize()+ "String_Node_Str"+ this.getDecimalDigits()+ "String_Node_Str";
  }
 else {
    throw new RuntimeException("String_Node_Str" + this.getDataType() + "String_Node_Str"+ this.getTypeName()+ "String_Node_Str");
  }
  return dataType;
}
Program: 84258
Project: 84258
Buggy source:
/** 
 * Returns true if it is "save" to migrate the database. Currently, "safe" is defined as running in an output-sql mode or against a database on localhost. It is fine to run the migrator against a "non-safe" database, the method is mainly used to determine if the user should be prompted before continuing.
 */
public boolean isSafeToRunMigration() throws JDBCException {
  if (Mode.OUTPUT_SQL_MODE.equals(getMode()) || Mode.OUTPUT_CHANGELOG_ONLY_SQL_MODE.equals(getMode())) {
    return true;
  }
  return getDatabase().getConnectionURL().indexOf("String_Node_Str") >= 0;
}

Fixed version (ground truth):
/** 
 * Returns true if it is "save" to migrate the database. Currently, "safe" is defined as running in an output-sql mode or against a database on localhost. It is fine to run the migrator against a "non-safe" database, the method is mainly used to determine if the user should be prompted before continuing.
 */
public boolean isSafeToRunMigration() throws JDBCException {
  return Mode.OUTPUT_SQL_MODE.equals(getMode()) || Mode.OUTPUT_CHANGELOG_ONLY_SQL_MODE.equals(getMode()) || getDatabase().getConnectionURL().indexOf("String_Node_Str") >= 0;
}
Program: 84259
Project: 84259
Buggy source:
public InputSource resolveEntity(String publicId,String systemId) throws IOException {
  if (systemId != null) {
    int iSlash=systemId.lastIndexOf('/');
    if (iSlash >= 0) {
      String xsdFile=systemId.substring(iSlash + 1);
      try {
        InputStream resourceAsStream=Thread.currentThread().getContextClassLoader().getResourceAsStream(SEARCH_PACKAGE + xsdFile);
        if (resourceAsStream == null) {
          return null;
        }
        InputSource source=new InputSource(resourceAsStream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        return source;
      }
 catch (      Exception ex) {
        return null;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public InputSource resolveEntity(String publicId,String systemId) throws IOException {
  if (systemId != null) {
    int iSlash=systemId.lastIndexOf('/');
    if (iSlash >= 0) {
      String xsdFile=systemId.substring(iSlash + 1);
      try {
        InputStream resourceAsStream=Thread.currentThread().getContextClassLoader().getResourceAsStream(SEARCH_PACKAGE + xsdFile);
        if (resourceAsStream == null) {
          resourceAsStream=this.getClass().getClassLoader().getResourceAsStream(SEARCH_PACKAGE + xsdFile);
        }
        if (resourceAsStream == null) {
          return null;
        }
        InputSource source=new InputSource(resourceAsStream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        return source;
      }
 catch (      Exception ex) {
        return null;
      }
    }
  }
  return null;
}
Program: 84260
Project: 84260
Buggy source:
/** 
 * Tags the database changelog with the given string.
 */
public void tag(String tagString) throws MigrationFailedException {
  Connection conn=getConnection();
  PreparedStatement stmt=null;
  try {
    stmt=conn.prepareStatement(createChangeToTagSQL());
    ResultSet rs=stmt.executeQuery();
    if (!rs.next()) {
      throw new MigrationFailedException("String_Node_Str");
    }
    Timestamp lastExecutedDate=rs.getTimestamp(1);
    rs.close();
    stmt.close();
    stmt=conn.prepareStatement(createTagSQL());
    stmt.setString(1,tagString);
    stmt.setTimestamp(2,lastExecutedDate);
    int rowsUpdated=stmt.executeUpdate();
    if (rowsUpdated == 0) {
      throw new MigrationFailedException("String_Node_Str");
    }
    conn.commit();
  }
 catch (  Exception e) {
    throw new MigrationFailedException(e);
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Tags the database changelog with the given string.
 */
public void tag(String tagString) throws MigrationFailedException {
  Connection conn=getConnection();
  PreparedStatement stmt=null;
  Statement countStatement=null;
  ResultSet countRS=null;
  try {
    stmt=conn.prepareStatement(createChangeToTagSQL());
    ResultSet rs=stmt.executeQuery();
    if (!rs.next()) {
      throw new MigrationFailedException("String_Node_Str");
    }
    Timestamp lastExecutedDate=rs.getTimestamp(1);
    rs.close();
    stmt.close();
    stmt=conn.prepareStatement(createTagSQL());
    stmt.setString(1,tagString);
    stmt.setTimestamp(2,lastExecutedDate);
    int rowsUpdated=stmt.executeUpdate();
    if (rowsUpdated == 0) {
      countStatement=conn.createStatement();
      countRS=countStatement.executeQuery("String_Node_Str" + getDatabaseChangeLogTableName());
      countRS.next();
      if (countRS.getInt(1) == 0) {
        throw new MigrationFailedException("String_Node_Str");
      }
      countRS.close();
      throw new MigrationFailedException("String_Node_Str");
    }
    conn.commit();
  }
 catch (  Exception e) {
    throw new MigrationFailedException(e);
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        ;
      }
    }
    if (countStatement != null) {
      try {
        countStatement.close();
      }
 catch (      SQLException e) {
        ;
      }
    }
  }
}
Program: 84262
Project: 84262
Buggy source:
public void testDiff() throws Exception {
  runCompleteChangeLog();
  Diff diff=new Diff();
  diff.init(connection,connection);
  DiffResult diffResult=diff.compare();
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingForeignKeys().size());
  assertEquals(0,diffResult.getMissingIndexes().size());
  assertEquals(0,diffResult.getMissingPrimaryKeys().size());
  assertEquals(0,diffResult.getMissingSequences().size());
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingTables().size());
  assertEquals(0,diffResult.getMissingViews().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedForeignKeys().size());
  assertEquals(0,diffResult.getUnexpectedIndexes().size());
  assertEquals(0,diffResult.getUnexpectedPrimaryKeys().size());
  assertEquals(0,diffResult.getUnexpectedSequences().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedTables().size());
  assertEquals(0,diffResult.getUnexpectedViews().size());
}

Fixed version (ground truth):
public void testDiff() throws Exception {
  runCompleteChangeLog();
  Diff diff=new Diff(connection,connection);
  DiffResult diffResult=diff.compare();
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingForeignKeys().size());
  assertEquals(0,diffResult.getMissingIndexes().size());
  assertEquals(0,diffResult.getMissingPrimaryKeys().size());
  assertEquals(0,diffResult.getMissingSequences().size());
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingTables().size());
  assertEquals(0,diffResult.getMissingViews().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedForeignKeys().size());
  assertEquals(0,diffResult.getUnexpectedIndexes().size());
  assertEquals(0,diffResult.getUnexpectedPrimaryKeys().size());
  assertEquals(0,diffResult.getUnexpectedSequences().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedTables().size());
  assertEquals(0,diffResult.getUnexpectedViews().size());
}
Program: 84263
Project: 84263
Buggy source:
public void testRerunDiffChangeLog() throws Exception {
  runCompleteChangeLog();
  Diff diff=new Diff();
  diff.init(connection);
  DiffResult diffResult=diff.compare();
  File tempFile=File.createTempFile("String_Node_Str","String_Node_Str");
  FileOutputStream output=new FileOutputStream(tempFile);
  diffResult.printChangeLog(new PrintStream(output),DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection));
  output.flush();
  output.close();
  Migrator migrator=createMigrator(tempFile.getName());
  migrator.dropAll();
  migrator=createMigrator(tempFile.getName());
  try {
    migrator.migrate();
  }
 catch (  ValidationFailedException e) {
    e.printDescriptiveError(System.out);
    throw e;
  }
  tempFile.deleteOnExit();
}

Fixed version (ground truth):
public void testRerunDiffChangeLog() throws Exception {
  runCompleteChangeLog();
  DatabaseSnapshot originalSnapshot=new DatabaseSnapshot(DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection));
  Diff diff=new Diff(connection);
  DiffResult diffResult=diff.compare();
  File tempFile=File.createTempFile("String_Node_Str","String_Node_Str");
  FileOutputStream output=new FileOutputStream(tempFile);
  diffResult.printChangeLog(new PrintStream(output),DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection));
  output.flush();
  output.close();
  Migrator migrator=createMigrator(tempFile.getName());
  migrator.dropAll();
  migrator=createMigrator(tempFile.getName());
  try {
    migrator.migrate();
  }
 catch (  ValidationFailedException e) {
    e.printDescriptiveError(System.out);
    throw e;
  }
  tempFile.deleteOnExit();
  DatabaseSnapshot finalSnapshot=new DatabaseSnapshot(DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection));
  DiffResult finalDiffResult=new Diff(originalSnapshot,finalSnapshot).compare();
  assertEquals(0,finalDiffResult.getMissingColumns().size());
  assertEquals(0,finalDiffResult.getMissingForeignKeys().size());
  assertEquals(0,finalDiffResult.getMissingIndexes().size());
  assertEquals(0,finalDiffResult.getMissingPrimaryKeys().size());
  assertEquals(0,finalDiffResult.getMissingTables().size());
  assertEquals(0,finalDiffResult.getUnexpectedColumns().size());
  assertEquals(0,finalDiffResult.getUnexpectedForeignKeys().size());
  assertEquals(0,finalDiffResult.getUnexpectedIndexes().size());
  assertEquals(0,finalDiffResult.getUnexpectedPrimaryKeys().size());
  assertEquals(0,finalDiffResult.getUnexpectedSequences().size());
  assertEquals(0,finalDiffResult.getUnexpectedTables().size());
  assertEquals(0,finalDiffResult.getUnexpectedViews().size());
}
Program: 84264
Project: 84264
Buggy source:
public SybaseSampleChangeLogRunnerTest() throws Exception {
  super("String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public SybaseSampleChangeLogRunnerTest() throws Exception {
  super("String_Node_Str","String_Node_Str","String_Node_Str" + InetAddress.getLocalHost().getHostName() + "String_Node_Str");
}
Program: 84265
Project: 84265
Buggy source:
private String[] getTableTypes() throws JDBCException {
  List<String> wantedTypes=new ArrayList<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  List<String> availableTypes=new ArrayList<String>();
  try {
    ResultSet types=connection.getMetaData().getTableTypes();
    while (types.next()) {
      availableTypes.add("String_Node_Str");
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
  List<String> returnTypes=new ArrayList<String>();
  for (  String type : wantedTypes) {
    if (availableTypes.contains(type)) {
      returnTypes.add(type);
    }
  }
  return returnTypes.toArray(new String[returnTypes.size()]);
}

Fixed version (ground truth):
private String[] getTableTypes() throws JDBCException {
  List<String> wantedTypes=new ArrayList<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  List<String> availableTypes=new ArrayList<String>();
  try {
    ResultSet types=connection.getMetaData().getTableTypes();
    while (types.next()) {
      availableTypes.add(types.getString("String_Node_Str").trim());
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
  List<String> returnTypes=new ArrayList<String>();
  for (  String type : wantedTypes) {
    if (availableTypes.contains(type)) {
      returnTypes.add(type);
    }
  }
  return returnTypes.toArray(new String[returnTypes.size()]);
}
Program: 84266
Project: 84266
Buggy source:
public Database findCorrectDatabaseImplementation(Connection connection) throws JDBCException {
  Database database=null;
  boolean foundImplementation=false;
  Database[] implementedDatabases=getImplementedDatabases();
  for (int i=0; i < implementedDatabases.length; i++) {
    database=implementedDatabases[i];
    if (database.isCorrectDatabaseImplementation(connection)) {
      foundImplementation=true;
      break;
    }
  }
  if (!foundImplementation) {
    try {
      log.warning("String_Node_Str" + connection.getMetaData().getDatabaseProductName());
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
    database=new UnsupportedDatabase();
  }
  return database;
}

Fixed version (ground truth):
public Database findCorrectDatabaseImplementation(Connection connection) throws JDBCException {
  Database database=null;
  boolean foundImplementation=false;
  Database[] implementedDatabases=getImplementedDatabases();
  for (int i=0; i < implementedDatabases.length; i++) {
    database=implementedDatabases[i];
    if (database.isCorrectDatabaseImplementation(connection)) {
      foundImplementation=true;
      break;
    }
  }
  if (!foundImplementation) {
    try {
      log.warning("String_Node_Str" + connection.getMetaData().getDatabaseProductName());
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
    database=new UnsupportedDatabase();
  }
  database.setConnection(connection);
  return database;
}
Program: 84267
Project: 84267
Buggy source:
public void dropDatabaseObjects() throws JDBCException, MigrationFailedException {
  Connection conn=getConnection();
  Statement dropStatement=null;
  try {
    dropStatement=conn.createStatement();
    dropStatement.executeUpdate("String_Node_Str" + getConnectionUsername());
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
 finally {
    try {
      if (dropStatement != null) {
        dropStatement.close();
      }
      conn.commit();
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
  }
}

Fixed version (ground truth):
public void dropDatabaseObjects() throws JDBCException, MigrationFailedException {
  Connection conn=getConnection();
  Statement dropStatement=null;
  try {
    dropStatement=conn.createStatement();
    dropStatement.executeUpdate("String_Node_Str" + getConnectionUsername());
    changeLogTableExists=false;
    changeLogLockTableExists=false;
    changeLogCreateAttempted=false;
    changeLogLockCreateAttempted=false;
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
 finally {
    try {
      if (dropStatement != null) {
        dropStatement.close();
      }
      conn.commit();
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
  }
}
Program: 84272
Project: 84272
Buggy source:
public ChangeSet(String id,String author,boolean alwaysRun,boolean runOnChange,DatabaseChangeLog databaseChangeLog,String context,String dbmsList){
  this.changes=new ArrayList<Change>();
  log=Logger.getLogger(Migrator.DEFAULT_LOG_NAME);
  this.id=id;
  this.author=author;
  this.databaseChangeLog=databaseChangeLog;
  this.alwaysRun=alwaysRun;
  this.runOnChange=runOnChange;
  if (context != null) {
    this.context=context.trim().toLowerCase();
  }
  if (dbmsList != null) {
    String[] strings=dbmsList.split("String_Node_Str");
    for (    String string : strings) {
      if (dbmsSet == null) {
        dbmsSet=new HashSet<String>();
      }
      dbmsSet.add(string.trim().toLowerCase());
    }
  }
}

Fixed version (ground truth):
public ChangeSet(String id,String author,boolean alwaysRun,boolean runOnChange,DatabaseChangeLog databaseChangeLog,String context,String dbmsList){
  this.changes=new ArrayList<Change>();
  log=Logger.getLogger(Migrator.DEFAULT_LOG_NAME);
  this.id=id;
  this.author=author;
  this.databaseChangeLog=databaseChangeLog;
  this.alwaysRun=alwaysRun;
  this.runOnChange=runOnChange;
  if (context != null) {
    this.context=context.trim().toLowerCase();
  }
  if (StringUtils.trimToNull(dbmsList) != null) {
    String[] strings=dbmsList.split("String_Node_Str");
    for (    String string : strings) {
      if (dbmsSet == null) {
        dbmsSet=new HashSet<String>();
      }
      dbmsSet.add(string.trim().toLowerCase());
    }
  }
}
Program: 84273
Project: 84273
Buggy source:
public void testClearChecksums() throws Exception {
  Migrator migrator=createMigrator(null);
  migrator.clearCheckSums();
}

Fixed version (ground truth):
public void testClearChecksums() throws Exception {
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll();
  migrator=createMigrator(completeChangeLog);
  migrator.dropAll();
  migrator.migrate();
  migrator.clearCheckSums();
}
Program: 84275
Project: 84275
Buggy source:
/** 
 * Returns instances of all implemented database types.
 */
public Database[] getImplementedDatabases(){
  return new Database[]{new OracleDatabase(),new PostgresDatabase(),new MSSQLDatabase(),new MySQLDatabase(),new DerbyDatabase(),new HsqlDatabase(),new DB2Database(),new SybaseDatabase()};
}

Fixed version (ground truth):
/** 
 * Returns instances of all implemented database types.
 */
public Database[] getImplementedDatabases(){
  return new Database[]{new OracleDatabase(),new PostgresDatabase(),new MSSQLDatabase(),new MySQLDatabase(),new DerbyDatabase(),new HsqlDatabase(),new DB2Database(),new SybaseDatabase(),new H2Database()};
}
Program: 84277
Project: 84277
Buggy source:
protected Change[] createInverses(){
  DropColumnChange inverse=new DropColumnChange();
  inverse.setColumnName(getColumn().getName());
  inverse.setTableName(getTableName());
  return new Change[]{inverse};
}

Fixed version (ground truth):
protected Change[] createInverses(){
  List<Change> inverses=new ArrayList<Change>();
  if (column.hasDefaultValue()) {
    DropDefaultValueChange dropChange=new DropDefaultValueChange();
    dropChange.setTableName(getTableName());
    dropChange.setColumnName(getColumn().getName());
    inverses.add(dropChange);
  }
  DropColumnChange inverse=new DropColumnChange();
  inverse.setColumnName(getColumn().getName());
  inverse.setTableName(getTableName());
  inverses.add(inverse);
  return inverses.toArray(new Change[inverses.size()]);
}
Program: 84279
Project: 84279
Buggy source:
public String[] generateDerbyStatements(){
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}

Fixed version (ground truth):
public String[] generateDerbyStatements(){
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str"+ getColumnDataType()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}
Program: 84280
Project: 84280
Buggy source:
public String[] generateStatements(Database database) throws UnsupportedChangeException {
  if (database instanceof SybaseDatabase) {
    return generateSybaseStatements();
  }
 else   if (database instanceof MSSQLDatabase) {
    return generateMSSQLStatements();
  }
 else   if (database instanceof MySQLDatabase) {
    return generateMySQLStatements();
  }
 else   if (database instanceof OracleDatabase) {
    return generateOracleStatements();
  }
 else   if (database instanceof DerbyDatabase) {
    return generateDerbyStatements();
  }
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  if (database instanceof DB2Database) {
    statements.add("String_Node_Str" + getTableName() + "String_Node_Str");
  }
  return statements.toArray(new String[statements.size()]);
}

Fixed version (ground truth):
public String[] generateStatements(Database database) throws UnsupportedChangeException {
  if (database instanceof SybaseDatabase) {
    return generateSybaseStatements();
  }
 else   if (database instanceof MSSQLDatabase) {
    return generateMSSQLStatements();
  }
 else   if (database instanceof MySQLDatabase) {
    return generateMySQLStatements();
  }
 else   if (database instanceof OracleDatabase) {
    return generateOracleStatements();
  }
 else   if (database instanceof DerbyDatabase) {
    return generateDerbyStatements();
  }
 else   if (database instanceof H2Database) {
    return generateH2Statements();
  }
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  if (database instanceof DB2Database) {
    statements.add("String_Node_Str" + getTableName() + "String_Node_Str");
  }
  return statements.toArray(new String[statements.size()]);
}
Program: 84281
Project: 84281
Buggy source:
public int compareTo(Column o){
  try {
    int returnValue=0;
    if (this.getTable() != null && o.getTable() == null) {
      return 1;
    }
 else     if (this.getTable() == null && o.getTable() != null) {
      return -1;
    }
 else     if (this.getTable() == null && o.getTable() == null) {
      returnValue=this.getView().compareTo(o.getView());
    }
 else {
      returnValue=this.getTable().compareTo(o.getTable());
    }
    if (returnValue == 0) {
      returnValue=this.getName().compareTo(o.getName());
    }
    return returnValue;
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public int compareTo(Column o){
  try {
    int returnValue=0;
    if (this.getTable() != null && o.getTable() == null) {
      return 1;
    }
 else     if (this.getTable() == null && o.getTable() != null) {
      return -1;
    }
 else     if (this.getTable() == null && o.getTable() == null) {
      returnValue=this.getView().compareTo(o.getView());
    }
 else {
      returnValue=this.getTable().compareTo(o.getTable());
    }
    if (returnValue == 0) {
      returnValue=this.getName().compareTo(o.getName());
    }
    return returnValue;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 84282
Project: 84282
Buggy source:
private void readIndexes() throws JDBCException, SQLException {
  updateListeners("String_Node_Str" + database.toString() + "String_Node_Str");
  for (  Table table : tablesMap.values()) {
    ResultSet rs=null;
    try {
      rs=databaseMetaData.getIndexInfo(database.getCatalogName(),database.getSchemaName(),table.getName(),true,true);
    }
 catch (    SQLException e) {
      throw e;
    }
    while (rs.next()) {
      Index indexInformation=new Index();
      indexInformation.setTableName(rs.getString("String_Node_Str"));
      String columnName=rs.getString("String_Node_Str");
      if (columnName == null) {
        continue;
      }
      indexInformation.setColumnName(columnName);
      indexInformation.setName(rs.getString("String_Node_Str"));
      indexes.add(indexInformation);
    }
    rs.close();
  }
}

Fixed version (ground truth):
private void readIndexes() throws JDBCException, SQLException {
  updateListeners("String_Node_Str" + database.toString() + "String_Node_Str");
  for (  Table table : tablesMap.values()) {
    ResultSet rs;
    try {
      rs=databaseMetaData.getIndexInfo(database.getCatalogName(),database.getSchemaName(),table.getName(),true,true);
    }
 catch (    SQLException e) {
      throw e;
    }
    while (rs.next()) {
      Index indexInformation=new Index();
      indexInformation.setTableName(rs.getString("String_Node_Str"));
      String columnName=rs.getString("String_Node_Str");
      if (columnName == null) {
        continue;
      }
      indexInformation.setColumnName(columnName);
      indexInformation.setName(rs.getString("String_Node_Str"));
      indexes.add(indexInformation);
    }
    rs.close();
  }
}
Program: 84283
Project: 84283
Buggy source:
/** 
 * Initializes the Migrator with the given connection.  Needs to be called before actually using the Migrator.
 */
public void init(Connection connection) throws JDBCException, MigrationFailedException {
  try {
    database=DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
    database.setConnection(connection);
    database.getConnection().setAutoCommit(false);
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Migrator with the given connection.  Needs to be called before actually using the Migrator.
 */
public void init(Connection connection) throws JDBCException {
  try {
    database=DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
    database.setConnection(connection);
    database.getConnection().setAutoCommit(false);
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
}
Program: 84284
Project: 84284
Buggy source:
private void nodeToStringBuffer(Element node,StringBuffer buffer){
  buffer.append("String_Node_Str").append(node.getNodeName());
  SortedMap<String,String> attributeMap=new TreeMap<String,String>();
  NamedNodeMap attributes=node.getAttributes();
  for (int i=0; i < attributes.getLength(); i++) {
    Node attribute=attributes.item(i);
    attributeMap.put(attribute.getNodeName(),attribute.getNodeValue());
  }
  for (  Map.Entry entry : attributeMap.entrySet()) {
    Object value=entry.getValue();
    if (value != null) {
      buffer.append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(attributeMap.get(value)).append("String_Node_Str");
    }
  }
  buffer.append("String_Node_Str").append(StringUtils.trimToEmpty(XMLUtil.getTextContent(node)));
  NodeList childNodes=node.getChildNodes();
  for (int i=0; i < childNodes.getLength(); i++) {
    Node childNode=childNodes.item(i);
    if (childNode instanceof Element) {
      nodeToStringBuffer(((Element)childNode),buffer);
    }
  }
  buffer.append("String_Node_Str").append(node.getNodeName()).append("String_Node_Str");
}

Fixed version (ground truth):
private void nodeToStringBuffer(Element node,StringBuffer buffer){
  buffer.append("String_Node_Str").append(node.getNodeName());
  SortedMap<String,String> attributeMap=new TreeMap<String,String>();
  NamedNodeMap attributes=node.getAttributes();
  for (int i=0; i < attributes.getLength(); i++) {
    Node attribute=attributes.item(i);
    attributeMap.put(attribute.getNodeName(),attribute.getNodeValue());
  }
  for (  Map.Entry entry : attributeMap.entrySet()) {
    String value=(String)entry.getValue();
    if (value != null) {
      buffer.append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(attributeMap.get(value)).append("String_Node_Str");
    }
  }
  buffer.append("String_Node_Str").append(StringUtils.trimToEmpty(XMLUtil.getTextContent(node)));
  NodeList childNodes=node.getChildNodes();
  for (int i=0; i < childNodes.getLength(); i++) {
    Node childNode=childNodes.item(i);
    if (childNode instanceof Element) {
      nodeToStringBuffer(((Element)childNode),buffer);
    }
  }
  buffer.append("String_Node_Str").append(node.getNodeName()).append("String_Node_Str");
}
Program: 84285
Project: 84285
Buggy source:
private String getColumnValue(Database database){
  if (getDefaultValue() != null) {
    if ("String_Node_Str".equalsIgnoreCase(getDefaultValue())) {
      return "String_Node_Str";
    }
    return "String_Node_Str" + getDefaultValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (getDefaultValueNumeric() != null) {
    return getDefaultValueNumeric();
  }
 else   if (getDefaultValueBoolean() != null) {
    if (getDefaultValueBoolean()) {
      return database.getTrueBooleanValue();
    }
 else {
      return database.getFalseBooleanValue();
    }
  }
 else   if (getDefaultValueDate() != null) {
    return database.getDateLiteral(getDefaultValueDate());
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private String getColumnValue(Database database){
  if (getDefaultValue() != null) {
    if ("String_Node_Str".equalsIgnoreCase(getDefaultValue())) {
      return "String_Node_Str";
    }
    return "String_Node_Str" + getDefaultValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (getDefaultValueNumeric() != null) {
    return getDefaultValueNumeric();
  }
 else   if (getDefaultValueBoolean() != null) {
    String returnValue;
    if (getDefaultValueBoolean()) {
      returnValue=database.getTrueBooleanValue();
    }
 else {
      returnValue=database.getFalseBooleanValue();
    }
    if (returnValue.matches("String_Node_Str")) {
      return returnValue;
    }
 else {
      return "String_Node_Str" + returnValue + "String_Node_Str";
    }
  }
 else   if (getDefaultValueDate() != null) {
    return database.getDateLiteral(getDefaultValueDate());
  }
 else {
    return "String_Node_Str";
  }
}
Program: 84286
Project: 84286
Buggy source:
public String[] generateDerbyStatements() throws UnsupportedChangeException {
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}

Fixed version (ground truth):
public String[] generateDerbyStatements(){
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}
Program: 84287
Project: 84287
Buggy source:
private String getDefaultColumnValue(ColumnConfig column,Database database){
  if (column.getDefaultValue() != null) {
    if ("String_Node_Str".equalsIgnoreCase(column.getDefaultValue())) {
      return "String_Node_Str";
    }
    return "String_Node_Str" + column.getDefaultValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (column.getDefaultValueNumeric() != null) {
    return column.getDefaultValueNumeric();
  }
 else   if (column.getDefaultValueBoolean() != null) {
    if (column.getDefaultValueBoolean()) {
      return database.getTrueBooleanValue();
    }
 else {
      return database.getFalseBooleanValue();
    }
  }
 else   if (column.getDefaultValueDate() != null) {
    return database.getDateLiteral(column.getDefaultValueDate());
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private String getDefaultColumnValue(ColumnConfig column,Database database){
  if (column.getDefaultValue() != null) {
    if ("String_Node_Str".equalsIgnoreCase(column.getDefaultValue())) {
      return "String_Node_Str";
    }
    return "String_Node_Str" + column.getDefaultValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (column.getDefaultValueNumeric() != null) {
    return column.getDefaultValueNumeric();
  }
 else   if (column.getDefaultValueBoolean() != null) {
    String returnValue;
    if (column.getDefaultValueBoolean()) {
      returnValue=database.getTrueBooleanValue();
    }
 else {
      returnValue=database.getFalseBooleanValue();
    }
    if (returnValue.matches("String_Node_Str")) {
      return returnValue;
    }
 else {
      return "String_Node_Str" + returnValue + "String_Node_Str";
    }
  }
 else   if (column.getDefaultValueDate() != null) {
    return database.getDateLiteral(column.getDefaultValueDate());
  }
 else {
    return "String_Node_Str";
  }
}
Program: 84288
Project: 84288
Buggy source:
private String getColumnValue(ColumnConfig column,Database database){
  if (column.getValue() != null) {
    return "String_Node_Str" + column.getValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (column.getValueNumeric() != null) {
    return column.getValueNumeric();
  }
 else   if (column.getValueBoolean() != null) {
    if (column.getValueBoolean()) {
      return database.getTrueBooleanValue();
    }
 else {
      return database.getFalseBooleanValue();
    }
  }
 else   if (column.getValueDate() != null) {
    return database.getDateLiteral(column.getValueDate());
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private String getColumnValue(ColumnConfig column,Database database){
  if (column.getValue() != null) {
    return "String_Node_Str" + column.getValue().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  }
 else   if (column.getValueNumeric() != null) {
    return column.getValueNumeric();
  }
 else   if (column.getValueBoolean() != null) {
    String returnValue;
    if (column.getValueBoolean()) {
      returnValue=database.getTrueBooleanValue();
    }
 else {
      returnValue=database.getFalseBooleanValue();
    }
    if (returnValue.matches("String_Node_Str")) {
      return returnValue;
    }
 else {
      return "String_Node_Str" + returnValue + "String_Node_Str";
    }
  }
 else   if (column.getValueDate() != null) {
    return database.getDateLiteral(column.getValueDate());
  }
 else {
    return "String_Node_Str";
  }
}
Program: 84290
Project: 84290
Buggy source:
private Connection createConnectionFromCommandParams(Set<String> commandParams) throws CommandLineParsingException, ClassNotFoundException, SQLException, JDBCException {
  String driver=null;
  String url=null;
  String username=null;
  String password=null;
  for (  String param : commandParams) {
    String[] splitArg=splitArg(param);
    String attributeName=splitArg[0];
    String value=splitArg[1];
    if ("String_Node_Str".equalsIgnoreCase(attributeName)) {
      driver=value;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(attributeName)) {
      url=value;
    }
 else     if ("String_Node_Str".equals(attributeName)) {
      username=value;
    }
 else     if ("String_Node_Str".equals(attributeName)) {
      password=value;
    }
  }
  if (driver == null) {
    driver=DatabaseFactory.getInstance().findDefaultDriver(url);
  }
  Driver driverObject;
  try {
    driverObject=(Driver)Class.forName(driver,true,classLoader).newInstance();
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + e.getMessage());
  }
  Properties info=new Properties();
  info.put("String_Node_Str",username);
  info.put("String_Node_Str",password);
  Connection connection=driverObject.connect(url,info);
  if (connection == null) {
    throw new JDBCException("String_Node_Str" + url + "String_Node_Str"+ driver.getClass().getName()+ "String_Node_Str");
  }
  return connection;
}

Fixed version (ground truth):
private Connection createConnectionFromCommandParams(Set<String> commandParams) throws CommandLineParsingException, SQLException, JDBCException {
  String driver=null;
  String url=null;
  String username=null;
  String password=null;
  for (  String param : commandParams) {
    String[] splitArg=splitArg(param);
    String attributeName=splitArg[0];
    String value=splitArg[1];
    if ("String_Node_Str".equalsIgnoreCase(attributeName)) {
      driver=value;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(attributeName)) {
      url=value;
    }
 else     if ("String_Node_Str".equals(attributeName)) {
      username=value;
    }
 else     if ("String_Node_Str".equals(attributeName)) {
      password=value;
    }
  }
  if (driver == null) {
    driver=DatabaseFactory.getInstance().findDefaultDriver(url);
  }
  Driver driverObject;
  try {
    driverObject=(Driver)Class.forName(driver,true,classLoader).newInstance();
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + e.getMessage());
  }
  Properties info=new Properties();
  info.put("String_Node_Str",username);
  info.put("String_Node_Str",password);
  Connection connection=driverObject.connect(url,info);
  if (connection == null) {
    throw new JDBCException("String_Node_Str" + url + "String_Node_Str"+ driver.getClass().getName()+ "String_Node_Str");
  }
  return connection;
}
Program: 84291
Project: 84291
Buggy source:
private void checkVersionInfo(DiffResult diffResult) throws SQLException, JDBCException {
  diffResult.setProductName(new DiffComparison(baseDatabase.getDatabaseProductName(),targetDatabase.getDatabaseProductName()));
  diffResult.setProductVersion(new DiffComparison(baseDatabase.getDatabaseProductVersion(),targetDatabase.getDatabaseProductVersion()));
}

Fixed version (ground truth):
private void checkVersionInfo(DiffResult diffResult) throws JDBCException {
  diffResult.setProductName(new DiffComparison(baseDatabase.getDatabaseProductName(),targetDatabase.getDatabaseProductName()));
  diffResult.setProductVersion(new DiffComparison(baseDatabase.getDatabaseProductVersion(),targetDatabase.getDatabaseProductVersion()));
}
Program: 84292
Project: 84292
Buggy source:
private void checkViews(DiffResult diffResult) throws SQLException, JDBCException {
  for (  View baseView : baseSnapshot.getViews()) {
    if (!targetSnapshot.getViews().contains(baseView)) {
      diffResult.addMissingView(baseView);
    }
  }
  for (  View targetView : targetSnapshot.getViews()) {
    if (!baseSnapshot.getViews().contains(targetView)) {
      diffResult.addUnexpectedView(targetView);
    }
  }
}

Fixed version (ground truth):
private void checkViews(DiffResult diffResult){
  for (  View baseView : baseSnapshot.getViews()) {
    if (!targetSnapshot.getViews().contains(baseView)) {
      diffResult.addMissingView(baseView);
    }
  }
  for (  View targetView : targetSnapshot.getViews()) {
    if (!baseSnapshot.getViews().contains(targetView)) {
      diffResult.addUnexpectedView(targetView);
    }
  }
}
Program: 84293
Project: 84293
Buggy source:
public void doRollback() throws MigrationFailedException, DatabaseHistoryException, JDBCException, IOException {
  for (  ChangeSet changeSet : allChangeSets) {
    changeSet.execute();
    removeRanStatus(changeSet);
  }
}

Fixed version (ground truth):
public void doRollback() throws MigrationFailedException, JDBCException, IOException {
  for (  ChangeSet changeSet : allChangeSets) {
    changeSet.execute();
    removeRanStatus(changeSet);
  }
}
Program: 84294
Project: 84294
Buggy source:
public void doRollback() throws MigrationFailedException, DatabaseHistoryException, JDBCException, IOException {
  for (  ChangeSet changeSet : changesToRollback) {
    changeSet.execute();
    removeRanStatus(changeSet);
  }
}

Fixed version (ground truth):
public void doRollback() throws MigrationFailedException, JDBCException, IOException {
  for (  ChangeSet changeSet : changesToRollback) {
    changeSet.execute();
    removeRanStatus(changeSet);
  }
}
Program: 84295
Project: 84295
Buggy source:
public String[] generateDerbyStatements(){
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str"+ getColumnDataType()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}

Fixed version (ground truth):
public String[] generateDerbyStatements(){
  List<String> statements=new ArrayList<String>();
  if (defaultNullValue != null) {
    statements.add(generateUpdateStatement());
  }
  statements.add("String_Node_Str" + getTableName() + "String_Node_Str"+ getColumnName()+ "String_Node_Str");
  return statements.toArray(new String[statements.size()]);
}
Program: 84296
Project: 84296
Buggy source:
protected void tearDown() throws Exception {
  Statement statement=connection.createStatement();
  statement.execute("String_Node_Str");
  statement.close();
  super.tearDown();
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  Statement statement=null;
  try {
    statement=connection.createStatement();
    statement.execute("String_Node_Str");
  }
  finally {
    if (statement != null) {
      statement.close();
    }
  }
  super.tearDown();
}
Program: 84297
Project: 84297
Buggy source:
/** 
 * Return an DB2 date literal with the same value as a string formatted using ISO 8601. Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS') Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD hh:mm:ss YYYY-MM-DDThh:mm:ss
 */
public String getDateLiteral(String isoDate){
  String normalLiteral=super.getDateLiteral(isoDate);
  if (isDateOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isTimeOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isDateTime(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else {
    return "String_Node_Str" + isoDate;
  }
}

Fixed version (ground truth):
/** 
 * Return an DB2 date literal with the same value as a string formatted using ISO 8601. Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS') Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD hh:mm:ss YYYY-MM-DDThh:mm:ss
 */
public String getDateLiteral(String isoDate){
  String normalLiteral=super.getDateLiteral(isoDate);
  if (isDateOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append(')');
    return val.toString();
  }
 else   if (isTimeOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append(')');
    return val.toString();
  }
 else   if (isDateTime(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append(')');
    return val.toString();
  }
 else {
    return "String_Node_Str" + isoDate;
  }
}
Program: 84298
Project: 84298
Buggy source:
/** 
 * Return an Oracle date literal with the same value as a string formatted using ISO 8601. <p/> Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS') <p/> Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD YYYY-MM-DDThh:mm:ss
 */
public String getDateLiteral(String isoDate){
  String normalLiteral=super.getDateLiteral(isoDate);
  if (isDateOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isTimeOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isDateTime(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else {
    return "String_Node_Str" + isoDate;
  }
}

Fixed version (ground truth):
/** 
 * Return an Oracle date literal with the same value as a string formatted using ISO 8601. <p/> Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS') <p/> Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD YYYY-MM-DDThh:mm:ss
 */
public String getDateLiteral(String isoDate){
  String normalLiteral=super.getDateLiteral(isoDate);
  if (isDateOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isTimeOnly(isoDate)) {
    StringBuffer val=new StringBuffer();
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else   if (isDateTime(isoDate)) {
    StringBuffer val=new StringBuffer(26);
    val.append("String_Node_Str");
    val.append(normalLiteral);
    val.append("String_Node_Str");
    return val.toString();
  }
 else {
    return "String_Node_Str" + isoDate;
  }
}