nus-yam/ex-repair huggingface dataset:
Program: 25040
Project: 25040
Buggy source:
/** 
 * Try to get or otherwise to build appropriate metadata using those extracted from the ADQL query and those extracted from the result.
 * @param typeFromQuery		Metadata extracted/guessed from the ADQL query.
 * @param typeFromResult	Metadata extracted/guessed from the result.
 * @return	The most appropriate metadata.
 */
protected static final TAPColumn getValidColMeta(final DBColumn typeFromQuery,final TAPColumn typeFromResult){
  if (typeFromQuery != null && typeFromQuery instanceof TAPColumn) {
    TAPColumn colMeta=(TAPColumn)typeFromQuery;
    if (colMeta.getDatatype().type == DBDatatype.UNKNOWN && typeFromResult != null && typeFromResult.getDatatype().type != DBDatatype.UNKNOWN)     colMeta.setDatatype(typeFromResult.getDatatype());
    return colMeta;
  }
 else   if (typeFromResult != null) {
    if (typeFromQuery != null)     return (TAPColumn)typeFromResult.copy(typeFromQuery.getDBName(),typeFromQuery.getADQLName(),null);
 else     return (TAPColumn)typeFromResult.copy();
  }
 else   return new TAPColumn((typeFromQuery != null) ? typeFromQuery.getADQLName() : "String_Node_Str",new DBType(DBDatatype.VARCHAR),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Try to get or otherwise to build appropriate metadata using those extracted from the ADQL query and those extracted from the result.
 * @param typeFromQuery		Metadata extracted/guessed from the ADQL query.
 * @param typeFromResult	Metadata extracted/guessed from the result.
 * @return	The most appropriate metadata.
 */
protected static final TAPColumn getValidColMeta(final DBColumn typeFromQuery,final TAPColumn typeFromResult){
  if (typeFromQuery != null && typeFromQuery instanceof TAPColumn) {
    TAPColumn colMeta=(TAPColumn)typeFromQuery;
    if (colMeta.getDatatype().isUnknown() && typeFromResult != null && !typeFromResult.getDatatype().isUnknown())     colMeta.setDatatype(typeFromResult.getDatatype());
    return colMeta;
  }
 else   if (typeFromResult != null) {
    if (typeFromQuery != null)     return (TAPColumn)typeFromResult.copy(typeFromQuery.getDBName(),typeFromQuery.getADQLName(),null);
 else     return (TAPColumn)typeFromResult.copy();
  }
 else   return new TAPColumn((typeFromQuery != null) ? typeFromQuery.getADQLName() : "String_Node_Str",new DBType(DBDatatype.VARCHAR),"String_Node_Str");
}
Program: 25041
Project: 25041
Buggy source:
@Test public void testIsNumeric(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case CHAR:
case VARCHAR:
case TIMESTAMP:
case POINT:
case REGION:
case CLOB:
      assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isNumeric);
    break;
default :
  assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isNumeric);
}
}
}

Fixed version (ground truth):
@Test public void testIsNumeric(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case CHAR:
case VARCHAR:
case TIMESTAMP:
case POINT:
case REGION:
case CLOB:
case UNKNOWN:
      assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isNumeric);
    break;
default :
  assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isNumeric);
}
}
}
Program: 25042
Project: 25042
Buggy source:
@Test public void testIsString(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case CHAR:
case VARCHAR:
case TIMESTAMP:
case CLOB:
case UNKNOWN:
      assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isString);
    break;
default :
  assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isString);
}
}
}

Fixed version (ground truth):
@Test public void testIsString(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case CHAR:
case VARCHAR:
case TIMESTAMP:
case CLOB:
      assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isString);
    break;
default :
  assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isString);
}
}
}
Program: 25044
Project: 25044
Buggy source:
@Test public void testIsGeometry(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case POINT:
case REGION:
case UNKNOWN:
      assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isGeometry);
    break;
default :
  assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isGeometry);
}
}
}

