query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
/ added so we can add a special id at the top level for the "mark_address" for dmitriy | public String getBodyClassId() {
return "spotmouth_default_id";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addNewID(AddressDetails address) {\n address.setMessageID(newID());\n }",
"public void setAddress(String address) { this.address = address; }",
"@Override\n\tpublic List<Studentbean2> Addaddress(List<AddressBean> findAllAddress) {\n\t\tfor(AddressBean a:findAllAddress)\n\t\t\tfor(Studentb... | [
"0.6128928",
"0.5773172",
"0.5770471",
"0.57497853",
"0.5746515",
"0.5627575",
"0.56234145",
"0.5598163",
"0.559112",
"0.5572826",
"0.55686736",
"0.5557232",
"0.5542288",
"0.55375934",
"0.55332357",
"0.55244744",
"0.5517739",
"0.5483578",
"0.54812664",
"0.5478912",
"0.5478912... | 0.0 | -1 |
do nothing but override | public void addedToDom() {
activateTab();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}"... | [
"0.7355132",
"0.7285345",
"0.7242531",
"0.7229735",
"0.71686447",
"0.716388",
"0.71557957",
"0.7117079",
"0.7117079",
"0.70831317",
"0.7060123",
"0.7043038",
"0.7027902",
"0.6985686",
"0.6979337",
"0.6946172",
"0.6916933",
"0.6907796",
"0.6876875",
"0.6867335",
"0.6863918",
... | 0.0 | -1 |
lbl2.setText("you selected: " + event.getValue()); lbl1.setText(""); | public void onValueChange(ValueChangeEvent event) {
rating.setReadOnly(true);
getMessagePanel().clear();
saveVote(voteForId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void labelEdit2MouseClicked(MouseEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n myFirstLabel.setText(\"You just clicked a button!\");\n }",
"@Override\r\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tint a=c1.getSelectedIndex(... | [
"0.70287406",
"0.66837406",
"0.66350245",
"0.65894216",
"0.6580198",
"0.65541816",
"0.6498749",
"0.64980155",
"0.6496659",
"0.64734703",
"0.6416056",
"0.6395283",
"0.6358075",
"0.6337422",
"0.6332333",
"0.63142174",
"0.63076556",
"0.6302549",
"0.6290413",
"0.62442106",
"0.623... | 0.0 | -1 |
we need to be logged in to vote | protected void saveVote(Long voteForId) {
if (mywebapp.getAuthenticatedUser() == null) {
getMessagePanel().displayMessage("Please login before voting.");
return;
}
ContestRequest contestRequest = new ContestRequest();
GWT.log("authToken=" + mywebapp.getAuthToken());
contestRequest.setAuthToken(mywebapp.getAuthToken());
//we don't init the check boxes when it's location only
for (Long contestId : ratingMap.keySet()) {
Rating rating = ratingMap.get(contestId);
//only register if there was a vote
Integer val = rating.getValue();
if (val > 0) {
ContestEntryHolder ceh = new ContestEntryHolder();
ceh.setContestId(contestId);
ceh.setRating(val);
ceh.setVoteForId(voteForId);
contestRequest.getContestEntryHolders().add(ceh);
}
}
ApiServiceAsync myService = mywebapp.getApiServiceAsync();
myService.vote(contestRequest, new AsyncCallback() {
public void onFailure(Throwable caught) {
//postDialog.hide();
getMessagePanel().displayError(caught.getMessage());
}
public void onSuccess(Object result) {
MobileResponse mobileResponse = (MobileResponse) result;
if (mobileResponse.getStatus() == 1) {
getMessagePanel().displayMessage("Thanks for voting");
} else {
//postDialog.hide();
getMessagePanel().displayErrors(mobileResponse.getErrorMessages());
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void doVote() {\n }",
"public static void doVoteAndComment() {\n }",
"private void loggedInUser() {\n\t\t\n\t}",
"private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }",
"public synchroni... | [
"0.69467866",
"0.642985",
"0.641622",
"0.62646985",
"0.61441207",
"0.61340034",
"0.61124635",
"0.5989791",
"0.58878416",
"0.58773994",
"0.5874826",
"0.5857361",
"0.58415294",
"0.5759949",
"0.5735374",
"0.57264066",
"0.5714496",
"0.5712484",
"0.5709636",
"0.5673171",
"0.563549... | 0.5705926 | 19 |
need to set the hidden send variable to true sendHidden.setValue("true"); uploadMediaFiles(); formPanel.submit(); | public void onClick(ClickEvent event) {
getItemHolder().setSend(true);
saveHandler.onClick(event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showUpload(){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(... | [
"0.59570396",
"0.58884114",
"0.5788498",
"0.5780577",
"0.5772449",
"0.57723516",
"0.56933165",
"0.5683217",
"0.56283957",
"0.5615343",
"0.5613463",
"0.55768126",
"0.5493653",
"0.5471667",
"0.5465413",
"0.5435596",
"0.5411485",
"0.53932655",
"0.5391923",
"0.53865325",
"0.53684... | 0.0 | -1 |
text is the anchor text, and token is the href | protected void addImageIcon(String text, String token, ImageResource bigImage, ImageResource mobileImage, FlowPanel flowPanel, String tooltip) {
if (MyWebApp.isSmallFormat()) {
Image image = new Image(mobileImage);
addImageIcon(token, text, image, flowPanel, tooltip);
} else {
Image image = new Image(bigImage);
addImageIcon(token, text, image, flowPanel, tooltip);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Text href() {\n\t\tText href = text();\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn href;\r\n\t}",
"public abstract String linkText();",
"private void addHyperlinkToken(int start, int end, int tokenType) {\n\t\tint so = start + offsetShift;\n\t\taddToken(zzBuffer, start,end, toke... | [
"0.6687694",
"0.6345262",
"0.62863106",
"0.62863106",
"0.61882496",
"0.60733515",
"0.60464114",
"0.598636",
"0.5841459",
"0.576989",
"0.5748046",
"0.57344717",
"0.5728003",
"0.570851",
"0.5697042",
"0.5677886",
"0.56635237",
"0.5661931",
"0.5580637",
"0.5568872",
"0.5538564",... | 0.0 | -1 |
mywebapp.log("checkRequired message=" + message); | protected void checkRequired(TextBoxBase textBox, String message) {
if (textBox == null) return;
if (textBox.getValue() == null || textBox.getValue().length() == 0) {
getMessagePanel().displayError(message);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void logSevere(String pMessage)\n{\n\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, pMessage);\n\n}",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"void log(Message message);",
"public void getMessage() {\n\r\n\t}",
"public void error(Object me... | [
"0.58472776",
"0.5749218",
"0.5740663",
"0.5639807",
"0.5581124",
"0.55147886",
"0.5500994",
"0.5492412",
"0.54920536",
"0.54868114",
"0.54831606",
"0.54804087",
"0.5478861",
"0.54711425",
"0.54615515",
"0.54615515",
"0.54615515",
"0.5438442",
"0.5425292",
"0.5423176",
"0.541... | 0.0 | -1 |
need to change the URL so we can go back to search form | public void performSearch() {
History.newItem(MyWebApp.SEARCH_RESULTS);
getMessagePanel().clear();
if (keywordsTextBox.getValue().isEmpty()) {
getMessagePanel().displayMessage("Search term is required.");
return;
}
mywebapp.getResultsPanel().resetSearchParameters();
//keyword search does not restrict to spots
mywebapp.addCurrentLocation();
if (markFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());
}
if (contestFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());
}
if (geoFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());
}
if (plateFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());
}
if (spotFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());
}
String color = getValue(colorsListBox);
mywebapp.getResultsPanel().getSearchParameters().setColor(color);
String manufacturer = getValue(manufacturersListBox);
if (manufacturer != null) {
Long id = new Long(manufacturer);
mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);
}
String vehicleType = getValue(vehicleTypeListBox);
mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);
// for (TagHolder tagHolder : tagHolders) {
// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);
// }
mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());
mywebapp.getMessagePanel().clear();
mywebapp.getResultsPanel().performSearch();
mywebapp.getTopMenuPanel().setTitleBar("Search");
//mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSearchUrl();",
"private String getSearchUrl(String url ){\n String params = searchEditText.getText().toString();\n params = params.replace(\" \",\"+\");\n url += params + \"&filter=ebooks&prettyPrint=false\";\n return url;\n }",
"private void doSearchRedirect(Htt... | [
"0.66660035",
"0.66557544",
"0.64468914",
"0.6361724",
"0.6314853",
"0.6314677",
"0.6297045",
"0.6264075",
"0.6221517",
"0.6180256",
"0.6157509",
"0.60405284",
"0.6003897",
"0.5972202",
"0.5952076",
"0.59069645",
"0.5875507",
"0.58436537",
"0.5837242",
"0.5828487",
"0.5812031... | 0.5711647 | 29 |
IQuoteService.Util.getInstance().getQuote(req, new TagSuggestCallback(req, callback)); TagSuggestCallback tagSuggestCallback = new TagSuggestCallback(req, callback); | public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {
fetchPostalCodes(req, callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mo20159a(SuggestBuyItem suggestBuyItem);",
"private void onPreRequestData(int tag) {\n }",
"public void getTagCommand() {\n\n }",
"public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchTags(req, callback);\n }",
"am... | [
"0.60294473",
"0.58807915",
"0.570991",
"0.57029855",
"0.5690102",
"0.5476841",
"0.54711664",
"0.54181665",
"0.5365547",
"0.5319577",
"0.5278309",
"0.52745503",
"0.5262053",
"0.5235925",
"0.5229591",
"0.52233326",
"0.52102625",
"0.5197877",
"0.5180221",
"0.5170599",
"0.515578... | 0.4850309 | 59 |
IQuoteService.Util.getInstance().getQuote(req, new TagSuggestCallback(req, callback)); TagSuggestCallback tagSuggestCallback = new TagSuggestCallback(req, callback); | public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {
fetchTags(req, callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mo20159a(SuggestBuyItem suggestBuyItem);",
"private void onPreRequestData(int tag) {\n }",
"public void getTagCommand() {\n\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote addNewGetQuote();",
"protected void initTag()\n {\n }",
"amdocs.iam.pd.pdwebservices.G... | [
"0.6027868",
"0.5879736",
"0.5709303",
"0.56902665",
"0.547621",
"0.54716814",
"0.54173046",
"0.53643954",
"0.5318044",
"0.5277303",
"0.5273087",
"0.52612954",
"0.5235573",
"0.52298653",
"0.52222174",
"0.521113",
"0.5197364",
"0.51805776",
"0.51695937",
"0.51563144",
"0.51470... | 0.5703479 | 3 |
this.manufacturersListBox = new ListBox(); | protected void initManufacturersListBox(ManufacturerHolder mh) {
manufacturersListBox.addItem("Please choose...", "-1");
int index = 1;
for (ManufacturerHolder manuHolder : mywebapp.getManufacturerHolders()) {
manufacturersListBox.addItem(manuHolder.getName(), manuHolder.getId().toString());
if ((mh != null) && (mh.getId() != null)) {
if (mh.getId().equals(manuHolder.getId())) {
manufacturersListBox.setSelectedIndex(index);
}
}
index++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RTwoPanelListBox() {\n }",
"public QS001OtherItemListBox() {\r\n super();\r\n }",
"public WListbox()\n\t{\n\t\tsuper();\n\t\tWListItemRenderer rowRenderer = new WListItemRenderer();\n\t rowRenderer.addTableValueChangeListener(this);\n\n\t\tsetItemRenderer(rowRenderer);\n\t\tsetModel(new ... | [
"0.7058439",
"0.6684871",
"0.64766455",
"0.6304703",
"0.6272889",
"0.61133116",
"0.61047786",
"0.5980483",
"0.59359235",
"0.5891709",
"0.588788",
"0.5870893",
"0.5867824",
"0.585586",
"0.5850028",
"0.58214414",
"0.58180416",
"0.5815251",
"0.58123845",
"0.57844526",
"0.5783374... | 0.67454743 | 1 |
We do not need to crawl this stuff, so we will use a handler | protected void addLocation(ULPanel ul, LocationResult locationResult, ClickHandler handler, boolean showCategories) {
if (MyWebApp.isDesktop()) {
ListItem li = new ListItem();
ComplexPanel vp = getLocationPanel(locationResult, handler, showCategories);
li.add(vp);
ul.add(li);
} else {
Image image = new Image(getSpotImage());
Location location = locationResult.getLocation();
//tags display
FlowPanel tagsPanel = new FlowPanel();
tagsPanel.setStyleName("tags");
//we do not want to show categories when we are showing spots that we are picking from
if (showCategories) {
if ((location.getFactualCategories() != null) && (location.getFactualCategories().length() > 0)) {
String[] cats = location.getFactualCategories().split(">");
for (String cat : cats) {
String trimCat = cat.trim();
TagHolder tagHolder = new TagHolder(trimCat);
InlineLabel inlineLabel = new InlineLabel(tagHolder.getName());
tagsPanel.add(inlineLabel);
}
}
}
LocationResultComposite locationResultComposite = new LocationResultComposite( image, tagsPanel);
locationResultComposite.addClickHandler(handler);
clickMapLocation.put(locationResultComposite, locationResult);
StringBuffer sb = new StringBuffer();
add(sb, "", location.getName());
add(sb, ", ", location.getAddress1());
add(sb, ", ", location.getCity());
add(sb, ", ", location.getState());
add(sb, " ", location.getZipcode());
locationResultComposite.setLocationDescription(sb.toString());
processDistance(locationResult,locationResultComposite);
ul.add(locationResultComposite);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void runHandler();",
"public final void handle() {\n runHandler();\n }",
"protected Object getHandlerInternal(HttpServletRequest request) {\n String lookupPath = WebUtils.getLookupPathForRequest(request, this.alwaysUseFullPath);\n logger.debug(\"Looking up han... | [
"0.6432391",
"0.62134033",
"0.60694253",
"0.5999949",
"0.5943992",
"0.5917242",
"0.591689",
"0.59059584",
"0.58523273",
"0.58523273",
"0.58523273",
"0.583718",
"0.5821344",
"0.5795618",
"0.57829714",
"0.5762664",
"0.57523495",
"0.5741403",
"0.5737637",
"0.5727567",
"0.5618483... | 0.0 | -1 |
GWT.log("expandLocation reply=" + reply); | public MarkData expandLocation(ExpandData expandData) {
Long userId = null;
Image userImage = null;
String userPath = null;
if (mywebapp.getAuthenticatedUser() != null) {
ImageScaleHolder imageScaleHolder = getImageScaleHolder(mywebapp.getAuthenticatedUser().getContentHolder(), "57x57");
if (imageScaleHolder != null) {
userPath = imageScaleHolder.getWebServerAssetHolder().getUrl();
}
}
if (userPath == null) {
userImage = new Image(ANON_IMAGE_PATH);
} else {
String fullUrl = mywebapp.getUrl(userPath);
userImage = new Image(fullUrl);
}
userImage.setStyleName("com-ava");
if (userId != null) {
String userHistoryToken = MyWebApp.VIEW_USER_PROFILE + userId;
// String userHistoryToken2 = "#" + userHistoryToken;
}
TextArea saySomethingTextArea = new TextArea();
MarkData markData = new MarkData();
markData.expandData = expandData;
markData.saySomethingTextArea = saySomethingTextArea;
initAutoGroup(saySomethingTextArea, markData);
Button leaveMarkButton = new Button("Leave Mark");
leaveMarkButton.addClickHandler(saveHandler2);
widgetMarkDataMap.put(leaveMarkButton, markData);
Button showAdvancedButton = new Button(SHOW_ADVANCED);
showAdvancedMap.put(showAdvancedButton, markData);
showAdvancedButton.addClickHandler(showAdvancedWriteHerePanelHandler);
Button shareOnFacebookButton = getFacebookButton(markData);
ULPanel latestMarksPanel = getLatestMarksPanel(expandData);
ResultComponent resultComponent = new ResultComponent(saySomethingTextArea, leaveMarkButton, userImage, latestMarksPanel, showAdvancedButton, shareOnFacebookButton);
FormPanel myFormPanel = new FormPanel();
myFormPanel.setWidget(resultComponent);
setupRootPanelForm(myFormPanel, markData);
expandData.resultPanel.add(myFormPanel);
return markData;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ExtensionResult doSendLocation(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder(\"\")\n .add(\"location\", \"location\").build();\n output.put(OUTPUT, ... | [
"0.5960349",
"0.58436096",
"0.57612103",
"0.57041794",
"0.5521611",
"0.54939044",
"0.5450836",
"0.545043",
"0.54213077",
"0.54213077",
"0.5419469",
"0.5391639",
"0.53730345",
"0.5366341",
"0.53529763",
"0.533871",
"0.53329957",
"0.53329957",
"0.53329957",
"0.5316126",
"0.5257... | 0.5000925 | 60 |
this needs to be overridden if you want to utilize, it will call in toggle... | public boolean isValidToToggle() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void Toggle() {\n\t \n }",
"public abstract void toggle();",
"void toggle();",
"public void toggle(){\r\n isDown = !isDown;\r\n }",
"public void toggleEnable();",
"@Override\r\n\tpublic int ToggleDown() {\n\t\treturn 0;\r\n\t}",
"@Override\n public void toggle(bo... | [
"0.83237875",
"0.75685436",
"0.7289807",
"0.6987391",
"0.6966389",
"0.6958274",
"0.6914569",
"0.6887946",
"0.6859965",
"0.68179566",
"0.65665084",
"0.6529319",
"0.6516556",
"0.6488187",
"0.6481605",
"0.6460677",
"0.6431404",
"0.6398235",
"0.63846797",
"0.6368714",
"0.6364515"... | 0.0 | -1 |
To change body of implemented methods use File | Settings | File Templates. | public void onBlur(BlurEvent blurEvent) {
TextArea textArea = (TextArea) blurEvent.getSource();
if (isEmpty(textArea)) {
textArea.setValue(WRITE_SOMETHING);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\... | [
"0.74342245",
"0.7388708",
"0.73807424",
"0.7342543",
"0.733612",
"0.73274",
"0.73048407",
"0.73048407",
"0.7288761",
"0.7263298",
"0.72240573",
"0.72240573",
"0.7185279",
"0.7173534",
"0.71181035",
"0.71084964",
"0.70798004",
"0.7044164",
"0.7011181",
"0.6997047",
"0.6988354... | 0.0 | -1 |
you need to override this | protected void doSave() {
GWT.log("Please override");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void anular(... | [
"0.75091463",
"0.7267244",
"0.72530526",
"0.7189651",
"0.713771",
"0.7045123",
"0.7024726",
"0.69507223",
"0.6930258",
"0.6930258",
"0.6853779",
"0.6853779",
"0.68166506",
"0.6800503",
"0.6766533",
"0.67590743",
"0.67540914",
"0.67389876",
"0.6728183",
"0.67092395",
"0.670817... | 0.0 | -1 |
here we will display a solr result that users can pick to leave a mark upon mode 1 is what we want, so removing | protected void addResult2(ULPanel ul, LocationResult locationResult) {
// vertical panel, 2 rows into each li
// one label on top row
// hp goes into 2nd row
SolrDocument solrDocument = locationResult.getSolrDocument();
VerticalPanel vp = new VerticalPanel();
HorizontalPanel hp = new HorizontalPanel();
Long spotId = spotId = solrDocument.getFirstLong("spotid_l");
//all links for this will go to mark a spot
String targetHistoryToken = MyWebApp.LEAVE_SPOT_MARK + spotId;
Long itemId = null;
itemId = solrDocument.getFirstLong("georepoitemid_l");
if (itemId == null) {
itemId = solrDocument.getFirstLong("latest_mark_georepoitemid_l");
}
vp.add(hp);
ListItem li = new ListItem();
li.add(vp);
ul.add(li);
addMarkPhoto(solrDocument, targetHistoryToken, hp);
VerticalPanel middleTable = new VerticalPanel();
hp.add(middleTable);
hp.setCellWidth(middleTable, "100%");
middleTable.setStyleName("middletable");
//this will add the first row to the middle table
//mode is is a results page, whereas 2 is marks for a spot
String spot_label_s = solrDocument.getFirstString("spot_label_s");
if (spot_label_s != null) {
String sl = spot_label_s.toString();
Hyperlink spotLabel = new Hyperlink("@" + sl, targetHistoryToken);
spotLabel.setStyleName("spotLabel");
middleTable.add(spotLabel);
}
Anchor distanceLabel = getDistanceHyperlink(locationResult, targetHistoryToken);
Hyperlink metersLabel = new Hyperlink("meters away", targetHistoryToken);
ComplexPanel distancePanel = getDistancePanel(distanceLabel, metersLabel, locationResult);
Hyperlink latest_mark_escapedjavascriptsnippet_s = addHtml2(solrDocument, middleTable, "latest_mark_escapedjavascriptsnippet_s", targetHistoryToken);
if (latest_mark_escapedjavascriptsnippet_s != null) {
latest_mark_escapedjavascriptsnippet_s.addStyleName("latestMarkEscapedJavascriptSnippet");
}
ComplexPanel categoriesPanel = addCategories(solrDocument);
middleTable.add(categoriesPanel);
if (itemId == null) {
Hyperlink label2 = new Hyperlink("Be the first to mark this spot!", targetHistoryToken);
label2.addStyleName("linky");
label2.addStyleName("befirst");
//middleTable.add(label2);
}
String snippet = solrDocument.getFirstString("spot_geoRepoItemescapedjavascriptsnippet_s");
if (snippet != null) {
Hyperlink html2 = new Hyperlink(snippet, targetHistoryToken);
html2.addStyleName("spotGeoRepoItemEscapedJavascriptSnippet");
}
Hyperlink html2 = addHtml2(solrDocument, middleTable, "spot_geoRepoItemescapedjavascriptsnippet_s", targetHistoryToken);
if (html2 != null) {
html2.addStyleName("spotGeoRepoItemEscapedJavascriptSnippet");
}
//2nd image
//spot
if (!MyWebApp.isSmallFormat()) {
// if ((alex)) {
Hyperlink userHyperLink = new Hyperlink();
userHyperLink.setTargetHistoryToken(targetHistoryToken);
Image image = addImage(solrDocument, hp, "image_thumbnail_130x130_url_s",
userHyperLink, resources.spot_image_placeholder130x130(), resources.spot_image_placeholder57x57(), "spotimage");
setColumnWidth(image, hp);
// }
}
hp.add(distancePanel);
setColumnWidth(distancePanel, hp);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearResultEntries() {\n sp_searchEntries.removeAll();\n }",
"@Override\n public void result(Event event, boolean success) {\n mAnnotPanel.prepare();\n mClearView.setEnabled(fals... | [
"0.5557217",
"0.54888654",
"0.5329141",
"0.52928054",
"0.52323943",
"0.52079105",
"0.5148626",
"0.5135302",
"0.51289964",
"0.5106162",
"0.507168",
"0.5064134",
"0.50415915",
"0.50023764",
"0.49901465",
"0.4984777",
"0.49767026",
"0.49717784",
"0.4960309",
"0.49404496",
"0.492... | 0.0 | -1 |
let's only do 2 thumbnails | protected void addInstagramResultsPage(Panel middleTable, List<Data> instagrams) {
HorizontalPanel hp = new HorizontalPanel();
middleTable.add(hp);
int i = 0;
for (Data data : instagrams) {
if (i >= 2) return;
VerticalPanel vp = new VerticalPanel();
if (data.getImages() != null) {
Image image = new Image(data.getImages().getThumbnailResolution().getImageUrl());
vp.add(image);
}
if (data.getCaption() != null) {
vp.add(new Label(data.getCaption().getText()));
}
hp.add(vp);
i++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isThumbnail();",
"private void deleteThumbnailsImage(String sourceFilePath) {\n\n String fileNailName = FileUtils.getNailName(sourceFilePath); //get the file nailname\n Log.d(TAG,\"file type is : \" + fileNailName);\n\n //throught the file nailname to distinguish the file type\n ... | [
"0.68785477",
"0.6161982",
"0.60578823",
"0.60389906",
"0.59832716",
"0.59288734",
"0.5915009",
"0.5890214",
"0.5847362",
"0.5845612",
"0.5812896",
"0.5812879",
"0.57987595",
"0.5778382",
"0.5739072",
"0.57232195",
"0.57046586",
"0.5666305",
"0.5659537",
"0.5654741",
"0.56411... | 0.0 | -1 |
int k = i%j; | protected void addInstagramDetailPage(Panel middleTable, List<Data> instagrams) {
int i = 0;
HorizontalPanel hp = new HorizontalPanel();
for (Data data : instagrams) {
//thumbnails
VerticalPanel vp = new VerticalPanel();
if (i % 3 == 0) {
hp = new HorizontalPanel();
}
if (data.getCaption() != null) {
vp.add(new Label(data.getCaption().getText()));
}
if (data.getImages() != null) {
Image image = new Image(data.getImages().getThumbnailResolution().getImageUrl());
vp.add(image);
}
hp.add(vp);
middleTable.add(hp);
i++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int p(K k, int i) {\r\n return i/2 + (i*i)/2 + (i%2);\r\n }",
"static int modulo(int x, int y) {\n return (x%y);\n }",
"private int getIndex(int val){\n return val%bucket;\n }",
"static int lcm(int j, int k) {\n\t\tint start;\n\t\tif (j<k)\n\t\t\tstart= j;\n\t\telse star... | [
"0.68343955",
"0.6440002",
"0.6392842",
"0.6383061",
"0.6376125",
"0.6350644",
"0.6317233",
"0.6254165",
"0.6172408",
"0.6162259",
"0.601087",
"0.5982967",
"0.59789705",
"0.5924493",
"0.5881536",
"0.58660406",
"0.5845344",
"0.58359873",
"0.5833174",
"0.5825415",
"0.5818467",
... | 0.0 | -1 |
vertical panel, 2 rows into each li one label on top row hp goes into 2nd row | protected ComplexPanel getLocationResultPanelSolrMark(LocationResult locationResult) {
SolrDocument solrDocument = locationResult.getSolrDocument();
Long itemId = solrDocument.getFirstLong("georepoitemid_l");
if (itemId == null) {
itemId = solrDocument.getFirstLong("latest_mark_georepoitemid_l");
}
String targetHistoryToken = MyWebApp.ITEM_DETAIL + itemId;
String targetHistoryToken2 = "#" + targetHistoryToken;
FlowPanel result = new FlowPanel();
result.setStyleName("result");
addMarkPhoto2(solrDocument, targetHistoryToken2, result);
FlowPanel centerBlock = new FlowPanel();
centerBlock.setStyleName("center-block");
result.add(centerBlock);
String spot_label_s = solrDocument.getFirstString("location_label_s");
if (spot_label_s != null) {
String sl = "@" + spot_label_s.toString();
Anchor resultHeader = getResultHeader(sl);
resultHeader.setHref(targetHistoryToken2);
centerBlock.add(resultHeader);
}
ComplexPanel categoriesPanel = addCategories(solrDocument);
centerBlock.add(categoriesPanel);
Anchor distanceAnchor = getDistanceAnchor(locationResult);
result.add(distanceAnchor);
//addOurBuddies(centerBlock, locationResult);
addExpand(result, locationResult, centerBlock);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 2, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(11, 3, new Insets(0, 0, 0,... | [
"0.6113981",
"0.59646547",
"0.58613265",
"0.58371115",
"0.5814115",
"0.58132255",
"0.5802066",
"0.5782611",
"0.5781465",
"0.57626045",
"0.5706761",
"0.57038844",
"0.5690948",
"0.5690839",
"0.56753236",
"0.56538725",
"0.5648945",
"0.56109726",
"0.5608494",
"0.56010777",
"0.559... | 0.0 | -1 |
0.000621371 mile in 1 meter int distance = ddistance.intValue(); conversion to show km or miles | protected Anchor getDistanceHyperlink(LocationResult locationResult, String target) {
String val = getDistanceDisplay(locationResult);
Anchor distanceLabel = new Anchor(val, target);
distanceLabel.setStyleName("distance");
return distanceLabel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getDistanceInMiles();",
"public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}",
"public String getDistance(ExerciseEntry exerciseEntry){\n\n //get exerciseEntry distance\n double miles= exerciseEntry.getmDistance();\n\... | [
"0.760902",
"0.7009594",
"0.69445163",
"0.6834281",
"0.67341495",
"0.6618928",
"0.6611577",
"0.65922606",
"0.6565114",
"0.65026534",
"0.6463671",
"0.645944",
"0.645944",
"0.6438945",
"0.64257807",
"0.63857955",
"0.6381705",
"0.6375815",
"0.6371774",
"0.6350905",
"0.6347661",
... | 0.0 | -1 |
protected HandlerRegistration formHandlerRegistration = null; | public AsyncCallback getSaveLocationAsSpotCallback(final MarkData markData) {
AsyncCallback saveLocationAsSpotCallback = new AsyncCallback() {
public void onFailure(Throwable throwable) {
getMessagePanel().displayError(throwable.getMessage());
}
public void onSuccess(Object response) {
MobileResponse mobileResponse = (MobileResponse) response;
if (mobileResponse.getStatus() == 1) {
leavemark(mobileResponse.getSpotHolder().getId(), markData);
} else {
mywebapp.verifyDisplay();
getMessagePanel().clear();
getMessagePanel().displayErrors(mobileResponse.getErrorMessages());
}
}
};
return saveLocationAsSpotCallback;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void onForm(ClientForm form) {\n \r\n }",
"public interface HandlerRegistration {\n\n void removeHandler();\n\n}",
"public CompareSkusFormHandler() {\n }",
"UserRegistrationResponse registrationPost(RegistrationForm registrationForm);",
"publ... | [
"0.6565936",
"0.624964",
"0.61036634",
"0.6029387",
"0.6023961",
"0.5998013",
"0.59683824",
"0.5948604",
"0.593193",
"0.5921949",
"0.59189874",
"0.5908481",
"0.5905806",
"0.5905806",
"0.58869267",
"0.5863735",
"0.5852988",
"0.5839889",
"0.5777946",
"0.5762161",
"0.57474273",
... | 0.0 | -1 |
/ this will take markdata form and and add to locationresult | private void addMarkData(MarkData markData, MobileResponse mobileResponse) {
//markData.saySomethingTextArea.getValue()
ItemHolder itemHolder = mobileResponse.getItemHolder();
GWT.log("adding itemholder " + itemHolder.getId());
if (markData.replyItemHolder != null) {
markData.replyItemHolder.getChildrenItemHolders().add(itemHolder);
} else {
if (markData.expandData.locationResult.getItemHolders() == null) {
markData.expandData.locationResult.setItemHolders(new ArrayList<ItemHolder>());
}
markData.expandData.locationResult.getItemHolders().add(itemHolder);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected ComplexPanel getLocationResultPanelSolrMark(LocationResult locationResult) {\n SolrDocument solrDocument = locationResult.getSolrDocument();\n Long itemId = solrDocument.getFirstLong(\"georepoitemid_l\");\n if (itemId == null) {\n itemId = solrDocument.getFirstLong(\"lates... | [
"0.5779624",
"0.5443433",
"0.5378654",
"0.5351623",
"0.53301156",
"0.5305149",
"0.5290121",
"0.52557224",
"0.5249281",
"0.52385956",
"0.51886094",
"0.51812345",
"0.5174705",
"0.5166734",
"0.51411766",
"0.51343924",
"0.5083606",
"0.50485784",
"0.5046811",
"0.5039494",
"0.50343... | 0.5311402 | 5 |
need to remove formHandlerRegistration.removeHandler(); | public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {
GWT.log(event.getResults());
mywebapp.log("saveMediaFile complete non-markdata style");
if (event.getResults().equals("SUCCESS")) {
doSave();
} else {
postDialog.hide();
mywebapp.getMessagePanel().displayError(event.getResults());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void removeForm(ERForm form) {\n\t\t\n\t}",
"public interface HandlerRegistration {\n\n void removeHandler();\n\n}",
"@Override\n public void formClearRegistry() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }",
"@Override\n public void formClea... | [
"0.7120009",
"0.6690273",
"0.66871077",
"0.66871077",
"0.650961",
"0.64767635",
"0.6442928",
"0.6428764",
"0.6417793",
"0.6326353",
"0.62043065",
"0.6172414",
"0.6159729",
"0.6159419",
"0.60238266",
"0.5999579",
"0.59611595",
"0.59308696",
"0.58772767",
"0.5813104",
"0.579454... | 0.0 | -1 |
Fired when the user clicks on the sendButton. | public void onClick(ClickEvent event) {
Camera c = Camera.getCamera();
if (!Camera.isSupported()) {
GWT.log("Camera not supported!");
return;
}
c.getPictureFromLibrary(new CameraCallback() {
public void onSuccess(String picture) {
GWT.log("picture=" + picture);
pictureDataHidden.setValue(picture);
image.setUrl("data:image/jpeg;base64," + picture);
}
public void onFailure(String error) {
GWT.log("getPictureFromCamera" + error);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleSendButton(ActionEvent event) {\n\n messageController.setMessageSystem(this.message.getText(), this.toUsername.getText(),this.sender);\n if (messageController.sendMessage()){\n sentValid.setVisible(true);\n sentInvalid.setVisible(false);\n\n }\n e... | [
"0.7488463",
"0.7416849",
"0.7141074",
"0.7078817",
"0.70701325",
"0.7015546",
"0.7006025",
"0.6993535",
"0.6948314",
"0.69355965",
"0.6912939",
"0.6866673",
"0.6845752",
"0.6832665",
"0.6830186",
"0.68095857",
"0.6754457",
"0.6753401",
"0.6706521",
"0.6658458",
"0.6624695",
... | 0.0 | -1 |
Fired when the user clicks on the sendButton. | public void onClick(ClickEvent event) {
// sendNameToServer();
Camera c = Camera.getCamera();
if (!Camera.isSupported()) {
GWT.log("Camera not supported!");
return;
}
c.getPictureFromCamera(new CameraCallback() {
public void onSuccess(String picture) {
GWT.log("picture=" + picture);
pictureDataHidden.setValue(picture);
image.setUrl("data:image/jpeg;base64," + picture);
}
public void onFailure(String error) {
GWT.log("getPictureFromCamera" + error);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleSendButton(ActionEvent event) {\n\n messageController.setMessageSystem(this.message.getText(), this.toUsername.getText(),this.sender);\n if (messageController.sendMessage()){\n sentValid.setVisible(true);\n sentInvalid.setVisible(false);\n\n }\n e... | [
"0.7488463",
"0.7416849",
"0.7141074",
"0.7078817",
"0.70701325",
"0.7015546",
"0.7006025",
"0.6993535",
"0.6948314",
"0.69355965",
"0.6912939",
"0.6866673",
"0.6845752",
"0.6832665",
"0.6830186",
"0.68095857",
"0.6754457",
"0.6753401",
"0.6706521",
"0.6658458",
"0.6624695",
... | 0.0 | -1 |
need to have button that will add another file upload | private void addFileUploadField() {
FileUpload upload = new FileUpload();
upload.setName("fileUpload" + i);
fileUploadPanel.add(upload);
i++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addPressed() {\n\n\t\tJFileChooser fc = new JFileChooser();\n\t\tfc.setFileFilter(SwingFileFilterFactory.newMediaFileFilter());\n\t\tint returnVal = fc.showOpenDialog(Library.this);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tString newFile = fc.getSelectedFile().getAbsolutePath();\n\t... | [
"0.7087335",
"0.7084301",
"0.7010182",
"0.67819166",
"0.66678995",
"0.653589",
"0.63756675",
"0.63696676",
"0.63674957",
"0.6280958",
"0.62578464",
"0.6244138",
"0.62266296",
"0.62029946",
"0.6201972",
"0.61929893",
"0.6181139",
"0.61528736",
"0.6148532",
"0.61423194",
"0.613... | 0.7237083 | 0 |
GWT.log("MGWT.getOsDetection().isTablet()=" + MGWT.getOsDetection().isTablet()); GWT.log("MyWebApp.isMobileDevice()=" + MyWebApp.isMobileDevice()); | protected boolean isUploadSupported() {
if (MyWebApp.isDesktop()) {
return true;
} else {
return false;
}
//
//
// if (MyWebApp.isMobileDevice()) {
// return false;
// }
//
// return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isTablet();",
"public static boolean isTablet() {\r\n\t\treturn isTablet;\r\n\t}",
"public static boolean isTablet() {\n return TeamUp.getAppContext().getResources().getBoolean(R.bool.is_tablet);\n }",
"public boolean isTablet() { \n\t \tTelephonyManager telephony = (TelephonyMana... | [
"0.76215726",
"0.7208521",
"0.71120197",
"0.70821375",
"0.695174",
"0.68898094",
"0.676617",
"0.63367397",
"0.6304197",
"0.62623835",
"0.62089837",
"0.613053",
"0.61236274",
"0.6121809",
"0.6017076",
"0.5929105",
"0.5877619",
"0.58195984",
"0.57638127",
"0.57620466",
"0.57096... | 0.5185921 | 61 |
Load the image in the document and in the case of success attach it to the viewer | protected IUploader.OnFinishUploaderHandler getOnFinishUploaderHandlerDetails(final FlowPanel panelImages) {
IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler() {
public void onFinish(IUploader uploader) {
if (uploader.getStatus() == Status.SUCCESS) {
PreloadedImage preloadedImage = new PreloadedImage(uploader.fileUrl(), showImageOnDetails);
// The server sends useful information to the client by default
preloadedImagePanelMap.put(preloadedImage, panelImages);
UploadedInfo info = uploader.getServerInfo();
}
}
};
return onFinishUploaderHandler;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void imageLoadSuccess(String path) {\n Intent mainIntent = new Intent(MainActivity.this, PresenterActivity.class);\n mainIntent.putExtra(\"path\", path);\n startActivity(mainIntent);\n }",
"public void processAddImageOverlay() {\n PropertiesManager props = Pro... | [
"0.61574256",
"0.5973803",
"0.59221315",
"0.58343333",
"0.57990956",
"0.5790731",
"0.5742541",
"0.572924",
"0.5723719",
"0.5707221",
"0.57071733",
"0.56970763",
"0.56962293",
"0.5663757",
"0.5642553",
"0.5639774",
"0.56163883",
"0.56066716",
"0.55832213",
"0.558243",
"0.55772... | 0.0 | -1 |
Load the image in the document and in the case of success attach it to the viewer | protected IUploader.OnFinishUploaderHandler getOnFinishUploaderHandler(final FlowPanel panelImages) {
IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler() {
public void onFinish(IUploader uploader) {
if (uploader.getStatus() == Status.SUCCESS) {
PreloadedImage preloadedImage = new PreloadedImage(uploader.fileUrl(), showImage);
// The server sends useful information to the client by default
preloadedImagePanelMap.put(preloadedImage, panelImages);
UploadedInfo info = uploader.getServerInfo();
}
}
};
return onFinishUploaderHandler;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void imageLoadSuccess(String path) {\n Intent mainIntent = new Intent(MainActivity.this, PresenterActivity.class);\n mainIntent.putExtra(\"path\", path);\n startActivity(mainIntent);\n }",
"public void processAddImageOverlay() {\n PropertiesManager props = Pro... | [
"0.61574256",
"0.5973803",
"0.59221315",
"0.58343333",
"0.57990956",
"0.5790731",
"0.5742541",
"0.572924",
"0.5723719",
"0.5707221",
"0.57071733",
"0.56970763",
"0.56962293",
"0.5663757",
"0.5642553",
"0.5639774",
"0.56163883",
"0.56066716",
"0.55832213",
"0.558243",
"0.55772... | 0.0 | -1 |
final Label startDateLabel = new Label("Start Date"); add(startDateLabel); add(startDatePicker); | protected void addDateRange() {
addFieldset(startDatePicker, "Start Date", "startDate");
addFieldset(endDatePicker, "End Date", "endDate");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setDateUI() {\n datePanel = new JPanel();\n date = new JLabel();\n\n date.setText(\"Date : \");\n date.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n\n\n dateField = new JTextFieldHintUI(\"yyyy-mm-dd\");\n setTextFieldUI(dateField);\n\n datePanel.a... | [
"0.7469805",
"0.6652715",
"0.658292",
"0.64969695",
"0.6382831",
"0.62991303",
"0.6290511",
"0.6254122",
"0.6175409",
"0.6151388",
"0.61344963",
"0.6082784",
"0.60726535",
"0.6064971",
"0.6018821",
"0.5990078",
"0.59647804",
"0.5944946",
"0.59400594",
"0.59397787",
"0.5905688... | 0.0 | -1 |
GWT.log("addImage " + href); | protected Image addImage(String href, Panel hp, String stylename, Hyperlink hyperlink) {
if (href == null) {
return null;
}
if (href.equals("")) {
return null;
}
final Image image = new Image();
image.setUrl(mywebapp.getUrl(href));
addImage(image, hp, stylename, hyperlink);
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void galleryAddPic() {\n\t}",
"@Override\n public String getImageLink() {\n return imageLink;\n }",
"Builder addImage(URL value);",
"abstract public String imageUrl ();",
"PreViewPopUpPage clickImageLink();",
"@UiHandler(\"addObservatoryImage\")\r\n\tvoid onAddObservatoryImageClicked... | [
"0.6662063",
"0.6546414",
"0.6493572",
"0.64129883",
"0.6172864",
"0.60072464",
"0.5909925",
"0.5903753",
"0.5890694",
"0.58883476",
"0.5866718",
"0.5863238",
"0.5862707",
"0.5819516",
"0.5780356",
"0.5759927",
"0.5735298",
"0.5729663",
"0.57279044",
"0.5723052",
"0.5714264",... | 0.6620016 | 1 |
GWT.log("addImage " + href); | protected Image addImageOrig(String href, Panel hp, String stylename) {
if (href == null) {
return null;
}
if (href.equals("")) {
return null;
}
final Image image = new Image();
//image.addStyleName("scaleme");
image.setUrl(mywebapp.getUrl(href));
addImageOrig(image, hp, stylename);
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void galleryAddPic() {\n\t}",
"protected Image addImage(String href, Panel hp, String stylename, Hyperlink hyperlink) {\n if (href == null) {\n return null;\n }\n if (href.equals(\"\")) {\n return null;\n }\n final Image image = new Image();\n ... | [
"0.6660569",
"0.6619277",
"0.65462184",
"0.64911443",
"0.64128417",
"0.61737394",
"0.6006426",
"0.5900794",
"0.58888596",
"0.5888132",
"0.5864657",
"0.58628076",
"0.58624375",
"0.5818146",
"0.577907",
"0.5759689",
"0.5734398",
"0.5729169",
"0.5724897",
"0.57221395",
"0.571134... | 0.5909354 | 7 |
Created by Ocean Lin on 2018/10/11. | public interface SystemService {
/**
* 根据用户名获取User对象
*
* @param name 用户名
* @return 用户对象
*/
User findUserById(String name);
/**
* 是否存在User
*
* @param name 用户名
* @return 存在返回true
*/
boolean isUserByName(String name);
/**
* 是否存在User
*
* @param user 用户实体类
* @return 存在返回true
*/
boolean isUserByNameAndID(User user);
/**
* 添加User
*
* @param user 用户实体类
*/
void addUser(User user);
/**
* 是否存在Role
*
* @param rolename 角色名称
* @return 存在返回true
*/
boolean isRoleByName(String rolename);
/**
* 根据角色名称、角色主键判断是否存在
*
* @param roleDb 角色实体类
* @return 存在返回true
*/
boolean isRoleByNameAndRoleid(Role roleDb);
/**
* 添加Role
*
* @param role 剧社实体类
*/
void roleAdd(Role role);
/**
* 是否存在Model
*
* @param modelname 模块名称
* @return 存在返回true
*/
boolean isModelByName(String modelname);
/**
* 根据模块名称和模块主键查询
*
* @param modelDb 模块实体类
* @return 存在返回true
*/
boolean isModelByNameAndModelid(Model modelDb);
/**
* 添加Model
*
* @param model 模块实体类
*/
void modelAdd(Model model);
/**
* 通过主键查找User
*
* @param userId 用户主键
* @return User对象
*/
User findUserById(Integer userId);
/**
* 通过主键查找Role
*
* @param roleId 角色主键
* @return Role对象
*/
Role findRoleById(Integer roleId);
/**
* 通过主键查找Model
*
* @param modelId 模块主键
* @return Model对象
*/
Model findModelById(Integer modelId);
/**
* 删除用户
*
* @param userId 用户主键
*/
void userDelete(Integer userId);
/**
* 删除角色
*
* @param roleId 角色主键
*/
void roleDelete(Integer roleId);
/**
* 删除Model
*
* @param modelId 模块主键
*/
void modelDelete(Integer modelId);
/**
* 更新用户
*
* @param userDb 用户实体类
*/
void updateUser(User userDb);
/**
* 更新角色
*
* @param roleDb 角色实体类
*/
void updateRole(Role roleDb);
/**
* 更新model
*
* @param modelDb 模块实体类
*/
void updateModel(Model modelDb);
/**
* 用户列表
*
* @param user 用户实体类
* @param pageable 分页工具类
* @return 返回用户列表
*/
UserDto userList(User user, Pageable pageable);
/**
* 角色列表
*
* @param role 角色实体类
* @param pageable 分页工具类
* @return 角色列表
*/
RoleDto roleList(Role role, Pageable pageable);
/**
* model列表
*
* @param model 模块实体类
* @param pageable 分页工具类
* @return 模块列表
*/
ModelDto modelList(Model model, Pageable pageable);
/**
* 设置用户的属于角色
*
* @param userRolesDto 包含用户主键、角色主键DTO
*/
void userRoles(UserRolesDto userRolesDto);
/**
* 设置角色管理的模块信息
*
* @param roleModelsDto 包含模块主键、角色主键DTO
*/
void roleModels(RoleModelsDto roleModelsDto);
/**
* 通过userid查询用户角色绑定关系
*
* @param userid 用户主键
* @return 用户角色绑定关系
*/
List<ViewUserRole> findByUserid(Integer userid);
/**
* 通过roleid查询角色模块绑定关系
*
* @param roleid 角色主键
* @return 角色模块绑定关系
*/
List<ViewRoleModel> findByRoleid(Integer roleid);
/**
* 查询用户管理模块信息
*
* @param user 用户对象
* @return 用户模块绑定关系
*/
List<ViewUserModel> findModelList(User user);
/**
* 模块与DashBoard绑定关系
*
* @param dashboardDto 模块主键、仪表板主键DTO
*/
void modelDashboards(ModelDashboardDto dashboardDto);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpubl... | [
"0.6101191",
"0.6021195",
"0.5725213",
"0.57167506",
"0.56980014",
"0.5683123",
"0.56778216",
"0.56778216",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5615057",
"0.5593334",
"0.5572665",
"0.55696416",
"0.555743",
"0.55398834",
"0.5522254"... | 0.0 | -1 |
create process variable and register it | @Ignore
@Test
public void destroyAndReCreateVariable() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {
MemoryProcessVariable pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{2});
server.registerProcessVaribale(pv);
//Create a client context
Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
//Create a channel
Channel ch = clientContext.createChannel("test", new ConnectionListener() {
@Override
public void connectionChanged(ConnectionEvent ev) {
LOG.info("State change to: " + ev.isConnected());
try {
barrier.await();
} catch (InterruptedException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
} catch (BrokenBarrierException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
}
});
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read
DBR dbr = ch.get();
clientContext.pendIO(0);
assertEquals(2, ((int[]) dbr.getValue())[0]);
//unregister process variable and destroy it
server.unregisterProcessVaribale("test");
pv.destroy();
//wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is not connected
assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//create new process variable and register it with server
pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{1});
server.registerProcessVaribale(pv);
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read, and it is the new value
dbr = ch.get();
clientContext.pendIO(0);
assertEquals(1, ((int[]) dbr.getValue())[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;",
"public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Retur... | [
"0.66938007",
"0.64861727",
"0.59659755",
"0.5896328",
"0.58845896",
"0.5817787",
"0.5792027",
"0.5729024",
"0.56166464",
"0.55831826",
"0.55831826",
"0.5579071",
"0.5561893",
"0.5506248",
"0.5421229",
"0.54047483",
"0.5378587",
"0.52584803",
"0.52493495",
"0.5204827",
"0.518... | 0.48741055 | 64 |
create process variable and register it | @Ignore
@Test
public void withDestroyAndCreateServer() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {
MemoryProcessVariable pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{2});
server.registerProcessVaribale(pv);
//Create a client context
Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
//Create a channel
Channel ch = clientContext.createChannel("test", new ConnectionListener() {
@Override
public void connectionChanged(ConnectionEvent ev) {
LOG.info("State change to: " + ev.isConnected());
try {
barrier.await();
} catch (InterruptedException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
} catch (BrokenBarrierException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
}
});
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read
DBR dbr = ch.get();
clientContext.pendIO(0);
assertEquals(2, ((int[]) dbr.getValue())[0]);
//unregister process variable and destroy it
server.unregisterProcessVaribale("test");
pv.destroy();
//destroy the server and start it up again
tearDownServer();
setupServer();
//wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is not connected
assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//create new process variable and register it with server
pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{1});
server.registerProcessVaribale(pv);
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read, and it is the new value
dbr = ch.get();
clientContext.pendIO(0);
assertEquals(1, ((int[]) dbr.getValue())[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;",
"public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Retur... | [
"0.66938007",
"0.64861727",
"0.59659755",
"0.5896328",
"0.58845896",
"0.5817787",
"0.5792027",
"0.5729024",
"0.56166464",
"0.55831826",
"0.55831826",
"0.5579071",
"0.5561893",
"0.5506248",
"0.5421229",
"0.54047483",
"0.5378587",
"0.52584803",
"0.52493495",
"0.5204827",
"0.518... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
new FrequencyOfCharInString().findCharFreq("Technocredit", "T");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Considers the current vector as centre of a collision sphere with radius r and checks if the triangle abc intersects with this sphere. The Vec3D p The point on abc closest to the sphere center is returned via the supplied result vector argument. | public boolean intersectSphereTriangle(Triangle t, Vec3D result) {
// Find Vec3D P on triangle ABC closest to sphere center
result.set(t.closestPointOnSurface(this));
// Sphere and triangle intersect if the (squared) distance from sphere
// center to Vec3D p is less than the (squared) sphere radius
Vec3D v = result.sub(this);
return v.magSquared() <= radius * radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean intersectLineTriangle(Vec3 p, Vec3 q, Vec3 a, Vec3 b, Vec3 c, Vec3 r) {\r\n\t // Bring points to their respective coordinate frame\r\n\t Vec3 pq = q.subtract( p);\r\n\t Vec3 pa =a.subtract(p);\r\n\t Vec3 pb = b.subtract(p);\r\n\t Vec3 pc = c.subtract(p);\r\n\t \r\n\t Vec3 m = pq... | [
"0.64882594",
"0.6417317",
"0.63138294",
"0.6281289",
"0.61288476",
"0.6007334",
"0.5942064",
"0.59251416",
"0.59142584",
"0.5907372",
"0.58921117",
"0.5854458",
"0.58322555",
"0.56812686",
"0.56544757",
"0.5640487",
"0.56222224",
"0.55796736",
"0.5568115",
"0.5535615",
"0.55... | 0.7340695 | 0 |
Calculates the normal vector on the sphere in the direction of the current point. | public Vec3D tangentPlaneNormalAt(Vec3D q) {
Vec3D p = this.sub(q);
// float xr2 = eR.x * eR.x;
// float yr2 = eR.y * eR.y;
// float zr2 = eR.z * eR.z;
float r2 = 1f / (radius * radius);
return p.scaleSelf(r2).normalize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public VectorA normal()\n {\n return new VectorA(this.x/this.mag(), this.y/this.mag());\n }",
"@Override\n\tpublic Vector getNormal(Point3D point) {\n\t\tdouble temp=axisRay.getDir().dotProduct(point.subtract(axisRay.getP0()));\n\t\tif(Util.isZero(temp/100))return (point.subtract(Point3D.ZERO)).norm... | [
"0.73556167",
"0.73553646",
"0.72499275",
"0.70930934",
"0.69901586",
"0.6903979",
"0.6869015",
"0.67609394",
"0.67529726",
"0.6740173",
"0.66877335",
"0.66715795",
"0.66342735",
"0.6622385",
"0.6614597",
"0.66025466",
"0.6552182",
"0.6515193",
"0.6486703",
"0.64609486",
"0.6... | 0.61829066 | 31 |
Creates CacheManager supplied by Redisson instance | public PlusSpringCacheManager() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RedisCache createRedisCache(){\n if (AppContextUtil.applicationContext != null){\n StringRedisTemplate redisTemplate = AppContextUtil.getBean(\"stringRedisTemplate\");\n return new RedisCache(redisTemplate);\n }\n throw new RuntimeException(\"获取bean失败!\");\n }",... | [
"0.6679711",
"0.6642056",
"0.6465023",
"0.6463885",
"0.6454556",
"0.6375479",
"0.635114",
"0.6314085",
"0.6234646",
"0.6169041",
"0.61649424",
"0.6136637",
"0.61252725",
"0.6108854",
"0.60911864",
"0.6037208",
"0.60110646",
"0.5996221",
"0.5923909",
"0.5867346",
"0.5852381",
... | 0.5839371 | 21 |
Defines 'fixed' cache names. A new cache instance will not be created in dynamic for nondefined names. `null` parameter setups dynamic mode | public void setCacheNames(Collection<String> names) {
if (names != null) {
for (String name : names) {
getCache(name);
}
dynamic = false;
} else {
dynamic = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public final String zzfo(String str) {\n String valueOf = String.valueOf(super.zzfo(str));\n return valueOf.length() != 0 ? \"cache:\".concat(valueOf)... | [
"0.55498356",
"0.5499507",
"0.54028004",
"0.5391804",
"0.5217422",
"0.51080126",
"0.50738245",
"0.504509",
"0.49481374",
"0.48857892",
"0.48849073",
"0.479093",
"0.47682852",
"0.476487",
"0.47465208",
"0.46473426",
"0.46096712",
"0.45969144",
"0.45957235",
"0.45916858",
"0.45... | 0.657692 | 0 |
Set cache config mapped by cache name | public void setConfig(Map<String, ? extends CacheConfig> config) {
this.configMap = (Map<String, CacheConfig>) config;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void configure(CacheFactorySPI caching, String name, String config)\n {\n //TODO config/name -> name/config\n this.factory = caching.getValueFactory(config, name);\n }",
"public void cache() {\n cache.clear();\n for (String s : getConfig().getKeys(true)) {\n if... | [
"0.6472127",
"0.63981074",
"0.6284718",
"0.6252338",
"0.5983968",
"0.594707",
"0.58363724",
"0.5823042",
"0.5804602",
"0.5804602",
"0.5776651",
"0.57597566",
"0.5627436",
"0.5592197",
"0.55856293",
"0.5545639",
"0.5544573",
"0.5529592",
"0.55076844",
"0.5458565",
"0.54426354"... | 0.63906425 | 2 |
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | public ImageToObjectRequest(ImageToObjectRequest source) {
if (source.ImageInfoList != null) {
this.ImageInfoList = new ImageInfo[source.ImageInfoList.length];
for (int i = 0; i < source.ImageInfoList.length; i++) {
this.ImageInfoList[i] = new ImageInfo(source.ImageInfoList[i]);
}
}
if (source.HandleParam != null) {
this.HandleParam = new HandleParam(source.HandleParam);
}
if (source.Type != null) {
this.Type = new Long(source.Type);
}
if (source.IsUsedClassify != null) {
this.IsUsedClassify = new Boolean(source.IsUsedClassify);
}
if (source.UserType != null) {
this.UserType = new Long(source.UserType);
}
if (source.ReportTypeVersion != null) {
this.ReportTypeVersion = new ReportTypeVersion[source.ReportTypeVersion.length];
for (int i = 0; i < source.ReportTypeVersion.length; i++) {
this.ReportTypeVersion[i] = new ReportTypeVersion(source.ReportTypeVersion[i]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void set(String key, Object value);",
"void set(K key, V value);",
"public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }",
"public abstract void set(String k... | [
"0.6439533",
"0.6414664",
"0.6145133",
"0.6116169",
"0.6093837",
"0.6080848",
"0.6041259",
"0.59903467",
"0.59729224",
"0.5955252",
"0.58389026",
"0.58273375",
"0.5790539",
"0.57044613",
"0.57028556",
"0.56883043",
"0.56870764",
"0.5677066",
"0.56080335",
"0.5589262",
"0.5581... | 0.0 | -1 |
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamArrayObj(map, prefix + "ImageInfoList.", this.ImageInfoList);
this.setParamObj(map, prefix + "HandleParam.", this.HandleParam);
this.setParamSimple(map, prefix + "Type", this.Type);
this.setParamSimple(map, prefix + "IsUsedClassify", this.IsUsedClassify);
this.setParamSimple(map, prefix + "UserType", this.UserType);
this.setParamArrayObj(map, prefix + "ReportTypeVersion.", this.ReportTypeVersion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public ... | [
"0.62574834",
"0.6217662",
"0.6024768",
"0.5982239",
"0.5965723",
"0.59330684",
"0.5920059",
"0.58351564",
"0.5781645",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57737285",
"0.57054734",
"0.5701363",
"0.56510806",
"0.56491816",
"0.... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View v = inflater.inflate(R.layout.fregmant_profile, container, false);
Firstname = (EditText)v.findViewById(R.id.EditFirstName);
Secondname = (EditText)v.findViewById(R.id.EditSecondName);
Email = (EditText)v.findViewById(R.id.EditEmail);
final FirebaseFirestore db = FirebaseFirestore.getInstance();
mobile = User_singleton.getInstance().getNumber();
radioSexGroup = (RadioGroup) v.findViewById(R.id.gender);
DocumentReference docRef = db.collection("Users").document(mobile);
docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
if (task.isSuccessful()) {
DocumentSnapshot document = task.getResult();
if (document.exists()) {
fn =(String)document.get("firstName");
ln =(String) document.get("lastName");
setmail =(String) document.get("email");
gend = (String) document.get("gender");
Firstname.setText(fn);
Secondname.setText(ln);
Email.setText(setmail);
if (gend.equals("ذكر")){radioSexGroup.check(R.id.Male);}
if (gend.equals("انثى")){radioSexGroup.check(R.id.Female);}
} else {
Toast.makeText(getContext(), "حدث خطأ ونأسف على ذلك", Toast.LENGTH_SHORT).show();
}
} else {
task.getException();
}
}
});
saveprofileedit = v.findViewById(R.id.saveiditprofile);
saveprofileedit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final FirebaseFirestore db = FirebaseFirestore.getInstance();
Client_firebase newaccount = new Client_firebase();
String fr_n = Firstname.getText().toString();
String se_n = Secondname.getText().toString();
String mail = Email.getText().toString();
newaccount.setFirstName(fr_n);
newaccount.setLastName(se_n);
newaccount.setEmail(mail);
newaccount.setPhoneNumber(mobile);
newaccount.setCountry("Assuit");
newaccount.setName(fr_n+" "+se_n);
// get selected radio button from radioGroup
int selectedId = radioSexGroup.getCheckedRadioButtonId();
if (selectedId == R.id.Male)
{
newaccount.setGender("ذكر");
}
else if (selectedId == R.id.Female)
{
newaccount.setGender("انثى");
}
db.collection("Users").document(mobile).set(newaccount).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()){
Toast.makeText(getContext(), "تم تعديل البيانات بنجاح.", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(getContext(), "حدث خطأ اثناء العملية 🙁 ", Toast.LENGTH_SHORT).show();
}
}
});
Intent intent = new Intent(getContext(), MainActivity.class);
startActivity(intent);
}
});
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
TODO Autogenerated method stub / Scanner in = new Scanner(System.in); while (in.hasNext()) System.out.println(in.next()); in.close(); | public static void main(String[] args) {
String a = "Programming";
String b = new String("Programming");
String c = "Program" + "ming";
System.out.println(a == b);
System.out.println(a == c);
System.out.println(a.equals(b));
System.out.println(a.equals(c));
System.out.println(a.intern() == b.intern());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString input = sc.nextLine();\n\t\t\t... | [
"0.75361514",
"0.74149567",
"0.73229784",
"0.7234617",
"0.7198594",
"0.71869695",
"0.71639776",
"0.70403844",
"0.70098895",
"0.69580865",
"0.69580865",
"0.6945699",
"0.6943834",
"0.6909451",
"0.69031566",
"0.6867243",
"0.685212",
"0.6825879",
"0.68223816",
"0.67452407",
"0.67... | 0.0 | -1 |
Called when the user taps the Sign IN button | public void forGotPass(View view) {
// Perform Forgot Password Action in response to tapping Sign In button
Intent intent = new Intent( this, ForGotPasswordActivity.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onSignInButtonClicked();",
"@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }",
"private void signIn() {\n }",
"private void onSignInClicked() {\n mState.enableConnection();\... | [
"0.8066629",
"0.8021318",
"0.7697562",
"0.7695432",
"0.75026095",
"0.7478024",
"0.7356116",
"0.7329751",
"0.7294199",
"0.7223605",
"0.7195281",
"0.7172703",
"0.71537536",
"0.71537536",
"0.71537536",
"0.7115537",
"0.710026",
"0.710026",
"0.710026",
"0.710026",
"0.70938903",
... | 0.0 | -1 |
Called when the user taps the Sign UP button | public void signUP(View view) {
// Do something in response to button
Intent intent = new Intent(MainActivity.this, SignUpActivity.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onSignUpClicked() {\n loginView.startSignUpActivity();\n loginView.finishActivity();\n }",
"@Override\n public void onSignUpBtnClick() {\n }",
"@Override\n public void onClick(View v) {\n signUp();\n }",
"public void signUpClicked(View v... | [
"0.8368027",
"0.8018944",
"0.7978189",
"0.77716875",
"0.77580774",
"0.77065533",
"0.76604635",
"0.765076",
"0.7643078",
"0.7531596",
"0.74643254",
"0.744694",
"0.7354274",
"0.7275088",
"0.7270501",
"0.7261215",
"0.7231379",
"0.72286147",
"0.7226057",
"0.7181543",
"0.7168553",... | 0.7562536 | 9 |
new messages can be added stored in descending time received order The header for the add operation is public void add(Message m) messages can move from one list to another(removed from original list) no receiving list then the message not removed from original list. public void move(int position, MessageList ml) | public messageList()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int move(int position) {\n\t\tremoveQueue(queues[position]);\n\t\tint angriness = queues[position].queue.poll();\n\t\tallQueues.add(queues[position]);\n\t\tif (queues[position].queue.size() > 0) {\n\t\t\tallHeads.add(queues[position]);\n\t\t}\n\t\treturn insert(angriness);\n\t}",
"public abstract void mo... | [
"0.64785814",
"0.6347505",
"0.63075715",
"0.6112588",
"0.6106421",
"0.60952044",
"0.60708326",
"0.6061505",
"0.6030054",
"0.6029984",
"0.60269815",
"0.5998158",
"0.59928864",
"0.59747463",
"0.59303856",
"0.59302944",
"0.5924704",
"0.59091705",
"0.5902258",
"0.5896976",
"0.589... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String toString() {
return ans+" By "+by;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Adds a new boolean value parameter to the parameters that will be sent when the request is made. | public void addParameter(final String name, final boolean booleanValue) {
this.addParameter(name, Boolean.toString(booleanValue));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBool(String name, Boolean value) {\n parameters.get(name).setValue(value);\n }",
"public void setBool(String parName, boolean parVal) throws HibException;",
"public void set_boolean(boolean param) {\n this.local_boolean = param;\n }",
"private void saveBoolean(Strin... | [
"0.7295463",
"0.6680512",
"0.6668005",
"0.6655561",
"0.65972716",
"0.6426391",
"0.636073",
"0.63487977",
"0.63313824",
"0.63302255",
"0.632421",
"0.6312569",
"0.6296919",
"0.6295605",
"0.6280162",
"0.6280162",
"0.62106305",
"0.6170018",
"0.615836",
"0.6144283",
"0.6092187",
... | 0.74175847 | 0 |
Abstract method used for executing specific operation. | protected abstract String process(T firstNumber, D secondNumber); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void operation();",
"public abstract void runOperation();",
"protected abstract void execute();",
"abstract protected void execute();",
"protected void execute() {}",
"public abstract void execute();",
"public abstract void execute();",
"public abstract void execute();",
"protected ... | [
"0.79167855",
"0.7766065",
"0.7576407",
"0.7542968",
"0.7524921",
"0.7353964",
"0.7353964",
"0.7353964",
"0.72480357",
"0.7199618",
"0.7173559",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71... | 0.0 | -1 |
Converts given price in pence. | protected int convertToPence(PriceModel number) {
return (number.getPounds() * ConstantUtil.PENCE_IN_POUND) + (number.getShillings() * ConstantUtil.PENCE_IN_SHILLING) + number.getPence();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setpPrice(double pPrice) {\n this.pPrice = pPrice;\n }",
"public void setpPrice(BigDecimal pPrice) {\n this.pPrice = pPrice;\n }",
"public void setPrice(double p) {\n\t\tprice = p;\n\t}",
"public void setPrice(BigDecimal price) {\n this.price = price;\n }",
"public... | [
"0.6321887",
"0.6275338",
"0.6240325",
"0.6159693",
"0.6159693",
"0.6145917",
"0.61339164",
"0.61339164",
"0.61265445",
"0.60959667",
"0.6093306",
"0.6015514",
"0.59783435",
"0.5957729",
"0.59476876",
"0.59127575",
"0.590335",
"0.58973706",
"0.58958817",
"0.58668065",
"0.5852... | 0.66336393 | 0 |
Returns price created from pence. | public String createResult(int resultInPence) {
log.trace(">> createResult() > resultInPence: {}", resultInPence);
int pounds = resultInPence / ConstantUtil.PENCE_IN_POUND;
int shillings = (resultInPence - (pounds * ConstantUtil.PENCE_IN_POUND)) / ConstantUtil.PENCE_IN_SHILLING;
int pence = (resultInPence - (pounds * ConstantUtil.PENCE_IN_POUND)) - (shillings * ConstantUtil.PENCE_IN_SHILLING);
String result = createStringFromResult(pounds, shillings, pence);
log.trace("<< createResult() < result: {}", result);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigDecimal getpPrice() {\n return pPrice;\n }",
"Price getTradePrice();",
"BigDecimal getPrice();",
"public double getpPrice() {\n return pPrice;\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"Price getPrice() throws Exception;",
"long getPrice()... | [
"0.6800707",
"0.6775966",
"0.6760163",
"0.668754",
"0.6644086",
"0.6644086",
"0.6644086",
"0.6618173",
"0.65919167",
"0.65282255",
"0.65282255",
"0.65227795",
"0.65183043",
"0.65134656",
"0.65134656",
"0.65134656",
"0.65134656",
"0.65134656",
"0.64549184",
"0.6448145",
"0.641... | 0.0 | -1 |
Returns string created from price. | private String createStringFromResult(int pounds, int shillings, int pence) {
log.trace(">> createStringFromResult() > pounds: {}, shillings: {}, pence: {}", pounds, shillings, pence);
StringBuilder stringResult = new StringBuilder();
appendData(stringResult, pounds, PriceType.POUND);
appendData(stringResult, shillings, PriceType.SHILLING);
appendData(stringResult, pence, PriceType.PENCE);
log.trace("<< createStringFromResult() < result: {}", stringResult);
return stringResult.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPriceString() {\n\t\treturn Utils.formatCurrencyNumber(price);//Double.toString(price.doubleValue()); //price.toString();\n\t}",
"String getPrice() {\n return Double.toString(price);\n }",
"String getPrice();",
"private String getFormattedPrice(double unformattedPrice) {\n String ... | [
"0.79329187",
"0.7682901",
"0.73582745",
"0.718477",
"0.70635766",
"0.7058784",
"0.7005523",
"0.69929665",
"0.6964357",
"0.68711644",
"0.6761397",
"0.6722613",
"0.66969824",
"0.6687996",
"0.6687996",
"0.66855097",
"0.66409594",
"0.65660024",
"0.64332694",
"0.6402548",
"0.6393... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Iterator<Key> iterator() {
return new ListIterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean hasNext() {
return current!=null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Key next() {
Key i=current.item;
current=current.next;
return i;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
click on the continue button | public void clickContinue() {
continueButton.click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clickContinueButton() {\n clickElement(continueButtonLocator);\n }",
"public void Regcontinuebutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"T... | [
"0.8965772",
"0.79491955",
"0.7862926",
"0.7832071",
"0.7799839",
"0.7790874",
"0.7735907",
"0.7643051",
"0.7509346",
"0.7429693",
"0.7378038",
"0.7350019",
"0.7342304",
"0.72775215",
"0.7138564",
"0.7133811",
"0.7128904",
"0.71169305",
"0.7078358",
"0.70767653",
"0.707579",
... | 0.9092022 | 0 |
click on login button | public void clickLogin() {
continueButton.click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton)... | [
"0.8994518",
"0.89293975",
"0.8629465",
"0.8543839",
"0.84612346",
"0.8452833",
"0.8389986",
"0.83745706",
"0.8364653",
"0.8268765",
"0.82282907",
"0.8122479",
"0.8090512",
"0.799629",
"0.7974702",
"0.7968648",
"0.7967627",
"0.7952697",
"0.7941809",
"0.7897555",
"0.7793947",
... | 0.83840406 | 7 |
Returns a sink which publishes the items it receives to a distributed reliable topic with the specified name. No state is saved to snapshot for this sink. After the job is restarted, the items will likely be duplicated, providing an atleastonce guarantee. Local parallelism for this sink is 1. | @Nonnull
public static <T> Sink<T> reliableTopic(@Nonnull String reliableTopicName) {
return SinkBuilder.<ITopic<T>>sinkBuilder("reliableTopicSink(" + reliableTopicName + "))",
ctx -> ctx.jetInstance().getReliableTopic(reliableTopicName))
.<T>receiveFn(ITopic::publish)
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MockTopicSubscriber getDurableTopicSubscriber(String name)\n {\n return (MockTopicSubscriber)topicDurableSubscriberMap.get(name);\n }",
"@Override\n public IPublisherEndpoint getNewOrExistingPublisher(String endpointName, String streamId) {\n DistributedPublisherEndpoint publisherEn... | [
"0.5578742",
"0.4760358",
"0.45300323",
"0.4525916",
"0.44488344",
"0.4444997",
"0.4372353",
"0.43582076",
"0.4337598",
"0.42993116",
"0.4299025",
"0.4252451",
"0.42399272",
"0.41844043",
"0.41761476",
"0.416238",
"0.41598102",
"0.41556686",
"0.41427022",
"0.4141957",
"0.4127... | 0.56701523 | 0 |
Returns a sink which discards all received items. | @Nonnull
public static <T> Sink<T> noop() {
return fromProcessor("noop", preferLocalParallelismOne(noopP()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n\t\tpublic IntegrationFlow discardFlow() {\n\t\t\treturn IntegrationFlows.from(sourceDirectory(), \n\t\t\t\t\tc -> c.poller(Pollers.fixedDelay(1000)))\n\t\t\t\t\t.filter(onlyTxt(),\n\t\t\t\t\t\t\tnotTxt -> notTxt\n\t\t\t\t\t\t\t.discardFlow(flow -> flow\n\t\t\t\t\t\t\t\t\t.filter(onlyXml(),\n\t\t\t\t\t\t\t\... | [
"0.5909376",
"0.56794393",
"0.5411346",
"0.5211276",
"0.517075",
"0.51327324",
"0.50699925",
"0.50299346",
"0.49630862",
"0.496118",
"0.4951932",
"0.49477857",
"0.48373285",
"0.4806751",
"0.47938994",
"0.4790136",
"0.47777444",
"0.4770561",
"0.47593334",
"0.4752583",
"0.47447... | 0.54298353 | 2 |
Constructs a framed pane with the simple frame. | public FramedPane() {
LoggingTool.print( "Constructing new FramedPane." );
// Draw Frame
Line topLine = new Line( 1, 1, this.getWidth(), 1 );
Line rightLine = new Line( this.getWidth(), 1, this.getWidth(), this.getHeight() );
Line leftLine = new Line( 1, 1, 1, this.getHeight() );
Line bottomLine = new Line( 1, this.getHeight(), this.getWidth(), this.getHeight() );
topLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );
rightLine.startXProperty().bind( this.widthProperty().subtract( 1 ) );
rightLine.endXProperty().bind( rightLine.startXProperty() );
rightLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );
leftLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );
bottomLine.startYProperty().bind( this.heightProperty().subtract( 1 ) );
bottomLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );
bottomLine.endYProperty().bind( bottomLine.startYProperty() );
this.getChildren().addAll( topLine, rightLine, leftLine, bottomLine );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Frame createFrame();",
"public FramedPane( String message ) {\n\t\tthis();\n\t\tLabel label = new Label( message );\n\t\tlabel.layoutXProperty().bind( this.widthProperty().divide( 2 ).subtract( label.widthProperty().divide( 2 ) ) );\n\t\tlabel.layoutYProperty()\n\t\t\t\t.bind( this.heightProperty().divide( 2 ).s... | [
"0.70261836",
"0.6604933",
"0.653739",
"0.6530293",
"0.6518771",
"0.6430275",
"0.639984",
"0.638255",
"0.6364788",
"0.6357892",
"0.62096274",
"0.6176573",
"0.61755985",
"0.61601675",
"0.61557525",
"0.61515146",
"0.61420304",
"0.61378896",
"0.6113609",
"0.6098726",
"0.60980934... | 0.7125031 | 0 |
Constructs a framed pane with an additional label in the center of the pane. | public FramedPane( String message ) {
this();
Label label = new Label( message );
label.layoutXProperty().bind( this.widthProperty().divide( 2 ).subtract( label.widthProperty().divide( 2 ) ) );
label.layoutYProperty()
.bind( this.heightProperty().divide( 2 ).subtract( label.heightProperty().divide( 2 ) ) );
this.getChildren().addAll( label );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FramedPane() {\n\t\tLoggingTool.print( \"Constructing new FramedPane.\" );\n\t\t// Draw Frame\n\t\tLine topLine = new Line( 1, 1, this.getWidth(), 1 );\n\t\tLine rightLine = new Line( this.getWidth(), 1, this.getWidth(), this.getHeight() );\n\t\tLine leftLine = new Line( 1, 1, 1, this.getHeight() );\n\t\tLi... | [
"0.66215366",
"0.63878214",
"0.63443726",
"0.62587285",
"0.6122028",
"0.60785526",
"0.60029775",
"0.5939865",
"0.59152186",
"0.5869646",
"0.5826406",
"0.5819069",
"0.5817329",
"0.58068573",
"0.58008456",
"0.5778868",
"0.5772025",
"0.5746984",
"0.57456183",
"0.57432836",
"0.57... | 0.72376686 | 0 |
Make sure the database is clean before we do anything else. | @BeforeClass
public static void clean() {
DatabaseTest.clean();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }",
"private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when... | [
"0.81051064",
"0.7756419",
"0.77536184",
"0.76694417",
"0.7617115",
"0.75344735",
"0.7472677",
"0.7458917",
"0.7391243",
"0.7352193",
"0.73281217",
"0.7325968",
"0.7325968",
"0.7325619",
"0.7320486",
"0.7320183",
"0.7302592",
"0.72890127",
"0.7191508",
"0.71442884",
"0.712997... | 0.6969744 | 29 |
Setup dat default device for testing purposes. | @Before
public void setup() {
device = new Device(deviceID, token);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }",
"public void in... | [
"0.69858825",
"0.6749545",
"0.6445037",
"0.6119953",
"0.6089045",
"0.6002059",
"0.59242713",
"0.59016865",
"0.5849737",
"0.5834237",
"0.58164227",
"0.5811928",
"0.5787274",
"0.57726777",
"0.57604235",
"0.5737298",
"0.5715457",
"0.56851196",
"0.5655196",
"0.5633454",
"0.558267... | 0.68300253 | 1 |
Try creating a new device successfully. | @Test
public void newDeviceTest() {
Device newDevice = newDevice(deviceID);
assertEquals(deviceID, newDevice.getDeviceID());
assertNotNull(newDevice.getToken());
executeManipulationQuery("DELETE FROM device WHERE device_id = ?", deviceID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Test\... | [
"0.7199401",
"0.7196945",
"0.7074092",
"0.697835",
"0.6444173",
"0.6318754",
"0.61608744",
"0.59408927",
"0.5723995",
"0.5718054",
"0.5690633",
"0.5664912",
"0.562894",
"0.56280863",
"0.5623939",
"0.55974877",
"0.55524504",
"0.5528339",
"0.5519532",
"0.5512891",
"0.5509157",
... | 0.6648362 | 4 |
Try creating a device that already exists. | @Test
public void newDeviceDuplicateTest() {
DatabaseTest.setupDevice();
Device newDevice = newDevice(DatabaseTest.DEVICE_ID);
assertNull(newDevice);
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Overr... | [
"0.7591084",
"0.63586175",
"0.62777346",
"0.59755033",
"0.59224147",
"0.5789226",
"0.5715562",
"0.55897814",
"0.53088427",
"0.5300844",
"0.526949",
"0.5255573",
"0.5250823",
"0.52320164",
"0.5224313",
"0.52110636",
"0.5191871",
"0.5186051",
"0.5157631",
"0.5150822",
"0.514909... | 0.7076179 | 1 |
Try getting a device from the database. | @Test
public void getDeviceTest() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);
assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void retrieveDeviceTest() throws ApiException {\n String collectionId = null;\n String deviceId = null;\n Device response = api.retrieveDevice(collectionId, deviceId);\n\n // TODO: test validations\n }",
"public Device findById(Long id) throws Exception;",
"publ... | [
"0.66631365",
"0.65182596",
"0.64819044",
"0.64264786",
"0.63893986",
"0.6386411",
"0.6293772",
"0.62799937",
"0.6162092",
"0.6092839",
"0.6025582",
"0.5997127",
"0.5929559",
"0.59082294",
"0.589455",
"0.5861005",
"0.58404946",
"0.58138865",
"0.5758002",
"0.57514054",
"0.5693... | 0.70557755 | 0 |
Try getting a non existing device. | @Test
public void getDeviceNullTest() {
assertNull(getDevice("Non existing device"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void findDevice() t... | [
"0.6332689",
"0.6227301",
"0.6182152",
"0.6178426",
"0.61456895",
"0.6127896",
"0.61157954",
"0.60985756",
"0.6062948",
"0.598596",
"0.5934825",
"0.5932047",
"0.593011",
"0.5827812",
"0.5786167",
"0.5780926",
"0.5721709",
"0.56917185",
"0.5690258",
"0.56896764",
"0.5654937",
... | 0.69655657 | 0 |
Test the deviceID get method. | @Test
public void getDeviceIDTest() {
assertEquals(deviceID, device.getDeviceID());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"java.lang.String getDeviceId();",
"... | [
"0.7395947",
"0.7085113",
"0.6998577",
"0.6804894",
"0.6708932",
"0.6708932",
"0.65810317",
"0.65752685",
"0.655252",
"0.6526285",
"0.6499472",
"0.6475384",
"0.64715654",
"0.64668125",
"0.63850474",
"0.6352395",
"0.63261867",
"0.63261867",
"0.6317466",
"0.6308636",
"0.6299207... | 0.85887784 | 0 |
Test the token get method. | @Test
public void getTokenTest() {
assertEquals(token, device.getToken());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void getTokenTest() {\n\t}",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"@Test\r\n public void testGetAuthorisationToken() throws Exception {\r\n LOG.info(\"getAuthorisatio... | [
"0.7643669",
"0.7222615",
"0.7222615",
"0.7088127",
"0.7087132",
"0.6986095",
"0.6776863",
"0.67265534",
"0.67265534",
"0.67265534",
"0.67265534",
"0.67265534",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6684821",
"0.66651016",
"0.6537943... | 0.73436964 | 1 |
Try authenticating a correct device. | @Test
public void authenticateTestSucces() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);
assertTrue(device.authenticate());
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getStr... | [
"0.68711853",
"0.6837214",
"0.6746004",
"0.665514",
"0.63580257",
"0.6240975",
"0.6121713",
"0.6116787",
"0.5998402",
"0.598431",
"0.59548557",
"0.5939055",
"0.58380884",
"0.5812435",
"0.58032334",
"0.5774737",
"0.5644758",
"0.562718",
"0.5571417",
"0.5565953",
"0.554992",
... | 0.6793781 | 2 |
Try authenticating a device that does not exist in the database. | @Test
public void authenticateTestFailure() {
assertFalse(device.authenticate());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void authenticateTestSucces() {\n ... | [
"0.69649106",
"0.6278783",
"0.5870311",
"0.5839943",
"0.5759432",
"0.5703756",
"0.56538093",
"0.56504554",
"0.5622083",
"0.5540928",
"0.55361724",
"0.55135417",
"0.55017436",
"0.54774535",
"0.5472122",
"0.5421953",
"0.5410877",
"0.53898007",
"0.53898007",
"0.5378303",
"0.5372... | 0.64470553 | 1 |
Try authenticating a device with an invalid token. | @Test
public void authenticateTestFailure2() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, "other_token");
assertFalse(device.authenticate());
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n... | [
"0.64344186",
"0.63598055",
"0.6214004",
"0.59219736",
"0.57711023",
"0.5769175",
"0.56638026",
"0.5607129",
"0.55992377",
"0.55801964",
"0.55777",
"0.5546856",
"0.55389816",
"0.54972714",
"0.5478554",
"0.5424878",
"0.5404034",
"0.5397922",
"0.53841156",
"0.5350726",
"0.53481... | 0.6661829 | 0 |
Try converting the device fields to JSON. | @Test
public void toJsonTest() {
JsonObject jsonObject = device.toJson();
assertEquals(deviceID, jsonObject.get("deviceID").getAsString());
assertEquals(token, jsonObject.get("token").getAsString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fingerprintDataConvertedtoJSON() {\n String msgStr = \"\";\n JSONObject jsonObject = new JSONObject();\n\n try {\n /* jsonObject.put(\"errcode\", \"errcode1\");\n jsonObject.put(\"errInfo\", \"errInfo1\");\n jsonObject.put(\"fCount\", \"fCount1\");\... | [
"0.6019024",
"0.55245554",
"0.549993",
"0.5451041",
"0.52900565",
"0.51598555",
"0.512278",
"0.50710016",
"0.5048867",
"0.5039743",
"0.503355",
"0.5025372",
"0.5019211",
"0.5012467",
"0.49943638",
"0.49711004",
"0.4940479",
"0.49194425",
"0.49139598",
"0.49076176",
"0.4893790... | 0.6363875 | 0 |
Verify that a device equal to itself. | @Test
public void equalsSelfTest() {
assertEquals(device, device);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Override... | [
"0.7282352",
"0.681908",
"0.67873687",
"0.6660841",
"0.6608597",
"0.6299999",
"0.58905077",
"0.5840918",
"0.5763268",
"0.55699366",
"0.5541957",
"0.554097",
"0.5431253",
"0.54060173",
"0.5380812",
"0.53751373",
"0.53406847",
"0.53125685",
"0.5294518",
"0.52772295",
"0.5277229... | 0.77241164 | 0 |
Verify that a device is the same if all fields are the same. | @Test
public void equalsSameTest() {
Device device2 = new Device(deviceID, token);
assertEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(dev... | [
"0.6695086",
"0.6188238",
"0.61726606",
"0.60820544",
"0.608084",
"0.60682505",
"0.6012459",
"0.59291244",
"0.5893796",
"0.581767",
"0.5727836",
"0.5690414",
"0.56498516",
"0.5648361",
"0.55921745",
"0.55440766",
"0.5456448",
"0.54538965",
"0.5444663",
"0.5393568",
"0.5377716... | 0.7375334 | 0 |
Verify that a device is not the same if the token is different. | @Test
public void equalsOtherTest() {
Device device2 = new Device(deviceID, "other");
assertNotEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Override\r... | [
"0.70291156",
"0.68625027",
"0.6360004",
"0.63238055",
"0.62766534",
"0.5842329",
"0.584167",
"0.5777394",
"0.5729144",
"0.568806",
"0.5586255",
"0.5550152",
"0.55454195",
"0.5521967",
"0.5516615",
"0.5463803",
"0.5452913",
"0.5398932",
"0.53976655",
"0.5374771",
"0.5373376",... | 0.63815355 | 2 |
Verify that a device is not the same if the deviceID is different. | @Test
public void equalsOtherTest2() {
Device device2 = new Device("other", token);
assertNotEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Override... | [
"0.7070641",
"0.6836002",
"0.663642",
"0.6375318",
"0.61506456",
"0.60372275",
"0.6016397",
"0.60041153",
"0.5998897",
"0.59645456",
"0.5943098",
"0.5940464",
"0.5940464",
"0.59145546",
"0.5876906",
"0.5762232",
"0.5735304",
"0.5700056",
"0.569927",
"0.56408656",
"0.5585567",... | 0.6600555 | 3 |
Verify that a device does not equal null. | @Test
public void equalsOtherTest3() {
assertFalse(device.equals(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceNullTest() {\n assertNull(getDevice(\"Non existing device\"));\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n ... | [
"0.6952858",
"0.6738776",
"0.6150311",
"0.6044723",
"0.603763",
"0.5857038",
"0.580392",
"0.57772446",
"0.57772446",
"0.5757307",
"0.5698732",
"0.56503624",
"0.56495404",
"0.5639712",
"0.5635187",
"0.56266254",
"0.56051934",
"0.5572405",
"0.55631566",
"0.5557087",
"0.55349016... | 0.73539305 | 0 |
Verify that a device does not equal a string. | @Test
public void equalsOtherTest4() {
assertFalse(device.equals(""));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"public void testGetSimOperator_unavailableDevic... | [
"0.61699253",
"0.59663725",
"0.5862466",
"0.5785386",
"0.5760103",
"0.57455885",
"0.57406104",
"0.57379174",
"0.56310666",
"0.55957204",
"0.5549952",
"0.54829866",
"0.5428387",
"0.54271895",
"0.54264027",
"0.53996426",
"0.53797174",
"0.53340214",
"0.5312544",
"0.5296931",
"0.... | 0.7109405 | 0 |
Verify that the hashcode for two identical devices is the same. | @Test
public void hashCodeTest() {
Device device2 = new Device(deviceID, token);
assertEquals(device.hashCode(), device2.hashCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRe... | [
"0.7091553",
"0.6909622",
"0.67390656",
"0.6736852",
"0.65169066",
"0.6452409",
"0.6311655",
"0.6083775",
"0.606526",
"0.60417056",
"0.6014551",
"0.5967826",
"0.596443",
"0.59623533",
"0.5937611",
"0.5921317",
"0.59076154",
"0.5881171",
"0.584627",
"0.5841183",
"0.5834691",
... | 0.7249519 | 0 |
Verify that the hashcode for two different devices is NOT the same. | @Test
public void hashCodeTest2() {
Device device2 = new Device("other", token);
assertNotEquals(device.hashCode(), device2.hashCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testDifferentHashCodes() {\n assertNotEquals(loginRequest1.hashCode(), loginRequest2.hashCode());\n }",
"@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCod... | [
"0.72194546",
"0.66591394",
"0.6652388",
"0.6640353",
"0.63581836",
"0.63558644",
"0.63148195",
"0.6277097",
"0.6026791",
"0.599042",
"0.5984016",
"0.59783304",
"0.5962575",
"0.59530526",
"0.5951269",
"0.59115636",
"0.5854645",
"0.58508027",
"0.5846053",
"0.5839486",
"0.58082... | 0.7312315 | 0 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static SubSrvicesFragment newInstance(int ser_id,String service_img,String service_title,String service_desc) {
SubSrvicesFragment fragment = new SubSrvicesFragment();
Bundle args = new Bundle();
args.putInt(SERVICE_ID, ser_id);
args.putString(SERVICE_IMAGE,service_img);
args.putString(SERVICE_TITLE, service_title);
args.putString(SERVICE_DESC, service_desc);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n ... | [
"0.7259329",
"0.72331375",
"0.71140355",
"0.69909847",
"0.69902235",
"0.6834592",
"0.683074",
"0.68134046",
"0.6801526",
"0.6801054",
"0.67653185",
"0.6739714",
"0.6739714",
"0.6727412",
"0.6717231",
"0.6705855",
"0.6692112",
"0.6691661",
"0.66869426",
"0.66606814",
"0.664618... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view =inflater.inflate(R.layout.fragment_sub_services, container, false);
init(view);
SharedPreferencesHelper.setIsMainAct("SubServices",getContext());
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@... | [
"0.6619185",
"0.65246344",
"0.6473144",
"0.6473144",
"0.64351684",
"0.6325494",
"0.62368196",
"0.6189416",
"0.6158721",
"0.61455715",
"0.6123594",
"0.6107332",
"0.6101038",
"0.6092755",
"0.6049496",
"0.6049496",
"0.60442764",
"0.604003",
"0.604003",
"0.6007846",
"0.59999037",... | 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public int... | [
"0.73246294",
"0.7208353",
"0.7135137",
"0.7124237",
"0.71221745",
"0.7014703",
"0.6976967",
"0.6976967",
"0.6976967",
"0.697338",
"0.6967542",
"0.6965679",
"0.69606704",
"0.6953404",
"0.6943448",
"0.69343144",
"0.6929988",
"0.6927487",
"0.6922498",
"0.6910781",
"0.6902739",
... | 0.0 | -1 |
TODO: Update argument type and name | void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic ... | [
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.599... | 0.0 | -1 |
/final ProgressDialog dialog = new ProgressDialog(getContext()); dialog.setMessage("getting sub services ..."); dialog.setCancelable(false); dialog.show(); | private void GetSubServices(String id) {
HashMap<String,String> param = new HashMap();
param.put(Constants.SERVICE_ID,id);
//url with params
String url= SupportFunctions.appendParam(MyApplication.URL_GET_SUBSERVICES,param);
//url without params
//String url= MyApplication.URL_GET_SERVICES;
Log.e("SubService url",url);
JsonObjectRequest obreq = new JsonObjectRequest(Request.Method.GET,url,null,
// The third parameter Listener overrides the method onResponse() and passes
//JSONObject as a parameter
new Response.Listener<JSONObject>() {
// Takes the response from the JSON request
@Override
public void onResponse(JSONObject response) {
try
{
//getting test master array
// testMasterDetails = testMasterArray.toString();
Log.e("SubService Json_string",response.toString());
Gson gson = new Gson();
SubServiceResponse subServiceResponse= gson.fromJson(response.toString(), SubServiceResponse.class);
if(subServiceResponse.getResponse().equals("100")) {
SubServices[] service = subServiceResponse.getData();
for (SubServices item : service) {
SubServices sub=new SubServices(item.getSer_img_url(),item.getSer_name(),item.getSub_service_id(),service_id,item.getSub_service_desc());
services.add(sub);
Log.e("SubService img title", item.getSer_name());
}
mAdapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(NavigationActivity.this, "Invalid album id", Toast.LENGTH_SHORT).show();
//dialog.dismiss();
}
//dialog.dismiss();
}
},
// The final parameter overrides the method onErrorResponse() and passes VolleyError
//as a parameter
new Response.ErrorListener() {
@Override
// Handles errors that occur due to Volley
public void onErrorResponse(VolleyError error) {
Log.e("Volley", "Test Error");
// showNoConnectionDialog();
//dialog.dismiss();
}
}
);
mVolleyRequest.add(obreq);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(MainActivity.this);\n ... | [
"0.73390734",
"0.7232427",
"0.72016925",
"0.70982784",
"0.70974237",
"0.70929563",
"0.7023055",
"0.70191586",
"0.6983381",
"0.6983381",
"0.69701207",
"0.6943943",
"0.6941362",
"0.692392",
"0.69017106",
"0.6894601",
"0.688262",
"0.6855221",
"0.68524355",
"0.6845284",
"0.682986... | 0.0 | -1 |
Takes the response from the JSON request | @Override
public void onResponse(JSONObject response) {
try
{
//getting test master array
// testMasterDetails = testMasterArray.toString();
Log.e("SubService Json_string",response.toString());
Gson gson = new Gson();
SubServiceResponse subServiceResponse= gson.fromJson(response.toString(), SubServiceResponse.class);
if(subServiceResponse.getResponse().equals("100")) {
SubServices[] service = subServiceResponse.getData();
for (SubServices item : service) {
SubServices sub=new SubServices(item.getSer_img_url(),item.getSer_name(),item.getSub_service_id(),service_id,item.getSub_service_desc());
services.add(sub);
Log.e("SubService img title", item.getSer_name());
}
mAdapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(NavigationActivity.this, "Invalid album id", Toast.LENGTH_SHORT).show();
//dialog.dismiss();
}
//dialog.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }",
"private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try... | [
"0.6976162",
"0.6837445",
"0.6687928",
"0.6647482",
"0.6575177",
"0.6485794",
"0.64705366",
"0.6437682",
"0.64253217",
"0.63901097",
"0.63652235",
"0.62953717",
"0.6281517",
"0.62787837",
"0.62755907",
"0.6272175",
"0.626835",
"0.6265117",
"0.624509",
"0.62404484",
"0.6240448... | 0.0 | -1 |
return e at index i | E set(int i , E e) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public E get(int index);",
"public abstract E get(int index);",
"E get(int i) throws IndexOutOfBoundsException;",
"@Override\n\tpublic E get(int i) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"E get( int index );",
"E get(int i) {\r\n @SuppressWarnings(\"unchecked\")\r\n fin... | [
"0.72692114",
"0.72119576",
"0.71128625",
"0.6997801",
"0.6964859",
"0.6935415",
"0.6877303",
"0.6874814",
"0.68653965",
"0.67293906",
"0.66522217",
"0.65948254",
"0.6540176",
"0.64983124",
"0.64835256",
"0.64577234",
"0.64515567",
"0.64353263",
"0.64030397",
"0.63800985",
"0... | 0.58005446 | 91 |
set new value e at index i | void add(int i , E e) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int i,T e){\n if(rangeCheck(i)){\n data[i] = e;\n }\n }",
"void set(int i, E e) {\r\n arr[i] = e;\r\n }",
"@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }",
"@Override\n ... | [
"0.80252564",
"0.79948956",
"0.79639864",
"0.7850504",
"0.7798364",
"0.75807863",
"0.7285817",
"0.7278397",
"0.7219048",
"0.72055155",
"0.71947634",
"0.70624995",
"0.6904848",
"0.6854891",
"0.6834597",
"0.6734281",
"0.6643364",
"0.66392756",
"0.66392756",
"0.66287124",
"0.657... | 0.0 | -1 |
insert e at index i. require shifting | E remove(int i ) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n ... | [
"0.71154636",
"0.70278484",
"0.68761104",
"0.6816621",
"0.679019",
"0.6717794",
"0.6681325",
"0.66693664",
"0.66360116",
"0.6552214",
"0.6463367",
"0.6459291",
"0.6454557",
"0.64286995",
"0.64262825",
"0.636302",
"0.63554263",
"0.6350967",
"0.63321257",
"0.6328625",
"0.631146... | 0.0 | -1 |
remove at index i. require shifting | Iterator<E> iterator(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public E remove(int i) {\n\t /*\n\t * Add code here.\n\t * Remember to compact the array so there are no spaces in between\n\t * if an element from the middle is removed or an element at the\n\t * beginning of the array is removed.\n\t */\n\t\t if(i<=num_elements){\n\t\t\t E ... | [
"0.76431495",
"0.7570188",
"0.75287914",
"0.74485254",
"0.7438022",
"0.74319005",
"0.7416904",
"0.7380336",
"0.7336719",
"0.7308821",
"0.7250202",
"0.72111803",
"0.71941626",
"0.71871734",
"0.7183009",
"0.7137941",
"0.71343505",
"0.7120052",
"0.7120052",
"0.7120052",
"0.71200... | 0.0 | -1 |
Function to validate furniture item ID's in the range 10007000 | @Override
public Boolean validateFurnitureItem(int furnitureItemID) {
if(furnitureItemID >= 1000 && furnitureItemID <= 7000)
{
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n f... | [
"0.61948365",
"0.596552",
"0.5905156",
"0.58927876",
"0.5874114",
"0.56741613",
"0.56349355",
"0.561663",
"0.5615488",
"0.56101143",
"0.56101143",
"0.55675757",
"0.5564238",
"0.55611897",
"0.5520083",
"0.5516696",
"0.5501152",
"0.54864",
"0.547726",
"0.54445094",
"0.54368484"... | 0.7388896 | 0 |
Empty stub as instructed in Step 8.2 | @Override
public void recordOrder(int customerID, int furnitureItemID, int quantity) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Stub createStub();",
"public ArrivalQuayStub() {\n\t}",
"public void clear() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void reset() {\n/* 277 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public interface IOngoingStubbing {}",
"@Stub\n\tpublic void i... | [
"0.70646244",
"0.676479",
"0.67376626",
"0.6694609",
"0.66458017",
"0.642528",
"0.6379924",
"0.6379924",
"0.6379924",
"0.6379924",
"0.6379924",
"0.63391733",
"0.63233",
"0.62456745",
"0.62456745",
"0.6244214",
"0.6235842",
"0.62204915",
"0.6203282",
"0.61909854",
"0.61700207"... | 0.0 | -1 |
Handling validate function if objects are passed as parameters instead of integers | public boolean validateFurnitureItem(Object object) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void validate(T object);",
"protected abstract Object validateParameter(Object constraintParameter);",
"@Override\n\tpublic void validate(Object arg0, Errors arg1) {\n\n\t}",
"private void validateUserObject(User user) {\n }",
"private void validateInputParameters(){\n\n }",
"public abstract Value v... | [
"0.6951394",
"0.6410098",
"0.6322597",
"0.6186981",
"0.6140924",
"0.61305094",
"0.601978",
"0.60044515",
"0.59180075",
"0.591462",
"0.5912784",
"0.5909715",
"0.58997977",
"0.58914137",
"0.5891136",
"0.58795965",
"0.5872015",
"0.58518136",
"0.58144003",
"0.58060247",
"0.580007... | 0.0 | -1 |
/ ===================== Setup Deck ===================== | private List<Card> setupDeck(){
List<Card> llist = new LinkedList<Card>();
String[] faceCards = {"J","Q","K","A"};
String[] suits = {"spades","clubs","diamonds","hearts"};
for(int i=2; i<=10; i++){
for(int j=1; j<=4; j++){
llist.add(new Card(Integer.toString(i), suits[j-1], j, i));
}
}
for(int k=1; k<=4; k++){
for(int l=1; l<=4; l++){
llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));
}
}
return llist;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }",
"public Deck() {\n generateDeckOfCards();\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\n\t\ttestDeck = new Deck(1, true);\r\n\t\tdeckCards = testDeck.getDeck();\r\n\t\t\r\n\t}",
"public Deck() {\n th... | [
"0.7144908",
"0.6966856",
"0.6804872",
"0.6783803",
"0.65325373",
"0.64951986",
"0.64724517",
"0.6466344",
"0.63660324",
"0.6341317",
"0.633376",
"0.63039386",
"0.6288675",
"0.625926",
"0.62011987",
"0.61610335",
"0.6132482",
"0.61239964",
"0.61236876",
"0.6121795",
"0.608889... | 0.5899542 | 36 |
/ ===================== Convert to JSON ===================== | private String convertToJson(Deck<Card> deck){
JSONObject jsonObj = new JSONObject();
List<Card> cards = deck.getDeck();
List<String> parsedCards = new LinkedList<String>();
int i = 1;
for(Card card: cards){
parsedCards.add(card.getCardValue() + "-" + card.getSuit());
i++;
}
jsonObj.put("deck",parsedCards);
JSONArray jArray = jsonObj.getJSONArray("deck");
return jArray.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String toJson() throws IOException;",
"String toJSON();",
"public abstract String toJson();",
"JSONObject toJson();",
"JSONObject toJson();",
"public abstract Object toJson();",
"public abstract String toJsonString();",
"public JsonObject toJson();",
"public String toJSON() throws JSONException;",
... | [
"0.8130834",
"0.79262704",
"0.7891567",
"0.78335464",
"0.78335464",
"0.7629053",
"0.75798935",
"0.74853814",
"0.7279326",
"0.72132796",
"0.7202501",
"0.7179532",
"0.7128874",
"0.70316786",
"0.6985033",
"0.6984452",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.