query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
we need this method here as it needed on environments page and we don't want to navigate away from environments page.
@com.thoughtworks.gauge.Step("Stop <numberOfJobs> jobs waiting for file to exist") public void stopJobsWaitingForFileToExist(int numberOfJobs) throws Exception { scenarioHelper.stopJobsThatAreWaitingForFileToExist(numberOfJobs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectProdEnv() {\n\n new Handler(getMainLooper()).postDelayed(new Runnable() {\n @Override\n public void run() {\n ((AppController) getApplication()).setAppEnvironment(AppEnvironment.PRODUCTION);\n editor = settings.edit();\n e...
[ "0.55847126", "0.54800594", "0.543828", "0.53341955", "0.5332028", "0.53251684", "0.5271533", "0.5267484", "0.52626455", "0.5260915", "0.5249284", "0.5221217", "0.52037424", "0.5199734", "0.5179206", "0.5164956", "0.5152985", "0.51488554", "0.5147856", "0.51055133", "0.510160...
0.0
-1
private static String host = "
public static void main(String[] args) throws Exception { // Request gr = getCocReq("APRQ", "c423e389-42f7-4e20-99bb-5bb99a24b71e"); // System.out.println("req:"+gr.getData()); // send(gr); // String name = "男2.png"; // String uuid = Integer.toHexString(name.hashCode()); // System.out.print(Integer.MAX_VALUE^1606); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getHost()\n {\n return host;\n }", "public String getHost() { return host; }", "default String getHost() {\n return \"localhost\";\n }", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", ...
[ "0.81227887", "0.7977997", "0.7892215", "0.7837709", "0.7708808", "0.76882577", "0.76882577", "0.7670197", "0.7574942", "0.7574942", "0.7565995", "0.7512691", "0.74926955", "0.74926955", "0.74926955", "0.74926955", "0.74926955", "0.74926955", "0.74745774", "0.7419625", "0.741...
0.0
-1
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException { try { PreparedStatement preparedStatement = connection .prepareStatement("insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)"); //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige()); preparedStatement.setString(1, anzeigeToAdd.getTitel()); preparedStatement.setString(2, anzeigeToAdd.getText()); preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis())); // preparedStatement.setString(5, anzeigeToAdd.getErsteller()); preparedStatement.setString(4, anzeigeToAdd.getErsteller()); preparedStatement.setString(5, anzeigeToAdd.getStatus()); System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis()) + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus()); preparedStatement.executeUpdate(); } catch (SQLException e) { throw new StoreException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long timestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long...
[ "0.8254757", "0.81529", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8151191", "0.8051218", "0.80268186", "0.79738474", "...
0.0
-1
add a point to the series
public void addPoint(double x, double y) { xList.add(x); yList.add(y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addData(DataPoint point)\n {\n data.add(point);\n }", "public void addPoint(final DataPoint point) {\n logger.debug(\"addPoint called\");\n\n checkDimension(point);\n\n _addPoint(point);\n }", "public void addPoint(double[] point);", "public void addPoint(Poin...
[ "0.75817496", "0.7175141", "0.7162419", "0.71308523", "0.6981343", "0.69645625", "0.6933173", "0.6897598", "0.6891237", "0.6836051", "0.6821912", "0.6814434", "0.6788951", "0.6775588", "0.67693263", "0.67070967", "0.6624919", "0.65847665", "0.65714437", "0.6560846", "0.654215...
0.65798986
18
Constructor which sets the default scanner.
public Parser(java_cup.runtime.Scanner s) {super(s);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "private ConsoleScanner() {}", "public Metad...
[ "0.7363979", "0.71984017", "0.7137678", "0.71248406", "0.70821637", "0.7008351", "0.70074767", "0.6923786", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.66874146", "0.66866326", "0.66866326", "0.6629352", "0.661497...
0.68472075
18
Constructor which sets the default scanner.
public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "private ConsoleScanner() {}", "public Metad...
[ "0.7363979", "0.71984017", "0.7137678", "0.71248406", "0.70821637", "0.7008351", "0.70074767", "0.6923786", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.68472075", "0.68472075", "0.68472075", "0.68472075", "0.68472...
0.5671886
84
Access to production table.
public short[][] production_table() {return _production_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] production_table() {\r\n return _production_table;\r\n }", "public short[][] production_table() {\r\n return _production_table;\r\n }", "short[][] productionTable();", "public String getTable()\n {\n return table;\n }", "private void refTable() {\n tr...
[ "0.6852954", "0.68437153", "0.57185024", "0.56455266", "0.5629762", "0.56148", "0.5607793", "0.55809295", "0.55792934", "0.55786985", "0.5489239", "0.5472974", "0.5466162", "0.5460536", "0.5399798", "0.53922945", "0.5387873", "0.5378163", "0.5370349", "0.53676707", "0.5353664...
0.6887656
37
Access to parseaction table.
public short[][] action_table() {return _action_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] action_table() {\r\n return _action_table;\r\n }", "public ActionList getActions();", "public int getAction() {\n\t\treturn action;\n\t}", "String[] getActions();", "public Action getAction() {\n\treturn action;\n }", "public int getAction()\n {\n return m_action;\n ...
[ "0.71799415", "0.6271413", "0.60241354", "0.6008953", "0.59867096", "0.5980041", "0.5955848", "0.5938487", "0.5920429", "0.5917709", "0.59064436", "0.590324", "0.59030133", "0.5900386", "0.5894549", "0.5894549", "0.5894549", "0.5894549", "0.5890299", "0.58894557", "0.5886304"...
0.7215594
37
Access to reduce_goto table.
public short[][] reduce_table() {return _reduce_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] reduce_table() {\r\n return _reduce_table;\r\n }", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_tab...
[ "0.5971808", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643",...
0.6235091
37
Action encapsulation object initializer.
protected void init_actions() { action_obj = new CUP$Parser$actions(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }", ...
[ "0.7878943", "0.7846156", "0.7827101", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7798481", "0.7796163", "0.7776218", "0.7776218", "...
0.78301626
4
Invoke a user supplied parse action.
public java_cup.runtime.Symbol do_action( int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.Exception { /* call code in generated class */ return action_obj.CUP$Parser$do_action(act_num, parser, stack, top); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeAction( String actionInfo );", "public final java_cup.runtime.Symbol CUP$Parser$do_action(\n int CUP$Parser$act_num,\n java_cup.runtime.lr_parser CUP$Parser$parser,\n java.util.Stack CUP$Parser$stack,\n int CUP$Parser$top)\n ...
[ "0.66218", "0.65334934", "0.65334934", "0.65334934", "0.65019834", "0.6489741", "0.6489741", "0.6489741", "0.6489741", "0.6489741", "0.648336", "0.6457082", "0.6356902", "0.6306782", "0.6291403", "0.6286624", "0.6286624", "0.62708145", "0.61865914", "0.61409706", "0.61395925"...
0.5989242
30
override method call in case of a (unrecovered) syntax error
public void unrecovered_syntax_error(Symbol current_token) throws SyntaxError{ throw new SyntaxError(current_token.left, (String)current_token.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void syntaxError(String line) {\n\t\tthrow new RuntimeException(\"Syntax error: \" + line);\n\t}", "protected void syntaxError(Object obj) {\n\t\tsyntaxError(obj.toString());\n\t}", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(...
[ "0.6661804", "0.6650019", "0.65507656", "0.6359806", "0.63326836", "0.6226204", "0.62020195", "0.6168922", "0.611551", "0.59291273", "0.58760625", "0.58042705", "0.5718171", "0.5711589", "0.57028764", "0.56502336", "0.5640816", "0.55968094", "0.5560546", "0.555809", "0.554969...
0.6443704
3
override method call in case of a syntax error, to avoid duplicate error messages
public void syntax_error(Symbol current_token){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "protected void syntaxError(Object obj) {\n\t\tsyntaxError(obj.toString());\n\t}", "protected void syntaxError(...
[ "0.74771106", "0.71776444", "0.6844511", "0.68169785", "0.6682238", "0.6614809", "0.64651686", "0.6459203", "0.64208025", "0.63584703", "0.63147485", "0.6306986", "0.6250213", "0.6245222", "0.6206001", "0.61009336", "0.6080414", "0.60571396", "0.6048796", "0.6029273", "0.6029...
0.66174364
5
Method with the actual generated action code.
public final java_cup.runtime.Symbol CUP$Parser$do_action( int CUP$Parser$act_num, java_cup.runtime.lr_parser CUP$Parser$parser, java.util.Stack CUP$Parser$stack, int CUP$Parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$Parser$result; /* select the action based on the action number */ switch (CUP$Parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 87: // literal ::= NULL { Literal RESULT =null; int nleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int nright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object n = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(nleft, LiteralTypes.NULL); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 86: // literal ::= FALSE { Literal RESULT =null; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object f = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(fleft, LiteralTypes.FALSE); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 85: // literal ::= TRUE { Literal RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object t = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(tleft, LiteralTypes.TRUE); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 84: // literal ::= QUOTE { Literal RESULT =null; int qleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int qright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String q = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(qleft, LiteralTypes.STRING, q); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 83: // literal ::= INTEGER { Literal RESULT =null; int ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Integer i = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(ileft, LiteralTypes.INTEGER, i); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 82: // unop ::= LNEG expr { UnaryOp RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalUnaryOp(UnaryOps.LNEG, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("unop",19, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 81: // unop ::= MINUS expr { UnaryOp RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathUnaryOp(UnaryOps.UMINUS, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("unop",19, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 80: // binop ::= expr NEQUAL expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.NEQUAL, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 79: // binop ::= expr EQUAL expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.EQUAL, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 78: // binop ::= expr GTE expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.GTE, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 77: // binop ::= expr GT expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.GT, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 76: // binop ::= expr LTE expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.LTE, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 75: // binop ::= expr LT expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.LT, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 74: // binop ::= expr LOR expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.LOR, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 73: // binop ::= expr LAND expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new LogicalBinaryOp(e1, BinaryOps.LAND, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 72: // binop ::= expr MOD expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathBinaryOp(e1, BinaryOps.MOD, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 71: // binop ::= expr DIVIDE expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathBinaryOp(e1, BinaryOps.DIVIDE, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // binop ::= expr MULTIPLY expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathBinaryOp(e1, BinaryOps.MULTIPLY, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 69: // binop ::= expr MINUS expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathBinaryOp(e1, BinaryOps.MINUS, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // binop ::= expr PLUS expr { BinaryOp RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new MathBinaryOp(e1, BinaryOps.PLUS, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("binop",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // location ::= expr LB expr RB { Location RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ArrayLocation(e1, e2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("location",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // location ::= expr DOT ID { Location RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new VariableLocation(idleft, e, id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("location",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // location ::= ID { Location RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new VariableLocation(idleft, id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("location",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // expr_list ::= expr_list COMMA expr { List<Expression> RESULT =null; int elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; List<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; el.add(e); RESULT = el; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",14, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // expr_list ::= expr { List<Expression> RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; List<Expression> l = new ArrayList<Expression>(); l.add(e); RESULT = l; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",14, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // virtual_call ::= expr DOT ID LP expr_list RP { VirtualCall RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualCall(idleft, e, id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtual_call",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // virtual_call ::= expr DOT ID LP RP { VirtualCall RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new VirtualCall(idleft, e, id, new ArrayList<Expression>()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtual_call",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // virtual_call ::= ID LP expr_list RP { VirtualCall RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualCall(idleft, id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtual_call",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // virtual_call ::= ID LP RP { VirtualCall RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new VirtualCall(idleft, id, new ArrayList<Expression>()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtual_call",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // static_call ::= CLASS_ID DOT ID LP expr_list RP { StaticCall RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StaticCall(cileft, ci, id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("static_call",16, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // static_call ::= CLASS_ID DOT ID LP RP { StaticCall RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new StaticCall(cileft, ci, id, new ArrayList<Expression>()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("static_call",16, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // call ::= virtual_call { Call RESULT =null; int vcleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int vcright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; VirtualCall vc = (VirtualCall)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = vc; CUP$Parser$result = parser.getSymbolFactory().newSymbol("call",15, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // call ::= static_call { Call RESULT =null; int scleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int scright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; StaticCall sc = (StaticCall)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = sc; CUP$Parser$result = parser.getSymbolFactory().newSymbol("call",15, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // expr ::= LP expr RP { Expression RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = e; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // expr ::= literal { Expression RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Literal l = (Literal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = l; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // expr ::= unop { Expression RESULT =null; int uleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int uright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; UnaryOp u = (UnaryOp)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = u; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // expr ::= binop { Expression RESULT =null; int bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; BinaryOp b = (BinaryOp)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = b; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // expr ::= expr DOT LENGTH { Expression RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new Length(e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // expr ::= NEW type LB expr RB { Expression RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new NewArray(t, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // expr ::= NEW CLASS_ID LP RP { Expression RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new NewClass(cileft, ci); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // expr ::= THIS { Expression RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object t = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new This(tleft); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // expr ::= call { Expression RESULT =null; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Call c = (Call)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = c; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // expr ::= location { Expression RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Location l = (Location)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = l; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // stmt ::= type ID ASSIGN expr SEMI { Statement RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new LocalVariable(t, id, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // stmt ::= type ID SEMI { Statement RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new LocalVariable(t, id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // stmt ::= LCBR stmt_list RCBR { Statement RESULT =null; int lcbrleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int lcbrright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Object lcbr = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StatementsBlock(lcbrleft, sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // stmt ::= CONTINUE SEMI { Statement RESULT =null; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Object c = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Continue(cleft); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // stmt ::= BREAK SEMI { Statement RESULT =null; int bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Object b = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Break(bleft); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // stmt ::= WHILE LP expr RP stmt { Statement RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new While(e, s); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // stmt ::= IF LP expr RP stmt { Statement RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new If(e, s); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // stmt ::= IF LP expr RP stmt ELSE stmt { Statement RESULT =null; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Statement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int esleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int esright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement es = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new If(e, s, es); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // stmt ::= RETURN expr SEMI { Statement RESULT =null; int rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Object r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Return(rleft, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // stmt ::= RETURN SEMI { Statement RESULT =null; int rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Object r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Return(rleft); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // stmt ::= call SEMI { Statement RESULT =null; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Call c = (Call)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new CallStatement(c); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // stmt ::= location ASSIGN expr SEMI { Statement RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Location l = (Location)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Expression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Assignment(l, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // stmt_list ::= stmt_list stmt { List<Statement> RESULT =null; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; sl.add(s); RESULT = sl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt_list",11, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // stmt_list ::= { List<Statement> RESULT =null; RESULT = new ArrayList<Statement>(); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt_list",11, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // type ::= type LB RB { Type RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; t.incrementDimension(); RESULT = t; CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // type ::= CLASS_ID { Type RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new UserType(cileft, ci); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // type ::= STRING { Type RESULT =null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object s = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new PrimitiveType(sleft, DataTypes.STRING); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // type ::= BOOLEAN { Type RESULT =null; int bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object b = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new PrimitiveType(bleft, DataTypes.BOOLEAN); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // type ::= INT { Type RESULT =null; int ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object i = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new PrimitiveType(ileft, DataTypes.INT); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // formal ::= type ID { Formal RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Formal(t, id); // System.out.println("Reduced rule t id for t=" + t + " and id=" + id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("formal",7, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // formal_list ::= formal_list COMMA formal { List<Formal> RESULT =null; int flleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int flright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; List<Formal> fl = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Formal f = (Formal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; fl.add(f); RESULT = fl; // System.out.println("Added f to list of Formal for f=" + f); CUP$Parser$result = parser.getSymbolFactory().newSymbol("formal_list",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // formal_list ::= formal { List<Formal> RESULT =null; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Formal f = (Formal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; List<Formal> l = new ArrayList<Formal>(); l.add(f); RESULT = l; // System.out.println("Created new list of Formal, added f=" + f); CUP$Parser$result = parser.getSymbolFactory().newSymbol("formal_list",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // method ::= type ID LP formal_list RP LCBR stmt_list RCBR { Method RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-7)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; List<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualMethod(t, id, f, sl); // System.out.println("Reduced rule t id(f){sl} for t=" + t + ", id=" + id + ", f=" + f + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // method ::= VOID ID LP formal_list RP LCBR stmt_list RCBR { Method RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; List<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualMethod(new PrimitiveType(idleft, DataTypes.VOID), id, f, sl); // System.out.println("Reduced rule void id(f){sl} for id=" + id + ", f=" + f + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // method ::= type ID LP RP LCBR stmt_list RCBR { Method RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualMethod(t, id, new ArrayList<Formal>(), sl); // System.out.println("Reduced rule t id(){sl} for t=" + t + ", id=" + id + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // method ::= VOID ID LP RP LCBR stmt_list RCBR { Method RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new VirtualMethod(new PrimitiveType(idleft, DataTypes.VOID), id, new ArrayList<Formal>(), sl); // System.out.println("Reduced rule void id(){sl} for id=" + id + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // method ::= STATIC type ID LP formal_list RP LCBR stmt_list RCBR { Method RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-7)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; List<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StaticMethod(t, id, f, sl); // System.out.println("Reduced rule static t id(f){sl} for t=" + t + ", id=" + id + ", f=" + f + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-8)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // method ::= STATIC VOID ID LP formal_list RP LCBR stmt_list RCBR { Method RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; List<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StaticMethod(new PrimitiveType(idleft, DataTypes.VOID), id, f, sl); // System.out.println("Reduced rule static void id(f){sl} for id=" + id + ", f=" + f + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-8)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // method ::= STATIC type ID LP RP LCBR stmt_list RCBR { Method RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StaticMethod(t, id, new ArrayList<Formal>(), sl); // System.out.println("Reduced rule static t id(){sl} for t=" + t + ", id=" + id + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // method ::= STATIC VOID ID LP RP LCBR stmt_list RCBR { Method RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new StaticMethod(new PrimitiveType(idleft, DataTypes.VOID), id, new ArrayList<Formal>(), sl); // System.out.println("Reduced rule static void id(){sl} for id=" + id + " and sl=" + sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // id_list ::= id_list COMMA ID { List<String> RESULT =null; int idlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int idlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; List<String> idl = (List<String>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; idl.add(id); RESULT = idl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("id_list",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // id_list ::= ID { List<String> RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; List<String> idl = new ArrayList<String>(); idl.add(id); RESULT = idl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("id_list",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // field ::= type id_list SEMI { List<Field> RESULT =null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Type t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int idlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int idlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<String> idl = (List<String>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; List<Field> lf = new ArrayList<Field>(); for (String id: idl){ lf.add(new Field(t, id)); } RESULT = lf; CUP$Parser$result = parser.getSymbolFactory().newSymbol("field",4, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // field_or_method ::= field_or_method method { FieldOrMethod RESULT =null; int fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; FieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int mleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int mright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Method m = (Method)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; fom.addMethod(m); RESULT = fom; // System.out.println("Added m to list of fields and methods for m=" + m); CUP$Parser$result = parser.getSymbolFactory().newSymbol("field_or_method",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // field_or_method ::= field_or_method field { FieldOrMethod RESULT =null; int fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; FieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; List<Field> f = (List<Field>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; fom.addField(f); RESULT = fom; // System.out.println("Added f to list of fields and methods for f=" + f); CUP$Parser$result = parser.getSymbolFactory().newSymbol("field_or_method",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // field_or_method ::= method { FieldOrMethod RESULT =null; int mleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int mright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Method m = (Method)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new FieldOrMethod(m); // System.out.println("Created new list of fields and methods, added m=" + m); CUP$Parser$result = parser.getSymbolFactory().newSymbol("field_or_method",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // field_or_method ::= field { FieldOrMethod RESULT =null; int fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; List<Field> f = (List<Field>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new FieldOrMethod(f); // System.out.println("Created new list of fields and methods, added f=" + f); CUP$Parser$result = parser.getSymbolFactory().newSymbol("field_or_method",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // classDecl ::= CLASS CLASS_ID EXTENDS CLASS_ID LCBR field_or_method RCBR { ICClass RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int ecileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int eciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String eci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; FieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ICClass(cileft, ci, eci, fom.getFieldList(), fom.getMethodList()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // classDecl ::= CLASS CLASS_ID EXTENDS CLASS_ID LCBR RCBR { ICClass RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int ecileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int eciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String eci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new ICClass(cileft, ci, eci, new ArrayList<Field>(), new ArrayList<Method>()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // classDecl ::= CLASS CLASS_ID LCBR field_or_method RCBR { ICClass RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; FieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ICClass(cileft, ci, fom.getFieldList(), fom.getMethodList()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // classDecl ::= CLASS CLASS_ID LCBR RCBR { ICClass RESULT =null; int cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new ICClass(cileft, ci, new ArrayList<Field>(), new ArrayList<Method>()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // classDecl_list ::= classDecl_list classDecl { List<ICClass> RESULT =null; int cdlstleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int cdlstright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<ICClass> cdlst = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int cdleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cdright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ICClass cd = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; cdlst.add(cd); RESULT = cdlst; // System.out.println("Added cd to list of ICClass for cd=" + cd); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl_list",3, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // classDecl_list ::= classDecl { List<ICClass> RESULT =null; int cdleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cdright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ICClass cd = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; List<ICClass> l = new ArrayList<ICClass>(); l.add(cd); RESULT = l; // System.out.println("Created new list of ICClass, added cd=" + cd); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDecl_list",3, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // $START ::= program EOF { Object RESULT =null; int start_valleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Program start_val = (Program)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = start_val; CUP$Parser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } /* ACCEPT */ CUP$Parser$parser.done_parsing(); return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // program ::= classDecl_list { Program RESULT =null; int cdlstleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cdlstright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; List<ICClass> cdlst = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Program(cdlst); CUP$Parser$result = parser.getSymbolFactory().newSymbol("program",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void createAction() {\n }", "@Override\n\tpublic ...
[ "0.7253985", "0.7253985", "0.7253985", "0.71544045", "0.71270514", "0.71028495", "0.682494", "0.6795898", "0.66515064", "0.6604793", "0.6412416", "0.6410986", "0.6400891", "0.635059", "0.6294932", "0.6284992", "0.6284992", "0.6284992", "0.6255204", "0.623979", "0.6188923", ...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7249201", "0.7204109", "0.7197405", "0.71792436", "0.7109801", "0.7041446", "0.7040234", "0.70145714", "0.7011273", "0.6983118", "0.6946729", "0.6940447", "0.6936383", "0.6920103", "0.6920103", "0.6893587", "0.6885479", "0.6877562", "0.6877041", "0.6864375", "0.6864375", ...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.menuAboutUs: startActivity(new Intent(MainMenu.this, AboutUs.class)); break; case R.id.menuContactUs: startActivity(new Intent(MainMenu.this, ContactUs.class)); break; case R.id.menuLogOut: FirebaseAuth.getInstance().signOut(); break; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904454", "0.78056747", "0.77659833", "0.7727365", "0.7631989", "0.76223314", "0.7584553", "0.75306034", "0.7487836", "0.745791", "0.745791", "0.7438328", "0.74220496", "0.74034584", "0.7391494", "0.73866826", "0.73788977", "0.7370167", "0.7362255", "0.73555887", "0.734525...
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.nav_about_city) { // DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); startActivity(new Intent(MainMenu.this, AboutTheCity.class)); //drawer.closeDrawers(); } else if (id == R.id.nav_attractions) { startActivity(new Intent(MainMenu.this, Attractions.class)); } else if (id == R.id.nav_restaurants) { startActivity(new Intent(MainMenu.this, RestaurantSwiper.class)); } else if (id == R.id.nav_share) { sendLink(); } else if (id == R.id.nav_favourites) { startActivity(new Intent(MainMenu.this, BookmarkRestaurants.class)); } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); drawer.setFocusable(false); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224"...
0.0
-1
TODO Autogenerated method stub
@Override public void payeeDisplayVisible(boolean yes) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void payeeInputVisible(boolean yes) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void resultFrameVisible(boolean yes) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void addPayeeInputListener(MyListener listener) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void addPayeeDisplayListener(MyListener listener) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void addResultFrameListener(MyListener listener) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Lidan: assuming mDocSet[] & accumulated_scores[] sorted by descending order of scores! Lidan: this method modifies mDocSet[] & accumulated_scores[] (class variables)
public void pruneDocuments(String pruner, float pruner_param) { // After pruning, make sure have max(RetrievalEnvironment.mCascade_K, |retained docs|) // documents! int[] mDocSet_tmp = new int[mDocSet.length]; float[] accumulated_scores_tmp = new float[accumulated_scores.length]; int retainSize = 0; if (pruner.equals("score")) { float max_score = accumulated_scores[0]; float min_score = accumulated_scores[accumulated_scores.length - 1]; float score_threshold = (max_score - min_score) * pruner_param + min_score; for (int i = 0; i < accumulated_scores.length; i++) { if (score_threshold <= accumulated_scores[i]) { retainSize++; } else { break; } } } else if (pruner.equals("mean-max")) { float max_score = accumulated_scores[0]; float mean_score = 0; for (int j = 0; j < accumulated_scores.length; j++) { mean_score += accumulated_scores[j]; } mean_score = mean_score / (float) accumulated_scores.length; float score_threshold = pruner_param * max_score + (1.0f - pruner_param) * mean_score; for (int i = 0; i < accumulated_scores.length; i++) { if (score_threshold <= accumulated_scores[i]) { retainSize++; } else { break; } } } else if (pruner.equals("rank")) { // if pruner_param = 0.3 --> remove bottom 30% of the docs! retainSize = (int) ((1.0 - pruner_param) * ((double) (mDocSet.length))); } else if (pruner.equals("z-score")) { // compute mean float avgScores = 0.0f; for (int i = 0; i < accumulated_scores.length; i++) { avgScores += accumulated_scores[i]; } avgScores = avgScores / (float) accumulated_scores.length; // compute variance float variance = 0.0f; for (int i = 0; i < accumulated_scores.length; i++) { variance += (accumulated_scores[i] - avgScores) * (accumulated_scores[i] - avgScores); } float stddev = (float) Math.sqrt(variance); float[] z_scores = new float[accumulated_scores.length]; for (int i = 0; i < z_scores.length; i++) { z_scores[i] = (accumulated_scores[i] - avgScores) / stddev; } } else { throw new RetrievalException("PruningFunction " + pruner + " is not supported!"); } if (retainSize < mK) { if (mDocSet.length >= mK) { retainSize = mK; } else if (mK != defaultNumDocs) { // When training the model, set the # output docs large on purpose so that output size = // retained docs size retainSize = mDocSet.length; } } if (retainSize > mDocSet.length) { retainSize = mDocSet.length; } for (int i = 0; i < retainSize; i++) { mDocSet_tmp[i] = mDocSet[i]; accumulated_scores_tmp[i] = accumulated_scores[i]; } mDocSet = new int[retainSize]; accumulated_scores = new float[retainSize]; for (int i = 0; i < retainSize; i++) { mDocSet[i] = mDocSet_tmp[i]; accumulated_scores[i] = accumulated_scores_tmp[i]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortDocumentsByDocnos() {\n order = new int[mDocSet.length];\n mDocSet_tmp = new double[mDocSet.length];\n accumulated_scores_tmp = new float[mDocSet.length];\n\n for (int i = 0; i < order.length; i++) {\n order[i] = i;\n mDocSet_tmp[i] = mDocSet[i];\n accumulated_scores_tmp[...
[ "0.6935102", "0.673838", "0.60730326", "0.60253674", "0.5954239", "0.5922673", "0.5860185", "0.5829661", "0.5759878", "0.57353044", "0.56912374", "0.5684628", "0.55510116", "0.5539803", "0.5492853", "0.54543746", "0.5384196", "0.5377623", "0.53746784", "0.5344995", "0.5342123...
0.56311995
12
Lidan: operate on class vars mDocSet[] & accumulated_scores
public void sortDocumentsByDocnos() { order = new int[mDocSet.length]; mDocSet_tmp = new double[mDocSet.length]; accumulated_scores_tmp = new float[mDocSet.length]; for (int i = 0; i < order.length; i++) { order[i] = i; mDocSet_tmp[i] = mDocSet[i]; accumulated_scores_tmp[i] = accumulated_scores[i]; } ivory.smrf.model.constrained.ConstraintModel.Quicksort(mDocSet_tmp, order, 0, order.length - 1); for (int i = 0; i < order.length; i++) { mDocSet[i] = (int) mDocSet_tmp[i]; accumulated_scores[i] = accumulated_scores_tmp[order[i]]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void score(){\n\t\tscores=new float[3];\n\t\ttop3=new String[3];\n\t\tfor(int i=0;i<3;i++){\n\t\t\ttop3[i]=new String();\n\t\t\tscores[i]=(float)0;\n\t\t}\n\t\t//System.out.println(doclist.size());\n\t\tfor(int i=0;i<doclist.size();i++){\n\t\t\ttry{\n\t\t\t\tDocProcessor dp=new DocProcessor(doclist.get(i));...
[ "0.6497086", "0.60024494", "0.58598053", "0.57984716", "0.57912266", "0.575703", "0.57540333", "0.5691837", "0.5640533", "0.55706745", "0.5556483", "0.5547799", "0.5486632", "0.54676723", "0.54569846", "0.5456543", "0.5451743", "0.5442249", "0.5423161", "0.53891504", "0.53605...
0.5435228
18
Total cost of the cascade model: documents sum of unit per document cost over each clique
public float getCascadeCost() { // Lidan: should cast it to [0, 1] float normalizedCost = 1.0f - (float) (Math.exp(-0.01 * cascadeCost / 50000)); return normalizedCost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "double getTotalCost();", "public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\...
[ "0.6706209", "0.66512245", "0.66375315", "0.6364142", "0.63525766", "0.6311605", "0.62694556", "0.6266917", "0.62664473", "0.6227938", "0.6224673", "0.61985314", "0.61927474", "0.61914223", "0.6136577", "0.6132076", "0.6119255", "0.6101564", "0.60937136", "0.6069983", "0.6069...
0.6634738
3
point to next position in keptDocs array that hasn't been filled
public CascadeAccumulator[] executeInitialStage() { int indexCntKeptDocs = 0; // Clear priority queue. mSortedAccumulators.clear(); // Cliques associated with the MRF. List<Clique> cliques = mMRF.getCliques(); if (cliques.size() == 0) { throw new RetrievalException("Shouldn't have size 0!"); } // Current accumulator. CascadeAccumulator a = mAccumulators[0]; // Maximum possible score that this MRF can achieve. float mrfMaxScore = 0.0f; for (Clique c : cliques) { if (!((((CascadeClique) c).getParamID()).equals("termWt"))) { System.out .println("In this faster cascade implementation, first stage must be term in order to get positions[] values! " + ((CascadeClique) c).getParamID()); System.exit(-1); } mrfMaxScore += c.getMaxScore(); } // Sort cliques according to their max scores. Collections.sort(cliques, maxScoreComparator); // Score that must be achieved to enter result set. double scoreThreshold = Double.NEGATIVE_INFINITY; // Offset into document set we're currently at (if applicable). int docsetOffset = 0; int docno = 0; if (mDocSet != null) { docno = docsetOffset < mDocSet.length ? mDocSet[docsetOffset++] : Integer.MAX_VALUE; } else { docno = mMRF.getNextCandidate(); } boolean firstTime = true; while (docno < Integer.MAX_VALUE) { for (DocumentNode documentNode : mDocNodes) { documentNode.setDocno(docno); } // Document-at-a-time scoring. float docMaxScore = mrfMaxScore; boolean skipped = false; float score = 0.0f; // Lidan: accumulate document scores across the cascade stages // if (mDocSet != null && cascadeStage != 0) { // score = accumulated_scores[docsetOffset - 1]; // } // for each query term, its position in a document int[][] termPositions = new int[cliques.size()][]; int doclen = -1; for (int i = 0; i < cliques.size(); i++) { // Current clique that we're scoring. CascadeClique c = (CascadeClique) cliques.get(i); if (firstTime) { termToCliqueNumber.put(c.getConcept().trim().toLowerCase(), i); cf.put(c.getConcept().trim().toLowerCase(), c.termCollectionCF()); df.put(c.getConcept().trim().toLowerCase(), c.termCollectionDF()); } if (score + docMaxScore <= scoreThreshold) { // Advance postings readers (but don't score). for (int j = i; j < cliques.size(); j++) { cliques.get(j).setNextCandidate(docno + 1); } skipped = true; break; } // Document independent cliques do not affect the ranking. if (!c.isDocDependent()) { continue; } // Update document score. float cliqueScore = c.getPotential(); score += c.getWeight() * cliqueScore; // Update the max score for the rest of the cliques. docMaxScore -= c.getMaxScore(); // stuff needed for document evaluation in the next stage int[] p = c.getPositions(); if (p != null) { termPositions[i] = Arrays.copyOf(p, p.length); doclen = c.getDocLen(); } } firstTime = false; // Keep track of mNumResults best accumulators. if (!skipped && score > scoreThreshold) { a.docno = docno; a.score = score; a.index_into_keptDocs = indexCntKeptDocs; keptDocLengths[indexCntKeptDocs] = doclen; mSortedAccumulators.add(a); // save positional information for each query term in the document for (int j = 0; j < termPositions.length; j++) { if (termPositions[j] != null) { keptDocs[indexCntKeptDocs][j] = Arrays.copyOf(termPositions[j], termPositions[j].length); } } if (mSortedAccumulators.size() == mNumResults + 1) { a = mSortedAccumulators.poll(); // Re-use the accumulator of the removed document // After maximum # docs been put into queue, each time a new document is added, an old // document will be ejected, use the spot freed by the ejected document to store the new // document positional info in keptDocs indexCntKeptDocs = a.index_into_keptDocs; keptDocs[indexCntKeptDocs] = new int[numQueryTerms][]; scoreThreshold = mSortedAccumulators.peek().score; } else { a = mAccumulators[mSortedAccumulators.size()]; // Next non-used accumulator in the // accumulator pool indexCntKeptDocs++; } } if (mDocSet != null) { docno = docsetOffset < mDocSet.length ? mDocSet[docsetOffset++] : Integer.MAX_VALUE; } else { docno = mMRF.getNextCandidate(); } } // Grab the accumulators off the stack, in (reverse) order. CascadeAccumulator[] results_tmp = new CascadeAccumulator[Math.min(mNumResults, mSortedAccumulators.size())]; for (int i = 0; i < results_tmp.length; i++) { results_tmp[results_tmp.length - 1 - i] = mSortedAccumulators.poll(); meanScore += results_tmp[results_tmp.length - 1 - i].score; } meanScore /= results_tmp.length; CascadeAccumulator[] results = results_tmp; return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void updateToNextDoc() {\n if(idx < postingList.size())\n idx += postingList.get(idx+1)+2;\n }", "@Override\n public int nextPos(){\n if(pos<docPostingList.length) {\n\n return docPostingList[pos];\n\n }\n return -1;\n\n }", "priv...
[ "0.6749231", "0.6371845", "0.5696266", "0.55960613", "0.5588572", "0.551541", "0.5474663", "0.5449136", "0.54251695", "0.54076463", "0.5396349", "0.5391237", "0.53818655", "0.5363705", "0.5352914", "0.5350476", "0.5319422", "0.5303574", "0.5294088", "0.5294088", "0.5257178", ...
0.0
-1
Returns the Markov Random Field associated with this ranker.
public MarkovRandomField getMRF() { return mMRF; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector getRank() {\n return rank;\n }", "public byte getRank() {\n return rank;\n }", "public long getRank() {\n return rank_;\n }", "public int getRank(){\n return Value;\n }", "public int getRank() {\r\n return rank;\r\n }", "public int getRank()\n...
[ "0.5696836", "0.56487966", "0.5648623", "0.5638295", "0.5635055", "0.5633229", "0.5628096", "0.5607876", "0.5604294", "0.5604294", "0.5604294", "0.5588949", "0.5566219", "0.5565964", "0.55515695", "0.55447197", "0.5534785", "0.5530917", "0.5527181", "0.5521066", "0.5514713", ...
0.76274353
0
Sets the number of results to return.
public void setNumResults(int numResults) { mNumResults = numResults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setNumberOfResults(int numberOfResults);", "void xsetNumberOfResults(org.apache.xmlbeans.XmlInt numberOfResults);", "int getNumberOfResults();", "public void setNumResultsPerPage(int newNumResults) {\n this.numResultsPerPage = newNumResults;\n this.pageNumber = 1;\n this.errorMessag...
[ "0.8496194", "0.7217548", "0.7029599", "0.67931455", "0.6629626", "0.66201437", "0.6606526", "0.6606526", "0.659518", "0.65553695", "0.65072286", "0.6499024", "0.64620894", "0.6447467", "0.64072853", "0.6403737", "0.6307046", "0.6306692", "0.624847", "0.6229076", "0.6223022",...
0.8101597
1
TODO Autogenerated method stub
public URL createBitbucketProjUrl (String repoRootURL, String bitBucketProjName) { try { url = new URL(repoRootURL+"/rest/api/1.0/projects/"+bitBucketProjName+"/repos"); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int buy(Weapon item) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Weapon sell(int itemNumber) { return inventory.removeItem(itemNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int getPrice(int itemNumber) { return inventory.getItemPrice(itemNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void listAllItems() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
//GENEND:initComponents opcion interfaz tareas
private void jMI_interfazTareaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMI_interfazTareaActionPerformed Homework tarea = new Homework(); tarea.setVisible(true); tarea.Tareastxt(); tarea.setTitle("StickyCalendar 2.0 - " + date_update); tarea.Labels(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "public ordenProduccion() {\r\n initComponents();\r\n }", "public TelaSobre() {\n initComponents();\n }", "public TelaContaUnica() {\n initComponents();\n }", "public misTutores() {\n ...
[ "0.72268707", "0.72268707", "0.7003362", "0.6984009", "0.6977399", "0.69635487", "0.69496185", "0.6939352", "0.6923629", "0.6918103", "0.6913094", "0.69126564", "0.69069666", "0.6890834", "0.6886478", "0.68783605", "0.6873101", "0.6859594", "0.68470556", "0.6844755", "0.68364...
0.0
-1
GENLAST:event_jMenu_colorFondoActionPerformed cambio de color de fondo
private void AmarilloActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AmarilloActionPerformed if (evt.getSource() == Amarillo) { jTextArea1.setBackground(c = Color.YELLOW); jTextArea1.setForeground(Color.BLACK); //jLabel_color.setText(toHexString(c)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jBtnFarbwahlActionPerformed(ActionEvent evt) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// klassen-methode showDialog (..) von JColorCooser, aufruf über den Klassennamen, ohne erzeugte instanz der klasse..\n\t\tfarbe = JColorChooser.showDialog(null, \"Wähle neue zeichenfa...
[ "0.78035504", "0.703464", "0.69531274", "0.6913534", "0.6893558", "0.6847248", "0.6794104", "0.6755216", "0.6705908", "0.6687863", "0.6642932", "0.6601452", "0.6568271", "0.64884967", "0.6416155", "0.63802576", "0.6365675", "0.6358586", "0.6352917", "0.63519895", "0.6329579",...
0.65208125
13
TODO Autogenerated method stub
public static void main(String[] args) { handler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Updates location name and description
void update(Location location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void updateLocation(Location location, String newLocationName, int newLocationCapacity);", "@Override\n\tpublic void update(String location, String description) {\n\t\tsightings.add( new Sighting(location, description));\n\t\t\n\t}", "public void setLocation(String location);", "@Override\n ...
[ "0.74648666", "0.70646334", "0.70240533", "0.70048666", "0.69899696", "0.6888384", "0.6862895", "0.6787232", "0.6726461", "0.6723344", "0.6609977", "0.65913975", "0.64814305", "0.64670867", "0.64670867", "0.64356285", "0.63750035", "0.6363766", "0.6357307", "0.6349785", "0.63...
0.6718149
10
/ renamed from: com.ss.android.ad.splash.core.k
public interface C19045k { /* renamed from: a */ void mo50368a(int i, Object obj); /* renamed from: b */ void mo50369b(int i, Object obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void showSplash() {\n }", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "Icon getSplashImage();", "@Override\n protected void onPause() {\n super.onPause();\n mpSplash.pause();\n\n }", "@Override \r\n publ...
[ "0.6526979", "0.58975565", "0.5890063", "0.58728486", "0.5836804", "0.5833519", "0.58301425", "0.57880193", "0.5747178", "0.5699487", "0.56218415", "0.547687", "0.5473574", "0.54691494", "0.54634327", "0.5458253", "0.5453621", "0.54493815", "0.54368496", "0.54356396", "0.5432...
0.0
-1
/ renamed from: a
void mo50368a(int i, Object obj);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: b
void mo50369b(int i, Object obj);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
Creates a new instance of RegisterRemoteException without detail message.
public RegisterRemoteException() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RegisterRemoteException(String msg) {\n super(msg);\n }", "private void initRMI() throws RemoteException {\n log.info(\"Registering with RMI\");\n Registry registry = LocateRegistry.getRegistry();\n registry.rebind(address, this);\n }", "StatefulRemoteObjectB create() t...
[ "0.72662073", "0.5256022", "0.52514297", "0.5228162", "0.521785", "0.51898634", "0.51589626", "0.5155326", "0.51320153", "0.50310886", "0.4993001", "0.49746227", "0.49714804", "0.49603927", "0.4936355", "0.49207503", "0.49163407", "0.49154937", "0.49145043", "0.48820654", "0....
0.7876039
0
Constructs an instance of RegisterRemoteException with the specified detail message.
public RegisterRemoteException(String msg) { super(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RegisterRemoteException() {\n super();\n }", "public AgentRegistrationException(String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t}", "public ActionNotRegisteredException(String message) {\n\t\tsuper(message);\n\t}", "public JiraServiceException(String message) {\r\n super(message);\...
[ "0.68701625", "0.5357233", "0.50531876", "0.5038057", "0.49879202", "0.49789926", "0.49398342", "0.49169397", "0.48532492", "0.48142064", "0.48115084", "0.47945428", "0.4786081", "0.4757069", "0.4752673", "0.47001606", "0.46956223", "0.46448737", "0.46390104", "0.46337265", "...
0.7478998
0
[0] 1 to activate; 0 to deactivate
@Override public void proceedActions(String[] args) { if(args[0].equals("1")){ if(panicModeThread==null || !panicModeThread.isAlive()){ panicModeThread = new PanicModeThread((UserIlumination)getRequiredFeatures().get(0)); panicModeThread.run(); } }else if (args[1].equals("0")){ if(panicModeThread!=null || panicModeThread.isAlive()){ panicModeThread.finhishAction(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void activate(){\r\n\t\tactive=true;\r\n\t}", "public void activate(){\n active = true;\n state = State.cleaving;\n }", "public boolean activate();", "public boolean activate(){\n mIsActive = true;\n return mIsActive;\n }", "void activate();", "void activate();", ...
[ "0.7620638", "0.73757917", "0.7352497", "0.728438", "0.72670805", "0.72670805", "0.7154894", "0.7069615", "0.70041907", "0.6875505", "0.68263215", "0.6822795", "0.68166155", "0.678677", "0.6680931", "0.6661253", "0.6624865", "0.6624865", "0.66204756", "0.6597911", "0.65886253...
0.0
-1
Created on 2019/1/14 16:17
@SuppressWarnings("unused") public interface BaseMvpView extends MvpView { /** * 显示 toast * * @param message 内容 */ void showToast(String message); /** * 获取上下文 * * @return 上下文 */ Context getContext(); /** * 是否已经初始化 * * @return 是否初始化 */ boolean isInit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected MetadataUGWD() {/* intentionally empty block */}", "private stendhal() {\n\t}", "public abstract long getCreated();", "UUID getCreatedUUID()\n {\n return conglomerateUUID;\n }", "@Override\n public Date getCreated()\n {\n return null;\n }", "@Override\n public i...
[ "0.5276444", "0.52378416", "0.5180175", "0.5150283", "0.51391006", "0.51381886", "0.5100263", "0.50692576", "0.50544244", "0.50329185", "0.50329185", "0.5015439", "0.5010937", "0.49982002", "0.4985477", "0.4971628", "0.4964359", "0.4957913", "0.4943087", "0.49295473", "0.4924...
0.0
-1
constructor to get the context from the mainactivity
public NewChatFr(QiContext qictxt, QiChatbot qiChatBot, ApiCallExecutorFr apiCallExecutorFr) { Log.i(TAG, "Creating the NewChat custom object"); this.mqiContext = qictxt; this.qiChatBot = qiChatBot; this.apiCallExecutorFr = apiCallExecutorFr; //init topic names and locales; English and French this.topicNameFr = "topic_light_handling-fr.top"; this.localeFr = new Locale(Language.FRENCH, Region.FRANCE); //in english here initAndBuildChatFr(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n context=getContext();\n\n }", "public static Activity getContext() {\n return instance;\n\n }", "private Context getContext() {\n return mContext;\n }", "private Context ...
[ "0.7246101", "0.70647776", "0.7063257", "0.7063257", "0.7027868", "0.7027061", "0.6853378", "0.6810677", "0.6796591", "0.67846346", "0.6780239", "0.6780239", "0.67513764", "0.6739542", "0.67079026", "0.67076206", "0.6684046", "0.6677437", "0.6629779", "0.65980256", "0.6595859...
0.0
-1
This constructor is used for catchpoint hits with gdb < 7.0. In that environment, we have to get creative as gdb doesn't send us a reason with the stopped event. Fortunately, a stream record tells us the target has stopped because of a catchpoint and the associated breakpoint number.
public MIBreakpointHitEvent(MISession source, MIExecAsyncOutput record, int bkptNumber) { super(source, record); parse(); bkptno = bkptNumber; assert bkptNumber > 0; // we know gdb bkpt numbers are 1-based }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BusStopRecord() {\n super(BusStop.BUS_STOP);\n }", "protected void stopped(Throwable cause)\n {\n }", "public C13462b(Throwable th) {\n super(th, null);\n C32569u.m150519b(th, \"e\");\n }", "public CoreBreakpoint.Event getNewInstance () {\n ...
[ "0.58562595", "0.50411975", "0.49908736", "0.4987594", "0.49471983", "0.49200615", "0.49051657", "0.49009234", "0.48898402", "0.48551935", "0.4830795", "0.4819694", "0.47975752", "0.4727653", "0.47143546", "0.47115386", "0.47087255", "0.4705375", "0.469899", "0.46909723", "0....
0.5520545
1
Created by PCCWB on 2017/3/31.
@FunctionalInterface public interface MyFunc { public String getValue(String str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.616245", "0.5953231", "0.59430933", "0.59202033", "0.59061307", "0.5875861", "0.5875861", "0.58300906", "0.5810338", "0.57897186", "0.5720037", "0.57159555", "0.57156575", "0.5702819", "0.5666997", "0.56612015", "0.56612015", "0.56612015", "0.56612015", "0.56612015", "0.56...
0.0
-1
TRAE TODO DEL USUARIO
public List<UsuarioxLibro> todoPorUsuario(int idUsuario) { Connection con = Conexion.getConnection(); PreparedStatement ps; ResultSet rs; List<UsuarioxLibro> uxl = new ArrayList<>(); String sql = "select * from usuarioxlibro where idusuario =" + idUsuario; UsuarioxLibro usli; try { ps = con.prepareStatement(sql); rs = ps.executeQuery(); while (rs.next()) { usli = new UsuarioxLibro(idUsuario, rs.getInt("idlibro"), rs.getDouble("nota"), rs.getBoolean("evaluacion"), rs.getDouble("puntuacion")); uxl.add(usli); } ps.close(); rs.close(); con.close(); } catch (Exception e) { System.out.println(e); } return uxl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void altaUsuario();", "protected void accionUsuario() {\n\t\t\r\n\t}", "private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out...
[ "0.6960804", "0.6719745", "0.6644501", "0.65597504", "0.6536012", "0.63811487", "0.63640624", "0.6339573", "0.6338556", "0.6299205", "0.6245691", "0.6241285", "0.6177364", "0.61692953", "0.6142452", "0.6101582", "0.60982615", "0.6078664", "0.6074382", "0.60743266", "0.6068869...
0.0
-1
SOPORTE. _ID DEL NUEVO REGISTRO DE PUNTUACION DE USUARIO POR LIBRO
public int obtenerUltimoIDUsuLib() { Connection con = Conexion.getConnection(); PreparedStatement ps; ResultSet rs; int ultimo = 0; String sql = "select idusuario from usuarioxlibro order by idusuario desc limit 1"; try { ps = con.prepareStatement(sql); rs = ps.executeQuery(); ultimo = rs.getInt(1); if (ultimo == 0) { ultimo = 0; } } catch (Exception e) { System.out.println(e); } return ultimo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getID();", "java.lang.String getRegistId();", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "public void obtenerID();", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonag...
[ "0.72229344", "0.71196043", "0.7116821", "0.7084125", "0.70321906", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", "0.7019974", ...
0.0
-1
ACTULIZAR PUNUTACION DE UN USUARIO A UN LIBRO (QUE YA EVALUO ANTES)
public String actualizarPuntuacion(int idUsuario, int idLibro, double puntuacion) { Connection con = Conexion.getConnection(); PreparedStatement ps1; PreparedStatement ps2; PreparedStatement ps3; PreparedStatement ps4; ResultSet rs1; ResultSet rs2; ResultSet rs3; ResultSet rs4; String rpta = ""; String sql1 = "select puntuacion from usuarioxlibro where idusuario =" + idUsuario + " and idlibro = " + idLibro; String sql3 = "update usuarioxlibro set puntuacion = ? where idusuario= " + idUsuario + " and idlibro = " + idLibro; String sql2 = "select vez from libro where idlibro =" + idLibro; String sql4 = "update libro set vez = ? where idlibro =" + idLibro; double puntAnt = 0; int vez = 0; try { ps1 = con.prepareStatement(sql1); rs1 = ps1.executeQuery(); while (rs1.next()) { puntAnt = rs1.getDouble(1); } ps2 = con.prepareStatement(sql2); rs2 = ps2.executeQuery(); while (rs2.next()) { vez = rs2.getInt(1); } double nuevaPunt = puntuacionNueva(puntAnt, puntuacion, vez); ps3 = con.prepareStatement(sql3); ps3.setDouble(1, nuevaPunt); rpta = "Puntuación registrada"; ps3.executeUpdate(); ps4 = con.prepareStatement(sql4); ps4.setInt(1, vez + 1); ps4.executeUpdate(); } catch (Exception e) { System.out.println(e); rpta = "No se pudo registrar la puntuacion"; } return rpta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void altaUsuario();", "protected void accionUsuario() {\n\t\t\r\n\t}", "@IgnoreMethodAuthentication\r\n\tpublic void execute() {\n\t\ttry {\r\n\t\t\tString licencaFull = SystemManager.getProperty(\"licenca.sistema\");\r\n\t\t\tlicencaFull = Criptografia.newInstance(SystemManager.getProperty(Constants.Pa...
[ "0.63375115", "0.6278439", "0.61031", "0.60912395", "0.6033924", "0.5991718", "0.5988418", "0.59676635", "0.59502155", "0.59119344", "0.5885674", "0.5860622", "0.5847887", "0.58454436", "0.58136314", "0.5738441", "0.5692969", "0.5686947", "0.5681738", "0.5612935", "0.56110233...
0.0
-1
Map map = new HashMap();
public String getCronValue() { List<SmsUrlCronJob> findAllCronJob = smsCronJobRepo.findAllCronJob(); String result = null; List<SmsUrlCronJob> collectSmsUrl = findAllCronJob.stream() .filter(s -> s.getJobName().equalsIgnoreCase("SmsBranchTxnDailyJob")).collect(Collectors.toList()); for (SmsUrlCronJob smsUrl : collectSmsUrl) { // logger.info("branchTxnJob::22::getCronValue::" + smsUrl.getCronTime()); // logger.info("Job Enable Status::::getCronValue::" + smsUrl.getJobEnable()); if (smsUrl.getJobEnable().equals("Y")) { result = smsUrl.getCronTime(); } else { result = smsUrl.getCronTime(); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyHashMap() {\n map = new HashMap();\n }", "public MyHashMap() {\n\n }", "public MyHashMap() {\n\n }", "void setHashMap();", "private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }", "public MyHashMap() {\n hashMap = new ArrayList<>();...
[ "0.79833287", "0.78447515", "0.7487953", "0.7450463", "0.7441486", "0.7420109", "0.7304367", "0.728067", "0.7208408", "0.7158201", "0.7090588", "0.7086554", "0.70106477", "0.69077444", "0.6887382", "0.68303216", "0.6829373", "0.68021166", "0.68011236", "0.679967", "0.6746774"...
0.0
-1
approximate % of tiles that re mines Construct the game with specify number rows, cols, a random seed and a target for the % of tiles that will be mined
public LabMineSweeper( int nRows, int nCols, int seed, int pct ) { rows = nRows; cols = nCols; percent = pct; mineField = new MineTile[ nRows ][ nCols ]; theMines = new int[ nRows ][ nCols ]; theCounts = new int[ nRows ][ nCols ]; layMineField( seed , percent ); determineCounts( ); for( int r = 0; r < nRows; r++) { for( int c = 0; c < nCols; c++) { mineField[ r ][ c ] = new MineTile( r, c, SIZE , this ); mineField[ r ][ c ].setCount( theCounts[ r ][ c ]); } } System.out.println( this ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void layMineField ( int n , int pct)\n { \n Random generator = new Random( n );\n \n for ( int r = 0 ; r < rows ; r++ )\n {\n for ( int c = 0; c < cols ; c++ ) \n {\n if ( generator.nextInt( 100 ) < pct )\n theMines[ r ][ c ] = 1; \n else\n ...
[ "0.6232896", "0.6165584", "0.5922884", "0.58390987", "0.5824358", "0.5726325", "0.57207996", "0.5702019", "0.5695598", "0.5669347", "0.5654082", "0.5650184", "0.5637955", "0.5615991", "0.5615761", "0.5594793", "0.55633026", "0.55605406", "0.55592465", "0.55217737", "0.5512725...
0.59825516
2
returns true if both indexes are valid for this board
private boolean isValid( int r, int c ) { return r >= 0 && r < rows && c >= 0 && c < cols ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidIndex(final int theY, final int theX) {\n return 0 <= theY && theY < myGrid.length\n && 0 <= theX && theX < myGrid[theY].length;\n }", "public static boolean validMoves(AbstractBoard[] boards )\n\t{\n\t\tint x = boards[0].getSize();\n\t\tint y = boards[0].getWidth();\n...
[ "0.6893042", "0.6677804", "0.66679317", "0.65147954", "0.65055174", "0.6466036", "0.641571", "0.64108926", "0.6402333", "0.63748324", "0.6343014", "0.63214695", "0.63183916", "0.62882036", "0.62768596", "0.6235074", "0.62343687", "0.62190604", "0.62190384", "0.6218939", "0.62...
0.0
-1
compute the mined tile neighbor counts for a position
private void count( int theR, int theC ) { for( int r = -1; r <= 1; r++ ) { for( int c = -1; c <= 1; c++ ) { if( isValid( theR + r, theC + c ) ) theCounts[ theR ][ theC ] += theMines[ theR + r ][ theC + c ]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int countNeighbors(int x, int y);", "@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);...
[ "0.7374071", "0.6997187", "0.69451326", "0.68880403", "0.68642837", "0.6863884", "0.68175256", "0.6811602", "0.6777768", "0.6615416", "0.6567761", "0.65347594", "0.6516091", "0.6412803", "0.638965", "0.6372375", "0.636523", "0.63153476", "0.62933534", "0.62659836", "0.6211737...
0.0
-1
foreach position, compute the mined tile neighbor counts
private void determineCounts( ) { for( int r = 0; r < rows; r++ ) { for( int c = 0; c < cols; c++ ) { if( theMines[ r ][ c ] == 1 ) theCounts[ r ] [ c ] = 9; else count( r, c ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int countNeighbors(int x, int y);", "private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t...
[ "0.72480863", "0.7136485", "0.6843634", "0.67957836", "0.67758805", "0.67605346", "0.6685621", "0.663155", "0.66284853", "0.6625791", "0.65855175", "0.655852", "0.6550628", "0.65380853", "0.65000176", "0.64842296", "0.6457944", "0.64072204", "0.63863176", "0.62595254", "0.618...
0.6498174
15
Using a random number generator, place mines in the mine field
private void layMineField ( int n , int pct) { Random generator = new Random( n ); for ( int r = 0 ; r < rows ; r++ ) { for ( int c = 0; c < cols ; c++ ) { if ( generator.nextInt( 100 ) < pct ) theMines[ r ][ c ] = 1; else theMines[ r ][ c ] = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n ...
[ "0.7778715", "0.7412699", "0.7400243", "0.7012578", "0.6896877", "0.6805516", "0.6694502", "0.65519875", "0.6546963", "0.6511267", "0.6421824", "0.6343575", "0.6334825", "0.6330806", "0.62900496", "0.6270147", "0.6256076", "0.62501156", "0.623725", "0.6198971", "0.6187312", ...
0.6558179
7
The position r,c has been determined to have no mined neighbors. Uncover all its neighbors and then do the same for all of them that have no mined neighbors until all contiguous 0 tiles and their neighbors have been uncovered.
public void uncoverContiguous( int r , int c ) { Stack<MineTile> stack = new Stack<MineTile>(); stack.add(mineField[r][c]); while(!stack.empty()) { MineTile curTile = stack.pop(); r = curTile.getRow(); c = curTile.getCol(); for(int i = r-1; i <= r+1; i++) { for(int j = c-1; j <= c+1; j++) { if(isValid(i, j)) { if(mineField[i][j].isCovered() & mineField[i][j].getCount() == 0) { stack.add(mineField[i][j]); } mineField[i][j].uncover(); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r,...
[ "0.6641555", "0.62293744", "0.6221655", "0.6112118", "0.608605", "0.60591227", "0.60093015", "0.5999235", "0.59492666", "0.5932042", "0.5931259", "0.59094065", "0.58597255", "0.5849338", "0.57840693", "0.57783633", "0.57769644", "0.57722354", "0.5752366", "0.5739597", "0.5737...
0.7271834
0
convert the minefield to a String representation
public String toString( ) { String s="\nThe Mines\n "; for ( int r = 0; r < rows; r++ ) { for ( int c = 0; c < cols ; c++ ) s = s + theMines[ r ][ c ] + " "; s = s + " \n " ; } s += "\nMined neighbor counts\n "; for ( int r = 0; r < rows; r++ ) { for ( int c = 0; c < cols ; c++ ) if( theCounts[ r ][ c ] == 9 ) s = s + "X" + " "; else s = s + theCounts[ r ][ c ] + " "; s = s + " \n " ; } return( s ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public String toString()\n\t{\n\t\treturn fieldname;\n\t}", "public String toString()\n {\n return m_strFieldName;\n }", "public String toStri...
[ "0.6220663", "0.60925454", "0.5982918", "0.5912813", "0.583325", "0.57977706", "0.5778471", "0.57782257", "0.57747287", "0.5773531", "0.57687706", "0.5732383", "0.57152677", "0.5706852", "0.5687747", "0.5685469", "0.56685656", "0.5667763", "0.56673557", "0.5658433", "0.564578...
0.0
-1
Hide from the public.
RuntimeTestGroup(Annotation ann) { this.annotation = ann; this.name = getGroupName(ann.annotationType()); this.sysProperty = getGroupSysProperty(ann.annotationType()); this.testGroup = ann.annotationType().getAnnotation(TestGroup.class); try { this.enabled = RandomizedTest.systemPropertyAsBoolean( getSysPropertyName(), testGroup.enabled()); } catch (IllegalArgumentException e) { // Ignore malformed system property, disable the group if malformed though. this.enabled = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean isPublic() {\n\t\treturn false;\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\r\n public void hide() {\n }", "@Override\n\tpublic void hide() {\n\t}", "@Override\n\tpublic void hide() {\n\t}", "@Override\n\tpublic void hide()...
[ "0.742889", "0.7341865", "0.69919616", "0.6983412", "0.6983412", "0.6983412", "0.6983412", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0.69651717", "0....
0.0
-1
Return the group's annotation.
public Annotation getAnnotation() { return annotation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAnnotation () {\n return annotation;\n }", "public String getAnnotation();", "public String getAnnotation() {\n return annotation;\n }", "public String annotation() {\n return this.innerProperties() == null ? null : this.innerProperties().annotation();\n ...
[ "0.7257385", "0.7200496", "0.7174907", "0.7129158", "0.710782", "0.70338786", "0.6778261", "0.6760637", "0.65677327", "0.6419344", "0.64148766", "0.6222946", "0.6197033", "0.61064565", "0.6085661", "0.5999724", "0.59916157", "0.59725285", "0.59647113", "0.58860385", "0.581377...
0.695394
6
Test group name, resolving defaults.
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getDefaultGroup();", "public static String specifyGroup() {\n return holder.format(\"specifyGroup\");\n }", "@Test\n public void groupNameTest() {\n // TODO: test groupName\n }", "public void setDefaultGroup(boolean defaultGroup);", "default String resolve(\n ...
[ "0.708977", "0.6886261", "0.61768085", "0.6010446", "0.59743685", "0.5967006", "0.5898585", "0.586514", "0.5805647", "0.5803966", "0.56869537", "0.5677185", "0.56509805", "0.56509805", "0.56432587", "0.5640271", "0.56371886", "0.5635207", "0.5616634", "0.5613831", "0.5613516"...
0.0
-1
Test group system property, resolving defaults.
public String getSysPropertyName() { return sysProperty; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getDefaultGroup();", "static GroupProperty determineProperty(\n \t\t\tList<MutableGroup> groups, QName propertyName,\n \t\t\tboolean allowFallback) {\n \t\treturn determineProperty(groups, propertyName, true, allowFallback);\n \t}", "public static String specifyGroup() {\n return ...
[ "0.6436627", "0.60806733", "0.59699523", "0.59075665", "0.58440614", "0.5671838", "0.56660783", "0.5575376", "0.546834", "0.54491425", "0.53516525", "0.53452766", "0.5326795", "0.53157735", "0.5272905", "0.52583975", "0.52479327", "0.5245609", "0.52208006", "0.52200985", "0.5...
0.0
-1
Returns the execution state for this group.
public boolean isEnabled() { return enabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.dataflow.v1beta3.ExecutionState getState();", "public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}", "int getExecutionStageStateValue();", "public ExecutionStatus status() {\n return this.status;\n }", "com.google.dataflow.v1beta3.JobState getExec...
[ "0.7724218", "0.7222217", "0.7048426", "0.69132274", "0.6535587", "0.64675564", "0.6419594", "0.6419594", "0.6419594", "0.6419594", "0.6419594", "0.6419594", "0.6393492", "0.6393492", "0.6377041", "0.6376654", "0.6376654", "0.6376654", "0.6376654", "0.63741374", "0.6350126", ...
0.0
-1
Main method to handle Kabasuji launch.
public static void main(String[] args) { // Define new Runnable for splash screen execution EventQueue.invokeLater(new Runnable() { SplashScreenView splash; Timer timer; public void run() { try { // Create splash screen boundary object and set visible splash = new SplashScreenView(); splash.setVisible(true); // Begin timer for 2 seconds to display timer = new Timer(2000, new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { // Create event on timer completion that hide the splash screen, and creates // the Kabasuji and corresponding view for interactions splash.setVisible(false); Kabasuji game = new Kabasuji(); LevelSelectorView window = new LevelSelectorView(game); // allow controller to set up GUI based on the levels loaded by 'game' StartLevelSelectorController selectorController = new StartLevelSelectorController(window, game); selectorController.process(); // show window window.setVisible(true); ImageIcon image = new ImageIcon(StartKabasuji.class.getResource("/images/heineman.jpg")); window.setIconImage(image.getImage().getScaledInstance(40, 40, 0)); System.out.println(image); } }); // Start the timer and ensure it only runs once timer.setRepeats(false); timer.start(); } catch (Exception e) { e.printStackTrace(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tKukaTest app = new KukaTest();\n\t\tapp.runApplication();\n\t}", "public static void main(String[] args) {\n\t\tnew baekjoon_1003().start();\r\n\t}", "public String run(String[] args) throws KatiException;", "public static void main(String[] args) {\n\t\tkhachhan...
[ "0.6527927", "0.6482796", "0.6405571", "0.63180923", "0.6212031", "0.61236537", "0.6123365", "0.60617185", "0.6038907", "0.60302866", "0.60261786", "0.60144246", "0.6011673", "0.6011673", "0.6009098", "0.6009098", "0.6009098", "0.6003651", "0.59821516", "0.5973694", "0.596652...
0.6203626
5
Create event on timer completion that hide the splash screen, and creates the Kabasuji and corresponding view for interactions
@Override public void actionPerformed(ActionEvent e) { splash.setVisible(false); Kabasuji game = new Kabasuji(); LevelSelectorView window = new LevelSelectorView(game); // allow controller to set up GUI based on the levels loaded by 'game' StartLevelSelectorController selectorController = new StartLevelSelectorController(window, game); selectorController.process(); // show window window.setVisible(true); ImageIcon image = new ImageIcon(StartKabasuji.class.getResource("/images/heineman.jpg")); window.setIconImage(image.getImage().getScaledInstance(40, 40, 0)); System.out.println(image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Over...
[ "0.6547536", "0.6275502", "0.6232882", "0.62045616", "0.6129135", "0.611557", "0.60565037", "0.603931", "0.60376436", "0.6003017", "0.59721994", "0.59624666", "0.5948703", "0.5918426", "0.5909287", "0.5908868", "0.59032255", "0.5899634", "0.5893649", "0.5867009", "0.58652216"...
0.0
-1
We need an Editor object to make preference changes. All objects are from android.context.Context
public void save() { SharedPreferences settings = activity.getSharedPreferences("Preferences", 0); SharedPreferences.Editor editor = settings.edit(); editor.putLong("bestDistance", values.bestDistance); // Commit the edits! editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static SharedPreferences.Editor getEditor(Context context) {\n SharedPreferences preferences = getSharedPreferences(context);\n return preferences.edit();\n }", "protected abstract IEditorPreferences getPreferences();", "protected void makePref(){\n //Creates a shared pref calle...
[ "0.72536427", "0.71356416", "0.66912305", "0.66049314", "0.65608144", "0.64130306", "0.61977994", "0.61052585", "0.6029771", "0.5971172", "0.5949762", "0.5902606", "0.58971465", "0.5893819", "0.58930033", "0.5871908", "0.5841953", "0.5804051", "0.58006644", "0.5741387", "0.57...
0.0
-1
/ FF_Achievement.reset(this.currentDistanceAchievements); FF_Achievement.reset(this.currentTimeAchievements); FF_Achievement.reset(this.totalDistanceAchievements); FF_Achievement.reset(this.totalTimeAchievements); FF_Achievement.reset(this.speedStartAchievements); FF_Achievement.reset(this.gameOverAchievements); FF_Achievement.reset(this.calmAchievements); this.values.reset();
private void resetStats() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;...
[ "0.703172", "0.6809876", "0.6671252", "0.6666957", "0.6653018", "0.6616174", "0.6579684", "0.65694284", "0.65431094", "0.65284085", "0.6498409", "0.648774", "0.6462027", "0.64509964", "0.6433063", "0.6429953", "0.64252967", "0.64007604", "0.6365526", "0.63544244", "0.635336",...
0.6777623
2
/ Muestra el toolbar con diferentes caracteristicas
public void showToolbar(String title, Boolean upButton) { Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setTitle(title); getSupportActionBar().setDisplayHomeAsUpEnabled(upButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANT...
[ "0.77300465", "0.7589351", "0.7198911", "0.7189479", "0.7184638", "0.7169275", "0.7150357", "0.7101279", "0.70523894", "0.70170814", "0.69714946", "0.6893788", "0.6860478", "0.683289", "0.6813613", "0.67798316", "0.67722934", "0.676744", "0.67199355", "0.6709648", "0.6705933"...
0.0
-1
main method for the system
public static void main(String[] args) { MUI mg = MUI.getInstance(); mg.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main()\n\t{\n\t}", "public static void main(){\n\t}", "public static void main() {\n \n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args){\n var system = VacSys.getInstance();\n system.main();\n ...
[ "0.7533558", "0.751465", "0.7363402", "0.72361195", "0.7232468", "0.72209895", "0.72126216", "0.72046685", "0.72042584", "0.7176694", "0.7158451", "0.7154151", "0.7140927", "0.7140927", "0.71326774", "0.7113623", "0.7113623", "0.71124554", "0.7110431", "0.70987695", "0.709290...
0.0
-1
temp use for test_data
public LabelItem GetTestdataByNewsID(long news_id, String news_source){ queryString = "SELECT * FROM test_data where news_id="+news_id+" and news_source=\""+news_source+"\""; System.out.println(queryString); try{ List rows = jdbcTemplate.queryForList(queryString); int isEvent = 0; String newsSource; String newsID ; String newsTitle ; String labelID; if(rows.size()>0){ Map line = (Map)rows.get(0); labelID = Long.toString((long)line.get("label_id")); newsSource = (String)line.get("news_source"); newsID = Long.toString((long)line.get("news_id")); newsTitle = (String)line.get("news_title"); isEvent = (boolean)line.get("if_event")==true?1:0; if(newsSource == null||newsID == null || newsTitle == null) System.out.println("Something null from DB"); LabelItem label; if(isEvent == 0) label= new LabelItem(labelID,newsSource,newsID,newsTitle); else // public LabelItem(String labelID,String newsSource,String newsID,String newsTitle,int eventType, // String sourceActor,String targetActor,String triggerWord, // String eventTime,String eventLocation) { label = new LabelItem(labelID,newsSource,newsID, newsTitle, (int)line.get("event_type"), (String)line.get("source_actor"), (String)line.get("target_actor"), (String)line.get("trigger_word"), (String)line.get("source_actorPro"), (String)line.get("target_actorPro"), (String)line.get("event_date"), (String)line.get("event_location"),(String)line.get("actor_index"), (String)line.get("actor_len"),(String)line.get("actor_Pro"),(String)line.get("actor")); } int if_remark=(boolean)line.get("if_remark")==true?1:0; label.if_remark = if_remark; return label; } } catch(Exception e) { e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSetBasedata() {\n }", "private void setTestData() {\n\t\tCollections.shuffle(input);\n\t\ttestData = new LinkedList<>();\n\t\tfor (int i = 0; i < TEST_DATA_SIZE; i++) {\n\t\t\ttestData.add(input.remove(0));\n\t\t}\n\t}", "private void createTestData() {\n for (int i = startKey; i < st...
[ "0.685948", "0.68399477", "0.67356956", "0.66932523", "0.64746654", "0.64458275", "0.64347553", "0.6434709", "0.6378684", "0.6375665", "0.6274806", "0.6269512", "0.6245023", "0.6236223", "0.6192052", "0.6182592", "0.6099372", "0.6052987", "0.60508853", "0.6049725", "0.604479"...
0.0
-1
NEED TO CHANGE the context based on site context
public String getContextUrl() { String currentURL = driver.getCurrentUrl(); return currentURL.substring(0, currentURL.lastIndexOf("/login")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void changeContext(){\n MainWorkflow.observeContexts(generateRandom(24,0));\n }", "public void setContext(Context context) {\n this.contextMain = context;\n }", "@Override\n public void setPageContext(PageContext arg0) {\n \n }", "public void setContext(String...
[ "0.6578683", "0.6154172", "0.6154157", "0.60591376", "0.6048654", "0.6048654", "0.6037914", "0.60077584", "0.5992431", "0.599226", "0.5975221", "0.59684885", "0.59392405", "0.5892388", "0.57604957", "0.5758895", "0.5748804", "0.57388145", "0.5719356", "0.5712662", "0.56813586...
0.0
-1
Logout by clicking on "Sign out" option in global navigation
public void logOut() { try { // getGlobalNavigation().clickSignOut(); } catch (TimeoutException e) { Log.log("logOut", "page loads for more than 30 seconds", true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void logout() {\n click(MY_ACCOUNT_DROPDOWN);\n click(LOGOUT_BUTTON);\n }", "public static void signOut(){\n\t\tActions action_logout = new Actions(driver);\n\t\tWebElement UI = driver.findElement(By.id(\"UserNavigationTabsContainer\"));\n\t\taction_logout.moveToElement(UI).build()...
[ "0.84703135", "0.8437245", "0.8256541", "0.81101626", "0.79252553", "0.7829906", "0.7801721", "0.78010285", "0.7790707", "0.7769034", "0.7756909", "0.7743129", "0.7742531", "0.77294385", "0.77142376", "0.7712635", "0.77061653", "0.7704708", "0.7664575", "0.7640767", "0.763978...
0.8067558
4
returns the whole array of letters instead of a single element
public char[] getLettersArray() { return this.letters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getLettersOfAllGames(){\n String[] letters = new String[9];\n int z = 0;\n for (SmallGameBoard game: getAllGames()) {\n String letter = game.getLetterOfWinner();\n letters[z] = letter;\n z++;\n }\n return letters;\n }", "publi...
[ "0.7206106", "0.6940689", "0.6883747", "0.6863956", "0.6750342", "0.6707989", "0.6683478", "0.65632755", "0.653006", "0.6412558", "0.6341738", "0.634044", "0.633774", "0.6327869", "0.6291713", "0.62657696", "0.6181741", "0.61463267", "0.61435795", "0.61142546", "0.61071897", ...
0.7496848
0
returns the whole array of foreground colors instead of a single element
public Color[] getTextColorsArray() { return this.textColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color getForeground();", "public Color[] getColors();", "public Color getForegroundColor()\n {\n return foregroundColor;\n }", "public Color[] getExperimentColors();", "public Color[] getColors()\n {\n return colors;\n }", "public String[] getColour()\n {\n return...
[ "0.7404484", "0.731635", "0.70416456", "0.6902202", "0.67455226", "0.66923404", "0.6622977", "0.65918165", "0.6563179", "0.65537834", "0.6507809", "0.6475311", "0.64145297", "0.640339", "0.6367111", "0.6363809", "0.6362774", "0.63620365", "0.6337926", "0.6319644", "0.6273074"...
0.67908704
4
returns the whole array of foreground colors instead of a single element
public Color[] getBackgroundColorsArray() { return this.BackgroundColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color getForeground();", "public Color[] getColors();", "public Color getForegroundColor()\n {\n return foregroundColor;\n }", "public Color[] getExperimentColors();", "public Color[] getTextColorsArray() {\n\t\treturn this.textColor;\n\t}", "public Color[] getColors()\n {\n ...
[ "0.7404014", "0.73176295", "0.70407784", "0.69039845", "0.67914855", "0.67464346", "0.66933876", "0.6622563", "0.6592587", "0.6554536", "0.650916", "0.64767534", "0.64158565", "0.64038676", "0.6369032", "0.63657194", "0.6363448", "0.6363346", "0.63388085", "0.6320607", "0.627...
0.6564563
9
Returns the index of cell with given coordinates. For testing.
public int getCellIndex(int column, int row) { return ((row - 1) * width) + (column - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cell getCellAt(Coord coord);", "Coordinates getCoordinates(int rowIndex);", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "public int getLocation(int x, int y) {\n\t\tret...
[ "0.6842215", "0.66940904", "0.66864693", "0.65494937", "0.65261006", "0.6433816", "0.6347181", "0.633033", "0.6312619", "0.6303272", "0.62605226", "0.625752", "0.62573916", "0.62545425", "0.62129843", "0.6208332", "0.61585367", "0.6150249", "0.61341757", "0.61115104", "0.6101...
0.6491856
5
void onOptionMenuClicked(List journalUids, String deletFrom);
void setUpLinearManager();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onMenuItemClicked();", "public void menuClicked(MenuItem menuItemSelected);", "void onListClick();", "@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "static void listerMenu() {\n System.out.println(\n ...
[ "0.62986624", "0.62113726", "0.6191257", "0.6187195", "0.60746425", "0.59932446", "0.5984029", "0.5945717", "0.5933598", "0.58929974", "0.5813235", "0.5795471", "0.5760967", "0.5731538", "0.57233286", "0.56764394", "0.56718975", "0.5657297", "0.5653664", "0.56497896", "0.5638...
0.0
-1
Creates a new NumberExpression equal to the value of number parsed as a String
public NumberExpression(String value) { this(new BigDecimal(value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNumber() {\n\t\tString value = \"\";\n\t\tvalue += data[currentIndex++];\n\t\t// minus is no longer allowed\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isDigit(data[currentIndex])) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\tif (currentIndex + 1 < data.length && (data[...
[ "0.6968348", "0.67977333", "0.63743687", "0.6338512", "0.63099754", "0.6308128", "0.61819077", "0.6174498", "0.61118954", "0.6103489", "0.6103363", "0.60542953", "0.6002323", "0.596621", "0.596621", "0.596621", "0.59627277", "0.59115416", "0.58998394", "0.5890038", "0.5882711...
0.76049757
0
Metodo per generare la differenza tra il budget aspettato ed il budget effettivo
@Override public Map<Tag, Double> report() { Map<Tag,Double> result = new HashMap<>(); budget.getTags().stream() .forEach(t->result.put(t,ledger.getSingleTag(t.getID()).getTotalAmount()-budget.getExpected(t))); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n ...
[ "0.6604096", "0.6236487", "0.62006897", "0.61724824", "0.61350536", "0.6120399", "0.6061581", "0.60579485", "0.6023471", "0.6003249", "0.5991516", "0.599086", "0.5967932", "0.591352", "0.58913237", "0.5887502", "0.58639926", "0.58570117", "0.5835701", "0.58097345", "0.5807022...
0.0
-1
Metodo per ritornare il ledger
@Override public Ledger getLedger() { return ledger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordLedger getLedger();", "public LedgerRec updateLedger(LedgerRec ledger, String pg) {\n LOGGER.log(INFO, \"setup.updateLedger called with {0}\", ledger);\n ledger = this.configDM.updateLedger(ledger, pg);\n return ledger;\n }", "messages.Ledgerinterface.LedgerInterface getLedger();...
[ "0.6208863", "0.5980511", "0.59252965", "0.5661546", "0.55018204", "0.5444753", "0.5430924", "0.5420677", "0.5383696", "0.527755", "0.5259451", "0.5256308", "0.5225807", "0.51677865", "0.5108982", "0.50921375", "0.50704616", "0.5066139", "0.5064503", "0.5061379", "0.5057017",...
0.58128095
3
Metodo per ritornare il budget
@Override public Budget getBudget() { return budget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getBudget() {\n return budget;\n }", "private static void setBudget() {\n\t\tSystem.out.println(\"How much is the budget:\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tbudget = input;\n\t\tSystem.out.println(\"Budget Entry successfull:\"+budget)...
[ "0.6983155", "0.6923078", "0.686336", "0.66445696", "0.6566476", "0.64136463", "0.64005315", "0.63504434", "0.6198684", "0.6156188", "0.61177874", "0.6105393", "0.6090048", "0.60795826", "0.6037123", "0.6031654", "0.60093945", "0.6009199", "0.59860814", "0.598301", "0.5931353...
0.64586765
5
Load a Term given its Domain and Text
public boolean load (JDCConnection oConn, int iIdDomain, String sTxTerm) throws SQLException { boolean bRetVal; PreparedStatement oStmt = oConn.prepareStatement( "SELECT "+DB.gu_term+" FROM "+DB.k_thesauri+" WHERE "+DB.id_domain+"=? AND "+DB.tx_term+"=?", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); oStmt.setInt(1, iIdDomain); oStmt.setString(2, sTxTerm); ResultSet oRSet = oStmt.executeQuery(); if (oRSet.next()) { String sGuTerm = oRSet.getString(1); oRSet.close(); oStmt.close(); bRetVal = super.load(oConn, new Object[]{sGuTerm}); } else { bRetVal = false; oRSet.close(); oStmt.close(); } return bRetVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TermData(String term)\n\t{\n\t\tthis.term = term;\n\t}", "public void setTermText(String text) {\n termText = text;\n termBuffer = null;\n }", "public static String getIdFromText(JDCConnection oConn, int iDomainId, String sTermText)\r\n throws SQLException {\r\n return DBPersist.getUIdFromN...
[ "0.5943985", "0.587469", "0.5661168", "0.5610166", "0.5546345", "0.5519919", "0.5408708", "0.53739256", "0.52638745", "0.5230922", "0.5193359", "0.5165258", "0.5125446", "0.5065412", "0.5060659", "0.50384647", "0.502738", "0.5023926", "0.49945226", "0.49774384", "0.4957877", ...
0.5648742
3
load Delete a Term and all its synonyms
public boolean delete (JDCConnection oConn) throws SQLException { return Term.delete(oConn, getString(DB.gu_term)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteFromTrie( URI uri) {\n DocumentImpl doc = (DocumentImpl) getDocument(uri);\n if (doc != null) {\n // HashTable wordMap = doc.getWordMap();\n String[] strArray = doc.getDocumentAsTxt().split(\" \");\n for (String word: strArray) {\n //...
[ "0.61289227", "0.60834396", "0.5998394", "0.57816094", "0.56668353", "0.56173265", "0.55740696", "0.55159813", "0.5452621", "0.5444543", "0.5440829", "0.5399109", "0.53984785", "0.53859794", "0.5331481", "0.53310543", "0.53229874", "0.53223294", "0.5270648", "0.51968116", "0....
0.54506797
9
Delete a Term and all its synonyms
public static boolean delete (JDCConnection oConn, String sTermGUID) throws SQLException { if (DebugFile.trace) { DebugFile.writeln("Begin Term.delete([Connection], " + sTermGUID + ")"); DebugFile.incIdent(); } Statement oUpdt = oConn.createStatement(); if (DBBind.exists(oConn, DB.k_companies, "U")) { if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(UPDATE " + DB.k_companies + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "')"); oUpdt.executeUpdate("UPDATE " + DB.k_companies + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "'"); } if (DBBind.exists(oConn, DB.k_contacts, "U")) { if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(UPDATE " + DB.k_contacts + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "')"); oUpdt.executeUpdate("UPDATE " + DB.k_contacts + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "'"); } if (DBBind.exists(oConn, DB.k_member_address, "U")) { if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(UPDATE " + DB.k_member_address + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "')"); oUpdt.executeUpdate("UPDATE " + DB.k_member_address + " SET " + DB.gu_geozone + "=NULL WHERE " + DB.gu_geozone + "='" + sTermGUID + "'"); } oUpdt.close(); // Find root term Statement oStmt = oConn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery(SELECT " + DB.gu_rootterm + " FROM " + DB.k_thesauri + " WHERE " + DB.gu_term + "='" + sTermGUID + "')"); ResultSet oRSet = oStmt.executeQuery("SELECT " + DB.gu_rootterm + " FROM " + DB.k_thesauri + " WHERE " + DB.gu_term + "='" + sTermGUID + "'"); boolean bExists = oRSet.next(); String sRootTerm = null; if (bExists) sRootTerm = oRSet.getString(1); oRSet.close(); oStmt.close(); if (!bExists) return false; Term oDlte = new Term(); oDlte.load(oConn, new Object[]{sTermGUID}); String sTermN = DB.id_term + String.valueOf(oDlte.level()-1); oStmt = oConn.createStatement(); // Delete Synonyms if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_thesauri + " WHERE " + DB.gu_synonym + "='" + sTermGUID + "')"); oStmt.executeUpdate("DELETE FROM " + DB.k_thesauri + " WHERE " + DB.gu_synonym + "='" + sTermGUID + "'"); // Delete Term and Childs if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_thesauri + " WHERE " + sTermN + "=" + String.valueOf(oDlte.getInt(sTermN)) + " AND " + DB.id_domain + "=" + oDlte.getInt(DB.id_domain) + ")"); oStmt.executeUpdate("DELETE FROM " + DB.k_thesauri + " WHERE " + sTermN + "=" + String.valueOf(oDlte.getInt(sTermN)) + " AND " + DB.id_domain + "=" + oDlte.getInt(DB.id_domain)); // Delete root entry if term is a root one if (sRootTerm.equals(sTermGUID)) oStmt.executeUpdate("DELETE FROM " + DB.k_thesauri_root + " WHERE " + DB.gu_rootterm + "='" + sTermGUID + "'"); oStmt.close(); if (DebugFile.trace) { DebugFile.decIdent(); DebugFile.writeln("End Term.delete([Connection])"); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteKeyword(String name);", "public void removeTerm(String name) {\n ArrayList<String> temp = new ArrayList<>();\n\n for (Term t: listOfTerms) {\n String termName = t.getTermName();\n temp.add(termName);\n }\n\n int index = temp.indexOf(name);\n lis...
[ "0.63075876", "0.62166476", "0.62157863", "0.60059416", "0.58864844", "0.5866316", "0.5768982", "0.5734082", "0.57293665", "0.56917053", "0.5638734", "0.5612726", "0.56042695", "0.5602687", "0.5601801", "0.5595592", "0.5542302", "0.5533745", "0.5530699", "0.5529041", "0.55100...
0.5033709
50
Get term level [1..10]
public int level () { int iLevel; if (isNull("id_term1")) iLevel = 1; else if (isNull("id_term2")) iLevel = 2; else if (isNull("id_term3")) iLevel = 3; else if (isNull("id_term4")) iLevel = 4; else if (isNull("id_term5")) iLevel = 5; else if (isNull("id_term6")) iLevel = 6; else if (isNull("id_term7")) iLevel = 7; else if (isNull("id_term8")) iLevel = 8; else if (isNull("id_term9")) iLevel = 9; else iLevel = 10; return iLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int level();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "double getLevel();", "double getLevel();", "public int getLevel()\r\n {\r\n return r_level;\r\n }", "public int getMaxLevel() {\n\t\treturn 10;\n\t}", "...
[ "0.6658298", "0.66222304", "0.66222304", "0.66222304", "0.66222304", "0.66222304", "0.64927816", "0.64927816", "0.62941647", "0.62895507", "0.6281768", "0.6264111", "0.62455887", "0.6227433", "0.62215954", "0.6212178", "0.6209876", "0.6204346", "0.619755", "0.6194614", "0.619...
0.793765
0
Get term numeric Id.
public int id () { int iId; if (isNull("id_term1")) iId = getInt(DB.id_term+"0"); else if (isNull("id_term2")) iId = getInt(DB.id_term+"1"); else if (isNull("id_term3")) iId = getInt(DB.id_term+"2"); else if (isNull("id_term4")) iId = getInt(DB.id_term+"3"); else if (isNull("id_term5")) iId = getInt(DB.id_term+"4"); else if (isNull("id_term6")) iId = getInt(DB.id_term+"5"); else if (isNull("id_term7")) iId = getInt(DB.id_term+"6"); else if (isNull("id_term8")) iId = getInt(DB.id_term+"7"); else if (isNull("id_term9")) iId = getInt(DB.id_term+"8"); else iId = getInt(DB.id_term+"9"); return iId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.Integer getTerm() {\n return term;\n }", "public java.lang.Integer getTerm() {\n return term;\n }", "int getTermIdFromIndex(int index) {\n return terms.get(index).getId();\n }", "public int getIdTerm(String term) {\n int idTerm = Search.NOTFOUND.getValue();\n ...
[ "0.68972623", "0.68583304", "0.6842326", "0.67040664", "0.6521353", "0.6368159", "0.6274043", "0.62616915", "0.6257694", "0.6214975", "0.62124574", "0.6131477", "0.61204183", "0.61000526", "0.608981", "0.60738456", "0.60109115", "0.60054886", "0.5983234", "0.5959939", "0.5928...
0.75654554
0
Get Term Parent GUID
public String getParent (JDCConnection oConn) throws SQLException { int iLevel; String sParentId; if (DebugFile.trace) { DebugFile.writeln("Begin Term.getParent([Connection])"); DebugFile.incIdent(); } iLevel = level(); Statement oStmt; ResultSet oRSet; if (1==iLevel) { sParentId = null; } else if (2==iLevel) { sParentId = getString(DB.gu_rootterm); } else { oStmt = oConn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery(SELECT " + DB.gu_term + " FROM " + DB.k_thesauri + " WHERE " + DB.id_term + String.valueOf(iLevel-2) + "=" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + " AND " + DB.id_term + String.valueOf(iLevel-1) + " IS NULL)"); oRSet = oStmt.executeQuery("SELECT " + DB.gu_term + " FROM " + DB.k_thesauri + " WHERE " + DB.id_term + String.valueOf(iLevel-2) + "=" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + " AND " + DB.id_term + String.valueOf(iLevel-1) + " IS NULL"); if (oRSet.next()) sParentId = oRSet.getString(1); else sParentId = null; oRSet.close(); oStmt.close(); if (null==sParentId) throw new SQLException ("Parent key " + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + " not found"); } if (DebugFile.trace) { DebugFile.decIdent(); DebugFile.writeln("End Term.getParent() : " + sParentId); } return sParentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();", "@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();", "public Integer getParentTid() {\r\n return parentTid;\r\n }", "String getFull...
[ "0.6858458", "0.6832376", "0.6614043", "0.63409793", "0.63409424", "0.63259953", "0.63015515", "0.6224718", "0.62197065", "0.6209471", "0.6118256", "0.60847807", "0.60847807", "0.6012993", "0.60065526", "0.60007", "0.6000276", "0.599514", "0.5973169", "0.5973169", "0.5973169"...
0.616785
10
browse Get child terms for this term.
public LinkedList getChilds (JDCConnection oConn, int iScope) throws SQLException { LinkedList oTermsList = new LinkedList(); if (isNull(DB.gu_term)) { if (DebugFile.trace) DebugFile.writeln("ERROR - Term.getChilds() Attemped to get childs of an unloaded Term."); throw new NullPointerException("Term.getChilds() Attemped to get childs of an unloaded Term"); } // *************************** // Get k_thesauri columns list Statement oStmt = oConn.createStatement(); ResultSet oRSet = oStmt.executeQuery("SELECT * FROM " + DB.k_thesauri + " WHERE 1=0"); ResultSetMetaData oMDat = oRSet.getMetaData(); int iCols = oMDat.getColumnCount(); String[] aColArray = new String[iCols]; StringBuffer sColList = new StringBuffer(32*iCols); for (int c=0; c<iCols; c++) { aColArray[c] = oMDat.getColumnName(c+1).toLowerCase(); sColList.append(aColArray[c]); if (c!=iCols-1) sColList.append(","); } oRSet.close(); oStmt.close(); // End get columns list // ******************** browse (oConn, iScope, oTermsList, sColList.toString(), aColArray); return oTermsList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public List<File> getValues(final String term) throws IOException {\n {\r\n File file = new File(term);\r\n // is a directory -> get all children\r\n if (file.exists() && file.isDirectory()) {\r\n return children(file, fileFilter);\r\n ...
[ "0.5853043", "0.5743984", "0.5682743", "0.56641906", "0.56444955", "0.5625452", "0.56221443", "0.5588074", "0.55866015", "0.55706066", "0.5490959", "0.5449764", "0.5444736", "0.5441363", "0.5436639", "0.5413999", "0.54076785", "0.540619", "0.5406013", "0.5392869", "0.5381302"...
0.64017934
0
getChilds Check whether or not this term is child or grand child of another parent term
public boolean isGrandChildOf(JDCConnection oConn, int iIdDomain, String sTxParent) throws SQLException { String sParentGUID = Term.getIdFromText(oConn, iIdDomain, sTxParent); if (null==sParentGUID) throw new SQLException("Term.isGrandChildOf("+sTxParent+") Parent was not found"); Term oParent = new Term(); oParent.load(oConn, sParentGUID); int iParentId = oParent.id(); boolean bIsGrandChild=false; for (int l=1; l<level() && !bIsGrandChild; l++) bIsGrandChild = (getInt(DB.id_term+String.valueOf(l))==iParentId); return bIsGrandChild; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isChild();", "boolean hasChildren();", "public boolean hasSubTaxa() {\n\t\treturn !children.isEmpty();\n\t}", "public boolean isChild(){\r\n return(leftleaf == null) && (rightleaf == null)); \r\n }", "public boolean containsChild() {\n return !(getChildList().isEmpty());\n }", ...
[ "0.6566249", "0.6063993", "0.60596365", "0.6053957", "0.59111804", "0.586059", "0.5819632", "0.5819632", "0.5797324", "0.57600206", "0.57599044", "0.57510835", "0.5715705", "0.57043993", "0.5695609", "0.56536514", "0.5608198", "0.55954987", "0.5574824", "0.5574824", "0.556312...
0.55740565
20
isGrandChildOf Get a term GUID given its exact singular or plural name
public static String getIdFromText(JDCConnection oConn, int iDomainId, String sTermText) throws SQLException { return DBPersist.getUIdFromName(oConn, new Integer(iDomainId), sTermText, "k_get_term_from_text"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean isChildOf(String tokId) {\n return getAncestors().contains(tokId);\n }", "public boolean isGrandChildOf(JDCConnection oConn, int iIdDomain, String sTxParent)\r\n throws SQLException {\r\n String sParentGUID = Term.getIdFromText(oConn, iIdDomain, sTxParent);\r\n if (null==sParen...
[ "0.6039293", "0.5756812", "0.53202266", "0.5319192", "0.51592183", "0.5025844", "0.49425697", "0.48489904", "0.48420304", "0.47726542", "0.47573432", "0.47568798", "0.47539577", "0.47414526", "0.4710051", "0.470151", "0.46753815", "0.46753034", "0.46745437", "0.4673265", "0.4...
0.0
-1
/Stream.of("jatinder,jatinder","lovely,lovely") .map(cred > cred.split(",")) .forEach(tpl > this.accountRepository.save( new Account(tpl[0], tpl[1], true)));
@Override public void run(String... strings) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<CustomerOrder> save(Iterable<CustomerOrder> entities);", "void transferOwnerShipToUser(List<String> list, String toEmail);", "private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialize...
[ "0.54664725", "0.5031396", "0.50278133", "0.49827126", "0.4973579", "0.4935683", "0.49284175", "0.48765272", "0.48564133", "0.48455358", "0.48399162", "0.48177433", "0.4803889", "0.4799353", "0.47991285", "0.47953486", "0.47898534", "0.47744432", "0.4771716", "0.47523656", "0...
0.0
-1
TODO : Put in DrawTexture
private static DrawTexture castToDrawTexture(String name, Object objectToCast, MathVector2D<Double> percentCoordinates, Double[] percentDimensions) { if (objectToCast instanceof String) { System.out.println("TRYING TO LOAD:" + objectToCast); return new DrawTexture(name, (String) objectToCast, percentCoordinates, percentDimensions); } else if (objectToCast instanceof DrawFrame) { return new DrawTexture(name, (DrawFrame) objectToCast, percentCoordinates, percentDimensions); } else if (objectToCast instanceof DrawObject) { return new DrawTexture(name, ((DrawObject) objectToCast).getCurrentFrame(), percentCoordinates, percentDimensions); } else { throw new IllegalArgumentException("Parameter 'objectToCast' must be of type STRING, DRAWFRAME, or DRAWOBJECT."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void renderTex() {\n final float\n w = xdim(),\n h = ydim(),\n x = xpos(),\n y = ypos() ;\n GL11.glBegin(GL11.GL_QUADS) ;\n GL11.glTexCoord2f(0, 0) ;\n GL11.glVertex2f(x, y + (h / 2)) ;\n GL11.glTexCoord2f(0, 1) ;\n GL11.glVertex2f(x + (w / 2), y + h) ;\n GL11.glTex...
[ "0.6970394", "0.6947981", "0.6900444", "0.6814628", "0.68049157", "0.67818564", "0.6745278", "0.67267567", "0.66191816", "0.66003793", "0.6592635", "0.65826946", "0.6577602", "0.6533228", "0.6519129", "0.65082747", "0.6499715", "0.6442203", "0.6433597", "0.638843", "0.6368766...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private static String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7884755", "0.7549422", "0.749723", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", "0.74614984", ...
0.0
-1
Parse the input file
public void readFile(String file) throws FileNotFoundException { sc = new Scanner(new File(file)); String firstLine = sc.nextLine(); String [] breakFirstLine = firstLine.split(" "); villages = Integer.parseInt(breakFirstLine[0]); lines = Integer.parseInt(breakFirstLine[1]); System.out.println("villages: " + villages + "\nlines: " + lines); String line = ""; // current line while(sc.hasNextLine()) { line = sc.nextLine(); System.out.println(line); String[] breaks = line.split(" "); String city1 = breaks[0]; String city2 = breaks[1]; String col = breaks[2]; color = color(col); String route = breaks[3]; transit = transit(route); Village a = new Village(city1); Village b = new Village(city2); Edge e = new Edge(a, b, transit, color); a.addEdge(e); b.addEdge(e); g.addEdge(e); vertices.add(a); last_transit = transit; last_color = color; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (lin...
[ "0.72786397", "0.7122642", "0.7112573", "0.70836025", "0.681057", "0.676079", "0.67358655", "0.67190546", "0.66620725", "0.65588194", "0.6519947", "0.64617187", "0.6414914", "0.63922536", "0.637384", "0.6366433", "0.631871", "0.6315638", "0.63018435", "0.6301154", "0.63003606...
0.0
-1
Display each vertex's neighbors
public void neighhbors(Village vertex) { Iterable<Edge> neighbors = g.getNeighbors(vertex); System.out.println("------------"); System.out.println("vertex: " + vertex.getName()); for(Edge e : neighbors) { System.out.println("edge: " + e.getName()); System.out.println("transit: " + e.getTransit() + " color: " + e.getColor()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j...
[ "0.69852906", "0.6877709", "0.6769449", "0.6758773", "0.6747289", "0.66782343", "0.6677583", "0.66727906", "0.66592085", "0.6642427", "0.66225904", "0.66118175", "0.6608304", "0.65823215", "0.6556515", "0.6474314", "0.6459874", "0.6443988", "0.6443327", "0.6441163", "0.642672...
0.70639473
0
write your code in Java SE 8
public int solution(int[] A) { int N = A.length; int[] s1 = new int[N]; int[] s2 = new int[N]; for (int i = 1; i < N - 1; i++) { s1[i] = Math.max(0, s1[i - 1] + A[i]); } for (int i = N - 2; i > 0; i--) { s2[i] = Math.max(0, s2[i + 1] + A[i]); } int max = 0; for (int i = 1; i < N - 1; i++) { max = Math.max(max, s1[i - 1] + s2[i + 1]); } return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\...
[ "0.5890391", "0.58054996", "0.57008785", "0.56167847", "0.54946315", "0.54761344", "0.524263", "0.52340496", "0.5233149", "0.52029705", "0.5160466", "0.51574665", "0.5143396", "0.5094738", "0.5084682", "0.5069909", "0.50661004", "0.50645214", "0.5064437", "0.50475377", "0.504...
0.0
-1
Simplified version from CSE 593 Univ. of Washington Distributed System in Java. failure reporting is done using two pieces, exceptions and boolean return values. Exceptions are used for systemy things. Return values are used for operations that would affect the consistency If there is a boolean return value and you're not sure how it would be used in your implementation, ignore it. I used boolean return values in the interface generously to allow flexibility in implementation. But don't forget to return true when the operation has succeeded.
public interface IMiddlewareResourceManager extends Remote, IProxiable { /** * Add seats to a flight. * <p> * In general this will be used to create a new * flight, but it should be possible to add seats to an existing flight. * Adding to an existing flight should overwrite the current price of the * available seats. * * @return Success */ public boolean addFlight(int id, int flightNum, int flightSeats, int flightPrice) throws RemoteException, DeadlockException; /** * Add car at a location. * <p> * This should look a lot like addFlight, only keyed on a string location * instead of a flight number. * * @return Success */ public boolean addCars(int id, String location, int numCars, int price) throws RemoteException, DeadlockException; /** * Add room at a location. * <p> * This should look a lot like addFlight, only keyed on a string location * instead of a flight number. * * @return Success */ public boolean addRooms(int id, String location, int numRooms, int price) throws RemoteException, DeadlockException; /** * Add customer. * * @return Unique customer identifier */ public int newCustomer(int id) throws RemoteException, DeadlockException; /** * Add customer with id. * * @return Success */ public boolean newCustomer(int id, int cid) throws RemoteException, DeadlockException; /** * Delete the flight. * <p> * deleteFlight implies whole deletion of the flight. If there is a * reservation on the flight, then the flight cannot be deleted * * @return Success */ public boolean deleteFlight(int id, int flightNum) throws RemoteException, DeadlockException; /** * Delete all cars at a location. * <p> * It may not succeed if there are reservations for this location * * @return Success */ public boolean deleteCars(int id, String location) throws RemoteException, DeadlockException; /** * Delete all rooms at a location. * <p> * It may not succeed if there are reservations for this location. * * @return Success */ public boolean deleteRooms(int id, String location) throws RemoteException, DeadlockException; /** * Delete a customer and associated reservations. * * @return Success */ public boolean deleteCustomer(int id, int customerID) throws RemoteException, DeadlockException; /** * Query the status of a flight. * * @return Number of empty seats */ public int queryFlight(int id, int flightNumber) throws RemoteException, DeadlockException; /** * Query the status of a car location. * * @return Number of available cars at this location */ public int queryCars(int id, String location) throws RemoteException, DeadlockException; /** * Query the status of a room location. * * @return Number of available rooms at this location */ public int queryRooms(int id, String location) throws RemoteException, DeadlockException; /** * Query the customer reservations. * * @return A formatted bill for the customer */ public String queryCustomerInfo(int id, int customerID) throws RemoteException, DeadlockException; /** * Query the status of a flight. * * @return Price of a seat in this flight */ public int queryFlightPrice(int id, int flightNumber) throws RemoteException, DeadlockException; /** * Query the status of a car location. * * @return Price of car */ public int queryCarsPrice(int id, String location) throws RemoteException, DeadlockException; /** * Query the status of a room location. * * @return Price of a room */ public int queryRoomsPrice(int id, String location) throws RemoteException, DeadlockException; /** * Reserve a seat on this flight. * * @return Success */ public boolean reserveFlight(int id, int customerID, int flightNumber) throws RemoteException, DeadlockException; /** * Reserve a car at this location. * * @return Success */ public boolean reserveCar(int id, int customerID, String location) throws RemoteException, DeadlockException; /** * Reserve a room at this location. * * @return Success */ public boolean reserveRoom(int id, int customerID, String location) throws RemoteException, DeadlockException; /** * Reserve a bundle for the trip. * * @return Success */ public boolean bundle(int id, int customerID, Vector<Integer> flightNumbers, String location, boolean car, boolean room) throws RemoteException, DeadlockException; /** * Convenience for probing the resource manager. * * @return Name */ public String getName() throws RemoteException, DeadlockException; public int start() throws RemoteException; public boolean commit(int xid) throws RemoteException, InvalidTransactionException; public boolean abort(int xid) throws RemoteException, InvalidTransactionException; public void shutdown() throws RemoteException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFailure();", "boolean isFail();", "boolean hasErr();", "void notSupported(String errorcode);", "@Override\n boolean canFail() {\n return true;\n }", "boolean processFailure(Throwable t);", "boolean hasError();", "boolean hasError();", "boolean hasError();", "public boolean ...
[ "0.7109935", "0.6918504", "0.64170235", "0.6310887", "0.6298457", "0.62589025", "0.616319", "0.616319", "0.616319", "0.6112124", "0.60303974", "0.6029761", "0.60154957", "0.6001816", "0.59983945", "0.5949608", "0.59192395", "0.59192395", "0.5909743", "0.5881861", "0.586147", ...
0.0
-1
Add seats to a flight. In general this will be used to create a new flight, but it should be possible to add seats to an existing flight. Adding to an existing flight should overwrite the current price of the available seats.
public boolean addFlight(int id, int flightNum, int flightSeats, int flightPrice) throws RemoteException, DeadlockException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean addFlight(int id, int flightNum, int flightSeats, int flightPrice)\n throws RemoteException;", "public AdminModel[] addNewFlight(int flightnumber, String departure, String arrival,\n\t\t\tString departDate, String departTime, String arrivalDate, String arrivalTime,\n\t\t\tint seats, int...
[ "0.69584346", "0.63855433", "0.61285084", "0.61171293", "0.60557485", "0.58778715", "0.5811428", "0.57973677", "0.5785717", "0.5767828", "0.5757022", "0.5719284", "0.5712704", "0.5702086", "0.5688059", "0.56038034", "0.55603665", "0.54889345", "0.547924", "0.54509175", "0.543...
0.6825307
1
Add car at a location. This should look a lot like addFlight, only keyed on a string location instead of a flight number.
public boolean addCars(int id, String location, int numCars, int price) throws RemoteException, DeadlockException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add (Car car){\n\t\t}", "public void addLocation(Location location)\n {\n locationLst.add(location);\n }", "public static void AddLocation(Location location){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(Resul...
[ "0.64018", "0.631533", "0.6191346", "0.6142159", "0.60567814", "0.6042129", "0.60302216", "0.6022999", "0.6007752", "0.5996123", "0.5954988", "0.59527576", "0.59175754", "0.588101", "0.5851016", "0.58318114", "0.58269745", "0.582166", "0.5787731", "0.5783784", "0.5779217", ...
0.632164
1