Fixed version (ground truth):
@Test public void testIsGeometry(){
  for (  DBDatatype type : DBDatatype.values()) {
switch (type) {
case POINT:
case REGION:
      assertTrue(new FunctionDef("String_Node_Str",new DBType(type)).isGeometry);
    break;
default :
  assertFalse(new FunctionDef("String_Node_Str",new DBType(type)).isGeometry);
}
}
}
Program: 25045
Project: 25045
Buggy source:
public void testForFctDef(){
  try {
    FunctionDef fct=FunctionDef.parse("String_Node_Str");
    assertTrue(fct.isUnknown());
    assertTrue(fct.isString());
    assertTrue(fct.isNumeric());
    assertTrue(fct.isGeometry());
    assertEquals("String_Node_Str",fct.returnType.type.toString());
  }
 catch (  Exception ex) {
    ex.printStackTrace(System.err);
    fail("String_Node_Str");
  }
  try {
    FunctionDef fct=FunctionDef.parse("String_Node_Str");
    assertTrue(fct.getParam(0).type.isUnknown());
    assertTrue(fct.getParam(0).type.isString());
    assertTrue(fct.getParam(0).type.isNumeric());
    assertTrue(fct.getParam(0).type.isGeometry());
    assertEquals("String_Node_Str",fct.getParam(0).type.toString());
  }
 catch (  Exception ex) {
    ex.printStackTrace(System.err);
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testForFctDef(){
  try {
    FunctionDef fct=FunctionDef.parse("String_Node_Str");
    assertTrue(fct.isUnknown());
    assertFalse(fct.isString());
    assertFalse(fct.isNumeric());
    assertFalse(fct.isGeometry());
    assertEquals("String_Node_Str",fct.returnType.type.toString());
  }
 catch (  Exception ex) {
    ex.printStackTrace(System.err);
    fail("String_Node_Str");
  }
  try {
    FunctionDef fct=FunctionDef.parse("String_Node_Str");
    assertTrue(fct.getParam(0).type.isUnknown());
    assertFalse(fct.getParam(0).type.isString());
    assertFalse(fct.getParam(0).type.isNumeric());
    assertFalse(fct.getParam(0).type.isGeometry());
    assertEquals("String_Node_Str",fct.getParam(0).type.toString());
  }
 catch (  Exception ex) {
    ex.printStackTrace(System.err);
    fail("String_Node_Str");
  }
}
Program: 25051
Project: 25051
Buggy source:
/** 
 * <p>Get the signature of the function given in parameter.</p> <p> In this signature, just the name and the type of all the parameters are written. The return type is never part of a function signature. </p> <p><i>Note 1: A parameter type can be either "NUMERIC", "STRING" or "GEOMETRY". In order to be the most generic has possible, no more precision about a type is returned here. If the parameter is none of these type kinds, "???" is returned. </i></p> <p><i>Note 2: If the given object is NULL, an empty string is returned. </i></p>
 * @param fct	Function whose the signature must be returned.
 * @return	The corresponding signature.
 */
public static String getFctSignature(final ADQLFunction fct){
  if (fct == null)   return "String_Node_Str";
  StringBuffer buf=new StringBuffer(fct.getName().toLowerCase());
  buf.append('(');
  for (int i=0; i < fct.getNbParameters(); i++) {
    if (fct.getParameter(i).isNumeric())     buf.append("String_Node_Str");
 else     if (fct.getParameter(i).isString())     buf.append("String_Node_Str");
 else     if (fct.getParameter(i).isGeometry())     buf.append("String_Node_Str");
 else     buf.append("String_Node_Str");
    if ((i + 1) < fct.getNbParameters())     buf.append("String_Node_Str");
  }
  buf.append(')');
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * <p>Get the signature of the function given in parameter.</p> <p> In this signature, just the name and the type of all the parameters are written. The return type is never part of a function signature. </p> <p><i>Note 1: A parameter type can be either "NUMERIC", "STRING" or "GEOMETRY". In order to be the most generic has possible, no more precision about a type is returned here. If the parameter is none of these type kinds, "param" suffixed by the parameter index (e.g. "param1") is returned. </i></p> <p><i>Note 2: If the given object is NULL, an empty string is returned. </i></p>
 * @param fct	Function whose the signature must be returned.
 * @return	The corresponding signature.
 */
public static String getFctSignature(final ADQLFunction fct){
  if (fct == null)   return "String_Node_Str";
  StringBuffer buf=new StringBuffer(fct.getName().toLowerCase());
  buf.append('(');
  for (int i=0; i < fct.getNbParameters(); i++) {
    if (fct.getParameter(i).isNumeric() && fct.getParameter(i).isString() && fct.getParameter(i).isGeometry())     buf.append("String_Node_Str").append(i + 1);
 else     if (fct.getParameter(i).isNumeric())     buf.append("String_Node_Str");
 else     if (fct.getParameter(i).isString())     buf.append("String_Node_Str");
 else     if (fct.getParameter(i).isGeometry())     buf.append("String_Node_Str");
 else     buf.append("String_Node_Str").append(i + 1);
    if ((i + 1) < fct.getNbParameters())     buf.append("String_Node_Str");
  }
  buf.append(')');
  return buf.toString();
}
Program: 25054
Project: 25054
Buggy source:
/** 
 * Resolve the given table, that's to say search for the corresponding   {@link DBTable}.
 * @param table	The table to resolve.
 * @return		The corresponding {@link DBTable} if found, <i>null</i> otherwise.
 * @throws ParseException	An {@link UnresolvedTableException} if the given table can't be resolved.
 */
protected DBTable resolveTable(final ADQLTable table) throws ParseException {
  ArrayList<DBTable> tables=lstTables.search(table);
  if (tables.size() == 1)   return tables.get(0);
 else   if (tables.size() > 1)   throw new UnresolvedTableException(table,tables.get(0).getADQLSchemaName() + "String_Node_Str" + tables.get(0).getADQLName(),tables.get(1).getADQLSchemaName() + "String_Node_Str" + tables.get(1).getADQLName());
 else   throw new UnresolvedTableException(table);
}

Fixed version (ground truth):
/** 
 * Resolve the given table, that's to say search for the corresponding   {@link DBTable}.
 * @param table	The table to resolve.
 * @return		The corresponding {@link DBTable} if found, <i>null</i> otherwise.
 * @throws ParseException	An {@link UnresolvedTableException} if the given table can't be resolved.
 */
protected DBTable resolveTable(final ADQLTable table) throws ParseException {
  ArrayList<DBTable> tables=lstTables.search(table);
  if (tables.size() == 1)   return tables.get(0);
 else   if (tables.size() > 1)   throw new UnresolvedTableException(table,(tables.get(0).getADQLSchemaName() == null ? "String_Node_Str" : tables.get(0).getADQLSchemaName() + "String_Node_Str") + tables.get(0).getADQLName(),(tables.get(1).getADQLSchemaName() == null ? "String_Node_Str" : tables.get(1).getADQLSchemaName() + "String_Node_Str") + tables.get(1).getADQLName());
 else   throw new UnresolvedTableException(table);
}
Program: 25055
Project: 25055
Buggy source:
/** 
 * Builds a default   {@link DBColumn} with the given DB name, DB table and ADQL name.
 * @param dbName	Database column name.<b>Only the column name is expected. Contrary to  {@link DefaultDBTable}, if a whole column reference is given, no split will be done.</b>
 * @param adqlName	Column name used in ADQL queries.<b>Only the column name is expected. Contrary to  {@link DefaultDBTable}, if a whole column reference is given, no split will be done.</b>
 * @param type		Type of the column.<i>Note: there is no default value. Consequently if this parameter is NULL, the type should be considered as unknown. It means that any comparison with any type will always return 'true'.</i>
 * @param table		DB table which contains this column.
 * @since 1.3
 */
public DefaultDBColumn(final String dbName,final String adqlName,final DBType type,final DBTable table){
  this.dbName=dbName;
  this.adqlName=adqlName;
  this.type=type;
  this.table=table;
}

Fixed version (ground truth):
/** 
 * Builds a default   {@link DBColumn} with the given DB name, DB table and ADQL name.
 * @param dbName	Database column name.<b>Only the column name is expected. Contrary to  {@link DefaultDBTable}, if a whole column reference is given, no split will be done.</b> <b>REQUIRED parameter: it must be not NULL.</b> 
 * @param adqlName	Column name used in ADQL queries.<b>Only the column name is expected. Contrary to  {@link DefaultDBTable}, if a whole column reference is given, no split will be done.</b> <em>If NULL, it will be set to dbName.</em>
 * @param type		Type of the column.<i>Note: there is no default value. Consequently if this parameter is NULL, the type should be considered as unknown. It means that any comparison with any type will always return 'true'.</i>
 * @param table		DB table which contains this column.
 * @since 1.3
 */
public DefaultDBColumn(final String dbName,final String adqlName,final DBType type,final DBTable table){
  if (dbName == null || dbName.length() == 0)   throw new NullPointerException("String_Node_Str");
  this.dbName=dbName;
  this.adqlName=(adqlName == null) ? dbName : adqlName;
  this.type=type;
  this.table=table;
}
Program: 25056
Project: 25056
Buggy source:
/** 
 * Builds default   {@link DBTable} with the DB and ADQL names for the catalog, schema and table.
 * @param dbCatName		Database catalog name.
 * @param adqlCatName	Catalog name used in ADQL queries.
 * @param dbSchemName	Database schema name.
 * @param adqlSchemName	Schema name used in ADQL queries.
 * @param dbName		Database table name.
 * @param adqlName		Table name used in ADQL queries.
 */
public DefaultDBTable(final String dbCatName,final String adqlCatName,final String dbSchemName,final String adqlSchemName,final String dbName,final String adqlName){
  if (dbName == null || dbName.length() == 0)   throw new NullPointerException("String_Node_Str");
  this.dbName=dbName;
  this.adqlName=adqlName;
  dbSchemaName=dbSchemName;
  adqlSchemaName=adqlSchemName;
  dbCatalogName=dbCatName;
  adqlCatalogName=adqlCatName;
}

Fixed version (ground truth):
/** 
 * Builds default   {@link DBTable} with the DB and ADQL names for the catalog, schema and table.
 * @param dbCatName		Database catalog name.
 * @param adqlCatName	Catalog name used in ADQL queries.<em>If NULL, it will be set to dbCatName.</em>
 * @param dbSchemName	Database schema name.
 * @param adqlSchemName	Schema name used in ADQL queries.<em>If NULL, it will be set to dbSchemName.</em>
 * @param dbName		Database table name.
 * @param adqlName		Table name used in ADQL queries.<em>If NULL, it will be set to dbName.</em>
 */
public DefaultDBTable(final String dbCatName,final String adqlCatName,final String dbSchemName,final String adqlSchemName,final String dbName,final String adqlName){
  if (dbName == null || dbName.length() == 0)   throw new NullPointerException("String_Node_Str");
  this.dbName=dbName;
  this.adqlName=(adqlName == null) ? dbName : adqlName;
  dbSchemaName=dbSchemName;
  adqlSchemaName=(adqlSchemName == null) ? dbSchemName : adqlSchemName;
  dbCatalogName=dbCatName;
  adqlCatalogName=(adqlCatName == null) ? dbCatName : adqlCatName;
}
Program: 25059
Project: 25059
Buggy source:
@BeforeClass public static void setUpBeforeClass() throws Exception {
  tables=new ArrayList<DBTable>();
  DefaultDBTable fooTable=new DefaultDBTable("String_Node_Str");
  DBColumn col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.VARCHAR),fooTable);
  fooTable.addColumn(col);
  col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.INTEGER),fooTable);
  fooTable.addColumn(col);
  col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.POINT),fooTable);
  fooTable.addColumn(col);
  tables.add(fooTable);
}

