nus-yam/ex-repair huggingface dataset:
Program: 166501
Project: 166501
Buggy source:
protected void write(String line){
  writer.println(line.replace("String_Node_Str","String_Node_Str"));
  changed=true;
}

Fixed version (ground truth):
protected void write(String line){
  writer.println(line);
  changed=true;
}
Program: 166502
Project: 166502
Buggy source:
/** 
 * Parse the path part of the uri into namespace and name
 */
private void parsePath(){
  if (Strings.isNullOrEmpty(this.getPath()))   return;
  String[] parts=this.getPath().split("String_Node_Str");
  if (parts == null || parts.length == 0)   return;
  String name=parts[parts.length - 1];
  if (!Strings.isNullOrEmpty(name) && name.toLowerCase().endsWith("String_Node_Str") || name.toLowerCase().endsWith("String_Node_Str")) {
    name=name.substring(0,name.lastIndexOf('.'));
    this.setPath(this.getPath().substring(0,this.getPath().lastIndexOf('.')));
  }
  this.setName(name);
  if (parts.length > 1) {
    this.setNamespace(parts[parts.length - 2]);
  }
  if (parts.length > 2) {
    this.setEngineName(parts[parts.length - 3]);
  }
}

Fixed version (ground truth):
/** 
 * Parse the path part of the uri into namespace and name
 */
private void parsePath(){
  if (Strings.isNullOrEmpty(this.getPath()))   return;
  String[] parts=this.getPath().split("String_Node_Str");
  if (parts == null || parts.length == 0)   return;
  String name=parts[parts.length - 1];
  if (!Strings.isNullOrEmpty(name) && name.toLowerCase().endsWith("String_Node_Str") || name.toLowerCase().endsWith("String_Node_Str")) {
    name=name.substring(0,name.lastIndexOf('.'));
    this.setPath(this.getPath().substring(0,this.getPath().lastIndexOf('.')));
  }
  this.setName(name);
  if (parts.length > 1) {
    this.setNamespace(parts[parts.length - 2]);
  }
}
Program: 166503
Project: 166503
Buggy source:
@Override public void setFactorLevels(String columnName,Factor<?> factor) throws DDFException {
  Column c=this.getColumn(columnName);
  Factor<?> f=c.getOptionalFactor();
  f.setLevelCounts(factor.getLevelCounts());
  f.setLevels(factor.getLevels(),false);
}

Fixed version (ground truth):
@Override public void setFactorLevels(String columnName,Factor<?> factor) throws DDFException {
  Column c=this.getColumn(columnName);
  Factor<?> f=c.getOptionalFactor();
  if (factor.getLevelCounts() != null) {
    f.setLevelCounts(factor.getLevelCounts());
  }
  if (factor.getLevels() != null) {
    f.setLevels(factor.getLevels(),false);
  }
}
Program: 166504
Project: 166504
Buggy source:
@BeforeClass public static void startServer() throws Exception {
  Thread.sleep(1000);
  manager=DDFManager.get(DDFManager.EngineType.BASIC);
  Schema schema=new Schema("String_Node_Str","String_Node_Str");
  DDF ddf=manager.newDDF(manager,new Class<?>[]{DDFManager.class},"String_Node_Str","String_Node_Str",schema);
  Schema schema2=new Schema("String_Node_Str","String_Node_Str");
  DDF ddf2=manager.newDDF(manager,new Class<?>[]{DDFManager.class},"String_Node_Str","String_Node_Str",schema2);
  parser=new CCJSqlParserManager();
}

Fixed version (ground truth):
@BeforeClass public static void startServer() throws Exception {
  Thread.sleep(1000);
  manager=DDFManager.get(DDFManager.EngineType.SPARK);
  Schema schema=new Schema("String_Node_Str","String_Node_Str");
  DDF ddf=manager.newDDF(manager,new Class<?>[]{DDFManager.class},"String_Node_Str","String_Node_Str",schema);
  Schema schema2=new Schema("String_Node_Str","String_Node_Str");
  DDF ddf2=manager.newDDF(manager,new Class<?>[]{DDFManager.class},"String_Node_Str","String_Node_Str",schema2);
  parser=new CCJSqlParserManager();
}
Program: 166506
Project: 166506
Buggy source:
public DDF getDDFByURI(String uri) throws DDFException {
  for (  DDFManager ddfManager : mDDFManagerList) {
    try {
      DDF ddf=ddfManager.getDDFByURI(uri);
      return ddf;
    }
 catch (    Exception e) {
    }
  }
  throw new DDFException("String_Node_Str" + uri);
}

Fixed version (ground truth):
public DDF getDDFByURI(String uri) throws DDFException {
  for (  DDFManager ddfManager : mDDFManagerList) {
    try {
      DDF ddf=ddfManager.getDDFByURI(uri);
      return ddf;
    }
 catch (    Exception e) {
      try {
        DDF ddf=ddfManager.getOrRestoreDDFUri(uri);
        return ddf;
      }
 catch (      Exception e2) {
      }
    }
  }
  throw new DDFException("String_Node_Str" + uri);
}
Program: 166507
Project: 166507
Buggy source:
public static DataSourceDescriptor resolve(String source,Map<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}

