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
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Short studentID = Short.parseShort(request.getParameter("studentID")); String stduentName = request.getParameter("studentName"); Double scholarship = Double.parseDouble(request.getParameter("scholarship")); if(P2T5WebAppWebServiceClientProjectModel.createStudent(studentID, stduentName, scholarship)){ request.setAttribute("result", "Student record is created."); } else { request.setAttribute("result", "Fail to create student record"); } RequestDispatcher view = request.getRequestDispatcher("index.jsp"); view.forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Tests the factory method in the Car class.
@Test public void testNewInstance(){ car = Car.newInstance(); assertNotNull(car); assertNotNull(car.getID()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testCreateValidCoupeCar() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf(\"coupe\".toUpperCase());\n\t\tString _make = \"toyota\";\n\t\tString _model = \"trueno\";\n\t\tString _color = \"white\";\n\t\tint _year = 1986;\n\n\t\t// --------------------...
[ "0.7653862", "0.7485686", "0.7228456", "0.7114517", "0.7062654", "0.6908286", "0.6906822", "0.68687695", "0.68549335", "0.67488265", "0.6748733", "0.673934", "0.6658035", "0.66349244", "0.6611891", "0.6577619", "0.6577422", "0.6568434", "0.6563904", "0.65624934", "0.65595996"...
0.7514859
1
Method returns path by role
private String redirectByRole(Staff staff) { if (staff.getRole().equals("Admin")) { return Urls.REDIRECT_DOCTORS_LIST; } else if (staff.getRole().equals("Doctor")) { return Urls.REDIRECT_PATIENTS_BY_DOC_ID + staff.getId(); } else if (staff.getRole().equals("Nurse")) { return Urls.REDIRECT_TO_NURSE_PATIENTS; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String checkRoleForPath(final String role) {\n\t\tSet<Map.Entry<String, String>> entrySet = allRollesForPath.entrySet();\n\t\tString chooseRole = null;\n\n\t\tfor (Map.Entry<String, String> pair : entrySet) {\n\t\t\tif (role.equals(pair.getKey())) {\n\t\t\t\tchooseRole = pair.getValue();\n\t\t\t}\n\t\t}\n\t...
[ "0.7517088", "0.67756796", "0.67756796", "0.63449234", "0.62078214", "0.61936027", "0.60365224", "0.5986283", "0.595246", "0.59270144", "0.5920603", "0.58986384", "0.5892215", "0.5868615", "0.5830876", "0.5801754", "0.5797491", "0.57969296", "0.57169884", "0.5710654", "0.5701...
0.5601444
24
Begin Declarations End Declarations
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { response.setContentType( "text/html;charset=utf-8"); /* set up the intrinsic variables using the pageContext goober: ** session = HttpSession ** application = ServletContext ** out = JspWriter ** page = this ** config = ServletConfig ** all session/app beans declared in globals.jsa */ PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, "/errors.jsp", true, JspWriter.DEFAULT_BUFFER, true); // Note: this is not emitted if the session directive == false HttpSession session = pageContext.getSession(); int __jsp_tag_starteval; ServletContext application = pageContext.getServletContext(); JspWriter out = pageContext.getOut(); _DeleteException page = this; ServletConfig config = pageContext.getServletConfig(); javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext); try { out.write(__oracle_jsp_text[0]); out.write(__oracle_jsp_text[1]); out.write(__oracle_jsp_text[2]); { org.apache.taglibs.standard.tag.rt.core.SetTag __jsp_taghandler_1=(org.apache.taglibs.standard.tag.rt.core.SetTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.SetTag.class,"org.apache.taglibs.standard.tag.rt.core.SetTag var value scope"); __jsp_taghandler_1.setParent(null); __jsp_taghandler_1.setVar("unit_id"); __jsp_taghandler_1.setValue((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate("${param.unit}",java.lang.Object.class, __ojsp_varRes,null)); __jsp_taghandler_1.setScope("page"); __jsp_tag_starteval=__jsp_taghandler_1.doStartTag(); if (__jsp_taghandler_1.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_1,1); } out.write(__oracle_jsp_text[3]); { org.apache.taglibs.standard.tag.rt.core.SetTag __jsp_taghandler_2=(org.apache.taglibs.standard.tag.rt.core.SetTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.SetTag.class,"org.apache.taglibs.standard.tag.rt.core.SetTag var value scope"); __jsp_taghandler_2.setParent(null); __jsp_taghandler_2.setVar("period_id"); __jsp_taghandler_2.setValue((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate("${param.period}",java.lang.Object.class, __ojsp_varRes,null)); __jsp_taghandler_2.setScope("page"); __jsp_tag_starteval=__jsp_taghandler_2.doStartTag(); if (__jsp_taghandler_2.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_2,1); } out.write(__oracle_jsp_text[4]); edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean exceptions; synchronized (pageContext) { if ((exceptions = (edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean) pageContext.getAttribute( "exceptions", PageContext.PAGE_SCOPE)) == null) { exceptions = (edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean) new edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean(); pageContext.setAttribute( "exceptions", exceptions, PageContext.PAGE_SCOPE); out.write(__oracle_jsp_text[5]); exceptions.setUnitID(OracleJspRuntime.toInt( (java.lang.Integer)oracle.jsp.runtime.OracleJspRuntime.evaluate("${unit_id}",java.lang.Integer.class, __ojsp_varRes,null))); out.write(__oracle_jsp_text[6]); exceptions.setPeriodID(OracleJspRuntime.toInt( (java.lang.Integer)oracle.jsp.runtime.OracleJspRuntime.evaluate("${period_id}",java.lang.Integer.class, __ojsp_varRes,null))); out.write(__oracle_jsp_text[7]); exceptions.setSourceName((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${initParam['db.source']}",java.lang.String.class, __ojsp_varRes,null)); out.write(__oracle_jsp_text[8]); } } out.write(__oracle_jsp_text[9]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_3=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_3.setParent(null); __jsp_taghandler_3.setUrl("header.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_3.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_3,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[10]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_4=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_4.setParent(__jsp_taghandler_3); __jsp_taghandler_4.setName("unit"); __jsp_taghandler_4.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${param.unit}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_4.doStartTag(); if (__jsp_taghandler_4.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_4,2); } out.write(__oracle_jsp_text[11]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_5=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_5.setParent(__jsp_taghandler_3); __jsp_taghandler_5.setName("period"); __jsp_taghandler_5.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${param.period}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_5.doStartTag(); if (__jsp_taghandler_5.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_5,2); } out.write(__oracle_jsp_text[12]); } while (__jsp_taghandler_3.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_3.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_3.doCatch(th); } finally { __jsp_taghandler_3.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_3,1); } out.write(__oracle_jsp_text[13]); { org.apache.taglibs.standard.tag.rt.core.ForEachTag __jsp_taghandler_6=(org.apache.taglibs.standard.tag.rt.core.ForEachTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ForEachTag.class,"org.apache.taglibs.standard.tag.rt.core.ForEachTag items var"); __jsp_taghandler_6.setParent(null); __jsp_taghandler_6.setItems((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate("${exceptions.exceptionsInPeriod}",java.lang.Object.class, __ojsp_varRes,null)); __jsp_taghandler_6.setVar("theException"); try { __jsp_tag_starteval=__jsp_taghandler_6.doStartTag(); if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval)) { do { out.write(__oracle_jsp_text[14]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_7=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_7.setParent(__jsp_taghandler_6); __jsp_taghandler_7.setUrl("except_title.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_7.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_7,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[15]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_8=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_8.setParent(__jsp_taghandler_7); __jsp_taghandler_8.setName("has_special_range"); __jsp_taghandler_8.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.has_special_range}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_8.doStartTag(); if (__jsp_taghandler_8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_8,3); } out.write(__oracle_jsp_text[16]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_9=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_9.setParent(__jsp_taghandler_7); __jsp_taghandler_9.setName("period_id"); __jsp_taghandler_9.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.period_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_9.doStartTag(); if (__jsp_taghandler_9.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_9,3); } out.write(__oracle_jsp_text[17]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_10=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_10.setParent(__jsp_taghandler_7); __jsp_taghandler_10.setName("schedule_id"); __jsp_taghandler_10.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.schedule_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_10.doStartTag(); if (__jsp_taghandler_10.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_10,3); } out.write(__oracle_jsp_text[18]); } while (__jsp_taghandler_7.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_7.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_7.doCatch(th); } finally { __jsp_taghandler_7.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_7,2); } out.write(__oracle_jsp_text[19]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_11=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_11.setParent(__jsp_taghandler_6); __jsp_taghandler_11.setUrl("show_day.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_11.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_11,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[20]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_12=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_12.setParent(__jsp_taghandler_11); __jsp_taghandler_12.setName("dayName"); __jsp_taghandler_12.setValue("Mon-Thurs"); __jsp_tag_starteval=__jsp_taghandler_12.doStartTag(); if (__jsp_taghandler_12.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_12,3); } out.write(__oracle_jsp_text[21]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_13=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_13.setParent(__jsp_taghandler_11); __jsp_taghandler_13.setName("schedule"); __jsp_taghandler_13.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.schedule_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_13.doStartTag(); if (__jsp_taghandler_13.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_13,3); } out.write(__oracle_jsp_text[22]); } while (__jsp_taghandler_11.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_11.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_11.doCatch(th); } finally { __jsp_taghandler_11.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_11,2); } out.write(__oracle_jsp_text[23]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_14=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_14.setParent(__jsp_taghandler_6); __jsp_taghandler_14.setUrl("show_day.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_14.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_14,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[24]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_15=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_15.setParent(__jsp_taghandler_14); __jsp_taghandler_15.setName("dayName"); __jsp_taghandler_15.setValue("Fri"); __jsp_tag_starteval=__jsp_taghandler_15.doStartTag(); if (__jsp_taghandler_15.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_15,3); } out.write(__oracle_jsp_text[25]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_16=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_16.setParent(__jsp_taghandler_14); __jsp_taghandler_16.setName("schedule"); __jsp_taghandler_16.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.schedule_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_16.doStartTag(); if (__jsp_taghandler_16.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_16,3); } out.write(__oracle_jsp_text[26]); } while (__jsp_taghandler_14.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_14.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_14.doCatch(th); } finally { __jsp_taghandler_14.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_14,2); } out.write(__oracle_jsp_text[27]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_17=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_17.setParent(__jsp_taghandler_6); __jsp_taghandler_17.setUrl("show_day.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_17.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_17,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[28]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_18=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_18.setParent(__jsp_taghandler_17); __jsp_taghandler_18.setName("dayName"); __jsp_taghandler_18.setValue("Sat"); __jsp_tag_starteval=__jsp_taghandler_18.doStartTag(); if (__jsp_taghandler_18.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_18,3); } out.write(__oracle_jsp_text[29]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_19=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_19.setParent(__jsp_taghandler_17); __jsp_taghandler_19.setName("schedule"); __jsp_taghandler_19.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.schedule_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_19.doStartTag(); if (__jsp_taghandler_19.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_19,3); } out.write(__oracle_jsp_text[30]); } while (__jsp_taghandler_17.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_17.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_17.doCatch(th); } finally { __jsp_taghandler_17.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_17,2); } out.write(__oracle_jsp_text[31]); { org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_20=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,"org.apache.taglibs.standard.tag.rt.core.ImportTag url"); __jsp_taghandler_20.setParent(__jsp_taghandler_6); __jsp_taghandler_20.setUrl("show_day.jsp"); try { __jsp_tag_starteval=__jsp_taghandler_20.doStartTag(); if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval)) { try { out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_20,__jsp_tag_starteval,out); do { out.write(__oracle_jsp_text[32]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_21=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_21.setParent(__jsp_taghandler_20); __jsp_taghandler_21.setName("dayName"); __jsp_taghandler_21.setValue("Sun"); __jsp_tag_starteval=__jsp_taghandler_21.doStartTag(); if (__jsp_taghandler_21.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_21,3); } out.write(__oracle_jsp_text[33]); { org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_22=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,"org.apache.taglibs.standard.tag.rt.core.ParamTag name value"); __jsp_taghandler_22.setParent(__jsp_taghandler_20); __jsp_taghandler_22.setName("schedule"); __jsp_taghandler_22.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${theException.schedule_id}",java.lang.String.class, __ojsp_varRes,null)); __jsp_tag_starteval=__jsp_taghandler_22.doStartTag(); if (__jsp_taghandler_22.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_22,3); } out.write(__oracle_jsp_text[34]); } while (__jsp_taghandler_20.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } finally { out=OracleJspRuntime.popBodyIfNeeded(pageContext,out); } } if (__jsp_taghandler_20.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_20.doCatch(th); } finally { __jsp_taghandler_20.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_20,2); } out.write(__oracle_jsp_text[35]); } while (__jsp_taghandler_6.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); } if (__jsp_taghandler_6.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; } catch (Throwable th) { __jsp_taghandler_6.doCatch(th); } finally { __jsp_taghandler_6.doFinally(); } OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_6,1); } out.write(__oracle_jsp_text[36]); } catch( Throwable e) { if (!(e instanceof javax.servlet.jsp.SkipPageException)){ try { if (out != null) out.clear(); } catch( Exception clearException) { } pageContext.handlePageException( e); } } finally { OracleJspRuntime.extraHandlePCFinally(pageContext,true); JspFactory.getDefaultFactory().releasePageContext(pageContext); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void masterDeclaration();", "int getDeclarationSourceStart();", "void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.eq...
[ "0.6813476", "0.6438561", "0.6404834", "0.6246868", "0.61791694", "0.596839", "0.5898789", "0.58859026", "0.5852016", "0.5794537", "0.57892954", "0.57718533", "0.5702453", "0.5665881", "0.5661392", "0.5628416", "0.56114227", "0.5565137", "0.5558848", "0.55151135", "0.55125195...
0.0
-1
TODO Autogenerated method stub
@Override protected String getAlgorithmName() { return "capture"; }
{ "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
/constructor with 1 parameter Create 1 arg constructor to set title
public DreamJob (String title) { System.out.println("Message from: DreamJob(String title)"); this.title = title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Meny(String title){\n \tthis.title = title;\n }", "TITLE createTITLE();", "public Title(String title)\r\n {\r\n this();\r\n if( title != null )\r\n add(title);\r\n }", "@Override\r\n public void create() {\r\n super.create();\r\n setTitle(titl...
[ "0.7698966", "0.7544677", "0.7406757", "0.73544365", "0.7279481", "0.72657657", "0.726533", "0.72444016", "0.7211211", "0.71953106", "0.7171745", "0.7104635", "0.7052306", "0.7052127", "0.7052127", "0.7052127", "0.705124", "0.70505357", "0.70425475", "0.7033814", "0.7021753",...
0.6834068
50
/ constructor with 3 parameters Create 3 arg constructor to set all 3 fields
public DreamJob (String title, String company, double annualSalary ) { System.out.println("Message from: DreamJob(String title, String company, double annualSalary)"); this.title = title; this.company = company; this.annualSalary = annualSalary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "@Test\n\tpublic void testProfessorConstructor3Params(){\n\t\tString firstname = \"Dennis\";\n\t\tString lastName = \"Ritchie\";\n\t\tlong id = 0451;\n\t\tProfessor testProfessor = new Professor(firstname, lastName, id);\n\t\tAssert.assertEqua...
[ "0.6502829", "0.6500881", "0.64540654", "0.6347301", "0.6310182", "0.6304939", "0.6299221", "0.62766576", "0.6269846", "0.62476265", "0.62213427", "0.6202662", "0.61609507", "0.61592007", "0.61192733", "0.6106726", "0.6069108", "0.60682696", "0.6066479", "0.6064283", "0.60608...
0.0
-1
/create a method called toString it accepts no parameters and return concatenation of all field value in nice format
public String toString () { return "Title: "+this.title +", Company: "+company+", Annual Salary: "+annualSalary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t...
[ "0.82620585", "0.8034509", "0.79285306", "0.76786745", "0.756143", "0.7526033", "0.7523425", "0.75086", "0.7503075", "0.75025505", "0.74946654", "0.7471866", "0.7454022", "0.74437106", "0.73923874", "0.73923874", "0.73923874", "0.73923874", "0.73923874", "0.73923874", "0.7392...
0.0
-1
Called when a comment or TrackBack has been added.
protected void blogEntryResponseAdded(Response response) { String content = response.getContent(); if (content != null) { Matcher m = HTML_LINK_PATTERN.matcher(content); int count = 0; while (m.find()) { count++; } PluginProperties props = response.getBlogEntry().getBlog().getPluginProperties(); String propertyName = ""; if (response instanceof Comment) { propertyName = COMMENT_THRESHOLD_KEY; } else { propertyName = TRACKBACK_THRESHOLD_KEY; } int threshold = DEFAULT_THRESHOLD; if (props.hasProperty(propertyName)) { try { threshold = Integer.parseInt(props.getProperty(propertyName)); } catch (NumberFormatException nfe) { log.error(nfe.getMessage()); // do nothing, the value has already been defaulted } } if (count > threshold) { log.info(response.getTitle() + " marked as pending : number of links is " + count + ", threshold is " + threshold); response.setPending(); response.incrementSpamScore(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "@Override\n public void onComment(Comment newComment) {\n addComment(mPostRef, newComment)\n .addOnSuccessListener(this, new OnSuccessListener<Void>() {\n @Override\n ...
[ "0.6564122", "0.6544895", "0.6361421", "0.6353037", "0.60112417", "0.5953106", "0.59234506", "0.5919189", "0.5918404", "0.5885539", "0.5821581", "0.5813066", "0.57863206", "0.5756683", "0.5747611", "0.572901", "0.57106054", "0.5704126", "0.56880444", "0.56786716", "0.56646544...
0.50565267
65
Try to recover the data linked to the audit
@Test public void testGetAudit() throws SqualeRestException { ByApplication audit = httpClient.getAudit( auditId ); assertNotNull( audit ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void recover() {\n _siteStatus = true;\n for (Integer varIndex : _dataMap.keySet()) {\n List<Data> dataList;\n if (varIndex % 2 == 0) {\n dataList = _dataMap.get(varIndex);\n Data d = dataList.get(dataList.size() - 1);\n // set the last commit variable to unavailable to ...
[ "0.61998373", "0.6181955", "0.59760916", "0.5860283", "0.5607801", "0.5556001", "0.5526177", "0.5403062", "0.5381981", "0.5375208", "0.53695935", "0.533126", "0.5260791", "0.5256192", "0.5254521", "0.52077544", "0.51956713", "0.5175272", "0.51242894", "0.5111553", "0.5084968"...
0.4597292
75
to navigate modules under Activity Stream
public void navigateToTab(String tabName) { if (tabName.equals("File") || tabName.equals("Appreciation") || tabName.equals("Announcement") || tabName.equals("Workflow")) { WebElement more = driver.findElement(By.xpath("//span[@id='feed-add-post-form-link-text' and contains(text(),'More')]")); more.click(); BrowserUtils.wait(3); WebElement subModule=driver.findElement(By.xpath("//span[@class='menu-popup-item-text' and contains(text(),'"+tabName+"')]")); subModule.click(); } else { String tabXpath = "//span[@class='feed-add-post-form-link']//span[text()='" + tabName + "']"; WebElement tab = driver.findElement(By.xpath(tabXpath)); tab.click(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onGoToSearchModule() {\n GWT.log(\"SearchModule loaded\");\n //nothing by default\n }", "private void openActivity() {\n }", "private void link(MainActivity pActivity) {\n\n\t\t}", "@SubActivity\n@Component(modules = {ActivityModule.class})\npublic interface ActivityComponent{...
[ "0.58106375", "0.5788778", "0.5741755", "0.5497363", "0.5470844", "0.54361075", "0.54266286", "0.54013455", "0.53993195", "0.5375608", "0.5368422", "0.5323641", "0.53192556", "0.5302506", "0.5296003", "0.52481484", "0.5245865", "0.5244416", "0.52432895", "0.52314925", "0.5207...
0.0
-1
Filter for dropping AP with noise data
public Triangulation(WifiManager wm, Map<String, Object> initParams, Context context) { triangMethod = (String) initParams.get(TRIANG_METHOD); wifiScanner = new WiFiScanner(wm, initParams, context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public void useFilter() {\r\n\t\t\tif(src.channels() > 1) {\r\n\t\t\t\tImgproc.cvtColor(src, bwsrc, Imgproc.COLOR_BGR2GRAY);\r\n\t\t\t\tdst = new Mat(bwsrc.size(),CvType.CV_8U);\r\n\t\t\t\tfor(int i = 0; i<...
[ "0.6262564", "0.60373485", "0.59876037", "0.57080746", "0.56860906", "0.5678161", "0.554814", "0.5542508", "0.5534013", "0.5518075", "0.5487982", "0.5468871", "0.54165053", "0.53870475", "0.5385158", "0.53630036", "0.5347763", "0.5312217", "0.53055155", "0.52889127", "0.52866...
0.0
-1
Find the nearest Access Point and set the current position
public AccessPoint calculateAccessPointPosition() { wifiScanner.scanStart(); apList = wifiScanner.getApList(); return apList.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findNewNearestPub() {\n \t\tevent.SetPubLocation(new PubLocation()/*new nearest found location*/);\n \t\tUpdateFromEvent();\n \t}", "public closest(){\n\t\tthis.pnt = null;\n\t}", "private Point getUpdatedPoint(Movable obj, double newX, double newY){\n\t if(obj.getMovingScheme() == Movable.APPR...
[ "0.64252806", "0.6413619", "0.64014965", "0.61421186", "0.6124701", "0.60889834", "0.60889834", "0.60849124", "0.6069002", "0.6018064", "0.6012704", "0.6005941", "0.5971198", "0.596841", "0.59620374", "0.5956199", "0.5903009", "0.5885429", "0.5847787", "0.5835233", "0.5831338...
0.5641652
39
Find the nearest category using the current position
public String getNearestCategory(double x, double y) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<? extends Position> findNearest(Position position, int k);", "public DocumentVector MostNearCategory(DocumentVector in){\n\n if(categories == null){\n categories = centroids.keySet().toArray(new String[centroids.size()]);\n Arrays.sort(categories);\n }\n doub...
[ "0.6594277", "0.6285908", "0.61591655", "0.6117469", "0.6092975", "0.60190713", "0.59705967", "0.5958974", "0.5936722", "0.57939863", "0.56995976", "0.56063336", "0.55961436", "0.5492387", "0.54591286", "0.5374792", "0.5367675", "0.53628284", "0.53611434", "0.53497523", "0.53...
0.62641287
2
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof SubTipoEvento)) { return false; } SubTipoEvento other = (SubTipoEvento) object; if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6897049", "0.6839498", "0.67057544", "0.66417086", "0.66417086", "0.6592169", "0.6579292", "0.6579292", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.656245", "0.656245", "0.65447694", "0.65251684", "0.6516205", "0.6487982", "0.6477638", ...
0.0
-1
/ onConnectionFailed() was started with startIntentSenderForResult and the code RC_SIGN_IN, we can capture the result inside Activity.onActivityResult.
@Override protected void onActivityResult(int requestCode, int responseCode, Intent intent) { if (requestCode == RC_SIGN_IN) { if (responseCode != RESULT_OK) { mShouldResolve = false; } mIntentInProgress = false; if (!mGoogleApiClient.isConnecting()) { mGoogleApiClient.connect(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode,resultCode,data);\n\n if (requestCode == RES_CODE_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n sig...
[ "0.7584473", "0.7522692", "0.751543", "0.74459106", "0.7385267", "0.7357664", "0.7325096", "0.731254", "0.73118377", "0.7255974", "0.71728283", "0.70323044", "0.7005204", "0.6963634", "0.69254774", "0.69022053", "0.68923706", "0.68816966", "0.6866335", "0.68409956", "0.665994...
0.79391116
0
Called by client server is listening for this name
public void sendModuleNameToServer() { try { System.out.println("writing module name:" + getModuleName()); ostream.writeObject(getModuleName()); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "public String listen(){\t\n\t\tSystem.out.println(\"Server lauscht.\");\n\t\treturn receiveString();\n\t}", "private void requestClientNameFromServer() {\n writeToServer(ServerAction.GET_NAME + \"\");\n }", "public synchronized void list...
[ "0.69222134", "0.68637544", "0.6781286", "0.67475486", "0.65269005", "0.6508256", "0.64762586", "0.6468762", "0.64421785", "0.6417093", "0.63590515", "0.63346756", "0.6297757", "0.62761736", "0.62661314", "0.61477304", "0.6134341", "0.61139953", "0.6111023", "0.60901004", "0....
0.0
-1
Server's method; reads method name
public void handle() throws Exception {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getMethod();", "String getMethod();", "private String getName() {\n return method.getName();\n }", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "String getMethodName();", "String getMethodName();", "public String getMethod ()\n {\n retur...
[ "0.7585368", "0.7585368", "0.7376569", "0.73498887", "0.7298977", "0.7298977", "0.72628385", "0.7208834", "0.7208834", "0.7208834", "0.7208834", "0.7129416", "0.7114927", "0.70429504", "0.7029913", "0.70019615", "0.6965844", "0.6965844", "0.6864043", "0.684541", "0.684541", ...
0.0
-1
Get a SessionFactory initialized with the default configuration
public SessionFactory getSessionFactory() { return sessionFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static SessionFactory getSessionFactory() {\r\n\t\tConfiguration configuration = new Configuration().configure();\r\n\t\tStandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder()\r\n\t\t\t\t.applySettings(configuration.getProperties());\r\n\t\tSessionFactory sessionFactory = configuratio...
[ "0.7613225", "0.7491188", "0.74603873", "0.7341174", "0.7295853", "0.7257668", "0.72320765", "0.72082305", "0.71230364", "0.6996173", "0.69601613", "0.6954286", "0.68913424", "0.68693", "0.68516064", "0.6840615", "0.67986107", "0.6794233", "0.6794233", "0.67645615", "0.673749...
0.7075347
9
Map timeVolei = new HashMap();
public static void main(String[] args) { Map<String, Pessoa> timeVolei = new TreeMap<>(); Pessoa p1 = new Pessoa("João", 32); Pessoa p2 = new Pessoa("Maria", 23); Pessoa p3 = new Pessoa("Pedro", 27); Pessoa p4 = new Pessoa("William", 19); Pessoa p5 = new Pessoa("Laura", 38); Pessoa p6 = new Pessoa("Juliana", 20); timeVolei.put("Levantador", p1); timeVolei.put("Libero", p2); timeVolei.put("Ponta1", p3); timeVolei.put("Armador", p4); timeVolei.put("Ponta2", p5); timeVolei.put("Centro", p6); Pessoa p = timeVolei.get("Armador"); System.out.println(p.nome + "---" + p.idade); // Já que o valor não pode se repetir, é usado Set Set<String> chaves = timeVolei.keySet(); for (String c : chaves) { System.out.println("Chave => " + c); } // Já que o valor pode se repetir, é usado Collection Collection<Pessoa> values = timeVolei.values(); for (Pessoa pessoa : values) { System.out.println("Nome => " + pessoa.nome); } Stream<String> valuesTransformados = values.stream().map((item) -> { return "*" + item.nome + "*"; }); // Forma compacta do foreach valuesTransformados.forEach(System.out::println); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TimeMap() {\n timeMap = new HashMap<>();\n }", "public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }", "public TimeMap2() {\n map = new HashMap<>();\n }", "public Map<Integer, TimesBean> getTimes() {\n/* 15 */ return this.times;\n/* */ }"...
[ "0.74356353", "0.7344892", "0.70312923", "0.6383445", "0.6305015", "0.6301881", "0.61234707", "0.6013395", "0.6012824", "0.5981737", "0.5924095", "0.5902714", "0.588476", "0.5868363", "0.583492", "0.5827926", "0.5816737", "0.5775599", "0.5761216", "0.57557076", "0.57321656", ...
0.59609956
10
ArrayList moreArticles; ArrayList moreArticlesFiltrats;
@Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { boolean loadMore; int ultimRegistreVist= firstVisibleItem + visibleItemCount; boolean loadMoreTmp = firstVisibleItem + visibleItemCount >= totalItemCount; if ((this.articles.size() == 100) && (loadMoreTmp)){ //if ((this.articles.size() == 100) && (ultimRegistreVist >= totalItemCount)){ loadMore = true; } else{ loadMore = false; } if(loadMore && this.processes==0) { this.processes = 1; activity.obtainArticlesAsync(this.urlFinal + "/" + String.valueOf(this.articles.size() + 1),this.dialog, this.articles, this.listArticles,(ultimRegistreVist - visibleItemCount)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void filterArticles() {\n filterAgent.score(articles, filterType);\n articles = insertionSort(articles); // sorted articles list\n\n refreshTable();\n if (articles.size() > 0) {\n currentArt = (NewsArticle) articles.elementAt(0);\n }\n }", "public void setupArticlesList();", "public...
[ "0.6396064", "0.61902505", "0.60791576", "0.59447175", "0.590117", "0.58862776", "0.5852832", "0.5793555", "0.57195103", "0.5636754", "0.56252164", "0.56066835", "0.56026196", "0.55415213", "0.55285704", "0.55264753", "0.5492871", "0.5483043", "0.54636204", "0.5421757", "0.54...
0.0
-1
/BannerView mBanner = (BannerView) view.findViewById((R.id.banner_shoppingcart_articles)); mBanner.getAdSettings().setPublisherId(Constants.publisherId); mBanner.getAdSettings().setAdspaceId(Constants.adspaceId); mBanner.setAutoReloadFrequency(Constants.bannerRefreshTime); mBanner.getUserSettings().setKeywordList(Constants.keywordList); mBanner.getUserSettings().setSearchQuery(Constants.searchQuery); mBanner.asyncLoadNewBanner();
public void bannerSetup(View view){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestNewBanner(){\n AdView mAdView = (AdView) findViewById(R.id.adView);\n AdRequest adRequest = new AdRequest.Builder().build();\n mAdView.loadAd(adRequest);\n }", "private void bannerAds() {\n Log.d(TAG, \"bannerAds invoked\");\n BannerAdView bannerAdView = ...
[ "0.78612125", "0.7473711", "0.73022795", "0.72425896", "0.71527815", "0.7054805", "0.6886143", "0.68434185", "0.6826572", "0.67323804", "0.6722997", "0.6709874", "0.6696602", "0.6580169", "0.6548195", "0.6433805", "0.6411993", "0.63948", "0.6392999", "0.6364588", "0.63524044"...
0.71711236
4
Returns a new instance of this fragment for the given section number.
public static ArticlesFragment newInstance(int sectionNumber) { ArticlesFragment fragment = new ArticlesFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public s...
[ "0.783739", "0.77157956", "0.7709921", "0.769745", "0.76833004", "0.7610183", "0.75957125", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", "0.756846", ...
0.7376934
52
ifdef MC152 +return item.getLocalizedName(stack); else
@Override public String getDisplayName() { return item.getItemStackDisplayName(stack); //#endif }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }", "public static String getFriendlyName(ItemStack itemStack, boolean checkDisplayName) {\n if (itemStack == null || itemStack.getType() == Material.AIR) return \"Air\";\n try ...
[ "0.68970394", "0.6732122", "0.66675186", "0.6570625", "0.627987", "0.6270619", "0.6188192", "0.6068704", "0.60554206", "0.60094315", "0.5991671", "0.5902333", "0.58393854", "0.58382314", "0.5837374", "0.58250254", "0.5793769", "0.57765484", "0.5772842", "0.57470536", "0.57272...
0.7130881
0
Adds all questions from an array of questions to the list view in the result activity using the QuizListAdapter for every Question object
private void populateQuestionListView(){ questionList = (ListView) findViewById(R.id.question_list); qla = new QuizListAdapter(this); for(int i = 0; i < questions.getSize(); i++) qla.add(questions.getNext(Question.class)); //sets the adapter for all the list items if(questionList != null){ questionList.setAdapter(qla); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initQuestions() {\n questionList = Arrays.asList(getResources().getStringArray(R.array.questions));\n questionOne.setText(questionList.get(0));\n questionTwo.setText(questionList.get(1));\n questionThree.setText(questionList.get(2));\n questionFour.setText(questionLi...
[ "0.68370205", "0.6462465", "0.63260734", "0.6240197", "0.61507326", "0.61119676", "0.6097891", "0.6090068", "0.60413694", "0.6012647", "0.60107434", "0.59881103", "0.5979443", "0.5972586", "0.5969665", "0.59541297", "0.5946751", "0.5884574", "0.58615583", "0.5855797", "0.5836...
0.75695014
0
Validate the contents of a sent message match up. Make sure the corresponding channel view is in the hierarchy before calling this method.
private void validateSentMessage(String receiver, boolean encrypted, boolean signed) { String encryptedText = encrypted ? ENCRYPTED_TEXT : UNENCRYPTED_TEXT; String signedText = signed ? SIGNED_TEXT : UNSIGNED_TEXT; // validate sender name Espresso.onView(withId(R.id.sn_message_sender)) .check(matches(withText(containsString(PEER_NAME)))); // validate message content Espresso.onView(withId(R.id.sn_message_content)) .check(matches(withText(TEST_MESSAGE))); // validate receiver name or anybody Espresso.onView(withId(R.id.sn_message_receivers)) .check(matches(withText(containsString(receiver)))); // validate if message is encrypted Espresso.onView(withId(R.id.sn_message_encrypted)) .check(matches(withText(containsString(encryptedText)))); // validate if message is signed Espresso.onView(withId(R.id.sn_message_verified)) .check(matches(withText(containsString(signedText)))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isTriggeredBy( IACREMessage message ) {\n if ( this.sender.isConstant() && !this.sender.getFunctor().equals( message.getSender().getName() ) ) {\n logger.info( \"Sender mismatch\" );\n return false;\n }\n\n // false if recipient has been set and doesn't mat...
[ "0.5522598", "0.5389019", "0.5370204", "0.53011405", "0.5281158", "0.5280903", "0.5261015", "0.5242456", "0.52415824", "0.52292204", "0.52276856", "0.52265733", "0.52139235", "0.5205487", "0.5203689", "0.5186562", "0.5185756", "0.5104857", "0.508524", "0.50725657", "0.5012873...
0.53533804
3
TODO: right now no encrypted exchange with contacts possible
@Test public void scenario5_sendMessageToContact_encrypted() { // go to channel Espresso.onView(withId(R.id.sn_channel_list_recycler_view)) .perform(RecyclerViewActions.actionOnItemAtPosition(0, click())); // go to addMessage Espresso.onView(withId(R.id.snChannelViewMenuAddMessage)) .perform(click()); // add message with recipient Espresso.onView(withId(R.id.snMessage)) .perform(typeText(TEST_MESSAGE)); Espresso.onView(withId(R.id.selectRecipients)) .perform(click()); Espresso.onView(withId(R.id.person_list_recycler_view)) .perform(RecyclerViewActions.actionOnItem(hasDescendant(withText(TEST_RECIPIENT)), click()) .atPosition(0)); Espresso.onView(withId(R.id.personListSelectionDoneButton)) .perform(click()); // encrypt message Espresso.onView(withId(R.id.snEncrypted)) .perform(click()); Espresso.onView(withId(R.id.addButton)) .perform(click()); // go to sent message Espresso.onView(withId(R.id.sn_channel_view_recycler_view)) .perform(RecyclerViewActions.actionOnItemAtPosition(0, click())); validateSentMessage(TEST_RECIPIENT, true, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toEncryptedString() {\r\n\t\t\r\n\t\t// puts the optional fields as \"??\" if they were blanks.\r\n\t\tif(this.getAddress().length()==0)\r\n\t\t\tthis.setAddress(\"??\");\r\n\t\t\r\n\t\tif(this.getCity().length()==0)\r\n\t\t\tthis.setCity(\"??\");\t\t\r\n\t\t\r\n\t\t// encrypt contact info.\r\n\t\tSt...
[ "0.5816274", "0.545207", "0.54363704", "0.5347649", "0.53154635", "0.51910824", "0.5171934", "0.51085705", "0.50834477", "0.5061565", "0.5036512", "0.5013958", "0.5009593", "0.49895054", "0.49889052", "0.49814656", "0.4974284", "0.49713472", "0.4966973", "0.4961272", "0.49612...
0.49139324
28
Account no is already declared as acc1
public static void main(String[] args) { int acc1 = 123456; // Password is also declared as pass1 int pass1 = 2003; // Initial balance of acc1 or account int balance = 10000; Scanner sc = new Scanner(System.in); try { for (int n = 1; n > 0; n++) { System.out.println("Enter Account nos."); int acc = sc.nextInt(); System.out.println("Entered Account number : " + acc); System.out.println("Enter Password"); int pass = sc.nextInt(); System.out.println("Entered Password : " + pass); if (acc1 == acc) { if (pass == pass1) { System.out.println("Account Found"); System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"); System.out.println("Select type :-"); System.out.println("For Saving A/c press 1"); System.out.println("For Current A/c press 2"); int type1 = sc.nextInt(); if (type1 == 1) { System.out.println("Welcome to your Saving Account"); System.out.println("^^^^^^^^^^^^^^^^^^^^^^############################^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"); System.out.println(); System.out.println("Select operations you have to perform :"); System.out.println("For Balance Inquiry press 3"); System.out.println("For Deposit Cash press 4"); System.out.println("For Withdrawl Cash press 5"); int entered_op = sc.nextInt(); if (entered_op == 3) { System.out.println("Current balance in your Saving A/c is " + balance); } else if (entered_op == 4) { System.out.println("Enter Deposit amount :"); int deposit_amu = sc.nextInt(); int update_bal = balance + deposit_amu; System.out.println("Your balance is :" + update_bal); } else if (entered_op == 5) { System.out.println("Enter Withdrawl amount :"); int withdrawl_amu = sc.nextInt(); int update_with = balance - withdrawl_amu; if (update_with >= 0) { System.out.println("Balance is :" + update_with); } else { System.out.println("Balance is not negative"); } } else { System.out.println("Select Valid Operation"); } } else if (type1 == 2) { System.out.println("Welcome to your Current Account"); System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^############################^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"); System.out.println(); // Operations are not mentioned for current account System.out.println("OPERATIONS ARE NOT MENTIONED FOR CURRENT ACCOUNT MODIFIED IN FUTURE"); } else { System.out.println("Invalid type"); } } else { System.out.println("Invalid Password"); } } System.out.println("Want to continue press any number but if not then press 0"); int num = sc.nextInt(); if (num == 0) { break; } } }catch (InputMismatchException e){ System.out.println("Enter valid number"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAccNo(int accNo) {\r\n\t\tthis.accNo = accNo+1;\r\n\t}", "public AccountTypeAlreadyExistException(Account akun){\n super(\"Unable to create duplicate account of type \");\n this.akun=akun;\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\...
[ "0.65483975", "0.63820136", "0.6278833", "0.62063944", "0.61364174", "0.6109118", "0.6045534", "0.59009707", "0.5900282", "0.5821484", "0.57855386", "0.57828337", "0.5761405", "0.57509226", "0.5739327", "0.571551", "0.56796086", "0.565536", "0.5650478", "0.5640977", "0.561436...
0.53565085
58
Creates a new instance.
public RecordedXmlTransportFactory(XmlRpcClient pClient) { super(pClient); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public v...
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239...
0.0
-1
Creates a new instance.
public RecordedRpcTransport(XmlRpcCommonsTransportFactory pFactory) { super(pFactory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public v...
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239...
0.0
-1
Dumps outgoing XMLRPC requests to the log
@Override protected void writeRequest(final XmlRpcStreamTransport.ReqWriter pWriter) throws XmlRpcException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { pWriter.write(baos); } catch (SAXException e) { } catch (IOException e) { } LOG.debug("Send request=\n{}", XmlPrettyFormatter.toPrettyString(baos.toString())); super.writeRequest(pWriter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void serializeLogs();", "public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}", "public void log(Request request, Reply reply, int nbytes, long duration) {\n Client clie...
[ "0.57104164", "0.56597745", "0.5625806", "0.5514831", "0.5368786", "0.536642", "0.52958965", "0.5288533", "0.52456695", "0.5206064", "0.5188403", "0.5188403", "0.5188403", "0.51663053", "0.5145489", "0.511426", "0.5110416", "0.50496966", "0.49517003", "0.4945441", "0.493485",...
0.56935394
1
Dumps incoming XMLRPC responses to the log
@Override protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { final StringBuffer sb = new StringBuffer(); try { final BufferedReader reader = new BufferedReader(new InputStreamReader(pStream)); String line = reader.readLine(); while (line != null) { sb.append(line); line = reader.readLine(); } } catch (final IOException e) { LOG.error("Fail to dump", e); } LOG.debug("Receive response=\n{}", XmlPrettyFormatter.toPrettyString(sb.toString())); final ByteArrayInputStream bais = new ByteArrayInputStream(sb.toString().getBytes()); return super.readResponse(pConfig, bais); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void serializeLogs();", "private void dumpResponse(ByteArrayOutputStream out) {\n try {\n OutputStream file = new BufferedOutputStream(new FileOutputStream(new File(dumpDir, dataRspFile)));\n file.write(out.toByteArray());\n file.flush();\n file.close();\...
[ "0.5821736", "0.57858634", "0.57833207", "0.55847335", "0.5444362", "0.54431957", "0.5436982", "0.5400236", "0.5400217", "0.5303449", "0.5272157", "0.52517146", "0.5230864", "0.5179891", "0.507186", "0.50332624", "0.5010227", "0.5010227", "0.5010227", "0.49981004", "0.4946178...
0.46928242
52
Handle the address and output or call the fault handler as needed
public boolean handleAddress(Address address, String processName) { int pageHit = 0; synchronized (mainMemory) { // Check if address divided by page/frame size is > page/frame size if so break if (address.getPage() > VMsim.pageCount) { System.out.println(address.getPage() + "HERE"); return false; } pageHit = mainMemory.checkPageIfAvailable(address.getPage()); } // Check if the address hits if (pageHit > 0) { System.out.println(processName + " accesses address " + address.getAddress() + " (page number = " + address.getPage() + ", page offset=" + address.getOffset() + ") in main memory (frame number = " + pageHit + "). "); } else { FaultHandlerThread faultHandler = (FaultHandlerThread) VMsim.threadMap.get("fault_handler"); faultHandler.handle(address, processName); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void doHandle()\n\t{\n\t\t// should be at least on arg\n\t\tif (!hasMoreTokens())\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"argumentRequired\")); //$NON-NLS-1$\n\t\telse\n\t\t{\n\t\t\t// poor man's fix for supporting 'all' option\n\t\t\tString faultName = nextToken();\n\t\t\tObject[] names = new...
[ "0.66167486", "0.5896298", "0.58071715", "0.56524324", "0.5571988", "0.5546195", "0.55011463", "0.549943", "0.5428812", "0.5404305", "0.5403906", "0.5372432", "0.5334", "0.5329993", "0.5272706", "0.5248403", "0.52168864", "0.5197121", "0.51457304", "0.51448095", "0.5137973", ...
0.55953723
4
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public DialogC40161sj(Activity activity, AnonymousClass01X r4, AnonymousClass03B r5, Activity activity2) { super(activity, r4, R.layout.clock_wrong, true); this.A01 = r5; this.A00 = activity2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "protected void method_3848() {\...
[ "0.7415376", "0.7120564", "0.7120564", "0.7120564", "0.71153504", "0.70223135", "0.7006699", "0.6959695", "0.69354844", "0.68295795", "0.6789057", "0.6759874", "0.6727165", "0.6727165", "0.6680012", "0.6670413", "0.6636899", "0.66286534", "0.6619911", "0.6605483", "0.6603786"...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Morning mn = new Morning(); mn.greet(); mn.talk(); }
{ "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
This class simulates matches of two players.
public MatchSimulator(PassiveFighter fighter1, PassiveFighter fighter2) { assert fighter1 != null: "PassiveFighter fighter1 is not properly initialized"; assert fighter2 != null: "PassiveFighter fighter2 is not properly initialized"; this.player1 = new Player(this, fighter1, (TOTAL_ARENA_WIDTH/5)); this.player2 = new Player(this, fighter2, 1-(TOTAL_ARENA_WIDTH/5)); this.staticBackground = new StaticBackground(); this.gui = new MatchSimulatorGUI(this.toString(), staticBackground.appearance().getIconWidth(), staticBackground.appearance().getIconHeight()); this.matchEndMessage = "The match ended"; this.matchEnded = false; setChanged(); this.addObserver(gui); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerMatches(String player1, String player2) {\n this.player1 = player1;\n this.player2 = player2;\n }", "public PlayerMatches(String player1) {\n this.player1 = player1;\n }", "@Override\n public void playWithTwoPlayers(Player player1, Player player2) {\n int[] com...
[ "0.76217735", "0.6674012", "0.6571949", "0.6541708", "0.63956547", "0.63350016", "0.6256916", "0.6250911", "0.6229086", "0.62171245", "0.6082178", "0.60247546", "0.60241103", "0.59958225", "0.5990334", "0.5990096", "0.5955136", "0.5949894", "0.59469765", "0.59237593", "0.5911...
0.61407113
10
Negative distance means to the left
public double getDistance(Player player) { double distanceFromPlayer1Perspective = player2.xPosition() - player1.xPosition(); double distanceFromPlayer2Perspective = player1.xPosition() - player2.xPosition(); return player.equals(player1) ? distanceFromPlayer1Perspective : distanceFromPlayer2Perspective; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getLeftDistance() {\n\t\treturn left.getDistance();\n\t}", "double getLeft(double min);", "public double getLeftDistance() {\n return leftEnc.getDistance();\n }", "public float getDistanceToLeftPivot() {\n return leftDist;\n }", "public double getLeft(double min) {\n re...
[ "0.6937346", "0.65456015", "0.650485", "0.6491883", "0.6225382", "0.6184568", "0.6144834", "0.61319214", "0.6119697", "0.6084312", "0.5949727", "0.59345233", "0.5909919", "0.58993703", "0.58894503", "0.58894235", "0.5833466", "0.58223426", "0.58148235", "0.5810474", "0.577491...
0.0
-1
=== Inner classes ========================================================
public interface VisibleObject { public final static int MIN_POSITION = 0; public final static int MAX_POSITION = TOTAL_ARENA_WIDTH; public int xPosition(); public int yPosition(); public boolean isBackGround(); public ImageIcon appearance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void visitInnerClass(\n String name,\n String outerName,\n String innerName,\n int access) {\n }", "public static void innerClassUsage() {\n final SimpleInterface.InnerClass<String> inner =\n new SimpleInterface.InnerClass<String>();\n }", "private voi...
[ "0.6486226", "0.6385246", "0.63286334", "0.6326051", "0.62779033", "0.5940272", "0.5914616", "0.58788294", "0.5830891", "0.58134514", "0.5732894", "0.5718922", "0.5697375", "0.56893563", "0.5677002", "0.5640807", "0.5636395", "0.56036603", "0.5572526", "0.55703765", "0.555630...
0.0
-1
Sets the adapter for the RecyclerView
private void setupRecyclerview() { mQuery = FirebaseDatabase.getInstance().getReference("reports").limitToLast(50).orderByKey(); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.sightings_master_recyclerview); mMyAdapter = new MyAdapter(mQuery, mAdapterItems, mAdapterKeys); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setAdapter(mMyAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRecyclerAdapter() {\n if (mRecyclerAdapter == null) {\n mRecyclerAdapter = new IssueResultsRecyclerAdapter(this, issueResult, mNation);\n mRecyclerView.setAdapter(mRecyclerAdapter);\n } else {\n ((IssueResultsRecyclerAdapter) mRecyclerAdapter).setConte...
[ "0.7902267", "0.7775255", "0.7584152", "0.7571758", "0.75031847", "0.7489901", "0.73929083", "0.73256516", "0.7304596", "0.7288665", "0.7248156", "0.7165755", "0.7112547", "0.7096207", "0.7087044", "0.7051122", "0.7043291", "0.70378333", "0.70329493", "0.6994776", "0.69554263...
0.6372833
58
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.profile) { // Handle the camera action } else if (id == R.id.map) { for (int i = 0; i < mAdapterItems.size(); i++) { mAdapterItems.get(i).setKey(mAdapterKeys.get(i)); } Intent intent = new Intent(getApplicationContext(), MapsActivity.class); intent.putExtra("REPORTS", mAdapterItems); startActivity(intent); } else if (id == R.id.graphs) { Intent intent = new Intent(getApplicationContext(), GraphsActivity.class); startActivity(intent); } else if (id == R.id.nav_manage) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224"...
0.0
-1
Draws an image but distorted
public static byte[] getDistort(String image, @Nullable Integer level) { if (level == null) level = 1; return RequestHandler.getBytes(BASE_URL + "distort?image=" + image + "&level=" + level, token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawImage(float x, float y, float width, float height);", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(a...
[ "0.6996539", "0.65409136", "0.64989394", "0.64684105", "0.6462", "0.6461889", "0.6369576", "0.63181293", "0.6317434", "0.62620825", "0.6257759", "0.6227098", "0.6213149", "0.6201731", "0.61925334", "0.61921287", "0.61915904", "0.6180742", "0.61712575", "0.6134984", "0.6131195...
0.0
-1
Draws a fiery border over an image
public static byte[] getFire(String image) { return RequestHandler.getBytes(BASE_URL + "fire?image=" + image, token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native MagickImage borderImage(Rectangle borderInfo)\n\t\t\tthrows MagickException;", "private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\...
[ "0.700199", "0.6430848", "0.63501084", "0.61547595", "0.60933733", "0.60858417", "0.6058814", "0.60389704", "0.60030305", "0.59289944", "0.59014416", "0.58986133", "0.58730245", "0.5869793", "0.5800393", "0.57993937", "0.5791511", "0.57191265", "0.57174397", "0.56879485", "0....
0.0
-1
Draws a image with sepia effect
public static byte[] getSepia(String image) { return RequestHandler.getBytes(BASE_URL + "sepia?image=" + image, token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sepia (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n for (int x = 0; x < xSize; x++)\n {\n for (int y = 0; y < ySize; y++)\n {\n ...
[ "0.706651", "0.70283514", "0.6693754", "0.6569192", "0.64508164", "0.6333661", "0.6322323", "0.62729967", "0.6200847", "0.61684895", "0.6136423", "0.61318576", "0.61019874", "0.60963005", "0.6075417", "0.60605067", "0.6059358", "0.60542065", "0.60527915", "0.6041868", "0.6008...
0.0
-1
Separate each information to get the one we want
public void map(Object key, Text value, Context context ) throws IOException, InterruptedException { String[] data = value.toString().split(";"); // The gender is in the second part of the data set String gender = data[1]; // Let's determine if the gender corresponds to a male and/or a female boolean isMale = gender.equals("m") || gender.equals("m,f") || gender.equals("f,m"); boolean isFemale = gender.equals("f") || gender.equals("m,f") || gender.equals("f,m"); // Let's write on both keys (male and female) the "boolean-to-IntWritable conversion" of the booleans context.write(new Text("male"), isMale ? one : zero); context.write(new Text("female"), isFemale ? one : zero); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final String [] getPersonalInfo(Object value) {\n int countInfo = 3; //Cound of the personal information fields\n String toString [] = new String[countInfo];\n //Extract some information\n toString[0] = (String) ((AbstractPerson) value).getFirstName();\n toString[1] = (String) ...
[ "0.5851415", "0.578488", "0.5738204", "0.57220715", "0.5708978", "0.5605824", "0.5458405", "0.5415183", "0.53626513", "0.5357653", "0.5330946", "0.53063804", "0.52406615", "0.52194166", "0.52029854", "0.52029854", "0.519607", "0.5190061", "0.5148022", "0.51383066", "0.5136712...
0.0
-1
Initialize the final sum and the total number of element with 0
public void reduce(Text key, Iterable<IntWritable> values, Context context ) throws IOException, InterruptedException { float sum = 0; float total = 0; // Let's browse the given values list for (IntWritable val : values) { // The current value is added to the final sum sum += val.get(); // The total number of elements is incremented ++total; } // The result is calculated as a percentage result.set(sum / total * 100); // The key is the given word, and the value is the percentage context.write(key, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Integer reduceInit() { return 0; }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public AccumulatorNumber ()\n\t{ total = 0.0; }", "public void clear() {\n\tn = 0;\n\tArrays.fill(sums, 0.0);\n\tArrays.fill(productsSums, 0.0);\n }", "@Override\r\n\tpublic long getTotal() {\n...
[ "0.6985835", "0.6908745", "0.68283755", "0.6553279", "0.6518615", "0.6445815", "0.6357455", "0.62182504", "0.6180349", "0.60922164", "0.60598433", "0.6036508", "0.60357064", "0.5996717", "0.59899884", "0.5971044", "0.5961324", "0.5950008", "0.59299374", "0.58803535", "0.58727...
0.0
-1
Text ip = new Text(); IntWritable one = new IntWritable(1);
public void map(Long key, Text value, MapContext<LongWritable, Text, Text, Text> context) throws IOException, InterruptedException{ // String line = value.toString(); // String[] tokens = line.split(" "); // ip.set(tokens[0]); context.write(new Text(String.valueOf(key)), value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t protected void map(Object key, Text value, \n\t Context context) throws IOException, InterruptedException {\n\t String[] strs = value.toString().split(\"\\\\s\");\n\t String label = strs[1];\n\t int id = Integer.parseInt(strs[0]);\n\t if(\"u\".equals(label)) {\n\t ...
[ "0.5518181", "0.5437973", "0.53378844", "0.5308986", "0.52528685", "0.5236871", "0.522287", "0.5220367", "0.5215585", "0.51947963", "0.51824975", "0.5169442", "0.5118153", "0.5098917", "0.5093082", "0.5050688", "0.5024315", "0.5021062", "0.49856082", "0.49777427", "0.4962773"...
0.5381583
2
/ Deserialize a string input
@Test(dataProvider = "getInputs") public final void patchOperationSerializationWorks(final JsonNode input) throws IOException { final String in = input.toString(); final JsonPatchOperation op = mapper.readValue(in, JsonPatchOperation.class); /* * Check that the class of the operation is what is expected */ assertSame(op.getClass(), c); /* * Now, write the operation as a String... */ final String out = mapper.writeValueAsString(op); /* * And read it as a JsonNode again, then test for equality. * * The reason we do that is that JSON does not guarantee the order of * object members; but JsonNode's .equals() method will correctly handle * this event, and we trust its .toString(). */ final JsonNode output = mapper.readTree(out); assertTrue(EQUIVALENCE.equivalent(input, output)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean deserialize(String inputString);", "public abstract T deserialize(String serial);", "InputStream deserialize(InputStream toDeserialize);", "public static Object deserialize(String s){\n\t\tObject m = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fileIn = new FileInputStream(s + \".ser\");\n\t\t\tObjec...
[ "0.73829025", "0.68142766", "0.6658004", "0.65227014", "0.63526815", "0.63039386", "0.6292593", "0.62489915", "0.6224358", "0.6194411", "0.61922216", "0.6190329", "0.6176669", "0.61679226", "0.61357653", "0.6110443", "0.6031282", "0.60191745", "0.5996935", "0.59927946", "0.59...
0.0
-1
Displays a message to the user, along with an 'OK'button. The program stops/hangs at the method call until the button is pressed.
public void showMessage(String msg) { boardController.showMessage(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n ...
[ "0.7300754", "0.69932055", "0.6959914", "0.6910304", "0.68973887", "0.6857938", "0.68240696", "0.67861915", "0.6774673", "0.6742506", "0.67040867", "0.66827077", "0.6680595", "0.66696143", "0.6611882", "0.6574463", "0.65268207", "0.65154815", "0.6512973", "0.65039635", "0.650...
0.0
-1
Displays a message to the user, and prompt the user for a text input. The text input cannot be empty, but may contain whitespace. Blocks/hangs until an input has been entered.
public @NotNull String getUserString(String msg) { return boardController.getUserString(msg, 1, Integer.MAX_VALUE, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void promptForInput(final String msg);", "public static String inputBox(String promptMsg) {\n return JOptionPane.showInputDialog(promptMsg);\n }", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(...
[ "0.7300724", "0.6942381", "0.66984946", "0.6685023", "0.6643173", "0.65782005", "0.65150815", "0.64448714", "0.6422831", "0.6396083", "0.6394768", "0.6287624", "0.6280703", "0.6206991", "0.6203851", "0.6194222", "0.61843634", "0.61778265", "0.61559683", "0.61547154", "0.61320...
0.0
-1
Displays a message to the user, and prompt the user for a text input with specific attributes (parameters). The method ensures that the returned string matches the given attributes. Blocks/hangs until an input has been entered.
public @NotNull String getUserString(String msg, int minLength, int maxLength, boolean allowWhitespace) { return boardController.getUserString(msg, minLength, maxLength, allowWhitespace); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void promptForInput(final String msg);", "protected abstract void fillPromptText();", "private static String getUserTextTyped () {\n\n\t\tBufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n\t\tBoolean loop = true;\n\t\tString text = \"\";\n\t\tdo {\n\t\t\ttry {\...
[ "0.6392274", "0.6365962", "0.614303", "0.5994609", "0.5981186", "0.5921702", "0.5900956", "0.5827819", "0.58118445", "0.58099836", "0.5803027", "0.57838464", "0.57758", "0.5698", "0.56687754", "0.56388265", "0.5633968", "0.5616163", "0.55990565", "0.5596972", "0.5580265", "...
0.0
-1
Prompts the user to enter any integer value between minValue and maxValue (both inclusive).
public int getUserInteger(String msg, int minValue, int maxValue) { return boardController.getUserInteger(msg, minValue, maxValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getValidInteger(int min, int max) {\n\n int userInput = getValidInteger();\n\n while (userInput < min || userInput > max) {\n System.out.printf(\"Please enter a number within %d and %d!\", min, max);\n userInput = getValidInteger();\n }\n\n return...
[ "0.7404665", "0.73856366", "0.7317922", "0.7210397", "0.7201217", "0.7155888", "0.69716823", "0.6946991", "0.6940788", "0.69301283", "0.68606883", "0.6809031", "0.6802817", "0.6793451", "0.67753494", "0.6688655", "0.6682549", "0.6648775", "0.6643441", "0.6621496", "0.6598778"...
0.62198085
38
Prompts the user to enter any integer value.
public int getUserInteger(String msg) { return boardController.getUserInteger(msg, Integer.MIN_VALUE, Integer.MAX_VALUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Integer getIntegerFromDialog(String prompt){\n Integer i = 0;\n while(true)\n {\n try\n {\n i = Integer.parseInt(JOptionPane.showInputDialog(prompt + \" \"));\n break;\n }\n catch(Exception e)\n ...
[ "0.7007779", "0.6989724", "0.69883925", "0.6959336", "0.68975484", "0.6884217", "0.6872849", "0.68657506", "0.6850413", "0.684604", "0.6820697", "0.67908853", "0.67642266", "0.67572993", "0.67367214", "0.6725623", "0.6711397", "0.67075354", "0.66994613", "0.66851676", "0.6678...
0.0
-1
Displays a message and prompt the user for a button press of a series of buttons. The buttons are defined by the number of strings passed as the 'buttons' parameters.
public String getUserButtonPressed(String msg, String... buttons) { for(int i = 0; i < buttons.length; i++){ buttons[i] = buttons[i].replace("\n", "<BR>"); } return boardController.getUserButtonPressed(msg, buttons); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.e...
[ "0.6724705", "0.6655695", "0.65982324", "0.6499995", "0.6434541", "0.63786536", "0.6303102", "0.6233583", "0.6149338", "0.613405", "0.6121688", "0.6093682", "0.607228", "0.6032497", "0.6009245", "0.5996639", "0.5989096", "0.5938446", "0.5922371", "0.59091634", "0.5905945", ...
0.682159
0
Displays a message to the user and awaits the dropdown response.
public String getUserSelection(String msg, String... options) { if (options==null || options.length==0){ throw new NullPointerException("You must supply at least one option!"); } msg = msg.replace("\n", "<BR>"); for(int i = 0; i < options.length; i++){ options[i] = options[i].replace("\n", "<BR>"); } return boardController.getUserSelection(msg, options).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void updateDropdown() {\n Msg.send(\"Updating Dropdown...\");\n messages.removeAllItems();\n //Populates the dropdown\n for (int j = 0; j < lines.size(); j++) {\n String messageStr = (String) lines.get(j);\n if (j < 10) {\n System.out.pr...
[ "0.6629254", "0.6110242", "0.60168505", "0.6002909", "0.5925075", "0.58012867", "0.57899487", "0.5786226", "0.5686429", "0.56756824", "0.56566465", "0.56513846", "0.5646279", "0.5613632", "0.55952543", "0.55886334", "0.55852526", "0.5583885", "0.55705965", "0.5568957", "0.555...
0.0
-1
Displays a message to the user, along with two buttons. Awaits a press on either button.
public boolean getUserLeftButtonPressed(String msg, String trueButton, String falseButton) { msg = msg.replace("\n", "<BR>"); trueButton = trueButton.replace("\n", "<BR>"); falseButton = falseButton.replace("\n", "<BR>"); return boardController.getUserButtonPressed(msg, trueButton, falseButton).equals(trueButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getSource() == button1){\n\t\tSystem.out.println(\"Why did the chicken cross the road.\");\n\t\t}\n\t\tif(arg0.getSource() == button2){\n\t\t\tSystem.out.println(\"`because he was to dumb to realize the grosrey store was the other way.\");\n...
[ "0.65867645", "0.6523732", "0.6473043", "0.62873596", "0.62571174", "0.62554955", "0.6237373", "0.62317896", "0.6227285", "0.62232006", "0.6206684", "0.6200641", "0.6151111", "0.61456925", "0.613775", "0.6108504", "0.6108504", "0.6106737", "0.60989875", "0.60953194", "0.60917...
0.0
-1
Displays two dice on the board with given values and fixed positions, and rotations. The positions are grid fields within the GUI window. The grid is 12x12, starting from index 0. Grid field 0,0 is upper right corner.
public void setDice(int faceValue1, int rotation1, int x1, int y1, int faceValue2, int rotation2, int x2, int y2) { boardController.setDice(faceValue1, rotation1, x1, y1, faceValue2, rotation2, x2, y2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }", "private void generate...
[ "0.632145", "0.6208754", "0.59642226", "0.5848965", "0.57965314", "0.57249844", "0.5721107", "0.55930436", "0.55787975", "0.55537087", "0.55501395", "0.5533442", "0.55251104", "0.5493835", "0.54934734", "0.5462301", "0.5431603", "0.541607", "0.5377384", "0.5366932", "0.535943...
0.57372856
5
Shows two dice on the board. The dice will have the specified values, but the placement is random.
public void setDice(int faceValue1, int x1, int y1, int faceValue2, int x2, int y2) { boardController.setDice(faceValue1, x1, y1, faceValue2, x2, y2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }", "public void Diceroll(...
[ "0.7086587", "0.67318016", "0.66267633", "0.653902", "0.650079", "0.63463956", "0.62642264", "0.6200749", "0.61295", "0.61089724", "0.60462075", "0.60046697", "0.60000265", "0.59886324", "0.5987427", "0.598659", "0.59839684", "0.59839296", "0.5962203", "0.594951", "0.594193",...
0.618672
8
Displays two dice on the board with the given values and a fixed rotation, at a random position on the board. If the dice value is not between 16, the dice won't be displayed. The method replaces the existing die/dice.
public void setDice(int faceValue1, int rotation1, int faceValue2, int rotation2) { boardController.setDice(faceValue1, rotation1, faceValue2, rotation2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }", "private static void r...
[ "0.6828889", "0.6389972", "0.6371458", "0.6349994", "0.6318127", "0.6225078", "0.61767393", "0.6105233", "0.6092081", "0.60907394", "0.60503566", "0.6007378", "0.5998414", "0.59803784", "0.59456575", "0.58994794", "0.58890325", "0.5880875", "0.5878505", "0.58238494", "0.57982...
0.6583427
1
Shows two dice on the board. The dice will have the specified values, but the placement is random.
public void setDice(int faceValue1, int faceValue2) { boardController.setDice(faceValue1, faceValue2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }", "public void Diceroll(...
[ "0.7085732", "0.6730061", "0.66259384", "0.6538146", "0.64995074", "0.63443613", "0.6262279", "0.6186516", "0.612808", "0.6108038", "0.6045263", "0.6003489", "0.5998541", "0.59881556", "0.5986941", "0.5985594", "0.5982208", "0.59813964", "0.59616995", "0.5948202", "0.5941667"...
0.6200599
7
Displays one die with the given value, at a random position on the board. If two dice were displayed prior to calling the method, the other die will be hidden.
public void setDie(int faceValue) { boardController.setDie(faceValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }", "private void displayD...
[ "0.6935277", "0.69195604", "0.6893159", "0.674694", "0.6534624", "0.61287963", "0.61074907", "0.60917115", "0.6043072", "0.59832126", "0.5888697", "0.5849178", "0.5848193", "0.58366495", "0.5825146", "0.58239406", "0.5810696", "0.57970524", "0.5791739", "0.5775566", "0.576155...
0.58622026
11
Closes the GUI window, and the stops the thread it runs on.
public void close(){ this.boardController.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}", "public synchronized v...
[ "0.75766164", "0.7514746", "0.72788566", "0.72540426", "0.7160634", "0.71257573", "0.7081706", "0.7070941", "0.6975636", "0.6789239", "0.6779696", "0.6766072", "0.67214274", "0.6708025", "0.66563", "0.6652798", "0.66413575", "0.6619703", "0.66090137", "0.659888", "0.659888", ...
0.0
-1
Checks wheter null fields are allowed, when creating a new GUI with custom fields.
public static boolean isNull_fields_allowed() { return null_fields_allowed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }", "public static void setNull_fields_allowed(boolean allowed) {\n GUI.null_fields_allowed...
[ "0.7141544", "0.6925086", "0.6899168", "0.6628446", "0.64352167", "0.64165485", "0.640856", "0.6398555", "0.6386912", "0.6365748", "0.6344304", "0.63159233", "0.62303305", "0.622036", "0.62050223", "0.6199239", "0.61954945", "0.60853094", "0.6052214", "0.6051663", "0.6023764"...
0.6954395
1
Toggle whether null fields should be allowed or not, when creating a new GUI with custom fields (the value null is allowed in the GUI_Field array passed to the GUI object). Null fields will be displayed as empty squares. Note that this has to be called BEFORE creating a GUI with null fields. However, it's NOT recommended to have null fields, since moving accessing the fields (including moving a car to a field will throw a null pointer exception.
public static void setNull_fields_allowed(boolean allowed) { GUI.null_fields_allowed = allowed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setFieldsEmpty(){\n nameInput.setText(\"\");\n frontTrackInput.setText(\"\");\n cornerWeightFLInput.setText(\"\");\n cornerWeightRLInput.setText(\"\");\n rearTrackInput.setText(\"\");\n cornerWeightRRInput.setText(\"\");\n cornerWeightFRInput.setText(\"...
[ "0.643495", "0.63610506", "0.6339776", "0.6160287", "0.61400974", "0.60965574", "0.59085333", "0.58386815", "0.5829064", "0.58067685", "0.5793416", "0.57814693", "0.5750558", "0.570169", "0.5671026", "0.5663229", "0.5622075", "0.5611905", "0.5569821", "0.5552332", "0.5542868"...
0.723817
0
// CONSTRUCTOR // //
public Book(String title, String author, String genre, int numPage) { this.title = title; this.author = author; this.genre = genre; this.numPage = numPage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Overrid...
[ "0.88816553", "0.84297043", "0.7377159", "0.7243511", "0.7243511", "0.7243511", "0.7243511", "0.7243511", "0.7227864", "0.72274166", "0.72187424", "0.7189908", "0.718198", "0.718198", "0.71680266", "0.71660227", "0.71585035", "0.71575594", "0.71575594", "0.7151547", "0.713344...
0.0
-1
// METHODS // //
public void read() { this.isRead = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t...
[ "0.6035143", "0.60005194", "0.598969", "0.5954627", "0.59542996", "0.58803856", "0.5847885", "0.5826341", "0.57435644", "0.5737601", "0.5732004", "0.5721062", "0.568634", "0.568634", "0.56850344", "0.56833434", "0.56833434", "0.56616175", "0.56578565", "0.56434584", "0.562639...
0.0
-1
public static UserModel currentUser; //New changes private static final int RESULT_PROFILE_ACTIVITY = 1;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); FloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Did you just clicked here", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); drawer = findViewById(R.id.drawer_layout); NavigationView navigationView = findViewById(R.id.nav_view); //nav header views View headerView = navigationView.getHeaderView(0); navUserProfile = (TextView) headerView.findViewById(R.id.tv_profile); navUsername = (TextView) headerView.findViewById(R.id.profileName); navUserBalance = (TextView) headerView.findViewById(R.id.balance); if(RetrofitUrl.token.equals("Bearer ")){ Intent backtoLogin = new Intent(this, LoginActivity.class); startActivity(backtoLogin); deleteSavedUser(); finish(); } else { getUserProfile(); } // If MainActivity is reached without the user being logged in, redirect to the Login // Activity // if (AccessToken.getCurrentAccessToken() == null) { // Intent loginIntent = new Intent(MainActivity.this, LoginActivity.class); // startActivity(loginIntent); // } // // // Make a button which leads to profile information of the user // if (AccessToken.getCurrentAccessToken() == null) { // Intent profileIntent = new Intent(MainActivity.this, LoginActivity // .class); // startActivityForResult(profileIntent, RESULT_PROFILE_ACTIVITY); // } else { //// Intent profileIntent = new Intent(MainActivity.this, ProfileActivity.class); //// startActivity(profileIntent); // } // Passing each menu ID as a set of Ids because each // menu should be considered as top level destinations. mAppBarConfiguration = new AppBarConfiguration.Builder( R.id.nav_home, R.id.nav_market, R.id.nav_portfolio, R.id.nav_leaderboard, R.id.nav_history, R.id.nav_share, R.id.nav_logout) .setDrawerLayout(drawer) .build(); NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment); NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration); NavigationUI.setupWithNavController(navigationView, navController); navigationView.getMenu().findItem(R.id.nav_logout).setOnMenuItemClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the...
[ "0.6598881", "0.65111107", "0.63502455", "0.6333804", "0.6276474", "0.62614965", "0.62220186", "0.6165122", "0.6158462", "0.61288464", "0.61126184", "0.6040308", "0.60211426", "0.60065824", "0.5962857", "0.59562975", "0.5937941", "0.59141785", "0.58866084", "0.58830327", "0.5...
0.0
-1
Getting logged in user profile
public UserModel getUserProfile(){ UserAPI userAPI = RetrofitUrl.getInstance().create(UserAPI.class); Call<UserModel> usersCall = userAPI.getUserProfile(RetrofitUrl.token); usersCall.enqueue(new Callback<UserModel>() { @Override public void onResponse(Call<UserModel> call, Response<UserModel> response) { if(!response.isSuccessful()){ Toast.makeText(MainActivity.this, "Error loading profile!!", Toast.LENGTH_SHORT).show(); return; } userProfile = response.body(); showdetail(userProfile.getFullName()); getBalanceDetail(userProfile); refresh(5000); } @Override public void onFailure(Call<UserModel> call, Throwable t) { Toast.makeText(MainActivity.this, "Error loading profile...", Toast.LENGTH_SHORT).show(); } }); return userProfile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }", "Map<String, Object> getUserProfile();", "public UserProfile getUserProfile(String username);", "private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n retur...
[ "0.7694791", "0.76941776", "0.76726663", "0.76546067", "0.76346815", "0.7586873", "0.7390657", "0.7292621", "0.72562236", "0.72230536", "0.7161092", "0.71567816", "0.71263444", "0.7104036", "0.7094186", "0.7085104", "0.7056165", "0.70513415", "0.70327836", "0.7017148", "0.690...
0.0
-1
Changing the content of nav header
public void showdetail(String name){ navUserProfile.setText(name.charAt(0)+ ""); navUsername.setText(name+""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"www.ashish.jain@gmail.com\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }", "private void updateHeader() {\n this.mViewHolder.imageV...
[ "0.72160995", "0.68120235", "0.66962785", "0.6610265", "0.65178674", "0.64358", "0.6417057", "0.6344799", "0.61881995", "0.615705", "0.60951525", "0.60350317", "0.59164137", "0.5903322", "0.5903322", "0.5897654", "0.5852403", "0.58340615", "0.5810837", "0.57207024", "0.566832...
0.0
-1
for refreshing the activity every 5 second
public void refresh(int milliseconds){ final Handler handler = new Handler(); final Runnable runnable = new Runnable() { @Override public void run() { getUserProfile(); } }; handler.postDelayed(runnable, milliseconds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void refresh() {\n\t\thandler.postDelayed(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopRefresh();\n\t\t\t}\n\t\t}, 2000);\n\t\t\n\t}", "private void doTheAutoRefresh() {\n handler.postDela...
[ "0.7226931", "0.7109235", "0.71057403", "0.707184", "0.7068359", "0.70034194", "0.69403666", "0.69337994", "0.6726047", "0.6718814", "0.671832", "0.67003864", "0.66348946", "0.6618472", "0.66104656", "0.6610162", "0.6541083", "0.6508584", "0.6489523", "0.64165664", "0.6413663...
0.67688394
8
mengeset data berdasarkan data dari along yang dikirim memalui viewModel
@Override public void onChanged(Long aLong) { String newText= MainActivity.this.getResources().getString(R.string.seconds, aLong); ((TextView) findViewById(R.id.timer_textview)).setText(newText); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setData(List<Person> data);", "DataModel getDataModel ();", "public String setData() {\r\n\r\n\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tmodel.setData(vendorMaster);\r\n\t\tmodel.terminate();\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn \"Data\";\...
[ "0.63106096", "0.62880135", "0.6170783", "0.6168705", "0.6167639", "0.60372496", "0.59932846", "0.5939017", "0.5927223", "0.5915886", "0.5912264", "0.5904973", "0.5890082", "0.5860823", "0.58601594", "0.58580554", "0.58499676", "0.58464503", "0.581077", "0.57987666", "0.57961...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof DocumentType)) { return false; } DocumentType other = (DocumentType) object; if ((this.documentTypeId == null && other.documentTypeId != null) || (this.documentTypeId != null && !this.documentTypeId.equals(other.documentTypeId))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896825", "0.6838604", "0.6705561", "0.66422164", "0.66422164", "0.65926504", "0.6579192", "0.6579192", "0.65745574", "0.65745574", "0.65745574", "0.65745574", "0.65745574", "0.65745574", "0.6562735", "0.6562735", "0.6544228", "0.6524609", "0.65156776", "0.64875734", "0.64...
0.0
-1
The main method of the test class provide instances of both the array and the list implementations of the interface.
public static void main(String[] args) throws SMSDataModelFullException { SMSDataModelInterface sms; String[] phoneNums = {"1111", "2222", "3333", "4444"}; //******************************************** // TEST NO ARGS CONSTRUCTOR System.out.println("NO ARGS CONSTRUCTOR WITH NO LIMIT TO PHONE NUMBERS"); //sms = new SMSDataModelArray(); // Implement the interface as an Array. sms = new SMSDataModelList(); // Implement the interface as a List. // Populate the List with 50 strings to show the list has no limit. // Uncomment just when the List is used. for(int i=0; i<50; i++){ sms.addPhoneNumber("ale"+i); } System.out.println(sms); //******************************************** // TEST MESSAGE ONLY CONSTRUCTOR System.out.println("\nMESSAGE ONLY CONSTRUCTOR"); String message = "Hello!!!"; //sms = new SMSDataModelArray(message); // Implement the Interface as an Array. sms = new SMSDataModelList(message); // Implement the Interface as a List. System.out.println(sms); //******************************************* // TEST ALL ARGS CONSTRUCTOR System.out.println("\nALL ARGS CONSTRUCTOR"); String initMessage = "Good Morning!"; int maxPhoneNo = 5; //sms = new SMSDataModelArray(initMessage, maxPhoneNo); // Implement the Interface as an Array. sms = new SMSDataModelList(initMessage, maxPhoneNo); // Implement the Interface as a List. System.out.println(sms); //******************************************* // TEST METHOD addPhoneNumber System.out.println("\nTEST METHOD addPhoneNumber: ADD 4 NUMBERS -- ADD A DUPLICATE / ADD FIFTH NUMBER / ARRAY IS FULL"); for (String phoneNum : phoneNums) { sms.addPhoneNumber(phoneNum); } System.out.println(sms); // Trying adding a duplicate System.out.println("Add 1111: " + sms.addPhoneNumber("1111")); System.out.println(sms); // Adding another valid number to fill up the array/list System.out.println("Add 5555: " + sms.addPhoneNumber("5555")); System.out.println(sms); // Trying adding one more number but the array/list is full String numToAdd = "0000"; try{ sms.addPhoneNumber(numToAdd); }catch(SMSDataModelFullException e){ System.out.println("Add " + numToAdd + ": FULL"); } // System.out.println("Add extra: " + sms.addPhoneNumber("0000")); System.out.println(sms); //******************************************** // TEST METHOD findPhoneNumberIndex System.out.println("\nTEST METHOD findPhoneNumberIndex -- NUMBER IN ARRAY or LIST/ NUMBER NOT IN ARRAY or LIST"); // numToFind is part of the array/list String numToFind = "5555"; int numAtIndex; numAtIndex = sms.findPhoneNumberIndex(numToFind); System.out.println("The number " + numToFind + " is at index " + numAtIndex); // numToFind is not in the array/list numToFind = "0000"; numAtIndex = sms.findPhoneNumberIndex(numToFind); System.out.println("The number " + numToFind + " is at index " + numAtIndex); //******************************************** // TEST METHOD updatePhoneNumber System.out.println("\nTEST METHOD updatePhoneNumber -- INDEX < 0 / INDEX > ARRAY or LIST LENGTH / INDEX = 0 / DUPLICATE"); String result; String newNum = "0000"; // The position required is below 0 int i = -1; result = "Update: " + sms.updatePhoneNumber(newNum, i); System.out.println(result); // The position required is above the array/list length i = 5; result = "Update: " + sms.updatePhoneNumber(newNum, i); System.out.println(result); // The position required is at index 0 i = 0; result = "Update: " + sms.updatePhoneNumber(newNum, i); System.out.println(result); // The update would result in a duplicate newNum = "2222"; result = "Update: " + sms.updatePhoneNumber(newNum, i); System.out.println(result); System.out.println(sms); //********************************************* // TEST METHOD getPhoneNumber System.out.println("\nTEST METHOD getPhoneNumber -- INDEX < 0 / INDEX > ARRAY or LIST LENGTH / INDEX = 0"); // Index is negative i = -1; result = sms.getPhoneNumber(i); System.out.println("The number at position " + i + " is " + result); // Index is bigger than array/lisst length i = 10; result = sms.getPhoneNumber(i); System.out.println("The number at position " + i + " is " + result); // Index = 0 i = 0; result = sms.getPhoneNumber(i); System.out.println("The number at position " + i + " is " + result); //******************************************** // TEST METHOD deleteNumber System.out.println("\nTEST METHOD deleteNumber -- INDEX < 0 / INDEX > ARRAY or LIST LENGTH / INDEX = 0"); // Index is negative i = -1; result = sms.deleteNumber(i); System.out.println("Delete " + result); // Index is bigger than array/list length i = 10; result = sms.deleteNumber(i); System.out.println("Delete " + result); // Index = 0 i = 0; result = sms.deleteNumber(i); System.out.println("Delete " + result); // new array/list System.out.println(sms); //****************************************** // TEST METHOD getMaxPhoneNumber System.out.println("\nTEST METHOD getMaxPhoneNumber"); int maxNums = sms.getMaxNumPhoneNumbers(); System.out.println("Max Phone Number: " + maxNums); //****************************************** // TEST METHOD isFull System.out.println("\nTEST METHOD isFull"); // Array/List not full System.out.println("Array/List at this stage: " + sms); boolean boolFull = sms.isFull(); System.out.println("Array/List full: " + boolFull); // Array/Listfull sms.addPhoneNumber("1111"); System.out.println("Array/List after adding one more phone number: " + sms); boolFull = sms.isFull(); System.out.println("Array/Listfull: " + boolFull); //****************************************** // TEST METHOD getMessage System.out.println("\nTEST METHOD getMessage"); String daMessage; daMessage = sms.getMessage(); System.out.println("Message: " + daMessage); //****************************************** // TEST METHOD setMessage System.out.println("\nTEST METHOD setMessage WITH MESSAGE 'GOOD AFTERNOON!'"); sms.setMessage("Good Afternoon!"); System.out.println("Message: " + sms.getMessage()); //****************************************** // TEST METHOD getPhoneNumbers System.out.println("\nTEST METHOD getPhoneNumbers"); String[] currentNumbers = sms.getPhoneNumbers(); for(String curNum : currentNumbers){ System.out.println(curNum); } //***************************************** // TEST METHOD getNumPhoneNumbers System.out.println("\nTEST METHOD getNumPhoneNumbers"); int numPhoneNumbers = sms.getNumPhoneNumbers(); System.out.println("The number of phone numbers is: " + numPhoneNumbers); //***************************************** // TEST METHOD sortNumbers. Exception expected System.out.println("\nTEST METHOD sortNumbers -- TWO VERSIONS -- check code"); System.out.println("BEFORE: " + sms); sms.sortNumbers(); System.out.println("AFTER: " + sms); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tListTest lt = new ListTest();\r\n\r\n\t\tlt.testAdd();\r\n\t\tlt.testIterator();\r\n\r\n\t}", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.test...
[ "0.6841873", "0.6806651", "0.67848957", "0.6771904", "0.67406577", "0.6706758", "0.643637", "0.6396827", "0.6380296", "0.63479704", "0.6301344", "0.62407225", "0.6180963", "0.60770726", "0.60493666", "0.6035603", "0.601311", "0.6009244", "0.5995287", "0.59949476", "0.59851813...
0.5903407
24
Created by amedishetti on 07062018.
@Dao public interface RepoDao { @Query("SELECT * from repo ORDER BY env ASC") public LiveData<List<Repo>> getAllRepos(); @Insert(onConflict = OnConflictStrategy.REPLACE) public void insert(Repo repo); @Query("SELECT * FROM repo ORDER BY env ASC") public List<Repo> getRepos(); /* @Query("DELETE FROM repo") void deleteAll(); */ @Query("SELECT env,repository_name,domain_name from repo where env like:env") public Repo getRepo(String env); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.60238326", "0.5779136", "0.56856143", "0.5656922", "0.5649164", "0.56172234", "0.56172234", "0.56128967", "0.55868095", "0.55859", "0.5583799", "0.5567923", "0.5550495", "0.55128247", "0.55113447", "0.5495829", "0.5492461", "0.54808474", "0.5473826", "0.5463142", "0.545939...
0.0
-1
Load strategy correpsonding to the given strategy type
public static <DataType> GraphMappingStrategy<DataType> loadStrategyFor(StrategyType strategy, Class<DataType> containedClass, PropertyProvider propertyProvider, Migrator migrator) { switch(strategy) { case beanBased: return new BeanBasedMappingStrategy<DataType>(containedClass, propertyProvider, migrator); default: throw new UnsupportedOperationException("the StrategyType "+strategy.name()+" is not yet supported"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StrategyType type();", "private StrategyType getStrategyType(String type) throws Exception {\n switch (type) {\n case \"greedy\":\n return StrategyType.GREEDY;\n case \"careful\":\n return StrategyType.CAREFUL;\n case \"tactical\":\n ...
[ "0.6831707", "0.64137983", "0.5782619", "0.5741465", "0.567852", "0.5614784", "0.55496407", "0.5501963", "0.54375374", "0.5404282", "0.53787386", "0.5313487", "0.528649", "0.5213495", "0.5204899", "0.5139923", "0.50937706", "0.5060906", "0.50348896", "0.5014932", "0.5010629",...
0.61884373
2
Extract cascade mode of available JPA annotations
public static Collection<CascadeType> extractCascadeOfJPAAnnotations(Property p) { Collection<CascadeType> mapping = null; if (p.getAnnotation(OneToOne.class) != null) { mapping = GraphUtils.extractCascadeOf(p.getAnnotation(OneToOne.class).cascade()); } else if (p.getAnnotation(OneToMany.class) != null) { mapping = GraphUtils.extractCascadeOf(p.getAnnotation(OneToMany.class).cascade()); } else if (p.getAnnotation(ManyToMany.class) != null) { mapping = GraphUtils.extractCascadeOf(p.getAnnotation(ManyToMany.class).cascade()); } else if (p.getAnnotation(ManyToOne.class) != null) { mapping = GraphUtils.extractCascadeOf(p.getAnnotation(ManyToOne.class).cascade()); } else { if(!p.hasModifier(Modifier.STATIC) && !p.hasModifier(Modifier.TRANSIENT)) mapping = GraphUtils.extractCascadeOf(new CascadeType[] {CascadeType.ALL}); } return mapping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cascade createCascade();", "@Nullable\n\tprivate TypeInformation<?> detectAssociationTargetType() {\n\n\t\tif (!isAssociation()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (Class<? extends Annotation> annotationType : ASSOCIATION_ANNOTATIONS) {\n\n\t\t\tAnnotation annotation = findAnnotation(annotationType);\n\n\t\...
[ "0.60835767", "0.5899756", "0.56668055", "0.5212066", "0.5055953", "0.5004674", "0.50022113", "0.49973476", "0.49940032", "0.48949006", "0.48802882", "0.48291582", "0.4821884", "0.47504166", "0.47467488", "0.4746143", "0.4744576", "0.4744576", "0.47345898", "0.47315502", "0.4...
0.7193871
0
Get map linking properties to their respective cascading informations
public static Map<Property, Collection<CascadeType>> getBeanPropertiesFor(PropertyProvider provider, Class<?> searchedClass, Migrator migrator) { Map<Property, Collection<CascadeType>> returned = new TreeMap<Property, Collection<CascadeType>>(new ComparePropertyByNameAndDeclaringClass()); Property[] properties = PropertyProviderUtils.getAllProperties(provider, searchedClass); for (Property p : properties) { returned.put(p, extractCascadeOfJPAAnnotations(p)); } // And, if class is the contained one, add the (potential) Migrator // property if (migrator != null) { // Migrator has no cascade to be done on returned.put(migrator.getMigratorProperty(returned.keySet()), new LinkedList<CascadeType>()); } return returned; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map getProperties();", "Map<String, List<List<Attribution>>> getAttributionMap();", "public static Map<String, Property> getDefaultMapping() {\n\t\tMap<String, Property> props = new HashMap<String, Property>();\n\t\tprops.put(\"nstd\", Property.of(p -> p.nested(n -> n.enabled(true))));\n\t\tprops.put(\"...
[ "0.63035667", "0.58693796", "0.581183", "0.56620216", "0.5618755", "0.56000394", "0.55935806", "0.55198026", "0.55042917", "0.54779744", "0.54356384", "0.54269314", "0.5411783", "0.54089606", "0.54089606", "0.54037803", "0.54026604", "0.53788924", "0.53788924", "0.53583735", ...
0.0
-1
/ Method Name: pencil it is a synchronized method which calls another synchronized method pen
public synchronized int pencil() throws InterruptedException { Thread.currentThread().destroy(); return 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void synchronize(){ \r\n }", "public void lock() {\n\n }", "public synchronized int pen() throws InterruptedException {\n\t\treturn 3*pencil();\n\t}", "void lock();", "@Override\n public void callSync() {\n\n }", "public void lock() {\r\n super.lock();\r\n }", "public v...
[ "0.6401417", "0.6357337", "0.62274206", "0.60939366", "0.5958272", "0.58400697", "0.5753854", "0.5753854", "0.5753854", "0.5656492", "0.5653151", "0.56414616", "0.55893487", "0.5586908", "0.5574565", "0.5559324", "0.5542775", "0.55393654", "0.55300623", "0.5518583", "0.550206...
0.52042323
55
/ Method Name: pen it is a synchronized method which calls another synchronized method pencil
public synchronized int pen() throws InterruptedException { return 3*pencil(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void synchronize(){ \r\n }", "public void lock() {\n\n }", "void lock();", "@Override\n public void callSync() {\n\n }", "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n ...
[ "0.69355917", "0.6777914", "0.65452754", "0.6489162", "0.6255831", "0.61767584", "0.61767584", "0.61767584", "0.6175162", "0.61224276", "0.59709203", "0.5887047", "0.58459", "0.57926714", "0.5765353", "0.5749715", "0.5736454", "0.57009697", "0.5689505", "0.56680673", "0.56571...
0.57552856
15
triggered A triggered A can not be assigned! triggered A > default B
public interface Rule { String getTargetedPropertyName(); boolean hasFinished(); Object nextValue(); Object[] getValues(); public void setValues(Object[] values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setTriggerOrAction();", "private boolean triggered() {\n\t\treturn true;\n\t}", "public void triggerPickedUp(boolean b);", "protected abstract void createTriggerOrAction();", "boolean isAlreadyTriggered();", "public T caseDefaultTrigger(DefaultTrigger object) {\r\n\t\treturn null;\r\...
[ "0.654387", "0.60436356", "0.5971748", "0.57526696", "0.5708164", "0.56601727", "0.5595905", "0.55618924", "0.5558992", "0.54635566", "0.54288214", "0.5407859", "0.529434", "0.5280621", "0.52458745", "0.5241803", "0.524106", "0.52410567", "0.52173245", "0.5191708", "0.5191708...
0.0
-1
It is assumed that the handler always returns RestException. It happens because the original callback passed into the handler is wrapped into com.linkedin.restli.internal.server.RestLiCallback. It is possible the callback is not wrapped and other exceptions are returned (e.g. com.linkedin.restli.server.RestLiServiceException). This is considered either a programmers mistake or a runtime exception.
@Override public void onError(Throwable e) { if (e instanceof RestException) { promise.done(((RestException) e).getResponse()); } else { promise.fail(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Response callback() throws Exception;", "private void onCallbackException(Exception e) {\n CallbackException streamError =\n new CallbackExceptionImpl(\"CalledByNative method has thrown an exception\", e);\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in CalledByNative ...
[ "0.6899247", "0.6048838", "0.6004815", "0.5959792", "0.58691186", "0.5808198", "0.57160234", "0.57044595", "0.5689453", "0.5671399", "0.5671399", "0.56648886", "0.565489", "0.565489", "0.564386", "0.564386", "0.56354785", "0.5629329", "0.56210345", "0.55916035", "0.55891675",...
0.609606
1
called internally when the transfer has naturally finished or externally to stop transfer either because the target we upload to has the file already (success) or we are out of range (failure)
synchronized public void stopTransfer(boolean success, boolean callContinuation) { if (!stopped) { stopped = true; if (isDownload) if (success) { // solidify download File targetFile = new File(targetName); if (targetFile.exists()) targetFile.delete(); tempFile.renameTo(targetFile); } else { // clean up if (tempFile != null) tempFile.delete(); } if (callContinuation && continuation != null) if (success) { continuation.notifyFinished(this); } else { continuation.notifyFailed(this); } } localPeer.getTransferManager().notifyTransferCompleted(this, success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void uploadFailed() {\n }", "@Override\n\tpublic void transferFile() throws Exception {\n\t\tnew Thread(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"开始上传\");\n\t\t\t...
[ "0.6382338", "0.6295423", "0.6257901", "0.62248015", "0.6192531", "0.6165132", "0.6120853", "0.61153513", "0.60694706", "0.60488486", "0.6046764", "0.60331434", "0.6015478", "0.5972028", "0.5910635", "0.5893436", "0.58231556", "0.58129317", "0.5809334", "0.58043003", "0.58014...
0.6316063
1
We have square field
void DrawEpizode(Canvas c){ PointSize = c.getWidth()/Logic.getInstance().GameDeskSize; c.drawColor(Color.BLACK); floor_bitmap = Bitmap.createScaledBitmap(floor_bitmap, (int)PointSize,(int)PointSize,false); wall_bitmap = Bitmap.createScaledBitmap(wall_bitmap, (int)PointSize,(int)PointSize,false); point_bitmap = Bitmap.createScaledBitmap(point_bitmap, (int)PointSize,(int)PointSize,false); for (int i = 0; i < Logic.getInstance().GameDeskSize; i++){ for(int j = 0; j < Logic.getInstance().GameDeskSize; j++){ int State =Logic.getInstance().gamefield[i][j].getState(); if(State>=40){ State = Logic.getInstance().Gosts.Gosts.get(State-40).my_point_state; } switch (State) { case 0: //c.drawRect(i*PointSize, j*PointSize,i+1*PointSize, j+1*PointSize ,new Paint()); c.drawBitmap(floor_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); break; case 1: c.drawBitmap(floor_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); c.drawBitmap(point_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); break; case 2: c.drawBitmap(floor_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); case 3: c.drawBitmap(floor_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); c.drawBitmap(wall_bitmap,(i*(PointSize)),(j*(PointSize)),new Paint()); break; default: break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract GF2nElement square();", "public abstract float getSquareSize();", "public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }", "public boolean isSquare()\n {\n return width == height...
[ "0.70917547", "0.676475", "0.6701436", "0.6499219", "0.6435115", "0.6314309", "0.61445296", "0.5956311", "0.5953276", "0.59178394", "0.5859583", "0.5833468", "0.58294183", "0.5823289", "0.5811505", "0.5785745", "0.5775915", "0.5760396", "0.575872", "0.57485515", "0.5739398", ...
0.0
-1
a good catch: use String "x_y" to represent a line
public int gcd(int a, int b) { int result; if (a > 0) { result = gcd(b % a, a); } else { result = b; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makePoint(String x, String y) {\n List<String> decX = putDecimal(x);\n List<String> decY = putDecimal(y);\n\n //for every string value x check if its valid, if it is, find a valid y coordinate\n for (String dx : decX) {\n if (isValid(dx)) {\n for (S...
[ "0.65033484", "0.63722086", "0.6319006", "0.6306785", "0.62813365", "0.62495416", "0.6229152", "0.6225347", "0.61340564", "0.6057263", "0.6047499", "0.6028142", "0.5993631", "0.59546757", "0.5953619", "0.59340763", "0.5932017", "0.593039", "0.5921325", "0.5919034", "0.5900557...
0.0
-1
/ access modifiers changed from: private
public String c(String str) { String str2; String str3 = null; if (TextUtils.isEmpty(str)) { return null; } try { String host = Uri.parse(str).getHost(); String aBTestValue = TUnionTradeSDK.getInstance().getABTestService().getABTestValue("config"); if (!TextUtils.isEmpty(aBTestValue)) { String optString = new JSONObject(aBTestValue).optString("domain"); TULog.d("abTestRequestUrl, url: " + str + " host: " + host + " domains: " + optString, new Object[0]); if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(optString)) { JSONArray jSONArray = new JSONArray(optString); if (jSONArray.length() > 0) { int length = jSONArray.length(); int i = 0; while (true) { if (i >= length) { break; } else if (host.contains(jSONArray.getString(i))) { String encode = URLEncoder.encode(str, "utf-8"); try { TULog.d("abTestRequestUrl, loginJumpUrl :" + str2, new Object[0]); } catch (Exception unused) { } str3 = str2; break; } else { i++; } } } } } } catch (Exception unused2) { } return str3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104...
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.60593...
0.0
-1
Creates int variable for size and creates scanner object
public static void main(String[] args) { int size; Scanner input = new Scanner(System.in); System.out.println("Enter the size of the matrix: "); //Inputs size values size = input.nextInt(); //Inputs the numbers entered into the matrix int matrix[][] = new int[size][size]; System.out.println("Enter numbers into the matrix row-by-row: "); for (int i=0; i<size; i++) { for(int j=0; j<size; j++) { matrix[i][j] = input.nextInt(); } } //Prints original matrix System.out.println("Original matrix"); for(int i=0; i<size; i++) { for(int j=0; j<size; j++) { System.out.print(matrix[i][j]+ " "); } System.out.println(); } //Prints the transpose of the matrix System.out.println("Transpose of the matrix:"); for(int i=0; i<size; i++) { for(int j=0; j<size; j++) { System.out.print(matrix[j][i]+ " "); } System.out.println(); } input.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSize() {\r\n\t\tif (intScanner.hasNextInt()) {\r\n\t\t\tint trySize = intScanner.nextInt();\r\n\t\t\tif (trySize > 0) {\r\n\t\t\t\tsize = trySize;\r\n\t\t\t\tSystem.out.println(\"The size will be \" + size);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Please use a number greater than ...
[ "0.55472684", "0.55416703", "0.55300504", "0.5478043", "0.5428852", "0.5373254", "0.53642535", "0.53538144", "0.53463477", "0.5308896", "0.5282038", "0.52813214", "0.52797776", "0.525777", "0.5254219", "0.5250222", "0.5250029", "0.52413154", "0.51927465", "0.51891494", "0.518...
0.0
-1
String id , amount , uid , productList, date ;
@Override public void onComplete(@NonNull Task<Void> task) { DatabaseReference st = FirebaseDatabase.getInstance().getReference("packagePurchasedList").child(key); final modelForProductPurchageDb model = new modelForProductPurchageDb(key , price.getText().toString(),uid , title.getText().toString() , DATE ) ; st.setValue(model).addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { DatabaseReference my = FirebaseDatabase.getInstance().getReference("profile").child(uid).child("mypackageList"); my.child(key).setValue(model).addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { final DatabaseReference my = FirebaseDatabase.getInstance().getReference("profile").child(uid).child("mypackageList"); final DatabaseReference myf = FirebaseDatabase.getInstance().getReference("profile").child(uid).child("runningBundle"); myf.setValue("package") ; my.child("packageValue").setValue(price.getText().toString()) ; my.child("packagePercent").setValue(Type) ; DatabaseReference mmy = FirebaseDatabase.getInstance().getReference("profile").child(uid) ; mmy.child("activatingDate").setValue(DATE) ; mmy.child("status").setValue("active") ; my.child("Packgetype").setValue("activated").addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { my.child("packageDate").setValue(DATE) ; new AwesomeSuccessDialog(PackageDetailsActivity.this) .setTitle("Purchase Was Successful!!") .setMessage("You Received your Package ") .setColoredCircle(R.color.dialogSuccessBackgroundColor) .setDialogIconAndColor(R.drawable.ic_dialog_info, R.color.white) .setCancelable(false) .setPositiveButtonText(getString(R.string.dialog_yes_button)) .setPositiveButtonbackgroundColor(R.color.dialogSuccessBackgroundColor) .setPositiveButtonTextColor(R.color.white) .setPositiveButtonClick(new Closure() { @Override public void exec() { //click finish(); } }) .show(); } }) ; } }) ; } }) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<transactionsProducts> purchasedProducts();", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tString s = ShareMemManager.getInstance().readFromDB(mContext, \"productOrder\");\n\t\t\t\t\tString lstPriceInfo2;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlstPriceInfo2 = lineSource.getString(\"PriceInfo\");\n\t...
[ "0.6212357", "0.5979395", "0.5695977", "0.56130385", "0.5591666", "0.554871", "0.5535635", "0.55325747", "0.5530707", "0.5528611", "0.5524818", "0.5519201", "0.5518704", "0.5510993", "0.5503601", "0.547935", "0.5454524", "0.5445276", "0.5428136", "0.54121417", "0.53938013", ...
0.5314344
40
Constructs a new PersistentDataStore and sets up its state to begin loading objects from the Datastore service.
public PersistentDataStore() { datastore = DatastoreServiceFactory.getDatastoreService(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createDataStore (){\n\t\tcloseActiveStoreData ();\n\t\tif (_usablePersistenceManager){\n\t\t\tclosePersistence ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tthis.pm = DataStoreUtil.createDataStore (getDataStoreEnvironment (), true);\n\t\t_usablePersistenceManager = true;\n\t}", "void initialize(Dat...
[ "0.719423", "0.67819047", "0.6454155", "0.62779355", "0.6187965", "0.6187198", "0.6056557", "0.6027666", "0.6025249", "0.59479797", "0.587211", "0.5839474", "0.582325", "0.5793025", "0.5776259", "0.5765791", "0.5724984", "0.5692502", "0.5620706", "0.5545004", "0.5511138", "...
0.8110729
0
Loads all User objects from the Datastore service and returns them in a List.
public List<User> loadUsers() throws PersistentDataStoreException { List<User> users = new ArrayList<>(); // Retrieve all users from the datastore. Query query = new Query("chat-users"); PreparedQuery results = datastore.prepare(query); for (Entity entity : results.asIterable()) { try { UUID uuid = UUID.fromString((String) entity.getProperty("uuid")); String userName = (String) entity.getProperty("username"); String password = (String) entity.getProperty("password"); Instant creationTime = Instant.parse((String) entity.getProperty("creation_time")); // Note that any users created prior to this point will not be // blocked, because // this fails open. boolean blocked = Boolean.parseBoolean((String) entity.getProperty("blocked")); User user = new User(uuid, userName, password, creationTime, blocked); users.add(user); } catch (Exception e) { // In a production environment, errors should be very rare. // Errors which may // occur include network errors, Datastore service errors, // authorization errors, // database entity definition mismatches, or service mismatches. throw new PersistentDataStoreException(e); } } return users; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<User> loadAll();", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "public Collection<User> getAll() throws DataPersistenceException\n {\n PersistenceManagerFactory pmfInstance = PMFHolder.get();\n PersistenceManager pm = pmfI...
[ "0.8102531", "0.7416235", "0.737921", "0.73684245", "0.73684245", "0.7348886", "0.7307268", "0.7307268", "0.72896826", "0.72655857", "0.72205454", "0.72131664", "0.72062284", "0.7202282", "0.7199327", "0.7192805", "0.718614", "0.7183483", "0.7170929", "0.71559155", "0.7140359...
0.795991
1
Loads all Conversation objects from the Datastore service and returns them in a List.
public List<Conversation> loadConversations() throws PersistentDataStoreException { List<Conversation> conversations = new ArrayList<>(); // Retrieve all conversations from the datastore. Query query = new Query("chat-conversations"); PreparedQuery results = datastore.prepare(query); for (Entity entity : results.asIterable()) { try { UUID uuid = UUID.fromString((String) entity.getProperty("uuid")); UUID ownerUuid = UUID.fromString((String) entity.getProperty("owner_uuid")); String title = (String) entity.getProperty("title"); Instant creationTime = Instant.parse((String) entity.getProperty("creation_time")); boolean muted = Boolean.parseBoolean((String) entity.getProperty("muted")); Conversation conversation = new Conversation(uuid, ownerUuid, title, creationTime, muted); conversations.add(conversation); } catch (Exception e) { // In a production environment, errors should be very rare. // Errors which may // occur include network errors, Datastore service errors, // authorization errors, // database entity definition mismatches, or service mismatches. throw new PersistentDataStoreException(e); } } return conversations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Message> loadMessages() throws PersistentDataStoreException {\n\n List<Message> messages = new ArrayList<>();\n\n // Retrieve all messages from the datastore.\n Query query = new Query(\"chat-messages\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : result...
[ "0.66150844", "0.65299726", "0.6337168", "0.5990087", "0.5873173", "0.57630056", "0.57479966", "0.5668187", "0.56624645", "0.5631027", "0.55509436", "0.5508437", "0.5426798", "0.5422308", "0.5411771", "0.5340331", "0.5335877", "0.5335877", "0.5335877", "0.5335877", "0.5335877...
0.81993335
0
Loads all Message objects from the Datastore service and returns them in a List.
public List<Message> loadMessages() throws PersistentDataStoreException { List<Message> messages = new ArrayList<>(); // Retrieve all messages from the datastore. Query query = new Query("chat-messages"); PreparedQuery results = datastore.prepare(query); for (Entity entity : results.asIterable()) { try { UUID uuid = UUID.fromString((String) entity.getProperty("uuid")); UUID conversationUuid = UUID.fromString((String) entity.getProperty("conv_uuid")); UUID authorUuid = UUID.fromString((String) entity.getProperty("author_uuid")); Instant creationTime = Instant.parse((String) entity.getProperty("creation_time")); String content = (String) entity.getProperty("content"); Message message = new Message(uuid, conversationUuid, authorUuid, content, creationTime); messages.add(message); } catch (Exception e) { // In a production environment, errors should be very rare. // Errors which may // occur include network errors, Datastore service errors, // authorization errors, // database entity definition mismatches, or service mismatches. throw new PersistentDataStoreException(e); } } return messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.d...
[ "0.7175294", "0.7175294", "0.7175294", "0.7175294", "0.7175294", "0.68680155", "0.6805485", "0.67923456", "0.6738992", "0.665875", "0.65487796", "0.6520667", "0.63988733", "0.63988733", "0.63988733", "0.63988733", "0.63988733", "0.6390404", "0.6390404", "0.6390404", "0.639040...
0.7856842
0
Loads all Mention objects from the Datastore service and returns them in a List.
public List<Mention> loadMentions() throws PersistentDataStoreException { List<Mention> mentions = new ArrayList<>(); // Retrieve all mentions from the datastore. Query query = new Query("chat-mentions"); PreparedQuery results = datastore.prepare(query); for (Entity entity : results.asIterable()) { try { UUID uuid = UUID.fromString((String) entity.getProperty("uuid")); UUID userWhoWasMentioned = UUID.fromString((String) entity.getProperty("userWhoWasMentioned")); UUID userWhoDidTheMentioning = UUID.fromString((String) entity.getProperty("userWhoDidTheMentioning")); int start = Integer.parseInt((String) entity.getProperty("start")); int end = Integer.parseInt((String) entity.getProperty("end")); Instant creationTime = Instant.parse((String) entity.getProperty("creation_time")); UUID messageId = UUID.fromString((String) entity.getProperty("messageId")); Mention mention = new Mention(uuid, userWhoWasMentioned, userWhoDidTheMentioning, start, end, creationTime, messageId); mentions.add(mention); } catch (Exception e) { // In a production environment, errors should be very rare. // Errors which may // occur include network errors, Datastore service errors, // authorization errors, // database entity definition mismatches, or service mismatches. throw new PersistentDataStoreException(e); } } return mentions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<AceMention> getAllMentions () {\n\t\treturn allMentionsList;\n\t}", "List<T> getAll() throws PersistException;", "public List<Conversation> loadConversations() throws PersistentDataStoreException {\n\n List<Conversation> conversations = new ArrayList<>();\n\n // Retrieve all conversations from ...
[ "0.5966399", "0.5864616", "0.5847896", "0.57328385", "0.5714168", "0.56640756", "0.55241776", "0.5511557", "0.55055535", "0.54292834", "0.5416625", "0.53856933", "0.53367215", "0.5326186", "0.53006023", "0.5292873", "0.5250974", "0.52366287", "0.5216369", "0.5214381", "0.5195...
0.80876315
0
Write a User object to the Datastore service.
public void writeThrough(User user) { Entity userEntity = new Entity("chat-users", user.getId().toString()); userEntity.setProperty("uuid", user.getId().toString()); userEntity.setProperty("username", user.getName()); userEntity.setProperty("password", user.getPassword()); userEntity.setProperty("creation_time", user.getCreationTime().toString()); userEntity.setProperty("blocked", Boolean.toString(user.isBlocked())); datastore.put(userEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveUserData(User user);", "void storeUser(User user) throws DataAccessException;", "public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n ...
[ "0.7267828", "0.71401286", "0.7060603", "0.6973374", "0.69016796", "0.6827406", "0.6747357", "0.6742809", "0.67255354", "0.67127186", "0.66965514", "0.6672039", "0.66672", "0.66640913", "0.6622785", "0.6605395", "0.6603732", "0.65979385", "0.6534983", "0.6502663", "0.6493512"...
0.6649951
14
Write a Message object to the Datastore service.
public void writeThrough(Message message) { Entity messageEntity = new Entity("chat-messages", message.getId().toString()); messageEntity.setProperty("uuid", message.getId().toString()); messageEntity.setProperty("conv_uuid", message.getConversationId().toString()); messageEntity.setProperty("author_uuid", message.getAuthorId().toString()); messageEntity.setProperty("content", message.getContent()); messageEntity.setProperty("creation_time", message.getCreationTime().toString()); datastore.put(messageEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void storeMessage(Message message) {\n Entity messageEntity = new Entity(\"Message\", message.getId().toString());\n messageEntity.setProperty(\"user\", message.getUser());\n messageEntity.setProperty(\"text\", message.getText());\n messageEntity.setProperty(\"timestamp\", message.getTimestamp()...
[ "0.6720768", "0.6579957", "0.653009", "0.62725735", "0.6163376", "0.61098856", "0.60383564", "0.60383564", "0.6020969", "0.59270257", "0.591122", "0.5904307", "0.5880197", "0.58537364", "0.58187306", "0.5811542", "0.5738708", "0.5716577", "0.5690839", "0.56804836", "0.5665552...
0.61773664
4
Write a Conversation object to the Datastore service.
public void writeThrough(Conversation conversation) { Entity conversationEntity = new Entity("chat-conversations", conversation.getId().toString()); conversationEntity.setProperty("uuid", conversation.getId().toString()); conversationEntity.setProperty("owner_uuid", conversation.getOwnerId().toString()); conversationEntity.setProperty("title", conversation.getTitle()); conversationEntity.setProperty("creation_time", conversation.getCreationTime().toString()); conversationEntity.setProperty("muted", Boolean.toString(conversation.isMuted())); datastore.put(conversationEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(\"/api/v1/conversations\")\n PersistedConversation postConversation(\n @RequestBody final ConversationRequest conversation)\n {\n final List<PersistedParticipant> participantEntities = new ArrayList<>();\n for (final String participantName : conversation.participantNames...
[ "0.560298", "0.5376991", "0.50596434", "0.505292", "0.49613443", "0.49539486", "0.49539486", "0.49499804", "0.4948213", "0.49400055", "0.49062043", "0.48613638", "0.48531824", "0.480729", "0.47937438", "0.47923696", "0.4789253", "0.47880292", "0.47681668", "0.47679496", "0.47...
0.7056251
0
Write a Mention object to the Datastore service.
public void writeThrough(Mention mention) { Entity mentionEntity = new Entity("chat-mentions", mention.getId().toString()); mentionEntity.setProperty("uuid", mention.getId().toString()); mentionEntity.setProperty("userWhoWasMentioned", mention.getUserWhoWasMentioned().toString()); mentionEntity.setProperty( "userWhoDidTheMentioning", mention.getUserWhoDidTheMentioning().toString()); mentionEntity.setProperty("start", Integer.toString(mention.getStart())); mentionEntity.setProperty("end", Integer.toString(mention.getEnd())); mentionEntity.setProperty("creation_time", mention.getCreationTime().toString()); mentionEntity.setProperty("messageId", mention.getMessageId().toString()); datastore.put(mentionEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int save( Mention obj ) {\n return 0;\n }", "public void persist(DataOutputStream dos) throws Exception;", "public void write(String id);", "public abstract void write(Entity entity, Writer out) throws IOException;", "@Override\n\tpublic void persist(T obj) throws Exception ...
[ "0.6539096", "0.55955034", "0.5495417", "0.5470772", "0.54217386", "0.525189", "0.5244549", "0.51848644", "0.5147054", "0.5104121", "0.51035154", "0.50855017", "0.50294363", "0.5015662", "0.500178", "0.49981713", "0.49795282", "0.49754614", "0.49717355", "0.49670878", "0.4964...
0.69120723
0
if it hits a wall, it freezes
public FastMonster(int x, int y) { super(x, y, "Fast"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void block() {\n while (true) {\n if (System.currentTimeMillis() - lastMovement > 2000) {\n return;\n }\n }\n \n }", "public void breakWall() {\r\n\tbustedWall = true;\r\n}", "@Override\n public void run(){\n for(;;) {\n try {\n if (x+2*r...
[ "0.6667451", "0.66450804", "0.6545782", "0.64561445", "0.6420142", "0.6368715", "0.6344783", "0.6296661", "0.6228155", "0.6224886", "0.6185911", "0.6164824", "0.6137696", "0.6132936", "0.61118084", "0.61020094", "0.6084337", "0.6047899", "0.60203433", "0.5973993", "0.5956125"...
0.0
-1
Moves 2 spaces at a time, but not very good at turning...
public void move(Maze here) { Coordinates target = here.getPlayer().find(); // where the player is ArrayList<Coordinates> canMove = freeMoves(here); // the ways that aren't // blocked if (!canMove.isEmpty()) { // you can move Coordinates go = find(); // go is the new coordinates if (here.getMCell(target).dark()) { this.sleep = true; Collections.shuffle(canMove); go = charge(canMove.get(0), here); } // only one option else if (canMove.size() == 1) go = charge(canMove.get(0), here); else { // select the best // not too dissimilar to the search method in wargames Pair<Coordinates, Double> best = new Pair<>(target, Double.MAX_VALUE); for (Coordinates options : canMove) { Coordinates guess = go.add(options); double gDist = guess.dist(target); if (gDist < best.second()) { best.first(options); best.second(gDist); } } go = charge(best.first(), here); } move(go, here); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "@Override\r\n\tpublic void turnToward(int x, int y) {\n\t}", "public void setMov...
[ "0.6999202", "0.6639611", "0.6525523", "0.64756924", "0.6425806", "0.6337615", "0.6281875", "0.62421846", "0.62201434", "0.6213069", "0.6190184", "0.6172183", "0.6172068", "0.6166151", "0.61280197", "0.61168563", "0.61113864", "0.6107297", "0.6101081", "0.6088551", "0.6086315...
0.0
-1
which directions aren't blocked
private ArrayList<Coordinates> freeMoves(Maze maze) { ArrayList<Coordinates> dirs = new ArrayList<>(); for (int x = -1; x <= 1; x++) { for (int y = -1; y <= 1; y++) { if (x == 0 ^ y == 0) { Coordinates move = find().add(x, y); if (!maze.outOfRange(move)) { if (!maze.getMCell(move).wall()) { dirs.add(new Coordinates(x, y)); } } } } } return dirs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Direction> getValidDirectionsForMovement();", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can b...
[ "0.6896039", "0.63721853", "0.61208504", "0.60702527", "0.59479475", "0.5926101", "0.5890828", "0.5889693", "0.58609176", "0.57998496", "0.57858795", "0.5733647", "0.5730707", "0.5724087", "0.57097644", "0.5702941", "0.5693563", "0.56867963", "0.5682655", "0.5678356", "0.5666...
0.5549893
36
Represents an OperationSet giving access to videospecific functionality in telephony such as visual Components displaying video and listening to dynamic availability of such Components.
public interface OperationSetVideoTelephony extends OperationSet { /** * Adds a specific <code>VideoListener</code> to this telephony in order to receive notifications * when visual/video <code>Component</code>s are being added and removed for a specific <code>CallPeer</code>. * * @param peer the <code>CallPeer</code> whose video the specified listener is to be notified about * @param listener the <code>VideoListener</code> to be notified when visual/video <code>Component</code>s are * being added or removed for <code>peer</code> */ void addVideoListener(CallPeer peer, VideoListener listener); /** * Gets the visual <code>Component</code> which depicts the local video being streamed to a specific <code>CallPeer</code>. * * @param peer the <code>CallPeer</code> to whom the local video which is to be depicted by the returned * visual <code>Component</code> is being streamed * @return a visual <code>Component</code> which depicts the local video being streamed to the * specified <code>CallPeer</code> if this telephony chooses to carry out the creation * synchronously; <code>null</code> if this telephony chooses to create the requested visual * <code>Component</code> asynchronously * @throws OperationFailedException if creating the component fails for whatever reason. */ Component getLocalVisualComponent(CallPeer peer) throws OperationFailedException; /** * Gets the visual/video <code>Component</code> available in this telephony for a specific * <code>CallPeer</code>. * * @param peer the <code>CallPeer</code> whose video is to be retrieved * @return the visual/video <code>Component</code> available in this telephony for the specified * <code>peer</code> if any; otherwise, <code>null</code> */ @Deprecated Component getVisualComponent(CallPeer peer); /** * Gets the visual/video <code>Component</code>s available in this telephony for a specific <code>CallPeer</code>. * * @param peer the <code>CallPeer</code> whose videos are to be retrieved * @return the visual/video <code>Component</code>s available in this telephony for the specified <code>peer</code> */ List<Component> getVisualComponents(CallPeer peer); /** * Removes a specific <code>VideoListener</code> from this telephony in order to no longer have it * receive notifications when visual/video <code>Component</code>s are being added and removed for a * specific <code>CallPeer</code>. * * @param peer the <code>CallPeer</code> whose video the specified listener is to no longer be notified about * @param listener the <code>VideoListener</code> to no longer be notified when visual/video * <code>Component</code>s are being added or removed for <code>peer</code> */ void removeVideoListener(CallPeer peer, VideoListener listener); /** * Sets the indicator which determines whether the streaming of local video in a specific * <code>Call</code> is allowed. The setting does not reflect the availability of actual video * capture devices, it just expresses the desire of the user to have the local video streamed in * the case the system is actually able to do so. * * @param call the <code>Call</code> to allow/disallow the streaming of local video for * @param allowed <code>true</code> to allow the streaming of local video for the specified <code>Call</code>; * <code>false</code> to disallow it * @throws OperationFailedException if initializing local video fails. */ void setLocalVideoAllowed(Call call, boolean allowed) throws OperationFailedException; /** * Gets the indicator which determines whether the streaming of local video in a specific * <code>Call</code> is allowed. The setting does not reflect the availability of actual video * capture devices, it just expresses the desire of the user to have the local video streamed in * the case the system is actually able to do so. * * @param call the <code>Call</code> to get the indicator of * @return <code>true</code> if the streaming of local video for the specified <code>Call</code> is * allowed; otherwise, <code>false</code> */ boolean isLocalVideoAllowed(Call call); /** * The property which indicates whether a specific <code>Call</code> is currently streaming the * local video (to a remote destination). */ static final String LOCAL_VIDEO_STREAMING = "LOCAL_VIDEO_STREAMING"; /** * Gets the indicator which determines whether a specific <code>Call</code> is currently streaming * the local video (to a remote destination). * * @param call the <code>Call</code> to get the indicator of * @return <code>true</code> if the specified <code>Call</code> is currently streaming the local video * (to a remote destination); otherwise, <code>false</code> */ boolean isLocalVideoStreaming(Call call); /** * Adds a specific <code>PropertyChangeListener</code> to the list of listeners which get notified * when the properties (e.g. {@link #LOCAL_VIDEO_STREAMING}) associated with a specific * <code>Call</code> change their values. * * @param call the <code>Call</code> to start listening to the changes of the property values of * @param listener the <code>PropertyChangeListener</code> to be notified when the properties associated with * the specified <code>Call</code> change their values */ void addPropertyChangeListener(Call call, PropertyChangeListener listener); /** * Removes a specific <code>PropertyChangeListener</code> from the list of listeners which get * notified when the properties (e.g. {@link #LOCAL_VIDEO_STREAMING}) associated with a specific * <code>Call</code> change their values. * * @param call the <code>Call</code> to stop listening to the changes of the property values of * @param listener the <code>PropertyChangeListener</code> to no longer be notified when the properties * associated with the specified <code>Call</code> change their values */ void removePropertyChangeListener(Call call, PropertyChangeListener listener); /** * Create a new video call and invite the specified CallPeer to it. * * @param uri the address of the callee that we should invite to a new call. * @return CallPeer the CallPeer that will represented by the specified uri. All following state * change events will be delivered through that call peer. The Call that this peer is a * member of could be retrieved from the CallParticipatn instance with the use of the * corresponding method. * @throws OperationFailedException with the corresponding code if we fail to create the video call. * @throws ParseException if <code>callee</code> is not a valid sip address string. */ Call createVideoCall(String uri) throws OperationFailedException, ParseException; /** * Create a new video call and invite the specified CallPeer to it. * * @param callee the address of the callee that we should invite to a new call. * @return CallPeer the CallPeer that will represented by the specified uri. All following state * change events will be delivered through that call peer. The Call that this peer is a * member of could be retrieved from the CallParticipatn instance with the use of the * corresponding method. * @throws OperationFailedException with the corresponding code if we fail to create the video call. */ Call createVideoCall(Contact callee) throws OperationFailedException; /** * Create a new video call and invite the specified CallPeer to it. * * @param uri the address of the callee that we should invite to a new call. * @param qualityPreferences the quality preset we will use establishing the video call, and we will expect from * the other side. When establishing call we don't have any indications whether remote * part supports quality presets, so this setting can be ignored. * @return CallPeer the CallPeer that will represented by the specified uri. All following state * change events will be delivered through that call peer. The Call that this peer is a * member of could be retrieved from the CallParticipatn instance with the use of the * corresponding method. * @throws OperationFailedException with the corresponding code if we fail to create the video call. * @throws ParseException if <code>callee</code> is not a valid sip address string. */ Call createVideoCall(String uri, QualityPreset qualityPreferences) throws OperationFailedException, ParseException; /** * Create a new video call and invite the specified CallPeer to it. * * @param callee the address of the callee that we should invite to a new call. * @param qualityPreferences the quality preset we will use establishing the video call, and we will expect from * the other side. When establishing call we don't have any indications whether remote * part supports quality presets, so this setting can be ignored. * @return CallPeer the CallPeer that will represented by the specified uri. All following state * change events will be delivered through that call peer. The Call that this peer is a * member of could be retrieved from the CallParticipatn instance with the use of the * corresponding method. * @throws OperationFailedException with the corresponding code if we fail to create the video call. */ Call createVideoCall(Contact callee, QualityPreset qualityPreferences) throws OperationFailedException; /** * Indicates a user request to answer an incoming call with video enabled from the specified CallPeer. * * @param peer the call peer that we'd like to answer. * @throws OperationFailedException with the corresponding code if we encounter an error while performing this operation. */ void answerVideoCallPeer(CallPeer peer) throws OperationFailedException; /** * Returns the quality control for video calls if any. It can be null if we were able to * successfully determine that other party does not support it. * * @param peer the peer which this control operates on. * @return the implemented quality control. */ QualityControl getQualityControl(CallPeer peer); /** * Determines the <code>ConferenceMember</code> which is participating in a telephony conference * with a specific <code>CallPeer</code> as its focus and which is sending a video content/RTP * stream displayed in a specific visual <code>Component</code>. * * @param peer the <code>CallPeer</code> which is the conference focus of the telephony conference to be * examined in order to locate the <code>ConferenceMember</code> which is sending the video * content/RTP stream displayed in the specified <code>visualComponent</code> * @param visualComponent the visual <code>Component</code> which displays the video content/RTP stream of the * <code>ConferenceMember</code> to be located * @return the <code>ConferenceMember</code>, if any, which is sending the video content/RTP stream * displayed in the specific <code>visualComponent</code> */ ConferenceMember getConferenceMember(CallPeer peer, Component visualComponent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, OperationSet> getSupportedOperationSets()\n {\n return new Hashtable<>(supportedOperationSets);\n }", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public final CQLParser.setOperation_return setOperation() ...
[ "0.5636737", "0.5580008", "0.5234774", "0.52301943", "0.51287806", "0.49820212", "0.49733612", "0.49364743", "0.4919693", "0.48328274", "0.4800661", "0.47507584", "0.47498462", "0.47370252", "0.47100744", "0.47003895", "0.4689722", "0.4674842", "0.4652527", "0.4648915", "0.46...
0.7284866
0
Adds a specific VideoListener to this telephony in order to receive notifications when visual/video Components are being added and removed for a specific CallPeer.
void addVideoListener(CallPeer peer, VideoListener listener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeVideoListener(CallPeer peer, VideoListener listener);", "interface VideoListener {\n\n /** Called when the video is started or resumed. */\n default void onVideoStarted() {\n }\n\n /** Called when the video is paused or finished. */\n default void onVideoStopped() {\...
[ "0.6774963", "0.60037416", "0.58923614", "0.5891441", "0.5854", "0.58431894", "0.577121", "0.5713256", "0.5712831", "0.5669796", "0.56281674", "0.55431306", "0.5530474", "0.5515752", "0.5485966", "0.5466012", "0.5466012", "0.54403377", "0.5432956", "0.53552186", "0.53245866",...
0.83083624
0