Program: 68752
Project: 68752
Buggy source:
/** 
 * INTERNAL: Get a timestamp value from a result set. Overrides the default behavior to specifically return a timestamp.  Added to overcome an issue with the oracle 9.0.1.4 JDBC driver.
 */
public Object getObjectFromResultSet(ResultSet resultSet,int columnNumber,int type,AbstractSession session) throws java.sql.SQLException {
  if ((type == Types.TIMESTAMP) || (type == Types.DATE)) {
    return resultSet.getTimestamp(columnNumber);
  }
 else   if (type == oracle.jdbc.OracleTypes.TIMESTAMPTZ) {
    TIMESTAMPTZ tsTZ=(TIMESTAMPTZ)resultSet.getObject(columnNumber);
    if ((tsTZ != null) && (tsTZ.getLength() != 0)) {
      tsTZ.timestampValue(getConnection(session,resultSet.getStatement().getConnection()));
      return new TIMESTAMPTZWrapper(tsTZ);
    }
    return null;
  }
 else   if (type == oracle.jdbc.OracleTypes.TIMESTAMPLTZ) {
    TIMESTAMPLTZ tsLTZ=(TIMESTAMPLTZ)resultSet.getObject(columnNumber);
    if ((tsLTZ != null) && (tsLTZ.getLength() != 0)) {
      Timestamp ts=TIMESTAMPLTZ.toTimestamp(getConnection(session,resultSet.getStatement().getConnection()),tsLTZ.toBytes());
      return new TIMESTAMPLTZWrapper(ts,((OracleConnection)getConnection(session,resultSet.getStatement().getConnection())).getSessionTimeZone());
    }
    return null;
  }
 else   if (type == OracleTypes.OPAQUE) {
    try {
      Object result=resultSet.getObject(columnNumber);
      if (!(result instanceof OPAQUE)) {
        return result;
      }
      return getXMLTypeFactory().getDOM((OPAQUE)result);
    }
 catch (    SQLException ex) {
      throw DatabaseException.sqlException(ex,null,session,false);
    }
  }
 else {
    return super.getObjectFromResultSet(resultSet,columnNumber,type,session);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get a timestamp value from a result set. Overrides the default behavior to specifically return a timestamp.  Added to overcome an issue with the oracle 9.0.1.4 JDBC driver.
 */
public Object getObjectFromResultSet(ResultSet resultSet,int columnNumber,int type,AbstractSession session) throws java.sql.SQLException {
  if ((type == Types.TIMESTAMP) || (type == Types.DATE)) {
    return resultSet.getTimestamp(columnNumber);
  }
 else   if (type == oracle.jdbc.OracleTypes.TIMESTAMPTZ) {
    TIMESTAMPTZ tsTZ=(TIMESTAMPTZ)resultSet.getObject(columnNumber);
    if ((tsTZ != null) && (tsTZ.getLength() != 0)) {
      tsTZ.timestampValue(getConnection(session,resultSet.getStatement().getConnection()));
      return new TIMESTAMPTZWrapper(tsTZ);
    }
    return null;
  }
 else   if (type == oracle.jdbc.OracleTypes.TIMESTAMPLTZ) {
    TIMESTAMPLTZ tsLTZ=(TIMESTAMPLTZ)resultSet.getObject(columnNumber);
    if ((tsLTZ != null) && (tsLTZ.getLength() != 0)) {
      Timestamp ts=TIMESTAMPLTZ.toTimestamp(getConnection(session,resultSet.getStatement().getConnection()),tsLTZ.toBytes());
      return new TIMESTAMPLTZWrapper(ts,((OracleConnection)getConnection(session,resultSet.getStatement().getConnection())).getSessionTimeZone());
    }
    return null;
  }
 else   if (type == OracleTypes.OPAQUE) {
    try {
      Object result=resultSet.getObject(columnNumber);
      if (!(result instanceof OPAQUE)) {
        return result;
      }
      return getXMLTypeFactory().getString((OPAQUE)result);
    }
 catch (    SQLException ex) {
      throw DatabaseException.sqlException(ex,null,session,false);
    }
  }
 else {
    return super.getObjectFromResultSet(resultSet,columnNumber,type,session);
  }
}