Fixed version (ground truth):
public static DataSourceDescriptor resolve(String source,Map<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}
Program: 166508
Project: 166508
Buggy source:
@Override public Integer call(Object object,String field) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMonthOfYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getWeekyear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getWeekOfWeekyear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfMonth());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfWeek());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getHourOfDay());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMinuteOfHour());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getSecondOfMinute());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMillisOfSecond());
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Integer call(Object object,String field) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMonthOfYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getWeekyear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getWeekOfWeekyear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfMonth());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfWeek());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getDayOfYear());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getHourOfDay());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMinuteOfHour());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getSecondOfMinute());
    }
 else     if (field.equalsIgnoreCase("String_Node_Str")) {
      return new Integer(dt.getMillisOfSecond());
    }
  }
  return null;
}
Program: 166509
Project: 166509
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.dayOfMonth().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.dayOfMonth().getAsString());
  }
 else {
    return null;
  }
}
Program: 166510
Project: 166510
Buggy source:
@Override public String call(Object object,String format) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    if (format.equalsIgnoreCase("String_Node_Str")) {
      return "String_Node_Str" + dt.getDayOfWeek();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.dayOfWeek().getAsText();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.dayOfWeek().getAsShortText();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String call(Object object,String format) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    if (format.equalsIgnoreCase("String_Node_Str")) {
      return "String_Node_Str" + dt.getDayOfWeek();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.dayOfWeek().getAsText();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.dayOfWeek().getAsShortText();
    }
  }
  return null;
}
Program: 166511
Project: 166511
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.dayOfYear().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.dayOfYear().getAsString());
  }
 else {
    return null;
  }
}
Program: 166512
Project: 166512
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.hourOfDay().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.hourOfDay().getAsString());
  }
 else {
    return null;
  }
}
Program: 166513
Project: 166513
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.millisOfSecond().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.millisOfSecond().getAsString());
  }
 else {
    return null;
  }
}
Program: 166514
Project: 166514
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.minuteOfHour().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.minuteOfHour().getAsString());
  }
 else {
    return null;
  }
}
Program: 166515
Project: 166515
Buggy source:
@Override public String call(Object object,String format) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    if (format.equalsIgnoreCase("String_Node_Str")) {
      return "String_Node_Str" + dt.getMonthOfYear();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.monthOfYear().getAsText();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.monthOfYear().getAsShortText();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String call(Object object,String format) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    if (format.equalsIgnoreCase("String_Node_Str")) {
      return "String_Node_Str" + dt.getMonthOfYear();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.monthOfYear().getAsText();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      return dt.monthOfYear().getAsShortText();
    }
  }
  return null;
}
Program: 166516
Project: 166516
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.secondOfMinute().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.secondOfMinute().getAsString());
  }
 else {
    return null;
  }
}
Program: 166517
Project: 166517
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.weekOfWeekyear().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.weekOfWeekyear().getAsString());
  }
 else {
    return null;
  }
}
Program: 166518
Project: 166518
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.weekyear().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.weekyear().getAsString());
  }
 else {
    return null;
  }
}
Program: 166519
Project: 166519
Buggy source:
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject((String)object);
  if (dt != null) {
    return Integer.parseInt(dt.year().getAsString());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Integer call(Object object) throws Exception {
  DateTime dt=Utils.toDateTimeObject(object);
  if (dt != null) {
    return Integer.parseInt(dt.year().getAsString());
  }
 else {
    return null;
  }
}
Program: 166524
Project: 166524
Buggy source:
public JDBCDDFManager(DataSourceDescriptor dataSourceDescriptor,String engineType) throws Exception {
  super(dataSourceDescriptor);
  this.setEngineType(engineType);
  mLog.info("String_Node_Str");
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=(JDBCDataSourceDescriptor)dataSourceDescriptor;
  this.setDataSourceDescriptor(dataSourceDescriptor);
  if (mJdbcDataSource == null) {
    throw new Exception("String_Node_Str" + "String_Node_Str");
  }
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUsername(),mJdbcDataSource.getCredentials().getPassword());
  mLog.info("String_Node_Str" + mJdbcDataSource.getDataSourceUri().toString());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  mLog.info("String_Node_Str");
  this.showTables();
  mLog.info("String_Node_Str");
  if (isDDFAutoCreate) {
  }
 else {
  }
}

Fixed version (ground truth):
public JDBCDDFManager(DataSourceDescriptor dataSourceDescriptor,String engineType) throws Exception {
  super(dataSourceDescriptor);
  this.setEngineType(engineType);
  mLog.info("String_Node_Str");
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=(JDBCDataSourceDescriptor)dataSourceDescriptor;
  this.setDataSourceDescriptor(dataSourceDescriptor);
  if (mJdbcDataSource == null) {
    throw new Exception("String_Node_Str" + "String_Node_Str");
  }
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUsername(),mJdbcDataSource.getCredentials().getPassword());
  mLog.info("String_Node_Str" + mJdbcDataSource.getDataSourceUri().toString());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  this.showTables();
  mLog.info("String_Node_Str");
  if (isDDFAutoCreate) {
  }
 else {
  }
}
Program: 166525
Project: 166525
Buggy source:
public Integer getColType(){
  return colType;
}

Fixed version (ground truth):
/** 
 * @Getter and Setter.
 * @return
 */
public Integer getColType(){
  return colType;
}
Program: 166526
Project: 166526
Buggy source:
/** 
 * @return DDF Column type
 */
public static Schema.ColumnType getDDFType(Integer colType) throws DDFException {
switch (colType) {
case Types.ARRAY:
    return Schema.ColumnType.ARRAY;
case Types.BIGINT:
  return Schema.ColumnType.BIGINT;
case Types.BINARY:
return Schema.ColumnType.BINARY;
case Types.BOOLEAN:
return Schema.ColumnType.BOOLEAN;
case Types.BIT:
return Schema.ColumnType.BOOLEAN;
case Types.CHAR:
return Schema.ColumnType.STRING;
case Types.DATE:
return Schema.ColumnType.DATE;
case Types.DECIMAL:
return Schema.ColumnType.DECIMAL;
case Types.DOUBLE:
return Schema.ColumnType.DOUBLE;
case Types.FLOAT:
return Schema.ColumnType.FLOAT;
case Types.INTEGER:
return Schema.ColumnType.INT;
case Types.LONGVARCHAR:
return Schema.ColumnType.STRING;
case Types.NUMERIC:
return Schema.ColumnType.DECIMAL;
case Types.NVARCHAR:
return Schema.ColumnType.STRING;
case Types.SMALLINT:
return Schema.ColumnType.INT;
case Types.TIMESTAMP:
return Schema.ColumnType.TIMESTAMP;
case Types.TINYINT:
return Schema.ColumnType.INT;
case Types.VARCHAR:
return Schema.ColumnType.STRING;
default :
throw new DDFException(String.format("String_Node_Str",JDBCUtils.getSqlTypeName(colType)));
}
}

Fixed version (ground truth):
/** 
 * @return DDF Column type
 */
public static Schema.ColumnType getDDFType(Integer colType) throws DDFException {
switch (colType) {
case Types.ARRAY:
    return Schema.ColumnType.ARRAY;
case Types.BIGINT:
  return Schema.ColumnType.BIGINT;
case Types.BINARY:
return Schema.ColumnType.BINARY;
case Types.BOOLEAN:
return Schema.ColumnType.BOOLEAN;
case Types.BIT:
return Schema.ColumnType.BOOLEAN;
case Types.CHAR:
return Schema.ColumnType.STRING;
case Types.DATE:
return Schema.ColumnType.DATE;
case Types.DECIMAL:
return Schema.ColumnType.DECIMAL;
case Types.DOUBLE:
return Schema.ColumnType.DOUBLE;
case Types.FLOAT:
return Schema.ColumnType.FLOAT;
case Types.INTEGER:
return Schema.ColumnType.INT;
case Types.LONGVARCHAR:
return Schema.ColumnType.STRING;
case Types.NUMERIC:
return Schema.ColumnType.DECIMAL;
case Types.NVARCHAR:
return Schema.ColumnType.STRING;
case Types.SMALLINT:
return Schema.ColumnType.INT;
case Types.TIMESTAMP:
return Schema.ColumnType.TIMESTAMP;
case Types.TINYINT:
return Schema.ColumnType.INT;
case Types.VARCHAR:
return Schema.ColumnType.STRING;
case Types.VARBINARY:
return Schema.ColumnType.BINARY;
default :
throw new DDFException(String.format("String_Node_Str",JDBCUtils.getSqlTypeName(colType)));
}
}
Program: 166527
Project: 166527
Buggy source:
/** 
 * @brief Init an engine.
 * @param engineName The unique name of the engine.
 * @param engineType The type of the engine.
 * @param dataSourceDescriptor DataSource.
 * @return The new ddf manager.
 * @throws DDFException
 */
public DDFManager initEngine(String engineName,String engineType,DataSourceDescriptor dataSourceDescriptor) throws DDFException {
  if (engineName == null) {
    throw new DDFException("String_Node_Str");
  }
  if (mName2DDFManager.get(engineName) != null) {
    throw new DDFException("String_Node_Str" + engineName);
  }
  DDFManager manager=DDFManager.get(engineType,dataSourceDescriptor);
  if (manager == null) {
    throw new DDFException("String_Node_Str" + engineName);
  }
  manager.setEngineName(engineName);
  manager.setDDFCoordinator(this);
  mDDFManagerList.add(manager);
  mName2DDFManager.put(engineName,manager);
  return manager;
}

Fixed version (ground truth):
/** 
 * @brief Init an engine.
 * @param engineName The unique name of the engine.
 * @param engineType The type of the engine.
 * @param dataSourceDescriptor DataSource.
 * @return The new ddf manager.
 * @throws DDFException
 */
