rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
profiles[i] = new Profile(new File(Config.getPackageDataDir() + "/profiles/" + profilesStrings[i])); | profiles[i] = new Profile(new File(Config.getPackageDataDir() + File.separator + "profiles" + File.separator + profilesStrings[i])); | public static Profile[] getAllProfiles() { String[] profilesStrings = new File(Config.getPackageDataDir() + "/profiles/").list(new ProfileFilter()); Profile[] profiles = new Profile[profilesStrings.length]; for (int i = 0; i < profiles.length; i++) profiles[i] = new Profile(new File(Config.getPackageDataDir() + "... |
return new Profile(new File(Config.getPackageDataDir() + "/profiles/" + profileName + ".profile")); | return new Profile(new File(Config.getPackageDataDir() + File.separator + "profiles" + File.separator + profileName + ".profile")); | public static Profile getProfile(String profileName) { return new Profile(new File(Config.getPackageDataDir() + "/profiles/" + profileName + ".profile")); } |
public String echoBack( String message ) | public String echoBack( String message1, String message2 ) | public String echoBack( String message ) { return message; } |
return message; | return message1 + message2; | public String echoBack( String message ) { return message; } |
public SimplePosition(boolean fs, boolean fe, int p) { this(fs,fe,p,p,null); | public SimplePosition(int p) { this(false,false,p); | public SimplePosition(boolean fs, boolean fe, int p) { this(fs,fe,p,p,null); } |
proceedBody.append( "(" ); proceedBody.append( ProxyUtils.getJavaClassName( argumentTypes[i] ) ); proceedBody.append( ")arguments[" ); proceedBody.append( i ); proceedBody.append( "]" ); | final Class argumentType = argumentTypes[i]; proceedBody.append( createCastExpression( argumentType, "arguments[" + i + "]" ) ); | private static Class createInvocationClass( ClassLoader classLoader, Method interfaceMethod ) throws CannotCompileException { Class invocationClass; final CtClass ctClass = JavassistUtils.createClass( getSimpleName( interfaceMethod.getDeclaringClass() ) + "_" + interfaceMe... |
proceedBody.append( ");\n" ); | if( !Void.TYPE.equals( interfaceMethod.getReturnType() ) && interfaceMethod.getReturnType().isPrimitive() ) { proceedBody.append( ") );\n" ); } else { proceedBody.append( ");\n" ); } | private static Class createInvocationClass( ClassLoader classLoader, Method interfaceMethod ) throws CannotCompileException { Class invocationClass; final CtClass ctClass = JavassistUtils.createClass( getSimpleName( interfaceMethod.getDeclaringClass() ) + "_" + interfaceMe... |
proceedMethod.setBody( proceedBody.toString() ); | final String body = proceedBody.toString(); proceedMethod.setBody( body ); | private static Class createInvocationClass( ClassLoader classLoader, Method interfaceMethod ) throws CannotCompileException { Class invocationClass; final CtClass ctClass = JavassistUtils.createClass( getSimpleName( interfaceMethod.getDeclaringClass() ) + "_" + interfaceMe... |
} | public void userKeyPressed(int keyCode) { if (!startMessage) { super.userKeyPressed(keyCode); if (keyCode==KEY_NUM3) new ActiveContacts(display, contact); if (keyCode==KEY_NUM9) nextContact(); if (keyCode==KEY_STAR) { startMessage=true; ... | |
testSecurityMechanism("john","sarah",new Short(SECMEC_USRSSBPWD),"SECMEC_USRSSBPWD:"); | public void getConnectionUsingDataSource() { // bug in jcc, throws error with null password //testSecurityMechanism("sarah",null,new Short(SECMEC_USRIDONL),"SECMEC_USRIDONL:"); testSecurityMechanism("john","sarah",new Short(SECMEC_USRIDPWD),"SECMEC_USRIDPWD:"); // Possible bug in JCC, hence d... | |
String serverSecurityMechanism = System.getProperty("derby.drda.securityMechanism"); if ((serverSecurityMechanism == null) || (serverSecurityMechanism.equals( "STRONG_PASSWORD_SUBSTITUTE_SECURITY"))) { testUSRSSBPWD_with_BUILTIN(); } | protected void runTest() { // Test cases with get connection via drivermanager and using // different security mechanisms. // Network server supports SECMEC_USRIDPWD, SECMEC_USRIDONL,SECMEC_EUSRIDPWD System.out.println("Checking security mechanism authentication with DriverManager"); // DERBY-300; C... | |
return (javax.sql.DataSource) getDataSourceWithReflection("com.ibm.db2.jcc.DB2SimpleDataSource", database,user,password); | Properties attrs = new Properties(); attrs.setProperty("databaseName", database); if (user != null) attrs.setProperty("user", user); if (password != null) attrs.setProperty("password", password); attrs = addRequiredAttributes(attrs); return TestUtil.getDataSource(attrs); | public javax.sql.DataSource getDS(String database, String user, String password) { return (javax.sql.DataSource) getDataSourceWithReflection("com.ibm.db2.jcc.DB2SimpleDataSource", database,user,password); } |
Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance(); | TestUtil.loadDriver(); | public static void main(String[] args) throws Exception { // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through // the server at port NETWORKSERVER_PORT. Thus, we have to // start the server on that port before calling runTest. try { Class.forNa... |
String s = "jdbc:derby:net: | String s = TestUtil.getJdbcUrlPrefix("localhost", NETWORKSERVER_PORT) + db; | public String getJDBCUrl(String db, String attrs) { String s = "jdbc:derby:net://localhost:" + NETWORKSERVER_PORT + "/" + db; if (attrs != null) s = s + ":" + attrs + ";"; return s; } |
return (javax.sql.ConnectionPoolDataSource) getDataSourceWithReflection("com.ibm.db2.jcc.DB2ConnectionPoolDataSource",database,user,password); | Properties attrs = new Properties(); attrs.setProperty("databaseName", database); if (user != null) attrs.setProperty("user", user); if (password != null) attrs.setProperty("password", password); attrs = addRequiredAttributes(attrs); return TestUtil.getConnectionPoolDataSource(attrs); | public javax.sql.ConnectionPoolDataSource getCPDS(String database, String user, String password) { return (javax.sql.ConnectionPoolDataSource) getDataSourceWithReflection("com.ibm.db2.jcc.DB2ConnectionPoolDataSource",database,user,password); } |
dssIsChainedWithSameID = false; dssIsChainedWithDiffID = false; | protected void clearBuffer() throws DRDAProtocolException { skipBytes(java.lang.Math.min(dssLength, count - pos)); } | |
abstract String convertToUCS2 (byte[] sourceBytes, int offset, int numToConvert); | abstract String convertToUCS2 (byte[] sourceBytes); | abstract String convertToUCS2 (byte[] sourceBytes, int offset, int numToConvert); |
if (cancelTask != null) { cancelTask.forgetContext(); cancelTask = null; } cancellationFlag = false; | public void clearInUse() { /* We must clear out the current top ResultSet to prepare for * reusing a StatementContext. */ stuffTopResultSet( null, null ); inUse = false; parentInTrigger = false; isAtomic = false; this.stmtText = null; sqlAllowed = -1; isSystemCode = false; rollbackParentContext = false; } | |
ParameterValueSet pvs | ParameterValueSet pvs, long timeoutMillis | public void setInUse ( boolean parentInTrigger, boolean isAtomic, String stmtText, ParameterValueSet pvs ) { inUse = true; this.parentInTrigger = parentInTrigger; this.isAtomic = isAtomic; this.stmtText = stmtText; this.pvs = pvs; rollbackParentContext = false; } |
if (timeoutMillis > 0) { TimerFactory factory = Monitor.getMonitor().getTimerFactory(); Timer timer = factory.getCancellationTimer(); cancelTask = new CancelQueryTask(this); timer.schedule(cancelTask, timeoutMillis); } | public void setInUse ( boolean parentInTrigger, boolean isAtomic, String stmtText, ParameterValueSet pvs ) { inUse = true; this.parentInTrigger = parentInTrigger; this.isAtomic = isAtomic; this.stmtText = stmtText; this.pvs = pvs; rollbackParentContext = false; } | |
/* | public XMLDoclet (RootDoc root) throws Exception { FileWriter writer = new FileWriter(targetFileName); try { OutputFormat format = new OutputFormat(); format.setEncoding(encodingFormat); format.setIndentSize(4);/* format.setIndenting(true); ... | |
cm.endElement(xmlns, localName, "field"); | cm.endElement(xmlns, localName, "method"); | private void methodXML(MethodDoc methodDoc) throws SAXException { AttributesImpl atts = new AttributesImpl(); //atts.addAttribute(xmlns, localName, "", String, ); atts.addAttribute(xmlns, localName, "name", "String", methodDoc.name()); String access = "package"; if (methodDoc.isPr... |
costEstimate = getFinalCostEstimate(); | public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { /* By the time we get here we should be a union all. * (We created a DistinctNode above us, if needed, * to eliminate the duplicates earlier.) */ if (SanityManager.DEBUG) { SanityManager.ASSERT(all,... | |
public final QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, ContextManager cm) throws StandardException { QueryTreeNode retval = getNode(nodeType, cm); retval.init(arg1, arg2, arg3); return retval; } | public abstract QueryTreeNode getNode(int nodeType, ContextManager cm) throws StandardException; | public final QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, ContextManager cm) throws StandardException { QueryTreeNode retval = getNode(nodeType, cm); retval.init(arg1, arg2, arg3); return retval; } |
protected void generate( ActivationClassBuilder acb, MethodBuilder mb) throws StandardException | public GeneratedClass generate(ByteArray ignored) throws StandardException | protected void generate( ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { throw StandardException.newException(SQLState.LANG_UNABLE_TO_GENERATE, this.nodeHeader()); } |
public void push(int value); | public void push(byte value); | public void push(int value); |
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException | public void init(Object arg1) throws StandardException | public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException { if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Five-argument init() not implemented for " + getClass().getName()); } } |
SanityManager.THROWASSERT("Five-argument init() not implemented for " + getClass().getName()); | SanityManager.THROWASSERT("Single-argument init() not implemented for " + getClass().getName()); | public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException { if (SanityManager.DEBUG) { SanityManager.THROWASSERT("Five-argument init() not implemented for " + getClass().getName()); } } |
leftResultSet = leftResultSet.modifyAccessPaths(); | { if (this instanceof SetOperatorNode) { SetOperatorNode setOp = (SetOperatorNode)this; leftResultSet = leftResultSet.modifyAccessPaths( setOp.getLeftOptPredicateList()); } else leftResultSet = leftResultSet.modifyAccessPaths(); } | public ResultSetNode modifyAccessPaths() throws StandardException { /* Beetle 4454 - union all with another union all would modify access * paths twice causing NullPointerException, make sure we don't * do this again, if we have already done it in modifyAccessPaths(outertables) */ if (!leftModifyAccessPathsDon... |
rightResultSet = rightResultSet.modifyAccessPaths(); | { if (this instanceof SetOperatorNode) { SetOperatorNode setOp = (SetOperatorNode)this; rightResultSet = rightResultSet.modifyAccessPaths( setOp.getRightOptPredicateList()); } else rightResultSet = rightResultSet.modifyAccessPaths(); } | public ResultSetNode modifyAccessPaths() throws StandardException { /* Beetle 4454 - union all with another union all would modify access * paths twice causing NullPointerException, make sure we don't * do this again, if we have already done it in modifyAccessPaths(outertables) */ if (!leftModifyAccessPathsDon... |
public static void dumpRS(ResultSet s) throws SQLException, UnsupportedEncodingException | public static void dumpRS(ResultSet s) throws SQLException | public static void dumpRS(ResultSet s) throws SQLException, UnsupportedEncodingException { if (s == null) { System.out.println("<NULL>"); return; } ResultSetMetaData rsmd = s.getMetaData(); // Get the number of columns in the result set int numCols = rsmd.getColumnCount(); if (numCols <= 0) { System.out.... |
if (ex.getSQLState().equals("22005")) { if (s.getBytes(i) != null) row.append(s.getBytes(i).toString()); else row.append(s.getBytes(i)); } else throw ex; | if (ex.getSQLState().equals("22005")) row.append("Invalid Conversion Error\n"); else throw ex; | public static void dumpRS(ResultSet s) throws SQLException, UnsupportedEncodingException { if (s == null) { System.out.println("<NULL>"); return; } ResultSetMetaData rsmd = s.getMetaData(); // Get the number of columns in the result set int numCols = rsmd.getColumnCount(); if (numCols <= 0) { System.out.... |
public FormatableArrayHolder getColumnOrdering(OrderedColumnList oclist) { int numCols = (oclist == null) ? 0 : oclist.size(); if (numCols == 0) | public FormatableArrayHolder getColumnOrdering(ResultColumnList rclist) { IndexColumnOrder[] ordering; int numCols = (rclist == null) ? 0 : rclist.size(); int numRealCols = 0; for (int i=0; i<numCols; i++) | public FormatableArrayHolder getColumnOrdering(OrderedColumnList oclist) { int numCols = (oclist == null) ? 0 : oclist.size(); if (numCols == 0) { return new FormatableArrayHolder(new IndexColumnOrder[0]); } return new FormatableArrayHolder(oclist.getColumnOrdering()); } |
return new FormatableArrayHolder(new IndexColumnOrder[0]); | if (!(rclist.getResultColumn(i+1).isGeneratedForUnmatchedColumnInInsert())) numRealCols++; | public FormatableArrayHolder getColumnOrdering(OrderedColumnList oclist) { int numCols = (oclist == null) ? 0 : oclist.size(); if (numCols == 0) { return new FormatableArrayHolder(new IndexColumnOrder[0]); } return new FormatableArrayHolder(oclist.getColumnOrdering()); } |
return new FormatableArrayHolder(oclist.getColumnOrdering()); | ordering = new IndexColumnOrder[numRealCols]; for (int i=0, j=0; i<numCols; i++) { if (!(rclist.getResultColumn(i+1).isGeneratedForUnmatchedColumnInInsert())) { ordering[j] = new IndexColumnOrder(i); j++; } } return new FormatableArrayHolder(ordering); | public FormatableArrayHolder getColumnOrdering(OrderedColumnList oclist) { int numCols = (oclist == null) ? 0 : oclist.size(); if (numCols == 0) { return new FormatableArrayHolder(new IndexColumnOrder[0]); } return new FormatableArrayHolder(oclist.getColumnOrdering()); } |
public void treePrint(int depth) | public void treePrint() | public void treePrint(int depth) { if (SanityManager.DEBUG) { debugPrint(formatNodeString(nodeHeader(), depth)); debugPrint(formatNodeString(this.toString(), depth)); printSubNodes(depth); } } |
debugPrint(formatNodeString(nodeHeader(), depth)); debugPrint(formatNodeString(this.toString(), depth)); printSubNodes(depth); | debugPrint(nodeHeader()); debugPrint(formatNodeString(this.toString(), 0)); printSubNodes(0); debugFlush(); | public void treePrint(int depth) { if (SanityManager.DEBUG) { debugPrint(formatNodeString(nodeHeader(), depth)); debugPrint(formatNodeString(this.toString(), depth)); printSubNodes(depth); } } |
TransactionController tc, | Activation activation, | public TemporaryRowHolderImpl ( TransactionController tc, Properties properties, ResultDescription resultDescription ) { this(tc, properties, resultDescription, DEFAULT_OVERFLOWTHRESHOLD, false, false); } |
this(tc, properties, resultDescription, DEFAULT_OVERFLOWTHRESHOLD, false, false); | this(activation, properties, resultDescription, DEFAULT_OVERFLOWTHRESHOLD, false, false); | public TemporaryRowHolderImpl ( TransactionController tc, Properties properties, ResultDescription resultDescription ) { this(tc, properties, resultDescription, DEFAULT_OVERFLOWTHRESHOLD, false, false); } |
TransactionController tc = activation.getTransactionController(); | public void insert(ExecRow inputRow) throws StandardException { if (SanityManager.DEBUG) { if(!isUniqueStream && !isVirtualMemHeap) SanityManager.ASSERT(state != STATE_DRAIN, "you cannot insert rows after starting to drain"); } if (! isVirtualMemHeap) state = STATE_INSERT; if(uniqueIndexCreated) { if(i... | |
TransactionController tc = activation.getTransactionController(); | public CursorResultSet getResultSet() { state = STATE_DRAIN; if(isUniqueStream) { return new TemporaryRowHolderResultSet(tc, rowArray, resultDescription, isVirtualMemHeap, true, positionIndexConglomId, this); } else { return new TemporaryRowHolderResultSet(tc, rowArray, resultDesc... | |
public SQLLongint(long val) | public SQLLongint() | public SQLLongint(long val) { value = val; } |
value = val; | isnull = true; | public SQLLongint(long val) { value = val; } |
if (predList != null) { for (int i = predList.size() - 1; i >= 0; i--) { if (pushOptPredicate(predList.getOptPredicate(i))) predList.removeOptPredicate(i); } } | public CostEstimate optimizeIt(Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException { /* ** RESOLVE: Most types of Optimizables only implement estimateCost(), ** and leave it up to optimizeIt() in FromTable to figure ou... | |
(PredicateList) null, | getLeftOptPredicateList(), | public CostEstimate optimizeIt(Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException { /* ** RESOLVE: Most types of Optimizables only implement estimateCost(), ** and leave it up to optimizeIt() in FromTable to figure ou... |
(PredicateList) null, | getRightOptPredicateList(), | public CostEstimate optimizeIt(Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException { /* ** RESOLVE: Most types of Optimizables only implement estimateCost(), ** and leave it up to optimizeIt() in FromTable to figure ou... |
public ColumnInfo(String colname, int coltype, boolean numeric) | public ColumnInfo(String colname, int coltype, String def) | public ColumnInfo(String colname, int coltype, boolean numeric) { this(colname, coltype); this.combovals=null; this.numeric=numeric; this.tooltip=null; this.allignement=SWT.LEFT; this.readonly=false; this.hide_negative=false; if (numeric) { valueType=Value.VALUE_TYPE_INTEGER; } ... |
this(colname, coltype); this.combovals=null; this.numeric=numeric; this.tooltip=null; this.allignement=SWT.LEFT; this.readonly=false; this.hide_negative=false; if (numeric) { valueType=Value.VALUE_TYPE_INTEGER; } else { valueType=Value.VALUE_TYPE_STRING; } | this(colname, coltype); | public ColumnInfo(String colname, int coltype, boolean numeric) { this(colname, coltype); this.combovals=null; this.numeric=numeric; this.tooltip=null; this.allignement=SWT.LEFT; this.readonly=false; this.hide_negative=false; if (numeric) { valueType=Value.VALUE_TYPE_INTEGER; } ... |
if (!active) throw newSQLException(SQLState.ALREADY_CLOSED, "Statement"); | throw newSQLException(SQLState.ALREADY_CLOSED, "Statement"); } | final void checkStatus() throws SQLException { if (!active) throw newSQLException(SQLState.ALREADY_CLOSED, "Statement"); } |
public void setValue(boolean theValue) throws StandardException; | public void setValue(Object theValue) throws StandardException; | public void setValue(boolean theValue) throws StandardException; |
ReaderToUTF8Stream(LimitReader reader) | ReaderToUTF8Stream(LimitReader reader,int length,int numCharsToTruncate) | ReaderToUTF8Stream(LimitReader reader) { this.reader = reader; buffer = new byte[BUFSIZE]; blen = -1; } |
this.charsToTruncate = numCharsToTruncate; this.colWidth = length; | ReaderToUTF8Stream(LimitReader reader) { this.reader = reader; buffer = new byte[BUFSIZE]; blen = -1; } | |
case JDBC40Translation.SQLXML: return TypeId.SQLXML_NAME; | public static String typeName(int jdbcType) { switch (jdbcType) { case Types.BIT : return TypeId.BIT_NAME; case JDBC30Translation.SQL_TYPES_BOOLEAN : return TypeId.BOOLEAN_NAME; case Types.TINYINT : return TypeId.TINYINT_NAME; case Types.SMALLINT : return TypeId.SMALLINT_NAME; case Types.INTEGER : ... | |
public static SQLException notImplemented(String feature) { | public static SQLException notImplemented() { | public static SQLException notImplemented(String feature) { return newEmbedSQLException(SQLState.NOT_IMPLEMENTED, new Object[] {feature}, StandardException.getSeverityFromIdentifier(SQLState.NOT_IMPLEMENTED)); } |
return newEmbedSQLException(SQLState.NOT_IMPLEMENTED, new Object[] {feature}, StandardException.getSeverityFromIdentifier(SQLState.NOT_IMPLEMENTED)); | return notImplemented( MessageService.getTextMessage(MessageId.CONN_NO_DETAILS) ); | public static SQLException notImplemented(String feature) { return newEmbedSQLException(SQLState.NOT_IMPLEMENTED, new Object[] {feature}, StandardException.getSeverityFromIdentifier(SQLState.NOT_IMPLEMENTED)); } |
public static SQLWarning newWarning(String messageId, Object a1) { | public static SQLWarning newWarning(String messageId) { | public static SQLWarning newWarning(String messageId, Object a1) { Object[] oa = new Object[] {a1}; return newWarningCommon( messageId, oa ); } |
Object[] oa = new Object[] {a1}; | return newWarningCommon( messageId, (Object[]) null ); | public static SQLWarning newWarning(String messageId, Object a1) { Object[] oa = new Object[] {a1}; return newWarningCommon( messageId, oa ); } |
return newWarningCommon( messageId, oa ); | public static SQLWarning newWarning(String messageId, Object a1) { Object[] oa = new Object[] {a1}; return newWarningCommon( messageId, oa ); } | |
boolean isAscending(Integer keyColumnPosition); | public boolean[] isAscending(); | boolean isAscending(Integer keyColumnPosition); |
public void setValue(long l) { if (value==null || value.getType()!=VALUE_TYPE_INTEGER) value = new ValueInteger(l); else value.setInteger(l); setNull(false); } | public void setValue(BigDecimal num) { if (value==null || value.getType()!=VALUE_TYPE_BIGNUMBER) value = new ValueBigNumber(num); else value.setBigNumber(num); setNull(false); } | public void setValue(long l) { if (value==null || value.getType()!=VALUE_TYPE_INTEGER) value = new ValueInteger(l); else value.setInteger(l); setNull(false); } |
public void close() | public void close() throws IOException | public void close() { synchronized (lock) { closeIn(); parent = null; noMoreReads = true; } } |
private void closeIn() { | private void closeIn() throws IOException { | private void closeIn() { if (in != null) { try { in.close(); } catch (IOException ioe) { } finally { in = null; } } } |
} catch (IOException ioe) { | } } catch (StandardException e) { e.printStackTrace(); throw new IOException(e.getMessage()); | private void closeIn() { if (in != null) { try { in.close(); } catch (IOException ioe) { } finally { in = null; } } } |
private IOException utfFormatException(String s) { | private IOException utfFormatException(String s) throws IOException { | private IOException utfFormatException(String s) { noMoreReads = true; closeIn(); return new UTFDataFormatException(s); } |
classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + "DataSource"; | return getSimpleDataSource(attrs); | public static javax.sql.DataSource getDataSource(Properties attrs) { String classname; if(HAVE_DRIVER_CLASS) classname = getDataSourcePrefix() + REGULAR_DATASOURCE_STRING + "DataSource"; else classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + "DataSource"; return (javax.sql.DataSource) getDataSou... |
return (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs); | public static javax.sql.DataSource getDataSource(Properties attrs) { String classname; if(HAVE_DRIVER_CLASS) classname = getDataSourcePrefix() + REGULAR_DATASOURCE_STRING + "DataSource"; else classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + "DataSource"; return (javax.sql.DataSource) getDataSou... | |
writer.clearBuffer(); | writer.clearDSSesBackToMark(writerMark); | private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa... |
writer.clearBuffer(); | private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa... | |
writer.clearDSSesBackToMark(writerMark); | private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa... | |
System.out.println("agent" + agent); | if ( SanityManager.DEBUG ) System.out.println("agentError in " + agent); | protected static DRDAProtocolException newAgentError(DRDAConnThread agent, int svrcod, String rdbnam, String srvdgn) { System.out.println("agent" + agent); Object[] oa = {new Integer(svrcod), rdbnam, srvdgn}; return new DRDAProtocolException(DRDA_AgentError, agent, NO_CODPNT_ARG, NO_ASSO... |
int errCdArg) | int errCdArg, Object []args) | DRDAProtocolException(String msgid, DRDAConnThread agent, int cpArg, int errCdArg) { this(msgid,agent, cpArg, errCdArg, (Object []) null); } |
this(msgid,agent, cpArg, errCdArg, (Object []) null); | boolean agentError = false; exceptionInfo = (DRDAProtocolExceptionInfo) errorInfoTable.get(msgid); if (agent != null) { this.correlationID = agent.getCorrelationID(); this.crrtkn = agent.getCrrtkn(); } this.codpntArg= cpArg; this.errorCodePoint = exceptionInfo.errorCodePoint; this.errcd = errCdArg; this.messageid = ... | DRDAProtocolException(String msgid, DRDAConnThread agent, int cpArg, int errCdArg) { this(msgid,agent, cpArg, errCdArg, (Object []) null); } |
protected int getQryclsimp() | protected void getQryclsimp(int value) | protected int getQryclsimp() { return currentDrdaRs.qryclsimp; } |
return currentDrdaRs.qryclsimp; | currentDrdaRs.qryclsimp = value; | protected int getQryclsimp() { return currentDrdaRs.qryclsimp; } |
protected void endDss() { | protected void endDss(byte chainByte) { | protected void endDss() { endDss(true); } |
bytes[dssLengthLocation + 3] &= 0x0F; bytes[dssLengthLocation + 3] |= chainByte; previousChainByte = chainByte; | protected void endDss() { endDss(true); } | |
DDMWriter (CcsidManager ccsidManager, DRDAConnThread agent, DssTrace dssTrace) | DDMWriter (int minSize, CcsidManager ccsidManager, DRDAConnThread agent, DssTrace dssTrace) | DDMWriter (CcsidManager ccsidManager, DRDAConnThread agent, DssTrace dssTrace) { this.bytes = new byte[DEFAULT_BUFFER_SIZE]; this.ccsidManager = ccsidManager; this.agent = agent; this.prevHdrLocation = -1; this.previousCorrId = DssConstants.CORRELATION_ID_UNKNOWN; this.previousChainByte = DssConstants.DSS_NOCHAI... |
this.bytes = new byte[DEFAULT_BUFFER_SIZE]; | this.bytes = new byte[minSize]; | DDMWriter (CcsidManager ccsidManager, DRDAConnThread agent, DssTrace dssTrace) { this.bytes = new byte[DEFAULT_BUFFER_SIZE]; this.ccsidManager = ccsidManager; this.agent = agent; this.prevHdrLocation = -1; this.previousCorrId = DssConstants.CORRELATION_ID_UNKNOWN; this.previousChainByte = DssConstants.DSS_NOCHAI... |
protected void initialize(DRDAConnThread agent, DssTrace dssTrace) { this.agent = agent; if (agent != null) { ccsidManager = agent.ccsidManager; inputStream = agent.getInputStream(); } topDdmCollectionStack = EMPTY_STACK; svrcod = 0; pos = 0; count = 0; ddmScalarLen = 0; dssLength = 0; prevCorrelationID = DssConstants.... | protected void initialize(InputStream inputStream) { this.inputStream = inputStream; initialize(null, null); | protected void initialize(DRDAConnThread agent, DssTrace dssTrace) { this.agent = agent; if (agent != null) { ccsidManager = agent.ccsidManager; inputStream = agent.getInputStream(); } topDdmCollectionStack = EMPTY_STACK; svrcod = 0; pos = 0; count = 0; ddmScalarLen = 0; dssLength = 0; prevCorrelat... |
protected byte[] readBytes () throws DRDAProtocolException | protected byte[] readBytes (int length) throws DRDAProtocolException | protected byte[] readBytes () throws DRDAProtocolException { return readBytes((int)ddmScalarLen); } |
return readBytes((int)ddmScalarLen); | byte[] b; if (length < dssLength) { ensureBLayerDataInBuffer (length, ADJUST_LENGTHS); b = new byte[length]; System.arraycopy(buffer,pos,b,0,length); pos +=length; } else b = getExtData(length,false); return b; | protected byte[] readBytes () throws DRDAProtocolException { return readBytes((int)ddmScalarLen); } |
protected String readString () throws DRDAProtocolException | protected String readString (int length) throws DRDAProtocolException | protected String readString () throws DRDAProtocolException { return readString((int)ddmScalarLen); } |
return readString((int)ddmScalarLen); | ensureBLayerDataInBuffer (length, ADJUST_LENGTHS); String result = ccsidManager.convertToUCS2 (buffer, pos, length); pos += length; return result; | protected String readString () throws DRDAProtocolException { return readString((int)ddmScalarLen); } |
protected void skipBytes () throws DRDAProtocolException | protected void skipBytes (int length) throws DRDAProtocolException | protected void skipBytes () throws DRDAProtocolException { skipBytes((int)ddmScalarLen); } |
skipBytes((int)ddmScalarLen); | ensureBLayerDataInBuffer (length, ADJUST_LENGTHS); pos += length; | protected void skipBytes () throws DRDAProtocolException { skipBytes((int)ddmScalarLen); } |
return (byte) (buffer[pos++] & 0xff); | return buffer[pos++]; | protected byte readByte () throws DRDAProtocolException { ensureBLayerDataInBuffer (1, ADJUST_LENGTHS); return (byte) (buffer[pos++] & 0xff); } |
ps = prepareStatementJDBC3(sqlStmt, scrollType, concurType, withHoldCursor); | Connection conn = database.getConnection(); if (conn instanceof BrokeredConnection) ps = conn.prepareStatement(sqlStmt, scrollType, concurType); else ps = prepareStatementJDBC3(sqlStmt, scrollType, concurType, withHoldCursor); | protected PreparedStatement prepare(String sqlStmt) throws SQLException { // save current prepare iso level int saveIsolationLevel = -1; boolean isolationSet = false; if (pkgnamcsn !=null) { saveIsolationLevel = database.getPrepareIsolation(); database.setPrepareIsolation(isolationLevel); isolationSet = t... |
ensureLength (4); | protected void startDdm (int codePoint) { // save the location of the beginning of the collection so // that we can come back and fill in the length bytes markStack[top++] = offset; offset += 2; // move past the length bytes before writing the code point bytes[offset] = (byte) ((codePoint >>> 8) & 0xff); bytes[o... | |
protected String readStringData(int length) | protected String readStringData() | protected String readStringData(int length) throws DRDAProtocolException { return readString(length, DB2jServerImpl.DEFAULT_ENCODING); } |
return readString(length, DB2jServerImpl.DEFAULT_ENCODING); | return readString((int)ddmScalarLen, DB2jServerImpl.DEFAULT_ENCODING); | protected String readStringData(int length) throws DRDAProtocolException { return readString(length, DB2jServerImpl.DEFAULT_ENCODING); } |
try { synchronized (runQueue) { | synchronized (runQueue) { try { | protected Session getNextSession(Session currentSession) { Session retval = null; if (shutdown == true) return retval; try { synchronized (runQueue) { // nobody waiting - go on with current session if (runQueue.size() == 0) { // no current session - wait for some work if (currentSession == nu... |
}catch (InterruptedException e) {} | } | protected Session getNextSession(Session currentSession) { Session retval = null; if (shutdown == true) return retval; try { synchronized (runQueue) { // nobody waiting - go on with current session if (runQueue.size() == 0) { // no current session - wait for some work if (currentSession == nu... |
protected void writeBytes (byte[] buf, int start, int length) | protected void writeBytes (byte[] buf, int length) | protected void writeBytes (byte[] buf, int start, int length) { if (SanityManager.DEBUG) { if (buf == null && length > 0) SanityManager.THROWASSERT("Buf is null"); if (length + start - 1 > buf.length) SanityManager.THROWASSERT("Not enough bytes in buffer"); } ensureLength (length); System.arraycop... |
if (SanityManager.DEBUG) { if (buf == null && length > 0) SanityManager.THROWASSERT("Buf is null"); if (length + start - 1 > buf.length) SanityManager.THROWASSERT("Not enough bytes in buffer"); } ensureLength (length); System.arraycopy(buf,start,bytes,offset,length); offset += length; | writeBytes(buf, 0,length); | protected void writeBytes (byte[] buf, int start, int length) { if (SanityManager.DEBUG) { if (buf == null && length > 0) SanityManager.THROWASSERT("Buf is null"); if (length + start - 1 > buf.length) SanityManager.THROWASSERT("Not enough bytes in buffer"); } ensureLength (length); System.arraycop... |
protected void writeScalarBytes (int codePoint, byte[] buf) | protected void writeScalarBytes (int codePoint, byte[] buf, int length) | protected void writeScalarBytes (int codePoint, byte[] buf) { int bufLength = buf.length; ensureLength (bufLength + 4); bytes[offset] = (byte) (((bufLength+4) >>> 8) & 0xff); bytes[offset + 1] = (byte) ((bufLength+4) & 0xff); bytes[offset + 2] = (byte) ((codePoint >>> 8) & 0xff); bytes[offset + 3] = (byte) (code... |
int bufLength = buf.length; ensureLength (bufLength + 4); bytes[offset] = (byte) (((bufLength+4) >>> 8) & 0xff); bytes[offset + 1] = (byte) ((bufLength+4) & 0xff); | if (SanityManager.DEBUG) { if (buf == null && length > 0) SanityManager.THROWASSERT("Buf is null"); if (length > buf.length) SanityManager.THROWASSERT("Not enough bytes in buffer"); } ensureLength (length + 4); bytes[offset] = (byte) (((length+4) >>> 8) & 0xff); bytes[offset + 1] = (byte) ((length+4) & 0xff); | protected void writeScalarBytes (int codePoint, byte[] buf) { int bufLength = buf.length; ensureLength (bufLength + 4); bytes[offset] = (byte) (((bufLength+4) >>> 8) & 0xff); bytes[offset + 1] = (byte) ((bufLength+4) & 0xff); bytes[offset + 2] = (byte) ((codePoint >>> 8) & 0xff); bytes[offset + 3] = (byte) (code... |
System.arraycopy(buf,0,bytes,offset + 4,bufLength); offset += bufLength + 4; | System.arraycopy(buf,0,bytes,offset + 4, length); offset += length + 4; | protected void writeScalarBytes (int codePoint, byte[] buf) { int bufLength = buf.length; ensureLength (bufLength + 4); bytes[offset] = (byte) (((bufLength+4) >>> 8) & 0xff); bytes[offset + 1] = (byte) ((bufLength+4) & 0xff); bytes[offset + 2] = (byte) ((codePoint >>> 8) & 0xff); bytes[offset + 3] = (byte) (code... |
protected void writeLDString(String s, int index) throws DRDAProtocolException | protected void writeLDString(String s) throws DRDAProtocolException | protected void writeLDString(String s, int index) throws DRDAProtocolException { try { byte [] byteval = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING); int origLen = byteval.length; boolean multiByteTrunc = false; int writeLen = java.lang.Math.min(FdocaConstants.LONGVARCHAR_MAX_LEN, origL... |
try { byte [] byteval = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING); int origLen = byteval.length; boolean multiByteTrunc = false; int writeLen = java.lang.Math.min(FdocaConstants.LONGVARCHAR_MAX_LEN, origLen); if (SanityManager.DEBUG) { if (!(NetworkServerControlImpl.DEFAULT_ENCODING.equals("UTF8"))) Sanit... | writeLDString(s,0); | protected void writeLDString(String s, int index) throws DRDAProtocolException { try { byte [] byteval = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING); int origLen = byteval.length; boolean multiByteTrunc = false; int writeLen = java.lang.Math.min(FdocaConstants.LONGVARCHAR_MAX_LEN, origL... |
protected void writeLDBytes(byte[] buf, int index) | protected void writeLDBytes(byte[] buf) | protected void writeLDBytes(byte[] buf, int index) { int length = buf.length; int writeLen = buf.length; writeShort(writeLen); writeBytes(buf,0,writeLen); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.