Program: 166529
Project: 166529
Buggy source:
public DDF sql2ddfHandle(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat,TableNameReplacer tableNameReplacer) throws DDFException {
  if (!this.getManager().getEngine().equals("String_Node_Str")) {
    throw new DDFException("String_Node_Str" + "String_Node_Str");
  }
  if (dataSource != null) {
    if (dataSource instanceof JDBCDataSourceDescriptor) {
      return this.sql2ddf(command,schema,dataSource,dataFormat);
    }
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor == null) {
      throw new DDFException("String_Node_Str");
    }
    if (sqlDataSourceDescriptor.getDataSource() != null) {
switch (sqlDataSourceDescriptor.getDataSource()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
        return this.sql2ddf(command,schema,dataSource,dataFormat);
default :
      return this.sql2ddf(command,schema,dataSource,dataFormat);
  }
}
}
CCJSqlParserManager parserManager=new CCJSqlParserManager();
StringReader reader=new StringReader(command);
try {
Statement statement=parserManager.parse(reader);
if (!(statement instanceof Select)) {
  throw new DDFException("String_Node_Str");
}
 else {
  this.mLog.info("String_Node_Str" + command);
  statement=tableNameReplacer.run(statement);
  if (tableNameReplacer.containsLocalTable) {
    this.mLog.info("String_Node_Str" + statement.toString());
    return this.sql2ddf(statement.toString(),schema,dataSource,dataFormat);
  }
 else {
    String selectString=statement.toString();
    DDF ddf=this.getManager().transfer(tableNameReplacer.fromEngineName,"String_Node_Str" + selectString + "String_Node_Str"+ "String_Node_Str");
    return ddf;
  }
}
}
 catch (Exception e) {
OutputStream os=new OutputStream(){
  private StringBuilder string=new StringBuilder();
  @Override public void write(  int b) throws IOException {
    this.string.append((char)b);
  }
  public String toString(){
    return this.string.toString();
  }
}
;
e.printStackTrace(new PrintStream(os));
this.mLog.info(os.toString());
this.mLog.info("String_Node_Str" + command);
throw new DDFException(e);
}
}

Fixed version (ground truth):
public DDF sql2ddfHandle(String command,Schema schema,DataSourceDescriptor dataSource,DataFormat dataFormat,TableNameReplacer tableNameReplacer) throws DDFException {
  if (!this.getManager().getEngine().equals("String_Node_Str")) {
    throw new DDFException("String_Node_Str" + "String_Node_Str");
  }
  if (dataSource != null) {
    if (dataSource instanceof JDBCDataSourceDescriptor) {
      return this.sql2ddf(command,schema,dataSource,dataFormat);
    }
    SQLDataSourceDescriptor sqlDataSourceDescriptor=(SQLDataSourceDescriptor)dataSource;
    if (sqlDataSourceDescriptor == null) {
      throw new DDFException("String_Node_Str");
    }
    if (sqlDataSourceDescriptor.getDataSource() != null) {
switch (sqlDataSourceDescriptor.getDataSource()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
        return this.sql2ddf(command,schema,dataSource,dataFormat);
default :
      return this.sql2ddf(command,schema,dataSource,dataFormat);
  }
}
}
CCJSqlParserManager parserManager=new CCJSqlParserManager();
StringReader reader=new StringReader(command);
try {
Statement statement=parserManager.parse(reader);
if (!(statement instanceof Select)) {
  throw new DDFException("String_Node_Str");
}
 else {
  this.mLog.info("String_Node_Str" + command);
  statement=tableNameReplacer.run(statement);
  if (tableNameReplacer.containsLocalTable || tableNameReplacer.uri2TableObj.size() == 1) {
    this.mLog.info("String_Node_Str" + statement.toString());
    return this.sql2ddf(statement.toString(),schema,dataSource,dataFormat);
  }
 else {
    String selectString=statement.toString();
    DDF ddf=this.getManager().transferByTable(tableNameReplacer.fromEngineName,selectString);
    return ddf;
  }
}
}
 catch (Exception e) {
OutputStream os=new OutputStream(){
  private StringBuilder string=new StringBuilder();
  @Override public void write(  int b) throws IOException {
    this.string.append((char)b);
  }
  public String toString(){
    return this.string.toString();
  }
}
;
e.printStackTrace(new PrintStream(os));
this.mLog.info(os.toString());
this.mLog.info("String_Node_Str" + command);
throw new DDFException(e);
}
}