query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gibt die Anzahl der Handkarten des Spielers an
public int getHandKarteCount(){ return getHandKarte().size(); }
[ "public int getArtikelAnzahl ()\n {\n return letzterBesetzterIndex + 1; \n }", "@Override\n public int GetPassagierkapazitaet() {\n return anzahlDerSitze - 1;\n }", "public int getNbShiboleet() {\n\t\treturn nbShiboleet;\n\t}", "public static void ausgabeAnzahlGueltigerUndUnguelti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visits and is accepted only by References.
void visitReference(Reference r);
[ "void visitReferenceValue(ReferenceValue referenceValue);", "Object visitReference(ReferenceNode node, Object state);", "Object visitArrayOfReferences(ArrayOfReferencesNode node, Object state);", "Result onVisited(Object o);", "public interface TypeReference extends CrossReference<Type> {\n\n @Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Column Var'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseColumnVar(ColumnVar object) { return null; }
[ "public VarType getVarType();", "public T caseColumn(Column object) {\n\t\treturn null;\n\t}", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Local method to be overriden with the particular setPreviewCallback to be used in the implementations.
abstract void setPreviewCallback(android.hardware.Camera.PreviewCallback cb);
[ "void setPreviewCallback(@Nullable PreviewCallback callback);", "protected void previewStarted() {\n\n }", "void setPreviewCallback(PreviewCallback callback1, DeviceCallback callback2);", "public boolean getOverridePreview()\n {\n return _overridePreview;\n }", "@Override\n public void on...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of this matrix equal to the negation of of the Matrix3f parameter.
public final void negate(Matrix3f m1) { this.set(m1); this.negate(); }
[ "public final void negate(CyMatrix3d m1)\r\n {\r\n this.m00 = -m1.m00;\r\n this.m01 = -m1.m01;\r\n this.m02 = -m1.m02;\r\n\r\n this.m10 = -m1.m10;\r\n this.m11 = -m1.m11;\r\n this.m12 = -m1.m12;\r\n\r\n this.m20 = -m1.m20;\r\n this.m21 = -m1.m21;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge nested patterns with same starting position into a larger one. For example, Pos 66 MSSR at [66, 70, 74, 76] freq: 7 score: 2650 MSLY at [66, 70, 74, 76] freq: 1 score: 400 MSR at [66, 70, 76] freq: 7 score: 1950 M at [66] freq: 15 score: 1400 MSR is a nested pattern of MSSR, because all the reads of SR already ch...
private TreeMap<Integer, List<MutationsPattern>> mergeNestedPatterns(TreeMap<Integer, List<MutationsPattern>> mutationSorted, List<Integer> posArray) { TreeMap<Integer, List<MutationsPattern>> mergedMutationPatterns = new TreeMap<>(); for (Integer pos : posArray) { List<MutationsPattern> ...
[ "private List<OptimalDSetCandidateDimensionPattern> restructureForSmallerCubesBasedOnSubSetsAnswered (\n List<OptimalDSetCandidateDimensionPattern> restructuredPatterns) {\n List<OptimalDSetCandidateDimensionPattern> deDupedCandidatePatterns = new ArrayList<OptimalDSetCandidateDimensionPattern>(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the right player's y position. Note that the position may be adjusted, so that the player's stroke isn't out of the game field.
public void setPlayerRightPos(float y) { y = y / mScaleY; if (y - GameBall.WIDTH * 2 < 0) { mPlayerRight = GameBall.WIDTH * 2; } else if (y + GameBall.WIDTH * 2 >= HEIGHT) { mPlayerRight = HEIGHT - 1 - GameBall.WIDTH * 2; } else { mPlayerRight = y; ...
[ "public void moveRightPlayer() {\n\t\t// Constrain the mouse's y-coordinate to the screen size\n//\t\tint y_val = constrain(parent.mouseY, 0, MAP_HEIGHT - HEIGHT);\n\t\tint y_val = parent.mouseY;\n\t\t\n\t\tif(y_val < 0) {\n\t\t\ty_val = 0;\n\t\t} else if(y_val > MAP_HEIGHT - HEIGHT) {\n\t\t\ty_val = MAP_HEIGHT - H...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables the buttons in this Fragment
public void disableButtons() { if (this.mRatingControl != null) { this.mRatingControl.setButtonsEnabled(false); } if (this.mFavoriteToggle != null) { this.mFavoriteToggle.setEnabled(false); } }
[ "private void disableButtons()\r\n {\r\n }", "private void disableButton() {\r\n button.setEnabled(false);\r\n }", "private void disableButtons() {\n for (int i = 0; i < itemButtons.size(); i++) {\n if (!storeViewModel.isItemBuyable(i)) {\n itemButtons.get(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensures that the checkNotNonPositive method throws an IllegalArgumentException when given a zero value.
public void testCheckNotNonPositiveThrowsOnZero() { try { Util.checkNotNonPositive(0, "argument"); fail("An IllegalArgumentException is expected when given a zero value."); } catch (IllegalArgumentException ex) { // Good! } }
[ "public void testCheckNotNonPositiveThrowsOnNegative() {\n try {\n Util.checkNotNonPositive(-1, \"argument\");\n fail(\"An IllegalArgumentException is expected when given a negative value.\");\n } catch (IllegalArgumentException ex) {\n // Good!\n }\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the totalNumCitAutor property.
public int getTotalNumCitAutor() { return totalNumCitAutor; }
[ "public void setTotalNumCitAutor(int value) {\n this.totalNumCitAutor = value;\n }", "public int totalDinheiroTutor(String emailTutor) {\r\n\t\treturn tc.totalDinheiroTutor(emailTutor);\r\n\t}", "public int getTutorID() {\n return tutorID;\n }", "public int getTotalNum() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "GeoLocationAbstract" element
public void setGeoLocationAbstract(org.apache.xmlbeans.XmlObject geoLocationAbstract) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlObject target = null; target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(GEOLOCATIONABSTR...
[ "public org.apache.xmlbeans.XmlObject addNewGeoLocationAbstract()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(GEOLOCATIONABSTRACT$0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current text token's length. Actions specified in the CookCC file can directly access the variable _yyLength.
public int yyLength () { return _yyLength; }
[ "public int length()\n\t{\n\t\treturn tokens.size();\n\t}", "public int getLength() {\n\t\treturn text.length();\n\t}", "public int getWidth() {\n // Handle a few common token types\n switch (type) {\n case END:\n return 3;\n case TRUE:\n return 4;\n case FALSE:\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of `object'. If the type of `object' is equal to `type', then copy the value of `object' to `value' (if it's nonNULL) and return true. Otherwise, if the type of `object' is `kCGPDFObjectTypeInteger' and `type' is equal to `kCGPDFObjectTypeReal', then convert the value of `object' to floating point and cop...
@Generated @CFunction public static native boolean CGPDFObjectGetValue(@Nullable CGPDFObjectRef object, int type, @Nullable VoidPtr value);
[ "private static Object getBoxedPrimitiveValue(Object o, ValueType type) {\n if ((o == null) || (type == null)) {\n return o;\n }\n\n switch (type) {\n case eBoolean:\n return (Boolean)o;\n case eByte:\n return (Byte)o;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Randomly generates and returns a list of mutual exclusion constraints, of size numMex.
private List<Pair<MyNode, MyNode>> generateMex(List<MyNode> nodes){ //Sanity check if (numMex <= 0){ return new ArrayList<Pair<MyNode, MyNode>>(); } //Generate all possible mutual exclusion constraints. List<Pair<MyNode, MyNode>> result = new ArrayList<Pair<MyNode, MyNode>>(); for (int idxA =...
[ "public List<Constraint> createRandomInputs() {\r\n\t\t\tList<Constraint> inputConstraints = new ArrayList<Constraint>();\r\n\t\t\t\r\n\t\t\tRandom random = new Random();\r\n\t\t\tint MAX_VALUE = 10;\r\n\t\t\t\r\n\t\t\tfor (int i=0;i<this.nbRows;i++) {\r\n\t\t\t\t// production costs\r\n\t\t\t\tint prodCost = random...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
standaard functie die wordt aangeroepen als het scherm moet worden getoond roept de startprocedure aan en laat de mainStage zien
@Override public void start(Stage mainStage){ this.startProcedure(); mainStage.setScene(this.scene); mainStage.show(); }
[ "@Override\n public void start(Stage PrimaryStage){\n this.PrimaryStage = PrimaryStage;\n PrimaryStage.resizableProperty().setValue(false);\n PrimaryStage.setOnCloseRequest(evt -> {evt.consume();});\n beginScherm.start(this.PrimaryStage);\n this.bindBeginScherm();\n this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns the filter arguments used to authorize users.
public Object[] getAuthorizationFilterArgs() { return this.authorizationFilterArgs; }
[ "public Object[] getUserFilterArgs()\n {\n return this.userFilterArgs;\n }", "public String getAuthorizationFilter()\n {\n return this.authorizationFilter;\n }", "public List getDatabaseFilterParams() {\n\t\tSqlExpression expr = this.getFilterSqlExpression();\n\t\treturn expr != null ? Arrays.asList(e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether path loss estimation is enabled or not.
public boolean isPathLossEstimationEnabled() { return mPathLossEstimationEnabled; }
[ "public void setPathLossEstimationEnabled(final boolean pathLossEstimationEnabled)\n throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n mPathLossEstimationEnabled = pathLossEstimationEnabled;\n }", "public boolean hasEnabledPath() {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column COST_PLAN.DELIVERY_PLAN_10
public Double getDeliveryPlan10() { return deliveryPlan10; }
[ "public Double getDeliveryPlan11() {\r\n return deliveryPlan11;\r\n }", "public BigDecimal getPAYMENT_PLAN_NBR()\r\n {\r\n\treturn PAYMENT_PLAN_NBR;\r\n }", "public Double getDeliveryPlan9() {\r\n return deliveryPlan9;\r\n }", "public Double getDeliveryPlan12() {\r\n return de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the clusterGroup value for this WUFileOption.
public void setClusterGroup(java.lang.String clusterGroup) { this.clusterGroup = clusterGroup; }
[ "public void setConfigGroup(String configGroup) {\n this.configGroup = configGroup;\n }", "public VertxOptions setHAGroup(String haGroup) {\n Objects.requireNonNull(haGroup, \"ha group cannot be null\");\n this.haGroup = haGroup;\n return this;\n }", "boolean setChannelGroup(String newGroup)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get every revision's DTO ID so we can easily look it up later This must to be done while the bundles are installed
private Map<BundleRevision,Integer> getRevisionIDs( Map<BundleRevision,Integer> revisionIDs) { for (Bundle bundle : getContext().getBundles()) { BundleRevisions revisions = bundle.adapt(BundleRevisions.class); List<BundleRevision> revisionList = revisions.getRevisions(); BundleRevisionDTO[] revisionDTOs =...
[ "private Map<String,SvnInfo> buildRevisionMap(FilePath workspace, TaskListener listener) throws IOException {\n PrintStream logger = listener.getLogger();\n \n Map<String/*module name*/,SvnInfo> revisions = new HashMap<String,SvnInfo>();\n \n Map env = createEnvVarMap(false);\n \n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks to see if the bottom level should be raised, happens based on some function of the number of tall, marked deleted nodes and the total number of nodes, this is called by the maintenance thread
private final boolean checkShouldRaiseBottomLevelMaint(MaintVars vars) { if (vars.tallDeletedCount > vars.nonDeleted * 10) return true; return false; }
[ "private static final boolean checkShouldRaiseNode(Node node, int bottomLevel) {\n\t\tNode prev = node.prev, next = node.next;\n\t\tif (prev == null || next == null)\n\t\t\treturn false;\n\t\t// Check the heights of the neighboring nodes, only raise the height if\n\t\t// both its neighbors have height of 1\n\t\tif ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if agent already exist
public Boolean isAgentExist(String agentId){ return agentDao.isAgentExist(agentId); }
[ "public abstract boolean knowsAgentLocally ( long agentId );", "public boolean inSystem(Agent agent){\t\r\n\t \t\t\r\n\t \t\tif(agent == null)\treturn false;\r\n\t \t\treturn agent_list.contains(agent);\r\n\t \t}", "public boolean isSetAgentId()\n {\n synchronized (monitor())\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 18 / 1 covered goal: Goal 1. weka.classifiers.Evaluation.handleCostOption(Ljava/lang/String;I)Lweka/classifiers/CostMatrix;: I12 Branch 166 IFEQ L1574 true
@Test public void test18() throws Throwable { CostMatrix costMatrix0 = Evaluation.handleCostOption("", 4757); assertNull(costMatrix0); }
[ "@Test\n public void test24() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 10797);\n assertNull(costMatrix0);\n }", "@Test\n public void test26() throws Throwable {\n String[] stringArray0 = new String[5];\n CostMatrix costMatrix0 = Evaluation.handleCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body.
public Event createSubscribe(Address resource, String event, int expires);
[ "public Event subscribe(Address resource, String event, int expires, Content body);", "public LinphoneEvent createSubscribe(LinphoneAddress resource, String event, int expires);", "public void createSubscription(Subscription sub);", "public Event createPublish(Address resource, String event, int expires);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refreshes the derivatives if they have not been refreshed in the refreshSteps() method (ie if the variable "refreshDerivsLater" is false).
public void refreshDerivsIfNeeded() { if (!refreshDerivsLater) return; refreshDerivsLater = false; for (ParticleModel part : getModels()) { part.updateDerivatives(); part.firePropertyChange("steps", null, null); //$NON-NLS-1$ } }
[ "public void setDerivatives();", "public void refresh() {\n try {\n getEditingDomain().runExclusive(new Runnable() {\n \n public void run() {\n EditPolicyIterator i = getEditPolicyIterator();\n while (i.hasNext()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads in a scenario file.
public native void loadScenario(string filename);
[ "@FXML protected void LoadScenario(ActionEvent event) {\r\n //TODO change GUI to show possible scenario files and pass\r\n //selected file to initScenario() below.\r\n String currentDir = System.getProperty(\"user.dir\") + File.separator;\r\n FileChooser fileChooser = new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display each vertex's neighbors
public void neighhbors(Village vertex) { Iterable<Edge> neighbors = g.getNeighbors(vertex); System.out.println("------------"); System.out.println("vertex: " + vertex.getName()); for(Edge e : neighbors) { System.out.println("edge: " + e.getName()); System.out.println("transit: " + e.getTransit() + " color...
[ "void printNeighbors(){\r\n System.out.print(\"Node \"+this.nodename+\" has neighbors: \");\r\n for (int i=0; i < neighbors.length; i++ ) {\r\n if(this.neighbors[i]) {\r\n System.out.print(\" \"+i);\r\n }\r\n\r\n }\r\n System.out.print...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method sets specified status (0 blocked, 1 active) to certain client
void changeStatusById(long clientId, byte status) throws DAOException;
[ "public void setClientStatus(int clientNumber, int newStatus) {\n clientStatus[clientNumber] = newStatus;\n }", "public synchronized void setStatus(JPPFClientConnectionStatus status)\n\t{\n\t\tJPPFClientConnectionStatus oldStatus = getStatus();\n\t\tthis.status = status;\n\t\tif (!status.equals(oldStatus)) fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Consume incoming acknowledgements and stash them into a per channel queue so that we can bunch together acknowledgements into fewer packets. TODO(borud): the timing of processQueues() needs to be tightened up.
private void consumerLoop() { long lastPeriodicProcess = System.currentTimeMillis(); // List to hold extra entries to speed up reading from the // incoming queue. List<AckEntry> rest = new ArrayList<AckEntry>(INCOMING_QUEUE_LENGTH); while (true) { // We want the per...
[ "private void processQueues() {\n List<Channel> disposableChannels = new LinkedList<Channel>();\n\n for (Map.Entry<Channel, AckQueue> ent : channelQueueMap.entrySet()) {\n Channel channel = ent.getKey();\n AckQueue queue = ent.getValue();\n\n // Check for channels that...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks the size of a BufferedImage.
public static void checkImageSize(BufferedImage image, long maxSize) { ByteArrayOutputStream tmp = new ByteArrayOutputStream(); try { ImageIO.write(image, "png", tmp); if (tmp.size() > maxSize) { throw new IllegalStateException("Image size may not be larger than " + maxSize + "!"); } } catch (IOExcep...
[ "private void checkImageFileSize(String filename, BufferedImage image)\n throws IOException\n {\n BufferedImage newImage = ImageIO.read(new File(filename));\n assertNotNull(newImage, \"File '\" + filename + \"' could not be read\");\n checkNotBlank(filename, newImage);\n ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the total price of the item sum of the original price and the sales tax assessed. This will never be lower than the item price
public double getTotalPrice() { return (new BigDecimal(price).add(new BigDecimal(getSalesTax()))) .setScale(2, RoundingMode.HALF_EVEN) .doubleValue(); }
[ "public double computeTotal()\n {\n return (price * quant) + ((taxRate/100)*(price * quant));\n }", "public double getTotalPrice() {\n\t\tdouble sum = 0.0;\n\t\tfor (int i = 0; i < count; ++i) {\n\t\t\tsum += items[i].getPrice();\n\t\t}\n\t\treturn sum;\n\t}", "public float GetTotalPrice() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge an array of summit records.
SummitRecord mergeRecords(SummitRecord[] recs) { // Create merged record placeholder SummitRecord mrgRec = new ConcreteSummitRecord(); float mrgTrips = 0; float mrgMTrips = 0; float mrgUtil = 0; float mrgTrnWlk = 0; float mrgTrnDrv = 0; float mrgCanWalk = 0; float mrgMustDrive = 0; int testTrnTrip...
[ "private void mergeArray(){\n\n for (int i=0; i<BUFFER_SIZE;i++){\n mergedArray[i] = arrayOld[i];\n mergedArray[BUFFER_SIZE+i] = arrayNew[i];\n mergedTimeArray[i] = timeArrayOld[i];\n mergedTimeArray[BUFFER_SIZE+i] = timeArraynew[i];\n }\n smoothArray...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get an identifier for registers of this Dynamixel type
protected abstract String getDynamixelType();
[ "public long getRegisterId();", "int getBaseRegister();", "public Integer getRegisterId() {\n return registerId;\n }", "java.lang.String getRegistryId();", "public String getRegisterId() {\r\n return registerId;\r\n }", "public int getRegister() {\n return register;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a parameters collection to the parameters list.
public void addAllParameters(Collection coll) { parameters.addAll(coll); }
[ "public void addParameters(List<Parameter> params) {\n for (Parameter p : params) {\n this.addParameter(p);\n }\n }", "CollectionParameter createCollectionParameter();", "public void addParameter(String param, Collection value) {\n beginParameter(param);\n JSONLiteralAr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function prints union of arr1[] and arr2[] m is the number of elements in arr1[] n is the number of elements in arr2[]
static int printUnion( int arr1[], int arr2[], int m, int n) { int i = 0 , j = 0 ; while (i < m && j < n) { if (arr1[i] < arr2[j]) System.out.print(arr1[i++]+ " " ); else if (arr2[j] < arr1[i]) System.out.print(arr2[j++]+ " " ); else { System.out.print(arr2[j++]+ " " ); i++; } } /* Pr...
[ "public static void main(String[] args) {\r\n int[] firstArr = {1, 2, 3, 4, 5, 6};\r\n int[] secondArr = {4, 9, 13, 15, 16, 17};\r\n\r\n System.out.println(\"union is\");\r\n findUnion(firstArr, secondArr);\r\n System.out.println();\r\n System.out.println(\"Intersection is ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts a new Activity for viewing a route. Route viewed will be the route that has the Id of the int passed into this method
public void viewRoute(int routeId){ Intent viewRoute = new Intent(this, ViewRouteActivity.class); //pass route Id here viewRoute.putExtra("RouteId", routeId); startActivity(viewRoute); }
[ "public void startRoute(View view) {\n ApiHandler.INSTANCE.getDirections(route);\n RouteHandler.INSTANCE.followRoute(route);\n Toast.makeText(requireContext(), R.string.route_started_toast, Toast.LENGTH_SHORT).show();\n // navigates to the HomeFragment and refreshes the BottomNavigation\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a Shape representing the left border of this Lane.
Shape leftBorder();
[ "public Line getLeftBorder() {\n return this.leftBorder;\n }", "public int getLeftBorder() {\n\t\treturn leftBorder;\n\t}", "public Line getLeftLine() {\n\n return new Line(this.getUpperLeft(), this.getdownLeft());\n }", "public Lane getLeft() {\r\n\t\treturn left;\r\n\t}", "public XSSFC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Establece el tipo de pago de la propuesta
public void setTipoPago(int tipoPago) { this.tipoPago = tipoPago; }
[ "public String getTipo_pago() {\n\t\treturn tipo_pago;\n\t}", "public void setTipoPagamento(java.lang.String tipoPagamento) {\r\n this.tipoPagamento = tipoPagamento;\r\n }", "public java.lang.String getTipoPagamento() {\r\n return tipoPagamento;\r\n }", "public br.com.lemontech.selfbooking...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the datePurchased value for this ContractTicketPurchase.
public java.lang.Object getDatePurchased() { return datePurchased; }
[ "public Date getDateOfPurchase() {\n return dateOfPurchase;\n }", "public Calendar getDateOfPurchase() {\n\t\treturn dateOfPurchase;\n\t}", "public Date getPurchasedate() {\n return purchasedate;\n }", "public void setDatePurchased(java.lang.Object datePurchased) {\n this.datePurcha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reading from a file, testing the bomb positions and doing a few digs to test. A dig in a non bomb and bomb location was done Also a dig on a square previously dug was done. A look is performed after digging a bomb to make sure necessary changes have happened The file was the autograder file, which is shown below / 0 0 ...
@Test public void seeBombPatternFromFile()throws IOException { Board b = new Board(new File("src\\autograder\\resources\\board_file_5")); String test = ""; for(int i = 0; i < b.size; i++) { for(int j = 0; j < b.size; j++) { if(b.squares[i][j].isBomb()) test += "1 "; else test += "0 "; ...
[ "@Test \n public void digBombNextToFlag() {\n try{\n File file = new File(TestUtil.getResourcePathName(\"autograder/resources/test2.txt\"));\n Board b = new Board(file);\n b.flag(1, 2);\n b.dig(2, 2);\n String out = b.look();\n String expec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if a PersistenceServiceException is thrown when creating a user
@Test public void testCreateUserThrowsPersistenceServiceException() throws PersistenceServiceException { exception.expect(PersistenceServiceException.class); exception.expectMessage("An SQL Exception occurred in the Persistence Service"); PersistenceConnection persistenceConnection = Persi...
[ "@Test\n public void testExistsThrowsPersistenceServiceException() throws PersistenceServiceException {\n\n exception.expect(PersistenceServiceException.class);\n exception.expectMessage(\"An SQL Exception occurred in the Persistence Service\");\n userDAO.exists(\"'\");\n }", "@Test\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the fill opacity of the polygon.
public void setFillOpacity(double fillOpacity) { this.fillOpacity = fillOpacity; }
[ "public void setFillAlpha(Double fillAlpha) {\r\n\t\tthis.fillAlpha = fillAlpha;\r\n\t}", "public void setFillAlpha(float fillAlpha) {\n this.fillColor = fillColor.setA(fillAlpha);\n }", "public double getFillOpacity() {\r\n return fillOpacity;\r\n }", "public void setFillOpacity(float new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all dependencies matching given regex.
void removeDependenciesMatchingRegex(String... regex);
[ "public void setDecoyRegex(String regex) {\n\t\tthis.decoyRegex = regex;\n\t}", "public final void setThirdPartyPackageRegExp(Pattern regexp) {\n thirdPartyPackageRegExp = regexp;\n }", "boolean hasEffectiveDependencyMatchingRegex(String... dependencyPatterns);", "boolean hasDeclaredDependencyMatchi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field403' field.
public void setField403(java.lang.CharSequence value) { this.field403 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField403(java.lang.CharSequence value) {\n validate(fields()[403], value);\n this.field403 = value;\n fieldSetFlags()[403] = true;\n return this; \n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField403() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stores the contents of the passed byte array, starting at the given index. Will span segments as needed.
public void putBytes(long index, byte[] source) { putBytes(index, source, 0, source.length); }
[ "public final CheckedMemorySegment put(int index, byte[] src, int offset, int length) {\n\t\tif (index >= 0 && index < this.size && index <= this.size - length && offset <= src.length - length) {\n\t\t\tSystem.arraycopy(src, offset, this.memory, this.offset + index, length);\n\t\t\treturn this;\n\t\t} else {\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /produits/:id : delete the "id" produit.
@DeleteMapping("/produits/{id}") @Timed public ResponseEntity<Void> deleteProduit(@PathVariable Long id) { log.debug("REST request to delete Produit : {}", id); produitService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert("produit", id.toString())).b...
[ "@DeleteMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProcesador(@PathVariable Long id) {\n log.debug(\"REST request to delete Procesador : {}\", id);\n procesadorRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the row key for the current row
public Object getRowKey() { if (isRowAvailable()) { Object rowKey = _getRowKey(); return rowKey; } else { return null; } }
[ "private Object _getRowKey()\n {\n Object data = getRowData();\n \n assert (_rowKeyProperty != null);\n return __resolveProperty(data, _rowKeyProperty);\n }", "public String rowKey() {\n return this.rowKey;\n }", "@Override\r\n\tpublic Object getRowKey() {\n\t\treturn rowId;\r\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
addTS(TransitionSystem) Helper method that removes an TransitionSystem with a given String id from the list of open TSs by searching through all the open TSs.
public boolean removeTS(String id) { for(int i = 0; i < openTSs.size(); i++) { TransitionSystem<?> curr = openTSs.get(i); if(curr.getId().equals(id)) { openTSs.remove(i); return true; } // if } // for return false; }
[ "public TransitionSystem<? extends Transition> getTS(String id) {\n\t\tfor(TransitionSystem<? extends Transition> curr : openTSs) {\n\t\t\tif(curr.getId().equals(id)) {\n\t\t\t\treturn curr;\n\t\t\t} // if\n\t\t} // for\n\t\treturn null;\n\t}", "public void makeOpenTSStrings() {\n\t\t// Make the observable list\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes the writable database. This is thread safe
@Override public synchronized void close() { super.close(); if (myWritableDb != null) { myWritableDb.close(); myWritableDb = null; } }
[ "public final void close() {\n\t\ttry {\n\t\t\tcon.commit( ); // Commit any updates\n\t\t\tcon.close ( );\n\t\t}\n\t\tcatch ( Exception e ) {\n\t\t\tnotify( \"Db.close\", e );\n\t\t};\n\t}", "public void DBClose() {\n if (db != null && DBIsOpen()) {\n db.close();\n }\n }", "public st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts the string into this string buffer. The characters of the String argument are inserted, in order, into this string buffer at the indicated offset. The length of this string buffer is increased by the length of the argument. The offset argument must be greater than or equal to 0, and less than or equal to the le...
public StringBufferFast insert(int offset, String str) { if ((offset < 0) || (offset > count)) { throw new StringIndexOutOfBoundsException(); } int len = str.length(); int newcount = count + len; if (newcount > value.length) expandCapacity(newcount); System.arraycopy(value, offset, value, offset + len...
[ "public MyStringBuilder2 insert(int offset, MyStringBuilder2 s) {\n\t\tString newStr = \"\";\n\t\tint i;\n\t\tfor (i = 0; i < offset; i++) {\n\t\t\tif (i < offset)\n\t\t\t\tnewStr += this.chars[i] + \"\";\n\t\t}\n\t\tnewStr += s;\n\t\treturn new MyStringBuilder2(newStr + substring(offset));\n\t}", "public StringB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Ubq Checkbox'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseUbqCheckbox(UbqCheckbox object) { return null; }
[ "public String getResCheckboxType()\r\n\t{\r\n\t\tif (!isEnbaleI18N())\r\n\t\t{\r\n\t\t\treturn checkboxType;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn getResStringValue(\"R1_CHECKBOX_TYPE\");\r\n\t\t}\r\n\t}", "@FxThread\n private @NotNull CheckBox getFlipYCheckBox() {\n return notNull(flipYCheckBo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensure message is SETUP ACK.
public static void ensureSetupAck(final StreamServerMessage msg) throws MishmashException { ensureCase(msg, StreamServerMessage.AltCase.SETUP_ACK); }
[ "public static void ensureSetupAck(final MutationServerMessage msg)\n throws MishmashException {\n ensureCase(msg, MutationServerMessage.AltCase.SETUP_ACK);\n }", "public static MishmashSetup ensureSetup(final StreamClientMessage msg)\n throws MishmashException {\n ensureCas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "wholeTbl" element
public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle getWholeTbl() { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null; target = (org.openxmlformats.schemas.drawingml.x200...
[ "protected abstract TableSectionElement getTableHeadElement();", "private GridSqlTable getTable(GridSqlElement el) {\n if (el instanceof GridSqlTable)\n return (GridSqlTable)el;\n\n if (el instanceof GridSqlAlias && el.child() instanceof GridSqlTable)\n return el.child();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method used to iterate through each Hotel Offering which was returned by the Amadeus service in the attempt to find the lowest price.
private HotelOffer findBestHotelOffer(HotelOffer[] hotelOffers) { LOGGER.info("inside of findBestHotelOffer() totalOffers to parse is: "+hotelOffers.length); HotelOffer bestOffer = null; Float bestPrice = null; // Please note that I did not really want to use a "for" loop here. /...
[ "public String findCheapestHotel() throws ParseException {\n\t\tInteger minPrice = minHotelPrice();\n\t\tArrayList<String> cheapestHotel = new ArrayList<>();\n\t\tfor (Map.Entry<String, Integer> entry : HotelNameAndCostMap.entrySet()) {\n\t\t\tif (minPrice >= entry.getValue()) {\n\t\t\t\tminPrice = entry.getValue()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When called this method indicates that a setting has changed in the source.
public void settingChanged(Object source) { setHasChanges(true); }
[ "public void settingsChanged(Object source);", "protected void setChanged() {\n hasChanged = true;\n }", "protected synchronized void setChanged() {\n changed = true;\n }", "@Override\n public synchronized void setChanged() {\n super.setChanged();\n }", "public synchronized void setCh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Print a message indicating the amount of memory used. The caller can indicate whether garbage collection should be performed, which slows the program but reduces memory usage.
public static void printMemoryUsage(boolean gc) { Runtime runtime = Runtime.getRuntime(); if (gc) runtime.gc(); System.out.println("Memory used: " + ((runtime.totalMemory() - runtime.freeMemory()) / (1024L * 1024L)) + " MB"); }
[ "public static void printMemoryUsage() {\n DecimalFormat df = new DecimalFormat();\n df.setMaximumFractionDigits(2);\n df.setMinimumFractionDigits(2);\n System.out.println(\"MEMORY: allocated: \" + df.format(new Double(Runtime.getRuntime().totalMemory()/1048576)) + \"MB of \" + df.format...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Counts the number of persisted Record objects in the database that matches the given example object.
public long countRecords(final RecordExample example);
[ "@Override\n public int selectCountByExample(Object example) {\n return mapper.selectCountByExample(example);\n }", "public long countRecords();", "long countByExample(DiscountPackageContentDOExample example);", "public static int count(final IdentifiedObject object) {\n int c = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve a maneuver from this plan
public IMCMessage getManeuver(String maneuver_id) { return maneuvers.get(maneuver_id); }
[ "Engineer getResponsible();", "public org.landxml.schema.landXML11.ManeuverType xgetManeuver()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.ManeuverType target = null;\r\n target = (org.lan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"railroad state": a state that can only be left by an internal transition
public boolean isRailRoadState() { return outgoingTransitions.size() == 1 && outgoingTransitions.get(0).isInternal(); // add env pairwise? }
[ "public void transitionToState(IAgentState forced_state);", "public void transitionToNextState();", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the transformation from map coordinates to graphics coordinates
private AffineTransform createTransform() { Dimension size = getSize(); Rectangle2D.Float panelRect = new Rectangle2D.Float( BORDER, BORDER, size.width - BORDER - BORDER, size.height - BORDER - BORDER); AffineTransform tr = AffineTr...
[ "public AffineTransform getWorldToView();", "public SpPoint2d transform(Matrix m);", "public AffineTransform getViewToWorld();", "AffineTransform getTransform();", "private Pair<Double, Double> conversionLongLatToWindow(Node node, Scene scene, Map map) {\n\t\tdouble scaleX = (scene.getWidth() * 0.55) / (map...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show the next cloud
public void doNext(View view) { currentCloud = currentCloud+1; if (currentCloud >= intTotalClouds) { currentCloud = 0; } //Get the controls TextView textCloud = (TextView) findViewById(R.id.txtCloudName); TextView textCloudInfo = (TextView) findViewById(R.id.txtCloudInfo); ...
[ "private void displayNext() {\r\n\t\ti++;\r\n\t\tdisplayCurrentPicture();\r\n\t}", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {\n pos += 1;\n if (pos >= getImages().size()) pos = getImages().size() - 1;\n showImage(pos);\n }", "public void showNextSlide() {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .ServerMessage.GameData.ActionInformation actionInformation = 5;
com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.ActionInformationOrBuilder getActionInformationOrBuilder();
[ "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.ActionInformation getActionInformation();", "com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.GameData.ActionInformation getActionInformation();", "com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.GameData.ActionInformationOrBuilder getAc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
}}} Attempts to open an XML document in the form of a Reader object in jsXe.
public static boolean openXMLDocument(MainFrame view, Reader reader) throws IOException { //{{{ //We are assuming the contents of the reader do not //exist on disk and therefore could not be opened already. //right now unrecognized doc exceptions should not be thrown. XMLDocument...
[ "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set CPF. Used to identify individuals in Brazil
public void setlbr_CPF (String lbr_CPF);
[ "public void setCpf(String cpf) {\n this.cpf = cpf;\n }", "public void setCPF(java.lang.String CPF) {\r\n this.CPF = CPF;\r\n }", "public void setCpf(java.lang.String cpf) {\n this.cpf = cpf;\n }", "@Test\r\n public void testSetCpf() {\r\n Empresa e = new Empresa(312134...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Vista__ColorFondoAssignment_3_1" $ANTLR start "rule__Vista__TecnologiaAssignment_4_1" ../org.xtext.estilos.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:1484:1: rule__Vista__TecnologiaAssignment_4_1 : ( ruleTecnologia ) ;
public final void rule__Vista__TecnologiaAssignment_4_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.estilos.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:1488:1: ( ( ruleTecnologia ) ) // ../org.x...
[ "public final void rule__Vista__Group_4__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.estilos.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:985:1: ( ( ( rule__Vista__TecnologiaAssignment_4_1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the score of the best word submitted by the player.
public int getBestWordScore() { return bestWordScore; }
[ "public synchronized int getBestWordScore() {\n return bestWordScore;\n }", "public String getBestWord() {\n return bestWord;\n }", "public synchronized String getBestWord() {\n return bestWord;\n }", "public double getBestScore();", "@SuppressWarnings(\"unchecked\")\r\n\tprivate String getBest...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete deprecated gases measurements.
public void deleteDeprecatedGasesMeasurements(UUID sensing_environment_id, long timestamp) { log.debug("deleteDeprecatedGasesMeasurements: " + timestamp); gasMeasurementDao.deleteDeprecatedGasesMeasurements( sensing_environment_id, timestamp); }
[ "public void removeDeprecatedInstances() {\n List<InstanceBean> instances = EpicBoundaries.getInstanceDao().getDeprecatedInstances();\n for (InstanceBean instance : instances) {\n String worldName = instance.getWorldName();\n if (!Sponge.getServer().getDefaultWorldName().equals(w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the DisplayPanel of the Calculator.
public CalculatorDisplayPanel(CalculatorModel model) { super(); GridBagLayout gridBagLayout = new GridBagLayout(); setLayout(gridBagLayout); font = new Font(Font.DIALOG, Font.PLAIN, 18); this.model = model; initialize(); }
[ "public Calculator() {\n initComponents();\n \n }", "public Calculator() {\n initComponents();\n }", "public Display() \n {\n \t//Set the display variables\n\t\tm_displayDigits = new int[] {10, 10, 10, 10, 10, 10};\n\t\tm_displayColon = false;\n\t\tm_displayMsg = \"\";\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the master motor
public TalonSRX getMasterMotor() { return m_masterMotor; }
[ "public HalfBakedRotatingSRX getMaster() {\n\t\treturn motors.get(0);\n\t}", "public SpeedController GetMotor()\n\t{\n\t\treturn motor;\n\t}", "Motor getMotor();", "public float obtenMotor(){\r\n return this.motor;\r\n }", "public String getMotorNo() {\n\t\treturn motorNo;\n\t}", "public static ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add your logic here for a failed payment response
@Override public void onPaymentError(int code, String response) { Log.e(TAG, "onPaymentError: Response is "+response ); }
[ "private void addPaymentFailedEvent(String Messsage) {\n\n /*09th July 2019, Resolved Pyze library issue*/\n HashMap<String, Object> customAttributes = new HashMap<String, Object>();\n customAttributes.put(\"packageID\", String.valueOf(PackageID));\n customAttributes.put(\"userID\", Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies the given Method (referred by name) into the given Navajo
public Method copyMethod(String name, Navajo newDocument);
[ "public Method copyMethod(Method method, Navajo newDocument);", "public void addMethod(Method m) throws NavajoException;", "public abstract Method createMethod(Navajo tb, String name, String server);", "public abstract DynamicMethod dup();", "void addMethod(Method method);", "Method createMethod();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Input__Group__0__Impl" $ANTLR start "rule__Input__Group__1" InternalWhdsl.g:1016:1: rule__Input__Group__1 : rule__Input__Group__1__Impl ;
public final void rule__Input__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWhdsl.g:1020:1: ( rule__Input__Group__1__Impl ) // InternalWhdsl.g:1021:2: rule__Input__Group__1__Impl { pushFollow(FOLLO...
[ "public final void rule__Input__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:708:1: ( ( ( rule__Input__Group_1__0 )* ) )\n // InternalWh.g:709:1: ( ( rule__Input__Group_1__0 )* )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method should return a Set of 6 different integers. Hint: use the 'Random' class located here: java.util.Random to generate random numbers
public Set<Integer> generateLotteryNumbers () { Set<Integer> randomGenerator = new HashSet<Integer>(6); Random randomnum = new Random(); for (Integer i=0; i<6;i++) { //keep looping until able to add a add number into a set that does not not exist and is between 1 and49 while (ran...
[ "public static Set<Integer> generateWinningNumbers()\n\t {\n\t\t\t// Create a set of integers to store the lottery winning numbers \n\t Set<Integer> winningSet = new TreeSet<Integer>();\n\t \n\t // Create a random variable\n\t Random RNG = new Random();\n\t \n\t // Store...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
use reflection to log in the context of the dummy bundle
private void log(final Bundle dummy) throws ReflectiveOperationException { final Class<?> logManagerClass = dummy.loadClass("org.apache.logging.log4j.LogManager"); final Method getLoggerMethod = logManagerClass.getMethod("getLogger", Class.class); final Class<?> loggerClass = dummy.loadClass("...
[ "public void beforeStart(Framework systemBundle) {}", "public OsgiLoggerContext(Bundle bundle) {\n this.bundle = bundle;\n loggerRegistry = new LoggerRegistry<>();\n }", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ChangeTypeAction. The action requires that the selection provided by the site's selection provider is of type org.eclipse.jface.viewers.IStructuredSelection.
public ChangeTypeAction(IWorkbenchSite site) { super(site); setText(RefactoringMessages.ChangeTypeAction_label); setToolTipText(RefactoringMessages.ChangeTypeAction_tooltipText); setDescription(RefactoringMessages.ChangeTypeAction_description); PlatformUI.getWorkbench().getHelpS...
[ "private void addNewWindowAction(IMenuManager menu, IStructuredSelection selection) {\n\t\t// Only supported if exactly one container (i.e open project or folder) is selected.\n\t\tif (selection.size() != 1) {\n\t\t\treturn;\n\t\t}\n\t\tObject element = selection.getFirstElement();\n\t\tif (element instanceof ScanP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create panel for the User Info display
private JPanel createUserPanel() { //button userButton = new JButton(); userButton.setText(TAB_USER_BUTTON_TEXT); userButton.setToolTipText(TAB_USER_TOOLTIP); userButton.setMnemonic(GET_MNEMONIC); userButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ...
[ "private void buildUserDataPanel() {\r\n\t\tJPanel user_info_panel = new JPanel();\r\n\t\tuser_info_panel.setBorder(new BevelBorder(BevelBorder.LOWERED, null,\r\n\t\t\t\tnull, null, null));\r\n\t\tuser_info_panel.setBackground(INNER_BACKGROUND_COLOR);\r\n\t\tuser_info_panel.setBounds(201, 234, 213, 100);\r\n\t\tuse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MarksProgram
public MarksProgram() { initComponents(); }
[ "Programa createPrograma();", "Program createProgram();", "public PdfFontProgram() {\n super();\n }", "public net.opentrends.training.model.Marks create(long marksid);", "public void create() throws Exception {\n MaintProgramTO lTO = new MaintProgramTO();\n lTO.setAssembly( new Ass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listener for any changes to case indexes due to processing a case transaction
public interface CaseIndexChangeListener { /** * A signal that notes that processing a transaction has resulted in a * potential change in what cases should be on the phone. This can be * due to a case's owner changing, a case closing, an index moving, etc. * * Does not have to be consume...
[ "public void onIndexUpdate();", "void updateIndexes();", "protected void updateIndexes() {\n\t\tsynchronized(this) {\n\t\t\t/*\n\t\t\t * initialize variables \n\t\t\t */\n\t\t\t// set the active resource index\n\t\t\tthis.resourceIndex = this.resourceIndices.get(idxSelect);\n\t\t\t\n\t\t\t// current time sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if this is a case of Top N hosts condition
public static boolean isTopNHostCondition(List<String> metricNames, List<String> hostnames) { // Case 1 : 1 Metric, H hosts // Select Top N or Bottom N host series based on 1 metric (max/avg/sum) // Hostnames cannot be empty // Only 1 metric allowed, without wildcards return (CollectionUtils.isNotEm...
[ "public static boolean isTopNMetricCondition(List<String> metricNames, List<String> hostnames) {\n // Case 2 : M Metric names or Regex, 1 or No host\n // Select Top N or Bottom N metric series based on metric values(max/avg/sum)\n // MetricNames cannot be empty\n // No host (aggregate) or 1 host allowed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a single blueprint
@Override public BlueprintV31 getBlueprint(String id) { ResponseEntity<BlueprintV31> bpe = restTemplate.exchange(basePath + "/blueprints/{blueprint_id}", HttpMethod.GET, basicEntity, BlueprintV31.class, id); if (bpe.getStatusCodeValue() < 200 && bpe.getStatusCodeValue() > 299) { ...
[ "Blueprint getBlueprint(String id);", "public Set<Blueprint> getAllBlueprints() throws BlueprintNotFoundException;", "List<Blueprint> getBlueprints();", "SchemeDBO getSchemeByName(String schemeName);", "public List<Blueprint> getBlueprint(int modelID) throws BuildException {\r\n try {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If this is an onset payment, retrieves the payment from which this onset was originally copied. If this is not an onset payment, returns NULL. Note: When used in the UI, it is recommended that this method only be used from a single payment's detail screen, rather than a listview of payments or transactions, as it may r...
public entity.Payment getOnsetOriginPayment() { return ((gw.cc.financials.payment.entity.Payment)__getDelegateManager().getImplementation("gw.cc.financials.payment.entity.Payment")).getOnsetOriginPayment(); }
[ "public OriginalPayment getOriginalPayment() {\r\n return originalPayment;\r\n }", "public entity.Payment getOnsetOriginPayment() {\n return ((gw.cc.financials.payment.entity.Payment)__getDelegateManager().getImplementation(\"gw.cc.financials.payment.entity.Payment\")).getOnsetOriginPayment();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to test Rotate Right 4.
@Test public void testRotateRight4() { final int dimension = 4; Squarelotron squarelotron = new Squarelotron(dimension); squarelotron.rotateRight(dimension); final int[][] expected = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}; assertArrayEquals(expected, ...
[ "@Test\n public void rightOrientationTest() {\n Assert.assertEquals(Orientation.EAST, Orientation.NORTH.rightRotate());\n Assert.assertEquals(Orientation.SOUTH, Orientation.EAST.rightRotate());\n Assert.assertEquals(Orientation.NORTH, Orientation.WEST.rightRotate());\n Assert.assertEq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get a list of all event tag mediators for a given list of event tag ids
public List<AbstractEventTagMediator> getTagsFrom(List<Long> tagIds) { List<AbstractEventTagMediator> result = new ArrayList<AbstractEventTagMediator>(); if (tagIds == null || tagIds.isEmpty()) { Log.d(TAG, "Null Array Passed"); } else { for (Long tagId : tagIds) { AbstractEventTagMediator mediator = ...
[ "List<MedEvent> getCurrentMedEvents();", "public List<TagEntity> getTagsByIds(List<Long> ids);", "private Iterable<Tagged> tagged(Iterable<E> event) {\n return Vector.ofAll(event).map(this::tagged);\n }", "public ArrayList<UUID> getTagsIds(Context context) {\n\t\t\n\t\t// First removes tags that no ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'DB2 Base Client Unit'. This implementation returns null; returning a nonnull result will terminate the switch.
public Object caseDB2BaseClientUnit(DB2BaseClientUnit object) { return null; }
[ "public Object caseDB2RuntimeClientUnit(DB2RuntimeClientUnit object) {\r\n\t\treturn null;\r\n\t}", "public Object caseDB2ClientInstanceUnit(DB2ClientInstanceUnit object) {\r\n\t\treturn null;\r\n\t}", "public Object caseDB2InstanceUnit(DB2InstanceUnit object) {\r\n\t\treturn null;\r\n\t}", "public Object cas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Has the method or construcor a variadic parameter? Note that when a method has a variadic parameter it should have an array type.
default boolean hasVariadicParameter() { if (getNumberOfParams() == 0) { return false; } else { return getParam(getNumberOfParams() - 1).isVariadic(); } }
[ "public boolean hasVarArgs();", "private static boolean isPotentialVarArgsMethod(Method method, Object[] arguments) {\n return doesParameterTypesMatchForVarArgsInvocation(method.isVarArgs(), method.getParameterTypes(), arguments);\n }", "default boolean isVarArgs() {\n\t\t// Check whether the MethodHa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that getCategoryFromProductByUid returns the product's default category, or null if the given category does not exist.
@Test public final void testGetCategoryFromProductByUid() { final long categoryUid = 234L; final Category mockCategory = context.mock(Category.class); context.checking(new Expectations() { { allowing(mockCategory).getUidPk(); will(returnValue(categoryUid)); } }); final Set<Category> categories ...
[ "boolean isProductInCategory(long productUid, long categoryUid);", "private void getDefaultCategory(){\n\n Cursor cursor = getActivity().getContentResolver().query(\n CCContract.CategoryEntry.Companion.getCONTENT_URI(),\n null,\n CCContract.CategoryEntry.Compani...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of times the specified kgram appeared in the text.
public int getFrequency(String kgram) { if (kgram.length() != order) { throw new IllegalArgumentException("length of kgram not the same as order"); } else if (! model.containsKey(kgram)) { return 0; } else { int sum = 0; for (int i : model.get(kgram)) { sum += i; } return sum; } }
[ "public int getNgramFrequency(String ngram) {\n //TODO replace this line with your code\n return -1;\n }", "private static int getDigramTrigramCount(String message){\n\n //Digram/Trigram count\n int count = 0;\n\n //Loop through all trigrams in the message\n for(int k = 0; k < message...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Old School Runescape online player count
private int getOSRSPlayerCount() { try { Document document = Jsoup.connect("https://oldschool.runescape.com").get(); String playerCountText = document.getElementsByClass("player-count").get(0).text(); Matcher matcher = Pattern.compile("[\\d,?]+").matcher(playerCountText); ...
[ "private int getTotalPlayerCount() {\n String baseUrl = \"https://www.runescape.com/player_count.js?varname=iPlayerCount\";\n String url = baseUrl + \"&callback=jQuery33102792551319766081_1618634108386&_=\" + System.currentTimeMillis();\n try {\n String response = new NetworkRequest(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .POGOProtos.Rpc.StickerSentProto stickers_sent = 15;
public POGOProtos.Rpc.StickerSentProtoOrBuilder getStickersSentOrBuilder( int index) { if (stickersSentBuilder_ == null) { return stickersSent_.get(index); } else { return stickersSentBuilder_.getMessageOrBuilder(index); } }
[ "@java.lang.Override\n public java.util.List<? extends POGOProtos.Rpc.StickerSentProtoOrBuilder> \n getStickersSentOrBuilderList() {\n return stickersSent_;\n }", "@java.lang.Override\n public POGOProtos.Rpc.StickerSentProtoOrBuilder getStickersSentOrBuilder(\n int index) {\n return stickersSen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Map from ServiceTicket entity to ServiceTicketDTO
@Mapping(source = "vehicle.id", target = "vehicleId") @Mapping(source = "mechanic.id", target = "mechanicId") ServiceTicketDto toDto(ServiceTicket serviceTicket);
[ "TicketDTO ticketToTicketDTO(Ticket ticket);", "Ticket ticketDTOToTicket(TicketDTO ticketDTO);", "@Mappings({\n\n @Mapping(target = \"passengerEntity\", source = \"ticketDto.passengerDto\"),\n @Mapping(target = \"ticketScheduleSectionEntityList\", source = \"ticketDto.ticketScheduleSection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the world geometry. All we do here is set the screen center of the World to the center of the JavaFX Window, and apply a scaling of 100x, so that you can actually see something ;). The scaling will lead to 1px corresponding to 100px. Also, we mirror the whole world at the XZPlane because the YCoordinates ar...
private void setUpWorld() { this.world.setScreenCenter(new Vector2D(this.screenWidth / 2, this.screenHeight / 2 + 100)); this.world.transformWorld((TransformationMatrix3D) TransformationMatrix3D.createMirrorXZMatrix().multiply( TransformationMatrix3D.createUniform...
[ "public VolcanoWorld() {\n this(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n }", "protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}", "public void initWorld()\r\n {\r\n this.world = new Node();\r\n \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EFFECTS: return top player in team based on points
public HockeyPlayer topPlayer() { int n = 0; HockeyPlayer top = null; for (HockeyPlayer p : team) { if (p.getPoints() > n) { top = p; n = p.getPoints(); } } return top; }
[ "public void displayTop()\n {\n Player[] topPlayers = new Player[3]; // Array to store the top 3 players.\n for (int index = 0; index < 3; index++)\n topPlayers[index] = new Player(); // Populates array with dummy players.\n for (Player player : players)\n {\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the setup time in seconds before observing can begin
public double getSetupTime() { //SCT: 219 If LGS is in use, the setup is 10 minutes more than when the NGS is in use. //The setup overhead is instrument specific, so we just return the extra overhead for //using LGS here. Instrument code should call this method to take into account the cost ...
[ "long getInitTime();", "protected void setupTime() {\n this.start = System.currentTimeMillis();\n }", "@Override\n public Duration getSetupTime(ISPObservation obs) {\n return Duration.ofMinutes(20);\n }", "long getInitializedTime();", "public static void timeSetup(){\r\n\t\ttimes=0;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pull the claims that have been targeted into a set for processing. Returns an empty set if the input is null.
private Set<String> extractUserInfoClaimsIntoSet(JsonObject claims) { Set<String> target = new HashSet<>(); if (claims != null) { JsonObject userinfoAuthorized = claims.getAsJsonObject("userinfo"); if (userinfoAuthorized != null) { for (Entry<String, JsonElement> entry : userinfoAuthorized.entrySet()...
[ "public Card[] findSet() {\n return null;\n }", "private ISet<S> expand(ISet<S> set) {\n\t\t\tISet<S> expanded = ISets.empty();\n\t\t\tfor (S b : set) {\n\t\t\t\texpanded = expanded.union(b);\n\t\t\t\tif (!reasoner.entails(base.minus(expanded), sentence)) {\n\t\t\t\t\treturn expanded;\n\t\t\t\t}\n\t\t\t}\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ! method which turns original string to Polish string
public String toPolish(String expression) throws ParsingException { /* ! Polish line */ StringBuilder newLine = new StringBuilder(); /* ! stack for operators */ Stack<Character> stack = new Stack<>(); /* ! check for the possibility of unary operation */ boolean unary = tr...
[ "public static String mapPolishCharacters(String textToMap)\n {\n String result=textToMap.replaceAll(\"ą|Ą\",\"a\");\n result=result.replaceAll(\"ź|ż|Ż|Ź\",\"z\");\n result=result.replaceAll(\"ę|Ę\",\"e\");\n result=result.replaceAll(\"ł|Ł\",\"l\");\n result=result.replaceAll(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the toolbar configuration to build buttons on the SmartPad from the param toolbarSpecifications in the ROS param server.
public List<ToolbarSpecification> getToolbarSpecifications() { List<ToolbarSpecification> ret = new ArrayList<ToolbarSpecification>(); List<?> rawParam = getListParameter("toolbarSpecifications"); if (rawParam == null) return null; @SuppressWarnings("unchecked") List<String> stringParam = new LinkedList<...
[ "Map<ToolbarPosition, ? extends Node> getRegisteredToolBars();", "private void configMainToolBar() {\n StiMainToolBar mainToolBar = getStiMainToolBar();\n\n btnPrint = ((StiFlatButton) mainToolBar.getComponent(0));\n btnOpen = ((StiFlatButton) mainToolBar.getComponent(1));\n btnSave = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a slider range with a JavaScritp number array. This constructor is useful in JSNI calls.
public Range(final JsArrayNumber array) { this(array.get(0), array.get(1)); }
[ "public RangeSlider() {\n initSlider();\n }", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "public ParamListPanel(Range[] ranges){\n\t\t\n\t\tthis(ranges, 8);\n\t}", "public native static void sliderSetRange(GameControl oper1, java.util.List oper2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Transformation__Group_5__0__Impl" $ANTLR start "rule__Transformation__Group_5__1" ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/srcgen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:2268:1: rule__Transformation__Group_5__1 : rule__Transformation__Group_5_...
public final void rule__Transformation__Group_5__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:227...
[ "public final void rule__Transformation__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/Inter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the object collision.
public void setObjCollision(Collidable objColl) { this.objCollision = objColl; }
[ "public static void setCollision(boolean b)\r\n\t{\r\n\t\tcollision = b;\r\n\t}", "void setCollisionRule(CollisionRule collisionRule);", "protected abstract void setCollisions();", "public void setCollisionStatus(Actor other) {\n\t}", "public void setCollider(RectangleBox collider)\n\t{\n\t\tthis.collider =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns list of currently selected Treasure cards
public ArrayList<Card> getSelectedTreasureCards() { return this.selectedTreasureCards; }
[ "@JsonIgnore\n\tpublic List<Card> getAvailableCards() {\n\t\tList<Card> availableCards = new ArrayList<>();\n\t\tfor (int i = dealtCards.get(); i < Deck.DECK_SIZE; i++) {\n\t\t\tCard card = cards.get(i);\n\t\t\tavailableCards.add(card);\n\t\t}\n\t\treturn availableCards;\n\t}", "public List<Card> getCards();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }