input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
final private void add group row add a new row to the group result expression value new row current row new expression value expressions size for int i 0 i new row length i expression expr expressions get i int type expr get type if type expression group begin type expression group by new row i new expression value type add row new row | add a new row to the memory result |
final private void set next file pos if file pos 0 return end of rows if store store norow file pos table get first page can point at the end of file else if file pos 0x4000000000000000 l file pos if file pos 0x3 fffffffffffffffl insert store pages size file pos 1 no row else file pos store get next page pos | a negative file pos means no more rows |
private boolean create join scroll index throws exception if type cross join return false if type inner join todo currently only inner join are implemented return false if condition instanceof expression arithmetic expression arithmetic cond expression arithmetic condition expressions left ex new expressions expressions right ex new expressions int operation create join scroll index cond left ex right ex 0 if operation 0 scroll new join scroll index type left right left ex right ex operation return true return false | create a scroll join that based on a index |
private sqlexception create syntax error sqltoken token string add message code string message get error string token add message code null return small sqlexception create language custom message message | create a syntax error message using a custom message |
public boolean equals object expr if super equals expr return false if expr instanceof expression value return false object v expression value expr value if v value return true if value null return false return value equals v | is used in group result |
private string get identifier sqltoken token throws sqlexception string name token get name sql check valid identifier name token return name | returns a valid identifier from this token |
private string next identifier throws sqlexception return get identifier next token missing identifier | returns a valid identifier from the next token from token stack |
private void add int val2 long temp 0 int v1 value length for int v2 val2 length v2 0 temp value v1 0x ffffffffl val2 v2 0x ffffffffl temp 32 value v1 int temp boolean uebertrag temp 32 0 while v1 0 uebertrag uebertrag value v1 value v1 1 0 resize if needed if uebertrag resize value 1 | add the value to the current mutable numeric object and change it |
private void resize value int high bits int val new int value length 1 val 0 high bits system arraycopy value 0 val 1 value length value val | resize the value mantissa with a carryover |
private void sub int val2 long temp 0 int v1 value length for int v2 val2 length v2 0 temp value v1 0x ffffffffl val2 v2 0x ffffffffl temp 32 value v1 int temp boolean uebertrag temp 32 0 while v1 0 uebertrag uebertrag value v1 value v1 1 1 if uebertrag signum signum int last value length 1 for int i 0 i last i value i i last value i value i | subtract the value to the current mutable numeric object and change it |
private sqltoken last token if token idx tokens size return null return sqltoken tokens get token idx 1 | return the last token that the method next token has return |
private expression value get param int idx throws sqlexception if idx 1 idx params size throw small sqlexception create language param idx out range new object new integer idx new integer params size return expression value params get idx 1 | get a prepared statement parameter |
private expression get int col idx throws exception if current row null throw small sqlexception create language row nocurrent return current row col idx | returns the current expression for the column idx |
final private void set previous offset long tree list enum list enum int previous offset list enum offset stack list enum stack 2 2 list enum stack 3 0 pointer size if list enum stack 0 offset previous offset return offset list enum offset stack list enum stack 1 pointer size int pointer get pointer if pointer previous offset offset previous offset return offset 1 | is used from get previous |
final private void loop to end of node long tree list enum list enum int next entry int next offset1 next offset2 next offset1 offset offset 2 if list enum stack 3 offset pointer size do next offset2 next offset1 next offset1 offset next entry get unsigned short if list enum stack 3 offset pointer size while next entry 0 offset next offset2 | loop to the last entry in this node |
final private void insert node last level int octet throws sqlexception int old offset offset if data length size 2 resize system arraycopy data offset data offset 2 size offset size 2 write short octet correct all offset before this new node that point behind the new node correct pointers 0 old offset 2 0 | insert the octet of the last level 4 level on the current offset |
final private void correct pointers int start offset int old offset int diff int level offset start offset boolean first node true while offset size if offset old offset int abs diff math abs diff if abs diff 2 return offset abs diff first node false continue int value get unsigned short if value 0 first node int pointer get pointer if pointer old offset offset pointer size write pointer pointer diff if diff 0 pointer diff if level 2 start offset offset correct pointers pointer old offset diff level 1 offset start offset first node false else return | correct all pointers that point behind a new entry |
final private int get pointer int value 0 for int i 0 i pointer size i value 8 value data offset 0x ff return value | read a pointer to another node in de index |
final private void write pointer int value for int i pointer size 1 i 0 i data offset byte value i 8 | write a pointer to another node in the tree list |
final private int get unsigned short return data offset 0x ff 8 data offset 0x ff | read a short value from the index |
final private void write short int value data offset byte value 8 data offset byte value | save a short value in the index |
private object get unique key string name return name to upper case locale us use the same locale for all | we save table and vies in a file with the same name |
public boolean equals object expr if super equals expr return false if expr instanceof expression name return false if expression name expr from entry from entry return false return true | is used in group result |
public boolean equals object expr if expr instanceof expression return false if expression expr type type expression p1 expression expr params expression p2 params if p1 null p2 null if p1 null return false for int i 0 i p1 length i if p2 i equals p1 i return false string name1 expression expr name string name2 name if name1 name2 return true if name1 null return false if name1 equals ignore case name2 return true return false | is used in group result |
private expressions expression parenthesis list command cmd throws sqlexception expressions list new expressions sqltoken token next token if token null token value sqltokenizer parenthesis r empty list like functions without parameters return list previous token while true list add expression cmd 0 sqltoken token next token missing comma parenthesis switch token value case sqltokenizer parenthesis r return list case sqltokenizer comma continue default throw new error | read a expression list in parenthesis like of values or functions |
private expressions expression token list command cmd int list type throws sqlexception expressions list new expressions while true expression expr expression cmd 0 list add expr sqltoken token next token if list type sqltokenizer order token null switch token value case sqltokenizer desc expr set alias sqltokenizer desc str no break case sqltokenizer asc token next token if token null previous token return list switch token value case sqltokenizer comma continue default if is keyword token previous token return list throw create syntax error token missing token list | read a list of expressions |
private join join command cmd data sources tables row source left int type throws sqlexception row source right row source cmd tables 0 sqltoken token next token while true if token null throw create syntax error token language stxadd join invalid switch token value case sqltokenizer on if type join right join return new join join left join right left expression cmd 0 return new join type left right expression cmd 0 default if right has alias right set alias token get name sql token next token continue throw create syntax error token missing on | read a join in a from clause |
private void test not insert row throws sqlexception if is insert row throw small sqlexception create language rset on insert row | test if it on the insert row |
private void clear row buffer if values null for int i values length 1 i 0 i values i clear | clear the update row or insert row buffer |
final private void resize int new capacity entry new table new entry new capacity transfer new table table new table threshold int new capacity 0 75f | rehashes the contents of this map into a new array with a |
public boolean equals object expr if super equals expr return false if expr instanceof expression function return false return expression function expr get function get function | is used in group result |
public void test view width group by throws exception init connection con all tests get connection statement st con create statement try result set rs st execute create view qry table1 as select name name as name2 count as count from table1 group by name rs st execute query select from qry table1 assert equals name rs get meta data get column label 1 assert equals name2 rs get meta data get column label 2 assert equals count rs get meta data get column label 3 finally st execute drop view qry table1 | a problem can be the metadata from a view |
private boolean string2boolean string val try return double parse double val 0 catch number format exception e ignore it if it not a number return true equals ignore case val yes equals ignore case val t equals ignore case val | identical to the implementation from utils |
public void test bogus locale throws sqlexception locale orig locale locale get default locale set default locale italy connection conn all tests create connection locale xxx null statement stat conn create statement try recreate test tab stat stat execute create table table name id test int fail catch sqlexception e assert message e la tabella vista table name gi esistente finally locale set default orig locale conn close | in case of wrong locale language picks up the one corresponding to the |
private void assert message sqlexception e string expected text assert message e new string expected text | check if the passed text is present inside the exception message and |
private void assert message sqlexception e string expected texts string message e get message boolean found true for int i 0 found i expected texts length i found found message index of expected texts i 0 if found system err println error wrong message message fail | check if the passed texts are present inside the exception message and |
public void test duplicated create table throws exception connection con all tests get connection try drop table con duplicated table statement st con create statement st execute create table duplicated table col int primary key int table file count count files duplicated table try st execute create table duplicated table col int primary key fail sqlexception duplicated table should be throw catch sqlexception e assert sqlexception 01000 0 e assert equals additional files created table file count count files duplicated table finally drop table con duplicated table | the fail of creating table should not produce any files |
final private expression get value int column index throws sqlexception if values null expression value value values meta data get column idx column index if value is empty is insert row return value return meta data get column expression column index | get the expression of a column |
public void check client trusted x509 certificate certs string auth type | returns code true code if a client certificate is trusted |
public password authentication get password authentication password authentication pa null pa password authentication url table get get requesting scheme to lower case get requesting url to string to lower case return pa | returns the password authentication |
public void check server trusted x509 certificate certs string auth type | returns code true code if a server certificate is trusted |
public boolean verify string hostname sslsession session system out println session to string system out println wsman utils get base64 string session get id return true | returns code true code if the host name is trusted for the sslsession |
public string get code string code unknown if is fault element body elt wsman utils find child document get document element wsman utils soap namespace body element fault elt wsman utils find child body elt wsman utils soap namespace fault element code elt wsman utils find child fault elt wsman utils soap namespace code element value elt wsman utils find child code elt wsman utils soap namespace value code value elt get text content else if get cause null code get cause get class get superclass to string return code | get the fault code see ws management spec |
public private key get private key string alias key key null try key store get key alias password to char array catch java security key store exception e catch java security no such algorithm exception e catch java security unrecoverable key exception e return private key key | gets a private key from the key manager |
public string get reason string reason get message if is fault element body elt wsman utils find child document get document element wsman utils soap namespace body element fault elt wsman utils find child body elt wsman utils soap namespace fault element code elt wsman utils find child fault elt wsman utils soap namespace reason element text elt wsman utils find child code elt wsman utils soap namespace text reason text elt get text content return reason | get the reason the fault occured |
public string get detail string detail if is fault element body elt wsman utils find child document get document element wsman utils soap namespace body element fault elt wsman utils find child body elt wsman utils soap namespace fault element detail elt wsman utils find child fault elt wsman utils soap namespace detial if detail elt null element fault detail elt wsman utils find child detail elt wsman utils wsman namespace fault detial if fault detail elt null detail fault detail elt get text content return detail | get detailed information about the fault |
public boolean is fault return connection null document null | does the exception represent a ws management fault returned by a service |
public managed reference to reference string key props managed reference ref connection new reference get resource uri for int i 0 i key props length i object value get property key props i if value instanceof managed reference ref add selector key props i managed reference value else if value instanceof string ref add selector key props i value to string return ref | builds a managed reference from the instance using specified key properties |
public void enable pretty formatting boolean enabled if enabled transformer set output property output keys indent yes transformer set output property javax xml transform output keys else transformer set output property output keys indent no | enable pretty formatting when converting xml to a string |
protected wsman utils get xml loader wsman utils loader wsman utils properties get xmlloader if loader null try loader new wsman utils loader enable pretty formatting true properties put xmlloader loader catch exception exception throw new wsman runtime exception exception return loader | get the xml loader used to load xml documents |
public string get resource uri return document get document element get namespace uri | get the name of the resource |
public string get simple name return document get document element get local name | get the name of the resource without a namespace qualifier |
public void remove property string name node node document get document element get first child while node null if node get node type node element node node get local name equals name node get parent node remove child node node node get next sibling | removes a property from the instance |
public object get property string name array list list new array list object result null node node document get document element get first child while node null if node get node type node element node if node get local name equals name list add get object element node node node get next sibling if list size 1 result list get 0 else if list size 1 result list to array return result | get the value of a property |
public string get address return string properties get address | get the transport address used by the connection |
public void set resource uri string resource uri resource uri wsman utils get full resource uri resource uri element ref elt wsman utils find child document get document element wsman utils addressing namespace reference parameters element res elt wsman utils find child ref elt wsman utils wsman namespace resource uri res elt set text content resource uri clear selectors | set the name of the resource or instance to access |
public void set property string name string value delete all elemets with the name remove property name if value null add property name value | sets the value of a string property |
public void set address string address properties put address address properties remove authorization | set the transport address used by the connection |
public document create document string class name string namespace uri document document builder new document element elt document create element ns class name namespace uri elt set prefix p document append child elt return document | create a xml document for a given class and namespace uri |
public void set property string name managed reference value remove property name if value null add property name value | set the value of a reference property |
public void set username string username properties put username username properties remove authorization | set the username which is used when authenticating the connection |
public string get resource uri element ref elt wsman utils find child document get document element wsman utils addressing namespace reference parameters element res elt wsman utils find child ref elt wsman utils wsman namespace resource uri return res elt get text content | get the name of the resource or instance to access |
public void set property string name managed instance value remove property name if value null add property name value | set the value of an embedded instance property |
public void add property string name string value element elt document create element ns document get document element get namespace uri name string p document get document element get prefix if p null p length 0 elt set prefix p elt set text content value document get document element append child elt | add a property to the instance |
public document load document string name throws wsman exception input stream stream intel management wsman resources resource loader class get resource as stream name return load document stream | load a xml document from a resource loader |
public string get username return string properties get username | get the username which is used to authenticate the connection |
public void add selector string name string value element ref elt wsman utils find child document get document element wsman utils addressing namespace reference parameters element res elt wsman utils find child ref elt wsman utils wsman namespace resource uri element selectors elt wsman utils find child ref elt wsman utils wsman namespace selector set element elt document create element ns selectors elt get namespace uri selector elt set prefix res elt get prefix elt set attribute name name elt set text content value to string selectors elt append child elt | add a selector to the reference |
public void add property string name managed instance value element elt document create element ns document get document element get namespace uri name string p document get document element get prefix if p null p length 0 elt set prefix p node node document import node value document get document element true elt append child node document get document element append child elt | add an embedded instance property |
public void set authentication scheme string scheme properties put auth scheme scheme to lower case | set the authentication scheme the connection should expect |
public string get text return document get document element get text content | get the text value of the instance ex cim date time instance |
public document load document input stream stream throws wsman exception try return builder parse stream catch exception exception throw new wsman exception exception | load a xml document from an input stream |
public void set proxy proxy proxy properties put http proxy proxy | set the http proxy for requests |
public void set text string text document get document element set text content text | set the text value of the instance |
public managed instance get throws wsman exception document req doc connection get xml loader load document get xmldoc xml wsman utils set epr document req doc document res doc connection send request req doc element body elt wsman utils find child res doc get document element wsman utils soap namespace body element item elt wsman utils find child body elt document item doc wsman utils load document item elt return new managed instance connection item doc | get the representation of the instance |
public string get authentication scheme object scheme properties get auth scheme if scheme null scheme digest return scheme to string | get the authentication scheme the connection is using |
public void set trust manager x509 trust manager manager properties put x509 trust manager manager | set the trust manager to be used for verifiying certificates |
public void set key manager x509 key manager manager properties put x509 key manager manager | set the key manager which is used for exchanging rsa material |
public string format document document doc domsource source new domsource doc string writer sw new string writer stream result result new stream result sw try transformer transform source result catch exception exception throw new runtime exception exception return sw to string | get a xml document as a formatted string |
public void set hostname verifier hostname verifier verifier properties put hostname verifier verifier | set the host name verifier |
public managed instance new instance string resource uri return new managed instance this get xml loader create document resource uri | create a new instance that represents a managed resource |
public managed reference new reference string resource uri managed reference ref null try ref new managed reference this get xml loader load document epr xmldoc xml ref set resource uri resource uri catch exception exception throw new runtime exception exception return ref | create a reference to a managed resource |
public managed instance create method input string method name document input document get implementation create document get resource uri method name input null input get document element set prefix p return new managed instance connection input | create an input parameter object for a resource specific method |
public void unsubscribe throws wsman exception document input connection get xml loader load document unsubscribe xmldoc xml wsman utils set epr document input connection send request input | allows a client to cancel a subscription |
public managed instance invoke string method name throws wsman exception return invoke this create method input method name | invokes a method on a resource |
public void set log entry graph log entry log entry this log entry log entry | method set log entry |
public graph tree get entry return entry | method get entry |
public void set entry graph tree entry this entry entry set label get graph tree label entry | method set entry |
public boolean is leaf return subtree size 0 | method is leaf |
public void update zoom string zoom string j combo box1 get selected item to string if zoom string char at zoom string length 1 zoom string zoom string substring 0 zoom string length 1 double zoom factor double parse double zoom string 100 0 scroll get vertical scroll bar set unit increment int 60 zoom factor scroll get vertical scroll bar set block increment int 60 zoom factor graph set zoom zoom factor | method update zoom |
public boolean is label return label null | method is label |
public int get number children return subtree size | method get number children |
public graph tree get child at int index if index 0 index subtree size return subtree get index else return null | method get child at |
public graph log entry get log entry return log entry | method get log entry |
public void set mesage pane jtext area text area message pane text area | method set mesage pane |
public void set zoom double d scene set zoom factor d scene validate | method set zoom |
public void set revision svnrevision rev this revision rev | method set revision |
public void set rows location location set changed paths this location location this changed paths changed paths if changed paths size 0 for object path changed paths boolean enabled location get branch equals file table row parse url path to string file table row parse url branch enable items enabled update cs revert cs break | method set rows |
public void set row location location object path this location location this changed paths new hash set changed paths add path enable items true update revert | method set row |
public void set messages list string messages message combo box set model new javax swing default combo box model messages to array if messages size 0 message combo box set selected index 0 | method set message |
public void set recurvive boolean b recursive check box set selected b | method set recurvive |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.