Fixed version (ground truth):
@BeforeClass public static void setUpBeforeClass() throws Exception {
  tables=new ArrayList<DBTable>();
  DefaultDBTable fooTable=new DefaultDBTable(null,"String_Node_Str","String_Node_Str");
  DBColumn col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.VARCHAR),fooTable);
  fooTable.addColumn(col);
  col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.INTEGER),fooTable);
  fooTable.addColumn(col);
  col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.POINT),fooTable);
  fooTable.addColumn(col);
  tables.add(fooTable);
  DefaultDBTable fooTable2=new DefaultDBTable(null,null,"String_Node_Str");
  col=new DefaultDBColumn("String_Node_Str",new DBType(DBDatatype.BIGINT),fooTable2);
  fooTable2.addColumn(col);
  tables.add(fooTable2);
}
Program: 25060
Project: 25060
Buggy source:
final public ColumnReference ColumnRef() throws ParseException {
  trace_call("String_Node_Str");
  try {
    IdentifierItems identifiers=null;
    Token ind=null;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DELIMITED_IDENTIFIER:
case REGULAR_IDENTIFIER:
      identifiers=ColumnName();
    break;
case UNSIGNED_INTEGER:
  ind=jj_consume_token(UNSIGNED_INTEGER);
break;
default :
jj_la1[20]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
try {
ColumnReference colRef=null;
if (identifiers != null) colRef=queryFactory.createColRef(identifiers);
 else colRef=queryFactory.createColRef(Integer.parseInt(ind.image),new TextPosition(ind));
{
if (true) return colRef;
}
}
 catch (Exception ex) {
{
if (true) throw generateParseException(ex);
}
}
throw new Error("String_Node_Str");
}
  finally {
trace_return("String_Node_Str");
}
}

