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 |
|---|---|---|---|---|---|---|
private static String FAILURE = "failure"; | public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
Connection conn = null;
try {
BCThanhToanTpcpForm f = (BCThanhToanTpcpForm)form;
f.reset(mapping, request);
request.setAttribute("lstThanhToanTpcp", new ArrayList());
return mapping.findForward(SUCCESS);
} catch (Exception e) {
conn.rollback();
throw e;
} finally {
close(conn);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String failureReason();",
"String getFailureMessage();",
"public void printFailure() {\n //\n }",
"void failure(String category);",
"public int failureLevel(){\n return RESULT_WARNING;\n }",
"void onFailure() {\n\t}",
"protected String failedMatcherMessage() {\n return \"FAILED!\";... | [
"0.7024005",
"0.69978744",
"0.6765787",
"0.6624655",
"0.6608777",
"0.63675165",
"0.6344529",
"0.63218915",
"0.63066745",
"0.62019515",
"0.6201821",
"0.61911464",
"0.61749864",
"0.6174652",
"0.6169146",
"0.61071837",
"0.61020267",
"0.6048497",
"0.6043678",
"0.6043678",
"0.6031... | 0.0 | -1 |
Sample usage: curl $HOST:$PORT/drivervehiclehistory?driverId=1 | @GetMapping(
value = "/driver-vehicle-history",
produces = "application/json")
List<Vehicle> getDriversVehicleHistory(@RequestParam(value = "driverId", required = true) int driverId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DeleteMapping(value = \"/driver-vehicle-history\")\n void deleteDriverVehicleHistory(@RequestParam(value = \"driverId\", required = true) int driverId);",
"public static URL getUrlForGetCarInfo( String huid )\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/connected_account_serv... | [
"0.5684985",
"0.53560555",
"0.51961905",
"0.5195205",
"0.5113317",
"0.50716966",
"0.5052907",
"0.5017036",
"0.5010478",
"0.4990663",
"0.49882978",
"0.49882087",
"0.49764943",
"0.49729678",
"0.49720037",
"0.49115047",
"0.4901928",
"0.48603526",
"0.48080835",
"0.47705114",
"0.4... | 0.7401882 | 0 |
Sample usage: curl X DELETE $HOST:$PORT/drivervehiclehistory?driverId=1 | @DeleteMapping(value = "/driver-vehicle-history")
void deleteDriverVehicleHistory(@RequestParam(value = "driverId", required = true) int driverId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value = \"/drivers/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Driver : {}\", id);\n driverRepository.del... | [
"0.6303217",
"0.6251851",
"0.6030642",
"0.5885645",
"0.58806425",
"0.5760364",
"0.57335925",
"0.5699849",
"0.5697845",
"0.5692934",
"0.5673077",
"0.5672705",
"0.5656788",
"0.5649214",
"0.5641793",
"0.558137",
"0.55807894",
"0.55782795",
"0.5544767",
"0.55394053",
"0.5520888",... | 0.74511534 | 0 |
whether it is highlighted or not / The default constructor instantiates all components Instantiates a new element. | public Element() {
x = 0;
y = 0;
color = Color.gray;
hilite = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}",
"private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }",
"protected Highlighter createHighlighter() {\n return new BasicHighlighter();\n }",
"public JAnnotationCheckBox(){\n ... | [
"0.6935065",
"0.65407026",
"0.64139736",
"0.63795656",
"0.6288041",
"0.614634",
"0.608263",
"0.6052046",
"0.59393656",
"0.5938485",
"0.5913502",
"0.5904555",
"0.5901923",
"0.5897928",
"0.5890021",
"0.58831024",
"0.58597517",
"0.58444583",
"0.58160686",
"0.57953304",
"0.578850... | 0.58916396 | 14 |
/ The following constructor initializes all components of an element Instantiates a new element. | public Element(int someX, int someY, Color someColor) {
x = someX;
y = someY;
color = someColor;
hilite = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Element() {\n\t}",
"public WebElement() {}",
"public GenericElement() {\n\t}",
"public BasicElementList() {\n\t}",
"public AbstractElement() {\n }",
"public XmlElement() {\n }",
"public BaseElement() {\n }",
"public Element() {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tcolor = Color.gray;\r\n\t\thi... | [
"0.7827964",
"0.74380386",
"0.7432698",
"0.7342951",
"0.7330501",
"0.72311294",
"0.7225044",
"0.72036123",
"0.7129993",
"0.69762623",
"0.6947445",
"0.69008505",
"0.68230677",
"0.6798176",
"0.6606188",
"0.6575486",
"0.65089023",
"0.6507718",
"0.6489207",
"0.6485542",
"0.647768... | 0.63024724 | 29 |
/ The following access method resets the location of an element Sets the location. | public void setLocation(int someX, int someY) {
x = someX;
y = someY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void resetLocation() {\n\t\t\n\t}",
"public void setElement(Location element){\n\t\t\tthis.element = element;\n\t\t}",
"public void resetPosition()\n {\n resetPosition(false);\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"publ... | [
"0.6918896",
"0.6901019",
"0.6817689",
"0.6445054",
"0.6420285",
"0.6332819",
"0.6289044",
"0.62097144",
"0.61912996",
"0.61821866",
"0.61123955",
"0.6059401",
"0.59673756",
"0.59515923",
"0.5927771",
"0.5903",
"0.5874011",
"0.5853424",
"0.58408713",
"0.58368045",
"0.5828888"... | 0.53446656 | 98 |
/ The following access methods return the location of an element Gets the x. | public int getX() {
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getX() { return loc.x; }",
"public int getX()\r\n {\r\n return xLoc;\r\n }",
"int getPosition(Object elementID) throws Exception;",
"public int getX(){\n\t\treturn this.x_location;\n\t}",
"public int getXOffset();",
"public int getLocX() {\n return locX;\n }",
"public int ge... | [
"0.7879431",
"0.7643655",
"0.75495666",
"0.75093865",
"0.7477447",
"0.7398029",
"0.73837984",
"0.7344443",
"0.73258764",
"0.726753",
"0.7249054",
"0.7214894",
"0.72112834",
"0.7202581",
"0.711301",
"0.7106624",
"0.70698065",
"0.7045728",
"0.701511",
"0.70036745",
"0.699862",
... | 0.6760047 | 65 |
/ The following method implements the comparable interface (we use the alphanumeric ordering on the string representation of the elements). / (nonJavadoc) | public int compareTo(Object element) {
return toString().compareTo(element.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int compare(Object arg0, Object arg1) {\n\t\treturn arg0.toString().compareTo(arg1.toString());\n\t}",
"@Override\r\n\tpublic int compareTo(Item another) {\n\t\treturn this.toString().compareTo(another.toString());\r\n\t}",
"public int compare(Object o1, Object o2) {\n/* 25 */ Alphabet ... | [
"0.6573094",
"0.6541967",
"0.64904225",
"0.64656526",
"0.6437136",
"0.6401692",
"0.63418245",
"0.6334797",
"0.629291",
"0.629291",
"0.6291346",
"0.6279363",
"0.6270875",
"0.6270127",
"0.6270127",
"0.6270127",
"0.6268603",
"0.6268603",
"0.62588394",
"0.6210099",
"0.6151278",
... | 0.66657156 | 0 |
/ Paints the elements Paint. | public void paint(Graphics pane) {
final int DELTA = 2; // The offset within the box/frame
pane.setColor(Color.black); // Drawing the box/frame of the element
pane.drawRect(x, y, WIDTH, HEIGHT);
pane.setColor(color); // and the inside of the element
pane.fill3DRect(x + DELTA, y + DELTA, WIDTH - 2 * DELTA + 1, HEIGHT - 2
* DELTA + 1, hilite);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void paint() {\r\n\r\n\t\tsuper.paint();\r\n\t\r\n\t\tint len = _composites.size();\r\n\t\tfor (int i = 0; i < len; i++) {\r\n\t\t\tComposite c = _composites.get(i);\r\n\t\t\tc.paint();\r\n\t\t}\t\t\t\t\t\t\r\n\t}",
"public void paintComponenet(){\r\n\t\tfor(DShape ds : shapes){\r\n\t\t\tds.draw();\r\n\t\... | [
"0.7198152",
"0.7157447",
"0.69992846",
"0.6993279",
"0.69096786",
"0.66319704",
"0.66048527",
"0.659933",
"0.65486956",
"0.6501051",
"0.6494739",
"0.640628",
"0.64004445",
"0.6373535",
"0.6348415",
"0.63183635",
"0.63115644",
"0.6268404",
"0.6251012",
"0.62507826",
"0.624473... | 0.5916937 | 93 |
HTML file name to be rendered on the view mode | public void init() throws PortletException{
super.init();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getHTMLResourceFileName() \n {\n return null; \n }",
"public String getViewFilename(String viewName) {\n\t\treturn viewName + \".ser\";\n\t}",
"private static String getHtmlFilePath(RenderRequest request, String htmlFile) {\r\n\t\tString markup = request.getProperty(\"wps.mar... | [
"0.6463943",
"0.64072156",
"0.64059097",
"0.6363907",
"0.6228561",
"0.6222454",
"0.6125609",
"0.6122139",
"0.6032685",
"0.5982618",
"0.5866601",
"0.58616674",
"0.5860694",
"0.5837162",
"0.5817442",
"0.5782696",
"0.5775104",
"0.57604903",
"0.56809705",
"0.5661513",
"0.5645183"... | 0.0 | -1 |
Serve up the view mode. | public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
// Set the MIME type for the render response
response.setContentType(request.getResponseContentType());
// Invoke the HTML to render
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(getHtmlFilePath(request, VIEW_HTML));
rd.include(request,response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Timed\n @RequestMapping(\n method = RequestMethod.GET,\n value = \"/views\"\n )\n public String handleViews(\n @Nonnull Model model\n ) {\n LOGGER.debug(\"handleViews called\");\n return handleSinglePageApp(model);\n }",
"@SuppressWarnings(\"resource... | [
"0.6205025",
"0.6144188",
"0.6131678",
"0.61042434",
"0.6041308",
"0.60052234",
"0.5998998",
"0.58518755",
"0.57975674",
"0.5772948",
"0.57103944",
"0.5707191",
"0.5697851",
"0.56974775",
"0.56970704",
"0.5687176",
"0.5684419",
"0.56554866",
"0.5647823",
"0.5645956",
"0.56407... | 0.57094246 | 11 |
Process an action request. | public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void processAction (ActionRequest request, ActionResponse response) \n throws PortletException, java.io.IOException {\n throw new PortletException(\"processAction method not implemented\");\n }",
"public void processAction(CIDAction action);",
"@Override\r\n\tpublic void processAction(ActionReque... | [
"0.7330553",
"0.71148807",
"0.6894756",
"0.6830488",
"0.672735",
"0.6421334",
"0.64196026",
"0.63890296",
"0.628415",
"0.62501633",
"0.6241703",
"0.6199929",
"0.6108097",
"0.6101484",
"0.6006897",
"0.59994173",
"0.5995383",
"0.59758157",
"0.5974525",
"0.5899972",
"0.58034474"... | 0.76426005 | 0 |
Process a serve Resource request. | public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, java.io.IOException {
String resourceID = request.getResourceID();
if (resourceID.equals("resourceID")) {
// Insert code for serving the resource
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void serve() {\n\t\tif (request == null) {\n\t\t\tchannel.close();\n\t\t\treturn;\n\t\t}\n\t\tlogger.fine(\"Serving \" + type + \" request : \" + request.getPath());\n\t\tResponse resp = RequestHandler.handle(request);\n\t\tif (resp.getRespCode() == ResponseCode.NOT_FOUND) {\n\t\t\terror404(resp);\n\t\t\tr... | [
"0.65067923",
"0.6412852",
"0.61353076",
"0.59267396",
"0.5916396",
"0.5904598",
"0.58898103",
"0.5858589",
"0.58086675",
"0.57216036",
"0.57161015",
"0.56706256",
"0.564955",
"0.5633048",
"0.5601773",
"0.5590541",
"0.5586093",
"0.5574353",
"0.5534169",
"0.55302477",
"0.55190... | 0.76627725 | 0 |
Returns HTML file path. | private static String getHtmlFilePath(RenderRequest request, String htmlFile) {
String markup = request.getProperty("wps.markup");
if( markup == null )
markup = getMarkup(request.getResponseContentType());
return HTML_FOLDER + markup + "/" + htmlFile + "." + getHtmlExtension(markup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String readHTML(String path){\r\n String htmlStr = \"\";\r\n String root = \"\";\r\n try { \r\n root = System.getProperty(\"user.dir\") + \"\\\\src\\\\\";\r\n htmlStr = FileUtils.readFileToString(new File(root+path), \"UTF-8\");\r\n System.out.pr... | [
"0.67652535",
"0.67185736",
"0.6557981",
"0.64999515",
"0.64282733",
"0.62537485",
"0.6187544",
"0.6156179",
"0.6153309",
"0.6112681",
"0.60781485",
"0.60781485",
"0.60781485",
"0.60781485",
"0.60781485",
"0.6067897",
"0.6047242",
"0.6047242",
"0.6047242",
"0.60433984",
"0.60... | 0.791201 | 0 |
Convert MIME type to markup name. | private static String getMarkup(String contentType) {
if( "text/vnd.wap.wml".equals(contentType) )
return "wml";
else
return "html";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getMimeType();",
"java.lang.String getMimeType();",
"String getMimeType();",
"public static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = ... | [
"0.6361",
"0.6361",
"0.6250383",
"0.62323296",
"0.616349",
"0.6147002",
"0.6147002",
"0.6147002",
"0.61403275",
"0.6111509",
"0.60932094",
"0.6055158",
"0.60348856",
"0.6032478",
"0.602979",
"0.5870915",
"0.58653176",
"0.5816756",
"0.5809857",
"0.5801358",
"0.57910657",
"0.... | 0.6203037 | 4 |
Returns the file extension for the HTML file | private static String getHtmlExtension(String markupName) {
return "html";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"public String getFileExtension();",
"String getFileExtension();",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"protected abstract String getFileExtension();",
"public Str... | [
"0.80014426",
"0.80002666",
"0.7987422",
"0.78117806",
"0.75728124",
"0.7525794",
"0.75026697",
"0.7475212",
"0.7464988",
"0.7464556",
"0.7446341",
"0.74297774",
"0.7360866",
"0.7255734",
"0.7234338",
"0.7219632",
"0.7181425",
"0.7162255",
"0.7146698",
"0.71014243",
"0.708525... | 0.68886745 | 34 |
Return the size of a directory in bytes | private static long dirSize(File dir) {
long result = 0;
File[] fileList = dir.listFiles();
for(int i = 0; i < fileList.length; i++) {
// Recursive call if it's a directory
if(fileList[i].isDirectory()) {
result += dirSize(fileList[i]);
} else {
// Sum the file size in bytes
result += fileList[i].length();
}
}
return result; // return the file size
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private long directorySize(String name) {\n\t\tFile directory = new File(name);\n\t\tif (!directory.exists())\n\t\t\treturn 0;\n\t\tif (directory.isFile()) \n\t\t\treturn directory.length();\n\t\tlong length = 0;\n\t\tfor (File file : directory.listFiles()) {\n\t\t\tif (file.isFile())\n\t\t\t\tlength += file.lengt... | [
"0.76754117",
"0.7391316",
"0.735968",
"0.71667325",
"0.70941466",
"0.70941466",
"0.7021354",
"0.6966108",
"0.69628567",
"0.6869404",
"0.6821447",
"0.6798973",
"0.67125285",
"0.6676587",
"0.6651424",
"0.6637788",
"0.6618083",
"0.65848243",
"0.6571423",
"0.6551009",
"0.6517276... | 0.772603 | 0 |
TODO Autogenerated method stub | @Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
} | {
"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 |
If the bound view wasn't previously displayed on screen, it's animated | private void setAnimation(View viewToAnimate, int position)
{
if (position > lastPosition)
{
Animation animation = AnimationUtils.loadAnimation(mContext, android.R.anim.slide_in_left);
viewToAnimate.startAnimation(animation);
lastPosition = position;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setAnimation(View viewToAnimate, int position)\n{\n // If the bound view wasn't previously displayed on screen, it's animated\n if (position > lastPosition)\n {\n Animation animation = AnimationUtils.loadAnimation(context, R.anim.push_in);\n viewToAnimate.startAnimation(animatio... | [
"0.7276176",
"0.6662817",
"0.6333922",
"0.6302039",
"0.62181354",
"0.620517",
"0.61824524",
"0.6118509",
"0.6038693",
"0.6034874",
"0.5969404",
"0.595302",
"0.59155476",
"0.5912689",
"0.59036213",
"0.5896109",
"0.5874284",
"0.5869445",
"0.5857874",
"0.5856823",
"0.58553284",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver","C://eclipse//geckodriver-v0.24.0-win64//geckodriver.exe");
FirefoxDriver driver=new FirefoxDriver();
driver.get("https://www.facebook.com/");
String exptitle="Facebook - Log In or Sign Up";
String actitle=driver.getTitle();
if(exptitle.contentEquals(actitle))
{
System.out.println("test pass");
}
else
{
System.out.println("test fail");
}
} | {
"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 |
Aggregates all tests in this class. | public static Test suite() {
return new TestSuite(ProjectManagerImplTest.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AllTests() {\n\t\taddTest(new TestSuite(TestSuiteTest.class));\n\t}",
"public static Test suite() {\n\t\treturn new AllTests();\n\t}",
"public ResultatTest() {\n\t\tthis.nbTests = 0;\n\t\tthis.echecs = new ArrayList<TestExecute>();\n\t\tthis.erreurs = new ArrayList<TestExecute>();\n\t}",
"public stati... | [
"0.74496865",
"0.6951703",
"0.67455524",
"0.6583134",
"0.6583134",
"0.656195",
"0.64183456",
"0.62300414",
"0.6207902",
"0.61426884",
"0.6121414",
"0.6119837",
"0.61139",
"0.6085629",
"0.6078692",
"0.60579306",
"0.60447425",
"0.6020475",
"0.6002619",
"0.5996043",
"0.59944105"... | 0.0 | -1 |
Sets up the environment for the TestCase. | protected void setUp() throws Exception {
ConfigManager cm = ConfigManager.getInstance();
for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {
cm.removeNamespace((String) iter.next());
}
ConfigManager.getInstance().add("stress/config.xml");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEn... | [
"0.79834116",
"0.766974",
"0.76603186",
"0.74832964",
"0.7359477",
"0.73511845",
"0.7295517",
"0.70612246",
"0.70321876",
"0.6986305",
"0.69594204",
"0.69521123",
"0.6948329",
"0.6945627",
"0.69348687",
"0.6933976",
"0.6925414",
"0.69216454",
"0.68751955",
"0.6858902",
"0.682... | 0.0 | -1 |
Tears down the environment for the TestCase. | protected void tearDown() throws Exception {
ConfigManager cm = ConfigManager.getInstance();
for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {
cm.removeNamespace((String) iter.next());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void tearDown() {\n testEnv.close();\n }",
"public void teardown() {\n LOGGER.info(\"Shutting down driver\");\n driver.quit();\n }",
"@After\r\n public void tearDown() throws Exception {\r\n super.tearDown();\r\n TestHelper.cleanupEnvironment();\r\n ... | [
"0.83317924",
"0.78652376",
"0.7752561",
"0.77257496",
"0.769021",
"0.7664505",
"0.7516921",
"0.7513481",
"0.7493375",
"0.74824053",
"0.7476982",
"0.74478686",
"0.7328868",
"0.73252606",
"0.7310032",
"0.7295365",
"0.7289664",
"0.727653",
"0.727653",
"0.72501564",
"0.7243508",... | 0.0 | -1 |
test ProjectManagerImpl constructor. Create ProjectManagerImpl instance 100 times use default namespace. | public void testConstructor1() throws Exception {
long startTime = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
ProjectManager projectManager = new ProjectManagerImpl();
assertNotNull("projectManager can not be null.", projectManager);
}
long endTime = System.currentTimeMillis();
System.out.println("Create ProjectManagerImpl instance 100 times use default namespace takes "
+ (endTime - startTime) + "ms");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testConstructor3() throws Exception {\n long startTime = System.currentTimeMillis();\n for (int i = 0; i < 500; i++) {\n ProjectManager projectManager = new ProjectManagerImpl(\"stress.ProjectManagerImpl\");\n assertNotNull(\"projectManager can not be null.\", projec... | [
"0.7914944",
"0.78539497",
"0.6511949",
"0.647638",
"0.6405556",
"0.6313161",
"0.6313161",
"0.6312876",
"0.6255734",
"0.6161968",
"0.61301374",
"0.60875356",
"0.60729754",
"0.60595506",
"0.5898554",
"0.5898554",
"0.5898554",
"0.5804519",
"0.5787305",
"0.57844245",
"0.57347894... | 0.8095378 | 0 |
test ProjectManagerImpl constructor. Create ProjectManagerImpl instance 100 times use given namespace. | public void testConstructor2() throws Exception {
long startTime = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
ProjectManager projectManager = new ProjectManagerImpl("stress.ProjectManagerImpl");
assertNotNull("projectManager can not be null.", projectManager);
}
long endTime = System.currentTimeMillis();
System.out.println("Create ProjectManagerImpl instance 100 times use given namespace takes "
+ (endTime - startTime) + "ms");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testConstructor3() throws Exception {\n long startTime = System.currentTimeMillis();\n for (int i = 0; i < 500; i++) {\n ProjectManager projectManager = new ProjectManagerImpl(\"stress.ProjectManagerImpl\");\n assertNotNull(\"projectManager can not be null.\", projec... | [
"0.77812874",
"0.7780307",
"0.59662664",
"0.5921558",
"0.584892",
"0.58278245",
"0.5778541",
"0.5741532",
"0.573429",
"0.573429",
"0.5627833",
"0.55775553",
"0.5567199",
"0.55446017",
"0.5514619",
"0.5514619",
"0.5514619",
"0.54802954",
"0.5471265",
"0.53708214",
"0.5369281",... | 0.7794095 | 0 |
test ProjectManagerImpl constructor. Create ProjectManagerImpl instance 500 times use given namespace. | public void testConstructor3() throws Exception {
long startTime = System.currentTimeMillis();
for (int i = 0; i < 500; i++) {
ProjectManager projectManager = new ProjectManagerImpl("stress.ProjectManagerImpl");
assertNotNull("projectManager can not be null.", projectManager);
}
long endTime = System.currentTimeMillis();
System.out.println("Create ProjectManagerImpl instance 500 times use given namespace takes "
+ (endTime - startTime) + "ms");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testConstructor2() throws Exception {\n long startTime = System.currentTimeMillis();\n for (int i = 0; i < 100; i++) {\n ProjectManager projectManager = new ProjectManagerImpl(\"stress.ProjectManagerImpl\");\n assertNotNull(\"projectManager can not be null.\", projec... | [
"0.7763828",
"0.770762",
"0.57480776",
"0.57082075",
"0.57063293",
"0.5621947",
"0.56038755",
"0.55914533",
"0.55914533",
"0.55743927",
"0.5568313",
"0.5556767",
"0.54899096",
"0.546202",
"0.5409036",
"0.5395254",
"0.5323378",
"0.53085023",
"0.5305215",
"0.52735937",
"0.52735... | 0.7928784 | 0 |
Gets namespace policies applicable for the CA. The CA must be present in the cert chain, at the position given. The subsequent chain elements might be used if there is no explicit policy defined for the CA itself: then it is checked if any of the parent CAs defined policy for this CA. | public List<NamespacePolicy> getPolicies(X509Certificate[] chain, int position); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SigningPolicy[] getSigningPolicies() {\n\n if (this.policyDNMap == null) {\n return null;\n }\n\n Collection values = this.policyDNMap.values();\n SigningPolicy[] policies = new SigningPolicy[values.size()];\n Iterator iterator = values.iterator();\n int ... | [
"0.51767033",
"0.50552845",
"0.49891892",
"0.4953979",
"0.4952058",
"0.4936146",
"0.492353",
"0.47790068",
"0.46945706",
"0.46805835",
"0.45822194",
"0.45334896",
"0.45039514",
"0.44621855",
"0.4414066",
"0.4400886",
"0.4397039",
"0.4358328",
"0.43075585",
"0.430095",
"0.4300... | 0.78441226 | 0 |
Patches a memory leak in JceSecurity. The bug is provoked by using springbootstartermail and spring.mail.properties.mail.smtp.starttls.enabled=true. Each time /management/health/mail is invoked, some memory is leaked. | @SneakyThrows
@PostConstruct
public void patchMemoryLeakIn_javax_crypto_JceSecurity() {
Class<?> cl = Class.forName("javax.crypto.JceSecurity");
logger.info("Monkey patching memory leak in {}", cl.getName());
Field field = cl.getDeclaredField("verificationResults");
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
Map<Provider, Object> map = Collections.synchronizedMap(new WeakHashMap<>());
//noinspection unchecked
Map<Provider, Object> verificationResults = (Map<Provider, Object>) field.get(null);
map.putAll(verificationResults);
field.set(null, map);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n public JavaMailSender javaMailService() {\n JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();\n \n javaMailSender.setHost(\"smtp.gmail.com\");\n javaMailSender.setPort(587);\n javaMailSender.setUsername(\"\");\n javaMailSender.setPassword(\"\");\n ... | [
"0.50346327",
"0.50239766",
"0.4984812",
"0.47394565",
"0.46446016",
"0.4586275",
"0.45692897",
"0.4554243",
"0.45408586",
"0.45337895",
"0.4525541",
"0.4504165",
"0.44880486",
"0.4468411",
"0.4455184",
"0.4443656",
"0.44309387",
"0.43903416",
"0.4386912",
"0.43807578",
"0.43... | 0.6943642 | 0 |
Command to grab a screenshot of the current channel | public GRAB(String filename) {
this.filename = filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void screenshot() {\n\t\tRemoteWebDriver rwd = ((RemoteWebDriver) web.driver);\r\n\t\ttry {\r\n\t\t\trwd.getCommandExecutor().execute(new Command(rwd.getSessionId(), DriverCommand.ELEMENT_SCREENSHOT));\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.reportStackTrace(e);\r\n\t\t}\r\n\r\n\t}",
"private voi... | [
"0.67300487",
"0.6490889",
"0.64716125",
"0.6309071",
"0.62774163",
"0.6239858",
"0.6176087",
"0.6144696",
"0.61203337",
"0.607911",
"0.60565096",
"0.60121506",
"0.60044384",
"0.6000144",
"0.5967683",
"0.5957256",
"0.5942658",
"0.59376776",
"0.5916703",
"0.59110284",
"0.59077... | 0.0 | -1 |
Returns the quality of the screenshot. This parameter only applies to the jpeg format | public int getQuality() {
return quality;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getImageQualityPref();",
"@MavlinkFieldInfo(\n position = 7,\n unitSize = 1,\n description = \"JPEG quality. Values: [1-100].\"\n )\n public final int jpgQuality() {\n return this.jpgQuality;\n }",
"java.lang.String getQuality();",
"public float getQuality... | [
"0.724478",
"0.675426",
"0.66728234",
"0.66106427",
"0.6527133",
"0.6503224",
"0.6399912",
"0.632908",
"0.62628895",
"0.603657",
"0.603657",
"0.60181004",
"0.5971378",
"0.5969302",
"0.5933446",
"0.5851822",
"0.58492714",
"0.58467597",
"0.58164954",
"0.5802119",
"0.5753908",
... | 0.6689092 | 4 |
Sets the quality of the screenshot This parameter only applies to the jpeg format | public void setQuality(int quality) {
this.quality = quality;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setQuality(float quality);",
"public void setQuality(Integer quality) {\n this.quality = quality;\n }",
"public void setQuality(int value) {\n this.quality = value;\n }",
"public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\... | [
"0.722604",
"0.697732",
"0.68798435",
"0.6682683",
"0.6399202",
"0.6378257",
"0.61683273",
"0.5984784",
"0.58857733",
"0.5758754",
"0.5605569",
"0.55307037",
"0.5486627",
"0.5486627",
"0.5486627",
"0.5450684",
"0.53657895",
"0.53445196",
"0.53441954",
"0.5331226",
"0.5287289"... | 0.71781856 | 2 |
Returns the resolution of the screenshot | public Resolution getResolution() {
return resolution;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static int[] getResolution ()\n\t{\n\t\t//get the Toolkit of this instance\n\t\tToolkit tk = Toolkit.getDefaultToolkit ();\n\t\t\n\t\t//get the screen size as Dimension object\n\t\tDimension resolution = tk.getScreenSize ();\n\n\t\tint[] rez = new int[2];\n\n\t\t//extract integers from that Dimension object\n\t\tr... | [
"0.7183919",
"0.702702",
"0.7002513",
"0.6881668",
"0.68554705",
"0.6850574",
"0.67267275",
"0.667698",
"0.6656641",
"0.65868586",
"0.6547911",
"0.6547911",
"0.65166163",
"0.64965385",
"0.6484301",
"0.64134914",
"0.6399575",
"0.6372446",
"0.6332796",
"0.63296735",
"0.6321574"... | 0.6150481 | 34 |
Sets the resolution of the screenshot | public void setResolution(Resolution resolution) {
this.resolution = resolution;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void SetResolution() {\r\n DisplayMetrics displayMetrics = new DisplayMetrics();\r\n WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);\r\n wm.getDefaultDisplay().getMetrics(displayMetrics);\r\n this.ScreenWidth = displayMetrics.widthPixels;... | [
"0.75626063",
"0.74423146",
"0.7201761",
"0.71683466",
"0.67673564",
"0.67018217",
"0.666097",
"0.6555677",
"0.64827967",
"0.64284",
"0.6421491",
"0.6407656",
"0.6404078",
"0.6373809",
"0.63560647",
"0.63390535",
"0.6313742",
"0.62716293",
"0.6249923",
"0.62059784",
"0.617399... | 0.65920794 | 7 |
Determines, where the screenshot will be saved | public void setFilename(String filename) {
this.filename = filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }",
"public void saveScreenshot() {\n if (ensureSDCardAccess(... | [
"0.7476069",
"0.7297337",
"0.72079116",
"0.70042485",
"0.6985464",
"0.66677386",
"0.65664935",
"0.65310836",
"0.6525404",
"0.65205187",
"0.6516224",
"0.6461564",
"0.64521533",
"0.6450838",
"0.64193976",
"0.6407831",
"0.6400531",
"0.6398362",
"0.6354644",
"0.634435",
"0.632800... | 0.0 | -1 |
The method for get next position for unit. | public abstract Position nextPosition(Position position); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Pos nextPos(Pos pos) {\n // Get my track from display\n return cd.nextPos(no, pos);\n }",
"@Override\n public Point peekNextPosition() {\n int nextX = (current.x + 1) % 3;\n int nextY = (current.y + 1) % 3;\n// System.out.println(\"Next X: \" + nextX);\n// System.o... | [
"0.6930105",
"0.66800666",
"0.6653069",
"0.6619788",
"0.66136914",
"0.6595321",
"0.6564946",
"0.65640724",
"0.6549858",
"0.6545774",
"0.64632744",
"0.64426875",
"0.6428505",
"0.64085317",
"0.6382919",
"0.6380053",
"0.63723403",
"0.6343401",
"0.63306063",
"0.6323827",
"0.62863... | 0.7429244 | 0 |
Initialize the entire GUI, including toolbars, scoreinformation and the main chessboard | private void initializeGUI(JPanel chessBoardGUI){
GUI.setBorder(new EmptyBorder(5,5,5,5));
JToolBar tools = new JToolBar();
//tools.setPreferredSize(new Dimension(600,50) );
tools.setFloatable(false);
GUI.add(tools, BorderLayout.PAGE_START);
JButton newGameButton = new JButton("New Game");
newGameButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newGameClicked(e);
}
});
tools.add(newGameButton);
tools.addSeparator();
JButton forfeitButton = new JButton("Forfeit");
forfeitButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
forfeitClicked(e);
}
});
tools.add(forfeitButton);
tools.addSeparator();
JButton changeSideButton = new JButton("Change side");
changeSideButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
changeSideClicked(e);
}
});
tools.add(changeSideButton);
tools.addSeparator();
JButton newPlayersButton = new JButton("New Players");
newPlayersButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newPlayersClicked(e);
}
});
tools.add(newPlayersButton);
tools.addSeparator();
JButton undoButton = new JButton("Undo");
undoButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
undoClicked(e);
}
});
tools.add(undoButton);
tools.addSeparator();
tools.add(message);
JPanel pageEndPanel = new JPanel();
pageEndPanel.setLayout(new GridLayout(1,3));
pageEndPanel.add(new JLabel(" Score:"));
pageEndPanel.add(scoreInfo);
pageEndPanel.add(turnInfo);
GUI.add(pageEndPanel, BorderLayout.PAGE_END);
GUI.add(chessBoardGUI);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initComponents() {\n\t\tthis.setTitle(\"Boggle\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setMinimumSize(new Dimension(600, 575));\n\t\t\n\t\tinitMenuBar();\n\t\tinitDiceGridPanel();\n\t\tinitInputPanel();\n\t\tinitInfoPanel();\n\t\taddPanels();\n\t\t\n\t\tthis.setVisible(true);\... | [
"0.7834189",
"0.7693663",
"0.76667637",
"0.76626486",
"0.76563716",
"0.7520488",
"0.7504432",
"0.7474285",
"0.7458266",
"0.74464715",
"0.7422238",
"0.7411609",
"0.7409955",
"0.7400778",
"0.73875016",
"0.73779947",
"0.73779947",
"0.73747987",
"0.73395234",
"0.73334557",
"0.729... | 0.75179195 | 6 |
initialize button for all chess pieces | private void initializeButton(JPanel myPanel) {
for (int row = 0; row < 8; row++) {
for (int col = 0; col < 8; col++) {
JButton myButton = new JButton();
buttonGrid[row][col] = myButton;
setButtonIcon(row,col);
if ((row + col) % 2 == 0)
myButton.setBackground(Color.WHITE);
else
myButton.setBackground(Color.GRAY);
myButton.setOpaque(true);
myButton.setBorderPainted(false);
myButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
pieceButtonClicked(e);
}
});
myPanel.add(myButton);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startNewGame(){\n if (selectedPiece!=null)\n selectedPiece.setBackground(getDefaultColor(selectedPiece));\n selectedPiece = null;\n setAllToDefaultColor();\n setDefulatMessage();\n board = new ChessBoard(1, false);\n for(int row = 0 ; row < ROWS; ro... | [
"0.757446",
"0.71790177",
"0.71046835",
"0.70955074",
"0.7070749",
"0.70594895",
"0.7037278",
"0.6965779",
"0.6852884",
"0.6763122",
"0.6758297",
"0.6749058",
"0.67481935",
"0.66936696",
"0.6671746",
"0.6651647",
"0.66432846",
"0.6633209",
"0.65995157",
"0.65961576",
"0.65783... | 0.7472024 | 1 |
event listener when a chess piece is clicked | protected void pieceButtonClicked(ActionEvent e) {
if (board.ended) return;
JButton button = (JButton) e.getSource();
Pair<Integer, Integer> coord = getJButtonCoord(button);
int row = coord.getKey();
int col = coord.getValue();
if (board.isCurrentPlayerPiece(row, col)) {
if (selectedPiece != null) {
setAllToDefaultColor();
//selectedPiece.setBackground(getDefaultColor(selectedPiece));
}
selectedPiece = button;
selectedPiece.setBackground(Color.BLUE);
drawPossibleMoves();
} else {
if (selectedPiece != null) { //try move selectedPiece to coord
Pair<Integer,Integer> coordSelected = getJButtonCoord(selectedPiece);
int startRow = coordSelected.getKey();
int startCol = coordSelected.getValue();
int status = board.movePiece(startRow,startCol,row,col);
if (status == 0){ // invalid move
message.setText("illegal move");
}else {
//move the piece
button.setIcon(selectedPiece.getIcon());
selectedPiece.setIcon(null);
selectedPiece.setBackground(getDefaultColor(selectedPiece));
selectedPiece = null;
setAllToDefaultColor();
if (status == 1) {
Boolean isChecked = board.isChecked(board.turn);
String nextTurn = board.turn == 0 ? "Black" : "White";
if (isChecked)
nextTurn = "CHECK! " + nextTurn;
message.setText(nextTurn + "'s turn");
}else if (status == 2){ // black wins
message.setText("Black Wins!");
playerScores[blackPlayer]++;
refreshScore();
} else if (status == 3){ // white wins
playerScores[ 1- blackPlayer] ++;
refreshScore();
message.setText("White Wins!");
} else if (status == 4 ) { // draws
playerScores[0]++;
playerScores[1]++;
refreshScore();
message.setText("Draws!");
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif (arg0.getSource() instanceof ChessPiece && status.getStatus().equals(GameStatus.GAME_STATUS_EDIT) && arg0.getButton() == MouseEvent.BUTTON3) {\r\n\t\t\tChessPiece p = (ChessPiece)arg0.getSource();\r\n\t\t\tif (p.chessPlayer.equals(\"black\") && p.p... | [
"0.7140344",
"0.7078166",
"0.69155157",
"0.6897211",
"0.68884164",
"0.6844108",
"0.6721955",
"0.67025185",
"0.6693373",
"0.668952",
"0.66011196",
"0.6592419",
"0.65735537",
"0.65709436",
"0.65300786",
"0.6517482",
"0.6506987",
"0.6506804",
"0.6420611",
"0.6397461",
"0.6370949... | 0.6861075 | 5 |
event listener for new game button will start new game and initialize everything except player information | protected void newGameClicked(ActionEvent e) {
startNewGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void newGame() {\n init();\n updateScoreBoard();\n Toast.makeText(getContext(), \"New Game started\", Toast.LENGTH_LONG).show();\n }",
"public void handleNewGameEvent(ActionEvent event) {\n\t\tgame.startNewGame();\n\t}",
"private void startNewGame()\n {\n \n \t//this.mIsSin... | [
"0.7731939",
"0.75548685",
"0.74036926",
"0.73514163",
"0.7349541",
"0.7292714",
"0.72710824",
"0.72409487",
"0.7231027",
"0.7203721",
"0.7159117",
"0.715412",
"0.71539885",
"0.7151036",
"0.7136074",
"0.712698",
"0.70871013",
"0.70358515",
"0.69732684",
"0.6972516",
"0.695931... | 0.7433248 | 2 |
event listener for new player button ask users to input player names and initialize the entire game | protected void newPlayersClicked(ActionEvent e) {
getPlayerNames();
blackPlayer = 0;
playerScores[0] = 0;
playerScores[1] = 0;
refreshScore();
updateTurnInfo();
startNewGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(nul... | [
"0.6880821",
"0.68402463",
"0.6810238",
"0.6788713",
"0.67576283",
"0.6697858",
"0.66499406",
"0.66318977",
"0.6582721",
"0.65803605",
"0.65728843",
"0.6544906",
"0.6520998",
"0.64668506",
"0.6455277",
"0.64366806",
"0.64251786",
"0.64074296",
"0.6401709",
"0.63993526",
"0.63... | 0.72657335 | 0 |
find all the possible moves and change the background to green | protected void drawPossibleMoves(){
if (selectedPiece == null) return;
Pair<Integer,Integer> coord = getJButtonCoord(selectedPiece);
int startRow = coord.getKey();
int startCol = coord.getValue();
for(int row = 0;row < ROWS;row ++){
for(int col = 0; col < COLS ;col++){
if (board.canMove(startRow,startCol,row,col)){
buttonGrid[row][col].setBackground(Color.GREEN);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void processNextMove(List<Coordinates> moves, Ball color);",
"private void setValidMoves() {\n\t\tl.getValidMoves();\n\n\t\tif(l.upValid) {\t// Update upward movement\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\n\t\tif(l.leftValid) {\t// Update leftward movement\... | [
"0.69771636",
"0.6679453",
"0.6627102",
"0.66234505",
"0.6506723",
"0.6504832",
"0.65018415",
"0.64248043",
"0.6403319",
"0.6391759",
"0.6376996",
"0.6329166",
"0.62920094",
"0.628765",
"0.62734544",
"0.6267598",
"0.6243367",
"0.62106335",
"0.6201024",
"0.6181685",
"0.6094236... | 0.74112374 | 0 |
set the button at (row,col) to its corresponding icon according to the piece information | protected void setButtonIcon(int row,int col){
JButton button = buttonGrid[row][col];
button.setIcon(null);
if (board.chessBoard[row][col] == null)
return;
String fileName = board.chessBoard[row][col].getIconFileName();
//getFileName(row, col);
BufferedImage img = null;
if (!fileName.equals("")) {
try {
File f = new File(System.getProperty("user.dir") + "/src/main/java/com/zxs/games/ChessPng/" + fileName);
img = ImageIO.read(f);
} catch (IOException e) {
e.printStackTrace();
}
}
if (img != null) {
ImageIcon icon = new ImageIcon(img);
button.setIcon(icon);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toggleButton(){\r\n\t\tImageIcon xImage = new ImageIcon(\"image/x.png\");\t//Inserting image to the button\r\n\t\tImageIcon oImage = new ImageIcon(\"image/o.png\");\t//Inserting image to the button\r\n\t\tfor(int i=0;i<3;i++){\t\t\t\t\t//Update the buttons' text base on array of state\r\n\t\t\tfor(int ... | [
"0.6866235",
"0.6746298",
"0.6726622",
"0.6718437",
"0.66714597",
"0.6581554",
"0.6531341",
"0.6422929",
"0.64196825",
"0.6395148",
"0.63865656",
"0.6364613",
"0.6311492",
"0.62777513",
"0.62702864",
"0.6252319",
"0.623507",
"0.6209909",
"0.6196535",
"0.6171469",
"0.61542517"... | 0.7330094 | 0 |
event listener for the undo button undo the last move and reset the corresponding icon and turn information | protected void undoClicked(ActionEvent e) {
setAllToDefaultColor();
moveStats lastMove = board.undo();
if (lastMove == null) {
message.setText("Can't undo now");
return; //cannot undo
}
if (selectedPiece != null){
selectedPiece.setBackground(getDefaultColor(selectedPiece));
selectedPiece = null;
}
setButtonIcon(lastMove.startRow,lastMove.startCol);
setButtonIcon(lastMove.endRow,lastMove.endCol);
message.setText(getTurnMessage());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }",
"public void undoMove();",
"public static void undoButton(){\n\t\tundoMoveClass.undoButtonHelper(board);\n\t}",
"private void undoAction(){\n if (allClickedButtons.size() > 0) {\n ButtonCla... | [
"0.74915695",
"0.746831",
"0.74455076",
"0.73274267",
"0.7289351",
"0.7272142",
"0.7240027",
"0.722296",
"0.7219885",
"0.72156906",
"0.72044426",
"0.718103",
"0.7170135",
"0.716742",
"0.71563244",
"0.70904374",
"0.7066009",
"0.7058358",
"0.70508254",
"0.70215315",
"0.70215315... | 0.79719675 | 0 |
event listener for change side button will change the color of two players and start a new game!! | protected void changeSideClicked(ActionEvent e) {
blackPlayer = 1 - blackPlayer;
updateTurnInfo();
startNewGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n ... | [
"0.71134543",
"0.6565083",
"0.65565205",
"0.6534251",
"0.6476916",
"0.64679456",
"0.63719505",
"0.62671393",
"0.625921",
"0.62487984",
"0.62455446",
"0.62356865",
"0.622473",
"0.61994106",
"0.619482",
"0.6140096",
"0.61311376",
"0.61279726",
"0.61057156",
"0.60941434",
"0.605... | 0.7458153 | 0 |
set the message info at the top to default for a new game | private void setDefulatMessage(){
message.setText(" Chess game is ready to play! White's turn ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void newGame() {\r\n playSound( RESET );\r\n\r\n timeTitle.setText( Msgs.str( \"Time\" ) );\r\n timeMesg.setText( Msgs.str( \"zeroTime\" ) );\r\n infoMesg.setText( Msgs.str( \"Ready\" ) );\r\n scoreTitle.setText( Msgs.str( \"Score\" ) );\r\n\r\n adjustScore();\r\... | [
"0.6533946",
"0.6518394",
"0.6417243",
"0.63801104",
"0.62918234",
"0.6290711",
"0.6158426",
"0.6100696",
"0.60988283",
"0.60669994",
"0.60666424",
"0.6030366",
"0.6029088",
"0.59929425",
"0.59823406",
"0.5973156",
"0.59713846",
"0.59617376",
"0.5961136",
"0.59559935",
"0.595... | 0.6763308 | 0 |
event listener for forfeit button the opponent gains a point and restart the name | protected void forfeitClicked(ActionEvent e) {
if (board.ended){
message.setText("The game is ended. Please start new game");
return ;
}
int curturn = board.turn;
if (curturn == 0){
playerScores[ 1- blackPlayer] ++;
}else
playerScores[blackPlayer] ++;
refreshScore();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void hitButtonClicked()\r\n {\r\n Card hit = game.hit(\"Player\");\r\n playerCardList.get(nextPlayerIndex).setImage(hit.toGraphic());\r\n nextPlayerIndex++;\r\n if(game.checkLose())\r\n {\r\n playerLost();\r\n }\r\n }",
"public void victo... | [
"0.63913727",
"0.63608783",
"0.634169",
"0.633798",
"0.63072157",
"0.62841624",
"0.62803036",
"0.62308985",
"0.61925304",
"0.617308",
"0.6164199",
"0.6149195",
"0.6128092",
"0.61225826",
"0.6121759",
"0.61163163",
"0.610992",
"0.61059844",
"0.6090649",
"0.60859114",
"0.607198... | 0.64134485 | 0 |
refresh the score board | private void refreshScore(){
String info = players[0] + " "+playerScores[0]+":" +playerScores[1]+ " "+players[1];
scoreInfo.setText(info);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }",
"public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2... | [
"0.73170733",
"0.7204654",
"0.70944035",
"0.69934165",
"0.6978762",
"0.69579566",
"0.69439316",
"0.69330627",
"0.6915414",
"0.6898789",
"0.6898692",
"0.6891208",
"0.6888151",
"0.6882039",
"0.68300205",
"0.678724",
"0.6764357",
"0.6753859",
"0.6679807",
"0.6673644",
"0.6653715... | 0.76134497 | 0 |
update to info to show which player is playing black right now | private void updateTurnInfo(){
String info = players[blackPlayer] + " plays Black";
turnInfo.setText(info);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWin... | [
"0.6623926",
"0.65597475",
"0.64988863",
"0.64747626",
"0.64383066",
"0.63779783",
"0.6340984",
"0.6335522",
"0.62643075",
"0.62592316",
"0.6253364",
"0.61927",
"0.61702883",
"0.6069359",
"0.6055153",
"0.6043574",
"0.6042274",
"0.6016973",
"0.6009816",
"0.5995592",
"0.5969851... | 0.74899656 | 0 |
initialize everything,except player information, and start a new game | private void startNewGame(){
if (selectedPiece!=null)
selectedPiece.setBackground(getDefaultColor(selectedPiece));
selectedPiece = null;
setAllToDefaultColor();
setDefulatMessage();
board = new ChessBoard(1, false);
for(int row = 0 ; row < ROWS; row++){
for(int col = 0; col < COLS ; col++){
setButtonIcon(row,col);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}",
"public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }",
"public void InitGame(){\n System.ou... | [
"0.7887875",
"0.77842844",
"0.77353287",
"0.77317905",
"0.7646685",
"0.76165706",
"0.7614179",
"0.7488421",
"0.74667066",
"0.7457383",
"0.743542",
"0.74057853",
"0.73718935",
"0.7339564",
"0.7269086",
"0.72513324",
"0.7238944",
"0.7235077",
"0.72264177",
"0.7223066",
"0.71926... | 0.0 | -1 |
initialize JPanel for the chess board | private JPanel initializePanel() {
JPanel myPanel = new JPanel();
//myPanel.setPreferredSize(new Dimension(600,600));
myPanel.setLayout(new GridLayout(8,8));
myPanel.setSize(600,600);
myPanel.setLocation(100,100);
myPanel.setBorder(new LineBorder(Color.BLACK));
return myPanel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ChessBoard() {\n initComponents();\n createChessBoard();\n\n }",
"public ChessboardView() {\n\t\t\n\t\tcontroller = new ChessController(this);\n\t\t\n\t\tsetLayout(new GridLayout(10, 10));\n\t\t\n\t\t// creo i bottoni (caselle della scacchiera)\n\t\tcreateButtons();\n\t\t\n\t\t// assegno ... | [
"0.8298469",
"0.7647522",
"0.7584665",
"0.7416062",
"0.7365077",
"0.7342676",
"0.7271101",
"0.71628624",
"0.7161555",
"0.7106493",
"0.7091788",
"0.7053264",
"0.70498973",
"0.7034548",
"0.7019159",
"0.7009628",
"0.6991845",
"0.6951604",
"0.69289166",
"0.69211376",
"0.6918782",... | 0.6407346 | 60 |
get the coordinate of a piece button | public Pair<Integer,Integer> getJButtonCoord(JButton button){
int row=0,col=0;
Boolean foundButton = false;
for(row =0 ; row < ROWS; row ++){
for(col = 0; col < COLS; col++){
if (buttonGrid[row][col] == button){
foundButton = true;
break;
}
}
if (foundButton) break;
}
Pair<Integer,Integer> coord = new Pair<Integer,Integer> (row,col);
return coord;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point getAddToListButtonLoc(){\r\n\t\treturn button.getLocationOnScreen();\r\n\t}",
"public JButton getP1WinPoint() {\n return p1WinPoint;\n }",
"public static void setCoordinates(JButton currentButton, int numPlayers, JButton tile[][] ) {\n\t\t if(currentButton.getIcon()==Player1.PieceImages[... | [
"0.66670406",
"0.6507176",
"0.6418213",
"0.63413584",
"0.6335127",
"0.6330567",
"0.6330567",
"0.6330567",
"0.6260268",
"0.6253595",
"0.6186021",
"0.60900956",
"0.6085926",
"0.6083206",
"0.6038364",
"0.6031647",
"0.6020475",
"0.60131633",
"0.60093325",
"0.59898585",
"0.5989858... | 0.6830165 | 0 |
get the default background color of a piece button | public Color getDefaultColor(JButton button){
Pair<Integer,Integer> coord = getJButtonCoord(button);
int row = coord.getKey();
int col = coord.getValue();
if ((row + col ) %2 == 0){
return Color.white;
}else
return Color.gray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getButtonBgColor() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonBgColor();\r\n\t}",
"public Color getBackground();",
"public static Color getColor() { return lblColor.getBackground(); }",
"Color getBackgroundColor();",
"public Color ... | [
"0.6962993",
"0.67833406",
"0.677261",
"0.6744631",
"0.6699985",
"0.65690935",
"0.65333456",
"0.6485223",
"0.6456215",
"0.63460904",
"0.6339295",
"0.63151884",
"0.6220286",
"0.61785525",
"0.61179906",
"0.6090908",
"0.60779893",
"0.6072474",
"0.6056237",
"0.60489565",
"0.60439... | 0.6734688 | 4 |
ask the user to input their names in a prompt | private void getPlayerNames(){
players[0] = JOptionPane.showInputDialog("Please input the name for the first player");
players[1] = JOptionPane.showInputDialog("Please input the name for the second player");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}",
"public void getNames() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name: \");\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString name = sc.nextLine();\n\t\t\tif (name.equals(\"\")) {\n... | [
"0.82765794",
"0.7950968",
"0.7708811",
"0.73543984",
"0.7218662",
"0.7157282",
"0.71046066",
"0.7092107",
"0.7088818",
"0.7043651",
"0.6984121",
"0.69234836",
"0.69188803",
"0.6883867",
"0.6881401",
"0.68750864",
"0.6860455",
"0.6850828",
"0.6838996",
"0.68194276",
"0.681270... | 0.66791713 | 30 |
get the message to show who's turn | private String getTurnMessage(){
if (board.turn ==0)
return "Black's turn";
else
return "White's turn";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTurnInfo(){\n if(gameState == GAME_STATE.CREATED){\n return \"Game has not been started!\";\n }\n\n String currentPlayerName;\n\n if( currentPlayerTurn == 1 ){\n currentPlayerName = player1Name;\n }else{\n currentPlayerName = play... | [
"0.7183002",
"0.7037549",
"0.7004378",
"0.66932446",
"0.66742694",
"0.6669576",
"0.6595672",
"0.65868556",
"0.6576045",
"0.65258956",
"0.6521623",
"0.65120703",
"0.6506737",
"0.6447674",
"0.6447674",
"0.6447674",
"0.6447674",
"0.6447674",
"0.6447674",
"0.6373806",
"0.63420695... | 0.7635078 | 0 |
TODO Autogenerated method stub | @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
this.doPost(req, resp);
} | {
"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
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String type=req.getParameter("type_option");
Connection con=DbUtil.getCon();
UserCRUDDaoImpl userCRUDDaoImpl=new UserCRUDDaoImpl();
if(type.equals("type_id")) {
int amanager_id=Integer.parseInt(req.getParameter("amanager_type"));
AcademyManager aManager=new AcademyManager(amanager_id);
int row=userCRUDDaoImpl.deleteAmanagerbyType(con, 1, aManager);
DbUtil.Conclose(con);
if (row!=0) {
resp.sendRedirect("Success.jsp");
}
else {
resp.sendRedirect("fail.jsp");
}
}
else {
String amanager_username=req.getParameter("amanager_type");
AcademyManager aManager=new AcademyManager(amanager_username);
int row=userCRUDDaoImpl.deleteAmanagerbyType(con, 2, aManager);
DbUtil.Conclose(con);
if (row!=0) {
resp.sendRedirect("Success.jsp");
}
else {
resp.sendRedirect("fail.jsp");
}
}
} | {
"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 |
The method reads news from a source and saves it in a database(H2). The method runs every two minutes. To change the period you need to change "fixedRate". To change the source, change "url". | @Scheduled(fixedRate = 120000)
public void readRss() {
List<ItemNews> itemList = new ArrayList<>();
try {
String url = "https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml";
try (XmlReader reader = new XmlReader(new URL(url))) {
SyndFeed feed = new SyndFeedInput().build(reader);
for (SyndEntry entry : feed.getEntries()) {
LocalDateTime localDateTime = entry.getPublishedDate().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDateTime();
ItemNews item = new ItemNews();
item.setTitle(entry.getTitle());
item.setAuthor(entry.getAuthor());
item.setLink(entry.getLink());
item.setDescription(entry.getDescription().getValue());
item.setDateTime(localDateTime);
modifyItem(item);
itemList.add(item);
}
}
} catch (Exception e) {
e.printStackTrace();
}
if (!itemList.isEmpty()) {
Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));
saveItems(itemList);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Scheduled(cron=\"0 0 9 * * ? \")\r\n\t@Override\r\n\tpublic void getNewsFromIDataAPI() {\n\t\ttry {\r\n\t\t\t\r\n\t\t\tList<NewsType> newsTypeArray=newsTypeRepository.findAllByFlag(0);\r\n\t\t\t\r\n\t\t\tfor(NewsType n: newsTypeArray) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString catId=n.getCatId();\r\n\t\t\t\t\tString ... | [
"0.6290643",
"0.6172409",
"0.6023927",
"0.5988562",
"0.5874495",
"0.57450914",
"0.57319087",
"0.5716013",
"0.5694204",
"0.5661547",
"0.5593562",
"0.55398333",
"0.54879355",
"0.5478264",
"0.54336154",
"0.5400444",
"0.5338228",
"0.53265643",
"0.525662",
"0.5252116",
"0.5228456"... | 0.69605887 | 0 |
The method saves data to the database(H2) if it's not there. | private void saveItems(List<ItemNews> itemList) {
Optional<ItemNews> firstByOrderByDateTimeDesc = itemRepository.findFirstByOrderByDateTimeDesc();
if (firstByOrderByDateTimeDesc.isPresent()) {
itemRepository.saveAll(itemList.stream()
.filter(o -> o.getDateTime().isAfter(firstByOrderByDateTimeDesc.get().getDateTime()))
.collect(Collectors.toList()));
} else {
itemRepository.saveAll(itemList);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // ... | [
"0.69154555",
"0.6875282",
"0.6833584",
"0.6759721",
"0.66696584",
"0.6572744",
"0.65657693",
"0.6545138",
"0.6513142",
"0.64908046",
"0.64342296",
"0.63978463",
"0.63730097",
"0.6364735",
"0.6360304",
"0.6333882",
"0.6332444",
"0.6332444",
"0.6332444",
"0.6332444",
"0.632904... | 0.0 | -1 |
The method modifies the input data. | private ItemNews modifyItem(ItemNews itemNews) {
itemNews.setTitle("Title: " + itemNews.getTitle());
if (itemNews.getAuthor() != null && itemNews.getAuthor() != "") {
if (itemNews.getAuthor().contains("By "))
itemNews.setAuthor(itemNews.getAuthor().replace("By ", "").trim());
}
return itemNews;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}",
"public void updateData() {}",
"void setData (Object newData) { /* package access */ \n\t\tdata = newData;\n\t}",
"void updateData();",
"@Override\n\tpublic void processData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void setData(Object data) {\n\t... | [
"0.7358484",
"0.722507",
"0.6875529",
"0.6763476",
"0.65978295",
"0.6480108",
"0.64326274",
"0.62356186",
"0.6232799",
"0.62028587",
"0.6179964",
"0.6162288",
"0.614101",
"0.6140202",
"0.61311245",
"0.61304295",
"0.61209685",
"0.61138874",
"0.60892034",
"0.6082114",
"0.606395... | 0.0 | -1 |
Sets apply cnt max. | public void setApplyCntMax(String applyCntMax) {
this.applyCntMax = applyCntMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateMax(int val) {\n overallMax.updateMax(val);\n for (HistoryItem item : watchers.values()) {\n item.max.updateMax(val);\n }\n }",
"private void recalculateMaxCounts() {\n for (int i = 0; i < datasets.size(); ++i) {\n XYData... | [
"0.6691005",
"0.65671885",
"0.6561296",
"0.6561296",
"0.6552288",
"0.63964105",
"0.63929904",
"0.6370851",
"0.63593084",
"0.63188523",
"0.6289062",
"0.6288142",
"0.6142027",
"0.61106247",
"0.60713404",
"0.60706556",
"0.60573995",
"0.60573995",
"0.6031938",
"0.60130036",
"0.59... | 0.63476664 | 9 |
Gets apply cnt max. | public String getApplyCntMax( ) {
return this.applyCntMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getMaxCount();",
"int getMaxCount();",
"public void setApplyCntMax(String applyCntMax) {\n\t\tthis.applyCntMax = applyCntMax;\n\t}",
"public int getMaxCount() {\n return maxCount_;\n }",
"public int getMaxCount() {\n return maxCount_;\n }",
"public int getResult() {\n retur... | [
"0.69018435",
"0.69018435",
"0.6888094",
"0.672534",
"0.6660139",
"0.6592207",
"0.64510065",
"0.63817084",
"0.63639915",
"0.6313175",
"0.6297504",
"0.62950367",
"0.62861073",
"0.6284071",
"0.6260743",
"0.6254708",
"0.6253414",
"0.6253414",
"0.6210419",
"0.62079304",
"0.620740... | 0.8196981 | 0 |
Sets apply cnt min. | public void setApplyCntMin(String applyCntMin) {
this.applyCntMin = applyCntMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCountMin() {\n\t\treturn countMin;\n\t}",
"public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i]... | [
"0.6609699",
"0.6357175",
"0.6176708",
"0.6176708",
"0.61037856",
"0.6094404",
"0.6086321",
"0.6064824",
"0.60510933",
"0.60240024",
"0.6018497",
"0.600046",
"0.59750414",
"0.59594285",
"0.59507084",
"0.59479713",
"0.5943054",
"0.59022313",
"0.582591",
"0.5823601",
"0.5815246... | 0.69021446 | 0 |
Gets apply cnt min. | public String getApplyCntMin( ) {
return this.applyCntMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCountMin() {\n\t\treturn countMin;\n\t}",
"public void setApplyCntMin(String applyCntMin) {\n\t\tthis.applyCntMin = applyCntMin;\n\t}",
"int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public double min() {\n\t\tif (count() > 0) {... | [
"0.6842303",
"0.6823079",
"0.6551323",
"0.65165365",
"0.65064406",
"0.64673465",
"0.64210606",
"0.6368414",
"0.6349319",
"0.62606543",
"0.62556916",
"0.6240497",
"0.6186122",
"0.61808205",
"0.6168717",
"0.6146922",
"0.60949534",
"0.6088322",
"0.60836387",
"0.608213",
"0.60801... | 0.8164938 | 0 |
Sets increased exposure max. | public void setIncreasedExposureMax(String increasedExposureMax) {
this.increasedExposureMax = increasedExposureMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setMaximum(int max);",
"public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}",
"public void setMax(int max) {\n this.max = max;\n }",
"public void setMax(int max) {\n this.max = max;\n }",
"public void SetMaxVal(int max_val... | [
"0.6702312",
"0.6688037",
"0.66809154",
"0.66809154",
"0.6634352",
"0.6568783",
"0.6540945",
"0.6479139",
"0.6478163",
"0.64477456",
"0.6438844",
"0.6422038",
"0.64174557",
"0.6402846",
"0.63896555",
"0.63870764",
"0.63826865",
"0.6375763",
"0.63743126",
"0.6370366",
"0.63544... | 0.7278685 | 0 |
Gets increased exposure max. | public String getIncreasedExposureMax( ) {
return this.increasedExposureMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxEXP() {\n return maxEXP_;\n }",
"public int getMaxEXP() {\n return maxEXP_;\n }",
"public int getMaxEXP() {\n return maxEXP_;\n }",
"public int getMaxEXP() {\n return maxEXP_;\n }",
"public void setIncreasedExposureMax(String increasedExposureMax) {\... | [
"0.70517516",
"0.7051034",
"0.7018086",
"0.7016429",
"0.6798346",
"0.67632",
"0.67208326",
"0.67208326",
"0.6679519",
"0.66235906",
"0.66047347",
"0.66041744",
"0.6592044",
"0.65814155",
"0.649787",
"0.6490764",
"0.64834154",
"0.6476696",
"0.64573",
"0.6454448",
"0.6446122",
... | 0.8144673 | 0 |
Sets increased exposure min. | public void setIncreasedExposureMin(String increasedExposureMin) {
this.increasedExposureMin = increasedExposureMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getIncreasedExposureMin( ) {\n\t\treturn this.increasedExposureMin;\n\t}",
"public void _setMin(float min)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMinimum((int) (min * 100));\r\n } else\r\n {\r\n setMinimum((int) min);\r\n ... | [
"0.66245985",
"0.6585797",
"0.6538769",
"0.6514696",
"0.6514696",
"0.6439164",
"0.64311385",
"0.63768184",
"0.63493556",
"0.63433063",
"0.6285182",
"0.6271859",
"0.62615395",
"0.6258458",
"0.62583554",
"0.6241275",
"0.6231748",
"0.61819845",
"0.6154867",
"0.61324275",
"0.6127... | 0.7602321 | 0 |
Gets increased exposure min. | public String getIncreasedExposureMin( ) {
return this.increasedExposureMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getIncreasedExposureMax( ) {\n\t\treturn this.increasedExposureMax;\n\t}",
"public void setIncreasedExposureMin(String increasedExposureMin) {\n\t\tthis.increasedExposureMin = increasedExposureMin;\n\t}",
"public int getMin() {\n\t\treturn getMin(0.0f);\n\t}",
"public double getMinimum() {\n ... | [
"0.69980305",
"0.69593614",
"0.6884687",
"0.68435633",
"0.6840143",
"0.682227",
"0.67706853",
"0.6735793",
"0.6735793",
"0.67323834",
"0.6731581",
"0.6710086",
"0.65663856",
"0.65663856",
"0.65663856",
"0.65583855",
"0.6556755",
"0.6553278",
"0.65424174",
"0.6534314",
"0.6524... | 0.8274173 | 0 |
Sets repay rate range max. | public void setRepayRateRangeMax(String repayRateRangeMax) {
this.repayRateRangeMax = repayRateRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRepayRateRangeMax( ) {\n\t\treturn this.repayRateRangeMax;\n\t}",
"public void setMaxRange(double maxRange) {\n this.maxRange = maxRange;\n }",
"@JSProperty(\"maxRange\")\n void setMaxRange(double value);",
"public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n ... | [
"0.71562415",
"0.69047004",
"0.68527544",
"0.66915095",
"0.65847045",
"0.6516901",
"0.6506985",
"0.64845914",
"0.64001614",
"0.63852096",
"0.638417",
"0.63571036",
"0.6349916",
"0.63438636",
"0.63398045",
"0.63234955",
"0.63234955",
"0.63078654",
"0.6287446",
"0.62839586",
"0... | 0.7732349 | 0 |
Gets repay rate range max. | public String getRepayRateRangeMax( ) {
return this.repayRateRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxPayRaise ()\r\n {\r\n return maxPayRaise;\r\n }",
"public double getMaxRange() {\n return maxRange;\n }",
"public void setRepayRateRangeMax(String repayRateRangeMax) {\n\t\tthis.repayRateRangeMax = repayRateRangeMax;\n\t}",
"public String getRepayRateRangeMin( ) {\n\t\... | [
"0.72600293",
"0.72203434",
"0.7042013",
"0.6835129",
"0.67482936",
"0.67123735",
"0.6700121",
"0.66821736",
"0.6567779",
"0.6518028",
"0.6465441",
"0.6455516",
"0.6406009",
"0.64029956",
"0.64019805",
"0.63823014",
"0.6371186",
"0.6341859",
"0.6341859",
"0.6299538",
"0.62871... | 0.8373388 | 0 |
Sets repay rate range min. | public void setRepayRateRangeMin(String repayRateRangeMin) {
this.repayRateRangeMin = repayRateRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRepayRateRangeMin( ) {\n\t\treturn this.repayRateRangeMin;\n\t}",
"public void setImprovementRelaxRate(double rate) {\n this.exec = this.exec.withProperty(\"sm.improve.relaxRate\", rate);\n }",
"public void setMinRange(double minRange) {\n this.minRange = minRange;\n }",
... | [
"0.6502578",
"0.6024021",
"0.5970919",
"0.59690756",
"0.5937191",
"0.5913888",
"0.5868413",
"0.580606",
"0.5798755",
"0.5791631",
"0.5784603",
"0.57728213",
"0.5688584",
"0.56826764",
"0.5657971",
"0.5647548",
"0.5632983",
"0.56248105",
"0.55923086",
"0.5588595",
"0.5556137",... | 0.75156254 | 0 |
Gets repay rate range min. | public String getRepayRateRangeMin( ) {
return this.repayRateRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRepayRateRangeMin(String repayRateRangeMin) {\n\t\tthis.repayRateRangeMin = repayRateRangeMin;\n\t}",
"public double getMinRange() {\n return minRange;\n }",
"public String getRepayRateRangeMax( ) {\n\t\treturn this.repayRateRangeMax;\n\t}",
"public int getMinResponseRate() {\n ... | [
"0.6842725",
"0.6728024",
"0.6595669",
"0.6574028",
"0.63697666",
"0.6332139",
"0.62317353",
"0.61830676",
"0.61830676",
"0.60916734",
"0.6055206",
"0.60482955",
"0.60410243",
"0.59985083",
"0.5997973",
"0.5902796",
"0.5887352",
"0.5867623",
"0.5863795",
"0.5842854",
"0.58237... | 0.820495 | 0 |
Sets trade amt range max. | public void setTradeAmtRangeMax(String tradeAmtRangeMax) {
this.tradeAmtRangeMax = tradeAmtRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMaxAmount(int max) {\n _max = max;\n }",
"public void setTradeMax(BigDecimal tradeMax) {\n this.tradeMax = tradeMax;\n }",
"public String getTradeAmtRangeMax( ) {\n\t\treturn this.tradeAmtRangeMax;\n\t}",
"public void setMaxprice(int value) {\n this.maxprice = va... | [
"0.72341096",
"0.70300597",
"0.6801996",
"0.6679109",
"0.6675005",
"0.6548243",
"0.6521505",
"0.65063745",
"0.64925706",
"0.6404559",
"0.63975185",
"0.6375337",
"0.63682365",
"0.6359387",
"0.63585573",
"0.6331736",
"0.63241017",
"0.63101006",
"0.6265829",
"0.625808",
"0.62567... | 0.7257421 | 0 |
Gets trade amt range max. | public String getTradeAmtRangeMax( ) {
return this.tradeAmtRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigDecimal getTradeMax() {\n return tradeMax;\n }",
"public int getMaxAmount() {\n return _max;\n }",
"public int getMaxAmount() {\n return maxAmount;\n }",
"double getMaxAmountl() {\n\t\treturn MAX_AMOUNT;\n\t}",
"public double getMaxRange() {\n return maxRange;... | [
"0.7592838",
"0.7389891",
"0.7319459",
"0.7315075",
"0.7037411",
"0.6873853",
"0.6811548",
"0.6793365",
"0.67349464",
"0.6696629",
"0.6627914",
"0.6626957",
"0.6598524",
"0.65864456",
"0.6574301",
"0.6545339",
"0.647544",
"0.64357394",
"0.6430901",
"0.642418",
"0.6413974",
... | 0.81951016 | 0 |
Sets trade amt range min. | public void setTradeAmtRangeMin(String tradeAmtRangeMin) {
this.tradeAmtRangeMin = tradeAmtRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMinAmount(int min) {\n _min = min;\n }",
"public String getTradeAmtRangeMin( ) {\n\t\treturn this.tradeAmtRangeMin;\n\t}",
"public void setMinTransfer(double minTransfer) {\n\t\tthis.minTransfer = minTransfer;\n\t}",
"public void setMin(int min) {\n this.min = min;\n }",
... | [
"0.7405072",
"0.6772446",
"0.66391516",
"0.6558295",
"0.6558295",
"0.65570414",
"0.6487805",
"0.6483295",
"0.64778566",
"0.6451731",
"0.64236397",
"0.6418009",
"0.6387149",
"0.63781637",
"0.6373247",
"0.63623387",
"0.6311774",
"0.6300445",
"0.6290166",
"0.6275766",
"0.6275763... | 0.74773955 | 0 |
Gets trade amt range min. | public String getTradeAmtRangeMin( ) {
return this.tradeAmtRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMinAmount() {\n return _min;\n }",
"public int getMinAmount() {\n return minAmount;\n }",
"public double getMinRange() {\n return minRange;\n }",
"public void setTradeAmtRangeMin(String tradeAmtRangeMin) {\n\t\tthis.tradeAmtRangeMin = tradeAmtRangeMin;\n\t}",
"pu... | [
"0.7187264",
"0.7156731",
"0.7046707",
"0.6903869",
"0.68305624",
"0.6815234",
"0.67180216",
"0.6704858",
"0.6704858",
"0.659049",
"0.65566045",
"0.65543413",
"0.64651954",
"0.6464758",
"0.6419735",
"0.63995254",
"0.63931173",
"0.63879365",
"0.6382292",
"0.63616943",
"0.63464... | 0.8220198 | 0 |
Sets verify count range max. | public void setVerifyCountRangeMax(String verifyCountRangeMax) {
this.verifyCountRangeMax = verifyCountRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVerifyCountRangeMax( ) {\n\t\treturn this.verifyCountRangeMax;\n\t}",
"public void SetMaxVal(int max_val);",
"@Override\n public void setMaxRange(int maxRange) {\n this.maxRange = maxRange;\n }",
"void setMaximum(int max);",
"public void setMaxValue(int maxValue) {\n th... | [
"0.70663905",
"0.6834875",
"0.68090785",
"0.6770099",
"0.66422814",
"0.6619509",
"0.65928644",
"0.6589303",
"0.6589303",
"0.6544931",
"0.6522441",
"0.6505838",
"0.64946264",
"0.64595467",
"0.64385813",
"0.6431268",
"0.63730544",
"0.6345393",
"0.6343876",
"0.6326169",
"0.62927... | 0.76386255 | 0 |
Gets verify count range max. | public String getVerifyCountRangeMax( ) {
return this.verifyCountRangeMax;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxRange() {\n\t\treturn max_range;\n\t}",
"int getMaxCount();",
"int getMaxCount();",
"public void setVerifyCountRangeMax(String verifyCountRangeMax) {\n\t\tthis.verifyCountRangeMax = verifyCountRangeMax;\n\t}",
"public double getMaxRange() {\n return maxRange;\n }",
"public int ... | [
"0.73940206",
"0.7144509",
"0.7144509",
"0.7051342",
"0.6868437",
"0.6849666",
"0.683629",
"0.67579114",
"0.67139685",
"0.6680977",
"0.6664921",
"0.66139454",
"0.6591173",
"0.6591173",
"0.6591173",
"0.65710855",
"0.65529186",
"0.65529186",
"0.65361077",
"0.65249836",
"0.65117... | 0.8360329 | 0 |
Sets verify count range min. | public void setVerifyCountRangeMin(String verifyCountRangeMin) {
this.verifyCountRangeMin = verifyCountRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVerifyCountRangeMin( ) {\n\t\treturn this.verifyCountRangeMin;\n\t}",
"public void SetMinVal(int min_val);",
"public void setPassengerCountMin(int min) {\n this.PassengerCountMin = min;\n }",
"public void setMin(int min) {\n this.min = min;\n }",
"public void setMin(int... | [
"0.6938537",
"0.6501307",
"0.6465668",
"0.64617753",
"0.64617753",
"0.63821375",
"0.63684833",
"0.63465154",
"0.62068325",
"0.6188378",
"0.61690503",
"0.6160008",
"0.6085418",
"0.60699475",
"0.6060203",
"0.60398096",
"0.6030974",
"0.60201615",
"0.6019052",
"0.6008183",
"0.600... | 0.795148 | 0 |
Gets verify count range min. | public String getVerifyCountRangeMin( ) {
return this.verifyCountRangeMin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setVerifyCountRangeMin(String verifyCountRangeMin) {\n\t\tthis.verifyCountRangeMin = verifyCountRangeMin;\n\t}",
"public int getMinRange() {\r\n return fMinRange;\r\n }",
"public int getCountMin() {\n\t\treturn countMin;\n\t}",
"public String getVerifyCountRangeMax( ) {\n\t\treturn this... | [
"0.705744",
"0.68965214",
"0.66041344",
"0.6340563",
"0.61859167",
"0.6157552",
"0.61369604",
"0.60922086",
"0.6086482",
"0.6050216",
"0.6047054",
"0.6028988",
"0.6016777",
"0.6016777",
"0.6016777",
"0.601013",
"0.60072225",
"0.6004595",
"0.59988725",
"0.599246",
"0.5977317",... | 0.83037215 | 0 |
Marker marker; private PlaceAutocompleteAdapter mPlaceAutocompleteAdapter; private GoogleApiClient mGoogleApiClient; private DocumentReference docRef = FirebaseFirestore.getInstance().collection("Patients") .document("fhOP3B1AThLXF7dDzAZy"); | @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
mSearchText = (AutoCompleteTextView) findViewById(R.id.input_search);
mGps = (ImageView) findViewById(R.id.ic_gps);
// mBd= FirebaseDatabase.getInstance().getReference().child("Patients");
// mBd.push().setValue(marker);
getLocationPermission();
Places.initialize(getApplicationContext(),"AIzaSyCo2VRdwGMQmSeVKzSfvGrgCN0Vuy4i7u0");
mSearchText.setFocusable(false);
mSearchText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List<Place.Field> fieldList= Arrays.asList(Place.Field.ADDRESS, Place.Field.LAT_LNG, Place.Field.NAME);
Intent intent = new Autocomplete.IntentBuilder(AutocompleteActivityMode.OVERLAY, fieldList).build(MapActivity.this);
startActivityForResult(intent,100);
}
});
//getLocationPermission();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setUpPlaces(){\n db.collection(\"Tokens\").get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\... | [
"0.629573",
"0.5902198",
"0.579521",
"0.57780886",
"0.56605625",
"0.5641477",
"0.5629172",
"0.5612817",
"0.55781615",
"0.5558797",
"0.5528952",
"0.55192626",
"0.55105036",
"0.5465624",
"0.54612875",
"0.5421489",
"0.540231",
"0.5375555",
"0.53613824",
"0.5348066",
"0.5320424",... | 0.6704135 | 0 |
fill you code Here | public static String[] mergeSort(String[] arr){
if (arr.length >= 2) {
String[] left = new String[arr.length / 2];
String[] right = new String[arr.length - arr.length / 2];
for (int i = 0; i < left.length; i++) {
left[i] = arr[i];
}
for (int i = 0; i < right.length; i++) {
right[i] = arr[i + arr.length / 2];
}
mergeSort(left);
mergeSort(right);
merge(arr, left, right);
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fillData()\n {\n\n }",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public static void generateCode()\n {\n \n }",
"CD withCode();",
"public void fillregister()\n {\n CD cD1 = new CD(\"\", \"\", \"\", 1992);\n Tape tape1 = new Tape(\"\", \"\");\n ... | [
"0.6337314",
"0.5967226",
"0.59666884",
"0.59289217",
"0.580478",
"0.57330424",
"0.57330424",
"0.57330424",
"0.57330424",
"0.57330424",
"0.57330424",
"0.57330424",
"0.57250553",
"0.5715699",
"0.57137203",
"0.5661161",
"0.56443816",
"0.564346",
"0.56320417",
"0.5625829",
"0.56... | 0.0 | -1 |
/ Either score system or time quantum system | public void tick(){
scoreKeep++;
if(scoreKeep >= 500){
scoreKeep = 0;
hud.setLevel(hud.getLevel()+1);
// continuous addition of enemies at each new level
if(game.diff == 0) {
if((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))
handler.addObject(new BasicEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));
if(hud.getLevel() == 4 || hud.getLevel() == 6)
handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));
if(hud.getLevel() == 5)
handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));
if(hud.getLevel() == 10){
handler.clearEnemies();
handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));
handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));
}
}else if(game.diff == 1) {
if((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))
handler.addObject(new HardEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));
if(hud.getLevel() == 4 || hud.getLevel() == 6)
handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));
if(hud.getLevel() == 5)
handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));
if(hud.getLevel() == 10){
handler.clearEnemies();
handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));
handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TennisScoreSystem() {\n scoreA = 0;\n scoreB = 0;\n }",
"public SimilarityScore sim(int eq1, int eq2);",
"public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn... | [
"0.60607564",
"0.5934231",
"0.57696116",
"0.5653707",
"0.558958",
"0.548493",
"0.5460983",
"0.5388085",
"0.53865224",
"0.5379",
"0.53299636",
"0.5308158",
"0.52927125",
"0.528471",
"0.5276971",
"0.52586716",
"0.52586716",
"0.5241129",
"0.51784736",
"0.5170902",
"0.5168851",
... | 0.0 | -1 |
Tests Medecin m1 = new Medecin("m1", "pass", Salle.SALLE1); Medecin m2 = new Medecin("m2", "pass", Salle.SALLE2); Secretaire s1 = new Secretaire("s1", "pass"); Context.getInstance().getDaoCompte().insert(s1); Context.getInstance().getDaoCompte().insert(m1); Context.getInstance().getDaoCompte().insert(m2); | public static void main(String[] args) {
Adresse a1 = new Adresse(1, "voie", "ville", "cp");
Patient p1 = new Patient(123, "nom", "prenom", a1);
// Context.getInstance().getDaoPatient().insert(p1);
fileAttente.add(p1);
Adresse a2 = new Adresse(2, "voie", "ville", "cp");
Patient p2 = new Patient(124, "nom", "prenom", a2);
fileAttente.add(p2);
// Context.getInstance().getDaoPatient().insert(p2);
Adresse a3 = new Adresse(3, "voie", "ville", "cp");
Patient p3 = new Patient(125, "nom", "prenom", a3);
fileAttente.add(p3);
// Context.getInstance().getDaoPatient().insert(p3);
Adresse a4 = new Adresse(4, "voie", "ville", "cp");
Patient p4 = new Patient(126, "nom", "prenom", a4);
fileAttente.add(p4);
// Context.getInstance().getDaoPatient().insert(p4);
menuPrincipal();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}",
"@Test\r\n public void testA1Insert() throws Exception {\r\n System.out.pr... | [
"0.68870336",
"0.6637689",
"0.65727633",
"0.655048",
"0.64612585",
"0.64421314",
"0.6365166",
"0.63580984",
"0.63300663",
"0.63148534",
"0.6301839",
"0.6262893",
"0.62563246",
"0.6243877",
"0.62243694",
"0.61940306",
"0.61823964",
"0.6179692",
"0.61733615",
"0.6172306",
"0.61... | 0.0 | -1 |
shouldn't ever be called | @Override
public void collideEffect(Spatial s) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@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}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Over... | [
"0.6826668",
"0.67601085",
"0.6576676",
"0.65610135",
"0.65588784",
"0.652782",
"0.6526492",
"0.65203524",
"0.6472546",
"0.6342526",
"0.6342526",
"0.6315138",
"0.6293815",
"0.6271578",
"0.6257592",
"0.6257592",
"0.6257592",
"0.6257592",
"0.6257592",
"0.6257592",
"0.62479854",... | 0.0 | -1 |
Called by the GUI if a mouse click landed ingame | public void click(int mx,int my){
super.setLocation(mx+boundMap.getCamera().getX(),0,(my+boundMap.getCamera().getY())/Globals.__PROJECTION_SCALE__);
Spatial[] spats = boundMap.getSpace().grabSpatialsAround(this)[1];
for (Spatial s: spats){
if (s instanceof NPC){
if (((NPC)s).collideMouse())
((NPC)s).clicked();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void mouseClicked(MouseEvent e) {\n //location where mouse was pressed\n Point mousePoint = e.getPoint();\n //conversion to location on frame\n Vec2 worldPoint = view.viewToWorld(mousePoint);\n float fx = e.getPoint().x;\n float fy = e.getPoint().y;\n... | [
"0.7510508",
"0.7507214",
"0.7490483",
"0.7467205",
"0.7467205",
"0.74293786",
"0.7412791",
"0.74035007",
"0.7385295",
"0.7373365",
"0.7373365",
"0.73731095",
"0.73728013",
"0.73554325",
"0.73543715",
"0.73494667",
"0.73364365",
"0.7334797",
"0.7334797",
"0.7334797",
"0.73347... | 0.0 | -1 |
remember the last selected section | @Override
protected void onSaveInstanceState(Bundle outState) {
outState.putInt(INSTANCE_STATE_CURRENT_SECTION, mCurrentSection);
super.onSaveInstanceState(outState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void selectLastUsed() {\n // Set the initial selection of the table:\n if (initSelection != null) {\n boolean found = false;\n for (int i = 0; i < table.getRowCount(); i++) {\n if (tableModel.getElementAt(i).getFile().getPath().\n eq... | [
"0.61719567",
"0.6103803",
"0.60699046",
"0.6012146",
"0.58116573",
"0.57359964",
"0.57006377",
"0.55817467",
"0.55755",
"0.55426806",
"0.54678714",
"0.5463777",
"0.54280233",
"0.5425734",
"0.5407945",
"0.5398139",
"0.53912467",
"0.5328497",
"0.53015983",
"0.5299466",
"0.5296... | 0.60618913 | 3 |
ArrayList list = new ArrayList(this.input); | @Override
public boolean matches(InventoryCrafting ic, World world) {
List<ItemStack> list = new ArrayList();
list.add(input);
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
ItemStack stack = ic.getStackInRowAndColumn(j, i);
if (!stack.isEmpty())
{
boolean flag = false;
Iterator iter = list.iterator();
while (iter.hasNext())
{
ItemStack stack1 = (ItemStack)iter.next();
if (stack.getItem() == stack1.getItem())
{
flag = true;
list.remove(stack1);
break;
}
}
if (!flag)
return false;
}
}
}
return list.isEmpty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ArrayList<String> createList(String finalInput);",
"a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }",
"public ArrayList<ArrayList<Double>> getInput() {\n return input;\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
... | [
"0.7130218",
"0.65894115",
"0.64714193",
"0.6436405",
"0.6384789",
"0.6161554",
"0.609936",
"0.60364455",
"0.6027725",
"0.6026861",
"0.6025002",
"0.6014997",
"0.60094464",
"0.6006729",
"0.5986464",
"0.59840643",
"0.59822464",
"0.59764",
"0.59723854",
"0.5959231",
"0.594088",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
for(int i=0;i<a;i++){
int c=sc.nextInt();
int [] score =new int [c];
int sum=0;
double aver = 0;
int count = 0;
for(int j=0;j<c;j++){
score[j]=sc.nextInt();
sum+=score[j];
}
aver=(sum/c);
double rate =0;
for(int k=0;k<c;k++){
if(aver<score[k]){
count++;
}
rate =(double)count/(double)c*100.0;
}
System.out.printf("%.3f", rate);
System.out.println("%");
}
} | {
"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 |
Instantiates a new worldbank import service impl. | public WorldbankImportServiceImpl() {
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Import createImport();",
"Import createImport();",
"public ImportVo() {\r\n // nothing to do\r\n }",
"public LdapImportSource() {\n\t}",
"Imports createImports();",
"public Import() {\n this(null, new Name(), null, null, false, false);\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"public ... | [
"0.6069759",
"0.6069759",
"0.56771475",
"0.56667805",
"0.5665728",
"0.55563635",
"0.54286283",
"0.52537805",
"0.51807964",
"0.5125282",
"0.50599873",
"0.50279963",
"0.5017381",
"0.50138164",
"0.50005466",
"0.4993474",
"0.4979375",
"0.49688482",
"0.4962651",
"0.49467233",
"0.4... | 0.7942698 | 0 |
Creates the map from list. | private static Map<String, String> createMapFromList(final List<String> all) {
final Map<String, String> map = new ConcurrentHashMap<>();
for (final String documentElement : all) {
if (documentElement != null) {
map.put(documentElement, documentElement);
}
}
return map;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final Map<String, Integer> mo34029a(List<String> list) {\n return (Map) m446a(new C1840ci(this, list));\n }",
"public final Map<String, Integer> mo33708h(List<String> list) {\n return (Map) m968r(new C2164bs(this, list));\n }",
"public List<Map<Integer, String>> listList2Map(List<Lis... | [
"0.71955544",
"0.6860399",
"0.68442374",
"0.67116046",
"0.6618575",
"0.65909094",
"0.63234496",
"0.63114935",
"0.6256399",
"0.6238866",
"0.62181884",
"0.6201191",
"0.61743814",
"0.61562",
"0.61517185",
"0.60722524",
"0.6067641",
"0.60486144",
"0.60279477",
"0.60226285",
"0.59... | 0.6442101 | 6 |
It's recommended to keep rho at 0.95. | public AdaDelta(double rho, double epsilon) {
this.rho = rho;
this.epsilon = epsilon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getRho();",
"public void setRhoLocal(double value) {\r\n this.rhoLocal = value;\r\n }",
"public void setRhoForanea(double value) {\r\n this.rhoForanea = value;\r\n }",
"public static BigInteger rho(BigInteger N){\r\n\t\tBigInteger ys = null, x = null;\r\n\t\tBigInteger \r\n\t... | [
"0.6206634",
"0.615775",
"0.6114138",
"0.5932603",
"0.58176863",
"0.5805661",
"0.50842315",
"0.5067468",
"0.506115",
"0.50486916",
"0.5032481",
"0.49388355",
"0.48910227",
"0.48881385",
"0.48844528",
"0.48804376",
"0.4873896",
"0.48676774",
"0.48624724",
"0.4852523",
"0.48484... | 0.46050096 | 44 |
Keeps rho at 0.95, passes through epsilon. | public AdaDelta(double epsilon) {
this(0.95,epsilon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRhoForanea(double value) {\r\n this.rhoForanea = value;\r\n }",
"public AdaDelta(double rho, double epsilon) {\n this.rho = rho;\n this.epsilon = epsilon;\n }",
"public double epsilon();",
"public static BigInteger rho(BigInteger N){\r\n\t\tBigInteger ys = null, x = ... | [
"0.5616805",
"0.56135",
"0.55708617",
"0.5374501",
"0.5354465",
"0.53083736",
"0.5183092",
"0.5070751",
"0.50145817",
"0.499134",
"0.49684802",
"0.4930427",
"0.48396164",
"0.48324373",
"0.47385335",
"0.46697685",
"0.4666099",
"0.46329492",
"0.4613563",
"0.46052465",
"0.455669... | 0.48924828 | 12 |
Sets rho to 0.95 and epsilon to 1e6. | public AdaDelta() {
this(0.95,1e-6);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEpsilon(double epsilon) {\n\t\tthis.epsilon = epsilon;\n\t}",
"public void setEpsilon(double e) {\n\t\tepsilon = e;\n\t}",
"public void setRhoForanea(double value) {\r\n this.rhoForanea = value;\r\n }",
"public void setEpsilon(double epsilon) {\n this.epsilon = Math.max( 0.0, ... | [
"0.6663302",
"0.65762657",
"0.651688",
"0.64932084",
"0.61318487",
"0.61008495",
"0.58697253",
"0.5744316",
"0.54489076",
"0.5390719",
"0.52543294",
"0.52048165",
"0.516729",
"0.51665485",
"0.5122743",
"0.50061363",
"0.50047714",
"0.49928465",
"0.4939206",
"0.48490635",
"0.48... | 0.0 | -1 |
write your code here change accordingly | public void sendNewOrderAdmin(){
final String username = "tryllemikkel@gmail.com";
// change accordingly
final String password = "dcc59vez";
// Get system properties
Properties props = new Properties();
// enable authentication
props.put("mail.smtp.auth", "true");
// enable STARTTLS
props.put("mail.smtp.starttls.enable", "true");
// Setup mail server
props.put("mail.smtp.host", "smtp.gmail.com");
// TLS Port
props.put("mail.smtp.port", "587");
// creating Session instance referenced to
// Authenticator object to pass in
// Session.getInstance argument
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
//override the getPasswordAuthentication method
protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication(username,
password);
}
});
try {
// compose the message
// javax.mail.internet.MimeMessage class is
// mostly used for abstraction.
Message message = new MimeMessage(session);
// header field of the header.
message.setFrom(new InternetAddress("BallonkompagnietIVS"));
//Set admin email
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("mikkel@dalbynielsen.dk"));
message.setSubject("New order on website");
message.setText("New order placed on your website");
//send Message
Transport.send(message);
System.out.println("Email sent to admin - New order");
} catch (MessagingException e) {
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"private static void cajas() {\n\t\t\n\t}",
"public static void generateCode()\n {\n ... | [
"0.6277973",
"0.60644597",
"0.5896681",
"0.56635964",
"0.56305647",
"0.55776036",
"0.5547012",
"0.55073816",
"0.54708856",
"0.54521275",
"0.54463214",
"0.54416966",
"0.5431931",
"0.54228234",
"0.5388122",
"0.5349655",
"0.5333792",
"0.53310394",
"0.5322086",
"0.5319685",
"0.53... | 0.0 | -1 |
override the getPasswordAuthentication method | protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication(username,
password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(this.sUsername, this.sPassword);\r\n }",
"@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(from, pass... | [
"0.86889696",
"0.8571937",
"0.8396215",
"0.8390825",
"0.8354313",
"0.8354313",
"0.82078606",
"0.8162795",
"0.81421226",
"0.81339437",
"0.80918264",
"0.8053727",
"0.8039008",
"0.7992675",
"0.7666221",
"0.76131976",
"0.76131976",
"0.747477",
"0.7355679",
"0.7301285",
"0.7267148... | 0.81660265 | 7 |
write your code here change accordingly | public void sendNewOrderCustomer(String email){
final String username = "tryllemikkel@gmail.com";
// change accordingly
final String password = "dcc59vez";
// Get system properties
Properties props = new Properties();
// enable authentication
props.put("mail.smtp.auth", "true");
// enable STARTTLS
props.put("mail.smtp.starttls.enable", "true");
// Setup mail server
props.put("mail.smtp.host", "smtp.gmail.com");
// TLS Port
props.put("mail.smtp.port", "587");
// creating Session instance referenced to
// Authenticator object to pass in
// Session.getInstance argument
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
//override the getPasswordAuthentication method
protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication(username,
password);
}
});
try {
// compose the message
// javax.mail.internet.MimeMessage class is
// mostly used for abstraction.
Message message = new MimeMessage(session);
// header field of the header.
message.setFrom(new InternetAddress("BallonkompagnietIVS"));
//Set admin email
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(email));
message.setSubject("Tak for din ordre");
message.setText("Vi sender dine varer hurtigst muligt");
//send Message
Transport.send(message);
System.out.println("Email sent to customer - New order");
} catch (MessagingException e) {
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"private static void cajas() {\n\t\t\n\t}",
"public static void generateCode()\n {\n ... | [
"0.6277973",
"0.60644597",
"0.5896681",
"0.56635964",
"0.56305647",
"0.55776036",
"0.5547012",
"0.55073816",
"0.54708856",
"0.54521275",
"0.54463214",
"0.54416966",
"0.5431931",
"0.54228234",
"0.5388122",
"0.5349655",
"0.5333792",
"0.53310394",
"0.5322086",
"0.5319685",
"0.53... | 0.0 | -1 |
override the getPasswordAuthentication method | protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication(username,
password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(this.sUsername, this.sPassword);\r\n }",
"@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(from, pass... | [
"0.86889696",
"0.8571937",
"0.8396215",
"0.8390825",
"0.8354313",
"0.8354313",
"0.82078606",
"0.8162795",
"0.81421226",
"0.81339437",
"0.80918264",
"0.8053727",
"0.8039008",
"0.7992675",
"0.7666221",
"0.76131976",
"0.76131976",
"0.747477",
"0.7355679",
"0.7301285",
"0.7267148... | 0.81660265 | 8 |
Create a queue and initialize front and rear | public static void main(String[] args) {
Queue queue = new Queue();
// Inserting elements in Circular Queue
queue.enQueue(24);
queue.enQueue(94);
queue.enQueue(6);
queue.enQueue(18);
queue.enQueue(20);
queue.enQueue(19);
queue.enQueue(11);
// Display elements present in Circular Queue
queue.displayQueue();
// Deleting elements from Circular Queue
System.out.println("Deleted value = " + queue.deQueue());
System.out.println("Deleted value = " + queue.deQueue());
// Remaining elements in Circular Queue
queue.displayQueue();
queue.enQueue(1);
queue.enQueue(92);
queue.displayQueue();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyQueue() {\n front = null;\n rear = null;\n size = 0;\n }",
"public MyQueue() {\n rearStack = new Stack();\n frontStack = new Stack();\n }",
"public Queue() {\n\t\tthis.front = null;\n\t\tthis.end = null;\n\t\tthis.current = null;\n\t}",
"public Queue(){\n ... | [
"0.80456513",
"0.79420125",
"0.7607527",
"0.75141734",
"0.75029606",
"0.7499037",
"0.7416516",
"0.7345707",
"0.7330077",
"0.7269434",
"0.7234224",
"0.7191944",
"0.7190306",
"0.71844286",
"0.7103317",
"0.7091138",
"0.7078853",
"0.7078189",
"0.70546687",
"0.6964922",
"0.6913081... | 0.0 | -1 |
TODO Autogenerated method stub | public Page queryForTree(Class clazz, Map<String, Object> params, Map<String, Object> extParams, int pageNo, int pageSize, String orderProp, boolean isAsc) {
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 |
Creates new form MainWindow | public MainWindow() {
initComponents();
StationView = new SpaceStationView();
EnemyView = new EnemyStarshipView();
stationPanel.add(StationView);
enemyPanel.add(EnemyView);
message.setVisible(false);
setTitle(appName);
repaint();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }",
"public void mainWindow() {\n new MainWindow(this);\n }",
"private static void createAndShowGUI() {\n ... | [
"0.8153776",
"0.76767737",
"0.7464563",
"0.73875713",
"0.73757064",
"0.7275456",
"0.7221968",
"0.71607196",
"0.71484095",
"0.7101768",
"0.7079028",
"0.7029188",
"0.70283026",
"0.69844496",
"0.69569594",
"0.6882248",
"0.6874519",
"0.68709326",
"0.6860859",
"0.6847791",
"0.6843... | 0.65218705 | 67 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.