bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public void setProperties() { // Set required server properties. System.setProperty("database", TestUtil.getJdbcUrlPrefix("localhost", NETWORKSERVER_PORT) + "wombat;create=true"); System.setProperty("ij.user", "EDWARD"); System.setProperty("ij.password", "noodle"); } | public void setProperties() { // Set required server properties. System.setProperty("database", TestUtil.getJdbcUrlPrefix("localhost", NETWORKSERVER_PORT) + "wombat;create=true"); System.setProperty("ij.user", "EDWARD"); System.setProperty("ij.password", "noodle"); } | 1,103,130 |
public static String getJdbcUrlPrefix(String server, int port) { int framework = getFramework(); switch (framework) { case EMBEDDED_FRAMEWORK: return "jdbc:derby:"; case DERBY_NET_FRAMEWORK: case OLD_NET_FRAMEWORK: return "jdbc:derby:net://" + server + ":" + port + "/"; case DERBY_NET_CLIENT_F... | public static String getJdbcUrlPrefix(String server, int port) { int framework = getFramework(); switch (framework) { case EMBEDDED_FRAMEWORK: return "jdbc:derby:"; case DERBY_NET_FRAMEWORK: case OLD_NET_FRAMEWORK: return "jdbc:derby:net://" + server + ":" + port + "/"; case DERBY_NET_CLIENT_F... | 1,103,131 |
public static void dumpSQLExceptions(SQLException sqle, boolean expected) { String prefix = ""; if (!expected) { System.out.println("FAIL -- unexpected exception ****************"); } else { prefix = "EXPECTED "; } do { System.out.println(prefix + "SQLSTATE("+sqle.getSQLState()+"): " + sqle.getMessage())... | public static void dumpSQLExceptions(SQLException sqle, boolean expected) { String prefix = ""; if (!expected) { System.out.println("FAIL -- unexpected exception ****************"); } else { prefix = "EXPECTED "; } do { System.out.println(prefix + "SQLSTATE("+sqle.getSQLState()+"): " + sqle.getMessage())... | 1,103,132 |
public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... | public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... | 1,103,133 |
public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... | public void testLongLobLengths() throws Exception { PreparedStatement pSt = prepareStatement( "insert into lobTable100M(bl) values (?)"); // The error we're testing occurs when the server // is shifting bits 24 and higher of the lob's // length (in bytes). This means that,... | 1,103,134 |
public static void insertAsciiColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { Connection conn = DriverManager.getConnection("jdbc:default:connection"); PreparedStatement ps = conn.prepareStatement(stmtText); setAsciiColumn(ps, colNumber, value.charAt(0), len... | public static void insertAsciiColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { PreparedStatement ps = conn.prepareStatement(stmtText); setAsciiColumn(ps, colNumber, value.charAt(0), length); ps.setInt(colNumber + 1, length); ps.execute(); } | 1,103,135 |
public static void insertBinaryColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { Connection conn = DriverManager.getConnection("jdbc:default:connection"); PreparedStatement ps = conn.prepareStatement(stmtText); setBinaryColumn(ps, colNumber, value.charAt(0), l... | public static void insertBinaryColumn ( String stmtText, int colNumber, String value, int length ) throws Throwable { PreparedStatement ps = conn.prepareStatement(stmtText); setBinaryColumn(ps, colNumber, value.charAt(0), length); ps.setInt(colNumber + 1, length); ps.execute(); } | 1,103,136 |
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException{ throw Util.notImplemented(); } | public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException{ getPreparedStatement().setBlob (parameterIndex, inputStream, length); } | 1,103,137 |
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException{ throw Util.notImplemented(); } | public void setClob(int parameterIndex, Reader reader, long length) throws SQLException{ getPreparedStatement().setClob (parameterIndex, reader, length); } | 1,103,138 |
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ throw Util.notImplemented(); } | public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ getPreparedStatement().setNCharacterStream (index, value, length); } | 1,103,139 |
public void setNClob(int index, NClob value) throws SQLException{ throw Util.notImplemented(); } | public void setNClob(int index, NClob value) throws SQLException{ getPreparedStatement().setNClob (index, value); } | 1,103,140 |
public void setNString(int index, String value) throws SQLException{ throw Util.notImplemented(); } | public void setNString(int index, String value) throws SQLException{ getPreparedStatement().setNString (index, value); } | 1,103,141 |
public void setRowId(int parameterIndex, RowId x) throws SQLException{ throw Util.notImplemented(); } | public void setRowId(int parameterIndex, RowId x) throws SQLException{ getPreparedStatement().setRowId (parameterIndex, x); } | 1,103,142 |
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{ throw Util.notImplemented(); } | public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{ getPreparedStatement().setSQLXML (parameterIndex, xmlObject); } | 1,103,143 |
public boolean isClosed() throws SQLException { // NOTE 1: Depending on implementation, this method may have to be // duplicated in the 3 *Statement40 classes. // NOTE 2: This is the only method using the Util class. Remove // import when method is implemented. throw Util... | public boolean isClosed() throws SQLException { // NOTE 1: Depending on implementation, this method may have to be // duplicated in the 3 *Statement40 classes. // NOTE 2: This is the only method using the Util class. Remove // import when method is implemented. throw Util... | 1,103,144 |
protected PreparedStatement getPreparedStatement() throws SQLException { return control.getRealPreparedStatement(); } | public PreparedStatement getPreparedStatement() throws SQLException { return control.getRealPreparedStatement(); } | 1,103,145 |
public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... | public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... | 1,103,146 |
public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... | public void open(Repository rep, String fname, String jobname, String dirname) throws KettleException { this.rep = rep; if (rep!=null) { jobMeta = new JobMeta(log, rep, jobname, rep.getDirectoryTree().findDirectory(dirname)); } else { jobMeta = new JobMeta(log, fname, rep); } if (jobMeta.getN... | 1,103,147 |
public void waitUntilFinished(long maxMiliseconds) { long time = 0L; while (isAlive() && (time<maxMiliseconds || maxMiliseconds<0)) { try { Thread.sleep(10); time+=10; } catch(InterruptedException e) {} } } | public void waitUntilFinished(long maxMiliseconds) { long time = 0L; while (isAlive() && (time<maxMiliseconds || maxMiliseconds<0)) { try { Thread.sleep(10); time+=10; } catch(InterruptedException e) {} } } | 1,103,148 |
void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... | void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... | 1,103,149 |
void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... | void fireTrigger ( TriggerEvent event, CursorResultSet brs, CursorResultSet ars ) throws StandardException { tec.setTrigger(triggerd); try { while (true) { if (brs != null) { if (brs.getNextRow() == null) break; } if (ars != null) { if (ars.getNextRow() == null) b... | 1,103,150 |
protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... | protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... | 1,103,151 |
protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... | protected void executeSPS(SPSDescriptor sps) throws StandardException { boolean recompile = false; while (true) { /* ** Only grab the ps the 1st time through. This ** way a row trigger doesn't do any unnecessary ** setup work. */ if (ps == null || recompile) { /* ** We need to clone the prepared... | 1,103,152 |
public void cancelRowUpdates() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "cancelRowUpdates"); } checkForClosedResultSet(); checkFor... | public void cancelRowUpdates() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "cancelRowUpdates"); } checkForClosedResultSet(); checkFor... | 1,103,153 |
private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... | private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... | 1,103,154 |
private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... | private void deleteRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("deleteRow"); // discard all previous updates resetUpdatedColumns(); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientM... | 1,103,155 |
private final void resetUpdatedColumns() { if (updatedColumns_ != null) { for (int i = 0; i < updatedColumns_.length; i++) { updatedColumns_[i] = null; } } if (columnUpdated_ != null) { for (int i = 0; i < columnUpdated_.length; i++) { ... | private final void resetUpdatedColumns() { if (updatedColumns_ != null) { for (int i = 0; i < updatedColumns_.length; i++) { updatedColumns_[i] = null; } } if (columnUpdated_ != null) { for (int i = 0; i < columnUpdated_.length; i++) { ... | 1,103,156 |
private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... | private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... | 1,103,157 |
private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... | private boolean updateRowX() throws SqlException { checkForClosedResultSet(); checkForUpdatableResultSet("updateRow"); if (isOnInsertRow_) { throw new SqlException(agent_.logWriter_, new ClientMessageId(SQLState.NO_CURRENT_ROW)); } //if n... | 1,103,158 |
public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } | public void setClientInfo(String name, String value) throws SQLClientInfoException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } | 1,103,159 |
public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLException se) { notifyException(se); throw se; } } | public void setClientInfo(String name, String value) throws SQLException{ try { getRealConnection().setClientInfo(name, value); } catch (SQLClientInfoException se) { notifyException(se); throw se; } } | 1,103,160 |
public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); String hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // "runTest()" is going to try to connect to the database th... | 1,103,162 |
public EmbedCallableStatement40(EmbedConnection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException{ super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); ps = new EmbedPreparedStatement40(conn, sql, f... | public EmbedCallableStatement40(EmbedConnection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException{ super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); ps = new EmbedPreparedStatement40(conn, sql, f... | 1,103,163 |
public <T> T createQueryObject(Class<T> ifc) throws SQLException { throw Util.notImplemented(); } | public <T> T createQueryObject(Class<T> ifc) throws SQLException { throw Util.notImplemented(); } | 1,103,164 |
public int read( char[] cbuf, int off, int len ){ if(wroteLength >= total) return -1; int i; for(i = off ; i < off + len && wroteLength <= total ; i++, wroteLength ++){ cbuf[i] = (char) (wroteLength % 0x10000L); } return i - off; } | public int read( char[] cbuf, int off, int len ){ if(wroteLength >= total) return -1; int i; for(i = off ; i < off + len && wroteLength < total ; i++, wroteLength ++){ cbuf[i] = (char) (wroteLength % 0x10000L); } return i - off; } | 1,103,168 |
protected Lob(Agent agent) { agent_ = agent; lengthObtained_ = false; } | protected Lob(Agent agent, boolean willBeLayerBStreamed) { agent_ = agent; lengthObtained_ = false; } | 1,103,179 |
RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... | RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... | 1,103,181 |
RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... | RowResultSet ( Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod closeCleanup ) { super(activation, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost); ... | 1,103,182 |
public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if (isOpen) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be... | public void close() throws StandardException { beginTime = getCurrentTimeMillis(); if (isOpen) { if (closeCleanup != null) { closeCleanup.invoke(activation); // let activation tidy up } // we don't want to keep around a pointer to the // row ... so it can be thrown away. // REVISIT: does this need to be... | 1,103,183 |
private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... | private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... | 1,103,184 |
private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... | private boolean caseGrantRevoke(Connection conn, int phase, int dbMajor, int dbMinor) throws SQLException { boolean passed = true; boolean grantRevokeNotSupported = dbMajor==10 && dbMinor<2; Statement s = conn.createS... | 1,103,185 |
private Connection getConnection(URLClassLoader classLoader, String dbName, int phase) throws Exception{ Connection conn = null; Properties prop = new Properties(); prop.setProperty("databaseName", dbName); switch(phase) { case PH_CREATE: prop.setProperty("connectionAttributes", "create=true"); b... | private Connection getConnection(URLClassLoader classLoader, int phase) throws Exception{ Connection conn = null; Properties prop = new Properties(); prop.setProperty("databaseName", dbName); switch(phase) { case PH_CREATE: prop.setProperty("connectionAttributes", "create=true"); break; case PH... | 1,103,186 |
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | 1,103,187 |
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | 1,103,188 |
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | 1,103,189 |
private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | private void runPhase(int version, int phase) throws Exception{ System.out.println("\n\nSTART - phase " + PHASES[phase]); URLClassLoader classLoader = null; switch(version) { case OLD_RELEASE: classLoader = oldClassLoader; break; case NEW_RELEASE: classLoader = newClassLoader; break; ... | 1,103,190 |
protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException { return stringCompare(char1.getCharArray(), char1.getLength(), char2.getCharArray(), char2.getLength()); } | protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException { return stringCompare(char1.getCharArray(), char1.getLength(), char2.getCharArray(), char2.getLength()); } | 1,103,191 |
protected ContainerLocking2(LockFactory lf) { this.lf = lf; } | protected ContainerLocking2() { this.lf = lf; } | 1,103,192 |
protected ContainerLocking2(LockFactory lf) { this.lf = lf; } | protected ContainerLocking2(LockFactory lf) { this.lf = null; } | 1,103,193 |
public boolean hasPreparedRecoveredXact() { for (Enumeration e = trans.elements(); e.hasMoreElements(); ) { TransactionTableEntry ent = (TransactionTableEntry) e.nextElement(); if (ent != null && ent.isRecovery() && (ent.getTransactionStatus() & Xact.END_PREPARED) != 0) { return true; ... | public boolean hasPreparedRecoveredXact() { for (Enumeration e = trans.elements(); e.hasMoreElements(); ) { TransactionTableEntry ent = (TransactionTableEntry) e.nextElement(); if (ent != null && ent.isRecovery() && (ent.getTransactionStatus() & Xact.END_PREPARED) != 0) { return true; ... | 1,103,194 |
public int getSavepointId() throws SQLException { if (savepointId_ != 0) { return savepointId_; } else { throw new SqlException(agent_.logWriter_, "This is a named savepoint.").getSQLException(); } } | public int getSavepointId() throws SQLException { if (savepointId_ != 0) { return savepointId_; } else { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_ID_FOR_NAMED_SAVEPOINT)).getSQLException(); } } | 1,103,195 |
public String getSavepointName() throws SQLException { if (savepointName_ != null) { return savepointName_; } else { throw new SqlException(agent_.logWriter_, "This is an un-named savepoint.").getSQLException(); } } | public String getSavepointName() throws SQLException { if (savepointName_ != null) { return savepointName_; } else { throw new SqlException(agent_.logWriter_, new MessageId(SQLState.NO_NAME_FOR_UNNAMED_SAVEPOINT)).getSQLException(); } } | 1,103,196 |
public HeapRowLocation() { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } | HeapRowLocation(RecordHandle rh) { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } | 1,103,197 |
public HeapRowLocation() { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } | public HeapRowLocation() { this.pageno = 0; this.recid = RecordHandle.INVALID_RECORD_HANDLE; } | 1,103,198 |
public BaseTypeIdImpl(int formatId) { this.formatId = formatId; setTypeIdSpecificInstanceVariables(); } | public BaseTypeIdImpl(int formatId) { this.formatId = formatId; setTypeIdSpecificInstanceVariables(); } | 1,103,199 |
public UserDefinedTypeIdImpl(String className) { super(className); this.className = className; JDBCTypeId = java.sql.Types.JAVA_OBJECT; } | public UserDefinedTypeIdImpl(String className) { super(className); this.className = className; JDBCTypeId = java.sql.Types.JAVA_OBJECT; } | 1,103,201 |
public void boot(boolean create, Properties startParams) throws StandardException { softwareVersion = new DD_Version(this, DataDictionary.DD_VERSION_DERBY_10_2); /* There is a bootstrapping problem here. We would like to use * a language connection context to find the name of the system and default ... | public void boot(boolean create, Properties startParams) throws StandardException { softwareVersion = new DD_Version(this, DataDictionary.DD_VERSION_DERBY_10_3); /* There is a bootstrapping problem here. We would like to use * a language connection context to find the name of the system and default ... | 1,103,202 |
public static final String getTypeDesc(int ty) { if (ty>0 && ty<JobEntryInterface.typeCode.length) return JobEntryInterface.typeCode[ty]; return JobEntryInterface.typeCode[0]; } | public String getTypeDesc() { if (ty>0 && ty<JobEntryInterface.typeCode.length) return JobEntryInterface.typeCode[ty]; return JobEntryInterface.typeCode[0]; } | 1,103,203 |
public static final String getTypeDesc(int ty) { if (ty>0 && ty<JobEntryInterface.typeCode.length) return JobEntryInterface.typeCode[ty]; return JobEntryInterface.typeCode[0]; } | public static final String getTypeDesc(int ty) { if (ty>0 && ty<JobEntryInterface.typeCode.length) return JobEntryInterface.typeCode[ty]; return JobEntryInterface.typeCode[0]; } | 1,103,204 |
private static void execCmdDumpResults (String[] args, boolean wait) throws Exception { // We need the process inputstream and errorstream ProcessStreamResult prout = null; ProcessStreamResult prerr = null; System.out.flush(); bos.flush(); BufferedOutputStr... | private static void execCmdDumpResults (String[] args, boolean wait) throws Exception { // We need the process inputstream and errorstream ProcessStreamResult prout = null; ProcessStreamResult prerr = null; System.out.flush(); bos.flush(); BufferedOutputStr... | 1,103,205 |
public void testIsClosedWhenClosingConnectionInInvalidState() throws SQLException { stmt.executeQuery("select count(*) from stmtTable"); // Connection should now be in an invalid transaction state. try { con.close(); fail("Invalid transaction state exception was not... | public void testIsClosedWhenClosingConnectionInInvalidState() throws SQLException { stmt.executeQuery("select count(*) from stmtTable"); // Connection should now be in an invalid transaction state. try { con.close(); fail("Invalid transaction state exception was not... | 1,103,207 |
public static void getUsedVariables(String aString, List list) { getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list); getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list); } | private static void getUsedVariables(String aString, String open, String close, List list, boolean includeSystemVariables) { getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list); getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list); } | 1,103,208 |
public static void getUsedVariables(String aString, List list) { getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list); getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list); } | public static void getUsedVariables(String aString, List list) { getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list); getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list); } | 1,103,209 |
public void bindResultColumnByName(TableDescriptor tableDescriptor, int columnId) throws StandardException { ColumnDescriptor columnDescriptor; columnDescriptor = tableDescriptor.getColumnDescriptor(exposedName); if (columnDescriptor == null) { String errorString; String schemaName; errorString = ""... | public void bindResultColumnByName(TableDescriptor tableDescriptor, int columnId) throws StandardException { ColumnDescriptor columnDescriptor; columnDescriptor = tableDescriptor.getColumnDescriptor(exposedName); if (columnDescriptor == null) { String errorString; String schemaName; errorString = ""... | 1,103,211 |
private static Connection getConnection() throws SQLException { return DriverManager.getConnection(TestUtil.getJdbcUrlPrefix("localhost", 1527) + "wombat;create=true", "testuser", "testpassword"); } | private static Connection getConnection() throws SQLException { String dbName = "wombat"; if (dbNotCreated) { dbName = dbName + ";create=true"; dbNotCreated = false; } return DriverManager.getConnection(TestUtil.getJdbcUrlPrefix("localhost", 1527) + "wombat;create=true", "testuser", ... | 1,103,212 |
private static Connection getConnection() throws SQLException { return DriverManager.getConnection(TestUtil.getJdbcUrlPrefix("localhost", 1527) + "wombat;create=true", "testuser", "testpassword"); } | private static Connection getConnection() throws SQLException { return DriverManager.getConnection(TestUtil.getJdbcUrlPrefix("localhost", 1527) + dbName, "testuser", "testpassword"); } | 1,103,213 |
public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | 1,103,214 |
public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | 1,103,215 |
public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | public void runTest() throws Throwable { String resource = "org/apache/derbyTesting/functionTests/tests/" + getArea() + "/" + getName() + ".sql"; String canon = "org/apache/derbyTesting/functionTests/master/" + getName() + ".out"; URL sql = getTestResource(resource); assertNotNull("SQL script missing: ... | 1,103,216 |
public void readCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) { readLocalXACommit_(); } } else { readLocalCommit_(); } } | public void readCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) { readLocalXACommit_(); } } else { readLocalCommit_(); } } | 1,103,217 |
public void writeCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) { writeLocalXACommit_(); } } else { writeLocalCommit_(); } } | public void writeCommit() throws SqlException { if (isXAConnection_) { if ((xaState_ == XA_T0_NOT_ASSOCIATED) ) { writeLocalXACommit_(); } } else { writeLocalCommit_(); } } | 1,103,218 |
public void writeRollback() throws SqlException { if (isXAConnection_) { writeLocalXARollback_(); } else { writeLocalRollback_(); } } | public void writeRollback() throws SqlException { if (isXAConnection_) { writeXARollback_ (); } else { writeLocalRollback_(); } } | 1,103,219 |
RAFContainer(BaseDataFileFactory factory) { super(factory); // If Java 1.5 fair locks are available, construct one. if (hasJava5FairLocks) { try { // construct a lock with fairness set to true fairLock = fairLockConstructor.newInstance( new Object[] { Boolean.TRUE ... | RAFContainer(BaseDataFileFactory factory) { super(factory); // If Java 1.5 fair locks are available, construct one. if (hasJava5FairLocks) { try { // construct a lock with fairness set to true fairLock = fairLockConstructor.newInstance( new Object[] { Boolean.TRUE ... | 1,103,222 |
protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; // Use Java 1.5 fair locks if they are available. if (hasJava5FairLocks) { try { lock.inv... | protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; // Use Java 1.5 fair locks if they are available. if (hasJava5FairLocks) { try { lock.inv... | 1,103,223 |
protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; // Use Java 1.5 fair locks if they are available. if (hasJava5FairLocks) { try { lock.inv... | protected void readPage(long pageNumber, byte[] pageData) throws IOException, StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(!getCommittedDropState()); } long pageOffset = pageNumber * pageSize; // Use Java 1.5 fair locks if they are available. if (hasJava5FairLocks) { try { lock.inv... | 1,103,224 |
protected final Connection getNewCurrentConnectionHandle() { Connection applicationConnection = currentConnectionHandle = realConnection.getLocalDriver().newBrokeredConnection(this); realConnection.setApplicationConnection(applicationConnection); return applicationConnection; } | protected final Connection getNewCurrentConnectionHandle() { Connection applicationConnection = currentConnectionHandle = ((org.apache.derby.jdbc.Driver20) (realConnection.getLocalDriver())).newBrokeredConnection(this); realConnection.setApplicationConnection(applicationConnection); return applicationConnection; } | 1,103,225 |
public FetchDescriptor( int input_row_length, FormatableBitSet input_validColumns, Qualifier[][] input_qualifier_list) { row_length = input_row_length; qualifier_list = input_qualifier_list; if (qualifier_list != null) { materialized_col... | public FetchDescriptor( int input_row_length, FormatableBitSet input_validColumns, Qualifier[][] input_qualifier_list) { row_length = input_row_length; qualifier_list = input_qualifier_list; if (qualifier_list != null) { materialized_col... | 1,103,226 |
public FetchDescriptor( int input_row_length, FormatableBitSet input_validColumns, Qualifier[][] input_qualifier_list) { row_length = input_row_length; qualifier_list = input_qualifier_list; if (qualifier_list != null) { materialized_col... | public FetchDescriptor( int input_row_length, FormatableBitSet input_validColumns, Qualifier[][] input_qualifier_list) { row_length = input_row_length; qualifier_list = input_qualifier_list; if (qualifier_list != null) { materialized_col... | 1,103,227 |
public final int getLength() throws StandardException { if (stream != null) { if (streamLength != -1) return streamLength; } return getBytes().length; } | public final int getLength() throws StandardException { if (stream != null) { if (streamLength != -1) return streamLength; } return (getBytes() == null) ? 0 : getBytes().length; } | 1,103,228 |
public void tearDown() throws SQLException { stmt_.close(); } | public void tearDown() throws Exception { stmt_.close(); } | 1,103,230 |
public static Test suite() { TestSuite topSuite = new TestSuite("ClosedObjectTest suite"); TestSuite dsSuite = new TestSuite("ClosedObjectTest DataSource"); DataSourceDecorator dsDecorator = new DataSourceDecorator(dsSuite); topSuite.addTest(dsDecorator); fillDataSourceSuite(dsSu... | public static Test suite() { TestSuite topSuite = new TestSuite("ClosedObjectTest suite"); TestSuite dsSuite = new TestSuite("ClosedObjectTest DataSource"); DataSourceDecorator dsDecorator = new DataSourceDecorator(dsSuite); topSuite.addTest(dsDecorator); fillDataSourceSuite(dsSu... | 1,103,232 |
public static void copyRefColumns(ExecRow to, ExecRow from, int start, int count) throws StandardException { copyRefColumns(to, 0, from, start, count); } | public static void copyRefColumns(ExecRow to, ExecRow from, int start, int count) throws StandardException { copyRefColumns(to, 0, from, start, count); } | 1,103,233 |
public static void copyRefColumns(ExecRow to, ExecRow from, int start, int count) throws StandardException { copyRefColumns(to, 0, from, start, count); } | public static void copyRefColumns(ExecRow to, ExecRow from, int start, int count) throws StandardException { Object[] src = from.getRowArray(); Object[] dst = to.getRowArray(); System.arraycopy(src, 0, dst, 0, src.length); } | 1,103,234 |
public static String toString(ExecRow row, int startPoint, int endPoint) { return toString(row.getRowArray(), startPoint, endPoint); } | public static String toString(ExecRow row) { return toString(row.getRowArray(), startPoint, endPoint); } | 1,103,235 |
public static String toString(ExecRow row, int startPoint, int endPoint) { return toString(row.getRowArray(), startPoint, endPoint); } | public static String toString(ExecRow row, int startPoint, int endPoint) { if (SanityManager.DEBUG) { return (row == null) ? "null" : toString(row.getRowArray()); } else { return ""; } } | 1,103,236 |
private boolean getMetaDataInfoInt_SupportsResultSetConcurrency(int infoCallIndex, int type, int concurrency) throws SQLException { // The stored procured will return a String containg a list of concurrency and list of resultSet types which support // a perticular concurrency // For eg. if the ... | private boolean getMetaDataInfoInt_SupportsResultSetConcurrency(int infoCallIndex, int type, int concurrency) throws SQLException { // The stored procured will return a String containg a list of concurrency and list of resultSet types which support // a perticular concurrency // For eg. if the ... | 1,103,237 |
protected boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException { if (xaState_ == XA_LOCAL) { return true; } return false; } | protected boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException { if (xaState_ == XA_T0_NOT_ASSOCIATED) { return true; } return false; } | 1,103,238 |
public boolean willAutoCommitGenerateFlow() { // this logic must be in sync with writeCommit() logic if (!autoCommit_) { return false; } if (!isXAConnection_) { return true; } boolean doCommit = false; int xaState = getXAState(); ... | public boolean willAutoCommitGenerateFlow() { // this logic must be in sync with writeCommit() logic if (!autoCommit_) { return false; } if (!isXAConnection_) { return true; } boolean doCommit = false; int xaState = getXAState(); ... | 1,103,239 |
protected Connection(LogWriter logWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, java.util.Properties properties) throws SqlException { if (l... | protected Connection(LogWriter logWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, java.util.Properties properties) throws SqlException { if (l... | 1,103,240 |
NetAgent(NetConnection netConnection, org.apache.derby.client.am.LogWriter netLogWriter, int loginTimeout, String server, int port) throws SqlException { super(netConnection, netLogWriter); server_ = server; port_ = port; netConnection_ = n... | NetAgent(NetConnection netConnection, org.apache.derby.client.am.LogWriter netLogWriter, int loginTimeout, String server, int port) throws SqlException { super(netConnection, netLogWriter); server_ = server; port_ = port; netConnection_ = n... | 1,103,241 |
NetCallableStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability) throws SqlException { this(ClientDriver.getFactory().newCallable... | NetCallableStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability) throws SqlException { this(ClientDriver.getFactory().newCallable... | 1,103,242 |
NetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, Section section) throws SqlException { this(ClientDriver.getFactory().newPreparedStatement(netAgent, netConnection, sql, section), ... | NetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, Section section) throws SqlException { this(ClientDriver.getFactory().newPreparedStatement(netAgent, netConnection, sql, section), ... | 1,103,243 |
void resetNetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException { preparedStatement_.resetPreparedStatement(netAgent, netConnection, sql, type, concurrency, holdability, aut... | void resetNetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException { preparedStatement_.resetPreparedStatement(netAgent, netConnection, sql, type, concurrency, holdability, aut... | 1,103,244 |
public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { getPreparedStatement().setAsciiStream(parameterIndex,x,length); } | public final void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { getPreparedStatement().setAsciiStream(parameterIndex,x,length); } | 1,103,245 |
public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { getPreparedStatement().setBinaryStream(parameterIndex,x,length); } | public final void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { getPreparedStatement().setBinaryStream(parameterIndex,x,length); } | 1,103,246 |
public final void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { getPreparedStatement().setCharacterStream(parameterIndex,x,length); } | public final void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { getPreparedStatement().setCharacterStream(parameterIndex,x,length); } | 1,103,247 |
public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ getPreparedStatement().setNCharacterStream (index, value, length); } | public void setNCharacterStream(int index, Reader value, long length) throws SQLException{ getPreparedStatement().setNCharacterStream (index, value, length); } | 1,103,248 |
public void doTag(XMLOutput output) throws Exception { if (!maxRowsSpecified) { Object obj = context.getVariable("org.apache.commons.jelly.sql.maxRows"); if (obj != null) { if (obj instanceof Integer) { maxRows = ((Integer) obj).intValue(); ... | public void doTag(XMLOutput output) throws Exception { if (!maxRowsSpecified) { Object obj = context.getVariable("org.apache.commons.jelly.sql.maxRows"); if (obj != null) { if (obj instanceof Integer) { maxRows = ((Integer) obj).intValue(); ... | 1,103,249 |
protected StoredRecordHeader shiftUp(int low) { if (SanityManager.DEBUG) { SanityManager.ASSERT(isLatched()); if ((low < 0) || (low > recordCount)) { SanityManager.THROWASSERT( "shiftUp failed, low must be between 0 and recordCount." + " low = " + ... | protected StoredRecordHeader shiftUp(int low) { if (SanityManager.DEBUG) { SanityManager.ASSERT(isLatched()); if ((low < 0) || (low > recordCount)) { SanityManager.THROWASSERT( "shiftUp failed, low must be between 0 and recordCount." + " low = " + ... | 1,103,250 |
protected EmbedResultSetMetaData newEmbedResultSetMetaData(ResultDescription resultDesc) { return new EmbedResultSetMetaData(resultDesc.getColumnInfo()); } | protected EmbedResultSetMetaData newEmbedResultSetMetaData(ResultDescription resultDesc) { return factory.newEmbedResultSetMetaData(resultDesc.getColumnInfo()); } | 1,103,251 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.