Fixed version (ground truth):
final public ColumnReference ColumnRef() throws ParseException {
  trace_call("String_Node_Str");
  try {
    IdentifierItem identifier=null;
    Token ind=null;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DELIMITED_IDENTIFIER:
case REGULAR_IDENTIFIER:
      identifier=Identifier();
    break;
case UNSIGNED_INTEGER:
  ind=jj_consume_token(UNSIGNED_INTEGER);
break;
default :
jj_la1[20]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
try {
ColumnReference colRef=null;
if (identifier != null) colRef=queryFactory.createColRef(identifier);
 else colRef=queryFactory.createColRef(Integer.parseInt(ind.image),new TextPosition(ind));
{
if (true) return colRef;
}
}
 catch (Exception ex) {
{
if (true) throw generateParseException(ex);
}
}
throw new Error("String_Node_Str");
}
  finally {
trace_return("String_Node_Str");
}
}
Program: 25061
Project: 25061
Buggy source:
final public ADQLOrder OrderItem() throws ParseException {
  trace_call("String_Node_Str");
  try {
    IdentifierItems identifiers=null;
    Token ind=null, desc=null;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DELIMITED_IDENTIFIER:
case REGULAR_IDENTIFIER:
      identifiers=ColumnName();
    break;
case UNSIGNED_INTEGER:
  ind=jj_consume_token(UNSIGNED_INTEGER);
break;
default :
jj_la1[21]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASC:
case DESC:
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASC:
jj_consume_token(ASC);
break;
case DESC:
desc=jj_consume_token(DESC);
break;
default :
jj_la1[22]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default :
jj_la1[23]=jj_gen;
;
}
try {
ADQLOrder order=null;
if (identifiers != null) {
order=queryFactory.createOrder(identifiers,desc != null);
order.setPosition(identifiers.getPosition());
}
 else {
order=queryFactory.createOrder(Integer.parseInt(ind.image),desc != null);
order.setPosition(new TextPosition(ind));
}
{
if (true) return order;
}
}
 catch (Exception ex) {
{
if (true) throw generateParseException(ex);
}
}
throw new Error("String_Node_Str");
}
  finally {
trace_return("String_Node_Str");
}
}

Fixed version (ground truth):
final public ADQLOrder OrderItem() throws ParseException {
  trace_call("String_Node_Str");
  try {
    IdentifierItem identifier=null;
    Token ind=null, desc=null;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DELIMITED_IDENTIFIER:
case REGULAR_IDENTIFIER:
      identifier=Identifier();
    break;
case UNSIGNED_INTEGER:
  ind=jj_consume_token(UNSIGNED_INTEGER);
break;
default :
jj_la1[21]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASC:
case DESC:
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASC:
jj_consume_token(ASC);
break;
case DESC:
desc=jj_consume_token(DESC);
break;
default :
jj_la1[22]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default :
jj_la1[23]=jj_gen;
;
}
try {
ADQLOrder order=null;
if (identifier != null) {
order=queryFactory.createOrder(identifier,desc != null);
order.setPosition(identifier.position);
}
 else {
order=queryFactory.createOrder(Integer.parseInt(ind.image),desc != null);
order.setPosition(new TextPosition(ind));
}
{
if (true) return order;
}
}
 catch (Exception ex) {
{
if (true) throw generateParseException(ex);
}
}
throw new Error("String_Node_Str");
}
  finally {
trace_return("String_Node_Str");
}
}
Program: 25062
Project: 25062
Buggy source:
public ADQLOrder createOrder(final IdentifierItems idItems,final boolean desc) throws Exception {
  ADQLOrder order=new ADQLOrder(idItems.join("String_Node_Str"),desc);
  if (order != null)   order.setCaseSensitive(idItems.getColumnCaseSensitivity());
  return order;
}

Fixed version (ground truth):
/** 
 * @deprecated since 1.4 ; Former version's mistake: an ORDER BY item is either a regular/delimited column name or an integer, not a qualified column name ; Replaced by {@link #createOrder(Identifier,boolean)} ; This function is no longer used by ADQLParser. 
 */
@Deprecated public ADQLOrder createOrder(final IdentifierItems idItems,final boolean desc) throws Exception {
  ADQLOrder order=new ADQLOrder(idItems.join("String_Node_Str"),desc);
  if (order != null)   order.setCaseSensitive(idItems.getColumnCaseSensitivity());
  return order;
}
Program: 25064
Project: 25064
Buggy source:
@Override public void run(){
  try {
    tb.streamStarTable(input,sink,null);
  }
 catch (  IOException e) {
    if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))     e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    tb.streamStarTable(input,sink,null);
  }
 catch (  IOException e) {
    if (e.getMessage() != null && !e.getMessage().equals(STREAM_ABORTED_MESSAGE))     e.printStackTrace();
  }
}
Program: 25065
Project: 25065
Buggy source:
/** 
 * Build a TableIterator able to read rows and columns inside the given VOTable input stream.
 * @param input	Input stream over a VOTable document.
 * @throws NullPointerException	If NULL is given in parameter.
 * @throws DataReadException	If the given VOTable can not be parsed.
 */
public VOTableIterator(final InputStream input) throws DataReadException {
  if (input == null)   throw new NullPointerException("String_Node_Str");
  this.input=input;
  try {
    final TableBuilder tb=(new StarTableFactory()).getTableBuilder("String_Node_Str");
    sink=new StreamVOTableSink();
    Thread streamThread=new Thread(){
      @Override public void run(){
        try {
          tb.streamStarTable(input,sink,null);
        }
 catch (        IOException e) {
          if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))           e.printStackTrace();
        }
      }
    }
