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 |
|---|---|---|---|---|---|---|
Delete Product From Wishlist and Apply it | public void clickDeleteProductandApply()throws Exception{
SearchPageFactory pageFactory = new SearchPageFactory(driver);
clickElement(pageFactory.wishListItemDeleteButton,Constant.explicitTime);
clickElement(pageFactory.wishListItemDeleteOkButton,Constant.explicitTime);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void deleteWishList(int wishNo) throws Exception {\n\r\n\t}",
"public void deletesingleWishlist(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWritableDatabase();\n db.delete(DatabaseConstant.TABLE_NAME_WISHLIST, DatabaseConstant.TABLE_WISHLIST_ID + \" = ?\",\n... | [
"0.72396445",
"0.7191579",
"0.71708584",
"0.6865745",
"0.6756253",
"0.6697665",
"0.6661169",
"0.66494685",
"0.65184885",
"0.6492305",
"0.64504534",
"0.6395989",
"0.6375045",
"0.635749",
"0.6350533",
"0.63370097",
"0.63288677",
"0.63239133",
"0.62903196",
"0.6276515",
"0.62644... | 0.64803195 | 10 |
Get Each Product Header In WishList | public List<WebElement> getProductHeaderInWishList()throws Exception{
SearchPageFactory pageFactory = new SearchPageFactory(driver);
List<WebElement> productList = pageFactory.wishListProductList;
return productList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String clickWishListProductListAndGetProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.openWishlistProductList,Constant.explicitTime);\r\n String wishlistProductItemHeader = getElementText(pageFactory.wishLis... | [
"0.7306887",
"0.6576159",
"0.6121568",
"0.60496134",
"0.60357136",
"0.57816696",
"0.57157755",
"0.5644559",
"0.55835414",
"0.55447865",
"0.5448093",
"0.5437566",
"0.53751785",
"0.5340232",
"0.5305717",
"0.5282478",
"0.5267074",
"0.5243552",
"0.5243146",
"0.52276367",
"0.52224... | 0.74931365 | 0 |
/ author: mitesh Goswami version: 1.0 organization: stl | public interface Rotatable {
void rotate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void init(){\n java.util.Collection<String> collection = new ArrayList<>();\n\n // List Implementation\n // use for ordered collection with duplicates\n // Items can be retrieved and inserted at specific positions (like array)\n //\n // ArrayLi... | [
"0.54693556",
"0.54170555",
"0.52801466",
"0.5176844",
"0.5153182",
"0.51462716",
"0.51382744",
"0.5078951",
"0.5071501",
"0.5062422",
"0.5058153",
"0.5050062",
"0.49761382",
"0.49696118",
"0.49456987",
"0.49239972",
"0.49068967",
"0.48984557",
"0.48977816",
"0.48960084",
"0.... | 0.0 | -1 |
HtmlPage page = client.getPage(" | private String getJsonInfo(HtmlPage page) throws Exception {
List<DomElement> list = page.getElementsByTagName("tr");
if (list.size() < 8) {
System.out.println("短信验证码获取错误,或者查无此人,请重试...");
return null;
}
Map<String, String> map = new HashMap<>();
for (int i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PageAgent getPage();",
"Page getPage();",
"@Test\n public void serialization_pageLoad() throws Exception {\n final String page1Content = \"<html><body>hello 1</body></html>\";\n final WebClient client = getWebClient();\n final HtmlPage page1 = loadPage(client, page1Content, null, URL_FI... | [
"0.6984842",
"0.6636621",
"0.64321274",
"0.6233317",
"0.6150108",
"0.5959177",
"0.59193105",
"0.5916243",
"0.5910076",
"0.58773726",
"0.58665895",
"0.58665895",
"0.58665895",
"0.5834816",
"0.5805917",
"0.57881504",
"0.5762325",
"0.5737542",
"0.57332426",
"0.57233924",
"0.5709... | 0.0 | -1 |
The entry point of the application. | @SuppressWarnings("resource")
public static void main(String[] args) {
final Scanner in = new Scanner(System.in);
// Enter the port to listen
System.out.print("Port: ");
final int port = in.nextInt();
in.nextLine();
// Start the server
Server server = new Se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n startApplication();\n }",
"public static void main(String[] args) {\n\t\trunApplication();\n\t}",
"public static void main() {\n \n }",
"public MainEntryPoint() {\r\n\r\n }",
"public static void main( String[] args )\n\t{\n\t\trunApp();\n\t}... | [
"0.7238861",
"0.72304064",
"0.7170066",
"0.70989925",
"0.7028167",
"0.7019704",
"0.70138586",
"0.6977181",
"0.69714624",
"0.6955834",
"0.6945603",
"0.6927819",
"0.6869775",
"0.6858946",
"0.68571997",
"0.6847644",
"0.6827186",
"0.68258125",
"0.6813478",
"0.6807207",
"0.680452"... | 0.0 | -1 |
Date datestartPorOmissao = 20181212; Date dateendPorOmissao = 20181217; | public Trip() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getDateStartEnd(BudgetRecyclerView budget) {\n String viewByDate = budget.getDate();\n String[] dateArray = viewByDate.split(\"-\");\n for (int i = 0; i < dateArray.length; i++) {\n dateArray[i] = dateArray[i].trim();\n }\n startDate = CalendarSupport.conv... | [
"0.6634254",
"0.63096297",
"0.60624534",
"0.60114187",
"0.5988489",
"0.5959769",
"0.5950282",
"0.5895201",
"0.5854395",
"0.583461",
"0.583461",
"0.5828544",
"0.58161885",
"0.58161885",
"0.5804832",
"0.58034945",
"0.5803157",
"0.5797219",
"0.5797219",
"0.57571375",
"0.5741964"... | 0.0 | -1 |
/ Access modifiers changed, original: protected | public void onResume() {
super.onResume();
onLocationChanged(LocationState.getLocation());
onGpsStatusChanged(0, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic ... | [
"0.73623323",
"0.69830847",
"0.68941706",
"0.6798817",
"0.67315143",
"0.67264825",
"0.67049384",
"0.6551554",
"0.65256643",
"0.65247214",
"0.64783233",
"0.6459452",
"0.644003",
"0.6434508",
"0.641292",
"0.64095944",
"0.64055127",
"0.64055127",
"0.6402614",
"0.64020926",
"0.63... | 0.0 | -1 |
set a new Timer | public void startTimer() {
timer = new Timer();
//initialize the TimerTask's job
initializeTimerTask();
//schedule the timer, after the first 5000ms the TimerTask will run every 10000ms
timer.schedule(timerTask,100,1000);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTimer() {\n\t\t\n\t}",
"private void setNewTimer() {\n if (!isSetNewTimerThreadEnabled) {\n return;\n }\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new TimerTask() {\n\n @Override\n public void run() {\n // Send t... | [
"0.80297726",
"0.8024961",
"0.7895347",
"0.7712745",
"0.7557754",
"0.7450892",
"0.7417003",
"0.7387312",
"0.73718",
"0.73264486",
"0.7227012",
"0.7191423",
"0.7153251",
"0.71244836",
"0.71180797",
"0.71123695",
"0.70701283",
"0.7059955",
"0.69676024",
"0.6943264",
"0.6915357"... | 0.69499683 | 19 |
stop the timer, if it's not already null | public void stoptimertask() {
if (timer != null) {
timer.cancel();
timer = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stop(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\tmakeTimer();\n\t}",
"public void stop() {timer.stop();}",
"private void stop() {\n timer.cancel();\n timer = null;\n }",
"public void stop() {\n if (timer != null) {\n timer.cancel();\n }\n... | [
"0.8497302",
"0.8366858",
"0.8240035",
"0.82310647",
"0.81237704",
"0.7965069",
"0.7959551",
"0.79499227",
"0.7942527",
"0.7937088",
"0.78884596",
"0.7835463",
"0.7770726",
"0.7691699",
"0.7643069",
"0.75775534",
"0.7546481",
"0.7525107",
"0.7521666",
"0.74624795",
"0.741319"... | 0.0 | -1 |
/ / / / / / / / / | public static File writeObjectToFileNoExceptions(Serializable o, String filename)
/* */ {
/* 47 */ file = null;
/* 48 */ ObjectOutputStream oos = null;
/* */ try {
/* 50 */ file = new File(filename);
/* */
/* 52 */ oos = new ObjectOutputStream(new BufferedOutputStream(ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"private int rightChild(int i){return 2*i+2;}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public abstract void b... | [
"0.5532527",
"0.54391015",
"0.5251596",
"0.52418447",
"0.5150535",
"0.512878",
"0.50683415",
"0.5066834",
"0.50221753",
"0.50129646",
"0.50077325",
"0.50051177",
"0.49997202",
"0.499538",
"0.49736512",
"0.49707893",
"0.49684572",
"0.49598044",
"0.49381968",
"0.49364173",
"0.4... | 0.0 | -1 |
/ / / / / / / / | public static File writeObjectToTempFile(Serializable o, String filename)
/* */ throws IOException
/* */ {
/* 76 */ File file = File.createTempFile(filename, ".tmp");
/* 77 */ file.deleteOnExit();
/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"private int rightChild(int i){return 2*i+2;}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public abstract void b... | [
"0.55049527",
"0.54132545",
"0.5298104",
"0.52380925",
"0.52058434",
"0.5148157",
"0.5101382",
"0.507637",
"0.50369906",
"0.5031998",
"0.5009869",
"0.49817902",
"0.4981198",
"0.4978498",
"0.49735028",
"0.49626762",
"0.4937221",
"0.492919",
"0.49037388",
"0.48935315",
"0.48789... | 0.0 | -1 |
/ / / / / / / | public static File writeObjectToTempFileNoExceptions(Serializable o, String filename)
/* */ {
/* */ try
/* */ {
/* 93 */ return writeObjectToTempFile(o, filename);
/* */ } catch (Exception e) {
/* 95 */ System.err.println("Error writing object to file " + filename);
/* 96 */... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"private int rightChild(int i){return 2*i+2;}",
"public abstract void b... | [
"0.54559875",
"0.5367924",
"0.53646994",
"0.52593726",
"0.52143115",
"0.51733047",
"0.5140581",
"0.5087833",
"0.5074028",
"0.5050025",
"0.50280845",
"0.5000021",
"0.4974894",
"0.49447915",
"0.49402028",
"0.49391156",
"0.49119726",
"0.48956436",
"0.48737738",
"0.486269",
"0.48... | 0.0 | -1 |
/ / / / / / / / | public static Object readObjectFromFile(File file)
/* */ throws IOException, ClassNotFoundException
/* */ {
/* 109 */ ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(new FileInputStream(file))));
/* 110 */ Object o = ois.readObject();
/* 111 */ ois.clo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"private int rightChild(int i){return 2*i+2;}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public abstract void b... | [
"0.55049527",
"0.54132545",
"0.5298104",
"0.52380925",
"0.52058434",
"0.5148157",
"0.5101382",
"0.507637",
"0.50369906",
"0.5031998",
"0.5009869",
"0.49817902",
"0.4981198",
"0.4978498",
"0.49735028",
"0.49626762",
"0.4937221",
"0.492919",
"0.49037388",
"0.48935315",
"0.48789... | 0.0 | -1 |
/ / / / / / | public static Object readObjectFromFile(String filename)
/* */ throws IOException, ClassNotFoundException
/* */ {
/* 122 */ return readObjectFromFile(new File(filename));
/* */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void divide() {\n\t\t\n\t}",
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public abstract void bepaalGrootte();",
"public static void bottomHalf(... | [
"0.54752624",
"0.53829646",
"0.5297584",
"0.5293118",
"0.5212716",
"0.5184075",
"0.5162103",
"0.5139121",
"0.50989246",
"0.50701",
"0.5064597",
"0.5037957",
"0.4988331",
"0.49349895",
"0.4913298",
"0.49045634",
"0.49045634",
"0.48958537",
"0.48946676",
"0.48927677",
"0.489255... | 0.0 | -1 |
/ / / / / / / / | public static Object readObjectFromFileNoExceptions(File file)
/* */ {
/* 133 */ Object o = null;
/* */ try {
/* 135 */ ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(new FileInputStream(file))));
/* 136 */ o = ois.readObject();
/* 137 */ oi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"private int rightChild(int i){return 2*i+2;}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public abstract void b... | [
"0.55049527",
"0.54132545",
"0.5298104",
"0.52380925",
"0.52058434",
"0.5148157",
"0.5101382",
"0.507637",
"0.50369906",
"0.5031998",
"0.5009869",
"0.49817902",
"0.4981198",
"0.4978498",
"0.49735028",
"0.49626762",
"0.4937221",
"0.492919",
"0.49037388",
"0.48935315",
"0.48789... | 0.0 | -1 |
Add new measure to average time for message processing. | protected final void addToAverageClientProcessingTime(final long time) {
averageClientProcessing.addNewStat(time);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addMeasure(double currentMeasure) {\n\t\t// If there is no more failed allowed, do nothing\n\t\tif(isTraining()) {\n\t\t\t/* Repeat 4x times from the second time\n\t\t\t * What we do is add:\n\t\t\t * (measure 3 - measure 2) + (measure 4 - measure 3) + ... */\n\t\t\tif(1 <= remainingLearnExample && remainingL... | [
"0.65159017",
"0.6372669",
"0.6023107",
"0.5959406",
"0.58859986",
"0.5862249",
"0.58115584",
"0.5642129",
"0.5596184",
"0.55821",
"0.5532399",
"0.55023277",
"0.5422629",
"0.53962344",
"0.5395883",
"0.5368885",
"0.5349474",
"0.5327682",
"0.53271544",
"0.53097284",
"0.52908546... | 0.58486587 | 6 |
Get current average time for message processing. | public final long getAverageClientProcessingTime() {
return averageClientProcessing.getCurrentAverageTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getAverageTime()\n {\n return averageTime;\n }",
"public double averageProcessTime() {\n\t\tif (numCompleted < 1) {\n\t\t\treturn 0.0;\n\t\t} else {\n\t\treturn (double)totalProcessTime / (double)numCompleted;\n\t\t}\n\t}",
"public static double doAvgProcessingTime() {\n if (count >= 1)... | [
"0.7564436",
"0.74510866",
"0.73634666",
"0.73563266",
"0.730427",
"0.7282378",
"0.72563463",
"0.72561985",
"0.717227",
"0.7063809",
"0.7050479",
"0.70091796",
"0.6992272",
"0.68938226",
"0.6879897",
"0.6799154",
"0.67737216",
"0.66770434",
"0.65968454",
"0.6592424",
"0.65917... | 0.735677 | 3 |
Add new measure to average time for request processing. | protected final void addToAverageRequestProcessingTime(final long time) {
averageRequestProcessing.addNewStat(time);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addMeasure(double currentMeasure) {\n\t\t// If there is no more failed allowed, do nothing\n\t\tif(isTraining()) {\n\t\t\t/* Repeat 4x times from the second time\n\t\t\t * What we do is add:\n\t\t\t * (measure 3 - measure 2) + (measure 4 - measure 3) + ... */\n\t\t\tif(1 <= remainingLearnExample && remainingL... | [
"0.6563737",
"0.6530034",
"0.59575427",
"0.5810483",
"0.58080745",
"0.58008534",
"0.57571197",
"0.5752561",
"0.5744399",
"0.5587771",
"0.55654013",
"0.5430865",
"0.5417075",
"0.5410822",
"0.53371954",
"0.52653277",
"0.5228998",
"0.5203685",
"0.52003235",
"0.5197763",
"0.51864... | 0.6736904 | 0 |
Get current average time for request processing,. | public final long getAverageRequestProcessingTime() {
return averageRequestProcessing.getCurrentAverageTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double getAvgResponseTime() {\n return responseTime.getAvg();\n }",
"public int getSessionAverageAliveTime();",
"public static double doAvgProcessingTime() {\n if (count >= 1) {\n return processingTimeTotal / count;\n } else {\n return -1;\n }\... | [
"0.7401251",
"0.7317403",
"0.7305368",
"0.7277117",
"0.72718173",
"0.7202393",
"0.71271974",
"0.6995514",
"0.690031",
"0.68513817",
"0.6849604",
"0.6838992",
"0.6776968",
"0.6768838",
"0.67532307",
"0.6748479",
"0.67463624",
"0.6742166",
"0.67057294",
"0.6639561",
"0.65713155... | 0.82087743 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.comfortable, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79042155",
"0.7806028",
"0.77664185",
"0.77272826",
"0.7631844",
"0.7621488",
"0.75845605",
"0.753064",
"0.7487905",
"0.74575514",
"0.74575514",
"0.74386317",
"0.7421903",
"0.7403247",
"0.7391723",
"0.7386928",
"0.73795277",
"0.73705643",
"0.73629",
"0.7356027",
"0.7345714... | 0.0 | -1 |
===================================================================== Using low priority to prevent interference with overlay maintenance traffic. | @Override
public int getPriority()
{
return Message.LOW_PRIORITY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}",
"@Override\n public int getPriority() {\n return 75;\n }",
"@Override\n public int getPriority() {\n return 1;\n }",
"@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int getPriority() {... | [
"0.6856229",
"0.6764056",
"0.64932376",
"0.61419034",
"0.61419034",
"0.61033505",
"0.6045157",
"0.5964822",
"0.593501",
"0.5897827",
"0.58702093",
"0.5860597",
"0.582145",
"0.58099294",
"0.57954097",
"0.57194597",
"0.5717087",
"0.5676657",
"0.5676657",
"0.5676657",
"0.5646065... | 0.557025 | 33 |
Problem handlers help XML document readers report errors and warnings to its clients. | public interface ProblemHandler {
/**
* Called by XML readers to report a problem.
* @param problem the problem just found
*/
public void add(Problem problem);
/**
* Gets the number of problems reported so far.
* @return the number of problems
*/
public int getProblemCount();
/**
* Ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface XMLErrorHandler {\n\n /**\n * Reports a warning. Warnings are non-fatal and can be safely ignored by most\n * applications.\n *\n * @param domain The domain of the warning. The domain can be any string but\n * is suggested to be a valid URI. The domain ca... | [
"0.6749997",
"0.6361996",
"0.63370013",
"0.6318395",
"0.62617403",
"0.6131505",
"0.6128788",
"0.6102474",
"0.59648794",
"0.5885285",
"0.5846016",
"0.5827856",
"0.5774289",
"0.5774289",
"0.5766994",
"0.5743161",
"0.5721918",
"0.5654934",
"0.56398463",
"0.56192416",
"0.55622953... | 0.65479827 | 1 |
Called by XML readers to report a problem. | public void add(Problem problem); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void reportProblem(XMLValidationProblem prob)\n throws XMLStreamException\n {\n if (mVldProbHandler != null) {\n mVldProbHandler.reportProblem(prob);\n return;\n }\n\n /* For now let's implement basic functionality: warnings get\n *... | [
"0.69319093",
"0.67282546",
"0.6582373",
"0.65237993",
"0.64446044",
"0.6273544",
"0.6232606",
"0.6232606",
"0.61011636",
"0.60655224",
"0.6042556",
"0.6042556",
"0.6026255",
"0.5939704",
"0.5837822",
"0.5834875",
"0.57298696",
"0.5671955",
"0.5664753",
"0.5652478",
"0.565121... | 0.0 | -1 |
Gets the number of problems reported so far. | public int getProblemCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getProblemCount() {\n return problems.size();\n }",
"public long numMisses() {\n return numMisses.longValue();\n }",
"public static int count() {\n\treturn errorCount;\n }",
"int getErrorCount();",
"public int getNumberOfErrors() {\n return errors;\n }",
"public stat... | [
"0.8113879",
"0.720293",
"0.703496",
"0.70084053",
"0.69457245",
"0.686718",
"0.6854504",
"0.68397117",
"0.6800066",
"0.6749999",
"0.6712082",
"0.6707957",
"0.66673344",
"0.6655522",
"0.6648428",
"0.6631174",
"0.66233337",
"0.6619528",
"0.6579458",
"0.65731066",
"0.65561813",... | 0.7836332 | 1 |
TODO Autogenerated method stub | public void visitPath(Path path) {
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Returns ArrayList contatining all biketypes registered in the database, unless they have active BIT set to false. | public ArrayList<BikeType> getAllTypes(){
typelist = new ArrayList<>();
try(Connection con = DatabaseConnector.getConnection();
PreparedStatement ps = con.prepareStatement(ALL_TYPES);
ResultSet rs = ps.executeQuery()){
while(rs.next()){
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<Type> getTypes() {\n\t\treturn (List<Type>)BaseDao.select(\"select * from type\", Type.class);\r\n\t}",
"List<Type> getAllTypeList();",
"public static List<DocumentType> list() throws SQLException, Exception {\n\n String sql = \"SELECT * FROM document_type WHERE (enabled =?)\"... | [
"0.6292097",
"0.6252075",
"0.62159777",
"0.61883354",
"0.61844224",
"0.6177755",
"0.61279935",
"0.6107224",
"0.6073154",
"0.60327435",
"0.60248",
"0.6021213",
"0.60053754",
"0.59852016",
"0.596038",
"0.5944582",
"0.59420174",
"0.5938905",
"0.59371644",
"0.5902141",
"0.5898602... | 0.7523451 | 0 |
Returns a BikeType object from the database matching the specified typeId. | public BikeType getType(int typeId){
try(Connection con = DatabaseConnector.getConnection();
PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);
ResultSet rs = ps.executeQuery()){
if(rs.next()){
BikeType type = new BikeType(rs.getStr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"HotelType selectByPrimaryKey(Integer typeiId);",
"public static DocumentType get(Integer id) throws SQLException, Exception {\n\n String sql = \"SELECT * FROM document_type WHERE (id=? AND enabled=?)\";\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result... | [
"0.6246147",
"0.59585434",
"0.5925729",
"0.5650189",
"0.56401855",
"0.56296307",
"0.56240654",
"0.5612229",
"0.558704",
"0.55177855",
"0.5491569",
"0.54714346",
"0.5428221",
"0.54199237",
"0.5414314",
"0.53982425",
"0.5395268",
"0.5383443",
"0.5347916",
"0.53290385",
"0.53180... | 0.85530406 | 0 |
Adds a BikeType to the database. Since typeId is autoincrement this will be ignored if it's already set for the object. | public int addType(BikeType type){
final int ADDED = 0;
final int NOT_ADDED = 1;
final int ALREADY_REGISTERED = 2;
if(findType(type)){
return ALREADY_REGISTERED; //Type already registered
}else{
try(Connection con = DatabaseConnector.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addType(TypeData type) { types.add(type); }",
"public BikeType getType(int typeId){\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n ... | [
"0.5995901",
"0.5812222",
"0.5713879",
"0.5658758",
"0.55258363",
"0.55149734",
"0.5501655",
"0.5495601",
"0.5488467",
"0.5458555",
"0.5410578",
"0.534491",
"0.53308946",
"0.5327448",
"0.52949494",
"0.5224246",
"0.5214926",
"0.5185688",
"0.5180215",
"0.5152682",
"0.51512766",... | 0.7153988 | 0 |
Edits a BikeType in the database. Edits type name and rental price for the type matching the typeId. | public int editType(BikeType type){
final int EDITED = 0;
final int NOT_EDITED = 1;
final int NOT_FOUND = 2;
if(!findType(type.getTypeId())){ //No matching type_id registered
return NOT_FOUND;
}else{
try(Connection con = DatabaseConnector.g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"UpdateType updateType();",
"public int addType(BikeType type){\n final int ADDED = 0;\n final int NOT_ADDED = 1;\n final int ALREADY_REGISTERED = 2;\n \n if(findType(type)){\n return ALREADY_REGISTERED; //Type already registered\n }else{\n \n ... | [
"0.5841839",
"0.5737035",
"0.56968135",
"0.5653405",
"0.5617716",
"0.55563694",
"0.5554524",
"0.5534278",
"0.5431471",
"0.54250896",
"0.540491",
"0.54030794",
"0.5377696",
"0.5333432",
"0.53249156",
"0.53249156",
"0.53249156",
"0.5298386",
"0.52703196",
"0.51989836",
"0.51967... | 0.7631485 | 0 |
Sets active BIT to false on the BikeType in the database mathing the rental price and the type name. Ignores typeId. | public int deleteType(BikeType type){ //Deletes the type according to name and price OBSOLETE?
final int DELETED = 0;
final int NOT_DELETED = 1;
final int NOT_FOUND = 2;
if(!findType(type)){//Type not in database
return NOT_FOUND;
}else{
try(Conne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Modifying \n\t@Transactional\n\t@Query(value = \"UPDATE item_user iu SET iu.active=false WHERE iu.item_id IN (SELECT id FROM item i WHERE i.type=?1)\", nativeQuery = true)\n\tvoid updateNoActiveByType(String type);",
"public void setIsActive(Byte isActive) {\n this.isActive = isActive;\n }",
"public... | [
"0.6000823",
"0.57546484",
"0.5654883",
"0.5619649",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.54804033",
"0.5462066",
"0.5443113",
"0.5443113",
"0.5443113",
"0.... | 0.5205577 | 41 |
Sets the active BIT to false in the database for the BikeType matching the specified typeId. | public int deleteType(int typeId){ //Deletes the type according to the typeID
final int DELETED = 0;
final int NOT_DELETED = 1;
final int NOT_FOUND = 2;
if(!findType(typeId)){//TypeId not in database
return NOT_FOUND;
}else{
try(Connection con = D... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Modifying \n\t@Transactional\n\t@Query(value = \"UPDATE item_user iu SET iu.active=false WHERE iu.item_id IN (SELECT id FROM item i WHERE i.type=?1)\", nativeQuery = true)\n\tvoid updateNoActiveByType(String type);",
"public void setIsActive(Byte isActive) {\n this.isActive = isActive;\n }",
"public... | [
"0.605444",
"0.54822284",
"0.53125817",
"0.52031654",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5174968",
"0.5138806",
"0.508321",
"0.5082353",
"0.50771755",
"0.50771755",
... | 0.48150417 | 48 |
Checks if a BikeType with matching type name and rental price is registered. This method ignores typeId. | public boolean findType(BikeType type){ //Checks if the same name and rental price is registered - true if it's found
try(Connection con = DatabaseConnector.getConnection();
PreparedStatement ps = con.prepareStatement(FIND_TYPE)){
ps.setString(1, type.getTypeName());
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int addType(BikeType type){\n final int ADDED = 0;\n final int NOT_ADDED = 1;\n final int ALREADY_REGISTERED = 2;\n \n if(findType(type)){\n return ALREADY_REGISTERED; //Type already registered\n }else{\n \n try(Connection con = Data... | [
"0.64466614",
"0.56210387",
"0.55849874",
"0.54591435",
"0.5378449",
"0.5374166",
"0.5368069",
"0.53662527",
"0.53374904",
"0.5201055",
"0.5179616",
"0.51501423",
"0.5135392",
"0.5127451",
"0.51016116",
"0.5087805",
"0.5074213",
"0.50364286",
"0.50077915",
"0.4972672",
"0.497... | 0.7295277 | 0 |
Checks if a BikeType with the specified typeId is registered in the database. | public boolean findType(int typeId){ //Checks if the typeId is registered - true if it's found
try(Connection con = DatabaseConnector.getConnection();
PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);
ResultSet rs = ps.executeQuery()){
if(rs.isBef... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BikeType getType(int typeId){\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n if(rs.next()){\n BikeType type = new BikeTyp... | [
"0.6177231",
"0.6129441",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"0.6085006",
"... | 0.66453207 | 0 |
/ Puzzle X=new Puzzle(); Stack STK = new Stack(); Vertex v=new Vertex(new StringBuilder("xxxx")); STK.push(v); Vertex f= (Vertex)STK.peek(); System.out.println(f.ch); StringBuilder a=new StringBuilder("A"); StringBuilder b= new StringBuilder(a); b.setCharAt(0, 'B'); System.out.println(a+" "+b); LinkedList L=new LinkedL... | public static void main(String[] args) {
Graph X=new Graph();
X.GenerateGraph();
X.DisplayGraph();
// System.out.println("Printing Stack");
// X.DFS();
// System.out.println(X.AdjList.get(3).neighbours);
// ArrayL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String findCheese(Place startingPoint) {\nif (startingPoint==null)\n\treturn null;\n\nvisited.add(startingPoint);\nStack<Place> vstdstack=new Stack<Place>();\nvstdstack.add(startingPoint);\n//Stack<c> pather=\"start->\";\nwhile(!vstdstack.isEmpty())\n{\n\tPlace curpos=getNextPlace(vstdstack.peek());\n if... | [
"0.6054959",
"0.57548404",
"0.5705754",
"0.56967086",
"0.5642903",
"0.5642085",
"0.5564085",
"0.55230635",
"0.5490089",
"0.5488715",
"0.54718393",
"0.54657096",
"0.54600435",
"0.54291654",
"0.54092216",
"0.5388441",
"0.53866684",
"0.53824985",
"0.53821665",
"0.5368583",
"0.53... | 0.0 | -1 |
create a method which accepts Array and Returns sum of all the elements in array print 5 Multiplication table without using multiply operator | public static void main(String[] args) {
// TODO Auto-generated method stub
int[] a = {1,2,3,4,5};
int sum = sumArray(a);
System.out.println(sum);
int result = multiply(5,10);
System.out.println(result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testArray() {\n\t\t\n\t\tint[] arr = new int[5];\n\t\t\n\t\t/*arr[0]=10;\n\t\tarr[1]=20;\n\t\tarr[2]=30;\n\t\tarr[3]=40;\n\t\tarr[4]=50;*/\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tarr[i]=10*(i+1);\n\t\t\tsum+=arr[i];\n\t\t\tSystem.out.println(\"arr[\"+i+\"] = \"+arr[i]);\... | [
"0.7020915",
"0.66124266",
"0.6523132",
"0.6511544",
"0.6484703",
"0.6424995",
"0.6414474",
"0.6382059",
"0.6377462",
"0.63179016",
"0.6276485",
"0.62391245",
"0.6236017",
"0.62199056",
"0.619732",
"0.61885697",
"0.6179606",
"0.6154889",
"0.61484253",
"0.6112598",
"0.6112012"... | 0.68048704 | 1 |
TODO Autogenerated method stub | private static int multiply(int i, int j) {
int k=1;
int sum=0;
while(k<=j)
{
sum = sum +i;
k++;
}
return sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public static int sumArray(int[] a) {
int sum = 0;
for(int i=0;(i<=a.length-1);i++) {
sum = sum + a[i];
}
return sum;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
If this method gets called it means that some native view is attempting to grab lock for touch event delivery. In that case we cancel all gesture recognizers | @Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
if (mOrchestrator != null && !mPassingTouch) {
// if we are in the process of delivering touch events via GH orchestrator, we don't want to
// treat it as a native gesture capturing the lock
tryCancelAllHandler... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void tryCancelAllHandlers() {\n if (mJSGestureHandler != null && mJSGestureHandler.getState() == GestureHandler.STATE_BEGAN) {\n // Try activate main JS handler\n mJSGestureHandler.activate();\n mJSGestureHandler.end();\n }\n }",
"@Override\n public boolean onTouch(View a... | [
"0.7066562",
"0.7060401",
"0.6845957",
"0.6829448",
"0.67990965",
"0.67990965",
"0.67876476",
"0.6768296",
"0.6738803",
"0.6723921",
"0.6665523",
"0.6626507",
"0.65994996",
"0.6575541",
"0.6568329",
"0.65106535",
"0.64905137",
"0.64571315",
"0.64571315",
"0.64571315",
"0.6443... | 0.7111658 | 0 |
In order to cancel handlers we activate handler that is hooked to the root view | private void tryCancelAllHandlers() {
if (mJSGestureHandler != null && mJSGestureHandler.getState() == GestureHandler.STATE_BEGAN) {
// Try activate main JS handler
mJSGestureHandler.activate();
mJSGestureHandler.end();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n myHandler.cancel(true);\n }",
"public void onCancel() {\r\n parentController.switchView();\r\n }",
"@Override\n public void onUserInteraction() {\n super.onUserInteraction();\n stopHandler();\n startHandler... | [
"0.63963455",
"0.6377577",
"0.61325485",
"0.6047862",
"0.595169",
"0.59018224",
"0.5814477",
"0.5803633",
"0.57741976",
"0.5726548",
"0.56984407",
"0.5619634",
"0.56185585",
"0.5587212",
"0.5560469",
"0.5541585",
"0.5528935",
"0.55252177",
"0.55103457",
"0.5502869",
"0.549754... | 0.63686967 | 2 |
This method is used to enable root view to start processing touch events through the gesture handler library lgic. Unless this method is called (which happens as a result of instantiating new gesture handler from JS) the root view component will just proxy all touch related methods to superclass. In a "disabled" state ... | void initialize(RNGestureHandlerRegistry registry) {
Log.i(
ReactConstants.TAG,
"[GESTURE HANDLER] Initialize gesture handler for root view " + this);
mOrchestrator = new GestureHandlerOrchestrator(this, registry, new RNViewConfigurationHelper());
mOrchestrator.setMinimumAlphaForTraversal(MIN_AL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEnableGestureRecognization() {\n return false;\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event list\n ... | [
"0.6232997",
"0.61999404",
"0.6175549",
"0.61672485",
"0.6116654",
"0.61042213",
"0.61017185",
"0.60978097",
"0.6092192",
"0.6072511",
"0.606793",
"0.6057995",
"0.6039823",
"0.60288745",
"0.6026589",
"0.6026589",
"0.6013777",
"0.6001015",
"0.5978008",
"0.59747297",
"0.5955565... | 0.6339942 | 0 |
Check if the position of the modification is ambiguous or not (multiple positions associated to the same modification | public boolean isAmbiguous() {
return positionMap.size() > 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isInConflict(String contentInCur,\n String contentInGiven, String contentInSp) {\n if (bothModified(contentInCur, contentInGiven, contentInSp)) {\n if (isDifferent(contentInGiven, contentInCur)) {\n return true;\n }\n ... | [
"0.5989005",
"0.5944149",
"0.5787152",
"0.55465645",
"0.5507206",
"0.5502193",
"0.54910386",
"0.5470853",
"0.54115653",
"0.5398772",
"0.5398772",
"0.5398772",
"0.5398772",
"0.53951746",
"0.53940827",
"0.53700393",
"0.5369729",
"0.5359608",
"0.5359403",
"0.5318111",
"0.5309067... | 0.6828761 | 0 |
Neutral losses are reported as cvParams. They are reported in the same way that modification objects are (as separate, commaseparated objects in the modification column). The position for a neutral loss MAY be reported. | public CVParam getNeutralLoss() {
return neutralLoss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setNeutralLoss(CVParam neutralLoss) {\n this.neutralLoss = neutralLoss;\n }",
"public void setNeutralPose() {\n setPose(0.5f, -1, 0.5f, -1, 0.5f, -1);\n this.boltSize = 0;\n }",
"public MatLabNoClipBot(String botName, String botSkin, Vector3f initialPosition, int mlParams... | [
"0.6668229",
"0.541507",
"0.48309362",
"0.47248727",
"0.46542397",
"0.46473822",
"0.46233",
"0.45922562",
"0.45725748",
"0.4571939",
"0.4570569",
"0.4552031",
"0.45310035",
"0.45139354",
"0.45135993",
"0.4504987",
"0.44982374",
"0.4481592",
"0.44530165",
"0.44475365",
"0.4413... | 0.7196373 | 0 |
Neutral loss is optional. Neutral losses are reported as cvParams. They are reported in the same way that modification objects are (as separate, commaseparated objects in the modification column). The position for a neutral loss MAY be reported. | public void setNeutralLoss(CVParam neutralLoss) {
this.neutralLoss = neutralLoss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CVParam getNeutralLoss() {\n return neutralLoss;\n }",
"public void setNeutralPose() {\n setPose(0.5f, -1, 0.5f, -1, 0.5f, -1);\n this.boltSize = 0;\n }",
"boolean addHardLoss();",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"boolean... | [
"0.7416318",
"0.51022685",
"0.4993472",
"0.48842064",
"0.4853423",
"0.47990915",
"0.47622845",
"0.46802393",
"0.46702936",
"0.46170115",
"0.46050867",
"0.46027303",
"0.457288",
"0.45723388",
"0.4561072",
"0.45517793",
"0.45180562",
"0.45090827",
"0.44978943",
"0.44835463",
"0... | 0.70047814 | 1 |
Allows modify the modification type | public void setType(Type type) {
this.type = type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Modifier<Type> {\n\n\tvoid modify(Type object);\n\n\tvoid undo(Type object);\n}",
"void changeType(NoteTypes newType) {\n this.type = newType;\n }",
"UpdateType updateType();",
"@Override\n\tpublic void modify() {\n\t\t\n\t}",
"public void modify() {\n }",
"ISModifyDataType create... | [
"0.69845486",
"0.6922572",
"0.68295735",
"0.67677385",
"0.6701165",
"0.66881424",
"0.6624433",
"0.6621991",
"0.6545711",
"0.6544058",
"0.6544058",
"0.65007514",
"0.6484735",
"0.6337655",
"0.6336262",
"0.62925136",
"0.62650186",
"0.62632513",
"0.6254733",
"0.6235442",
"0.62109... | 0.0 | -1 |
Allow modifiy the database identifier | public void setAccession(String accession) {
this.accession = accession;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDatabaseId();",
"protected abstract String getDatabaseID();",
"public int dbId() { return dbId; }",
"Long getDbId();",
"public void setId(int driverDBId);",
"void changeDatabase(String databaseName);",
"public Builder setDatabaseId(\n java.lang.String value) {\n if (... | [
"0.72357017",
"0.72125036",
"0.6946931",
"0.6930326",
"0.6704236",
"0.6488959",
"0.6243469",
"0.6243064",
"0.62225294",
"0.62034124",
"0.6167949",
"0.61169547",
"0.6089589",
"0.6056562",
"0.60390043",
"0.6022657",
"0.6017848",
"0.59987396",
"0.59956497",
"0.59772784",
"0.5921... | 0.0 | -1 |
Find modification type by name with caseinsensitive. | public static Type findType(String name) {
if (MZTabUtils.isEmpty(name)) {
throw new IllegalArgumentException("Modification type name should not be empty!");
}
Type type;
try {
type = Type.valueOf(name.trim().toUpperCase());
} catch (IllegalArgumentExcept... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }",
"public AbsenceType findByName(String name);",
"public static Type valueOfIgnoreCase(String name) throws Ille... | [
"0.6421248",
"0.6405531",
"0.59354484",
"0.5827843",
"0.5771163",
"0.56228197",
"0.5577826",
"0.55505717",
"0.5536845",
"0.55326754",
"0.55262",
"0.5430833",
"0.5417182",
"0.5390574",
"0.5350346",
"0.5345175",
"0.531547",
"0.5298084",
"0.52914655",
"0.5291139",
"0.5263871",
... | 0.7162229 | 0 |
TODO Autogenerated method stub | @Override
public int update(Categoria r) {
int x = 0;
String SQL = "update categoria set nombre = ? where categoria_idcategoria = ?";
try {
cx = Conexion.getConexion();
ps = cx.prepareStatement(SQL);
ps.setString(1, r.getNombre());
ps.setInt(2, r.getCategoria_idcategoria());
x = ps.execute... | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Categoria read(int id) {
Categoria a = new Categoria();
String SQL = "select *from rol where categoria_idcategoria=?";
try {
cx = Conexion.getConexion();
ps = cx.prepareStatement(SQL);
ps.setInt(1, id);
rs = ps.executeQuery();
while (rs.next()) {
a.setCategoria_id... | {
"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 List<Categoria> readAll() {
List<Categoria> lista = new ArrayList<>();
String SQL = "select *from categoria";
try {
cx = Conexion.getConexion();
ps = cx.prepareStatement(SQL);
rs = ps.executeQuery(SQL);
while(rs.next()) {
Categoria r = new Categoria();
r.setCategoria... | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
private GENDER gender; private String province; private String city; private Bitmap drawableAvatar; | public UserSocialBean(SOCIAL_MEDIA media, String openId, String name, String token, String avatarUrl) {
this.socailMedia = media;
this.openId = openId;
this.name = name;
this.token = token;
this.avatarUrl = avatarUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ImageView getAvatarImageView();",
"public void setProfileImg() {\n }",
"public Bitmap getAvatarBitmap() {\n return mAvatarBitMap;\n }",
"public interface C2277a {\n String getNameType();\n\n @DrawableRes\n int getStatusIcon();\n\n @Nullable\n String getTagName();\n}",
"String ge... | [
"0.58383733",
"0.5827236",
"0.5793381",
"0.5743594",
"0.5695567",
"0.5630309",
"0.5590304",
"0.5562699",
"0.55358064",
"0.55216914",
"0.54846895",
"0.54455286",
"0.54455286",
"0.54455286",
"0.54455286",
"0.5444708",
"0.541462",
"0.5412041",
"0.5412041",
"0.5395191",
"0.535001... | 0.0 | -1 |
Returns true if the target value is found in the indicated portion of the data array. This search only considers the array portion from data[low] to data[high] inclusive. | private static boolean binarySearch(int[] data, int target, int low, int high) {
if (low > high) {
return false;
} else {
int mid = (low + high) / 2;
if (target == data[mid]) {
return true;
} else if (target < data[mid]) {
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n ... | [
"0.6661914",
"0.6616838",
"0.66069704",
"0.65202063",
"0.64681834",
"0.6446653",
"0.63336444",
"0.63193846",
"0.63116235",
"0.6282526",
"0.6230922",
"0.62007546",
"0.61326855",
"0.6128062",
"0.6103453",
"0.61022353",
"0.61008495",
"0.6080517",
"0.60367227",
"0.59875876",
"0.5... | 0.7778464 | 0 |
My implementation of binary search. | private static int binarySearchMine(int[] data, int target, int low, int high) {
while (low <= high) {
int median = (low + high) / 2;
int current = data[median];
if (current == target) {
return median;
} else if (target < current) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length... | [
"0.7858497",
"0.77937305",
"0.7639527",
"0.76184267",
"0.75814426",
"0.7580734",
"0.7550651",
"0.7546628",
"0.7542527",
"0.7531466",
"0.7492754",
"0.74743456",
"0.7464238",
"0.74534047",
"0.74065757",
"0.7397491",
"0.7384612",
"0.73823124",
"0.73736113",
"0.7356211",
"0.73531... | 0.70764494 | 48 |
TODO Autogenerated method stub | @Override
public int compare(Map<String, Object> arg0, Map<String, Object> arg1) {
int i1 = (Integer) arg0.get("id");
int i2 = (Integer) arg1.get("id");
if(i1 < i2)
return 1;
else if(i1 > i2)
return -1;
return 0;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Firebase Sign In functions + input checking/validation for editText fields | private void userLogin() {
String email = et_login_email.getText().toString().trim();
String password = et_login_password.getText().toString().trim();
if (email.isEmpty()) {
et_login_email.setError("Please enter an email.");
et_login_email.requestFocus();
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void signIn(){\n // get text and email strings from fields\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n if(TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) { // is pass/user empty?\n // if so a... | [
"0.70156354",
"0.6987258",
"0.6965784",
"0.6925606",
"0.69126475",
"0.68207943",
"0.6800526",
"0.6792798",
"0.66712755",
"0.6659299",
"0.66182226",
"0.655096",
"0.65015155",
"0.6498363",
"0.6492572",
"0.6488776",
"0.64251",
"0.64102584",
"0.6405078",
"0.6402628",
"0.6382954",... | 0.68215895 | 5 |
Sign in with Google function | private void signIn() {
Intent signInIntent = mGoogleSignInClient.getSignInIntent();
startActivityForResult(signInIntent, RC_SIGN_IN);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = ... | [
"0.78088975",
"0.7678135",
"0.7580586",
"0.74834013",
"0.74367386",
"0.7401486",
"0.7393559",
"0.7390936",
"0.7384897",
"0.73829985",
"0.72850543",
"0.72850543",
"0.72850543",
"0.72850543",
"0.7272112",
"0.7225651",
"0.71436787",
"0.7126266",
"0.70434093",
"0.69001955",
"0.67... | 0.7423917 | 7 |
Firebaseauth + Google integration | private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
mAuth.signInWithCredential(credential)
.addOnSuccessListener(this, authResult -> {
FirebaseUser user = mAuth.getCurre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.get... | [
"0.7280793",
"0.713608",
"0.7107185",
"0.70124656",
"0.6963774",
"0.69372314",
"0.6902658",
"0.6837983",
"0.67801714",
"0.67137665",
"0.67102337",
"0.66217124",
"0.66190207",
"0.6600096",
"0.6548166",
"0.65367675",
"0.65032446",
"0.64948297",
"0.6492714",
"0.64795905",
"0.647... | 0.69166356 | 6 |
Add a product to the database | public void addButtonClicked(View view) {
Products product = new Products(johnsInput.getText().toString());
dbHandler.addProduct(product);
printDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addProduct(Product product);",
"public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exceptio... | [
"0.82202035",
"0.82146627",
"0.81881565",
"0.816727",
"0.8148543",
"0.7942494",
"0.79405075",
"0.79073876",
"0.78299844",
"0.779732",
"0.7780747",
"0.76825684",
"0.7650539",
"0.7640236",
"0.76382524",
"0.75998795",
"0.7596659",
"0.75873744",
"0.7585605",
"0.757228",
"0.755271... | 0.7161938 | 38 |
delete items frm database | public void deleteButtonClicked(View view) {
String inputText = johnsInput.getText().toString();
dbHandler.deleteProduct(inputText);
printDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(catego... | [
"0.7747185",
"0.74783766",
"0.73619455",
"0.7253023",
"0.7090874",
"0.7008441",
"0.70069027",
"0.69349533",
"0.68984103",
"0.68693995",
"0.6854455",
"0.6831745",
"0.6830789",
"0.68159163",
"0.68025607",
"0.67888504",
"0.67647254",
"0.6761931",
"0.67570376",
"0.67448974",
"0.6... | 0.0 | -1 |
Views should implement this if the view itself is going to add items to the context menu. | @Override
protected void onCreateContextMenu(ContextMenu menu) {
super.onCreateContextMenu(menu);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { // Add Items to menu\n if (v.getId() == R.id.listView) {\n String[] menuItems = getResources().getStringArray(R.array.menu);\n for (int i = 0; i < menuItems.length; i++) {\n... | [
"0.7382993",
"0.71440923",
"0.71390253",
"0.7132665",
"0.7105133",
"0.7080356",
"0.7048539",
"0.7041699",
"0.70061374",
"0.6988629",
"0.69802463",
"0.69778013",
"0.6976259",
"0.6976259",
"0.69171274",
"0.67920804",
"0.67713875",
"0.6765614",
"0.67640465",
"0.6761401",
"0.6760... | 0.7177063 | 1 |
Queue helpers Returns a Set containing all Region keys in a queue. | public static Set<String> queueKeySet(Queue<ResRequest> q) {
Set<String> keys = new HashSet<String>();
for (Iterator<ResRequest> it = q.iterator(); it.hasNext();) {
ResRequest req = it.next();
keys.add(req.regionId);
}
return keys;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<K> keySet() {\n Set<K> keys = new HashSet<>();\n if (bucket.length != 0) {\n for (int i = 0; i < bucket.length; i++) {\n keys.add(bucket[i].getKey());\n }\n }\n return keys;\n }",
"public Iterable keys() {\n Queue K = new Queue... | [
"0.67128664",
"0.63920546",
"0.6385797",
"0.6294962",
"0.62669855",
"0.6240728",
"0.62259674",
"0.6223278",
"0.6097011",
"0.6063904",
"0.60636175",
"0.6062916",
"0.6024179",
"0.60234857",
"0.60124785",
"0.59854275",
"0.5927106",
"0.5913003",
"0.58994585",
"0.5897741",
"0.5857... | 0.8170626 | 0 |
Removes a ResRequest from the Queue and returns it. Null if not found. | public static ResRequest queuePoll(Queue<ResRequest> q, String rid) {
for (Iterator<ResRequest> it = q.iterator(); it.hasNext();) {
ResRequest req = it.next();
if (req.regionId.equals(rid)) {
it.remove();
return req;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private GameAction pull() {\n if (this.queue.size() > 0) {\n return this.queue.remove(0);\n } else {\n return null;\n }\n }",
"public DVDPackage remove() {\n\t\t//The call to queue.removeFirst() will throw the NoSuchElementException if\n\t\t//the queue is empty. Thi... | [
"0.6091626",
"0.6064887",
"0.60570115",
"0.6016364",
"0.60039276",
"0.5987245",
"0.5959749",
"0.5937895",
"0.5905949",
"0.58966845",
"0.58789724",
"0.5874601",
"0.58290774",
"0.57812625",
"0.57613724",
"0.5690937",
"0.56823796",
"0.5667025",
"0.56409335",
"0.56177735",
"0.561... | 0.6796965 | 0 |
Determine whether two vehicle's location fixes indicate that a DSRC UDP link can be sustained over the next Globals.LINK_LIFETIME_THRESHOLD secs | private boolean linkIsViableDSRCComplex(Location v1, AdhocPacket other) {
Location v2 = other.getLocation();
if (v1 == null || v2 == null) {
log_nodisplay("Link viable debug: no GPS fix.");
return true;
}
float distance = v1.distanceTo(v2);
// Too far away (> 250m)
if (distance > 250) {
log_nodi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean linkIsViableDSRC(Location v1, AdhocPacket other) {\n\t\tLocation v2 = other.getLocation();\n\n\t\tif (v1 == null || v2 == null) {\n\t\t\tlog_nodisplay(\"Link not viable: GPS disabled\");\n\t\t\treturn false;\n\t\t}\n\n\t\tfloat distance = v1.distanceTo(v2);\n\t\tlong threshold = 250;\n\t\tboolean v... | [
"0.6798214",
"0.637612",
"0.6313964",
"0.5632008",
"0.54695094",
"0.5452486",
"0.5433236",
"0.5423073",
"0.53940403",
"0.53731316",
"0.53382385",
"0.53151405",
"0.5313364",
"0.525807",
"0.52269316",
"0.5188327",
"0.51761043",
"0.5158133",
"0.5138926",
"0.51206964",
"0.5099373... | 0.65141785 | 1 |
Determine whether two vehicle's location fixes indicate that a DSRC UDP link is viable for a token transfer / other communications | private boolean linkIsViableDSRC(Location v1, AdhocPacket other) {
Location v2 = other.getLocation();
if (v1 == null || v2 == null) {
log_nodisplay("Link not viable: GPS disabled");
return false;
}
float distance = v1.distanceTo(v2);
long threshold = 250;
boolean viable = (distance < threshold);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean linkIsViableDSRCComplex(Location v1, AdhocPacket other) {\n\t\tLocation v2 = other.getLocation();\n\n\t\tif (v1 == null || v2 == null) {\n\t\t\tlog_nodisplay(\"Link viable debug: no GPS fix.\");\n\t\t\treturn true;\n\t\t}\n\n\t\tfloat distance = v1.distanceTo(v2);\n\n\t\t// Too far away (> 250m)\n\... | [
"0.6680086",
"0.6482348",
"0.6385666",
"0.58661324",
"0.58233917",
"0.57935846",
"0.5761737",
"0.5714628",
"0.56654704",
"0.5510698",
"0.5459392",
"0.54576355",
"0.5451952",
"0.5419536",
"0.5419419",
"0.5400689",
"0.5400689",
"0.5379272",
"0.5373579",
"0.5371341",
"0.53688574... | 0.69509137 | 0 |
Determine whether two vehicle's location fixes indicate that a DSRC UDP link is viable for a token transfer / other communications | private boolean linkIsViableWiFi(Location v1, AdhocPacket other) {
Location v2 = other.getLocation();
if (v1 == null || v2 == null) {
log_nodisplay("Link not viable: GPS disabled");
return false;
}
float distance = v1.distanceTo(v2);
long threshold = 70;
boolean viable = (distance < threshold);
l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean linkIsViableDSRC(Location v1, AdhocPacket other) {\n\t\tLocation v2 = other.getLocation();\n\n\t\tif (v1 == null || v2 == null) {\n\t\t\tlog_nodisplay(\"Link not viable: GPS disabled\");\n\t\t\treturn false;\n\t\t}\n\n\t\tfloat distance = v1.distanceTo(v2);\n\t\tlong threshold = 250;\n\t\tboolean v... | [
"0.6950977",
"0.66811264",
"0.6483585",
"0.5867293",
"0.58250654",
"0.579465",
"0.57625395",
"0.5715109",
"0.5666455",
"0.55113626",
"0.54588574",
"0.5458457",
"0.5451741",
"0.5420715",
"0.5419494",
"0.54007465",
"0.54007465",
"0.5379245",
"0.5373145",
"0.53723407",
"0.537007... | 0.6386396 | 3 |
Determine whether two vehicle's location fixes indicate that a WiFi TCP link can be sustained over the next Globals.LINK_LIFETIME_THRESHOLD secs | private boolean linkIsViableWiFiComplex(Location v1, AdhocPacket other) {
Location v2 = other.getLocation();
if (v1 == null || v2 == null) {
log_nodisplay("Link viable debug: no GPS fix.");
return true;
}
float distance = v1.distanceTo(v2);
// Too far away (> 70m)
if (distance > 70) {
log_nodisp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean linkIsViableWiFi(Location v1, AdhocPacket other) {\n\t\tLocation v2 = other.getLocation();\n\n\t\tif (v1 == null || v2 == null) {\n\t\t\tlog_nodisplay(\"Link not viable: GPS disabled\");\n\t\t\treturn false;\n\t\t}\n\n\t\tfloat distance = v1.distanceTo(v2);\n\t\tlong threshold = 70;\n\t\tboolean vi... | [
"0.68026245",
"0.62542266",
"0.61896956",
"0.5725815",
"0.5620088",
"0.5611002",
"0.5605401",
"0.5541121",
"0.55222917",
"0.5515615",
"0.55049175",
"0.54235625",
"0.53795195",
"0.5368025",
"0.5341204",
"0.53396386",
"0.53308517",
"0.5297022",
"0.52878976",
"0.5279408",
"0.524... | 0.6781214 | 1 |
DEBUG make a fake request to test token transfers | public void makeReservationRouteStata() {
log(String.format("Making DEBUG ResRequest for Stata-1"));
makeRequest(new ResRequest(mId, ResRequest.RES_GET, "Stata-1"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testGetRequest() {\n String OAUTH_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/oauth2\";\n raboUtilUnderTest.get(OAUTH_BASE, \"/token\", \"payload\");\n\n // Verify the results\n verify(webClient).get(anyString(),any());\n }",
"@Test\n public void te... | [
"0.6673646",
"0.66301996",
"0.6423456",
"0.6317874",
"0.625376",
"0.6128476",
"0.61149496",
"0.61022377",
"0.59293157",
"0.58827865",
"0.58818316",
"0.588101",
"0.5878428",
"0.585579",
"0.58471256",
"0.57483643",
"0.5735997",
"0.57280236",
"0.5722432",
"0.5690301",
"0.5681118... | 0.0 | -1 |
DEBUG make a fake offer to test token transfers | public void makeOfferRouteStata() {
log(String.format("Making DEBUG Offer for Vassar-1"));
ResRequest res = new ResRequest(mId, ResRequest.RES_GET, "Stata-1");
res = new ResRequest(mId, ResRequest.RES_GET, "Stata-1");
res.done = true;
res.completed = getTime();
res.tokenString = "DEBUG";
res.signature = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendTokenToRemote() { }",
"@Test\n public void testTokenEndPointAnonymousTokenRequest() throws Exception {\n String callback = \"Backplane.call_back\";\n \n // should return the form:\n // callback({\n // \"access_token\": \"l5feG0KjdXTpgDAfOvN6pU6YWxNb7qyn\... | [
"0.61238337",
"0.605905",
"0.5932475",
"0.5882458",
"0.58346593",
"0.5834213",
"0.5747325",
"0.56734216",
"0.5440172",
"0.542451",
"0.5421906",
"0.54160684",
"0.54160684",
"0.5403502",
"0.5397538",
"0.53726476",
"0.53583443",
"0.53529316",
"0.53469294",
"0.5333809",
"0.532209... | 0.49705267 | 81 |
log("Sending " + progress[0] + " of " + progress[1] + " packets..."); | protected void onProgressUpdate(Integer... progress) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sendProgressMessage(int bytesWritten, int bytesTotal);",
"@Override\n public void progress(long offset, long length) {\n Log.d(TAG, offset + \" of \" + length + \" bytes received\");\n }",
"protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }",
"void o... | [
"0.7291181",
"0.63256156",
"0.62409216",
"0.6218213",
"0.5992192",
"0.59293705",
"0.59179664",
"0.58725506",
"0.58482456",
"0.58440924",
"0.5781829",
"0.57721984",
"0.57681453",
"0.57601327",
"0.57503206",
"0.5732614",
"0.5731803",
"0.5683225",
"0.5670222",
"0.5670222",
"0.56... | 0.0 | -1 |
log("Sent " + result + " adhoc UDP packets"); | protected void onPostExecute(Long result) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void UDPBroadcastTest() {\n\t\tWifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n\n\t\tif (wifi != null) {\n\t\t\tWifiManager.MulticastLock lock = wifi\n\t\t\t\t\t.createMulticastLock(\"Log_Tag\");\n\t\t\tlock.acquire();\n\n\t\t}\n\t\tint DISCOVERY_PORT = 1989;\n\t\tint TIMEOUT_MS =... | [
"0.64579463",
"0.6410438",
"0.6040481",
"0.59686697",
"0.5932113",
"0.5894873",
"0.5846951",
"0.5829372",
"0.58275574",
"0.5814318",
"0.5802231",
"0.5784266",
"0.57427317",
"0.5722955",
"0.5680168",
"0.56288",
"0.56240827",
"0.56235296",
"0.5618424",
"0.56117755",
"0.55750316... | 0.0 | -1 |
Test regions in Stata courtyard | private List<Region> stataRegions() {
List<Region> rs = new ArrayList<Region>();
Region r;
// Region 1
r = new Region("Stata-1");
r.addVertex(42.36218276352746, -71.08994364738464);
r.addVertex(42.36207970542849, -71.08879566192627);
r.addVertex(42.36181809564884, -71.08882784843445);
r.addVertex(42.36... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void regionTest() {\n // TODO: test region\n }",
"@DataProvider(name = \"SplitAssemblyRegion\")\n public Object[][] makeSplitAssemblyRegion() {\n final List<Object[]> tests = new ArrayList<>();\n\n final SimpleInterval whole_span = new SimpleInterval(\"1\", 1, 500);\n... | [
"0.712406",
"0.6843462",
"0.65965664",
"0.6463909",
"0.63112074",
"0.61109686",
"0.60051847",
"0.598241",
"0.59679",
"0.5898856",
"0.58418137",
"0.58418137",
"0.58418137",
"0.58418137",
"0.576014",
"0.57465017",
"0.5731116",
"0.57243305",
"0.57018006",
"0.5679626",
"0.564385"... | 0.69843495 | 1 |
Regions for superdense experiment on Vassar Street | private List<Region> experimentSuperDenseRegions() {
List<Region> rs = new ArrayList<Region>();
Region r;
// Region 1
r = new Region("Stata-1");
r.addVertex(42.36199654330529, -71.09211625725555);
r.addVertex(42.362892351545966, -71.09046401650238);
r.addVertex(42.362234369747256, -71.08898343712616);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, ... | [
"0.6801428",
"0.6144116",
"0.5990405",
"0.5990405",
"0.5990405",
"0.5990405",
"0.57245547",
"0.5663425",
"0.56556743",
"0.56252366",
"0.5608448",
"0.5595858",
"0.55621195",
"0.5528783",
"0.548214",
"0.545105",
"0.54509753",
"0.54497486",
"0.54019123",
"0.53782433",
"0.5354200... | 0.69785595 | 0 |
Regions in experiment A | private List<Region> experimentFullRegions() {
List<Region> rs = new ArrayList<Region>();
Region r;
// Vassar St
r = new Region("Vassar-1");
r.addVertex(42.36255147026933, -71.09034599930573);
r.addVertex(42.36240877523236, -71.08975591332245);
r.addVertex(42.36013353836458, -71.09434785515595);
r.addV... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<Region> experimentSuperDenseRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36199654330529, -71.09211625725555);\n\t\tr.addVertex(42.362892351545966, -71.09046401650238);\n\t\tr.addVertex(42.36223436974... | [
"0.6881736",
"0.6719629",
"0.6675418",
"0.6351928",
"0.6351928",
"0.6351928",
"0.6351928",
"0.6107858",
"0.5967659",
"0.5818822",
"0.5713502",
"0.56932336",
"0.5679892",
"0.56786126",
"0.5595331",
"0.5579781",
"0.5501587",
"0.5497842",
"0.54833305",
"0.5475994",
"0.5469647",
... | 0.70726705 | 0 |
Location provider status changed | @Override
public void onStatusChanged(String provider, int status, Bundle extras) {
switch (status) {
case LocationProvider.OUT_OF_SERVICE:
log("LocationProvider out of service, stopping adhoc announcements.");
// myHandler.removeCallbacks(adhocAnnounceR);
break;
case LocationProvider.TEMPORARILY_UNAVAI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\r\n\t\tswitch (status) {\r\n\t\tcase LocationProvider.AVAILABLE:\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase LocationProvider.OUT_OF_SERVICE:\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase LocationProvider.TEMPORARILY_UNAVAILABLE:\r\n\t\t\t\... | [
"0.77622706",
"0.7603214",
"0.7588496",
"0.74870855",
"0.7327572",
"0.7177705",
"0.71015435",
"0.6991995",
"0.68895507",
"0.68719476",
"0.68526465",
"0.68526465",
"0.68526465",
"0.68526465",
"0.68526465",
"0.68526465",
"0.68279696",
"0.6819363",
"0.6809414",
"0.6809414",
"0.6... | 0.66343135 | 68 |
Instantiates a new geo distance sort builder. | public GeoDistanceSortBuilder(String fieldName) {
this.fieldName = fieldName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Sort build() {\n return new Sort(this);\n }",
"private Sort(SortBuilder builder) {\n this.field = builder.field;\n this.direction = builder.direction;\n }",
"public static SortBuilder getInstance() {\n \t\treturn singleton;\n \t}",
"private Distance(){}",
"private ... | [
"0.6494641",
"0.6401703",
"0.56983185",
"0.5552015",
"0.5546699",
"0.5305695",
"0.52788615",
"0.5226371",
"0.51922464",
"0.5109076",
"0.5055382",
"0.502854",
"0.49098182",
"0.48535234",
"0.48459214",
"0.48350763",
"0.4832555",
"0.47953558",
"0.4794819",
"0.47883764",
"0.47744... | 0.6765492 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
int count=0;
String[] ab= {"A", "B", "B", "F", "A"};
for(int i=0; i<ab.length;i++){
for(int j=0;j<ab.length;j++){
if(ab[i]==ab[j]){
count++;
if(count==2){
System.out.println(ab[i]);
count= --count-1;
}
... | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Tells server to move ships | public static Action sendShips(String[] ids, int loc, int dest) {
return new Action(ids, loc, dest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@POST(\"/WarpShip\")\n\tint warpShip(@Body MoveShipParams params);",
"public void setShips(List<Object> ships) {\n this.ships = ships;\n }",
"public void positionShips(Ship ships[]) {\n ships[0] = new AircraftCarrier(3, true, 'A', 5, 'F');\n ships[1] = new Battleship(6, true, 'B', 4, 'A');\n ... | [
"0.6566131",
"0.6563639",
"0.64433676",
"0.6284506",
"0.62681365",
"0.62453735",
"0.62354136",
"0.6117537",
"0.60915375",
"0.6088185",
"0.6085531",
"0.6049601",
"0.60336137",
"0.5997928",
"0.59675056",
"0.5939462",
"0.5938098",
"0.5922893",
"0.5900721",
"0.5881384",
"0.587561... | 0.0 | -1 |
Tells server to build a building | public static Action buildBuilding(int id, int slot, char buildingId) {
return new Action(id, slot, buildingId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void buildStreet() {\r\n\t\tbuilt = false;\r\n\t\tbuildPanelRoad.setVisible(false);\r\n\t\tMessage message = new Message(clickedRoad, true, null);\r\n\t\tsendMessage(message);\r\n\t}",
"public void ativarBuild() {\n this.build = true;\n }",
"public void requestBuildingInfo(UUID buildingId) {\... | [
"0.6375785",
"0.6287664",
"0.6067843",
"0.6004874",
"0.5998007",
"0.58742744",
"0.585917",
"0.58583987",
"0.58259416",
"0.5796649",
"0.5784423",
"0.577887",
"0.5771059",
"0.5709231",
"0.5693228",
"0.56911826",
"0.5665243",
"0.56235665",
"0.5603839",
"0.5595994",
"0.55869055",... | 0.0 | -1 |
Tells server to build a ship | public static Action buildShip(int id, char type) {
return new Action(id, type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void buildStreet() {\r\n\t\tbuilt = false;\r\n\t\tbuildPanelRoad.setVisible(false);\r\n\t\tMessage message = new Message(clickedRoad, true, null);\r\n\t\tsendMessage(message);\r\n\t}",
"private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\... | [
"0.6308284",
"0.6188916",
"0.6177391",
"0.60861015",
"0.6049707",
"0.59958756",
"0.5861909",
"0.5758212",
"0.57192487",
"0.5716095",
"0.56812215",
"0.5647936",
"0.5634956",
"0.5624876",
"0.5617568",
"0.5585301",
"0.5574485",
"0.55667937",
"0.5557271",
"0.5552545",
"0.5540371"... | 0.54337275 | 28 |
Tells server to attack a ship | public static Action attackShip(String id, int damage) {
return new Action(id, damage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean My_Turn(BattleshipServer server, BattleshipClient client) {\r\n\t\t\tdisplay.putStaticLine(\"\");\t\r\n\t\t\tdisplay.putStaticLine(\"Enter the position you want to Attack (i.e. A2) \");\r\n\t\t\tdisplay.printScreen();\r\n\t\t\tdisplay.printPrompt(\"user> \");\r\n\t\t\ttry{\r\n\t\t\tattack_coord=Get_... | [
"0.707865",
"0.6903641",
"0.68494684",
"0.66672844",
"0.66546196",
"0.6641756",
"0.6637163",
"0.6591408",
"0.65877306",
"0.65359586",
"0.6384352",
"0.6377992",
"0.6358457",
"0.6347756",
"0.63410455",
"0.6326799",
"0.6321822",
"0.6321822",
"0.6284698",
"0.6278684",
"0.62724847... | 0.57918936 | 71 |
Tells server to attack a building | public static Action attackBuilding(int id, int slot, int damage) {
return new Action(id, slot, damage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void attack();",
"public void attack() {\n this.attacked = true;\n }",
"public void attack() {\n\n }",
"private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.sense... | [
"0.6442683",
"0.63344526",
"0.62761456",
"0.6246691",
"0.6206077",
"0.61961246",
"0.61603785",
"0.61444676",
"0.6033552",
"0.59816957",
"0.5969483",
"0.5932399",
"0.5921829",
"0.5904513",
"0.5904236",
"0.5897235",
"0.5889197",
"0.58600694",
"0.5837561",
"0.58331996",
"0.58310... | 0.0 | -1 |
Tells server to make a line | public static Action buildLine(int pID1, int pID2, String fac) {
return new Action(pID1, pID2, fac);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onLine(Terminal terminal, String line);",
"public void newChatLine(String line) {\n\t\tSystem.out.println(line);\n\t}",
"public void send(Object line) throws Exception {\n oos.writeObject(line);\n if(line instanceof MessageDetail){\n MessageDetail m = (MessageDetail)line;\n ... | [
"0.6901646",
"0.6880502",
"0.6717045",
"0.66616684",
"0.6444931",
"0.6362888",
"0.632642",
"0.6260301",
"0.6250996",
"0.6241206",
"0.6238909",
"0.619359",
"0.61526525",
"0.6136285",
"0.61270046",
"0.6096321",
"0.6062203",
"0.60564995",
"0.6009398",
"0.6008419",
"0.59784424",
... | 0.0 | -1 |
Tells server to delete a line | public static Action deleteLine(int pID1, int pID2, String fac) {
return new Action(pID1, pID2, fac);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void delete(LineEntity entity) {\n\n }",
"public void deleteEline(SDeleteElineInput elineId)\n throws ServerException {\n String printText = \"Delete Eline \" + elineId.getInput().getElineId();\n LOGGER.debug(printText + \" begin. \");\n Retrofit retrofit = ServiceUtil.initRetr... | [
"0.7124247",
"0.6672545",
"0.65929216",
"0.65126413",
"0.64963764",
"0.63962674",
"0.6299615",
"0.6144484",
"0.6135691",
"0.6091249",
"0.60890746",
"0.60709554",
"0.6055842",
"0.60470897",
"0.60363746",
"0.60359496",
"0.60330427",
"0.6023358",
"0.59754956",
"0.5961423",
"0.59... | 0.0 | -1 |
Add an AggregateRecord object. | public void addData(AggregateRecord record) {
this.data.add(record);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addRecord();",
"@RequiresApi(api = Build.VERSION_CODES.N)\n public long AddRecord(SHUBORecord EventRecord) {\n return model.AddRecord(EventRecord);\n }",
"public RecordObject addGroup(String token, Object record) throws RestResponseException;",
"@Override\n\tpublic void addRecords(Re... | [
"0.60637176",
"0.5866304",
"0.556888",
"0.55662185",
"0.5556554",
"0.54964036",
"0.54858166",
"0.54850465",
"0.53910595",
"0.5277436",
"0.52588475",
"0.52438295",
"0.51966035",
"0.5161476",
"0.51599455",
"0.5142312",
"0.51420647",
"0.5071114",
"0.5058994",
"0.5045048",
"0.504... | 0.71036404 | 0 |
Get the AggregateRecord objects | public List<AggregateRecord> getData() {
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<AbsRecord> getRecords()\n\t{\n\t\treturn getRecordBy(null, new GAZRecordRowMapper());\n\t}",
"public final Record[] getRecords() {\n Record[] myRecords = new Record[records.size()];\n\n Iterator iterator = records.iterator();\n for (int i = 0; i < records.size(); i++) {\n ... | [
"0.62702924",
"0.6156977",
"0.61140156",
"0.6060134",
"0.6056721",
"0.60477996",
"0.57884145",
"0.57364225",
"0.572898",
"0.5685216",
"0.56564677",
"0.56328684",
"0.56299645",
"0.56220686",
"0.5589306",
"0.55707514",
"0.5557552",
"0.5526526",
"0.5456499",
"0.54510874",
"0.541... | 0.68379414 | 0 |
Adds a new flight | public void addNewPassenger() throws SQLException {
Scanner input = new Scanner(System.in);
Connection conn = null;
try {
conn = connUtil.getConnection();
// call needed DAOs here
PassengerDAO pdao = new PassengerDAO(conn);
FlightDAO fdao = new FlightDAO(conn);
RouteDAO rdao = new RouteDAO(conn);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addflight(Flight f)\n {\n \t this.mLegs.add(f);\n \t caltotaltraveltime();\n \t caltotalprice();\n }",
"public void add(Flight flight) {\n if (validAdd(flight)) {\n addFlight(flight);\n }\n }",
"private void addFlight(Flight flight) {\n this.itinera... | [
"0.8107541",
"0.8003867",
"0.77440137",
"0.76445496",
"0.7642694",
"0.75143266",
"0.7491134",
"0.72981936",
"0.72782403",
"0.7256115",
"0.7210362",
"0.7191849",
"0.7112677",
"0.71117795",
"0.6976188",
"0.6850233",
"0.6775761",
"0.6723045",
"0.66779894",
"0.65831876",
"0.65463... | 0.60020226 | 47 |
convert employee DAO to DTO classes using valueOf and copyProperties method //// | public static EmployeeDTO valueOf(Employee employee){
EmployeeDTO employeeDTO = new EmployeeDTO();
BeanUtils.copyProperties(employee, employeeDTO);
// employeeDto.setId( employee.getId() );
// employeeDto.setFirstName( employee.getFirstName() );
return employeeDTO;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private EmployeeDto toDto(Employee employee){\n\t\tEmployeeDto employeeDto = new EmployeeDto();\n\t\temployeeDto.id = employee.getId();\n\n\t\temployeeDto.name = employee.getName();\n\t\temployeeDto.email = employee.getEmail();\n\n\t\temployeeDto.jobTypeId = employee.getJobtype().getId();\n\n\t\temployeeDto.bossId... | [
"0.7410242",
"0.7277441",
"0.6861646",
"0.66957295",
"0.6629813",
"0.662947",
"0.65658605",
"0.6537734",
"0.6527176",
"0.6520521",
"0.6507626",
"0.64801323",
"0.6422777",
"0.63500273",
"0.63466305",
"0.63370806",
"0.6333936",
"0.6297703",
"0.62848604",
"0.6223034",
"0.6217307... | 0.80774605 | 0 |
Creates a graphics and returns the shaderId of the graphics | protected int createShader(String shaderCode, final int shaderType) throws Exception {
int shaderId = glCreateShader(shaderType);
if (shaderId == GL_FALSE) throw new Exception("Error creating graphics; type: " + shaderType);
glShaderSource(shaderId, shaderCode);
glCompileShader(shaderId);
if (glGetShade... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NativeType(\"bgfx_shader_handle_t\")\n public static short bgfx_create_shader(@NativeType(\"bgfx_memory_t const *\") BGFXMemory _mem) {\n return nbgfx_create_shader(_mem.address());\n }",
"private static int createProgram(int[] shaderIds){\n int shaderProgramId = glCreateProgram();\n\n ... | [
"0.65478086",
"0.65434265",
"0.630361",
"0.61246735",
"0.6093959",
"0.6022602",
"0.5944373",
"0.5937836",
"0.59233075",
"0.5888457",
"0.5881691",
"0.5818327",
"0.57672757",
"0.5717193",
"0.5716236",
"0.5702455",
"0.56994295",
"0.5697722",
"0.56453943",
"0.5644944",
"0.5636530... | 0.67431104 | 0 |
Links the graphics to the program | public void link() throws Exception {
glLinkProgram(programId);
if (glGetProgrami(programId, GL_LINK_STATUS) == GL_FALSE)
throw new Exception("Error linking graphics code: " + glGetProgramInfoLog(programId, 1024));
if (vertexShaderId != 0)glDetachShader(programId, vertexShaderId);
if (fragmentShaderId != ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void drawMain()\n {\n // Draws the title of the program\n UI.setColor(Color.black);\n UI.fillRect(55, 5, 485, 50);\n UI.setColor(Color.white);\n UI.setFontSize(50);\n UI.drawString(\"Movie Recommender\", 60, 50);\n }",
"public void draw() {\n G... | [
"0.6746908",
"0.64964205",
"0.6483281",
"0.64817244",
"0.6476099",
"0.63948536",
"0.6385036",
"0.6327844",
"0.6313775",
"0.62851924",
"0.6267706",
"0.61979306",
"0.619682",
"0.61942697",
"0.61729527",
"0.61709976",
"0.61476386",
"0.6132526",
"0.6124159",
"0.6120048",
"0.61171... | 0.5909318 | 58 |
Metodos Getter and Setter | public boolean getVisibilidadCarta() {
return visibilidadCarta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void get() {}",
"public T get() {\n return value;\n }",
"public T get() {\n return value;\n }",
"public T get() {\n return value;\n }",
"public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;... | [
"0.641702",
"0.6300904",
"0.6300904",
"0.6300169",
"0.6192083",
"0.60979795",
"0.6051636",
"0.6016324",
"0.5979796",
"0.5958996",
"0.5913736",
"0.5905324",
"0.58675957",
"0.5841964",
"0.5836257",
"0.5836257",
"0.58141285",
"0.5806918",
"0.5794755",
"0.57883006",
"0.5777236",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Map deleteEmployee(long employeeId) {
return 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 Map deleteEmployee(String str, HttpServletResponse response) throws JSONException {
obj=new JSONObject(str);
long employeeId=0;
Object persistentInstance=null;
map=new HashMap();
Session session = sessionFactory.getCurrentSession();
if(!obj.isNull("employeeId")) {
employeeId=obj.... | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
User u = (User) redisService.get("91c72c29cde54d09831831b22880d1e9"); | @Test
public void contextLoads() {
System.out.println(redisService.get("91c72c29-cde5-4d09-8318-31b22880d1e9"));
//System.out.println(u);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void test2() { User user = new User();\n// user.setId(\"asdasd\");\n// user.setUserType(1);\n// user.setUpdateDate(new Date());\n// redisHelper.set(\"testKey\",user);\n// System.out.println(redisHelper.get(\"testKey\", User.class));\n//\n redisHelp... | [
"0.70321053",
"0.7002574",
"0.68868303",
"0.68501556",
"0.67016286",
"0.67016286",
"0.6680191",
"0.6656727",
"0.665426",
"0.65778494",
"0.6574616",
"0.65498453",
"0.6537269",
"0.6533795",
"0.64951444",
"0.64801085",
"0.6476305",
"0.64481145",
"0.64105",
"0.63381994",
"0.63228... | 0.0 | -1 |
Configure all configured WSTX client and participant implementations. | protected void initializeClassNames() throws Exception {
String userTransactionClass = PropertyManager.getInstance().get("UserTransaction");
String transactionManagerClass = PropertyManager.getInstance().get("TransactionManager");
//String userBusinessActivityClass = PropertyManager.getInstance().get("UserBusines... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void configureClient() {\n\t\tswitch (getVariant(ClientRegistration.class)) {\n\t\tcase STATIC_CLIENT:\n\t\t\tcallAndStopOnFailure(GetStaticClientConfiguration.class);\n\t\t\tconfigureStaticClient();\n\t\t\tbreak;\n\t\tcase DYNAMIC_CLIENT:\n\t\t\tcallAndStopOnFailure(StoreOriginalClientConfiguration.clas... | [
"0.62720126",
"0.54745257",
"0.5418678",
"0.53772676",
"0.5306834",
"0.52766085",
"0.5264224",
"0.5250605",
"0.524824",
"0.524378",
"0.5225613",
"0.521134",
"0.520522",
"0.51777864",
"0.51755863",
"0.51747507",
"0.517409",
"0.5171238",
"0.5166244",
"0.5161671",
"0.5149535",
... | 0.0 | -1 |
TODO Autogenerated method stub | private static String[] calc5(String[] s) {
s[0]+="!";
return s;
} | {
"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 | private static void calc2(int[] darr) {
darr[2]=100;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | private static void calc1(int x) {
x+=1;
} | {
"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 |
Intersection of sorted arrays / Find the intersection of two sorted arrays. OR in other words, Given 2 sorted arrays, find all the elements which occur in both the arrays. | public static void findIntersection(int[] A, int[] B) {
HashMap<Integer, Integer> map_A = new HashMap<>();
for (int i = 0; i < A.length; i++) {
if (map_A.containsKey(A[i]))
map_A.put(A[i], map_A.get(A[i]) + 1);
else
map_A.put(A[i], 1);
}
System.out.println(map_A);
ArrayList<Integer> ans = new Ar... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void intersectionUsingSet(Integer[] firstArray, Integer[] secondArray)\n\t{\n\t LinkedHashSet<Integer> set = new LinkedHashSet<Integer>();\n\t \n\t set.addAll(Arrays.asList(firstArray));\n\t \n\t set.retainAll(Arrays.asList(secondArray));\n\t \n\t Integer[] intersectionArray = se... | [
"0.77486324",
"0.7694329",
"0.76513934",
"0.7605791",
"0.76006204",
"0.75870895",
"0.75042194",
"0.7490587",
"0.74582285",
"0.7410317",
"0.7331394",
"0.7269777",
"0.7237271",
"0.7140704",
"0.71115106",
"0.6965944",
"0.6950856",
"0.69413406",
"0.6923832",
"0.6768318",
"0.67355... | 0.63555574 | 32 |
/ remove duplicates from sorted array | public static void removeDuplicates(int[] A) {
ArrayList<Integer> ans = new ArrayList<Integer>();
for (int i = 0; i < A.length; i++) {
if (!ans.contains(A[i])) {
ans.add(A[i]);
}
}
System.out.println(ans);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSort... | [
"0.73758596",
"0.730118",
"0.7294357",
"0.72614765",
"0.7108531",
"0.69664377",
"0.69632447",
"0.688588",
"0.67985624",
"0.6712069",
"0.66728556",
"0.6631649",
"0.66040194",
"0.65674764",
"0.65576226",
"0.6557521",
"0.65012044",
"0.6469678",
"0.64455193",
"0.64438516",
"0.641... | 0.64030606 | 23 |
/ Merge sorted arrays | public static void mergeSorted(ArrayList<Integer> A, ArrayList<Integer> B) {
ArrayList<Integer> ans = new ArrayList<Integer>();
for (int i : A) {
ans.add(i);
}
for (int i : B) {
ans.add(i);
}
Collections.sort(ans);
System.out.println(ans);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int[] mergeSortedArrays(int[] arr1, int[] arr2) {\n if (arr1 == null\n || arr2 == null\n || arr1.length == 0\n || arr2.length == 0) {\n return new int[]{-1};\n }\n\n int[] mergedArr = new int[arr1.length + arr2.length];\n ... | [
"0.73579514",
"0.7250268",
"0.72116625",
"0.7206956",
"0.71966875",
"0.7186438",
"0.7174218",
"0.7171478",
"0.7160594",
"0.71587384",
"0.7152298",
"0.7104058",
"0.7098644",
"0.7069569",
"0.70589197",
"0.7036357",
"0.70257026",
"0.7019378",
"0.7003621",
"0.6938548",
"0.6932675... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.