Program: 25058
Project: 25058
Buggy source:
/** 
 * Searches all   {@link DBTable} elements which have the given catalog, schema, and table name, with the specified case sensitivity.
 * @param catalog			Catalog name.
 * @param schema			Schema name.
 * @param table				Table name.
 * @param caseSensitivity	Case sensitivity for each table parts (one bit by part ; 0=sensitive,1=insensitive ; see {@link IdentifierField} for more details).
 * @return					The list of all matching {@link DBTable} elements.
 * @see IdentifierField
 */
public ArrayList<DBTable> search(final String catalog,final String schema,final String table,final byte caseSensitivity){
  ArrayList<DBTable> tmpResult=get(table,IdentifierField.TABLE.isCaseSensitive(caseSensitivity));
  if (schema != null) {
    ArrayList<DBTable> result=new ArrayList<DBTable>();
    for (    DBTable match : tmpResult) {
      if (match.getADQLSchemaName() != null) {
        if (IdentifierField.SCHEMA.isCaseSensitive(caseSensitivity)) {
          if (!match.getADQLSchemaName().equals(schema))           continue;
        }
 else {
          if (!match.getADQLSchemaName().equalsIgnoreCase(schema))           continue;
        }
        if (catalog != null && match.getADQLCatalogName() != null) {
          if (IdentifierField.CATALOG.isCaseSensitive(caseSensitivity)) {
            if (!match.getADQLCatalogName().equals(catalog))             continue;
          }
 else {
            if (!match.getADQLCatalogName().equalsIgnoreCase(catalog))             continue;
          }
        }
      }
      result.add(match);
    }
    return result;
  }
 else   return tmpResult;
}

Fixed version (ground truth):
/** 
 * Searches all   {@link DBTable} elements which have the given catalog, schema, and table name, with the specified case sensitivity.
 * @param catalog			Catalog name.
 * @param schema			Schema name.
 * @param table				Table name.
 * @param caseSensitivity	Case sensitivity for each table parts (one bit by part ; 0=sensitive,1=insensitive ; see {@link IdentifierField} for more details).
 * @return					The list of all matching {@link DBTable} elements.
 * @see IdentifierField
 */
public ArrayList<DBTable> search(final String catalog,final String schema,final String table,final byte caseSensitivity){
  ArrayList<DBTable> tmpResult=get(table,IdentifierField.TABLE.isCaseSensitive(caseSensitivity));
  if (schema != null) {
    ArrayList<DBTable> result=new ArrayList<DBTable>();
    for (    DBTable match : tmpResult) {
      if (match.getADQLSchemaName() == null)       continue;
      if (IdentifierField.SCHEMA.isCaseSensitive(caseSensitivity)) {
        if (!match.getADQLSchemaName().equals(schema))         continue;
      }
 else {
        if (!match.getADQLSchemaName().equalsIgnoreCase(schema))         continue;
      }
      if (catalog != null) {
        if (match.getADQLCatalogName() == null)         continue;
        if (IdentifierField.CATALOG.isCaseSensitive(caseSensitivity)) {
          if (!match.getADQLCatalogName().equals(catalog))           continue;
        }
 else {
          if (!match.getADQLCatalogName().equalsIgnoreCase(catalog))           continue;
        }
      }
      result.add(match);
    }
    return result;
  }
 else   return tmpResult;
}