;
    streamThread.start();
  }
 catch (  Exception ex) {
    throw new DataReadException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Build a TableIterator able to read rows and columns inside the given VOTable input stream.
 * @param input	Input stream over a VOTable document.
 * @throws NullPointerException	If NULL is given in parameter.
 * @throws DataReadException	If the given VOTable can not be parsed.
 */
public VOTableIterator(final InputStream input) throws DataReadException {
  if (input == null)   throw new NullPointerException("String_Node_Str");
  this.input=input;
  try {
    final TableBuilder tb=(new StarTableFactory()).getTableBuilder("String_Node_Str");
    sink=new StreamVOTableSink();
    Thread streamThread=new Thread(){
      @Override public void run(){
        try {
          tb.streamStarTable(input,sink,null);
        }
 catch (        IOException e) {
          if (e.getMessage() != null && !e.getMessage().equals(STREAM_ABORTED_MESSAGE))           e.printStackTrace();
        }
      }
    }
;
    streamThread.start();
  }
 catch (  Exception ex) {
    throw new DataReadException("String_Node_Str",ex);
  }
}
Program: 25066
Project: 25066
Buggy source:
@Override public synchronized void acceptRow(final Object[] row) throws IOException {
  try {
    while (!endReached && pendingRow != null)     wait();
    if (endReached)     throw new IOException("String_Node_Str");
    pendingRow=row;
    if (pendingRow == null)     endReached=true;
  }
 catch (  InterruptedException ie) {
    pendingRow=null;
    endReached=true;
  }
 finally {
    notifyAll();
  }
}

Fixed version (ground truth):
@Override public synchronized void acceptRow(final Object[] row) throws IOException {
  try {
    while (!endReached && pendingRow != null)     wait();
    if (endReached)     throw new IOException(STREAM_ABORTED_MESSAGE);
    pendingRow=row;
    if (pendingRow == null)     endReached=true;
  }
 catch (  InterruptedException ie) {
    pendingRow=null;
    endReached=true;
  }
 finally {
    notifyAll();
  }
}
Program: 25068
Project: 25068
Buggy source:
@Override public synchronized void endRows() throws IOException {
  pendingRow=null;
  endReached=true;
  notifyAll();
}

Fixed version (ground truth):
@Override public synchronized void endRows() throws IOException {
  try {
    while (!endReached && pendingRow != null)     wait();
  }
 catch (  InterruptedException ie) {
  }
 finally {
    pendingRow=null;
    endReached=true;
    notifyAll();
  }
}
Program: 25069
Project: 25069
Buggy source:
public void run(){
  try {
    tb.streamStarTable(input,sink,null);
  }
 catch (  IOException e) {
    if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))     e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    tb.streamStarTable(input,sink,null);
  }
 catch (  IOException e) {
    if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))     e.printStackTrace();
  }
}
Program: 25070
Project: 25070
Buggy source:
/** 
 * <p>Get the last accepted row.</p> <p><i>Note: This function is blocking until a row has been accepted or the end of the stream has been reached. A Thread interruption will also make this function returning. </i></p>
 * @return
 */
public synchronized Object[] getRow(){
  try {
    while (!endReached && pendingRow == null)     wait();
    if (endReached)     return null;
    Object[] row=pendingRow;
    pendingRow=null;
    return row;
  }
 catch (  InterruptedException ie) {
    endReached=true;
    return null;
  }
 finally {
    notifyAll();
  }
}

Fixed version (ground truth):
/** 
 * <p>Get the last accepted row.</p> <p><i>Note: This function is blocking until a row has been accepted or the end of the stream has been reached. A Thread interruption will also make this function returning. </i></p>
 * @return
 */
public synchronized Object[] getRow(){
  try {
    while (!endReached && pendingRow == null)     wait();
    if (endReached && pendingRow == null)     return null;
    Object[] row=pendingRow;
    pendingRow=null;
    return row;
  }
 catch (  InterruptedException ie) {
    endReached=true;
    return null;
  }
 finally {
    notifyAll();
  }
}
Program: 25071
Project: 25071
Buggy source:
/** 
 * Build a TableIterator able to read rows and columns inside the given VOTable input stream.
 * @param input	Input stream over a VOTable document.
 * @throws NullPointerException	If NULL is given in parameter.
 * @throws DataReadException	If the given VOTable can not be parsed.
 */
public VOTableIterator(final InputStream input) throws DataReadException {
  if (input == null)   throw new NullPointerException("String_Node_Str");
  this.input=input;
  try {
    final TableBuilder tb=(new StarTableFactory()).getTableBuilder("String_Node_Str");
    sink=new StreamVOTableSink();
    Thread streamThread=new Thread(){
      public void run(){
        try {
          tb.streamStarTable(input,sink,null);
        }
 catch (        IOException e) {
          if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))           e.printStackTrace();
        }
      }
    }