public DDFManager initEngine(String engineName,String engineType,DataSourceDescriptor dataSourceDescriptor) throws DDFException {
  this.getEngine("String_Node_Str").log("String_Node_Str");
  if (engineName == null) {
    throw new DDFException("String_Node_Str");
  }
  if (mName2DDFManager.get(engineName) != null) {
    throw new DDFException("String_Node_Str" + engineName);
  }
  this.getEngine("String_Node_Str").log("String_Node_Str");
  DDFManager manager=DDFManager.get(engineType,dataSourceDescriptor);
  if (manager == null) {
    throw new DDFException("String_Node_Str" + engineName);
  }
  this.getEngine("String_Node_Str").log("String_Node_Str");
  manager.setEngineName(engineName);
  manager.setEngineType(engineType);
  manager.setDDFCoordinator(this);
  mDDFManagerList.add(manager);
  mName2DDFManager.put(engineName,manager);
  return manager;
}
Program: 166528
Project: 166528
Buggy source:
public static DataSourceDescriptor resolve(String source,Map<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}

Fixed version (ground truth):
public static DataSourceDescriptor resolve(String source,Map<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}
Program: 166530
Project: 166530
Buggy source:
public JDBCDDFManager(DataSourceDescriptor dataSourceDescriptor) throws Exception {
  super(dataSourceDescriptor);
  mLog.info("String_Node_Str");
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=(JDBCDataSourceDescriptor)dataSourceDescriptor;
  this.setDataSourceDescriptor(dataSourceDescriptor);
  if (mJdbcDataSource == null) {
    throw new Exception("String_Node_Str" + "String_Node_Str");
  }
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUserName(),mJdbcDataSource.getCredentials().getPassword());
  mLog.info("String_Node_Str" + mJdbcDataSource.getDataSourceUri().toString());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  mLog.info("String_Node_Str");
  this.showTables();
  mLog.info("String_Node_Str");
  if (isDDFAutoCreate) {
  }
 else {
  }
}

Fixed version (ground truth):
public JDBCDDFManager(DataSourceDescriptor dataSourceDescriptor,String engineType) throws Exception {
  super(dataSourceDescriptor);
  this.setEngineType(engineType);
  mLog.info("String_Node_Str");
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=(JDBCDataSourceDescriptor)dataSourceDescriptor;
  this.setDataSourceDescriptor(dataSourceDescriptor);
  if (mJdbcDataSource == null) {
    throw new Exception("String_Node_Str" + "String_Node_Str");
  }
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUserName(),mJdbcDataSource.getCredentials().getPassword());
  mLog.info("String_Node_Str" + mJdbcDataSource.getDataSourceUri().toString());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  mLog.info("String_Node_Str");
  this.showTables();
  mLog.info("String_Node_Str");
  if (isDDFAutoCreate) {
  }
 else {
  }
}
Program: 166531
Project: 166531
Buggy source:
@Override public String getEngine(){
  return ConfigConstant.ENGINE_NAME_JDBC.toString();
}

