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
TODO Autogenerated method stub
@Override public int describeContents() { 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 void writeToParcel(Parcel dest, int flags) { dest.writeString(northEastLatitude); dest.writeString(northEastLongitude); dest.writeString(southWestLatitude); dest.writeString(southWestLongitude); dest.writeString(arrivalTimeText); dest.writeString(arrivalTimeZone); dest.writeString(arrivalTimeValue); dest.writeString(departureTimeText); dest.writeString(departureTimeZone); dest.writeString(departureTimeValue); dest.writeString(distanceText); dest.writeString(distanceValue); dest.writeString(durationText); dest.writeString(durationValue); dest.writeString(arrivalAddress); dest.writeString(arrivalLatidute); dest.writeString(arrivalLongitude); dest.writeParcelableArray(stepsInfo.toArray(new RouteVO[stepsInfo.size()]), 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 Class<?> getClassInfo() { return RouteVO.class; }
{ "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
Abstraction of error message and application info processing.
public interface YangAppErrorInfo { /** * Returns the application's error message for data error. * * @return application's error message for data error. */ String getGetErrorMessage(); /** * Sets the application's error message for data error. * * @param errorMessage application's error message for data error. */ void setErrorMessage(String errorMessage); /** * Returns the application's error tag for data error. * * @return application's error tag for data error. */ String getGetErrorAppTag(); /** * Sets the application's error tag for data error. * * @param errorMessage application's error tag for data error. */ void setErrorAppTag(String errorMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void wrapError(String code, String message) {\r\n recentErrorCode = code;\r\n\r\n\t\t/* \r\n\t\t *\t<error>\r\n\t\t *\t\t<code>TEAL_8453</code>\r\n\t\t *\t\t<message>[request_id=201203082] Failed to create a process module by wrong value of a parameter(=topic_id)</message>\r\n\t\t *\t</error>\r\n\t\...
[ "0.63144714", "0.6142387", "0.61192733", "0.59955114", "0.59852093", "0.5913902", "0.5895563", "0.5878832", "0.5873893", "0.58564836", "0.58461756", "0.5835484", "0.58310544", "0.58215815", "0.58203304", "0.5774561", "0.5767843", "0.5764503", "0.57545495", "0.57465076", "0.57...
0.58771354
8
Returns the application's error message for data error.
String getGetErrorMessage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessag...
[ "0.7189802", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.7041286", "0.6996623", "0.69809234", "0.69650155", "0.69650155", "0.69650155", "0.6883689", "0.6880997", "0.6866388",...
0.6526594
76
Sets the application's error message for data error.
void setErrorMessage(String errorMessage);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setError(String message);", "public void putError(String message) {\n errorData.postValue(message);\n }", "void setErrorAppTag(String errorMessage);", "public void setErrorMessage(String msg) {\r\n\t\terrorMessage.setText(msg);\r\n\t}", "public void setErrorMsg(String text) {...
[ "0.73516613", "0.7137393", "0.6950103", "0.6827232", "0.67718667", "0.669761", "0.66890675", "0.666096", "0.6626204", "0.65229386", "0.65225625", "0.6487143", "0.6460068", "0.6411239", "0.63759416", "0.63357824", "0.6333033", "0.6300572", "0.6300572", "0.6300572", "0.62998205...
0.6955433
2
Returns the application's error tag for data error.
String getGetErrorAppTag();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AgnTagErrorKey getErrorKey() {\n\t\treturn errorKey;\n\t}", "void setErrorAppTag(String errorMessage);", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public String getError() {\r\n\t\treturn error;\r\n\t}", "public String getError() {\...
[ "0.65958774", "0.6444902", "0.64232403", "0.63673705", "0.6341282", "0.6341282", "0.6263449", "0.6261371", "0.6261371", "0.6261371", "0.6261371", "0.62503535", "0.62503535", "0.62503535", "0.62158966", "0.62104267", "0.61627865", "0.61466056", "0.6130414", "0.61210203", "0.61...
0.7617492
0
Sets the application's error tag for data error.
void setErrorAppTag(String errorMessage);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void error(String TAG, String value) {\n\t}", "public void setError(ErrorResponse error)\n {\n data().put(_ERROR, error.data());\n }", "public void setError(String error) {\n this.error = error;\n }", "public void setError(String error) {\n this.error = error;\n }", "...
[ "0.6551911", "0.6371979", "0.629838", "0.629838", "0.629838", "0.6266297", "0.61708564", "0.61138034", "0.610691", "0.60626733", "0.60463345", "0.60214394", "0.5994642", "0.59555537", "0.5944804", "0.5936655", "0.5922069", "0.58932745", "0.5879545", "0.5861061", "0.58594286",...
0.787764
0
Creates new form NewWorkerFrame
public NewRoomFrame() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NewFrame() {\n initComponents();\n }", "Frame createFrame();", "public NewJFrame() {\n initComponents();\n \n }", "public NewJFrame() {\n Connect();\n initComponents();\n }", "public NewJFrame() {\r\n initComponents();\r\n }", "FRAME createFRA...
[ "0.67074203", "0.6690583", "0.660508", "0.65429944", "0.65117687", "0.65089124", "0.6479624", "0.6479624", "0.6479624", "0.6479624", "0.6479624", "0.6479624", "0.6479624", "0.6428509", "0.6384794", "0.6373028", "0.6329696", "0.6323149", "0.62763846", "0.626554", "0.6254683", ...
0.5714062
50
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); numTxt = new javax.swing.JTextField(); sitTxt = new javax.swing.JTextField(); priceTxt = new javax.swing.JTextField(); humanTxt = new javax.swing.JTextField(); typeTxt = new javax.swing.JTextField(); save = new javax.swing.JButton(); clear = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("Room Number"); jLabel2.setText("Room Situation"); jLabel3.setText("Room Price"); jLabel4.setText("Human Count"); jLabel5.setText("Room Type"); humanTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { humanTxtActionPerformed(evt); } }); save.setText("Save"); save.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveActionPerformed(evt); } }); clear.setText("Clear"); clear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(70, 70, 70) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)) .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(humanTxt) .addComponent(typeTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(numTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(sitTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(priceTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(45, 45, 45) .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(37, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(42, 42, 42) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(numTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(sitTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(priceTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(humanTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(typeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addGap(51, 51, 51) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(40, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453...
0.0
-1
Created by taras on 4/18/15.
public interface Color { void fill(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Overri...
[ "0.59523743", "0.59035426", "0.5832746", "0.5828886", "0.5786694", "0.5729504", "0.56800216", "0.56800216", "0.5678649", "0.5673723", "0.564558", "0.56184673", "0.56184673", "0.56184673", "0.56184673", "0.56184673", "0.5612442", "0.5608374", "0.56029254", "0.56026703", "0.559...
0.0
-1
TODO Autogenerated method stub
@Override public MemberVO selectMemberazax(HashMap<String, String> param) { return memberDAO.selectMemberazax(param); }
{ "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
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
20
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
82
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.68532145", "0.6843889", "0.57185096", "0.56440794", "0.563", "0.5615971", "0.56071514", "0.5580453", "0.55784947", "0.55773133", "0.5487715", "0.5472419", "0.5464648", "0.54604506", "0.5398757", "0.53913164", "0.5386026", "0.5377525", "0.53717554", "0.5368894", "0.5353499"...
0.68878466
38
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
38
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
38
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
6
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.66233104", "0.65339345", "0.65339345", "0.65339345", "0.6502368", "0.6490189", "0.6490189", "0.6490189", "0.6490189", "0.6490189", "0.64837754", "0.645815", "0.63573897", "0.63072646", "0.62915266", "0.6286955", "0.6286955", "0.62713635", "0.6186821", "0.6142021", "0.61393...
0.59896076
28
Method 0 with the actual generated action code for actions 0 to 300.
public final java_cup.runtime.Symbol CUP$Parser$do_action_part00000000( 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 0: // $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 1: // program ::= classDeclKS { Program RESULT =null; int clleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int clright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; List<ICClass> cl = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Program(cl); 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; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // classDeclKS ::= classDecl { List<ICClass> RESULT =null; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ICClass c = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; List<ICClass> cl = new LinkedList<ICClass>(); cl.add(c); RESULT = cl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDeclKS",41, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // classDeclKS ::= classDeclKS classDecl { List<ICClass> RESULT =null; int clleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int clright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<ICClass> cl = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ICClass c = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; cl.add(c); RESULT = cl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDeclKS",41, ((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 4: // classDeclKS ::= { List<ICClass> RESULT =null; RESULT = new LinkedList<ICClass>(); CUP$Parser$result = parser.getSymbolFactory().newSymbol("classDeclKS",41, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // classDecl ::= CLASS CLASS_ID EXTENDS CLASS_ID LEFT_CUR_PARENTHESES fieldOrMethodKS RIGHT_CUR_PARENTHESES { ICClass RESULT =null; int cidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int cidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String cid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int eidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int eidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String eid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int fmKSleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fmKSright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<List> fmKS = (List<List>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ICClass(cidleft, cid, eid, (List<Field>)(List<?>)(fmKS.get(1)), (List<Method>)(List<?>)(fmKS.get(0))); 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 LEFT_CUR_PARENTHESES fieldOrMethodKS RIGHT_CUR_PARENTHESES { ICClass RESULT =null; int cidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int cidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String cid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int fmKSleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int fmKSright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<List> fmKS = (List<List>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ICClass(cidleft, cid, (List<Field>)(List<?>)(fmKS.get(1)), (List<Method>)(List<?>)(fmKS.get(0))); 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 7: // fieldOrMethodKS ::= field { List<List> 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; List<List> foml = new ArrayList<List>(); List<Method> ml = new LinkedList<Method>(); List<Field> fl = new LinkedList<Field>(); foml.add(ml); fl.addAll(f); foml.add(fl); RESULT = foml; CUP$Parser$result = parser.getSymbolFactory().newSymbol("fieldOrMethodKS",37, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // fieldOrMethodKS ::= method { List<List> 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; List<List> foml = new ArrayList<List>(); List<Method> ml = new LinkedList<Method>(); List<Field> fl = new LinkedList<Field>(); ml.add(m); foml.add(ml); foml.add(fl); RESULT = foml; CUP$Parser$result = parser.getSymbolFactory().newSymbol("fieldOrMethodKS",37, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // fieldOrMethodKS ::= fieldOrMethodKS field { List<List> RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<List> l = (List<List>)((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; ((List<Field>)l.get(1)).addAll(f); RESULT = l; CUP$Parser$result = parser.getSymbolFactory().newSymbol("fieldOrMethodKS",37, ((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: // fieldOrMethodKS ::= fieldOrMethodKS method { List<List> RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; List<List> l = (List<List>)((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; ((List<Method>)l.get(0)).add(m); RESULT = l; CUP$Parser$result = parser.getSymbolFactory().newSymbol("fieldOrMethodKS",37, ((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 11: // fieldOrMethodKS ::= { List<List> RESULT =null; List<List> foml = new ArrayList<List>(); List<Method> ml = new LinkedList<Method>(); List<Field> fl = new LinkedList<Field>(); foml.add(ml); foml.add(fl); RESULT = foml; CUP$Parser$result = parser.getSymbolFactory().newSymbol("fieldOrMethodKS",37, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // 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(getLine() ,DataTypes.INT); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // type ::= BOOLEAN { Type RESULT =null; int boolleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int boolright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object bool = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new PrimitiveType(getLine() ,DataTypes.BOOLEAN); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // type ::= STRING_RESERVED { Type RESULT =null; int strleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int strright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object str = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new PrimitiveType(getLine() ,DataTypes.STRING); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // type ::= CLASS_ID { Type RESULT =null; int classtypeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int classtyperight = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String classtype = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new UserType(getLine(), classtype); CUP$Parser$result = parser.getSymbolFactory().newSymbol("type",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // type ::= type LEFT_SQUARE_BRACKETS RIGHT_SQUARE_BRACKETS { 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",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 17: // field ::= type idList DELIMITER { List<Field> RESULT =null; int ptleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ptright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Type pt = (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> fl = new LinkedList<Field>(); for (String id : idl) {fl.add(new Field(pt, id));} RESULT = fl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("field",2, ((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 18: // idList ::= 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 LinkedList<String>(); idl.add(id); RESULT = idl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("idList",38, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // idList ::= idList 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("idList",38, ((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 20: // method ::= STATIC type ID LEFT_PARENTHESES formals RIGHT_PARENTHESES LEFT_CUR_PARENTHESES stmtKS RIGHT_CUR_PARENTHESES { 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); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",3, ((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 21: // method ::= STATIC VOID ID LEFT_PARENTHESES formals RIGHT_PARENTHESES LEFT_CUR_PARENTHESES stmtKS RIGHT_CUR_PARENTHESES { 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); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",3, ((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 22: // method ::= type ID LEFT_PARENTHESES formals RIGHT_PARENTHESES LEFT_CUR_PARENTHESES stmtKS RIGHT_CUR_PARENTHESES { 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); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",3, ((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 23: // method ::= VOID ID LEFT_PARENTHESES formals RIGHT_PARENTHESES LEFT_CUR_PARENTHESES stmtKS RIGHT_CUR_PARENTHESES { 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); CUP$Parser$result = parser.getSymbolFactory().newSymbol("method",3, ((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 24: // formals ::= type ID { List<Formal> RESULT =null; int ptleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int ptright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Type pt = (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; List<Formal> fl = new LinkedList<Formal>(); fl.add(new Formal(pt, id)); RESULT = fl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("formals",4, ((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 25: // formals ::= formals COMMA type ID { List<Formal> RESULT =null; int flleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int flright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; List<Formal> fl = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int ptleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int ptright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Type pt = (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; fl.add(new Formal(pt, id)); RESULT = fl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("formals",4, ((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 26: // formals ::= { List<Formal> RESULT =null; RESULT = new LinkedList<Formal>(); CUP$Parser$result = parser.getSymbolFactory().newSymbol("formals",4, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // stmtKS ::= stmt { List<Statement> RESULT =null; 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; List<Statement> sl = new LinkedList<Statement>(); sl.add(s); RESULT = sl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmtKS",39, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // stmtKS ::= stmtKS 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("stmtKS",39, ((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 29: // stmtKS ::= { List<Statement> RESULT =null; RESULT = new LinkedList<Statement>(); CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmtKS",39, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // stmt ::= assignmentStmt DELIMITER { Statement RESULT =null; int asleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int asright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Assignment as = (Assignment)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = as; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((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 ::= call DELIMITER { 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",6, ((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 32: // stmt ::= returnStmt DELIMITER { Statement RESULT =null; int rsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int rsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Return rs = (Return)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = rs; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((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 ::= ifStmt { Statement RESULT =null; int isleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int isright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; If is = (If)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = is; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // stmt ::= whileStmt { Statement RESULT =null; int wsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int wsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; While ws = (While)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = ws; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // stmt ::= breakStmt DELIMITER { Statement RESULT =null; int bsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int bsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Break bs = (Break)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = bs; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((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 36: // stmt ::= continueStmt DELIMITER { Statement RESULT =null; int csleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int csright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Continue cs = (Continue)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = cs; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((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 37: // stmt ::= statementsBlockStmt { Statement RESULT =null; int sbleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sbright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; StatementsBlock sb = (StatementsBlock)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = sb; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // stmt ::= localVariableStmt DELIMITER { Statement RESULT =null; int lsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int lsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; LocalVariable ls = (LocalVariable)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = ls; CUP$Parser$result = parser.getSymbolFactory().newSymbol("stmt",6, ((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: // assignmentStmt ::= location ASSIGNMENT expr { Assignment RESULT =null; int lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Location l = (Location)((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; RESULT = new Assignment(l,e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("assignmentStmt",15, ((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 40: // breakStmt ::= BREAK { Break 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 Break(getLine()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("breakStmt",16, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // continueStmt ::= CONTINUE { Continue RESULT =null; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object c = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Continue(getLine()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("continueStmt",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // ifStmt ::= IF LEFT_PARENTHESES expr RIGHT_PARENTHESES stmt ELSE stmt { If RESULT =null; int e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int s1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int s1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Statement s1 = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int s2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int s2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement s2 = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new If(e1, s1, s2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("ifStmt",18, ((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 43: // ifStmt ::= IF LEFT_PARENTHESES expr RIGHT_PARENTHESES stmt { If 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 s1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int s1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Statement s1 = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new If(e1, s1); CUP$Parser$result = parser.getSymbolFactory().newSymbol("ifStmt",18, ((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 44: // localVariableStmt ::= type ID ASSIGNMENT expr { LocalVariable 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 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; 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 LocalVariable(t, id, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("localVariableStmt",19, ((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 45: // localVariableStmt ::= type ID { LocalVariable 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 LocalVariable(t, id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("localVariableStmt",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 46: // returnStmt ::= RETURN expr { Return 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; 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 Return(getLine(), e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("returnStmt",20, ((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 47: // returnStmt ::= RETURN { Return RESULT =null; int rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Object r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Return(getLine()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("returnStmt",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // statementsBlockStmt ::= LEFT_CUR_PARENTHESES stmtKS RIGHT_CUR_PARENTHESES { StatementsBlock RESULT =null; int lcpleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int lcpright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Object lcp = (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(lcpleft, sl); CUP$Parser$result = parser.getSymbolFactory().newSymbol("statementsBlockStmt",21, ((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: // whileStmt ::= WHILE LEFT_PARENTHESES expr RIGHT_PARENTHESES stmt { While 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("whileStmt",22, ((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 50: // 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",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // 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",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // expr ::= thisExpr { Expression RESULT =null; int teleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int teright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; This te = (This)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = te; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // expr ::= newClassNewExpr { Expression RESULT =null; int nceleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int nceright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; NewClass nce = (NewClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = nce; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // expr ::= newArrayNewExpr { Expression RESULT =null; int naeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int naeright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; NewArray nae = (NewArray)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = nae; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // expr ::= lengthExpr { Expression RESULT =null; int leleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int leright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Length le = (Length)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = le; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // expr ::= expr andOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new LogicalBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 57: // expr ::= expr orOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new LogicalBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 58: // expr ::= expr relationalOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new LogicalBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 59: // expr ::= expr eqOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new LogicalBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 60: // expr ::= logicalUnaryOp expr { Expression RESULT =null; int uleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int uright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; UnaryOps u = (UnaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int exleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int exright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new LogicalUnaryOp(u, ex); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((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 61: // expr ::= expr plusMinusOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new MathBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 62: // expr ::= expr mulDivModOp expr { Expression RESULT =null; int ex1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ex1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Expression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int opleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int opright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; BinaryOps op = (BinaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ex2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ex2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new MathBinaryOp(ex1, op, ex2); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",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 63: // expr ::= mathUnaryOp expr { Expression RESULT =null; int uleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int uright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; UnaryOps u = (UnaryOps)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int exleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int exright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Expression ex = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT= new MathUnaryOp(u, ex); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((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 64: // expr ::= literalExpr { Expression RESULT =null; int leleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int leright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; Literal le = (Literal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = le; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // expr ::= expressionBlockExpr { Expression RESULT =null; int ebleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int ebright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ExpressionBlock eb = (ExpressionBlock)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = eb; CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // location ::= variableLocationLocation { Location RESULT =null; int vlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int vlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; VariableLocation vl = (VariableLocation)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = vl; CUP$Parser$result = parser.getSymbolFactory().newSymbol("location",7, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // location ::= arrayLocationLocation { Location RESULT =null; int alleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int alright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; ArrayLocation al = (ArrayLocation)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = al; CUP$Parser$result = parser.getSymbolFactory().newSymbol("location",7, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // variableLocationLocation ::= expr DOT ID { VariableLocation 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(getLine(), e, id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("variableLocationLocation",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 69: // variableLocationLocation ::= ID { VariableLocation 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(getLine(), id); CUP$Parser$result = parser.getSymbolFactory().newSymbol("variableLocationLocation",14, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // arrayLocationLocation ::= expr LEFT_SQUARE_BRACKETS expr RIGHT_SQUARE_BRACKETS { ArrayLocation 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("arrayLocationLocation",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 71: // call ::= staticCall { 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",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 72: // call ::= virtualCall { 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",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 73: // staticCall ::= CLASS_ID DOT ID LEFT_PARENTHESES exprKS RIGHT_PARENTHESES { StaticCall RESULT =null; int cidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int cidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; String cid = (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(getLine(), cid, id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("staticCall",10, ((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 74: // virtualCall ::= ID LEFT_PARENTHESES exprKS RIGHT_PARENTHESES { 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(getLine(), id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtualCall",11, ((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 75: // virtualCall ::= expr DOT ID LEFT_PARENTHESES exprKS RIGHT_PARENTHESES { 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(getLine(), e, id, el); CUP$Parser$result = parser.getSymbolFactory().newSymbol("virtualCall",11, ((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 76: // exprKS ::= 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> el = new LinkedList<Expression>(); el.add(e); RESULT = el; CUP$Parser$result = parser.getSymbolFactory().newSymbol("exprKS",40, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 77: // exprKS ::= exprKS 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("exprKS",40, ((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: // exprKS ::= { List<Expression> RESULT =null; RESULT = new LinkedList<Expression>(); CUP$Parser$result = parser.getSymbolFactory().newSymbol("exprKS",40, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 79: // thisExpr ::= THIS { This 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(getLine()); CUP$Parser$result = parser.getSymbolFactory().newSymbol("thisExpr",26, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 80: // newClassNewExpr ::= NEW CLASS_ID LEFT_PARENTHESES RIGHT_PARENTHESES { NewClass RESULT =null; int cidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int cidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String cid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = new NewClass(getLine(), cid); CUP$Parser$result = parser.getSymbolFactory().newSymbol("newClassNewExpr",28, ((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 81: // newArrayNewExpr ::= NEW type LEFT_SQUARE_BRACKETS expr RIGHT_SQUARE_BRACKETS { NewArray RESULT =null; int ptleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int ptright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Type pt = (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(pt, e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("newArrayNewExpr",27, ((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 82: // lengthExpr ::= expr DOT LENGTH { Length 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("lengthExpr",24, ((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 83: // mathUnaryOp ::= MINUS { UnaryOps RESULT =null; isPositive = true; RESULT = UnaryOps.UMINUS; CUP$Parser$result = parser.getSymbolFactory().newSymbol("mathUnaryOp",36, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 84: // plusMinusOp ::= PLUS { BinaryOps RESULT =null; RESULT= BinaryOps.PLUS; CUP$Parser$result = parser.getSymbolFactory().newSymbol("plusMinusOp",34, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 85: // plusMinusOp ::= MINUS { BinaryOps RESULT =null; RESULT= BinaryOps.MINUS; CUP$Parser$result = parser.getSymbolFactory().newSymbol("plusMinusOp",34, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 86: // mulDivModOp ::= MULTIFICATION { BinaryOps RESULT =null; RESULT= BinaryOps.MULTIPLY; CUP$Parser$result = parser.getSymbolFactory().newSymbol("mulDivModOp",35, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 87: // mulDivModOp ::= DIVISION { BinaryOps RESULT =null; RESULT= BinaryOps.DIVIDE; CUP$Parser$result = parser.getSymbolFactory().newSymbol("mulDivModOp",35, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 88: // mulDivModOp ::= MODULO { BinaryOps RESULT =null; RESULT= BinaryOps.MOD; CUP$Parser$result = parser.getSymbolFactory().newSymbol("mulDivModOp",35, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 89: // andOp ::= AND { BinaryOps RESULT =null; RESULT = BinaryOps.LAND; CUP$Parser$result = parser.getSymbolFactory().newSymbol("andOp",29, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 90: // orOp ::= OR { BinaryOps RESULT =null; RESULT = BinaryOps.LOR; CUP$Parser$result = parser.getSymbolFactory().newSymbol("orOp",30, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 91: // eqOp ::= EQUAL { BinaryOps RESULT =null; RESULT = BinaryOps.EQUAL; CUP$Parser$result = parser.getSymbolFactory().newSymbol("eqOp",32, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 92: // eqOp ::= NOT_EQUAL { BinaryOps RESULT =null; RESULT = BinaryOps.NEQUAL; CUP$Parser$result = parser.getSymbolFactory().newSymbol("eqOp",32, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 93: // relationalOp ::= SMALLER_OR_EQUAL { BinaryOps RESULT =null; RESULT = BinaryOps.LTE; CUP$Parser$result = parser.getSymbolFactory().newSymbol("relationalOp",31, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 94: // relationalOp ::= SMALLER { BinaryOps RESULT =null; RESULT = BinaryOps.LT; CUP$Parser$result = parser.getSymbolFactory().newSymbol("relationalOp",31, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 95: // relationalOp ::= GREATER_OR_EQUAL { BinaryOps RESULT =null; RESULT = BinaryOps.GTE; CUP$Parser$result = parser.getSymbolFactory().newSymbol("relationalOp",31, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 96: // relationalOp ::= GREATER { BinaryOps RESULT =null; RESULT = BinaryOps.GT; CUP$Parser$result = parser.getSymbolFactory().newSymbol("relationalOp",31, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 97: // logicalUnaryOp ::= NOT { UnaryOps RESULT =null; RESULT = UnaryOps.LNEG; CUP$Parser$result = parser.getSymbolFactory().newSymbol("logicalUnaryOp",33, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 98: // literalExpr ::= literal { Literal 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("literalExpr",25, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 99: // 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; String i = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; try { String afterRmZeroes = i.replaceFirst("^0+",""); if (afterRmZeroes.equals("")) RESULT = new Literal(getLine(), LiteralTypes.INTEGER, 0); else if (afterRmZeroes.equals(i)) { Helper.checkIfIntIsLegal(i, isPositive); RESULT = new Literal(getLine(), LiteralTypes.INTEGER, i); } else throw new SyntaxError(getLine(), getColumn(), "number other than zero should not start with leading zeroes"); } catch (NumberFormatException e) { throw new SyntaxError(getLine(), getColumn(), "Integer out of bound"); } CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 100: // literal ::= STRING { Literal RESULT =null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right; String s = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value; RESULT = new Literal(getLine(), LiteralTypes.STRING, s); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 101: // 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(getLine(), LiteralTypes.TRUE); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 102: // 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(getLine(), LiteralTypes.FALSE); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 103: // 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(getLine(), LiteralTypes.NULL); CUP$Parser$result = parser.getSymbolFactory().newSymbol("literal",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 104: // expressionBlockExpr ::= LEFT_PARENTHESES expr RIGHT_PARENTHESES { ExpressionBlock 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 = new ExpressionBlock(e); CUP$Parser$result = parser.getSymbolFactory().newSymbol("expressionBlockExpr",23, ((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; /* . . . . . .*/ default: throw new Exception( "Invalid action number "+CUP$Parser$act_num+"found in internal parse table"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void applyAction(int action) {\n\n }", "@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}",...
[ "0.6540306", "0.6360431", "0.6360431", "0.6360431", "0.6318598", "0.6310077", "0.6304101", "0.62837225", "0.62453675", "0.62198925", "0.6170259", "0.61670256", "0.61415684", "0.6100156", "0.60898334", "0.6071881", "0.60642594", "0.60430443", "0.6036261", "0.60053736", "0.5988...
0.0
-1
/ end of method Method splitting the generated action code into several parts.
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 { return CUP$Parser$do_action_part00000000( CUP$Parser$act_num, CUP$Parser$parser, CUP$Parser$stack, CUP$Parser$top); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void generatePrimitives(SoAction action) {\n\n\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n ...
[ "0.6762849", "0.6629404", "0.6623993", "0.6623993", "0.6623993", "0.6572498", "0.64394337", "0.63651955", "0.63266194", "0.623059", "0.62095", "0.6162325", "0.61065876", "0.60964054", "0.59108377", "0.5904232", "0.5882275", "0.5845955", "0.5845261", "0.58141553", "0.5770801",...
0.0
-1
private int previousPosition = 1;
@Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.i_add: Intent intent=new Intent(RecordActivity.this,AddRecordActivity.class); startActivity(intent); break; case R.id.i_Statistics: break; } /*if(previousPosition != position) { viewPager.setCurrentItem(position, false); previousPosition = position; }*/ return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int previousIndex()\n {\n return idx-1;\n }", "@Override\n\t\tpublic int previousIndex() {\n\t\t\treturn 0;\n\t\t}", "public int previousIndex() {\r\n \treturn index - 1; \r\n }", "public int getPosition(){\n return -1;\n }", "public ...
[ "0.7916827", "0.78006923", "0.7540815", "0.7518206", "0.73582417", "0.7323972", "0.7307064", "0.724464", "0.71372193", "0.70864534", "0.7063091", "0.7015681", "0.70060396", "0.6949848", "0.69214", "0.6917164", "0.6875482", "0.68573564", "0.6819218", "0.6809265", "0.6808684", ...
0.0
-1
Given a number, return the factorial of that number. For example, given 5, the factorial is 5 x 4 x 3 x 2 x 1 which should return 120.
public Integer factorial(Integer number){ int fact = 1; for (int i = number; i > 0; i--){ fact *=i; } return fact; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int factorial(int num) \n {\n number = num;\n f=1;\n for(i=1; i<=number; i++)\n {\n f=f*i;\n }\n return f;\n }", "public Integer factorial(Integer number){\n int result = 1;\n for (int i =1;i<=number;i++)\n {\n resu...
[ "0.7835364", "0.7763316", "0.7708129", "0.7679603", "0.7678548", "0.7629103", "0.76271665", "0.76263976", "0.75727206", "0.7542012", "0.7534927", "0.7519155", "0.7473537", "0.74366224", "0.7424392", "0.7417614", "0.7405631", "0.73210853", "0.7316434", "0.7275771", "0.7250137"...
0.782151
1
Given a phrase, get the acronym of that phrase. Acronym is the combination of the first character of each word in upper case. For example, given "Ruby on Rails", this method will return "ROR"
public String acronym(String phrase) { /*StringBuilder acronymFeed = new StringBuilder(""); String wordHolder = ""; int spaceIndex; char firstLetter; do{ spaceIndex = phrase.indexOf(" "); wordHolder = phrase.substring(0,spaceIndex); acronymFeed.append(wordHolder.charAt(0)); phrase = phrase.replaceFirst(wordHolder, ""); } while (spaceIndex != -1 && wordHolder != "" && phrase != ""); String acronymResult = acronymFeed.toString().toUpperCase(); return acronymResult; */ char[] letters = phrase.toCharArray(); String firstLetters = ""; firstLetters += String.valueOf(letters[0]); for (int i = 1; i < phrase.length();i++){ if (letters[i-1] == ' '){ firstLetters += String.valueOf(letters[i]); } } firstLetters = firstLetters.toUpperCase(); return firstLetters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String acronym(String phrase) {\n\t\tString[] p = phrase.split(\"[\\\\W\\\\s]\");\n\t\tString returner = \"\";\n\t\tfor (String s : p) {\n\t\t\tif (!s.isEmpty())\n\t\t\t\treturner = returner + s.charAt(0);\n\t\t}\n\t\treturn returner.toUpperCase();\n\t}", "public static String acronym(String phrase) {\n\t...
[ "0.8925246", "0.8755592", "0.87136763", "0.8653149", "0.85364926", "0.84731317", "0.6838266", "0.6743494", "0.65249467", "0.63692397", "0.6325082", "0.62066144", "0.61946565", "0.61708647", "0.61394083", "0.6058268", "0.5960621", "0.59416914", "0.59247595", "0.5875696", "0.58...
0.8707771
3
To prevent anyone from reading our messages, we can encrypt it so it will only be readable by its intended audience. This method encrypt the message by shifting the letter by 3 characters. If the character is at the end of the alphabet, it will wraps around. For example: 'a' => 'd' 'w' => 'z' 'x' => 'a' 'y' => 'b'
public String encrypt(String word) { char[] encrypted = word.toCharArray(); for (int i = 0; i < encrypted.length; i++){ if (encrypted[i] == 'x' || encrypted[i] == 'y' || encrypted[i] == 'z'){ encrypted[i] -= 23; } else { encrypted[i] += 3; } } String encryptedResult = new String(encrypted); return encryptedResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n if (le...
[ "0.72344875", "0.71540314", "0.706848", "0.7058821", "0.70254064", "0.70054", "0.6987618", "0.6947225", "0.6921178", "0.6874987", "0.675149", "0.6736562", "0.6686012", "0.6674453", "0.66642094", "0.6644165", "0.66269654", "0.656488", "0.65247756", "0.64500725", "0.64454937", ...
0.71331733
2
Main section must start with the SignatureVersion attribute. See
public static void writeMainSection(OutputStream out, Attributes attributes) throws IOException { String signatureVersion = attributes.getValue(Attributes.Name.SIGNATURE_VERSION); if (signatureVersion == null) { throw new IllegalArgumentException( "Mandatory " + Attributes.Name.SIGNATURE_VERSION + " attribute missing"); } ManifestWriter.writeAttribute(out, Attributes.Name.SIGNATURE_VERSION, signatureVersion); if (attributes.size() > 1) { SortedMap<String, String> namedAttributes = ManifestWriter.getAttributesSortedByName(attributes); namedAttributes.remove(Attributes.Name.SIGNATURE_VERSION.toString()); ManifestWriter.writeAttributes(out, namedAttributes); } writeSectionDelimiter(out); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public void setSignature(String Signature) {\n this.Signature = Signature;\n }", "public int getVersion() { return 1; }", "int getSignature ();", "@Override\n public int getVersion() {\n return 4;\n }", "@Override\...
[ "0.60419613", "0.5584853", "0.5549175", "0.5526498", "0.5497148", "0.5489039", "0.536469", "0.53342927", "0.5318694", "0.53137636", "0.52888304", "0.5281393", "0.52742726", "0.5273094", "0.52572906", "0.5235919", "0.52282375", "0.5217894", "0.521703", "0.51987666", "0.5177792...
0.6930899
0
Neither guava nor caffeine cache provide an "exact" LRU implementation, the so called "Window TinyLFU policy" is
private static Cache<DHTKey, LruRetentionInfo> buildEmptyCacheWithCapacity(long capacityBytes) { return Caffeine.newBuilder().weigher(cacheWeigher).maximumWeight(capacityBytes).recordStats().build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]){\n LRUCache cache = new LRUCache(2);\n\n cache.put(1, 1);\n cache.put(2, 2);\n System.out.println(cache.get(1)); // returns 1\n cache.put(3, 3); // evicts key 2\n System.out.println(cache.get(2)); // returns -1 (not fou...
[ "0.6577368", "0.63004386", "0.6129002", "0.6097942", "0.6029189", "0.601824", "0.5991301", "0.59897953", "0.59595954", "0.5903667", "0.58974266", "0.5886813", "0.58241934", "0.57705396", "0.576861", "0.57331467", "0.570898", "0.5703852", "0.56743044", "0.56560504", "0.5655077...
0.48873043
70
Use for test only for inspecting the content
public Map<DHTKey, LruRetentionInfo> getCurrentRetentionMap() { retentionMap.cleanUp(); return Collections.unmodifiableMap(retentionMap.asMap()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean visitContent() {\n\t\treturn true;\n\t}", "String content();", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability...
[ "0.66989976", "0.6438213", "0.6404358", "0.63105506", "0.6306502", "0.6306502", "0.6306502", "0.6306502", "0.6306502", "0.6306502", "0.62833786", "0.62833786", "0.62833786", "0.62833786", "0.62833786", "0.62833786", "0.62833786", "0.62833786", "0.62429935", "0.6180224", "0.61...
0.0
-1
Utility for creating a credit specific view column
public static ViewConfig createViewConfig(ConfigLink<ExposureFunctions> exposureConfig, ConfigLink<CurrencyMatrix> currencyMatrixLink) { return configureView( "FX Forward Remote view", config( arguments( function( MarketExposureSelector.class, argument("exposureFunctions", exposureConfig)), function( DefaultHistoricalMarketDataFn.class, argument("currencyMatrix", currencyMatrixLink))), implementations( CurveSelector.class, MarketExposureSelector.class, DiscountingMulticurveCombinerFn.class, CurveSelectorMulticurveBundleFn.class, FXForwardPVFn.class, DiscountingFXForwardPVFn.class)), column(OutputNames.FX_PRESENT_VALUE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getCreateViewSQLString(){\n\t\treturn \" create view \"+VIEW_NAME_FAMILY_PLANING_RECORDS_DETAIL+\" as select \"\n\t\t\t\t+SERVICE_REC_ID+\", \"\n\t\t\t\t+ TABLE_NAME_FAMILY_PLANNING_RECORDS+ \".\"+ CommunityMembers.COMMUNITY_MEMBER_ID+\", \"\n\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_NAME+\",...
[ "0.6151614", "0.58395934", "0.58149725", "0.578126", "0.5701907", "0.56984645", "0.5690699", "0.5658186", "0.5651078", "0.5631133", "0.560022", "0.55728215", "0.5564977", "0.555096", "0.5550132", "0.5548814", "0.55457217", "0.5543902", "0.5525554", "0.5510591", "0.5479595", ...
0.0
-1
Create an instance of a Fx Forward Trade
private static FXForwardTrade createFxForwardTrade() { Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, "COUNTERPARTY")); BigDecimal tradeQuantity = BigDecimal.valueOf(1); LocalDate tradeDate = LocalDate.of(2014, 7, 11); OffsetTime tradeTime = OffsetTime.of(LocalTime.of(0, 0), ZoneOffset.UTC); SimpleTrade trade = new SimpleTrade(createFxForwardSecurity(), tradeQuantity, counterparty, tradeDate, tradeTime); trade.setPremium(0.00); trade.setPremiumDate(LocalDate.of(2014, 7, 25)); trade.setPremiumCurrency(Currency.GBP); FXForwardTrade fxForwardTrade = new FXForwardTrade(trade); return fxForwardTrade; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ...
[ "0.7013786", "0.6961077", "0.6752613", "0.61878556", "0.5576244", "0.5542571", "0.53491056", "0.5305078", "0.5292215", "0.5289227", "0.5268767", "0.52652246", "0.5247499", "0.5194636", "0.51329386", "0.5121338", "0.5120789", "0.51173687", "0.5104054", "0.5067539", "0.5061777"...
0.83188105
0
Create an instance of a Fx Forward Security
private static FXForwardSecurity createFxForwardSecurity() { Currency payCurrency = Currency.GBP; Currency recCurrency = Currency.USD; double payAmount = 1_000_000; double recAmount = 1_600_000; ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4); ExternalId region = ExternalSchemes.currencyRegionId(Currency.GBP); FXForwardSecurity fxForwardSecurity = new FXForwardSecurity(payCurrency, payAmount, recCurrency, recAmount, forwardDate, region); return fxForwardSecurity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Security_I create()\r\n\t\t{\r\n\t\treturn new Security();\r\n\t\t}", "public Forwarding() {\n\n }", "private static FXForwardTrade createFxForwardTrade() {\n\n Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, \"COUNTERPARTY\"));\n BigDecimal ...
[ "0.5880378", "0.5864074", "0.5856941", "0.58366996", "0.5626896", "0.54038334", "0.5357629", "0.5227371", "0.5217684", "0.5154413", "0.5150758", "0.5134774", "0.5122024", "0.5094388", "0.50928175", "0.5081009", "0.5020948", "0.49954417", "0.49945414", "0.49851692", "0.4918232...
0.78778595
0
works according to singleton pattern
private DBconnectionUtil() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "static void useSingleton(){\n\t\tSingleton singleton = Singleton.getInstance();\n\t\tprint(\"singleton\", singleton);\n\t}", "private SingletonEager(){\n \n }", "private SingletonSigar(){}", "private Singleton() {\n\t}", "private Singl...
[ "0.74868447", "0.7443924", "0.74382615", "0.7413988", "0.7368423", "0.7332989", "0.7316249", "0.7271524", "0.7266916", "0.7264639", "0.7152609", "0.713544", "0.70722854", "0.7057506", "0.7046184", "0.70379305", "0.6997172", "0.69761354", "0.69671386", "0.69671386", "0.6954759...
0.0
-1
Create Database connection for the given URL, user name and password
public static Connection getConnection() throws ClassNotFoundException, SQLException { /** * create new connection when connection is close or null */ if( conn == null || conn.isClosed() ) { Class.forName(properties.getProperty(QueryConstants.DRIVER_NAME)); conn = DriverManager.getConnection(properties.getProperty(QueryConstants.URL), properties.getProperty(QueryConstants.USERNAME), properties.getProperty(QueryConstants.PASSWORD)); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createConnection(String dbUrl) {\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(dbUrl);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Database exception during database connection creation: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private static DatabaseConnection getConne...
[ "0.74782765", "0.7476315", "0.72275853", "0.71452373", "0.7118221", "0.71096003", "0.7097563", "0.7068423", "0.7060598", "0.7059946", "0.7049114", "0.7037233", "0.69938445", "0.6991561", "0.69623077", "0.69589144", "0.6957299", "0.69233704", "0.68885905", "0.68855566", "0.688...
0.0
-1
/ ========== SINGLETON ==========
public static FpsTimer singleton() { return singleton == null ? singleton = new FpsTimer() : singleton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SingleTon() {\n\t}", "private void init() {\n\n\t}", "private Main() {\n\n super();\n }", "private void init() {\n }", "private void init() {\n\n\n\n }", "private MApi() {}", "private stendhal() {\n\t}", "private Singleton()\n\t\t{\n\t\t}", "@Override\r\n\tpublic void init() {...
[ "0.7343201", "0.7293135", "0.7200745", "0.7195302", "0.7187249", "0.7135594", "0.7122812", "0.71131414", "0.71119475", "0.710665", "0.710665", "0.710665", "0.710665", "0.70401114", "0.703023", "0.699557", "0.69948995", "0.6987442", "0.6987442", "0.69691557", "0.6962555", "0...
0.0
-1
/ ========== PUBLIC ==========
@Override public void run() { while (true) { long currentTime = System.nanoTime(); draw(); check(currentTime); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n...
[ "0.64715165", "0.6237815", "0.6166567", "0.61327994", "0.61238045", "0.6041496", "0.6041198", "0.6022806", "0.6002947", "0.59812844", "0.5940418", "0.5940418", "0.5928067", "0.5899429", "0.5893978", "0.58870494", "0.588494", "0.5857612", "0.5857612", "0.5857612", "0.5857612",...
0.0
-1
/ ========== PRIVATE ==========
private void draw() { frames++; MainFrame.singleton().draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protec...
[ "0.6428683", "0.6168114", "0.6135315", "0.60598546", "0.60335034", "0.602111", "0.6018123", "0.60173225", "0.59812933", "0.5955365", "0.5951618", "0.5946782", "0.5946782", "0.5946782", "0.5946782", "0.5946782", "0.5946782", "0.5914872", "0.59095925", "0.589548", "0.58949405",...
0.0
-1
getting the resources for setting strings
private void appInit() { res = getResources(); //vibrate audio = (AudioManager)getSystemService(Context.AUDIO_SERVICE); //set a/b testing variables COLOR_MARGIN = SRUserData.getInstace().getErrorMargin(); shiftTimeMax = SRUserData.getInstace().getShiftTime(); Typeface Helveticaneue_light = Typeface.createFromAsset(getAssets(), "fonts/Helveticaneue-light.ttf"); container = new RelativeLayout(this); container = (RelativeLayout) findViewById(R.id.mainContainer); int scoreWidth = SCREEN_WIDTH; int scoreHeight = (int) (SCREEN_WIDTH/DENSITY * 0.18); int scoreX = (int)(0.5 * SCREEN_WIDTH)-scoreWidth/2; // = 0 ? int scoreY = (int)(0.13* SCREEN_HEIGHT); //-scoreHeight/2 //score label scoreText = new TextView(this); scoreText.setText("0"); RelativeLayout.LayoutParams scoreText_params = new RelativeLayout.LayoutParams(scoreWidth, LayoutParams.WRAP_CONTENT); scoreText_params.setMargins(scoreX, scoreY, 0, 0); scoreText.setLayoutParams(scoreText_params); scoreText.setTextColor(Color.GRAY); scoreText.setTextSize(scoreHeight); scoreText.setGravity(Gravity.CENTER); scoreText.setTypeface(Helveticaneue_light); container.addView(scoreText); //header int headerHeight = (int)(SCREEN_WIDTH*0.18); header = new SRPUHeader(this); header.setSize(SCREEN_WIDTH, headerHeight, DENSITY); RelativeLayout.LayoutParams header_params = new RelativeLayout.LayoutParams(SCREEN_WIDTH, headerHeight); header_params.setMargins(0, 0, 0, 0); header.setLayoutParams(header_params); header.setExtraPUEventListener(new OnExtraPUEventListener() { @Override public void onEvent() { if(SRGameManager.getInstace().getExtraRemaining() > 0 && SRGameManager.getInstace().getLives() < 5){ int extraUsed = SRGameManager.getInstace().getExtraUsed(); SRGameManager.getInstace().setExtraUsed(extraUsed++); int extraRemaining = SRGameManager.getInstace().getExtraRemaining(); SRGameManager.getInstace().setExtraRemaining(extraRemaining-1); header.setExtraText(""+SRGameManager.getInstace().getExtraRemaining()); SRGameManager.getInstace().setLives(SRGameManager.getInstace().getLives()+1); lives.addLife(); } } }); header.setComboPUEventListener(new OnComboPUEventListener() { @Override public void onEvent() { if(SRGameManager.getInstace().getComboRemaining() > 0 && shouldSpin && comboMultiplier == 1){ int comboUsed = SRGameManager.getInstace().getComboUsed(); SRGameManager.getInstace().setComboUsed(comboUsed++); int comboRemaining = SRGameManager.getInstace().getComboRemaining(); SRGameManager.getInstace().setComboRemaining(comboRemaining-1); header.setComboText(""+SRGameManager.getInstace().getComboRemaining()); header.showComboProgress(true); comboMultiplier = 5; comboPUused = false; //timer that updates the progress circle new CountDownTimer(5000, 50) { int progress = 0; @Override public void onTick(long ms) { int time = (int) (5000 - ms); progress = (int)(time * 0.072); // 0.072 = 1/5000*360 header.setComboProgress(progress); } @Override public void onFinish() { header.showComboProgress(false); comboMultiplier = 1; } }.start(); } } }); header.setImmuPUEventListener(new OnImmuPUEventListener() { @Override public void onEvent() { if(SRGameManager.getInstace().getImmuRemaining() > 0 && shouldDecreaseLife && shouldSpin){ int immuUsed = SRGameManager.getInstace().getImmuUsed(); SRGameManager.getInstace().setImmuUsed(immuUsed++); int immuRemaining = SRGameManager.getInstace().getImmuRemaining(); SRGameManager.getInstace().setImmuRemaining(immuRemaining-1); header.setImmuText(""+SRGameManager.getInstace().getImmuRemaining()); header.showImmuProgress(true); shouldDecreaseLife = false; //timer that updates the progress circle new CountDownTimer(5000, 50) { int progress = 0; @Override public void onTick(long ms) { int time = (int) (5000 - ms); progress = (int)(time * 0.072); // 0.072 = 1/5000*360 header.setImmuProgress(progress); } @Override public void onFinish() { header.showImmuProgress(false); shouldDecreaseLife = true; } }.start(); } } }); header.setExtraText(""+SRGameManager.getInstace().getExtraRemaining()); header.setComboText(""+SRGameManager.getInstace().getComboRemaining()); header.setImmuText(""+SRGameManager.getInstace().getImmuRemaining()); container.addView(header); //lives lives = new SRCircleLives(this); lives.setSize((int)(SCREEN_WIDTH*0.8), (int)(SCREEN_WIDTH/6)); RelativeLayout.LayoutParams lives_params = new RelativeLayout.LayoutParams((int)(SCREEN_WIDTH*0.8), (int)(SCREEN_WIDTH/6)); lives_params.setMargins((int)(SCREEN_WIDTH*0.1), (int)(SCREEN_HEIGHT*0.285), 0, 0); lives.setLayoutParams(lives_params); container.addView(lives); //countDown textView countDownTV = new TextView(this); RelativeLayout.LayoutParams countDown_params = new RelativeLayout.LayoutParams(SCREEN_WIDTH, LayoutParams.WRAP_CONTENT); countDown_params.setMargins(0, (int)(SCREEN_HEIGHT*0.67), 0, 0); countDownTV.setLayoutParams(countDown_params); countDownTV.setTextSize((int) (SCREEN_WIDTH/DENSITY * 0.1)); countDownTV.setGravity(Gravity.CENTER); countDownTV.setText(res.getString(R.string.touch_to_start)); countDownTV.setTextColor(Color.WHITE); countDownTV.setTypeface(Helveticaneue_light); container.addView(countDownTV); int comboTV_width = SCREEN_WIDTH/5; int comboTV_size = (int) (SCREEN_WIDTH/DENSITY * 0.12); int comboTV_y = (int)(0.155* SCREEN_HEIGHT); int comboTV_x = (int)(0.8* SCREEN_WIDTH); //combo textview for showing x2, x4, x8 comboTV = new TextView(this); RelativeLayout.LayoutParams comboTV_params = new RelativeLayout.LayoutParams(comboTV_width, LayoutParams.WRAP_CONTENT); comboTV_params.setMargins(comboTV_x, comboTV_y, 0, 0); comboTV.setLayoutParams(comboTV_params); comboTV.setTextSize(comboTV_size); comboTV.setGravity(Gravity.CENTER); comboTV.setTypeface(Helveticaneue_light); container.addView(comboTV); //init mixpanel mixpanel = MixpanelAPI.getInstance(this, MIXPANEL_TOKEN); String device_uuid = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID); Log.d("UUID", ""+device_uuid); mixpanel.identify(device_uuid); mixpanel.getPeople().identify(device_uuid); mixpanel.getPeople().initPushHandling("791553235288"); //user data JSONObject props = new JSONObject(); try { props.put("extraPU", SRGameManager.getInstace().getExtraRemaining()); props.put("immuPU", SRGameManager.getInstace().getImmuRemaining()); props.put("comboPU", SRGameManager.getInstace().getComboRemaining()); props.put("walletPoints", SRGameManager.getInstace().getTotalPoints()); props.put("everBought", SRGameManager.getInstace().getEverBought()); props.put("bestScore", SRGameManager.getInstace().getBestScore()); props.put("answeredSurvey", SRUserData.getInstace().isSurveyDone() ? 1 : 0); props.put("gamesPlayed", SRGameManager.getInstace().getGamesPlayed()); props.put("initialDifficulty", SRUserData.getInstace().getInitialDifficulty()); props.put("difficultyIncrease", SRUserData.getInstace().getDifficultyIncrease()); props.put("shiftTime", SRUserData.getInstace().getShiftTime()); props.put("errorMargin", SRUserData.getInstace().getErrorMargin()); try { props.put("Android App Version", getPackageManager().getPackageInfo(getPackageName(), 0).versionName); } catch (NameNotFoundException e) { e.printStackTrace(); } } catch (JSONException e) { e.printStackTrace(); } //mixpanel.registerSuperProperties(props); mixpanel.getPeople().set(props); //handler that update the score every 30 ms Runnable runnable = new Runnable() { @Override public void run() { if (!mStopScoreHandler) { scoreText.setText(""+SRGameManager.getInstace().getScore()); mHandler.postDelayed(this, 30); } } }; mHandler.post(runnable); //SoundPool this.setVolumeControlStream(AudioManager.STREAM_MUSIC); // Load the sound soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 0); soundPool.setOnLoadCompleteListener(new OnLoadCompleteListener() { @Override public void onLoadComplete(SoundPool soundPool, int sampleId, int status) { soundPoolLoaded = true; } }); soundDos = soundPool.load(this, R.raw.dos, 1); soundQuatre = soundPool.load(this, R.raw.quatre, 1); soundSis = soundPool.load(this, R.raw.sis, 1); soundVuit = soundPool.load(this, R.raw.vuit, 1); soundFail = soundPool.load(this, R.raw.fail, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setStrings(){\n ip = context.getResources().getString(R.string.ip);\n port = context.getResources().getString(R.string.port);\n dbName = context.getResources().getString(R.string.db_name);\n user = context.getResources().getString(R.string.masterUser);\n pass = conte...
[ "0.73277915", "0.65784246", "0.6535432", "0.63871336", "0.63559794", "0.63119763", "0.6277059", "0.6226031", "0.61642903", "0.61220735", "0.6102171", "0.6088002", "0.6031061", "0.5990527", "0.5976451", "0.5973097", "0.5948758", "0.59273815", "0.5879933", "0.5873249", "0.58687...
0.0
-1
(run = row of pixels) Validates that block runs have correct runs. Isometric blocks are 32x16, but encoded using 1/2 that (so 16x16=256 pixels) since a square block only contains a diamond's worth of pixels which is exactly half of the area of the square.
@Test public void dt1_block_iso_tables() { assertEquals(Tile.SUBTILE_HEIGHT, Block.ISO_X_LEN.length); assertEquals(Tile.SUBTILE_HEIGHT, Block.ISO_X_OFF.length); for (int i = 0; i < Tile.SUBTILE_HEIGHT; i++) { assertEquals(Tile.SUBTILE_WIDTH, Block.ISO_X_LEN[i] + Block.ISO_X_OFF[i] * 2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void check() {\n // Your solution here.\n\t \n\t int position=1;\n\t int count=runs.nth(1).item[0];\n\t System.out.println(\"This is the RUNS: \"+toString());\n\t System.out.println(\"This is the Runs Length \"+runs.length());\n\t for(position=2;position<=runs.length();position++) {\n\t\t DListNod...
[ "0.68818325", "0.59205", "0.59081537", "0.5780342", "0.565204", "0.56246597", "0.558611", "0.55728656", "0.5528596", "0.5496523", "0.54521084", "0.5441805", "0.539697", "0.5378349", "0.5367612", "0.53493357", "0.5346718", "0.5344335", "0.5334105", "0.5329388", "0.53157336", ...
0.5493662
10
Managing life cycle / (nonJavadoc)
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_main, container, false); // instantiate the graphical components edtMessage = (EditText) view.findViewById(R.id.edtMessage); btnAdd = (Button) view.findViewById(R.id.btnAdd); // Instantiate the listView lsvResult = (ListView) view.findViewById(R.id.lsvResult); humans = new ArrayList<Human>(); // Human tempH; // for (int i = 0; i < 800; i++) { // tempH = new Human("toto " + i, "No message, noFuture", i); // humans.add(tempH); // } return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n\n\n\n }", "private void init() {\n\n\t}", "private void initialize() {\n }", "protected void _init(){}", "pro...
[ "0.6956695", "0.6915739", "0.6915739", "0.6915739", "0.6915739", "0.69088495", "0.6897627", "0.6841256", "0.6833415", "0.68189645", "0.68189645", "0.6817462", "0.6804831", "0.6804831", "0.67971003", "0.6786445", "0.6770522", "0.67404366", "0.6737729", "0.6726073", "0.67145455...
0.0
-1
Functional Methods Called by the btnAdd.onClick Copy the content of the editText within the TxvResult
private void addItem() { String message = edtMessage.getText().toString(); // build the human Human hum = new Human(message, humans.size()); // 1° method arrayAdapter.add(hum); // 2° method // messages.add(message); // arrayAdapter.notifyDataSetChanged(); // and flush edtMessage.setText(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n //nhan ket qua man hinh khac tra ve Main\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (requestCode == REQUEST_CODE_EDIT && resultCode == RESULT_OK && data != null){\n String name = data.getStringExtra(\"New\");\n txt...
[ "0.61755264", "0.6152658", "0.6140859", "0.606267", "0.60314715", "0.58868736", "0.58501875", "0.5800394", "0.5779014", "0.5775311", "0.5762208", "0.5744807", "0.5723403", "0.5716137", "0.571176", "0.5691986", "0.56898814", "0.56689626", "0.5653928", "0.56525755", "0.56467754...
0.0
-1
Called when an item of the ListView is clicked
private void itemSelected(int position) { messageToPasteFromTheListView=arrayAdapter.getItem(position).getMessage(); getActivity().showDialog(((MainActivity)getActivity()).dialogID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n public void onListItemClicked(int position) {\n\n }", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "public void onItemClick(View v...
[ "0.7982267", "0.7896868", "0.7881725", "0.78614694", "0.78543925", "0.7838995", "0.7836879", "0.7818022", "0.7792524", "0.77718985", "0.77566123", "0.7719705", "0.7696375", "0.7692615", "0.7683149", "0.7683149", "0.7683149", "0.76783425", "0.7677578", "0.7677578", "0.7677578"...
0.0
-1
Copy the selected human's message within the edtMessage
void copyItemInEdt() { edtMessage.setText(messageToPasteFromTheListView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n private void copyEdit() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(EDIT_MESSAGE);\n clipboard.setContent(url);\n }", "@Override\n\tpublic void editorCopy()\n\t{\n\t\tclipboard = s...
[ "0.5842892", "0.5745036", "0.5647425", "0.5533", "0.5481381", "0.5449734", "0.5444156", "0.54426473", "0.5355003", "0.5345017", "0.5338049", "0.5332491", "0.5330828", "0.5296807", "0.52955824", "0.52892625", "0.52892625", "0.52892625", "0.52585894", "0.5249556", "0.523556", ...
0.6855717
0
Sgets the size of the preview
private Camera.Size getBestPreviewSize(int width, int height, Camera.Parameters parameters) { Camera.Size result=null; for (Camera.Size size : parameters.getSupportedPreviewSizes()) { if (size.width <= width && size.height<=height) { if (result == null) { result = size; } else { int resultArea = result.width * result.height; int newArea = size.width*size.height; if (newArea > resultArea) { result = size; } } } } return(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void previewSized();", "String getPreviewSizePref();", "public Size getPreviewSize() {\n String pair = get(\"preview-size\");\n if (pair == null)\n return null;\n String[] dims = pair.split(\"x\");\n if (dims.length != 2)\n return null;\...
[ "0.80598795", "0.77034044", "0.73421127", "0.6905159", "0.68405664", "0.6787353", "0.6638439", "0.6580174", "0.653927", "0.6535367", "0.6521493", "0.6501916", "0.64842653", "0.64544654", "0.64419484", "0.643629", "0.6430965", "0.6414542", "0.64091843", "0.6381942", "0.6367543...
0.0
-1
Sets up the peview holder surface
private void initPreview(int width, int height) { if (camera!=null && previewHolder.getSurface()!=null) { try { camera.setPreviewDisplay(previewHolder); } catch (Throwable t) { Log.e("PreviewDemo-surfaceCallback", "ExceptionsetPreviewDisplay()", t); // Toast.makeText(PreviewDemo.this, t.getMessage(), Toast.LENGTH_LONG).show(); } if (!cameraConfigured) { Camera.Parameters parameters=camera.getParameters(); Camera.Size size=getBestPreviewSize(width, height, parameters); if (size!=null) { parameters.setPreviewSize(size.width, size.height); camera.setParameters(parameters); cameraConfigured=true; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setupPresenter() {\n mPresenter = new leaguePresenter(this);\n ScheduleList.getInstance().setPresenter(mPresenter);\n }", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement...
[ "0.65965605", "0.64717615", "0.644694", "0.6386695", "0.635759", "0.6346404", "0.6297869", "0.6295856", "0.6260289", "0.6238584", "0.6235194", "0.6232764", "0.62179047", "0.62166595", "0.6213492", "0.62032366", "0.6194581", "0.6186565", "0.6178157", "0.61653817", "0.61653054"...
0.0
-1
Starts the camera preview
private void startPreview() { if (cameraConfigured && camera!=null) { camera.startPreview(); inPreview=true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startPreview() {\r\n\t\tCamera localCamera = camera;\r\n\t\tif (localCamera != null && !isPreview) {\r\n\t\t\tcamera.startPreview();\r\n\t\t\tisPreview = true;\r\n\t\t}\r\n\t}", "public synchronized void startPreview() {\n OpenCamera theCamera = camera;\n if (theCamera != null && !previ...
[ "0.8339843", "0.82391626", "0.81524336", "0.8129809", "0.80537784", "0.8028276", "0.78849727", "0.7817719", "0.77715343", "0.75269", "0.7525369", "0.75233996", "0.7485014", "0.74849993", "0.74830645", "0.74142516", "0.73983276", "0.736726", "0.7339811", "0.73290193", "0.73286...
0.8697355
0
sets the orientation to portriat
public void surfaceCreated(SurfaceHolder holder) { camera.setDisplayOrientation(90); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setOrientation(int orientation) {\n }", "public void setOrientation(Direction orientation);", "public void setOrientation(int orientation){\n //save orientation of phone\n mOrientation = orientation;\n }", "public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPo...
[ "0.7404526", "0.73873645", "0.70832944", "0.7068926", "0.7023553", "0.69319177", "0.6870159", "0.68626857", "0.6847897", "0.6800478", "0.67971903", "0.6788306", "0.67863584", "0.67592496", "0.67364943", "0.663991", "0.6630235", "0.6626853", "0.6577556", "0.6553077", "0.651602...
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.menu_main, 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.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { // shows when info is clicked Toast.makeText(getApplicationContext(), "Please enter a height in feet usually \n2 - 3 inches below your height", Toast.LENGTH_LONG).show(); return true; } return true; }
{ "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.7904975", "0.78056985", "0.77671826", "0.77275974", "0.7632173", "0.7622138", "0.75856143", "0.7531176", "0.7488386", "0.74576557", "0.74576557", "0.74391466", "0.7422802", "0.7403698", "0.7392229", "0.73873955", "0.73796785", "0.737091", "0.73627585", "0.7356357", "0.7346...
0.0
-1
finds the degree the phone is being held by using the values from the accelerometer finds the angle by taking the arctangent of the values from the sensor
@Override public void onSensorChanged(SensorEvent event) { theta = (float) Math.toDegrees(Math.atan(event.values[1] / event.values[2])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t ...
[ "0.6908449", "0.68594503", "0.685775", "0.67822516", "0.67565155", "0.66290027", "0.65866643", "0.65591055", "0.6553956", "0.65355456", "0.6400375", "0.6400375", "0.6389474", "0.6386566", "0.63611704", "0.632323", "0.63054633", "0.6269023", "0.62609196", "0.6248676", "0.62370...
0.6977775
0
Empty Constructor Empty Constructor.
public CompareSkusFormHandler() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Constructor(){\n\t\t\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "defaultConstructor(){}", "void DefaultConstructor(...
[ "0.85825896", "0.8022161", "0.780842", "0.7758225", "0.77422917", "0.7723969", "0.7461144", "0.74162495", "0.74051297", "0.73633254", "0.73072094", "0.7301842", "0.7296349", "0.7289588", "0.72882587", "0.72742856", "0.72545964", "0.7252153", "0.7230246", "0.7228304", "0.72134...
0.0
-1
Sets the Repository the Products/SKUs are in. This property is typically set initially in this FormHandler's properties file.
public void setRepository(Repository pRepository) { mRepository = pRepository; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setRepository(Repository repository);", "public void setRepository(Repository repo) {\n\t\tthis.repo = repo;\n\t}", "public void setRepository(String repository) {\n this.repository = repository;\n }", "public void setRepository(String repository) {\n this.repository = repository;\n ...
[ "0.656126", "0.65445", "0.6479083", "0.6479083", "0.6140103", "0.6114065", "0.6015628", "0.59944004", "0.5953053", "0.5860558", "0.58518744", "0.58251303", "0.5759269", "0.5757763", "0.57570106", "0.56685793", "0.5632293", "0.5621283", "0.5616683", "0.55952436", "0.55917513",...
0.65446126
1
Gets the Repository the Products/SKUs are in.
public Repository getRepository() { return mRepository; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Repository getRepository();", "public String getRepository() {\n return repository;\n }", "public String getRepository() {\n return repository;\n }", "protected SlingRepository getRepository() {\n return repository;\n }", "@Override\n public GetRepositoryResult getRepository(GetR...
[ "0.6856136", "0.6809209", "0.6809209", "0.6517809", "0.6405991", "0.63896936", "0.63334584", "0.6295464", "0.62677014", "0.62054014", "0.6089754", "0.6076695", "0.60614485", "0.60097575", "0.5984273", "0.59412843", "0.58932334", "0.58911794", "0.58782727", "0.5869227", "0.585...
0.6786778
3
not null...empty. Sets the list of Products the user wants to compare against. This list contains Product RepositoryItems. NOTE: This list will most likely contain duplicates. If the Product has x number of SKUs, the Product will be added to the ProductCompareList x times so that the length of the ProductCompareList and the SkuCompareList is always the same. So, given a specific List Index x, you can fetch the xth element from either the ProductCompareList or the SkuCompareList, and the values in the xth element will correspond with each other.
public void setProductCompareList(List pProductCompareList) { mProductCompareList = pProductCompareList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void addProductsToCompareListTest() {\n YandexMarketHomePage homePage = new YandexMarketHomePage(driver);\n homePage.open();\n\n // 2. Select category of products\n homePage.selectCategory(\"Электроника\");\n\n // 3. Select subcategory of products\n new Y...
[ "0.6950475", "0.69174874", "0.68241763", "0.67991644", "0.6476417", "0.6339778", "0.61811966", "0.60141474", "0.6010506", "0.59512925", "0.58731234", "0.5841725", "0.5798238", "0.57839173", "0.5744755", "0.57019025", "0.5676764", "0.56641436", "0.5602053", "0.5598789", "0.558...
0.7284581
0
This method returns the list of Products the user wants to compare against. This list contains Product RepositoryItems. NOTE: This list will most likely contain duplicates. If the Product has x number of SKUs, the Product will be added to the ProductCompareList x times so that the length of the ProductCompareList and the SkuCompareList is always the same. So, given a specific List Index, it is possible to retrieve the correct Product AND SKU.
public List getProductCompareList() { return mProductCompareList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void addProductsToCompareListTest() {\n YandexMarketHomePage homePage = new YandexMarketHomePage(driver);\n homePage.open();\n\n // 2. Select category of products\n homePage.selectCategory(\"Электроника\");\n\n // 3. Select subcategory of products\n new Y...
[ "0.63670623", "0.62715626", "0.6188346", "0.61857235", "0.60840267", "0.6048627", "0.59780383", "0.59470683", "0.59320027", "0.5861049", "0.5848242", "0.5834808", "0.57222766", "0.56840694", "0.56807005", "0.56731844", "0.56683654", "0.5667441", "0.56064314", "0.55517185", "0...
0.6963358
0
not null...empty. Sets the list of SKUs the user wants to compare against. This list contains SKU RepositoryItems. This list will not typically contain duplicates.
public void setSkuCompareList(List pSkuCompareList) { mSkuCompareList = pSkuCompareList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getSkuCompareList() {\n return mSkuCompareList;\n }", "List<SkuAvailability> lookupSKUAvailability(List<Long> skuIds, boolean realTime);", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof Product) {\n\t\tProduct newProduct = (Product)obj;\n\t\t return this.getSKU() == ne...
[ "0.62764424", "0.55918705", "0.5518481", "0.5507717", "0.550537", "0.54664165", "0.5371134", "0.5356908", "0.53541565", "0.5351975", "0.53493893", "0.53394717", "0.53228426", "0.53055614", "0.53054756", "0.52988434", "0.52169985", "0.5155248", "0.5154792", "0.51439196", "0.51...
0.60508835
1
This method returns the list of SKUs the user wants to compare against. This list contains SKU RepositoryItems. This list will not typically contain duplicates.
public List getSkuCompareList() { return mSkuCompareList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSku() {\n return sku;\n }", "public String getSku() {\r\n return sku;\r\n }", "public String getSku() {\n return sku;\n }", "public java.lang.String getSku() {\n return sku;\n }", "public List<BaseJSFVO> getUnitUPCs() {\n\t\tList<BaseJSFVO> list = new Arra...
[ "0.56061023", "0.5590381", "0.55711794", "0.555946", "0.5541099", "0.5471743", "0.54581", "0.54533505", "0.539005", "0.5387401", "0.5285188", "0.52791697", "0.5260683", "0.5256295", "0.5223864", "0.5221547", "0.52170444", "0.5182893", "0.5126831", "0.5042102", "0.5039333", ...
0.6655578
0
Sets the index of the first item the user wants to compare. This value is used as an index into the ProductCompareList or SkuCompareList.
public void setSelectedIndex1(String newVal) { mSelectedIndex1 = newVal; if (isLoggingDebug()) logDebug("SelectedIndex1 set to: " + newVal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n void setupState(TYPE firstItem) {\n currentItem = 0;\n }", "public void setIndex(int index) { this.index = index; }", "public void setItemIndex(int itemIndex) {\n this.itemIndex = itemIndex;\n }", "public void setFirstCategoryIndex(int first) {\n/* 118 */ if (first < 0 ...
[ "0.59219545", "0.5726539", "0.55740094", "0.5520981", "0.551709", "0.5503407", "0.54972637", "0.53924304", "0.53064036", "0.52891636", "0.5265941", "0.5252141", "0.525151", "0.52293986", "0.51592994", "0.5142587", "0.5132399", "0.513004", "0.51209325", "0.51190317", "0.510982...
0.49334452
55
This method returns the index of the first item the user wants to compare. This value is used as an index into the ProductCompareList or SkuCompareList.
public String getSelectedIndex1() { return mSelectedIndex1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findIndex(T item){\n for(int i = 0; i < numItems; i++){\n if(arr[i].equals(item))\n return i;\n }\n return -1;\n }", "private int getSelectedCustomerIndex() {\n\t\tString selection = (String) nameBox.getSelectedItem();\t//retrieves the selected name\n...
[ "0.6454204", "0.6360591", "0.6344948", "0.63135475", "0.6312804", "0.6310712", "0.6253049", "0.6238965", "0.621736", "0.61844873", "0.61674035", "0.6147", "0.6142457", "0.61331165", "0.6113925", "0.6082306", "0.6074561", "0.60579157", "0.6047797", "0.60334647", "0.5951847", ...
0.0
-1
Sets the index of the second item the user wants to compare. This value is used as an index into the ProductCompareList or SkuCompareList.
public void setSelectedIndex2(String newVal) { mSelectedIndex2 = newVal; if (isLoggingDebug()) logDebug("SelectedIndex2 set to: " + newVal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFilter2(int index, java.lang.String value) {\n\t\tthis.setValue(FILTER2, index, value);\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void set_List_Of_Product_Type_Of_Store_Two()\n\t{\n\t\tArrayList<Product> Product_Of_Store_Two = new ArrayList<Product>(); /* ArrayList Of Product */\n\...
[ "0.57167226", "0.554519", "0.55313164", "0.55029774", "0.550087", "0.53663915", "0.5357313", "0.53410095", "0.5286386", "0.5274616", "0.5244751", "0.5218605", "0.52161443", "0.51405394", "0.51211786", "0.5084301", "0.5076881", "0.5070563", "0.50678515", "0.50383294", "0.49745...
0.56527215
1
Returns the index of the second item the user wants to compare. This value is used as an index into the ProductCompareList or SkuCompareList.
public String getSelectedIndex2() { return mSelectedIndex2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String findIndexOfI (Comparable<E> item) {\n String compareString = item.toString();\n for (int i = 0; i < data.length; i++) {\n if (data[i].toString().equals(item)) {\n return data[i].toString();\n } else {\n String compareSecond = compareS...
[ "0.6144584", "0.6039328", "0.6033104", "0.60157233", "0.6000866", "0.59344786", "0.5912567", "0.58411753", "0.58043075", "0.57713705", "0.57200456", "0.5692642", "0.56887686", "0.56837696", "0.56688315", "0.5665734", "0.5645457", "0.5634431", "0.5621073", "0.55997777", "0.557...
0.55455667
36
Sets the productId of the Product to add to the Compare Lists. This property contains the productId represented as a string. The Product/SKUs don't get added to the Compare Lists until the handleAddItemToCompareList method gets invoked.
public void setProductToCompare(String productId) { mProductToCompare = productId; if (isLoggingDebug()) logDebug("ProductToCompare:" + productId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setProductId(String productId) {\n this.productId = productId;\n }", "public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}", "public void setProductId(String productId) ;", "public void setProductId(String productId) {\n this.productId = produ...
[ "0.7008651", "0.6834212", "0.6797948", "0.67900294", "0.67520255", "0.67520255", "0.673891", "0.673891", "0.673891", "0.6699958", "0.6590375", "0.65689296", "0.6515602", "0.6515602", "0.6515602", "0.6515602", "0.6515602", "0.6515602", "0.65015334", "0.64821523", "0.64798653",...
0.7892068
0
Gets the productId of the Product to add to Compare List.
public String getProductToCompare() { return mProductToCompare; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProductToCompare(String productId) {\n mProductToCompare = productId;\n if (isLoggingDebug())\n logDebug(\"ProductToCompare:\" + productId);\n }", "public int newProductId() {\n int newId = 0;\n for (Product product : allProducts) {\n if(newId <= product.getId(...
[ "0.69188553", "0.67552346", "0.6730262", "0.66894567", "0.65923977", "0.65923977", "0.65923977", "0.65923977", "0.65923977", "0.6577", "0.6565976", "0.6554552", "0.6554306", "0.6554306", "0.6551783", "0.6499979", "0.6499979", "0.6499979", "0.6499979", "0.6499979", "0.6499979"...
0.6288747
29
Sets the property AddToCompareListSuccessURL. This property is normally set on a jhtml page. It indicates which page we should redirect to if NO errors occur when the user pushes the button which adds a specific Product (and its SKUs) to the Compare Lists.
public void setAddToCompareListSuccessURL(String pAddToCompareListSuccessURL) { mAddToCompareListSuccessURL = pAddToCompareListSuccessURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAddToCompareListSuccessURL() {\n return mAddToCompareListSuccessURL;\n }", "public void setCompareSkusSuccessURL(String pCompareSkusSuccessURL) {\n mCompareSkusSuccessURL = pCompareSkusSuccessURL;\n }", "public String getCompareSkusSuccessURL() {\n return mCompareSkusSuccessURL;\n ...
[ "0.7779078", "0.7260172", "0.6590341", "0.61854315", "0.5599555", "0.55723214", "0.55205643", "0.54750097", "0.5344646", "0.5307488", "0.5283675", "0.52610433", "0.52431566", "0.52430207", "0.52430207", "0.52396053", "0.5166226", "0.51467514", "0.514525", "0.51109403", "0.508...
0.84615314
0
Returns property AddToCompareListSuccessURL. It indicates which page (ie URL) we should redirect to if NO errors occur when the user pushes the button which adds a specific Product (and its SKUs) to the Compare Lists. No redirect occurs if the current URL is the same as this URL.
public String getAddToCompareListSuccessURL() { return mAddToCompareListSuccessURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAddToCompareListSuccessURL(String pAddToCompareListSuccessURL) {\n mAddToCompareListSuccessURL = pAddToCompareListSuccessURL;\n }", "public String getCompareSkusSuccessURL() {\n return mCompareSkusSuccessURL;\n }", "public String getSuccessUrl() {\n return successUrl;\n }", "...
[ "0.77369785", "0.69511527", "0.6443776", "0.6374193", "0.56381875", "0.56169593", "0.5583156", "0.5537338", "0.5421523", "0.5368323", "0.53054905", "0.5296376", "0.52960706", "0.5243343", "0.52327335", "0.52104485", "0.51481074", "0.5118599", "0.50524896", "0.50470483", "0.50...
0.8257931
0
Method: preAddToCompareList This method provides an easy way for users to extend the functionality of the handleAddToCompareList method. The preAddToCompareList code will be executed at the start of the handleAddToCompareList method. This default implementation does nothing.
public void preAddToCompareList(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException { if (isLoggingDebug()) logDebug("in CompareSkusFormHandler.preAddToCompareList"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void postAddToCompareList(DynamoHttpServletRequest pRequest,\n DynamoHttpServletResponse pResponse)\n throws ServletException,\n IOException\n {\n if (isLoggingDebug())\n logDebug(\"in Compa...
[ "0.60828847", "0.5527584", "0.5457573", "0.5433638", "0.5385566", "0.53702295", "0.5294863", "0.5288103", "0.5277191", "0.52689004", "0.5172322", "0.51525617", "0.5130125", "0.50894016", "0.50854325", "0.5076321", "0.5075663", "0.50756186", "0.5062325", "0.50510234", "0.50390...
0.74325883
0
Method: postAddToCompareList This method provides an easy way for users to extend the functionality of the handleAddToCompareList method. The postAddToCompareList code will be executed at the end of the handleAddToCompareList method. This default implementation does nothing.
public void postAddToCompareList(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException { if (isLoggingDebug()) logDebug("in CompareSkusFormHandler.postAddToCompareList"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void preAddToCompareList(DynamoHttpServletRequest pRequest,\n DynamoHttpServletResponse pResponse)\n throws ServletException,\n IOException\n {\n if (isLoggingDebug())\n logDebug(\"in CompareSk...
[ "0.6442841", "0.5354693", "0.53360087", "0.5270979", "0.5249391", "0.51753074", "0.5108055", "0.50372136", "0.4964819", "0.49033734", "0.48922202", "0.4835027", "0.48036584", "0.4798889", "0.47944728", "0.47777075", "0.47693005", "0.47639006", "0.47609478", "0.47447985", "0.4...
0.73479676
0
Sets property CompareSkusSuccessURL. This property is normally set on a jhtml page. It indicates which page we should redirect to if NO errors occur when the user pushes the COMPARE button on a page which compares SKUs.
public void setCompareSkusSuccessURL(String pCompareSkusSuccessURL) { mCompareSkusSuccessURL = pCompareSkusSuccessURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCompareSkusSuccessURL() {\n return mCompareSkusSuccessURL;\n }", "public void setAddToCompareListSuccessURL(String pAddToCompareListSuccessURL) {\n mAddToCompareListSuccessURL = pAddToCompareListSuccessURL;\n }", "public String getSuccessUrl() {\n return successUrl;\n }", "...
[ "0.80523825", "0.71778125", "0.62334985", "0.6103499", "0.6090141", "0.5740295", "0.5654032", "0.5635946", "0.56275237", "0.56275237", "0.5614404", "0.5499444", "0.54657924", "0.54657924", "0.54657924", "0.5461155", "0.5413441", "0.53905594", "0.53670734", "0.52498657", "0.52...
0.8775879
0
Returns property CompareSkusSuccessURL. It indicates which page we should redirect to if NO errors occur when the user pushes the COMPARE button on a page which compares SKUs.
public String getCompareSkusSuccessURL() { return mCompareSkusSuccessURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCompareSkusSuccessURL(String pCompareSkusSuccessURL) {\n mCompareSkusSuccessURL = pCompareSkusSuccessURL;\n }", "public String getSuccessUrl() {\n return successUrl;\n }", "public String getAddToCompareListSuccessURL() {\n return mAddToCompareListSuccessURL;\n }", "public voi...
[ "0.782388", "0.674217", "0.658483", "0.6427025", "0.60464746", "0.5978353", "0.5597736", "0.5531497", "0.5506527", "0.54863316", "0.542311", "0.5288576", "0.5218278", "0.5197745", "0.5197745", "0.5197745", "0.5197745", "0.5148464", "0.5112562", "0.4929963", "0.4921604", "0....
0.85120106
0
Method: preCompareSkus This method provides an easy way for users to extend the functionality of the handleCompareSkus method. The preCompareSkus code will be executed at the start of the handleCompareSkus method. This default implementation does nothing.
public void preCompareSkus(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException { if (isLoggingDebug()) logDebug("in CompareSkusFormHandler.preCompareSkus"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void preAddToCompareList(DynamoHttpServletRequest pRequest,\n DynamoHttpServletResponse pResponse)\n throws ServletException,\n IOException\n {\n if (isLoggingDebug())\n logDebug(\"in CompareSk...
[ "0.5852443", "0.5397765", "0.5272083", "0.5081283", "0.50284135", "0.5003496", "0.49907985", "0.4983478", "0.4976346", "0.4949486", "0.4912526", "0.48824003", "0.48791027", "0.48741364", "0.48445833", "0.48357633", "0.48192248", "0.47966358", "0.4784099", "0.4758162", "0.4751...
0.7312731
0
Method: postCompareSkus This method provides an easy way for users to extend the functionality of the handleCompareSkus method. The postCompareSkus code will be executed at the end of the handleCompareSkus method. This default implementation does nothing.
public void postCompareSkus(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException { if (isLoggingDebug()) logDebug("in CompareSkusFormHandler.postCompareSkus"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void preCompareSkus(DynamoHttpServletRequest pRequest,\n DynamoHttpServletResponse pResponse)\n throws ServletException,\n IOException\n {\n if (isLoggingDebug())\n logDebug(\"in CompareSkusFormHandler.pre...
[ "0.6297188", "0.54793346", "0.50778425", "0.49208182", "0.48546812", "0.47708592", "0.47429547", "0.47250512", "0.46758267", "0.45640793", "0.45107362", "0.4509108", "0.44501063", "0.44401208", "0.4398993", "0.4398993", "0.43905976", "0.43837655", "0.43718195", "0.4370438", "...
0.7193837
0
Method: getUserLocale Returns either the Locale from the Request object (if it isn't NULL), or the Locale from the JVM.
protected Locale getUsersLocale (DynamoHttpServletRequest pRequest) { //Try to get the locale from the Request object: RequestLocale requestLocale = pRequest.getRequestLocale(); if (requestLocale != null) { return requestLocale.getLocale(); } //If no locale value in the Request object, get the locale from the JVM: return Locale.getDefault(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getUserLocale(final HttpServletRequest request) {\n String userLocaleStr = getUserLocale(request.getCookies());\n if (userLocaleStr == null && request.getLocale() != null) {\n userLocaleStr = request.getLocale().toString();\n }\n return userLocaleStr;\n ...
[ "0.77227545", "0.76077276", "0.7399147", "0.7306778", "0.7284748", "0.7228477", "0.71359676", "0.7076198", "0.6906198", "0.6865327", "0.6738348", "0.6682286", "0.657932", "0.6475445", "0.6328147", "0.62710625", "0.6238279", "0.6191993", "0.61845845", "0.61837953", "0.61677516...
0.8111624
0
Creates a new internal artefact for the given name.
public Artefact createArtefact(final String name) { final Artefact old = artefacts.get(name); if (old != null) throw new IllegalArgumentException("Artefact '" + name + "' already exists: " + old); final Artefact a = new Artefact(name); artefacts.put(a.getName(), a); return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Artefact(String aName) {\n\t\tname = aName;\n\t\tattributes = new ConcurrentHashMap<>();\n\t\texternalConfigurations = new ArrayList<>();\n\t\tcontentMap = new HashMap<>();\n\t}", "public Recipe createRecipe(String name) {\r\n\t\tRecipe recipe=new Recipe(name,this);\r\n\t\trecipes.add(recipe);\r\n\t\treturn reci...
[ "0.62284833", "0.60516495", "0.596422", "0.5932947", "0.57946366", "0.57927454", "0.57867485", "0.5596459", "0.559159", "0.558643", "0.55804634", "0.55523306", "0.54222584", "0.5416576", "0.541456", "0.538733", "0.53285795", "0.53190386", "0.5283983", "0.5243268", "0.52408475...
0.80957204
0
Returns the artefact from the internal storage.
public Artefact getArtefact(String name) { return artefacts.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OStorage getStorage();", "public RecipeStorage getRecipeStorage() {\n return RecipeStorage.getInstance();\n }", "ArtefactModel getArtefactModel();", "private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable(...
[ "0.60918784", "0.59920305", "0.5891976", "0.5740414", "0.5716446", "0.5644495", "0.5618367", "0.55417055", "0.55076784", "0.54929245", "0.5470059", "0.545857", "0.5436802", "0.54257435", "0.53904295", "0.5363173", "0.5349765", "0.5340831", "0.5330961", "0.5326685", "0.5317398...
0.63972366
0
Returns true if the configuration for the given configuration name is available.
public boolean hasConfiguration(String name) { return getArtefact(name) != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean configurationValueExists(String name);", "boolean hasConfiguration();", "private boolean IsCfgExisted()\n {\n File f = new File(strCfgPath);\n if(f.exists())\n return true;\n return false;\n }", "boolean hasConfigConnectorConfig();"...
[ "0.76795286", "0.76208746", "0.69374967", "0.68697625", "0.67596465", "0.6721054", "0.671319", "0.66122985", "0.657862", "0.65497786", "0.65280783", "0.6522422", "0.6521997", "0.6504484", "0.64941823", "0.64781725", "0.64185846", "0.6418", "0.6403219", "0.639367", "0.63865846...
0.8413607
0
Returns a snapshot of the configuration with the given name in the given environment.
public Configuration getConfiguration(final String name, Environment environment) { if (environment == null) environment = GlobalEnvironment.INSTANCE; final Artefact a = getArtefact(name); if (a == null) throw new IllegalArgumentException("No such artefact: " + name); final ConfigurationImpl configurationImpl = new ConfigurationImpl(a.getName()); final List<String> attributeNames = a.getAttributeNames(); configurationImpl.clearExternalConfigurations(); for (final ConfigurationSourceKey include : a.getExternalConfigurations()) configurationImpl.addExternalConfiguration(include); for (final String attributeName : attributeNames) { final Value attributeValue = a.getAttribute(attributeName).getValue(environment); if (attributeValue != null) configurationImpl.setAttribute(attributeName, attributeValue); } return configurationImpl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static YamlConfiguration copy(String name){\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYamlConfiguration config = getConfig(name);\r\n\t\t\t\r\n\t\t\t//Does this config exist?\r\n\t\t\tif (config == null){\r\n\t\t\t\tconfig = YamlConfiguration.loadCon...
[ "0.523404", "0.51104397", "0.5033189", "0.499856", "0.49354196", "0.49291113", "0.4925516", "0.48689708", "0.48313755", "0.48038253", "0.47971487", "0.47899446", "0.47651553", "0.46739483", "0.46676013", "0.46397457", "0.46202704", "0.4619968", "0.45590955", "0.45559132", "0....
0.6196669
0
Created by zhou on 2018/3/26.
public interface BookSourceContract { interface View extends BaseContract.BaseView { void showBookSource(List<BookSource> list); } interface Presenter extends BaseContract.BasePresenter<View> { void getBookSource(String view, String book); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@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\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6251588", "0.61523974", "0.60011804", "0.59715784", "0.59139603", "0.59139603", "0.5864459", "0.5838565", "0.58192825", "0.5799691", "0.57917166", "0.57703006", "0.57646555", "0.57525295", "0.5746258", "0.57298523", "0.5728457", "0.5725054", "0.5720507", "0.57196116", "0.5...
0.0
-1
METHOD 0: USER SELECTION This method prompts a user to select which one of the four different options they would like to run. This is of type nonreturn.
public static void userSelection(){ int selection; Scanner input = new Scanner(System.in); System.out.println("Which program would you like to run?"); selection=input.nextInt(); if(selection == 1) mazeUnion(); if(selection == 2) unionPathCompression(); if(selection == 3) mazeHeight(); if(selection == 4) mazeSize(); if(selection == 5) sizePathCompression(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgno...
[ "0.73872167", "0.6948273", "0.69397527", "0.6921872", "0.69058275", "0.6669016", "0.66130894", "0.6583025", "0.6567246", "0.6522242", "0.6497088", "0.6487137", "0.63588744", "0.6318364", "0.63127416", "0.6308318", "0.6307601", "0.6292065", "0.6269023", "0.62541324", "0.624371...
0.74674165
0
METHOD 1: Standard Union This method runs the standard union to solve the maze. This is of type nonreturn.
public static void mazeUnion(){ int n = 10; dsf S = new dsf(n*n); Maze one = new Maze(n); Random random; int sets = n*n; //number of sets in the DSF int randomNumber; int randomDirection; int row; int col; char upperRight; //bottom or right S.print(); while(sets > 1){ random = new Random(); randomNumber = random.nextInt((n*n) - 1); System.out.println("RANDOM NUMBER: "+randomNumber); row = randomNumber /n; //SWITCHED col = randomNumber %n; //SWITCHED randomDirection = random.nextInt(2); String direct; if(randomDirection == 0) direct = "upper"; else direct = "right"; System.out.println("RANDOM DIRECTI0N: "+direct); upperRight = one.direction(randomDirection); if(upperRight == 'u'){ if((randomNumber) < ((n*n)-n)){ System.out.println("Sets: "+sets); if(S.find(randomNumber+n) != S.find(randomNumber)){ S.union(randomNumber+n, randomNumber); one.remove_wall(col, row, 'u'); S.print(); sets--; } } } if(upperRight == 'r'){ if(((randomNumber)%(n*n)) != n-1){ if(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){ S.union(randomNumber, randomNumber+1); one.remove_wall(col, row, 'r'); //S.print(); sets--; } } } } StdDraw.show(0); one.draw(); one.printCellNumbers(); buildAdjacencyList(one, n); userSelection_SolveMaze(n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\...
[ "0.61534077", "0.597279", "0.5869835", "0.57261795", "0.5699082", "0.562815", "0.56234", "0.5595696", "0.5554469", "0.5535207", "0.5522203", "0.5482909", "0.54091316", "0.5408422", "0.5292369", "0.5279117", "0.5275922", "0.5273526", "0.5243828", "0.523727", "0.5230709", "0....
0.7095284
0
METHOD 2: UnionByCompression This method runs unionbycompression to solve the maze. This is of type nonreturn.
public static void unionPathCompression(){ int n = 10; dsf S = new dsf(n*n); Maze two = new Maze(n); Random random; int sets = n*n; //number of sets in the DSF int randomNumber; int randomDirection; int row; int col; char upperRight; //bottom or right S.print(); while(sets > 1){ random = new Random(); randomNumber = random.nextInt((n*n) - 1); //System.out.println("RANDOM NUMBER: "+randomNumber); row = randomNumber /n; //SWITCHED col = randomNumber %n; //SWITCHED randomDirection = random.nextInt(2); String direct; if(randomDirection == 0) direct = "upper"; else direct = "right"; System.out.println("RANDOM DIRECTI0N: "+direct); upperRight = two.direction(randomDirection); if(upperRight == 'u'){ if((randomNumber) < ((n*n)-n)){ System.out.println("Sets: "+sets); if(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){ S.union(randomNumber+n, randomNumber); two.remove_wall(col, row, 'u'); S.print(); sets--; } } } if(upperRight == 'r'){ if(((randomNumber)%(n*n)) != n-1){ if(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){ S.union(randomNumber, randomNumber+1); two.remove_wall(col, row, 'r'); S.print(); sets--; } } } } buildAdjacencyList(two, n); userSelection_SolveMaze(n); StdDraw.show(0); two.draw(); two.printCellNumbers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void mazeUnion(){\n\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze one = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.pr...
[ "0.6078011", "0.5770655", "0.5617805", "0.5239181", "0.52080214", "0.51984406", "0.5041264", "0.5038277", "0.5012343", "0.49760485", "0.49601242", "0.4949983", "0.49269795", "0.49177694", "0.4912341", "0.4854456", "0.48174682", "0.47809237", "0.47483322", "0.47452906", "0.473...
0.70544344
0
METHOD 3: UnionByHeight This method runs unionbyheight to solve the maze. This is of type nonreturn.
public static void mazeHeight(){ int n = 10; dsf S = new dsf(n*n); Maze three = new Maze(n); Random random; int sets = n*n; //number of sets in the DSF int randomNumber; int randomDirection; int row; int col; char upperRight; //bottom or right S.print(); while(sets > 1){ random = new Random(); randomNumber = random.nextInt((n*n) - 1); //System.out.println("RANDOM NUMBER: "+randomNumber); row = randomNumber /n; //SWITCHED col = randomNumber %n; //SWITCHED randomDirection = random.nextInt(2); String direct; if(randomDirection == 0) direct = "upper"; else direct = "right"; //System.out.println("RANDOM DIRECTI0N: "+direct); upperRight = three.direction(randomDirection); if(upperRight == 'u'){ if((randomNumber) < ((n*n)-n)){ System.out.println("Sets: "+sets); if(S.find(randomNumber) != S.find(randomNumber + n)){ S.unionByHeight(randomNumber, randomNumber+n); three.remove_wall(col, row, 'u'); S.print(); sets--; } } } if(upperRight == 'r'){ if(((randomNumber)%(n*n)) != n-1){ if(S.find(randomNumber) != S.find(randomNumber+1)){ S.unionByHeight(randomNumber, randomNumber+1); three.remove_wall(col, row, 'r'); S.print(); sets--; } } } } buildAdjacencyList(three, n); userSelection_SolveMaze(n); StdDraw.show(0); three.draw(); three.printCellNumbers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void mazeUnion(){\n\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze one = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.pr...
[ "0.63619864", "0.5973439", "0.5275784", "0.5063924", "0.5040628", "0.501684", "0.49932745", "0.49562857", "0.49523562", "0.49458063", "0.48888665", "0.48796523", "0.47886294", "0.4769708", "0.47667032", "0.46873805", "0.46837887", "0.46697462", "0.46478003", "0.45989677", "0....
0.55321974
2
METHOD 4: UnionBySize This method runs unionbysize to solve the maze. This is of type nonreturn.
public static void mazeSize(){ int n = 10; dsf S = new dsf(n*n); Maze four = new Maze(n); Random random; int sets = n*n; //number of sets in the DSF int randomNumber; int randomDirection; int row; int col; char upperRight; //bottom or right S.print(); while(sets > 1){ random = new Random(); randomNumber = random.nextInt((n*n) - 1); //System.out.println("RANDOM NUMBER: "+randomNumber); row = randomNumber /n; //SWITCHED col = randomNumber %n; //SWITCHED randomDirection = random.nextInt(2); String direct = null; if(randomDirection == 0) direct = "upper"; if(randomDirection == 1) direct = "right"; //System.out.println("RANDOM DIRECTI0N: "+direct); upperRight = four.direction(randomDirection); if(upperRight == 'u'){ if((randomNumber) < ((n*n)-n)){ //System.out.println("Sets: "+sets); if(S.find(randomNumber) != S.find(randomNumber + n)){ S.unionBySize(randomNumber, randomNumber+n); four.remove_wall(col, row, 'u'); //S.print(); sets--; } } } if(upperRight == 'r'){ if(((randomNumber)%(n*n)) != n-1){ if(S.find(randomNumber) != S.find(randomNumber+1)){ S.unionBySize(randomNumber, randomNumber+1); four.remove_wall(col, row, 'r'); //S.print(); sets--; } } } } buildAdjacencyList(four, n); userSelection_SolveMaze(n); StdDraw.show(0); four.draw(); four.printCellNumbers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void mazeUnion(){\n\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze one = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.pr...
[ "0.6923121", "0.6593776", "0.61599267", "0.57513195", "0.5525592", "0.55057245", "0.524896", "0.52193594", "0.5195437", "0.51842284", "0.50932485", "0.4971272", "0.4970212", "0.49615133", "0.49513724", "0.49147213", "0.48749945", "0.4874752", "0.48489788", "0.48313853", "0.48...
0.6171462
2
METHOD 5: UnionBySize w/ Path Compression This method runs unionbysize, using path compression to solve the maze. This is of type nonreturn.
public static void sizePathCompression(){ int n = 10; dsf S = new dsf(n*n); Maze five = new Maze(n); Random random; int sets = n*n; //number of sets in the DSF int randomNumber; int randomDirection; int row; int col; char upperRight; //bottom or right S.print(); while(sets > 1){ random = new Random(); randomNumber = random.nextInt((n*n) - 1); //System.out.println("RANDOM NUMBER: "+randomNumber); row = randomNumber /n; //SWITCHED col = randomNumber %n; //SWITCHED randomDirection = random.nextInt(2); String direct; if(randomDirection == 0) direct = "upper"; else direct = "right"; //System.out.println("RANDOM DIRECTI0N: "+direct); upperRight = five.direction(randomDirection); if(upperRight == 'u'){ if((randomNumber) < ((n*n)-n)){ System.out.println("Sets: "+sets); if(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){ S.unionBySize(randomNumber+n, randomNumber); five.remove_wall(col, row, 'u'); //S.print(); sets--; } } } if(upperRight == 'r'){ if(((randomNumber)%(n*n)) != n-1){ if(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){ S.unionBySize(randomNumber, randomNumber+1); five.remove_wall(col, row, 'r'); S.print(); sets--; } } } } buildAdjacencyList(five, n); userSelection_SolveMaze(n); StdDraw.show(0); five.draw(); five.printCellNumbers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\...
[ "0.7121021", "0.5879418", "0.525714", "0.51427263", "0.49897277", "0.48941654", "0.4886239", "0.48763147", "0.48193488", "0.4782157", "0.47429597", "0.4720036", "0.46830618", "0.46753782", "0.46351653", "0.46336237", "0.4584717", "0.4567926", "0.45206434", "0.4518587", "0.451...
0.69499916
1
CODE ADDED FOR LAB 7 METHOD 6: USER SELECTION This method will ask the user how they would like to solve the maze. This will be of type nonreturn.
public static void userSelection_SolveMaze(int userInputN){ int[] S = new int[(int) Math.pow(userInputN, 2)]; gNode[] G = new gNode[S.length]; boolean [] visited = new boolean[S.length]; //Initialize for(int i=0; i<visited.length;i++) visited[i] = false; int [] path = new int[S.length]; //Initialize for(int i=0; i<path.length; i++) path[i]=-1; Scanner input = new Scanner(System.in); System.out.println("How would you like to solve the maze?\n" + "1.\tBreadth-First Search\n" + "2.\tDepth-First Search\n" + "3.\tDepth-First Search with Recursion"); int ur = input.nextInt(); if(ur==1) //Breadth-First Search \///gNode && start @ position 0 bfs(G, visited, path, 0); else if(ur==2) //Depth-First Search dfs_Stack(G, visited, path, 0); else if(ur==3) //Depth-First Search w/recursion dfsRecursion(G, visited, path, 0); else{ System.out.println("Invalid option. Please enter the appropriate integer value"); userSelection_SolveMaze(userInputN); } input.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(select...
[ "0.66266364", "0.6535413", "0.6500761", "0.6401167", "0.6261671", "0.62545985", "0.6247414", "0.6175091", "0.61703897", "0.61006993", "0.6063069", "0.605897", "0.5987057", "0.5875109", "0.5842735", "0.57885826", "0.57728505", "0.57708466", "0.57584435", "0.5736579", "0.572284...
0.7123779
0
METHOD 7: BreadthFirst Search This method solves the maze using breadthfirst search,
public static void bfs(gNode[] G, boolean[] visited, int[] path, int s){ Queue<Integer> Q = new LinkedList<Integer>(); Q.add(s); visited[s] = true; while(!Q.isEmpty()){ s = Q.poll(); for(gNode t=G[s]; t!= null; t=t.dest){ System.out.println("BFS"); if(!visited[t.item]){ //once an item has been visited, set it equal to true visited[t.item] = true; path[t.item] = s; //change the int value of the path Q.add(t.item); System.out.println(t.item); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void BFS() {\n visitedCells = 1;\n\n // Initialize the vertices\n for (int j = 0; j < maze.getGrid().length; j++) {\n for (int k = 0; k < maze.getGrid().length; k++) {\n Cell cell = maze.getGrid()[j][k];\n cell.setColor(\"WHITE\");\n ...
[ "0.7508335", "0.68866485", "0.68606406", "0.67978257", "0.66566634", "0.66292137", "0.65918154", "0.65903634", "0.65882474", "0.65360236", "0.65073365", "0.64814", "0.64698815", "0.6440443", "0.6415154", "0.6408731", "0.6396683", "0.63860554", "0.6370794", "0.6353809", "0.634...
0.0
-1
METHOD 8: DEPTHFIRST SEARCH USING A STACK This method solves the maze using breadthfirst search, this time, using a stack. It will still take in the maze
public static int[] dfs_Stack(gNode[] G, boolean[] visited, int[] path, int s){ Stack <Integer> dfs = new Stack<Integer>(); dfs.push(s); visited[s] = true; while(!dfs.isEmpty()){ s = dfs.pop(); for(gNode t=G[s]; t!= null; t=t.dest){ if(!visited[t.item]){ //once an item has been visited, set it equal to true visited[t.item] = true; path[t.item] = s; //change the int value of the path dfs.push(t.item); } } } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stack<MazePoint> DepthFirstSearch(int row, int column)\n {\n //cMaze[row][column].wasVisited()\n if(cMaze[row][column].isExit())\n {\n sPath.push(cMaze[row][column]);\n //print out the path\n PrintPath(sPath, true);\n return sPath;\n ...
[ "0.72871023", "0.6768588", "0.64710766", "0.645953", "0.63642484", "0.6271256", "0.6234236", "0.61241555", "0.60703397", "0.60630256", "0.60406446", "0.5976431", "0.59638447", "0.59452784", "0.58824754", "0.587762", "0.5842304", "0.58212245", "0.5818742", "0.58040637", "0.576...
0.0
-1
METHOD 9: DEPTHFIRST SEARCH WITH RECURSION This method solves the maze using depthfirst search (w/recursion),
public static void dfsRecursion(gNode[] G, boolean[] visited, int[] path, int s){ visited[s] =true; for(gNode t = G[s]; t!=null; t=t.dest){ if(!visited[t.item]){ path[t.item]=s; dfsRecursion(G, visited, path, t.item); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stack<MazePoint> DepthFirstSearch(int row, int column)\n {\n //cMaze[row][column].wasVisited()\n if(cMaze[row][column].isExit())\n {\n sPath.push(cMaze[row][column]);\n //print out the path\n PrintPath(sPath, true);\n return sPath;\n ...
[ "0.77325815", "0.70551914", "0.66099834", "0.65396774", "0.6525591", "0.65224016", "0.6522038", "0.6472017", "0.6225173", "0.6196449", "0.61605406", "0.6159167", "0.61326563", "0.60578203", "0.5946599", "0.5934834", "0.5925713", "0.5921992", "0.58562595", "0.5850952", "0.5847...
0.0
-1
METHOD 10: ADJACENCY LIST This method will create the adjacency list based on the graph
public static void buildAdjacencyList(Maze m, int n){ int mazeSize = n*n; gNode[] AL = new gNode[mazeSize]; for(int i=0; i<AL.length-1; i++){ //for the right and left walls if(!(i%AL.length == n-1)){ if(m.check_wall(i, i+1, 'r') == false){ AL[i] = new gNode(i+1, AL[i]); } } //for the upper and bottom walls (just to avoid another for-loop) if(i < AL.length-n){ if(m.check_wall(i, i+n, 'u') == false){ AL[i] = new gNode(i+n, AL[i]); } } } for(int j=0; j<AL.length; j++){ System.out.println("VERTEX "+j); for(gNode t= AL[j]; t!=null; t=t.dest){ System.out.println(t.item); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<Edge> getAdjacencies();", "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVer...
[ "0.7263505", "0.71976274", "0.6857917", "0.6774595", "0.6505113", "0.643013", "0.64014983", "0.63976294", "0.62715155", "0.6266552", "0.6252571", "0.61060345", "0.61036956", "0.60978156", "0.60945284", "0.6073017", "0.60389304", "0.60179526", "0.6016792", "0.5988128", "0.5978...
0.0
-1
This method will be used to add the initial data accordingly
public ArrayList<Object> defaultBoxTypes(){ //ColourPrintOptions Properties //All colour option types available in the ColourPrintOption enum int[] colour = new int[]{ColourPrintOption.NoColour.getColOpt(), ColourPrintOption.OneColour.getColOpt(),ColourPrintOption.TwoColour.getColOpt()}; //All colour option percentage cost available in the ColourPrintOption enum double[] colPerc = new double[]{ColourPrintOption.NoColour.getPercentage(), ColourPrintOption.OneColour.getPercentage(),ColourPrintOption.TwoColour.getPercentage()}; ArrayList<BoxType> boxes = new ArrayList<BoxType>(); //Hardcoded initial box type values //Box Type | Grade | ColourPrintOption | ColourPrintOption% | ReinBottom | ReinfCorn | Reinf% | IsActive boxes.add(new BoxType("1","1", colour[0], colPerc[0], false, false, 0.00, true)); boxes.add(new BoxType("1","2", colour[0], colPerc[0], false, false, 0.00, true)); boxes.add(new BoxType("1","3", colour[0], colPerc[0], false, false, 0.00, true)); boxes.add(new BoxType("2","2", colour[1], colPerc[1], false, false, 12.00, true)); boxes.add(new BoxType("2","3", colour[1], colPerc[1], false, false, 12.00, true)); boxes.add(new BoxType("2","4", colour[1], colPerc[1], false, false, 12.00, true)); boxes.add(new BoxType("3","2",colour[2], colPerc[2], false, false, 15.00, true)); boxes.add(new BoxType("3","3",colour[2], colPerc[2], false, false, 15.00, true)); boxes.add(new BoxType("3","4",colour[2], colPerc[2], false, false, 15.00, true)); boxes.add(new BoxType("3","5",colour[2], colPerc[2], false, false, 15.00, true)); boxes.add(new BoxType("4","2", colour[2], colPerc[2], true, false, 15.00, true)); boxes.add(new BoxType("4","3", colour[2], colPerc[2], true, false, 15.00, true)); boxes.add(new BoxType("4","4", colour[2], colPerc[2], true, false, 15.00, true)); boxes.add(new BoxType("4","5", colour[2], colPerc[2], true, false, 15.00, true)); boxes.add(new BoxType("5","3", colour[2], colPerc[2], true, true, 25.00, true)); boxes.add(new BoxType("5","4", colour[2], colPerc[2], true, true, 25.00, true)); boxes.add(new BoxType("5","5", colour[2], colPerc[2], true, true, 25.00, true)); ArrayList<Object> btList = new ArrayList<Object>(); for(int i=0; i < boxes.size(); i++){ btList.add(boxes.get(i).getBoxType() +"," + boxes.get(i).getCardGrade() +"," + boxes.get(i).getColourOption() + "," + boxes.get(i).getColourOptionPercentage() + "," + boxes.get(i).isReinfBottom() + "," + boxes.get(i).isReinfCorn() + "," + boxes.get(i).getReinfPercentage() + "," + boxes.get(i).isActive + ", \n"); } return btList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\...
[ "0.78427535", "0.78427535", "0.78427535", "0.78427535", "0.78427535", "0.78427535", "0.7729716", "0.76609707", "0.76533806", "0.7651555", "0.7649823", "0.7649823", "0.7589307", "0.7576715", "0.7561135", "0.7561135", "0.75534034", "0.7519955", "0.75117916", "0.75036556", "0.75...
0.0
-1
This method will check whether the default box types were created in the file
public ArrayList<Object> validateDefaultBoxTypes(){ ArrayList<Object> btList = new ArrayList<Object>(); if(getList(PRODUCT_PATH)==null){ btList.addAll(defaultBoxTypes()); return btList; } for(int i=0; i< defaultBoxTypes().size(); i++){ if(defaultBoxTypes().get(i).equals(getList(PRODUCT_PATH).iterator())){ }else{ btList.add(defaultBoxTypes().get(i)); } } if(btList.size()<0){ return null; }else{ return btList; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Object> defaultBoxTypes(){\n\t\t//ColourPrintOptions Properties\n\t\t//All colour option types available in the ColourPrintOption enum\n\t\tint[] colour = new int[]{ColourPrintOption.NoColour.getColOpt(), \n\t\t\t\tColourPrintOption.OneColour.getColOpt(),ColourPrintOption.TwoColour.getColOpt()};\n...
[ "0.60501367", "0.597637", "0.59177387", "0.58724725", "0.5863238", "0.57939917", "0.5579411", "0.5563745", "0.5442224", "0.54118294", "0.5398252", "0.53950495", "0.53362054", "0.52911526", "0.5265303", "0.5245692", "0.52394575", "0.5225614", "0.52174866", "0.521613", "0.52145...
0.65418077
0
This method will be used to calculate the volume of a box by the user specified dimensions
public String calcSurfaceAreaOfBox(double length, double width, double height, double cost, int quantity){ double surfaceArea = 2*(width * length) + 2*(length * height) + 2*(width * height); double computedCost = cost * surfaceArea; double totalCost = computedCost * quantity; DecimalFormat df = new DecimalFormat("##.##"); return df.format(totalCost); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String [] args){\n\r\n Box box1 = new Box(10.0, 20.0, 15.0);\r\n Box box2 = new Box();\r\n Box box3 = new Box(7);\r\n\r\n double vol = box1.Volume();\r\n System.out.println(\"The Volume of box1: \"+vol);\r\n\r\n vol = box2.Volume();\r\n Syste...
[ "0.7140493", "0.7106524", "0.70839554", "0.702827", "0.695058", "0.695058", "0.69346887", "0.6922983", "0.68704563", "0.67770517", "0.6730048", "0.672721", "0.67227536", "0.6699203", "0.6641555", "0.6614941", "0.6614265", "0.6601639", "0.656963", "0.6501758", "0.6449204", "...
0.0
-1
This method may be used to add a specified percentage to the cost shown in a textfield (i.e: add colour print percentage to the cost of the box)
public void addPercentageToCost(JTextField textField, double percent){ //CardGrade Properties double origGradeCost = Double.valueOf(textField.getText()); double sum = (origGradeCost * percent / 100) + origGradeCost; sum = Math.round(sum * 100); sum = sum/100; textField.setText(String.valueOf(sum)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void percent()\n\t{\n\t\tDouble percent;\t\t//holds the right value percentage of the left value\n\t\tString newText = \"\";//Holds the updated text \n\t\tif(calc.getLeftValue ( ) != 0.0 && Fun != null)\n\t\t{\n\t\t\tsetRightValue();\n\t\t\tpercent = calc.getRightValue() * 0.01 * calc.getLeftValue();\n\t\t...
[ "0.67218584", "0.6585632", "0.62429845", "0.6159801", "0.6142358", "0.60641575", "0.60492384", "0.59809774", "0.5971775", "0.59689116", "0.59402853", "0.59243304", "0.5896911", "0.58927524", "0.587081", "0.5796374", "0.57823586", "0.577438", "0.57726896", "0.5770402", "0.5765...
0.8212438
0
This method will compute the correct cost and the total cost of box cost quantity according to the parameters passed to it
public double returnBoxCost(double cardGradeCost, double colourOptPercent, double reinfPercent, double sealablePercent, int qty, double length, double width, double height){ double sum = cardGradeCost + (cardGradeCost * colourOptPercent / 100) + (cardGradeCost * reinfPercent / 100) + (cardGradeCost * sealablePercent / 100); double computeTotal = 0; DecimalFormat df = new DecimalFormat("##.##"); try{ computeTotal = Double.valueOf(calcSurfaceAreaOfBox(length, width, height, sum, qty)); return Double.valueOf(df.format(computeTotal)); }catch(NumberFormatException nme){ return 0.00; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double Cost(double boxes, double Cost) {\n\tdouble pay = boxes * Cost;\n\treturn pay;\n}", "public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAm...
[ "0.74331397", "0.69724363", "0.6677726", "0.65370077", "0.6431816", "0.6332957", "0.626661", "0.6250655", "0.6223832", "0.622378", "0.6208951", "0.6208951", "0.6199922", "0.61795336", "0.6133281", "0.6113645", "0.61078256", "0.6096503", "0.6047753", "0.6040718", "0.60173225",...
0.68586314
2
This method will compute the correct cost according to the parameters passed to it
public double returnBoxCost(double cardGradeCost, double colourOptPercent, double reinfPercent, double sealablePercent){ double sum = cardGradeCost + ((cardGradeCost * colourOptPercent) / 100) + ((cardGradeCost * reinfPercent) / 100) + ((cardGradeCost * sealablePercent) / 100); double computeTotal = 0.00; DecimalFormat df = new DecimalFormat("##.##"); try{ computeTotal = Double.valueOf(df.format(sum)); }catch(NumberFormatException nme){ } return computeTotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getCost();", "double getCost();", "double getSolutionCost();", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "public abstract double getCost();", "protected abstract double getDefaultCost();", "double getTotalCost();", "float getCostReduction();", "public void compute(){\r\n\r\n\...
[ "0.7462457", "0.7462457", "0.74439496", "0.7387476", "0.7303156", "0.72468615", "0.71599704", "0.7149586", "0.7143792", "0.7137188", "0.7122418", "0.7108507", "0.69901913", "0.69898605", "0.6981662", "0.6961411", "0.6931223", "0.6928458", "0.68991", "0.6893234", "0.68571216",...
0.0
-1
this method will compute the cost based on the given parameters
public String returnBoxCost(double cardGradeCost, String colourOption, String reinfBotOption, String reinfCornOption, String sealOption){ double colOptPercent = 0.00; double reinfPercent = 0.00; double sealPercent = 0.00; if(colourOption.equals("2")){ colOptPercent = 15.00; }else if(colourOption.equals("1")){ colOptPercent = 12.00; }else{ colOptPercent = 0.00; } if((reinfBotOption.equals("true")) && (reinfCornOption.equals("true"))){ reinfPercent = 17.00; }else if((reinfBotOption.equals("true")) && (reinfCornOption.equals("false"))){ reinfPercent = 10.00; }else if((reinfBotOption.equals("false")) && (reinfCornOption.equals("true"))){ reinfPercent = 7.00; }else if((reinfBotOption.equals("true")) && (reinfCornOption.equals("select"))){ reinfPercent = 10.00; }else if((reinfBotOption.equals("select")) && (reinfCornOption.equals("false"))){ reinfPercent = 7.00; }else{ reinfPercent = 0.00; } if(sealOption.equals("true")){ sealPercent = 5.00; }else if(sealOption.equals("false")){ sealPercent = 0.00; }else{ sealPercent = 0.00; } double sum = cardGradeCost+((cardGradeCost*colOptPercent)/100) + ((cardGradeCost*reinfPercent)/100) + ((cardGradeCost*sealPercent)/100); DecimalFormat df = new DecimalFormat("##.##"); return df.format(sum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getCost();", "double getCost();", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.f...
[ "0.7190976", "0.7190976", "0.7136482", "0.7119998", "0.7043499", "0.6999867", "0.6969274", "0.68936336", "0.68459374", "0.682099", "0.67754775", "0.6729219", "0.6651276", "0.6625793", "0.65941083", "0.65700686", "0.6523296", "0.6514856", "0.65137064", "0.65137064", "0.6513706...
0.0
-1
Called when message is received.
@Override public void onMessageReceived(RemoteMessage remoteMessage) { super.onMessageReceived(remoteMessage); // [START_EXCLUDE] // There are two types of messages data messages and notification messages. Data messages are handled // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app // is in the foreground. When the app is in the background an automatically generated notification is displayed. // When the user taps on the notification they are returned to the app. Messages containing both notification // and data payloads are treated as notification messages. The Firebase console always sends notification // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options // [END_EXCLUDE] // TODO(developer): Handle FCM messages here. // Not getting messages here? See why this may be: https://goo.gl/39bRNJ Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) { Log.d(TAG, "Message data payload: " + remoteMessage.getData()); if (/* Check if data needs to be processed by long running job */ true) { // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher. scheduleJob(); } else { // Handle message within 10 seconds handleNow(); } } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { //Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody()); // processData(remoteMessage); //sendNotification(remoteMessage.getNotification().getBody()); //Toast.makeText(this, remoteMessage.getNotification().getBody(),Toast.LENGTH_SHORT).show(); } // Also if you intend on generating your own notifications as a result of a received FCM // message, here is where that should be initiated. See sendNotification method below. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "void onMessageReceived(Message message);", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.ge...
[ "0.8122202", "0.80398816", "0.785205", "0.78350604", "0.78322476", "0.7822788", "0.7797256", "0.77835315", "0.7694252", "0.7622119", "0.75510436", "0.75181186", "0.7510918", "0.75091225", "0.7503756", "0.745281", "0.7443811", "0.7413422", "0.7413422", "0.7413422", "0.7413422"...
0.0
-1
Handle time allotted to BroadcastReceivers.
private void handleNow() { Log.d(TAG, "Short lived task is done."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<String> key=intent.getStringArrayListExtra(\"time\");\n Calendar calendar = Calendar.getInstance();\n int hours = calendar.get(Calendar.HOUR_OF_DAY);\n int minutes = calendar.get(Calendar.MINUTE);\n ...
[ "0.65464044", "0.6226626", "0.611962", "0.60996675", "0.607122", "0.60530406", "0.6047379", "0.603238", "0.5989989", "0.59027153", "0.58687615", "0.5854633", "0.5854266", "0.5846572", "0.5846572", "0.5846572", "0.5846572", "0.5846572", "0.5835774", "0.58301353", "0.5800365", ...
0.0
-1
show Toast with massage and different colors
private void ShowToast(String massage, int colorText, int background) { Typeface font = Typeface.createFromAsset(getAssets(), "comic.ttf"); Toast toast = Toast.makeText(SignUpActivity.this, massage, Toast.LENGTH_LONG); View view=toast.getView(); TextView view1= view.findViewById(android.R.id.message); view1.setTextColor(colorText); view.setBackgroundResource(background); view1.setTypeface(font); toast.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showToast(int color) {\n String rgbString = \"R: \" + Color.red(color) + \" B: \" + Color.blue(color) + \" G: \" + Color.green(color);\n Toast.makeText(this, rgbString, Toast.LENGTH_SHORT).show();\n }", "public void toastSuccess(String mensagem){\n\n Context context = getAppl...
[ "0.7824688", "0.7811595", "0.7505371", "0.726954", "0.72437024", "0.7233329", "0.7157529", "0.7126696", "0.71175444", "0.71175444", "0.704128", "0.70111024", "0.7001095", "0.70002586", "0.69482005", "0.6945795", "0.68603724", "0.6829744", "0.6826315", "0.68115807", "0.6808117...
0.81744117
0
pop a dialog when User created successfully
private void showDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("User created successfully"); builder.setIcon(R.drawable.ic_shield); builder.setCancelable(true); builder.setPositiveButton( "Continue", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { finish(); } }); AlertDialog alert11 = builder.create(); alert11.show(); Window window = alert11.getWindow(); assert window != null; WindowManager.LayoutParams wlp = window.getAttributes(); wlp.gravity = Gravity.CENTER; wlp.y = 270; wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND; window.setAttributes(wlp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a n...
[ "0.70166063", "0.70100826", "0.6981803", "0.6882953", "0.67817676", "0.6726923", "0.6687639", "0.6534396", "0.6522465", "0.6500911", "0.64799035", "0.63699734", "0.6345562", "0.6343042", "0.6296517", "0.6294918", "0.62794435", "0.62202984", "0.6218993", "0.6203364", "0.619908...
0.66480416
7
activates the search dialog by calling onSearchRequested().
@Override public boolean onSearchRequested() { return super.onSearchRequested(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showSearch() {\n\t\tonSearchRequested();\n\t}", "@Override\n\tpublic boolean onSearchRequested () {\n\t\tif (!searchMode)\n\t\t\ttoggleSearch();\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onSearchRequested()\n\t{\n \tstartSearch(getCurSearch(), true, null, false);\n \treturn true;...
[ "0.7989228", "0.7910262", "0.7769844", "0.73507464", "0.73413974", "0.7294327", "0.71806633", "0.71806633", "0.71806633", "0.7038335", "0.7034937", "0.69995964", "0.6996985", "0.6989908", "0.69595814", "0.687179", "0.6866483", "0.68489724", "0.6845614", "0.6845614", "0.684460...
0.7339387
5
searchView.cancelPendingInputEvents(); searchView = null;
@Override protected void onDestroy() { closeSearchView(); super.onDestroy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDestroyView() {\n super.onDestroyView();\n notifyOnFinishSearchDialog();\n hideSoftKeyboard();\n unbinder.unbind();\n }", "@Override\n public void onSearchCleared() {\n }", "void unsetSearchWindowStart();", "void unsetSearchWin...
[ "0.7694797", "0.7320666", "0.73044306", "0.7276313", "0.7113499", "0.70670646", "0.7045079", "0.70235693", "0.69656897", "0.6964634", "0.68849367", "0.68092656", "0.6803115", "0.6751024", "0.6713445", "0.6691998", "0.6670426", "0.66614115", "0.653591", "0.6530998", "0.6512381...
0.7298445
3