query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ Checks if all inventory and armor slots are empty. | public static boolean hasEmptyInventory(Player player)
{
ItemStack[] inventory = player.getInventory().getContents();
ItemStack[] armor = player.getInventory().getArmorContents();
// For inventory, check for null
for (ItemStack stack : inventory)
if (stack != null... | [
"public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasEmptySlots() {\n return (numMaxPlayers - activePlayers) != 0;\n }",
"public static boolean isInventoryFull()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the ID associated with the EmployeeConnection Object | public boolean validateID() {
if (this.id == null || this.id.length() < 1)
return false;
try {
Integer.parseInt(this.id);
} catch (NumberFormatException e) {
return false;
}
return true;
} | [
"boolean validateEmployeeId(String employeeId);",
"public int validateID() {\n if(!Pattern.matches(\"[a-zA-Z]{2}-[0-9]{4}\", this.id)) {\n return EmployeeValidationCode.INVALID_ID_FORMAT;\n }\n\n return -1;\n }",
"@Override\r\n\tpublic boolean isPKValid() {\r\n return (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a converter config from the current builder state. | public LdmlConverterConfig build() {
return new IcuConverterConfig(this);
} | [
"public Converter getConverter() {\n return converter;\n }",
"public com.tangosol.util.Converter getConverterFromInternal()\n {\n // import com.tangosol.util.Converter;\n \n Converter conv = __m_ConverterFromInternal;\n if (conv == null)\n {\n syn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current month. | public static int getCurrentMonth()
{
return Calendar.getInstance().get(Calendar.MONTH) + 1;
} | [
"public static String getCurrentMonth() {\r\n\t\treturn myCurrentMonth;\r\n\t}",
"public static int getCurrentMonth() {\n return Calendar.getInstance().get(Calendar.MONTH);\n }",
"private String getCurrentMonth(){\n LocalDate dateNow = LocalDate.now();\n return String.format(\"%s %s %s\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a String of length width that begins and ends with the character edge and contains width2 copies of the character inner in between. For example, if edge is '+', inner is '', and width is 8, the method should return "++". The method does not print anything. The parameter width must be greater than or equal to 2.... | public static String makeLine (char edge, char inner, int width)
{
String line = "";
int index;
line = line + edge; // Appends first + sign
for(index = 1; index < width-1; index++) // Loop to append width copies of "-" to +
{
line = line + inner;
}... | [
"private String rightPad() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (this.getUnmodifiedString().length() == this.getWidth()) {\n\t\t\t//string is ALREADY the right length...\n\t\t\treturn this.getUnmodifiedString();\n\t\t} else if (this.getUnmodifiedString().length() < this.getWidth()) {\n\t\t\t//stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Respuesta'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseRespuesta(Respuesta object) {
return null;
} | [
"public T caseRespuestaUnica(RespuestaUnica object) {\n\t\treturn null;\n\t}",
"public T caseRespuestaMultiple(RespuestaMultiple object) {\n\t\treturn null;\n\t}",
"public Respuesta getRespuestaManifiesto(){\n\t\tRespuesta respRet = null;\n\t\t\n\t\tfor(Respuesta respActual : this.getRespuestas()){\n\t\t\tif (r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The driver options for the dataset. | Map<Key<?>,Object> driverOptions(); | [
"private IDataset getVehicleOptions() {\n\t\tIDataset result = new Dataset();\n\t\tresult.put(\"filter.assigned\", \"true\");\n\t\tresult.put(\"skip.trip\", true);\n\t\tresult.put(\"skip.assigned\", true);\n\t\tresult.put(\"skip.drivermaxspeed\", true);\n\t\tresult.put(\"skip.driveravgspeed\", true);\n\t\tresult.pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the CDVAL value for this CodeCD. | public java.lang.String getCDVAL() {
return CDVAL;
} | [
"public String getCDAValue() {\n return this.cdaValue;\n }",
"public void setCDVAL(java.lang.String CDVAL) {\n this.CDVAL = CDVAL;\n }",
"public char getValue() {\n return value;\n }",
"public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XAttributeType__Group_18__1" $ANTLR start "rule__XAttributeType__Group_18__1__Impl" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:4101:1: rule__XAttributeType__Group_18__1__Impl : ( ( rule__XAttributeType__FileExt... | public final void rule__XAttributeType__Group_18__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:4105:1: ... | [
"public final void rule__XAttributeType__Group_18__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:40... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Restore the join states of the columns | private void restoreJoinState(Element joinElement) {
Element sourceColumnElement = (Element) joinElement
.getElementsByTagName("sourceColumn").item(0); //$NON-NLS-1$
String sourceColumnName = sourceColumnElement.getAttribute("name"); //$NON-NLS-1$
String sourceColumnTable = sourceColumnElement.getAttribute("... | [
"@Override\r\n\tpublic void undo() {\n\t\tif (!businessView.getJoinRelationships().isEmpty()){\r\n\t\t\tbusinessView.getJoinRelationships().removeAll(addedJoinRelationships);\r\n\t\t\tbusinessModel.getJoinRelationships().removeAll(addedJoinRelationships);\r\n\t\t}\r\n\t\t\r\n\t\t//Add Removed Join Relationships\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs processing for the error and the error trace produced after a run of the trace explorer. This method does the following to a trace: 1.) Changes the names of the variables corresponding to trace explorer expressions to the actual expressions. 2.) It also shifts the values of expressions of level 2. For an expre... | private void processTraceForTraceExplorer()
{
// retrieve the error with a trace for which the trace explorer was run
final TLCError originalErrorWithTrace = TraceExplorerHelper.getErrorOfOriginalTrace(getModel());
if (originalErrorWithTrace == null)
{
// the trace ... | [
"private void getTraceExpressionsInformation()\r\n {\r\n \tif (traceExpressionDataTable == null) {\r\n\t\t\t// getTraceExpressionsInformation is called implicitly when\r\n\t\t\t// super(config) is called in the constructor. Thus, we have to\r\n\t\t\t// initialize it here.\r\n \t\ttraceExpressionDataTable =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether the cancel action item should be visible. | public void setCancelVisible(boolean visible) {
((View)mLayoutCancel.getParent()).setVisibility(visible ? View.VISIBLE : View.GONE);
} | [
"public void setCancelButtonVisible(boolean visible) {\r\n\t\tif (_cancelButton != null)\r\n\t\t\t_cancelButton.setVisible(visible);\r\n\t}",
"@VTID(72)\r\n void setCancelButton(\r\n boolean rhs);",
"public void setCanceled(boolean value) {\n this.canceled = value;\n }",
"public void setCanceled... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "slopeDistance" attribute | public void unsetSlopeDistance()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_attribute(SLOPEDISTANCE$20);
}
} | [
"public void xsetSlopeDistance(org.apache.xmlbeans.XmlDouble slopeDistance)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDouble target = null;\r\n target = (org.apache.xmlbeans.XmlDouble)get_store(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AHJ & PSAP By Address. (asynchronously) Accepts addresses as input and Returns contact details for Authorities Having Jurisdiction (AHJ) onbehalfof local Public Safety Answering Points (PSAP). Geo911 accepts an address and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Detai... | public com.squareup.okhttp.Call getAHJPlusPSAPByAddressAsync(String address, final ApiCallback<AHJPlusPSAPResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (cal... | [
"private com.squareup.okhttp.Call getAHJPlusPSAPByAddressCall(String address, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = null;\n \n // verify the requi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to store the QclBtlePackets details of Actigraph devices. | private boolean saveActiGraphQclBtlePackets(Packets packets, Long deviceDetailsId, Connection connection) throws SQLException{
PreparedStatement pStatement = null;
LOGGER.debug("Entering ActiGraphDeviceDAO.saveActiGraphQclBtlePackets method.");
try{
if(packets != null && packets.value != null && packets.va... | [
"private void saveStoredDevices() {\n ArrayList<BluetoothDevice> toStoreArray = new ArrayList<>(2);\n\n if (mFrontStoredDevice != null) {\n // If there is a currently store front device, then save it\n toStoreArray.set(0, mFrontStoredDevice);\n } else if (mFrontManagerThre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches from database Image object for the passed User. Check is made if passed usernameis valid, otherwise exception is thrown. | Image getUserImage(String username) throws MyNotFoundException; | [
"Image getCarImage(String username) throws MyNotFoundException;",
"public Image read(User user) {\n return null;\n }",
"User loadUser( String username ) throws UserNotFoundException;",
"User retrieve(String username)\n throws UnknownEntityException, DataBackendException;",
"UserDetails load... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the event field value | String getEventFieldValue(); | [
"public String Get_event_value() \n {\n\n return event_value;\n }",
"public AptEventField getEventField() { return _eventField; }",
"String getEventFieldName();",
"public String getAttrEventValue() {\r\n\t\treturn attrEventValue;\r\n\t}",
"public String getEvent() {\n return event;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a drag event handler which defaults to not moving the node to the front on drag. | public PDragEventHandler() {
draggedNode = null;
moveToFrontOnPress = false;
setEventFilter(new PInputEventFilter(InputEvent.BUTTON1_MASK));
} | [
"protected void startDrag(final PInputEvent event) {\n super.startDrag(event);\n draggedNode = event.getPickedNode();\n if (moveToFrontOnPress) {\n draggedNode.moveToFront();\n }\n }",
"void handleDragStartedOrMoved(float x, float y);",
"private void makeDraggable(Node ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'unionDefNull' field | public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionDefNull() {
unionDefNull = null;
fieldSetFlags()[6] = false;
return this;
} | [
"public void setValueNull()\n\t{\n\t\tallValues.clear();\n\t}",
"public void setUnionDefNull(java.lang.Long value) {\n this.unionDefNull = value;\n setDirty(6);\n }",
"public org.apache.gora.cascading.test.storage.TestRow.Builder setUnionDefNull(java.lang.Long value) {\n validate(fields()[6], value)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resource policies applied to this instance. repeated string resource_policies = 22220385; | public com.google.protobuf.ProtocolStringList getResourcePoliciesList() {
return resourcePolicies_;
} | [
"public com.google.protobuf.ProtocolStringList getResourcePoliciesList() {\n resourcePolicies_.makeImmutable();\n return resourcePolicies_;\n }",
"public int getResourcePoliciesCount() {\n return resourcePolicies_.size();\n }",
"public int getResourcePoliciesCount() {\n return resourcePoli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes in a Comment object as a request to update it in the database after checking if it exists within the database. If the Comment object cannot be found null is returned instead. | @PutMapping
public @ResponseBody
Comment updateComment(@RequestBody Comment c){
if(commentService.getCommentByCommentId(c.getCommentId()).equals(null)){
return null;
}
return commentService.saveComment(c);
} | [
"public Comment update(Comment existingComment);",
"public Comment findById(String commentId);",
"Comment findById(Long id);",
"void update(Comment comment);",
"void updateComment(Comment comment) {\n if (database == null) {\n open();\n }\n ContentValues values = new ContentV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Directive code of the PDU that this ACK PDU acknowledges. Only EOF and Finished PDUs are acknowledged. | public AckPduBuilder setDirectiveCode(DirectiveCode directiveCode) {
this.directiveCode = directiveCode;
return this;
} | [
"public AckPduBuilder setDirectiveSubtypeCode(byte directiveSubtypeCode) {\n this.directiveSubtypeCode = directiveSubtypeCode;\n return this;\n }",
"public String getDirective()\n {\n return _directivePrefix;\n }",
"public int getAckNumber() {\r\n return this.header[2];\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the connection feature manager | public ConnectionFeatureManager getConnectionFeatureManager() {
return connectionFeatureManager;
} | [
"ConnectionManager getConnectionManager();",
"JPPFManagedConnection getManagedConnection();",
"protected ConnectionListenerFactory getConnectionListenerFactory()\n {\n return clf;\n }",
"public Connection getConnection() {\n return getFoodMartConnection();\n }",
"public ChannelManager get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recupera un Curso de la base de datos | Curso getCursoById(int idCurso) throws Exception; | [
"public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a ValidatedAclSpec by prevalidating and sorting the given ACL entries. Prevalidation checks that it does not exceed the maximum entries. This check is performed before modifying the ACL, and it's actually insufficient for enforcing the maximum number of entries. Transformation logic can create additional entrie... | public ValidatedAclSpec(List<AclEntry> aclSpec) throws AclException {
Collections.sort(aclSpec, ACL_ENTRY_COMPARATOR);
checkMaxEntries(new ScopedAclEntries(aclSpec));
this.aclSpec = aclSpec;
} | [
"private static List<AclEntry> buildAndValidateAcl(\n ArrayList<AclEntry> aclBuilder) throws AclException {\n aclBuilder.trimToSize();\n Collections.sort(aclBuilder, ACL_ENTRY_COMPARATOR);\n // Full iteration to check for duplicates and invalid named entries.\n AclEntry prevEntry = null;\n for (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the PrintRequestAttributeSet for the Print Service with the attributes specified in the properties file and filters its attibutes to create the documentspecific DocAttributeSet by calling the PrintRequestAttributeSet2DocAttributeSet method. | public void setRequest() throws PrintException {
aset = new HashPrintRequestAttributeSet();
/* Set Chromaticity */
if (chromaticity != null ) {
if(chromaticity.equalsIgnoreCase( "monochrome")) {
aset.add(Chromaticity.MONOCHROME);
}
if(... | [
"public DocAttributeSet PrintRequestAttributeSet2DocAttributeSet(PrintRequestAttributeSet pras) {\n DocAttributeSet daset = new HashDocAttributeSet();\n Attribute[] atts = pras.toArray();\n for (int j=0; j<atts.length; j++) {\n String attName = atts[j].getName();\n String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if we create a folder, add a file to the folder, then delete the file, then a delta entry for that folder will not be returned, a delta entry for the file will be returned. | @Ignore
@Test
public void testDeltaDoesNotPickUpRevisionsForFolderIfNetEffectForFolderIsNoChangeForFolder() throws DropboxException {
final String nameOne= UUID.randomUUID().toString() + "originalfolder";
final String content1 = "zippity-doo-dah";
final String folderPath = root + nameOn... | [
"@Ignore\n @Test\n public void testMovedFileToNewFolderIsDifferentFile() throws DropboxException {\n String fileName = UUID.randomUUID().toString();\n String filePath = createNewDropboxFile(fileName);\n List<Entry> entries = mDBapi.revisions(filePath, MAX_REVISIONS);\n Assert.asser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test createTree with invalid width | @Test
public void testCreateTreeInvalidWidth() {
assertEquals(0, tm.getTree().size());
Species treeASpecies = new Species(null, null, "treeA", null, null);
Municipality treeAMunicipality = new Municipality("locationA");
Calendar c = Calendar.getInstance();
c.set(2017, Calendar.MARCH, 16, 9, 0, 0);
... | [
"@Test\r\n\tpublic void testCreateTreeInvalidHeight() {\r\n\t\tassertEquals(0, tm.getTree().size());\r\n\t\t\r\n\t\tSpecies treeASpecies = new Species(null, null, \"treeA\", null, null);\r\n\t\tMunicipality treeAMunicipality = new Municipality(\"locationA\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column registertemporary.agentidcard | public String getAgentidcard() {
return agentidcard;
} | [
"public Long getContragentid()\n {\n return contragentid; \n }",
"public void setAgentidcard(String agentidcard) {\r\n\t\tthis.agentidcard = agentidcard;\r\n\t}",
"public String getCardIdInfo(String pCardNumber){\n \n TypedQuery<Long> getCardIdQuery = em.createQuery(\"SELECT c.cardId ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Listener interface that is registered with a GraphicElementClipboardEntry and is notified when the entry is pasted into a document or evicted from the clipboard. | public interface GraphicElementClipboardEntryListener {
/**
* Called when the entry is evicted from the clipboard, usually as a result
* of another entry being copied or cut.
*/
public void onEntryEvicted();
/**
* Called when the entry is pasted into a document.
*/
public void onEntryPasted();
} | [
"public interface ClipboardListener {\n\t/**\n\t * If paste is enabled (some \"pastable\" content in the clipboard)\n\t * \n\t * @param enabled\n\t * true if enabled\n\t */\n\tpublic void pasteEnabled(boolean enabled);\n\n\t/**\n\t * If there is content to copy or cut selected\n\t * \n\t * @param enabled... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the combo box with texture parameter name. | @FxThread
private @NotNull ComboBox<String> getTextureParamNameComboBox() {
return notNull(textureParamNameComboBox);
} | [
"public static JComboBox<String> createComboBox(){\n JComboBox<String> box = new JComboBox();\n box.setPreferredSize(new Dimension(150, 30));\n box.setAlignmentX(Component.CENTER_ALIGNMENT);\n box.setBackground(Block223MainPage.getButtonBackground());\n box.setForeground(Block223M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the builder object of latencyForTrafficWithProperty. | QueuingLatencyListBuilder latencyForTrafficWithProperty(String latencyForTrafficWithProperty); | [
"String latencyForTrafficWithProperty();",
"QueuingLatencyListBuilder trafficProperty(String trafficProperty);",
"public Duration latency() {\n return latency;\n }",
"public long getLatency() {\n return latency;\n }",
"public double getLatency() {\n return latency;\n }",
"public Double l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method reverse of GeocodeController. Test: valid coordinates when unauthorised. | @Test
public void testReverseUnauthorised() {
expect()
.statusCode(403)
.when()
.get(" http://127.0.0.1:8080/api/v1/geocode/reverse?latitude=51.753306&longitude=-0.241096");
} | [
"@Test\n public void testReverseValidCoordinates() {\n expect()\n .statusCode(200)\n .request()\n .header(\"Authorization\", \"Basic am9obi5kb2U6cGFzc3dvcmQ=\")\n .and()\n .response()\n .body(\"data\", equalTo(\"Hatf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A safe wrapper to destroy the given resource request. | protected void destroyRequest(AsyncResourceRequest<V> resourceRequest) {
if(resourceRequest != null) {
try {
// To hand control back to the owner of the
// AsyncResourceRequest, treat "destroy" as an exception since
// there is no resource to pass into... | [
"public abstract String delete(HttpServletRequest request);",
"public void deleteResource(SpaceEntry sentry, Resource resource);",
"HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;",
"default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueued... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor that accepts PApplet parent and designated lane position for the car. | public Car(PApplet parent, int lane) {
this.parent = parent;
this.lane = lane;
} | [
"public Car(PApplet parent) {\n\t\tthis.parent = parent;\n\t}",
"public Car(PApplet parent, int y, int speed, int[] color) {\n\t\tthis.parent = parent;\n\t\tthis.y = y;\n\t\tthis.speed = speed;\n\t\tthis.color = color;\n\t}",
"public Layer(PApplet parent) {\n this(parent, PApplet.JAVA2D);\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new edge from vertex v1 to v2 and returns true, if v1.equals(v2) evaluates to false and an edge does not already exist from v1 and v2. Returns false otherwise. Vertices v1 and v2 must already exist in this graph. If they are not found in the graph IllegalArgumentException is thrown. | boolean addEdge(V v1, V v2); | [
"@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column house_second_hand_house.browsed | public void setBrowsed(Integer browsed) {
this.browsed = browsed;
} | [
"public void setSouthBL(double southBL)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SOUTHBL$4, 0);\n if (target == null)\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ A function to get the the most likely entities and returns it as a list of Carriers. If indata raises a redirect, the redirect case is used. Otherwise filters out the top 50 entities that contains the indata in its ID. Also counts the number of objects connected to each entity and saves it in the count field. | public ArrayList<Carrier> topEntities(String indata,String [] context,String entityType, int number_of_entities){
Boolean redirect = true;
indata = indata.replaceAll(" ", "_");
ArrayList<Carrier> carriers = new ArrayList<Carrier>();
String redirects = "SELECT (count(?y) as ?count) ?"+entityType+" W... | [
"List<CarDto> findAllCountRent();",
"@GetMapping(\"/api/courriers\")\n public List<CourrierDto> getAllCourriers(@RequestParam(name = \"numCourrier\", defaultValue = \"\") String numCourrier,\n @RequestParam(name = \"refCourrier\", defaultValue = \"\") String refCourr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overrides CompositeGlyph.addChild() to prevent use of addChild() for EntryPair. Should not be used. Prints error message. | public void addChild(Glyph child) {
System.out.println("Use specific methods to set children for EntryPair.");
} | [
"public void insert(Glyph glyph, int position) throws OperationNotSupportedException, IndexOutOfBoundsException {\n throw new OperationNotSupportedException(\"This Glyph cannot have children\");\n }",
"public Glyph addGlyph (Glyph glyph)\r\n {\r\n // Get rid of composing parts if any\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
looks for the max value of the Treasure array | public Treasure max(Treasure[] tsureArray)
{
Treasure max = tsureArray[0];
int maxValue = max.getValue();
for(int i = 0; i < tsureArray.length; i++)
{
if(tsureArray[i].getValue() > maxValue)
{
maxValue = tsureArray[i].getValue();
... | [
"public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }",
"int max() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to kill the process. | public final void kill() {
doKill();
} | [
"public final void kill() {\r\n\t\tif (isFinished()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tkilled = true;\r\n\t\tprocess.destroy();\r\n\t}",
"public synchronized void killProcess() {\n if (externalProcess != null) {\n try {\n externalProcess.stop();\n }\n catch ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all versioned relationships for the item in the baseline (asynchronously) | public com.squareup.okhttp.Call getRelationshipsForVersionAsync(Integer itemId, Integer baselineId, Integer startAt, Integer maxResults, List<String> include, final ApiCallback<VersionedRelationshipDataListWrapper> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
... | [
"public VersionedRelationshipDataListWrapper getRelationshipsForVersion(Integer itemId, Integer baselineId, Integer startAt, Integer maxResults, List<String> include) throws ApiException {\n ApiResponse<VersionedRelationshipDataListWrapper> resp = getRelationshipsForVersionWithHttpInfo(itemId, baselineId, st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleDirectedStatement" $ANTLR start "entryRuleUndirectedStatement" InternalDotLanguage.g:303:1: entryRuleUndirectedStatement returns [EObject current=null] : iv_ruleUndirectedStatement= ruleUndirectedStatement EOF ; | public final EObject entryRuleUndirectedStatement() throws RecognitionException {
EObject current = null;
EObject iv_ruleUndirectedStatement = null;
try {
// InternalDotLanguage.g:303:60: (iv_ruleUndirectedStatement= ruleUndirectedStatement EOF )
// InternalDotLanguage... | [
"public final String entryRuleUndirectedEdge() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleUndirectedEdge = null;\n\n\n try {\n // InternalDotLanguage.g:844:54: (iv_ruleUndirectedEdge= ruleUndirectedEdge EOF )\n // InternalDotLa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 curNearbyPage = 94; | public int getCurNearbyPage() {
return curNearbyPage_;
} | [
"int getCurNearbyPage();",
"public int getRealPerPage();",
"int getPageRange();",
"int getPageIndex();",
"short getPageStart();",
"int getPages();",
"public int getEndPage();",
"int getFirstPageIndex();",
"int getPagesAmount();",
"interface PageUsedBytes\n{\n int DIR_PAGE_USED_BYTES = 8 + 8;\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the subFundGroup attribute. | public SubFundGroup getSubFundGroup() {
return subFundGroup;
} | [
"public String getSubFundGroupCode() {\n return subFundGroupCode;\n }",
"public int getSubGroup() {\n return subGroup;\n }",
"public String getCardgroupSub() {\r\n return (String) getAttributeInternal(CARDGROUPSUB);\r\n }",
"public String getSubgroup() {\n\t\treturn subgroup;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The number of steps to increment. [minimum: 1] | public java.lang.Integer getStepsToIncrement() {
return stepsToIncrement;
} | [
"public void step(){\n numberOfSteps++;\n }",
"public int numberOfSteps() {\t\r\n\t\treturn steps.size();\r\n\t}",
"Integer getTotalStepCount();",
"public void increment(){\n\t\tif (storedValue == null){\n\t\t\t//if the minimum is < 0 start from zero as default\n\t\t\tdouble defaultMin = 0;\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a parameter specifying the data format of the external MS data file. | public Param getFormat() {
return format;
} | [
"public String getToolFormatParameter();",
"public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}",
"public static String dataFormatGetOrDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void RoutingFees_free(struct LDKRoutingFees this_obj); | public static native void RoutingFees_free(long this_obj); | [
"public static native void Route_free(long this_obj);",
"public static native void PrivateRoute_free(long this_obj);",
"public static native void FeeEstimator_free(long this_ptr);",
"public static native void UpdateFee_free(long this_obj);",
"public static native void RouteHop_free(long this_obj);",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an asset from a file. | public static Asset createAsset(File file) throws IOException {
return new Asset(FileUtil.getNameWithoutExtension(file), FileUtils.readFileToByteArray(file));
} | [
"public Asset create(Asset created);",
"public static StandardArtwork createArtworkFromFile(File file) throws IOException\n {\n StandardArtwork artwork = new StandardArtwork();\n artwork.setFromFile(file);\n return artwork;\n }",
"Object create(File file) throws IOException, SAXExcep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of findProduct method, of class ShoppingCart. | @Test
public void testFindProduct() {
ShoppingCart instance = new ShoppingCart();
Product p1 = new Product("Galletas", 1.2);
Product p2 = new Product("Raton", 85.6);
instance.addItem(p1);
instance.addItem(p2);
assertTrue(instance.findProduct("Galleta... | [
"@Test\n public void testFindProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decode cryptogram c using private exponent and public modulus, m = c^d mod n | private static int decode(int c, int d, int n)
{
return modpow(c, d, n);
} | [
"public BigNumber decrypt(BigNumber c){\n\t\tBigNumber m;\n\t\tBigNumber decryptorD=new BigNumber(Integer.toString(d));\n\t\tSystem.out.println(\"The value of d to use for decryption is: \");\n\t\tdecryptorD.display_bigEnd();\n\t\tBigNumber keyN=new BigNumber(Integer.toString(n));\n\t\tSystem.out.println(\"The valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
aws signing region example: 'eucentral1' | String signingRegion(); | [
"@Description(\"AWS region used by the AWS client\")\n @Validation.Required\n String getAwsRegion();",
"void sign(QCloudHttpRequest request, QCloudCredentials credentials) throws QCloudClientException;",
"static byte[] getSignatureKey(String key, String dateStamp, String regionName, String serviceName) throws... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a Springspecific interface the provides access to the JMS session object. This is very useful for requestresponse messaging. Just be aware that you must do your own exception handling (i.e., override the handleListenerException method so exceptions are not lost). | public void onMessage(Message message, Session session) throws JMSException {
} | [
"@Override\n void onMessage(Message msg, Session session) throws JMSException;",
"private SessionMessage getSessionMessage(Message message) {\n try {\n return (SessionMessage) ((ObjectMessage) message).getObject();\n } catch (JMSException e) {\n e.printStackTrace();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 ControlBoardId = 2; | int getControlBoardId(); | [
"public int getControlBoardId() {\n return controlBoardId_;\n }",
"public int getControlBoardId() {\n return controlBoardId_;\n }",
"public int getBoardNo(Integer boardNo) throws Exception;",
"public abstract int getBoardValue();",
"public long getBoardStatus();",
"int selectBoard();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Column__Group__3" $ANTLR start "rule__Column__Group__3__Impl" InternalMyDsl.g:10304:1: rule__Column__Group__3__Impl : ( RULE_EQUALS ) ; | public final void rule__Column__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:10308:1: ( ( RULE_EQUALS ) )
// InternalMyDsl.g:10309:1: ( RULE_EQUALS )
{
// InternalMyDsl.g:10309:1: ( R... | [
"public final void rule__Label__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11928:1: ( ( RULE_EQUALS ) )\n // InternalMyDsl.g:11929:1: ( RULE_EQUALS )\n {\n // InternalMyDsl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for objects of class LiteratureRegister. | public LiteratureRegister() {
this.listOfLiterature = new ArrayList<>();
} | [
"public LiteratureRegister() {\n litRegister = new HashSet<>();\n }",
"public Registration() {\n\t\tsuper();\n\t}",
"public Registration() {\n\t}",
"public FieldResearcherRegister() {\n }",
"private Register() {\r\n\t\tinitialise();\r\n\t}",
"public RegistryCreator(){\n\n\t\tthis.accounting =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The getMailingList method returns the mailing list status. | public boolean getMailingList()
{
return mailingList;
} | [
"boolean getIsMailingList();",
"public void setMailingList(boolean m)\r\n {\r\n mailingList = m;\r\n }",
"public String getLstStatus() {\n return lstStatus;\n }",
"public String getMailing() {\n return mailing;\n }",
"Long getMailjetListId();",
"public static synchronized Refe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.build_event_stream.BuildFinished finished = 14; | com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.BuildFinished getFinished(); | [
"@Override\n public void buildFinished(BuildEvent event) {\n }",
"public void targetFinished(BuildEvent event) {\n }",
"public void taskFinished(BuildEvent event) {\n }",
"public void targetFinished(BuildEvent event) {\r\n }",
"@Override\n public void targetFinished(Buil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o atributo numBancoDepositario | public void setNumBancoDepositario(Short numBancoDepositario) {
this.numBancoDepositario = numBancoDepositario;
} | [
"public void setTamanhoDeposito(int tamanhoDeposito){this.tamanhoDeposito = tamanhoDeposito;}",
"public void setNumeroBanco(int value) {\n this.numeroBanco = value;\n }",
"public int getTamanhoDeposito(){return this.tamanhoDeposito;}",
"public void setNumBancoDep(Integer numBancoDep) {\n this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds error log statements as XML elements to failed record XML | private void addErrors(Document failedRecord) {
try {
Element errorsElement = failedRecord.createElement("record-errors");
for (RecordError error : errors) {
Element errorElement = failedRecord.createElement("error");
Element labelElement = failedRecord.createElement("label");
la... | [
"protected byte[] createFailedRecordXml () {\n byte[] failedRecordBytes = null;\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n try {\n builder = factory.newDocumentBuilder();\n Document failedRecord = builder.parse(new InputSource(new Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the set of Instances that are covered by the rule. | public final ArrayList<Instance> coveredInstances(final Instances data) {
//TODO ELM: this fucks a lot, since it changes the reference to the dataset. actually, it should make a copy or something. ok, I put, that instances are added directly. this is a problem
final ArrayList<Instance> covd = new ArrayL... | [
"public Instances coveredBy(Instances data) {\n\n Instances r = new Instances(data, data.numInstances());\n Enumeration enu = data.enumerateInstances();\n while (enu.hasMoreElements()) {\n\tInstance i = (Instance) enu.nextElement();\n\tif (resultRule(i) != -1) {\n\t r.add(i);\n\t}\n }\n r.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test whether the rook can kill same color, different piece. | @Test
public void testRookKillSameColorDifferentPiece() {
assertEquals(false, rookOne.canKill(queenOne));
} | [
"@Test\n public void testRookKillSameColor() {\n assertEquals(false, rookOne.canKill(rookTwo));\n }",
"@Override\r\n public Boolean canKill(ChessPiece otherPiece) {\r\n if (otherPiece.getColor().equals(this.getColor())) {\r\n return false;\r\n }\r\n int otherRow = otherPiece.getRow();\r\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests whether an invalid cluster status throws exception. | @Test(expected = GeniePreconditionException.class)
public void testBlankClusterStatus() throws GeniePreconditionException {
ClusterStatus.parse(" ");
} | [
"@Test(expected = GeniePreconditionException.class)\n public void testInvalidClusterStatus() throws GeniePreconditionException {\n ClusterStatus.parse(\"DOES_NOT_EXIST\");\n }",
"@Test\n public void testValidClusterStatus() throws GeniePreconditionException {\n Assert.assertEquals(UP, Clust... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "Address" element | public org.apache.xmlbeans.XmlString xgetAddress()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ADDRESS$20, 0);
return target;
... | [
"public org.apache.xmlbeans.XmlString xgetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n return target... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
proManagerUpMenu() This method show the user option to continue This method displays a list of options and that the user used to pick the option they will like to use it also has a number system for easy option selection | public static void proManagerUpMenu(){
//Displaying the menu options by using the system out method
System.out.println("1 - Would you like to view all of the Project Manager's Information");
System.out.println("2 - Would you like to search for a Project Manager's information");
System.o... | [
"public static void projectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Deadline date\");\n System.out.println(\"2 - Payment toward the outstanding balance\");\n System.out.println(\"3 - Finalized project\");\n System.out.pr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated int32 release_players = 26; repeated int32 release_players = 26; | java.util.List<java.lang.Integer> getReleasePlayersList(); | [
"int getReleasePlayersCount();",
"public void setNumberOfPlayers(int numPlayers) { numberOfPlayers = numPlayers; }",
"void setPlayerCount(int playerCount);",
"public static void main(String[] args) { Player p1 = new Player(1344549, \"manish\", 8);\n\t\t// System.out.println(p1.getCount());\n\t\t// System.out.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if a group exists in the database | public boolean doesGroupExist(String group) {
try {
ResultSet rs = this.getPreparedStatement("SELECT COUNT(*) FROM permissionDataG WHERE groupname='" + group + "';").executeQuery();
rs.next();
return rs.getInt(1) == 1;
} catch (SQLException | ClassNotFoundException e... | [
"boolean existGroup(String groupName);",
"boolean isGroupExists(String name) throws ClassNotFoundException, SQLException, IOException;",
"boolean isGroupExists(int id) throws ClassNotFoundException, SQLException, IOException;",
"@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Methos setSpecAndTask(develoepr, specification, task) sets specification's and tasks's id to the developer and update information in database. | public void setSpecAndTask(Developer developer, Specification specification, Task task) {
developer.setIdSpec(specification.getId());
developer.setIdTask(task.getId());
DeveloperDAO developerDAO = new DeveloperDAO();
developerDAO.update(developer);
} | [
"private void updateSpecReviewToAssigned(Connection conn, long projectId) {\r\n PreparedStatement ps = null;\r\n InitialContext ctx = null;\r\n try {\r\n ps = conn.prepareStatement(\"UPDATE spec_review \"\r\n + \" SET review_status_type_id = 5, \"\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'affinity' | @Test
public void affinityTest() {
// TODO: test affinity
} | [
"public boolean useAffinity() {\n return useAffinity;\n }",
"public double getAffinityThreshold() {\n return affinityThreshold;\n }",
"public String getAffinityName() {\n return affinityName;\n }",
"public boolean useThreadAffinity();",
"public void setAffinityGroup(entity.Affi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See a full description. string available_memory = 13; | com.google.protobuf.ByteString getAvailableMemoryBytes(); | [
"java.lang.String getAvailableMemory();",
"int getMemoryMb();",
"public Integer availableMemoryInMB() {\n return this.availableMemoryInMB;\n }",
"long getTotalMemory();",
"@Nullable\n BigInteger getMemoryMb();",
"public String getMemory() {\n\t\treturn memory;\n\t}",
"public int getMemoryMb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the getter/setter properties for a given service | public DeviceMethods getProperties(String service) throws GDAClientRestException {
String url = formatURL(getServiceEndpoint(), String.format("/detector/services/%s/properties", service));
ResponseEntity<DeviceMethods> response = submitRequest(url, HttpMethod.GET, null, DeviceMethods.class);
return response.getBo... | [
"public Map<String, Property> getProperties(String serviceId) {\n\t\treturn services.get(serviceId).getProperties();\n\t}",
"public abstract HostedServiceProperties getHostedServiceProperties(\r\n\t\t\tString serviceName, boolean embedDetail);",
"public Service getService(){\r\n return this.service;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: isArithmeticOperand Verifies whether passed character is an arithmetic operand. This character is checked according to the following regular expression: arithmeticOperand > ['+' '' '' '/'] Usage: boolean isPlusArithmeticOperand = Scanner.isArithmeticOperand('+'); | public static boolean isArithmeticOperand(char c)
{
return (c == '+') || (c == '-') ||
(c == '*') || (c == '/');
} | [
"boolean isOperand(String s);",
"public boolean isOperand(char ch) {\n if (Character.isDigit(ch)) {\n return true;\n }\n else {\n return false;\n }\n }",
"private boolean isOperator(char ch)\n {\n if (ch == '+' || ch == '-' || ch == '*' || ch == '/'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns a filter that allows you to filter users in the listView based on the text entered in the searchView | @Override
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
// We implement here the filter logic
if (constraint... | [
"private void createSearchFilter() {\n myAdapter = new ArrayAdapter(HomepageActivity.this, android.R.layout.simple_list_item_1,\n myRestaurant);\n myListView = (ListView) findViewById(R.id.restaurant_list);\n mySearchView = (SearchView) findViewById(R.id.search_view);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write a full response. | default void writeFull(@NonNull FullHttpResponse response) {
writeFull(response, false);
} | [
"public void writeResponse() throws IOException\n {\n // write the response buffer\n if(responseLineBuffer.hasRemaining())\n {\n socketChannel.write(responseLineBuffer);\n }\n // if the complete response buffer has been written,\n // we are either done (in cas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return all resources, where user is allowed by all his members. | List<Resource> getAllowedResources(PerunSession sess, User user); | [
"public List<IPermissionOwner> getAllPermissionOwners();",
"List<Resource> getAssociatedResources(PerunSession sess, User user);",
"List<Resource> getAssignedResources(PerunSession sess, User user);",
"public List<User> getEnabledUsers();",
"List<RolePermission> findActiveRolePermissions();",
"List<Resour... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get normalised vertex positions vector 2 f [ ]. | public Vector2f[] getNormalisedVertexPositions() {
Vertex3D[] vertices = mesh.getModel().getVertices();
// Get Array of X and Y offsets for all vertices
Vector2f[] vertexPositions = new Vector2f[vertices.length];
for (int i = 0; i < vertices.length; i++) {
Vector3f vertexPosition = vertices[i].get... | [
"public NormalVector calcNormal() {\n // Use the vertices of the face as the 3 vectors.\n // Using them as vectors results in a vector pointing from the origin to the vertex\n // For our use, this is fine\n Vertex v1 = vertex_list[0];\n Vertex v2 = vertex_list[1];\n Vertex ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form StandardName | public StandardName() {
initComponents ();
} | [
"Name createName();",
"public TFSABuilder createName(String name);",
"public static Name createName() {\n\t\tString firstName;\n\t\tString middle;\n\t\tchar middleInitial;\n\t\tString lastName;\n\t\tString suffix = null;\n\n\t\tfirstName = JOptionPane.showInputDialog(\"Enter First Name\");\n\t\tmiddle = JOption... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ check apiKey validity: query AAPL (Apple) using the API key provided If the response contains Meta Data, it is valid | private void isAPIkeyValid(final String key) {
Log.i("key", key);
String testURL = "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=AAPL&apikey=" + key;
// call the query above and check whether it returns "Metadata" or "Information"
// instantiate and initialize vol... | [
"public boolean authenticateApiKey(String apikey){\n //creating new user object to check if there is a user with the api key registered\n User user = userMapper.getUserByKey(apikey);\n //if api key doesn't match any user returns false\n if (user == null) {\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleProgram" $ANTLR start "ruleProgram" InternalReflex.g:63:1: ruleProgram : ( ( rule__Program__Group__0 ) ) ; | public final void ruleProgram() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:67:2: ( ( ( rule__Program__Group__0 ) ) )
// InternalReflex.g:68:2: ( ( rule__Program__Group__0 ) )
{
// InternalReflex.g:... | [
"public final void ruleProgram() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:91:2: ( ( ( rule__Program__Group__0 ) ) )\n // InternalWh.g:92:2: ( ( rule__Program__Group__0 ) )\n {\n // InternalW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column FJB_BMK.PXDATE | public String getPxdate() {
return pxdate;
} | [
"public java.lang.String getDateColumn() {\r\n return dateColumn;\r\n }",
"public void setPxdate(String pxdate) {\n this.pxdate = pxdate;\n }",
"org.apache.xmlbeans.XmlString xgetDateOfClaim();",
"public Date getVALUE_DATE()\r\n {\r\n\treturn VALUE_DATE;\r\n }",
"Date getDateField(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
!notify the event that the GameCharacter removes updater /! \param _updater the updater object that will be removed | protected void NotifyRemoveGameCharacterUpdater(GameCharacterUpdater _updater) {
for(Listener i : listeners ) {
i.OnRemoveGameCharacterUpdater(this, _updater);
}
} | [
"public boolean RemoveGameCharacterUpdater(GameCharacterUpdater _updater) {\n\t\tif(_updater==null)return false;\n\t\tboolean result = updaters.remove(_updater);\n\t\tif(result) {\n\t\t\tNotifyRemoveGameCharacterUpdater(_updater);\n\t\t}\n\t\treturn result;\n\t}",
"void OnRemoveGameCharacterUpdater(GameCharacter ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the the given x,y point is inside the path. | @Override
public boolean isPointInPath(double x, double y) {
return graphicsEnvironmentImpl.isPointInPath(canvas, x, y);
} | [
"public boolean isPointOnPath();",
"public boolean insideOf(Point p) {\n double e = 0.0001;\n //check if it contains the x and y values that are withing the rect.\n Line bottomSide = new Line(downLeft, downRight);\n Line leftSide = new Line(upperLeft, downLeft);\n if ((bottomSid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column regsat_regist.auto_cent | public Integer getAutoCent() {
return autoCent;
} | [
"public BigDecimal getRegistMoneycn() {\n return registMoneycn;\n }",
"public BigDecimal getRegistMoneyus() {\n return registMoneyus;\n }",
"public Integer getAutoInsert() {\n return autoInsert;\n }",
"public BigDecimal getCUSTOMER_ACC_CIF() {\r\n return CUSTOMER_ACC_CIF;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the current tree to a file. | protected void saveTreeAs()
{
//Pick a file
int choice = fileChooser.showSaveDialog(this);
if (choice != JFileChooser.APPROVE_OPTION)
{
refresh();
return;
}
String filename = fileChooser.getSelectedFile().getAbsolutePath();
//Write the tree out
try
{
scene.save(filename);
}
catch (IOExc... | [
"private void saveTree(File saveFile) throws FileNotFoundException {\r\n\t\tPrintStream ps = new PrintStream(saveFile); // Prepare to output to save file\r\n\t\tsaveTree(ps, getRootNode());\r\n\t\tps.close(); // Close the save file\r\n\t}",
"private void saveTree(PrintStream saveStream, BinaryNode<String> current... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the Identity Pool you want to set attribute mappings for. | public void setIdentityPoolId(String identityPoolId) {
this.identityPoolId = identityPoolId;
} | [
"public String getIdentityPoolId() {\n return this.identityPoolId;\n }",
"java.lang.String getPoolId();",
"public Long getPoolId();",
"@Override\n public String id() {\n return resourcePoolId;\n }",
"public void setPoolId(Long poolId);",
"public String getPoolId() {\n return this.poo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the engineeringRate property. | public int getEngineeringRate() {
return engineeringRate;
} | [
"public double getExchangeRate()\n\t{\n\t\treturn exchangeRate;\n\t}",
"public java.math.BigDecimal getExchange_rate() {\n return exchange_rate;\n }",
"public void setEngineeringRate(int value) {\n this.engineeringRate = value;\n }",
"public Number getExchangeRate() {\n return (Numb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new OptionGroup with given caption and listener. | public OptionGroup optiongroup(String caption,
Property.ValueChangeListener changeListener) {
OptionGroup c = optiongroup(caption);
c.addListener(changeListener);
return c;
} | [
"private void createOptionsGroup()\r\n {\r\n optionsGroup = new Group(optionsComposite, SWT.NONE);\r\n optionsGroup.setLayoutData(new GridData(GridData.FILL_VERTICAL));\r\n optionsGroup.setLayout(new GridLayout());\r\n optionsGroup.setText(MessageUtil.getString(\"SearchOptions\"));\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switches out ThisLiterals in an expression | private void replaceThis(Expression e, Stack<Variable> variables) throws LookupException {
// Replace occurences of 'this' by the right variable
List<ThisLiteral> descendants = e.descendants(ThisLiteral.class);
for (Element replacee : descendants) {
NameExpression replacer = eFactory... | [
"public T caseThisExpr(ThisExpr object) {\n\t\treturn null;\n\t}",
"public T caseThisExpression(ThisExpression object) {\n\t\treturn null;\n\t}",
"private String resolveThisExpression(ThisExpression thisExpression)\n\t{\n\t\treturn clazz.getName();\n\t}",
"public String visit(ThisExpression n, LLVMRedux argu)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the documentation for the model element, The indent argument is prefixed to each line. By default this method wraps lines after 64 characters. This method is equivalent to getDocumentation(indent, 64). | public String getDocumentation(String indent); | [
"public String getDocumentation(String indent, int lineLength);",
"String getDocumentation();",
"public String getDocumentation() {\r\n return getComment().getDocumentation();\r\n }",
"public List<Element> getDocumentationElements();",
"public Documentation getDocumentation() {\n return documen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of MainKeyDispatcher. | public MainKeyDispatcher(KeyboardFocusManager keyManager)
{
this.keyManager = keyManager;
} | [
"public MainController() {\n\t\tcontroller = new Controller(this);\n\t}",
"public static MainController getInstance(){\n if(instance == null)\n instance = new MainController();\n return instance;\n }",
"public CommandDispatcher createCommandDispatcher() {\n return new CommandD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recalcula importeEnFactura,impuestoEnFactura y totalEnFactura en base a IMPORTEF,IMPUESTOF,TOTALF | private void calcularImportesDeFactura(){
Facxp analisis=this;
/*
CantidadMonetaria importef=new CantidadMonetaria(analisis.getIMPORTEF(),analisis.getTipoDeMoneda());
CantidadMonetaria totalf=new CantidadMonetaria(analisis.getTOTALF(),analisis.getTipoDeMoneda());
CantidadMonetaria impuestof=new C... | [
"public double calcularImporte() {\r\n\r\n int cantidad;\r\n double precio;\r\n double total = 0;\r\n\r\n for (int i = 0; i < articulosFactura.size(); i++) {\r\n\r\n cantidad = articulosFactura.get(i).getCantidad();\r\n precio = articulosFactura.get(i).getPrecio();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: setSquareVisited(int, int) Purpose: Sets the boolean value true on a square to indicate that it has been visited. | public void setSquareVisited(int row, int col) {
playingBoard[row][col].setVisited(true);
} | [
"public void setSquare(int x, int y, int state);",
"public void setVisited(Boolean b){\n visited = b;\n }",
"public boolean isSquareVisited(int i, int j) {\n return this.visitedSquares[i][j];\n }",
"public boolean isVisited () {\n if (this.equals(SquareType.VISITED))\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a shorter string representation of this Maneuver. The returned string describes the starting point and ending point of this Maneuver. | public String toShortString() {
return "(" + getInitialX() + ", " + getInitialY() + ") -> ("
+ getX() + ", " + getY() + ")";
} | [
"@Override\r\n public String toString() {\r\n String stringOut = start.toString() + \" \" + end.toString(); //create a string with the formatted coordinates\r\n return stringOut; //return the string\r\n }",
"public String toString(){\n\t return start.dist+\":\"+start.y+\"-\"+end.dist+\":\"+en... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to convert a String of form MM:SS to time in milliseconds | public static long convertMMSStoTimeInMilliseconds(String time){
String[] timeParts = time.split(":");
int minutes = Integer.parseInt(timeParts[0]);
int seconds = Integer.parseInt(timeParts[1]);
long minutesInMillis = minutes * 60 * 1000;
long secondsInMillis = seconds * 1000;
return minut... | [
"private static double stringToTime(String time) {\r\n\t\t/*Take the seconds from the minutes section of the String before the colon*/\r\n\t\t/*This is done by parsing the substring before the colon, the multiplying by 60 to get the seconds*/\r\n\t\tdouble seconds = (Double.parseDouble(time.substring(0, time.indexO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Type of the followed record. One of the following: EMAIL, NOTE, TASK, CONTACT, ORGANISATION, PROJECT, OPPORTUNITY, LEAD. | @ApiModelProperty(value = "Type of the followed record. One of the following: EMAIL, NOTE, TASK, CONTACT, ORGANISATION, PROJECT, OPPORTUNITY, LEAD.")
@JsonProperty("RECORD_TYPE")
public String getRECORDTYPE() {
return RECORD_TYPE;
} | [
"public FollowingType getFollower() {\n\t\treturn follower;\n\t}",
"public String getRelationshipType()\n {\n return mRelationshipType;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.AccountRelationshipType getRelationshipType();",
"protected abstract RelationshipType getRelationshipT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
!RC TODO Made this public to know range of legal data types Constructs a Variant object that can contain data of the type specified with the dataType parameter. Variants instantiated with this constructor must have the results of all get or set operations be of the type specified. | public Variant(int dataType) {
setType = dataType;
} | [
"public Variant() {}",
"public void set_variant_type(byte t) { this.variantType=t; }",
"public Object clone() {\r\n\t\tVariant value = new Variant(setType);\r\n\t\tvalue.setVariant(this);\r\n\t\treturn value;\r\n\t}",
"public void setValue(DataElement hlaObject, VariantRecordDataType fomDataType, Object value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a position from the occupied positions list | private void removePosition(Point p) {
for(Point point : occupiedPositions) {
if(p.x == point.x && p.y == point.y) {
occupiedPositions.remove(point);
}
}
} | [
"public void removeFreeSpace(int position) {\n\t\tfor(int i = 0;i<coordinate.size();i++) {\n\t\t\tif(coordinate.get(i) == position) {\n\t\t\t\tcoordinate.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void removeAt(int pos)\n {\n for (int i = pos; i < length - 1; i++)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for ShortList. | public void setShortList(String value) {
setAttributeInternal(SHORTLIST, value);
} | [
"void setShort(short val);",
"public Tree set(short value) {\r\n\t\treturn setObjectInternal(value);\r\n\t}",
"void setShortTextValue(final String shortTextValue);",
"public void setShort(final String path, final short value)\n {\n final int index = path.indexOf('.');\n if (index == - 1)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the ith "mappingFields" element | public void removeMappingFields(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(MAPPINGFIELDS$28, i);
}
} | [
"public void clearFields() {\n getFieldMap().clear();\n }",
"private void removeAllFields(){\r\n\t\tHashMap<Forcefield,Boolean> temp = new HashMap<Forcefield,Boolean>();\r\n\t\tfor(Forcefield ff:forcefieldList.keySet())\r\n\t\t\ttemp.put(ff, forcefieldList.get(ff));\r\n\t\tfor(Forcefield ff:temp.keySet(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the number of credit hours for the course. The credit hours cannot be less than or equal to zero | public void setCredits(int credits) {
if(credits <= 0)
{
throw new IllegalArgumentException("The credit hours cannot be less than or equal to zero.");
}
this.credits = credits;
} | [
"public void setCreditHours(int creditHours) {\n this.creditHours = creditHours;\n }",
"public int getCreditHours(){\r\n\t\treturn credit;\r\n\t}",
"void setNbHours(int nbHours);",
"public void setHours(int hours) {\n this.hours = hours;\n }",
"public void setHours(double hours) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |