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 |
|---|---|---|---|---|---|---|
Creates a new attribute named attrName with type typeDef. Types are defined with this syntax: "columnName0:dataType0, columnName1:dataType1, ..., columnNameN1:dataTypeN1" For example this definition: "year:int, gross:int" Defines an attribute with two value columns: 'year', which is an int, and 'gross', which is also an int. Note that the dataTypeN values above must be valid Monet data types. Get these from DataTypeEnum, e.g., DataTypeEnum.BIT.toString() As a convenience, the first column's name (columnName0 above) can be omitted, which indicates the standard singlecolumn name ("value") is to be used. For example, the following two definitions are equivalent: "value:int", "int" | public void defineAttribute(String attrName, String typeDef) {
log.debug("defineAttribute(): " + attrName + ": " + typeDef);
Assert.notNull(attrName, "null attrName");
attrName = attrName.toLowerCase();
if (isAttributeDefined(attrName)) {
throw new MonetException("attribute already defined with name: " +
attrName);
}
defineAttributeInternal(attrName, typeDef);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void defineAttributeInternal(String attrName, String typeDef) {\n Assert.assertValidName(attrName);\n List attrTypeDefs = AttrType.attrTypeListForTypeDef(typeDef);\n\n // two step process\n // create a new NST with name with rows for each column in the typeDef\n // insert... | [
"0.7572087",
"0.72550297",
"0.67326754",
"0.6599341",
"0.64961606",
"0.62500083",
"0.6013918",
"0.5954063",
"0.5785364",
"0.56720954",
"0.56093895",
"0.5606302",
"0.5605545",
"0.5597212",
"0.5591421",
"0.5591421",
"0.556203",
"0.5534218",
"0.5529813",
"0.5501389",
"0.5486302"... | 0.6891069 | 2 |
Creates a new attribute, or deletes its data NST if it already exists. | public void defineAttributeOrClearValuesIfExists(String attrName, String typeDef) {
log.debug("defineAttributeOrClearValuesIfExists(): " + attrName + ": " + typeDef);
Assert.notNull(attrName, "null attrName");
attrName = attrName.toLowerCase();
ResultSet resultSet = attrNST.selectRows("name = '" + attrName + "'", "data_type", "*");
if (!resultSet.next()) {
defineAttributeInternal(attrName, typeDef);
} else {
String currentTypeDef = resultSet.getString(1);
if (!currentTypeDef.equals(typeDef)) {
throw new MonetException("Attribute already defined with a different typeDef: " +
attrName + ", " + currentTypeDef);
}
// Could call getAttrDataNST here, but there would be checking
// of the existence of the Attribute, another filter, etc.
// The call is inlined therefore to make it faster
// read as BATs
// see NST documentation for an explanation of this
int rowID = resultSet.getOID(0);
String batName = attrNST.getColumnValueAsBATName("data", rowID);
NST attrDataNST = new NST(batName);
attrDataNST.deleteRows();
attrDataNST.release();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\treturn att;\n\t\t}",
"Attribute createAttribute();",
"Attribute cre... | [
"0.6916014",
"0.6902681",
"0.6902681",
"0.6502569",
"0.6445937",
"0.6426369",
"0.639526",
"0.62967813",
"0.62382597",
"0.62265253",
"0.62054557",
"0.61424613",
"0.61195374",
"0.607421",
"0.5985309",
"0.5871879",
"0.5845572",
"0.5766039",
"0.5748931",
"0.57339156",
"0.57311785... | 0.5934856 | 15 |
Creates a new attribute ONLY if it doesn't already exist. | public void defineAttributeIfNotExists(String attrName, String typeDef) {
log.debug("defineAttributeOrClearValuesIfExists(): " + attrName + ": " + typeDef);
Assert.notNull(attrName, "null attrName");
attrName = attrName.toLowerCase();
ResultSet resultSet = attrNST.selectRows("name = '" + attrName + "'", "data_type", "*");
if (!resultSet.next()) {
defineAttributeInternal(attrName, typeDef);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Attribute createAttribute();",
"Attribute createAttribute();",
"private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\tret... | [
"0.7354272",
"0.7354272",
"0.7204838",
"0.7166631",
"0.7165952",
"0.6948911",
"0.67267495",
"0.6617823",
"0.6604919",
"0.65983796",
"0.6485689",
"0.64719045",
"0.6447214",
"0.64361393",
"0.6422022",
"0.63515145",
"0.61853427",
"0.6124765",
"0.61231476",
"0.61212087",
"0.61175... | 0.5826587 | 27 |
Fast internal version, that doesn't verify that the attribute doesn't already exist. Use with caution. | private void defineAttributeInternal(String attrName, String typeDef) {
Assert.assertValidName(attrName);
List attrTypeDefs = AttrType.attrTypeListForTypeDef(typeDef);
// two step process
// create a new NST with name with rows for each column in the typeDef
// insert a row in the attrNST pointing to that NST
// Create arrays of strings, with names and data types of each column
String[] attrNames = new String[attrTypeDefs.size() + 1];
String[] attrTypes = new String[attrTypeDefs.size() + 1];
int index = 0;
attrNames[index] = "id";
attrTypes[index++] = "oid";
Iterator attrTypeDefsIter = attrTypeDefs.iterator();
while (attrTypeDefsIter.hasNext()) {
AttrType attrType = (AttrType) attrTypeDefsIter.next();
String colName = attrType.getName();
Assert.assertValidName(colName);
attrNames[index] = colName;
attrTypes[index++] = attrType.getDataTypeEnum().toString();
}
// create AttrDataNST for new attribute's data
NST attrDataNST = new NST(Util.join(attrNames, ","), Util.join(attrTypes, ","));
String nstName = attrDataNST.save();
attrNST.insertRow(new String[]{attrName, typeDef, nstName});
attrDataNST.release();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isUniqueAttribute();",
"public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }",
"@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public AttributeAlreadyExistsException() {\... | [
"0.69223785",
"0.6857692",
"0.68216234",
"0.677109",
"0.64227587",
"0.6395525",
"0.63460684",
"0.6245641",
"0.6197703",
"0.619676",
"0.6186965",
"0.61684924",
"0.6138176",
"0.6138176",
"0.6125837",
"0.61233854",
"0.6089265",
"0.6066757",
"0.6042418",
"0.60234225",
"0.6015488"... | 0.0 | -1 |
Creates a new attribute with values based on the evaluation of an expression | public void defineAttributeWithExpression(String attrName, String expression) {
new AddAttribute().addAttribute(this, attrName, expression);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Expression createExpression();",
"NumericExpression createNumericExpression();",
"public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }",
"Attribute createAttribute();",
"Attribute createAttribute();",
"Expr createExpr();",
"ValueExpression getValueExpression(String att... | [
"0.6982024",
"0.6230231",
"0.6197749",
"0.61260855",
"0.61260855",
"0.6102443",
"0.604512",
"0.6034614",
"0.59952515",
"0.5968509",
"0.5865078",
"0.5819103",
"0.5816153",
"0.5764047",
"0.5715635",
"0.5709281",
"0.56918067",
"0.56805444",
"0.5644699",
"0.5628429",
"0.561077",
... | 0.59913146 | 9 |
Creates a new atribute of type typeDef, and uses the dataNST passed in as the storage of values (attrDataNST is not copied but used directly; it is made persistent as well) | public void defineAttributeWithData(String attrName, String typeDef,
NST attrDataNST) {
log.debug("defineAttributeWithData(): " + attrName + ": " + typeDef +
":" + attrDataNST);
Assert.notNull(attrName, "null attrName");
Assert.notNull(attrDataNST, "null attrDataNST");
attrName = attrName.toLowerCase();
if (isAttributeDefined(attrName)) {
throw new MonetException("attribute already defined with name: " +
attrName);
}
// two step process
// 1. check that the columns in the given NST match the typeDef
// b. rename columns from the dataNST to match the type definition
// 2. insert a row in the attrNST pointing to that NST
List attrTypeDefs = AttrType.attrTypeListForTypeDef(typeDef);
Assert.condition(attrTypeDefs.size() == attrDataNST.getNSTColumnNames().size() - 1,
"given and expected column types do not match");
Assert.condition(attrDataNST.getNSTColumn(0).getType() == DataTypeEnum.OID,
"first column in the NST should be of type oid");
// first, make sure that the first column is "id"
boolean isRenamedColumns = false;
String origIDName = attrDataNST.getNSTColumn(0).getName();
if (!"id".equals(origIDName)) {
attrDataNST.renameColumn(origIDName, "id");
isRenamedColumns = true;
}
Iterator attrTypeDefsIter = attrTypeDefs.iterator();
int colCnt = 1;
while (attrTypeDefsIter.hasNext()) {
AttrType attrType = (AttrType) attrTypeDefsIter.next();
NSTColumn nstColumn = attrDataNST.getNSTColumn(colCnt++);
// data type
String dataNSTColType = nstColumn.getType().toString();
Assert.condition(attrType.getDataTypeEnum().toString().equals(dataNSTColType),
"specified types do not correspond to the given types: " +
attrType + ", " + dataNSTColType);
// column name
String dataNSTColName = nstColumn.getName();
if (!dataNSTColName.equals(attrType.getName())) {
attrDataNST.renameColumn(dataNSTColName, attrType.getName());
isRenamedColumns = true;
}
}
// make the given NST persistent and insert the definition
if (isRenamedColumns) {
NST attrDataNSTCopy = attrDataNST.copy(); //save it into the top-level BAT
attrDataNST = attrDataNSTCopy;
}
String nstName = attrDataNST.save();
attrDataNST.makeWritable();
attrNST.insertRow(new String[]{attrName, typeDef, nstName});
if (isRenamedColumns) {
// release the one we just created
attrDataNST.release();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void defineAttributeInternal(String attrName, String typeDef) {\n Assert.assertValidName(attrName);\n List attrTypeDefs = AttrType.attrTypeListForTypeDef(typeDef);\n\n // two step process\n // create a new NST with name with rows for each column in the typeDef\n // insert... | [
"0.70326334",
"0.6478407",
"0.64524573",
"0.6248078",
"0.6091836",
"0.6056859",
"0.5956801",
"0.5954907",
"0.5933798",
"0.5883528",
"0.5883528",
"0.5848204",
"0.58156955",
"0.5809749",
"0.57711923",
"0.56840605",
"0.5675546",
"0.56430525",
"0.56365645",
"0.5636155",
"0.556815... | 0.70971936 | 0 |
Dangerous method that deletes all of my attributes. Primarily used for unit test cleanup. | public void deleteAllAttributes() {
Iterator attrNameIterator = getAttributeNames().iterator();
while (attrNameIterator.hasNext()) {
String attrName = (String) attrNameIterator.next();
deleteAttribute(attrName);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void removeAttributes()\n {\n attributes.clear();\n }",
"public final synchronized void removeAllAttributes() {\n\t if ( m_cache != null)\n\t \tm_cache.clear();\n\t m_cache = null;\n\t}",
"public void clearAttributes() {\n\t\t// Clear all attributes\n\t\tfor (BusinessObjec... | [
"0.7679373",
"0.6993166",
"0.6852583",
"0.6723345",
"0.6609757",
"0.6557694",
"0.6329498",
"0.63154465",
"0.62892497",
"0.6278854",
"0.6237605",
"0.6172766",
"0.61343616",
"0.61343616",
"0.61343616",
"0.61343616",
"0.61055285",
"0.61042464",
"0.61042464",
"0.61042464",
"0.606... | 0.7354269 | 1 |
Deletes the attribute named attrName. | public void deleteAttribute(String attrName) {
if (!isAttributeDefined(attrName)) {
throw new MonetException("no attribute defined with name: " + attrName);
}
deleteAttributeInternal(attrName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteAttributeIfExists(String attrName) {\n if (!isAttributeDefined(attrName)) {\n return;\n }\n deleteAttributeInternal(attrName);\n }",
"@Override\n\tpublic <E> Attr<E> remove(String attrName) {\n\t\treturn null;\n\t}",
"public void clearAttributeValues(String ... | [
"0.8440375",
"0.77678007",
"0.7563649",
"0.7545409",
"0.7328926",
"0.68540484",
"0.6852055",
"0.6824158",
"0.6823488",
"0.6703488",
"0.6663429",
"0.6659961",
"0.66507906",
"0.6633273",
"0.6631792",
"0.6588265",
"0.65781385",
"0.6464496",
"0.6403097",
"0.63902247",
"0.63591546... | 0.8547396 | 0 |
Deletes an attribute if it exists; doesn't complain if it doesn't exist. | public void deleteAttributeIfExists(String attrName) {
if (!isAttributeDefined(attrName)) {
return;
}
deleteAttributeInternal(attrName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeAttribute(TLAttribute attribute);",
"void delete(Long attributeId) throws TalentStudioException;",
"AdditionalAttributes removeAttribute(String name);",
"public void deleteAttribute(String attrName) {\n if (!isAttributeDefined(attrName)) {\n throw new MonetException(\"no a... | [
"0.6947355",
"0.6915758",
"0.67899626",
"0.66695756",
"0.66226584",
"0.6612592",
"0.6589361",
"0.6584733",
"0.65668625",
"0.6566771",
"0.65120757",
"0.64733535",
"0.64647424",
"0.6434997",
"0.64060974",
"0.63881254",
"0.63559663",
"0.63408184",
"0.6309398",
"0.6212745",
"0.62... | 0.703315 | 0 |
Deletes all attributes whose name begin with the given prefix. Returns the count of deleted attributes. | public int deleteAttributesWithPrefix(String prefix) {
List attrsFound = getAttributesWithPrefix(prefix);
int cnt = 0;
for (Iterator iter = attrsFound.iterator(); iter.hasNext();) {
String attrName = (String) iter.next();
deleteAttributeInternal(attrName);
cnt++;
}
return cnt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteAllAttributes() {\n Iterator attrNameIterator = getAttributeNames().iterator();\n while (attrNameIterator.hasNext()) {\n String attrName = (String) attrNameIterator.next();\n deleteAttribute(attrName);\n }\n }",
"public static int removeAllUserDataF... | [
"0.570756",
"0.54570955",
"0.52047473",
"0.51470023",
"0.5142111",
"0.5062507",
"0.50357974",
"0.49729443",
"0.4952542",
"0.49028438",
"0.48992914",
"0.48956177",
"0.48849604",
"0.48807707",
"0.48803395",
"0.48481402",
"0.48473984",
"0.48165703",
"0.48162317",
"0.46936047",
"... | 0.8587022 | 0 |
Returns true if the other attribute is based on the same table. | public boolean equals(Object other) {
if (other instanceof Attributes) {
Attributes otherAttr = (Attributes) other;
String otherNSTName = MonetUtil.getBBPName(otherAttr.attrNSTName);
String thisNSTName = MonetUtil.getBBPName(this.attrNSTName);
return (otherNSTName.equals(thisNSTName));
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSameAs();",
"@Override\n public boolean equals(Object other) {\n return this == other || (other instanceof ReqTable && hashCode() == other.hashCode());\n }",
"public boolean matchSameColumns(Key key);",
"@Override\npublic boolean equals(Object tbl) {\n Table table;\n\n try {... | [
"0.62816757",
"0.6207358",
"0.6206565",
"0.61997986",
"0.61557496",
"0.61219215",
"0.6081332",
"0.6031317",
"0.5977061",
"0.58818537",
"0.5861525",
"0.5830052",
"0.58038694",
"0.5799986",
"0.57492113",
"0.5687953",
"0.5664657",
"0.5617474",
"0.5597923",
"0.5586742",
"0.558478... | 0.6177519 | 4 |
Returns an NST (AttrDataNST) for the named attribute. The attrDataNST has the following columns id: oid of the item (object, link, container, subgraph) that the value applies to value: value If the attribute is multicolumn, then instead of the value column there will be several columns, named as specified by the typeDef for the attribute. | public NST getAttrDataNST(String attrName) {
attrName = attrName.toLowerCase();
ResultSet resultSet = attrNST.selectRows("name = '" + attrName + "'", "data", "*");
if (!resultSet.next()) {
throw new MonetException("no attribute defined with name: " + attrName);
}
// read as BATs
// see NST documentation for an explanation of this
int rowID = resultSet.getOID(0);
String batName = attrNST.getColumnValueAsBATName("data", rowID);
return new NST(batName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void defineAttributeWithData(String attrName, String typeDef,\n NST attrDataNST) {\n log.debug(\"defineAttributeWithData(): \" + attrName + \": \" + typeDef +\n \":\" + attrDataNST);\n\n Assert.notNull(attrName, \"null attrName\");\n ... | [
"0.6415252",
"0.6274747",
"0.5811498",
"0.5705892",
"0.5509321",
"0.54296386",
"0.5386353",
"0.53853196",
"0.537773",
"0.5363113",
"0.53114986",
"0.5293661",
"0.52717537",
"0.52694637",
"0.52448875",
"0.5239173",
"0.52148026",
"0.52020276",
"0.5193116",
"0.5178595",
"0.516454... | 0.7073907 | 0 |
Returns a List of attribute names (Strings) in me. | public List getAttributeNames() {
log.debug("getAttributeNames()");
ResultSet resultSet = attrNST.selectRows("name");
return resultSet.toStringList(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default List<String> getAttributeNames() {\n\t\treturn getAttributes().stream().map(v -> v.getName()).collect(Collectors.toList());\n\t}",
"public String [] getNames () { \n return this.listAttributes(); \n }",
"public List<String> getAttributeNames() {\n\t\treturn new ArrayList<>(attributes.keySet());\n\t... | [
"0.76966995",
"0.76822716",
"0.75296843",
"0.7306449",
"0.7229097",
"0.7178598",
"0.70838594",
"0.6832796",
"0.6816102",
"0.68024856",
"0.67567104",
"0.67505306",
"0.6726843",
"0.6679958",
"0.66570073",
"0.6654607",
"0.66416544",
"0.66237605",
"0.6586962",
"0.65802383",
"0.65... | 0.7523111 | 3 |
Returns my attrNST. For internal use only be careful. | public NST getAttrNST() {
return attrNST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NST getAttrDataNST(String attrName) {\n attrName = attrName.toLowerCase();\n\n ResultSet resultSet = attrNST.selectRows(\"name = '\" + attrName + \"'\", \"data\", \"*\");\n if (!resultSet.next()) {\n throw new MonetException(\"no attribute defined with name: \" + attrName);\n... | [
"0.6629202",
"0.6541185",
"0.6487769",
"0.62789667",
"0.6225869",
"0.6217141",
"0.61657465",
"0.6147549",
"0.60475576",
"0.6028062",
"0.60266083",
"0.6026308",
"0.60071695",
"0.5980064",
"0.59690106",
"0.5952021",
"0.59512913",
"0.59319186",
"0.593176",
"0.59293336",
"0.59239... | 0.86774576 | 0 |
Returns the type definition String of the named attribute. See defineAttribute() for attrDef's syntax. For convenience you may want to use getTypes, which parses the result of this method and returns AttrType instances for each column. | public String getAttrTypeDef(String attrName) {
if (!isAttributeDefined(attrName)) {
throw new MonetException("no attribute defined with name: " + attrName);
}
attrName = attrName.toLowerCase();
ResultSet resultSet = attrNST.selectRows("name EQ '" + attrName + "'", "data_type", "*");
if (!resultSet.next()) {
throw new MonetException("attribute not found: " + attrName);
}
return resultSet.getString(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IAttributeType<?> getAttributeType(String name);",
"public Class getAttributeType();",
"public final String getTypeAttribute() {\n return getAttributeValue(\"type\");\n }",
"public static String getTypeString(XAttribute attribute) {\n\t\tif (attribute instanceof XAttributeLiteral) {\n\t\t\tr... | [
"0.66066414",
"0.6560694",
"0.6514383",
"0.64504725",
"0.6189863",
"0.6189863",
"0.6187304",
"0.61792666",
"0.6124415",
"0.61241716",
"0.6112245",
"0.6076952",
"0.60737264",
"0.6056576",
"0.60449284",
"0.601156",
"0.595544",
"0.5927242",
"0.58834606",
"0.58834606",
"0.5883460... | 0.7250377 | 0 |
Onearg overload that passes null for attrNames. | public AttributeValues getAttrValsForOID(int oid) {
return getAttrValsForOID(oid, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String[] getAttrNames() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Enumeration<String> getAttributeNames(int arg0) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String[] getAttributeNames() {\n\t\treturn null;\r\n\t}",
"@Override\n public AttributeList getAttributes(String[] a... | [
"0.6894822",
"0.62252945",
"0.6213327",
"0.6129173",
"0.6081088",
"0.58645445",
"0.5827594",
"0.5804075",
"0.57640517",
"0.57228893",
"0.57084495",
"0.5684939",
"0.5684939",
"0.5647969",
"0.5629578",
"0.56271183",
"0.5611654",
"0.5576693",
"0.5542277",
"0.55231804",
"0.551387... | 0.0 | -1 |
Twoarg overload. Returns a AttributeValues instance which contains all attribute values in me for the thing (object, link, container, etc.) with the passed oid. Works in two ways, depending on whether attrNames is null: If attrNames is null, then returns values for all attribtutes in me. If attrNames is nonnull then limits the search to those attributes. | public AttributeValues getAttrValsForOID(int oid, List attrNames) {
List attrValues = new ArrayList();
Iterator attrNameIterator = (attrNames == null ?
getAttributeNames().iterator() : attrNames.iterator());
while (attrNameIterator.hasNext()) {
String attrName = (String) attrNameIterator.next();
if (!isAttributeDefined(attrName)) {
log.warn("skipping undefined attribute: " + attrName);
continue;
}
NST attrDataNST = getAttrDataNST(attrName); // checks name is defined
ResultSet resultSet = attrDataNST.selectRows("id = " + oid, "*", "*");
while (resultSet.next()) {
int columnCount = resultSet.getColumnCount();
String[] values = new String[columnCount - 2]; // don't store the head and oid columns
for (int colNum = 2; colNum < columnCount; colNum++) {
values[colNum - 2] = resultSet.getString(colNum);
}
attrValues.add(new AttributeValue(attrName, values));
}
attrDataNST.release();
}
return new AttributeValues(attrValues, this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AttributeValues getAttrValsForOID(int oid) {\n return getAttrValsForOID(oid, null);\n }",
"default List<Object> getAttributeValues(T instance) {\n\t\tList<Object> attrValues = new ArrayList<>();\n\t\tfor (Attribute<T, ?> fld : getAttributes()) {\n\t\t\tattrValues.add(fld.getValue(instance));\n\t... | [
"0.7124444",
"0.5107851",
"0.5062692",
"0.5045218",
"0.49019265",
"0.482251",
"0.48083076",
"0.47884458",
"0.47588617",
"0.47485402",
"0.47485402",
"0.47485402",
"0.47411045",
"0.47411045",
"0.46767408",
"0.4617016",
"0.45771173",
"0.4569396",
"0.45624316",
"0.45609236",
"0.4... | 0.7097207 | 1 |
Returns a List of AttrType instances, one for each type defined for the named attribute. This is a wrapper for getAttrTypeDef(). | public List getTypes(String attrName) {
String typeDef = getAttrTypeDef(attrName); // does toLower()
return AttrType.attrTypeListForTypeDef(typeDef);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IAttributeType<?>[] getAllAttributeTypes();",
"public IAttributeType<?> getAttributeType(String name);",
"List<Attribute<T, ?>> getAttributes();",
"public void getAllAttributeTypes(List<IAttributeType<?>> all);",
"public Set getTypeSet()\n {\n Set set = new HashSet();\n\n Iterator i... | [
"0.7605662",
"0.6727075",
"0.65588593",
"0.6558694",
"0.64794743",
"0.64455026",
"0.6365668",
"0.6354376",
"0.63345414",
"0.63288",
"0.62478375",
"0.6244069",
"0.6186076",
"0.60895383",
"0.6044004",
"0.59752804",
"0.58716035",
"0.58655703",
"0.5833819",
"0.58304334",
"0.58241... | 0.70143497 | 1 |
Returns true if there is an attribute in me named attrName. | public boolean isAttributeDefined(String attrName) {
Assert.notNull(attrName, "attrName");
return (attrNST.getRowCount("name EQ '" + attrName.toLowerCase() + "'") > 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isAttributeDefined(String attrName)\n {\n return getAttributes().get(attrName) != null;\n }",
"private static boolean isAttributeAvailable(Element element, String attrName) {\n \t\tModelQuery modelQuery = ModelQueryUtil.getModelQuery(element\n \t\t\t\t.getOwnerDocument());\n \t\tif (... | [
"0.81650734",
"0.7998553",
"0.75813496",
"0.75143045",
"0.74228543",
"0.7390137",
"0.7309821",
"0.7243739",
"0.7078912",
"0.70387137",
"0.70307904",
"0.69967574",
"0.67254096",
"0.66254526",
"0.66254526",
"0.6586551",
"0.65131134",
"0.6512157",
"0.6452391",
"0.6413964",
"0.62... | 0.82882226 | 0 |
Returns true if attrName has only one value column. | public boolean isSingleValued(String attrName) {
return (getTypes(attrName).size() == 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean HasOneValueInTheSpace()\n {\n return _valuesToPut.size() == 1;\n }",
"public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (val... | [
"0.6879351",
"0.63992316",
"0.6307063",
"0.6259526",
"0.61995393",
"0.6185016",
"0.60884506",
"0.6064787",
"0.6063898",
"0.60025626",
"0.59854466",
"0.5973461",
"0.59561014",
"0.59222764",
"0.5880487",
"0.58619213",
"0.58291507",
"0.5820665",
"0.58157086",
"0.5815448",
"0.580... | 0.78836524 | 0 |
Override the animation in and out of the next present, dismiss or clear stack call. | public void overrideNextAnimation(int animIn, int animOut) {
mConfig.setNextAnim(animIn, animOut);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void animate() {\n }",
"public void enterAnimation() {\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onAnimationCancel(Animator animation) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Overr... | [
"0.6624926",
"0.6557865",
"0.64492846",
"0.6441456",
"0.64334047",
"0.6389696",
"0.6372009",
"0.6330222",
"0.6322817",
"0.6316637",
"0.62857497",
"0.62840545",
"0.62277",
"0.6227454",
"0.6221101",
"0.6214568",
"0.61964136",
"0.61851865",
"0.6168468",
"0.6157698",
"0.6149005",... | 0.5943201 | 47 |
Pop the current fragment off the top of the stack and dismiss it. Uses default animation of slide in from left and slide out to right animation. | public void popFragment() {
mStackManager.popFragment(this, mState, mConfig);
if (mListener != null) {
mListener.didDismissFragment();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void popFragments(boolean animation) {\n try {\n Fragment fragment;\n fragment = mStacks.get(mCurrentTab).elementAt(mStacks.get(mCurrentTab).size() - 2);\n\n\n /*pop current fragment from stack.. */\n mStacks.get(mCurrentTab).pop();\n\n /* We hav... | [
"0.69794977",
"0.66692436",
"0.64953524",
"0.63087666",
"0.62919664",
"0.6291484",
"0.6278131",
"0.6225033",
"0.6179277",
"0.61474323",
"0.61189616",
"0.60796946",
"0.60204947",
"0.6009143",
"0.59711146",
"0.59704244",
"0.5966074",
"0.5909259",
"0.5892078",
"0.58896327",
"0.5... | 0.6764021 | 1 |
Pop the current fragment off the top of the stack and dismiss it. Uses default animation of slide in from left and slide out to right animation. | public void popFragment(Bundle navBundle) {
mStackManager.popFragment(this, mState, mConfig, navBundle);
if (mListener != null) {
mListener.didDismissFragment();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void popFragments(boolean animation) {\n try {\n Fragment fragment;\n fragment = mStacks.get(mCurrentTab).elementAt(mStacks.get(mCurrentTab).size() - 2);\n\n\n /*pop current fragment from stack.. */\n mStacks.get(mCurrentTab).pop();\n\n /* We hav... | [
"0.6978721",
"0.6763853",
"0.6668704",
"0.64968014",
"0.6308127",
"0.6291895",
"0.6290836",
"0.6278287",
"0.62259096",
"0.61791855",
"0.61472505",
"0.6119823",
"0.6078976",
"0.60207915",
"0.600837",
"0.5971846",
"0.59701604",
"0.59659463",
"0.5910822",
"0.5890823",
"0.5889378... | 0.5702531 | 41 |
Remove all fragments from the stack until we reach the Root Fragment (the fragment at the min stack size) | public void clearNavigationStackToRoot() {
clearNavigationStackToPosition(mConfig.minStackSize);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }",
"private void clearBackstack() {\n FragmentManager manager = getSupportFragmentManager();\n if (manager.getBackStackEntryCount() > 0) {\n FragmentManager.BackStackEntry first = manager.... | [
"0.6494004",
"0.61503446",
"0.59262234",
"0.5907095",
"0.5791324",
"0.57366705",
"0.5678197",
"0.56740284",
"0.5571018",
"0.5569414",
"0.55479616",
"0.55451965",
"0.5524353",
"0.5519627",
"0.54889643",
"0.5453979",
"0.539159",
"0.53904617",
"0.5369753",
"0.5339598",
"0.532581... | 0.5966931 | 2 |
Remove all fragments up until the given position. | protected void clearNavigationStackToPosition(int stackPosition) {
mStackManager.clearNavigationStackToPosition(this, mState, stackPosition);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void trim(long position);",
"@Override\n\tpublic void removeFromBeginning() {\n\t}",
"void unsetEndPosition();",
"void unsetBeginPosition();",
"public void removeFreeSpace(int position) {\n\t\tfor(int i = 0;i<coordinate.size();i++) {\n\t\t\tif(coordinate.get(i) == position) {\n\t\t\t\tcoordinate.rem... | [
"0.63598305",
"0.56636286",
"0.56433094",
"0.5569813",
"0.54799896",
"0.5452493",
"0.537697",
"0.5315385",
"0.5291249",
"0.52810454",
"0.52730006",
"0.5259174",
"0.52229446",
"0.5214746",
"0.52073675",
"0.51778895",
"0.5165801",
"0.5161526",
"0.51528716",
"0.5121024",
"0.5120... | 0.0 | -1 |
Check if the current top fragment is the root fragment | public boolean isOnRootFragment() {
return mState.fragmentTagStack.size() == mConfig.minStackSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isRoot() {\n\t\treturn pathFragments.isEmpty();\n\t}",
"boolean hasRootFrame();",
"public boolean isRoot() {\r\n return (_parent == null);\r\n }",
"public boolean isRoot(){\n\t\treturn bound.isRoot();\n\t}",
"public boolean is_fragment() {\r\n\t\treturn is_fragment_;\r\n\t}",
"bo... | [
"0.6755794",
"0.65988857",
"0.6508057",
"0.6463622",
"0.6451996",
"0.64019907",
"0.6386479",
"0.637828",
"0.6373095",
"0.63462615",
"0.63423634",
"0.6272818",
"0.6253421",
"0.6181254",
"0.617513",
"0.6149699",
"0.61441237",
"0.60930616",
"0.6066975",
"0.6066975",
"0.603156",
... | 0.81177443 | 0 |
=============================== START DEVICE STATE METHODS =============================== Helper method for the current device state for orientation. Uses the layout used as the determining factor. | public boolean isPortrait() {
return mState.isPortrait;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override // com.android.server.wm.WindowContainer\n public int getOrientation() {\n int orientation;\n if (DisplayContent.this.isStackVisible(3) || ((!HwFreeFormUtils.isFreeFormEnable() && DisplayContent.this.isStackVisible(5)) || (this.mDisplayContent != null && this.mWmService.mAtmS... | [
"0.6283808",
"0.6189323",
"0.60180444",
"0.5992992",
"0.5881089",
"0.58411026",
"0.5827102",
"0.57185614",
"0.571719",
"0.56846416",
"0.5679471",
"0.56717074",
"0.5585478",
"0.55604625",
"0.553957",
"0.5510071",
"0.5509186",
"0.55044377",
"0.54777265",
"0.54253185",
"0.539810... | 0.0 | -1 |
Helper method for the current device state for type. Uses the layout used as the determining factor. | public boolean isTablet() {
return mState.isTablet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Short getLayoutType() {\n return layoutType;\n }",
"public final int getLayout() {\n return 2130970726;\n }",
"private void updateUI(int layoutType) {\n switch (layoutType) {\n case LOADING_CLASSES:\n mProgressBar.setVisibility(View.VISIBLE);\n ... | [
"0.5937298",
"0.54404265",
"0.536174",
"0.5342085",
"0.531188",
"0.5223471",
"0.5216545",
"0.516011",
"0.5149095",
"0.5122371",
"0.5119503",
"0.51148623",
"0.50885797",
"0.50724137",
"0.5039583",
"0.5014377",
"0.5002824",
"0.5001619",
"0.49997544",
"0.4993491",
"0.4987259",
... | 0.45878193 | 73 |
Interstitial ad displayed callback | @Override
public void onInterstitialDisplayed(Ad ad) {
Log.e(TAG, "Interstitial ad displayed.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onInterstitialDisplayed(Ad ad) {\n }",
"@Override\n public void onInterstitialDisplayed(Ad ad) {\n }",
"void onInterstitialAdFinished();",
"@Override\r\n public void onAdLoaded()//When interstitial is ready to be shoved\r\n ... | [
"0.85528946",
"0.85528946",
"0.83508945",
"0.834263",
"0.8259692",
"0.8227949",
"0.81836385",
"0.8182323",
"0.8078128",
"0.8061288",
"0.79370046",
"0.7894129",
"0.788682",
"0.7835422",
"0.78149706",
"0.77651644",
"0.7752206",
"0.77151877",
"0.7715114",
"0.7700756",
"0.7687577... | 0.8294196 | 6 |
Interstitial ad is loaded and ready to be displayed Show the ad | @Override
public void onAdLoaded(Ad ad) {
Log.d(TAG, "Interstitial ad is loaded and ready to be displayed!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showInterstitial() {\r\n if (mInterstitial.isReady) {\r\n mInterstitial.showAd();\r\n }\r\n }",
"@Override\n public void onAdLoaded() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n ... | [
"0.8945759",
"0.8945196",
"0.8937763",
"0.8911128",
"0.88214797",
"0.87942713",
"0.8793829",
"0.8720609",
"0.8684659",
"0.8623555",
"0.8602482",
"0.85900986",
"0.8408996",
"0.8402279",
"0.83349454",
"0.83056086",
"0.8304828",
"0.8213167",
"0.8114528",
"0.80635446",
"0.7935237... | 0.8590095 | 12 |
Ad impression logged callback | @Override
public void onLoggingImpression(Ad ad) {
Log.d(TAG, "Interstitial ad impression logged!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onLoggingImpression(Ad ad) {\n }",
"@Override\n public void onLoggingImpression(Ad ad) {\n }",
"@Override\n public void onAdImpression() {\n Log.d(TAG, \"Ad recorded an impression.\");\n }",
"@Override\n ... | [
"0.8523851",
"0.8523851",
"0.80532193",
"0.6426443",
"0.6426443",
"0.6426443",
"0.63946307",
"0.6274785",
"0.6261295",
"0.6261295",
"0.62023973",
"0.61590236",
"0.6121297",
"0.6121297",
"0.60948336",
"0.6068022",
"0.6028853",
"0.6028853",
"0.59970015",
"0.59076744",
"0.589932... | 0.7995607 | 6 |
Initializing the dbHelper in order to get access to the database | @Override
public int onStartCommand(Intent intent, int flags, int startId) {
dbHelper = NetworkDbHelper.getInstance(this);
cipherKey = getSharedPreferences(PREFS_NAME, 0).getString("password",
"N/A");
cipherHandler = new CipherHandler(cipherKey.getBytes());
return super.onStartCommand(intent, flags, startId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(getActivity());\n }",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == n... | [
"0.8539612",
"0.84230536",
"0.8159798",
"0.76786715",
"0.7677268",
"0.76623446",
"0.75017333",
"0.7333084",
"0.70950973",
"0.7060387",
"0.705496",
"0.70548874",
"0.70463836",
"0.7016206",
"0.69787276",
"0.6928479",
"0.6924795",
"0.6910429",
"0.6896271",
"0.68957454",
"0.68646... | 0.0 | -1 |
Test method for Edge | @Test
public void testEdge() {
Edge<Integer, String> target = new Edge<>(1, 2, "hello");
assertNotNull(target);
assertEquals(Integer.valueOf(1), target.getFrom());
assertEquals(Integer.valueOf(2), target.getTo());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }",
"public void testGetEdge() {\n System.out.prin... | [
"0.8404083",
"0.7757703",
"0.7741344",
"0.7507753",
"0.7328241",
"0.73194057",
"0.7209794",
"0.720325",
"0.707958",
"0.6974316",
"0.69653475",
"0.69584423",
"0.69486976",
"0.6934688",
"0.6899753",
"0.68355006",
"0.6823558",
"0.6815775",
"0.6814645",
"0.678978",
"0.676419",
... | 0.7556835 | 3 |
Test method for Edge | @Test
public void testEdgeReverse() {
Edge<Integer, String> target = new Edge<>(1, 2, "hello");
Edge<Integer, String> reverse = target.reverse();
assertNotNull(reverse);
assertEquals(Integer.valueOf(2), reverse.getFrom());
assertEquals(Integer.valueOf(1), reverse.getTo());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }",
"public void testGetEdge() {\n System.out.prin... | [
"0.8404083",
"0.7757703",
"0.7741344",
"0.7556835",
"0.7507753",
"0.7328241",
"0.73194057",
"0.7209794",
"0.720325",
"0.707958",
"0.6974316",
"0.69653475",
"0.69584423",
"0.69486976",
"0.6934688",
"0.6899753",
"0.68355006",
"0.6823558",
"0.6815775",
"0.6814645",
"0.678978",
... | 0.6617058 | 28 |
Byte code: 0: aload_0 1: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 4: invokevirtual o : ()Lcla; 7: astore 26 9: aload_0 10: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 13: invokevirtual m : ()F 16: fstore 5 18: aload_0 19: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 22: invokevirtual z : ()F 25: fstore 6 27: aload_0 28: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 31: invokevirtual c : ()[F 34: astore 27 36: aload_0 37: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 40: invokevirtual d : ()[F 43: astore 28 45: aload_0 46: getfield g : Lcdq; 49: invokevirtual b : ()F 52: fstore 7 54: aload_0 55: getfield g : Lcdq; 58: invokevirtual a : ()F 61: fstore 8 63: aload_0 64: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 67: invokevirtual q : ()F 70: ldc_w 100.0 73: fdiv 74: fstore 9 76: fload 5 78: ldc_w 10.0 81: fdiv 82: ldc_w 3.6 85: fmul 86: fstore_2 87: aload_0 88: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 91: invokevirtual f : ()Z 94: ifeq > 108 97: fload 5 99: fload 5 101: fload 9 103: fmul 104: fsub 105: fconst_2 106: fdiv 107: fstore_2 108: fload 5 110: fload_2 111: fsub 112: fstore 10 114: aload_0 115: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 118: invokevirtual aC : ()Lcgo; 121: checkcast cgy 124: astore 29 126: aload 29 128: invokevirtual i : ()Ljava/util/List; 131: astore 30 133: aload 29 135: invokevirtual p : ()F 138: fstore 11 140: aload_0 141: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 144: invokevirtual t : ()Z 147: istore 24 149: iconst_0 150: istore 18 152: aload_1 153: invokevirtual save : ()I 156: pop 157: ldc_w 5.0 160: invokestatic a : (F)F 163: fstore 12 165: iconst_0 166: istore 19 168: iload 19 170: aload 30 172: invokeinterface size : ()I 177: if_icmpge > 902 180: aload 30 182: iload 19 184: invokeinterface get : (I)Ljava/lang/Object; 189: checkcast cis 192: astore 31 194: aload 31 196: invokeinterface A : ()Z 201: istore 25 203: iload 25 205: ifne > 222 208: iload 24 210: ifne > 222 213: iload 19 215: iconst_1 216: iadd 217: istore 19 219: goto > 168 222: aload 31 224: invokeinterface e : ()Lcha; 229: astore 32 231: aload 31 233: invokeinterface f : ()Lcha; 238: astore 33 240: aload_0 241: aload 31 243: invokevirtual b : (Lcio;)V 246: aload_0 247: getfield k : Landroid/graphics/Paint; 250: ldc_w 'Q' 253: invokestatic b : (Landroid/graphics/Paint;Ljava/lang/String;)I 256: i2f 257: fstore_2 258: ldc_w 4.0 261: invokestatic a : (F)F 264: pop 265: aload 31 267: invokeinterface r : ()Lchn; 272: astore 34 274: aload 31 276: invokeinterface I : ()I 281: istore 23 283: aload_0 284: getfield d : Landroid/graphics/Paint; 287: aload 31 289: invokeinterface g : ()I 294: invokevirtual setColor : (I)V 297: aload_0 298: getfield d : Landroid/graphics/Paint; 301: aload 31 303: invokeinterface h : ()F 308: invokestatic a : (F)F 311: invokevirtual setStrokeWidth : (F)V 314: aload_0 315: aload 31 317: invokevirtual a : (Lcis;)F 320: fstore 13 322: iconst_0 323: istore 20 325: iload 20 327: iload 23 329: if_icmpge > 912 332: aload 31 334: iload 20 336: invokeinterface m : (I)Lcom/github/mikephil/charting/data/Entry; 341: checkcast com/github/mikephil/charting/data/PieEntry 344: astore 35 346: iload 18 348: ifne > 768 351: fconst_0 352: fstore_2 353: fload 6 355: fload_2 356: aload 27 358: iload 18 360: faload 361: fload 13 363: ldc 0.017453292 365: fload 10 367: fmul 368: fdiv 369: fconst_2 370: fdiv 371: fsub 372: fconst_2 373: fdiv 374: fadd 375: fload 8 377: fmul 378: fadd 379: fstore 4 381: aload_0 382: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 385: invokevirtual v : ()Z 388: ifeq > 782 391: aload 35 393: invokevirtual c : ()F 396: fload 11 398: fdiv 399: ldc_w 100.0 402: fmul 403: fstore_2 404: ldc 0.017453292 406: fload 4 408: fmul 409: f2d 410: invokestatic cos : (D)D 413: d2f 414: fstore 16 416: ldc 0.017453292 418: fload 4 420: fmul 421: f2d 422: invokestatic sin : (D)D 425: d2f 426: fstore 14 428: iload 24 430: ifeq > 791 433: aload 32 435: getstatic cha.OUTSIDE_SLICE : Lcha; 438: if_acmpne > 791 441: iconst_1 442: istore 21 444: iload 25 446: ifeq > 797 449: aload 33 451: getstatic cha.OUTSIDE_SLICE : Lcha; 454: if_acmpne > 797 457: iconst_1 458: istore 22 460: iload 24 462: ifeq > 473 465: aload 32 467: getstatic cha.INSIDE_SLICE : Lcha; 470: if_acmpne > 473 473: iload 25 475: ifeq > 486 478: aload 33 480: getstatic cha.INSIDE_SLICE : Lcha; 483: if_acmpne > 486 486: iload 21 488: ifne > 496 491: iload 22 493: ifeq > 753 496: aload 31 498: invokeinterface j : ()F 503: fstore 15 505: aload 31 507: invokeinterface F : ()F 512: fstore 17 514: aload 31 516: invokeinterface i : ()F 521: ldc_w 100.0 524: fdiv 525: fstore_3 526: aload_0 527: getfield a : Lcom/github/mikephil/charting/charts/PieChart; 530: invokevirtual f : ()Z 533: ifeq > 803 536: fload_3 537: fload 5 539: fload 5 541: fload 9 543: fmul 544: fsub 545: fmul 546: fload 5 548: fload 9 550: fmul 551: fadd 552: fstore_3 553: aload 31 555: invokeinterface G : ()Z 560: ifeq > 811 563: fload 17 565: fload 10 567: fmul 568: ldc 0.017453292 570: fload 4 572: fmul 573: f2d 574: invokestatic sin : (D)D 577: invokestatic abs : (D)D 580: d2f 581: fmul 582: fstore_3 583: aload 26 585: getfield a : F 588: fstore 17 590: aload 26 592: getfield b : F 595: fstore 17 597: fconst_1 598: fload 15 600: fadd 601: fload 10 603: fmul 604: fload 16 606: fmul 607: aload 26 609: getfield a : F 612: fadd 613: fstore 16 615: fconst_1 616: fload 15 618: fadd 619: fload 10 621: fmul 622: fload 14 624: fmul 625: aload 26 627: getfield b : F 630: fadd 631: fstore 14 633: fload 4 635: f2d 636: ldc2_w 360.0 639: drem 640: ldc2_w 90.0 643: dcmpl 644: iflt > 820 647: fload 4 649: f2d 650: ldc2_w 360.0 653: drem 654: ldc2_w 270.0 657: dcmpg 658: ifgt > 820 661: aload_0 662: getfield k : Landroid/graphics/Paint; 665: getstatic android/graphics/Paint$Align.RIGHT : Landroid/graphics/Paint$Align; 668: invokevirtual setTextAlign : (Landroid/graphics/Paint$Align;)V 671: iload 21 673: ifeq > 686 676: aload_0 677: getfield u : Landroid/graphics/Paint; 680: getstatic android/graphics/Paint$Align.RIGHT : Landroid/graphics/Paint$Align; 683: invokevirtual setTextAlign : (Landroid/graphics/Paint$Align;)V 686: fload 16 688: fload_3 689: fsub 690: fload 12 692: fsub 693: fstore_3 694: fload 14 696: ldc_w 10.0 699: fadd 700: fstore 4 702: iload 21 704: ifeq > 868 707: iload 22 709: ifeq > 868 712: aload_0 713: aload_1 714: aload 34 716: fload_2 717: aload 35 719: iconst_0 720: fload_3 721: fload 4 723: aload 31 725: iload 20 727: invokeinterface i : (I)I 732: invokevirtual a : (Landroid/graphics/Canvas;Lchn;FLcom/github/mikephil/charting/data/Entry;IFFI)V 735: iload 20 737: aload 29 739: invokevirtual n : ()I 742: if_icmpge > 753 745: aload 35 747: invokevirtual b : ()Ljava/lang/String; 750: ifnull > 753 753: iload 18 755: iconst_1 756: iadd 757: istore 18 759: iload 20 761: iconst_1 762: iadd 763: istore 20 765: goto > 325 768: aload 28 770: iload 18 772: iconst_1 773: isub 774: faload 775: fload 7 777: fmul 778: fstore_2 779: goto > 353 782: aload 35 784: invokevirtual c : ()F 787: fstore_2 788: goto > 404 791: iconst_0 792: istore 21 794: goto > 444 797: iconst_0 798: istore 22 800: goto > 460 803: fload_3 804: fload 5 806: fmul 807: fstore_3 808: goto > 553 811: fload 17 813: fload 10 815: fmul 816: fstore_3 817: goto > 583 820: aload_0 821: getfield k : Landroid/graphics/Paint; 824: getstatic android/graphics/Paint$Align.LEFT : Landroid/graphics/Paint$Align; 827: invokevirtual setTextAlign : (Landroid/graphics/Paint$Align;)V 830: iload 21 832: ifeq > 845 835: aload_0 836: getfield u : Landroid/graphics/Paint; 839: getstatic android/graphics/Paint$Align.LEFT : Landroid/graphics/Paint$Align; 842: invokevirtual setTextAlign : (Landroid/graphics/Paint$Align;)V 845: fload 16 847: fload_3 848: fadd 849: fload 12 851: fadd 852: fstore_3 853: ldc_w 10.0 856: fload 14 858: fadd 859: ldc_w 10.0 862: fadd 863: fstore 4 865: goto > 702 868: iload 21 870: ifeq > 894 873: iload 20 875: aload 29 877: invokevirtual n : ()I 880: if_icmpge > 753 883: aload 35 885: invokevirtual b : ()Ljava/lang/String; 888: ifnull > 753 891: goto > 753 894: iload 22 896: ifeq > 753 899: goto > 753 902: aload 26 904: invokestatic a : (Lcla;)V 907: aload_1 908: invokevirtual restore : ()V 911: return 912: goto > 213 | public void b(Canvas paramCanvas) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void a(final boolean p0, final o p1) {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: aload_0 \n // 1: getfield com/b/a/a/a/d$b.c:Lcom/b/a/a/a/d;\n // ... | [
"0.57793903",
"0.5585509",
"0.52918965",
"0.5138988",
"0.50802875",
"0.5075272",
"0.5074445",
"0.5018168",
"0.50017774",
"0.49890673",
"0.49822828",
"0.49492213",
"0.49158666",
"0.48957285",
"0.4874297",
"0.4852928",
"0.4843545",
"0.4812984",
"0.4792062",
"0.47902715",
"0.478... | 0.0 | -1 |
/ When type is Object, getter/setter returns capitalized field name as a type | public String getTypeName() {
if (_type.equals(TYPE_OBJECT)) {
return StringUtils.capitalize(_name);
}
return _type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFieldName(Class<?> type, String fieldName);",
"Object getObjectField();",
"default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enu... | [
"0.6575917",
"0.6478383",
"0.6417666",
"0.62830365",
"0.6275385",
"0.62645364",
"0.6259912",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.6252819",
"0.62343144",
... | 0.6313951 | 3 |
Method used for converting array of bytes to HEX representation in String | private static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return new String(hexChars);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String bytesToHex(byte[] array) {\n StringBuffer hexString = new StringBuffer();\n for (int i = 0; i < array.length; i++) {\n String hex = Integer.toHexString(0xff & array[i]);\n if(hex.length() == 1) hexString.append('0');\n hexString.append(hex);\n }\n return hexString.to... | [
"0.78341764",
"0.7696717",
"0.7606642",
"0.7605598",
"0.7513513",
"0.7416831",
"0.7412818",
"0.7397389",
"0.7378052",
"0.73682034",
"0.7345904",
"0.7342973",
"0.7342784",
"0.7338767",
"0.7331942",
"0.73249996",
"0.7321051",
"0.73125285",
"0.72693425",
"0.7266793",
"0.7266323"... | 0.7265129 | 21 |
TODO this test fails because Derby SQL != Postgres SQL | @Test(enabled = false)
public void getRandomBirdShouldReturnBirdModel() {
BirdModel model = dao.getRandomBird();
assertNotNull(model, "returned randomised bird was null");
assertNotNull(model.getId(), "returned randomised bird had null ID");
assertFalse(model.getId().isEmpty(), "returned randomised bird had empty ID");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }",
"@Test\n public void testToStringWithSQL() throws SQLException {\n try (PreparedStatement stmt = this.proxy\n ... | [
"0.6455403",
"0.62899196",
"0.62357116",
"0.618931",
"0.6165761",
"0.61365956",
"0.6115777",
"0.6108004",
"0.6095875",
"0.6094558",
"0.6091614",
"0.6066907",
"0.6049682",
"0.60440737",
"0.60353637",
"0.59997123",
"0.59550536",
"0.59089327",
"0.5908584",
"0.5906436",
"0.588641... | 0.0 | -1 |
TODO fix this stuff. | @Test(enabled = false)
public void shouldOnlyHaveEligibleMediaModels() {
List<BirdModel> list = dao.findAll();
for (BirdModel model: list) {
for (MediaModel soundModel: model.getSounds()) {
assertTrue(soundModel.isEligible(), String.format("Sound model %s isn't eligible", soundModel.getId()));
}
for (MediaModel photoModel: model.getPhotos()) {
assertTrue(photoModel.isEligible(), String.format("Photo model %s isn't eligible", photoModel.getId()));
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poet... | [
"0.58892214",
"0.58225566",
"0.5815714",
"0.5802214",
"0.5768687",
"0.57529694",
"0.5738445",
"0.56862915",
"0.56843424",
"0.56228733",
"0.5617678",
"0.5584633",
"0.55497843",
"0.55108744",
"0.55004495",
"0.55004495",
"0.5475741",
"0.54722",
"0.54680437",
"0.54407877",
"0.543... | 0.0 | -1 |
Uses the logging framework to display the output of the fetch operation in the log fragment. | @Override
protected void onPostExecute(String result) {
Log.d(TAG, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agen... | [
"0.6299655",
"0.60945225",
"0.60567915",
"0.6020528",
"0.6016015",
"0.5988908",
"0.5981593",
"0.5932083",
"0.5924828",
"0.59203184",
"0.5835219",
"0.58283645",
"0.58190167",
"0.58082676",
"0.579946",
"0.57961303",
"0.57796836",
"0.57720375",
"0.57485497",
"0.57241553",
"0.572... | 0.0 | -1 |
create by tangbj on 2018/5/21 | public interface UserMapper extends MyBaseMapper<User> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void create() {\n\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"CreationData creati... | [
"0.64408207",
"0.63524884",
"0.6351552",
"0.63035715",
"0.6291337",
"0.62339485",
"0.6193157",
"0.61283654",
"0.611298",
"0.59690064",
"0.5881171",
"0.5862203",
"0.58101845",
"0.57480615",
"0.5703859",
"0.56876874",
"0.5685503",
"0.5660309",
"0.5646514",
"0.5642417",
"0.56304... | 0.0 | -1 |
Condition statement with the water mark value using the operator. Example (last_updated_ts >= 20130101 00:00:00 | public String getWatermarkCondition(QueryBasedExtractor extractor, long watermarkValue, String operator); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();",
"public ExpressionNode getCondition();",
"ConditionalExpression createConditionalExpression();",
"public Expression getCondition()\n {\n return this.condi... | [
"0.6584665",
"0.5866757",
"0.5432655",
"0.5412912",
"0.5380575",
"0.5354678",
"0.53063005",
"0.5276776",
"0.5276127",
"0.52408355",
"0.5204638",
"0.5177723",
"0.5171003",
"0.5158682",
"0.513603",
"0.5134391",
"0.51188534",
"0.50817466",
"0.5081316",
"0.50690436",
"0.5060393",... | 0.6657921 | 0 |
Get partitions for the given range | public HashMap<Long, Long> getIntervals(long lowWatermarkValue, long highWatermarkValue, long partitionInterval,
int maxIntervals); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void partition();",
"static Integer partition(List<Integer> arr,Integer start,Integer end){\n\t\tint pivot = arr.get(end);\n\t\tint partitionIndex = start;\n\t\tfor(int i=start;i<end;i++){\n\t\t\tif(arr.get(i)<=pivot){\n\t\t\t\tint temp = arr.get(i);\n\t\t\t\tarr.set(i, arr.get(partitionIndex));\n\t\t\t\t... | [
"0.6002112",
"0.5971689",
"0.5938023",
"0.5854134",
"0.5826263",
"0.5804258",
"0.57883894",
"0.57877547",
"0.57697827",
"0.5729046",
"0.5673634",
"0.5637859",
"0.55890095",
"0.55849224",
"0.5517418",
"0.55161285",
"0.5491963",
"0.5475552",
"0.5468765",
"0.54665095",
"0.546312... | 0.0 | -1 |
Get number of seconds or hour or days or simple number that needs to be added for the successive water mark | public int getDeltaNumForNextWatermark(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getTtiSeconds();",
"public int getTotalTime();",
"private int toTime(int i) {\n int count = 0;\n\n //hours units\n count += toLeds((i / 6000) % 10);\n //hours tens\n count += toLeds(((i / 6000) % 100) / 10);\n\n //minutes units\n count += toLeds((i / 60) % 1... | [
"0.6611724",
"0.6472626",
"0.62853634",
"0.6111045",
"0.6110358",
"0.61082166",
"0.60597587",
"0.6045873",
"0.60263616",
"0.59793884",
"0.59791726",
"0.5974817",
"0.5965077",
"0.59602493",
"0.5956389",
"0.5953553",
"0.59483486",
"0.5917025",
"0.5912999",
"0.59129846",
"0.5904... | 0.5757858 | 36 |
Send to sGDP server to verify connection | public void sendRequest() {
// prepare the Request
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
isConnected = true;
try {
JSONObject variables = response.getJSONObject("variables");
int tuneMode = variables.getInt("tune_mode");
int gear = variables.getInt("gear");
String deviceName = response.getString("name");
deviceName += " ";
deviceName += response.getString("id");
device = deviceName;
char pos = (char) gear;
String serial = variables.getString("sn");
if (tuneMode == 255) {
tvTune.setText("TUNE: E");
} else {
tvTune.setText("TUNE: " + tuneMode);
}
tvGear.setText("GEAR: " + pos);
proVersion.setText(deviceName);
String version = "";
try {
PackageInfo mPackageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
version = mPackageInfo.versionName;
} catch (PackageManager.NameNotFoundException mE) {
mE.printStackTrace();
}
appVersion.setText(version);
String boost = variables.getString(boostVar);
serialNum.setText(serial);
if (boost.equals("65535")){
new SweetAlertDialog(SettingsActivity.this, SweetAlertDialog.WARNING_TYPE)
.setTitleText("Logging Paused")
.setContentText("Please close any other apps communicating through the OBD II Port, logging should resume.")
.setConfirmText("Okay")
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sDialog) {
sDialog.dismiss();
SharedPreferences mSharedPreferences = getSharedPreferences("ThemeColor", MODE_PRIVATE);
SharedPreferences.Editor edit = mSharedPreferences.edit();
edit.putBoolean("logging", true);
}
})
.show();
}
} catch (JSONException mE) {
mE.printStackTrace();
}
// display response
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
isConnected = false;
Intent i = new Intent(SettingsActivity.this, MainActivity.class);
startActivity(i);
}
}
);
// add it to the RequestQueue
queue.add(getRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //... | [
"0.6669888",
"0.6598797",
"0.64544624",
"0.63789177",
"0.6139406",
"0.6035132",
"0.60221237",
"0.6010082",
"0.59905213",
"0.5984986",
"0.5846463",
"0.58430064",
"0.57939345",
"0.57441837",
"0.5687559",
"0.56605095",
"0.56512415",
"0.5648538",
"0.56449056",
"0.5598729",
"0.558... | 0.0 | -1 |
Send to sGDP server to get live data | public void updateRequest() {
isProcessing = true;
// prepare the Request
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
isConnected = true;
try {
JSONObject variables = response.getJSONObject("variables");
int tuneMode = variables.getInt("tune_mode");
int gear = variables.getInt("gear");
String deviceName = response.getString("name");
deviceName += " ";
deviceName += response.getString("id");
device = deviceName;
char pos = (char) gear;
String serial = variables.getString("sn");
if (tuneMode == 255) {
tvTune.setText("TUNE: E");
} else {
tvTune.setText("TUNE: " + tuneMode);
}
tvGear.setText("GEAR: " + pos);
proVersion.setText(deviceName);
serialNum.setText(serial);
} catch (JSONException mE) {
mE.printStackTrace();
}
isProcessing = false;
}
},
new Response.ErrorListener()
{
@Override
public void onErrorResponse(VolleyError error) {
isConnected = false;
new SweetAlertDialog(SettingsActivity.this, SweetAlertDialog.WARNING_TYPE)
.setTitleText("No Connection")
.setContentText("Your are not connected to a GDP device. Retry by " +
"tapping 'Retry' or check your wifi settings by tapping " +
"'Connect'.")
.setCancelText("Retry")
.setConfirmText("Connect")
.showCancelButton(true)
.setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sDialog) {
sendRequest();
sDialog.dismiss();
}
})
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sDialog) {
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}
})
.show();
isProcessing = false;
}
}
);
// add it to the RequestQueue
queue.add(getRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void getDataFromServer();",
"public void get()\n {\n Session session = new Session(\"udp:\"+\"\"+\"/161\", writer);\n\n // creating PDU\n session.getBulk(\"1.3.6.1.2.1.1.1\");\n session.getBulk(\"1.3.6.1.2.1.1.2\");\n\n List<String> oList = new ArrayList<String>();\n ... | [
"0.6407456",
"0.61567837",
"0.59594023",
"0.5893676",
"0.57866466",
"0.5786593",
"0.5757331",
"0.575617",
"0.57395124",
"0.5681687",
"0.56724817",
"0.56704193",
"0.5659895",
"0.5642045",
"0.55975515",
"0.5596488",
"0.556969",
"0.5568401",
"0.55586743",
"0.55535865",
"0.554910... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_route_editor, container, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
Interface for recording offset. | public interface OffsetWriter {
/**
* Update the offset in memory if the provided offset is greater than the existing offset.
* @param sourceTable string in the format of <keyspace>.<table>.
* @param sourceOffset string in the format of <file_name>:<file_position>
* @param isSnapshot whether the offset is coming from a snapshot or commit log
*/
void markOffset(String sourceTable, String sourceOffset, boolean isSnapshot);
/**
* Determine if an offset has been processed based on the table name, offset position, and whether
* it is from snapshot or not.
* @param sourceTable string in the format of <keyspace>.<table>.
* @param sourceOffset string in the format of <file_name>:<file_position>
* @param isSnapshot whether the offset is coming from a snapshot or commit log
* @return true if the offset has been processed, false otherwise.
*/
boolean isOffsetProcessed(String sourceTable, String sourceOffset, boolean isSnapshot);
/**
* Flush latest offsets to disk.
*/
void flush();
/**
* Close all resources used by this class.
*/
void close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public long getOffset() {\n return offset;\n }",
"public abstract int getRawOffset();",
"public abstract int getRawOffset();",
"double getOffset();",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"public Integer getOffset();",
"public int getOffset() \n {\n ... | [
"0.69589967",
"0.6847671",
"0.6847671",
"0.68073106",
"0.6675516",
"0.6675516",
"0.6675516",
"0.66730356",
"0.6598855",
"0.65963835",
"0.6561156",
"0.6469185",
"0.6448456",
"0.64278847",
"0.6405362",
"0.6402797",
"0.6388618",
"0.63645405",
"0.6355193",
"0.6334101",
"0.6323069... | 0.60897636 | 42 |
Update the offset in memory if the provided offset is greater than the existing offset. | void markOffset(String sourceTable, String sourceOffset, boolean isSnapshot); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public void incrementAddress( int offset )\n {\n super.incrementAddress( offset );\n if ( getPointer() > m_size )\n throw new RuntimeException( \"address out of range: \" + getPointer() );\n }",
"@Override\r\n public void setOffset(long offset) {\n }",
"public voi... | [
"0.65534383",
"0.6316217",
"0.63105446",
"0.63105446",
"0.63105446",
"0.63047993",
"0.62731886",
"0.6166812",
"0.615392",
"0.6152559",
"0.61070955",
"0.61014605",
"0.60109967",
"0.60109967",
"0.5997193",
"0.59950954",
"0.5959941",
"0.59471667",
"0.58829486",
"0.58099896",
"0.... | 0.49549463 | 68 |
Determine if an offset has been processed based on the table name, offset position, and whether it is from snapshot or not. | boolean isOffsetProcessed(String sourceTable, String sourceOffset, boolean isSnapshot); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasOffset();",
"boolean isOffset();",
"boolean isOffset();",
"void markOffset(String sourceTable, String sourceOffset, boolean isSnapshot);",
"boolean isSetOffset();",
"public boolean hasOffset() {\n return result.hasOffset();\n }",
"boolean isSetRawOffset();",
"public boolean... | [
"0.68434393",
"0.6650575",
"0.6650575",
"0.6377113",
"0.6284009",
"0.6258027",
"0.5823237",
"0.5819044",
"0.57069063",
"0.5629621",
"0.54799724",
"0.543809",
"0.54117364",
"0.52755237",
"0.52716774",
"0.5269668",
"0.52616227",
"0.52543485",
"0.5247201",
"0.524345",
"0.5239929... | 0.8349482 | 0 |
Flush latest offsets to disk. | void flush(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }",
"public void flush(Map<SystemStreamPartition, String> lastProcessedOffsets) {\n LOG.info(\"Flushing the side input stores.\");\n stores.values().forEach(StorageEngine::flush);\n writeFileOffsets(... | [
"0.67618364",
"0.6751487",
"0.6522663",
"0.6373679",
"0.6299061",
"0.6229148",
"0.6194373",
"0.6191988",
"0.6144859",
"0.6076417",
"0.6059957",
"0.6050054",
"0.600583",
"0.6003171",
"0.6002104",
"0.59915775",
"0.59695476",
"0.59695476",
"0.59695476",
"0.5963069",
"0.5936028",... | 0.0 | -1 |
Close all resources used by this class. | void close(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }",
"public void close() {\n dispose();\n }",
"public void close() {\n\t\t}",
"public void close()\n\t\t{\n\t\t}",
"public void disp... | [
"0.77796835",
"0.7775105",
"0.7657336",
"0.7644058",
"0.757166",
"0.7510534",
"0.7477077",
"0.7421681",
"0.74213964",
"0.73996603",
"0.73798555",
"0.7377084",
"0.7377084",
"0.73721737",
"0.7356106",
"0.7356106",
"0.7356106",
"0.7353684",
"0.7343142",
"0.7343142",
"0.7343142",... | 0.71564376 | 83 |
method is only used to force creation of stub for WSDL | public void setCreationDate(Date creationDate) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Stub createStub();",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.atta... | [
"0.7424461",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.6445645",
"0.63475996",
"0.6337034",
"0.62823486",
"0.62823486",
"0.62823486",
"0.62823486",
"0.62823486",
"0.6245023... | 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 DrgProposalComment)) {
return false;
}
DrgProposalComment other = (DrgProposalComment) object;
if ((_drgProposalCommentId == null && other.getDrgProposalCommentId()!= null)
|| _drgProposalCommentId != null && !_drgProposalCommentId.equals(other.getDrgProposalCommentId())) {
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.6897641",
"0.68401533",
"0.6705931",
"0.6642445",
"0.6642445",
"0.6592696",
"0.65795624",
"0.65795624",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.65632",
"0.65632",
"0.65451044",
"0.65254945",
"0.65165323",
"0.6488194",
"0.6478304",
... | 0.0 | -1 |
/ Take a Set, transform it to Vector before storing it | private void setNumeros(Set<Integer> numeros) {
this.numeros = new Vector<Integer>(numeros);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<X> toSet();",
"Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);",
"private static <T> Set<T> Create_UnModifiableSet_By_InputElements(@NonNull Set<T> set, @NonNull T... ts) {\n for (T t : ts) {\n set.add(t);\n }\n\n return Collections.unmodifiableSet(set)... | [
"0.64498764",
"0.63359135",
"0.62147266",
"0.61609364",
"0.61075205",
"0.60144454",
"0.60144454",
"0.6009179",
"0.5992388",
"0.59851724",
"0.597556",
"0.5917963",
"0.5846529",
"0.58223486",
"0.5763122",
"0.56722915",
"0.56307936",
"0.5625412",
"0.56070423",
"0.56006765",
"0.5... | 0.0 | -1 |
/ Take a Set, transform it to Vector before storing it | private void setN_chances(Set<Integer> n_chances) {
this.n_chances = new Vector<Integer>(n_chances);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<X> toSet();",
"Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);",
"private static <T> Set<T> Create_UnModifiableSet_By_InputElements(@NonNull Set<T> set, @NonNull T... ts) {\n for (T t : ts) {\n set.add(t);\n }\n\n return Collections.unmodifiableSet(set)... | [
"0.64498764",
"0.63359135",
"0.62147266",
"0.61609364",
"0.61075205",
"0.60144454",
"0.60144454",
"0.6009179",
"0.5992388",
"0.59851724",
"0.597556",
"0.5917963",
"0.5846529",
"0.58223486",
"0.5763122",
"0.56722915",
"0.56307936",
"0.5625412",
"0.56070423",
"0.56006765",
"0.5... | 0.0 | -1 |
/ Checks grid validity numeros must be between 1 and 49 without doublons n_chances must be between 1 and 10 without doublons There is a limited number of numeros and n_chances that can be played in one grid | public boolean checkGrid(Set<Integer> numeros, Set<Integer> n_chances) {
// The set structure assures there are no doublons
// Checks the allowed combinaisons
Integer nb_numeros = numeros.size();
Integer nb_chances = n_chances.size();
if ((nb_numeros > 9) || (nb_numeros < 5)) {
return false;
}
else if ((nb_chances > 10) || (nb_chances < 1)) {
return false;
}
else if (nb_numeros == 9) {
if (nb_chances > 1) {
return false;
}
}
else if (nb_numeros == 8) {
if (nb_chances > 3) {
return false;
}
}
else if (nb_numeros == 7) {
if (nb_chances > 8) {
return false;
}
}
//Checks if numeros are between 1 and 49 and n_chances are between 1 and 10
Iterator<Integer> iterator1 = numeros.iterator();
Iterator<Integer> iterator2 = n_chances.iterator();
Integer setElement = null;
while(iterator1.hasNext()) {
setElement = iterator1.next();
if((setElement < 1) || (setElement > 49)) {
return false;
}
}
setElement = null;
while(iterator2.hasNext()) {
setElement = iterator2.next();
if((setElement < 1) || (setElement > 10)) {
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean setGrid(Set<Integer> numeros, Set<Integer> n_chances) {\n\t\tif(this.checkGrid(numeros, n_chances)) {\n\t\t\tInteger nb_numeros = numeros.size();\n\t\t\tInteger nb_n_chances = n_chances.size();\n\t\t\tthis.setNumeros(numeros);\n\t\t\tthis.setN_chances(n_chances);\n\t\t\tthis.setPrice(nb_numeros, nb_... | [
"0.6709576",
"0.6284853",
"0.62175846",
"0.6152099",
"0.61100525",
"0.60223114",
"0.60156953",
"0.60121673",
"0.6003068",
"0.5990934",
"0.5988276",
"0.59847856",
"0.59643453",
"0.5902378",
"0.589908",
"0.58957726",
"0.58590746",
"0.5843823",
"0.5842289",
"0.5839195",
"0.58147... | 0.7798712 | 0 |
/ Sets the price corresponding to the played grid | private void setPrice(Integer nb_numeros, Integer nb_n_chances) {
Integer base = null;
if (nb_numeros == 5) {
base = 2;
}
else if (nb_numeros == 6) {
base = 12;
}
else if (nb_numeros == 7) {
base = 42;
}
else if (nb_numeros == 8) {
base = 112;
}
else if (nb_numeros == 9) {
base = 252;
}
else {
base = 0;
}
this.price = base*nb_n_chances;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }",
"public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }",
"public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }",
"public void setPrice(BigDecimal price) {\r\n ... | [
"0.6760624",
"0.6749209",
"0.66882414",
"0.66882414",
"0.6673436",
"0.6673436",
"0.6654709",
"0.6638327",
"0.6634162",
"0.6634162",
"0.6634162",
"0.66309917",
"0.66255516",
"0.66136605",
"0.6604469",
"0.6603122",
"0.6603122",
"0.6603122",
"0.6603122",
"0.6603122",
"0.6603122"... | 0.6028757 | 87 |
/ Sets a grid after checking it | public boolean setGrid(Set<Integer> numeros, Set<Integer> n_chances) {
if(this.checkGrid(numeros, n_chances)) {
Integer nb_numeros = numeros.size();
Integer nb_n_chances = n_chances.size();
this.setNumeros(numeros);
this.setN_chances(n_chances);
this.setPrice(nb_numeros, nb_n_chances);
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasGrid();",
"public void setGrid(final boolean theSelection) {\n myGrid = theSelection;\n repaint();\n }",
"public void initGrid()\n {\n\tfor (int y=0; y<cases.length; y++)\n \t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tcases[y][x] = new Case();\n ... | [
"0.7206308",
"0.708343",
"0.70825297",
"0.7050243",
"0.70062405",
"0.698528",
"0.6882959",
"0.68810266",
"0.6871355",
"0.6863281",
"0.6825399",
"0.6815122",
"0.6810927",
"0.6810695",
"0.6771044",
"0.67623484",
"0.6754031",
"0.6738311",
"0.6732827",
"0.6703653",
"0.6664511",
... | 0.0 | -1 |
/ toString function for a Grid | public String toString() {
String s = new String("");
for(int i=0; i<numeros.size(); i++) {
s += numeros.get(i) + " ";
}
s += "| ";
for(int i=0; i<n_chances.size(); i++) {
s += n_chances.get(i) + " ";
}
s += "\n";
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString ()\n\t{\n\t\tString s = \"Grid:\\n\";\n\t\tfor (int row=0; row<GRID_SIZE; row++)\n\t\t{\n\t\t\tfor (int col=0; col<GRID_SIZE; col++) {\n\t\t\t\ts = s + grid[col][row].value()+ \" \";\n\t\t\t}\n\t\t\ts += \"\\n\";\n\t\t}\n\t\treturn s;\n\t}",
"public String toString() {\n\t\tStringBuilder b... | [
"0.8682984",
"0.8091376",
"0.8091376",
"0.8025159",
"0.78692406",
"0.77235866",
"0.7697395",
"0.7638077",
"0.76372516",
"0.75992507",
"0.74940467",
"0.747854",
"0.747854",
"0.74303585",
"0.74147207",
"0.7402583",
"0.73940843",
"0.73855734",
"0.73807687",
"0.7314811",
"0.73064... | 0.0 | -1 |
Checks if the given schedulings are correct. It means that for each of them we check its settings. | public static void checkSchedulings(VObjectData object, List<Map<String, Object>> schedulings, String callerKey) throws InvalidSchedulingsException, InvalidSettingException, MissingSettingException {
if (schedulings == null) {
throw new InvalidSchedulingsException();
}
for (final Map<String, Object> aScheduling : schedulings) {
final Map<String, Object> schedulingWithoutType = new HashMap<String, Object>(aScheduling);
final SchedulingHandler handler = SchedulingHandlerManager.getHandler(String.valueOf(schedulingWithoutType.remove(SchedulingType.TYPE_KEY)));
if (handler == null) {
throw new InvalidSchedulingsException();
}
handler.checkSettings(object, schedulingWithoutType, callerKey);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.ou... | [
"0.7279048",
"0.62164915",
"0.62164915",
"0.6044041",
"0.5917606",
"0.5859514",
"0.5806042",
"0.57237643",
"0.5658182",
"0.56401473",
"0.55936337",
"0.5591839",
"0.5569376",
"0.5553923",
"0.55394703",
"0.5505952",
"0.5460912",
"0.54489356",
"0.5435066",
"0.53935945",
"0.53882... | 0.7642087 | 0 |
Sets the given schedulings for the provided subscription. No checks are performed on the given schedulings to ensure their validity. | public static void setSchedulings(SubscriptionData subscription, List<Map<String, Object>> schedulings, String callerKey) {
final List<SubscriptionSchedulingData> theExistingSchedulings = SubscriptionSchedulingData.findAllBySubscription(subscription);
for (final Map<String, Object> aNewScheduling : schedulings) {
final Map<String, Object> schedWithoutType = new HashMap<String, Object>(aNewScheduling);
final SCHEDULING_TYPE type = SCHEDULING_TYPE.findByLabel(schedWithoutType.remove(SchedulingType.TYPE_KEY).toString());
final SchedulingHandler theHandler = SchedulingHandlerManager.getHandler(type);
final Map<String, String> theNewSettings = theHandler.generateSettings(subscription.getObject(), schedWithoutType, callerKey);
final SubscriptionSchedulingData theScheduling;
if (theExistingSchedulings.isEmpty()) {
theScheduling = SubscriptionSchedulingData.create(subscription, type);
} else {
theScheduling = theExistingSchedulings.remove(0);
SchedulingHandlerManager.getHandler(theScheduling.getType()).deleteElements(theScheduling);
theScheduling.setType(type);
}
SchedulingHandlerManager.setSchedulingSettings(theScheduling, theNewSettings);
theHandler.executeWhenDone(theScheduling);
}
SchedulingHandlerManager.deleteSchedulings(theExistingSchedulings);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void checkSchedulings(VObjectData object, List<Map<String, Object>> schedulings, String callerKey) throws InvalidSchedulingsException, InvalidSettingException, MissingSettingException {\n\n\t\tif (schedulings == null) {\n\t\t\tthrow new InvalidSchedulingsException();\n\t\t}\n\n\t\tfor (final Map<Stri... | [
"0.62482285",
"0.56813866",
"0.53649956",
"0.5238357",
"0.5133082",
"0.50747424",
"0.5059169",
"0.5001954",
"0.4967558",
"0.49470207",
"0.49365193",
"0.4911076",
"0.48871675",
"0.48692387",
"0.4862014",
"0.48604304",
"0.48602313",
"0.48349798",
"0.48325035",
"0.48229772",
"0.... | 0.78168386 | 0 |
Called when a drawer has settled in a completely closed state. | public void onDrawerClosed(View view) {
super.onDrawerClosed(view);
// getActionBar().setTitle(mTitle);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDrawerClosed(View view) {\n }",
"public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n Log.d(TAG, \"onDrawerClosed\");\n }",
"@Override\n public void onDrawerClosed(View drawerView) {\n ... | [
"0.7115407",
"0.6926059",
"0.6869123",
"0.6850017",
"0.6850017",
"0.67975765",
"0.67975765",
"0.67596",
"0.6745561",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"0.6725664",
"... | 0.57663655 | 84 |
Called when a drawer has settled in a completely open state. | public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
// getActionBar().setTitle(mDrawerTitle);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}",
"public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n handleEvent_onDrawerOpened(drawerView);\n }",
"@Override\n public void onDrawerStateCh... | [
"0.70575815",
"0.6901369",
"0.67309564",
"0.67309564",
"0.67309564",
"0.67309564",
"0.6724413",
"0.67101437",
"0.67101437",
"0.67101437",
"0.67101437",
"0.65850323",
"0.645492",
"0.6450285",
"0.6450285",
"0.6450285",
"0.6450285",
"0.6450285",
"0.6450285",
"0.6450285",
"0.6450... | 0.0 | -1 |
Pass the event to ActionBarDrawerToggle, if it returns true, then it has handled the app icon touch event | @Override
public boolean onOptionsItemSelected(MenuItem item) {
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
/*
Play All
*/
if (((String) item.getTitle()).equalsIgnoreCase(getResources().getString(R.string.play_all_action_bar_button))) {
AppLogger.getLogger().Info("Library Presentation Fragment: play all clicked");
handlePlayRequest(false);
/*
Shuffle
*/
} else if (((String) item.getTitle()).equalsIgnoreCase(getResources().getString(R.string.shuffle_action_bar_button))) {
AppLogger.getLogger().Info("Library Presentation Fragment: shuffle all clicked");
handlePlayRequest(true);
/*
Filter/Sort
*/
} else if (((String) item.getTitle()).equalsIgnoreCase("filter/sort")) {
if (mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) {
mDrawerLayout.closeDrawer(Gravity.RIGHT);
} else {
mDrawerLayout.openDrawer(Gravity.RIGHT);
}
} else {
return super.onOptionsItemSelected(item);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle ... | [
"0.73664296",
"0.6544772",
"0.6448128",
"0.63443667",
"0.63411444",
"0.6315398",
"0.6315398",
"0.6289493",
"0.6279781",
"0.62619555",
"0.62619555",
"0.6242193",
"0.6242193",
"0.62199837",
"0.6215748",
"0.6215748",
"0.6215748",
"0.6215748",
"0.6215748",
"0.6215748",
"0.6215748... | 0.0 | -1 |
ignore the user pressing on the header | @Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if (i == 0) return;
// User is going "Up" to the parent menu
if (i == 1) {
mDrawerList.setAdapter(new NavigationDrawerAdapter(LibraryPresentationActivity.this));
mDrawerList.setOnItemClickListener(new DrawerSortItemClickListener());
mDrawerList.getOnItemClickListener().onItemClick(mDrawerList, null, mCurrentSortIndex, 0);
// User clicked something in the current menu
} else {
if (mSelectedYears == null)
mSelectedYears = new ArrayList<>();
if (mSelectedYears.contains(mYears.get(i))) {
mSelectedYears.remove(mYears.get(i));
} else
mSelectedYears.add(mYears.get(i));
int[] years = new int[mSelectedYears.size()];
for (int j = 0; j < years.length; j++) {
years[j] = mSelectedYears.get(j);
}
mItemQuery.setYears(years);
mLibraryView.PerformQuery(mItemQuery, new YearQueryREsponse());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void forceNotInsideHeader() {\n insideHeader = false;\n }",
"public void onInterruptHeaderRefreshing();",
"private void resetHeaderSmoothly() {\n if (null != mViewHandler) {\n isChanging = true;\n Message message = new Message();\n message.what = ViewHan... | [
"0.672194",
"0.6497765",
"0.63422424",
"0.6261981",
"0.62477726",
"0.6109084",
"0.60470915",
"0.59790146",
"0.59284693",
"0.58611494",
"0.5847468",
"0.57750714",
"0.574033",
"0.5706917",
"0.5697654",
"0.56819165",
"0.56402093",
"0.56314635",
"0.5610299",
"0.5597028",
"0.55783... | 0.0 | -1 |
ignore the user pressing on the header | @Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if (i == 0) return;
// User is going "Up" to the parent menu
if (i == 1) {
mDrawerList.setAdapter(new NavigationDrawerAdapter(LibraryPresentationActivity.this));
mDrawerList.setOnItemClickListener(new DrawerSortItemClickListener());
mDrawerList.getOnItemClickListener().onItemClick(mDrawerList, null, mCurrentSortIndex, 0);
// User clicked something in the current menu
} else {
if (mSelectedOfficialRatingIndex != i) {
mItemQuery.setMaxOfficialRating(mOfficialRatings.get(i));
mSelectedOfficialRatingIndex = i;
} else {
mItemQuery.setMaxOfficialRating(null);
mSelectedOfficialRatingIndex = 0;
}
mLibraryView.PerformQuery(mItemQuery);
((NavigationDrawerOfficialRatingAdapter) mDrawerList.getAdapter()).notifyDataSetChanged();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void forceNotInsideHeader() {\n insideHeader = false;\n }",
"public void onInterruptHeaderRefreshing();",
"private void resetHeaderSmoothly() {\n if (null != mViewHandler) {\n isChanging = true;\n Message message = new Message();\n message.what = ViewHan... | [
"0.672194",
"0.6497765",
"0.63422424",
"0.6261981",
"0.62477726",
"0.6109084",
"0.60470915",
"0.59790146",
"0.59284693",
"0.58611494",
"0.5847468",
"0.57750714",
"0.574033",
"0.5706917",
"0.5697654",
"0.56819165",
"0.56402093",
"0.56314635",
"0.5610299",
"0.5597028",
"0.55783... | 0.0 | -1 |
String substring = UUID.randomUUID().toString().replace("", "").substring(0, 6); smsTemplate.testSms("13797330069", substring, "TP1711063"); | @Test
public void testSms() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}",
"private String genSenderID(String phoneNumber) {\r\n String sid = phoneNumber.replaceAll(senderIDRegex, \"\");\r\n return sid.length() > 11 ? sid.substring(sid.length() - 1... | [
"0.68933654",
"0.6741896",
"0.62116945",
"0.61091936",
"0.61086273",
"0.60600024",
"0.6053423",
"0.596875",
"0.5914683",
"0.58929706",
"0.5853474",
"0.58347595",
"0.5830194",
"0.58088297",
"0.5806413",
"0.5785127",
"0.5771575",
"0.5723583",
"0.57218015",
"0.5706737",
"0.56794... | 0.5523846 | 38 |
/ File bakFile = new File(AppConfig.USER_HEAD_PHOTO_DIR, "user_head_photo_bak.png"); Uri bakUri = Uri.fromFile(bakFile); user_head_photo_iv.setImageURI(bakUri); | private void setImageToHeadView(Uri uri) {
handler.sendEmptyMessage(MSG_START_UPLOAD_IMAGE);
user_head_photo_iv.setImageURI(uri);
user_head_photo_select_lay.setVisibility(View.GONE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if(resultCode == RESULT_OK) {\n imgView.setImageURI(image_uri);\n// image_uri = data.getData();\n// try {\n// InputStream inputStream = getContentResolve... | [
"0.68655473",
"0.6830717",
"0.67623484",
"0.66589534",
"0.66537124",
"0.66186565",
"0.6543682",
"0.65389323",
"0.6503477",
"0.6500081",
"0.64783907",
"0.64627725",
"0.64545715",
"0.6446943",
"0.64449465",
"0.641464",
"0.6411968",
"0.6403822",
"0.6396105",
"0.6390708",
"0.6389... | 0.6827646 | 2 |
TODO Autogenerated method stub | public static void main(String[] args) throws Exception {
Stack s = new Stack();
Stack n = new Stack();
s.push(200);
s.push(150);
s.push(120);
s.push(100);
s.push(80);
s.display();
// displayrev(s);
actrev(s, n, s.size());
// System.out.println(s.size());
System.out.println();
System.out.println();
s.display();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Delegates to PersonRepository to get all Persons | public List getAll(){
List<Person> personList = personRepository.getAll();
return personList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Person> getPeople() {\n return this.personRepository.findAll();\n }",
"@Override\n\tpublic List<Person> getAllPersons() {\n\t\treturn (List<Person>) personDao.findAll();\n\t}",
"@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Perso... | [
"0.83899623",
"0.7795527",
"0.7711954",
"0.7546817",
"0.73828375",
"0.70288587",
"0.6990299",
"0.6983941",
"0.69826335",
"0.696565",
"0.69529027",
"0.68756205",
"0.68430567",
"0.68116945",
"0.6801238",
"0.67770946",
"0.677005",
"0.6732854",
"0.6720108",
"0.6706436",
"0.670250... | 0.7768379 | 2 |
Delegates to PersonRepository to get one single Person by ID | public Person getOne(Integer id) {
Person person = personRepository.getOne(id);
return person;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Person findById(Long idPerson) {\n return personRepository.findById(idPerson).get();\n }",
"public Person findOne(Long id) {\n\t\treturn personRepository.findById(id).get();\n\t}",
"public Person findPerson(Long id) {\n\t\treturn personRepository.findById(id).orElse(null); \n\t}... | [
"0.84401804",
"0.81325454",
"0.78262115",
"0.7795742",
"0.773302",
"0.7632832",
"0.76034176",
"0.759827",
"0.7570776",
"0.7561607",
"0.75306857",
"0.7507824",
"0.74263996",
"0.73955905",
"0.7379153",
"0.72773385",
"0.7257347",
"0.7236385",
"0.72135556",
"0.72040516",
"0.71972... | 0.8155753 | 1 |
Delegates to PersonRepository to create a new empty Person | public Person create() {
return personRepository.create();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Person createPerson();",
"@Test(enabled = true)\n public void createPerson() {\n List <Account> accounts = new ArrayList<>();\n List<Subscription> sub = new ArrayList<>();\n \n Contact contact = new Contact.Builder().emailaddress(\"nobub@gmial.com\").phoneNumber(\"021345685\").buil... | [
"0.7115281",
"0.708511",
"0.70457983",
"0.6737215",
"0.6541803",
"0.64374787",
"0.6428004",
"0.63886374",
"0.629966",
"0.6174639",
"0.61725855",
"0.6158424",
"0.6038045",
"0.59859776",
"0.5984146",
"0.5970612",
"0.5961011",
"0.59114707",
"0.589386",
"0.58926815",
"0.58926815"... | 0.7735326 | 0 |
Delegates to PersonRepository to save the created person | public void add(Person person){
personRepository.add(person);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void savePerson() {\n this.personDao.savePerson();\n }",
"public Person save(Person person) {\n return personRepository.save(person.getId(), person);\n }",
"public void savePerson() {\n\t\tthis.personService.savePerson();\n\t}",
"public void create(Person person) {\n\t\tpers... | [
"0.80329776",
"0.79467094",
"0.77079004",
"0.7624474",
"0.75678545",
"0.74575764",
"0.724547",
"0.72241205",
"0.7087347",
"0.693567",
"0.6890682",
"0.68570334",
"0.68570334",
"0.68372506",
"0.68316704",
"0.6804554",
"0.6792937",
"0.6772833",
"0.6771407",
"0.6748851",
"0.67345... | 0.6809589 | 15 |
Delegates to PersonRepository to save the edited Person | public void edit(Person person) {
personRepository.edit(person);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void savePerson() {\n this.personDao.savePerson();\n }",
"public void savePerson() {\n\t\tthis.personService.savePerson();\n\t}",
"public void savePerson(Person person) {\n\t\t\n\t}",
"@Override\n\tpublic void save(Person person) {\n\t\t\n\t}",
"public Person save(Person person) {\n... | [
"0.7765398",
"0.75052124",
"0.7502918",
"0.7413494",
"0.7391772",
"0.73160994",
"0.72580826",
"0.7142364",
"0.7063126",
"0.70310056",
"0.6901154",
"0.68661636",
"0.68404454",
"0.6801715",
"0.6795413",
"0.67889154",
"0.67889154",
"0.67752147",
"0.67251635",
"0.6684596",
"0.663... | 0.73377776 | 5 |
Delegates to PersonRepository to delete the existing Person identified by its id | public void delete(Integer id) {
personRepository.delete(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deletePersonById( final Long id );",
"public void delete(Long id) {\n\t\tpersonRepository.deleteById(id);\n\t}",
"@Transactional\n\t@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tpersonaRepository.deleteById(id);\n\t}",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<Person... | [
"0.79227364",
"0.758961",
"0.74832094",
"0.74111503",
"0.73720497",
"0.7354509",
"0.73465466",
"0.7332284",
"0.7220424",
"0.71565646",
"0.7100157",
"0.70939875",
"0.7067716",
"0.70467633",
"0.69188774",
"0.6911986",
"0.6877662",
"0.6856495",
"0.6835661",
"0.6833582",
"0.66624... | 0.7740363 | 1 |
Creates a Person Data Transfer Object to consolidate data from one to many associations | public List<PersonDTO> getDTOs(){
List<PersonDTO> personDTOs = new ArrayList<PersonDTO>();
List<Person> persons = personRepository.getAll();
for (Person person: persons) {
// Create new data transfer object
PersonDTO dto = new PersonDTO();
dto.setId(person.getId());
dto.setTitle(person.getTitle());
dto.setFirstName(person.getFirstName());
dto.setLastName(person.getLastName());
dto.setEmail(person.getEmail());
dto.setPhone(person.getPhone());
dto.setAddress1(person.getAddress1());
dto.setAddress2(person.getAddress2());
dto.setZipCode(person.getZipCode());
dto.setCity(person.getCity());
dto.setCountry(person.getCountry());
// Add to model list
personDTOs.add(dto);
}
return personDTOs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void toPersonObject() {\n\t\t\n\t\t// queries \n\t\tString getPersonQuery = \"SELECT * FROM Persons\";\n\t\tString getEmailQuery = \"SELECT (email) FROM Emails e WHERE e.personID=?;\";\n\t\t\n\t\t// Create connection and prepare Sql statement \n\t\tConnection conn = null;\n\t\tPreparedStatement ps = ... | [
"0.6545421",
"0.61583924",
"0.59264463",
"0.5605547",
"0.55708706",
"0.5567945",
"0.5567057",
"0.5505947",
"0.5493411",
"0.5489751",
"0.5478438",
"0.5439839",
"0.54298866",
"0.5418862",
"0.541702",
"0.54077756",
"0.5396214",
"0.5345497",
"0.533457",
"0.52971786",
"0.52797806"... | 0.578255 | 3 |
Test of criarGrupo method, of class GrupoController. | @Test
public void testCriarGrupo_Model() throws Exception {
mockMvc.perform(get("/grupo/criarGrupo"))
.andExpect(model().attribute("listaDeGrupos", hasSize(1)))
.andExpect(status().isOk())
.andExpect(view().name("grupo/criarGrupo"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMe... | [
"0.7236003",
"0.6553439",
"0.6438345",
"0.6411903",
"0.63873684",
"0.6337896",
"0.63003266",
"0.62849885",
"0.62805474",
"0.62441725",
"0.6230858",
"0.6164982",
"0.6163535",
"0.61385864",
"0.6133037",
"0.61177075",
"0.6110373",
"0.6107049",
"0.6056745",
"0.6051587",
"0.604283... | 0.6114165 | 16 |
Test of criarGrupo method, of class GrupoController. | @Test
public void testCriarGrupo_GrupoViewModel() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/grupo/criarGrupo"))
.andExpect(status().is3xxRedirection())
.andExpect(view().name("redirect:criarGrupo"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMe... | [
"0.7235437",
"0.6551297",
"0.64116615",
"0.63847834",
"0.6338314",
"0.63026726",
"0.6288308",
"0.6280264",
"0.6244469",
"0.62304366",
"0.6165085",
"0.61641246",
"0.61389",
"0.61335516",
"0.6119048",
"0.611605",
"0.6109686",
"0.6105158",
"0.6057439",
"0.6051461",
"0.6044041",
... | 0.6438879 | 2 |
Test of adicionarUsuario method, of class GrupoController. | @Test
public void testAdicionarUsuario() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/grupo/adicionarUsuario")
.param("idUsuario", "1"))
.andExpect(status().is3xxRedirection())
.andExpect(view().name("redirect:grupo/criarUsuario?usuarioAdicionado"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n ... | [
"0.73188454",
"0.7234404",
"0.72115254",
"0.7149588",
"0.7028165",
"0.70075005",
"0.6941425",
"0.69250005",
"0.68399185",
"0.67357063",
"0.6728212",
"0.6695688",
"0.6676878",
"0.66704893",
"0.6636876",
"0.6624942",
"0.660094",
"0.65904707",
"0.6585208",
"0.65836024",
"0.65721... | 0.7747977 | 0 |
Test of adicionarItinerarios method, of class GrupoController. | @Test
public void testAdicionarItinerarios() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/grupo/adicionarItinerario")
.param("id", "1").param("idItinerario", "1").param("idItinerario", "2"))
.andExpect(status().is3xxRedirection())
.andExpect(view().name("redirect:/grupo/administrarGrupo?id=1"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testAdicionarUsuario() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/grupo/adicionarUsuario\")\n .param(\"idUsuario\", \"1\"))\n .andExpect(status().is3xxRedirection())\n .andExpect(view().name(\"redirect:grupo/criarUsuario?us... | [
"0.6523221",
"0.6507827",
"0.6496463",
"0.63921475",
"0.6360118",
"0.63417196",
"0.6315477",
"0.63027674",
"0.6264664",
"0.62493616",
"0.622547",
"0.6199577",
"0.61960864",
"0.61801255",
"0.6148528",
"0.61054975",
"0.61049205",
"0.6101927",
"0.60998756",
"0.6080454",
"0.60626... | 0.7754353 | 0 |
Test of removerItinerarios method, of class GrupoController. | @Test
public void testRemoverItinerarios() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/grupo/removerItinerario")
.param("id", "1").param("idItinerario", "1").param("idItinerario", "2"))
.andExpect(status().is3xxRedirection())
.andExpect(view().name("redirect:/grupo/administrarGrupo?id=1"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testRemoverGrupo() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/grupo/removerGrupo\")\n .param(\"id\", \"1\"))\n .andExpect(status().is3xxRedirection())\n .andExpect(view().name(\"redirect:/grupo/criarGrupo?removido\"));\n ... | [
"0.71526116",
"0.69996345",
"0.69500357",
"0.6946715",
"0.6888883",
"0.66093254",
"0.6605839",
"0.6436312",
"0.6424733",
"0.64206856",
"0.6359034",
"0.6338548",
"0.6328281",
"0.63109475",
"0.6300388",
"0.6281664",
"0.6278615",
"0.6264269",
"0.62576574",
"0.6249757",
"0.619746... | 0.78443563 | 0 |
Test of removerGrupo method, of class GrupoController. | @Test
public void testRemoverGrupo() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/grupo/removerGrupo")
.param("id", "1"))
.andExpect(status().is3xxRedirection())
.andExpect(view().name("redirect:/grupo/criarGrupo?removido"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testRemoverItinerarios() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/grupo/removerItinerario\")\n .param(\"id\", \"1\").param(\"idItinerario\", \"1\").param(\"idItinerario\", \"2\"))\n .andExpect(status().is3xxRedirection())\n ... | [
"0.742061",
"0.7218339",
"0.6866299",
"0.6820057",
"0.67551494",
"0.6742467",
"0.6651286",
"0.6551408",
"0.65096545",
"0.6452674",
"0.64491946",
"0.6448385",
"0.641658",
"0.64011496",
"0.6379948",
"0.6289069",
"0.6253554",
"0.62159425",
"0.61807626",
"0.6162876",
"0.6156299",... | 0.8153209 | 0 |
Test of administrarGrupo method, of class GrupoController. | @Test
public void testAdministrarGrupo() throws Exception {
mockMvc.perform(get("/grupo/administrarGrupo")
.param("id", "1"))
.andExpect(model().attribute("id", 1))
.andExpect(status().isOk())
.andExpect(view().name("grupo/administrarGrupo"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void associarDesassociarUsuarioAoGrupo(){\n\t\t\n\t\tincluirGrupoPage.incluirGrupoBuilder(nomeGrupo, \"Feito pra testar associacao\");\n\n\t\tincluirUsuarioPage.inserirUsuarioBuilder(nomeLogin, nomeUsuario, \"tabosa@visent.com\",\n\t\t\t\t\"12304560\", \"061\", \"Claro DF\", \"Rafael\");\n\t\t\n\t\... | [
"0.7081816",
"0.6645339",
"0.6609864",
"0.65357023",
"0.6488122",
"0.6415279",
"0.6315033",
"0.6284946",
"0.628463",
"0.62566143",
"0.6161959",
"0.61480516",
"0.6140753",
"0.6125499",
"0.6114034",
"0.6112881",
"0.6111364",
"0.61044455",
"0.6102638",
"0.6093999",
"0.6092298",
... | 0.76663315 | 0 |
Test of pesquisar method, of class GrupoController. | @Test
public void testPesquisar() throws Exception {
mockMvc.perform(get("/grupo/pesquisar"))
.andExpect(status().isOk())
.andExpect(view().name("grupo/pesquisar"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void pesquisar() {\n\t\tthis.alunos = this.alunoDao.listarTodos();\n\t\tthis.quantPesquisada = this.alunos.size();\n\t\tSystem.out.println(\"Teste\");\n\n\t}",
"public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());... | [
"0.7224301",
"0.70488787",
"0.644309",
"0.6359203",
"0.6269027",
"0.6220424",
"0.62136054",
"0.62017834",
"0.6188668",
"0.6187236",
"0.6145926",
"0.6064599",
"0.6063657",
"0.6014671",
"0.60011995",
"0.59979886",
"0.5975745",
"0.5947611",
"0.5938462",
"0.5936044",
"0.5915897",... | 0.72713745 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter n: ");
int n = input.nextInt();
printMatrix(n);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
get binary data resource | @Override
@SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
protected void doGet(@NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws ServletException, IOException {
Resource resource = getBinaryDataResource(request);
if (resource == null) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
// check if the resource was modified since last request
if (isNotModified(resource, request, response)) {
return;
}
// get binary data and send to client
byte[] binaryData = getBinaryData(resource, request);
if (binaryData == null || binaryData.length == 0) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
else {
String contentType = getContentType(resource, request);
sendBinaryData(binaryData, contentType, request, response);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected byte[] getBinaryData(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) throws IOException {\n InputStream is = resource.adaptTo(InputStream.class);\n if (is == null) {\n return null;\n }\n try {\n return IOUtils.toByteArray(is);\n }\n finally {\... | [
"0.7520533",
"0.7492191",
"0.71926594",
"0.691807",
"0.691807",
"0.691807",
"0.691807",
"0.68811387",
"0.6419999",
"0.6392223",
"0.633491",
"0.63140297",
"0.62449723",
"0.62449723",
"0.62449723",
"0.62449723",
"0.62449723",
"0.62449723",
"0.62449723",
"0.62449723",
"0.6244972... | 0.0 | -1 |
Get resource containing the binary data to deliver. | protected Resource getBinaryDataResource(SlingHttpServletRequest request) {
return request.getResource();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected byte[] getBinaryData(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) throws IOException {\n InputStream is = resource.adaptTo(InputStream.class);\n if (is == null) {\n return null;\n }\n try {\n return IOUtils.toByteArray(is);\n }\n finally {\... | [
"0.6397711",
"0.62883997",
"0.6019983",
"0.601318",
"0.5946688",
"0.59048045",
"0.57054484",
"0.5684358",
"0.5674347",
"0.56573355",
"0.5642854",
"0.5634821",
"0.5631604",
"0.5625136",
"0.5609942",
"0.5604055",
"0.5567008",
"0.5563672",
"0.55588675",
"0.55368537",
"0.55237544... | 0.64665693 | 0 |
Checks if the resource was modified since last request | protected boolean isNotModified(Resource resource, SlingHttpServletRequest request,
SlingHttpServletResponse response) throws IOException {
// check resource's modification date against the If-Modified-Since header and send 304 if resource wasn't modified
// never send expires header on author or publish instance (performance optimization - if medialib items changes
// users have to refresh browsers cache)
return CacheHeader.isNotModified(resource, request, response, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isModified(SynchronizationRequest request)\n throws IOException {\n\n long modifiedTime = 0;\n\n if (request.getTimestampType()\n == SynchronizationRequest.TIMESTAMP_NONE) {\n return true;\n } else if (request.getTimestampType()\n == ... | [
"0.7562903",
"0.7267484",
"0.7242911",
"0.71756047",
"0.7110522",
"0.69769716",
"0.68907595",
"0.6889407",
"0.68742305",
"0.68410516",
"0.68410516",
"0.6810821",
"0.6791519",
"0.67277473",
"0.67277473",
"0.66991323",
"0.6688918",
"0.66815126",
"0.6677122",
"0.6668471",
"0.666... | 0.78741634 | 0 |
Get binary data from the referenced nt:file or nt:resourcer resource. | protected byte[] getBinaryData(Resource resource, @SuppressWarnings("unused") SlingHttpServletRequest request) throws IOException {
InputStream is = resource.adaptTo(InputStream.class);
if (is == null) {
return null;
}
try {
return IOUtils.toByteArray(is);
}
finally {
is.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Resource getBinaryDataResource(SlingHttpServletRequest request) {\n return request.getResource();\n }",
"byte[] getBinaryVDBResource(String resourcePath) throws Exception;",
"com.google.protobuf.ByteString\n getResourceUriBytes();",
"public byte[] read(String fileReference) {\r\n lo... | [
"0.6364737",
"0.61822325",
"0.6159714",
"0.59967476",
"0.58394945",
"0.57785875",
"0.5715157",
"0.56314516",
"0.5617208",
"0.55869925",
"0.5556043",
"0.55461127",
"0.55266297",
"0.5448306",
"0.54142463",
"0.54058427",
"0.53968763",
"0.5362188",
"0.534968",
"0.5345125",
"0.530... | 0.6654511 | 0 |
Get content type from the reference nt:file or nt:resourcer resource. | protected String getContentType(Resource resource, @SuppressWarnings("unused") SlingHttpServletRequest request) {
String mimeType = JcrBinary.getMimeType(resource);
if (StringUtils.isEmpty(mimeType)) {
mimeType = ContentType.OCTET_STREAM;
}
return mimeType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getContentType();",
"String getContentType();",
"String getContentType();",
"abstract ContentType getContnentType();",
"public String getContentType();",
"public String getContentType();",
"com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType();",
"static ResourceTy... | [
"0.63054127",
"0.63054127",
"0.63054127",
"0.62478906",
"0.61925673",
"0.61925673",
"0.6066279",
"0.6064943",
"0.59844124",
"0.59772176",
"0.59155506",
"0.58654904",
"0.5863532",
"0.5813708",
"0.5786792",
"0.5768714",
"0.57547987",
"0.5742371",
"0.5714456",
"0.5708494",
"0.57... | 0.667082 | 0 |
Send binary data to output stream. Respect optional content disposition header handling. | protected void sendBinaryData(byte[] binaryData, String contentType,
SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {
// set content type and length
response.setContentType(contentType);
response.setContentLength(binaryData.length);
// Handling of the "force download" selector
if (RequestPath.hasSelector(request, SELECTOR_DOWNLOAD)) {
// Overwrite MIME type with one suited for downloads
response.setContentType(ContentType.DOWNLOAD);
// Construct disposition header
StringBuilder dispositionHeader = new StringBuilder("attachment;");
String suffix = request.getRequestPathInfo().getSuffix();
suffix = StringUtils.stripStart(suffix, "/");
if (StringUtils.isNotEmpty(suffix)) {
dispositionHeader.append("filename=\"").append(suffix).append('\"');
}
response.setHeader(HEADER_CONTENT_DISPOSITION, dispositionHeader.toString());
}
// write binary data
OutputStream out = response.getOutputStream();
out.write(binaryData);
out.flush();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void sendDispositionHeader(OutputStream out) throws IOException\r\n {\r\n String dispositionHeader = createHeadersAsDisposition();\r\n if ( AeUtil.notNullOrEmpty(dispositionHeader) )\r\n out.write(EncodingUtil.getAsciiBytes(dispositionHeader));\r\n }",
"@Override\n\tpublic void se... | [
"0.63689667",
"0.581523",
"0.56503403",
"0.55147576",
"0.54112744",
"0.53597647",
"0.5270976",
"0.5266951",
"0.52560174",
"0.5171096",
"0.5165425",
"0.5142476",
"0.5114708",
"0.5062006",
"0.5053789",
"0.50468266",
"0.5039231",
"0.50379604",
"0.5023845",
"0.5007546",
"0.499282... | 0.6644928 | 0 |
TODO Autogenerated method stub | @Override
public BigInteger getCommentCount(Long postsid) {
String sql = "select count(*) from comment";
if (postsid != null) {
sql += " where postsid=" + postsid;
}
List<BigInteger> ret = null;
Session session = getSession();
try {
Query query = session.createSQLQuery(sql);
ret = query.list();
} catch (Exception e) {
e.printStackTrace();
}
if (ret != null && ret.size() > 0) {
return ret.get(0);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public CommentEntity getLatestCommentByPostsid(Long postsid) {
String sql = "select * from comment where postsid=? order by time desc limit 1";
List<CommentEntity> ret = null;
Session session = getSession();
try {
Query query = session.createSQLQuery(sql).addEntity(CommentEntity.class);
query.setLong(0, postsid);
ret = query.list();
} catch (Exception e) {
e.printStackTrace();
}
if (ret != null && ret.size() > 0) {
return ret.get(0);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public DataWrapper<List<CommentEntity>> getByPostId(Integer numPerPage, Integer pageNum,Long postsId) {
DataWrapper<List<CommentEntity>> dataWrapper = new DataWrapper<List<CommentEntity>>();
List<CommentEntity> ret = null;
Session session = getSession();
String sql = "select c.commentid as commentid,c.postsid as postsid,c.contents as contents,c.time as time,c.userid as userid, u.username as username from comment c,user u where c.userid=u.userid";
if (postsId != null) {
sql += " and c.postsid=" + postsId;
}
sql += " order by c.time desc";
Query query=session.createSQLQuery(sql)
.addScalar("commentid",StandardBasicTypes.LONG)
.addScalar("postsid",StandardBasicTypes.LONG)
.addScalar("contents",StandardBasicTypes.STRING)
.addScalar("time",StandardBasicTypes.TIMESTAMP)
.addScalar("userid",StandardBasicTypes.LONG)
.addScalar("username",StandardBasicTypes.STRING)
.setResultTransformer(Transformers.aliasToBean(CommentEntity.class));
if (numPerPage == null) {
numPerPage = 10;
}
if (pageNum == null) {
pageNum = 1;
}
int totalltemNum = (query.list().size());
int totalPageNum = DaoUtils.getTotalPageNum(totalltemNum, numPerPage);
if (numPerPage > 0 && pageNum > 0) {
query.setMaxResults(numPerPage);
query.setFirstResult((pageNum - 1) * numPerPage);
}
dataWrapper.setCurrentPage(pageNum);
dataWrapper.setNumberPerPage(numPerPage);
dataWrapper.setTotalPage(totalPageNum);
dataWrapper.setTotalNumber(totalltemNum);
ret=query.list();
dataWrapper.setData(ret);
return dataWrapper;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
FilterService provides methods needed for search capabilities. It uses a Request / Response pattern You can hook into with several interceptors. | public interface FilterService {
ResultResponse process (ResultRequest request);
FacetResponse process (FacetRequest request);
SuggestionResponse process (SuggestionRequest request);
void addInterceptor (ResultRequestInterceptor interceptor);
void addInterceptor (FacetRequestInterceptor interceptor);
void addInterceptor (SuggestionRequestInterceptor interceptor);
void addInterceptor (ResultResponseInterceptor interceptor);
void addInterceptor (FacetResponseInterceptor interceptor);
void addInterceptor (SuggestionResponseInterceptor interceptor);
void removeInterceptor (ResultRequestInterceptor interceptor);
void removeInterceptor (FacetRequestInterceptor interceptor);
void removeInterceptor (SuggestionRequestInterceptor interceptor);
void removeInterceptor (ResultResponseInterceptor interceptor);
void removeInterceptor (FacetResponseInterceptor interceptor);
void removeInterceptor (SuggestionResponseInterceptor interceptor);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface FilterService {\n\n /**Method that will getFilteredItems the filter and return the result as a JSONArray\n * @return the filtered result as a JSONArray*/\n List<JSONObject> getFilteredItems();\n\n /**Method that returns the name of the class\n * @return class simple name*/\n St... | [
"0.6867983",
"0.6561045",
"0.6498786",
"0.64664567",
"0.6292287",
"0.6256401",
"0.61662984",
"0.60918206",
"0.608212",
"0.599406",
"0.59667265",
"0.59546816",
"0.59396124",
"0.59194434",
"0.59095335",
"0.58319545",
"0.5809339",
"0.57981974",
"0.57952034",
"0.5752785",
"0.5739... | 0.75556964 | 0 |
TODO Autogenerated method stub | private void mostrarNovoForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
RequestDispatcher dispatcher = request.getRequestDispatcher("usuario-form.jsp");
dispatcher.forward(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | private void inserirUsuario(HttpServletRequest request, HttpServletResponse response) throws IOException {
String nome = request.getParameter("nome");
String email = request.getParameter("email");
int telefone = Integer.parseInt (request.getParameter("telefone"));
String nacionalidade = request.getParameter("nacionalidade");
Usuario novoUsuario = new Usuario(nome, email, telefone, nacionalidade);
dao.inserirUsuario(novoUsuario);
response.sendRedirect("lista");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | private void deletarUsuario(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException {
int id = Integer.parseInt(request.getParameter("id"));
dao.deletarUsuario(id);
response.sendRedirect("lista");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | private void mostrarEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int id = Integer.parseInt(request.getParameter("id"));
Usuario existingUser = dao.selecionarUsuario(id);
RequestDispatcher dispatcher = request.getRequestDispatcher("usuario-form.jsp");
request.setAttribute("usuario", existingUser);
dispatcher.forward(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.