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 |
|---|---|---|---|---|---|---|
gets the row key for the given row by resolving the _rowKeyProperty | protected Object getRowKey(Object row)
{
assert (_rowKeyProperty != null);
return __resolveProperty(row, _rowKeyProperty);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object _getRowKey()\n {\n Object data = getRowData();\n \n assert (_rowKeyProperty != null);\n return __resolveProperty(data, _rowKeyProperty);\n }",
"public Comparable getRowKey(int row) { return this.underlying.getRowKey(row); }",
"public void setRowKeyProperty(String rowKeyProperty)\n ... | [
"0.8519124",
"0.80416995",
"0.7914624",
"0.77302116",
"0.741905",
"0.70715755",
"0.67819977",
"0.67665267",
"0.65020716",
"0.6378219",
"0.63095033",
"0.62984765",
"0.6279977",
"0.6269",
"0.61327726",
"0.60925436",
"0.60925436",
"0.60925436",
"0.60925436",
"0.60925436",
"0.605... | 0.8778059 | 0 |
gets the row key for current row by resolving the _rowKeyProperty | private Object _getRowKey()
{
Object data = getRowData();
assert (_rowKeyProperty != null);
return __resolveProperty(data, _rowKeyProperty);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Object getRowKey(Object row)\n {\n assert (_rowKeyProperty != null);\n return __resolveProperty(row, _rowKeyProperty);\n }",
"public String getRowKeyProperty()\n {\n return _rowKeyProperty;\n }",
"public void setRowKeyProperty(String rowKeyProperty)\n {\n _rowKeyProperty = rowKeyProp... | [
"0.8310447",
"0.8098504",
"0.79836977",
"0.77966213",
"0.76770985",
"0.7355059",
"0.6956958",
"0.6511941",
"0.65050614",
"0.6400114",
"0.6397841",
"0.6388648",
"0.6388648",
"0.6388648",
"0.6388648",
"0.6388648",
"0.63661784",
"0.635298",
"0.62969065",
"0.6292382",
"0.6286179"... | 0.87031096 | 0 |
/ V2 V3 migration | @Override
public void postKey(SQLiteDatabase database) {
if (!isMigratedV3(mContext, database)) {
database.rawExecSQL("PRAGMA cipher_migrate;");
setMigratedV3(mContext, database, true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void upgradeFrom_1_to_2(SQLiteDatabase db) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"*** Upgrade database from version [%s] to version [%s]\", VERSION_1, CURRENT_VERSION);\r\n\r\n //1- do migrations\r\n db.execSQL(Parameters.QUERY_CREATE);\r\n db.execSQL(Versions.QUERY_C... | [
"0.6122366",
"0.606635",
"0.60576063",
"0.6002787",
"0.59615433",
"0.5955336",
"0.5861025",
"0.58400965",
"0.58139104",
"0.57996005",
"0.57329655",
"0.57248944",
"0.57170844",
"0.5664765",
"0.56155145",
"0.5528723",
"0.55279005",
"0.551898",
"0.550059",
"0.5497239",
"0.547451... | 0.0 | -1 |
private static Session mySession = null; | public static void start() {
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date dtnow = new Date();
//Verify email queue
Iterator<Mailtogo> it = new MailtogoDAO().getQueue().iterator();
while(it.hasNext())
{
Mailtogo mtg = (Mailtogo)it.next();
mtg.setMtg_status("P");
mtg.save();
dtnow = new Date();
System.out.println(format.format(dtnow) + " -> Sending message " + mtg.getMtg_id());
send(mtg);
}
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Session getSession();",
"Session getSession();",
"private Session() {\n }",
"private Session() {\n }",
"private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }",
"public void setSession(Session session) {\n\tthis.session = session; \r\n}",
"public Session getSessio... | [
"0.76936793",
"0.76936793",
"0.768511",
"0.768511",
"0.74718046",
"0.74641097",
"0.7364051",
"0.73289615",
"0.730103",
"0.7292592",
"0.7292592",
"0.72757953",
"0.71944875",
"0.7193475",
"0.7181632",
"0.7077153",
"0.70584846",
"0.70401186",
"0.702136",
"0.70036304",
"0.6977216... | 0.0 | -1 |
Creates a new instance of Class | private LabelDbmsDao() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Class createClass();",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"Instance createInstance();",
"public T newInstance();",
"Reproducible newInstance();",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\... | [
"0.787032",
"0.7736781",
"0.7574847",
"0.722431",
"0.72172165",
"0.7207975",
"0.7040249",
"0.7034974",
"0.6982185",
"0.6896507",
"0.6830826",
"0.6782374",
"0.67510366",
"0.6708271",
"0.6675231",
"0.66502637",
"0.65975195",
"0.65883476",
"0.6528021",
"0.6528021",
"0.6518639",
... | 0.0 | -1 |
Builds an empty selection query. It has to be configured incrementally using the setter methods. | public QueryBuilder()
{
label = null;
queryCondition = null;
selectionLimiter = null;
selectionSorter = null;
variablesMap = new HashMap<String, Expression>();
selectionLabelsReferencedByStats = new HashSet<String>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Query empty() {\n return new Query();\n }",
"public QueryOptions build() {\n return new QueryOptions(this.columns, this.excludeColumns, this.excludeAttributes, this.shards);\n }",
"public Builder clearQuery() {\n bitField0_ = (bitField0_ & ~0x00000010);\... | [
"0.7255448",
"0.70475334",
"0.69381547",
"0.6501438",
"0.644508",
"0.64213455",
"0.6212303",
"0.6212303",
"0.61093247",
"0.6030588",
"0.6021534",
"0.5975914",
"0.5938979",
"0.5930984",
"0.5926006",
"0.5920883",
"0.5919807",
"0.5910119",
"0.5909888",
"0.5887399",
"0.5874046",
... | 0.68075854 | 3 |
Sets the label of the source selection. | public void setSourceSelectionLabel(String sourceSelectionLabel)
{
this.sourceSelectionLabel = sourceSelectionLabel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setLabel(String label);",
"public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }",
"public final void setLabel(final String label) {\r\n this.label = label;\r\n }",
"public void setLabel(final String label) {\n this.label = label;\n }",
"void setLabel... | [
"0.7339407",
"0.73227423",
"0.7177641",
"0.7133509",
"0.71257085",
"0.71248364",
"0.7119403",
"0.7110609",
"0.71097696",
"0.70709723",
"0.7070878",
"0.7068823",
"0.70309895",
"0.7030667",
"0.6983925",
"0.6983925",
"0.6968705",
"0.6939367",
"0.691843",
"0.69174784",
"0.6906597... | 0.83335525 | 0 |
Gets the label of the source selection associated with the query. | public String getSourceSelectionLabel()
{
return this.sourceSelectionLabel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getQueryLabel()\n {\n\treturn label;\n }",
"public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}",
"public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}",
"public void setSourceSelectionLabel(String sourceSelectionLabel)\n {\n\tthis.sourceSe... | [
"0.7106301",
"0.6832337",
"0.6423371",
"0.63774246",
"0.6247478",
"0.62239844",
"0.6192121",
"0.61852545",
"0.61752677",
"0.6155654",
"0.6155654",
"0.6155654",
"0.6144849",
"0.6144849",
"0.6144849",
"0.6139718",
"0.6131465",
"0.6131465",
"0.6121411",
"0.61160636",
"0.61122584... | 0.7932186 | 0 |
Registers the label of a selection that is being referenced by a stats function used by the query. Any referenced selection will be resolved using a SelectionResolver at building time (of the query). | public void addLabelOfSelectionReferencedByStats(String referencedSelectionLabel)
{
this.selectionLabelsReferencedByStats.add(referencedSelectionLabel);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setQueryLabel(String labelIdentifier)\n {\n\tthis.label = labelIdentifier;\n }",
"public void setSourceSelectionLabel(String sourceSelectionLabel)\n {\n\tthis.sourceSelectionLabel = sourceSelectionLabel;\n }",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"St... | [
"0.5502327",
"0.5412616",
"0.52651745",
"0.52651745",
"0.5258985",
"0.5223724",
"0.5194841",
"0.5168394",
"0.5161113",
"0.5121793",
"0.5097483",
"0.50416124",
"0.5010587",
"0.49797425",
"0.49541497",
"0.49415538",
"0.49018714",
"0.48985165",
"0.48895684",
"0.4888726",
"0.4873... | 0.6904336 | 0 |
Sets the label that identifies the query. | public void setQueryLabel(String labelIdentifier)
{
this.label = labelIdentifier;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setLabel(String label);",
"public void setLabel(final String label) {\n this.label = label;\n }",
"public void setLabel( String label ) {\r\n lbl = label;\r\n }",
"public void setLabel(String label) {\n this.label = label;\n }",
"public final void setLabel(final String label)... | [
"0.74580723",
"0.7359685",
"0.7352431",
"0.7315579",
"0.7310854",
"0.72784305",
"0.72408134",
"0.72078145",
"0.7157059",
"0.71554464",
"0.7139146",
"0.71086097",
"0.7104131",
"0.7104131",
"0.70672053",
"0.70573205",
"0.7033314",
"0.7016148",
"0.70141375",
"0.70121247",
"0.693... | 0.8401783 | 0 |
Gets the query label. | public String getQueryLabel()
{
return label;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLabel() {\n return _label == null ? name() : _label;\n }",
"public String getLabel() {\n return label;\n }",
"public String getLabel()\n {\n return label;\n }",
"public String getLabel() {\n return label;\n }",
"public String getLabel() {\n return la... | [
"0.67972857",
"0.65635204",
"0.65325856",
"0.6508362",
"0.6508362",
"0.6508362",
"0.64981806",
"0.64981806",
"0.64981806",
"0.6483083",
"0.6483083",
"0.64489836",
"0.64372563",
"0.64252",
"0.6423413",
"0.6422994",
"0.6422972",
"0.64175695",
"0.64114493",
"0.64114493",
"0.6411... | 0.8483033 | 0 |
Sets the condition of the query. | public void setQueryCondition(QueryCondition queryCondition)
{
this.queryCondition = queryCondition;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCondition(Expression condition)\n {\n this.condition = condition;\n }",
"public void setCondition(ExpressionNode condition);",
"public void set( final Condition condition )\n {\n m_condition = condition;\n }",
"public void setWhereCondition(com.sforce.soap.partner.SoqlWhereCo... | [
"0.72914946",
"0.72221315",
"0.66329616",
"0.6550275",
"0.64546055",
"0.6313714",
"0.626654",
"0.62456584",
"0.6136721",
"0.5972271",
"0.59584385",
"0.5946857",
"0.59406185",
"0.58876425",
"0.58767533",
"0.5870935",
"0.5852869",
"0.5818202",
"0.5812638",
"0.5799256",
"0.57370... | 0.7517716 | 0 |
Registers a new userdefined variable to be used in the query. | public void registerVariable(String variableName, Expression variableDefinition)
{
variablesMap.put(variableName, variableDefinition);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UserVariableDefinitionDto addUserVariableDefinition(UserVariableDefinitionDto definition) throws ServerCallFailedException;",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n ... | [
"0.67127323",
"0.66458744",
"0.66458744",
"0.6390818",
"0.6376135",
"0.6339001",
"0.62793595",
"0.62793595",
"0.61942357",
"0.6099403",
"0.6099403",
"0.607391",
"0.60606563",
"0.603018",
"0.6024377",
"0.60093516",
"0.6006309",
"0.5940072",
"0.58465147",
"0.57988",
"0.5755108"... | 0.6538073 | 3 |
Sets the limiter that will limit the selection produced by the query. | public void setSelectionLimiter(Limiter limiter)
{
this.selectionLimiter = limiter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSelectionLimit(long limit)\n {\n if (limit < 0L) {\n this.selLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.selLimitCount = 1L;\n } else {\n this.selLimitCount = limit;\n }\n }",
"public void setSelectionLimit(EventD... | [
"0.6131327",
"0.60770875",
"0.60437286",
"0.60272",
"0.5830993",
"0.58189344",
"0.58188707",
"0.5811002",
"0.5800102",
"0.5760946",
"0.5749277",
"0.56666166",
"0.56444323",
"0.562577",
"0.55833703",
"0.5538735",
"0.5527977",
"0.5523925",
"0.5490702",
"0.5485002",
"0.5462256",... | 0.8099683 | 0 |
Sets the sorter that will sort the entities selected by the query. | public void setSelectionSorter(EntitySorter sorter)
{
this.selectionSorter = sorter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TreeViewerSorterHandler(Tree tree, TreeViewerSorter sorter) {\n\t\tthis.tree = tree;\n\t\tthis.sorter = sorter;\n\t\tthis.registerColumns();\n\t}",
"public void setSortOrder(String sortOrder);",
"public void sort() {\n if (sorter != null)\n sort(sorter);\n }",
"public void setSort... | [
"0.55450696",
"0.5541409",
"0.55271333",
"0.54969853",
"0.54657227",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54483044",
"0.54322165",
"0.5417276",
"0.5372395",
"0.534946",
"0.52625877",
"0.5154848",
"0... | 0.7600748 | 0 |
Builds a new query based on the current configuration of the builder. | public Query buildSelectionQuery(SelectionResolver resolver) throws SelectionResolutionException
{
if(log.isDebugEnabled())
log.debug("Resolving SOURCE selection [" + this.sourceSelectionLabel + "] for [" + this.label + "]");
// Resolving the source selection (where we are selecting from).
Selection sourceSelection = resolver.resolveSelection(this.sourceSelectionLabel);
if(sourceSelection == null)
throw new NoSuchElementException("Impossible to resolve source selection [" + this.sourceSelectionLabel
+ "] for query: " + this.label);
else if(log.isDebugEnabled())
log.debug("Source selection RESOLVED [" + this.sourceSelectionLabel + "] for [" + this.label + "]");
// Update the scopes with the resolved selection (if necessary).
resolver.updateScopesWithResolvedSelection(sourceSelection);
// Resolve any selection referenced by stats functions.
Iterator<String> referencedLabels = this.selectionLabelsReferencedByStats.iterator();
while(referencedLabels.hasNext())
{
String refSelectionLabel = referencedLabels.next();
if(log.isDebugEnabled())
log.debug("Resolving REFERENCED selection [" + refSelectionLabel + "] for [" + this.label + "]");
if(resolver.resolveSelection(refSelectionLabel) == null)
throw new NoSuchElementException("Impossible to resolve referenced selection [" + refSelectionLabel
+ "] for query: " + this.label);
else if(log.isDebugEnabled())
log.debug("Referenced selection RESOLVED [" + refSelectionLabel + "] for [" + this.label + "]");
// Update the scopes with the resolved selection (if necessary).
resolver.updateScopesWithResolvedSelection(sourceSelection);
}
return new Query(label, queryCondition, sourceSelection, variablesMap, selectionSorter, selectionLimiter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public QueryBuilder buildQueryBuilder() {\n return dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(queryRestrictions)\n .debug(debug)\n .audit... | [
"0.78497106",
"0.7767496",
"0.7522502",
"0.72714865",
"0.6823172",
"0.67454636",
"0.6728924",
"0.65993994",
"0.65700215",
"0.65700215",
"0.65192986",
"0.6475855",
"0.63733995",
"0.6338121",
"0.6251722",
"0.6249504",
"0.62315786",
"0.6195236",
"0.6169297",
"0.615444",
"0.61440... | 0.0 | -1 |
On va lire le fichier Json | public DataRepository() throws IOException {
this.init();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n whil... | [
"0.70525455",
"0.70312405",
"0.7001609",
"0.683884",
"0.6826393",
"0.6823993",
"0.6819573",
"0.681854",
"0.6809285",
"0.68010944",
"0.67570823",
"0.66947603",
"0.66760087",
"0.6597922",
"0.65481234",
"0.6542778",
"0.6506653",
"0.6485498",
"0.6478553",
"0.6440432",
"0.643277",... | 0.0 | -1 |
Ecriture sur fichier json | public void commit() {
if (commit) {
// Récupérer le path du JSON
System.out.println(ClassLoader.getSystemResource(jsonFile));
URL url = ClassLoader.getSystemResource(jsonFile);
// On ouvre un flux d'écriture vers le fichier JSON
try (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {
// Ecriture du fichier JSON avec formatage
// (WithDefaultPrettyPrinter)
objectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);
logger.info("OK - fichier JSON mis à jour " + jsonFile);
} catch (FileNotFoundException e) {
logger.info("KO - FILE_NOT_FOUND" + jsonFile);
throw new DataRepositoryException("KO - FILE_NOT_FOUND", e);
} catch (IOException e) {
logger.info("KO - I/O ERROR" + jsonFile);
throw new DataRepositoryException("KO - I/O ERROR", e);
} catch (URISyntaxException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n ... | [
"0.7228319",
"0.7037551",
"0.69191945",
"0.67376626",
"0.6707089",
"0.6665017",
"0.6665017",
"0.6665017",
"0.65430313",
"0.64753896",
"0.6475273",
"0.6471174",
"0.6457775",
"0.64472795",
"0.64280283",
"0.6423619",
"0.6410349",
"0.64091265",
"0.6384293",
"0.63772106",
"0.63742... | 0.58758175 | 51 |
Autorisation de modifier la velur de commit | public void setCommit(boolean commit) {
this.commit = commit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void commit() {\n }",
"public void commit() {\n }",
"@Override\n public void commit() {\n }",
"@Override\n\tpublic void commit() {\n\n\t}",
"public void commit(){\n \n }",
"protected void post_commit_hook() { }",
"public void commit() {\n doCommit();\n }",
"void commit();",
"voi... | [
"0.7609484",
"0.71931285",
"0.71917814",
"0.7178478",
"0.7127877",
"0.69512457",
"0.6944263",
"0.6937619",
"0.6937619",
"0.6933956",
"0.68916106",
"0.6805306",
"0.6757449",
"0.6757449",
"0.67483175",
"0.6646738",
"0.664375",
"0.6620891",
"0.6576139",
"0.65309894",
"0.651625",... | 0.59393543 | 53 |
Write your code here | public static void print2DArray(int input[][]) {
int m = input.length;
if (m == 0)
return;
int n = input[0].length;
for (int i = 0; i < m; i++) {
int k = i;
while (k < m) {
for (int j = 0; j < n; j++) {
System.out.print(input[i][j] + " ");
}
k++;
System.out.println();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"public void ganar() {\n // TODO implement here\n }",
"@Override\r... | [
"0.6385292",
"0.62825674",
"0.6094859",
"0.59705144",
"0.59174407",
"0.5879631",
"0.58751583",
"0.58699447",
"0.5869017",
"0.58553624",
"0.5826625",
"0.5825323",
"0.58233553",
"0.577183",
"0.576982",
"0.5769503",
"0.57691693",
"0.5748044",
"0.57379705",
"0.573767",
"0.5728572... | 0.0 | -1 |
For test use only. | public IgniteThread checkpointerThread() {
return checkpointerThread;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private void test() {\n\n\t}",
"private ProtomakEngineTestHelper() {\r\n\t}",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"private stendhal() {\n\t}",
"@Before\n\t public void setUp() {\n\t }",
"private test5() {\r\n\t\r... | [
"0.68118864",
"0.67399323",
"0.6441675",
"0.6423817",
"0.6395269",
"0.62986887",
"0.6264853",
"0.6168618",
"0.61100763",
"0.6105351",
"0.6069076",
"0.60551643",
"0.6035609",
"0.60191655",
"0.60188746",
"0.599938",
"0.5992773",
"0.59913504",
"0.5978525",
"0.597235",
"0.5969114... | 0.0 | -1 |
For test use only. | public IgniteInternalFuture<Void> enableCheckpoints(boolean enable) {
GridFutureAdapter<Void> fut = new GridFutureAdapter<>();
enableChangeApplied = fut;
checkpointsEnabled = enable;
wakeupForCheckpoint("enableCheckpoints()");
return fut;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private void test() {\n\n\t}",
"private ProtomakEngineTestHelper() {\r\n\t}",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"private stendhal() {\n\t}",
"@Before\n\t public void setUp() {\n\t }",
"private test5() {\r\n\t\r... | [
"0.68118864",
"0.67399323",
"0.6441675",
"0.6423817",
"0.6395269",
"0.62986887",
"0.6264853",
"0.6168618",
"0.61100763",
"0.6105351",
"0.6069076",
"0.60551643",
"0.6035609",
"0.60191655",
"0.60188746",
"0.599938",
"0.5992773",
"0.59913504",
"0.5978525",
"0.597235",
"0.5969114... | 0.0 | -1 |
Create metastorage data region configuration with enabled persistence by default. | private DataRegionConfiguration createMetastoreDataRegionConfig(DataStorageConfiguration storageCfg) {
DataRegionConfiguration cfg = new DataRegionConfiguration();
cfg.setName(METASTORE_DATA_REGION_NAME);
cfg.setInitialSize(storageCfg.getSystemRegionInitialSize());
cfg.setMaxSize(storageCfg.getSystemRegionMaxSize());
cfg.setPersistenceEnabled(true);
cfg.setLazyMemoryAllocation(false);
return cfg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createDataStore (){\n\t\tcloseActiveStoreData ();\n\t\tif (_usablePersistenceManager){\n\t\t\tclosePersistence ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tthis.pm = DataStoreUtil.createDataStore (getDataStoreEnvironment (), true);\n\t\t_usablePersistenceManager = true;\n\t}",
"@Override\n\tpublic... | [
"0.5467329",
"0.5379992",
"0.526712",
"0.52541983",
"0.5242318",
"0.5227086",
"0.5193207",
"0.51484364",
"0.51256025",
"0.5109171",
"0.51066595",
"0.49793178",
"0.49724832",
"0.4969937",
"0.4964335",
"0.4956125",
"0.49286464",
"0.4927425",
"0.49120197",
"0.49055472",
"0.49014... | 0.7956725 | 0 |
Cleanup checkpoint directory from all temporary files. | @Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {
try {
try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {
for (Path path : files)
Files.delete(path);
}
}
catch (IOException e) {
throw new IgniteCheckedException("Failed to cleanup checkpoint directory from temporary files: " + cpDir, e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n ... | [
"0.79604423",
"0.7311547",
"0.7299983",
"0.713398",
"0.7092709",
"0.70753884",
"0.7058656",
"0.70412415",
"0.7029668",
"0.6932536",
"0.6748282",
"0.673458",
"0.6680451",
"0.661228",
"0.66098297",
"0.65767014",
"0.65359384",
"0.6431233",
"0.63882154",
"0.63635164",
"0.633722",... | 0.8643265 | 0 |
Parses checkpoint entry from given file. | @Nullable private CheckpointEntry parseFromFile(ByteBuffer buf, File file) throws IgniteCheckedException {
Matcher matcher = CP_FILE_NAME_PATTERN.matcher(file.getName());
if (!matcher.matches())
return null;
CheckpointEntryType type = CheckpointEntryType.valueOf(matcher.group(3));
if (type != CheckpointEntryType.START)
return null;
long cpTs = Long.parseLong(matcher.group(1));
UUID cpId = UUID.fromString(matcher.group(2));
WALPointer ptr = readPointer(file, buf);
return createCheckPointEntry(cpTs, ptr, cpId, null, CheckpointEntryType.START);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NonNull\n public static CheckpointManager parse(@NonNull BufferedReader reader) throws IOException {\n try (Stream<String> lines = reader.lines()) {\n Map<URI, Checkpoint> checkpoints =\n lines\n .map(\n line -> {\n int i = line.indexOf(';');\n ... | [
"0.60214067",
"0.5674374",
"0.5373554",
"0.5331233",
"0.52084637",
"0.5195559",
"0.51361215",
"0.51248366",
"0.5110789",
"0.51027936",
"0.509854",
"0.5084068",
"0.5080222",
"0.50600874",
"0.4952239",
"0.4946312",
"0.4943476",
"0.48530856",
"0.48403952",
"0.48320338",
"0.48301... | 0.7379782 | 0 |
Restores last valid WAL pointer and resumes logging from that pointer. Recreates metastorage if needed. | private void finishRecovery() throws IgniteCheckedException {
assert !cctx.kernalContext().clientNode();
long time = System.currentTimeMillis();
CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);
try {
for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext()))
lsnr.beforeResumeWalLogging(this);
// Try to resume logging since last finished checkpoint if possible.
if (walTail == null) {
CheckpointStatus status = readCheckpointStatus();
walTail = CheckpointStatus.NULL_PTR.equals(status.endPtr) ? null : status.endPtr;
}
cctx.wal().resumeLogging(walTail);
walTail = null;
// Recreate metastorage to refresh page memory state after deactivation.
if (metaStorage == null)
metaStorage = createMetastorage(false);
notifyMetastorageReadyForReadWrite();
U.log(log, "Finish recovery performed in " + (System.currentTimeMillis() - time) + " ms.");
}
catch (IgniteCheckedException e) {
if (X.hasCause(e, StorageException.class, IOException.class))
cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, e));
throw e;
}
finally {
CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void outRestore() throws IOException {\n if (lastWriteOffset > 0) {\n outSeek(lastWriteOffset);\n lastWriteOffset = -1;\n }\n }",
"private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLoca... | [
"0.57928663",
"0.55113876",
"0.5467369",
"0.5449811",
"0.53021216",
"0.528739",
"0.5259035",
"0.5254321",
"0.52360356",
"0.51760674",
"0.50482404",
"0.50414616",
"0.50258005",
"0.4994564",
"0.4989678",
"0.49224776",
"0.4899851",
"0.4888712",
"0.48860225",
"0.48580503",
"0.485... | 0.5783827 | 1 |
Resolves throttling policy according to the settings. | @NotNull private PageMemoryImpl.ThrottlingPolicy resolveThrottlingPolicy() {
PageMemoryImpl.ThrottlingPolicy plc = persistenceCfg.isWriteThrottlingEnabled()
? PageMemoryImpl.ThrottlingPolicy.SPEED_BASED
: PageMemoryImpl.ThrottlingPolicy.CHECKPOINT_BUFFER_ONLY;
if (throttlingPolicyOverride != null) {
try {
plc = PageMemoryImpl.ThrottlingPolicy.valueOf(throttlingPolicyOverride.toUpperCase());
}
catch (IllegalArgumentException e) {
log.error("Incorrect value of IGNITE_OVERRIDE_WRITE_THROTTLING_ENABLED property. " +
"The default throttling policy will be used [plc=" + throttlingPolicyOverride +
", defaultPlc=" + plc + ']');
}
}
return plc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This... | [
"0.591083",
"0.57961327",
"0.5763568",
"0.5747242",
"0.5737264",
"0.5483732",
"0.5447894",
"0.5309138",
"0.5302609",
"0.5242709",
"0.52184355",
"0.520119",
"0.514049",
"0.51020086",
"0.5081573",
"0.5073204",
"0.5021939",
"0.49523503",
"0.48900878",
"0.4862454",
"0.4852923",
... | 0.7506991 | 0 |
Creates a new index rebuild future that should be completed later after exchange is done. The future has to be created before exchange is initialized to guarantee that we will capture a correct future after activation or restore completes. If there was an old future for the given ID, it will be completed. | private void prepareIndexRebuildFuture(int cacheId) {
GridFutureAdapter<Void> old = idxRebuildFuts.put(cacheId, new GridFutureAdapter<>());
if (old != null)
old.onDone();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private BlockingFuture setRetractingFuture(ATFarReference reference) {\n\t\t// first assign future to a local variable to avoid race conditions on writing to the outboxFuture_ variable!\n\t\tfinal BlockingFuture future = new BlockingFuture();\n\t\tsynchronized(this) { \n\t\t\t// synchronized access because differe... | [
"0.50605434",
"0.50461787",
"0.4861024",
"0.47546017",
"0.46654776",
"0.46082425",
"0.44956034",
"0.44794568",
"0.44740105",
"0.44683364",
"0.44674215",
"0.44656283",
"0.43495214",
"0.4306067",
"0.42660484",
"0.4265075",
"0.42486686",
"0.42339644",
"0.42117074",
"0.41716892",
... | 0.65369755 | 0 |
Gets the checkpoint read lock. While this lock is held, checkpoint thread will not acquireSnapshotWorker memory state. | @Override public void checkpointReadLock() {
if (checkpointLock.writeLock().isHeldByCurrentThread())
return;
long timeout = checkpointReadLockTimeout;
long start = U.currentTimeMillis();
boolean interruped = false;
try {
for (; ; ) {
try {
if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)
failCheckpointReadLock();
try {
if (timeout > 0) {
if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),
TimeUnit.MILLISECONDS))
failCheckpointReadLock();
}
else
checkpointLock.readLock().lock();
}
catch (InterruptedException e) {
interruped = true;
continue;
}
if (stopping) {
checkpointLock.readLock().unlock();
throw new IgniteException(new NodeStoppingException("Failed to perform cache update: node is stopping."));
}
if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)
break;
else {
checkpointLock.readLock().unlock();
if (timeout > 0 && U.currentTimeMillis() - start >= timeout)
failCheckpointReadLock();
try {
checkpointer.wakeupForCheckpoint(0, "too many dirty pages").cpBeginFut
.getUninterruptibly();
}
catch (IgniteFutureTimeoutCheckedException e) {
failCheckpointReadLock();
}
catch (IgniteCheckedException e) {
throw new IgniteException("Failed to wait for checkpoint begin.", e);
}
}
}
catch (CheckpointReadLockTimeoutException e) {
log.error(e.getMessage(), e);
timeout = 0;
}
}
}
finally {
if (interruped)
Thread.currentThread().interrupt();
}
if (ASSERTION_ENABLED)
CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SimpleLock readLock() {\n\n\t\treturn readerLock;\n\t}",
"@Override public long checkpointReadLockTimeout() {\n return checkpointReadLockTimeout;\n }",
"@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n ... | [
"0.6523358",
"0.64132255",
"0.63794565",
"0.6119223",
"0.5996215",
"0.5879751",
"0.5788393",
"0.5783199",
"0.5675285",
"0.567332",
"0.56590474",
"0.56535316",
"0.5653309",
"0.5630198",
"0.5574469",
"0.5554752",
"0.5512995",
"0.5512226",
"0.5462488",
"0.5443309",
"0.54396486",... | 0.7308686 | 0 |
Invokes critical failure processing. Always throws. | private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException {
String msg = "Checkpoint read lock acquisition has been timed out.";
IgniteException e = new IgniteException(msg);
if (cctx.kernalContext().failure().process(new FailureContext(SYSTEM_CRITICAL_OPERATION_TIMEOUT, e)))
throw e;
throw new CheckpointReadLockTimeoutException(msg);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean processFailure(Throwable t);",
"@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}",
"@NonBlocking\n void error(Throwable throwable);",
"public void threadFail(Throwable e) {\n failure = e;\n resume(mainThread);\n }",
"protected abstract void executeActionsIfError();",
"void failed (Exc... | [
"0.65236676",
"0.64839196",
"0.6443723",
"0.6430043",
"0.6358034",
"0.63291323",
"0.62917346",
"0.6259834",
"0.62206566",
"0.6124485",
"0.61244255",
"0.61151236",
"0.6087802",
"0.6081895",
"0.60613614",
"0.60613614",
"0.60185426",
"0.6007208",
"0.6001237",
"0.5985341",
"0.598... | 0.0 | -1 |
Releases the checkpoint read lock. | @Override public void checkpointReadUnlock() {
if (checkpointLock.writeLock().isHeldByCurrentThread())
return;
checkpointLock.readLock().unlock();
if (ASSERTION_ENABLED)
CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }",
"public void releaseReadLock() {\r\n return;\r\n }",
"void releaseReadLock();"... | [
"0.7583303",
"0.67791057",
"0.6699587",
"0.61044675",
"0.59771276",
"0.5972889",
"0.5961482",
"0.5863713",
"0.5812012",
"0.57306665",
"0.5688371",
"0.5563095",
"0.5463182",
"0.53627133",
"0.52806693",
"0.5269479",
"0.5244069",
"0.52330035",
"0.52256495",
"0.5221387",
"0.52008... | 0.80636907 | 0 |
Loads WAL pointer from CP file | private WALPointer readPointer(File cpMarkerFile, ByteBuffer buf) throws IgniteCheckedException {
buf.position(0);
try (FileIO io = ioFactory.create(cpMarkerFile, READ)) {
io.readFully(buf);
buf.flip();
return new FileWALPointer(buf.getLong(), buf.getInt(), buf.getInt());
}
catch (IOException e) {
throw new IgniteCheckedException(
"Failed to read checkpoint pointer from marker file: " + cpMarkerFile.getAbsolutePath(), e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.printl... | [
"0.5530338",
"0.5510207",
"0.5455179",
"0.54246366",
"0.53415173",
"0.5297622",
"0.52783936",
"0.52277464",
"0.52057177",
"0.5182871",
"0.5091867",
"0.5079502",
"0.5045638",
"0.50206923",
"0.49901226",
"0.49688503",
"0.49688503",
"0.49523365",
"0.49513724",
"0.49499476",
"0.4... | 0.5526015 | 1 |
Calculates tail pointer for WAL at the end of logical recovery. | private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {
WALIterator it = cctx.wal().replay(from);
try {
while (it.hasNextX()) {
IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();
if (rec == null)
break;
}
}
finally {
it.close();
}
return it.lastRead().map(WALPointer::next).orElse(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point getTailLocation ()\r\n {\r\n if (tailLocation == null) {\r\n computeLocations();\r\n }\r\n\r\n return tailLocation;\r\n }",
"public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}",
"void... | [
"0.59416753",
"0.5605267",
"0.5502136",
"0.5380571",
"0.5342424",
"0.5341583",
"0.53154594",
"0.525358",
"0.5215668",
"0.52046865",
"0.52014816",
"0.5146556",
"0.51318413",
"0.51289076",
"0.5121569",
"0.5118568",
"0.5109946",
"0.5088882",
"0.50740427",
"0.5058168",
"0.5037544... | 0.7590609 | 0 |
Called when all partitions have been fully restored and precreated on node start. Starts checkpointing process and initiates first checkpoint. | @Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {
IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), "db-checkpoint-thread", checkpointer);
cpThread.start();
checkpointerThread = cpThread;
CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, "node started");
if (chp != null)
chp.cpBeginFut.get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}",
"protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }",
"void checkpoint() throws IOException;",
"public void startup() {\n /* Schedule the cleanup task to delete old logs */\n if (s... | [
"0.65011626",
"0.5974027",
"0.58965063",
"0.58953124",
"0.5809548",
"0.58069474",
"0.57396",
"0.57181996",
"0.5595387",
"0.55912745",
"0.55906457",
"0.54591817",
"0.53870404",
"0.5380837",
"0.5375548",
"0.5373701",
"0.5341607",
"0.5306763",
"0.52463484",
"0.5242529",
"0.52119... | 0.61911 | 1 |
Calculate the maximum number of concurrent tasks for apply through the striped executor. | private int semaphorePertmits(StripedExecutor exec) {
// 4 task per-stripe by default.
int permits = exec.stripesCount() * 4;
long maxMemory = Runtime.getRuntime().maxMemory();
// Heuristic calculation part of heap size as a maximum number of concurrent tasks.
int permits0 = (int)((maxMemory * 0.2) / (4096 * 2));
// May be for small heap. Get a low number of permits.
if (permits0 < permits)
permits = permits0;
// Property for override any calculation.
return getInteger(IGNITE_RECOVERY_SEMAPHORE_PERMITS, permits);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getExecutorLargestPoolSize();",
"int getMaxConcurrent();",
"int getExecutorMaximumPoolSize();",
"long getExecutorTaskCount();",
"int getMaximumPoolSize();",
"int getExecutorPoolSize();",
"int getMaxPoolSize();",
"long getExcutorTasksInWorkQueueCount();",
"private int getPoolSize() {\n\t\tint nu... | [
"0.7384143",
"0.73828036",
"0.7306532",
"0.7154485",
"0.697928",
"0.6957315",
"0.68973976",
"0.6790621",
"0.67666894",
"0.6745636",
"0.6622435",
"0.65834993",
"0.65804595",
"0.6566622",
"0.65578145",
"0.65421474",
"0.64973617",
"0.649401",
"0.64598536",
"0.6376364",
"0.635672... | 0.6318095 | 21 |
Obtains PageMemory reference from cache descriptor instead of cache context. | private PageMemoryEx getPageMemoryForCacheGroup(int grpId) throws IgniteCheckedException {
if (grpId == MetaStorage.METASTORAGE_CACHE_ID)
return (PageMemoryEx)dataRegion(METASTORE_DATA_REGION_NAME).pageMemory();
// TODO IGNITE-7792 add generic mapping.
if (grpId == TxLog.TX_LOG_CACHE_ID)
return (PageMemoryEx)dataRegion(TxLog.TX_LOG_CACHE_NAME).pageMemory();
// TODO IGNITE-5075: cache descriptor can be removed.
GridCacheSharedContext sharedCtx = context();
CacheGroupDescriptor desc = sharedCtx.cache().cacheGroupDescriptors().get(grpId);
if (desc == null)
return null;
String memPlcName = desc.config().getDataRegionName();
return (PageMemoryEx)sharedCtx.database().dataRegion(memPlcName).pageMemory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T extends Entity> EntityCache<T> getMemoryEntityCache() {\n\t\tEntityMap<T> entityMap = new MemoryEntityMap<T>();\n\t\treturn new EntityCache<T>(entityMap);\n\t}",
"public MemoryCacheParams get() {\n return new MemoryCacheParams(m114359b(), 256, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer... | [
"0.6499991",
"0.637365",
"0.6109401",
"0.60014635",
"0.5877919",
"0.5798638",
"0.5766456",
"0.5765655",
"0.5765655",
"0.575362",
"0.5690104",
"0.56773835",
"0.5658222",
"0.5653877",
"0.5638104",
"0.5616952",
"0.5602139",
"0.5591379",
"0.5480671",
"0.5477815",
"0.5445688",
"... | 0.7059095 | 0 |
Apply update from some iterator and with specific filters. | public void applyUpdatesOnRecovery(
@Nullable WALIterator it,
IgniteBiPredicate<WALPointer, WALRecord> recPredicate,
IgnitePredicate<DataEntry> entryPredicate
) throws IgniteCheckedException {
if (it == null)
return;
cctx.walState().runWithOutWAL(() -> {
while (it.hasNext()) {
IgniteBiTuple<WALPointer, WALRecord> next = it.next();
WALRecord rec = next.get2();
if (!recPredicate.apply(next.get1(), rec))
break;
switch (rec.type()) {
case MVCC_DATA_RECORD:
case DATA_RECORD:
checkpointReadLock();
try {
DataRecord dataRec = (DataRecord)rec;
for (DataEntry dataEntry : dataRec.writeEntries()) {
if (entryPredicate.apply(dataEntry)) {
checkpointReadLock();
try {
int cacheId = dataEntry.cacheId();
GridCacheContext cacheCtx = cctx.cacheContext(cacheId);
if (cacheCtx != null)
applyUpdate(cacheCtx, dataEntry);
else if (log != null)
log.warning("Cache is not started. Updates cannot be applied " +
"[cacheId=" + cacheId + ']');
}
finally {
checkpointReadUnlock();
}
}
}
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
}
finally {
checkpointReadUnlock();
}
break;
case MVCC_TX_RECORD:
checkpointReadLock();
try {
MvccTxRecord txRecord = (MvccTxRecord)rec;
byte txState = convertToTxState(txRecord.state());
cctx.coordinators().updateState(txRecord.mvccVersion(), txState, true);
}
finally {
checkpointReadUnlock();
}
break;
default:
// Skip other records.
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void updateFilter();",
"void filterUpdate(ServerContext context, UpdateRequest request,\n ResultHandler<Resource> handler, RequestHandler next);",
"private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n ... | [
"0.64915633",
"0.6150951",
"0.5804962",
"0.572441",
"0.57234013",
"0.5629347",
"0.5595263",
"0.5471799",
"0.54585975",
"0.54580235",
"0.54389894",
"0.52965343",
"0.5293755",
"0.5292134",
"0.5284817",
"0.5274097",
"0.52080315",
"0.5185719",
"0.5179105",
"0.51159",
"0.51148707"... | 0.5990736 | 2 |
Replace thread local with buffers. Thread local should provide direct buffer with one page in length. | public void setThreadBuf(final ThreadLocal<ByteBuffer> threadBuf) {
this.threadBuf = threadBuf;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ ... | [
"0.6008799",
"0.5891146",
"0.5855971",
"0.57127136",
"0.5517911",
"0.5446022",
"0.528782",
"0.5223128",
"0.5203531",
"0.51986486",
"0.519792",
"0.513814",
"0.51160794",
"0.50973964",
"0.5031025",
"0.5014771",
"0.49953544",
"0.49948704",
"0.4983987",
"0.4961157",
"0.49580574",... | 0.57808936 | 3 |
Adds given partition to checkpointer destroy queue. | public void schedulePartitionDestroy(int grpId, int partId) {
Checkpointer cp = checkpointer;
if (cp != null)
cp.schedulePartitionDestroy(cctx.cache().cacheGroup(grpId), grpId, partId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void removePartition(Partition partition) {\n \n }",
"public void destroyPartition(int nPid);",
"@Override\n public void createPartition(Partition partition) {\n \n }",
"public void cancelOrWaitPartitionDestroy(int grpId, int partId) throws IgniteCheckedException ... | [
"0.6192666",
"0.59070194",
"0.58281076",
"0.5491956",
"0.5430238",
"0.5381365",
"0.51283836",
"0.5036777",
"0.48949382",
"0.48566708",
"0.48197576",
"0.47427386",
"0.47187233",
"0.46993113",
"0.46943855",
"0.46882296",
"0.46843696",
"0.46595404",
"0.4623108",
"0.46043694",
"0... | 0.6106232 | 1 |
Cancels or wait for partition destroy. | public void cancelOrWaitPartitionDestroy(int grpId, int partId) throws IgniteCheckedException {
Checkpointer cp = checkpointer;
if (cp != null)
cp.cancelOrWaitPartitionDestroy(grpId, partId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int destroyEvictedPartitions() throws IgniteCheckedException {\n PartitionDestroyQueue destroyQueue = curCpProgress.destroyQueue;\n\n if (destroyQueue.pendingReqs.isEmpty())\n return 0;\n\n List<PartitionDestroyRequest> reqs = null;\n\n for (final ... | [
"0.6571374",
"0.65581405",
"0.57555574",
"0.563162",
"0.5559715",
"0.55100906",
"0.5462005",
"0.5415651",
"0.5399048",
"0.53890634",
"0.5272695",
"0.52325517",
"0.5215394",
"0.51633936",
"0.50566924",
"0.50404453",
"0.5035524",
"0.50165015",
"0.49847794",
"0.4958882",
"0.4930... | 0.7079282 | 0 |
Timeout for checkpoint read lock acquisition. | @Override public long checkpointReadLockTimeout() {
return checkpointReadLockTimeout;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public void checkpointReadLockTimeout(long val) {\n checkpointReadLockTimeout = val;\n }",
"private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException {\n String msg = \"Checkpoint read lock acquisition has been timed out.\";\n\n IgniteExcep... | [
"0.7769675",
"0.73597586",
"0.66802305",
"0.65955114",
"0.65343505",
"0.6429208",
"0.6332963",
"0.6308087",
"0.6301075",
"0.6283154",
"0.6226252",
"0.6208478",
"0.6201492",
"0.6164541",
"0.6109191",
"0.6107884",
"0.60101384",
"0.5987106",
"0.5903267",
"0.58320355",
"0.5767609... | 0.7936599 | 0 |
Sets timeout for checkpoint read lock acquisition. | @Override public void checkpointReadLockTimeout(long val) {
checkpointReadLockTimeout = val;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public long checkpointReadLockTimeout() {\n return checkpointReadLockTimeout;\n }",
"public void setReadTimeout(int readTimeout){\n return; //TODO codavaj!!\n }",
"T setStartTimeout(Integer timeout);",
"void setOperationTimeout(int timeout) throws RemoteException;",
"@Override... | [
"0.72651666",
"0.6606811",
"0.6595531",
"0.65893",
"0.6526717",
"0.6282084",
"0.6282084",
"0.6259204",
"0.6246231",
"0.6235751",
"0.62350434",
"0.6193738",
"0.61805373",
"0.6175492",
"0.6139582",
"0.6129395",
"0.6096667",
"0.60956997",
"0.608583",
"0.607702",
"0.6071517",
"... | 0.8104631 | 0 |
Processes all evicted partitions scheduled for destroy. | private int destroyEvictedPartitions() throws IgniteCheckedException {
PartitionDestroyQueue destroyQueue = curCpProgress.destroyQueue;
if (destroyQueue.pendingReqs.isEmpty())
return 0;
List<PartitionDestroyRequest> reqs = null;
for (final PartitionDestroyRequest req : destroyQueue.pendingReqs.values()) {
if (!req.beginDestroy())
continue;
final int grpId = req.grpId;
final int partId = req.partId;
CacheGroupContext grp = cctx.cache().cacheGroup(grpId);
assert grp != null
: "Cache group is not initialized [grpId=" + grpId + "]";
assert grp.offheap() instanceof GridCacheOffheapManager
: "Destroying partition files when persistence is off " + grp.offheap();
final GridCacheOffheapManager offheap = (GridCacheOffheapManager) grp.offheap();
Runnable destroyPartTask = () -> {
try {
offheap.destroyPartitionStore(grpId, partId);
req.onDone(null);
if (log.isDebugEnabled())
log.debug("Partition file has destroyed [grpId=" + grpId + ", partId=" + partId + "]");
}
catch (Exception e) {
req.onDone(new IgniteCheckedException(
"Partition file destroy has failed [grpId=" + grpId + ", partId=" + partId + "]", e));
}
};
if (asyncRunner != null) {
try {
asyncRunner.execute(destroyPartTask);
}
catch (RejectedExecutionException ignore) {
// Run the task synchronously.
destroyPartTask.run();
}
}
else
destroyPartTask.run();
if (reqs == null)
reqs = new ArrayList<>();
reqs.add(req);
}
if (reqs != null)
for (PartitionDestroyRequest req : reqs)
req.waitCompleted();
destroyQueue.pendingReqs.clear();
return reqs != null ? reqs.size() : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearPartitions() {\n\t\tthis.bucketIterator = null;\r\n\t\tthis.probeIterator = null;\r\n\r\n\t\tfor (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) {\r\n\t\t\tfinal BinaryHashPartition p = this.partitionsBeingBuilt.get(i);\r\n\t\t\ttry {\r\n\t\t\t\tp.clearAllMemory(this.availableMemory);\... | [
"0.64373493",
"0.60772675",
"0.6017954",
"0.58218616",
"0.57633096",
"0.57255274",
"0.57176137",
"0.5643471",
"0.56420064",
"0.56197864",
"0.55181867",
"0.5509593",
"0.5497525",
"0.54865664",
"0.5442726",
"0.5367982",
"0.5327896",
"0.531986",
"0.53057843",
"0.5286346",
"0.524... | 0.7183691 | 0 |
Take read lock for internal use. | private void internalReadUnlock() {
checkpointLock.readLock().unlock();
if (ASSERTION_ENABLED)
CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected final void lockRead() {\n m_lock.readLock().lock();\n }",
"public void acquireReadLock() {\r\n return;\r\n }",
"public void checkReadLock() {\r\n return;\r\n }",
"public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\... | [
"0.86329114",
"0.85585153",
"0.82360816",
"0.791024",
"0.7774374",
"0.76223797",
"0.75882435",
"0.7565147",
"0.7524529",
"0.75224274",
"0.7397726",
"0.7260031",
"0.702947",
"0.69872016",
"0.68892825",
"0.667816",
"0.65715677",
"0.65506476",
"0.65133345",
"0.6494633",
"0.64865... | 0.69582486 | 14 |
Fill cache group state in checkpoint record. | private void fillCacheGroupState(CheckpointRecord cpRec) throws IgniteCheckedException {
GridCompoundFuture grpHandleFut = asyncRunner == null ? null : new GridCompoundFuture();
for (CacheGroupContext grp : cctx.cache().cacheGroups()) {
if (grp.isLocal() || !grp.walEnabled())
continue;
Runnable r = () -> {
ArrayList<GridDhtLocalPartition> parts = new ArrayList<>(grp.topology().localPartitions().size());
for (GridDhtLocalPartition part : grp.topology().currentLocalPartitions())
parts.add(part);
CacheState state = new CacheState(parts.size());
for (GridDhtLocalPartition part : parts) {
state.addPartitionState(
part.id(),
part.dataStore().fullSize(),
part.updateCounter(),
(byte)part.state().ordinal()
);
}
synchronized (cpRec) {
cpRec.addCacheGroupState(grp.groupId(), state);
}
};
if (asyncRunner == null)
r.run();
else
try {
GridFutureAdapter<?> res = new GridFutureAdapter<>();
asyncRunner.execute(U.wrapIgniteFuture(r, res));
grpHandleFut.add(res);
}
catch (RejectedExecutionException e) {
assert false : "Task should never be rejected by async runner";
throw new IgniteException(e); //to protect from disabled asserts and call to failure handler
}
}
if (grpHandleFut != null) {
grpHandleFut.markInitialized();
grpHandleFut.get();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }",
"static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }",
"public void flushCheckpoint(l... | [
"0.53333265",
"0.5320729",
"0.50044227",
"0.4929421",
"0.488718",
"0.48699",
"0.48367697",
"0.48193997",
"0.481237",
"0.47668222",
"0.47186095",
"0.4717615",
"0.46461713",
"0.4641848",
"0.46391276",
"0.4630323",
"0.46215793",
"0.46119857",
"0.4593418",
"0.45834",
"0.4551934",... | 0.7520558 | 0 |
Update current checkpoint progress by scheduled. | @NotNull private GridCacheDatabaseSharedManager.CheckpointProgress updateCurrentCheckpointProgress() {
final CheckpointProgress curr;
synchronized (this) {
curr = scheduledCp;
curr.state(LOCK_TAKEN);
if (curr.reason == null)
curr.reason = "timeout";
// It is important that we assign a new progress object before checkpoint mark in page memory.
scheduledCp = new CheckpointProgress(checkpointFreq);
curCpProgress = curr;
}
return curr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}",
"protected void updateProgress(Integer progress) {\n // Note to self: We don't bother updating the local \"job\" batch data\n batchService.updateBatchJobProgress(jobContext.getInstanceId(), progress);\n }",
"public void flu... | [
"0.6216341",
"0.59873563",
"0.59761",
"0.5935325",
"0.583803",
"0.5817346",
"0.57999116",
"0.5781354",
"0.5774881",
"0.5734786",
"0.56915593",
"0.56848663",
"0.5647067",
"0.5633522",
"0.5621703",
"0.5606704",
"0.558938",
"0.55563796",
"0.5547154",
"0.55377775",
"0.5486498",
... | 0.7341735 | 0 |
Await all async tasks from executor was finished. | public void awaitPendingTasksFinished() throws IgniteCheckedException {
GridCompoundFuture pendingFut = this.pendingTaskFuture;
this.pendingTaskFuture = new GridCompoundFuture();
if (pendingFut != null) {
pendingFut.markInitialized();
pendingFut.get();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void await() {\n for (final Future<Void> future : futures) {\n try {\n future.get();\n } catch (final Throwable e) {\n LOGGER.error(\"Scheduled blob storage job threw an exception.\", e);\n }\n }\n ... | [
"0.7080475",
"0.66852605",
"0.65589637",
"0.64115006",
"0.63977456",
"0.6355946",
"0.63231415",
"0.59716314",
"0.5958142",
"0.59494394",
"0.5923623",
"0.5909508",
"0.5830649",
"0.5830326",
"0.57690275",
"0.5760761",
"0.571497",
"0.5713369",
"0.5662366",
"0.5565056",
"0.552717... | 0.70974797 | 0 |
Performs parallel sort in isolated fork join pool. | private static void parallelSortInIsolatedPool(
FullPageId[] pagesArr,
Comparator<FullPageId> cmp
) throws IgniteCheckedException {
ForkJoinPool.ForkJoinWorkerThreadFactory factory = new ForkJoinPool.ForkJoinWorkerThreadFactory() {
@Override public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);
worker.setName("checkpoint-pages-sorter-" + worker.getPoolIndex());
return worker;
}
};
ForkJoinPool forkJoinPool = new ForkJoinPool(PARALLEL_SORT_THREADS + 1, factory, null, false);
ForkJoinTask sortTask = forkJoinPool.submit(() -> Arrays.parallelSort(pagesArr, cmp));
try {
sortTask.get();
}
catch (InterruptedException e) {
throw new IgniteInterruptedCheckedException(e);
}
catch (ExecutionException e) {
throw new IgniteCheckedException("Failed to perform pages array parallel sort", e.getCause());
}
forkJoinPool.shutdown();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }",
"private void multiThreadSort(T[] array, int first, int last, boolean parallel) {\n int cursor = partition(array, first, last);\n\n nextPass(array, first, c... | [
"0.7157396",
"0.6956774",
"0.67796385",
"0.66493285",
"0.63788",
"0.63303167",
"0.6247321",
"0.61834586",
"0.61763155",
"0.6129922",
"0.6082865",
"0.6082779",
"0.60807115",
"0.6029751",
"0.59361154",
"0.59257483",
"0.58787715",
"0.5865272",
"0.58636504",
"0.58096063",
"0.5775... | 0.7810205 | 0 |
Creates task for write pages | private WriteCheckpointPages(
final CheckpointMetricsTracker tracker,
final Collection<FullPageId> writePageIds,
final ConcurrentLinkedHashMap<PageStore, LongAdder> updStores,
final CountDownFuture doneFut,
final int totalPagesToWrite,
final Runnable beforePageWrite,
final ExecutorService retryWriteExecutor
) {
this.tracker = tracker;
this.writePageIds = writePageIds;
this.updStores = updStores;
this.doneFut = doneFut;
this.totalPagesToWrite = totalPagesToWrite;
this.beforePageWrite = beforePageWrite;
this.retryWriteExecutor = retryWriteExecutor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public String createPage(int taskId, Connection con) throws SQLException, ServletException;",
"@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}",
"public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for lab1\n }",
"Wri... | [
"0.62398756",
"0.5917099",
"0.5793045",
"0.5692722",
"0.564747",
"0.56466156",
"0.56310624",
"0.55595136",
"0.554829",
"0.5538737",
"0.55257577",
"0.54878145",
"0.5481212",
"0.5464842",
"0.54456043",
"0.5429764",
"0.5393958",
"0.538875",
"0.5360618",
"0.5337066",
"0.52925617"... | 0.5450047 | 14 |
Changing checkpoint state if order of state is correct. | public void state(@NotNull State newState) {
State state = this.state.get();
if (state.ordinal() < newState.ordinal())
this.state.compareAndSet(state, newState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }",
"public void checkpointStateChanged(final CheckpointState newCheckpointState) {\n \t\tthis.taskManager.checkpointStateChanged(this.environment.getJobID(), this.vertexID, newCheckpointState);\n \t}",
"protected void chec... | [
"0.7670132",
"0.6908182",
"0.6766781",
"0.659072",
"0.64230347",
"0.6253009",
"0.5945919",
"0.5903952",
"0.58949417",
"0.58841544",
"0.5739423",
"0.5711049",
"0.5684371",
"0.56280655",
"0.55359155",
"0.5521387",
"0.5493189",
"0.54812336",
"0.5477241",
"0.54631877",
"0.5450082... | 0.5496573 | 16 |
Write node id (who captured lock) into lock file. | private void writeContent(String content) throws IOException {
FileChannel ch = lockFile.getChannel();
byte[] bytes = content.getBytes();
ByteBuffer buf = ByteBuffer.allocate(bytes.length);
buf.put(bytes);
buf.flip();
ch.write(buf, 1);
ch.force(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void put_node_id(long node_id, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0]), node_id);\n }",
"void lockInode(Inode inode, LockMode mode);",
"void unlockWrite(long stamp);",
"public void writeNode(BT... | [
"0.6039966",
"0.58311385",
"0.58238065",
"0.57377696",
"0.57160646",
"0.55903596",
"0.55425054",
"0.5513911",
"0.5509409",
"0.54038703",
"0.5347353",
"0.5334022",
"0.53283083",
"0.5255964",
"0.5236315",
"0.5235804",
"0.5195259",
"0.5119301",
"0.5115047",
"0.511213",
"0.509590... | 0.48933244 | 35 |
Convert cache group ID to WAL state key. | private static String walGroupIdToKey(int grpId, boolean local) {
if (local)
return WAL_LOCAL_KEY_PREFIX + grpId;
else
return WAL_GLOBAL_KEY_PREFIX + grpId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static T2<Integer, Boolean> walKeyToGroupIdAndLocalFlag(String key) {\n if (key.startsWith(WAL_LOCAL_KEY_PREFIX))\n return new T2<>(Integer.parseInt(key.substring(WAL_LOCAL_KEY_PREFIX.length())), true);\n else if (key.startsWith(WAL_GLOBAL_KEY_PREFIX))\n return new T2<>(... | [
"0.57925266",
"0.54652625",
"0.54049635",
"0.5402894",
"0.5177131",
"0.50669134",
"0.5066659",
"0.5002434",
"0.50007564",
"0.49980173",
"0.49698678",
"0.49385592",
"0.4933418",
"0.4867884",
"0.48662522",
"0.48301813",
"0.48265502",
"0.48163658",
"0.47701457",
"0.47620508",
"0... | 0.71281856 | 0 |
Convert WAL state key to cache group ID. | private static T2<Integer, Boolean> walKeyToGroupIdAndLocalFlag(String key) {
if (key.startsWith(WAL_LOCAL_KEY_PREFIX))
return new T2<>(Integer.parseInt(key.substring(WAL_LOCAL_KEY_PREFIX.length())), true);
else if (key.startsWith(WAL_GLOBAL_KEY_PREFIX))
return new T2<>(Integer.parseInt(key.substring(WAL_GLOBAL_KEY_PREFIX.length())), false);
else
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String walGroupIdToKey(int grpId, boolean local) {\n if (local)\n return WAL_LOCAL_KEY_PREFIX + grpId;\n else\n return WAL_GLOBAL_KEY_PREFIX + grpId;\n }",
"public String getGroupKey() {\n StringWriter sw = new StringWriter();\n writeGroupKey(sw);\n ... | [
"0.68462807",
"0.57568663",
"0.55526686",
"0.55421203",
"0.5416367",
"0.53585976",
"0.52984834",
"0.52547514",
"0.5216708",
"0.5216232",
"0.5093312",
"0.5075703",
"0.5052296",
"0.50454754",
"0.5022446",
"0.5012016",
"0.50105417",
"0.4982936",
"0.49783188",
"0.49668097",
"0.49... | 0.6252722 | 1 |
Advance iterator to the next record. | public WALRecord next() throws IgniteCheckedException {
try {
for (;;) {
if (!iterator.hasNextX())
return null;
IgniteBiTuple<WALPointer, WALRecord> tup = iterator.nextX();
if (tup == null)
return null;
WALRecord rec = tup.get2();
WALPointer ptr = tup.get1();
rec.position(ptr);
// Filter out records by group id.
if (rec instanceof WalRecordCacheGroupAware) {
WalRecordCacheGroupAware grpAwareRecord = (WalRecordCacheGroupAware) rec;
if (!cacheGroupPredicate.apply(grpAwareRecord.groupId()))
continue;
}
// Filter out data entries by group id.
if (rec instanceof DataRecord)
rec = filterEntriesByGroupId((DataRecord) rec);
return rec;
}
}
catch (IgniteCheckedException e) {
boolean throwsCRCError = throwsCRCError();
if (X.hasCause(e, IgniteDataIntegrityViolationException.class)) {
if (throwsCRCError)
throw e;
else
return null;
}
log.error("There is an error during restore state [throwsCRCError=" + throwsCRCError + ']', e);
throw e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }",
"public void next() {\n\t\titerator.next();\n\t}",
"private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n ... | [
"0.73010045",
"0.7169512",
"0.7070885",
"0.69755447",
"0.6877343",
"0.6801309",
"0.674337",
"0.6716265",
"0.6534677",
"0.6436906",
"0.6380165",
"0.62783647",
"0.62716675",
"0.62643975",
"0.6180814",
"0.6154594",
"0.6117845",
"0.6113476",
"0.60872376",
"0.6050958",
"0.6045977"... | 0.5491814 | 98 |
Advance iterator to the next record. | @Override public WALRecord next() throws IgniteCheckedException {
WALRecord rec = super.next();
if (rec == null)
return null;
if (rec.type() == CHECKPOINT_RECORD) {
CheckpointRecord cpRec = (CheckpointRecord)rec;
// We roll memory up until we find a checkpoint start record registered in the status.
if (F.eq(cpRec.checkpointId(), status.cpStartId)) {
log.info("Found last checkpoint marker [cpId=" + cpRec.checkpointId() +
", pos=" + rec.position() + ']');
needApplyBinaryUpdates = false;
}
else if (!F.eq(cpRec.checkpointId(), status.cpEndId))
U.warn(log, "Found unexpected checkpoint marker, skipping [cpId=" + cpRec.checkpointId() +
", expCpId=" + status.cpStartId + ", pos=" + rec.position() + ']');
}
return rec;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }",
"public void next() {\n\t\titerator.next();\n\t}",
"private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n ... | [
"0.73010045",
"0.7169512",
"0.7070885",
"0.69755447",
"0.6877343",
"0.6801309",
"0.674337",
"0.6716265",
"0.6534677",
"0.6436906",
"0.6380165",
"0.62783647",
"0.62716675",
"0.62643975",
"0.6180814",
"0.6154594",
"0.6117845",
"0.6113476",
"0.60872376",
"0.6050958",
"0.6045977"... | 0.5622769 | 72 |
Format a route name. | private static String formatRouteName(Class<?> cls, String actionPath, int index) {
String name = actionPath.replaceAll("/", "\\.").replaceAll("\\{", "").replaceAll("\\}", "");
if (".".equals(name)) {
name = ".root";
}
name = cls.getSimpleName() + name + "." + index;
return name.toLowerCase(Locale.US);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String formatName(String name) {\n Character firstCharacter = name.charAt(0);\n firstCharacter = Character.toUpperCase(firstCharacter);\n\n final String remainingCharacters = name.substring(1);\n\n return String.valueOf(firstCharacter) + remainingCharacters;\n }",
"public S... | [
"0.6402282",
"0.6311041",
"0.6186738",
"0.59999365",
"0.5780912",
"0.56845427",
"0.56231976",
"0.56108415",
"0.5560053",
"0.5362108",
"0.5297265",
"0.5296479",
"0.52946067",
"0.5292643",
"0.52832496",
"0.52703154",
"0.5175323",
"0.51154566",
"0.5114619",
"0.50694716",
"0.5046... | 0.69355404 | 0 |
/ Should be over ridden by any object that implements BeatingHeart. Not strictly needed as the logic could be implemented in run(). However, this represents the Heart Beat. | void beat(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void beat() {\n\t\t\tSystem.out.println(\"Heart beating\");\n\t\t}",
"@Override\r\n public String toString() {\r\n return \"Heart\";\r\n }",
"public interface Heart extends BodyPart {\n\n\t/**\n\t * Reports how the heart is feeling in a way that may be understood by\n\t * humans.\n\t * \n\... | [
"0.7756645",
"0.75587326",
"0.6927775",
"0.67176825",
"0.6680335",
"0.65663743",
"0.6535104",
"0.64170533",
"0.63996994",
"0.6374784",
"0.6327763",
"0.6265496",
"0.6213676",
"0.62084794",
"0.619958",
"0.6128907",
"0.6092193",
"0.604493",
"0.602807",
"0.60212666",
"0.6017017",... | 0.5901628 | 27 |
return the id number | public int getID() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getIdNumber();",
"public static int getIdNumber() {\n return idNumber;\n }",
"int getIdNum();",
"public int id() {\n return _num;\n }",
"Integer getID();",
"Integer getID();",
"public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n ... | [
"0.84856504",
"0.8146191",
"0.80881494",
"0.80403584",
"0.7985269",
"0.7985269",
"0.7943867",
"0.7846898",
"0.78356224",
"0.78356224",
"0.78356224",
"0.78097016",
"0.78001016",
"0.7797922",
"0.7739424",
"0.7739424",
"0.7739424",
"0.7739424",
"0.7739424",
"0.7739424",
"0.77394... | 0.0 | -1 |
create a new object | public static void testStudent() {
Student test = new Student(-1930026144, "Simon");
// test the id number
System.out.println(test.getID() == 0);
System.out.println(test.getName() == "Simon");
// reset a name
test.setName("John");
// test the new name
System.out.println(test.getName() == "John");
// set a grade
test.setGrade('A');
System.out.println(test.getGrade() == 'A');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"OBJECT createOBJECT();",
"public void create(){}",
"public CMObject newInstance();",
"Object create(Object source);",
"public abstract T create(T obj);",
"public void create() {\n\t\t\n\t}",
"T create();",
"T create();",
"Instance createInstance();",
"RentalObject createRentalObject();",
"@Over... | [
"0.76757616",
"0.7396078",
"0.7341544",
"0.7107673",
"0.7019211",
"0.69562685",
"0.6947802",
"0.6947802",
"0.6876438",
"0.6771298",
"0.67712814",
"0.6721741",
"0.6696268",
"0.6694516",
"0.66841406",
"0.6677444",
"0.6645699",
"0.66332906",
"0.663125",
"0.6629969",
"0.6615",
... | 0.0 | -1 |
used when a department is already assigned to an existing task its used to select the previously chosen department for that task | public int getPositionForItemId(int depId) {
if (mDepartmentEntryList == null)
return 0;
return mDepartmentEntryList.indexOf(new DepartmentEntry(depId));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepar... | [
"0.6782877",
"0.65993005",
"0.64364356",
"0.6359019",
"0.6232218",
"0.61265165",
"0.6048543",
"0.6011682",
"0.5978197",
"0.59627634",
"0.5909939",
"0.5892056",
"0.58090824",
"0.57915896",
"0.5779316",
"0.57506216",
"0.5736882",
"0.57213575",
"0.56676507",
"0.56106627",
"0.558... | 0.0 | -1 |
The publicly listed buy orders (Required) | @JsonProperty("bids")
public List<org.example.api.beans.OrderBookLevel> getBids() {
return bids;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }",
"void getMarketOrders();",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"void getOrders();",
"List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;",
"public List<Order> ge... | [
"0.7069238",
"0.70026845",
"0.68518406",
"0.68099385",
"0.6550359",
"0.6443695",
"0.64097893",
"0.63671994",
"0.6363024",
"0.62672675",
"0.62219495",
"0.62219495",
"0.61923075",
"0.6185041",
"0.6182173",
"0.6167252",
"0.61396134",
"0.61241347",
"0.6108061",
"0.61068094",
"0.6... | 0.0 | -1 |
The publicly listed buy orders (Required) | @JsonProperty("bids")
public void setBids(List<org.example.api.beans.OrderBookLevel> bids) {
this.bids = bids;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }",
"void getMarketOrders();",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"void getOrders();",
"List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;",
"public List<Order> ge... | [
"0.7069238",
"0.70026845",
"0.68518406",
"0.68099385",
"0.6550359",
"0.6443695",
"0.64097893",
"0.63671994",
"0.6363024",
"0.62672675",
"0.62219495",
"0.62219495",
"0.61923075",
"0.6185041",
"0.6182173",
"0.6167252",
"0.61396134",
"0.61241347",
"0.6108061",
"0.61068094",
"0.6... | 0.0 | -1 |
The publicly listed sell orders (Required) | @JsonProperty("asks")
public List<org.example.api.beans.OrderBookLevel> getAsks() {
return asks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }",
"void getMarketOrders();",
"void getOrders();",
"public List<OrderReport> getAllOrdersAcrossStores();",
"List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;",
"@RequestMapping(\"/api/sa... | [
"0.7109904",
"0.69467473",
"0.66212577",
"0.66150963",
"0.64771855",
"0.640566",
"0.63893706",
"0.6370394",
"0.6207422",
"0.6192652",
"0.6192652",
"0.618917",
"0.6131342",
"0.611773",
"0.6109268",
"0.6089102",
"0.59922844",
"0.59922844",
"0.59863144",
"0.59143454",
"0.5912654... | 0.0 | -1 |
The publicly listed sell orders (Required) | @JsonProperty("asks")
public void setAsks(List<org.example.api.beans.OrderBookLevel> asks) {
this.asks = asks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }",
"void getMarketOrders();",
"void getOrders();",
"public List<OrderReport> getAllOrdersAcrossStores();",
"List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;",
"@RequestMapping(\"/api/sa... | [
"0.71097857",
"0.69476974",
"0.6622939",
"0.661695",
"0.64794207",
"0.6407125",
"0.63895684",
"0.63726294",
"0.62089247",
"0.619347",
"0.619347",
"0.6191518",
"0.61323464",
"0.6119238",
"0.6110186",
"0.60908306",
"0.5993989",
"0.5993989",
"0.59881634",
"0.5916266",
"0.5914289... | 0.0 | -1 |
The timestamp associated for this order book | @JsonProperty("timestamp")
public Double getTimestamp() {
return timestamp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n ... | [
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.77330446",
"0.77330446",
"0.7719212",
"0.7719212",
"0.76701194",
"0.7661757",
... | 0.0 | -1 |
The timestamp associated for this order book | @JsonProperty("timestamp")
public void setTimestamp(Double timestamp) {
this.timestamp = timestamp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n ... | [
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.77330446",
"0.77330446",
"0.7719212",
"0.7719212",
"0.76701194",
"0.7661757",
... | 0.0 | -1 |
The timestamp associated for this order book | @JsonProperty("datetime")
public Date getDatetime() {
return datetime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n ... | [
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.77330446",
"0.77330446",
"0.7719212",
"0.7719212",
"0.76701194",
"0.7661757",
... | 0.0 | -1 |
The timestamp associated for this order book | @JsonProperty("datetime")
public void setDatetime(Date datetime) {
this.datetime = datetime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n ... | [
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7749513",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.7746442",
"0.77330446",
"0.77330446",
"0.7719212",
"0.7719212",
"0.76701194",
"0.7661757",
... | 0.0 | -1 |
/ release resources if necessary | @Override // close resources if necessary
public void close() { } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}",
"public void releaseResources();",
"@Override\n\tpublic void releaseResouces() {\n\t\tsuper.releaseResouces();\n\t}",
"private void dispose() {\n\n\t}",
"@Override\n public void release() {\n }",
"@Ov... | [
"0.7734581",
"0.7637033",
"0.74043584",
"0.72819436",
"0.72580355",
"0.7231523",
"0.71967137",
"0.71644056",
"0.71641016",
"0.71529335",
"0.71509403",
"0.71330667",
"0.7119903",
"0.7116672",
"0.70906216",
"0.7089613",
"0.7081778",
"0.70709115",
"0.70520216",
"0.7045624",
"0.7... | 0.0 | -1 |
interface for database side connection protocols | public interface PrcseSource extends Connectable {
public abstract ArrayList<Object> getFrontPage() throws Exception;
public abstract CustomerInfo login(CustomerInfo request) throws Exception;
public abstract CustomerInfo syncCustomer(CustomerInfo request) throws Exception;
public abstract CustomerForm getCustomerFormData(CustomerForm request) throws Exception;
public abstract CustomerBooking createBooking(CustomerBooking request) throws Exception;
public abstract CustomerBooking cancelBooking(CustomerBooking request) throws Exception;
public abstract ArrayList<HashMap<Long, SeatingArea>> getEventSeatingMap(long eventId) throws Exception;
public abstract AvailableSeats getEventAvailability(AvailableSeats request) throws Exception;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Connection extends java.sql.Connection {\n\n\t/**\n\t * Get the database credentials required to gain access to the remote database server.\n\t *\n\t * @return A one way hash that includes this Connections database login details\n\t * as supplied when this Connection was created.\n\t */\n\tpublic ... | [
"0.78810155",
"0.78279424",
"0.76103413",
"0.7430414",
"0.7371506",
"0.7371506",
"0.7371506",
"0.73650324",
"0.733424",
"0.7311945",
"0.72218716",
"0.7221363",
"0.72187865",
"0.7182121",
"0.7182121",
"0.7177669",
"0.7102427",
"0.70497495",
"0.70255274",
"0.7007016",
"0.699327... | 0.0 | -1 |
Serialize the given Java object into JSON string. | public String serialize(Object obj) throws PdfFillerAPIException {
try {
if (obj != null)
return mapper.toJson(obj);
else
return null;
} catch (Exception e) {
throw new PdfFillerAPIException(400, e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String toJSON(final Object object) {\r\n\t\tString jsonString = null;\r\n\t\ttry\t{\r\n\t\t\tif (object != null)\t{\r\n\t\t\t\tjsonString = SERIALIZER.serialize(object);\r\n\t\t\t}\r\n\t\t} catch (SerializeException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in serializing to json\",\... | [
"0.74418426",
"0.7273888",
"0.72715527",
"0.7246464",
"0.723993",
"0.7210548",
"0.7210548",
"0.7210548",
"0.7202018",
"0.7192811",
"0.71485007",
"0.7128196",
"0.7113706",
"0.7079336",
"0.7067694",
"0.7025614",
"0.70143455",
"0.7013808",
"0.6984024",
"0.6940978",
"0.69113654",... | 0.6219921 | 80 |
Deserialize the given JSON string to Java object. | public <T> T deserialize(String body, Type returnType) throws PdfFillerAPIException {
return mapper.fromJson(body, returnType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> T parseJSON(final String jsonString, Class<T> type) {\r\n\t\tT retObject = null;\r\n\t\ttry {\r\n\t\t\tretObject = PARSER.parse(jsonString, type);\r\n\t\t} catch (ParseException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in de-serializing to object\", ex);\r\n\t\t\tretObject = nul... | [
"0.7234892",
"0.7143029",
"0.7032451",
"0.6937447",
"0.68182313",
"0.67717105",
"0.67384917",
"0.6713766",
"0.6697324",
"0.6688793",
"0.66886866",
"0.6648571",
"0.66052747",
"0.65793276",
"0.6578199",
"0.6562504",
"0.654125",
"0.6503381",
"0.6486463",
"0.6465495",
"0.6457636"... | 0.0 | -1 |
Serialize the given Java object into string according the given ContentType (only JSON is supported for now). | public String serialize(Object obj, String contentType) throws PdfFillerAPIException {
if (contentType.startsWith("application/json")) {
return this.serialize(obj);
} else {
throw new PdfFillerAPIException(400, "can not serialize object into Content-Type: " + contentType);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> String object2String(T obj){\n\t\treturn JSON.toJSONString(obj);\n\t}",
"public String serialize(Object object) {\n\t\treturn serialize(object, false);\n\t}",
"String toJSONString(Object data);",
"static <T extends JSONSerializable> String serialize(T serializable) throws Exception { return... | [
"0.5871444",
"0.58019954",
"0.57772565",
"0.5738044",
"0.5729618",
"0.57282156",
"0.5723264",
"0.56826854",
"0.56148",
"0.5609157",
"0.5606126",
"0.5602346",
"0.5561671",
"0.5558451",
"0.548064",
"0.5479366",
"0.54665774",
"0.54585004",
"0.54547167",
"0.5443453",
"0.5439927",... | 0.7473756 | 0 |
Deserialize response body to Java object according to the ContentType. | public <T> T deserialize(HttpResponse response, Type returnType) throws PdfFillerAPIException {
String body;
if (response.getBody() != null && !response.getBody().isEmpty())
body = response.getBody();
else
body = "";
List<String> contentType = response.getHeaders().get("Content-Type");
if (contentType.contains("application/json")) {
return this.deserialize(body, returnType);
} else if (returnType.equals(String.class)) {
// Expecting string, return the raw response body.
return (T) body;
} else {
throw new PdfFillerAPIException(
"Content type \"" + contentType + "\" is not supported for type: "
+ returnType
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public <T> T deserialize(String body, Type returnType) throws PdfFillerAPIException {\n\treturn mapper.fromJson(body, returnType);\n }",
"protected static <T> T bodyAsJava(Response response, TypeToken<T> type) {\n Type type0 = type.getType();\n return new Gson().fromJson(bodyAsJson(response), type... | [
"0.6356805",
"0.63438636",
"0.6187874",
"0.6113062",
"0.602761",
"0.59273094",
"0.58450055",
"0.5798412",
"0.5727577",
"0.5667678",
"0.5637707",
"0.5573994",
"0.5558191",
"0.549051",
"0.5440466",
"0.54291683",
"0.54232943",
"0.5400156",
"0.53926104",
"0.5362549",
"0.53394955"... | 0.6319661 | 2 |
System.out.println("KiviPaperiSakset.seuraavaArvaus() viimeisimmat: " +viimeisimmat); System.out.println("KiviPaperiSakset.seuraavaArvaus() muisti.size(): " +muisti.size()); | public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {
if (kaikki.length() < 3) {
return "k";
}
String viimKivi = viimeisimmat + "k";
String viimPaperi = viimeisimmat + "p";
String viimSakset = viimeisimmat + "s";
int viimKiviLkm = 0;
int viimPaperiLkm = 0;
int viimSaksetLkm = 0;
String arvaus = "k";
int viimValueMax = 0;
/*
Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä
syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan
kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.
Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee
pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset,
tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.
*/
if (muisti.containsKey(viimKivi)) {
viimKiviLkm = muisti.get(viimKivi);
}
if (muisti.containsKey(viimPaperi)) {
viimPaperiLkm = muisti.get(viimPaperi);
}
if (muisti.containsKey(viimSakset)) {
viimSaksetLkm = muisti.get(viimSakset);
}
if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {
return "p";
}
if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {
return "s";
}
if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {
return "k";
}
return arvaus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int size() {\n\t\treturn cerraduras.size();\n\t}",
"int size(){\n\treturn m.size();\n }",
"public int size(){\n return set.length;\n }",
"public int length(){\n return pilha.size();\n }",
"public int size() {\n \t return size;\n }",
"public void somaVezes(){\n ... | [
"0.7061467",
"0.69491",
"0.6817894",
"0.68134505",
"0.67647034",
"0.67335874",
"0.67318606",
"0.67021203",
"0.6661043",
"0.6631377",
"0.6631377",
"0.6631377",
"0.6631377",
"0.6631377",
"0.6631377",
"0.6572939",
"0.6566151",
"0.6552659",
"0.65434843",
"0.65336424",
"0.652595",... | 0.6298688 | 58 |
Builds a DFSM from a string representation (encoding) | public DFSM(String encoding) throws Exception {
super(encoding);
this.transitionFunction().veryifyTotal(this.states, this.alphabet);
this.transitionFunction().verifyNoEpsilonTransitions();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"State mo5880e(String str);",
"public abstract void fromString(String s, String context);",
"public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }",
"protected static CfDef cfdefFromString(String st) throws IOException\n {\n assert st != null;\n... | [
"0.6016872",
"0.54553974",
"0.53587484",
"0.5272735",
"0.5222068",
"0.5211387",
"0.51764536",
"0.51712185",
"0.5095483",
"0.508889",
"0.50719523",
"0.5034669",
"0.5031976",
"0.50269043",
"0.50230175",
"0.501168",
"0.50066286",
"0.4998701",
"0.4945966",
"0.4944923",
"0.4932149... | 0.60426974 | 0 |
Build a DFSM from its components | public DFSM(Set<State> states, Alphabet alphabet, Set<Transition> transitions, State initialState,
Set<State> acceptingStates) throws Exception {
super(states, alphabet, transitions, initialState, acceptingStates);
this.transitionFunction().veryifyTotal(states, alphabet);
this.transitionFunction().verifyNoEpsilonTransitions();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"StatePac build();",
"public void buildFlow(FlowDO flow) {\n\t}",
"private AFD buildAFD() {\n\t\tfor (Cerradura cerradura : cerraduras) {\n\t\t\tEstado origen = getState(cerradura);\n\t\t\tEstado destino = null;\n\n\t\t\tfor (pol.una.py.model.lexico.Cerradura.Subconjunto conjunto : cerradura\n\t\t\t\t\t.getSubc... | [
"0.6100225",
"0.5564538",
"0.5467759",
"0.53355134",
"0.5263611",
"0.5203333",
"0.5175788",
"0.51395756",
"0.503098",
"0.49621686",
"0.4916661",
"0.49102116",
"0.4909656",
"0.4907085",
"0.4871238",
"0.4856859",
"0.48566523",
"0.48513928",
"0.48507434",
"0.4839611",
"0.4827503... | 0.0 | -1 |
Returns a minimal version of this state machine | protected TransitionFunction transitionFunction() {
return (TransitionFunction) this.transitions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String lowestEnergyState() {\n\treturn state(bestEverPoints, temperature, bestEverStateEnergy);\n }",
"@Override\n\tpublic StateMachine getInitialStateMachine() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tstateMachines.clear();\n\t\tStateMachine firstMachine = new FirstPropNetStateMachine(... | [
"0.71318847",
"0.6305921",
"0.6244395",
"0.6167034",
"0.61470634",
"0.614672",
"0.61205673",
"0.60116816",
"0.59107673",
"0.59060246",
"0.5900047",
"0.58796245",
"0.5844162",
"0.5835838",
"0.5807874",
"0.58025783",
"0.5789176",
"0.57662046",
"0.5734431",
"0.5715444",
"0.56920... | 0.0 | -1 |
returns a map that maps each state to a representative of their equivalence class. | private Map<State, State> equivalentStates() {
Map<State, State> prevEcc = new HashMap<State, State>();
Map<State, State> ecc = new HashMap<State, State>();
/*
* We will represent each equivalence classes with a representative member and
* use a dictionary to map each state to this representative.
*
* First we create two equivalence classes, put all the accepting states in the
* first and all the non accepting states in the second.
*/
if (!this.acceptingStates.isEmpty()) {
State rep = this.acceptingStates.iterator().next();
for (State state : this.acceptingStates) {
ecc.put(state, rep);
}
}
Set<State> nonAcceptingStates = new HashSet<State>(this.states);
nonAcceptingStates.removeAll(this.acceptingStates);
if (!nonAcceptingStates.isEmpty()) {
State rep = nonAcceptingStates.iterator().next();
for (State state : nonAcceptingStates) {
ecc.put(state, rep);
}
/*
* The invariant for the following loop is:
*
* 1. for any s -> r association in ecc, s is equivalent to r in prevEcc, 2. for
* any input symbol c, the destination of the transition from s on c is
* equivalent (in prevEcc) to the destiation of the transition from r to c, 3.
* for any two values r1, r2 in ecc, they are not equivalent to each other in
* prevEcc, 4. all the equivalence classes in prevEcc have a representative in
* ecc.
*
*/
}
while (!prevEcc.equals(ecc)) {
prevEcc = ecc;
ecc = new HashMap<State, State>();
/*
* To establish the invariant we will set ecc with the associations of the form
*
* r -> r where r is a representative from prevEcc.
*
* This will initially satisfy the invariant because our action establishes
* condition (4) and conditions (1) and (2) and (3) are correct by induction
* from the validity of prevEcc."
*/
for (State state : prevEcc.values()) {
ecc.put(state, state);
}
for (State state : this.states) {
/*
* For each state s, we look in ecc for a rep r that is equivalent to s in
* prevEcc (that is, s's rep in prevEcc is r and for every input they transition
* to the same equivalence class in prevEcc) and add s to ecc with the same
* equivalence rep. If no state is equivalent to s, we add s to ecc as its own
* rep.
*/
Iterator<State> p = ecc.keySet().iterator();
State rep = null;
boolean equivalent = false;
while (p.hasNext() && !equivalent) {
rep = (State) p.next();
equivalent = this.equivalentIn(prevEcc, state, rep);
}
if (equivalent) {
ecc.put(state, rep);
continue;
}
ecc.put(state, state);
}
}
return ecc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final static void determineRepresentativeStates(Automaton automaton,\n\t\t\tBinaryMatrix equivs, int[] mapping) {\n\t\tfinal int size = automaton.nStates();\n\n\t\tfor (int i = 0; i != size; ++i) {\n\t\t\tAutomaton.State i_state = automaton.get(i);\n\t\t\tif (i_state != null) {\n\t\t\t\tint classRep = i;\n\... | [
"0.6489417",
"0.55426955",
"0.54862475",
"0.5456914",
"0.5398148",
"0.5376033",
"0.5345036",
"0.52222383",
"0.5211264",
"0.51690775",
"0.5133972",
"0.51196885",
"0.51023746",
"0.5089397",
"0.50689167",
"0.50538987",
"0.5044517",
"0.50303596",
"0.5029872",
"0.500973",
"0.50029... | 0.739733 | 0 |
Returns true if and only if input belongs to this machine's language. | @Override
public boolean compute(String input) {
State state = this.initialState;
for (int i = 0; i < input.length(); ++i) {
state = this.transitionFunction().applyTo(state, Character.valueOf(input.charAt(i)));
}
return this.acceptingStates.contains(state);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasLanguage();",
"public boolean isSetLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANG$28) != null;\n }\n }",
"boolean hasLanguageConstant();",
"default boolean hasLanguage(@NotNull Language la... | [
"0.76163286",
"0.67707896",
"0.6640312",
"0.6608173",
"0.65978396",
"0.65370506",
"0.65370506",
"0.65370506",
"0.63900584",
"0.63900584",
"0.63893163",
"0.63794315",
"0.6358474",
"0.62792975",
"0.6195757",
"0.61642426",
"0.6157914",
"0.6141576",
"0.59798294",
"0.589818",
"0.5... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main_screen, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
/ Intermediate tuple constructed by combining two tuples. | IntermediateTuple(Tuple t1, Tuple t2) {
if(t1 instanceof BaseTuple) {
baseTuples.add((BaseTuple) t1);
} else {
for(BaseTuple bt : ((IntermediateTuple) t1).baseTuples) {
baseTuples.add(bt);
}
}
if(t2 instanceof BaseTuple) {
baseTuples.add((BaseTuple) t2);
} else {
for(BaseTuple bt : ((IntermediateTuple) t2).baseTuples) {
baseTuples.add(bt);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <R> Tuple<R> concat(Tuple<R> a, Tuple<R> b) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : a) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\tfor (R element : b) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}",
"public static TupleDesc combine(TupleDesc td... | [
"0.7359564",
"0.65913796",
"0.6486816",
"0.6280406",
"0.6143261",
"0.5924361",
"0.5857703",
"0.5848425",
"0.5802416",
"0.5773268",
"0.57239604",
"0.5710872",
"0.56251293",
"0.55981135",
"0.558002",
"0.5507011",
"0.54400575",
"0.5386615",
"0.5349502",
"0.53380656",
"0.5304575"... | 0.7112385 | 1 |
Write a Tuple object to a TupleOutput | public void objectToEntry(Object object, TupleOutput to) {
// Write the data to the TupleOutput (a DatabaseEntry).
// Order is important. The first data written will be
// the first bytes used by the default comparison routines.
BaseTuple bt = (BaseTuple) object;
for(int i = 0; i < r.getNumberOfAttributes(); i++) {
if(r.getAttributeType(i) == Globals.INTEGER) {
to.writeInt(((Integer) bt.values[i]).intValue());
} else {
assert r.getAttributeType(i) == Globals.STRING;
to.writeString((String) bt.values[i]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected void writeTuple(Tuple tuple) throws IOException;",
"private void placeInOutput(Tuple tuple) {\n\t\tif (outputBuffer.size() < bufferCapacity) {\n\t\t\toutputBuffer.add(tuple);\n\t\t} else {\n\t\t\tflushOutputBuffer();\n\t\t\tif (outputBuffer.size() < bufferCapacity) {\n\t\t\t\toutputBuffer.add(... | [
"0.76726264",
"0.6571779",
"0.625033",
"0.6138677",
"0.60623586",
"0.60537624",
"0.5966559",
"0.5889688",
"0.5790497",
"0.5695201",
"0.5659859",
"0.56279886",
"0.55743957",
"0.5572717",
"0.55500114",
"0.5538211",
"0.55039465",
"0.54833245",
"0.5419178",
"0.5417662",
"0.541605... | 0.5944371 | 7 |
Convert a TupleInput to a MyData2 object | public Object entryToObject(TupleInput ti) {
BaseTuple bt = new BaseTuple(r);
for(int i = 0; i < r.getNumberOfAttributes(); i++) {
if(r.getAttributeType(i) == Globals.INTEGER) {
bt.setAttributeValueByPosition(i, new Integer(ti.readInt()));
} else {
assert r.getAttributeType(i) == Globals.STRING;
bt.setAttributeValueByPosition(i, ti.readString());
}
}
return bt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Tuple read(DataInput in) throws IOException {\n // nuke the old contents of the tuple\n Tuple ret = new Tuple();\n ret.fields = new ArrayList<Datum>();\n\n int size = decodeInt(in);\n \n for (int i = 0; i < size; i++) {\n ret.appendField(readDatum(... | [
"0.6298252",
"0.56664467",
"0.56522954",
"0.5508052",
"0.5368735",
"0.5326213",
"0.5305641",
"0.52946335",
"0.524831",
"0.5232237",
"0.5223191",
"0.5194655",
"0.51741314",
"0.51451015",
"0.51327235",
"0.50882035",
"0.50806564",
"0.5052586",
"0.50149536",
"0.5001011",
"0.49526... | 0.62471306 | 1 |
The Intrinio ID for Security | @ApiModelProperty(value = "The Intrinio ID for Security")
public String getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getIdentityId();",
"public String getInoId();",
"String getSecId();",
"public String getIdentity();",
"private String getIdentificationString() {\n\t\tif (clientController.client.visitorID.getVal() != null)\n\t\t\treturn clientController.client.visitorID.getVal().intern();\n\t\tif (clientController.... | [
"0.7350923",
"0.72842103",
"0.698465",
"0.6856527",
"0.6799296",
"0.67896277",
"0.6598492",
"0.6583299",
"0.65697676",
"0.654157",
"0.65043175",
"0.64407206",
"0.6440119",
"0.6436917",
"0.6432956",
"0.64239025",
"0.640522",
"0.63829106",
"0.6376326",
"0.63665694",
"0.6351125"... | 0.73785406 | 0 |
The common/local ticker of the Security | @ApiModelProperty(value = "The common/local ticker of the Security")
public String getTicker() {
return ticker;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTicker() {\n\t\treturn \"Notificación Virtual Guardian\";\n\t}",
"public String getTicker() {\n return this.ticker;\n }",
"public String getTicker() {\n\n return ticker.getText();\n }",
"StickerTransmitter getStickerTransmitter();",
"public Security getSecurity()\n ... | [
"0.6498009",
"0.6433816",
"0.59367454",
"0.5803207",
"0.5732455",
"0.5690935",
"0.5662871",
"0.561103",
"0.5584685",
"0.55785906",
"0.5546306",
"0.54958695",
"0.54825896",
"0.5478606",
"0.5466466",
"0.53853357",
"0.5383767",
"0.5363568",
"0.53473735",
"0.532691",
"0.53144735"... | 0.7273924 | 0 |
The countrycomposite OpenFIGI identifier | @ApiModelProperty(value = "The country-composite OpenFIGI identifier")
public String getCompositeFigi() {
return compositeFigi;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}",
"public int getId() {\n\t\treturn (m_country_id);\n\t}",
"public String getCountryId() {\r\n return countryId;\r\n }",
"public int getCountryId();",
"public java.lang.String getCountryId() {\r\n return ... | [
"0.6562966",
"0.64360774",
"0.6377509",
"0.6305664",
"0.6288475",
"0.6266957",
"0.6253408",
"0.62256885",
"0.6199931",
"0.6184068",
"0.61214954",
"0.60969394",
"0.6072449",
"0.60395575",
"0.60331225",
"0.6030393",
"0.6017505",
"0.6003451",
"0.59974873",
"0.5996033",
"0.599603... | 0.64933234 | 1 |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA... | [
"0.7886062",
"0.7550246",
"0.7498372",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
"0.74625504",
... | 0.0 | -1 |
Constructor taking all properties. | public InformeLicenciasOdesVO(
java.lang.String licencia,
int numOdes)
{
this.licencia = licencia;
this.numOdes = numOdes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Properties(){\n\n }",
"public Constructor(){\n\t\t\n\t}",
"public Property() {\n this(0, 0, 0, 0);\n }",
"public Propuestas() {}",
"public KeyVaultProperties() {\n }",
"public void init(Properties props) ;",
"public CustomerPolicyProperties... | [
"0.7333252",
"0.7262761",
"0.72563577",
"0.70931315",
"0.7058185",
"0.6869883",
"0.6842003",
"0.68334466",
"0.6813449",
"0.6799051",
"0.67985827",
"0.6787338",
"0.6735265",
"0.6696914",
"0.66805005",
"0.66522497",
"0.66030705",
"0.65863764",
"0.656777",
"0.6562376",
"0.655804... | 0.0 | -1 |
Copies constructor from other InformeLicenciasOdesVO | public InformeLicenciasOdesVO(InformeLicenciasOdesVO otherBean)
{
if (otherBean != null)
{
this.licencia = otherBean.getLicencia();
this.numOdes = otherBean.getNumOdes();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public InformeLicenciasOdesVO(\r\n java.lang.String licencia,\r\n int numOdes)\r\n\r\n {\r\n this.licencia = licencia;\r\n this.numOdes = numOdes;\r\n }",
"public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmp... | [
"0.6877503",
"0.66318876",
"0.6622086",
"0.6621297",
"0.65268815",
"0.648067",
"0.64375293",
"0.6198189",
"0.61412853",
"0.61047274",
"0.6062406",
"0.60419285",
"0.60267985",
"0.6010174",
"0.60087144",
"0.6006799",
"0.5990452",
"0.5960931",
"0.59589094",
"0.5954561",
"0.59462... | 0.716688 | 0 |
Constructor for primary key | public BaseNote (java.lang.String id) {
this.setId(id);
initialize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PrimaryKey createPrimaryKey();",
"public DatasetParameterPK() {\n }",
"public ParametroPorParametroPK() {\r\n\t}",
"PrimaryKey getPrimarykey();",
"Key getPrimaryKey();",
"public TdOficioAfectacionPK() {\n }",
"PrimaryKey getPrimaryKey();",
"public DomainPK()\n {\n }",
"public LeaguePrimar... | [
"0.7875029",
"0.7489606",
"0.739803",
"0.7096801",
"0.70711553",
"0.69975173",
"0.69803166",
"0.69716835",
"0.6964837",
"0.69633687",
"0.69163185",
"0.67959905",
"0.6758902",
"0.6702319",
"0.6702319",
"0.6702319",
"0.6699209",
"0.65859973",
"0.6582905",
"0.65318656",
"0.65293... | 0.0 | -1 |
Constructor for required fields | public BaseNote (
java.lang.String id,
java.lang.String content,
java.lang.String time) {
this.setId(id);
this.setContent(content);
this.setTime(time);
initialize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Field() {\r\n\t}",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public CisFieldError()\n\t{\n\t\t// required for jaxb\n\t}",
"public RequirementsRecord() {\n super(Requirements.REQUIREMENTS);\n }",
"private void fillMandatoryFields() {\n\n }",
"public AirField... | [
"0.71718425",
"0.70593333",
"0.68855685",
"0.68011117",
"0.6788171",
"0.665877",
"0.6643776",
"0.65873665",
"0.65260553",
"0.6511593",
"0.6507464",
"0.6504741",
"0.6499354",
"0.6499127",
"0.6489181",
"0.6437741",
"0.6416246",
"0.6358725",
"0.6338867",
"0.6270355",
"0.62663263... | 0.0 | -1 |
Return the unique identifier of this class | public java.lang.String getId () {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }",
"public String getUniqueID();",
"public String getUniqueID ( ) { return _uniqueID; }",
"String getUniqueID();",
"public String getClassid() {\n return classid;\n }",
"String getUniqueId()... | [
"0.8099061",
"0.7793248",
"0.7745005",
"0.773952",
"0.76971465",
"0.76135826",
"0.75959677",
"0.75864595",
"0.754388",
"0.75299907",
"0.75275266",
"0.7500354",
"0.7487855",
"0.74852705",
"0.74435693",
"0.7425048",
"0.74089086",
"0.74007654",
"0.73874485",
"0.7354514",
"0.7352... | 0.0 | -1 |
Set the unique identifier of this class | public void setId (java.lang.String id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setID() {\n\t\tthis.ID = UUID.randomUUID().toString();\n\t}",
"public void setUniqueID(String uniqueID)\r\n {\r\n m_uniqueID = uniqueID;\r\n }",
"@Override\n\tpublic void setUniqueId(int id) {}",
"public void setUniqueId(final String uniqueId) {\n _uniqueId = uniqueId;\n }",
"publi... | [
"0.7281828",
"0.7188852",
"0.70595604",
"0.7058688",
"0.69680285",
"0.6883223",
"0.6781155",
"0.67765903",
"0.67603344",
"0.6737482",
"0.6681386",
"0.66533566",
"0.6612935",
"0.66081303",
"0.66040903",
"0.6576922",
"0.657261",
"0.65361136",
"0.653008",
"0.6522364",
"0.6506520... | 0.0 | -1 |
Return the value associated with the column: content | public java.lang.String getContent () {
return content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public Stri... | [
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.701869",
"0.7014127",
"0.69438195",
"0.69438195",
"0.69438195",
"0.69438195",
"0.69438195",
"0.69438195",
"0.69438195",
"0.6943... | 0.0 | -1 |
Set the value related to the column: content | public void setContent (java.lang.String content) {
this.content = content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n }",
"private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n ... | [
"0.69386184",
"0.69386184",
"0.6935943",
"0.6935943",
"0.69198954",
"0.66610765",
"0.6633325",
"0.6612936",
"0.65737724",
"0.65613455",
"0.65542346",
"0.65084016",
"0.646093",
"0.641375",
"0.6391793",
"0.6386444",
"0.6327825",
"0.6323189",
"0.6270654",
"0.6270061",
"0.6266417... | 0.589231 | 74 |
Return the value associated with the column: time | public java.lang.String getTime () {
return time;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private LocalTime get_TIME(int column) {\n // Time column is always 8 chars long\n String timeString = dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n 8, charset_[column - 1]).toString();\n return LocalTime.parse(timeString, DRDAConstants.DB2_TIME_FORMAT);\n// ... | [
"0.69734716",
"0.67304176",
"0.6553496",
"0.655045",
"0.6401722",
"0.63987994",
"0.63776636",
"0.6374776",
"0.6374776",
"0.6338667",
"0.6333577",
"0.6225754",
"0.6202391",
"0.6195331",
"0.6183369",
"0.6136668",
"0.61270374",
"0.6110974",
"0.61096984",
"0.6108225",
"0.6085095"... | 0.5812385 | 74 |
Set the value related to the column: time | public void setTime (java.lang.String time) {
this.time = time;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTime(int index, Time value) throws SQLException;",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n ... | [
"0.7882224",
"0.7736612",
"0.7736612",
"0.7736612",
"0.76811945",
"0.7613065",
"0.7605051",
"0.7605051",
"0.7605051",
"0.7568996",
"0.7568996",
"0.7568996",
"0.7568996",
"0.7510212",
"0.7510212",
"0.7510212",
"0.7510212",
"0.748842",
"0.7467541",
"0.74583876",
"0.74498767",
... | 0.69034874 | 54 |
check if the center of cn has more than num properties that can be removed i.e. the properties are also connected by other nodes | private static ArrayList<Edge> getValidFeatures(ConceptNet cn){
ArrayList<Edge> ret = new ArrayList<Edge>();
ConceptNetNode center = cn.center;
ArrayList<Edge> features = center.getInPropertyEdge();
for(Edge e : features){
ConceptNetNode cnn = cn.getStartNode(e);
if(cnn == null){
System.err.println("Error: Cannot find node: " + e.start + " in Concept Net: " + center.name);
return null;
}
if(cnn.getInPropertyEdge().size() > 1 || cnn.getOutPropertyEdge().size() > 1 || cnn.getInRelEdge().size() > 1 || cnn.getOutRelEdge().size() > 1){
ret.add(e);
}
}
features = center.getOutPropertyEdge();
for(Edge e : features){
ConceptNetNode cnn = cn.getEndNode(e);
if(cnn == null){
System.err.println("Error: Cannot find node: " + e.end + " in Concept Net: " + center.name);
return null;
}
if(cnn.getInPropertyEdge().size() > 1 || cnn.getOutPropertyEdge().size() > 1 || cnn.getInRelEdge().size() > 1 || cnn.getOutRelEdge().size() > 1){
ret.add(e);
}
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }",
"private boolean hasCollided(Circle a, Polygon p) {\r\n //calculate the distance between the centers\r\n return p.getBoundsInParent().intersects(a.getBoundsInParent());\r\n\r\n }",
"private void deleteNo... | [
"0.52658415",
"0.5259183",
"0.52177143",
"0.52094245",
"0.51783967",
"0.5176358",
"0.5152664",
"0.5145016",
"0.51339376",
"0.5129586",
"0.5119517",
"0.5106535",
"0.5106535",
"0.509566",
"0.49877965",
"0.49855292",
"0.49663052",
"0.49649492",
"0.49639514",
"0.49551955",
"0.495... | 0.0 | -1 |
Displays an alert box with given title and message | public void display(String title, String message) throws IOException {
Stage alertBoxStage = new Stage();
FXMLLoader loader = new FXMLLoader(getClass().getResource("AlertBox.fxml"));
Parent root = loader.load();
alertBoxStage.setTitle(title);
AlertBoxController alertBoxController = loader.getController();
alertBoxController.setMessageLabel(message, alertBoxStage);
alertBoxStage.initModality(Modality.APPLICATION_MODAL);
alertBoxStage.setScene(new Scene(root, 350, 175));
Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds();
alertBoxStage.setX((screenBounds.getWidth() - 350) / 2);
alertBoxStage.setY((screenBounds.getHeight() - 175) / 2);
alertBoxStage.setResizable(false);
alertBoxStage.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void showAlert(String message);",
"private void alert(String title, String message) {\n UIAlertView alertView = new UIAlertView(title, message, null, \"OK\");\n alertView.show();\n }",
"public void alert(String message);",
"private void displayAlert(String title, String message) {\n\t\tStage... | [
"0.8224513",
"0.8057396",
"0.797065",
"0.79488486",
"0.7847943",
"0.7778948",
"0.7630955",
"0.75417984",
"0.74243844",
"0.7420709",
"0.7402007",
"0.7397191",
"0.7396726",
"0.7376739",
"0.7362436",
"0.7326891",
"0.7315297",
"0.7294803",
"0.72827107",
"0.72763205",
"0.7238485",... | 0.7600327 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.