;
    streamThread.start();
  }
 catch (  Exception ex) {
    throw new DataReadException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Build a TableIterator able to read rows and columns inside the given VOTable input stream.
 * @param input	Input stream over a VOTable document.
 * @throws NullPointerException	If NULL is given in parameter.
 * @throws DataReadException	If the given VOTable can not be parsed.
 */
public VOTableIterator(final InputStream input) throws DataReadException {
  if (input == null)   throw new NullPointerException("String_Node_Str");
  this.input=input;
  try {
    final TableBuilder tb=(new StarTableFactory()).getTableBuilder("String_Node_Str");
    sink=new StreamVOTableSink();
    Thread streamThread=new Thread(){
      @Override public void run(){
        try {
          tb.streamStarTable(input,sink,null);
        }
 catch (        IOException e) {
          if (e.getMessage() != null && !e.getMessage().equals("String_Node_Str"))           e.printStackTrace();
        }
      }
    }
;
    streamThread.start();
  }
 catch (  Exception ex) {
    throw new DataReadException("String_Node_Str",ex);
  }
}
Program: 25074
Project: 25074
Buggy source:
@Override public void logTAP(final LogLevel level,final Object obj,final String event,final String message,final Throwable error){
  String jobId=null, msgAppend=null;
  try {
    if (event != null && obj != null) {
      if (event.equals("String_Node_Str"))       msgAppend="String_Node_Str" + ((TAPParameters)obj).getQuery().replaceAll("String_Node_Str","String_Node_Str");
 else       if (event.equals("String_Node_Str"))       jobId=((TAPSyncJob)obj).getID();
 else       if (obj instanceof TAPExecutionReport) {
        TAPExecutionReport report=(TAPExecutionReport)obj;
        jobId=report.jobID;
        msgAppend=(report.synchronous ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + report.getTotalDuration()+ "String_Node_Str"+ report.getUploadDuration()+ "String_Node_Str"+ report.getParsingDuration()+ "String_Node_Str"+ report.getExecutionDuration()+ "String_Node_Str"+ report.parameters.getFormat()+ "String_Node_Str"+ report.getFormattingDuration()+ "String_Node_Str";
      }
    }
    if (msgAppend != null)     msgAppend="String_Node_Str" + msgAppend;
  }
 catch (  Throwable t) {
    error("String_Node_Str",t);
  }
  log(level,"String_Node_Str",event,jobId,message + msgAppend,error);
}

Fixed version (ground truth):
@Override public void logTAP(final LogLevel level,final Object obj,final String event,final String message,final Throwable error){
  String jobId=null, msgAppend=null;
  try {
    if (event != null && obj != null) {
      if (event.equals("String_Node_Str"))       msgAppend="String_Node_Str" + ((TAPParameters)obj).getQuery().replaceAll("String_Node_Str","String_Node_Str");
 else       if (event.equals("String_Node_Str"))       jobId=((TAPSyncJob)obj).getID();
 else       if (obj instanceof TAPExecutionReport) {
        TAPExecutionReport report=(TAPExecutionReport)obj;
        jobId=report.jobID;
        msgAppend=(report.synchronous ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + report.getTotalDuration()+ "String_Node_Str"+ report.getUploadDuration()+ "String_Node_Str"+ report.getParsingDuration()+ "String_Node_Str"+ report.getExecutionDuration()+ "String_Node_Str"+ report.parameters.getFormat()+ "String_Node_Str"+ report.getFormattingDuration()+ "String_Node_Str";
      }
    }
    if (msgAppend != null)     msgAppend="String_Node_Str" + msgAppend;
  }
 catch (  Throwable t) {
    error("String_Node_Str",t);
  }
  log(level,"String_Node_Str",event,jobId,message + (msgAppend != null ? msgAppend : "String_Node_Str"),error);
}
Program: 25076
Project: 25076
Buggy source:
@Override public TAPColumn[] getMetadata(){
  return innerIt.getMetadata();
}

Fixed version (ground truth):
@Override public TAPColumn[] getMetadata() throws DataReadException {
  return innerIt.getMetadata();
}
Program: 25077
Project: 25077
Buggy source:
/** 
 * <p>Get all the metadata column that have been successfully extracted at the creation of this iterator.</p> <p><b>Important:</b> This function should be callable at any moment from the creation of the iterator until the end of the table dataset has been reached.</p> <p><i>Note: This function MAY BE NOT IMPLEMENTED or the metadata can not be fetched. In this case, NULL will be returned.</i></p> <p><i><b>Warning:</b> If the metadata part of the original document is corrupted (i.e. false number of columns), the column type information should be fetched thanks to   {@link #getColType()} while iterating over rows and columns.</i></p>
 * @return	An array of {@link TAPColumn} objects (each for a column of any row),or NULL if this function is not implemented OR if it was not possible to get these metadata.
 * @see #getColType()
 */
public TAPColumn[] getMetadata();

Fixed version (ground truth):
/** 
 * <p>Get all the metadata column that have been successfully extracted at the creation of this iterator.</p> <p><b>Important:</b> This function should be callable at any moment from the creation of the iterator until the end of the table dataset has been reached.</p> <p><i>Note: This function MAY BE NOT IMPLEMENTED or the metadata can not be fetched. In this case, NULL will be returned.</i></p> <p><i><b>Warning:</b> If the metadata part of the original document is corrupted (i.e. false number of columns), the column type information should be fetched thanks to   {@link #getColType()} while iterating over rows and columns.</i></p>
 * @return	An array of {@link TAPColumn} objects (each for a column of any row),or NULL if this function is not implemented OR if it was not possible to get these metadata.
 * @see #getColType()
 */
public TAPColumn[] getMetadata() throws DataReadException ;
Program: 25078
Project: 25078
Buggy source:
/** 
 * <p>Gets the list of columns (database metadata) selected by this query.</p> <p><i><u>Note:</u> The list is generated on the fly !</i></p>
 * @return	Selected columns metadata.
 */
public DBColumn[] getResultingColumns(){
  ArrayList<DBColumn> columns=new ArrayList<DBColumn>(select.size());
  for (  SelectItem item : select) {
    ADQLOperand operand=item.getOperand();
    if (item instanceof SelectAllColumns) {
      try {
        columns.addAll(from.getDBColumns());
      }
 catch (      ParseException pe) {
      }
    }
 else {
      DBColumn col=null;
      if (item.hasAlias()) {
        if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null) {
          col=((ADQLColumn)operand).getDBLink();
          col=col.copy(col.getDBName(),item.getAlias(),col.getTable());
        }
 else         col=new DefaultDBColumn(item.getAlias(),null);
      }
 else {
        if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null)         col=((ADQLColumn)operand).getDBLink();
        if (col == null)         col=new DefaultDBColumn(item.getName(),null);
      }
      columns.add(col);
    }
  }
  DBColumn[] resColumns=new DBColumn[columns.size()];
  return columns.toArray(resColumns);
}

Fixed version (ground truth):
/** 
 * <p>Gets the list of columns (database metadata) selected by this query.</p> <p><i><u>Note:</u> The list is generated on the fly !</i></p>
 * @return	Selected columns metadata.
 */
public DBColumn[] getResultingColumns(){
  ArrayList<DBColumn> columns=new ArrayList<DBColumn>(select.size());
  for (  SelectItem item : select) {
    ADQLOperand operand=item.getOperand();
    if (item instanceof SelectAllColumns) {
      try {
        if (((SelectAllColumns)item).getAdqlTable() != null)         columns.addAll(((SelectAllColumns)item).getAdqlTable().getDBColumns());
 else         columns.addAll(from.getDBColumns());
      }
 catch (      ParseException pe) {
      }
    }
 else {
      DBColumn col=null;
      if (item.hasAlias()) {
        if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null) {
          col=((ADQLColumn)operand).getDBLink();
          col=col.copy(col.getDBName(),item.getAlias(),col.getTable());
        }
 else         col=new DefaultDBColumn(item.getAlias(),null);
      }
 else {
        if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null)         col=((ADQLColumn)operand).getDBLink();
        if (col == null)         col=new DefaultDBColumn(item.getName(),null);
      }
      columns.add(col);
    }
  }
  DBColumn[] resColumns=new DBColumn[columns.size()];
  return columns.toArray(resColumns);
}
Program: 25079
Project: 25079
Buggy source:
public ADQLObject next() throws NoSuchElementException {
  if (tableGot)   throw new NoSuchElementException();
  tableGot=true;
  return adqlTable;
}