Fixed version (ground truth):
@Override public String getEngine(){
  return this.getEngineType();
}
Program: 166533
Project: 166533
Buggy source:
@Override public DDF sql2ddf(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat) throws DDFException {
  this.getManager().log("String_Node_Str");
  Connection conn=this.getConn();
  try {
    Statement statement=conn.createStatement();
    statement.execute("String_Node_Str" + command + "String_Node_Str");
    DDF ddf=new JDBCDDF((JDBCDDFManager)this.getManager(),null,null,null,"String_Node_Str");
    this.getManager().addDDF(ddf);
    this.getManager().log("String_Node_Str");
    return ddf;
  }
 catch (  SQLException e) {
    e.printStackTrace();
    throw new DDFException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public DDF sql2ddf(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat) throws DDFException {
  this.getManager().log("String_Node_Str");
  Connection conn=this.getConn();
  try {
    Statement statement=conn.createStatement();
    String randomTbName=this.randomString(24);
    this.getManager().log("String_Node_Str" + randomTbName);
    statement.execute("String_Node_Str" + randomTbName + "String_Node_Str"+ command+ "String_Node_Str");
    DDF ddf=new JDBCDDF((JDBCDDFManager)this.getManager(),null,null,null,randomTbName);
    this.getManager().addDDF(ddf);
    this.getManager().log("String_Node_Str");
    return ddf;
  }
 catch (  SQLException e) {
    e.printStackTrace();
    throw new DDFException("String_Node_Str" + e.getMessage());
  }
}
Program: 166534
Project: 166534
Buggy source:
public HDFSDataSourceDescriptor(String uri,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote,String comment) throws URISyntaxException {
  TextFileFormat textFileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  List<Schema.Column> columnList;
  if (schema != null) {
    columnList=new Schema(schema).getColumns();
  }
 else {
    columnList=null;
  }
  this.setDataSourceUri(new DataSourceURI(uri));
  this.setFileFormat(textFileFormat);
  this.setDataSourceSchema(new DataSourceSchema(columnList));
  this.setFileFormat(textFileFormat);
  this.setComment(comment);
}

Fixed version (ground truth):
public HDFSDataSourceDescriptor(String uri,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote,String comment) throws URISyntaxException {
  TextFileFormat textFileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  List<Schema.Column> columnList;
  if (!Strings.isNullOrEmpty(schema)) {
    columnList=new Schema(schema).getColumns();
  }
 else {
    columnList=null;
  }
  this.setDataSourceUri(new DataSourceURI(uri));
  this.setFileFormat(textFileFormat);
  this.setDataSourceSchema(new DataSourceSchema(columnList));
  this.setFileFormat(textFileFormat);
  this.setComment(comment);
}
Program: 166535
Project: 166535
Buggy source:
public S3DataSourceDescriptor(String uri,String awsKeyID,String awsSecretKey,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote) throws DDFException {
  List<Schema.Column> columns;
  if (schema != null) {
    columns=new Schema(schema).getColumns();
  }
 else {
    columns=null;
  }
  TextFileFormat fileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  try {
    this.setDataSourceUri(new S3DataSourceURI(uri));
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
  this.setDataSourceCredentials(new S3DataSourceCredentials(awsKeyID,awsSecretKey));
  this.setDataSourceSchema(new DataSourceSchema(columns));
  this.setFileFormat(fileFormat);
}

Fixed version (ground truth):
public S3DataSourceDescriptor(String uri,String awsKeyID,String awsSecretKey,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote) throws DDFException {
  List<Schema.Column> columns;
  if (Strings.isNullOrEmpty(schema)) {
    columns=new Schema(schema).getColumns();
  }
 else {
    columns=null;
  }
  TextFileFormat fileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  try {
    this.setDataSourceUri(new S3DataSourceURI(uri));
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
  this.setDataSourceCredentials(new S3DataSourceCredentials(awsKeyID,awsSecretKey));
  this.setDataSourceSchema(new DataSourceSchema(columns));
  this.setFileFormat(fileFormat);
}
Program: 166536
Project: 166536
Buggy source:
public S3DataSourceDescriptor(String uri,String awsKeyID,String awsSecretKey,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote) throws DDFException {
  List<Schema.Column> columns;
  if (Strings.isNullOrEmpty(schema)) {
    columns=new Schema(schema).getColumns();
  }
 else {
    columns=null;
  }
  TextFileFormat fileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  try {
    this.setDataSourceUri(new S3DataSourceURI(uri));
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
  this.setDataSourceCredentials(new S3DataSourceCredentials(awsKeyID,awsSecretKey));
  this.setDataSourceSchema(new DataSourceSchema(columns));
  this.setFileFormat(fileFormat);
}

Fixed version (ground truth):
public S3DataSourceDescriptor(String uri,String awsKeyID,String awsSecretKey,String schema,DataFormat format,Boolean hasHeader,String delimiter,String quote) throws DDFException {
  List<Schema.Column> columns;
  if (!Strings.isNullOrEmpty(schema)) {
    columns=new Schema(schema).getColumns();
  }
 else {
    columns=null;
  }
  TextFileFormat fileFormat=new TextFileFormat(format,hasHeader,delimiter,quote);
  try {
    this.setDataSourceUri(new S3DataSourceURI(uri));
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
  this.setDataSourceCredentials(new S3DataSourceCredentials(awsKeyID,awsSecretKey));
  this.setDataSourceSchema(new DataSourceSchema(columns));
  this.setFileFormat(fileFormat);
}
Program: 166537
Project: 166537
Buggy source:
public JDBCDDFManager(JDBCDataSourceDescriptor jdbcDataSource) throws SQLException, ClassNotFoundException {
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=jdbcDataSource;
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUserName(),mJdbcDataSource.getCredentials().getPassword());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  if (isDDFAutoCreate) {
  }
 else {
  }
}

Fixed version (ground truth):
public JDBCDDFManager(JDBCDataSourceDescriptor jdbcDataSource) throws SQLException, ClassNotFoundException {
  String driver=sConfigHandler.getValue(this.getEngine(),ConfigConstant.JDBC_DRIVER.toString());
  Class.forName(driver);
  mJdbcDataSource=jdbcDataSource;
  conn=DriverManager.getConnection(mJdbcDataSource.getDataSourceUri().toString(),mJdbcDataSource.getCredentials().getUsername(),mJdbcDataSource.getCredentials().getPassword());
  boolean isDDFAutoCreate=Boolean.parseBoolean(sConfigHandler.getValue(ConfigConstant.ENGINE_NAME_JDBC.toString(),ConfigConstant.JDBC_DDF_AUTOCREATE.toString()));
  if (isDDFAutoCreate) {
  }
 else {
  }
}
Program: 166538
Project: 166538
Buggy source:
@Before public void setUp() throws Exception {
  createTableAirlineWithNA();
  ddf=manager.sql2ddf("String_Node_Str");
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  createTableAirlineWithNA();
  ddf=manager.sql2ddf("String_Node_Str","String_Node_Str");
}
Program: 166539
Project: 166539
Buggy source:
@Override public SqlResult sql(String command,Integer maxRows,DataSourceDescriptor dataSource) throws DDFException {
  Connection conn=this.getConn();
  Statement statement;
  try {
    statement=conn.createStatement();
    ResultSet rs=statement.executeQuery(command);
    ResultSetMetaData rsmd=rs.getMetaData();
    int colSize=rsmd.getColumnCount();
    if (colSize == 0) {
      return new SqlResult(null,null);
    }
    List<Schema.Column> columnList=new ArrayList<Schema.Column>();
    for (int colIdx=0; colIdx < colSize; ++colIdx) {
      columnList.add(new Schema.Column(rsmd.getColumnName(colIdx),JDBCUtils.getDDFType(rsmd.getColumnType(colIdx))));
    }
    Schema schema=new Schema(rsmd.getTableName(0),columnList);
    List<String> result=new ArrayList<String>();
    StringBuilder sb=new StringBuilder();
    while (rs.next()) {
      sb.append(rs.getObject(0).toString());
      for (int colIdx=1; colIdx < colSize; ++colIdx) {
        sb.append("String_Node_Str").append(rs.getObject(colIdx).toString());
      }
      result.add(sb.toString());
      sb.delete(0,sb.length());
    }
    return new SqlResult(schema,result);
  }
 catch (  SQLException e) {
    mLog.debug(e.getMessage());
    e.printStackTrace();
    throw new DDFException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public SqlResult sql(String command,Integer maxRows,DataSourceDescriptor dataSource) throws DDFException {
  Connection conn=this.getConn();
  Statement statement;
  try {
    statement=conn.createStatement();
    ResultSet rs=statement.executeQuery(command);
    ResultSetMetaData rsmd=rs.getMetaData();
    int colSize=rsmd.getColumnCount();
    if (colSize == 0) {
      return new SqlResult(null,null);
    }
    List<Schema.Column> columnList=new ArrayList<Schema.Column>();
    for (int colIdx=1; colIdx < colSize; ++colIdx) {
      columnList.add(new Schema.Column(rsmd.getColumnName(colIdx),JDBCUtils.getDDFType(rsmd.getColumnType(colIdx))));
    }
    Schema schema=new Schema(rsmd.getTableName(1),columnList);
    List<String> result=new ArrayList<String>();
    StringBuilder sb=new StringBuilder();
    while (rs.next()) {
      sb.append(rs.getObject(1).toString());
      for (int colIdx=1; colIdx < colSize; ++colIdx) {
        sb.append("String_Node_Str").append(rs.getObject(colIdx).toString());
      }
      result.add(sb.toString());
      sb.delete(0,sb.length());
    }
    return new SqlResult(schema,result);
  }
 catch (  SQLException e) {
    mLog.debug(e.getMessage());
    e.printStackTrace();
    throw new DDFException("String_Node_Str");
  }
}
Program: 166540
Project: 166540
Buggy source:
public static S3DataSourceDescriptor resolveS3(HashMap<String,String> options) throws DDFException {
  String uri=options.get("String_Node_Str");
  String awsKeyID=getOrDefault(options,"String_Node_Str","String_Node_Str");
  String awsSecretKey=getOrDefault(options,"String_Node_Str","String_Node_Str");
  String schema=options.get("String_Node_Str");
  DataFormat format=DataFormat.fromInt(Integer.parseInt(options.get("String_Node_Str")));
  if (options.get("String_Node_Str") != null) {
    String serde=options.get("String_Node_Str");
    return new S3DataSourceDescriptor(uri,awsKeyID,awsSecretKey,schema,serde,format);
  }
 else {
    String hasHeaderString=getOrDefault(options,"String_Node_Str","String_Node_Str");
    Boolean hasheader=Boolean.valueOf(hasHeaderString);
    String delim=getOrDefault(options,"String_Node_Str","String_Node_Str");
    String quote=getOrDefault(options,"String_Node_Str","String_Node_Str");
    return new S3DataSourceDescriptor(uri,awsKeyID,awsSecretKey,schema,format,hasheader,delim,quote);
  }
}

Fixed version (ground truth):
public static S3DataSourceDescriptor resolveS3(Map<String,String> options) throws DDFException {
  String uri=options.get("String_Node_Str");
  String awsKeyID=getOrDefault(options,"String_Node_Str","String_Node_Str");
  String awsSecretKey=getOrDefault(options,"String_Node_Str","String_Node_Str");
  String schema=options.get("String_Node_Str");
  DataFormat format=DataFormat.fromInt(Integer.parseInt(options.get("String_Node_Str")));
  if (options.get("String_Node_Str") != null) {
    String serde=options.get("String_Node_Str");
    return new S3DataSourceDescriptor(uri,awsKeyID,awsSecretKey,schema,serde,format);
  }
 else {
    String hasHeaderString=getOrDefault(options,"String_Node_Str","String_Node_Str");
    Boolean hasheader=Boolean.valueOf(hasHeaderString);
    String delim=getOrDefault(options,"String_Node_Str","String_Node_Str");
    String quote=getOrDefault(options,"String_Node_Str","String_Node_Str");
    return new S3DataSourceDescriptor(uri,awsKeyID,awsSecretKey,schema,format,hasheader,delim,quote);
  }
}
Program: 166541
Project: 166541
Buggy source:
public static DataSourceDescriptor resolve(String source,HashMap<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}

Fixed version (ground truth):
public static DataSourceDescriptor resolve(String source,Map<String,String> options) throws DDFException, URISyntaxException {
switch (source) {
case "String_Node_Str":
{
      return resolveS3(options);
    }
case "String_Node_Str":
{
    return resolveHDFS(options);
  }
case "String_Node_Str":
{
  return resolveJDBC(options);
}
case "String_Node_Str":
{
return resolveSQL(options);
}
default :
{
throw new DDFException("String_Node_Str" + source);
}
}
}
Program: 166542
Project: 166542
Buggy source:
public static JDBCDataSourceDescriptor resolveJDBC(HashMap<String,String> options) throws DDFException {
  String uri=options.get("String_Node_Str");
  String username=options.get("String_Node_Str");
  String password=options.get("String_Node_Str");
  String dbTable=options.get("String_Node_Str");
  try {
    return new JDBCDataSourceDescriptor(uri,username,password,dbTable);
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
}

Fixed version (ground truth):
public static JDBCDataSourceDescriptor resolveJDBC(Map<String,String> options) throws DDFException {
  String uri=options.get("String_Node_Str");
  String username=options.get("String_Node_Str");
  String password=options.get("String_Node_Str");
  String dbTable=options.get("String_Node_Str");
  try {
    return new JDBCDataSourceDescriptor(uri,username,password,dbTable);
  }
 catch (  URISyntaxException e) {
    throw new DDFException(e);
  }
}
Program: 166543
Project: 166543
Buggy source:
public static HDFSDataSourceDescriptor resolveHDFS(HashMap<String,String> options) throws DDFException, URISyntaxException {
  String uri=options.get("String_Node_Str");
  String schema=getOrDefault(options,"String_Node_Str",null);
  String originalSource=getOrDefault(options,"String_Node_Str","String_Node_Str");
  DataFormat format=DataFormat.fromInt(Integer.parseInt(options.get("String_Node_Str")));
  if (options.containsKey("String_Node_Str")) {
    String serde=options.get("String_Node_Str");
    return new HDFSDataSourceDescriptor(uri,schema,serde,originalSource,format);
  }
 else {
    String delim=getOrDefault(options,"String_Node_Str","String_Node_Str");
    String quote=getOrDefault(options,"String_Node_Str","String_Node_Str");
    Boolean hasHeader=Boolean.parseBoolean(getOrDefault(options,"String_Node_Str","String_Node_Str"));
    return new HDFSDataSourceDescriptor(uri,schema,format,hasHeader,delim,quote,originalSource);
  }
}

Fixed version (ground truth):
public static HDFSDataSourceDescriptor resolveHDFS(Map<String,String> options) throws DDFException, URISyntaxException {
  String uri=options.get("String_Node_Str");
  String schema=getOrDefault(options,"String_Node_Str",null);
  String originalSource=getOrDefault(options,"String_Node_Str","String_Node_Str");
  DataFormat format=DataFormat.fromInt(Integer.parseInt(options.get("String_Node_Str")));
  if (options.containsKey("String_Node_Str")) {
    String serde=options.get("String_Node_Str");
    return new HDFSDataSourceDescriptor(uri,schema,serde,originalSource,format);
  }
 else {
    String delim=getOrDefault(options,"String_Node_Str","String_Node_Str");
    String quote=getOrDefault(options,"String_Node_Str","String_Node_Str");
    Boolean hasHeader=Boolean.parseBoolean(getOrDefault(options,"String_Node_Str","String_Node_Str"));
    return new HDFSDataSourceDescriptor(uri,schema,format,hasHeader,delim,quote,originalSource);
  }
}
Program: 166544
Project: 166544
Buggy source:
public static SQLDataSourceDescriptor resolveSQL(HashMap<String,String> options){
  String sql=options.get("String_Node_Str");
  String namespace=getOrDefault(options,"String_Node_Str",null);
  String uriListStr=getOrDefault(options,"String_Node_Str",null);
  String uuidListStr=getOrDefault(options,"String_Node_Str",null);
  String dataSource=getOrDefault(options,"String_Node_Str",null);
  return new SQLDataSourceDescriptor(sql,dataSource,namespace,uriListStr,uuidListStr);
}

Fixed version (ground truth):
public static SQLDataSourceDescriptor resolveSQL(Map<String,String> options){
  String sql=options.get("String_Node_Str");
  String namespace=getOrDefault(options,"String_Node_Str",null);
  String uriListStr=getOrDefault(options,"String_Node_Str",null);
  String uuidListStr=getOrDefault(options,"String_Node_Str",null);
  String dataSource=getOrDefault(options,"String_Node_Str",null);
  return new SQLDataSourceDescriptor(sql,dataSource,namespace,uriListStr,uuidListStr);
}
Program: 166545
Project: 166545
Buggy source:
@Override public URI getUri(){
  if (this.awsKeyID != null && this.awsSecretKey != null) {
    String creds=this.awsKeyID + "String_Node_Str" + this.awsSecretKey+ "String_Node_Str";
    try {
      return new URI("String_Node_Str" + creds + this.getUri().toString());
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
 else {
    try {
      return new URI("String_Node_Str" + this.getUri().toString());
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public URI getUri(){
  if (this.awsKeyID != null && this.awsSecretKey != null) {
    String creds=this.awsKeyID + "String_Node_Str" + this.awsSecretKey+ "String_Node_Str";
    try {
      return new URI("String_Node_Str" + creds + this.mUri.toString());
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
 else {
    try {
      return new URI("String_Node_Str" + this.mUri.toString());
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
  return null;
}
Program: 166546
Project: 166546
Buggy source:
@Override public DDF sql2ddf(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat) throws DDFException {
  DataFrame rdd=null;
  if (dataSource != null) {
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor != null) {
      if (!sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str")) {
        throw new DDFException("String_Node_Str");
      }
    }
  }
  rdd=this.getHiveContext().sql(command);
  if (schema == null)   schema=SchemaHandler.getSchemaFromDataFrame(rdd);
  DDF ddf=this.getManager().newDDF(this.getManager(),rdd,new Class<?>[]{DataFrame.class},null,null,schema);
  ddf.getRepresentationHandler().get(new Class<?>[]{RDD.class,Row.class});
  return ddf;
}

Fixed version (ground truth):
@Override public DDF sql2ddf(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat) throws DDFException {
  System.out.println("String_Node_Str" + command);
  DataFrame rdd=null;
  if (dataSource != null) {
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor != null) {
      if (!sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str")) {
        throw new DDFException("String_Node_Str");
      }
    }
  }
  rdd=this.getHiveContext().sql(command);
  if (schema == null)   schema=SchemaHandler.getSchemaFromDataFrame(rdd);
  DDF ddf=this.getManager().newDDF(this.getManager(),rdd,new Class<?>[]{DataFrame.class},null,null,schema);
  ddf.getRepresentationHandler().get(new Class<?>[]{RDD.class,Row.class});
  return ddf;
}
Program: 166547
Project: 166547
Buggy source:
@Override public SqlResult sql(String command,Integer maxRows,DataSourceDescriptor dataSource) throws DDFException {
  DataFrame rdd=null;
  if (dataSource != null) {
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor != null) {
      if (!sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str")) {
        throw new DDFException("String_Node_Str");
      }
    }
  }
  rdd=this.getHiveContext().sql(command);
  Schema schema=SparkUtils.schemaFromDataFrame(rdd);
  String[] strResult=SparkUtils.df2txt(rdd,"String_Node_Str");
  return new SqlResult(schema,Arrays.asList(strResult));
}

Fixed version (ground truth):
@Override public SqlResult sql(String command,Integer maxRows,DataSourceDescriptor dataSource) throws DDFException {
  System.out.println("String_Node_Str" + command);
  DataFrame rdd=null;
  if (dataSource != null) {
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor != null) {
      if (!sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str") && !sqlDataSourceDescriptor.getDataSource().equals("String_Node_Str")) {
        throw new DDFException("String_Node_Str");
      }
    }
  }
  rdd=this.getHiveContext().sql(command);
  Schema schema=SparkUtils.schemaFromDataFrame(rdd);
  String[] strResult=SparkUtils.df2txt(rdd,"String_Node_Str");
  return new SqlResult(schema,Arrays.asList(strResult));
}
Program: 166548
Project: 166548
Buggy source:
public synchronized void setDDFName(DDF ddf,String name) throws DDFException {
  if (!Strings.isNullOrEmpty(name)) {
    ddf.setName(name);
    this.mUris.put(ddf.getUri(),ddf.getUUID());
  }
 else {
    throw new DDFException(String.format("String_Node_Str"));
  }
}

Fixed version (ground truth):
public synchronized void setDDFName(DDF ddf,String name) throws DDFException {
  if (!Strings.isNullOrEmpty(name)) {
    if (!Strings.isNullOrEmpty(ddf.getName())) {
      this.mUris.remove(ddf.getUri());
    }
    ddf.setName(name);
    this.mUris.put(ddf.getUri(),ddf.getUUID());
  }
 else {
    throw new DDFException(String.format("String_Node_Str"));
  }
}
Program: 166549
Project: 166549
Buggy source:
public void JDBCDataSourceCredentials(String username,String password){
  mUserName=username;
  mPassword=password;
}

Fixed version (ground truth):
public JDBCDataSourceCredentials(String username,String password){
  mUserName=username;
  mPassword=password;
}