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 |
|---|---|---|---|---|---|---|
Fetch records that have PUBLISHED_IN IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByPublishedIn(java.lang.Integer... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.PUBLISHED_IN, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :off... | [
"0.57073504",
"0.5033594",
"0.49837703",
"0.49792588",
"0.49778208",
"0.4976094",
"0.49001527",
"0.4856146",
"0.48548946",
"0.48187697",
"0.47983384",
"0.4792392",
"0.4781813",
"0.47729182",
"0.4687006",
"0.46843314",
"0.4669791",
"0.46571845",
"0.46409187",
"0.46337473",
"0.... | 0.6423316 | 0 |
Fetch records that have LANGUAGE_ID IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByLanguageId(java.lang.Integer... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.LANGUAGE_ID, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasValueLanguageId();",
"@PermitAll\n @Override\n public List<Language> getLanguages(String lang) {\n Map params = new HashMap<String, Object>();\n if (lang != null) {\n params.put(CommonSqlProvider.PARAM_LANGUAGE_CODE, lang);\n }\n params.put(CommonSqlProvide... | [
"0.59247935",
"0.5730426",
"0.5666222",
"0.55438125",
"0.5520047",
"0.5477696",
"0.5433073",
"0.5396598",
"0.5378985",
"0.5359305",
"0.53159565",
"0.528259",
"0.52820426",
"0.5236342",
"0.52244353",
"0.5211086",
"0.5189985",
"0.5169762",
"0.51581573",
"0.5140117",
"0.51346904... | 0.5525365 | 4 |
Fetch records that have CONTENT_TEXT IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByContentText(java.lang.String... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.CONTENT_TEXT, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean containsText(CharSequence s) {\n return content.toString().contains(s);\n }",
"public String SearchContent()\n\t{\n\t\tSystem.out.println(\"Content:\" + Content);\n\t\tluc = new Lucene_fuction();\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tServletContext servl... | [
"0.56761694",
"0.5631968",
"0.5459912",
"0.54331654",
"0.54331654",
"0.54331654",
"0.54331654",
"0.52995145",
"0.5272822",
"0.5245903",
"0.5219951",
"0.521157",
"0.5195751",
"0.5176703",
"0.5146115",
"0.5138861",
"0.5136384",
"0.51255506",
"0.50932866",
"0.5089503",
"0.508950... | 0.6370999 | 0 |
Fetch records that have CONTENT_PDF IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByContentPdf(byte[]... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.CONTENT_PDF, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<byte[]> searchPDFs(String keyword) {\n List<Document> searchDocs = searchDocuments(keyword);\n return docToPDFList(searchDocs);\n }",
"List<PdfCodeTemporary> selectByExample(PdfCodeTemporaryExample example);",
"public Cliente[] findWhereAccesoConsolaXmlPdfEquals(int ... | [
"0.56393147",
"0.5402994",
"0.5387032",
"0.52662605",
"0.5165453",
"0.5160618",
"0.5061273",
"0.4955664",
"0.49451202",
"0.49386686",
"0.49287027",
"0.49173787",
"0.4865315",
"0.48514304",
"0.4845367",
"0.4838227",
"0.48126522",
"0.47793004",
"0.47785914",
"0.47644287",
"0.47... | 0.6743131 | 0 |
Fetch records that have REC_VERSION IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByRecVersion(java.lang.Integer... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.REC_VERSION, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LearningResultHasActivity[] findWhereVersionEquals(String version) throws LearningResultHasActivityDaoException;",
"public Collection<Version> getVersionsByKid(Long kid) {\n\t\treturn this.kynamicDao.getVersionsByKid(kid);\r\n\t}",
"public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VB... | [
"0.5918127",
"0.5262404",
"0.5237696",
"0.5150936",
"0.5121434",
"0.49520436",
"0.4932941",
"0.4932431",
"0.49093693",
"0.47976598",
"0.47906053",
"0.47856185",
"0.4762192",
"0.475233",
"0.474613",
"0.46843323",
"0.46590903",
"0.46185416",
"0.45772326",
"0.45578158",
"0.45165... | 0.6488651 | 0 |
Fetch records that have REC_TIMESTAMP IN (values) | public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByRecTimestamp(java.sql.Timestamp... values) {
return fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.REC_TIMESTAMP, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<models.garaDB.tables.pojos.Ride> fetchByTimestamp(Timestamp... values) {\n return fetch(Ride.RIDE.TIMESTAMP, values);\n }",
"boolean hasNextCollectTimestampMs();",
"public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchByModifiedTime(LocalDateTime... values) {\n return f... | [
"0.532273",
"0.5239397",
"0.50854796",
"0.50496054",
"0.5037133",
"0.49500385",
"0.49476305",
"0.4942258",
"0.4847213",
"0.48464856",
"0.47626325",
"0.47626325",
"0.47626325",
"0.47626325",
"0.47626325",
"0.47626325",
"0.47626325",
"0.47585967",
"0.4742794",
"0.47018504",
"0.... | 0.6460073 | 0 |
The annotation name we are interested in. | public void setAnnotationName(String annotationName) {
this.annotationName = annotationName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String\n getAnnotationName() \n {\n return pAnnotationName;\n }",
"private static String getAnnotationName(DetailAST annotationNode) {\n final DetailAST identNode = annotationNode.findFirstToken(TokenTypes.IDENT);\n final String result;\n\n if (identNode == null) {\n ... | [
"0.79503584",
"0.753192",
"0.7081712",
"0.7047998",
"0.6957973",
"0.68020207",
"0.67582315",
"0.67311186",
"0.6703881",
"0.65314263",
"0.6516021",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.64804256",
"0.... | 0.67412007 | 7 |
The required list of parameters we have to use. | public void setRequiredParameters(String... requiredPropertiesParameter) {
for (String item : requiredPropertiesParameter) {
requiredParameters.add(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic LinkedHashMap<String,?> getRequiredParams() {\n\t\tLinkedHashMap<String,String> requiredParams = new LinkedHashMap<>();\n\t\trequiredParams.put(\"crv\", crv.toString());\n\t\trequiredParams.put(\"kty\", getKeyType().getValue());\n\t\trequiredParams.put(\"x\", x.toString());\n\t\trequiredParams.... | [
"0.7369556",
"0.7200464",
"0.7105843",
"0.6732784",
"0.6699812",
"0.66622806",
"0.6623178",
"0.6601508",
"0.6569503",
"0.6562275",
"0.65241194",
"0.65234417",
"0.65191674",
"0.6477136",
"0.64545465",
"0.6433532",
"0.6414586",
"0.6400416",
"0.63284576",
"0.63284576",
"0.632454... | 0.64337057 | 15 |
Returns full name of an annotation. | private static String getAnnotationName(DetailAST annotationNode) {
final DetailAST identNode = annotationNode.findFirstToken(TokenTypes.IDENT);
final String result;
if (identNode == null) {
final StringBuilder builder = new StringBuilder();
DetailAST separationDotNode = annotationNode.findFirstToken(TokenTypes.DOT);
while (separationDotNode.getType() == TokenTypes.DOT) {
builder.insert(0, '.').insert(1, separationDotNode.getLastChild().getText());
separationDotNode = separationDotNode.getFirstChild();
}
builder.insert(0, separationDotNode.getText());
result = builder.toString();
}
else {
result = identNode.getText();
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String\n getAnnotationName() \n {\n return pAnnotationName;\n }",
"public String getAnnotation();",
"public String getAnnotation () {\n return annotation;\n }",
"public String getAnnotation() {\n return annotation;\n }",
"public JavaAnnotation getAnnotation( String ... | [
"0.7156345",
"0.69757557",
"0.6579415",
"0.6543604",
"0.6489787",
"0.6441608",
"0.63737893",
"0.6326919",
"0.6324498",
"0.61848706",
"0.6016923",
"0.59962404",
"0.5897311",
"0.58959866",
"0.5856751",
"0.58546364",
"0.58228046",
"0.58228046",
"0.58228046",
"0.58228046",
"0.581... | 0.73864895 | 0 |
Returns the name of annotations properties. | private static Set<String> getAnnotationParameters(DetailAST annotationNode) {
final Set<String> annotationParameters = new TreeSet<>();
DetailAST annotationChildNode = annotationNode.getFirstChild();
while (annotationChildNode != null) {
if (annotationChildNode.getType() == TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR) {
annotationParameters.add(annotationChildNode.getFirstChild().getText());
}
annotationChildNode = annotationChildNode.getNextSibling();
}
return annotationParameters;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String\n getAnnotationName() \n {\n return pAnnotationName;\n }",
"String getPropertyName();",
"public String annotation() {\n return this.innerProperties() == null ? null : this.innerProperties().annotation();\n }",
"public String getName() {\n return getProperty(Property.NAME);\n ... | [
"0.67532647",
"0.66267425",
"0.662396",
"0.65317315",
"0.6513044",
"0.6413099",
"0.63961667",
"0.6341493",
"0.62468505",
"0.6222088",
"0.6220202",
"0.62156105",
"0.6214554",
"0.61730415",
"0.60786927",
"0.60630155",
"0.60517454",
"0.60473484",
"0.604718",
"0.60441804",
"0.604... | 0.0 | -1 |
List list= new ArrayList(); | public static String handleCityName(String cityName ){
String[] keyword = new String[13];
keyword[0] = "市";
keyword[1] = "地区";
keyword[2] ="自治州";
keyword[3] = "特别行政区";
keyword[4] = "盟";
keyword[5] ="苗族";
keyword[6] ="藏族";
keyword[7] = "彝族";
keyword[8] = "回族";
keyword[9] = "傣族";
keyword[10] = "土家族";
keyword[11] = "羌族";
keyword[12] = "景颇族";
/*StringBuffer list = new StringBuffer();
list.append("市");
list.append("地区");
list.append("自治州");
list.append("地区");
list.append("地区特别行政区");*/
for(int i =0;i<keyword.length;i++){
Pattern pattern = Pattern.compile(keyword[i]);//添加数据
Matcher matcher = pattern.matcher(cityName);
if(matcher.find()){
cityName = cityName.replace(keyword[i],"");
Log.d("Main", cityName);
}
}
return cityName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}",
"public List()\n {\n list = new Object [10];\n }",
"public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r... | [
"0.772536",
"0.77140754",
"0.7708109",
"0.7416371",
"0.7373162",
"0.73711556",
"0.732377",
"0.73048216",
"0.72624856",
"0.7191497",
"0.71127075",
"0.71024793",
"0.7095679",
"0.70776725",
"0.7067941",
"0.7053771",
"0.7049706",
"0.7033519",
"0.7028046",
"0.70224875",
"0.7017157... | 0.0 | -1 |
/Pessoa p1 = new Pessoa(); p1.mensagem(); p1.mensagem("Sinistro"); p1.mensagem("Sinistro 2", 10); | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String limpiar()\r\n/* 103: */ {\r\n/* 104:112 */ this.motivoLlamadoAtencion = new MotivoLlamadoAtencion();\r\n/* 105:113 */ return \"\";\r\n/* 106: */ }",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t ... | [
"0.6587526",
"0.6310531",
"0.6307894",
"0.6143457",
"0.6110072",
"0.60200256",
"0.60080135",
"0.5994344",
"0.59682465",
"0.59617853",
"0.5955103",
"0.59183973",
"0.59145045",
"0.5913292",
"0.58988875",
"0.58848256",
"0.5883855",
"0.5866144",
"0.58506256",
"0.5846555",
"0.5838... | 0.0 | -1 |
Query the database using Hibernate Query Language (HQL). | public abstract List createQuery(String query); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<IEntity> query(IQuery query) throws SQLException;",
"Query query();",
"private static void hqlQuery(Session session) {\n\t\tint departmentId=300;\n\t\tQuery query=session.createQuery(\"from Employee e where e.dp.departmentId<=:\"+DtoConstants.DEPARTMENT_ID+\" order by e.name desc\");\n\t\tquery.set... | [
"0.7122043",
"0.6989018",
"0.693651",
"0.6652089",
"0.6608344",
"0.63880247",
"0.63712484",
"0.63442516",
"0.63208073",
"0.63056755",
"0.62957823",
"0.6275717",
"0.6255015",
"0.62360233",
"0.6169054",
"0.6160331",
"0.61506027",
"0.6142851",
"0.6140723",
"0.6083535",
"0.608286... | 0.0 | -1 |
Query the database using Hibernate Query Language (HQL) | public abstract <T> List<? extends T> createQuery(String query, Class<T> type); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<IEntity> query(IQuery query) throws SQLException;",
"private static void hqlQuery(Session session) {\n\t\tint departmentId=300;\n\t\tQuery query=session.createQuery(\"from Employee e where e.dp.departmentId<=:\"+DtoConstants.DEPARTMENT_ID+\" order by e.name desc\");\n\t\tquery.setInteger(DtoConstants... | [
"0.71188396",
"0.7040537",
"0.6936102",
"0.66227186",
"0.6605653",
"0.6567398",
"0.6521493",
"0.6493728",
"0.64696854",
"0.6424702",
"0.6404783",
"0.63851386",
"0.6372126",
"0.6337322",
"0.63036406",
"0.62678903",
"0.6266748",
"0.6228282",
"0.61859983",
"0.61569625",
"0.61388... | 0.0 | -1 |
Query the database using Hibernate Query Language (HQL) | public abstract <T> List<? extends T> createQuery(String query, Class<T> type, int firstResult, int maxResult); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<IEntity> query(IQuery query) throws SQLException;",
"private static void hqlQuery(Session session) {\n\t\tint departmentId=300;\n\t\tQuery query=session.createQuery(\"from Employee e where e.dp.departmentId<=:\"+DtoConstants.DEPARTMENT_ID+\" order by e.name desc\");\n\t\tquery.setInteger(DtoConstants... | [
"0.71194386",
"0.7039702",
"0.6937161",
"0.6622582",
"0.66050905",
"0.6566349",
"0.65227926",
"0.64944065",
"0.64686465",
"0.6423895",
"0.6404597",
"0.63849074",
"0.6370757",
"0.63375324",
"0.6302183",
"0.6267115",
"0.6267042",
"0.6227886",
"0.6185709",
"0.61580056",
"0.61379... | 0.0 | -1 |
Get the entity with the given id. | public abstract Object get(String entityName, Serializable id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\... | [
"0.825395",
"0.81499445",
"0.80450994",
"0.7915473",
"0.7871222",
"0.78571945",
"0.77837896",
"0.7769435",
"0.7722049",
"0.76969844",
"0.7671322",
"0.7631239",
"0.7618302",
"0.75551915",
"0.75424933",
"0.75352466",
"0.7508317",
"0.7495502",
"0.7478174",
"0.74317163",
"0.74064... | 0.73907447 | 23 |
Gets a list of all the organisms in the database, otherwise returns an empty list | public abstract List<Organism> getOrganisms(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Organization> getAll() throws SQLException {\n\t\tlogger.info(\"[Organization] get\");\n\t\treturn organizationDao.queryForAll();\n\t}",
"public FSList getOrganisms() {\n if (Reaction_Type.featOkTst && ((Reaction_Type)jcasType).casFeat_Organisms == null)\n jcasType.jcas.throwFeatMissing(\"Org... | [
"0.71136045",
"0.6718798",
"0.667459",
"0.6655557",
"0.64281",
"0.64251995",
"0.6406636",
"0.6388402",
"0.6377309",
"0.63634557",
"0.62617683",
"0.61621624",
"0.61355937",
"0.60404193",
"0.5949738",
"0.58438945",
"0.5834273",
"0.5799592",
"0.57733554",
"0.5769459",
"0.5696177... | 0.8232021 | 0 |
public List getAnnotationMethods(); Get the database column name by the entity's property name | public abstract String getDatabaseColumnName(String entityName, String propertyName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n retu... | [
"0.6676269",
"0.6430926",
"0.6393557",
"0.6375788",
"0.63088715",
"0.62861323",
"0.62854016",
"0.6272781",
"0.6154688",
"0.6065224",
"0.6018482",
"0.6007319",
"0.5993614",
"0.597085",
"0.5924762",
"0.591268",
"0.59106445",
"0.59067684",
"0.5866993",
"0.5863244",
"0.58362985",... | 0.69558626 | 0 |
Get the database table name for the given entity | public abstract String getDatabaseTableName(String entityName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix + separator + catalogId + separator + suffix;\n }",
"public Stri... | [
"0.7687477",
"0.74122393",
"0.7293541",
"0.71916306",
"0.7174171",
"0.71580434",
"0.70090175",
"0.6966199",
"0.68833196",
"0.68109643",
"0.68018436",
"0.6724854",
"0.6697948",
"0.66790825",
"0.66000235",
"0.6594552",
"0.6546203",
"0.6537432",
"0.6530105",
"0.65280974",
"0.652... | 0.8752395 | 0 |
Query the database using native sql | public abstract List createNativeSQLQuery(String query); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Query query();",
"Query queryOn(Connection connection);",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"String getNativeQuery();",
"Object executeSelectQuery(String sql) { return null;}",
"public List<Record> executeNativeFinder(String queryName, Object context);",
"public abstract Stat... | [
"0.7356821",
"0.6862433",
"0.6851463",
"0.68248487",
"0.676826",
"0.6646024",
"0.64911515",
"0.648622",
"0.6483603",
"0.64628124",
"0.6424071",
"0.6410359",
"0.6389843",
"0.62283653",
"0.6216761",
"0.6199685",
"0.6171986",
"0.61631715",
"0.611237",
"0.60834897",
"0.60772336",... | 0.72525144 | 1 |
Persist to the database. | public abstract void persist(List<? extends edu.uncc.genosets.datamanager.persister.Persister> persisters); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void persist() {\n }",
"@Override\r\n\tpublic void persist() {\n\t}",
"void persist() throws PersistenceException;",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"public void store() throws PersistenceException {\n }",
"public void save() {\n Dat... | [
"0.77406126",
"0.7619521",
"0.7340473",
"0.7132426",
"0.7085493",
"0.70246345",
"0.69936794",
"0.69652015",
"0.6932679",
"0.6932679",
"0.6932679",
"0.6932679",
"0.68914104",
"0.68565637",
"0.6827116",
"0.6783245",
"0.6772951",
"0.67389053",
"0.6733901",
"0.67131585",
"0.67128... | 0.0 | -1 |
Get the name of the current connection's database | public abstract String getDatabaseName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDatabaseName();",
"java.lang.String getDatabaseName();",
"java.lang.String getDatabaseName();",
"java.lang.String getDatabaseName();",
"protected String getDatabaseName() {\n\t\treturn database;\n\t}",
"public String getDatabase() {\r\n \t\treturn properties.getProperty(KEY_DATABASE);... | [
"0.8549716",
"0.8549716",
"0.8549716",
"0.8549716",
"0.80963445",
"0.80505997",
"0.790547",
"0.7893128",
"0.7830898",
"0.78137714",
"0.7810237",
"0.78006893",
"0.77469736",
"0.7722052",
"0.7722052",
"0.7722052",
"0.7722052",
"0.77117264",
"0.7654784",
"0.7623449",
"0.7623449"... | 0.7513208 | 24 |
Get the connection's unique id | public abstract String getConnectionId(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getConnectionId();",
"java.lang.String getConnectionId();",
"java.lang.String getConnectionId();",
"public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n ... | [
"0.8446927",
"0.8446927",
"0.8446927",
"0.80004704",
"0.80004704",
"0.80004704",
"0.7983391",
"0.7983391",
"0.7983391",
"0.79565006",
"0.7942999",
"0.7906686",
"0.79052174",
"0.7843592",
"0.7708369",
"0.7409284",
"0.7409284",
"0.7409284",
"0.7367827",
"0.73611104",
"0.7361110... | 0.7555611 | 15 |
Test to see if the database is set. | public abstract boolean isDatabaseSet(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSetDatabase() {\r\n return this.database != null;\r\n }",
"public boolean isSetDatabase() {\r\n return this.database != null;\r\n }",
"public boolean isSetDatabase() {\r\n return this.database != null;\r\n }",
"public boolean isSetDatabase() {\r\n return this.dat... | [
"0.83544105",
"0.83544105",
"0.83544105",
"0.83544105",
"0.83544105",
"0.7701596",
"0.7688331",
"0.73295194",
"0.7311182",
"0.72717315",
"0.7225776",
"0.7159727",
"0.713083",
"0.7120856",
"0.7096493",
"0.7047945",
"0.702164",
"0.7016763",
"0.6978279",
"0.6964822",
"0.68574744... | 0.792359 | 5 |
Tests and opens the connection. Set the default datamanager to a new datamanger with the connection. If the connection is not established, the DataManager and connection prior to this call will remain the same. | public static void openConnection(Connection connection) throws InvalidConnectionException, SchemaInvalidException {
try {
DataManager mgr = null;
if (connection.getConnectionType().equals(Connection.TYPE_DIRECT_DB)) {
mgr = new DataManagerJDBC(connection);
} else if (connection.getConnectionType().equals(Connection.TYPE_WEB_SERVICE)) {
mgr = new DataManagerWeb(connection);
}
try {
mgr.connect();
} catch (InvalidConnectionException exx) {
throw exx;
}
mgr.createQuery("SELECT COUNT(o) FROM Organism as o");
synchronized (DataManager.class) {
((GenericDataManager) getDefault()).setCurrentDataManager(mgr);
}
} catch (Exception ex) {
Logger.getLogger(DataManager.class.getName()).log(Level.SEVERE, "DataManager could not connect to datasource.", ex);
throw new InvalidConnectionException("Connection invalid", ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void openConnection() throws DAOManagerException {\n try {\n connection = ds.getConnection();\n //save autocommit value\n this.autoCommit = connection.getAutoCommit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't get connection ... | [
"0.66675454",
"0.6143861",
"0.6143333",
"0.6091088",
"0.5975107",
"0.5970208",
"0.59644043",
"0.5938191",
"0.59328413",
"0.5894522",
"0.5889055",
"0.5871748",
"0.5863626",
"0.5859481",
"0.57359546",
"0.56989986",
"0.56851846",
"0.5684473",
"0.56836283",
"0.5668189",
"0.566475... | 0.61453044 | 1 |
Takes all of the current pointer events streams that are currently being sent to this monitor and generates appropriate cancellations for the windows that would normally get them. This method should be used with caution as unexpected pilfering can break fundamental user interactions. | public void pilferPointers() {
try {
mHost.pilferPointers();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void getWindowHandles() {\n\t\t\r\n\t}",
"public void closeWatchers() {\n //inform all the children windows (plots/lists) that the parent has died\n for (RtStatusListener i : watchers) {\n i.bailOut();\n }\n\n watchers.clear();\n }",
"public void cancelA... | [
"0.5329467",
"0.5073861",
"0.50427556",
"0.50413483",
"0.5030137",
"0.49994987",
"0.4977159",
"0.49630415",
"0.4902336",
"0.48700294",
"0.4827376",
"0.47859108",
"0.47845694",
"0.4784487",
"0.4784487",
"0.47574967",
"0.471381",
"0.47059882",
"0.46756768",
"0.4660536",
"0.4625... | 0.0 | -1 |
Disposes the input monitor. Explicitly release all of the resources this monitor is holding on to (e.g. the InputChannel). Once this method is called, this monitor and any resources it's provided may no longer be used. | public void dispose() {
mInputChannel.dispose();
try {
mHost.dispose();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void dispose() {\n resetInputConnection();\n }",
"@Override\r\n\tpublic void dispose() {\n\t\tif ( disposed ) { return; }\r\n\t\tif ( getOutput() != null ) {\r\n\t\t\tgetOutput().getData().removeListener(this);\r\n\t\t}\r\n\t\tdisposed = true;\r\n\t\tif ( surfaceComposite != null ) {\r\n\t\t\tsurfaceComposit... | [
"0.6515033",
"0.6371451",
"0.6310291",
"0.6101888",
"0.59625447",
"0.5958422",
"0.58587795",
"0.5825114",
"0.5685739",
"0.566842",
"0.5668316",
"0.56584185",
"0.56161916",
"0.56161916",
"0.5605109",
"0.5591733",
"0.5520307",
"0.5458652",
"0.54298204",
"0.5397309",
"0.539235",... | 0.6447559 | 1 |
Code below generated by codegen v1.0.23. DO NOT MODIFY! CHECKSTYLE:OFF Generated code To regenerate run: $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/view/InputMonitor.java To exclude the generated code from IntelliJ autoformatting enable (onetime): Settings > Editor > Code Style > Formatter Control | @DataClass.Generated.Member
public InputMonitor(
@NonNull InputChannel inputChannel,
@NonNull IInputMonitorHost host) {
this.mInputChannel = inputChannel;
com.android.internal.util.AnnotationValidations.validate(
NonNull.class, null, mInputChannel);
this.mHost = host;
com.android.internal.util.AnnotationValidations.validate(
NonNull.class, null, mHost);
// onConstructed(); // You can define this method to get a callback
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface UiPerfMonitorConfig {\n public int TIME_WARNING_LEVEL_1 = 100;\n public int TIME_WARNING_LEVEL_2 = 300;\n\n public final int UI_PERF_LEVEL_0 = 0;\n public final int UI_PERF_LEVEL_1 = 1;\n public final int UI_PERF_LEVEL_2 = 2;\n public String LOG_PATH = Environment.getExternalStorageDirectory... | [
"0.5767034",
"0.5399772",
"0.5344301",
"0.5334419",
"0.5330404",
"0.53112984",
"0.5214604",
"0.52066535",
"0.51864713",
"0.5144034",
"0.51423347",
"0.513675",
"0.5132825",
"0.5119511",
"0.51105386",
"0.50746715",
"0.5074531",
"0.5064339",
"0.5042933",
"0.5040452",
"0.50397706... | 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 Parametros)) {
return false;
}
Parametros other = (Parametros) object;
if ((this.consecutivo == null && other.consecutivo != null) || (this.consecutivo != null && !this.consecutivo.equals(other.consecutivo))) {
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.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
Create SystemController and nodes and pods | @Before
public void prepare() throws Exception{
systemController = new SystemControllerImpl();
//List<Node> inputNodes = NodeDataGenerator.generate(3, 5);
List<Node> inputNodes = NodeDataGenerator.generateFixedReal();
inputNodes.forEach(node -> systemController.addNode(node));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createSignalSystems() {\r\n\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(2)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(3)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().... | [
"0.56528443",
"0.56181",
"0.5535579",
"0.53757864",
"0.5372748",
"0.5322731",
"0.5314764",
"0.5294852",
"0.5259334",
"0.5235889",
"0.52061176",
"0.51862216",
"0.51615757",
"0.51442504",
"0.51207596",
"0.5087167",
"0.5083261",
"0.5053424",
"0.50510013",
"0.50409395",
"0.502378... | 0.56148785 | 2 |
Creates new form TreasureView | public TreasureView() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"View createView();",
"@Override\n public void Create() {\n\n initView();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_random_treasure, conta... | [
"0.6482325",
"0.64614075",
"0.62836146",
"0.6138655",
"0.6098346",
"0.6084812",
"0.6028153",
"0.60051477",
"0.5978874",
"0.5892265",
"0.5713444",
"0.5685217",
"0.56693715",
"0.5668052",
"0.56322616",
"0.5594327",
"0.5591",
"0.5575472",
"0.5553222",
"0.554997",
"0.554549",
"... | 0.71988195 | 1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panel_datos = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
carta = new javax.swing.JLabel();
label_nombre = new javax.swing.JLabel();
nombre = new javax.swing.JLabel();
label_bonus = new javax.swing.JLabel();
bonus = new javax.swing.JLabel();
label_tipo = new javax.swing.JLabel();
tipo = new javax.swing.JLabel();
setLayout(new java.awt.BorderLayout());
panel_datos.setBorder(javax.swing.BorderFactory.createEtchedBorder());
panel_datos.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
panel_datosMouseClicked(evt);
}
});
panel_datos.setLayout(new java.awt.BorderLayout());
carta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Treasures/A prueba de babas.jpg"))); // NOI18N
label_nombre.setText("Nombre");
nombre.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
nombre.setText("NAME");
label_bonus.setText("Bonus");
bonus.setText("BONUS");
label_tipo.setText("Tipo");
tipo.setText("TIPO");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(label_nombre)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(nombre)
.addGap(84, 84, 84))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(12, 12, 12)
.addComponent(bonus))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tipo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label_bonus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(label_tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(carta)
.addGap(0, 0, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(label_nombre)
.addComponent(nombre))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(label_bonus)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bonus)
.addGap(23, 23, 23)
.addComponent(label_tipo)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(5, 5, 5)
.addComponent(carta, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 0, 0))
);
panel_datos.add(jPanel1, java.awt.BorderLayout.PAGE_START);
add(panel_datos, java.awt.BorderLayout.CENTER);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73185146",
"0.7290127",
"0.7290127",
"0.7290127",
"0.7285798",
"0.7247533",
"0.7214021",
"0.720785",
"0.71952385",
"0.71891224",
"0.7184117",
"0.7158779",
"0.7147133",
"0.70921415",
"0.70792264",
"0.7055538",
"0.6986984",
"0.6976409",
"0.6955238",
"0.69525516",
"0.69452786... | 0.0 | -1 |
Display the first 500 characters of the response string. | @Override
public void onResponse(JSONObject response) {
Log.d(TAG, response.toString());
try {
evalResponse(response);
} catch (JSONException e) {
e.printStackTrace();
}
pdLoading.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void responseHandler(StringBuilder sb)\n\t{\n\t\tString s = sb.toString();\t\t\n\t\tString[] lines = s.split(\"\\n\");\t\t\n\t\tString firstLine = \"\";\n\t\t\n\t\t// Only search through the first five lines. If it isn't \n\t\t// in the first five lines it probably isn't there.\n\t\tfor(int i = 0; i... | [
"0.6098763",
"0.5462494",
"0.52524203",
"0.5198244",
"0.5148647",
"0.51042295",
"0.5014053",
"0.5012863",
"0.5007059",
"0.49552792",
"0.49431968",
"0.4936323",
"0.49273297",
"0.48955184",
"0.4895279",
"0.4885787",
"0.48645523",
"0.48620734",
"0.485772",
"0.4851627",
"0.483383... | 0.0 | -1 |
Request external file write permission | private void requestPermissions() {
String[] PERMISSIONS = {android.Manifest.permission.WRITE_EXTERNAL_STORAGE};
ActivityCompat.requestPermissions(this, PERMISSIONS, 112);
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION,}, 1000);
// Check for GPS usage permission
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED
&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION,}, 1000);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPermissionWrite();",
"boolean isWritePermissionGranted();",
"private void requestWriteStoragePermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n //show explanation to user\n ... | [
"0.70572174",
"0.685345",
"0.6644599",
"0.66417927",
"0.64742106",
"0.64684427",
"0.64490753",
"0.6413218",
"0.63781744",
"0.62945",
"0.6263853",
"0.62282854",
"0.61379546",
"0.60792667",
"0.6011778",
"0.60087836",
"0.60041124",
"0.5957469",
"0.5957266",
"0.5940358",
"0.59223... | 0.5460384 | 55 |
i is the index, means 0 i's substring is breakable | public boolean wordBreak(String s, List<String> wordDict) {
boolean[] dp = new boolean[s.length()];
for (int i = 0; i <s.length(); i++) {
if (wordDict.contains(s.substring(0, i+1))) {
dp[i] = true;
continue;
}
for (int k = 0; k < i; k++) {
if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {
dp[i] = true;
System.out.println(i + " " +dp[i]);
break;
}
}
}
return dp[s.length()-1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String reduce(String str, int i) {\n\t\tString ret = str;\n\t\tif (i == 8) {\n\t\t\tif (str.length() > 2) {\n\t\t\t\tret = str.substring(str.length()-2);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"public String getCutString(final String s, final int i) {\n final String emptyString = \"\";\n\n ... | [
"0.6221837",
"0.618166",
"0.61641115",
"0.6141558",
"0.6120715",
"0.61185056",
"0.6112355",
"0.60910606",
"0.60553914",
"0.60214883",
"0.5953875",
"0.59324485",
"0.5921119",
"0.58957005",
"0.5894584",
"0.58760375",
"0.58705306",
"0.58543885",
"0.5810152",
"0.57750124",
"0.577... | 0.0 | -1 |
0 to j is brakable | public boolean wordBreak(String s, List<String> wordDict) {
Map<Integer, Boolean> breakable = new HashMap<>();
return wordBreakHelper(s, wordDict, s.length() - 1, breakable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int j() {\n \treturn j; \n }",
"public int j()\r\n/* 60: */ {\r\n/* 61: 79 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 62: 80 */ if (this.a[i] == null) {\r\n/* 63: 81 */ return i;\r\n/* 64: */ }\r\n/* 65: */ }\r\n/* 66: 84 */ return -1;\r\n/* ... | [
"0.6733816",
"0.6643053",
"0.64573395",
"0.61416054",
"0.605456",
"0.59834516",
"0.59804845",
"0.597656",
"0.5953799",
"0.59320277",
"0.592007",
"0.5875314",
"0.58678",
"0.58522534",
"0.58102196",
"0.5736868",
"0.5729286",
"0.5717669",
"0.56931704",
"0.5691144",
"0.568462",
... | 0.0 | -1 |
vamos a crear objetos de la clase Persona. | public static void main(String[] args) {
Persona persona1 = new Persona("Gaston", 34);
persona1.correr();
Persona persona2 = new Persona("36587415");
persona2.correr(100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public Persona(){\n \n }",
"public Persona(){\n \n }",
"public Persona() {\n \t\n }",
"public Persona() {\n\t\t// TODO Auto-gener... | [
"0.8082853",
"0.7951729",
"0.7951729",
"0.7889862",
"0.7874039",
"0.7798142",
"0.77848095",
"0.77545047",
"0.74068534",
"0.7343471",
"0.7273289",
"0.72523946",
"0.7135092",
"0.71317464",
"0.7071157",
"0.7053126",
"0.7004985",
"0.69674915",
"0.6929601",
"0.681844",
"0.6803331"... | 0.0 | -1 |
Length is encoded, redundantly, in each vector. | public static double[] readDoubleVector(DataInputStream input) throws IOException {
int length = input.readInt();
double[] ret = new double[length];
for (int i = 0; i < length; i++) {
double value = input.readDouble();
ret[i] = value;
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int vecLength();",
"public double getLength();",
"abstract double getLength();",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"protected int length() { return FormatTools.getRasterLength(lengths); }",
"public abstract long getLength() throws VlException;",
"public int getLength() ... | [
"0.75932777",
"0.6607068",
"0.6543187",
"0.6507899",
"0.64704037",
"0.6440902",
"0.6436039",
"0.6407944",
"0.64046156",
"0.6402809",
"0.6402809",
"0.63452196",
"0.63265496",
"0.63263875",
"0.63076097",
"0.6294202",
"0.6291696",
"0.6289211",
"0.6277214",
"0.6267542",
"0.625984... | 0.0 | -1 |
Length is encoded, redundantly, in each vector. | public static int[] readIntegerVector(DataInputStream input) throws IOException {
int length = input.readInt();
int[] ret = new int[length];
for (int i = 0; i < length; i++) {
int value = input.readInt();
ret[i] = value;
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int vecLength();",
"public double getLength();",
"abstract double getLength();",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"protected int length() { return FormatTools.getRasterLength(lengths); }",
"public abstract long getLength() throws VlException;",
"public int getLength() ... | [
"0.75955427",
"0.66079485",
"0.6544316",
"0.65087664",
"0.64717656",
"0.64416456",
"0.64352393",
"0.64070326",
"0.64037895",
"0.64037895",
"0.6403308",
"0.6344662",
"0.63277864",
"0.63274187",
"0.63073426",
"0.6295426",
"0.6290761",
"0.62900823",
"0.62803465",
"0.626646",
"0.... | 0.0 | -1 |
Length is encoded, redundantly, in each vector. | public static boolean[] readBooleanVector(DataInputStream input) throws IOException {
int length = input.readInt();
boolean[] ret = new boolean[length];
for (int i = 0; i < length; i++) {
boolean value = input.readBoolean();
ret[i] = value;
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int vecLength();",
"public double getLength();",
"abstract double getLength();",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"protected int length() { return FormatTools.getRasterLength(lengths); }",
"public abstract long getLength() throws VlException;",
"public int getLength() ... | [
"0.75932777",
"0.6607068",
"0.6543187",
"0.6507899",
"0.64704037",
"0.6440902",
"0.6436039",
"0.6407944",
"0.64046156",
"0.6402809",
"0.6402809",
"0.63452196",
"0.63265496",
"0.63263875",
"0.63076097",
"0.6294202",
"0.6291696",
"0.6289211",
"0.6277214",
"0.6267542",
"0.625984... | 0.0 | -1 |
Length is encoded, redundantly, in each vector. | public static Coordinate[] readCoordinateVector(DataInputStream input,
CoordinateDeindexer deindex)
throws IOException {
int length = input.readInt();
Coordinate[] ret = new Coordinate[length];
for (int i = 0; i < length; i++) {
int index = input.readInt();
Coordinate coord = deindex.getCoordinate(index);
ret[i] = coord;
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int vecLength();",
"public double getLength();",
"abstract double getLength();",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"protected int length() { return FormatTools.getRasterLength(lengths); }",
"public abstract long getLength() throws VlException;",
"public int getLength() ... | [
"0.75932777",
"0.6607068",
"0.6543187",
"0.6507899",
"0.64704037",
"0.6440902",
"0.6436039",
"0.6407944",
"0.64046156",
"0.6402809",
"0.6402809",
"0.63452196",
"0.63265496",
"0.63263875",
"0.63076097",
"0.6294202",
"0.6291696",
"0.6289211",
"0.6277214",
"0.6267542",
"0.625984... | 0.0 | -1 |
Created by Carlos Carrasco Torres on 31/03/2016. | public interface NoteCreatorInterface {
void createNote(TaskResultInterface<Note> callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\... | [
"0.6004968",
"0.56888765",
"0.5631756",
"0.56157494",
"0.5607707",
"0.55797106",
"0.5556724",
"0.5556724",
"0.5547715",
"0.55207866",
"0.5513797",
"0.5499686",
"0.5439766",
"0.54339606",
"0.5404767",
"0.5404767",
"0.5404767",
"0.5404767",
"0.5404767",
"0.5404767",
"0.5368324"... | 0.0 | -1 |
Return the text content for the given element. This is different from the Element.getTextContect() function in a way that normal text nodes are trimmed and CDATA is used AS IS | protected String getTextContent(Node elm) {
if (elm == null) {
return "";
}
StringBuilder sb = new StringBuilder();
NodeList list = elm.getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
Node n = list.item(i);
if (sb.length() > 0) {
sb.append(' ');
}
if (n.getNodeType() == Node.CDATA_SECTION_NODE) {
sb.append(n.getTextContent());
} else {
sb.append(n.getTextContent().trim());
}
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getContentFromElement()\n throws Exception {\n String s = \"\";\n NodeList nlist = m_Element.getChildNodes();\n if (nlist.getLength() == 0) {\n return s;\n }\n Node tn = nlist.item(0);\n try {\n while (tn != null) {\n ... | [
"0.7362168",
"0.72448707",
"0.71332246",
"0.70793414",
"0.6975409",
"0.6719614",
"0.6714292",
"0.6673893",
"0.64848214",
"0.644469",
"0.6444248",
"0.6425364",
"0.6425364",
"0.6393745",
"0.63744164",
"0.63672084",
"0.6357219",
"0.63548946",
"0.63548946",
"0.63548946",
"0.63548... | 0.7559785 | 0 |
Get the current element as value | public String getParam() {
return getTextContent(paramElem);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T getValue(){\n \treturn element;\n }",
"public Object getValue() {\n return element == null ? null : element.getValue();\n }",
"public E value()\r\n\t// post: returns value associated with this node\r\n\t{\r\n\t\treturn val;\r\n\t}",
"public E getElement()\n\t{\n\t\treturn thi... | [
"0.8175868",
"0.7955718",
"0.74819505",
"0.7391486",
"0.73408514",
"0.73408514",
"0.73337376",
"0.7267179",
"0.72538024",
"0.7243123",
"0.7243069",
"0.7216497",
"0.72161794",
"0.7166191",
"0.7159763",
"0.71564066",
"0.71504843",
"0.7146666",
"0.7145314",
"0.712844",
"0.7125",... | 0.0 | -1 |
Get a single parameter. Returns null when the parameter doesn't exist. | public String getParam(String name) {
return getParam(name, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Parameter getParameter();",
"public Value<?> getParameter(String name) {\n\t\tfor (Value<?> parameter : parameters) {\n\t\t\tif (parameter.getName().equals(name)) {\n\t\t\t\treturn parameter;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getParameter(String name) {\n String[] values = getPara... | [
"0.7397392",
"0.694758",
"0.69165933",
"0.686897",
"0.68286383",
"0.6759724",
"0.67380965",
"0.67331",
"0.6666157",
"0.6612613",
"0.6570063",
"0.6524777",
"0.6417395",
"0.638364",
"0.6350499",
"0.6345359",
"0.63435453",
"0.63166755",
"0.6274533",
"0.62599826",
"0.6242142",
... | 0.6318182 | 17 |
Get a single parameter with a default value. | public String getParam(String name, String defaultValue) {
NodeList nodes = paramElem.getElementsByTagName(name);
if (nodes.getLength() == 0) {
return defaultValue;
}
return getTextContent(nodes.item(0));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ParameterableElement getDefault();",
"T getDefaultValue();",
"public String getParameter( String name, String default_value )\n {\n return getParameter(VALDEF, name, default_value, false);\n }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"String getDefaultValue();",
... | [
"0.7668454",
"0.72906125",
"0.7254728",
"0.72084683",
"0.72084683",
"0.71833146",
"0.71833146",
"0.709849",
"0.6976266",
"0.6929479",
"0.6916436",
"0.6889648",
"0.6882534",
"0.67517006",
"0.67432356",
"0.6691468",
"0.66640115",
"0.6420865",
"0.64018065",
"0.6377652",
"0.63706... | 0.6494875 | 17 |
Return true if a parameter with the given name exists. | public boolean isSet(String name) {
return paramElem.getElementsByTagName(name).getLength() > 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasParam(String name)\r\n {\r\n try {\r\n return lookup.get(name) != null;\r\n } catch(Exception e) {}\r\n \r\n return false;\r\n }",
"public boolean hasParam(String paramName);",
"public boolean hasParameter(String name) throws IllegalArgumentExcepti... | [
"0.89203686",
"0.82963026",
"0.8009055",
"0.795468",
"0.7890665",
"0.78509545",
"0.75675267",
"0.75067437",
"0.73005307",
"0.7088834",
"0.705873",
"0.7055468",
"0.7036857",
"0.70298344",
"0.7000189",
"0.69490474",
"0.69345474",
"0.683959",
"0.68378854",
"0.67997193",
"0.67954... | 0.68770415 | 17 |
Load multiple parameters into a list | public void getMutliParams(String name, Collection<String> list) {
NodeList nodes = paramElem.getElementsByTagName(name);
for (int i = 0; i < nodes.getLength(); i++) {
Element elem = (Element) nodes.item(i);
list.add(getTextContent(elem));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static ArrayList<String> loadParameters() throws IOException {\r\n BufferedReader br = new BufferedReader(new FileReader(new File(\"conf.data\")));\r\n\r\n ArrayList<String> params = new ArrayList<>();\r\n\r\n String param;\r\n while ((param = br.readLine()) != null ){\r\n ... | [
"0.6868419",
"0.68613845",
"0.6801548",
"0.67280525",
"0.66948235",
"0.6431675",
"0.6174025",
"0.6108246",
"0.60871",
"0.6085645",
"0.6068381",
"0.6068381",
"0.6029113",
"0.601152",
"0.6003141",
"0.6000513",
"0.59996516",
"0.59786284",
"0.5960579",
"0.59490585",
"0.5906606",
... | 0.57816195 | 26 |
Get the parameters using a specialized loader | public <T> void getMultiParams(String name, Collection<T> list,
ParamsLoader<? extends T> loader)
throws HighlighterConfigurationException {
NodeList nodes = paramElem.getElementsByTagName(name);
for (int i = 0; i < nodes.getLength(); i++) {
Element elem = (Element) nodes.item(i);
list.add(loader.load(new Params(elem)));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void load() throws ParamContextException {\n\r\n }",
"public interface Loader<Params, Result>\n {\n Result result(Context context, MicroFragmentEnvironment<Params> env) throws Exception;\n }",
"private void loadParameters() throws IOException {\n\t\tBufferedReader reader... | [
"0.66089517",
"0.63575435",
"0.6169358",
"0.5979925",
"0.5907896",
"0.5849701",
"0.5817227",
"0.57557976",
"0.5744034",
"0.57329607",
"0.57301486",
"0.57281125",
"0.57281125",
"0.5722106",
"0.56550413",
"0.564823",
"0.55887467",
"0.5584357",
"0.55680937",
"0.5509891",
"0.5502... | 0.56395054 | 16 |
configuration de h2 database | @Bean
ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registrationBean = new ServletRegistrationBean(new WebServlet());
registrationBean.addUrlMappings("/console/*");
return registrationBean;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n public DataSource dataSource() {\n EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();\n EmbeddedDatabase db = builder\n .setType(EmbeddedDatabaseType.HSQL) //.H2 or .DERBY\n .addScript(\"org/springframework/batch/core/schema-drop-hsqldb.sql\")\n ... | [
"0.6629502",
"0.62384564",
"0.6230745",
"0.61843765",
"0.61643857",
"0.6090024",
"0.60433006",
"0.6034056",
"0.6023516",
"0.6019133",
"0.59937155",
"0.5909011",
"0.5902542",
"0.5871001",
"0.58191234",
"0.5814051",
"0.58048046",
"0.58014613",
"0.5736954",
"0.57187784",
"0.5666... | 0.0 | -1 |
|70| |75| |80| || 0 1 2 3 4 arr.insert(70); arr.insert(80); arr.insert(75); | public boolean find(int key){
int BB = 0,BA = nElemen-1;
boolean search = true;
while(search){
int mid = (BA+BB)/2;
if(arr[mid]==key){
search = false;
return true;
}else if (BB>BA){
break;
}else{
if(arr[mid]<key){
BB = mid + 1;
}else{
BA = mid - 1;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void insertion(int[] a){\n int size = a.length;\n int key = 0;\n \n for(int i = 1; i < size; i++){\n key = a[i];\n for(int j = i-1; j >= 0 && key < a[j]; j--){\n a[j+1] = a[j];\n a[j] = key;\n }\n }\n }",
"public void insert(int i) {\n\t\tif (top > -2 &... | [
"0.663094",
"0.64364177",
"0.6429883",
"0.63878566",
"0.6311878",
"0.6264983",
"0.6251042",
"0.62201506",
"0.6209315",
"0.6147575",
"0.6138043",
"0.6114145",
"0.610772",
"0.6033369",
"0.6016855",
"0.60168195",
"0.6012947",
"0.6002977",
"0.59767365",
"0.59473747",
"0.5918102",... | 0.0 | -1 |
/ Methods for ATutor to call via Liveconnect | public final void ATutorPrepare (String sco_id) {
URLConnection po;
ATutorScoCmi.clear();
StringBuffer P = new StringBuffer();
P.append ("&sco_id="+sco_id);
say ("Retreiving cmi for sco="+sco_id+" from ATutor server");
try {
//po = (HttpURLConnection) ( new java.net.URL (
po = (URLConnection) ( new java.net.URL (
getCodeBase().toString() + "read.php"
)).openConnection();
po.setRequestProperty (
"Content-Type",
"application/x-www-form-urlencoded"
);
po.setRequestProperty (
"Content-Length",
Integer.toString (P.length())
);
po.setDoOutput (true);
po.setUseCaches (false);
//po.setRequestMethod ("POST");
po.setAllowUserInteraction (false);
OutputStream os = po.getOutputStream();
os.write (P.toString().getBytes());
os.flush ();
os.close ();
BufferedReader br = new BufferedReader(
new InputStreamReader(
po.getInputStream ()
)
);
String s, l, r;
while ((s=br.readLine())!=null) {
if (s.indexOf('=') == -1) continue;
l = s.substring (0, s.indexOf('='));
r = s.substring (s.indexOf('=')+1, s.length());
r = decode (r);
say (" "+l + "="+r);
ATutorScoCmi.put (l,r);
}
} catch (Exception e) {
say ("ATutor cmi retrieval failed.");
say (e.toString());
}
ATutorPreparedScoId = sco_id;
say ("Done. Note: this was cmi for the next sco ("+sco_id+") to launch.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);",
"public void OnConnectSuccess();",
"public interface LiveHostEvents extends LiveEvents{\n /** Live infomation\n * @param strUrl Rtmp/Hls url\n * @param strSessionId SessionId\n */\n public... | [
"0.62490726",
"0.619217",
"0.605974",
"0.59838104",
"0.5930419",
"0.58785784",
"0.58333665",
"0.57936805",
"0.57924056",
"0.57800484",
"0.57731605",
"0.57638925",
"0.5759372",
"0.5732547",
"0.571779",
"0.5715964",
"0.57014936",
"0.56871015",
"0.56871015",
"0.56871015",
"0.568... | 0.0 | -1 |
/ Liveconnect interface methods for SCO | public final String LMSInitialize (String s) {
String rv = core.LMSInitialize(s);
say ("LMSInitialize("+s+")="+rv);
if (rv.equals("false")) return rv;
core.reset();
rv = core.LMSInitialize(s);
ATutorScoId = ATutorPreparedScoId;
core.sysPut ("cmi.core.student_id", ATutorStudentId);
core.sysPut ("cmi.core.student_name", ATutorStudentName);
core.sysPut (ATutorScoCmi);
core.transBegin();
return rv;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnGetLiveStreamProgramsListener {\n void onGetLiveStreamProgramsSuccess(SCLiveStream stream, SCLiveStreamPrograms programs);\n void onGetLiveStreamProgramsFailed(SCFailLog reason);\n}",
"public interface LiveHostEvents extends LiveEvents{\n /** Live infomation\n * @param strUrl ... | [
"0.6725634",
"0.6111148",
"0.60245717",
"0.60245717",
"0.60091233",
"0.5883976",
"0.58821434",
"0.58821434",
"0.58821434",
"0.58339566",
"0.5820711",
"0.58182466",
"0.57952744",
"0.5786241",
"0.5785803",
"0.5771888",
"0.5769723",
"0.574607",
"0.56664455",
"0.5648343",
"0.5634... | 0.0 | -1 |
3ayez a7rak el lowkey | public void setLowKey(KeyClass low_key) throws ChainException, IOException {
this.lowKey = low_key;
RID rid = new RID();
KeyDataEntry dEntry = leaf.getFirst(rid);
KeyClass curKey = dEntry.key;
while( BT.keyCompare(curKey, low_key) != 0 ){
dEntry = leaf.getNext(rid);
if( dEntry != null ){
curKey = dEntry.key;
}else{
PageId nextPageId = leaf.getNextPage();
if( nextPageId.pid != -1){
SystemDefs.JavabaseBM.unpinPage(leaf.getCurPage(), true);
SystemDefs.JavabaseBM.pinPage( nextPageId, leaf, false);
leaf.dumpPage();
dEntry = leaf.getFirst(rid);
curKey = dEntry.key;
}else{
//wasal le 2a5er 7aga:
System.out.println("Invalid lower keyyyyyyy.");
break;
}//end else.
}//end else.
}//end while.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLowestChromKey();",
"int getKeyCode();",
"public short key();",
"C key();",
"public void lowerKey(){\n\t\tkey = clamp(key-INCREMENT, MINKEY, MAXKEY);\n\t}",
"public abstract void keyexplore(long ms);",
"public Key min();",
"public String getHighestChromKey();",
"public abstract V... | [
"0.6527777",
"0.6047331",
"0.59487414",
"0.58423513",
"0.5841484",
"0.5824761",
"0.5783366",
"0.57767284",
"0.5738933",
"0.57299215",
"0.57299215",
"0.5696192",
"0.5667658",
"0.5642855",
"0.5633394",
"0.56235296",
"0.561966",
"0.55552524",
"0.5517807",
"0.55002254",
"0.549706... | 0.5892882 | 3 |
register by email process | private void registerByEmail() {
String username = editUsername.getText().toString();
String email = editEmail.getText().toString();
String password = editPassword.getText().toString();
AVUser person = new AVUser();
person.setUsername(username);
person.setEmail(email);
person.setPassword(password);
person.put(Person.NICK_NAME,username);
person.signUpInBackground(new SignUpCallback() {
@Override
public void done(AVException e) {
if (e == null) {
ShowMessageUtil.tosatFast("register successful!", EmailRegisterActivity.this);
openValidateDialog();
} else {
ShowMessageUtil.tosatSlow("fail to register:" + e.getMessage(), EmailRegisterActivity.this);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void registerEmailAddr() {\r\n\t\t\t\tWindow.setTitle(Common.APPNAME);\r\n\t\t\t\tmanualRegisterBtn.setEnabled(false);\r\n\t\t\t\tfinal String emailAddrProvided = emailAddrField.getText();\r\n\t\t\t\tserverResponseLabel.setText(\"\");\r\n\t\t\t\tregisterService.manualRegister(emailAddrProvided,\r\n\t\t\t\t... | [
"0.7583377",
"0.7233928",
"0.717407",
"0.70212066",
"0.699779",
"0.69286954",
"0.6927736",
"0.6901458",
"0.6894812",
"0.6865554",
"0.684833",
"0.6762222",
"0.6708425",
"0.669957",
"0.66939646",
"0.66850746",
"0.6669234",
"0.6633587",
"0.66140085",
"0.6597461",
"0.6593405",
... | 0.75594366 | 1 |
verify user input data | private boolean validateInput() {
String username = editUsername.getText().toString().trim();
String email = editEmail.getText().toString().trim();
String password = editPassword.getText().toString().trim();
String repeatPassword = editRepeatPassword.getText().toString().trim();
if (!password.equals(repeatPassword)) {
ShowMessageUtil.tosatSlow("Enter passwords differ", EmailRegisterActivity.this);
return false;
} else if (username.equals("") || email.equals("") || password.equals("")) {
ShowMessageUtil.tosatSlow("every item can not be empty!", EmailRegisterActivity.this);
return false;
}
if (username.length()>10){
ShowMessageUtil.tosatSlow("the character length of the username can't be over than 10", EmailRegisterActivity.this);
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean verifyInput();",
"private void checkUserInput() {\n }",
"protected abstract boolean checkInput();",
"public boolean checkInput();",
"private boolean isValidInput() {\n\t\treturn true;\n\t}",
"private void validateData() {\n }",
"private void validateInputParameters(){\n\n ... | [
"0.77294964",
"0.76709706",
"0.72846544",
"0.71263754",
"0.7125018",
"0.7069666",
"0.6974959",
"0.69509345",
"0.68966246",
"0.68434733",
"0.67244476",
"0.66439843",
"0.6578723",
"0.6573277",
"0.6517822",
"0.6501393",
"0.64696825",
"0.6447431",
"0.6357259",
"0.6336966",
"0.632... | 0.61847556 | 32 |
open verify email dialog, send verify email | private void openValidateDialog() {
final ValidateEmailDialog dialog = new ValidateEmailDialog(EmailRegisterActivity.this, EmailRegisterActivity.this, editEmail.getText().toString().trim());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendEmailVerification() {\n showProgressDialog();\n\n // [START send_email_verification]\n final FirebaseUser user = mAuth.getCurrentUser();\n assert user != null;\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Voi... | [
"0.641896",
"0.6405121",
"0.6199174",
"0.61495554",
"0.60519606",
"0.60516375",
"0.60392916",
"0.59985495",
"0.5962145",
"0.59573376",
"0.59426934",
"0.59088945",
"0.58958983",
"0.5890476",
"0.5876096",
"0.58718306",
"0.5855889",
"0.5842179",
"0.58305794",
"0.5775577",
"0.576... | 0.65088075 | 0 |
/ method for department 1's bonus So I made this overly complicated | private static int getBonus(int sales) {
if (sales > 5000) {
return sales / 10;
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addemp(Dept dept);",
"public static void main(String[] args) {\n\t\tScanner myScan = new Scanner(System.in);\r\n\t\tString strAns, empName;\r\n\t\tdouble sumSalaries=0;\r\n\t\tboolean found=false;\r\n\t\tDeptEmployee[ ] department = new DeptEmployee [6];\r\n\t\tGregorianCalendar hired;\r\n\t\t\r\n\... | [
"0.62920177",
"0.611564",
"0.6114295",
"0.5885638",
"0.5877082",
"0.58573747",
"0.5831329",
"0.5743612",
"0.56972337",
"0.5605324",
"0.5577416",
"0.55726105",
"0.5571815",
"0.55504274",
"0.55375654",
"0.55326563",
"0.5519537",
"0.5518015",
"0.5508096",
"0.5500637",
"0.5485068... | 0.5336689 | 33 |
method for department 2's bonus | private static float getBonus(float unitSales) {
if (unitSales >= 25) {
return unitSales * 20;
}
else if (unitSales > 0) {
return unitSales * 10;
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addemp(Dept dept);",
"int getBonusMoney();",
"public abstract int getBonus();",
"int getBonusExp();",
"int getBonusExp();",
"public abstract double getDepositDiscount();",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"double getPaid();",
... | [
"0.6516142",
"0.63019747",
"0.60825187",
"0.6066547",
"0.6066547",
"0.5940328",
"0.5937149",
"0.5891381",
"0.58909655",
"0.5881364",
"0.5853214",
"0.5819953",
"0.58118576",
"0.58117175",
"0.5810542",
"0.58098596",
"0.57822585",
"0.5758302",
"0.57576686",
"0.5750656",
"0.57458... | 0.0 | -1 |
method for department 3's bonus | private static double getBonus(double unitsMade,double workAmount) {
if (workAmount == 1) {
if (unitsMade > 250) {
return unitsMade * 0.10;
}
return 0;
}
else if (workAmount == 2) {
if (unitsMade > 700) {
return unitsMade * 0.10;
}
return 0;
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addemp(Dept dept);",
"int getBonusMoney();",
"public abstract int getBonus();",
"int getBonusExp();",
"int getBonusExp();",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public Integer costOfDepartment() {\n Integer total = 0;\n ... | [
"0.62871313",
"0.628463",
"0.6048497",
"0.6020204",
"0.6020204",
"0.5998262",
"0.5916863",
"0.5845233",
"0.5807365",
"0.5789763",
"0.5776883",
"0.5758752",
"0.5748536",
"0.5747251",
"0.5747243",
"0.5714141",
"0.57073975",
"0.56827545",
"0.5682474",
"0.56738144",
"0.5672812",
... | 0.5692253 | 17 |
get 1d position given coordinates | int getPos(int xPos, int yPos) {
return yPos * Game.ROWLENGTH + xPos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Coordinate getPosition();",
"Point getPosition();",
"Point getPosition();",
"public Point getPosition();",
"double getXPosition();",
"double getX() { return pos[0]; }",
"void getPosRelPoint(double px, double py, double pz, DVector3 result);",
"double getPositionX();",
"double getPositionX();... | [
"0.6745788",
"0.67073447",
"0.67073447",
"0.65537655",
"0.6456243",
"0.6423725",
"0.6385961",
"0.63820845",
"0.63820845",
"0.63820845",
"0.6315484",
"0.62866753",
"0.62866753",
"0.6247692",
"0.6236483",
"0.6196598",
"0.6192754",
"0.61817867",
"0.6176096",
"0.61603457",
"0.613... | 0.0 | -1 |
get x position given 1d position | int getXpos(int pos) {
return pos % Game.ROWLENGTH;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"double getXPosition();",
"public int getX() { return position.x; }",
"public int getXPos();",
"public final int getPositionX() {\r\n return (int) position.x();\r\n }",
"public float getPositionX() {return this.pos... | [
"0.8301379",
"0.8301379",
"0.8301379",
"0.8091996",
"0.79060304",
"0.7832421",
"0.7823732",
"0.7684481",
"0.7669282",
"0.7605976",
"0.75772965",
"0.75723535",
"0.7566772",
"0.7547639",
"0.75447077",
"0.7528494",
"0.751205",
"0.7499988",
"0.7499988",
"0.74994224",
"0.74826205"... | 0.70866966 | 65 |
get y positon given 1d position | int getYpos(int pos) {
return (int) pos / Game.ROWLENGTH;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getYPosition();",
"double getY() { return pos[1]; }",
"public int getY(){\n return this.position[1];\n }",
"public double getYPos() {\n\t\treturn this.position[1];\n\t}",
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"public int getYPos();",
"public ... | [
"0.8337898",
"0.8335342",
"0.8191114",
"0.81612563",
"0.8148061",
"0.8148061",
"0.8148061",
"0.80066234",
"0.78994274",
"0.78323966",
"0.781325",
"0.7791029",
"0.77099884",
"0.7693919",
"0.76521486",
"0.7645046",
"0.76419824",
"0.76385915",
"0.7638018",
"0.76311946",
"0.76231... | 0.74714816 | 44 |
Represents a program (or script)that is, a sequence of actions on a programmable microworld object to control its behavior. | public interface Program
{
// ----------------------------------------------------------
/**
* Represents a sequence of actions to carry out, one turn at a time.
*/
public void myProgram();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Program createProgram();",
"Program createProgram();",
"Program createProgram();",
"RoverProgram createRoverProgram();",
"public void exec(OxProgram pgm) {\n }",
"public Program getProgram() {\n return this.program;\n }",
"public interface EscapyExecutableObjects extends EscapyExecutab... | [
"0.611509",
"0.611509",
"0.611509",
"0.5979237",
"0.5593595",
"0.55196315",
"0.5515554",
"0.5511042",
"0.54783803",
"0.5471683",
"0.5391112",
"0.538869",
"0.5387502",
"0.5358673",
"0.53522813",
"0.53458786",
"0.5336856",
"0.5323495",
"0.53112",
"0.5310485",
"0.5289735",
"0.... | 0.59014857 | 4 |
Represents a sequence of actions to carry out, one turn at a time. | public void myProgram(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void determineNextAction();",
"public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}",
"public List<NPCAction> getActionSequence() {\n return actionSequence;\n }",
"Stream<ActionDefinition> actions();",
"interface Action {\n /**\n * Ex... | [
"0.6326933",
"0.6181812",
"0.6172363",
"0.6059397",
"0.60249466",
"0.59598565",
"0.5910783",
"0.5870685",
"0.5845361",
"0.5834446",
"0.5784557",
"0.5764844",
"0.5762706",
"0.5725829",
"0.57247454",
"0.57210594",
"0.5700581",
"0.5648231",
"0.5626444",
"0.560501",
"0.56035215",... | 0.0 | -1 |
Center region can't be enabled the collapsed margin functionality. | public void setCmargins(String cmargins) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"@Override\n\tpublic void setCenterView() {\n\n\t}",
"private void centre() {\n Dimension localDimension = Toolkit.getDefaultToolkit().getScreenSize();... | [
"0.754688",
"0.6825429",
"0.6272418",
"0.6256548",
"0.615985",
"0.6066128",
"0.60119116",
"0.5975784",
"0.59506",
"0.5905719",
"0.58566284",
"0.58263665",
"0.5820208",
"0.58103836",
"0.579898",
"0.57726437",
"0.57636636",
"0.57577455",
"0.5727796",
"0.5712515",
"0.570805",
... | 0.0 | -1 |
Center region can't be enabled the split functionality. | public void setSplittable(boolean splittable) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void defaultstatus()\n {\n try{\n this.isExpaneded = false;\n \n // hide the right annotation edit and diff area\n if (main_splitpane !=null)\n {\n main_splitp... | [
"0.76313275",
"0.6792251",
"0.6376852",
"0.6354516",
"0.6082762",
"0.5865914",
"0.5847566",
"0.5836768",
"0.58081484",
"0.5748758",
"0.570741",
"0.56796664",
"0.5671454",
"0.5652264",
"0.56369585",
"0.5609181",
"0.5584637",
"0.558355",
"0.553522",
"0.55177015",
"0.5516048",
... | 0.0 | -1 |
Center region can't be closed. | public void setOpen(boolean open) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}",
"@Override\n public boolean isGoodForInterior()\n {\n return false;\n ... | [
"0.6846334",
"0.6072725",
"0.5811275",
"0.5743752",
"0.5726876",
"0.56078774",
"0.5594319",
"0.5572188",
"0.5569537",
"0.5536943",
"0.5496128",
"0.54776406",
"0.54454076",
"0.54045117",
"0.53504914",
"0.53473777",
"0.5345702",
"0.5342693",
"0.5334168",
"0.53179646",
"0.531791... | 0.0 | -1 |
Center region can't be enabled the collapse functionality. | public void setCollapsible(boolean collapsible) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"public void defaultstatus()\n {\n try{\n this.isExpaneded = false;\n \n // hide the right annotation edit and diff area\n ... | [
"0.7131344",
"0.6283417",
"0.62516886",
"0.58256954",
"0.58061916",
"0.5798787",
"0.57255095",
"0.5622078",
"0.5597268",
"0.5588006",
"0.5584498",
"0.55689365",
"0.5559291",
"0.55288756",
"0.5523809",
"0.5512758",
"0.5511754",
"0.54770637",
"0.54575366",
"0.5428634",
"0.54140... | 0.0 | -1 |
Center region can't be enabled the maxsize. | public void setMaxsize(int maxsize) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void setMaximizing() {\r\n maximizing = true;\r\n }",
"@Override\n\tpublic int getMinSizeZ()\n\t{\n\t\treturn 50;\n\t}",
"@Override\n\tpublic int getMinSizeX()\n\t{\n\t\treturn 50;\n\t}",
"public voi... | [
"0.6309163",
"0.6256361",
"0.61169714",
"0.6115335",
"0.60667086",
"0.59337944",
"0.58776563",
"0.58208555",
"0.5802765",
"0.57948095",
"0.57948095",
"0.57790977",
"0.5778766",
"0.573923",
"0.57371587",
"0.57362545",
"0.57191616",
"0.5713755",
"0.5704758",
"0.56901217",
"0.56... | 0.0 | -1 |
Center region can't be enabled the minsize. | public void setMinsize(int minsize) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"@Override\n\tpublic int getMinSizeX()\n\t{\n\t\treturn 50;\n\t}",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"public void setMinSize(double aWidth, double aHeight) { setMinWidth(aWidth); setMinHeight... | [
"0.6881203",
"0.63845587",
"0.6353285",
"0.63185406",
"0.6260827",
"0.6257455",
"0.6180321",
"0.6158858",
"0.6147662",
"0.60905904",
"0.6061595",
"0.59731114",
"0.59729403",
"0.5965794",
"0.5960441",
"0.59550476",
"0.5920353",
"0.58847183",
"0.58847183",
"0.58222556",
"0.5815... | 0.5654688 | 37 |
This component can't be hidden. | public boolean setVisible(boolean visible) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"public void componentHidden(ComponentEvent e) {}",
"@Override\n public void componentHidden(final ComponentEvent e) {\n // Do nothing\n }",
"public void componentHidden(ComponentEvent e) { }",
"public vo... | [
"0.7461874",
"0.736838",
"0.7353222",
"0.7285989",
"0.7285989",
"0.7285989",
"0.7285989",
"0.7272529",
"0.7259041",
"0.72577965",
"0.72577965",
"0.72400707",
"0.72289175",
"0.72012126",
"0.7198505",
"0.7198505",
"0.71975285",
"0.7197277",
"0.71961945",
"0.71885717",
"0.718845... | 0.0 | -1 |
The size can't be returned in this component. | public String getSize() {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int getSize() throws Exception {\n return 0;\n }",
"public int getSize() {\n return -1;\n }",
"@Override\n public int size() { return size; }",
"@Override\r\n public int size() {\r\n return size;\r\n }",
"@Override\r\n public int size() {\r\n return siz... | [
"0.7024925",
"0.7005531",
"0.6958295",
"0.6901371",
"0.6901371",
"0.6901371",
"0.68865854",
"0.6880974",
"0.68731344",
"0.68731344",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
"0.6869864",
... | 0.0 | -1 |
The size can't be specified in this component. | public void setSize(String size) {
throw new UnsupportedOperationException("readonly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSize(int size){\n this.size = size;\n }",
"public void setSize(int size) {\r\n this.size = size;\r\n }",
"protected abstract void setSize();",
"public void setSize(int size) {\n this.size = size;\n }",
"public void setSize(int size) {\n this.size = size;\n ... | [
"0.7052027",
"0.6955131",
"0.6915488",
"0.68725246",
"0.68725246",
"0.686234",
"0.68558",
"0.6829901",
"0.682276",
"0.68099856",
"0.67897266",
"0.6782882",
"0.6746327",
"0.6738446",
"0.6731689",
"0.6723685",
"0.66658676",
"0.66658676",
"0.66658676",
"0.66658676",
"0.6647555",... | 0.63961935 | 34 |
Returns the default collapsed margin ([3, 3, 3, 3]). | protected int[] getDefaultCmargins() {
return new int[] { 3, 3, 3, 3 };
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default Integer getHorizontalMargin() {\n return null;\n }",
"Margin createMargin();",
"default Integer getVerticalMargin() {\n return null;\n }",
"private int maxTopMargin() {\n return 0;\n }",
"private double getMargin(List<Integer> range) {\n if (range.... | [
"0.6535256",
"0.63378954",
"0.61881816",
"0.6150769",
"0.6093395",
"0.60360426",
"0.6000657",
"0.5945018",
"0.58232135",
"0.5663644",
"0.558839",
"0.5532896",
"0.55299115",
"0.55102503",
"0.54459035",
"0.54425675",
"0.5399067",
"0.53905714",
"0.53780013",
"0.53780013",
"0.537... | 0.7164123 | 0 |
you can create test code here. Call the methods that you'll implement during the course of this exercise | public static void main(String[] args) {
Checker checker = new Checker();
String string = "tue";
checker.isDayOfWeek(string);
String wrongString = "asd";
checker.isDayOfWeek(wrongString);
String vocalString = "aaaeeeeiii";
checker.allVowels(vocalString);
String notVocalString = "aaaaeeeyyy";
checker.allVowels(notVocalString);
String time = "12:12:12";
checker.timeOfDay(time);
String notTime = "abc";
checker.timeOfDay(notTime);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void test() {\n\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private test5() {\r\n\t\r\n\t}",
"public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"@Test\n... | [
"0.6754236",
"0.6599036",
"0.65669495",
"0.6550424",
"0.6509265",
"0.64758575",
"0.6473983",
"0.64684075",
"0.64449036",
"0.64375496",
"0.641791",
"0.6416595",
"0.6406775",
"0.6400577",
"0.6362825",
"0.63582015",
"0.633619",
"0.632971",
"0.63269365",
"0.6310961",
"0.63036925"... | 0.0 | -1 |
Asigna el valor del ServerSocket a utilizar | public void setServer(int port) {
this.server = port;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServerSocket getSocket() {\n\t\treturn socket;\n\t}",
"public String getSocket() {\n return socket;\n }",
"public ServerSocket getServerSocket() {\n return this.ss;\n }",
"int getServerSocketCount();",
"private static Socket getSocket() \n{\n return socket; \n }",
"public Serve... | [
"0.7006055",
"0.6862591",
"0.68497074",
"0.6630621",
"0.6605048",
"0.65831214",
"0.6580432",
"0.6562345",
"0.652235",
"0.6461935",
"0.6456768",
"0.64036316",
"0.6348746",
"0.63417375",
"0.63243437",
"0.62778854",
"0.62708205",
"0.62594587",
"0.62140155",
"0.6214003",
"0.62119... | 0.0 | -1 |
Constructor de la clase | public Puertos() {
estaDisponibleServerSocket();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public Pasien() {\r\n }",
"public CyanSus() {\n\n }",
"public Clade() {}",
"public Carrera(){\n }",
"public Classe() {\r\n }",
"public Chauffeur() {\r\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public SlanjePoruk... | [
"0.8376671",
"0.82482725",
"0.7757712",
"0.76491547",
"0.764287",
"0.75641066",
"0.7557304",
"0.7555219",
"0.75255686",
"0.7461729",
"0.74616057",
"0.7438721",
"0.74067116",
"0.7393601",
"0.73794305",
"0.737154",
"0.73671997",
"0.7337879",
"0.7337316",
"0.73341864",
"0.731324... | 0.0 | -1 |
Created by Michael Chan on 4/13/2017. | public interface QueryContactRepository extends JpaBaseRepository<QueryContact,Integer>
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"protected boolean ... | [
"0.5791606",
"0.57215136",
"0.57168067",
"0.5667338",
"0.5645328",
"0.5633825",
"0.5625965",
"0.5620152",
"0.5582951",
"0.55630624",
"0.5533234",
"0.5485118",
"0.5485118",
"0.545992",
"0.5409524",
"0.53887737",
"0.5375977",
"0.5375182",
"0.5372815",
"0.5369016",
"0.53663254",... | 0.0 | -1 |
Initialize a hand of dice | public Hand(){
dice = new Die[HAND_SIZE];
for(int i = 0; i < dice.length; ++i){
dice[i] = new Die();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Dice() {\n this.random = new Random();\n this.faces = 6;\n }",
"public Dice() {\n sides = new char[] { 'U', 'F', 'R', 'B', 'L', 'D' };\n }",
"public Dice() {\n\t\td1 = 0;\n\t\td2 = 0;\n\t}",
"public Dice() {\n //Can it be simpler, than that..\n this.sides = 20;... | [
"0.77090496",
"0.76764196",
"0.7514812",
"0.7417055",
"0.7204671",
"0.7010133",
"0.69815785",
"0.69457614",
"0.6942659",
"0.69091547",
"0.6704641",
"0.6561826",
"0.65395635",
"0.6517126",
"0.64913857",
"0.6406778",
"0.6383199",
"0.63687325",
"0.6353896",
"0.6225809",
"0.62140... | 0.7662399 | 2 |
Roll only the selected dice. Dice are specified with booleans at corresponding indices | public void roll(boolean [] which){
for(int i = 0; i < HAND_SIZE; ++i){
if(which[i]){
dice[i].roll();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1... | [
"0.6678915",
"0.6461947",
"0.6414352",
"0.63048315",
"0.62971354",
"0.62813926",
"0.6249765",
"0.61396074",
"0.6138814",
"0.6122128",
"0.6119136",
"0.6112236",
"0.6091614",
"0.60782224",
"0.60306406",
"0.60265297",
"0.60042983",
"0.5977324",
"0.59736395",
"0.5951095",
"0.5926... | 0.76085556 | 0 |
Roll all of the dice. | public void roll(){
roll(new boolean[]{true,true,true,true,true});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rollAllDices() {\n for(int i = 0; i < dicesList.size(); i++) {\n dicesList.get(i).roll();\n }\n }",
"public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n ... | [
"0.8172633",
"0.79267216",
"0.7926565",
"0.75515795",
"0.74691236",
"0.74655807",
"0.74069226",
"0.739119",
"0.7365312",
"0.7364838",
"0.72440517",
"0.721589",
"0.7193395",
"0.7179021",
"0.71173704",
"0.7109483",
"0.70658284",
"0.7064791",
"0.7007691",
"0.70030475",
"0.699261... | 0.6841682 | 29 |
Detect if the hand is currently 3ofakind A hand is three of a kind if three dice show the same number and each other die shows a value which is different from all other dice. (e.g. 3 3 3 2 1) | public boolean isThreeOfAKind(){
ArrayList<Integer> numbers = new ArrayList<>();
for (int i = 0; i < dice.length; i++){
numbers.add(dice[i].getFaceValue());
}
int pairsOfThree = 0;
int pairsOfTwo = 0;
for(int i = 0; i < numbers.size(); i++){
int numSame = 0;
for(int j = 0; j < numbers.size(); j++){
if(numbers.get(i).equals(numbers.get(j))){
numSame++;
}
}
if (numSame == 2){
pairsOfTwo++;
}
if (numSame == 3){
pairsOfThree++;
}
}
if (pairsOfTwo > 0){
return false;
}
return (pairsOfThree == 3);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateThreeOfAKind(Die[] dice) {\n for (int i = 0; i < 6; i++) {\n if (this.numOfOccurances(dice, i) >= 3) {\n this.threeOfAKind = this.diceSum(dice);\n //System.out.println(\"you have gotten a three of a kind\");\n return;\n }\n }\n this.threeOfAKind = 0;\n ... | [
"0.7248908",
"0.67721474",
"0.6743575",
"0.6704818",
"0.6617195",
"0.66153723",
"0.65994316",
"0.65987265",
"0.65633565",
"0.6468601",
"0.6437038",
"0.64180666",
"0.6410166",
"0.626394",
"0.62483186",
"0.6243985",
"0.622907",
"0.61683595",
"0.6146389",
"0.6113438",
"0.6061851... | 0.7347206 | 0 |
Detect if the hand is currently 4ofakind A hand is three of a kind if four dice show the same number and the other die shows a value which is different from all other dice. (e.g. 4 4 4 4 1) | public boolean isFourOfAKind(){
ArrayList<Integer> numbers = new ArrayList<>();
for (int i = 0; i < dice.length; i++){
numbers.add(dice[i].getFaceValue());
}
for(int i = 0; i < numbers.size(); i++){
int numSame = 0;
for(int j = 0; j < numbers.size(); j++){
if(numbers.get(i).equals(numbers.get(j))){
numSame++;
}
}
if (numSame == 4){
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasFourOfAKind(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasFourOfAKind(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning false\");\n\t\t\treturn false;\n\t\t}... | [
"0.7219369",
"0.721234",
"0.71176046",
"0.69925237",
"0.68569326",
"0.6804093",
"0.6756331",
"0.6749193",
"0.665791",
"0.6608467",
"0.6565008",
"0.6558892",
"0.64658386",
"0.64424115",
"0.6427807",
"0.6412448",
"0.63732404",
"0.63651854",
"0.63447726",
"0.62997675",
"0.629956... | 0.7576955 | 0 |
Detect if the hand is currently 5ofakind A hand is three of a kind if all five dice show the same number. (e.g. 5 5 5 5 5) | public boolean isFiveOfAKind(){
ArrayList<Integer> numbers = new ArrayList<>();
for (int i = 0; i < dice.length; i++){
numbers.add(dice[i].getFaceValue());
}
for(int i = 0; i < numbers.size(); i++){
int numSame = 0;
for(int j = 0; j < numbers.size(); j++){
if(numbers.get(i).equals(numbers.get(j))){
numSame++;
}
}
if (numSame == 5){
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isFourOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < num... | [
"0.7171473",
"0.7120511",
"0.7093944",
"0.7075644",
"0.6945084",
"0.67189497",
"0.6614388",
"0.65884215",
"0.65812206",
"0.65534914",
"0.6525736",
"0.64925855",
"0.6469586",
"0.64688206",
"0.64128083",
"0.637126",
"0.63484627",
"0.63479996",
"0.63307446",
"0.62921876",
"0.629... | 0.77169275 | 0 |
Detect if the hand is currently a full house A hand is a full house if three dice show the same number and the other two show thea different number which is the same as each other (e.g. 3 3 3 2 2) | public boolean isFullHouse(){
// TODO
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean validFullHouse() {\n int highestTwo, highestThree;\n highestTwo = highestThree = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if (value == 2 && key > highestTwo)\n highestTwo = key;\n... | [
"0.734105",
"0.7115966",
"0.6957971",
"0.6887785",
"0.6853769",
"0.67577624",
"0.67490107",
"0.670816",
"0.6622101",
"0.6615847",
"0.65788954",
"0.6567746",
"0.6526834",
"0.6516497",
"0.6512859",
"0.6510429",
"0.6508691",
"0.6501418",
"0.6497593",
"0.6493937",
"0.64693266",
... | 0.56461763 | 88 |
Detect if the hand is currently a "small" straight A hand is a small straight if 4 dice are in sequence and the fifth is not (e.g. 1 2 3 4 1) | public boolean isSmallStraight(){
// TODO
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean hasStraight(Card [] cards) {\n\t\tint smallNum = 14;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() < smallNum){\n\t\t\t\tsmallNum = cards[i].getValue(); \n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue()... | [
"0.6867321",
"0.664392",
"0.651399",
"0.64732575",
"0.6271338",
"0.6266152",
"0.6178986",
"0.611203",
"0.6093514",
"0.5999078",
"0.5984676",
"0.598333",
"0.5918339",
"0.5906197",
"0.59012955",
"0.5886172",
"0.58737826",
"0.5859072",
"0.5846733",
"0.57935923",
"0.57809937",
... | 0.6339021 | 4 |
Detect if the hand is currently a "large" straight A hand is a small straight if all 5dice are in sequence (e.g. 1 2 3 4 5) | public boolean isLargeStraight(){
// TODO
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int scoreStraight(boolean large, Die[] dice){\n int score = 0;\n boolean scored = false;\n if(large){ // Large straight\n for(int ofs = 0;ofs < 2; ofs++) { // Large straights have two possible sets of integers to look for\n scored = true;\n ... | [
"0.65537083",
"0.636428",
"0.6210758",
"0.6037654",
"0.6005852",
"0.5990285",
"0.59050035",
"0.59013283",
"0.58365905",
"0.57629246",
"0.5755568",
"0.57501286",
"0.56701505",
"0.5629568",
"0.5595053",
"0.55541396",
"0.5528697",
"0.547597",
"0.5449011",
"0.5440235",
"0.5428546... | 0.6552906 | 1 |
Detect if the hand is currently two pair A hand is two pair if two groups of two dice each have the same value (but not the same between groups), while the fifth die matches neither group (e.g. 1 1 2 2 3) | public boolean isTwoPair() {
int numbersSame = 0;
int pairs = 0;
for (int i = 0; i < dice.length && numbersSame < 3; i++) {
numbersSame = 0;
for (int x = 0; x < dice.length; x++) {
if (dice[i].getFaceValue() == dice[x].getFaceValue()) {
numbersSame++;
}
}
if (numbersSame == 2) {
pairs++;
}
}
return (pairs == 4);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isTwoPairs(){\n \r\n List<PokerCard> pair1;\r\n List<PokerCard> pair2;\r\n \r\n //First possibility: first four cards are two pairs\r\n pair1 = cards.subList(0, 2);\r\n pair2 = cards.subList(2, 4);\r\n if(haveSameValue(pair1) && haveSameValue(p... | [
"0.70445734",
"0.6848156",
"0.67166024",
"0.6699464",
"0.66413176",
"0.6633555",
"0.6605067",
"0.6598507",
"0.6519271",
"0.6453538",
"0.64110416",
"0.64072716",
"0.63979214",
"0.63775593",
"0.635272",
"0.6287494",
"0.6270851",
"0.62593144",
"0.62412816",
"0.62290865",
"0.6194... | 0.74341327 | 0 |
Find the highest single die in a roll | public int highDie(){
int highest = this.dice[0].getFaceValue();
for (int i = 1; i < dice.length; i++){
highest = Math.max(highest, this.dice[i].getFaceValue());
}
return highest;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int rollFairDie(){\n\t\t\n\t\tdouble rand = Math.random();\n\t\tint roll = (int) (rand * 6); // [0,5] what above code does.\n\t\treturn roll + 1;\n\t}",
"public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}",
"public int roll() {\n int result = ThreadLocalRandom.current().nex... | [
"0.67734194",
"0.65940696",
"0.64963466",
"0.63815683",
"0.62830776",
"0.62359935",
"0.62166387",
"0.6126955",
"0.61259687",
"0.60942286",
"0.6072136",
"0.6058125",
"0.60232776",
"0.5961917",
"0.5883638",
"0.5877633",
"0.5865404",
"0.5837138",
"0.5837138",
"0.5813115",
"0.581... | 0.7804725 | 0 |
String of the hand | public String toString(){
String roll = "";
for(int i = 0; i < dice.length; ++i){
roll += " " + dice[i].getFaceValue();
}
return roll.substring(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getHand()\n\t{\n\t\tStringBuffer buffer = new StringBuffer(String.format(\"%s:[%d] \", getName(), getHandTotal() ));\n\t\t\n\t\tfor (Card c : hand)\n\t\t{\n\t\t\tbuffer.append(String.format(\"%s: \", c));\n\t\t}\n\n\t\treturn buffer.toString();\n\t}",
"public String handToString() {\n\t\tStringBui... | [
"0.8064805",
"0.77868104",
"0.77403414",
"0.7621618",
"0.752835",
"0.733975",
"0.72603065",
"0.7169089",
"0.70431495",
"0.6976565",
"0.69428784",
"0.69408375",
"0.68824923",
"0.6696277",
"0.66936564",
"0.66934955",
"0.66742617",
"0.6670038",
"0.6654824",
"0.6644805",
"0.66276... | 0.60914224 | 50 |
adds a new object to the list passed using the object param | @Override
public boolean createCustomer(Customer customer) {
if (customer != null) {
customers.add(customer);
logger.info("Customer added to the list");
return true;
} else {
logger.info("Failed to add customer to the list: createCustomer()");
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}",
"public void add(Object o){\n list.add(o);\n }",
"public void add(Object o);",
"public void add(WorldObject obj) {\n\troomList.add(obj);\n}",
"public void add(String nome, Object obj);",
"boolean add(Object object) ;",
"public voi... | [
"0.76914084",
"0.7681501",
"0.73307675",
"0.7326672",
"0.72568643",
"0.7244064",
"0.72342706",
"0.721047",
"0.718776",
"0.7174679",
"0.71036476",
"0.7072842",
"0.7029331",
"0.69863975",
"0.69203156",
"0.691894",
"0.69178706",
"0.6906914",
"0.685512",
"0.6851496",
"0.68134415"... | 0.0 | -1 |
returns a Customer object from the customers list | @Override
public Customer retrieveCustomer(Integer id) {
Customer customer = new Customer();
for (Customer cust : customers) {
if (cust.getId() == id) {
customer.setId(id);
customer.setUsername(cust.getUsername());
customer.setFirstName(cust.getFirstName());
customer.setLastName(cust.getLastName());
customer.setEmail(cust.getEmail());
customer.setUserType(cust.getUserType());
customer.setPassword(cust.getPassword());
customer.setAddress(cust.getAddress());
}
}
logger.info("A GET call retrieved a customer: retrieveCustomer()");
return customer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Customer> getCustomerList();",
"List<Customer> getCustomers();",
"List<Customer> getList();",
"public List<Customer> getCustomerList() {\n return new ArrayList<Customer>(customersList);\n }",
"@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> c... | [
"0.79496557",
"0.7887928",
"0.7731319",
"0.7592706",
"0.75096023",
"0.7481152",
"0.7443089",
"0.7402889",
"0.74019873",
"0.7394292",
"0.7384021",
"0.7322201",
"0.7312247",
"0.72846544",
"0.72621113",
"0.7246407",
"0.72359043",
"0.72252584",
"0.71937877",
"0.71857536",
"0.7165... | 0.71704096 | 20 |
Assigns new values passed using the object param and the id param | @Override
public boolean updateCustomer(Integer id, Customer customer) {
boolean isUpdated = false;
for (Customer cust : customers) {
if (cust.getId() == id) {
customer.setId(id);
cust.setUsername(customer.getUsername());
cust.setFirstName(customer.getFirstName());
cust.setLastName(customer.getLastName());
cust.setEmail(customer.getEmail());
cust.setUserType(customer.getUserType());
cust.setPassword(customer.getPassword());
cust.setAddress(customer.getAddress());
logger.info("Customer @id" + id + " is updated in the list");
isUpdated = true;
}
}
logger.info("Update done : updateCustomer.isUpdated = " + isUpdated);
return isUpdated;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setObject(String id, Object data);",
"protected abstract void setId(P object, Long id);",
"public abstract void setId(T obj, long id);",
"public void assignId(int id);",
"public void assign(String id, ExprNode expr) {\n if (expr instanceof ObjectNode && !assignedParams.contains(id)) {\n ... | [
"0.75158215",
"0.7164596",
"0.7159589",
"0.70023257",
"0.684244",
"0.6456934",
"0.6414228",
"0.63574046",
"0.6352906",
"0.63033307",
"0.6286387",
"0.6286387",
"0.62646395",
"0.6261349",
"0.6261349",
"0.6261349",
"0.6261349",
"0.6261349",
"0.6261349",
"0.62232167",
"0.62144136... | 0.0 | -1 |
removes the object from customers list using the id | @Override
public boolean deleteCustomer(Integer id) {
boolean isDeleted = false;
for (Customer customer : customers) {
if (customer.getId() == id) {
customers.remove(customer);
logger.info("Customer @id" + id + " is deleted from the list");
isDeleted = true;
}
}
logger.info("Delete done : deleteCustomer.isDeleted = " + isDeleted);
return isDeleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void DeleteCust(String id);",
"void deleteCustomerById(Long id);",
"void deleteCustomerById(int customerId);",
"public void removeACustomer(long id) {\r\n\t\tSystem.out.println(\"\\nRemoving the customer: \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.g... | [
"0.74665076",
"0.74344295",
"0.7328393",
"0.7248525",
"0.7229989",
"0.71529734",
"0.70729625",
"0.705403",
"0.705036",
"0.7024447",
"0.69035804",
"0.68919384",
"0.6855555",
"0.68552905",
"0.68545187",
"0.68252355",
"0.67928135",
"0.67698556",
"0.67434794",
"0.67419034",
"0.67... | 0.6624967 | 32 |
returns a list of Customer objects | @Override
public List<Customer> retrieveAllCustomers() {
logger.info("A GET call retrieved all customers: retrieveAllCustomers()");
return customers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Customer> getCustomers();",
"List<Customer> getCustomerList();",
"public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }",
"List<Customer> getList();",
"public List<Customer> getCustomers()\n {\n List<Customer> customers = new ArrayList<>();\n\n customer... | [
"0.8782649",
"0.87816024",
"0.87262815",
"0.8668349",
"0.85552394",
"0.8501353",
"0.83638966",
"0.83623993",
"0.8356456",
"0.83240855",
"0.82397294",
"0.82362396",
"0.8220911",
"0.8203313",
"0.81934863",
"0.81642383",
"0.8141067",
"0.8101404",
"0.80838585",
"0.80827427",
"0.8... | 0.7892838 | 35 |
algorithm: 1) iterate from the back find i such that a[i]a[i] 3) Swap a[i] and a[j] 4) reverse everything after index i | public void nextPermutation(int[] arr) {
int i=arr.length-2,j=arr.length-1;
for(;i>=0;i--){
if(arr[i]<arr[i+1]) break;
}
if(i!=-1){
for(;j>=0;j--){
if(arr[i]<arr[j]) break;
}
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
reverse(arr,i+1,arr.length-1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void reverse(int[] a){\n \n int n = a.length;\n \n for(int i = 0; i<n/2;i++){\n int c = a[i];\n int d = a[n-1-i];\n int temp=0;\n \n temp =c;\n c= d;\n d=temp;\n a[i]= c;\n a[n-1-i]=d;\n }\n \n \n \n }",
"privat... | [
"0.69779766",
"0.69374275",
"0.69320506",
"0.6909341",
"0.686854",
"0.6848947",
"0.6837238",
"0.68369174",
"0.67922217",
"0.67813",
"0.67803127",
"0.67741364",
"0.6773659",
"0.67171955",
"0.6662782",
"0.6655672",
"0.6644145",
"0.6644145",
"0.6644145",
"0.664211",
"0.6628201",... | 0.0 | -1 |
The main routine that tests some of the things that are defined bellow. | public static void main(String[] args) {
System.out.println("Testing expression creation and evaluation.\n");
ExpNode e1 = new Bin0pNode("+", new VariableNode(), new ConstNode(3));
ExpNode e2 = new Bin0pNode("*", new ConstNode(2), new VariableNode());
ExpNode e3 = new Bin0pNode("-", e1, e2);
ExpNode e4 = new Bin0pNode("/", e1, new ConstNode(-3));
System.out.println("For x = 3: ");
System.out.println(" " + e1 + " = " + e1.value(3));
System.out.println(" " + e2 + " = " + e2.value(3));
System.out.println(" " + e3 + " = " + e3.value(3));
System.out.println(" " + e4 + " = " + e4.value(3));
System.out.println("nTesting copying...");
System.out.println(" copy of " + e1 + " gives " + copy(e1));
System.out.println(" copy of " + e2 + " gives " + copy(e2));
System.out.println(" copy of " + e3 + " gives " + copy(e3));
System.out.println(" copy of " + e4 + " gives " + copy(e4));
// make a copy of e3, where e3.left is e1
ExpNode e3copy = copy(e3);
// make a mdification to e1
((Bin0pNode)e1).left = new ConstNode(17);
System.out.println(" modified e3: " + e3 + "; copy should be unmodified: " + e3copy);
System.out.println("nChecking test data...");
double[][] dt = makeTestData();
for (int i = 0; i < dt.length; i++) {
System.out.println(" x = " + dt[i][0] + "; y = " + dt[i][1]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"public static void main(String[] arg... | [
"0.78754765",
"0.74057454",
"0.7380473",
"0.73187643",
"0.7282212",
"0.7243894",
"0.7191186",
"0.71389174",
"0.713541",
"0.7134016",
"0.7101198",
"0.707522",
"0.7034746",
"0.7028198",
"0.7026916",
"0.7024572",
"0.69998735",
"0.697555",
"0.6953871",
"0.69371635",
"0.693033",
... | 0.0 | -1 |
Method that makes a full copy of the tree because the ExpNode is the root of an expression tree. The tree that is returned is constructed entierly of new nodes meaning that there are no pointeres back into the old copy. | static ExpNode copy(ExpNode root) {
if (root instanceof ConstNode) {
return new ConstNode(((ConstNode).root).number);
}
else if (root instanceof VariableNode) {
return new VariableNode();
}
else {
Bin0pNode node = (Bin0pNode)root;
// Left and right operand trees have to be copied not only referenced
return new Bin0pNode(node.op, copy(node.left). copy(node.right));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }",
"public Object clone()\n\t{\n\t\treturn new Tree();\n\t}",
"public Expression deepCopy()\r\n\t\t{\r\n\t\t\... | [
"0.6872693",
"0.6766241",
"0.6732869",
"0.6651795",
"0.6617179",
"0.66157705",
"0.65657467",
"0.65235",
"0.64048856",
"0.6382285",
"0.6307815",
"0.62989557",
"0.62948006",
"0.62709767",
"0.6230902",
"0.6228739",
"0.61929095",
"0.6192171",
"0.61522824",
"0.6130267",
"0.6100516... | 0.72866493 | 0 |
Method that returns an nby2 array containing sample input/output pairs. If the returned value is called data, then data[i][0] is the ith input (or x) value and data[i][1] is the corresponding output (or y) value. This method is used only for testing. | static double[][] makeTestData() {
double[][] data = new double[21][2];
double xmax = 5;
double xmin = -5;
double dx = (xmax - xmin) / (data.length -1);
for (int i = 0; i < data.length; i++) {
double x = xmin + dx * i;
double y = 2.5 * x * x * x - x * x / 3 + 3 * x;
data[i][0] = x;
data[i][1] = y;
}
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DataProvider(name = \"InputData\")\n\t \n\t public static Object[][] inputData() {\n\t \n\t return new Object[][] { { \"20\",\"20\" }, { \"10\",\"10\" }};\n\t \n\t }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public static IntArrayStack[] returnTwo(){... | [
"0.61530256",
"0.592814",
"0.5704486",
"0.55083215",
"0.5495737",
"0.54638135",
"0.53929675",
"0.5388167",
"0.53487825",
"0.51946145",
"0.5181322",
"0.51751685",
"0.51407963",
"0.5136284",
"0.5117805",
"0.511026",
"0.5090394",
"0.50858796",
"0.5083505",
"0.507381",
"0.5007244... | 0.5503694 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.