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
Sets the upper chest.
public void setUpperChest(String upperChest) { this.upperChest = upperChest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setChest(double chest) {\n this.chest = chest;\n }", "public void setUpperValue(int value) {\n // Compute new extent.\n int lowerValue = getValue();\n int newExtent = Math.min(Math.max(0, value - lowerValue), getMaximum() - lowerValue);\n \n // Set extent ...
[ "0.6821643", "0.6649577", "0.6618183", "0.63634247", "0.62124133", "0.6110773", "0.60329413", "0.60097396", "0.590716", "0.58758307", "0.58341146", "0.56822187", "0.5666937", "0.5587955", "0.5576064", "0.5549353", "0.5542832", "0.54934114", "0.5455606", "0.54407823", "0.54345...
0.7152122
0
Gets the dress material.
public String getDressMaterial() { return dressMaterial; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMaterial() {\n return material;\n }", "public String getMaterial() {\n return material;\n }", "public java.lang.String getMaterial() {\r\n return material;\r\n }", "public Material getMaterial() {\n\t\treturn material;\n\t}", "@Override\n\tpublic Material getM...
[ "0.73194194", "0.73194194", "0.7289448", "0.7216031", "0.7178331", "0.7088609", "0.7067641", "0.6952546", "0.6868333", "0.6835325", "0.6735444", "0.6656765", "0.657421", "0.6538485", "0.6506422", "0.64879227", "0.64248955", "0.64162034", "0.6338651", "0.62223715", "0.62147653...
0.8645447
0
Sets the dress material.
public void setDressMaterial(String dressMaterial) { this.dressMaterial = dressMaterial; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDressMaterial() {\r\n\t\treturn dressMaterial;\r\n\t}", "public void setMaterial(String material) {\n this.material = material;\n }", "public void setMaterial(java.lang.String material) {\r\n this.material = material;\r\n }", "public void setMaterial(Material mat)\r\n\t{\...
[ "0.70218223", "0.6626265", "0.6525254", "0.64895064", "0.6317969", "0.63053864", "0.62391734", "0.6203241", "0.6202858", "0.6191883", "0.6118882", "0.6097699", "0.604564", "0.60163623", "0.5942853", "0.5842238", "0.58390045", "0.58390045", "0.58255744", "0.57709837", "0.57512...
0.81628233
0
Gets the front neck design.
public String getFrontNeckDesign() { return frontNeckDesign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFrontNeckDesign(String frontNeckDesign) {\r\n\t\tthis.frontNeckDesign = frontNeckDesign;\r\n\t}", "public String getFrontDesc() {\n return frontDesc;\n }", "public Card front()\n {\n if (firstLink == null)\n return null;\n\n return firstLink.getCard();\n ...
[ "0.70246416", "0.68870693", "0.6746035", "0.67456377", "0.6689928", "0.6584242", "0.641365", "0.6395654", "0.63520014", "0.63498557", "0.6232575", "0.6108311", "0.60974705", "0.6063042", "0.6060734", "0.60582244", "0.6049761", "0.60067075", "0.597534", "0.59577805", "0.595341...
0.8457298
0
Sets the front neck design.
public void setFrontNeckDesign(String frontNeckDesign) { this.frontNeckDesign = frontNeckDesign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFront(Node front){\n this.front = front;\n }", "@JSProperty(\"front\")\n void setFront(Chart3dFrameFrontOptions value);", "public void setFrontNeckDepth(String frontNeckDepth) {\r\n\t\tthis.frontNeckDepth = frontNeckDepth;\r\n\t}", "public void setFront(int x) {\r\n front = x...
[ "0.7309322", "0.70485884", "0.6952875", "0.69071853", "0.67525834", "0.6558565", "0.6511624", "0.6449408", "0.62285215", "0.612784", "0.60449415", "0.6036327", "0.6022381", "0.60204756", "0.6000068", "0.5991689", "0.5943171", "0.5926879", "0.5925914", "0.59059477", "0.5831820...
0.804969
0
Gets the lining required.
public String getLiningRequired() { return liningRequired; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLiningRequired(String liningRequired) {\r\n\t\tthis.liningRequired = liningRequired;\r\n\t}", "public int getLevelRequired() {\n return levelRequired1;\n }", "public int getRequiredLevel() {\n\t\t\treturn level;\n\t\t}", "public int getRequiredLevel() {\n\t\t\treturn level;\n\t\t}", ...
[ "0.67049485", "0.63231766", "0.62095374", "0.62095374", "0.6056324", "0.60437924", "0.59703857", "0.5953863", "0.59100914", "0.5802745", "0.5798973", "0.5787767", "0.57601017", "0.5693983", "0.56914467", "0.56623507", "0.56321496", "0.5630565", "0.56265944", "0.55942875", "0....
0.8302243
0
Sets the lining required.
public void setLiningRequired(String liningRequired) { this.liningRequired = liningRequired; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLiningRequired() {\r\n\t\treturn liningRequired;\r\n\t}", "public void setLiningThickness(IfcPositiveLengthMeasure LiningThickness)\n\t{\n\t\tthis.LiningThickness = LiningThickness;\n\t\tfireChangeEvent();\n\t}", "public void setLiningOffset(IfcLengthMeasure LiningOffset)\n\t{\n\t\tthis.Lining...
[ "0.6981548", "0.6415727", "0.5902015", "0.58297485", "0.5809431", "0.5707276", "0.5704327", "0.5669007", "0.5632195", "0.56013906", "0.55391806", "0.5479066", "0.5469938", "0.5463399", "0.54577637", "0.5450016", "0.54487276", "0.5420346", "0.54140466", "0.5380787", "0.5352457...
0.7904982
0
Gets the further design.
public String getFurtherDesign() { return furtherDesign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Design getDesign();", "public Design getDesign() {\n return design;\n }", "String getDesignation();", "public Double getDesign()\r\n {\r\n return design;\r\n }", "public abstract String getDesign();", "public String getDesignation() {\n\t\treturn designation;\n\t}",...
[ "0.78203404", "0.7779561", "0.7517332", "0.74041283", "0.7284858", "0.714506", "0.6938547", "0.66884285", "0.66724616", "0.6606956", "0.6520778", "0.646275", "0.6407079", "0.63283", "0.62471354", "0.6197375", "0.6155909", "0.60071146", "0.5983781", "0.59704155", "0.572707", ...
0.8009581
0
Sets the further design.
public void setFurtherDesign(String furtherDesign) { this.furtherDesign = furtherDesign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDesign( final Double design )\r\n {\r\n this.design = design;\r\n }", "public void setDesignation(String Designation)\n\t{ f_Designation=Designation; }", "public void setDesignation(String designation) {\n\t\tthis.designation = designation;\n\t}", "public void designBasement() {\n...
[ "0.7566946", "0.7252284", "0.65380436", "0.6505601", "0.6300757", "0.62800753", "0.6264777", "0.60292596", "0.59995115", "0.5959704", "0.5928553", "0.592788", "0.5921458", "0.5798239", "0.5786381", "0.57432914", "0.5721531", "0.56688344", "0.5601689", "0.54980147", "0.5488232...
0.7459003
1
Gets the delivery date.
public String getDeliveryDate() { return deliveryDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDeliveryDate() {\n return deliveryDate;\n }", "public Date getDeliveryDate() {\n return (Date)getAttributeInternal(DELIVERYDATE);\n }", "public Date getDeliveryDate() {\n return (Date) getAttributeInternal(DELIVERYDATE);\n }", "public ZonedDateTime getDeliveryDate...
[ "0.84876084", "0.8340945", "0.8263381", "0.82199144", "0.77004397", "0.7621084", "0.7540232", "0.7370606", "0.72488797", "0.72113657", "0.7081019", "0.7057267", "0.67922777", "0.67873174", "0.67430925", "0.67379665", "0.6565574", "0.65629196", "0.65477604", "0.65391207", "0.6...
0.8680735
0
Sets the delivery date.
public void setDeliveryDate(String deliveryDate) { this.deliveryDate = deliveryDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDeliveryDate(Date value) {\n setAttributeInternal(DELIVERYDATE, value);\n }", "public void setDeliveryDate(Date value) {\n setAttributeInternal(DELIVERYDATE, value);\n }", "@JsonProperty(\"deliveryDate\")\n public void setDeliveryDate(Date deliveryDate) {\n this.del...
[ "0.8184654", "0.8184654", "0.76901656", "0.7671794", "0.72402745", "0.70973516", "0.7074291", "0.70246845", "0.6851761", "0.6800282", "0.6799053", "0.6762415", "0.6711875", "0.6659573", "0.66188043", "0.6615467", "0.65972924", "0.65972924", "0.65972924", "0.6597141", "0.65791...
0.80126226
2
Gets the order date.
public String getOrderDate() { return orderDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getOrderDate();", "public Date getDate() {\n return order.getDate();\n }", "public String getOrderDate() {\n\t\treturn orderDate;\n\t}", "public Date getOrderDate() {\n return orderDate;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "public j...
[ "0.87551504", "0.838176", "0.82388204", "0.8114809", "0.8114809", "0.8019663", "0.80079985", "0.7956606", "0.77396065", "0.7692538", "0.76325303", "0.72703815", "0.7217144", "0.7125616", "0.70141417", "0.6922272", "0.6777869", "0.6760218", "0.650776", "0.6500521", "0.6495121"...
0.82818496
2
Sets the order date.
public void setOrderDate(String orderDate) { this.orderDate = orderDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDateOrder(DateOrder dateOrder)\r\n {\r\n m_dateOrder = dateOrder;\r\n }", "public void setOrderDate(Date orderDate) {\n this.orderDate = orderDate;\n }", "public void setOrderDate(LocalDate orderDate) {\n try {\n if(orderDate!=null){\n LocalDate ne...
[ "0.8179459", "0.8173412", "0.77700645", "0.7632281", "0.6955025", "0.6884371", "0.6874782", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68427736", "0.68404907", "0.68404907", "0.68404907", "0.68376905", "0...
0.7765975
3
Gets the user details.
public UserDetails getUserDetails() { return userDetails; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<>();\n // user name\n user.put(KEY_NAME, sharedPreferences.getString(KEY_NAME, null));\n // user rol\n user.put(KEY_ROL, sharedPreferences.getString(KEY_ROL, null));\n // user us...
[ "0.7856564", "0.78541166", "0.7826381", "0.7663958", "0.76074666", "0.7605909", "0.7507729", "0.7501386", "0.74232435", "0.72358876", "0.7235822", "0.72099507", "0.71598536", "0.7150389", "0.7148908", "0.71440065", "0.711675", "0.711675", "0.711675", "0.70987535", "0.70879704...
0.7603744
6
Sets the user details.
public void setUserDetails(UserDetails userDetails) { this.userDetails = userDetails; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "p...
[ "0.7263061", "0.72454023", "0.71035856", "0.71012044", "0.70793205", "0.7071949", "0.70664173", "0.70212686", "0.6985011", "0.6967249", "0.6966676", "0.6875307", "0.6870765", "0.68578815", "0.68578815", "0.68578815", "0.68294704", "0.6799064", "0.6789628", "0.6789628", "0.678...
0.7382624
0
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { /* TODO output your page here. You may use following s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.8762916", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.87315136", "0.869834", "0.869834", "0.869834", "0.869834", "0.869834", "0.869834", "0.85301465", "0.85301465", "0.8527069", "0.8527069...
0.0
-1
creates the debug menu
private void createDebugMenu(){ debugMenu = new JMenu("Debug"); //Create "debug" checkbox [disabled] debugCheckBoxMenuItem = new JCheckBoxMenuItem("Debug", true); debugCheckBoxMenuItem.setToolTipText("Toggles debug text area. Defaulted to on due to a bug"); debugCheckBoxMenuItem.addItemListener(new ItemHan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createMenusNow()\n {\n JMenu debugMenu = myToolbox.getUIRegistry().getMenuBarRegistry().getMenu(MenuBarRegistry.MAIN_MENU_BAR,\n MenuBarRegistry.DEBUG_MENU);\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Print Summary\", e -> printSummary()));\n deb...
[ "0.8017855", "0.7109395", "0.6846274", "0.6684138", "0.667883", "0.66426545", "0.6637509", "0.66178036", "0.6615997", "0.6611323", "0.66002995", "0.65763783", "0.6557535", "0.65468967", "0.65454733", "0.6509783", "0.64991015", "0.6496985", "0.6491683", "0.6469448", "0.6464653...
0.7980407
1
creates the menu bar, and adds each menu to it
private void createMenuBar(){ menuBar = new JMenuBar(); //Create the "File" menu this.createFileMenu(); menuBar.add(fileMenu); //Create "debug" menu[disabled] //createDebugMenu(); //last to be added to the menubar: about about = new JMenuItem("About"); about.addActionListener(this); men...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuIt...
[ "0.8156855", "0.8088305", "0.7888455", "0.78770304", "0.7839068", "0.7791738", "0.7741824", "0.7722566", "0.7679664", "0.7629138", "0.76136506", "0.75484425", "0.75143546", "0.7507024", "0.7499157", "0.7475371", "0.7436087", "0.7407501", "0.7407046", "0.73286825", "0.7325613"...
0.78383106
5
Handles actions on buttons and menu items and such.
public void actionPerformed(ActionEvent event){ Object source = event.getSource(); //System.out.println(source); if(source == open){ //If the Open menu item is pressed, then open an image and then display it (display is temporary) //BufferedImage img = ImageFileIO.OpenImage(); nImage image = ImageFileIO....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void actionPerformed(ActionEvent event) {\n String buttonName = ((JMenuItem) event.getSource()).getText();\n if (buttonName.equals(\"About\")) {\n aboutHandler();\n } else if (buttonName.equals(\"New game/restart\")) {\n resta...
[ "0.7367298", "0.64277583", "0.6398923", "0.6378897", "0.63751596", "0.6369746", "0.6333951", "0.63237333", "0.63156116", "0.6300756", "0.6262927", "0.6255696", "0.62522626", "0.6251448", "0.62453973", "0.62429273", "0.6217466", "0.6202102", "0.61971533", "0.61844516", "0.6174...
0.0
-1
What to do when it receives an event
public void itemStateChanged(ItemEvent e){ Object source = e.getItemSelectable(); if(source == debugCheckBoxMenuItem) {//if the source is the debug check box then check the state //System.out.println(debugCheckBoxMenuItem.getState()); if(debugCheckBoxMenuItem.getState()== true){ //if the stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "public void consulterEvent() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \...
[ "0.8024322", "0.7520454", "0.7439195", "0.74391025", "0.74391025", "0.7437568", "0.7437568", "0.7437568", "0.7437568", "0.7437568", "0.74116945", "0.74116945", "0.74116945", "0.7408721", "0.7386838", "0.7378374", "0.7311395", "0.7281453", "0.725969", "0.72004884", "0.711036",...
0.0
-1
TODO Autogenerated method stub
@Override public void windowDeactivated(WindowEvent arg0) { }
{ "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 windowDeiconified(WindowEvent arg0) { }
{ "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 windowIconified(WindowEvent arg0) { }
{ "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 windowOpened(WindowEvent arg0) { }
{ "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
public static void main(String[] args) { final JFrame GUIMain = new GUIMain(); GUIMain.setIconImage(new ImageIcon("Icons/pictogram-din-w005-radioactive.png").getImage()); }
{ "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
++++++ Methods only for testing purpose +++++++
double getMaxAmountl() { return MAX_AMOUNT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void test() {\n\n\t}", "private stendhal() {\n\t}", "private test5() {\r\n\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public ...
[ "0.64967036", "0.6382324", "0.617898", "0.6073863", "0.60704964", "0.59997654", "0.5923636", "0.58625877", "0.58542335", "0.5830231", "0.5826904", "0.58123773", "0.5803322", "0.57893324", "0.57772213", "0.5775547", "0.57503974", "0.57503974", "0.57503974", "0.57503974", "0.57...
0.0
-1
If we rewind the token stream, the scanner might pass comments that we've already seen. Only record comments past the furthest comment end position we've seen. NB: this assumes the CommentRecorder is used for at most one source file.
@Override public void recordComment(Comment.Type type, SourceRange range, String value) { if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) { value = value.trim(); if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) { sourceMapURL = value.subst...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void moveNext() {\n moveNextInternal();\n while (tokenType == CifTokenType.COMMENT) {\n moveNextInternal();\n }\n }", "private void skipComment() {\r\n int length = sourceCode.length();\r\n if (++index < length) {\r\n char character = sourceCode.charAt(...
[ "0.6532349", "0.6514239", "0.62209564", "0.6190444", "0.61764675", "0.615624", "0.6083111", "0.6082532", "0.59596837", "0.5916087", "0.5877218", "0.5813192", "0.577084", "0.5707838", "0.5697825", "0.5610052", "0.5593658", "0.555818", "0.5549234", "0.5514807", "0.5475156", "...
0.49059138
75
Returns the url provided by the sourceMappingURL if any was found.
public @Nullable String getSourceMapURL() { return sourceMapURL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URL findJp2(MapData mapData) {\r\n\t\tfinal String fileBase = getFileBase(mapData) + \".jp2\";\r\n\t\t\r\n\t\tfor(ServerConfig serverConfig : servers) {\r\n\t\t\tif(serverConfig.getJp2Locations() == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(String location : serverConfig.getJp2Locations...
[ "0.58977824", "0.5766119", "0.56436366", "0.5591504", "0.5470251", "0.546615", "0.5397007", "0.5352592", "0.53062457", "0.5273182", "0.5273182", "0.5273182", "0.5273182", "0.5273182", "0.5273182", "0.5232777", "0.51411945", "0.5131329", "0.512914", "0.50644124", "0.501852", ...
0.62424976
0
Returns true if the string value should be treated as a keyword in the current context.
private boolean isKeyword(String value) { return Keywords.isKeyword(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isKeyword(@Nullable String text);", "public abstract boolean isKeyword();", "public boolean isKeyword(String keyword) {\n return this.keyword.equals(keyword); \n }", "public static boolean isKeyword(String s) {\n return keywords.containsKey(s.toLowerCase());\n }", ...
[ "0.7854821", "0.7763234", "0.7690465", "0.7599757", "0.73307353", "0.715706", "0.7042469", "0.7042469", "0.7042469", "0.6752545", "0.67305964", "0.663281", "0.65768635", "0.6512991", "0.63081616", "0.6303299", "0.62777287", "0.6189203", "0.6093148", "0.60786986", "0.6066874",...
0.8553397
0
ImportSpecifier ::= Identifier ('as' Identifier)?
private ParseTree parseImportSpecifier() { SourcePosition start = getTreeStartLocation(); IdentifierToken importedName = eatIdOrKeywordAsId(); IdentifierToken destinationName = null; if (peekPredefinedString(PredefinedName.AS)) { eatPredefinedString(PredefinedName.AS); destinationName = eatI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ImportDeclaration createImportDeclaration();", "private String importDeclaration()\r\n {\r\n String handle;\r\n\r\n matchKeyword(Keyword.IMPORTSY);\r\n handle = nextToken.string;\r\n matchKeyword(Keyword.IDENTSY);\r\n handle = qualifiedImport(handle);\r\n matchKeyword(Keyword.SEMICOLON...
[ "0.6692995", "0.6611925", "0.61791176", "0.59703106", "0.59703106", "0.5867203", "0.57901174", "0.575503", "0.5745022", "0.566381", "0.5597315", "0.5591554", "0.55827576", "0.55764365", "0.5576125", "0.557435", "0.5570598", "0.555938", "0.55356854", "0.55196565", "0.5486618",...
0.7789518
0
export VariableStatement export FunctionDeclaration export ConstStatement export ClassDeclaration export default expression etc
private boolean peekExportDeclaration() { return peek(TokenType.EXPORT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VariableDeclaration createVariableDeclaration();", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id...
[ "0.5844661", "0.57843435", "0.5728648", "0.57230467", "0.56720716", "0.5664995", "0.5639521", "0.56281626", "0.5575022", "0.55406857", "0.5536912", "0.549076", "0.5460596", "0.5426909", "0.53867817", "0.537373", "0.5370485", "0.5352114", "0.5349537", "0.53383005", "0.5291486"...
0.0
-1
ExportSpecifier ::= Identifier ('as' Identifier)?
private ParseTree parseExportSpecifier() { SourcePosition start = getTreeStartLocation(); IdentifierToken importedName = eatIdOrKeywordAsId(); IdentifierToken destinationName = null; if (peekPredefinedString(PredefinedName.AS)) { eatPredefinedString(PredefinedName.AS); destinationName = eatI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean peekExportDeclaration() {\n return peek(TokenType.EXPORT);\n }", "private ParseTree parseImportSpecifier() {\n SourcePosition start = getTreeStartLocation();\n IdentifierToken importedName = eatIdOrKeywordAsId();\n IdentifierToken destinationName = null;\n if (peekPredefinedString...
[ "0.5787464", "0.56785893", "0.5559932", "0.5444583", "0.5154657", "0.51346296", "0.50795066", "0.5010363", "0.49683034", "0.4898847", "0.48573518", "0.4825139", "0.48016247", "0.4795202", "0.47807023", "0.47701448", "0.4769191", "0.4762873", "0.4730948", "0.4691538", "0.46733...
0.8002182
0
only eat `static` if it being used as a keyword and not a member name.
private boolean eatStaticIfNotElementName() { if (peek(TokenType.STATIC) && isClassElementStart(peekToken(1))) { eat(TokenType.STATIC); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void isStatic() {\n\n }", "boolean isStatic();", "boolean isStatic();", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "boolean getIsStatic();", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}", "public boolean isStatic() {\n\t\treturn (access & Opcode...
[ "0.6856614", "0.6572902", "0.6572902", "0.65704405", "0.6540244", "0.6540115", "0.63309634", "0.62726754", "0.62652546", "0.60936135", "0.60326725", "0.59631777", "0.5921164", "0.5871664", "0.5861256", "0.58546907", "0.5853769", "0.58155465", "0.5809978", "0.57970876", "0.578...
0.76045734
0
12 Statements In V8, all source elements may appear where statements occur in the grammar.
private ParseTree parseStatement() { return parseSourceElement(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(index);\r\n if (!Character.isWhitespace(c)) {\r\n ArrayList<String> tokens = tokenizeStatement(sourceCode);\r\n if (tokens != null) ...
[ "0.6627196", "0.63379395", "0.6289492", "0.6168298", "0.60457814", "0.5770219", "0.5720072", "0.5661014", "0.56503266", "0.5641544", "0.5600977", "0.5587006", "0.5492854", "0.5477856", "0.54714906", "0.54706895", "0.54549813", "0.5447618", "0.5438894", "0.54343975", "0.541589...
0.6162294
4
This function reflects the ECMA standard. Most places use peekStatement instead.
private ParseTree parseStatementStandard() { switch (peekType()) { case OPEN_CURLY: return parseBlock(); case CONST: case VAR: return parseVariableStatement(); case SEMI_COLON: return parseEmptyStatement(); case IF: return parseIfStatement(); case ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean peekStatement() {\n return peekSourceElement();\n }", "private boolean peekStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n case VAR:\n case CONST:\n case SEMI_COLON:\n case IF:\n case DO:\n case WHILE:\n case FOR:\n case CONTI...
[ "0.7355308", "0.6916394", "0.66113895", "0.6273483", "0.60422784", "0.598681", "0.594745", "0.5864666", "0.5864666", "0.57550514", "0.5748007", "0.5728567", "0.56993717", "0.5635402", "0.55751264", "0.5558127", "0.55168164", "0.5495642", "0.5495642", "0.5462947", "0.5449829",...
0.63630784
3
In V8 all source elements may appear where statements appear in the grammar.
private boolean peekStatement() { return peekSourceElement(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(index);\r\n if (!Character.isWhitespace(c)) {\r\n ArrayList<String> tokens = tokenizeStatement(sourceCode);\r\n if (tokens != null) ...
[ "0.6619332", "0.6508838", "0.62847626", "0.5862453", "0.58386916", "0.5482685", "0.5451157", "0.5430746", "0.542706", "0.5418364", "0.5390046", "0.53843236", "0.5363116", "0.5345987", "0.5325608", "0.532374", "0.5318999", "0.5288802", "0.5260023", "0.5251889", "0.5224546", ...
0.5478692
6
This function reflects the ECMA standard. Most places use peekStatement instead.
private boolean peekStatementStandard() { switch (peekType()) { case OPEN_CURLY: case VAR: case CONST: case SEMI_COLON: case IF: case DO: case WHILE: case FOR: case CONTINUE: case BREAK: case RETURN: case WITH: case SWITCH: case THR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean peekStatement() {\n return peekSourceElement();\n }", "Token peekToken() throws SyntaxException;", "private ParseTree parseStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n return parseBlock();\n case CONST:\n case VAR:\n return parseVariable...
[ "0.7355308", "0.66113895", "0.63630784", "0.6273483", "0.60422784", "0.598681", "0.594745", "0.5864666", "0.5864666", "0.57550514", "0.5748007", "0.5728567", "0.56993717", "0.5635402", "0.55751264", "0.5558127", "0.55168164", "0.5495642", "0.5495642", "0.5462947", "0.5449829"...
0.6916394
1
12.6 Iteration Statements 12.6.1 The dowhile Statement
private ParseTree parseDoWhileStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.DO); ParseTree body = parseStatement(); eat(TokenType.WHILE); eat(TokenType.OPEN_PAREN); ParseTree condition = parseExpression(); eat(TokenType.CLOSE_PAREN); // The semicolon after th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void iterator() {\n\t\t\r\n\t}", "public void nextIterate() {\n\tdd1[0] = POW2_53 * d1;\n\tdd1[1] = 0.0;\n\tdddivd(dd1, POW3_33, dd2);\n\tddmuldd(POW3_33, Math.floor(dd2[0]), dd2);\n\tddsub(dd1, dd2, dd3);\n\td1 = dd3[0];\n\tif (d1 < 0.0) {\n\t d1 += POW3_33;\n\t}\n }", "public static void...
[ "0.65216213", "0.5913728", "0.5802141", "0.57639384", "0.57075065", "0.5621221", "0.56020933", "0.55721945", "0.5571883", "0.55694157", "0.556462", "0.5560347", "0.5551112", "0.5548299", "0.55261534", "0.55257815", "0.54954004", "0.549436", "0.54793835", "0.54713696", "0.5463...
0.0
-1
12.6.2 The while Statement
private ParseTree parseWhileStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.WHILE); eat(TokenType.OPEN_PAREN); ParseTree condition = parseExpression(); eat(TokenType.CLOSE_PAREN); ParseTree body = parseStatement(); return new WhileStatementTree(getTreeLocation(star...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "While createWhile();", "private Loop whileStatement()\n\t{\n\t\tmatch(TokenType.While);\n\t\t// (\n\t\tmatch(TokenType.LeftParen);\n\t\t// <<Expression>>\n\t\tExpression e = expression();\n\t\t// )\n\t\tmatch(TokenType.RightParen);\n\t\t// <<Statement>>\n\t\tStatement s = statement();\n\t\t\n\t\treturn new Loop(...
[ "0.77327114", "0.75909644", "0.74195355", "0.7186937", "0.71465683", "0.71439546", "0.71001184", "0.7051059", "0.69878924", "0.68952715", "0.68734616", "0.67305857", "0.6641791", "0.6599408", "0.65940726", "0.65075374", "0.6440243", "0.63610196", "0.626605", "0.6236144", "0.6...
0.6915418
9
12.6.3 The for Statement 12.6.4 The forin Statement The forof Statement The forawaitof Statement
private ParseTree parseForStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.FOR); boolean awaited = peekPredefinedString(AWAIT); if (awaited) { eatPredefinedString(AWAIT); } eat(TokenType.OPEN_PAREN); if (peekVariableDeclarationList()) { VariableDeclarati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ParseTree parseForAwaitOfStatement(SourcePosition start, ParseTree initializer) {\n if (functionContextStack.isEmpty() || !functionContextStack.peekLast().isAsynchronous) {\n reportError(\"'for-await-of' used in a non-async function context\");\n }\n eatPredefinedString(PredefinedName.OF);\n ...
[ "0.6390172", "0.586194", "0.5627998", "0.5458096", "0.54570466", "0.53729343", "0.5309285", "0.5223871", "0.51235765", "0.5118283", "0.50628", "0.5017042", "0.50029385", "0.4996377", "0.49904373", "0.49780425", "0.49640697", "0.49583238", "0.49494776", "0.49107534", "0.488790...
0.6770819
0
TODO(b/128938049): when toplevel await is supported, this shouldn't be a parse error.
private ParseTree parseForAwaitOfStatement(SourcePosition start, ParseTree initializer) { if (functionContextStack.isEmpty() || !functionContextStack.peekLast().isAsynchronous) { reportError("'for-await-of' used in a non-async function context"); } eatPredefinedString(PredefinedName.OF); ParseTree...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract T await();", "public static boolean awaitExpression(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"awaitExpression\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, AWAIT_EXPRESSION, \"<await expression>\");\n r = isInsideSyncOrAsyncFunction(b, l + 1);\n...
[ "0.60475045", "0.5978856", "0.5816018", "0.5661949", "0.5449206", "0.5449206", "0.5449206", "0.52510613", "0.52367073", "0.5092169", "0.50904405", "0.50721014", "0.50400454", "0.49885944", "0.49844173", "0.48855975", "0.48639625", "0.48211744", "0.48172322", "0.47743014", "0....
0.5260853
7
Checks variable declarations in for statements.
private void checkVanillaForInitializers(VariableDeclarationListTree variables) { for (VariableDeclarationTree declaration : variables.declarations) { if (declaration.initializer == null) { maybeReportNoInitializer(variables.declarationType, declaration.lvalue); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n...
[ "0.64192986", "0.5979561", "0.5859167", "0.57821006", "0.56733227", "0.56325394", "0.55293566", "0.55218965", "0.5521534", "0.54647964", "0.5454897", "0.54476625", "0.5442385", "0.5431846", "0.5416644", "0.54038316", "0.539848", "0.53966856", "0.53894883", "0.5375809", "0.536...
0.61497283
1
Reports if declaration requires an initializer, assuming initializer is absent.
private void maybeReportNoInitializer(TokenType token, ParseTree lvalue) { if (token == TokenType.CONST) { reportError("const variables must have an initializer"); } else if (lvalue.isPattern()) { reportError("destructuring must have an initializer"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isOnlyAssignedInInitializer();", "@Override\n public String visit(InitializerDeclaration n, Object arg) {\n return null;\n }", "private void checkVanillaForInitializers(VariableDeclarationListTree variables) {\n for (VariableDeclarationTree declaration : variables.declarations) {\n ...
[ "0.656044", "0.63633376", "0.59855634", "0.57913655", "0.5626085", "0.5601019", "0.5574308", "0.5556117", "0.55366737", "0.5476929", "0.53994757", "0.5398663", "0.53924906", "0.5340167", "0.53339064", "0.52009773", "0.51890945", "0.5183208", "0.51405174", "0.5093645", "0.5072...
0.66345376
0
12.6.3 The for Statement
private ParseTree parseForStatement(SourcePosition start, @Nullable ParseTree initializer) { if (initializer == null) { initializer = new NullTree(new SourceRange(getTreeEndLocation(), getTreeStartLocation())); } eat(TokenType.SEMI_COLON); ParseTree condition; if (!peek(TokenType.SEMI_COLON))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visit(ForStatement forStatement) {\n\t}", "private Stmt forStatement() {\n consume(LEFT_PAREN, \"Expect '(' after 'for'.\");\n\n Stmt initializer;\n if(match(SEMICOLON)) {\n initializer = null;\n } else if(match(VAR)) {\n initializer = varDeclaration(...
[ "0.72292113", "0.68979895", "0.6733212", "0.67276335", "0.6678866", "0.6634345", "0.66062266", "0.65258056", "0.6491769", "0.64839554", "0.6344538", "0.6301811", "0.6226676", "0.6085541", "0.6045646", "0.6008225", "0.59046775", "0.5873997", "0.58663774", "0.58226657", "0.5810...
0.6017239
15
12.6.4 The forin Statement
private ParseTree parseForInStatement(SourcePosition start, ParseTree initializer) { eat(TokenType.IN); ParseTree collection = parseExpression(); eat(TokenType.CLOSE_PAREN); ParseTree body = parseStatement(); return new ForInStatementTree(getTreeLocation(start), initializer, collection, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface In extends Clause {}", "@Override\n\tpublic void visit(InExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(InExpression arg0) {\n\n\t}", "Condition in(QueryParameter parameter, Object... values);", "private Loop parseFor(Tokenizer in) {\n\t\tLoop loop = new Loop();\n\t\tToken...
[ "0.5925275", "0.55877584", "0.5515375", "0.5459734", "0.5377117", "0.5365918", "0.52579176", "0.5174731", "0.51521254", "0.50748825", "0.5055714", "0.5018355", "0.4988277", "0.49600855", "0.49355614", "0.49294168", "0.49106824", "0.4891316", "0.48708296", "0.48516408", "0.481...
0.6772357
0
12.7 The continue Statement
private ParseTree parseContinueStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.CONTINUE); IdentifierToken name = null; if (!peekImplicitSemiColon()) { name = eatIdOpt(); } eatPossiblyImplicitSemiColon(); return new ContinueStatementTree(getTreeLocation(start)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void askForContinue() {\n\t\t\t\n\t\t}", "public static boolean continueStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"continueStatement\")) return false;\n if (!nextTokenIs(b, CONTINUE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, CONTINUE...
[ "0.7093995", "0.69773316", "0.6975649", "0.6883853", "0.68060243", "0.6782104", "0.6576549", "0.63925946", "0.63900054", "0.6285212", "0.6205575", "0.618486", "0.61651665", "0.6146327", "0.61205065", "0.6108807", "0.60745203", "0.60700256", "0.59722364", "0.59393287", "0.5911...
0.6823062
4
12.8 The break Statement
private ParseTree parseBreakStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.BREAK); IdentifierToken name = null; if (!peekImplicitSemiColon()) { name = eatIdOpt(); } eatPossiblyImplicitSemiColon(); return new BreakStatementTree(getTreeLocation(start), name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Break Break(){\n\t\treturn new Break();\r\n\t}", "public static boolean breakStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"breakStatement\")) return false;\n if (!nextTokenIs(b, BREAK)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, BREAK_STATEMENT, ...
[ "0.76556206", "0.7438374", "0.7398134", "0.7290747", "0.7169797", "0.70902383", "0.69751036", "0.6935327", "0.6915271", "0.68935883", "0.68747526", "0.6832416", "0.6817566", "0.67651165", "0.67103446", "0.6698953", "0.66950935", "0.66722125", "0.66428524", "0.6606096", "0.653...
0.7743451
0
12.9 The return Statement
private ParseTree parseReturnStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.RETURN); ParseTree expression = null; if (!peekImplicitSemiColon()) { expression = parseExpression(); } eatPossiblyImplicitSemiColon(); return new ReturnStatementTree(getTreeLocation...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ReturnStmt returnStmt() {\n Expr myExpr = null;\n \n lexer.nextToken();\n \n if (isFunction) myExpr = expr();\n \n return new ReturnStmt(myExpr); \n }", "Variable getReturn();", "private void return_(ReturnStmt stmt) {\n Value op = immedia...
[ "0.7774352", "0.7771038", "0.7337246", "0.72765213", "0.7241595", "0.7127972", "0.70352745", "0.6986455", "0.68791014", "0.68791014", "0.68791014", "0.68791014", "0.6860724", "0.6833681", "0.6824306", "0.6766415", "0.67287683", "0.6714109", "0.6705056", "0.6686686", "0.668574...
0.701577
7
12.10 The with Statement
private ParseTree parseWithStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.WITH); eat(TokenType.OPEN_PAREN); ParseTree expression = parseExpression(); eat(TokenType.CLOSE_PAREN); ParseTree body = parseStatement(); return new WithStatementTree(getTreeLocation(start)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isWith() {\n return true;\n }", "default With with(final With with) {\r\n\t\treturn with.parent(this);\r\n\t}", "public String with() {\n\t\treturn prefix(\"with\").replaceAll(\"ies$\", \"y\").replaceAll(\"s$\", \"\");\n\t}", "public interface BeforeWith<T extends BeforeWith<T>> extends Qu...
[ "0.6313337", "0.62475264", "0.62129736", "0.6172272", "0.61497265", "0.5958504", "0.5711776", "0.5701177", "0.5440989", "0.5386608", "0.5308079", "0.52916425", "0.5198919", "0.5187837", "0.50570565", "0.49933535", "0.49107262", "0.4799305", "0.47897655", "0.4763797", "0.47466...
0.71433413
0
12.11 The switch Statement
private ParseTree parseSwitchStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.SWITCH); eat(TokenType.OPEN_PAREN); ParseTree expression = parseExpression(); eat(TokenType.CLOSE_PAREN); eat(TokenType.OPEN_CURLY); ImmutableList<ParseTree> caseClauses = parseCaseClauses...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void do_switch() {\n {\n bind(OPC.CONST_0); iparmNone();\n pre(FLOW_NEXT); do_const(0); post();\n bind(OPC.CONST_1); iparmNone();\n pre(FLOW...
[ "0.7134773", "0.7038282", "0.6994499", "0.6849376", "0.6820885", "0.67934227", "0.67601806", "0.67420554", "0.67175263", "0.6706534", "0.6668929", "0.666032", "0.66558653", "0.662462", "0.6606514", "0.6599113", "0.6598001", "0.65900654", "0.65635574", "0.65342784", "0.6474374...
0.67528456
7
12.15 The Debugger Statement
private ParseTree parseDebuggerStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.DEBUGGER); eatPossiblyImplicitSemiColon(); return new DebuggerStatementTree(getTreeLocation(start)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void debug(String comment);", "public void debug() {\n\n }", "public void continueDebugStep() {\n \tthis.continueDebug = true;\n }", "private static void printDebug(String s)\n {\n }", "private void debug(String post) {\n if (GameLauncher.isDebugging()) {\n System.out.println(...
[ "0.73413825", "0.72599864", "0.6970099", "0.6870228", "0.6865081", "0.67760193", "0.6682278", "0.6652229", "0.6589493", "0.6583829", "0.65474683", "0.65474683", "0.65461326", "0.65435636", "0.65435636", "0.65370995", "0.6511369", "0.6494883", "0.6488371", "0.6485124", "0.6482...
0.69429946
3
Constructs a template literal expression tree. "operand" is used to handle the case like "foo`bar`", which is a CallExpression or MemberExpression that calls the function foo() with the template literal as the argument (with extra handling). In this case, operand would be "foo", which is the callsite. We store this ope...
private TemplateLiteralExpressionTree parseTemplateLiteral(@Nullable ParseTree operand) { SourcePosition start = operand == null ? getTreeStartLocation() : operand.location.start; Token token = nextToken(); if (!(token instanceof TemplateLiteralToken)) { reportError(token, "Unexpected template literal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Node buildLiteral(final String label) {\n\t\treturn NodeFactory.createLiteral(label);\n\t}", "ExpOperand createExpOperand();", "Literal createLiteral();", "Literal createLiteral();", "public String toString()\n {\n return \"LiteralOPToken(\" + getValue() + \")\";\n }", ...
[ "0.6028984", "0.5565535", "0.54840857", "0.54840857", "0.5474208", "0.53648627", "0.5321777", "0.5222212", "0.5180252", "0.5173519", "0.5136133", "0.51166433", "0.50773495", "0.50722533", "0.500208", "0.49931917", "0.49837977", "0.49675462", "0.49648982", "0.495464", "0.49440...
0.7307182
0
11.1.4 Array Literal Expression
private ParseTree parseArrayLiteral() { // ArrayLiteral : // [ Elisionopt ] // [ ElementList ] // [ ElementList , Elisionopt ] // // ElementList : // Elisionopt AssignmentOrSpreadExpression // ElementList , Elisionopt AssignmentOrSpreadExpression // // Elision : // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n @IncludeIn(POSTGRESQL)\n public void array2() {\n Expression<int[]> expr = Expressions.template(int[].class, \"'{1,2,3}'::int[]\");\n int[] result = firstResult(expr);\n Assert.assertEquals(3, result.length);\n Assert.assertEquals(1, result[0]);\n Assert.assertEqual...
[ "0.71876943", "0.7104029", "0.70706606", "0.6958291", "0.6853058", "0.67915714", "0.671506", "0.65605634", "0.6507408", "0.6460297", "0.64037466", "0.6243532", "0.6211178", "0.61428905", "0.61408824", "0.6134153", "0.613316", "0.6117748", "0.61052185", "0.60932416", "0.604337...
0.6626817
7
11.1.4 Object Literal Expression
private ParseTree parseObjectLiteral() { SourcePosition start = getTreeStartLocation(); ImmutableList.Builder<ParseTree> result = ImmutableList.builder(); eat(TokenType.OPEN_CURLY); Token commaToken = null; while (peek(TokenType.ELLIPSIS) || peekPropertyNameOrComputedProp(0) || peek(TokenType.STAR)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObjectLiteral createObjectLiteral();", "public LiteralExpression (String str){\n _value = str;\n }", "Expression createExpression();", "private String literal(Object obj) {\n if (obj == null) {\n return \"NULL\";\n } else if (obj instanceof String) {\n ...
[ "0.6950444", "0.6425997", "0.63124055", "0.62370455", "0.6161281", "0.6128873", "0.606022", "0.6051685", "0.6051685", "0.6016296", "0.59696835", "0.5959821", "0.5943417", "0.5938236", "0.58621395", "0.58578116", "0.58368146", "0.5828643", "0.5811157", "0.574584", "0.56489927"...
0.6751305
1
12.2 Primary Expression CoverParenthesizedExpressionAndArrowParameterList ::= ( Expression ) ( Expression, ) ( ) ( ... BindingIdentifier ) ( Expression , ... BindingIdentifier )
private ParseTree parseCoverParenthesizedExpressionAndArrowParameterList() { if (peekType(1) == TokenType.FOR) { return parseGeneratorComprehension(); } SourcePosition start = getTreeStartLocation(); eat(TokenType.OPEN_PAREN); // Case ( ) if (peek(TokenType.CLOSE_PAREN)) { eat(Token...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final EObject ruleCallablePrimaryExpression() throws RecognitionException {\n EObject current = null;\n\n EObject this_ArrayConstructionOperator_0 = null;\n\n EObject this_ArrayConcatenationOperator_1 = null;\n\n EObject this_ParenthesizedExpression_2 = null;\n\n\n EObjec...
[ "0.56119907", "0.54640603", "0.53952354", "0.5371356", "0.5366715", "0.5235048", "0.52220774", "0.5195058", "0.5080179", "0.48382714", "0.48308372", "0.4829414", "0.48197493", "0.48119867", "0.47784773", "0.47697648", "0.47643223", "0.47437763", "0.47255164", "0.46922252", "0...
0.6942751
0
Transforms a LeftHandSideExpression into a LeftHandSidePattern if possible. This returns the transformed tree if it parses as a LeftHandSidePattern, otherwise it returns the original tree.
private ParseTree transformLeftHandSideExpression(ParseTree tree) { switch (tree.type) { case ARRAY_LITERAL_EXPRESSION: case OBJECT_LITERAL_EXPRESSION: resetScanner(tree); // If we fail to parse as an LeftHandSidePattern then // parseLeftHandSidePattern will take care reporting e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LogicExpression getLeft();", "LogicExpression getLeftExp();", "private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return...
[ "0.6100109", "0.59529924", "0.5760613", "0.57349557", "0.5610109", "0.56000733", "0.5436096", "0.5428016", "0.5398343", "0.533166", "0.53094673", "0.5304945", "0.53020495", "0.5283811", "0.5265578", "0.524355", "0.5238501", "0.5236104", "0.5236104", "0.52258164", "0.52060235"...
0.7937793
0
TODO(bradfordcsmith): lastSourcePosition should really point to the end of the last token before the tree to correctly detect implicit semicolons, but it doesn't matter for the current use case.
private void resetScanner(SourcePosition start) { lastSourcePosition = start; scanner.setPosition(lastSourcePosition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SourcePosition getTreeEndLocation() {\n return lastSourcePosition;\n }", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(inde...
[ "0.61810595", "0.60897464", "0.6017285", "0.6005501", "0.5974366", "0.5858865", "0.5715184", "0.57104945", "0.56769824", "0.5670351", "0.5578479", "0.55470926", "0.55177593", "0.5515563", "0.5514927", "0.54884815", "0.54209036", "0.5394815", "0.53788507", "0.5361091", "0.5345...
0.0
-1
disallow yield outside of generators
private boolean inGeneratorContext() { return functionContextStack.peekLast().isGenerator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void blockNext();", "public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue) {\n // FIXME: during refactoring, it was determined that all calls to yield are passing false for yieldProc; is this still needed?\n IRubyObj...
[ "0.59406203", "0.57845896", "0.57281953", "0.5724845", "0.5706456", "0.5669163", "0.56240815", "0.5590738", "0.5590738", "0.5590738", "0.5590738", "0.5590738", "0.55649453", "0.5549462", "0.55139315", "0.54932195", "0.54886097", "0.54858947", "0.5482572", "0.54795647", "0.546...
0.58379465
1
yield [no line terminator] ()? AssignExpression
private ParseTree parseYield(Expression expressionIn) { SourcePosition start = getTreeStartLocation(); eat(TokenType.YIELD); boolean isYieldAll = false; ParseTree expression = null; if (!peekImplicitSemiColon()) { isYieldAll = eatOpt(TokenType.STAR) != null; if (peekAssignmentExpression(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AssignStmt assign_stmt() {\n AssignExpr ae = assign_expr();\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Semicolon expected after assignment\");\n }\n lexer.nextToken();\n\n return new AssignStmt(ae);\n }", "@Override\n\tpublic Void visit(Assig...
[ "0.6213058", "0.6010963", "0.59192383", "0.5903206", "0.5879675", "0.58752966", "0.5813889", "0.5798383", "0.57711077", "0.576225", "0.57164794", "0.5614072", "0.5607993", "0.5526456", "0.5502686", "0.5502339", "0.54821795", "0.5471666", "0.54696256", "0.54570574", "0.5418462...
0.5056113
56
Tries to parse the expression as an optional expression. `operand?.identifier` or `operand?.[expression]` or `operand?.(arg1, arg2)` returns parse tree after trying to parse it as an optional expression
private ParseTree maybeParseOptionalExpression(ParseTree operand) { // The optional chain's source info should cover the lhs operand also SourcePosition start = operand.location.start; while (peek(TokenType.QUESTION_DOT)) { eat(TokenType.QUESTION_DOT); switch (peekType()) { case OPEN_PA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ParseTree parseRemainingOptionalChainSegment(ParseTree optionalExpression) {\n // The optional chain's source info should cover the lhs operand also\n SourcePosition start = optionalExpression.location.start;\n while (peekOptionalChainSuffix()) {\n if (peekType() == TokenType.NO_SUBSTITUTION_...
[ "0.5913005", "0.5812996", "0.5263102", "0.5256849", "0.52528155", "0.523279", "0.5177241", "0.5165333", "0.5154813", "0.5119434", "0.511914", "0.51171374", "0.51119715", "0.508078", "0.506841", "0.5061287", "0.5023169", "0.50211346", "0.49971446", "0.4962902", "0.4956537", ...
0.75638485
0
Parses the remaining components of an optional chain till the current chain's end, or a new chain's start. `optionalExpression.identifier`, `optionalExpression[expression]`, `optionalExpression(arg1, arg2)`, or `optionalExpression?.optionalExpression` returns parse tree after trying to parse it as an optional chain
private ParseTree parseRemainingOptionalChainSegment(ParseTree optionalExpression) { // The optional chain's source info should cover the lhs operand also SourcePosition start = optionalExpression.location.start; while (peekOptionalChainSuffix()) { if (peekType() == TokenType.NO_SUBSTITUTION_TEMPLATE ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ParseTree maybeParseOptionalExpression(ParseTree operand) {\n // The optional chain's source info should cover the lhs operand also\n SourcePosition start = operand.location.start;\n\n while (peek(TokenType.QUESTION_DOT)) {\n eat(TokenType.QUESTION_DOT);\n switch (peekType()) {\n ...
[ "0.6861612", "0.5719717", "0.52827114", "0.49957934", "0.49700058", "0.49675506", "0.49488565", "0.4851228", "0.48074156", "0.4769782", "0.4671792", "0.45300493", "0.44814488", "0.4471237", "0.44313642", "0.44204372", "0.4386639", "0.43824986", "0.4372213", "0.43694592", "0.4...
0.74524426
0
Tokens that indicate continuation of an optional chain.
private boolean peekOptionalChainSuffix() { return peek(TokenType.OPEN_PAREN) // a?.b( ... || peek(TokenType.OPEN_SQUARE) // a?.b[ ... || peek(TokenType.PERIOD) // a?.b. ... // TEMPLATE_HEAD and NO_SUBSTITUTION_TEMPLATE are actually not allowed within optional // chaining and leads t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void continued(Consumer<First> continuationFirst);", "com.google.protobuf.ByteString getContinuationToken();", "private void setContinuationToken(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n continuationToken...
[ "0.60529", "0.599393", "0.5891898", "0.56278735", "0.5513023", "0.5467534", "0.53967893", "0.5281893", "0.5238269", "0.52274626", "0.5120526", "0.50618625", "0.4967225", "0.49604997", "0.49371687", "0.49071312", "0.48981127", "0.48897147", "0.4821266", "0.47852287", "0.467088...
0.51415163
10
11.2 Member Expression without the new production
private ParseTree parseMemberExpressionNoNew() { SourcePosition start = getTreeStartLocation(); ParseTree operand; if (peekImportDot()) { operand = parseImportDotMeta(); } else if (peekAsyncFunctionStart()) { operand = parseAsyncFunctionExpression(); } else if (peekFunction()) { op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MemberExpression makeMemberAccess(Expression expression, Member member) { throw Extensions.todo(); }", "public static MemberExpression property(Expression expression, String name) { throw Extensions.todo(); }", "public static MemberExpression property(Expression expression, PropertyInfo property)...
[ "0.72539383", "0.7201301", "0.7109717", "0.70205486", "0.6945057", "0.659154", "0.6536416", "0.6471087", "0.644707", "0.64304954", "0.63894093", "0.6372972", "0.62882614", "0.6246377", "0.6229172", "0.60517746", "0.59266275", "0.58831155", "0.58200186", "0.5813342", "0.576939...
0.7001559
4
currently only "target" is valid after "new."
private ParseTree parseNewDotSomething() { SourcePosition start = getTreeStartLocation(); eat(TokenType.NEW); eat(TokenType.PERIOD); eatPredefinedString("target"); return new NewTargetExpressionTree(getTreeLocation(start)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ForContainerCreation(Class<?> target) {\n this.target = target;\n }", "protected ForInstanceCheck(Class<?> target) {\n this.target = target;\n }", "Target target();", "@Override\n\tprotected Transaction createTarget() {\n\t\treturn null;\n\t}", ...
[ "0.6676424", "0.6512765", "0.6488116", "0.64332074", "0.6403127", "0.6323519", "0.62687945", "0.62508005", "0.62508005", "0.62271893", "0.6226552", "0.6226552", "0.61703336", "0.61134654", "0.6095512", "0.60901916", "0.6041395", "0.6029432", "0.6013055", "0.60124356", "0.5961...
0.57577586
34
ArgumentList : AssignmentOrSpreadExpression ArgumentList , AssignmentOrSpreadExpression AssignmentOrSpreadExpression : ... AssignmentExpression AssignmentExpression
private ArgumentListTree parseArguments() { SourcePosition start = getTreeStartLocation(); ImmutableList.Builder<ParseTree> arguments = ImmutableList.builder(); boolean trailingComma = false; ImmutableList.Builder<SourcePosition> commaPositions = ImmutableList.builder(); eat(TokenType.OPEN_PAREN);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visit(ArgumentList n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression...
[ "0.5885321", "0.57194674", "0.55403", "0.5540015", "0.5536543", "0.5509985", "0.5509007", "0.5500232", "0.54781425", "0.54743904", "0.54741216", "0.54731876", "0.54612666", "0.54477096", "0.5407418", "0.5400446", "0.5384516", "0.5382555", "0.537555", "0.5371251", "0.5354475",...
0.521759
35
Pattern ::= ... | "[" Element? ("," Element?) "]"
private ParseTree parseArrayPattern(PatternKind kind) { SourcePosition start = getTreeStartLocation(); ImmutableList.Builder<ParseTree> elements = ImmutableList.builder(); eat(TokenType.OPEN_SQUARE); while (peek(TokenType.COMMA) || peekArrayPatternElement()) { if (peek(TokenType.COMMA)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d...
[ "0.5561234", "0.5397222", "0.53700316", "0.53305334", "0.5204762", "0.5201502", "0.51467633", "0.50925857", "0.5092272", "0.5060407", "0.50123644", "0.5009305", "0.5004543", "0.49984875", "0.49692756", "0.49665132", "0.4962005", "0.4953898", "0.49063447", "0.48902506", "0.488...
0.5694315
0
Consume a (possibly implicit) semicolon. Reports an error if a semicolon is not present.
private void eatPossiblyImplicitSemiColon() { if (peek(TokenType.SEMI_COLON)) { eat(TokenType.SEMI_COLON); return; } if (peekImplicitSemiColon()) { return; } reportError("Semi-colon expected"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token consumeSemi() {\n return consume(SEMICOLON, \"Expect ';' after value.\");\n }", "@Test(expected = ParseException.class)\n public void testNoSemicolon() throws LexerException, ParseException {\n testInput(\"write(x)\");\n }", "@Test\n public final void whenSemicolonDelimi...
[ "0.75013536", "0.6517448", "0.6445243", "0.6413896", "0.62970966", "0.6174053", "0.58537775", "0.5831083", "0.5749441", "0.56911945", "0.5548969", "0.55461895", "0.54407126", "0.5411389", "0.5320542", "0.5242384", "0.51934475", "0.50628316", "0.50480485", "0.4976631", "0.4884...
0.72849673
1
Returns true if an implicit or explicit semi colon is at the current location.
private boolean peekImplicitSemiColon() { return peekImplicitSemiColon(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean statementFollowedBySemiColon(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"statementFollowedBySemiColon\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = statementFollowedBySemiColon_0(b, l + 1);\n p = r; // pin = 1\n r = r && consumeToken(...
[ "0.65662235", "0.62707824", "0.61638975", "0.58064765", "0.57619524", "0.5675533", "0.5639886", "0.56234974", "0.5579513", "0.55697113", "0.5569281", "0.5559985", "0.554953", "0.54991484", "0.54836893", "0.5457619", "0.5452297", "0.5431293", "0.5392711", "0.5382999", "0.53703...
0.7741565
0
Returns the line number of the most recently consumed token.
private int getLastLine() { return lastSourcePosition.line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLineNumber() {\n\t\treturn _tokenizer.getLineNumber();\n\t}", "public int getLineNum() {\n\t\treturn (parser == null) ? 0 : parser.getCurrentLocation().getLineNr();\n\t}", "public int getCurrentLine() {\n return buffer.lineNumber();\n }", "private int getNextLine() {\n return peekT...
[ "0.7616657", "0.7316348", "0.72290975", "0.7170014", "0.7152089", "0.71145535", "0.6972147", "0.6928137", "0.6910474", "0.68965214", "0.6840878", "0.6817962", "0.6715552", "0.6703236", "0.66854495", "0.6604968", "0.6599063", "0.6565753", "0.6565332", "0.65263504", "0.65130675...
0.6775805
12
Returns the line number of the next token.
private int getNextLine() { return peekToken().location.start.line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLineNumber() {\n\t\treturn _tokenizer.getLineNumber();\n\t}", "public int getLineNumber()\n {\n return parser.getLineNumber();\n }", "public final int getLineNumber()\n {\n return _lineNumber + 1;\n }", "public int getLineNumber() {\n\t\treturn _parser.getLineNumber();\n\t}...
[ "0.774139", "0.7345819", "0.7304039", "0.7257388", "0.7250093", "0.71354973", "0.70333123", "0.6954182", "0.69424796", "0.6889246", "0.68339556", "0.6801205", "0.67756075", "0.674078", "0.6724621", "0.6700674", "0.66600704", "0.66471475", "0.6628627", "0.6621163", "0.66019493...
0.7813255
0
Consumes the next token if it is of the expected type. Otherwise returns null. Never reports errors.
private @Nullable Token eatOpt(TokenType expectedTokenType) { if (peek(expectedTokenType)) { return eat(expectedTokenType); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private @Nullable Token eat(TokenType expectedTokenType) {\n Token token = nextToken();\n if (token.type != expectedTokenType) {\n reportExpectedError(token, expectedTokenType);\n return null;\n }\n return token;\n }", "private boolean peek(TokenType expectedType) {\n return peek(0, exp...
[ "0.74811375", "0.6257466", "0.6246217", "0.61899877", "0.618923", "0.61790746", "0.61640096", "0.60856014", "0.5896184", "0.5878094", "0.58558273", "0.58359545", "0.5828223", "0.5726286", "0.5717989", "0.5716577", "0.5698471", "0.56930935", "0.5677136", "0.5667488", "0.563677...
0.623836
3
TODO(johnlenz): track entering strict scripts/modules/functions.
private boolean inStrictContext() { return config.isStrictMode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "@Test\n public void testDistBuiltins()\n {\n String sName = \"dist-builtins\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTAN...
[ "0.611287", "0.59524655", "0.5858408", "0.5840265", "0.58383703", "0.5769237", "0.57526696", "0.5748076", "0.572828", "0.5717544", "0.57013565", "0.5687178", "0.56811845", "0.5680128", "0.5676265", "0.5664878", "0.566419", "0.56623", "0.5657484", "0.5657484", "0.5655849", "...
0.0
-1
Consumes an identifier token that is not a reserved word.
private @Nullable IdentifierToken eatId() { if (peekId()) { return eatIdOrKeywordAsId(); } else { reportExpectedError(peekToken(), TokenType.IDENTIFIER); if (peekIdOrKeyword()) { return eatIdOrKeywordAsId(); } else { return null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleIdentifier() {\n\n while (isAlphaNumeric(peek())) {\n advance();\n }\n\n // Get the lexeme\n String text = source.substring(start, current);\n\n // Find a matching keyword (if any)\n TokenType type = keywords.get(text);\n if (type == nu...
[ "0.7095244", "0.69326204", "0.65946734", "0.62655383", "0.61191154", "0.5974141", "0.5947959", "0.5877453", "0.5872583", "0.58669806", "0.57784355", "0.57643324", "0.57607985", "0.5757133", "0.57550335", "0.56415045", "0.5639476", "0.56068414", "0.56031036", "0.5527423", "0.5...
0.67000425
2
Consumes an identifier token that may be a reserved word, i.e. an IdentifierName, not necessarily an Identifier.
private @Nullable IdentifierToken eatIdOrKeywordAsId() { Token token = nextToken(); if (token.type == TokenType.IDENTIFIER) { return (IdentifierToken) token; } else if (Keywords.isKeyword(token.type)) { return new IdentifierToken(token.location, Keywords.get(token.type).toString()); } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleIdentifier() {\n\n while (isAlphaNumeric(peek())) {\n advance();\n }\n\n // Get the lexeme\n String text = source.substring(start, current);\n\n // Find a matching keyword (if any)\n TokenType type = keywords.get(text);\n if (type == nu...
[ "0.69040066", "0.6514289", "0.64350283", "0.6323854", "0.62525576", "0.6248524", "0.60013056", "0.5970497", "0.59617186", "0.59141713", "0.580777", "0.5796824", "0.5784273", "0.5656323", "0.5650768", "0.55012095", "0.54266554", "0.5408222", "0.54070413", "0.53257287", "0.5310...
0.6737345
1
Consumes the next token. If the consumed token is not of the expected type then report an error and return null. Otherwise return the consumed token.
private @Nullable Token eat(TokenType expectedTokenType) { Token token = nextToken(); if (token.type != expectedTokenType) { reportExpectedError(token, expectedTokenType); return null; } return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void consumeToken() {\n\t\tToken token = lexAnalyser.nextToken();\n\t\tlogMessage(functionStack.peekFirst() + \" consumed \" + token.getType()\n\t\t\t\t+ \": <lexeme>\" + token.getLexeme() + \"</lexeme>\");\n\t\tpeekToken = lexAnalyser.peekToken();\n\t}", "@Override\n\tprotected Token findNextToken() {\n...
[ "0.64304066", "0.64191544", "0.63908136", "0.63589907", "0.62844896", "0.62377", "0.6228439", "0.6168317", "0.6037006", "0.5975162", "0.59643024", "0.5960233", "0.5898545", "0.5893339", "0.5852911", "0.5839606", "0.5828911", "0.5803296", "0.57667166", "0.5766354", "0.5751036"...
0.7621617
0
Report a 'X' expected error message.
private void reportExpectedError(@Nullable Token token, Object expected) { reportError(token, "'%s' expected", expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reportError(Exception x)\n {\n ErrorDialog.openError(getShell(),\n \"eclipse.dialogtitle\",\n \"eclipse.projecterror\",\n new Status(IStatus.ERROR,\n \t\t\"org.totori\",\n ...
[ "0.64282733", "0.62906957", "0.6272237", "0.6085624", "0.6079745", "0.6040357", "0.601993", "0.60186386", "0.60126317", "0.59887624", "0.5973263", "0.59435934", "0.5932846", "0.5900863", "0.59001863", "0.58959347", "0.58942485", "0.58820254", "0.58791375", "0.58585274", "0.58...
0.6358336
1
Returns a SourcePosition for the start of a parse tree that starts at the current location.
private SourcePosition getTreeStartLocation() { return peekToken().location.start; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location getStartLocation() {\r\n \treturn new Location(0,0);\r\n }", "@Override\r\n \tpublic final int getStartPos() {\r\n \t\treturn sourceStart;\r\n \t}", "public int sourceStart()\n\t{\n\t\treturn sourceStart;\n\t}", "public PixelPoint getStartPoint ()\r\n {\r\n Point start = glyph...
[ "0.65765744", "0.65580726", "0.64941293", "0.62654066", "0.6195225", "0.6181778", "0.6160962", "0.61042964", "0.606031", "0.6035301", "0.60088366", "0.6000333", "0.5985817", "0.59473896", "0.5928722", "0.59271264", "0.5911478", "0.59076214", "0.58736914", "0.5827392", "0.5820...
0.787261
0
Returns a SourcePosition for the end of a parse tree that ends at the current location.
private SourcePosition getTreeEndLocation() { return lastSourcePosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n \tpublic final int getEndPos() {\r\n \t\treturn sourceEnd;\r\n \t}", "org.mojolang.mojo.lang.Position getEndPosition();", "@Override\n\tpublic SourceCodeLocation getScopeEnd() {\n\t\treturn endLocation;\n\t}", "public int sourceEnd()\n\t{\n\t\treturn sourceEnd;\n\t}", "public Location getEndL...
[ "0.6986431", "0.6837557", "0.65429264", "0.6492941", "0.63251114", "0.62747854", "0.6266498", "0.6198655", "0.6187017", "0.6165576", "0.61088777", "0.6094345", "0.6080499", "0.60442656", "0.60275674", "0.59701556", "0.59511054", "0.5929454", "0.5840798", "0.5782701", "0.57473...
0.7873111
0
Consumes the next token and returns it. Will return a never ending stream of TokenType.END_OF_FILE at the end of the file so callers don't have to check for EOF explicitly. Tokenizing is contextual. nextToken() will never return a regular expression literal.
private Token nextToken() { Token token = scanner.nextToken(); lastSourcePosition = token.location.end; return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens...
[ "0.64883924", "0.6357518", "0.6348117", "0.6334327", "0.63241416", "0.6221869", "0.615135", "0.61349165", "0.61169714", "0.608006", "0.604655", "0.59162486", "0.58814067", "0.5843308", "0.5803135", "0.5798218", "0.57907665", "0.5788644", "0.5725326", "0.57230484", "0.56644475...
0.62684447
5
Consumes a regular expression literal token and returns it.
private LiteralToken nextRegularExpressionLiteralToken() { LiteralToken token = scanner.nextRegularExpressionLiteralToken(); lastSourcePosition = token.location.end; return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getRegex();", "java.lang.String getRegex();", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.push...
[ "0.5811591", "0.5811591", "0.57503426", "0.5722757", "0.5666639", "0.5615246", "0.5615246", "0.55988264", "0.55988264", "0.5548553", "0.5546755", "0.5539994", "0.54751545", "0.54687864", "0.5464378", "0.54067975", "0.53468513", "0.53336793", "0.52933764", "0.5291938", "0.5239...
0.7691976
0
Consumes a template literal token and returns it.
private TemplateLiteralToken nextTemplateLiteralToken() { TemplateLiteralToken token = scanner.nextTemplateLiteralToken(); lastSourcePosition = token.location.end; return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TemplateLiteralExpressionTree parseTemplateLiteral(@Nullable ParseTree operand) {\n SourcePosition start = operand == null ? getTreeStartLocation() : operand.location.start;\n Token token = nextToken();\n if (!(token instanceof TemplateLiteralToken)) {\n reportError(token, \"Unexpected templa...
[ "0.6737294", "0.66202664", "0.63066864", "0.63066864", "0.62039906", "0.61829185", "0.61829185", "0.61674714", "0.61674714", "0.61327696", "0.6065197", "0.6007462", "0.599839", "0.5666612", "0.56317806", "0.5546188", "0.5462077", "0.54513574", "0.5417029", "0.5366438", "0.533...
0.7145245
0
Returns true if the next token is of the expected type. Does not consume the token.
private boolean peek(TokenType expectedType) { return peek(0, expectedType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean check(TokenType type) {\n return !isAtEnd() && peek().type == type;\n }", "private boolean check(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isToken(Type...
[ "0.7605438", "0.7339917", "0.7097961", "0.7025468", "0.7001197", "0.6818729", "0.68015987", "0.65813446", "0.6352393", "0.6323611", "0.6322855", "0.6321673", "0.6140284", "0.6134001", "0.6114799", "0.609343", "0.6066401", "0.6066401", "0.6066401", "0.6066401", "0.6066401", ...
0.72464603
2
Returns true if the indexth next token is of the expected type. Does not consume any tokens.
private boolean peek(int index, TokenType expectedType) { return peekType(index) == expectedType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean check(TokenType type) {\n return !isAtEnd() && peek().type == type;\n }", "private boolean peek(TokenType expectedType) {\n return peek(0, expectedType);\n }", "private boolean check(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n ...
[ "0.7193699", "0.718764", "0.7137965", "0.6916045", "0.6797036", "0.6639164", "0.65602905", "0.64378864", "0.6363901", "0.6350033", "0.63375276", "0.63325995", "0.62689555", "0.6159566", "0.60722184", "0.60689473", "0.601129", "0.6010632", "0.5896323", "0.5808247", "0.5780005"...
0.781904
0
Returns the TokenType of the next token. Does not consume any tokens.
private TokenType peekType() { return peekType(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTokenType() {\n return type_;\n }", "public TYPE tokenType(){\n\n return currentTokenType;\n }", "public String getTokenType() {\n return tokenType;\n }", "public TokenType getType() {\n\t\treturn this.type;\n\t}", "public TokenType getType() {\n return type;...
[ "0.76768756", "0.7670565", "0.76517814", "0.7642011", "0.7603365", "0.75431204", "0.7319513", "0.68518096", "0.66938007", "0.6538653", "0.6469968", "0.64618933", "0.62292737", "0.62264836", "0.62220967", "0.6214083", "0.61980766", "0.6194811", "0.61691916", "0.61691916", "0.6...
0.6686956
9
Returns the TokenType of the indexth next token. Does not consume any tokens.
private TokenType peekType(int index) { return peekToken(index).type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTokenType() {\n return type_;\n }", "public TYPE tokenType(){\n\n return currentTokenType;\n }", "public String getTokenType() {\n return tokenType;\n }", "public int nextIndexOf(Type type){\n Token token;\n int tempCurrentToken = currentToken, result;\n...
[ "0.7242169", "0.6932009", "0.6786118", "0.676438", "0.6719053", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6647304", "0.6634599", "0.6634599", "0.6634599", "0.6623213", "0...
0.74388
0
Returns the next token. Does not consume any tokens.
private Token peekToken() { return peekToken(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Token nextToken(){\n if(currentToken+1 >= tokens.size())\n return null; \n return tokens.get(++currentToken);\n }", "public Token nextToken() {\r\n\t\treturn tokens.get(nextTokenPos++);\r\n\t}", "public Token nextToken ()\n throws ParseException\n {\n return ge...
[ "0.81742364", "0.81433356", "0.81402814", "0.8071847", "0.8042517", "0.8036514", "0.8018324", "0.8015852", "0.8015852", "0.8015852", "0.80014426", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0.79841465", "0....
0.71612966
62
Returns the indexth next token. Does not consume any tokens.
private Token peekToken(int index) { return scanner.peekToken(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public Token getToken(int index) {\n Token t = jj_lookingAhead ? jj_scanpos : token;\n for (int i = 0; i < index; i++) {\n if (t.next != null) t = t.next;\n else t = t.next = token_source.getNextToken();\n }\n return t;\n }", "public Token nextToken(){\n if(currentToken+1 >= t...
[ "0.7532914", "0.7489404", "0.7486865", "0.74556714", "0.7310843", "0.73003906", "0.72988456", "0.72794205", "0.72794205", "0.72794205", "0.7274872", "0.7263769", "0.726375", "0.726375", "0.726375", "0.726375", "0.726375", "0.726375", "0.726375", "0.726375", "0.726375", "0.7...
0.7316286
4
Reports an error message at a given token.
@FormatMethod private void reportError(Token token, @FormatString String message, Object... arguments) { if (token == null) { reportError(message, arguments); } else { errorReporter.reportError(token.getStart(), message, arguments); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void tokenError(Token token, String message) {\r\n\t\tSystem.out.println(\"TOKEN ERROR at line \" + token.lineNumber + \": \" + message + \" at '\" + token.text + \"'\");\r\n\t}", "@Override\n public String getMessage() {\n return \"Invalid token of \" + token + \" entered\";\n }", ...
[ "0.7875219", "0.67624664", "0.6655951", "0.6560503", "0.6327742", "0.6325068", "0.6323967", "0.63209975", "0.62116736", "0.6210872", "0.61608374", "0.61521894", "0.6037609", "0.59895796", "0.5959049", "0.5897238", "0.5869169", "0.582879", "0.582567", "0.5790707", "0.57657325"...
0.7202438
1
Reports an error message at a given parse tree's location.
@FormatMethod private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) { if (parseTree == null) { reportError(message, arguments); } else { errorReporter.reportError(parseTree.location.start, message, arguments); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reportError(final String message) throws ParseException {\n throw new ParseException(_tokenizer.getLine(), _tokenizer.getColumn(), message);\n }", "@FormatMethod\n private void reportError(\n SourcePosition position, @FormatString String message, Object... arguments) {\n errorRe...
[ "0.6513877", "0.6263434", "0.6261198", "0.6145676", "0.6131587", "0.61249727", "0.60990024", "0.5937862", "0.5926013", "0.5878261", "0.5819257", "0.5816802", "0.58100766", "0.57895577", "0.5782152", "0.5778556", "0.5754642", "0.56958413", "0.5681821", "0.5659772", "0.56426156...
0.7228429
0
Reports an error at the current location.
@FormatMethod private void reportError(@FormatString String message, Object... arguments) { errorReporter.reportError(scanner.getPosition(), message, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reportError (String id) throws IOException;", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "public void error(Exception e);", "public void error();", "@FormatMethod\n private void reportError(\n SourcePosition position, @FormatString String message, Object... ...
[ "0.6374873", "0.6325414", "0.627233", "0.62712157", "0.6243663", "0.6230425", "0.6225471", "0.62120026", "0.6186861", "0.61691284", "0.6162942", "0.61385393", "0.6135504", "0.6084822", "0.6078966", "0.6064403", "0.60633624", "0.60611606", "0.6032327", "0.6022506", "0.60211897...
0.58075166
41
Reports an error at the specified location.
@FormatMethod private void reportError( SourcePosition position, @FormatString String message, Object... arguments) { errorReporter.reportError(position, message, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reportError (String id) throws IOException;", "public void reportLocation(Location location) {\n ILocationProviderManager manager = mManager;\n if (manager != null) {\n try {\n manager.onReportLocation(location);\n } catch (RemoteException | RuntimeE...
[ "0.63791895", "0.63127524", "0.6122354", "0.6119174", "0.60616845", "0.602308", "0.6015322", "0.5990356", "0.5987832", "0.59861016", "0.59589225", "0.5955311", "0.5954385", "0.5884972", "0.5883996", "0.5862445", "0.5846612", "0.5838247", "0.5825721", "0.5806126", "0.5790663",...
0.65471905
0
Description : Override insertString method of DocumentFilter to make the text format to uppercase.
public void insertString(final DocumentFilter.FilterBypass fb, final int offset, final String text, final AttributeSet attr) throws BadLocationException { // fb.insertString(offset, text.toUpperCase(), attr); fb.insertString(offset, text, attr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String textFormat(String s){\r\n s =s.toLowerCase();\r\n s = s.substring(0, 1).toUpperCase() + s.substring(1);\r\n return(s);\r\n }", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n for (int i = 0; i < cbuf.length; ++i)\n cbuf...
[ "0.6597023", "0.6285712", "0.6137285", "0.6005392", "0.5995827", "0.5855366", "0.58497506", "0.5807659", "0.5807659", "0.5753966", "0.57068676", "0.5693774", "0.5657328", "0.5568931", "0.5562554", "0.5560064", "0.555125", "0.5532756", "0.55201554", "0.55181396", "0.5420439", ...
0.6261956
2
Description : Override replace method of DocumentFilter to make the text format to uppercase.
public void replace(final DocumentFilter.FilterBypass fb, final int offset, final int length, final String text, final AttributeSet attr) throws BadLocationException { fb.replace(offset, length, text.toUpperCase(), attr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n for (int i = 0; i < cbuf.length; ++i)\n cbuf[i] = Character.toUpperCase(cbuf[i]);\n \n super.write(cbuf, off, len);\n \n }", "public void setUpperCase() {\r\n\t\tCollection<Component> collection = groupboxEdi...
[ "0.6203845", "0.6177453", "0.6177453", "0.6158833", "0.6091894", "0.6084186", "0.6041633", "0.6020253", "0.58964324", "0.5845068", "0.57497597", "0.5667774", "0.56169945", "0.56137496", "0.5594285", "0.5560948", "0.55461305", "0.5530808", "0.5519271", "0.5513711", "0.55070317...
0.58115333
10
TODO Autogenerated method stub
public void createInitialLayout(IPageLayout layout) { }
{ "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
Finds minimum number of points needed to achieve a given grade.
public static int findMinimumPointsForGrade(int grade, int maxPoints) { for (int points = 0; points <= maxPoints; points++) { if (getGrade(points, maxPoints) >= grade) return points; } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n ...
[ "0.6763083", "0.67529273", "0.66763765", "0.63891304", "0.63340986", "0.6045786", "0.6045366", "0.6006227", "0.5835849", "0.58147365", "0.58106965", "0.5801051", "0.5726674", "0.5726674", "0.5726674", "0.5718835", "0.57090753", "0.56926465", "0.5688084", "0.5676277", "0.56621...
0.7738612
0
Returns grade (0 for failed, 1 5 for passed) for given points < maxPoints. 50% of the points are needed for grade 1, 90+% for grade 5.
public static int getGrade(int points, int maxPoints) { double gradePerPoint = 10d / maxPoints; double grade = gradePerPoint * points - 4; return Math.min(5, Math.max(0, (int) Math.floor(grade))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int findMinimumPointsForGrade(int grade, int maxPoints) {\r\n for (int points = 0; points <= maxPoints; points++) {\r\n if (getGrade(points, maxPoints) >= grade)\r\n return points;\r\n }\r\n \r\n return -1;\r\n }", "String grade(int marks);", "public static double totalGr...
[ "0.68508315", "0.6065848", "0.5962024", "0.58949697", "0.5865423", "0.58553743", "0.57394046", "0.57140195", "0.56911075", "0.5690655", "0.568181", "0.56731206", "0.56495863", "0.5632649", "0.56136066", "0.5607116", "0.56056905", "0.55840087", "0.55282265", "0.5493391", "0.54...
0.84427667
0
Get a user message about the statistics for the whole site.
public synchronized String getGameStatsMessage() { if (GameStatistics.getTotalPlays() /*totalGames*/ > 1) return String.format(GAMES_PLAYED_FORMAT, GameStatistics.getTotalPlays() /* totalGames*/); else if (GameStatistics.getTotalPlays() /*totalGames*/ == 1) return ONE_GAME_MESSAGE; else return NO_GAME...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStatistics() {\r\n \tString statistics;\r\n \tstatistics=\"Anzahl aller User: \"+ numberOfUsers() + \"\\n\"\r\n \t\t\t+ \"Anzahl aller Hotels: \" + numberOfHotels() + \"\\n\"\r\n \t\t\t+ \"Hotel mit der besten durchschnittlichen Bewertung: \" + bestHotel().getName() + \"\\n\";\r\n \...
[ "0.6531608", "0.63657534", "0.6213557", "0.60364383", "0.58936036", "0.586746", "0.5700118", "0.56741357", "0.5637738", "0.56293327", "0.5627423", "0.5572053", "0.55614185", "0.5549226", "0.55462533", "0.54659265", "0.5443607", "0.5442499", "0.54210913", "0.5381282", "0.53637...
0.6086375
3