input
stringlengths 10
828
| output
stringlengths 5
107
|
---|---|
public case create case expression e statement mutable list body return new case e body | creates a new |
public catch create catch return new catch | creates a new |
public catch create catch parameter declaration e statement block body return new catch e body | creates a new |
public continue create continue return new continue | creates a new |
public goto create goto return new goto | creates a new |
public goto create goto identifier label return new goto label | creates a new |
public default create default return new default | creates a new |
public default create default statement mutable list body return new default body | creates a new |
public do create do return new do | creates a new |
public do create do expression guard return new do guard | creates a new |
public do create do expression guard statement body return new do guard body | creates a new |
public else create else return new else | creates a new |
public else create else statement body return new else body | creates a new |
public empty statement create empty statement return new empty statement | creates a new |
public finally create finally return new finally | creates a new |
public finally create finally statement block body return new finally body | creates a new |
public checked block create checked block return new checked block | creates a new |
public checked block create checked block statement block body return new checked block body | creates a new |
public unchecked block create unchecked block return new unchecked block | creates a new |
public unchecked block create unchecked block statement block body return new unchecked block body | creates a new |
public checked create checked return new checked | creates a new |
public unchecked create unchecked return new unchecked | creates a new |
public typeof create typeof return new typeof | creates a new |
public for create for return new for | creates a new |
public assert create assert return new assert | creates a new |
public assert create assert expression cond return new assert cond | creates a new |
public assert create assert expression cond expression msg return new assert cond msg | creates a new |
public if create if return new if | creates a new |
public if create if expression e statement then statement return new if e then statement | creates a new |
public if create if expression e then then branch return new if e then branch | creates a new |
public if create if expression e then then branch else else branch return new if e then branch else branch | creates a new |
public if create if expression e statement then statement statement else statement return new if e then statement else statement | creates a new |
public labeled statement create labeled statement return new labeled statement | creates a new |
public labeled statement create labeled statement identifier id return new labeled statement id | creates a new |
public labeled statement create labeled statement identifier id statement statement return new labeled statement id statement | creates a new |
public return create return return new return | creates a new |
public long get column1 return column1 | returns the column1 |
public long get column2 return column2 | returns the column2 |
public long get line1 return line1 | returns the line1 |
public long get line2 return line2 | returns the line2 |
public char get char1 return c1 | returns the c1 |
public char get char2 return c2 | returns the c2 |
public return create return expression expr return new return expr | creates a new |
public statement block create statement block return new statement block | creates a new |
public statement block create statement block statement mutable list block return new statement block block | creates a new |
public switch create switch return new switch | creates a new |
public switch create switch expression e return new switch e | creates a new |
public switch create switch expression e branch mutable list branches return new switch e branches | creates a new |
public locked block create locked block return new locked block | creates a new |
public locked block create locked block statement block body return new locked block body | creates a new |
public locked block create locked block expression e statement block body return new locked block e body | creates a new |
public using block create using block return new using block | creates a new |
public then create then return new then | creates a new |
public then create then statement body return new then body | creates a new |
public throw create throw return new throw | creates a new |
public throw create throw expression expr return new throw expr | creates a new |
public try create try return new try | creates a new |
public try create try statement block body return new try body | creates a new |
public try create try statement block body branch mutable list branches return new try body branches | creates a new |
public while create while return new while | creates a new |
public while create while expression guard return new while guard | creates a new |
public while create while expression guard statement body return new while guard body | creates a new |
public foreach create foreach return new foreach | creates a new |
public indexer declaration create indexer declaration return new indexer declaration | method create indexer declaration |
public event declaration create event declaration return new event declaration | method create event declaration |
public using alias create using alias return new using alias | method create using alias |
public modifier create params return new params | method create params |
public expression create out operator expression expr return new out operator expr | method create out operator |
public expression create ref operator expression expr return new ref operator expr | method create ref operator |
public get accessor create get accessor return new get accessor | method create get accessor |
public set accessor create set accessor return new set accessor | method create set accessor |
public add accessor create add accessor return new add accessor | method create add accessor |
public remove accessor create remove accessor return new remove accessor | method create remove accessor |
public attribute section create attribute section return new attribute section | method create attribute section |
public attribute target create assembly target return new assembly target | method create assembly target |
public attribute create attribute return new attribute | method create attribute |
public attribute argument create attribute argument expression expr return new attribute argument expr | method create attribute argument |
public attribute target create event target return new event target | method create event target |
public attribute target create field target return new field target | method create field target |
public attribute target create method target return new method target | method create method target |
public attribute target create module target return new module target | method create module target |
public attribute target create param target return new param target | method create param target |
public attribute target create property target return new property target | method create property target |
public attribute target create return target return new return target | method create return target |
public attribute target create type target return new type target | method create type target |
public property specification create property specification member name mname return new property specification mname | method create property specification |
public property specification create property specification return new property specification | method create property specification |
public event specification create event specification return new event specification | method create event specification |
public type declaration get parent class declaration program element e do e e get astparent if e instanceof class type e instanceof enum declaration e instanceof class declaration return type declaration e while e null return null | get the parent class declaration from a member reference |
private boolean is method referes getter setter method reference metref if metref get name length 3 return false string sub metref get name substring 0 3 if sub equals get sub equals set return true return false | check if the accessed method referens is a getter setter |
public boolean put cluster member member throws sqlexception string cluster name member get cluster name synchronized cache if cluster exists cluster name throw new cluster not found exception cluster name if cache lookup member get cluster name member get host name null db put member cache put member return true return false | add a member to the cache |
public boolean update cluster member member throws exception string cluster name member get cluster name synchronized cache if cluster exists cluster name throw new cluster not found exception cluster name remove cluster name member get host name put member return true | update a member of the cluster |
public boolean cluster create string name throws exception boolean status synchronized cache if status cache cluster create name db cluster create name return status | create a new empty cluster |
public boolean cluster delete string name throws exception boolean status synchronized cache if status cache cluster delete name db cluster delete name return status | delete a cluster first the member systems then the cluster itself |
public void close try db close catch exception ignore | free cache resources this call should be superfluous |
protected db get db return db get instance | get database connection utility methods |
private void db remove cluster member member throws exception int cluster id try db begin transaction cluster id get cluster id member get cluster name db execute delete from db member table where db clusterid cluster id and db host new string member get host name db commit transaction catch exception exception db rollback transaction throw exception finally db close | remove a cluster member from the cluster member table |
private string lookup id result set result set int id throws sqlexception result set first do if result set get int db clusterid id return result set get string db name while result set next return null | look up a cluster name by id number |
public cluster member lookup string cluster name string host name cluster member member list member list iterator iterator synchronized members if member list list members get cluster name null return null iterator member list iterator while iterator has next member cluster member iterator next if member get host name equals ignore case host name return member return null | do we have an entry for this cluster and host |
public boolean cluster create string name synchronized members if members contains key name members put name new array list return true return false | create a new empty cluster |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.