query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
optional float word_duration_frames = 4 [default = 0];
@java.lang.Override public float getWordDurationFrames() { return wordDurationFrames_; }
[ "@java.lang.Override\n public float getWordDurationFrames() {\n return wordDurationFrames_;\n }", "public Builder setWordDurationFrames(float value) {\n bitField0_ |= 0x00000008;\n wordDurationFrames_ = value;\n onChanged();\n return this;\n }", "@java.lang.Override\n public boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares two MutableInteger objects numerically.
public int compareTo(MutableInteger anotherInteger) { return m_value - anotherInteger.m_value; }
[ "private void testReferenceAndValueComparisonForInteger() {\r\n\t\t\r\n\t\t/*\tCreate 2 null integer references */\r\n\t\tInteger a = null;\r\n\t\tInteger b = null;\r\n\t\t\r\n\t\t/*\tCompare the references of value with range [-200, 199) \t */\r\n\t\tint sameReferenceCount = 0;\r\n\t\tint diffReferenceCount = 0;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set pHirBody as the body part of the subprogram.
public void setHirBody( BlockStmt pHirBody );
[ "void\nsetHirBody(Stmt pHirBody, Label pStartLabel, Label pEndLabel);", "void setBody (DBody body);", "protected void setBody(JvmExecutable executable, Procedure1<ITreeAppendable> expression) {\n\t\tthis.typeBuilder.setBody(executable, expression);\n\t}", "public void setBody(AgentBody newBody) {\n\t\tbody = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a storage information
void editStorage(StorageEntity storage);
[ "void update(Storage<?> storage);", "@RequestMapping(value = STORAGES_URI_PREFIX + \"/{storageName}\", method = RequestMethod.PUT, consumes = {\"application/xml\", \"application/json\"})\n @Secured(SecurityFunctions.FN_STORAGES_PUT)\n public Storage updateStorage(@PathVariable(\"storageName\") String storag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new type tree root.
public TypeTreeRoot(SOATypeRegistry typeRegistry){ super((IRegistryTreeNode)null, typeRegistry); }
[ "SQLTreeNode create(ClassNode root) throws FatalORLayerException;", "private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }", "public Tree() {\r\n\t\tcreateEmptyNode();\r\n\t}", "public Tree() {}", "public Tree(T rootData) {\n this.dataToGenericNodeMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Example modified of The first join has not the good key There is also example code at Sometimes the stack becomes so deeply nested it gets confusing. To keep things straight, you can remove expressions from the stack. For example, here we are building a bushy join: join / \ join join / \ / \ CUSTOMERS ORDERS LINE_ITEMS...
public static RelNode bushyJoin(RelBuilder relBuilder) { RelBuilder builder = CalciteRel.createOrderEntryBasedRelBuilder(); final RelNode left = builder .scan("CUSTOMERS") .scan("ORDERS") .join(JoinRelType.INNER, "CUSTOMER_ID") .build(); ...
[ "@Test\n public void testJoinThatLeavesBranches() {\n\n ProdName a = new ProdName(\"A\");\n\n Language lang = new Language.Builder()\n .define(\n a,\n C.seq(\n C.or(\n C.seq(\n C.lit(\"fo\"),\n C.opt(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the modal for updating the resource.
private void onResourceUpdateClicked(UpdateClickedEvent event) { UpdateResourceModal updateResourceModal2 = new UpdateResourceModal("update-resource-modal"); updateResourceModal.replaceWith(updateResourceModal2); updateResourceModal = updateResourceModal2; updateResourceModal.show(event.getTarget()); }
[ "@FXML\n private void handleUpdate() {\n if(customerSchedule.getSelectionModel().getSelectedItem() != null){\n Dialog<ButtonType> dialog = new Dialog<>();\n dialog.initOwner(updateButton.getScene().getWindow());\n FXMLLoader fxmlLoader = new FXMLLoader();\n fxml...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructors Create a detached EpOrganAccountRecord
public EpOrganAccountRecord() { super(EpOrganAccount.EP_ORGAN_ACCOUNT); }
[ "public EpOrganAccountRecord(Long id, String accountName, String nickName, String introduce, Long ognId, EpOrganAccountStatus status, Long referMobile, Timestamp createAt, Timestamp updateAt, String remark, Boolean delFlag, Long version) {\n super(EpOrganAccount.EP_ORGAN_ACCOUNT);\n\n set(0, id);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all comments comment [ ].
public Comment[] getAllComments() { Comment[] result = new Comment[positionComments]; for (int index = 0; index != positionComments; index++) { result[index] = this.comments[index]; } return result; }
[ "java.util.List<com.xiaomi.zhibo.crawler.pb.PbComment.Comment> \n getCommentsList();", "public Comment[] getAllComments(){\n\t\tif(this.top != this){\n\t\t\treturn this.top.getAllComments();\n\t\t}\n\n\t\treturn script.comments.toArray( new Comment[script.comments.size()] );\n\t}", "public List<Comment> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize a variant, with a specified value
public Variant(final int value) throws Bug.Assertion.Variant.Initial { if (value < 0) throw new Assertion.Variant.Initial(value); this.value = value; }
[ "public Variant() {}", "void VariantInit(VARIANT pvarg);", "void VariantInit(VARIANT.ByReference pvarg);", "public void set_variant_type(byte t) { this.variantType=t; }", "public Variant(int dataType) {\r\n\t\tsetType = dataType;\r\n\t}", "private VariantType(byte id) {\n\t\tthis.id = id;\n\t}", "Value ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The getResidentById() method takes residentId as parameter and it returns the resident object if found. Else, Resident Not Found message is returned with appropriate status code and information.
@GetMapping("{id}") public ResponseEntity<Resident> getResidentById(@PathVariable(value = "id") int residentId) throws ResourceNotFoundException { Resident resident = residentService.findById(residentId) .orElseThrow(() -> new ResourceNotFoundException("Resident Not Found!"...
[ "@Override\n\tpublic Resident getResidentById(int user_id) {\n\t\tCriteria c=getSession().createCriteria(Resident.class);\n\t\tc.add(Restrictions.eq(\"user_id\",user_id));\n\t\tResident resident=(Resident) c.uniqueResult();\n\t\treturn resident;\n\t}", "@Override\n\tpublic Resident searchResident(int user_id) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Schedules a job for immediate execution. Same as submit(job, System.nanoTime()).
public void submit(final Job job) { deque.add(new DelayedJob(job, System.nanoTime())); }
[ "private void scheduleJob() {\n // [START dispatch_job]\n OneTimeWorkRequest work = new OneTimeWorkRequest.Builder(MyWorker.class)\n .build();\n WorkManager.getInstance().beginWith(work).enqueue();\n // [END dispatch_job]\n }", "void schedule(ScheduledJob job);", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the reader of the file(tsfile or unseq tsfile) indicated by filePath. If the reader already exists, just get it from closedFileReaderMap or unclosedFileReaderMap depending on isClosing . Otherwise a new reader will be created and cached.
@SuppressWarnings("squid:S2095") public synchronized TsFileSequenceReader get(String filePath, boolean isClosed) throws IOException { Map<String, TsFileSequenceReader> readerMap = !isClosed ? unclosedFileReaderMap : closedFileReaderMap; if (!readerMap.containsKey(filePath)) { int currentO...
[ "IFileReadAccess getReaderForFile(String fileName) throws IOException;", "private static BufferedReader createBufferedReaderForFile(String filePath) {\n BufferedReader bufferedReader = null;\n try {\n bufferedReader = new BufferedReader(new FileReader(new File(filePath)));\n } catc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes maximum and minimum distances between nodes of structure. These distances are used for scaling objects.
private void computeScalors() { // loop over nodes for (int i = 0; i < structure_.getNumberOfNodes(); i++) { // get base node Node node = structure_.getNode(i); // get base node's position vector DVec pos1 = node.getPosition(); // loop over nodes for (int j = 0; j < structure_.getNumberOfNodes...
[ "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "private void initDist(){\n \tthis.dist = new double[graph.getNumberOfNodes()][graph.getNumberOfNodes()];\n \tthis.next = new Integer[graph.getNumber...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleOption" $ANTLR start "entryRuleLineChart" InternalMyDsl.g:228:1: entryRuleLineChart : ruleLineChart EOF ;
public final void entryRuleLineChart() throws RecognitionException { try { // InternalMyDsl.g:229:1: ( ruleLineChart EOF ) // InternalMyDsl.g:230:1: ruleLineChart EOF { before(grammarAccess.getLineChartRule()); pushFollow(FOLLOW_1); ruleL...
[ "public final EObject entryRuleLineChartType() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleLineChartType = null;\r\n\r\n\r\n try {\r\n // InternalCk2Gfx.g:2364:54: (iv_ruleLineChartType= ruleLineChartType EOF )\r\n // InternalCk2Gfx.g:2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Algorithm Events This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
public void algorithmPerformed(AlgorithmBase algorithm) { if (algorithm instanceof AlgorithmAddMargins) { if ((cropAlgo.isCompleted() == true) && (resultImage != null)) { // in StoreInDest; "new Image" try { new ViewJFrameImage(resultImage, null, new Dim...
[ "public void algorithmPerformed(AlgorithmBase algorithm) {\r\n\r\n m_srcImage.clearMask();\r\n\r\n if ((m_itkFilterAlgo.isCompleted() == true) && (m_resultImage != null)) {\r\n\r\n // The algorithm has completed and produced a new image to be displayed.\r\n if (m_resultImage.isCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fetch count.
public Long getFetchCount() { return this.fetchCount; }
[ "public java.lang.Integer getFetchSize()\r\n {\r\n return this.fetchSize;\r\n }", "public int currentObjectFetchCount() {\n return currentObjectFetchCount;\n }", "int getFetchSize();", "public long getCount() {\n return getCount(new BasicDBObject(), new DBCollectionCountOptions()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows to user all words that have a specific beginning.
public String showSearchBegin(String begin, ArrayList<String> wordWithBegins) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append((wordWithBegins.size() == 1) ? "This is a word that has " : "These are words that have "); stringBuilder.append("the beginning " + begin + "\n")...
[ "public List<Word> getWordsStartingAt(int start);", "public SortedSet<String> wordsStartingWith(String prefix) {\n\t\treturn this.words.subSet(prefix, prefix + Character.MAX_VALUE);\n\t}", "@Override\n public String getGoodWordStartingWith(String prefix) {\n String selected = null;\n //Implemen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
shopping cart and mini cart replaces special character symbols with question marks (?) in DEV and UAT
private void addNameToShoppingCartPgeArrayList(String productName) { productName = productName.replace("?", ""); productName = productName.replace("®", ""); productName = productName.replace("™", ""); listOfShoppingCardItem.add(productName); }
[ "private void cleanupProductText(@NonNull final Product product) {\n String badChars = \"�\";\n String text = product.getProductName();\n if (text != null) {\n text = text.replaceAll(badChars, \" \");\n product.setProductName(text);\n }\n text = product.getSh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RTCTL__Group_2__1__Impl" $ANTLR start "rule__RTCTL__Group_2__2" InternalDsl.g:17714:1: rule__RTCTL__Group_2__2 : rule__RTCTL__Group_2__2__Impl ;
public final void rule__RTCTL__Group_2__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:17718:1: ( rule__RTCTL__Group_2__2__Impl ) // InternalDsl.g:17719:2: rule__RTCTL__Group_2__2__Impl { pushFollow(F...
[ "public final void rule__RTCTL__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:17583:1: ( rule__RTCTL__Group_0__2__Impl )\n // InternalDsl.g:17584:2: rule__RTCTL__Group_0__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Process__Group_0__1" $ANTLR start "rule__Process__Group_0__1__Impl" InternalReflex.g:2945:1: rule__Process__Group_0__1__Impl : ( ( rule__Process__AnnotationsAssignment_0_1 ) ) ;
public final void rule__Process__Group_0__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalReflex.g:2949:1: ( ( ( rule__Process__AnnotationsAssignment_0_1 ) ) ) // InternalReflex.g:2950:1: ( ( rule__Process__AnnotationsAssignm...
[ "public final void rule__Program__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:2598:1: ( ( ( rule__Program__AnnotationsAssignment_0_1 ) ) )\n // InternalReflex.g:2599:1: ( ( rule__Program__Anno...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the orderIndex value for this OutlinkLocalEthernet.
public int getOrderIndex() { return orderIndex; }
[ "public Integer getOrderIndex() {\n\t\treturn orderIndex;\n\t}", "public Integer getOrderIndex() {\n return orderIndex;\n }", "public int getOrderIndex() {\r\n return this.orderIndex;\r\n }", "public int getTxOutIndex() {\n return txOutIndex_;\n }", "public int getTxOutIndex() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns True if the ingredient is dry
public boolean isDry() { return isDry; }
[ "@Override\n\tpublic boolean isIngredient(ItemStack test) {\n\t\treturn true;\n\t}", "public boolean isDryRun() {\n return dryRun;\n }", "public boolean isDryRun();", "public boolean heatPotion() \n\t{\n\t\tint count=0;\n\t\tfor (int i=0; i < ingredients.length(); i++) \n\t\t{\n\t\t\tif (ingredients.charA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This RESTEndpoint is used to delete a specific EventTrigger using it's unique name.
@Transactional @DeleteMapping("/{name}") public ResponseEntity<Void> deleteEventTrigger(@PathVariable String name) { service.deleteEventTrigger(name); return new ResponseEntity<>(HttpStatus.OK); }
[ "public com.google.longrunning.Operation deleteTrigger(\n com.google.cloud.eventarc.v1.DeleteTriggerRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteTriggerMethod(), getCallOptions(), request);\n }", "void deleteEvent(String eventId);", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET THE ALBUM META DATA OF THE SONG
public String getSongAlbum() { return mSongAlbum; }
[ "Metadata.Album getAlbum();", "public String getAlbum() {\n return mSongAlbum;\n }", "com.goldingmedia.goldingcloud.MediaMetaProtos.CTruckMetaExpand getAdsMeta();", "List<MediaItem> getMediaItemsForAlbum(Album album, BizContext context);", "MediaItem getMediaItemWithInfo(Long itemId, BizContext co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal method to stop the ReportSegment timer for the given ReportSegment
private void stopReportSegmentTimer(ReportSegment reportSegment) { if (reportSegment.getRsTimerTask() != null) { reportSegment.getRsTimerTask().cancel(); reportSegment.setRsTimerTask(null); _timer.purge(); } }
[ "public void stop() {timer.stop();}", "private void stopCancelTimer(\n\t\t\tCancelSegment cancelSegment,\n\t\t\tInboundBlock block) {\n\t\tif (cancelSegment != null && block.getCancelTimerTask() != null) {\n\t\t\tblock.getCancelTimerTask().cancel();\n\t\t\t_timer.purge();\n\t\t\tblock.setCancelTimerTask(null);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add resource allowed restriction.
public static void addResourceAllowedRestriction(final DataSource dataSource, final IReservation reservation) { final User user = ContextStore.get().getUser(); dataSource.addParameter(Constants.GROUP_PARAMETER_NAME, "", DataSource.DATA_TYPE_TEXT); final StringBuffer...
[ "public void addRestriction(Restriction newRestriction)\r\n\t{\r\n\t\trestrictions.add(newRestriction);\r\n\t}", "public boolean allowAddAction(ResourceToolAction action, ContentEntity entity);", "Allow createAllow();", "private void setRestrictiveConstraint (int restriction)\r\n\t{\r\n\t\t// Keep the modifie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
extract the max node, meld its children into root list, and update max
public Node extractMax() { // heap is not empty if (maxNode != null) { int maxDegree = maxNode.degree; Node maxRight = null; Node maxLeft = null; // max node has at least one child if (maxNode.child != null) { Node child = maxNode.child; for (int i = 0; i < maxDegree; i++) { child.paren...
[ "public void setChildrenMax(int max) {\n FormField formField = FormField.textSingleBuilder(ConfigureNodeFields.children_max.getFieldName())\n .setValue(max)\n .build();\n write(formField);\n }", "public Node removeMax(){\r\n\r\n if(maxPointer =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mean of a from index start to index end inclusive
public static double meanOfRange(int[] a, int start, int end) { //write this double rmean = 0.0; for (int i = start; i<end; i++) { rmean += a[i]; } rmean /= (end-start); return rmean; }
[ "public static double mean( int start, int end, double[] array ) {\r\n\t\tif( start >= end ) {\r\n\t\t\tthrow new IllegalArgumentException( \"The start index has to be smaller than the end index.\" );\r\n\t\t}\r\n\t\tdouble sum = 0;\r\n\t\tfor( int k = start; k < end; k++ ) {\r\n\t\t\tsum += array[k];\r\n\t\t}\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XThrowExpression__Group__2__Impl" $ANTLR start "rule__XReturnExpression__Group__0" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12810:1: rule__XReturnExpression__Group__0 : rule__XReturnExpression__Group__0__Impl rule__XRet...
public final void rule__XReturnExpression__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12814:1: ( rule__XReturnE...
[ "public final void rule__XReturnExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12826:1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
select the number of ticket from the drop down.
public void selectTicket() { selectDropDown(ObjectRepo.numberOfTicketSelected); }
[ "public int getselectNo() {\n\t\treturn selectNo;\n\t}", "public void selectAccountNo ()\r\n\t{\r\n\t\tWebDriverWait wait = new WebDriverWait (driver, GlobalWaitTime.getIntWaitTime ());\r\n\t\twait.until (ExpectedConditions.elementToBeClickable (orClaimLogPaymentClaimPayment.ddlAccountNoBACS));\r\n\r\n\t\tSelect ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate an EditorInteraction from a FieldList and extra words
public EditorInteraction generateEditor(Tree<String> help, FieldList inFeat,Map<String,List<String>> extras) throws RemoteException;
[ "public EditorInteraction generateEditor(Tree<String> help,\n\t\t\tFieldList inFeat) throws RemoteException;", "protected abstract void createFieldEditors();", "private void addCustomWords() {\r\n\r\n }", "@Test //ExSkip\n public void fieldAutoTextList() throws Exception {\n Document doc = new Do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a value from HTTP Header if exists else continues to verify in Cookie and gives its value if available. If no value found either in HTTP Header or in Cookie, it returns empty.
public String readValueFromHeaderOrCookie(HttpHeaders httpHeaders, String lookupItem) { String resultValue = null; if(null != httpHeaders && StringUtils.isNotBlank(lookupItem)) { if(httpHeaders.getRequestHeaders().containsKey(lookupItem) && StringUtils.isNotBlank(httpHeaders.getRequestHeaders().getFi...
[ "String getFirstCookieValue(String domain, String name);", "private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }", "private static NameValue parseCookieNameValue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the problem number.
public int getProblemNumber() { return problemNumber; }
[ "public String getProblemNumber()\n\t{\n\t\treturn probSection;\n\t}", "public int getProblemId() {\n return problemId;\n }", "public String getProblemId() {\n return this.problemId;\n }", "int getSolutionNr();", "public String getProblem(){\n\t\treturn problem;\n\t}", "public short ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether or not GCM is available.
int isGcmAvailable() { if (mGoogleCloudMessaging_class != null) { return PLAY_SERVICES_AVAILABLE; } return PLAY_SERVICES_UNAVAILABLE; }
[ "private boolean registerGCM() {\n\t\tif (relayMode == RelayMode.GCM) {\n\t\t\tregistrationId = GCMRegistrationUtil.getRegistrationId(context, gcmSenderId);\n\t\t\treturn registrationId != null;\n\t\t} else {\n\t\t\t// don't require a GCM registration id because not necessary\n\t\t\treturn true;\n\t\t}\n\t}", "bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete an existing Reservation entity
@Transactional public void deleteReservation(Reservation reservation) { reservationDAO.remove(reservation); reservationDAO.flush(); }
[ "void delete(int reservationId);", "public void deleteReservation(ReservationsEntity reservation) {\n Session session = null;\n Transaction transaction = null;\n try {\n session = this.sessionFactory.openSession();\n transaction = session.beginTransaction();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
print 5 (integer) as a string data type
public static void main(String[] args) { System.out.println("String: " + Integer.toString(5)); }
[ "public String NumberToString(int number){return \"\"+number;}", "private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }", "public String stringFromInteger(int i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Elimina registros existentes en la Tabla Temporal de Historico de Bloqueo del Sistema Comercial
public void deleteHistoricoBloqueoConsultoraTemporalComercial(String dataSource, Map params) throws Exception;
[ "public void deleteHistoricoBloqueoConsultoraTemporal(Map params) throws Exception;", "private boolean borrarHistorialEmpleadoTienda(int cedula) {\n boolean resultado = false;\n int nra = -1;\n try {\n bitacora.info(\"Iniciando operacion para eliminar historial de \" + cedula);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clones this DoubleLinkedList instance and returns an exact COPY.
public DoubleLinkedList clone() { DoubleLinkedList l = new DoubleLinkedList(); DLNode n = head; while (n != null) { if (n.val != Integer.MIN_VALUE) { l.pushBack(n.val); } else { l.pushBackRecursive(n.list.clone()); } n = n.next; } l.elements = this.elements; return l; }
[ "public DoubleLinkedList clone() {\n\t\tDoubleLinkedList copied = new DoubleLinkedList();\n\t\tDLNode n = head;\n\t\twhile (n != null) {\n\t\t\tif (n.getList() != null) {\n\t\t\t\tcopied.pushBackRecursive(n.getList().clone());\n\t\t\t} else {\n\t\t\t\tcopied.pushBack(n.getVal());\n\t\t\t}\n\t\t\tn = n.getNext();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LIST IMPLEMENTATION FOR LOCALSTORAGE OF QUESTION return list(Question; LocalStorage; query)
public List<Question> listQuestion(String query) throws StorageException { if (query == null || query.compareTo("") == 0) { query = "1"; } List<Question> questionList = new ArrayList<Question>(); String sortOrder = "_ID ASC"; String[] selectionArguments = null; Question question; Cursor cursor = conten...
[ "java.util.List<app.onepass.apis.Question> \n getQuestionsList();", "public ArrayList<String> getQuestionsList() {\n\t\tArrayList<String> questionsList = new ArrayList<String>();\n\t\t\t\t\n\t\tfor (String line : contentsByLine) {\n\t\t\n\t\t\tif (line.endsWith(\"?\")) {\n\t\t\t\tquestionsList.add(line);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the minimum bid amount for this transaction.
public BigDecimal getMinBid() { return minBid; }
[ "public String getMinimumBidAmount() {\n\t\treturn this.minimumBidAmount;\n\t}", "public java.lang.Integer getMinAmount() {\n return minAmount;\n }", "public int getMinAmount() {\n return minAmount;\n }", "java.math.BigDecimal getSingleBetMinimum();", "public BigDecimal getMinimum() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
true if it is valid identifier valid identifer is defined as below: first char is true for Character.isJavaIdentifierStart() remaining char is true for Character.isJavaIdentiferPart() or '.'
private boolean isIdentifier(String identifier) { boolean isFirst = true; for (int i = 0; i < identifier.length(); i++) { char ch = identifier.charAt(i); if (isFirst && Character.isJavaIdentifierStart(ch)) { // first char of key } else if (Character....
[ "private static boolean isValidJavaIdentifier(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n {\r\n return false;\r\n }\r\n char[] c = s.toCharArray();\r\n if (!Character.isJavaIdentifierStart(c[0]))\r\n {\r\n return false;\r\n }\r\n for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Menu to allow changes to some data in a reservation.
private static void changeReservationMenu() throws FileNotFoundException { Reservation reservation = null; String newRoomNumber = ""; Room newRoom = null; // print a blank line followed by menu title System.out.println("= = = = = = = = = = = = = = = = = = = ...
[ "void updateReservation(Reservation reservation);", "public void editMenu() {\n\t\tSystem.out.println(\"\\nEdit Menu: \\n\" + \"----------------\\n\" + \"Press 1 to change task title \\n\"\n\t\t\t\t+ \"Press 2 to change due date \\n\" + \"Press 3 to change status \\n\" + \"Press 4 to remove task \\n\"\n\t\t\t\t+ ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if either any enemy or meteor collides with the player and get damage
private void checkPlayerCollision() { Rectangle rp = player.getRectangle(); for(int i = 0; i < meteors.size(); i++){ Meteor m = meteors.get(i); Rectangle rm = m.getRectangle(); int type = m.type; if(rp.intersects(rm)){ player.health -= 10 * type; } } for(int i = 0; i < enemies....
[ "public void dealDamage(){\n Player player = (Player)getOneIntersectingObject(Player.class);\n if (player!=null){\n player.damage(5);\n hitDamage.play();\n //Attach to player\n setLocation(player.getX(), player.getY()); \n }\n }", "public void ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "xdescelement_2" element
org.apache.xmlbeans.XmlString xgetXdescelement2();
[ "org.apache.xmlbeans.XmlString xgetXdescelement1();", "java.lang.String getXdescelement2();", "org.apache.xmlbeans.XmlString xgetXdescelement3();", "java.lang.String getXdescelement1();", "java.lang.String getXdescelement3();", "void setXdescelement2(java.lang.String xdescelement2);", "public String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the marked as delete of this dm port harbour.
public int getMarkedAsDelete() { return _dmPortHarbour.getMarkedAsDelete(); }
[ "public int getIsDelete() {\n\t\treturn _dmPortHarbour.getIsDelete();\n\t}", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}", "@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGtStatus.getMarkedAsDelete();\n\t}", "public int getIsDelete() {\n\t\treturn _dmHist...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a hidden and a nonhidden PLA.
private void createHiddenAndNonHiddenPLA() { List<String> currencies = new ArrayList<String>(); List<String> locales = new ArrayList<String>(); defaultCatalog = persistersFactory.getCatalogTestPersister().persistCatalog( CATALOG_CODE, CATALOG_NAME, true, DEFAULT_CURRENCY, "EN", currencies, locales, false);...
[ "private void hidePips(){\r\n pip1.setVisible(false);\r\n pip2.setVisible(false);\r\n pip3.setVisible(false);\r\n pip4.setVisible(false);\r\n pip5.setVisible(false);\r\n pip6.setVisible(false);\r\n pip7.setVisible(false);\r\n }", "public static void PLA() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We will use the SHA256 digest of a package name if it is more than 32 bytes long.
private String getPackageNameNormalized(String packageName) { if (packageName.length() <= 32) { return packageName; } try { MessageDigest messageDigest = MessageDigest.getInstance("SHA-256"); byte[] hashBytes = messageDigest.digest(packageName.getBytes(Standa...
[ "public void generateHashkey() {\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n PACKAGE,\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInsta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initiate System.out.println("Dynamic id from Jaavscript is "+ getComboBoxId("ccExpireMonth", driver)); String query = "Ext.ComponentQuery.query(\"combobox[name='ccExpireMonth']\");"; System.out.println("Dynamic id from Jaavscript is "+ getComboBoxId("ccExpireMonth", driver));
@Test public void EJCS2() { String strjquery = "combobox[name='ccExpireMonth']"; SelectComboBoxValuefromExtJS(strjquery, "July", driver); }
[ "private void PopulateComboPublisher() {\n String comboBoxQuery = \"SELECT Publisher_Name FROM publishers\";\n ResultSet rs;\n PreparedStatement statement;\n try {\n Connection con = Coagent.getConnection();\n statement = con.prepareStatement(comboBoxQue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleVarBlockDef" $ANTLR start "entryRuleVarSingleDef" InternalDsl.g:8407:1: entryRuleVarSingleDef returns [EObject current=null] : iv_ruleVarSingleDef= ruleVarSingleDef EOF ;
public final EObject entryRuleVarSingleDef() throws RecognitionException { EObject current = null; EObject iv_ruleVarSingleDef = null; try { // InternalDsl.g:8407:53: (iv_ruleVarSingleDef= ruleVarSingleDef EOF ) // InternalDsl.g:8408:2: iv_ruleVarSingleDef= ruleVarSing...
[ "public final void entryRuleVarSingleDef() throws RecognitionException {\n try {\n // InternalDsl.g:2605:1: ( ruleVarSingleDef EOF )\n // InternalDsl.g:2606:1: ruleVarSingleDef EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getVarSing...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setMousePressedInCloseButton method, of class org.netbeans.swing.tabcontrol.plaf.TabState.
public void testSetMousePressedInCloseButton() { System.out.println("testSetMousePressedInCloseButton"); }
[ "public void testSetCloseButtonContainsMouse() {\n System.out.println(\"testSetCloseButtonContainsMouse\");\n \n }", "public boolean isSelected_click_Popup_Close_Button(){\r\n\t\tif(click_Popup_Close_Button.isSelected()) { return true; } else { return false;} \r\n\t}", "boolean canTabClose(Tab ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build call for getTenDLCSmsCampaigns
public okhttp3.Call getTenDLCSmsCampaignsCall(String brandId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ ...
[ "public CampaignsResultMethod getCampaignList(){\r\n\r\n CampaignsMethod campaignsMethod = new CampaignsMethod();\r\n campaignsMethod.apikey = this.apiKey;\r\n CampaignsResultMethod campaignsResultMethod = new CampaignsResultMethod();\r\n\r\n try{\r\n campaignsResultMethod = m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do allow older release targetSdkVersion on prerelease platform. APP: Released API 10 DEV: Prerelease API 20
@Test public void testComputeTargetSdkVersion_preReleasePlatform() { verifyComputeTargetSdkVersion(OLDER_VERSION, RELEASED, false, OLDER_VERSION); // Do allow same release targetSdkVersion on pre-release platform. // APP: Released API 20 // DEV: Pre-release API 20 verifyComp...
[ "@Test\n public void testComputeTargetSdkVersion_releasedPlatform() {\n verifyComputeTargetSdkVersion(OLDER_VERSION, RELEASED, true, OLDER_VERSION);\n\n // Do allow same release targetSdkVersion on released platform.\n // APP: Released API 20\n // DEV: Released API 20\n verifyC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column pms_commodity.commodity_gs1_code
public String getCommodityGs1Code() { return commodityGs1Code; }
[ "public void setCommodityGs1Code(String commodityGs1Code) {\n this.commodityGs1Code = commodityGs1Code == null ? null : commodityGs1Code.trim();\n }", "public String getCommodityCode() {\n return commodityCode;\n }", "public String getCode1() {\n return code1;\n }", "public BigDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new genre with the given name.
public Genre(String name) { this.name = name; }
[ "void create(Genre genre);", "public void createNewGenre(String genreName) throws SQLException, InvalidGenreDataException {\n\t\tGenre genre = new Genre(genreName);\n\t\t//Add genre to DB\n\t\tdao.saveGenre(genre);\n\t}", "public void setGenreName( String genreName )\n {\n this.genreName = genreName;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Contract__Group__13__Impl" $ANTLR start "rule__Contract__Group__14" InternalSymboleoide.g:3289:1: rule__Contract__Group__14 : rule__Contract__Group__14__Impl ;
public final void rule__Contract__Group__14() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:3293:1: ( rule__Contract__Group__14__Impl ) // InternalSymboleoide.g:3294:2: rule__Contract__Group__14__Impl { ...
[ "public final void rule__Contract__Group__13() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:3266:1: ( rule__Contract__Group__13__Impl rule__Contract__Group__14 )\n // InternalSymboleoide.g:3267:2: rule__Cont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. The SparseList instance has an initial capacity of 110% the size of the specified collection.
public SparseArrayList(Collection<T> c) { super (c); }
[ "public SparseArrayList()\n {\n super();\n }", "public CompositeCollection(int capacity)\r\n { \r\n Initialize(new ArrayList(capacity));\r\n }", "abstract protected Object newList( int capacity );", "private CSAskCollectionList() {}", "public SimpleList(int capacity) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Business layer interface for EntityExerciseModel entity.
public interface ExerCategoryModel extends Serializable { /** * Returns the unique ID field for this permission model. * @return id */ public Integer getId(); /** * Returns the exercisename * @return exercisename */ String getExerciseName(); /** * Sets the exercise name * @param exercisename ...
[ "void UpdateExerciseDetail(Exercise exercise);", "ExercisePo getExerciseById(Long id);", "ExerciseDTO convertToExerciseDTO(Exercise exercise);", "public interface ElectricrequirementService {\n\n /**\n * Save a electricrequirement.\n *\n * @param electricrequirementDTO the entity to save\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the browser version.
public String getBrowserVersion() { return browserVersion; }
[ "public static String getCurrentBrowserVersion() {\r\n\t\tCapabilities c = ((RemoteWebDriver) driver).getCapabilities();\r\n\t\treturn c.getVersion();\r\n\t}", "public double getBrowserVersion() {\n return FxJsfUtils.getRequest().getBrowserVersion();\n }", "public String getBrowser() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setConsole method, of class MainWindow1.
@Test public void testSetConsole() { System.out.println("setConsole"); String text = ""; MainWindow1 instance = new MainWindow1(); instance.setConsole(text); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype...
[ "abstract void initiateConsole();", "private void openConsole(){\n\t\t\n\t}", "void configureConsole();", "public void setConsole(TextArea newConsole) {\n console = newConsole;\n }", "public static void activateConsole() {\n\t\tactivateConsole(false);\n\t}", "public void setConsole(Console conso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the timeline with my places points.
public final void updateTimeline() { Kml placesKml = myModel.getMyPlaces(); Feature feature = placesKml.getFeature(); if (feature instanceof Document) { Document doc = (Document)feature; List<Placemark> timedPoints = New.list(); getTime...
[ "private void addPointsToTimeline(List<Placemark> points)\r\n {\r\n List<TimelineDatum> timelinePoints = New.list();\r\n long id = 0;\r\n for (Placemark mark : points)\r\n {\r\n TimelineDatum datum = new StyledTimelineDatum(id,\r\n KMLSpatialTemporalUtils...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position. Note: Calling the method relative(1) is identical to ca...
@Override public boolean relative(int row) { ensureOpen("relative"); return absolute(getRow() + row); }
[ "public boolean relative( int rows ) throws SQLException\n {\n return m_rs.relative(rows);\n }", "@Override\n public boolean absolute(int row) {\n ensureOpen(\"absolute\");\n if ((row < 1) || (row > rs.size())) {\n waitTillProcessingDone();\n if (row < 0) {\n row = rs.size() + row...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the namespace URI
int getNamespaceUri();
[ "public String getServerUri(String namespace);", "String getNamespaceURI(String nsPrefix);", "public String getNamespaceUri()\r\n {\r\n return m_strNamespaceUri;\r\n }", "public java.lang.String getNameSpaceURI()\n {\n return nsURI;\n }", "public java.lang.String getNameSpaceURI()\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls createSockets() in preparation to sending a Package command; Sends out the package using the ObjectOutputStream variable; The method waits for the result String which it received using the ObjectInputStream variable; The socket connection is closed and the result is being returned. In the event the procedure fail...
public synchronized String answerInvite(Package packageT) { createSocket(); try{ out.writeObject(packageT); String result = (String) in.readObject(); socket.close(); return result; } catch (Exception e) { e.printStackTrace(); ...
[ "public synchronized String addPeople(Package packageT) throws Exception {\n\n createSocket();\n try {\n out.writeObject(packageT); //sending\n String result = (String) in.readObject(); //receive\n System.out.println(result + \"is the result of adding people\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns pisano period of m
private static long pisano(long m) { long temp; long first = 0; long second = 1; long count = 0; // initial length of the pisano period while (true) { temp = first; first = second; second = (second + temp) % m; count++; ...
[ "long getPeriod();", "public int getHowManyInPeriod();", "protected long getPeriod()\n {\n return 0;\n }", "public int getPeriod() {\r\n return period;\r\n }", "public long getTotMntPeriodo()\r\n {\r\n synchronized (monitor())\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This save method will save the provided pizza
void save(Pizza pizza);
[ "@Override\n\tpublic void saveNewPizza(Pizza pizza) throws SavePizzaException {\n\t\tif(!this.pizzaExists(pizza.getCode())){\n\t\t\tthis.pizzaList.add(pizza);\n\t\t} else {\n\t\t\tthrow new SavePizzaException(\"There is already a pizza with this code\");\n\t\t}\n\t}", "@Override\n public void create(Pizza pizz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge the messages in List messages.
public List<L> combine(List<L> messages);
[ "private List<MessageText> convertMessagesList(List<Message> chatMessages) {\n\t\tList<MessageText> result = new ArrayList<MessageText>(\n\t\t\t\tchatMessages.size());\n\t\tString remoteName = mContact.getNickName();\n\t\tString localName = getString(R.string.chat_self);\n\t\tMessageText lastMessage = null;\n\t\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Initializing driver /Login to Load Pay as Broker
@Test(dataProvider = "getBrokerLoginData") public void loginBroker(String un, String pwd) throws InterruptedException, IOException, AWTException { if (super.getProperties().getProperty("useDynamicBrokerData").contains("true")) { brokerUsername = BrokerRegisterTest.brokerUsername; brokerPassword = BrokerR...
[ "@Override\n\tpublic void init() {\n\t\tif(usingLoginCredentials){\n\t\t\t// create connection factory\n\t\t\tconnectionFactory = new ActiveMQConnectionFactory(this.username, this.password, this.brokerUrl);\n\t\t\tconnectionFactory.setUseAsyncSend(true);\n\n\n\t\t} else{// connect with no login credintials\n\t\t\t/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the enumPfStatuses.
Page<EnumPfStatusDTO> findAll(Pageable pageable);
[ "public static List<RecordStatusEnum> getAllEnums() {\n return enumList;\n }", "public List<SelectItem> getStatusList() {\n\t\treturn getEnums(StatusEnum.class);\n\t}", "public ArrayList<String> getAllStatus() {\n ArrayList<String> allStatus = new ArrayList<>();\n allStatus.add(String.va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind button click listners
protected void bindButtons() { Button goButton = (Button) findViewById(R.id.go_button); goButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { launchCamera(); } }); }
[ "private void bindHandlers() {\n\t\t//Asociamos a cada botón con su respectivo handler del controlador\n\t\tgrid.getAddButton().addSelectionListener(new SelectionListener<ButtonEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void componentSelected(ButtonEvent ce) {\n\t\t\t\tonAddClicked();\n\t\t\t}\n\t\t});\n\n\t\tgrid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface fuer einen StorageProvider von Remindern.
public interface ReminderStorageProvider { /** * Liefert den Reminder zur angegebenen UUID. * @param uuid die UUID des Reminders. * @return der Reminder oder NULL, wenn er nicht existiert. * @throws Exception */ public Reminder get(String uuid) throws Exception; /** * Aktualisiert einen vorha...
[ "@Override public IEmailStorageProvider getStorageProvider()\r\n {\r\n return m_espStorage;\r\n }", "public interface StorageProvider {\n\n /**\n * Create a new user with the given name. The user initially has no\n * properties or credentials assigned.\n * \n * @see UserAdmin#creat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retourne le nom de la ville
public String getNom() { return nomVille; }
[ "String getVille();", "public String getNom() {\n\t\treturn \"J\"+numeroJoueur;\n\t}", "String getVornameWeiblich();", "public void setVille(String ville) {\r\n this.ville = ville;\r\n }", "public String getLastEnteredNom()\n\t{\n\t\treturn chauffeurNom;\n\t}", "String getUltimoNome();", "Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of holiday dates with the given year
private List getHolidayDates(List source, int year) { List holidays = new ArrayList(); Calendar holidayCalendar = Calendar.getInstance(); for (Iterator it = source.iterator(); it.hasNext();) { Date holidayDate = (Date) it.next(); holidayCalendar.setTimeInMillis(holidayDate.getTi...
[ "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create snackbar with ability to undo bug deletion.
private void showUndoSnackbar(final Bug bug, final int position) { // get root view for activity hosting bug list fragment View view = mActivity.findViewById(android.R.id.content); // build message stating which bug was deleted String bugDeletedText = mActivity.getString(R.string.bug_d...
[ "private void createSnackBar(AdditionalExercise exercise, TapToUndoItem item) {\n Snackbar.with(getActivity())\n .text(getSnackBarText(exercise))\n .actionLabel(getString(R.string.undo))\n .actionListener(getActionListener(item))\n .eventListener(ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Returns all information relating to active job
public Job getActiveJob(){ return activeJob; }
[ "public String getJobInfo() {\n return jobInfo;\n }", "java.lang.String getJob();", "JobflowInfo getInfo();", "public String[] getAllJobs();", "public String getJob() {\r\n return job;\r\n }", "private JSONArray getVerboseAllJobInfo() {\n JSONArray statusAll = new JSONArray();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string script_disasm = 4;
com.google.protobuf.ByteString getScriptDisasmBytes();
[ "String getScriptDisasm();", "private void extractAssemblercode() {\n\n\t\tfor(int i = 0; i < sourceLine.size(); i++) {\n\n\t\t\tif(!(sourceLine.get(i).charAt(0) == ' ')) {\n\n\t\t\t\tString dst = sourceLine.get(i).substring(5, 9);\n\t\t\t\t// System.out.println(dst);\n\t\t\t\tInteger befehl = (int) Integer.parse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method getNegotiationTransactionType returns the transaction type of the negotiation transmission
NegotiationTransactionType getNegotiationTransactionType();
[ "void setNegotiationTransactionType(NegotiationTransactionType negotiationTransactionType);", "NegotiationTransmissionType getTransmissionType();", "NegotiationType getNegotiationType();", "public String getTransactionType() {\n return transactionType;\n }", "public String getTransactionType() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'var93' field has been set.
public boolean hasVar93() { return fieldSetFlags()[94]; }
[ "public boolean hasVar139() {\n return fieldSetFlags()[140];\n }", "public boolean hasVar133() {\n return fieldSetFlags()[134];\n }", "public boolean hasVar130() {\n return fieldSetFlags()[131];\n }", "public boolean hasVar91() {\n return fieldSetFlags()[92];\n }", "public bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the itOrderFulfillmentTime property.
public int getItOrderFulfillmentTime() { return itOrderFulfillmentTime; }
[ "public void setItOrderFulfillmentTime(int value) {\n this.itOrderFulfillmentTime = value;\n }", "public Date getOrderTime() {\r\n return orderTime;\r\n }", "public Long getDeliveryTime() {\r\n\t\treturn deliveryTime;\r\n\t}", "public String getOrdertime() {\n return ordertime;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Index Name Reference'.
IndexNameReference createIndexNameReference();
[ "public String getIndexName();", "public abstract TIndexDefinition createIndexDefinition();", "public String getName()\r\n {\r\n return indexName;\r\n }", "public T buildIndex() {\n IndexInfo info = new IndexInfo(name, description, options);\n parent.indexInfos.add(info);\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleDirectSupportedTypes" $ANTLR start "ruleDirectSupportedTypes" ../com.idobjects.dsl.ui/srcgen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:434:1: ruleDirectSupportedTypes : ( 'String' ) ;
public final void ruleDirectSupportedTypes() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:438:2: ( ( 'String' ) ) // ../com.idobject...
[ "public final void entryRuleDirectSupportedTypes() throws RecognitionException {\n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:426:1: ( ruleDirectSupportedTypes EOF )\n // ../com.idobjects.dsl.ui/src-gen/com/idobjec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int64 elapsedMillis = 3;
long getElapsedMillis();
[ "int getMilliSeconds();", "long getTimeInMilliSeconds();", "long getTimeMillis();", "int getNanoseconds();", "int getMilliseconds();", "public int elapsedMillis() {\n return Js.coerceToInt(currentTimeMillis() - start);\n }", "public long TotalMilliseconds() { return ticks; }", "long getTimeoutGuid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove last GUI screen from guiList.
@Deprecated public void removeGui() { //TODO gui dispose if(guiList.size == 0) return; stage.getActors().removeValue(stage.getActors().peek(), false); stage.getActors().peek().setTouchable(Touchable.enabled); if(guiList.peek() instanceof IMouse) InputHandler.deleteIMouse((IMouse)guiList.peek()); ...
[ "void removeCurrentScreen();", "public void removeGUIObject(UIElement guiObject) {\n removeGUIObject(guiObject.getID());\n }", "public void refreshGUIObjectList() {\n GUIObjects.entrySet().removeIf(Objects::isNull);\n }", "public void clearGUIObjects() {\n GUIObjects.clear();\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the faction with the specified name. If any faction has this name, it will return null.
public static Faction getFaction(String name) { return EventHandlerFaction.getFaction(name); }
[ "public Faction getFactionByName(String name) {\r\n Faction faction = null;\r\n for (Faction factions : allFactions) {\r\n if (factions.getName().equals(name)) {\r\n faction = factions;\r\n }\r\n }\r\n return faction;\r\n }", "public Facility get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove old logo image if user upload new logo
public void saveLogoImage() { if ((this.oldLogoImage != null) && ((this.curLogoImage == null) || !this.oldLogoImage.getUuid().equals(this.curLogoImage.getUuid()))) { try { imageService.deleteImage(this.oldLogoImage); } catch (Exception ex) { log.error("Failed to remove old icon image: '{0}'", ex, th...
[ "private void checkLogoClient(){\n // check directory\n String storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES).getAbsolutePath();\n File file = new File(storageDir, Constants.FILENAME_LOGO);\n if(!file.exists()){\n /**\n * change logo to d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses the generic signature of a constructor and creates the data structure representing the signature.
public void parseForConstructor(GenericDeclaration genericDecl, String signature, Class<?>[] rawExceptionTypes) { setInput(genericDecl, signature); if (!eof) { parseMethodTypeSignature(rawExceptionTypes); } else { Constructor c = (Constructor) genericDecl; ...
[ "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:01:25.747 -0500\", hash_original_method = \"0C9CA8BB038974E4A40BF19F7EB72426\", hash_generated_method = \"40F90509E67B2A9E8DF42F5E3890F864\")\n \npublic void parseForConstructor(GenericDeclaration genericDecl,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ontology term to CharacteristicValueObject
private Set<CharacteristicValueObject> ontology2CharacteristicValueObject( Collection<OntologyTerm> ontologyTerms ) { Set<CharacteristicValueObject> characteristicsVO = new HashSet<CharacteristicValueObject>(); for ( OntologyTerm ontologyTerm : ontologyTerms ) { CharacteristicValueObject p...
[ "String value(Term term);", "public VocabCharacteristic characteristicValueObject2Characteristic(\n CharacteristicValueObject characteristicValueObject ) {\n if ( this.ontologies.isEmpty() ) {\n resetOntologies();\n }\n VocabCharacteristic characteristic = VocabCharacter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the attribute types for the systemmetadata table as an int array
protected int[] getSysMetaAttrTypes() { int[] types = new int[] { java.sql.Types.LONGVARCHAR, //text java.sql.Types.VARCHAR, //character varying(256) java.sql.Types.TIMESTAMP, //timestamp without time zone java.sql.Types.VARCHAR, //characte...
[ "public int[] getDatatypes(){\n\t\tint[] types = new int[datatypes.size()];\n\t\tfor(int i = 0; i < datatypes.size(); i++){\n\t\t\ttypes[i] = datatypes.get(0).intValue();\n\t\t}\n\t\treturn types;\n\t}", "public int[] typesVariable() {\r\n int[] types = new int[this.nInputs];\r\n for (int i = 0; i <...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reads a string from the input file, translates the string, then outputs the new string to the respective output file.
@Override public String translateText(String fileName) { String outputFile = "outVulcan.txt"; try { java.io.File iFile = new java.io.File(fileName); // Reads the line in the file Scanner input = new Scanner(iFile); String line = input.nextLine(); ...
[ "@Override\n\tpublic void translate() throws FileNotFoundException {\n\t\t// Create object and store the filename to use\n\t\tTranslator t = new Translator(fileName, sentence);\n\t\tt.readCorpus();\n\t\tSystem.out.println(t.translate());\n\n\t}", "private static void fileMorseToString() {\n Scanner input =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the papers as a String in a viewable format.
public String outputPapers(){ String outputString = ""; for (int i=0; i < paperCollection.size(); i++){ outputString += paperCollection.get(i).getPaper(); if (i != paperCollection.size() - 1){ outputStri...
[ "public String getAllPapers(){\r\n\t\tString allPapers = \"\";\r\n\t\tif(papers != null){\r\n\t\t\tfor(int index = 0; index < papers.size(); ++index){\r\n\t\t\t\tallPapers += papers.get(index).getTitleOfPaper() + \"\\n\\t\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tallPapers = \"No papers have been added.\";\r\n\t\t}\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all Annotation vertices that are present on the previous line in the code
public List<AnnotationVertex> getAnnotations() { return previousLineAnnotations.get(); }
[ "public List<AnnotationVertex> getAllAnnotations() {\n final List<AnnotationVertex> annotations = new ArrayList<>();\n annotations.addAll(getAnnotations());\n getParentMethod().ifPresent(m -> annotations.addAll(m.getAnnotations()));\n getParentClass().ifPresent(c -> annotations.addAll(c....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process an individual report file
private boolean processedReportFile( File reportFile) { boolean success = false; String pathname = reportFile.getAbsolutePath(); String filename = reportFile.getName(); String type = reportType(filename); if (type.startsWith(UNDEFINED)) writeToLogFile("File " + pathname + " is not a e...
[ "public abstract void parseReport();", "public void parse(String fileName)throws Exception\r\n \t{\r\n \t\tIdentifiedSurgicalPathologyReport report = null;\r\n \t\tStringTokenizer st = null;\r\n \t\tString token = null;\r\n \t\tMap reportMap=null;\r\n \t\tSet participantList=null;\r\n \t\tString reportText=null;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the course capacity.
public int getCourseCapacity() { return courseCapacity; }
[ "com.cantor.drop.aggregator.model.CFTrade.Capacity getCapacity();", "public int getCapacity() {\n\t\treturn mCapcity;\n\t}", "public int getCapacity() {\n\n\t\treturn this.capacity;\n\t}", "public int getCargoCapacity() { // get the cargo capacity\n\t\treturn cargoCapacity;\n\t}", "public java.lang.Integer ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter strings for "cgraph" phrase.
private void filterStrings(String[] arr) { for (String s : arr) { if (s.contains("cgraph")) { fileList.add(s); } } }
[ "public static String filter(String s) {\n\t\ts = s.trim();\n\t\tString[] words= s.split(\" \");\n\t\tList<String> l = Arrays\n\t\t\t\t.asList(words)\n\t\t\t\t.stream()\n\t\t\t\t.filter(word->!curseWords.contains(word))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn String.join(\" \", l);\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turns the body into a Map of key String and element Object.
public Map<String, Object> getBodyAsMap() { return body.getAsMap(); }
[ "public Map<String, Object> map() {\n if (!isValidJson()) {\n return new HashMap<>();\n }\n\n try {\n return fromJson(rawString);\n } catch(Exception e) {\n LOG.error(\"Failed to deserialize the body JSON string to key-value map. raw_string=\" + rawString...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do NOT modify this function This function linearly interpolates the value g0 and g1 given the factor (t) the result is returned. It is used for the trilinearly interpolation the values
private float interpolate(float g0, float g1, float factor) { float result = (1 - factor) * g0 + factor * g1; return result; }
[ "public double interpolate(double x1, double x2);", "private float interpolate(float a, float b, float t) {\n return a + (b - a) * t;\n }", "private void interpolate(VoxelGradient g0, VoxelGradient g1, float factor, VoxelGradient result) {\r\n result.x = (g0.x * (1 - factor)) + (g1.x * factor);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AttributeDefinition__Group__3__Impl" $ANTLR start "rule__AttributeDefinition__Group__4" InternalBasicAttributes.g:791:1: rule__AttributeDefinition__Group__4 : rule__AttributeDefinition__Group__4__Impl rule__AttributeDefinition__Group__5 ;
public final void rule__AttributeDefinition__Group__4() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBasicAttributes.g:795:1: ( rule__AttributeDefinition__Group__4__Impl rule__AttributeDefinition__Group__5 ) // InternalBasicAttribut...
[ "public final void rule__AttributeDefinition__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:807:1: ( ( ( rule__AttributeDefinition__Group_4__0 )? ) )\n // InternalBasicAttributes.g:808:1:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Message Frequency' attribute. If the meaning of the 'Message Frequency' attribute isn't clear, there really should be more of a description here...
long getMessageFrequency();
[ "java.lang.String getFrequency();", "public java.lang.Integer getFrequency() {\n return frequency;\n }", "public int getFreq() {\r\n return frequency;\r\n }", "int getFrequency();", "double getFrequency();", "public int getFrequencyFactor() {\n return f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the index of the sprite in an array that overlaps with the individual Sprite passed in.
int indexOfSpriteThatCollided(Array<? extends Sprite> sprites, Sprite sprite);
[ "private static int findIndex(Object of, Object[] arr) {\n int menuLength = arr.length;\n\n for (int i = 0; i < menuLength; i++) {\n if (of == arr[i]) {\n return i;\n }\n }\n\n return -1;\n }", "public static int unitInSpot(Unit[] queue, int x, i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the TreeGSGP train RMSE
public double getTrainRMSE(double [][] data, double [] target, double trainPercentage){ return trainRMSE; }
[ "static double fitnessTrain(Tree t){\n\t\treturn t.getTrainRMSE(null,null,0);\n\t}", "public double getTestRMSE(double [][] data, double [] target, double trainPercentage){\n\t\treturn testRMSE;\n\t}", "static double fitnessTest(Tree t){\n\t\treturn t.getTestRMSE(null,null,0);\n\t}", "public double[] getConfi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }