id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
147,700 | yfpeng/pengyifan-bioc | src/main/java/com/pengyifan/bioc/util/BioCValidate3.java | BioCValidate3.check | public void check(BioCPassage passage) {
String text = checkText(passage);
check(passage, passage.getOffset(), text);
for (BioCSentence sentence : passage.getSentences()) {
check(sentence, 0, text, passage);
}
} | java | public void check(BioCPassage passage) {
String text = checkText(passage);
check(passage, passage.getOffset(), text);
for (BioCSentence sentence : passage.getSentences()) {
check(sentence, 0, text, passage);
}
} | [
"public",
"void",
"check",
"(",
"BioCPassage",
"passage",
")",
"{",
"String",
"text",
"=",
"checkText",
"(",
"passage",
")",
";",
"check",
"(",
"passage",
",",
"passage",
".",
"getOffset",
"(",
")",
",",
"text",
")",
";",
"for",
"(",
"BioCSentence",
"s... | Checks text, annotations and relations of the passage.
@param passage input passage | [
"Checks",
"text",
"annotations",
"and",
"relations",
"of",
"the",
"passage",
"."
] | e09cce1969aa598ff89e7957237375715d7a1a3a | https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/util/BioCValidate3.java#L72-L78 |
147,701 | yfpeng/pengyifan-bioc | src/main/java/com/pengyifan/bioc/util/BioCValidate3.java | BioCValidate3.check | public void check(BioCSentence sentence) {
String text = checkText(sentence);
check(sentence, sentence.getOffset(), text);
} | java | public void check(BioCSentence sentence) {
String text = checkText(sentence);
check(sentence, sentence.getOffset(), text);
} | [
"public",
"void",
"check",
"(",
"BioCSentence",
"sentence",
")",
"{",
"String",
"text",
"=",
"checkText",
"(",
"sentence",
")",
";",
"check",
"(",
"sentence",
",",
"sentence",
".",
"getOffset",
"(",
")",
",",
"text",
")",
";",
"}"
] | Checks text, annotations and relations of the sentence.
@param sentence input sentence | [
"Checks",
"text",
"annotations",
"and",
"relations",
"of",
"the",
"sentence",
"."
] | e09cce1969aa598ff89e7957237375715d7a1a3a | https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/util/BioCValidate3.java#L85-L88 |
147,702 | yfpeng/pengyifan-bioc | src/main/java/com/pengyifan/bioc/util/BioCValidate3.java | BioCValidate3.check | public void check(BioCStructure structure, int offset, String text, BioCStructure... parents) {
BioCStructure[] path = new BioCStructure[parents.length + 1];
System.arraycopy(parents, 0, path, 0, parents.length);
path[path.length - 1] = structure;
String location = log(path);
checkAnnotations(struct... | java | public void check(BioCStructure structure, int offset, String text, BioCStructure... parents) {
BioCStructure[] path = new BioCStructure[parents.length + 1];
System.arraycopy(parents, 0, path, 0, parents.length);
path[path.length - 1] = structure;
String location = log(path);
checkAnnotations(struct... | [
"public",
"void",
"check",
"(",
"BioCStructure",
"structure",
",",
"int",
"offset",
",",
"String",
"text",
",",
"BioCStructure",
"...",
"parents",
")",
"{",
"BioCStructure",
"[",
"]",
"path",
"=",
"new",
"BioCStructure",
"[",
"parents",
".",
"length",
"+",
... | Check the annotation and relation in the structure.
@param structure the specified structure
@param offset the offset of this structure
@param text the text that annotations should match
@param parents the path from root until this structure (not included | [
"Check",
"the",
"annotation",
"and",
"relation",
"in",
"the",
"structure",
"."
] | e09cce1969aa598ff89e7957237375715d7a1a3a | https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/util/BioCValidate3.java#L98-L105 |
147,703 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/beans/BeanUtils.java | BeanUtils.getReadMethod | public static Method getReadMethod(Class<?> clazz, String propertyName) {
Method readMethod = null;
try {
PropertyDescriptor[] thisProps = Introspector.getBeanInfo(clazz).getPropertyDescriptors();
for (PropertyDescriptor pd : thisProps) {
if (pd.getName().equals(p... | java | public static Method getReadMethod(Class<?> clazz, String propertyName) {
Method readMethod = null;
try {
PropertyDescriptor[] thisProps = Introspector.getBeanInfo(clazz).getPropertyDescriptors();
for (PropertyDescriptor pd : thisProps) {
if (pd.getName().equals(p... | [
"public",
"static",
"Method",
"getReadMethod",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"propertyName",
")",
"{",
"Method",
"readMethod",
"=",
"null",
";",
"try",
"{",
"PropertyDescriptor",
"[",
"]",
"thisProps",
"=",
"Introspector",
".",
"getBea... | Helper method for getting a read method for a property.
@param clazz the type to get the method for.
@param propertyName the name of the property.
@return the method for reading the property. | [
"Helper",
"method",
"for",
"getting",
"a",
"read",
"method",
"for",
"a",
"property",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/BeanUtils.java#L45-L59 |
147,704 | synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java | JdbcCpoAdapter.getInstance | public static JdbcCpoAdapter getInstance(JdbcCpoMetaDescriptor metaDescriptor, DataSourceInfo<DataSource> jdsiWrite, DataSourceInfo<DataSource> jdsiRead) throws CpoException {
String adapterKey = metaDescriptor + ":" + jdsiWrite.getDataSourceName() + ":" + jdsiRead.getDataSourceName();
JdbcCpoAdapter adapter = ... | java | public static JdbcCpoAdapter getInstance(JdbcCpoMetaDescriptor metaDescriptor, DataSourceInfo<DataSource> jdsiWrite, DataSourceInfo<DataSource> jdsiRead) throws CpoException {
String adapterKey = metaDescriptor + ":" + jdsiWrite.getDataSourceName() + ":" + jdsiRead.getDataSourceName();
JdbcCpoAdapter adapter = ... | [
"public",
"static",
"JdbcCpoAdapter",
"getInstance",
"(",
"JdbcCpoMetaDescriptor",
"metaDescriptor",
",",
"DataSourceInfo",
"<",
"DataSource",
">",
"jdsiWrite",
",",
"DataSourceInfo",
"<",
"DataSource",
">",
"jdsiRead",
")",
"throws",
"CpoException",
"{",
"String",
"a... | Creates a JdbcCpoAdapter.
@param metaDescriptor This datasource that identifies the cpo metadata datasource
@param jdsiWrite The datasource that identifies the transaction database for write transactions.
@param jdsiRead The datasource that identifies the transaction database for read-only transactions.
@th... | [
"Creates",
"a",
"JdbcCpoAdapter",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L170-L178 |
147,705 | synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java | JdbcCpoAdapter.processExecuteGroup | protected <T, C> T processExecuteGroup(String name, C criteria, T result) throws CpoException {
Connection c = null;
T obj = null;
try {
c = getWriteConnection();
obj = processExecuteGroup(name, criteria, result, c);
commitLocalConnection(c);
} catch (Exception e) {
// Any excep... | java | protected <T, C> T processExecuteGroup(String name, C criteria, T result) throws CpoException {
Connection c = null;
T obj = null;
try {
c = getWriteConnection();
obj = processExecuteGroup(name, criteria, result, c);
commitLocalConnection(c);
} catch (Exception e) {
// Any excep... | [
"protected",
"<",
"T",
",",
"C",
">",
"T",
"processExecuteGroup",
"(",
"String",
"name",
",",
"C",
"criteria",
",",
"T",
"result",
")",
"throws",
"CpoException",
"{",
"Connection",
"c",
"=",
"null",
";",
"T",
"obj",
"=",
"null",
";",
"try",
"{",
"c",... | Executes an Object whose MetaData contains a stored procedure. An assumption is that the object exists in the
datasource.
@param name The filter name which tells the datasource which objects should be returned. The name also signifies
what data in the object will be populated.
@param criteria This is an object tha... | [
"Executes",
"an",
"Object",
"whose",
"MetaData",
"contains",
"a",
"stored",
"procedure",
".",
"An",
"assumption",
"is",
"that",
"the",
"object",
"exists",
"in",
"the",
"datasource",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L2160-L2177 |
147,706 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java | JsonValue.getAsArray | public JsonArray getAsArray() {
if (!(value instanceof JsonArray)) {
JsonArray val = new JsonArray();
val.add(value);
value = val;
}
return (JsonArray)value;
} | java | public JsonArray getAsArray() {
if (!(value instanceof JsonArray)) {
JsonArray val = new JsonArray();
val.add(value);
value = val;
}
return (JsonArray)value;
} | [
"public",
"JsonArray",
"getAsArray",
"(",
")",
"{",
"if",
"(",
"!",
"(",
"value",
"instanceof",
"JsonArray",
")",
")",
"{",
"JsonArray",
"val",
"=",
"new",
"JsonArray",
"(",
")",
";",
"val",
".",
"add",
"(",
"value",
")",
";",
"value",
"=",
"val",
... | Returns the value as array.
@return the value | [
"Returns",
"the",
"value",
"as",
"array",
"."
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java#L125-L132 |
147,707 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java | JsonValue.getAsBoolean | public Boolean getAsBoolean() {
if (value instanceof String) {
return Boolean.parseBoolean((String)value);
}
return (Boolean)value;
} | java | public Boolean getAsBoolean() {
if (value instanceof String) {
return Boolean.parseBoolean((String)value);
}
return (Boolean)value;
} | [
"public",
"Boolean",
"getAsBoolean",
"(",
")",
"{",
"if",
"(",
"value",
"instanceof",
"String",
")",
"{",
"return",
"Boolean",
".",
"parseBoolean",
"(",
"(",
"String",
")",
"value",
")",
";",
"}",
"return",
"(",
"Boolean",
")",
"value",
";",
"}"
] | Returns the value as boolean.
@return the value as boolean | [
"Returns",
"the",
"value",
"as",
"boolean",
"."
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java#L148-L153 |
147,708 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java | JsonValue.getAsInteger | public Integer getAsInteger() {
if (value instanceof String) {
return Integer.valueOf((String)value);
} else if (value instanceof Long) {
return ((Long)value).intValue();
}
return (Integer)value;
} | java | public Integer getAsInteger() {
if (value instanceof String) {
return Integer.valueOf((String)value);
} else if (value instanceof Long) {
return ((Long)value).intValue();
}
return (Integer)value;
} | [
"public",
"Integer",
"getAsInteger",
"(",
")",
"{",
"if",
"(",
"value",
"instanceof",
"String",
")",
"{",
"return",
"Integer",
".",
"valueOf",
"(",
"(",
"String",
")",
"value",
")",
";",
"}",
"else",
"if",
"(",
"value",
"instanceof",
"Long",
")",
"{",
... | Returns the value as integer.
@return the value as integer | [
"Returns",
"the",
"value",
"as",
"integer",
"."
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/JsonValue.java#L160-L167 |
147,709 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/element/string/EditDistanceOptimized.java | EditDistanceOptimized.match | public char match(String str1, String str2) {
if (null == str1 || null == str2 || 0 == str1.length() || 0 == str2.length()) {
return IMappingElement.IDK;
}
float sim = 1 - (float) getLevenshteinDistance(str1, str2) / java.lang.Math.max(str1.length(), str2.length());
if (... | java | public char match(String str1, String str2) {
if (null == str1 || null == str2 || 0 == str1.length() || 0 == str2.length()) {
return IMappingElement.IDK;
}
float sim = 1 - (float) getLevenshteinDistance(str1, str2) / java.lang.Math.max(str1.length(), str2.length());
if (... | [
"public",
"char",
"match",
"(",
"String",
"str1",
",",
"String",
"str2",
")",
"{",
"if",
"(",
"null",
"==",
"str1",
"||",
"null",
"==",
"str2",
"||",
"0",
"==",
"str1",
".",
"length",
"(",
")",
"||",
"0",
"==",
"str2",
".",
"length",
"(",
")",
... | Computes the relation with optimized edit distance matcher.
@param str1 source input string
@param str2 target input string
@return synonym or IDK relation | [
"Computes",
"the",
"relation",
"with",
"optimized",
"edit",
"distance",
"matcher",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/string/EditDistanceOptimized.java#L43-L53 |
147,710 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KProgram.java | KProgram.init | void init(KProcess process) {
process.markings = new Object[this.elements.size()];
for (KElement element : this.elements) {
element.init(process);
}
} | java | void init(KProcess process) {
process.markings = new Object[this.elements.size()];
for (KElement element : this.elements) {
element.init(process);
}
} | [
"void",
"init",
"(",
"KProcess",
"process",
")",
"{",
"process",
".",
"markings",
"=",
"new",
"Object",
"[",
"this",
".",
"elements",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"KElement",
"element",
":",
"this",
".",
"elements",
")",
"{",
"element... | Initialize a process.
@param program | [
"Initialize",
"a",
"process",
"."
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KProgram.java#L115-L120 |
147,711 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KProgram.java | KProgram.addElement | void addElement(KElement element) {
if (!this.elements.contains(element)) {
element.setIndex(this.elements.size());
this.elements.add(element);
}
} | java | void addElement(KElement element) {
if (!this.elements.contains(element)) {
element.setIndex(this.elements.size());
this.elements.add(element);
}
} | [
"void",
"addElement",
"(",
"KElement",
"element",
")",
"{",
"if",
"(",
"!",
"this",
".",
"elements",
".",
"contains",
"(",
"element",
")",
")",
"{",
"element",
".",
"setIndex",
"(",
"this",
".",
"elements",
".",
"size",
"(",
")",
")",
";",
"this",
... | Add an element
@param element
the element to add | [
"Add",
"an",
"element"
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KProgram.java#L128-L133 |
147,712 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getStringValueFromRow | private static String getStringValueFromRow(QuerySolution resultRow, String variableName) {
// Check the input and exit immediately if null
if (resultRow == null) {
return null;
}
String result = null;
Resource res = resultRow.getResource(variableName);
if (... | java | private static String getStringValueFromRow(QuerySolution resultRow, String variableName) {
// Check the input and exit immediately if null
if (resultRow == null) {
return null;
}
String result = null;
Resource res = resultRow.getResource(variableName);
if (... | [
"private",
"static",
"String",
"getStringValueFromRow",
"(",
"QuerySolution",
"resultRow",
",",
"String",
"variableName",
")",
"{",
"// Check the input and exit immediately if null",
"if",
"(",
"resultRow",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",... | Given a query result from a SPARQL query, obtain the given variable value
as a String
@param resultRow the result from a SPARQL query
@param variableName the name of the variable to obtain
@return the value or null if it could not be found | [
"Given",
"a",
"query",
"result",
"from",
"a",
"SPARQL",
"query",
"obtain",
"the",
"given",
"variable",
"value",
"as",
"a",
"String"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L85-L99 |
147,713 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getUrlValueFromRow | private static URL getUrlValueFromRow(QuerySolution resultRow, String variableName) {
// Check the input and exit immediately if null
if (resultRow == null) {
return null;
}
URL result = null;
Resource res = resultRow.getResource(variableName);
// Ignore and... | java | private static URL getUrlValueFromRow(QuerySolution resultRow, String variableName) {
// Check the input and exit immediately if null
if (resultRow == null) {
return null;
}
URL result = null;
Resource res = resultRow.getResource(variableName);
// Ignore and... | [
"private",
"static",
"URL",
"getUrlValueFromRow",
"(",
"QuerySolution",
"resultRow",
",",
"String",
"variableName",
")",
"{",
"// Check the input and exit immediately if null",
"if",
"(",
"resultRow",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"URL",
"resul... | Given a query result from a SPARQL query, obtain the given variable value
as a URL
@param resultRow the result from a SPARQL query
@param variableName the name of the variable to obtain
@return the value or null if it could not be obtained | [
"Given",
"a",
"query",
"result",
"from",
"a",
"SPARQL",
"query",
"obtain",
"the",
"given",
"variable",
"value",
"as",
"a",
"URL"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L131-L154 |
147,714 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.isVariableSet | public static boolean isVariableSet(QuerySolution resultRow, String variableName) {
if (resultRow != null) {
return resultRow.contains(variableName);
}
return false;
} | java | public static boolean isVariableSet(QuerySolution resultRow, String variableName) {
if (resultRow != null) {
return resultRow.contains(variableName);
}
return false;
} | [
"public",
"static",
"boolean",
"isVariableSet",
"(",
"QuerySolution",
"resultRow",
",",
"String",
"variableName",
")",
"{",
"if",
"(",
"resultRow",
"!=",
"null",
")",
"{",
"return",
"resultRow",
".",
"contains",
"(",
"variableName",
")",
";",
"}",
"return",
... | Given a query result from a SPARQL query, check if the given variable has
a value or not
@param resultRow the result from a SPARQL query
@param variableName the name of the variable to obtain
@return true if the variable has a value, false otherwise | [
"Given",
"a",
"query",
"result",
"from",
"a",
"SPARQL",
"query",
"check",
"if",
"the",
"given",
"variable",
"has",
"a",
"value",
"or",
"not"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L164-L171 |
147,715 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getIntegerValue | public static Integer getIntegerValue(QuerySolution resultRow, String variableName) {
if (resultRow != null) {
Resource res = resultRow.getResource(variableName);
if (res != null && res.isLiteral()) {
Literal val = res.asLiteral();
if (val != null) {
... | java | public static Integer getIntegerValue(QuerySolution resultRow, String variableName) {
if (resultRow != null) {
Resource res = resultRow.getResource(variableName);
if (res != null && res.isLiteral()) {
Literal val = res.asLiteral();
if (val != null) {
... | [
"public",
"static",
"Integer",
"getIntegerValue",
"(",
"QuerySolution",
"resultRow",
",",
"String",
"variableName",
")",
"{",
"if",
"(",
"resultRow",
"!=",
"null",
")",
"{",
"Resource",
"res",
"=",
"resultRow",
".",
"getResource",
"(",
"variableName",
")",
";"... | Given a query result from a SPARQL query, obtain the number value at the
given variable
@param resultRow the result from a SPARQL query
@param variableName the name of the variable to obtain
@return the Integer value, or null otherwise | [
"Given",
"a",
"query",
"result",
"from",
"a",
"SPARQL",
"query",
"obtain",
"the",
"number",
"value",
"at",
"the",
"given",
"variable"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L181-L194 |
147,716 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateLabelPattern | public static String generateLabelPattern(String var, String labelVar) {
return new StringBuilder()
.append("?").append(var).append(" ")
.append(sparqlWrapUri(RDFS.label.getURI())).append(" ")
.append("?").append(labelVar).append(". ")
.toString();... | java | public static String generateLabelPattern(String var, String labelVar) {
return new StringBuilder()
.append("?").append(var).append(" ")
.append(sparqlWrapUri(RDFS.label.getURI())).append(" ")
.append("?").append(labelVar).append(". ")
.toString();... | [
"public",
"static",
"String",
"generateLabelPattern",
"(",
"String",
"var",
",",
"String",
"labelVar",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"\"?\"",
")",
".",
"append",
"(",
"var",
")",
".",
"append",
"(",
"\" \"",
")... | Generate a pattern for binding to a label
@param var the name of the variable
@param labelVar the name of the label varible
@return | [
"Generate",
"a",
"pattern",
"for",
"binding",
"to",
"a",
"label"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L203-L209 |
147,717 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateSubclassPattern | public static String generateSubclassPattern(URI origin, URI destination) {
return new StringBuilder()
.append(sparqlWrapUri(destination)).append(" ")
.append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ")
.append(sparqlWrapUri(origin)).append(" .")
... | java | public static String generateSubclassPattern(URI origin, URI destination) {
return new StringBuilder()
.append(sparqlWrapUri(destination)).append(" ")
.append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ")
.append(sparqlWrapUri(origin)).append(" .")
... | [
"public",
"static",
"String",
"generateSubclassPattern",
"(",
"URI",
"origin",
",",
"URI",
"destination",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"sparqlWrapUri",
"(",
"destination",
")",
")",
".",
"append",
"(",
"\" \"",
")... | Generate a pattern for checking if destination is a subclass of origin
@param origin
@param destination
@return | [
"Generate",
"a",
"pattern",
"for",
"checking",
"if",
"destination",
"is",
"a",
"subclass",
"of",
"origin"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L233-L239 |
147,718 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateSuperclassPattern | public static String generateSuperclassPattern(URI origin, String matchVariable) {
return new StringBuilder()
.append(sparqlWrapUri(origin)).append(" ")
.append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ")
.append("?").append(matchVariable).append(" .")
... | java | public static String generateSuperclassPattern(URI origin, String matchVariable) {
return new StringBuilder()
.append(sparqlWrapUri(origin)).append(" ")
.append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ")
.append("?").append(matchVariable).append(" .")
... | [
"public",
"static",
"String",
"generateSuperclassPattern",
"(",
"URI",
"origin",
",",
"String",
"matchVariable",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"sparqlWrapUri",
"(",
"origin",
")",
")",
".",
"append",
"(",
"\" \"",
... | Generate a pattern for matching var to the superclasses of clazz
@param origin
@param matchVariable
@return | [
"Generate",
"a",
"pattern",
"for",
"matching",
"var",
"to",
"the",
"superclasses",
"of",
"clazz"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L248-L254 |
147,719 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateUnionStatement | public static String generateUnionStatement(List<String> patterns) {
// Check the input and exit immediately if null
if (patterns == null || patterns.isEmpty()) {
return "";
}
// This is a trivial UNION
if (patterns.size() == 1) {
return patterns.get(0);
... | java | public static String generateUnionStatement(List<String> patterns) {
// Check the input and exit immediately if null
if (patterns == null || patterns.isEmpty()) {
return "";
}
// This is a trivial UNION
if (patterns.size() == 1) {
return patterns.get(0);
... | [
"public",
"static",
"String",
"generateUnionStatement",
"(",
"List",
"<",
"String",
">",
"patterns",
")",
"{",
"// Check the input and exit immediately if null",
"if",
"(",
"patterns",
"==",
"null",
"||",
"patterns",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
... | Generates a UNION SPARQL statement for the patterns passed in the input
@param patterns the patterns to make a UNION of
@return the UNION SPARQL statement | [
"Generates",
"a",
"UNION",
"SPARQL",
"statement",
"for",
"the",
"patterns",
"passed",
"in",
"the",
"input"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L285-L310 |
147,720 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateExactMatchPattern | public static String generateExactMatchPattern(URI origin,
URI destination, String bindingVar, boolean includeUrisBound) {
List<String> patterns = new ArrayList<String>();
// Exact match pattern
StringBuffer query = new StringBuffer();
... | java | public static String generateExactMatchPattern(URI origin,
URI destination, String bindingVar, boolean includeUrisBound) {
List<String> patterns = new ArrayList<String>();
// Exact match pattern
StringBuffer query = new StringBuffer();
... | [
"public",
"static",
"String",
"generateExactMatchPattern",
"(",
"URI",
"origin",
",",
"URI",
"destination",
",",
"String",
"bindingVar",
",",
"boolean",
"includeUrisBound",
")",
"{",
"List",
"<",
"String",
">",
"patterns",
"=",
"new",
"ArrayList",
"<",
"String",... | Generate a pattern for check if two concepts have an exact match.
Basically we look for either identical classes or equivalent ones
Uses BIND which Requires SPARQL 1.1
@param origin the URL of the class we want to find exact matches for
@param destination the URL of the class we are checking the match f... | [
"Generate",
"a",
"pattern",
"for",
"check",
"if",
"two",
"concepts",
"have",
"an",
"exact",
"match",
".",
"Basically",
"we",
"look",
"for",
"either",
"identical",
"classes",
"or",
"equivalent",
"ones",
"Uses",
"BIND",
"which",
"Requires",
"SPARQL",
"1",
".",... | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L356-L388 |
147,721 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateMatchStrictSubclassesPattern | public static String generateMatchStrictSubclassesPattern(URI origin,
String matchVariable,
String flagVar,
boolean includeUrisBound) ... | java | public static String generateMatchStrictSubclassesPattern(URI origin,
String matchVariable,
String flagVar,
boolean includeUrisBound) ... | [
"public",
"static",
"String",
"generateMatchStrictSubclassesPattern",
"(",
"URI",
"origin",
",",
"String",
"matchVariable",
",",
"String",
"flagVar",
",",
"boolean",
"includeUrisBound",
")",
"{",
"StringBuffer",
"query",
"=",
"new",
"StringBuffer",
"(",
")",
";",
... | Generate a pattern for obtaining the strict subclasses of a concept.
Uses BIND which Requires SPARQL 1.1
@param origin the URL of the class we want to find subclasses for
@param matchVariable the model reference variable
@param flagVar the name of the variable we will bind results to for
ulterior... | [
"Generate",
"a",
"pattern",
"for",
"obtaining",
"the",
"strict",
"subclasses",
"of",
"a",
"concept",
".",
"Uses",
"BIND",
"which",
"Requires",
"SPARQL",
"1",
".",
"1"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L401-L419 |
147,722 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.generateMatchStrictSuperclassesPattern | public static String generateMatchStrictSuperclassesPattern(URI origin,
String matchVariable,
String bindingVar,
boolean include... | java | public static String generateMatchStrictSuperclassesPattern(URI origin,
String matchVariable,
String bindingVar,
boolean include... | [
"public",
"static",
"String",
"generateMatchStrictSuperclassesPattern",
"(",
"URI",
"origin",
",",
"String",
"matchVariable",
",",
"String",
"bindingVar",
",",
"boolean",
"includeUrisBound",
")",
"{",
"StringBuffer",
"query",
"=",
"new",
"StringBuffer",
"(",
")",
";... | Generate a pattern for obtaining the strict superclasses of a concept.
Uses BIND which Requires SPARQL 1.1
@param origin the URL of the class we want to find superclasses for
@param matchVariable the model reference variable
@param bindingVar the name of the variable we will bind results to for
ulte... | [
"Generate",
"a",
"pattern",
"for",
"obtaining",
"the",
"strict",
"superclasses",
"of",
"a",
"concept",
".",
"Uses",
"BIND",
"which",
"Requires",
"SPARQL",
"1",
".",
"1"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L461-L476 |
147,723 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getMatchType | public static DiscoMatchType getMatchType(boolean isSubsume, boolean isPlugin) {
if (isSubsume) {
if (isPlugin) {
// If plugin and subsume -> this is an exact match
return DiscoMatchType.Exact;
}
return DiscoMatchType.Subsume;
} else {
... | java | public static DiscoMatchType getMatchType(boolean isSubsume, boolean isPlugin) {
if (isSubsume) {
if (isPlugin) {
// If plugin and subsume -> this is an exact match
return DiscoMatchType.Exact;
}
return DiscoMatchType.Subsume;
} else {
... | [
"public",
"static",
"DiscoMatchType",
"getMatchType",
"(",
"boolean",
"isSubsume",
",",
"boolean",
"isPlugin",
")",
"{",
"if",
"(",
"isSubsume",
")",
"{",
"if",
"(",
"isPlugin",
")",
"{",
"// If plugin and subsume -> this is an exact match",
"return",
"DiscoMatchType"... | Given the match between concepts obtain the match type
@param isSubsume true if the concept match is subsumes
@param isPlugin true if the concept match is plugin
@return Exact, Plugin or Subsumes depending on the values | [
"Given",
"the",
"match",
"between",
"concepts",
"obtain",
"the",
"match",
"type"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L513-L526 |
147,724 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.calculateCompositeMatchType | public static DiscoMatchType calculateCompositeMatchType(MatchType bestMatch,
MatchType worstMatch) {
if (bestMatch instanceof LogicConceptMatchType && worstMatch instanceof LogicConceptMatchType) {
return calculateCompositeMatchType((Logi... | java | public static DiscoMatchType calculateCompositeMatchType(MatchType bestMatch,
MatchType worstMatch) {
if (bestMatch instanceof LogicConceptMatchType && worstMatch instanceof LogicConceptMatchType) {
return calculateCompositeMatchType((Logi... | [
"public",
"static",
"DiscoMatchType",
"calculateCompositeMatchType",
"(",
"MatchType",
"bestMatch",
",",
"MatchType",
"worstMatch",
")",
"{",
"if",
"(",
"bestMatch",
"instanceof",
"LogicConceptMatchType",
"&&",
"worstMatch",
"instanceof",
"LogicConceptMatchType",
")",
"{"... | Given the best and worst match figure out the match type for the composite.
The composite match type is determined by the worst case except when it is
a FAIL. In this case, if the best is EXACT or PLUGIN the composite match
will be PARTIAL_PLUGIN. If the best is SUBSUMES it is PARTIAL_SUBSUMES.
@param bestMatch best ... | [
"Given",
"the",
"best",
"and",
"worst",
"match",
"figure",
"out",
"the",
"match",
"type",
"for",
"the",
"composite",
".",
"The",
"composite",
"match",
"type",
"is",
"determined",
"by",
"the",
"worst",
"case",
"except",
"when",
"it",
"is",
"a",
"FAIL",
".... | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L538-L545 |
147,725 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getMatchUrl | public static URL getMatchUrl(QuerySolution row, boolean operationDiscovery) {
// Check the input and return immediately if null
if (row == null) {
return null;
}
URL matchUrl;
if (operationDiscovery) {
matchUrl = Util.getOperationUrl(row);
} els... | java | public static URL getMatchUrl(QuerySolution row, boolean operationDiscovery) {
// Check the input and return immediately if null
if (row == null) {
return null;
}
URL matchUrl;
if (operationDiscovery) {
matchUrl = Util.getOperationUrl(row);
} els... | [
"public",
"static",
"URL",
"getMatchUrl",
"(",
"QuerySolution",
"row",
",",
"boolean",
"operationDiscovery",
")",
"{",
"// Check the input and return immediately if null",
"if",
"(",
"row",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"URL",
"matchUrl",
";"... | Obtain the match url given the query row and the kind of discovery
we are carrying out
@param row the result from a SPARQL query
@param operationDiscovery true if we are doing operation discovery
@return the URL for the match result | [
"Obtain",
"the",
"match",
"url",
"given",
"the",
"query",
"row",
"and",
"the",
"kind",
"of",
"discovery",
"we",
"are",
"carrying",
"out"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L592-L607 |
147,726 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getOrGenerateMatchLabel | public static String getOrGenerateMatchLabel(QuerySolution row, boolean operationDiscovery) {
String label;
if (operationDiscovery) {
label = getOrGenerateOperationLabel(row);
} else {
label = getOrGenerateServiceLabel(row);
}
return label;
} | java | public static String getOrGenerateMatchLabel(QuerySolution row, boolean operationDiscovery) {
String label;
if (operationDiscovery) {
label = getOrGenerateOperationLabel(row);
} else {
label = getOrGenerateServiceLabel(row);
}
return label;
} | [
"public",
"static",
"String",
"getOrGenerateMatchLabel",
"(",
"QuerySolution",
"row",
",",
"boolean",
"operationDiscovery",
")",
"{",
"String",
"label",
";",
"if",
"(",
"operationDiscovery",
")",
"{",
"label",
"=",
"getOrGenerateOperationLabel",
"(",
"row",
")",
"... | Obtain or generate a label for the match result given a row resulting
from a query.
@param row the result from a SPARQL query
@param operationDiscovery true if we are doing operation discovery
@return | [
"Obtain",
"or",
"generate",
"a",
"label",
"for",
"the",
"match",
"result",
"given",
"a",
"row",
"resulting",
"from",
"a",
"query",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L639-L647 |
147,727 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.getOrGenerateOperationLabel | private static String getOrGenerateOperationLabel(QuerySolution row) {
String result;
String svcLabel = getOrGenerateServiceLabel(row);
String opLabel = getOperationLabel(row);
if (opLabel == null) {
URL opUrl = getOperationUrl(row);
result = URIUtil.generateItemL... | java | private static String getOrGenerateOperationLabel(QuerySolution row) {
String result;
String svcLabel = getOrGenerateServiceLabel(row);
String opLabel = getOperationLabel(row);
if (opLabel == null) {
URL opUrl = getOperationUrl(row);
result = URIUtil.generateItemL... | [
"private",
"static",
"String",
"getOrGenerateOperationLabel",
"(",
"QuerySolution",
"row",
")",
"{",
"String",
"result",
";",
"String",
"svcLabel",
"=",
"getOrGenerateServiceLabel",
"(",
"row",
")",
";",
"String",
"opLabel",
"=",
"getOperationLabel",
"(",
"row",
"... | Obtain or generate a label for an operation.
TODO: Deal better with WSDL naming convention
@param row the result from a SPARQL query
@return | [
"Obtain",
"or",
"generate",
"a",
"label",
"for",
"an",
"operation",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L674-L685 |
147,728 | kmi/iserve | iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java | Util.showMapDetails | private static void showMapDetails(Map<URL, MatchResult> map) {
for (Entry<URL, MatchResult> entry : map.entrySet()) {
log.info("Match " + entry.getKey().toString() + NL);
}
} | java | private static void showMapDetails(Map<URL, MatchResult> map) {
for (Entry<URL, MatchResult> entry : map.entrySet()) {
log.info("Match " + entry.getKey().toString() + NL);
}
} | [
"private",
"static",
"void",
"showMapDetails",
"(",
"Map",
"<",
"URL",
",",
"MatchResult",
">",
"map",
")",
"{",
"for",
"(",
"Entry",
"<",
"URL",
",",
"MatchResult",
">",
"entry",
":",
"map",
".",
"entrySet",
"(",
")",
")",
"{",
"log",
".",
"info",
... | Expose the data within the map
@param map | [
"Expose",
"the",
"data",
"within",
"the",
"map"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L733-L737 |
147,729 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/CodedInputStream.java | CodedInputStream.newInstance | public static CodedInputStream newInstance(final byte[] buf, final int off,
final int len) {
CodedInputStream result = new CodedInputStream(buf, off, len);
try {
// Some uses of CodedInputStream can be more efficient if they know
// exactly how many bytes... | java | public static CodedInputStream newInstance(final byte[] buf, final int off,
final int len) {
CodedInputStream result = new CodedInputStream(buf, off, len);
try {
// Some uses of CodedInputStream can be more efficient if they know
// exactly how many bytes... | [
"public",
"static",
"CodedInputStream",
"newInstance",
"(",
"final",
"byte",
"[",
"]",
"buf",
",",
"final",
"int",
"off",
",",
"final",
"int",
"len",
")",
"{",
"CodedInputStream",
"result",
"=",
"new",
"CodedInputStream",
"(",
"buf",
",",
"off",
",",
"len"... | Create a new CodedInputStream wrapping the given byte array slice. | [
"Create",
"a",
"new",
"CodedInputStream",
"wrapping",
"the",
"given",
"byte",
"array",
"slice",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/CodedInputStream.java#L68-L89 |
147,730 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/exporting/AndroidExportFilter.java | AndroidExportFilter.escapeXmlSpecialCharacters | protected static String escapeXmlSpecialCharacters(String aText) {
String result = aText;
result = result.replaceAll("&", "&");
result = result.replaceAll("\'", "\\\\'");
result = result.replaceAll("'", "\\\\'");
return result;
} | java | protected static String escapeXmlSpecialCharacters(String aText) {
String result = aText;
result = result.replaceAll("&", "&");
result = result.replaceAll("\'", "\\\\'");
result = result.replaceAll("'", "\\\\'");
return result;
} | [
"protected",
"static",
"String",
"escapeXmlSpecialCharacters",
"(",
"String",
"aText",
")",
"{",
"String",
"result",
"=",
"aText",
";",
"result",
"=",
"result",
".",
"replaceAll",
"(",
"\"&\"",
",",
"\"&\"",
")",
";",
"result",
"=",
"result",
".",
"repla... | Android specific escaping of characters. Note that since this is no real XML escaping, the
output string.xml file is potentially not valid XML. However this is explicitly allowed by
Android.
<P>
The following characters are replaced with corresponding character entities :
<table border='1' cellpadding='3' cellspacing=... | [
"Android",
"specific",
"escaping",
"of",
"characters",
".",
"Note",
"that",
"since",
"this",
"is",
"no",
"real",
"XML",
"escaping",
"the",
"output",
"string",
".",
"xml",
"file",
"is",
"potentially",
"not",
"valid",
"XML",
".",
"However",
"this",
"is",
"ex... | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/exporting/AndroidExportFilter.java#L51-L57 |
147,731 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/exporting/AbstractSpreadSheetExporter.java | AbstractSpreadSheetExporter.getRow | protected String[] getRow(String masterLanguage, ITextNode textNode, IValueNode valueNode) {
List<String> row = new ArrayList<>();
row.add(textNode.getKey());
row.add(valueNode.getStatus().getName());
if (!valueNode.getLanguage().equals(masterLanguage)) {
IValueNode masterValueNode = textNode.get... | java | protected String[] getRow(String masterLanguage, ITextNode textNode, IValueNode valueNode) {
List<String> row = new ArrayList<>();
row.add(textNode.getKey());
row.add(valueNode.getStatus().getName());
if (!valueNode.getLanguage().equals(masterLanguage)) {
IValueNode masterValueNode = textNode.get... | [
"protected",
"String",
"[",
"]",
"getRow",
"(",
"String",
"masterLanguage",
",",
"ITextNode",
"textNode",
",",
"IValueNode",
"valueNode",
")",
"{",
"List",
"<",
"String",
">",
"row",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"row",
".",
"add",
"(",
... | Constructs a row for a Trema CSV export file.
@param masterLanguage the masterLanguage
@param textNode the parent text node
@param valueNode the value node to export
@return the row. | [
"Constructs",
"a",
"row",
"for",
"a",
"Trema",
"CSV",
"export",
"file",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/exporting/AbstractSpreadSheetExporter.java#L50-L67 |
147,732 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/exporting/AbstractSpreadSheetExporter.java | AbstractSpreadSheetExporter.getValues | protected String[][] getValues(ITextNode[] textNodes, String masterLanguage, String language, Status[] status) {
int numberOfColumns = (masterLanguage.equals(language)) ? 4 : 5;
List<String[]> rows = new ArrayList<>();
// add the header row
rows.add(getHeaderRow(masterLanguage, new String[]{language}))... | java | protected String[][] getValues(ITextNode[] textNodes, String masterLanguage, String language, Status[] status) {
int numberOfColumns = (masterLanguage.equals(language)) ? 4 : 5;
List<String[]> rows = new ArrayList<>();
// add the header row
rows.add(getHeaderRow(masterLanguage, new String[]{language}))... | [
"protected",
"String",
"[",
"]",
"[",
"]",
"getValues",
"(",
"ITextNode",
"[",
"]",
"textNodes",
",",
"String",
"masterLanguage",
",",
"String",
"language",
",",
"Status",
"[",
"]",
"status",
")",
"{",
"int",
"numberOfColumns",
"=",
"(",
"masterLanguage",
... | Gets a 2 dimensional string array representation of the CSV export
data ready to be written to a CSV file.
@param textNodes the nodes to get the values for
@param masterLanguage the masterLanguage
@param language the language
@param status the states to get the values for. If <code>null</code>, all
status will be expo... | [
"Gets",
"a",
"2",
"dimensional",
"string",
"array",
"representation",
"of",
"the",
"CSV",
"export",
"data",
"ready",
"to",
"be",
"written",
"to",
"a",
"CSV",
"file",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/exporting/AbstractSpreadSheetExporter.java#L80-L97 |
147,733 | eurekaclinical/aiw-i2b2-etl | src/main/java/edu/emory/cci/aiw/i2b2etl/dest/metadata/ProviderConceptTreeBuilder.java | ProviderConceptTreeBuilder.build | @Override
public void build(Concept parent) throws OntologyBuildException {
if (!this.skipProviderHierarchy) {
try {
root = this.metadata.getOrCreateHardCodedFolder("Provider");
root.setFactTableColumn("provider_id");
root.setTableName("provider_di... | java | @Override
public void build(Concept parent) throws OntologyBuildException {
if (!this.skipProviderHierarchy) {
try {
root = this.metadata.getOrCreateHardCodedFolder("Provider");
root.setFactTableColumn("provider_id");
root.setTableName("provider_di... | [
"@",
"Override",
"public",
"void",
"build",
"(",
"Concept",
"parent",
")",
"throws",
"OntologyBuildException",
"{",
"if",
"(",
"!",
"this",
".",
"skipProviderHierarchy",
")",
"{",
"try",
"{",
"root",
"=",
"this",
".",
"metadata",
".",
"getOrCreateHardCodedFold... | Create a hierarchy of providers organized by first letter of their full
name.
@return the root of the hierarchy.
@throws OntologyBuildException if an error occurs building the hierarchy. | [
"Create",
"a",
"hierarchy",
"of",
"providers",
"organized",
"by",
"first",
"letter",
"of",
"their",
"full",
"name",
"."
] | 3eed6bda7755919cb9466d2930723a0f4748341a | https://github.com/eurekaclinical/aiw-i2b2-etl/blob/3eed6bda7755919cb9466d2930723a0f4748341a/src/main/java/edu/emory/cci/aiw/i2b2etl/dest/metadata/ProviderConceptTreeBuilder.java#L51-L68 |
147,734 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/propertysheet/PropertyEditorRegistry.java | PropertyEditorRegistry.loadPropertyEditor | private PropertyEditor loadPropertyEditor(Class<?> clz) {
PropertyEditor editor = null;
try {
editor = (PropertyEditor) clz.newInstance();
} catch (InstantiationException e) {
Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
} c... | java | private PropertyEditor loadPropertyEditor(Class<?> clz) {
PropertyEditor editor = null;
try {
editor = (PropertyEditor) clz.newInstance();
} catch (InstantiationException e) {
Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
} c... | [
"private",
"PropertyEditor",
"loadPropertyEditor",
"(",
"Class",
"<",
"?",
">",
"clz",
")",
"{",
"PropertyEditor",
"editor",
"=",
"null",
";",
"try",
"{",
"editor",
"=",
"(",
"PropertyEditor",
")",
"clz",
".",
"newInstance",
"(",
")",
";",
"}",
"catch",
... | Load PropertyEditor from clz through reflection.
@param clz Class to load from.
@return Loaded propertyEditor | [
"Load",
"PropertyEditor",
"from",
"clz",
"through",
"reflection",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertyEditorRegistry.java#L155-L165 |
147,735 | wkgcass/Style | src/main/java/net/cassite/style/aggregation/IteratorInfo.java | IteratorInfo.setValues | IteratorInfo<R> setValues(int previousIndex, int nextIndex, boolean hasPrevious, boolean hasNext, int currentIndex, int effectiveIndex,
R res) {
this.previousIndex = previousIndex;
this.nextIndex = nextIndex;
this.hasPrevious = hasPreviou... | java | IteratorInfo<R> setValues(int previousIndex, int nextIndex, boolean hasPrevious, boolean hasNext, int currentIndex, int effectiveIndex,
R res) {
this.previousIndex = previousIndex;
this.nextIndex = nextIndex;
this.hasPrevious = hasPreviou... | [
"IteratorInfo",
"<",
"R",
">",
"setValues",
"(",
"int",
"previousIndex",
",",
"int",
"nextIndex",
",",
"boolean",
"hasPrevious",
",",
"boolean",
"hasNext",
",",
"int",
"currentIndex",
",",
"int",
"effectiveIndex",
",",
"R",
"res",
")",
"{",
"this",
".",
"p... | set all fields of the Iterator Info
@param previousIndex previous index
@param nextIndex next index
@param hasPrevious has previous
@param hasNext has next
@param currentIndex current index
@param effectiveIndex effective index
the times 'last loop value' has been modified
@param res last ... | [
"set",
"all",
"fields",
"of",
"the",
"Iterator",
"Info"
] | db3ea64337251f46f734279480e365293bececbd | https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/aggregation/IteratorInfo.java#L48-L55 |
147,736 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getInstance | public static LdapHelper getInstance(String instance) {
if (!helpers.containsKey(instance)) {
helpers.put(instance, new LdapHelper(instance));
}
LdapHelper helper = helpers.get(instance);
if (!helper.online) {
helper.loadProperties();
}
return help... | java | public static LdapHelper getInstance(String instance) {
if (!helpers.containsKey(instance)) {
helpers.put(instance, new LdapHelper(instance));
}
LdapHelper helper = helpers.get(instance);
if (!helper.online) {
helper.loadProperties();
}
return help... | [
"public",
"static",
"LdapHelper",
"getInstance",
"(",
"String",
"instance",
")",
"{",
"if",
"(",
"!",
"helpers",
".",
"containsKey",
"(",
"instance",
")",
")",
"{",
"helpers",
".",
"put",
"(",
"instance",
",",
"new",
"LdapHelper",
"(",
"instance",
")",
"... | Returns a new Instance of LdapHelper.
@param instance the identifyer of the LDAP Instance (e.g. ldap1)
@return a new Instance. | [
"Returns",
"a",
"new",
"Instance",
"of",
"LdapHelper",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L110-L119 |
147,737 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.setUserAsUser | @Override
public boolean setUserAsUser(Node node, String uid, String password) throws Exception {
boolean status = false;
StringBuilder sb = new StringBuilder(userIdentifyer + "=").append(uid).append(",");
sb.append(Configuration.getProperty(instanceName + LdapKeys.ATTR_OU_PEOPLE)).append(",");
sb.append(ba... | java | @Override
public boolean setUserAsUser(Node node, String uid, String password) throws Exception {
boolean status = false;
StringBuilder sb = new StringBuilder(userIdentifyer + "=").append(uid).append(",");
sb.append(Configuration.getProperty(instanceName + LdapKeys.ATTR_OU_PEOPLE)).append(",");
sb.append(ba... | [
"@",
"Override",
"public",
"boolean",
"setUserAsUser",
"(",
"Node",
"node",
",",
"String",
"uid",
",",
"String",
"password",
")",
"throws",
"Exception",
"{",
"boolean",
"status",
"=",
"false",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"us... | Writes the modifications on an user object back to the LDAP using a
specific context.
@param node the LDAP Node with User Content.
@param uid the uid of the User that adds the Node.
@param password the password of the User that adds the Node.
@return true if the user was set correct, false otherwise.
@throws Exception... | [
"Writes",
"the",
"modifications",
"on",
"an",
"user",
"object",
"back",
"to",
"the",
"LDAP",
"using",
"a",
"specific",
"context",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L153-L173 |
147,738 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.rmUser | @Override
public boolean rmUser(final Node node) {
LdapUser user = (LdapUser) node;
if(node == null) {
return false;
}
try {
deletionCount++;
ctx.unbind(getOuForNode(user));
} catch (NamingException ex) {
handleNamingException(user... | java | @Override
public boolean rmUser(final Node node) {
LdapUser user = (LdapUser) node;
if(node == null) {
return false;
}
try {
deletionCount++;
ctx.unbind(getOuForNode(user));
} catch (NamingException ex) {
handleNamingException(user... | [
"@",
"Override",
"public",
"boolean",
"rmUser",
"(",
"final",
"Node",
"node",
")",
"{",
"LdapUser",
"user",
"=",
"(",
"LdapUser",
")",
"node",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"try",
"{",
"deletionCount",
"... | Deletes an LDAP-User.
@param node of the LDAP-User to be deleted.
@return true if User was deleted, otherwise false. | [
"Deletes",
"an",
"LDAP",
"-",
"User",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L181-L195 |
147,739 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.rmGroup | @Override
public boolean rmGroup(Node node) {
LdapGroup group = (LdapGroup) node;
try {
deletionCount++;
ctx.unbind(getOuForNode(group));
} catch (NamingException ex) {
handleNamingException(group, ex);
}
Node ldapGroup = getGroup(group.get... | java | @Override
public boolean rmGroup(Node node) {
LdapGroup group = (LdapGroup) node;
try {
deletionCount++;
ctx.unbind(getOuForNode(group));
} catch (NamingException ex) {
handleNamingException(group, ex);
}
Node ldapGroup = getGroup(group.get... | [
"@",
"Override",
"public",
"boolean",
"rmGroup",
"(",
"Node",
"node",
")",
"{",
"LdapGroup",
"group",
"=",
"(",
"LdapGroup",
")",
"node",
";",
"try",
"{",
"deletionCount",
"++",
";",
"ctx",
".",
"unbind",
"(",
"getOuForNode",
"(",
"group",
")",
")",
";... | Deletes a LDAP-Group.
@param node of the LDAP-Group to be deleted.
@return true if Group was deleted, otherwise false. | [
"Deletes",
"a",
"LDAP",
"-",
"Group",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L203-L214 |
147,740 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.setGroup | @Override
public boolean setGroup(Node node) throws Exception {
LdapGroup newLdapGroup = (LdapGroup) node;
newLdapGroup = updateGroupMembers(newLdapGroup);
LdapGroup oldLdapGroup = (LdapGroup) getGroup(newLdapGroup.getCn());
if (oldLdapGroup.isEmpty()) {
creationCount++;
... | java | @Override
public boolean setGroup(Node node) throws Exception {
LdapGroup newLdapGroup = (LdapGroup) node;
newLdapGroup = updateGroupMembers(newLdapGroup);
LdapGroup oldLdapGroup = (LdapGroup) getGroup(newLdapGroup.getCn());
if (oldLdapGroup.isEmpty()) {
creationCount++;
... | [
"@",
"Override",
"public",
"boolean",
"setGroup",
"(",
"Node",
"node",
")",
"throws",
"Exception",
"{",
"LdapGroup",
"newLdapGroup",
"=",
"(",
"LdapGroup",
")",
"node",
";",
"newLdapGroup",
"=",
"updateGroupMembers",
"(",
"newLdapGroup",
")",
";",
"LdapGroup",
... | Adds or updates a LDAP-Group.
@param node of the LDAP-Group to be set.
@return true if the Group was added/updated, otherwise false.
@throws Exception if adding a Group fails. | [
"Adds",
"or",
"updates",
"a",
"LDAP",
"-",
"Group",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L223-L243 |
147,741 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getUser | @Override
public Node getUser(final String uid) {
try {
String query = "(&(objectClass=" + userObjectClass + ")(" + userIdentifyer + "=" + uid + "))";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
... | java | @Override
public Node getUser(final String uid) {
try {
String query = "(&(objectClass=" + userObjectClass + ")(" + userIdentifyer + "=" + uid + "))";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
... | [
"@",
"Override",
"public",
"Node",
"getUser",
"(",
"final",
"String",
"uid",
")",
"{",
"try",
"{",
"String",
"query",
"=",
"\"(&(objectClass=\"",
"+",
"userObjectClass",
"+",
"\")(\"",
"+",
"userIdentifyer",
"+",
"\"=\"",
"+",
"uid",
"+",
"\"))\"",
";",
"S... | Returns an LDAP-User.
@param uid the uid of the User.
@see com.innoq.liqid.model.Node#getName
@return the Node of that User, either filled (if User was found), or empty. | [
"Returns",
"an",
"LDAP",
"-",
"User",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L288-L312 |
147,742 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.findUsers | @Override
public Set<Node> findUsers(final String uid) {
QueryBuilder qb = new LdapQueryBuilder();
if ("*".equals(uid)) {
qb.append(LdapKeys.OBJECT_CLASS, userObjectClass);
} else {
qb.append(LdapKeys.OBJECT_CLASS, userObjectClass);
qb.append(userIdentifye... | java | @Override
public Set<Node> findUsers(final String uid) {
QueryBuilder qb = new LdapQueryBuilder();
if ("*".equals(uid)) {
qb.append(LdapKeys.OBJECT_CLASS, userObjectClass);
} else {
qb.append(LdapKeys.OBJECT_CLASS, userObjectClass);
qb.append(userIdentifye... | [
"@",
"Override",
"public",
"Set",
"<",
"Node",
">",
"findUsers",
"(",
"final",
"String",
"uid",
")",
"{",
"QueryBuilder",
"qb",
"=",
"new",
"LdapQueryBuilder",
"(",
")",
";",
"if",
"(",
"\"*\"",
".",
"equals",
"(",
"uid",
")",
")",
"{",
"qb",
".",
... | Returns several LDAP-Users for a given search-String.
@param uid the uid or part of uid of the Users.
@return Users as a Set of com.innoq.liqid.model.Node. | [
"Returns",
"several",
"LDAP",
"-",
"Users",
"for",
"a",
"given",
"search",
"-",
"String",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L320-L330 |
147,743 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getGroup | @Override
public Node getGroup(final String cn) {
try {
String query = "(&(objectClass=" + groupObjectClass + ")(" + groupIdentifyer + "=" + cn + "))";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
... | java | @Override
public Node getGroup(final String cn) {
try {
String query = "(&(objectClass=" + groupObjectClass + ")(" + groupIdentifyer + "=" + cn + "))";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
... | [
"@",
"Override",
"public",
"Node",
"getGroup",
"(",
"final",
"String",
"cn",
")",
"{",
"try",
"{",
"String",
"query",
"=",
"\"(&(objectClass=\"",
"+",
"groupObjectClass",
"+",
"\")(\"",
"+",
"groupIdentifyer",
"+",
"\"=\"",
"+",
"cn",
"+",
"\"))\"",
";",
"... | Returns a LDAP-Group.
@param cn the cn of that Group.
@see com.innoq.liqid.model.Node#getName()
@return the Node of that Group, either filled (if Group was found), or empty. | [
"Returns",
"a",
"LDAP",
"-",
"Group",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L368-L391 |
147,744 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.findGroups | @Override
public Set<Node> findGroups(final String cn) {
QueryBuilder qb = new LdapQueryBuilder();
if ("*".equals(cn)) {
qb.append(LdapKeys.OBJECT_CLASS, groupObjectClass);
} else {
qb.append(LdapKeys.OBJECT_CLASS, groupObjectClass);
qb.append(groupIdentif... | java | @Override
public Set<Node> findGroups(final String cn) {
QueryBuilder qb = new LdapQueryBuilder();
if ("*".equals(cn)) {
qb.append(LdapKeys.OBJECT_CLASS, groupObjectClass);
} else {
qb.append(LdapKeys.OBJECT_CLASS, groupObjectClass);
qb.append(groupIdentif... | [
"@",
"Override",
"public",
"Set",
"<",
"Node",
">",
"findGroups",
"(",
"final",
"String",
"cn",
")",
"{",
"QueryBuilder",
"qb",
"=",
"new",
"LdapQueryBuilder",
"(",
")",
";",
"if",
"(",
"\"*\"",
".",
"equals",
"(",
"cn",
")",
")",
"{",
"qb",
".",
"... | Returns several LDAP-Groups for a given search-String.
@param cn the cn (or part of cn) for the groups.
@return Groups as a Set of Nodes. | [
"Returns",
"several",
"LDAP",
"-",
"Groups",
"for",
"a",
"given",
"search",
"-",
"String",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L399-L409 |
147,745 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getPrincipal | @Override
public Node getPrincipal() {
if (principal == null) {
principal = new LdapUser();
LdapUser p = (LdapUser) principal;
p.setDn(Configuration.getProperty(instanceName + ".principal").trim());
p.setUid(getUidForDN(p.getDn()));
}
return pr... | java | @Override
public Node getPrincipal() {
if (principal == null) {
principal = new LdapUser();
LdapUser p = (LdapUser) principal;
p.setDn(Configuration.getProperty(instanceName + ".principal").trim());
p.setUid(getUidForDN(p.getDn()));
}
return pr... | [
"@",
"Override",
"public",
"Node",
"getPrincipal",
"(",
")",
"{",
"if",
"(",
"principal",
"==",
"null",
")",
"{",
"principal",
"=",
"new",
"LdapUser",
"(",
")",
";",
"LdapUser",
"p",
"=",
"(",
"LdapUser",
")",
"principal",
";",
"p",
".",
"setDn",
"("... | Returns the LDAP-Principal as a LdapUser.
@return the Principal of that instanceName as a Node | [
"Returns",
"the",
"LDAP",
"-",
"Principal",
"as",
"a",
"LdapUser",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L445-L454 |
147,746 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getDefault | public String getDefault(final String key) {
if (defaultValues.containsKey(key)) {
return defaultValues.get(key);
}
return "";
} | java | public String getDefault(final String key) {
if (defaultValues.containsKey(key)) {
return defaultValues.get(key);
}
return "";
} | [
"public",
"String",
"getDefault",
"(",
"final",
"String",
"key",
")",
"{",
"if",
"(",
"defaultValues",
".",
"containsKey",
"(",
"key",
")",
")",
"{",
"return",
"defaultValues",
".",
"get",
"(",
"key",
")",
";",
"}",
"return",
"\"\"",
";",
"}"
] | Returns a Value from the Default Collection.
@param key the key of the default-collection.
@return the default value for that key if exists otherwise an empty
string. | [
"Returns",
"a",
"Value",
"from",
"the",
"Default",
"Collection",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L463-L468 |
147,747 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getGroupsForUser | @Override
public Set<Node> getGroupsForUser(Node user) {
Set<Node> groups = new TreeSet<>();
try {
String query = "(& (objectClass=" + groupObjectClass + ") (" + groupMemberAttribut + "=" + ((LdapUser) user).getDn() + "))";
SearchResult searchResult;
Attributes at... | java | @Override
public Set<Node> getGroupsForUser(Node user) {
Set<Node> groups = new TreeSet<>();
try {
String query = "(& (objectClass=" + groupObjectClass + ") (" + groupMemberAttribut + "=" + ((LdapUser) user).getDn() + "))";
SearchResult searchResult;
Attributes at... | [
"@",
"Override",
"public",
"Set",
"<",
"Node",
">",
"getGroupsForUser",
"(",
"Node",
"user",
")",
"{",
"Set",
"<",
"Node",
">",
"groups",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"try",
"{",
"String",
"query",
"=",
"\"(& (objectClass=\"",
"+",
"grou... | Load all Groups for a given User.
@param user the given User.
@return Groups as a Set of Nodes for that User. | [
"Load",
"all",
"Groups",
"for",
"a",
"given",
"User",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L522-L545 |
147,748 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getUsersForGroup | @Override
public Set<Node> getUsersForGroup(Node group) {
Set<Node> users = new TreeSet<>();
try {
String query = "(" + groupIdentifyer + "=" + group.getName() + ")";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
controls.setSearchScope(SearchCo... | java | @Override
public Set<Node> getUsersForGroup(Node group) {
Set<Node> users = new TreeSet<>();
try {
String query = "(" + groupIdentifyer + "=" + group.getName() + ")";
SearchResult searchResult;
Attributes attributes;
SearchControls controls = new SearchControls();
controls.setSearchScope(SearchCo... | [
"@",
"Override",
"public",
"Set",
"<",
"Node",
">",
"getUsersForGroup",
"(",
"Node",
"group",
")",
"{",
"Set",
"<",
"Node",
">",
"users",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"try",
"{",
"String",
"query",
"=",
"\"(\"",
"+",
"groupIdentifyer",
... | Load all Users for a given Group.
@param group the given Group.
@return Users as a Set of Nodes for that Group. | [
"Load",
"all",
"Users",
"for",
"a",
"given",
"Group",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L553-L580 |
147,749 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getUserTemplate | public LdapUser getUserTemplate(String uid) {
LdapUser user = new LdapUser(uid, this);
user.set("dn", getDNForNode(user));
for (String oc : userObjectClasses) {
user.addObjectClass(oc.trim());
}
user = (LdapUser) updateObjectClasses(user);
// TODO this needs ... | java | public LdapUser getUserTemplate(String uid) {
LdapUser user = new LdapUser(uid, this);
user.set("dn", getDNForNode(user));
for (String oc : userObjectClasses) {
user.addObjectClass(oc.trim());
}
user = (LdapUser) updateObjectClasses(user);
// TODO this needs ... | [
"public",
"LdapUser",
"getUserTemplate",
"(",
"String",
"uid",
")",
"{",
"LdapUser",
"user",
"=",
"new",
"LdapUser",
"(",
"uid",
",",
"this",
")",
";",
"user",
".",
"set",
"(",
"\"dn\"",
",",
"getDNForNode",
"(",
"user",
")",
")",
";",
"for",
"(",
"S... | Returns a basic LDAP-User-Template for a new LDAP-User.
@param uid of the new LDAP-User.
@return the (prefiled) User-Template. | [
"Returns",
"a",
"basic",
"LDAP",
"-",
"User",
"-",
"Template",
"for",
"a",
"new",
"LDAP",
"-",
"User",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L619-L654 |
147,750 | innoq/LiQID | ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java | LdapHelper.getIdentifyerFromDN | public static String getIdentifyerFromDN(String dn) {
if (dn != null) {
String[] parts = dn.trim().split(",");
String[] kvs;
if(parts.length > 0 && parts[0].contains("=")) {
kvs = parts[0].trim().split("=");
return kvs.length > 0 ? kvs[0] : null;
}
}
return null;
} | java | public static String getIdentifyerFromDN(String dn) {
if (dn != null) {
String[] parts = dn.trim().split(",");
String[] kvs;
if(parts.length > 0 && parts[0].contains("=")) {
kvs = parts[0].trim().split("=");
return kvs.length > 0 ? kvs[0] : null;
}
}
return null;
} | [
"public",
"static",
"String",
"getIdentifyerFromDN",
"(",
"String",
"dn",
")",
"{",
"if",
"(",
"dn",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"dn",
".",
"trim",
"(",
")",
".",
"split",
"(",
"\",\"",
")",
";",
"String",
"[",
"]",
... | Return the Value of the given Identifyer from a given dn.
@param dn of the entry.
@return the identifyer. | [
"Return",
"the",
"Value",
"of",
"the",
"given",
"Identifyer",
"from",
"a",
"given",
"dn",
"."
] | ae3de2c1fd78c40219780d510eba57c931901279 | https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L773-L783 |
147,751 | kmi/iserve | iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java | EldaRouterRestletSupport.createRouterFor | public static Router createRouterFor(ServletContext con) {
String contextName = EldaRouterRestletSupport.flatContextPath(con.getContextPath());
List<PrefixAndFilename> pfs = prefixAndFilenames(con, contextName);
//
Router result = new DefaultRouter();
String baseFilePath = Servle... | java | public static Router createRouterFor(ServletContext con) {
String contextName = EldaRouterRestletSupport.flatContextPath(con.getContextPath());
List<PrefixAndFilename> pfs = prefixAndFilenames(con, contextName);
//
Router result = new DefaultRouter();
String baseFilePath = Servle... | [
"public",
"static",
"Router",
"createRouterFor",
"(",
"ServletContext",
"con",
")",
"{",
"String",
"contextName",
"=",
"EldaRouterRestletSupport",
".",
"flatContextPath",
"(",
"con",
".",
"getContextPath",
"(",
")",
")",
";",
"List",
"<",
"PrefixAndFilename",
">",... | Create a new Router initialised with the configs appropriate to the
contextPath. | [
"Create",
"a",
"new",
"Router",
"initialised",
"with",
"the",
"configs",
"appropriate",
"to",
"the",
"contextPath",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java#L109-L127 |
147,752 | kmi/iserve | iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java | EldaRouterRestletSupport.changeMediaType | protected static Renderer changeMediaType(final Renderer r, final MediaType mt) {
return new Renderer() {
@Override
public MediaType getMediaType(Bindings unused) {
return mt;
}
@Override
public BytesOut render(Times t, Bindings rc, M... | java | protected static Renderer changeMediaType(final Renderer r, final MediaType mt) {
return new Renderer() {
@Override
public MediaType getMediaType(Bindings unused) {
return mt;
}
@Override
public BytesOut render(Times t, Bindings rc, M... | [
"protected",
"static",
"Renderer",
"changeMediaType",
"(",
"final",
"Renderer",
"r",
",",
"final",
"MediaType",
"mt",
")",
"{",
"return",
"new",
"Renderer",
"(",
")",
"{",
"@",
"Override",
"public",
"MediaType",
"getMediaType",
"(",
"Bindings",
"unused",
")",
... | Given a renderer r and a media type mt, return a new renderer which
behaves like r except that it announces its media type as mt. r
itself is not changed.
This code should be somewhere more sensible. In fact the whole
renderer-choosing machinery needs a good cleanup. | [
"Given",
"a",
"renderer",
"r",
"and",
"a",
"media",
"type",
"mt",
"return",
"a",
"new",
"renderer",
"which",
"behaves",
"like",
"r",
"except",
"that",
"it",
"announces",
"its",
"media",
"type",
"as",
"mt",
".",
"r",
"itself",
"is",
"not",
"changed",
".... | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java#L188-L211 |
147,753 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNGloss.java | WNGloss.match | public char match(ISense source, ISense target) throws MatcherLibraryException {
String sSynset = source.getGloss();
String tSynset = target.getGloss();
StringTokenizer stSource = new StringTokenizer(sSynset, " ,.\"'();");
StringTokenizer stTarget = new StringTokenizer(tSynset, " ,.\... | java | public char match(ISense source, ISense target) throws MatcherLibraryException {
String sSynset = source.getGloss();
String tSynset = target.getGloss();
StringTokenizer stSource = new StringTokenizer(sSynset, " ,.\"'();");
StringTokenizer stTarget = new StringTokenizer(tSynset, " ,.\... | [
"public",
"char",
"match",
"(",
"ISense",
"source",
",",
"ISense",
"target",
")",
"throws",
"MatcherLibraryException",
"{",
"String",
"sSynset",
"=",
"source",
".",
"getGloss",
"(",
")",
";",
"String",
"tSynset",
"=",
"target",
".",
"getGloss",
"(",
")",
"... | Computes the relations with WordNet gloss matcher.
@param source gloss of source
@param target gloss of target
@return more general, less general or IDK relation | [
"Computes",
"the",
"relations",
"with",
"WordNet",
"gloss",
"matcher",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNGloss.java#L57-L94 |
147,754 | kmi/iserve | iserve-rest/src/main/java/uk/ac/open/kmi/iserve/rest/sal/resource/ServicesResource.java | ServicesResource.clearServices | @DELETE
@Produces({MediaType.TEXT_HTML, "application/json"})
@ApiOperation(value = "Delete all the registered services",
notes = "BE CAREFUL! You can lose all your data. It returns a message which confirms all the service deletions.")
@ApiResponses(
value = {
@Api... | java | @DELETE
@Produces({MediaType.TEXT_HTML, "application/json"})
@ApiOperation(value = "Delete all the registered services",
notes = "BE CAREFUL! You can lose all your data. It returns a message which confirms all the service deletions.")
@ApiResponses(
value = {
@Api... | [
"@",
"DELETE",
"@",
"Produces",
"(",
"{",
"MediaType",
".",
"TEXT_HTML",
",",
"\"application/json\"",
"}",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Delete all the registered services\"",
",",
"notes",
"=",
"\"BE CAREFUL! You can lose all your data. It returns a mes... | Clears the services registry
From HTTP Method definition
9.7 DELETE
A successful response SHOULD be
200 (OK) if the response includes an entity describing the status,
202 (Accepted) if the action has not yet been enacted, or
204 (No Content) if the action has been enacted but the response does not include an entity.
... | [
"Clears",
"the",
"services",
"registry"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-rest/src/main/java/uk/ac/open/kmi/iserve/rest/sal/resource/ServicesResource.java#L398-L464 |
147,755 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/element/string/GPrefix.java | GPrefix.matchPrefix | private char matchPrefix(String str1, String str2) {
//here always str1.startsWith(str2) colorless!color
char rel = IMappingElement.IDK;
int spacePos1 = str1.indexOf(' ');
String suffix = str1.substring(str2.length());
if (-1 < spacePos1 && !suffixes.containsKey(suffix)) {//... | java | private char matchPrefix(String str1, String str2) {
//here always str1.startsWith(str2) colorless!color
char rel = IMappingElement.IDK;
int spacePos1 = str1.indexOf(' ');
String suffix = str1.substring(str2.length());
if (-1 < spacePos1 && !suffixes.containsKey(suffix)) {//... | [
"private",
"char",
"matchPrefix",
"(",
"String",
"str1",
",",
"String",
"str2",
")",
"{",
"//here always str1.startsWith(str2) colorless!color\r",
"char",
"rel",
"=",
"IMappingElement",
".",
"IDK",
";",
"int",
"spacePos1",
"=",
"str1",
".",
"indexOf",
"(",
"'",
... | Computes relation with prefix matcher.
@param str1 the source input
@param str2 the target input
@return synonym, more general, less general or IDK relation | [
"Computes",
"relation",
"with",
"prefix",
"matcher",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/string/GPrefix.java#L607-L650 |
147,756 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/exporter/CpoClassSourceGenerator.java | CpoClassSourceGenerator.reset | protected void reset() {
attributeStatics = new StringBuilder();
functionGroupStatics = new StringBuilder();
properties = new StringBuilder();
constructor = new StringBuilder();
gettersSetters = new StringBuilder();
equals = new StringBuilder();
hashCode = new StringBuilder();
toString =... | java | protected void reset() {
attributeStatics = new StringBuilder();
functionGroupStatics = new StringBuilder();
properties = new StringBuilder();
constructor = new StringBuilder();
gettersSetters = new StringBuilder();
equals = new StringBuilder();
hashCode = new StringBuilder();
toString =... | [
"protected",
"void",
"reset",
"(",
")",
"{",
"attributeStatics",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"functionGroupStatics",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"properties",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"constructor",
"=",
"ne... | Resets all of the buffers.
This is needed if you intend to reuse the visitor. This is always called by visit(CpoClass) | [
"Resets",
"all",
"of",
"the",
"buffers",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/exporter/CpoClassSourceGenerator.java#L62-L72 |
147,757 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/exporter/CpoClassSourceGenerator.java | CpoClassSourceGenerator.generateInterfaceName | protected String generateInterfaceName(CpoClass cpoClass) {
String className = cpoClass.getName();
if (className.lastIndexOf(".") != -1) {
className = className.substring(className.lastIndexOf(".") + 1);
}
return className;
} | java | protected String generateInterfaceName(CpoClass cpoClass) {
String className = cpoClass.getName();
if (className.lastIndexOf(".") != -1) {
className = className.substring(className.lastIndexOf(".") + 1);
}
return className;
} | [
"protected",
"String",
"generateInterfaceName",
"(",
"CpoClass",
"cpoClass",
")",
"{",
"String",
"className",
"=",
"cpoClass",
".",
"getName",
"(",
")",
";",
"if",
"(",
"className",
".",
"lastIndexOf",
"(",
"\".\"",
")",
"!=",
"-",
"1",
")",
"{",
"classNam... | The cpoClass name will be used for the name of the interface | [
"The",
"cpoClass",
"name",
"will",
"be",
"used",
"for",
"the",
"name",
"of",
"the",
"interface"
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/exporter/CpoClassSourceGenerator.java#L133-L139 |
147,758 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/Entity.java | Entity.firePropertyChange | protected void firePropertyChange(String propertyName, Object oldValue,
Object newValue) {
if (oldValue instanceof JsonValue) {
oldValue = getRawObject((JsonValue)oldValue);
}
if (newValue instanceof JsonValue) {
newValue = getRawObject((JsonValue)newValue);
}
changeSupport.firePropertyChang... | java | protected void firePropertyChange(String propertyName, Object oldValue,
Object newValue) {
if (oldValue instanceof JsonValue) {
oldValue = getRawObject((JsonValue)oldValue);
}
if (newValue instanceof JsonValue) {
newValue = getRawObject((JsonValue)newValue);
}
changeSupport.firePropertyChang... | [
"protected",
"void",
"firePropertyChange",
"(",
"String",
"propertyName",
",",
"Object",
"oldValue",
",",
"Object",
"newValue",
")",
"{",
"if",
"(",
"oldValue",
"instanceof",
"JsonValue",
")",
"{",
"oldValue",
"=",
"getRawObject",
"(",
"(",
"JsonValue",
")",
"... | Notify listeners that a property has changed its value
@param propertyName
@param oldValue
@param newValue | [
"Notify",
"listeners",
"that",
"a",
"property",
"has",
"changed",
"its",
"value"
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/Entity.java#L58-L70 |
147,759 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/Status.java | Status.getAvailableStatusNames | public static String[] getAvailableStatusNames() {
List<String> nameList = new ArrayList<>();
for (Status status : INSTANCES.values()) {
nameList.add(status.getName());
}
return nameList.toArray(new String[nameList.size()]);
} | java | public static String[] getAvailableStatusNames() {
List<String> nameList = new ArrayList<>();
for (Status status : INSTANCES.values()) {
nameList.add(status.getName());
}
return nameList.toArray(new String[nameList.size()]);
} | [
"public",
"static",
"String",
"[",
"]",
"getAvailableStatusNames",
"(",
")",
"{",
"List",
"<",
"String",
">",
"nameList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Status",
"status",
":",
"INSTANCES",
".",
"values",
"(",
")",
")",
"{",... | Gets the available status names in ascending order of their
corresponding status.
@return the available status names in ascending order of their
corresponding status. | [
"Gets",
"the",
"available",
"status",
"names",
"in",
"ascending",
"order",
"of",
"their",
"corresponding",
"status",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/Status.java#L147-L153 |
147,760 | yfpeng/pengyifan-bioc | src/main/java/com/pengyifan/bioc/io/BioCDocumentReader.java | BioCDocumentReader.readDocument | public BioCDocument readDocument()
throws XMLStreamException {
if (reader.document != null) {
BioCDocument thisDocument = reader.document;
reader.read();
return thisDocument;
} else {
return null;
}
} | java | public BioCDocument readDocument()
throws XMLStreamException {
if (reader.document != null) {
BioCDocument thisDocument = reader.document;
reader.read();
return thisDocument;
} else {
return null;
}
} | [
"public",
"BioCDocument",
"readDocument",
"(",
")",
"throws",
"XMLStreamException",
"{",
"if",
"(",
"reader",
".",
"document",
"!=",
"null",
")",
"{",
"BioCDocument",
"thisDocument",
"=",
"reader",
".",
"document",
";",
"reader",
".",
"read",
"(",
")",
";",
... | Reads one BioC document from the XML file.
@return the BioC document
@throws XMLStreamException if an unexpected processing error occurs | [
"Reads",
"one",
"BioC",
"document",
"from",
"the",
"XML",
"file",
"."
] | e09cce1969aa598ff89e7957237375715d7a1a3a | https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/io/BioCDocumentReader.java#L143-L153 |
147,761 | mlhartme/sushi | src/main/java/net/oneandone/sushi/fs/ssh/Process.java | Process.waitFor | public void waitFor(long timeout) throws JSchException, ExitCode, InterruptedException {
long deadline;
try {
deadline = System.currentTimeMillis() + timeout;
while (!channel.isClosed()) {
if (System.currentTimeMillis() >= deadline) {
throw ne... | java | public void waitFor(long timeout) throws JSchException, ExitCode, InterruptedException {
long deadline;
try {
deadline = System.currentTimeMillis() + timeout;
while (!channel.isClosed()) {
if (System.currentTimeMillis() >= deadline) {
throw ne... | [
"public",
"void",
"waitFor",
"(",
"long",
"timeout",
")",
"throws",
"JSchException",
",",
"ExitCode",
",",
"InterruptedException",
"{",
"long",
"deadline",
";",
"try",
"{",
"deadline",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"timeout",
";",
"... | Waits for termination.
@param timeout CAUTION: <= 0 immediately times out | [
"Waits",
"for",
"termination",
"."
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/ssh/Process.java#L84-L101 |
147,762 | synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/transform/jdbc/TransformNoOp.java | TransformNoOp.transformIn | @Override
public Integer transformIn(Integer dbIn) throws CpoException {
logger.debug("Inside TransformNoOp::transformIn(" + dbIn + ");");
return dbIn;
} | java | @Override
public Integer transformIn(Integer dbIn) throws CpoException {
logger.debug("Inside TransformNoOp::transformIn(" + dbIn + ");");
return dbIn;
} | [
"@",
"Override",
"public",
"Integer",
"transformIn",
"(",
"Integer",
"dbIn",
")",
"throws",
"CpoException",
"{",
"logger",
".",
"debug",
"(",
"\"Inside TransformNoOp::transformIn(\"",
"+",
"dbIn",
"+",
"\");\"",
")",
";",
"return",
"dbIn",
";",
"}"
] | Transforms the datasource object into an object required by the class. The type of the dbIn parameter and the type
of the return value must change to match the types being converted. Reflection is used to true everything up at
runtime.
e.g public byte[] transformIn(Blob dbIn) would be the signature for converting a Bl... | [
"Transforms",
"the",
"datasource",
"object",
"into",
"an",
"object",
"required",
"by",
"the",
"class",
".",
"The",
"type",
"of",
"the",
"dbIn",
"parameter",
"and",
"the",
"type",
"of",
"the",
"return",
"value",
"must",
"change",
"to",
"match",
"the",
"type... | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/transform/jdbc/TransformNoOp.java#L54-L58 |
147,763 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KReflection.java | KReflection.dispatch | public void dispatch(Event<?> event) {
//eventManagement.dispatch(event);
for (EventListener listener : KReflection.Holder.INSTANCE.listeners) {
try {
listener.handleEvent(event);
} catch (Exception e) {
// ignore
// TODO add message kind
}
}
} | java | public void dispatch(Event<?> event) {
//eventManagement.dispatch(event);
for (EventListener listener : KReflection.Holder.INSTANCE.listeners) {
try {
listener.handleEvent(event);
} catch (Exception e) {
// ignore
// TODO add message kind
}
}
} | [
"public",
"void",
"dispatch",
"(",
"Event",
"<",
"?",
">",
"event",
")",
"{",
"//eventManagement.dispatch(event);",
"for",
"(",
"EventListener",
"listener",
":",
"KReflection",
".",
"Holder",
".",
"INSTANCE",
".",
"listeners",
")",
"{",
"try",
"{",
"listener",... | Dispatch an event to all listeners.
@param event the event to dispatch | [
"Dispatch",
"an",
"event",
"to",
"all",
"listeners",
"."
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KReflection.java#L257-L267 |
147,764 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/deciders/CachingSolver.java | CachingSolver.isSatisfiable | public boolean isSatisfiable(String input) throws SATSolverException {
Boolean result = solutionsCache.get(input);
if (null == result) {
result = satSolver.isSatisfiable(input);
solutionsCache.put(input, result);
}
return result;
} | java | public boolean isSatisfiable(String input) throws SATSolverException {
Boolean result = solutionsCache.get(input);
if (null == result) {
result = satSolver.isSatisfiable(input);
solutionsCache.put(input, result);
}
return result;
} | [
"public",
"boolean",
"isSatisfiable",
"(",
"String",
"input",
")",
"throws",
"SATSolverException",
"{",
"Boolean",
"result",
"=",
"solutionsCache",
".",
"get",
"(",
"input",
")",
";",
"if",
"(",
"null",
"==",
"result",
")",
"{",
"result",
"=",
"satSolver",
... | Calls the solver and caches the answer.
@param input The String that contains sat problem in DIMACS's format
@return boolean True if the formula is satisfiable, false otherwise
@throws SATSolverException SATSolverException | [
"Calls",
"the",
"solver",
"and",
"caches",
"the",
"answer",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/deciders/CachingSolver.java#L51-L58 |
147,765 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/beans/ExtendedPropertyDescriptor.java | ExtendedPropertyDescriptor.setReadOnly | public ExtendedPropertyDescriptor setReadOnly() {
try {
setWriteMethod(null);
} catch (IntrospectionException e) {
Logger.getLogger(ExtendedPropertyDescriptor.class.getName()).log(Level.SEVERE, null, e);
}
return this;
} | java | public ExtendedPropertyDescriptor setReadOnly() {
try {
setWriteMethod(null);
} catch (IntrospectionException e) {
Logger.getLogger(ExtendedPropertyDescriptor.class.getName()).log(Level.SEVERE, null, e);
}
return this;
} | [
"public",
"ExtendedPropertyDescriptor",
"setReadOnly",
"(",
")",
"{",
"try",
"{",
"setWriteMethod",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"IntrospectionException",
"e",
")",
"{",
"Logger",
".",
"getLogger",
"(",
"ExtendedPropertyDescriptor",
".",
"class",
".... | Force this property to be readonly.
@return this property for chaining calls. | [
"Force",
"this",
"property",
"to",
"be",
"readonly",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/ExtendedPropertyDescriptor.java#L122-L129 |
147,766 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/loop/KWhileLoop.java | KWhileLoop.complete | private void complete(KSplit split, KCall call) {
reset(call.getProcess());
split.split(call);
} | java | private void complete(KSplit split, KCall call) {
reset(call.getProcess());
split.split(call);
} | [
"private",
"void",
"complete",
"(",
"KSplit",
"split",
",",
"KCall",
"call",
")",
"{",
"reset",
"(",
"call",
".",
"getProcess",
"(",
")",
")",
";",
"split",
".",
"split",
"(",
"call",
")",
";",
"}"
] | Called at the end of a KWhileLoop
@param split
@param call
@return void | [
"Called",
"at",
"the",
"end",
"of",
"a",
"KWhileLoop"
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/loop/KWhileLoop.java#L145-L148 |
147,767 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/log/LogEntry.java | LogEntry.end | public void end(String state, String attributes) {
this.end = System.currentTimeMillis();// - epoch;
this.state = state;
this.attributes = attributes;
// System.out.println(this);
} | java | public void end(String state, String attributes) {
this.end = System.currentTimeMillis();// - epoch;
this.state = state;
this.attributes = attributes;
// System.out.println(this);
} | [
"public",
"void",
"end",
"(",
"String",
"state",
",",
"String",
"attributes",
")",
"{",
"this",
".",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"// - epoch;",
"this",
".",
"state",
"=",
"state",
";",
"this",
".",
"attributes",
"=",
... | Called when it is ended
@param state
the final state
@param attributes the attributes | [
"Called",
"when",
"it",
"is",
"ended"
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/log/LogEntry.java#L116-L121 |
147,768 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/util/ResourceManager.java | ResourceManager.get | public static ResourceManager get(String bundleName) {
ResourceManager rm = (ResourceManager) nameToRM.get(bundleName);
if (rm == null) {
ResourceBundle rb = ResourceBundle.getBundle(bundleName);
rm = new ResourceManager(rb);
nameToRM.put(bundleName, rm);
}
... | java | public static ResourceManager get(String bundleName) {
ResourceManager rm = (ResourceManager) nameToRM.get(bundleName);
if (rm == null) {
ResourceBundle rb = ResourceBundle.getBundle(bundleName);
rm = new ResourceManager(rb);
nameToRM.put(bundleName, rm);
}
... | [
"public",
"static",
"ResourceManager",
"get",
"(",
"String",
"bundleName",
")",
"{",
"ResourceManager",
"rm",
"=",
"(",
"ResourceManager",
")",
"nameToRM",
".",
"get",
"(",
"bundleName",
")",
";",
"if",
"(",
"rm",
"==",
"null",
")",
"{",
"ResourceBundle",
... | Gets the ResourceManager with the given name.
@param bundleName
@return the ResourceManager with the given name. | [
"Gets",
"the",
"ResourceManager",
"with",
"the",
"given",
"name",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/util/ResourceManager.java#L61-L69 |
147,769 | opendatatrentino/s-match | src/main/java/it/unitn/disi/common/utils/MiscUtils.java | MiscUtils.configureLog4J | public static void configureLog4J() {
String log4jConf = System.getProperty("log4j.configuration");
if (null != log4jConf) {
PropertyConfigurator.configure(log4jConf);
} else {
System.err.println("No log4j.configuration property specified. Using defaults.");
... | java | public static void configureLog4J() {
String log4jConf = System.getProperty("log4j.configuration");
if (null != log4jConf) {
PropertyConfigurator.configure(log4jConf);
} else {
System.err.println("No log4j.configuration property specified. Using defaults.");
... | [
"public",
"static",
"void",
"configureLog4J",
"(",
")",
"{",
"String",
"log4jConf",
"=",
"System",
".",
"getProperty",
"(",
"\"log4j.configuration\"",
")",
";",
"if",
"(",
"null",
"!=",
"log4jConf",
")",
"{",
"PropertyConfigurator",
".",
"configure",
"(",
"log... | Configures LOG4J using a configuration file given in a log4j.configuration system property. | [
"Configures",
"LOG4J",
"using",
"a",
"configuration",
"file",
"given",
"in",
"a",
"log4j",
".",
"configuration",
"system",
"property",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/MiscUtils.java#L22-L30 |
147,770 | opendatatrentino/s-match | src/main/java/it/unitn/disi/common/utils/MiscUtils.java | MiscUtils.writeObject | public static void writeObject(Object object, String fileName) throws DISIException {
log.info("Writing " + fileName);
try {
FileOutputStream fos = new FileOutputStream(fileName);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(object);
... | java | public static void writeObject(Object object, String fileName) throws DISIException {
log.info("Writing " + fileName);
try {
FileOutputStream fos = new FileOutputStream(fileName);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(object);
... | [
"public",
"static",
"void",
"writeObject",
"(",
"Object",
"object",
",",
"String",
"fileName",
")",
"throws",
"DISIException",
"{",
"log",
".",
"info",
"(",
"\"Writing \"",
"+",
"fileName",
")",
";",
"try",
"{",
"FileOutputStream",
"fos",
"=",
"new",
"FileOu... | Writes Java object to a file.
@param object the object
@param fileName the file where the object will be written
@throws DISIException DISIException | [
"Writes",
"Java",
"object",
"to",
"a",
"file",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/MiscUtils.java#L39-L52 |
147,771 | opendatatrentino/s-match | src/main/java/it/unitn/disi/common/utils/MiscUtils.java | MiscUtils.readObject | public static Object readObject(String fileName, boolean isInternalFile) throws DISIException {
Object result;
try {
InputStream fos = null;
if (isInternalFile == true) {
fos = Thread.currentThread().getContextClassLoader().getResource(fileName).openStream(... | java | public static Object readObject(String fileName, boolean isInternalFile) throws DISIException {
Object result;
try {
InputStream fos = null;
if (isInternalFile == true) {
fos = Thread.currentThread().getContextClassLoader().getResource(fileName).openStream(... | [
"public",
"static",
"Object",
"readObject",
"(",
"String",
"fileName",
",",
"boolean",
"isInternalFile",
")",
"throws",
"DISIException",
"{",
"Object",
"result",
";",
"try",
"{",
"InputStream",
"fos",
"=",
"null",
";",
"if",
"(",
"isInternalFile",
"==",
"true"... | Reads Java object from a file.
@param fileName the file where the object is stored
@parm isInternalFile reads from internal data file in resources folder
@return the object
@throws DISIException DISIException | [
"Reads",
"Java",
"object",
"from",
"a",
"file",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/MiscUtils.java#L62-L95 |
147,772 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.release | public void release() {
parent = null;
firstChild = null;
prevSibling = null;
nextSibling = null;
allowChildren = true;
} | java | public void release() {
parent = null;
firstChild = null;
prevSibling = null;
nextSibling = null;
allowChildren = true;
} | [
"public",
"void",
"release",
"(",
")",
"{",
"parent",
"=",
"null",
";",
"firstChild",
"=",
"null",
";",
"prevSibling",
"=",
"null",
";",
"nextSibling",
"=",
"null",
";",
"allowChildren",
"=",
"true",
";",
"}"
] | Resets all the attributes to their default state. | [
"Resets",
"all",
"the",
"attributes",
"to",
"their",
"default",
"state",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L103-L110 |
147,773 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.addChild | public void addChild(Node node) throws ChildNodeException {
if (node != null) {
if (!allowChildren) {
throw new ChildNodeException();
}
if (getFirstChild() == null) {
setFirstChild(node);
getFirstChild().setPrevSibling(firstChild);
getFirstChild().setNextSibling(fi... | java | public void addChild(Node node) throws ChildNodeException {
if (node != null) {
if (!allowChildren) {
throw new ChildNodeException();
}
if (getFirstChild() == null) {
setFirstChild(node);
getFirstChild().setPrevSibling(firstChild);
getFirstChild().setNextSibling(fi... | [
"public",
"void",
"addChild",
"(",
"Node",
"node",
")",
"throws",
"ChildNodeException",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"allowChildren",
")",
"{",
"throw",
"new",
"ChildNodeException",
"(",
")",
";",
"}",
"if",
"(",
"get... | This function adds a child to the linked-list of children for this node. It adds the child to the end of the list.
@param node Node that is the node to be added as a child of this Node.
@throws ChildNodeException | [
"This",
"function",
"adds",
"a",
"child",
"to",
"the",
"linked",
"-",
"list",
"of",
"children",
"for",
"this",
"node",
".",
"It",
"adds",
"the",
"child",
"to",
"the",
"end",
"of",
"the",
"list",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L205-L224 |
147,774 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.insertSiblingBefore | public void insertSiblingBefore(Node node) throws ChildNodeException {
if (node != null) {
node.setPrevSibling(getPrevSibling());
node.setNextSibling(this);
}
} | java | public void insertSiblingBefore(Node node) throws ChildNodeException {
if (node != null) {
node.setPrevSibling(getPrevSibling());
node.setNextSibling(this);
}
} | [
"public",
"void",
"insertSiblingBefore",
"(",
"Node",
"node",
")",
"throws",
"ChildNodeException",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"node",
".",
"setPrevSibling",
"(",
"getPrevSibling",
"(",
")",
")",
";",
"node",
".",
"setNextSibling",
"(",
... | Inserts a Sibling into the linked list just prior to this Node
@param node Node to be made the prevSibling | [
"Inserts",
"a",
"Sibling",
"into",
"the",
"linked",
"list",
"just",
"prior",
"to",
"this",
"Node"
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L294-L299 |
147,775 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.insertSiblingAfter | public void insertSiblingAfter(Node node) {
if (node != null) {
node.setNextSibling(getNextSibling());
node.setPrevSibling(this);
}
} | java | public void insertSiblingAfter(Node node) {
if (node != null) {
node.setNextSibling(getNextSibling());
node.setPrevSibling(this);
}
} | [
"public",
"void",
"insertSiblingAfter",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"node",
".",
"setNextSibling",
"(",
"getNextSibling",
"(",
")",
")",
";",
"node",
".",
"setPrevSibling",
"(",
"this",
")",
";",
"}",
"}"
] | Adds a Sibling immediately following this Node.
@param node Node to be made the next sibling | [
"Adds",
"a",
"Sibling",
"immediately",
"following",
"this",
"Node",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L306-L311 |
147,776 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.insertParentBefore | public void insertParentBefore(Node node) throws ChildNodeException {
if (node != null) {
if (hasParent()) {
getParentNode().addChild(node);
getParentNode().removeChild(this);
}
node.addChild(this);
}
} | java | public void insertParentBefore(Node node) throws ChildNodeException {
if (node != null) {
if (hasParent()) {
getParentNode().addChild(node);
getParentNode().removeChild(this);
}
node.addChild(this);
}
} | [
"public",
"void",
"insertParentBefore",
"(",
"Node",
"node",
")",
"throws",
"ChildNodeException",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"if",
"(",
"hasParent",
"(",
")",
")",
"{",
"getParentNode",
"(",
")",
".",
"addChild",
"(",
"node",
")",
... | Inserts a new Parent into the tree structure and adds this node as its child.
@param node Node that will become this nodes new Parent. | [
"Inserts",
"a",
"new",
"Parent",
"into",
"the",
"tree",
"structure",
"and",
"adds",
"this",
"node",
"as",
"its",
"child",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L318-L326 |
147,777 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.insertParentAfter | public void insertParentAfter(Node node) throws ChildNodeException {
if (node != null) {
// give this node my children
node.setFirstChild(getFirstChild());
setFirstChild(null); // clear our list
addChild(node); // make our child
}
} | java | public void insertParentAfter(Node node) throws ChildNodeException {
if (node != null) {
// give this node my children
node.setFirstChild(getFirstChild());
setFirstChild(null); // clear our list
addChild(node); // make our child
}
} | [
"public",
"void",
"insertParentAfter",
"(",
"Node",
"node",
")",
"throws",
"ChildNodeException",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"// give this node my children",
"node",
".",
"setFirstChild",
"(",
"getFirstChild",
"(",
")",
")",
";",
"setFirstChi... | Inserts a new Parent Node as a child of this node and moves all pre-existing children to be children of the new
Parent Node.
@param node Node to become a child of this node and parent to all pre-existing children of this node. | [
"Inserts",
"a",
"new",
"Parent",
"Node",
"as",
"a",
"child",
"of",
"this",
"node",
"and",
"moves",
"all",
"pre",
"-",
"existing",
"children",
"to",
"be",
"children",
"of",
"the",
"new",
"Parent",
"Node",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L334-L342 |
147,778 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.removeChild | public boolean removeChild(Node node) throws ChildNodeException {
Node currNode = getFirstChild();
boolean rc = false;
if (!allowChildren) {
throw new ChildNodeException();
}
if (node != null && !isLeaf()) {
// Is this the first and only child
if (node == currNode && node == curr... | java | public boolean removeChild(Node node) throws ChildNodeException {
Node currNode = getFirstChild();
boolean rc = false;
if (!allowChildren) {
throw new ChildNodeException();
}
if (node != null && !isLeaf()) {
// Is this the first and only child
if (node == currNode && node == curr... | [
"public",
"boolean",
"removeChild",
"(",
"Node",
"node",
")",
"throws",
"ChildNodeException",
"{",
"Node",
"currNode",
"=",
"getFirstChild",
"(",
")",
";",
"boolean",
"rc",
"=",
"false",
";",
"if",
"(",
"!",
"allowChildren",
")",
"{",
"throw",
"new",
"Chil... | Searches for an immediate child node and if found removes it from the linked-list of children.
@param node Node to be searched for and removed if found. | [
"Searches",
"for",
"an",
"immediate",
"child",
"node",
"and",
"if",
"found",
"removes",
"it",
"from",
"the",
"linked",
"-",
"list",
"of",
"children",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L349-L387 |
147,779 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/Node.java | Node.removeChildNode | public void removeChildNode() throws ChildNodeException {
Node parentLast;
Node thisLast;
// Add this nodes children to the end of the Parents children list
if (!isLeaf() && hasParent()) {
parentLast = getParentNode().getFirstChild().getPrevSibling();
thisLast = getFirstChild().getPrevSibli... | java | public void removeChildNode() throws ChildNodeException {
Node parentLast;
Node thisLast;
// Add this nodes children to the end of the Parents children list
if (!isLeaf() && hasParent()) {
parentLast = getParentNode().getFirstChild().getPrevSibling();
thisLast = getFirstChild().getPrevSibli... | [
"public",
"void",
"removeChildNode",
"(",
")",
"throws",
"ChildNodeException",
"{",
"Node",
"parentLast",
";",
"Node",
"thisLast",
";",
"// Add this nodes children to the end of the Parents children list",
"if",
"(",
"!",
"isLeaf",
"(",
")",
"&&",
"hasParent",
"(",
")... | Remove just this node from the tree. The children of this node get attached to the parent. | [
"Remove",
"just",
"this",
"node",
"from",
"the",
"tree",
".",
"The",
"children",
"of",
"this",
"node",
"get",
"attached",
"to",
"the",
"parent",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/Node.java#L392-L410 |
147,780 | mlhartme/sushi | src/main/java/net/oneandone/sushi/fs/file/FileNode.java | FileNode.getPath | @Override
public String getPath() {
String result;
result = path.toString().substring(getRoot().getAbsolute().length());
return result.replace(File.separatorChar, Filesystem.SEPARATOR_CHAR);
} | java | @Override
public String getPath() {
String result;
result = path.toString().substring(getRoot().getAbsolute().length());
return result.replace(File.separatorChar, Filesystem.SEPARATOR_CHAR);
} | [
"@",
"Override",
"public",
"String",
"getPath",
"(",
")",
"{",
"String",
"result",
";",
"result",
"=",
"path",
".",
"toString",
"(",
")",
".",
"substring",
"(",
"getRoot",
"(",
")",
".",
"getAbsolute",
"(",
")",
".",
"length",
"(",
")",
")",
";",
"... | does not include the drive on windows | [
"does",
"not",
"include",
"the",
"drive",
"on",
"windows"
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/file/FileNode.java#L109-L115 |
147,781 | mlhartme/sushi | src/main/java/net/oneandone/sushi/fs/file/FileNode.java | FileNode.deleteTree | @Override
public FileNode deleteTree() throws DeleteException, NodeNotFoundException {
if (!exists()) {
throw new NodeNotFoundException(this);
}
try {
doDeleteTree(path);
} catch (IOException e) {
throw new DeleteException(this, e);
}
... | java | @Override
public FileNode deleteTree() throws DeleteException, NodeNotFoundException {
if (!exists()) {
throw new NodeNotFoundException(this);
}
try {
doDeleteTree(path);
} catch (IOException e) {
throw new DeleteException(this, e);
}
... | [
"@",
"Override",
"public",
"FileNode",
"deleteTree",
"(",
")",
"throws",
"DeleteException",
",",
"NodeNotFoundException",
"{",
"if",
"(",
"!",
"exists",
"(",
")",
")",
"{",
"throw",
"new",
"NodeNotFoundException",
"(",
"this",
")",
";",
"}",
"try",
"{",
"d... | Deletes a file or directory. Directories are deleted recursively. Handles Links. | [
"Deletes",
"a",
"file",
"or",
"directory",
".",
"Directories",
"are",
"deleted",
"recursively",
".",
"Handles",
"Links",
"."
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/file/FileNode.java#L411-L422 |
147,782 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java | ChangesAnalyzer.analyze | public void analyze() {
for (String key : importSource.getKeys()) {
Change change = createChange(key);
setConflictAttributes(change);
if (change.getType() != Change.TYPE_NO_CHANGE) {
if (change.isConflicting()) {
conflictingChanges.add(change);
} else {
nonConf... | java | public void analyze() {
for (String key : importSource.getKeys()) {
Change change = createChange(key);
setConflictAttributes(change);
if (change.getType() != Change.TYPE_NO_CHANGE) {
if (change.isConflicting()) {
conflictingChanges.add(change);
} else {
nonConf... | [
"public",
"void",
"analyze",
"(",
")",
"{",
"for",
"(",
"String",
"key",
":",
"importSource",
".",
"getKeys",
"(",
")",
")",
"{",
"Change",
"change",
"=",
"createChange",
"(",
"key",
")",
";",
"setConflictAttributes",
"(",
"change",
")",
";",
"if",
"("... | Determines the changes between the import source and the database
and classifies them as conflicting and non-conflicting. | [
"Determines",
"the",
"changes",
"between",
"the",
"import",
"source",
"and",
"the",
"database",
"and",
"classifies",
"them",
"as",
"conflicting",
"and",
"non",
"-",
"conflicting",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java#L68-L81 |
147,783 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java | ChangesAnalyzer.setConflictAttributes | protected void setConflictAttributes(Change change) throws IllegalArgumentException {
// default values
change.setAcceptStatus(change.getImportedStatus());
change.setAcceptValue(change.getImportedValue());
if (useMasterValueFromFile) {
change.setAcceptMasterValue(change.getImportedMasterValue());
... | java | protected void setConflictAttributes(Change change) throws IllegalArgumentException {
// default values
change.setAcceptStatus(change.getImportedStatus());
change.setAcceptValue(change.getImportedValue());
if (useMasterValueFromFile) {
change.setAcceptMasterValue(change.getImportedMasterValue());
... | [
"protected",
"void",
"setConflictAttributes",
"(",
"Change",
"change",
")",
"throws",
"IllegalArgumentException",
"{",
"// default values",
"change",
".",
"setAcceptStatus",
"(",
"change",
".",
"getImportedStatus",
"(",
")",
")",
";",
"change",
".",
"setAcceptValue",
... | Determines whether a change is conflicting, acceptable and to be
accepted and sets the values to be accepted. This routine is
the only one dealing with the mentioned conflict attributes. It
may be overridden to change the conflict specification.
@param change the change to be analyzed
@throws IllegalArgumentException i... | [
"Determines",
"whether",
"a",
"change",
"is",
"conflicting",
"acceptable",
"and",
"to",
"be",
"accepted",
"and",
"sets",
"the",
"values",
"to",
"be",
"accepted",
".",
"This",
"routine",
"is",
"the",
"only",
"one",
"dealing",
"with",
"the",
"mentioned",
"conf... | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java#L200-L277 |
147,784 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.setupModelSpecification | private void setupModelSpecification(Map<String, String> locationMappings, Set<String> ignoredImports) {
OntDocumentManager documentManager = new OntDocumentManager();
// Add mapping specific to OWLS TC 4 tests.
// Add mappings to local files to save time and avoid connection issues
fo... | java | private void setupModelSpecification(Map<String, String> locationMappings, Set<String> ignoredImports) {
OntDocumentManager documentManager = new OntDocumentManager();
// Add mapping specific to OWLS TC 4 tests.
// Add mappings to local files to save time and avoid connection issues
fo... | [
"private",
"void",
"setupModelSpecification",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"locationMappings",
",",
"Set",
"<",
"String",
">",
"ignoredImports",
")",
"{",
"OntDocumentManager",
"documentManager",
"=",
"new",
"OntDocumentManager",
"(",
")",
";",
... | Setup a the OntModelSpec to be used when parsing services.
In particular, setup import redirections, etc.
@param locationMappings
@param ignoredImports
@return | [
"Setup",
"a",
"the",
"OntModelSpec",
"to",
"be",
"used",
"when",
"parsing",
"services",
".",
"In",
"particular",
"setup",
"import",
"redirections",
"etc",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L166-L191 |
147,785 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.shutdown | @Override
public void shutdown() {
log.info("Shutting down Ontology crawlers.");
this.executor.shutdown(); // Disable new tasks from being submitted
try {
// Wait a while for existing tasks to terminate
if (!this.executor.awaitTermination(5, TimeUnit.SECONDS)) {
... | java | @Override
public void shutdown() {
log.info("Shutting down Ontology crawlers.");
this.executor.shutdown(); // Disable new tasks from being submitted
try {
// Wait a while for existing tasks to terminate
if (!this.executor.awaitTermination(5, TimeUnit.SECONDS)) {
... | [
"@",
"Override",
"public",
"void",
"shutdown",
"(",
")",
"{",
"log",
".",
"info",
"(",
"\"Shutting down Ontology crawlers.\"",
")",
";",
"this",
".",
"executor",
".",
"shutdown",
"(",
")",
";",
"// Disable new tasks from being submitted",
"try",
"{",
"// Wait a wh... | This method will be called when the server is being shutdown.
Ensure a clean shutdown. | [
"This",
"method",
"will",
"be",
"called",
"when",
"the",
"server",
"is",
"being",
"shutdown",
".",
"Ensure",
"a",
"clean",
"shutdown",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L206-L224 |
147,786 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.addModelToGraph | @Override
public void addModelToGraph(URI graphUri, Model data) {
if (graphUri == null || data == null)
return;
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
datasetAccessor.add(graphUri.toASCIIString(), data);
} else {
... | java | @Override
public void addModelToGraph(URI graphUri, Model data) {
if (graphUri == null || data == null)
return;
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
datasetAccessor.add(graphUri.toASCIIString(), data);
} else {
... | [
"@",
"Override",
"public",
"void",
"addModelToGraph",
"(",
"URI",
"graphUri",
",",
"Model",
"data",
")",
"{",
"if",
"(",
"graphUri",
"==",
"null",
"||",
"data",
"==",
"null",
")",
"return",
";",
"// Use HTTP protocol if possible",
"if",
"(",
"this",
".",
"... | Add statements to a named model
@param graphUri
@param data | [
"Add",
"statements",
"to",
"a",
"named",
"model"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L301-L312 |
147,787 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.deleteGraph | @Override
public void deleteGraph(URI graphUri) {
if (graphUri == null || !this.canBeModified())
return;
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
this.datasetAccessor.deleteModel(graphUri.toASCIIString());
} else {
... | java | @Override
public void deleteGraph(URI graphUri) {
if (graphUri == null || !this.canBeModified())
return;
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
this.datasetAccessor.deleteModel(graphUri.toASCIIString());
} else {
... | [
"@",
"Override",
"public",
"void",
"deleteGraph",
"(",
"URI",
"graphUri",
")",
"{",
"if",
"(",
"graphUri",
"==",
"null",
"||",
"!",
"this",
".",
"canBeModified",
"(",
")",
")",
"return",
";",
"// Use HTTP protocol if possible",
"if",
"(",
"this",
".",
"spa... | Delete a named model of a Dataset
@param graphUri | [
"Delete",
"a",
"named",
"model",
"of",
"a",
"Dataset"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L352-L366 |
147,788 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.deleteGraphSparqlUpdate | private void deleteGraphSparqlUpdate(URI graphUri) {
UpdateRequest request = UpdateFactory.create();
request.setPrefixMapping(PrefixMapping.Factory.create().setNsPrefixes(Vocabularies.prefixes));
request.add(new UpdateDrop(graphUri.toASCIIString()));
// Use create form for Sesame-based ... | java | private void deleteGraphSparqlUpdate(URI graphUri) {
UpdateRequest request = UpdateFactory.create();
request.setPrefixMapping(PrefixMapping.Factory.create().setNsPrefixes(Vocabularies.prefixes));
request.add(new UpdateDrop(graphUri.toASCIIString()));
// Use create form for Sesame-based ... | [
"private",
"void",
"deleteGraphSparqlUpdate",
"(",
"URI",
"graphUri",
")",
"{",
"UpdateRequest",
"request",
"=",
"UpdateFactory",
".",
"create",
"(",
")",
";",
"request",
".",
"setPrefixMapping",
"(",
"PrefixMapping",
".",
"Factory",
".",
"create",
"(",
")",
"... | Delete Graph using SPARQL Update
@param graphUri | [
"Delete",
"Graph",
"using",
"SPARQL",
"Update"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L373-L381 |
147,789 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.getGraph | protected OntModel getGraph() {
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
return ModelFactory.createOntologyModel(this.modelSpec, datasetAccessor.getModel());
} else {
return this.getGraphSparqlQuery();
}
} | java | protected OntModel getGraph() {
// Use HTTP protocol if possible
if (this.sparqlServiceEndpoint != null) {
return ModelFactory.createOntologyModel(this.modelSpec, datasetAccessor.getModel());
} else {
return this.getGraphSparqlQuery();
}
} | [
"protected",
"OntModel",
"getGraph",
"(",
")",
"{",
"// Use HTTP protocol if possible",
"if",
"(",
"this",
".",
"sparqlServiceEndpoint",
"!=",
"null",
")",
"{",
"return",
"ModelFactory",
".",
"createOntologyModel",
"(",
"this",
".",
"modelSpec",
",",
"datasetAccesso... | Gets the default model of a Dataset
@return | [
"Gets",
"the",
"default",
"model",
"of",
"a",
"Dataset"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L388-L396 |
147,790 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.getGraph | @Override
public OntModel getGraph(URI graphUri) {
log.debug("Obtaining graph: {}", graphUri.toASCIIString());
if (graphUri == null)
return null;
// FIXME: For now Jena and Sesame can't talk to each other
// Jena will ignore a named graph as the output.
// Use H... | java | @Override
public OntModel getGraph(URI graphUri) {
log.debug("Obtaining graph: {}", graphUri.toASCIIString());
if (graphUri == null)
return null;
// FIXME: For now Jena and Sesame can't talk to each other
// Jena will ignore a named graph as the output.
// Use H... | [
"@",
"Override",
"public",
"OntModel",
"getGraph",
"(",
"URI",
"graphUri",
")",
"{",
"log",
".",
"debug",
"(",
"\"Obtaining graph: {}\"",
",",
"graphUri",
".",
"toASCIIString",
"(",
")",
")",
";",
"if",
"(",
"graphUri",
"==",
"null",
")",
"return",
"null",... | Get a named model of a Dataset
@param graphUri
@return the Ontology Model | [
"Get",
"a",
"named",
"model",
"of",
"a",
"Dataset"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L409-L426 |
147,791 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.getGraphSparqlQuery | private OntModel getGraphSparqlQuery(URI graphUri) {
StringBuilder queryStr = new StringBuilder("CONSTRUCT { ?s ?p ?o } \n")
.append("WHERE {\n");
// Add named graph if necessary
if (graphUri != null) {
queryStr.append("GRAPH <").append(graphUri.toASCIIString()).app... | java | private OntModel getGraphSparqlQuery(URI graphUri) {
StringBuilder queryStr = new StringBuilder("CONSTRUCT { ?s ?p ?o } \n")
.append("WHERE {\n");
// Add named graph if necessary
if (graphUri != null) {
queryStr.append("GRAPH <").append(graphUri.toASCIIString()).app... | [
"private",
"OntModel",
"getGraphSparqlQuery",
"(",
"URI",
"graphUri",
")",
"{",
"StringBuilder",
"queryStr",
"=",
"new",
"StringBuilder",
"(",
"\"CONSTRUCT { ?s ?p ?o } \\n\"",
")",
".",
"append",
"(",
"\"WHERE {\\n\"",
")",
";",
"// Add named graph if necessary",
"if",... | Obtains the OntModel within a named graph or the default graph if no graphUri is provided
@param graphUri
@return | [
"Obtains",
"the",
"OntModel",
"within",
"a",
"named",
"graph",
"or",
"the",
"default",
"graph",
"if",
"no",
"graphUri",
"is",
"provided"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L489-L514 |
147,792 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java | ConcurrentSparqlGraphStoreManager.listStoredGraphs | @Override
public Set<URI> listStoredGraphs() {
StringBuilder strBuilder = new StringBuilder()
.append("SELECT DISTINCT ?graph WHERE {").append("\n")
.append("GRAPH ?graph {").append("?s ?p ?o").append(" }").append("\n")
.append("}").append("\n");
ret... | java | @Override
public Set<URI> listStoredGraphs() {
StringBuilder strBuilder = new StringBuilder()
.append("SELECT DISTINCT ?graph WHERE {").append("\n")
.append("GRAPH ?graph {").append("?s ?p ?o").append(" }").append("\n")
.append("}").append("\n");
ret... | [
"@",
"Override",
"public",
"Set",
"<",
"URI",
">",
"listStoredGraphs",
"(",
")",
"{",
"StringBuilder",
"strBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"\"SELECT DISTINCT ?graph WHERE {\"",
")",
".",
"append",
"(",
"\"\\n\"",
")",
".",
... | Figure out the models that are already in the Knowledge Base
@return the Set of URIs of the models loaded | [
"Figure",
"out",
"the",
"models",
"that",
"are",
"already",
"in",
"the",
"Knowledge",
"Base"
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L624-L633 |
147,793 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/UnknownFieldSet.java | UnknownFieldSet.getSerializedSize | public int getSerializedSize() {
int result = 0;
for (final Map.Entry<Integer, Field> entry : fields.entrySet()) {
result += entry.getValue().getSerializedSize(entry.getKey());
}
return result;
} | java | public int getSerializedSize() {
int result = 0;
for (final Map.Entry<Integer, Field> entry : fields.entrySet()) {
result += entry.getValue().getSerializedSize(entry.getKey());
}
return result;
} | [
"public",
"int",
"getSerializedSize",
"(",
")",
"{",
"int",
"result",
"=",
"0",
";",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"Integer",
",",
"Field",
">",
"entry",
":",
"fields",
".",
"entrySet",
"(",
")",
")",
"{",
"result",
"+=",
"entry",
... | Get the number of bytes required to encode this set. | [
"Get",
"the",
"number",
"of",
"bytes",
"required",
"to",
"encode",
"this",
"set",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/UnknownFieldSet.java#L197-L203 |
147,794 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java | AbstractJsonArray.add | public void add(V value) {
values.add(value);
if (value instanceof JsonEntity) {
((JsonEntity)value).addPropertyChangeListener(propListener);
}
firePropertyChange("#" + (values.size() - 1), null, value);
} | java | public void add(V value) {
values.add(value);
if (value instanceof JsonEntity) {
((JsonEntity)value).addPropertyChangeListener(propListener);
}
firePropertyChange("#" + (values.size() - 1), null, value);
} | [
"public",
"void",
"add",
"(",
"V",
"value",
")",
"{",
"values",
".",
"add",
"(",
"value",
")",
";",
"if",
"(",
"value",
"instanceof",
"JsonEntity",
")",
"{",
"(",
"(",
"JsonEntity",
")",
"value",
")",
".",
"addPropertyChangeListener",
"(",
"propListener"... | Adds a value to the receiver's collection
@param value the new value | [
"Adds",
"a",
"value",
"to",
"the",
"receiver",
"s",
"collection"
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java#L89-L97 |
147,795 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java | AbstractJsonArray.remove | public void remove(V value) {
int index = values.indexOf(value);
values.remove(value);
if (value instanceof JsonEntity) {
((JsonEntity)value).removePropertyChangeListener(propListener);
}
firePropertyChange("#" + index, value, null);
} | java | public void remove(V value) {
int index = values.indexOf(value);
values.remove(value);
if (value instanceof JsonEntity) {
((JsonEntity)value).removePropertyChangeListener(propListener);
}
firePropertyChange("#" + index, value, null);
} | [
"public",
"void",
"remove",
"(",
"V",
"value",
")",
"{",
"int",
"index",
"=",
"values",
".",
"indexOf",
"(",
"value",
")",
";",
"values",
".",
"remove",
"(",
"value",
")",
";",
"if",
"(",
"value",
"instanceof",
"JsonEntity",
")",
"{",
"(",
"(",
"Js... | Removes a value from the receiver's collection
@param value the value to remove | [
"Removes",
"a",
"value",
"from",
"the",
"receiver",
"s",
"collection"
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java#L104-L113 |
147,796 | pulse00/Composer-Java-Bindings | java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java | AbstractJsonArray.replace | public void replace(V oldValue, V newValue) {
if (values.contains(oldValue)) {
int index = values.indexOf(oldValue);
values.remove(oldValue);
values.add(index, newValue);
if (oldValue instanceof JsonEntity) {
((JsonEntity)oldValue).removePropertyChangeListener(propListener);
}
if (newVal... | java | public void replace(V oldValue, V newValue) {
if (values.contains(oldValue)) {
int index = values.indexOf(oldValue);
values.remove(oldValue);
values.add(index, newValue);
if (oldValue instanceof JsonEntity) {
((JsonEntity)oldValue).removePropertyChangeListener(propListener);
}
if (newVal... | [
"public",
"void",
"replace",
"(",
"V",
"oldValue",
",",
"V",
"newValue",
")",
"{",
"if",
"(",
"values",
".",
"contains",
"(",
"oldValue",
")",
")",
"{",
"int",
"index",
"=",
"values",
".",
"indexOf",
"(",
"oldValue",
")",
";",
"values",
".",
"remove"... | If oldValue exists, replaces with newValue
@param oldValue
@param newValue | [
"If",
"oldValue",
"exists",
"replaces",
"with",
"newValue"
] | 0aa572567db37d047a41a57c32ede7c7fd5d4938 | https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/entities/AbstractJsonArray.java#L121-L137 |
147,797 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/XMLDatabase.java | XMLDatabase.init | private void init() {
masterLanguage = null;
additionalRootAttrs.clear();
// the collection is not modifiable and therefore cannot be cleared.
additionalNamespaces = new ArrayList<>();
textNodeList.clear();
parseWarnings.clear();
} | java | private void init() {
masterLanguage = null;
additionalRootAttrs.clear();
// the collection is not modifiable and therefore cannot be cleared.
additionalNamespaces = new ArrayList<>();
textNodeList.clear();
parseWarnings.clear();
} | [
"private",
"void",
"init",
"(",
")",
"{",
"masterLanguage",
"=",
"null",
";",
"additionalRootAttrs",
".",
"clear",
"(",
")",
";",
"// the collection is not modifiable and therefore cannot be cleared.",
"additionalNamespaces",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
"... | Reinitializes the instance variables for a new build. | [
"Reinitializes",
"the",
"instance",
"variables",
"for",
"a",
"new",
"build",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/XMLDatabase.java#L169-L176 |
147,798 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/XMLDatabase.java | XMLDatabase.writeXML | public void writeXML(OutputStream outputStream, String encoding, String indent, String lineSeparator)
throws IOException {
XMLOutputter outputter = new XMLOutputter();
Format format = Format.getPrettyFormat();
format.setEncoding(encoding);
format.setIndent(indent);
format.setLineSeparator(lineSepa... | java | public void writeXML(OutputStream outputStream, String encoding, String indent, String lineSeparator)
throws IOException {
XMLOutputter outputter = new XMLOutputter();
Format format = Format.getPrettyFormat();
format.setEncoding(encoding);
format.setIndent(indent);
format.setLineSeparator(lineSepa... | [
"public",
"void",
"writeXML",
"(",
"OutputStream",
"outputStream",
",",
"String",
"encoding",
",",
"String",
"indent",
",",
"String",
"lineSeparator",
")",
"throws",
"IOException",
"{",
"XMLOutputter",
"outputter",
"=",
"new",
"XMLOutputter",
"(",
")",
";",
"For... | Serializes the database to the output stream.
@param outputStream the output
@param encoding the encoding to use
@param indent the indent
@param lineSeparator the lineSeparator
@throws IOException in case the xml could not be written | [
"Serializes",
"the",
"database",
"to",
"the",
"output",
"stream",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/XMLDatabase.java#L281-L290 |
147,799 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/XMLDatabase.java | XMLDatabase.getTextNode | @Override
public ITextNode getTextNode(String key) {
for (ITextNode node : textNodeList) {
if (key.equals(node.getKey())) {
return node;
}
}
return null;
} | java | @Override
public ITextNode getTextNode(String key) {
for (ITextNode node : textNodeList) {
if (key.equals(node.getKey())) {
return node;
}
}
return null;
} | [
"@",
"Override",
"public",
"ITextNode",
"getTextNode",
"(",
"String",
"key",
")",
"{",
"for",
"(",
"ITextNode",
"node",
":",
"textNodeList",
")",
"{",
"if",
"(",
"key",
".",
"equals",
"(",
"node",
".",
"getKey",
"(",
")",
")",
")",
"{",
"return",
"no... | Gets the text node for a given key.
@param key the key of the text node to get
@return the text node for the given key or <code>null</code> if
no text node exists for the given key. | [
"Gets",
"the",
"text",
"node",
"for",
"a",
"given",
"key",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/XMLDatabase.java#L380-L388 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.