Fixed version (ground truth):
@Override public ADQLObject next() throws NoSuchElementException {
  if (tableGot)   throw new NoSuchElementException();
  tableGot=true;
  return adqlTable;
}
Program: 25080
Project: 25080
Buggy source:
public void replace(ADQLObject replacer) throws UnsupportedOperationException, IllegalStateException {
  if (replacer == null)   remove();
 else   if (!tableGot)   throw new IllegalStateException("String_Node_Str");
 else   if (!(replacer instanceof ADQLTable))   throw new IllegalStateException("String_Node_Str" + replacer.getClass().getName() + "String_Node_Str");
 else   adqlTable=(ADQLTable)replacer;
}

Fixed version (ground truth):
@Override public void replace(ADQLObject replacer) throws UnsupportedOperationException, IllegalStateException {
  if (replacer == null)   remove();
 else   if (!tableGot)   throw new IllegalStateException("String_Node_Str");
 else   if (!(replacer instanceof ADQLTable))   throw new IllegalStateException("String_Node_Str" + replacer.getClass().getName() + "String_Node_Str");
 else   adqlTable=(ADQLTable)replacer;
}
Program: 25081
Project: 25081
Buggy source:
@Override public final ADQLIterator adqlIterator(){
  return new ADQLIterator(){
    private boolean tableGot=(adqlTable == null);
    public ADQLObject next() throws NoSuchElementException {
      if (tableGot)       throw new NoSuchElementException();
      tableGot=true;
      return adqlTable;
    }
    public boolean hasNext(){
      return !tableGot;
    }
    public void replace(    ADQLObject replacer) throws UnsupportedOperationException, IllegalStateException {
      if (replacer == null)       remove();
 else       if (!tableGot)       throw new IllegalStateException("String_Node_Str");
 else       if (!(replacer instanceof ADQLTable))       throw new IllegalStateException("String_Node_Str" + replacer.getClass().getName() + "String_Node_Str");
 else       adqlTable=(ADQLTable)replacer;
    }
    public void remove(){
      if (!tableGot)       throw new IllegalStateException("String_Node_Str");
 else       throw new UnsupportedOperationException("String_Node_Str" + adqlTable.toADQL() + "String_Node_Str"+ toADQL()+ "String_Node_Str");
    }
  }
;
}

Fixed version (ground truth):
@Override public final ADQLIterator adqlIterator(){
  return new ADQLIterator(){
    private boolean tableGot=(adqlTable == null);
    @Override public ADQLObject next() throws NoSuchElementException {
      if (tableGot)       throw new NoSuchElementException();
      tableGot=true;
      return adqlTable;
    }
    @Override public boolean hasNext(){
      return !tableGot;
    }
    @Override public void replace(    ADQLObject replacer) throws UnsupportedOperationException, IllegalStateException {
      if (replacer == null)       remove();
 else       if (!tableGot)       throw new IllegalStateException("String_Node_Str");
 else       if (!(replacer instanceof ADQLTable))       throw new IllegalStateException("String_Node_Str" + replacer.getClass().getName() + "String_Node_Str");
 else       adqlTable=(ADQLTable)replacer;
    }
    @Override public void remove(){
      if (!tableGot)       throw new IllegalStateException("String_Node_Str");
 else       throw new UnsupportedOperationException("String_Node_Str" + adqlTable.toADQL() + "String_Node_Str"+ toADQL()+ "String_Node_Str");
    }
  }
;
}
Program: 25082
Project: 25082
Buggy source:
public boolean hasNext(){
  return !tableGot;
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  return !tableGot;
}
Program: 25083
Project: 25083
Buggy source:
public void remove(){
  if (!tableGot)   throw new IllegalStateException("String_Node_Str");
 else   throw new UnsupportedOperationException("String_Node_Str" + adqlTable.toADQL() + "String_Node_Str"+ toADQL()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void remove(){
  if (!tableGot)   throw new IllegalStateException("String_Node_Str");
 else   throw new UnsupportedOperationException("String_Node_Str" + adqlTable.toADQL() + "String_Node_Str"+ toADQL()+ "String_Node_Str");
}
Program: 25084
Project: 25084
Buggy source:
/** 
 * Sets the table whose all columns must be selected.
 * @param table	An {@link ADQLTable} (MUST NOT BE NULL).
 */
public final void setAdqlTable(final ADQLTable table){
  if (table == null) {
    adqlTable=table;
    query=null;
  }
}

Fixed version (ground truth):
/** 
 * Sets the table whose all columns must be selected.
 * @param table	An {@link ADQLTable} (MUST NOT BE NULL).
 */
public final void setAdqlTable(final ADQLTable table){
  if (table != null) {
    adqlTable=table;
    query=null;
  }
}
Program: 25085
Project: 25085
Buggy source:
/** 
 * <p><i>Note: Unless the standard implementation -   {@link ADQLExecutor} - does not fit exactly your needs,it should not be necessary to extend this class and to extend this function (implemented here by default). </i></p>
 * @see tap.TAPFactory#createADQLExecutor()
 */
@Override public ADQLExecutor createADQLExecutor() throws TAPException {
  return new ADQLExecutor(service);
}

Fixed version (ground truth):
/** 
 * <p><i>Note: Unless the standard implementation -   {@link ADQLExecutor} - does not fit exactly your needs,it should not be necessary to extend this class and to extend this function (implemented here by default). </i></p>
 */
@Override public ADQLExecutor createADQLExecutor() throws TAPException {
  return new ADQLExecutor(service);
}
Program: 25086
Project: 25086
Buggy source:
/** 
 * <p>This implementation provides a basic   {@link TAPJob} instance.</p><p> If you need to add or modify the behavior of some functions of a  {@link TAPJob}, you must override this function and return your own extension of   {@link TAPJob}. </p>
 * @see tap.TAPFactory#createTAPJob(javax.servlet.http.HttpServletRequest,uws.job.user.JobOwner)
 */
@Override protected TAPJob createTAPJob(final String jobId,final JobOwner owner,final TAPParameters params,final long quote,final long startTime,final long endTime,final List<Result> results,final ErrorSummary error) throws UWSException {
  try {
    return new TAPJob(jobId,owner,params,quote,startTime,endTime,results,error);
  }
 catch (  TAPException te) {
    throw new UWSException(UWSException.INTERNAL_SERVER_ERROR,te,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * <p>This implementation provides a basic   {@link TAPJob} instance.</p><p> If you need to add or modify the behavior of some functions of a  {@link TAPJob}, you must override this function and return your own extension of   {@link TAPJob}. </p>
 */
@Override protected TAPJob createTAPJob(final String jobId,final JobOwner owner,final TAPParameters params,final long quote,final long startTime,final long endTime,final List<Result> results,final ErrorSummary error) throws UWSException {
  try {
    return new TAPJob(jobId,owner,params,quote,startTime,endTime,results,error);
  }
 catch (  TAPException te) {
    throw new UWSException(UWSException.INTERNAL_SERVER_ERROR,te,"String_Node_Str");
  }
}
Program: 25087
Project: 25087
Buggy source:
/** 
 * <p>Create an object able to check the consistency between the ADQL query and the database. That's to say, it checks whether the tables and columns used in the query really exist in the database.</p> <p><i>Note: This implementation just create a   {@link DBChecker} instance with the list given in parameter.</i></p>
 * @param tables	List of all available tables (and indirectly, columns).
 * @return	A new ADQL query checker.
 * @throws TAPException	If any error occurs while creating the query checker.
 * @see DBChecker
 */
protected QueryChecker createQueryChecker(final Collection<TAPTable> tables) throws TAPException {
  return new DBChecker(tables);
}

Fixed version (ground truth):
/** 
 * <p>Create an object able to check the consistency between the ADQL query and the database. That's to say, it checks whether the tables and columns used in the query really exist in the database.</p> <p><i>Note: This implementation just create a   {@link DBChecker} instance with the list given in parameter.</i></p>
 * @param tables	List of all available tables (and indirectly, columns).
 * @return	A new ADQL query checker.
 * @throws TAPException	If any error occurs while creating the query checker.
 */
protected QueryChecker createQueryChecker(final Collection<TAPTable> tables) throws TAPException {
  return new DBChecker(tables);
}
Program: 25088
Project: 25088
Buggy source:
/** 
 * <p>This implementation extracts standard TAP parameters from the given request.</p> <p> Non-standard TAP parameters are added in a map inside the returned   {@link TAPParameters} objectand are accessible with  {@link TAPParameters#get(String)} and {@link TAPParameters#getAdditionalParameters()}. However, if you want to manage them in another way, you must extend   {@link TAPParameters} and overridethis function in order to return an instance of your extension. </p>
 * @see tap.TAPFactory#createTAPParameters(javax.servlet.http.HttpServletRequest)
 */
@Override public TAPParameters createTAPParameters(final Map<String,Object> params) throws TAPException {
  try {
    return new TAPParameters(service,params,getExpectedAdditionalParameters(),getInputParamControllers());
  }
 catch (  UWSException ue) {
    throw new TAPException(ue);
  }
}

Fixed version (ground truth):
/** 
 * <p>This implementation extracts standard TAP parameters from the given request.</p> <p> Non-standard TAP parameters are added in a map inside the returned   {@link TAPParameters} objectand are accessible with  {@link TAPParameters#get(String)} and {@link TAPParameters#getAdditionalParameters()}. However, if you want to manage them in another way, you must extend   {@link TAPParameters} and overridethis function in order to return an instance of your extension. </p>
 */
@Override public TAPParameters createTAPParameters(final Map<String,Object> params) throws TAPException {
  try {
    return new TAPParameters(service,params,getExpectedAdditionalParameters(),getInputParamControllers());
  }
 catch (  UWSException ue) {
    throw new TAPException(ue);
  }
}
Program: 25089
Project: 25089
Buggy source:
/** 
 * <p>This implementation does not provided a backup manager. It means that no asynchronous job will be restored and backuped.</p> <p>You must override this function if you want enable the backup feature.</p>
 * @see tap.TAPFactory#createUWSBackupManager(uws.service.UWSService)
 */
@Override public UWSBackupManager createUWSBackupManager(final UWSService uws) throws TAPException {
  return null;
}

Fixed version (ground truth):
/** 
 * <p>This implementation does not provided a backup manager. It means that no asynchronous job will be restored and backuped.</p> <p>You must override this function if you want enable the backup feature.</p>
 */
@Override public UWSBackupManager createUWSBackupManager(final UWSService uws) throws TAPException {
  return null;
}