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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
146,100 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Encoder.java | MG2Encoder.setupGrid | public Grid setupGrid(float[] vertices) {
int vc = vertices.length / 3;
//CTM_POSITION_ELEMENT_COUNT == 3
// Calculate the mesh boundinggrid. box
float[] min = new float[3];
float[] max = new float[3];
int[] division = new int[3];
for (int i = 0; i < 3; ++i) {
... | java | public Grid setupGrid(float[] vertices) {
int vc = vertices.length / 3;
//CTM_POSITION_ELEMENT_COUNT == 3
// Calculate the mesh boundinggrid. box
float[] min = new float[3];
float[] max = new float[3];
int[] division = new int[3];
for (int i = 0; i < 3; ++i) {
... | [
"public",
"Grid",
"setupGrid",
"(",
"float",
"[",
"]",
"vertices",
")",
"{",
"int",
"vc",
"=",
"vertices",
".",
"length",
"/",
"3",
";",
"//CTM_POSITION_ELEMENT_COUNT == 3",
"// Calculate the mesh boundinggrid. box",
"float",
"[",
"]",
"min",
"=",
"new",
"float"... | Setup the 3D space subdivision grid.
@param vertices vertex data
@return calculated grid definition | [
"Setup",
"the",
"3D",
"space",
"subdivision",
"grid",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Encoder.java#L138-L189 |
146,101 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Encoder.java | MG2Encoder.pointToGridIdx | private int pointToGridIdx(Grid grid, float x, float y, float z) {
Vec3f size = grid.getSize();
int idx = calcIndex(x, size.getX(), grid.getMin().getX(), grid.getDivision().getX());
int idy = calcIndex(y, size.getY(), grid.getMin().getY(), grid.getDivision().getY());
int idz = calcIndex... | java | private int pointToGridIdx(Grid grid, float x, float y, float z) {
Vec3f size = grid.getSize();
int idx = calcIndex(x, size.getX(), grid.getMin().getX(), grid.getDivision().getX());
int idy = calcIndex(y, size.getY(), grid.getMin().getY(), grid.getDivision().getY());
int idz = calcIndex... | [
"private",
"int",
"pointToGridIdx",
"(",
"Grid",
"grid",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"Vec3f",
"size",
"=",
"grid",
".",
"getSize",
"(",
")",
";",
"int",
"idx",
"=",
"calcIndex",
"(",
"x",
",",
"size",
".",
"... | Convert a point to a grid index.
@param grid grid definition
@return grid index of point | [
"Convert",
"a",
"point",
"to",
"a",
"grid",
"index",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Encoder.java#L197-L205 |
146,102 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Encoder.java | MG2Encoder.reIndexIndices | private int[] reIndexIndices(SortableVertex[] sortVertices, int[] indices) {
// Create temporary lookup-array, O(n)
int[] indexLUT = new int[sortVertices.length];
int[] newIndices = new int[indices.length];
for (int i = 0; i < sortVertices.length; ++i) {
indexLUT[sortVertice... | java | private int[] reIndexIndices(SortableVertex[] sortVertices, int[] indices) {
// Create temporary lookup-array, O(n)
int[] indexLUT = new int[sortVertices.length];
int[] newIndices = new int[indices.length];
for (int i = 0; i < sortVertices.length; ++i) {
indexLUT[sortVertice... | [
"private",
"int",
"[",
"]",
"reIndexIndices",
"(",
"SortableVertex",
"[",
"]",
"sortVertices",
",",
"int",
"[",
"]",
"indices",
")",
"{",
"// Create temporary lookup-array, O(n)",
"int",
"[",
"]",
"indexLUT",
"=",
"new",
"int",
"[",
"sortVertices",
".",
"lengt... | Re-index all indices, based on the sorted vertices.
@param sortVertices sorted vertices
@param indices original indices
@return reordered indices | [
"Re",
"-",
"index",
"all",
"indices",
"based",
"on",
"the",
"sorted",
"vertices",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Encoder.java#L238-L254 |
146,103 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/StatisticalDocumentClassifier.java | StatisticalDocumentClassifier.classify | public String classify(final String[] document) {
double[] outcomes = docClassifier.classifyProb(document);
String category = docClassifier.getBestLabel(outcomes);
return category;
} | java | public String classify(final String[] document) {
double[] outcomes = docClassifier.classifyProb(document);
String category = docClassifier.getBestLabel(outcomes);
return category;
} | [
"public",
"String",
"classify",
"(",
"final",
"String",
"[",
"]",
"document",
")",
"{",
"double",
"[",
"]",
"outcomes",
"=",
"docClassifier",
".",
"classifyProb",
"(",
"document",
")",
";",
"String",
"category",
"=",
"docClassifier",
".",
"getBestLabel",
"("... | Classifies the given text, provided in separate tokens.
@param document the tokens of text to classify
@return the best label found | [
"Classifies",
"the",
"given",
"text",
"provided",
"in",
"separate",
"tokens",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/StatisticalDocumentClassifier.java#L37-L41 |
146,104 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/StatisticalDocumentClassifier.java | StatisticalDocumentClassifier.classifySortedScoreMap | public SortedMap<Double, Set<String>> classifySortedScoreMap(final String[] document) {
return docClassifier.sortedScoreMap(document);
} | java | public SortedMap<Double, Set<String>> classifySortedScoreMap(final String[] document) {
return docClassifier.sortedScoreMap(document);
} | [
"public",
"SortedMap",
"<",
"Double",
",",
"Set",
"<",
"String",
">",
">",
"classifySortedScoreMap",
"(",
"final",
"String",
"[",
"]",
"document",
")",
"{",
"return",
"docClassifier",
".",
"sortedScoreMap",
"(",
"document",
")",
";",
"}"
] | Get a map of the scores sorted in ascending order together with their associated labels.
Many labels can have the same score, hence the Set as value.
@param document the input text to classify
@return a map with the score as a key. The value is a Set of labels with their score. | [
"Get",
"a",
"map",
"of",
"the",
"scores",
"sorted",
"in",
"ascending",
"order",
"together",
"with",
"their",
"associated",
"labels",
".",
"Many",
"labels",
"can",
"have",
"the",
"same",
"score",
"hence",
"the",
"Set",
"as",
"value",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/StatisticalDocumentClassifier.java#L59-L61 |
146,105 | geomajas/geomajas-project-client-gwt2 | plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java | AbstractGeometryIndexController.getLocationWithinMaxBounds | public Coordinate getLocationWithinMaxBounds(HumanInputEvent<?> event) {
Coordinate location = getLocation(event, RenderSpace.WORLD);
location = getLocationWithinMaxBounds(location);
return location;
} | java | public Coordinate getLocationWithinMaxBounds(HumanInputEvent<?> event) {
Coordinate location = getLocation(event, RenderSpace.WORLD);
location = getLocationWithinMaxBounds(location);
return location;
} | [
"public",
"Coordinate",
"getLocationWithinMaxBounds",
"(",
"HumanInputEvent",
"<",
"?",
">",
"event",
")",
"{",
"Coordinate",
"location",
"=",
"getLocation",
"(",
"event",
",",
"RenderSpace",
".",
"WORLD",
")",
";",
"location",
"=",
"getLocationWithinMaxBounds",
"... | Get the real world location of the event, while making sure it is within the maximum bounds. If no maximum bounds
have been set, the original event location in world space is returned.
@param event
The event to extract the location from.
@return The location within maximum bounds. | [
"Get",
"the",
"real",
"world",
"location",
"of",
"the",
"event",
"while",
"making",
"sure",
"it",
"is",
"within",
"the",
"maximum",
"bounds",
".",
"If",
"no",
"maximum",
"bounds",
"have",
"been",
"set",
"the",
"original",
"event",
"location",
"in",
"world"... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java#L73-L77 |
146,106 | geomajas/geomajas-project-client-gwt2 | plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java | AbstractGeometryIndexController.getSnappedLocationWithinMaxBounds | public Coordinate getSnappedLocationWithinMaxBounds(HumanInputEvent<?> event) {
Coordinate location = getLocation(event, RenderSpace.WORLD);
location = getLocationWithinMaxBounds(location);
if (snappingEnabled) {
location = snappingService.snap(location);
}
return location;
} | java | public Coordinate getSnappedLocationWithinMaxBounds(HumanInputEvent<?> event) {
Coordinate location = getLocation(event, RenderSpace.WORLD);
location = getLocationWithinMaxBounds(location);
if (snappingEnabled) {
location = snappingService.snap(location);
}
return location;
} | [
"public",
"Coordinate",
"getSnappedLocationWithinMaxBounds",
"(",
"HumanInputEvent",
"<",
"?",
">",
"event",
")",
"{",
"Coordinate",
"location",
"=",
"getLocation",
"(",
"event",
",",
"RenderSpace",
".",
"WORLD",
")",
";",
"location",
"=",
"getLocationWithinMaxBound... | Get the snapped real world location of the event, while making sure it is within the maximum bounds. If no
maximum bounds have been set, the snapped location of the event in world space is returned.
@param event
The event to extract the location from.
@return The location within maximum bounds. | [
"Get",
"the",
"snapped",
"real",
"world",
"location",
"of",
"the",
"event",
"while",
"making",
"sure",
"it",
"is",
"within",
"the",
"maximum",
"bounds",
".",
"If",
"no",
"maximum",
"bounds",
"have",
"been",
"set",
"the",
"snapped",
"location",
"of",
"the",... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java#L87-L94 |
146,107 | geomajas/geomajas-project-client-gwt2 | plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java | AbstractGeometryIndexController.getLocationWithinMaxBounds | private Coordinate getLocationWithinMaxBounds(Coordinate original) {
double x = original.getX();
double y = original.getY();
if (maxBounds != null) {
if (original.getX() < maxBounds.getX()) {
x = maxBounds.getX();
} else if (original.getX() > maxBounds.getMaxX()) {
x = maxBounds.getMaxX();
}
i... | java | private Coordinate getLocationWithinMaxBounds(Coordinate original) {
double x = original.getX();
double y = original.getY();
if (maxBounds != null) {
if (original.getX() < maxBounds.getX()) {
x = maxBounds.getX();
} else if (original.getX() > maxBounds.getMaxX()) {
x = maxBounds.getMaxX();
}
i... | [
"private",
"Coordinate",
"getLocationWithinMaxBounds",
"(",
"Coordinate",
"original",
")",
"{",
"double",
"x",
"=",
"original",
".",
"getX",
"(",
")",
";",
"double",
"y",
"=",
"original",
".",
"getY",
"(",
")",
";",
"if",
"(",
"maxBounds",
"!=",
"null",
... | Get a location, derived from the original, that is sure to be within the maximum bounds. If no maximum bounds
have been set, a clone of the original is returned.
@param original
The original location.
@return The derived location within the maximum bounds. | [
"Get",
"a",
"location",
"derived",
"from",
"the",
"original",
"that",
"is",
"sure",
"to",
"be",
"within",
"the",
"maximum",
"bounds",
".",
"If",
"no",
"maximum",
"bounds",
"have",
"been",
"set",
"a",
"clone",
"of",
"the",
"original",
"is",
"returned",
".... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/controller/AbstractGeometryIndexController.java#L151-L167 |
146,108 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handleOption | private void handleOption(Option option) {
if (LIST_CACHE_OPTION.equals(option.getOpt())) {
handleListCache();
} else if (CACHE_RESOURCE_OPTION.equals(option.getOpt())) {
handleLoadResource(option);
} else if (CACHE_SYSCONFIG_FILE_OPTION.equals(option.getOpt())) {
... | java | private void handleOption(Option option) {
if (LIST_CACHE_OPTION.equals(option.getOpt())) {
handleListCache();
} else if (CACHE_RESOURCE_OPTION.equals(option.getOpt())) {
handleLoadResource(option);
} else if (CACHE_SYSCONFIG_FILE_OPTION.equals(option.getOpt())) {
... | [
"private",
"void",
"handleOption",
"(",
"Option",
"option",
")",
"{",
"if",
"(",
"LIST_CACHE_OPTION",
".",
"equals",
"(",
"option",
".",
"getOpt",
"(",
")",
")",
")",
"{",
"handleListCache",
"(",
")",
";",
"}",
"else",
"if",
"(",
"CACHE_RESOURCE_OPTION",
... | Handle the cli option that was provided.
@param option {@link Option} the current option to handle | [
"Handle",
"the",
"cli",
"option",
"that",
"was",
"provided",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L173-L187 |
146,109 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handleListCache | protected void handleListCache() {
reportable.output("Listing resources in the cache");
List<CachedResource> resources = cacheLookupService.getResources();
if (resources.isEmpty()) {
reportable.output("No resources in the cache.");
}
for (CachedResource resource : r... | java | protected void handleListCache() {
reportable.output("Listing resources in the cache");
List<CachedResource> resources = cacheLookupService.getResources();
if (resources.isEmpty()) {
reportable.output("No resources in the cache.");
}
for (CachedResource resource : r... | [
"protected",
"void",
"handleListCache",
"(",
")",
"{",
"reportable",
".",
"output",
"(",
"\"Listing resources in the cache\"",
")",
";",
"List",
"<",
"CachedResource",
">",
"resources",
"=",
"cacheLookupService",
".",
"getResources",
"(",
")",
";",
"if",
"(",
"r... | Handle the list cache option. | [
"Handle",
"the",
"list",
"cache",
"option",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L192-L204 |
146,110 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handleLoadResource | protected void handleLoadResource(Option option) {
String resourceLocation = option.getValue();
reportable.output("Loading resource into the cache:");
reportable.output(" " + resourceLocation);
ResourceType type = ResourceType.fromLocation(resourceLocation);
if (type == null)... | java | protected void handleLoadResource(Option option) {
String resourceLocation = option.getValue();
reportable.output("Loading resource into the cache:");
reportable.output(" " + resourceLocation);
ResourceType type = ResourceType.fromLocation(resourceLocation);
if (type == null)... | [
"protected",
"void",
"handleLoadResource",
"(",
"Option",
"option",
")",
"{",
"String",
"resourceLocation",
"=",
"option",
".",
"getValue",
"(",
")",
";",
"reportable",
".",
"output",
"(",
"\"Loading resource into the cache:\"",
")",
";",
"reportable",
".",
"outpu... | Handle the load resource option.
@param option {@link Option} the option to fetch the cli argument from | [
"Handle",
"the",
"load",
"resource",
"option",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L216-L231 |
146,111 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handleLoadIndex | protected void handleLoadIndex(String indexLocation) {
reportable.output("Loading resource from index file:");
reportable.output(" " + indexLocation);
File indexFile = new File(indexLocation);
if (!indexFile.exists() || !indexFile.canRead()) {
// try the index as an online ... | java | protected void handleLoadIndex(String indexLocation) {
reportable.output("Loading resource from index file:");
reportable.output(" " + indexLocation);
File indexFile = new File(indexLocation);
if (!indexFile.exists() || !indexFile.canRead()) {
// try the index as an online ... | [
"protected",
"void",
"handleLoadIndex",
"(",
"String",
"indexLocation",
")",
"{",
"reportable",
".",
"output",
"(",
"\"Loading resource from index file:\"",
")",
";",
"reportable",
".",
"output",
"(",
"\" \"",
"+",
"indexLocation",
")",
";",
"File",
"indexFile",
... | Handle the load index option.
@param indexLocation {@link String} the index location | [
"Handle",
"the",
"load",
"index",
"option",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L238-L266 |
146,112 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handlePurgeCache | protected void handlePurgeCache() {
reportable.output("Purging all resources from the cache");
try {
cacheMgrService.purgeResources();
} catch (Exception e) {
reportable.error("Unable to remove all resources in the cache");
reportable.error("Reason: " + e.get... | java | protected void handlePurgeCache() {
reportable.output("Purging all resources from the cache");
try {
cacheMgrService.purgeResources();
} catch (Exception e) {
reportable.error("Unable to remove all resources in the cache");
reportable.error("Reason: " + e.get... | [
"protected",
"void",
"handlePurgeCache",
"(",
")",
"{",
"reportable",
".",
"output",
"(",
"\"Purging all resources from the cache\"",
")",
";",
"try",
"{",
"cacheMgrService",
".",
"purgeResources",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
... | Handle the purge cache option. | [
"Handle",
"the",
"purge",
"cache",
"option",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L271-L281 |
146,113 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java | CacheManager.handleGenerateHash | protected void handleGenerateHash(Option option) {
String hashFileLocation = option.getValue();
reportable.output("Generating checksum for file: " + hashFileLocation);
File hashFile = new File(hashFileLocation);
if (!hashFile.exists() || !hashFile.canRead()) {
reportable.e... | java | protected void handleGenerateHash(Option option) {
String hashFileLocation = option.getValue();
reportable.output("Generating checksum for file: " + hashFileLocation);
File hashFile = new File(hashFileLocation);
if (!hashFile.exists() || !hashFile.canRead()) {
reportable.e... | [
"protected",
"void",
"handleGenerateHash",
"(",
"Option",
"option",
")",
"{",
"String",
"hashFileLocation",
"=",
"option",
".",
"getValue",
"(",
")",
";",
"reportable",
".",
"output",
"(",
"\"Generating checksum for file: \"",
"+",
"hashFileLocation",
")",
";",
"F... | Handle the generate hash option.
@param option {@link Option} the option to fetch the cli argument from | [
"Handle",
"the",
"generate",
"hash",
"option",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/CacheManager.java#L288-L318 |
146,114 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java | URIUtil.getQueryParameter | public static String getQueryParameter( URI uri, String name )
{
Map<String, String> params = parseQueryParameters( uri.getRawQuery() );
return params.get( name );
} | java | public static String getQueryParameter( URI uri, String name )
{
Map<String, String> params = parseQueryParameters( uri.getRawQuery() );
return params.get( name );
} | [
"public",
"static",
"String",
"getQueryParameter",
"(",
"URI",
"uri",
",",
"String",
"name",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"parseQueryParameters",
"(",
"uri",
".",
"getRawQuery",
"(",
")",
")",
";",
"return",
"params",
... | Retrieves a query param in a URL according to a key.
If several parameters are to be retrieved from the same URI, better use
<code>parseQueryString( uri.getRawQuery() )</code>.
@param uri
@param name
@return parameter value (if found) ; null if not found or no = after name. | [
"Retrieves",
"a",
"query",
"param",
"in",
"a",
"URL",
"according",
"to",
"a",
"key",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java#L121-L125 |
146,115 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java | URIUtil.parseQueryParameters | public static Map<String, String> parseQueryParameters( String rawQuery )
{
Map<String, String> ret = new LinkedHashMap<String, String>();
if ( rawQuery == null || rawQuery.length() == 0 ) {
return ret;
}
try {
String[] pairs = rawQuery.split( "&" );
... | java | public static Map<String, String> parseQueryParameters( String rawQuery )
{
Map<String, String> ret = new LinkedHashMap<String, String>();
if ( rawQuery == null || rawQuery.length() == 0 ) {
return ret;
}
try {
String[] pairs = rawQuery.split( "&" );
... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"parseQueryParameters",
"(",
"String",
"rawQuery",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"ret",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"... | Parse a query param string into a map of parameters.
Duplicated parameters cannot be handled by this method. Parameters names not followed by '=' sign are only keys
but have null value. Parameters names followed by '=' sign have an empty string value.
@param rawQuery The query param string, as returned by URI.getRawQ... | [
"Parse",
"a",
"query",
"param",
"string",
"into",
"a",
"map",
"of",
"parameters",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java#L136-L170 |
146,116 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java | WicketImageExtensions.getNonCachingImage | public static NonCachingImage getNonCachingImage(final String wicketId,
final String contentType, final byte[] data)
{
return new NonCachingImage(wicketId, new DatabaseImageResource(contentType, data));
} | java | public static NonCachingImage getNonCachingImage(final String wicketId,
final String contentType, final byte[] data)
{
return new NonCachingImage(wicketId, new DatabaseImageResource(contentType, data));
} | [
"public",
"static",
"NonCachingImage",
"getNonCachingImage",
"(",
"final",
"String",
"wicketId",
",",
"final",
"String",
"contentType",
",",
"final",
"byte",
"[",
"]",
"data",
")",
"{",
"return",
"new",
"NonCachingImage",
"(",
"wicketId",
",",
"new",
"DatabaseIm... | Gets a non caching image from the given wicketId, contentType and the byte array data.
@param wicketId
the id from the image for the html template.
@param contentType
the content type of the image.
@param data
the data for the image as an byte array.
@return the non caching image | [
"Gets",
"a",
"non",
"caching",
"image",
"from",
"the",
"given",
"wicketId",
"contentType",
"and",
"the",
"byte",
"array",
"data",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java#L76-L80 |
146,117 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java | WicketImageExtensions.getNonCachingImage | public static NonCachingImage getNonCachingImage(final String wicketId,
final String contentType, final Byte[] data)
{
final byte[] byteArrayData = ArrayUtils.toPrimitive(data);
return getNonCachingImage(wicketId, contentType, byteArrayData);
} | java | public static NonCachingImage getNonCachingImage(final String wicketId,
final String contentType, final Byte[] data)
{
final byte[] byteArrayData = ArrayUtils.toPrimitive(data);
return getNonCachingImage(wicketId, contentType, byteArrayData);
} | [
"public",
"static",
"NonCachingImage",
"getNonCachingImage",
"(",
"final",
"String",
"wicketId",
",",
"final",
"String",
"contentType",
",",
"final",
"Byte",
"[",
"]",
"data",
")",
"{",
"final",
"byte",
"[",
"]",
"byteArrayData",
"=",
"ArrayUtils",
".",
"toPri... | Gets a non caching image from the given wicketId, contentType and the Byte array data.
@param wicketId
the id from the image for the html template.
@param contentType
the content type of the image.
@param data
the data for the image as an Byte array.
@return the non caching image | [
"Gets",
"a",
"non",
"caching",
"image",
"from",
"the",
"given",
"wicketId",
"contentType",
"and",
"the",
"Byte",
"array",
"data",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java#L94-L99 |
146,118 | geomajas/geomajas-project-client-gwt2 | plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/featureinfo/FeatureInfoPanel.java | FeatureInfoPanel.onFeatureClicked | @Override
public void onFeatureClicked(FeatureClickedEvent event) {
// Create feature info widget if this is the first time displaying a feature:
if (featureInfoWidget == null) {
// Create info widget with some actions:
FeatureInfoWidgetFactory factory = new FeatureInfoWidgetFactory();
featureInfoWidget =... | java | @Override
public void onFeatureClicked(FeatureClickedEvent event) {
// Create feature info widget if this is the first time displaying a feature:
if (featureInfoWidget == null) {
// Create info widget with some actions:
FeatureInfoWidgetFactory factory = new FeatureInfoWidgetFactory();
featureInfoWidget =... | [
"@",
"Override",
"public",
"void",
"onFeatureClicked",
"(",
"FeatureClickedEvent",
"event",
")",
"{",
"// Create feature info widget if this is the first time displaying a feature:",
"if",
"(",
"featureInfoWidget",
"==",
"null",
")",
"{",
"// Create info widget with some actions:... | Action called when a feature is clicked. Displays the information of the clicked
feature in the left panel of the sample, overwriting any feature info that may
be already there.
@param event {@link org.geomajas.gwt2.plugin
.corewidget.example.client.sample.feature.controller.FeatureClickedEvent} | [
"Action",
"called",
"when",
"a",
"feature",
"is",
"clicked",
".",
"Displays",
"the",
"information",
"of",
"the",
"clicked",
"feature",
"in",
"the",
"left",
"panel",
"of",
"the",
"sample",
"overwriting",
"any",
"feature",
"info",
"that",
"may",
"be",
"already... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/featureinfo/FeatureInfoPanel.java#L100-L115 |
146,119 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/config/PropertyLoaderFromResource.java | PropertyLoaderFromResource.loadPropsFromResource | private static Properties loadPropsFromResource(String resourceName, boolean failOnResourceNotFoundOrNotLoaded) {
Properties props = new Properties();
InputStream resource = PropertyLoaderFromResource.class.getResourceAsStream(resourceName);
boolean resourceNotFound = (resource == null);
if(resourceNotFound) {
... | java | private static Properties loadPropsFromResource(String resourceName, boolean failOnResourceNotFoundOrNotLoaded) {
Properties props = new Properties();
InputStream resource = PropertyLoaderFromResource.class.getResourceAsStream(resourceName);
boolean resourceNotFound = (resource == null);
if(resourceNotFound) {
... | [
"private",
"static",
"Properties",
"loadPropsFromResource",
"(",
"String",
"resourceName",
",",
"boolean",
"failOnResourceNotFoundOrNotLoaded",
")",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"InputStream",
"resource",
"=",
"PropertyLoaderFromR... | Load properties from a resource.
@param resourceName
@param failOnResourceNotFoundOrNotLoaded when true, a ConfigException
is raised if the resource cannot be found or loaded
@return a {@link Properties} instance with the properties loaded from the resource;
might be empty if the resource is not found or if it cannot ... | [
"Load",
"properties",
"from",
"a",
"resource",
"."
] | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/config/PropertyLoaderFromResource.java#L40-L62 |
146,120 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/app/ActivityUtils.java | ActivityUtils.findViewById | @SuppressWarnings("unchecked") // we know that return value type is a child of view, and V is bound to a child of view.
public static <V extends View> V findViewById(Activity activity, int id) {
return (V) activity.findViewById(id);
} | java | @SuppressWarnings("unchecked") // we know that return value type is a child of view, and V is bound to a child of view.
public static <V extends View> V findViewById(Activity activity, int id) {
return (V) activity.findViewById(id);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// we know that return value type is a child of view, and V is bound to a child of view.",
"public",
"static",
"<",
"V",
"extends",
"View",
">",
"V",
"findViewById",
"(",
"Activity",
"activity",
",",
"int",
"id",
")",
"... | Find the specific view from the activity.
Returning value type is bound to your variable type.
@param activity the activity.
@param id the view id.
@param <V> the view class type parameter.
@return the view, null if not found. | [
"Find",
"the",
"specific",
"view",
"from",
"the",
"activity",
".",
"Returning",
"value",
"type",
"is",
"bound",
"to",
"your",
"variable",
"type",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/ActivityUtils.java#L23-L26 |
146,121 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/kam/JdbcKAMLoaderImpl.java | JdbcKAMLoaderImpl.saveObject | protected int saveObject(int tid, String v) throws SQLException {
final String objectsIdColumn = (dbConnection.isPostgresql() ?
OBJECTS_ID_COLUMN_POSTGRESQL : OBJECTS_ID_COLUMN);
PreparedStatement ps = getPreparedStatement(OBJECTS_SQL,
new String[] { objectsIdColumn });
... | java | protected int saveObject(int tid, String v) throws SQLException {
final String objectsIdColumn = (dbConnection.isPostgresql() ?
OBJECTS_ID_COLUMN_POSTGRESQL : OBJECTS_ID_COLUMN);
PreparedStatement ps = getPreparedStatement(OBJECTS_SQL,
new String[] { objectsIdColumn });
... | [
"protected",
"int",
"saveObject",
"(",
"int",
"tid",
",",
"String",
"v",
")",
"throws",
"SQLException",
"{",
"final",
"String",
"objectsIdColumn",
"=",
"(",
"dbConnection",
".",
"isPostgresql",
"(",
")",
"?",
"OBJECTS_ID_COLUMN_POSTGRESQL",
":",
"OBJECTS_ID_COLUMN... | Saves an entry to the object table.
@param tid {@code int}, the object type id
@param v {@link String}, the non-null object value
@return {@code int}, the object primary key
@throws SQLException - Thrown if a sql error occurred saving an entry to
the object table | [
"Saves",
"an",
"entry",
"to",
"the",
"object",
"table",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/kam/JdbcKAMLoaderImpl.java#L857-L927 |
146,122 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.tag | public Span[] tag(final String[] tokens, final String[][] additionalContext) {
this.additionalContextFeatureGenerator.setCurrentContext(additionalContext);
this.bestSequence = this.model.bestSequence(tokens, additionalContext,
this.contextGenerator, this.sequenceValidator);
final List<String> c = th... | java | public Span[] tag(final String[] tokens, final String[][] additionalContext) {
this.additionalContextFeatureGenerator.setCurrentContext(additionalContext);
this.bestSequence = this.model.bestSequence(tokens, additionalContext,
this.contextGenerator, this.sequenceValidator);
final List<String> c = th... | [
"public",
"Span",
"[",
"]",
"tag",
"(",
"final",
"String",
"[",
"]",
"tokens",
",",
"final",
"String",
"[",
"]",
"[",
"]",
"additionalContext",
")",
"{",
"this",
".",
"additionalContextFeatureGenerator",
".",
"setCurrentContext",
"(",
"additionalContext",
")",... | Generates sequence tags for the given sequence, returning spans for any
identified sequences.
@param tokens
an array of the tokens or words, typically a sentence.
@param additionalContext
features which are based on context outside of the sentence but
which should also be used.
@return an array of spans for each of t... | [
"Generates",
"sequence",
"tags",
"for",
"the",
"given",
"sequence",
"returning",
"spans",
"for",
"any",
"identified",
"sequences",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L105-L115 |
146,123 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.tag | public Span[][] tag(final int numTaggings, final String[] tokens) {
final Sequence[] bestSequences = this.model.bestSequences(numTaggings,
tokens, null, this.contextGenerator, this.sequenceValidator);
final Span[][] tags = new Span[bestSequences.length][];
for (int i = 0; i < tags.length; i++) {
... | java | public Span[][] tag(final int numTaggings, final String[] tokens) {
final Sequence[] bestSequences = this.model.bestSequences(numTaggings,
tokens, null, this.contextGenerator, this.sequenceValidator);
final Span[][] tags = new Span[bestSequences.length][];
for (int i = 0; i < tags.length; i++) {
... | [
"public",
"Span",
"[",
"]",
"[",
"]",
"tag",
"(",
"final",
"int",
"numTaggings",
",",
"final",
"String",
"[",
"]",
"tokens",
")",
"{",
"final",
"Sequence",
"[",
"]",
"bestSequences",
"=",
"this",
".",
"model",
".",
"bestSequences",
"(",
"numTaggings",
... | Returns at most the specified number of taggings for the specified
sentence.
@param numTaggings
the number of labels to be returned.
@param tokens
an array of tokens which make up a sentence.
@return at most the specified number of labels for the specified sentence. | [
"Returns",
"at",
"most",
"the",
"specified",
"number",
"of",
"taggings",
"for",
"the",
"specified",
"sentence",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L137-L149 |
146,124 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.setProbs | private Span[] setProbs(final Span[] spans) {
final double[] probs = probs(spans);
if (probs != null) {
for (int i = 0; i < probs.length; i++) {
final double prob = probs[i];
spans[i] = new Span(spans[i], prob);
}
}
return spans;
} | java | private Span[] setProbs(final Span[] spans) {
final double[] probs = probs(spans);
if (probs != null) {
for (int i = 0; i < probs.length; i++) {
final double prob = probs[i];
spans[i] = new Span(spans[i], prob);
}
}
return spans;
} | [
"private",
"Span",
"[",
"]",
"setProbs",
"(",
"final",
"Span",
"[",
"]",
"spans",
")",
"{",
"final",
"double",
"[",
"]",
"probs",
"=",
"probs",
"(",
"spans",
")",
";",
"if",
"(",
"probs",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0"... | sets the probs for the spans
@param spans
@return | [
"sets",
"the",
"probs",
"for",
"the",
"spans"
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L205-L215 |
146,125 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.probs | public double[] probs(final Span[] spans) {
final double[] sprobs = new double[spans.length];
final double[] probs = this.bestSequence.getProbs();
for (int si = 0; si < spans.length; si++) {
double p = 0;
for (int oi = spans[si].getStart(); oi < spans[si].getEnd(); oi++) {
p += probs[o... | java | public double[] probs(final Span[] spans) {
final double[] sprobs = new double[spans.length];
final double[] probs = this.bestSequence.getProbs();
for (int si = 0; si < spans.length; si++) {
double p = 0;
for (int oi = spans[si].getStart(); oi < spans[si].getEnd(); oi++) {
p += probs[o... | [
"public",
"double",
"[",
"]",
"probs",
"(",
"final",
"Span",
"[",
"]",
"spans",
")",
"{",
"final",
"double",
"[",
"]",
"sprobs",
"=",
"new",
"double",
"[",
"spans",
".",
"length",
"]",
";",
"final",
"double",
"[",
"]",
"probs",
"=",
"this",
".",
... | Returns an array of probabilities for each of the specified spans which is
the arithmetic mean of the probabilities for each of the outcomes which
make up the span.
@param spans
The spans of the names for which probabilities are desired.
@return an array of probabilities for each of the specified spans. | [
"Returns",
"an",
"array",
"of",
"probabilities",
"for",
"each",
"of",
"the",
"specified",
"spans",
"which",
"is",
"the",
"arithmetic",
"mean",
"of",
"the",
"probabilities",
"for",
"each",
"of",
"the",
"outcomes",
"which",
"make",
"up",
"the",
"span",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L227-L242 |
146,126 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.extractNameType | static final String extractNameType(final String outcome) {
final Matcher matcher = typedOutcomePattern.matcher(outcome);
if (matcher.matches()) {
final String nameType = matcher.group(1);
return nameType;
}
return null;
} | java | static final String extractNameType(final String outcome) {
final Matcher matcher = typedOutcomePattern.matcher(outcome);
if (matcher.matches()) {
final String nameType = matcher.group(1);
return nameType;
}
return null;
} | [
"static",
"final",
"String",
"extractNameType",
"(",
"final",
"String",
"outcome",
")",
"{",
"final",
"Matcher",
"matcher",
"=",
"typedOutcomePattern",
".",
"matcher",
"(",
"outcome",
")",
";",
"if",
"(",
"matcher",
".",
"matches",
"(",
")",
")",
"{",
"fin... | Gets the name type from the outcome
@param outcome
the outcome
@return the name type, or null if not set | [
"Gets",
"the",
"name",
"type",
"from",
"the",
"outcome"
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L313-L321 |
146,127 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.dropOverlappingSpans | public static Span[] dropOverlappingSpans(final Span[] spans) {
final List<Span> sortedSpans = new ArrayList<Span>(spans.length);
Collections.addAll(sortedSpans, spans);
Collections.sort(sortedSpans);
final Iterator<Span> it = sortedSpans.iterator();
Span lastSpan = null;
while (it.hasNext()) ... | java | public static Span[] dropOverlappingSpans(final Span[] spans) {
final List<Span> sortedSpans = new ArrayList<Span>(spans.length);
Collections.addAll(sortedSpans, spans);
Collections.sort(sortedSpans);
final Iterator<Span> it = sortedSpans.iterator();
Span lastSpan = null;
while (it.hasNext()) ... | [
"public",
"static",
"Span",
"[",
"]",
"dropOverlappingSpans",
"(",
"final",
"Span",
"[",
"]",
"spans",
")",
"{",
"final",
"List",
"<",
"Span",
">",
"sortedSpans",
"=",
"new",
"ArrayList",
"<",
"Span",
">",
"(",
"spans",
".",
"length",
")",
";",
"Collec... | Removes spans with are intersecting or crossing in anyway.
<p>
The following rules are used to remove the spans:<br>
Identical spans: The first span in the array after sorting it remains<br>
Intersecting spans: The first span after sorting remains<br>
Contained spans: All spans which are contained by another are remov... | [
"Removes",
"spans",
"with",
"are",
"intersecting",
"or",
"crossing",
"in",
"anyway",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L337-L357 |
146,128 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java | SequenceLabelerME.decodeSequences | public String[] decodeSequences(final String[] preds) {
final List<String> decodedSequences = new ArrayList<>();
for (String pred : preds) {
pred = startPattern.matcher(pred).replaceAll("B-$1");
pred = contPattern.matcher(pred).replaceAll("I-$1");
pred = lastPattern.matcher(pred).replaceAll("I... | java | public String[] decodeSequences(final String[] preds) {
final List<String> decodedSequences = new ArrayList<>();
for (String pred : preds) {
pred = startPattern.matcher(pred).replaceAll("B-$1");
pred = contPattern.matcher(pred).replaceAll("I-$1");
pred = lastPattern.matcher(pred).replaceAll("I... | [
"public",
"String",
"[",
"]",
"decodeSequences",
"(",
"final",
"String",
"[",
"]",
"preds",
")",
"{",
"final",
"List",
"<",
"String",
">",
"decodedSequences",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"pred",
":",
"preds",
")"... | Decode Sequences from an array of Strings.
@param preds
the sequences in an string array.
@return the decoded sequences | [
"Decode",
"Sequences",
"from",
"an",
"array",
"of",
"Strings",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/sequence/SequenceLabelerME.java#L366-L377 |
146,129 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/StringUtils.java | StringUtils.decodeLemmasToSpans | public static void decodeLemmasToSpans(final String[] tokens,
final Span[] preds) {
for (final Span span : preds) {
String lemma = decodeShortestEditScript(
span.getCoveredText(tokens).toLowerCase(), span.getType());
// System.err.println("-> DEBUG: " + toks[i].toLowerCase() + " " +
... | java | public static void decodeLemmasToSpans(final String[] tokens,
final Span[] preds) {
for (final Span span : preds) {
String lemma = decodeShortestEditScript(
span.getCoveredText(tokens).toLowerCase(), span.getType());
// System.err.println("-> DEBUG: " + toks[i].toLowerCase() + " " +
... | [
"public",
"static",
"void",
"decodeLemmasToSpans",
"(",
"final",
"String",
"[",
"]",
"tokens",
",",
"final",
"Span",
"[",
"]",
"preds",
")",
"{",
"for",
"(",
"final",
"Span",
"span",
":",
"preds",
")",
"{",
"String",
"lemma",
"=",
"decodeShortestEditScript... | Decodes the lemma induced type into the lemma and sets it as value of the
Span type.
@param tokens
the tokens in the sentence
@param preds
the predicted spans | [
"Decodes",
"the",
"lemma",
"induced",
"type",
"into",
"the",
"lemma",
"and",
"sets",
"it",
"as",
"value",
"of",
"the",
"Span",
"type",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/StringUtils.java#L476-L488 |
146,130 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/StringUtils.java | StringUtils.splitLine | public static void splitLine(final String line, final char delimiter,
final String[] splitted) {
int idxComma, idxToken = 0, fromIndex = 0;
while ((idxComma = line.indexOf(delimiter, fromIndex)) != -1) {
splitted[idxToken++] = line.substring(fromIndex, idxComma);
fromIndex = idxComma + 1;
... | java | public static void splitLine(final String line, final char delimiter,
final String[] splitted) {
int idxComma, idxToken = 0, fromIndex = 0;
while ((idxComma = line.indexOf(delimiter, fromIndex)) != -1) {
splitted[idxToken++] = line.substring(fromIndex, idxComma);
fromIndex = idxComma + 1;
... | [
"public",
"static",
"void",
"splitLine",
"(",
"final",
"String",
"line",
",",
"final",
"char",
"delimiter",
",",
"final",
"String",
"[",
"]",
"splitted",
")",
"{",
"int",
"idxComma",
",",
"idxToken",
"=",
"0",
",",
"fromIndex",
"=",
"0",
";",
"while",
... | Fast line splitting with a separator, typically a tab or space character.
@param line
the line to be splitted
@param delimiter
the delimiter
@param splitted
the array containing the splitted tokens for each line | [
"Fast",
"line",
"splitting",
"with",
"a",
"separator",
"typically",
"a",
"tab",
"or",
"space",
"character",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/StringUtils.java#L529-L537 |
146,131 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/tasks/ImLoggedInBase.java | ImLoggedInBase.run | @Override
public WebPage run(WebPage noPage) {
LoginPage<?> loginPage = (LoginPage<?>) super.run(noPage);
return loginPage.loginAs(user.getUsername(), user.getPassword());
} | java | @Override
public WebPage run(WebPage noPage) {
LoginPage<?> loginPage = (LoginPage<?>) super.run(noPage);
return loginPage.loginAs(user.getUsername(), user.getPassword());
} | [
"@",
"Override",
"public",
"WebPage",
"run",
"(",
"WebPage",
"noPage",
")",
"{",
"LoginPage",
"<",
"?",
">",
"loginPage",
"=",
"(",
"LoginPage",
"<",
"?",
">",
")",
"super",
".",
"run",
"(",
"noPage",
")",
";",
"return",
"loginPage",
".",
"loginAs",
... | Browse to the login page and do the login.
@param noPage this param won't be considered: may be null | [
"Browse",
"to",
"the",
"login",
"page",
"and",
"do",
"the",
"login",
"."
] | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/tasks/ImLoggedInBase.java#L22-L26 |
146,132 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/widget/control/zoom/ZoomControl.java | ZoomControl.initializeForDesktop | private void initializeForDesktop() {
logger.log(Level.FINE, "ZoomControl ->initializeForDesktop()");
StopPropagationHandler preventWeirdBehaviourHandler = new StopPropagationHandler();
addDomHandler(preventWeirdBehaviourHandler, MouseDownEvent.getType());
addDomHandler(preventWeirdBehaviourHandler, MouseUpEven... | java | private void initializeForDesktop() {
logger.log(Level.FINE, "ZoomControl ->initializeForDesktop()");
StopPropagationHandler preventWeirdBehaviourHandler = new StopPropagationHandler();
addDomHandler(preventWeirdBehaviourHandler, MouseDownEvent.getType());
addDomHandler(preventWeirdBehaviourHandler, MouseUpEven... | [
"private",
"void",
"initializeForDesktop",
"(",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"ZoomControl ->initializeForDesktop()\"",
")",
";",
"StopPropagationHandler",
"preventWeirdBehaviourHandler",
"=",
"new",
"StopPropagationHandler",
"(",
")"... | Initialize handlers for desktop browser. | [
"Initialize",
"handlers",
"for",
"desktop",
"browser",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/widget/control/zoom/ZoomControl.java#L116-L151 |
146,133 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/widget/control/zoom/ZoomControl.java | ZoomControl.initializeForTouchDevice | private void initializeForTouchDevice() {
logger.log(Level.FINE, "ZoomControl -> initializeForTouchDevice()");
// Add touch handlers to the zoom in button:
zoomInElement.addDomHandler(new TouchStartHandler() {
@Override
public void onTouchStart(TouchStartEvent event) {
event.stopPropagation();
even... | java | private void initializeForTouchDevice() {
logger.log(Level.FINE, "ZoomControl -> initializeForTouchDevice()");
// Add touch handlers to the zoom in button:
zoomInElement.addDomHandler(new TouchStartHandler() {
@Override
public void onTouchStart(TouchStartEvent event) {
event.stopPropagation();
even... | [
"private",
"void",
"initializeForTouchDevice",
"(",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"ZoomControl -> initializeForTouchDevice()\"",
")",
";",
"// Add touch handlers to the zoom in button:",
"zoomInElement",
".",
"addDomHandler",
"(",
"new"... | Initialize handlers for mobile devices. | [
"Initialize",
"handlers",
"for",
"mobile",
"devices",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/widget/control/zoom/ZoomControl.java#L156-L194 |
146,134 | lexs/webimageloader | webimageloader/src/main/java/com/webimageloader/Request.java | Request.forFile | public static Request forFile(File file) {
String url = Uri.fromFile(file).toString();
return new Request(url).addFlag(Flag.SKIP_DISK_CACHE);
} | java | public static Request forFile(File file) {
String url = Uri.fromFile(file).toString();
return new Request(url).addFlag(Flag.SKIP_DISK_CACHE);
} | [
"public",
"static",
"Request",
"forFile",
"(",
"File",
"file",
")",
"{",
"String",
"url",
"=",
"Uri",
".",
"fromFile",
"(",
"file",
")",
".",
"toString",
"(",
")",
";",
"return",
"new",
"Request",
"(",
"url",
")",
".",
"addFlag",
"(",
"Flag",
".",
... | Create a request for this file on the local file system.
Note that this sets the SKIP_DISK_CACHE to skip disk cache
@param file path to the file
@return a request for this file | [
"Create",
"a",
"request",
"for",
"this",
"file",
"on",
"the",
"local",
"file",
"system",
"."
] | b29bac036a3855e2f0adf95d3391ee4bbc14457c | https://github.com/lexs/webimageloader/blob/b29bac036a3855e2f0adf95d3391ee4bbc14457c/webimageloader/src/main/java/com/webimageloader/Request.java#L74-L77 |
146,135 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/seo/BotAgentInspector.java | BotAgentInspector.isAgent | public static boolean isAgent(final String agent)
{
if (agent != null)
{
final String lowerAgent = agent.toLowerCase();
for (final String noBot : NO_BOT_AGENTS)
{
if (lowerAgent.contains(noBot))
{
return false;
}
}
for (final String bot : BOT_AGENTS)
{
if (lowerAgent.contains... | java | public static boolean isAgent(final String agent)
{
if (agent != null)
{
final String lowerAgent = agent.toLowerCase();
for (final String noBot : NO_BOT_AGENTS)
{
if (lowerAgent.contains(noBot))
{
return false;
}
}
for (final String bot : BOT_AGENTS)
{
if (lowerAgent.contains... | [
"public",
"static",
"boolean",
"isAgent",
"(",
"final",
"String",
"agent",
")",
"{",
"if",
"(",
"agent",
"!=",
"null",
")",
"{",
"final",
"String",
"lowerAgent",
"=",
"agent",
".",
"toLowerCase",
"(",
")",
";",
"for",
"(",
"final",
"String",
"noBot",
"... | Checks if the given String object is agent over the String array BOT_AGENTS.
@param agent
String to check.
@return true, if is agent | [
"Checks",
"if",
"the",
"given",
"String",
"object",
"is",
"agent",
"over",
"the",
"String",
"array",
"BOT_AGENTS",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/seo/BotAgentInspector.java#L94-L115 |
146,136 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.getDictionaryResource | public static final InputStream getDictionaryResource(final String resource) {
InputStream dictInputStream;
final Path resourcePath = Paths.get(resource);
final String normalizedPath = resourcePath.toString();
dictInputStream = getStreamFromClassPath(normalizedPath);
if (dictInputStream == null) {
... | java | public static final InputStream getDictionaryResource(final String resource) {
InputStream dictInputStream;
final Path resourcePath = Paths.get(resource);
final String normalizedPath = resourcePath.toString();
dictInputStream = getStreamFromClassPath(normalizedPath);
if (dictInputStream == null) {
... | [
"public",
"static",
"final",
"InputStream",
"getDictionaryResource",
"(",
"final",
"String",
"resource",
")",
"{",
"InputStream",
"dictInputStream",
";",
"final",
"Path",
"resourcePath",
"=",
"Paths",
".",
"get",
"(",
"resource",
")",
";",
"final",
"String",
"no... | Get an input stream from a resource name. This could be either an absolute
path pointing to a resource in the classpath or a file or a directory in
the file system. If found in the classpath that will be loaded first.
@param resource
the name of the resource (absolute path with no starting /)
@return the inputstream o... | [
"Get",
"an",
"input",
"stream",
"from",
"a",
"resource",
"name",
".",
"This",
"could",
"be",
"either",
"an",
"absolute",
"path",
"pointing",
"to",
"a",
"resource",
"in",
"the",
"classpath",
"or",
"a",
"file",
"or",
"a",
"directory",
"in",
"the",
"file",
... | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L94-L108 |
146,137 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.getStreamFromClassPath | private static InputStream getStreamFromClassPath(
final String normalizedPath) {
InputStream dictInputStream = null;
final String[] dictPaths = normalizedPath.split("src/main/resources");
if (dictPaths.length == 2) {
dictInputStream = IOUtils.class.getClassLoader()
.getResourceAsStrea... | java | private static InputStream getStreamFromClassPath(
final String normalizedPath) {
InputStream dictInputStream = null;
final String[] dictPaths = normalizedPath.split("src/main/resources");
if (dictPaths.length == 2) {
dictInputStream = IOUtils.class.getClassLoader()
.getResourceAsStrea... | [
"private",
"static",
"InputStream",
"getStreamFromClassPath",
"(",
"final",
"String",
"normalizedPath",
")",
"{",
"InputStream",
"dictInputStream",
"=",
"null",
";",
"final",
"String",
"[",
"]",
"dictPaths",
"=",
"normalizedPath",
".",
"split",
"(",
"\"src/main/reso... | Load a resource from the classpath.
@param normalizedPath
the path normalized using {@code Paths} functions.
@return the input stream of the resource | [
"Load",
"a",
"resource",
"from",
"the",
"classpath",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L117-L133 |
146,138 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.checkInputFile | private static void checkInputFile(final String name, final File inFile) {
String isFailure = null;
if (inFile.isDirectory()) {
isFailure = "The " + name + " file is a directory!";
} else if (!inFile.exists()) {
isFailure = "The " + name + " file does not exist!";
} else if (!inFile.canRea... | java | private static void checkInputFile(final String name, final File inFile) {
String isFailure = null;
if (inFile.isDirectory()) {
isFailure = "The " + name + " file is a directory!";
} else if (!inFile.exists()) {
isFailure = "The " + name + " file does not exist!";
} else if (!inFile.canRea... | [
"private",
"static",
"void",
"checkInputFile",
"(",
"final",
"String",
"name",
",",
"final",
"File",
"inFile",
")",
"{",
"String",
"isFailure",
"=",
"null",
";",
"if",
"(",
"inFile",
".",
"isDirectory",
"(",
")",
")",
"{",
"isFailure",
"=",
"\"The \"",
"... | Check input file integrity.
@param name
the name of the file
@param inFile
the file | [
"Check",
"input",
"file",
"integrity",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L143-L159 |
146,139 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.writeObjectToFile | public static File writeObjectToFile(final Object o, final String fileName)
throws IOException {
final File outFile = new File(fileName);
OutputStream outputStream = new FileOutputStream(outFile);
if (fileName.endsWith(".gz")) {
outputStream = new GZIPOutputStream(outputStream);
}
output... | java | public static File writeObjectToFile(final Object o, final String fileName)
throws IOException {
final File outFile = new File(fileName);
OutputStream outputStream = new FileOutputStream(outFile);
if (fileName.endsWith(".gz")) {
outputStream = new GZIPOutputStream(outputStream);
}
output... | [
"public",
"static",
"File",
"writeObjectToFile",
"(",
"final",
"Object",
"o",
",",
"final",
"String",
"fileName",
")",
"throws",
"IOException",
"{",
"final",
"File",
"outFile",
"=",
"new",
"File",
"(",
"fileName",
")",
";",
"OutputStream",
"outputStream",
"=",... | Serialize java object to a file.
@param o
the java object
@param fileName
the name of the file
@return the file
@throws IOException
if io problems | [
"Serialize",
"java",
"object",
"to",
"a",
"file",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L307-L319 |
146,140 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.writeGzipObjectToStream | public static void writeGzipObjectToStream(final Object o, OutputStream out) {
out = new BufferedOutputStream(out);
try {
out = new GZIPOutputStream(out, true);
final ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(o);
oos.flush();
} catch (final IOException e) ... | java | public static void writeGzipObjectToStream(final Object o, OutputStream out) {
out = new BufferedOutputStream(out);
try {
out = new GZIPOutputStream(out, true);
final ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(o);
oos.flush();
} catch (final IOException e) ... | [
"public",
"static",
"void",
"writeGzipObjectToStream",
"(",
"final",
"Object",
"o",
",",
"OutputStream",
"out",
")",
"{",
"out",
"=",
"new",
"BufferedOutputStream",
"(",
"out",
")",
";",
"try",
"{",
"out",
"=",
"new",
"GZIPOutputStream",
"(",
"out",
",",
"... | Serialized gzipped java object to an ObjectOutputStream. The stream remains
open.
@param o
the java object
@param out
the output stream | [
"Serialized",
"gzipped",
"java",
"object",
"to",
"an",
"ObjectOutputStream",
".",
"The",
"stream",
"remains",
"open",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L330-L340 |
146,141 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.writeObjectToStream | public static void writeObjectToStream(final Object o, OutputStream out) {
out = new BufferedOutputStream(out);
try {
final ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(o);
oos.flush();
} catch (final IOException e) {
e.printStackTrace();
}
} | java | public static void writeObjectToStream(final Object o, OutputStream out) {
out = new BufferedOutputStream(out);
try {
final ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(o);
oos.flush();
} catch (final IOException e) {
e.printStackTrace();
}
} | [
"public",
"static",
"void",
"writeObjectToStream",
"(",
"final",
"Object",
"o",
",",
"OutputStream",
"out",
")",
"{",
"out",
"=",
"new",
"BufferedOutputStream",
"(",
"out",
")",
";",
"try",
"{",
"final",
"ObjectOutputStream",
"oos",
"=",
"new",
"ObjectOutputSt... | Serialize java object to an ObjectOutputStream. The stream remains open.
@param o
the java object
@param out
the output stream | [
"Serialize",
"java",
"object",
"to",
"an",
"ObjectOutputStream",
".",
"The",
"stream",
"remains",
"open",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L350-L359 |
146,142 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java | IOUtils.openFromFile | public static InputStream openFromFile(final File file) {
try {
InputStream is = new BufferedInputStream(new FileInputStream(file),
BUFFER_SIZE);
if (file.getName().endsWith(".gz") || file.getName().endsWith("gz")) {
is = new GZIPInputStream(is, BUFFER_SIZE);
}
return is;
... | java | public static InputStream openFromFile(final File file) {
try {
InputStream is = new BufferedInputStream(new FileInputStream(file),
BUFFER_SIZE);
if (file.getName().endsWith(".gz") || file.getName().endsWith("gz")) {
is = new GZIPInputStream(is, BUFFER_SIZE);
}
return is;
... | [
"public",
"static",
"InputStream",
"openFromFile",
"(",
"final",
"File",
"file",
")",
"{",
"try",
"{",
"InputStream",
"is",
"=",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"file",
")",
",",
"BUFFER_SIZE",
")",
";",
"if",
"(",
"file",
... | Open file to an input stream.
@param file
the file
@return the input stream | [
"Open",
"file",
"to",
"an",
"input",
"stream",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L368-L380 |
146,143 | geomajas/geomajas-project-client-gwt2 | api/src/main/java/org/geomajas/gwt2/client/map/layer/tile/TileConfiguration.java | TileConfiguration.getResolutionIndex | public int getResolutionIndex(double resolution) {
double maximumResolution = getMaximumResolution();
if (resolution >= maximumResolution) {
return 0;
}
double minimumResolution = getMinimumResolution();
if (resolution <= minimumResolution) {
return resolutions.size() - 1;
}
for (int i = 0; i < res... | java | public int getResolutionIndex(double resolution) {
double maximumResolution = getMaximumResolution();
if (resolution >= maximumResolution) {
return 0;
}
double minimumResolution = getMinimumResolution();
if (resolution <= minimumResolution) {
return resolutions.size() - 1;
}
for (int i = 0; i < res... | [
"public",
"int",
"getResolutionIndex",
"(",
"double",
"resolution",
")",
"{",
"double",
"maximumResolution",
"=",
"getMaximumResolution",
"(",
")",
";",
"if",
"(",
"resolution",
">=",
"maximumResolution",
")",
"{",
"return",
"0",
";",
"}",
"double",
"minimumReso... | Get the index for the fixed resolution that is closest to the provided resolution.
@param resolution The resolution to request the closest fixed resolution level for.
@return Returns the fixed resolution level index. | [
"Get",
"the",
"index",
"for",
"the",
"fixed",
"resolution",
"that",
"is",
"closest",
"to",
"the",
"provided",
"resolution",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/api/src/main/java/org/geomajas/gwt2/client/map/layer/tile/TileConfiguration.java#L203-L225 |
146,144 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ByteArrayResourceStreamWriter.java | ByteArrayResourceStreamWriter.write | @Override
public void write(final OutputStream output) throws IOException
{
initialize();
if (content == null)
{
content = new byte[0];
}
output.write(content, 0, content.length);
output.flush();
} | java | @Override
public void write(final OutputStream output) throws IOException
{
initialize();
if (content == null)
{
content = new byte[0];
}
output.write(content, 0, content.length);
output.flush();
} | [
"@",
"Override",
"public",
"void",
"write",
"(",
"final",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"initialize",
"(",
")",
";",
"if",
"(",
"content",
"==",
"null",
")",
"{",
"content",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"}",
... | Writes the byte array to the OutputStream from the client.
@param output
the output
@throws IOException
Signals that an I/O exception has occurred.
@see org.apache.wicket.util.resource.IResourceStreamWriter#write(java.io.OutputStream) | [
"Writes",
"the",
"byte",
"array",
"to",
"the",
"OutputStream",
"from",
"the",
"client",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ByteArrayResourceStreamWriter.java#L76-L86 |
146,145 | lexs/webimageloader | webimageloader/src/main/java/com/webimageloader/util/IOUtil.java | IOUtil.getExternalCacheDir | @TargetApi(8)
public static File getExternalCacheDir(Context context) {
// Do we have a built-in external cache dir method.
if (Android.isAPI(8)) {
File cacheDir = context.getExternalCacheDir();
if (cacheDir != null) {
return cacheDir;
}
}
... | java | @TargetApi(8)
public static File getExternalCacheDir(Context context) {
// Do we have a built-in external cache dir method.
if (Android.isAPI(8)) {
File cacheDir = context.getExternalCacheDir();
if (cacheDir != null) {
return cacheDir;
}
}
... | [
"@",
"TargetApi",
"(",
"8",
")",
"public",
"static",
"File",
"getExternalCacheDir",
"(",
"Context",
"context",
")",
"{",
"// Do we have a built-in external cache dir method.",
"if",
"(",
"Android",
".",
"isAPI",
"(",
"8",
")",
")",
"{",
"File",
"cacheDir",
"=",
... | Get the external app cache directory.
@param context The context to use
@return The external cache dir | [
"Get",
"the",
"external",
"app",
"cache",
"directory",
"."
] | b29bac036a3855e2f0adf95d3391ee4bbc14457c | https://github.com/lexs/webimageloader/blob/b29bac036a3855e2f0adf95d3391ee4bbc14457c/webimageloader/src/main/java/com/webimageloader/util/IOUtil.java#L58-L71 |
146,146 | OpenBEL/openbel-framework | org.openbel.framework.api/src/main/java/org/openbel/framework/api/AbstractPathFinder.java | AbstractPathFinder.kams | Kam[] kams(KamNode... nodes) {
List<Kam> kams = new ArrayList<Kam>(nodes.length);
for (int i = 0; i < nodes.length; i++) {
KamNode node = nodes[i];
kams.add(node.getKam());
}
return kams.toArray(new Kam[0]);
} | java | Kam[] kams(KamNode... nodes) {
List<Kam> kams = new ArrayList<Kam>(nodes.length);
for (int i = 0; i < nodes.length; i++) {
KamNode node = nodes[i];
kams.add(node.getKam());
}
return kams.toArray(new Kam[0]);
} | [
"Kam",
"[",
"]",
"kams",
"(",
"KamNode",
"...",
"nodes",
")",
"{",
"List",
"<",
"Kam",
">",
"kams",
"=",
"new",
"ArrayList",
"<",
"Kam",
">",
"(",
"nodes",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nodes",
"."... | Returns the KAMs associated with each KAM node.
@param nodes KAM nodes
@return Kam array | [
"Returns",
"the",
"KAMs",
"associated",
"with",
"each",
"KAM",
"node",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.api/src/main/java/org/openbel/framework/api/AbstractPathFinder.java#L195-L202 |
146,147 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/pos/Clitic.java | Clitic.addAffixForRoot | public String addAffixForRoot(String word) {
String result = word;
if (!this.affixForRoot.equals("*")) {
result = result + this.affixForRoot;
}
return result;
} | java | public String addAffixForRoot(String word) {
String result = word;
if (!this.affixForRoot.equals("*")) {
result = result + this.affixForRoot;
}
return result;
} | [
"public",
"String",
"addAffixForRoot",
"(",
"String",
"word",
")",
"{",
"String",
"result",
"=",
"word",
";",
"if",
"(",
"!",
"this",
".",
"affixForRoot",
".",
"equals",
"(",
"\"*\"",
")",
")",
"{",
"result",
"=",
"result",
"+",
"this",
".",
"affixForR... | Given a word, adds an affix to build the root, if necessary.
@param word
the token
@return the resulting token | [
"Given",
"a",
"word",
"adds",
"an",
"affix",
"to",
"build",
"the",
"root",
"if",
"necessary",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/pos/Clitic.java#L97-L103 |
146,148 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.processOutputDirectory | private void processOutputDirectory() {
final String root = outputDirectory.getAbsolutePath();
final String leaf = PhaseOneApplication.DIR_ARTIFACT;
final String path = asPath(root, leaf);
final File phaseIPath = new File(path);
// Fail if the working path doesn't contain a phas... | java | private void processOutputDirectory() {
final String root = outputDirectory.getAbsolutePath();
final String leaf = PhaseOneApplication.DIR_ARTIFACT;
final String path = asPath(root, leaf);
final File phaseIPath = new File(path);
// Fail if the working path doesn't contain a phas... | [
"private",
"void",
"processOutputDirectory",
"(",
")",
"{",
"final",
"String",
"root",
"=",
"outputDirectory",
".",
"getAbsolutePath",
"(",
")",
";",
"final",
"String",
"leaf",
"=",
"PhaseOneApplication",
".",
"DIR_ARTIFACT",
";",
"final",
"String",
"path",
"=",... | Processes the output directory. | [
"Processes",
"the",
"output",
"directory",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L155-L178 |
146,149 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.processDirectories | private void processDirectories(final File[] networks) {
phaseOutput(format("=== %s ===", getApplicationName()));
ProtoNetwork network = stage1(networks);
Set<EquivalenceDataIndex> eqs = stage2();
if (!eqs.isEmpty()) {
network = stage3(network, eqs);
}
stage... | java | private void processDirectories(final File[] networks) {
phaseOutput(format("=== %s ===", getApplicationName()));
ProtoNetwork network = stage1(networks);
Set<EquivalenceDataIndex> eqs = stage2();
if (!eqs.isEmpty()) {
network = stage3(network, eqs);
}
stage... | [
"private",
"void",
"processDirectories",
"(",
"final",
"File",
"[",
"]",
"networks",
")",
"{",
"phaseOutput",
"(",
"format",
"(",
"\"=== %s ===\"",
",",
"getApplicationName",
"(",
")",
")",
")",
";",
"ProtoNetwork",
"network",
"=",
"stage1",
"(",
"networks",
... | Starts phase two compilation of proto-networks.
@param networks | [
"Starts",
"phase",
"two",
"compilation",
"of",
"proto",
"-",
"networks",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L185-L195 |
146,150 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.stage1 | private ProtoNetwork stage1(final File[] networks) {
beginStage(PHASE2_STAGE1_HDR, "1", NUM_PHASES);
final int netct = networks.length;
final StringBuilder bldr = new StringBuilder();
bldr.append("Merging ");
bldr.append(netct);
bldr.append(" network");
if (netct... | java | private ProtoNetwork stage1(final File[] networks) {
beginStage(PHASE2_STAGE1_HDR, "1", NUM_PHASES);
final int netct = networks.length;
final StringBuilder bldr = new StringBuilder();
bldr.append("Merging ");
bldr.append(netct);
bldr.append(" network");
if (netct... | [
"private",
"ProtoNetwork",
"stage1",
"(",
"final",
"File",
"[",
"]",
"networks",
")",
"{",
"beginStage",
"(",
"PHASE2_STAGE1_HDR",
",",
"\"1\"",
",",
"NUM_PHASES",
")",
";",
"final",
"int",
"netct",
"=",
"networks",
".",
"length",
";",
"final",
"StringBuilde... | Stage one merger of networks, returning the merged proto-network.
@param networks Proto-networks
@return {@link ProtoNetwork} | [
"Stage",
"one",
"merger",
"of",
"networks",
"returning",
"the",
"merged",
"proto",
"-",
"network",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L203-L250 |
146,151 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.stage2 | private Set<EquivalenceDataIndex> stage2() {
beginStage(PHASE2_STAGE2_HDR, "2", NUM_PHASES);
Set<EquivalenceDataIndex> ret = new HashSet<EquivalenceDataIndex>();
final StringBuilder bldr = new StringBuilder();
bldr.append("Loading namespace equivalences from resource index");
s... | java | private Set<EquivalenceDataIndex> stage2() {
beginStage(PHASE2_STAGE2_HDR, "2", NUM_PHASES);
Set<EquivalenceDataIndex> ret = new HashSet<EquivalenceDataIndex>();
final StringBuilder bldr = new StringBuilder();
bldr.append("Loading namespace equivalences from resource index");
s... | [
"private",
"Set",
"<",
"EquivalenceDataIndex",
">",
"stage2",
"(",
")",
"{",
"beginStage",
"(",
"PHASE2_STAGE2_HDR",
",",
"\"2\"",
",",
"NUM_PHASES",
")",
";",
"Set",
"<",
"EquivalenceDataIndex",
">",
"ret",
"=",
"new",
"HashSet",
"<",
"EquivalenceDataIndex",
... | Stage two equivalence loading, returning a set of data indices.
@param equivalenceFile Equivalence file
@return Set of equivalence data indices | [
"Stage",
"two",
"equivalence",
"loading",
"returning",
"a",
"set",
"of",
"data",
"indices",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L258-L288 |
146,152 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.stage3Term | private void stage3Term(final ProtoNetwork network, int pct) {
stageOutput("Equivalencing terms");
int tct = p2.stage3EquivalenceTerms(network);
stageOutput("(" + tct + " equivalences)");
} | java | private void stage3Term(final ProtoNetwork network, int pct) {
stageOutput("Equivalencing terms");
int tct = p2.stage3EquivalenceTerms(network);
stageOutput("(" + tct + " equivalences)");
} | [
"private",
"void",
"stage3Term",
"(",
"final",
"ProtoNetwork",
"network",
",",
"int",
"pct",
")",
"{",
"stageOutput",
"(",
"\"Equivalencing terms\"",
")",
";",
"int",
"tct",
"=",
"p2",
".",
"stage3EquivalenceTerms",
"(",
"network",
")",
";",
"stageOutput",
"("... | Stage three term equivalencing.
@param network the {@link ProtoNetwork network} to equivalence
@param pct the parameter equivalencing count to control output | [
"Stage",
"three",
"term",
"equivalencing",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L363-L367 |
146,153 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.stage3Statement | private void stage3Statement(final ProtoNetwork network, int pct) {
stageOutput("Equivalencing statements");
int sct = p2.stage3EquivalenceStatements(network);
stageOutput("(" + sct + " equivalences)");
} | java | private void stage3Statement(final ProtoNetwork network, int pct) {
stageOutput("Equivalencing statements");
int sct = p2.stage3EquivalenceStatements(network);
stageOutput("(" + sct + " equivalences)");
} | [
"private",
"void",
"stage3Statement",
"(",
"final",
"ProtoNetwork",
"network",
",",
"int",
"pct",
")",
"{",
"stageOutput",
"(",
"\"Equivalencing statements\"",
")",
";",
"int",
"sct",
"=",
"p2",
".",
"stage3EquivalenceStatements",
"(",
"network",
")",
";",
"stag... | Stage three statement equivalencing.
@param network the {@link ProtoNetwork network} to equivalence
@param pct the parameter equivalencing count to control output | [
"Stage",
"three",
"statement",
"equivalencing",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L375-L379 |
146,154 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.stage4 | private ProtoNetworkDescriptor stage4(final ProtoNetwork eqNetwork) {
beginStage(PHASE2_STAGE4_HDR, "4", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
bldr.append("Saving network");
stageOutput(bldr.toString());
long t1 = currentTimeMillis();
ProtoNetworkD... | java | private ProtoNetworkDescriptor stage4(final ProtoNetwork eqNetwork) {
beginStage(PHASE2_STAGE4_HDR, "4", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
bldr.append("Saving network");
stageOutput(bldr.toString());
long t1 = currentTimeMillis();
ProtoNetworkD... | [
"private",
"ProtoNetworkDescriptor",
"stage4",
"(",
"final",
"ProtoNetwork",
"eqNetwork",
")",
"{",
"beginStage",
"(",
"PHASE2_STAGE4_HDR",
",",
"\"4\"",
",",
"NUM_PHASES",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"... | Stage four saving
@param eqNetwork
@return | [
"Stage",
"four",
"saving"
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L387-L415 |
146,155 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java | PhaseTwoApplication.getApplicationDescription | @Override
public String getApplicationDescription() {
final StringBuilder bldr = new StringBuilder();
bldr.append("Merges proto-networks into a composite network and ");
bldr.append("equivalences term references across namespaces.");
return bldr.toString();
} | java | @Override
public String getApplicationDescription() {
final StringBuilder bldr = new StringBuilder();
bldr.append("Merges proto-networks into a composite network and ");
bldr.append("equivalences term references across namespaces.");
return bldr.toString();
} | [
"@",
"Override",
"public",
"String",
"getApplicationDescription",
"(",
")",
"{",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"bldr",
".",
"append",
"(",
"\"Merges proto-networks into a composite network and \"",
")",
";",
"bldr",
".... | Returns the application's description.
@return String | [
"Returns",
"the",
"application",
"s",
"description",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseTwoApplication.java#L467-L473 |
146,156 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java | PageHelper.loopFindOrRefresh | public static WebElement loopFindOrRefresh(int maxRefreshes, By locator, WebDriver driver) {
for (int i = 0; i < maxRefreshes; i++) {
WebElement element;
try {
// implicitly wait
element = driver.findElement(locator);
// if no exception is thrown, then we can exit the loop
return element;
} c... | java | public static WebElement loopFindOrRefresh(int maxRefreshes, By locator, WebDriver driver) {
for (int i = 0; i < maxRefreshes; i++) {
WebElement element;
try {
// implicitly wait
element = driver.findElement(locator);
// if no exception is thrown, then we can exit the loop
return element;
} c... | [
"public",
"static",
"WebElement",
"loopFindOrRefresh",
"(",
"int",
"maxRefreshes",
",",
"By",
"locator",
",",
"WebDriver",
"driver",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"maxRefreshes",
";",
"i",
"++",
")",
"{",
"WebElement",
"eleme... | Implicitly wait for an element.
Then, if the element cannot be found, refresh the page.
Try finding the element again, reiterating for maxRefreshes
times or until the element is found.
Finally, return the element.
@param maxRefreshes max num of iterations of the loop
@param locator the locator for the element we want ... | [
"Implicitly",
"wait",
"for",
"an",
"element",
".",
"Then",
"if",
"the",
"element",
"cannot",
"be",
"found",
"refresh",
"the",
"page",
".",
"Try",
"finding",
"the",
"element",
"again",
"reiterating",
"for",
"maxRefreshes",
"times",
"or",
"until",
"the",
"elem... | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java#L131-L146 |
146,157 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java | PageHelper.hitKeys | public static void hitKeys(WebDriver driver, CharSequence keys) {
new Actions(driver)
.sendKeys(keys)
.perform()
;
} | java | public static void hitKeys(WebDriver driver, CharSequence keys) {
new Actions(driver)
.sendKeys(keys)
.perform()
;
} | [
"public",
"static",
"void",
"hitKeys",
"(",
"WebDriver",
"driver",
",",
"CharSequence",
"keys",
")",
"{",
"new",
"Actions",
"(",
"driver",
")",
".",
"sendKeys",
"(",
"keys",
")",
".",
"perform",
"(",
")",
";",
"}"
] | Typical use is to simulate hitting ESCAPE or ENTER.
@param driver
@param keys
@see Actions#sendKeys(CharSequence...) | [
"Typical",
"use",
"is",
"to",
"simulate",
"hitting",
"ESCAPE",
"or",
"ENTER",
"."
] | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java#L245-L250 |
146,158 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java | Term.getAllParameters | public List<Parameter> getAllParameters() {
List<Parameter> ret = new ArrayList<Parameter>();
if (parameters != null)
ret.addAll(parameters);
if (terms != null) {
for (final Term t : terms) {
ret.addAll(t.getAllParameters());
}
}
... | java | public List<Parameter> getAllParameters() {
List<Parameter> ret = new ArrayList<Parameter>();
if (parameters != null)
ret.addAll(parameters);
if (terms != null) {
for (final Term t : terms) {
ret.addAll(t.getAllParameters());
}
}
... | [
"public",
"List",
"<",
"Parameter",
">",
"getAllParameters",
"(",
")",
"{",
"List",
"<",
"Parameter",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"Parameter",
">",
"(",
")",
";",
"if",
"(",
"parameters",
"!=",
"null",
")",
"ret",
".",
"addAll",
"(",
"p... | Returns a list of all parameters contained by both this term and any
nested terms.
@return Non-null list of parameters | [
"Returns",
"a",
"list",
"of",
"all",
"parameters",
"contained",
"by",
"both",
"this",
"term",
"and",
"any",
"nested",
"terms",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java#L272-L285 |
146,159 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java | Term.getAllTerms | public List<Term> getAllTerms() {
List<Term> ret = new ArrayList<Term>();
if (terms != null) {
ret.addAll(terms);
for (final Term term : terms) {
ret.addAll(term.getAllTerms());
}
}
return ret;
} | java | public List<Term> getAllTerms() {
List<Term> ret = new ArrayList<Term>();
if (terms != null) {
ret.addAll(terms);
for (final Term term : terms) {
ret.addAll(term.getAllTerms());
}
}
return ret;
} | [
"public",
"List",
"<",
"Term",
">",
"getAllTerms",
"(",
")",
"{",
"List",
"<",
"Term",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"Term",
">",
"(",
")",
";",
"if",
"(",
"terms",
"!=",
"null",
")",
"{",
"ret",
".",
"addAll",
"(",
"terms",
")",
";... | Returns a list of all terms contained by and within this term.
@return Non-null list of terms | [
"Returns",
"a",
"list",
"of",
"all",
"terms",
"contained",
"by",
"and",
"within",
"this",
"term",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java#L315-L326 |
146,160 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java | Term.setFunctionArgs | private void setFunctionArgs(final List<BELObject> args) {
if (args != null) {
this.functionArgs = args;
this.terms = new ArrayList<Term>();
this.parameters = new ArrayList<Parameter>();
for (final BELObject arg : functionArgs) {
if (arg instanceof... | java | private void setFunctionArgs(final List<BELObject> args) {
if (args != null) {
this.functionArgs = args;
this.terms = new ArrayList<Term>();
this.parameters = new ArrayList<Parameter>();
for (final BELObject arg : functionArgs) {
if (arg instanceof... | [
"private",
"void",
"setFunctionArgs",
"(",
"final",
"List",
"<",
"BELObject",
">",
"args",
")",
"{",
"if",
"(",
"args",
"!=",
"null",
")",
"{",
"this",
".",
"functionArgs",
"=",
"args",
";",
"this",
".",
"terms",
"=",
"new",
"ArrayList",
"<",
"Term",
... | Sets the function arguments, terms, and parameters. A null argument will
result in null function arguments, terms, and parameters.
@param args List of BEL objects, or null
@throws UnsupportedOperationException Thrown if a {@link BELObject}
within {@code args} is not a {@link Term} or {@link Parameter} | [
"Sets",
"the",
"function",
"arguments",
"terms",
"and",
"parameters",
".",
"A",
"null",
"argument",
"will",
"result",
"in",
"null",
"function",
"arguments",
"terms",
"and",
"parameters",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java#L562-L583 |
146,161 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/oauth/OAuth2Bootstrapper.java | OAuth2Bootstrapper.getAuthorizeBrowserUrl | public URI getAuthorizeBrowserUrl()
{
OAuth2AppInfo appInfo = sessionManager.getAppInfo();
state = PcsUtils.randomString( 30 );
URI uri = new URIBuilder( URI.create( sessionManager.getAuthorizeUrl() ) )
.addParameter( OAuth2.CLIENT_ID, appInfo.getAppId() )
.a... | java | public URI getAuthorizeBrowserUrl()
{
OAuth2AppInfo appInfo = sessionManager.getAppInfo();
state = PcsUtils.randomString( 30 );
URI uri = new URIBuilder( URI.create( sessionManager.getAuthorizeUrl() ) )
.addParameter( OAuth2.CLIENT_ID, appInfo.getAppId() )
.a... | [
"public",
"URI",
"getAuthorizeBrowserUrl",
"(",
")",
"{",
"OAuth2AppInfo",
"appInfo",
"=",
"sessionManager",
".",
"getAppInfo",
"(",
")",
";",
"state",
"=",
"PcsUtils",
".",
"randomString",
"(",
"30",
")",
";",
"URI",
"uri",
"=",
"new",
"URIBuilder",
"(",
... | Builds the authorize URI that must be loaded in a browser to allow the application to use the API
@return The authorize URI | [
"Builds",
"the",
"authorize",
"URI",
"that",
"must",
"be",
"loaded",
"in",
"a",
"browser",
"to",
"allow",
"the",
"application",
"to",
"use",
"the",
"API"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/oauth/OAuth2Bootstrapper.java#L64-L78 |
146,162 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/oauth/OAuth2Bootstrapper.java | OAuth2Bootstrapper.getUserCredentials | public void getUserCredentials( String codeOrUrl )
throws IOException
{
if ( state == null ) {
// should not occur if this class is used properly
throw new IllegalStateException( "No anti CSRF state defined" );
}
String code;
if ( codeOrUrl.starts... | java | public void getUserCredentials( String codeOrUrl )
throws IOException
{
if ( state == null ) {
// should not occur if this class is used properly
throw new IllegalStateException( "No anti CSRF state defined" );
}
String code;
if ( codeOrUrl.starts... | [
"public",
"void",
"getUserCredentials",
"(",
"String",
"codeOrUrl",
")",
"throws",
"IOException",
"{",
"if",
"(",
"state",
"==",
"null",
")",
"{",
"// should not occur if this class is used properly",
"throw",
"new",
"IllegalStateException",
"(",
"\"No anti CSRF state def... | Gets users Credentials
@param codeOrUrl code or redirect URL provided by the browser
@throws IOException | [
"Gets",
"users",
"Credentials"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/oauth/OAuth2Bootstrapper.java#L86-L134 |
146,163 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/net/ConnectivityManagerUtils.java | ConnectivityManagerUtils.isNetworkConnected | public static boolean isNetworkConnected(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = manager.getActiveNetworkInfo();
return info != null && info.isConnected();
} | java | public static boolean isNetworkConnected(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = manager.getActiveNetworkInfo();
return info != null && info.isConnected();
} | [
"public",
"static",
"boolean",
"isNetworkConnected",
"(",
"Context",
"context",
")",
"{",
"ConnectivityManager",
"manager",
"=",
"(",
"ConnectivityManager",
")",
"context",
".",
"getSystemService",
"(",
"Context",
".",
"CONNECTIVITY_SERVICE",
")",
";",
"NetworkInfo",
... | Checks if the network is connected or not.
@param context the context.
@return true if the network is connected. | [
"Checks",
"if",
"the",
"network",
"is",
"connected",
"or",
"not",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/net/ConnectivityManagerUtils.java#L36-L40 |
146,164 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/net/ConnectivityManagerUtils.java | ConnectivityManagerUtils.isNetworkAvailable | public static boolean isNetworkAvailable(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = manager.getActiveNetworkInfo();
return info != null && info.isAvailable();
} | java | public static boolean isNetworkAvailable(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = manager.getActiveNetworkInfo();
return info != null && info.isAvailable();
} | [
"public",
"static",
"boolean",
"isNetworkAvailable",
"(",
"Context",
"context",
")",
"{",
"ConnectivityManager",
"manager",
"=",
"(",
"ConnectivityManager",
")",
"context",
".",
"getSystemService",
"(",
"Context",
".",
"CONNECTIVITY_SERVICE",
")",
";",
"NetworkInfo",
... | Checks if the network is available or not.
This is not guarantee that the network is connected and can communicate through the network.
@param context the context.
@return true if the network is available. | [
"Checks",
"if",
"the",
"network",
"is",
"available",
"or",
"not",
".",
"This",
"is",
"not",
"guarantee",
"that",
"the",
"network",
"is",
"connected",
"and",
"can",
"communicate",
"through",
"the",
"network",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/net/ConnectivityManagerUtils.java#L48-L52 |
146,165 | ihaolin/session | session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java | RedisSessionManager.initJedisPool | private void initJedisPool(Properties props) {
JedisPoolConfig config = new JedisPoolConfig();
config.setTestOnBorrow(true);
Integer maxIdle = Integer.parseInt(props.getProperty("session.redis.pool.max.idle", "2"));
config.setMaxIdle(maxIdle);
Integer maxTotal = Integer.parseI... | java | private void initJedisPool(Properties props) {
JedisPoolConfig config = new JedisPoolConfig();
config.setTestOnBorrow(true);
Integer maxIdle = Integer.parseInt(props.getProperty("session.redis.pool.max.idle", "2"));
config.setMaxIdle(maxIdle);
Integer maxTotal = Integer.parseI... | [
"private",
"void",
"initJedisPool",
"(",
"Properties",
"props",
")",
"{",
"JedisPoolConfig",
"config",
"=",
"new",
"JedisPoolConfig",
"(",
")",
";",
"config",
".",
"setTestOnBorrow",
"(",
"true",
")",
";",
"Integer",
"maxIdle",
"=",
"Integer",
".",
"parseInt",... | init jedis pool with properties
@param props | [
"init",
"jedis",
"pool",
"with",
"properties"
] | 322c3a9f47b305a39345135fa8163dd7e065b4f8 | https://github.com/ihaolin/session/blob/322c3a9f47b305a39345135fa8163dd7e065b4f8/session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java#L53-L72 |
146,166 | ihaolin/session | session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java | RedisSessionManager.persist | public Boolean persist(final String id, final Map<String, Object> snapshot, final int maxInactiveInterval) {
final String sid = sessionPrefix + ":" + id;
try {
this.executor.execute(new RedisCallback<Void>() {
public Void execute(Jedis jedis) {
if (snapsho... | java | public Boolean persist(final String id, final Map<String, Object> snapshot, final int maxInactiveInterval) {
final String sid = sessionPrefix + ":" + id;
try {
this.executor.execute(new RedisCallback<Void>() {
public Void execute(Jedis jedis) {
if (snapsho... | [
"public",
"Boolean",
"persist",
"(",
"final",
"String",
"id",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"snapshot",
",",
"final",
"int",
"maxInactiveInterval",
")",
"{",
"final",
"String",
"sid",
"=",
"sessionPrefix",
"+",
"\":\"",
"+",
"id",... | persist session to session store
@param id session id
@param snapshot session attributes' snapshot
@param maxInactiveInterval session max life(seconds)
@return true if save successfully, or false | [
"persist",
"session",
"to",
"session",
"store"
] | 322c3a9f47b305a39345135fa8163dd7e065b4f8 | https://github.com/ihaolin/session/blob/322c3a9f47b305a39345135fa8163dd7e065b4f8/session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java#L81-L102 |
146,167 | ihaolin/session | session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java | RedisSessionManager.loadById | public Map<String, Object> loadById(String id) {
final String sid = sessionPrefix + ":" + id;
try {
return this.executor.execute(new RedisCallback<Map<String, Object>>() {
public Map<String, Object> execute(Jedis jedis) {
String session = jedis.get(sid);
... | java | public Map<String, Object> loadById(String id) {
final String sid = sessionPrefix + ":" + id;
try {
return this.executor.execute(new RedisCallback<Map<String, Object>>() {
public Map<String, Object> execute(Jedis jedis) {
String session = jedis.get(sid);
... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"loadById",
"(",
"String",
"id",
")",
"{",
"final",
"String",
"sid",
"=",
"sessionPrefix",
"+",
"\":\"",
"+",
"id",
";",
"try",
"{",
"return",
"this",
".",
"executor",
".",
"execute",
"(",
"new",
"R... | load session by id
@param id session id
@return session map object | [
"load",
"session",
"by",
"id"
] | 322c3a9f47b305a39345135fa8163dd7e065b4f8 | https://github.com/ihaolin/session/blob/322c3a9f47b305a39345135fa8163dd7e065b4f8/session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java#L109-L125 |
146,168 | ihaolin/session | session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java | RedisSessionManager.deleteById | public void deleteById(String id) {
final String sid = sessionPrefix + ":" + id;
try {
this.executor.execute(new RedisCallback<Void>() {
public Void execute(Jedis jedis) {
jedis.del(sid);
return null;
}
});
... | java | public void deleteById(String id) {
final String sid = sessionPrefix + ":" + id;
try {
this.executor.execute(new RedisCallback<Void>() {
public Void execute(Jedis jedis) {
jedis.del(sid);
return null;
}
});
... | [
"public",
"void",
"deleteById",
"(",
"String",
"id",
")",
"{",
"final",
"String",
"sid",
"=",
"sessionPrefix",
"+",
"\":\"",
"+",
"id",
";",
"try",
"{",
"this",
".",
"executor",
".",
"execute",
"(",
"new",
"RedisCallback",
"<",
"Void",
">",
"(",
")",
... | delete session physically
@param id session id | [
"delete",
"session",
"physically"
] | 322c3a9f47b305a39345135fa8163dd7e065b4f8 | https://github.com/ihaolin/session/blob/322c3a9f47b305a39345135fa8163dd7e065b4f8/session-redis/src/main/java/me/hao0/session/redis/RedisSessionManager.java#L131-L143 |
146,169 | geomajas/geomajas-project-client-gwt2 | plugin/geocoder/geocoder/src/main/java/org/geomajas/gwt2/plugin/geocoder/client/widget/GeocoderWidgetViewImpl.java | GeocoderWidgetViewImpl.getWidgetViewBbox | public Bbox getWidgetViewBbox() {
return new Bbox(textBox.getAbsoluteLeft(), textBox.getAbsoluteTop(),
textBox.getOffsetWidth(), textBox.getOffsetHeight());
} | java | public Bbox getWidgetViewBbox() {
return new Bbox(textBox.getAbsoluteLeft(), textBox.getAbsoluteTop(),
textBox.getOffsetWidth(), textBox.getOffsetHeight());
} | [
"public",
"Bbox",
"getWidgetViewBbox",
"(",
")",
"{",
"return",
"new",
"Bbox",
"(",
"textBox",
".",
"getAbsoluteLeft",
"(",
")",
",",
"textBox",
".",
"getAbsoluteTop",
"(",
")",
",",
"textBox",
".",
"getOffsetWidth",
"(",
")",
",",
"textBox",
".",
"getOffs... | Return the bbox of the textbox element. These bounds will be used to position the
alternative locations view.
@return bbox of the textbox | [
"Return",
"the",
"bbox",
"of",
"the",
"textbox",
"element",
".",
"These",
"bounds",
"will",
"be",
"used",
"to",
"position",
"the",
"alternative",
"locations",
"view",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/geocoder/geocoder/src/main/java/org/geomajas/gwt2/plugin/geocoder/client/widget/GeocoderWidgetViewImpl.java#L203-L206 |
146,170 | cattaka/CatHandsGendroid | cathandsgendroid-apt/src/main/java/net/cattaka/util/cathandsgendroid/apt/Bug300408.java | Bug300408.getEnclosedElementsDeclarationOrder | public static List<? extends Element> getEnclosedElementsDeclarationOrder(TypeElement type) {
List<? extends Element> result = null;
try {
Object binding = field(type, "_binding");
Class<?> sourceTypeBinding = null;
{
Class<?> c = binding.getClass();
... | java | public static List<? extends Element> getEnclosedElementsDeclarationOrder(TypeElement type) {
List<? extends Element> result = null;
try {
Object binding = field(type, "_binding");
Class<?> sourceTypeBinding = null;
{
Class<?> c = binding.getClass();
... | [
"public",
"static",
"List",
"<",
"?",
"extends",
"Element",
">",
"getEnclosedElementsDeclarationOrder",
"(",
"TypeElement",
"type",
")",
"{",
"List",
"<",
"?",
"extends",
"Element",
">",
"result",
"=",
"null",
";",
"try",
"{",
"Object",
"binding",
"=",
"fiel... | If given TypeElement is SourceTypeBinding, the order of results are corrected.
@param type target
@return the enclosed elements, or an empty list if none | [
"If",
"given",
"TypeElement",
"is",
"SourceTypeBinding",
"the",
"order",
"of",
"results",
"are",
"corrected",
"."
] | 6e496cc5901e0e1be2142c69cab898f61974db4d | https://github.com/cattaka/CatHandsGendroid/blob/6e496cc5901e0e1be2142c69cab898f61974db4d/cathandsgendroid-apt/src/main/java/net/cattaka/util/cathandsgendroid/apt/Bug300408.java#L28-L73 |
146,171 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/config/PropertyLoaderComposite.java | PropertyLoaderComposite.getProperty | @Override
public String getProperty(String key) {
for (PropertyLoader loader : loaders) {
String value = loader.getProperty(key);
if(value != null)
return value;
}
return null;
} | java | @Override
public String getProperty(String key) {
for (PropertyLoader loader : loaders) {
String value = loader.getProperty(key);
if(value != null)
return value;
}
return null;
} | [
"@",
"Override",
"public",
"String",
"getProperty",
"(",
"String",
"key",
")",
"{",
"for",
"(",
"PropertyLoader",
"loader",
":",
"loaders",
")",
"{",
"String",
"value",
"=",
"loader",
".",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"value",
"!=",
... | Loop over the components and
return the first not null value found. | [
"Loop",
"over",
"the",
"components",
"and",
"return",
"the",
"first",
"not",
"null",
"value",
"found",
"."
] | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/config/PropertyLoaderComposite.java#L22-L30 |
146,172 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/expressions/ValueExpression.java | ValueExpression.evaluate | public JsonNode evaluate(JsonNode node) {
if(innerExpression==null) {
return getValue(node, property);
} else {
return getValue(innerExpression.evaluate(node), property);
}
} | java | public JsonNode evaluate(JsonNode node) {
if(innerExpression==null) {
return getValue(node, property);
} else {
return getValue(innerExpression.evaluate(node), property);
}
} | [
"public",
"JsonNode",
"evaluate",
"(",
"JsonNode",
"node",
")",
"{",
"if",
"(",
"innerExpression",
"==",
"null",
")",
"{",
"return",
"getValue",
"(",
"node",
",",
"property",
")",
";",
"}",
"else",
"{",
"return",
"getValue",
"(",
"innerExpression",
".",
... | Evaluates the expression on passed JSONNode
@param node JSONNode object
@return returns the value of the property | [
"Evaluates",
"the",
"expression",
"on",
"passed",
"JSONNode"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/expressions/ValueExpression.java#L34-L40 |
146,173 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/expressions/ValueExpression.java | ValueExpression.getValue | protected JsonNode getValue(JsonNode node, String property) {
if(node==null) {
throw new MissingNodeException(property + " is missing");
}
if(property==null) {
return node;
}
JsonNode value = node.at(formatPropertyName(property));
if (value.isMissingNode()) {
throw new MissingNodeException(pr... | java | protected JsonNode getValue(JsonNode node, String property) {
if(node==null) {
throw new MissingNodeException(property + " is missing");
}
if(property==null) {
return node;
}
JsonNode value = node.at(formatPropertyName(property));
if (value.isMissingNode()) {
throw new MissingNodeException(pr... | [
"protected",
"JsonNode",
"getValue",
"(",
"JsonNode",
"node",
",",
"String",
"property",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"MissingNodeException",
"(",
"property",
"+",
"\" is missing\"",
")",
";",
"}",
"if",
"(",
"proper... | Fetches the value for a property from the passed JsonNode. Throws MissingNodeException if the property doesn't exist
@param node JSONNode Object
@param property Property for which the value should be returned
@return returns the value of the property | [
"Fetches",
"the",
"value",
"for",
"a",
"property",
"from",
"the",
"passed",
"JsonNode",
".",
"Throws",
"MissingNodeException",
"if",
"the",
"property",
"doesn",
"t",
"exist"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/expressions/ValueExpression.java#L48-L62 |
146,174 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java | TagSetMappingsToNAF.mapGermanCoNLL09TagSetToNAF | private static String mapGermanCoNLL09TagSetToNAF(final String postag) {
if (postag.startsWith("ADV")) {
return "A"; // adverb
} else if (postag.startsWith("KO")) {
return "C"; // conjunction
} else if (postag.equalsIgnoreCase("ART")) {
return "D"; // determiner and predeterminer
} els... | java | private static String mapGermanCoNLL09TagSetToNAF(final String postag) {
if (postag.startsWith("ADV")) {
return "A"; // adverb
} else if (postag.startsWith("KO")) {
return "C"; // conjunction
} else if (postag.equalsIgnoreCase("ART")) {
return "D"; // determiner and predeterminer
} els... | [
"private",
"static",
"String",
"mapGermanCoNLL09TagSetToNAF",
"(",
"final",
"String",
"postag",
")",
"{",
"if",
"(",
"postag",
".",
"startsWith",
"(",
"\"ADV\"",
")",
")",
"{",
"return",
"\"A\"",
";",
"// adverb",
"}",
"else",
"if",
"(",
"postag",
".",
"st... | Mapping between CoNLL 2009 German tagset and NAF tagset. Based on the
Stuttgart-Tuebingen tagset.
@param postag
the postag
@return NAF POS tag | [
"Mapping",
"between",
"CoNLL",
"2009",
"German",
"tagset",
"and",
"NAF",
"tagset",
".",
"Based",
"on",
"the",
"Stuttgart",
"-",
"Tuebingen",
"tagset",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java#L91-L115 |
146,175 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java | TagSetMappingsToNAF.mapEnglishPennTagSetToNAF | private static String mapEnglishPennTagSetToNAF(final String postag) {
if (postag.startsWith("RB")) {
return "A"; // adverb
} else if (postag.equalsIgnoreCase("CC")) {
return "C"; // conjunction
} else if (postag.startsWith("D") || postag.equalsIgnoreCase("PDT")) {
return "D"; // determine... | java | private static String mapEnglishPennTagSetToNAF(final String postag) {
if (postag.startsWith("RB")) {
return "A"; // adverb
} else if (postag.equalsIgnoreCase("CC")) {
return "C"; // conjunction
} else if (postag.startsWith("D") || postag.equalsIgnoreCase("PDT")) {
return "D"; // determine... | [
"private",
"static",
"String",
"mapEnglishPennTagSetToNAF",
"(",
"final",
"String",
"postag",
")",
"{",
"if",
"(",
"postag",
".",
"startsWith",
"(",
"\"RB\"",
")",
")",
"{",
"return",
"\"A\"",
";",
"// adverb",
"}",
"else",
"if",
"(",
"postag",
".",
"equal... | Mapping between Penn Treebank tagset and NAF tagset.
@param postag
treebank postag
@return NAF POS tag | [
"Mapping",
"between",
"Penn",
"Treebank",
"tagset",
"and",
"NAF",
"tagset",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java#L124-L147 |
146,176 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java | TagSetMappingsToNAF.mapSpanishAncoraTagSetToNAF | private static String mapSpanishAncoraTagSetToNAF(final String postag) {
if (postag.equalsIgnoreCase("RG") || postag.equalsIgnoreCase("RN")) {
return "A"; // adverb
} else if (postag.equalsIgnoreCase("CC") || postag.equalsIgnoreCase("CS")) {
return "C"; // conjunction
} else if (postag.startsWit... | java | private static String mapSpanishAncoraTagSetToNAF(final String postag) {
if (postag.equalsIgnoreCase("RG") || postag.equalsIgnoreCase("RN")) {
return "A"; // adverb
} else if (postag.equalsIgnoreCase("CC") || postag.equalsIgnoreCase("CS")) {
return "C"; // conjunction
} else if (postag.startsWit... | [
"private",
"static",
"String",
"mapSpanishAncoraTagSetToNAF",
"(",
"final",
"String",
"postag",
")",
"{",
"if",
"(",
"postag",
".",
"equalsIgnoreCase",
"(",
"\"RG\"",
")",
"||",
"postag",
".",
"equalsIgnoreCase",
"(",
"\"RN\"",
")",
")",
"{",
"return",
"\"A\""... | Mapping between EAGLES PAROLE Ancora tagset and NAF.
@param postag
the postag
@return the mapping to NAF pos tagset | [
"Mapping",
"between",
"EAGLES",
"PAROLE",
"Ancora",
"tagset",
"and",
"NAF",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/pos/TagSetMappingsToNAF.java#L156-L178 |
146,177 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.redraw | public void redraw() {
shapes.clear();
if (container != null) {
container.setTranslation(0, 0);
container.clear();
try {
tentativeMoveLine = new Path(-5, -5);
tentativeMoveLine.lineTo(-5, -5);
ShapeStyle style = styleProvider.getEdgeTentativeMoveStyle();
GeomajasImpl.getInstance().getGfxUti... | java | public void redraw() {
shapes.clear();
if (container != null) {
container.setTranslation(0, 0);
container.clear();
try {
tentativeMoveLine = new Path(-5, -5);
tentativeMoveLine.lineTo(-5, -5);
ShapeStyle style = styleProvider.getEdgeTentativeMoveStyle();
GeomajasImpl.getInstance().getGfxUti... | [
"public",
"void",
"redraw",
"(",
")",
"{",
"shapes",
".",
"clear",
"(",
")",
";",
"if",
"(",
"container",
"!=",
"null",
")",
"{",
"container",
".",
"setTranslation",
"(",
"0",
",",
"0",
")",
";",
"container",
".",
"clear",
"(",
")",
";",
"try",
"... | Clear everything and completely redraw the edited geometry. | [
"Clear",
"everything",
"and",
"completely",
"redraw",
"the",
"edited",
"geometry",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L159-L175 |
146,178 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.onGeometryEditStart | public void onGeometryEditStart(GeometryEditStartEvent event) {
if (container != null) {
mapPresenter.getContainerManager().removeVectorContainer(container);
}
container = mapPresenter.getContainerManager().addScreenContainer();
redraw();
} | java | public void onGeometryEditStart(GeometryEditStartEvent event) {
if (container != null) {
mapPresenter.getContainerManager().removeVectorContainer(container);
}
container = mapPresenter.getContainerManager().addScreenContainer();
redraw();
} | [
"public",
"void",
"onGeometryEditStart",
"(",
"GeometryEditStartEvent",
"event",
")",
"{",
"if",
"(",
"container",
"!=",
"null",
")",
"{",
"mapPresenter",
".",
"getContainerManager",
"(",
")",
".",
"removeVectorContainer",
"(",
"container",
")",
";",
"}",
"conta... | Clean up the previous state, create a container to draw in and then draw the geometry. | [
"Clean",
"up",
"the",
"previous",
"state",
"create",
"a",
"container",
"to",
"draw",
"in",
"and",
"then",
"draw",
"the",
"geometry",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L195-L201 |
146,179 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.onGeometryEditStop | public void onGeometryEditStop(GeometryEditStopEvent event) {
// Remove the vector container from the map:
mapPresenter.getContainerManager().removeVectorContainer(container);
container = null;
shapes.clear();
} | java | public void onGeometryEditStop(GeometryEditStopEvent event) {
// Remove the vector container from the map:
mapPresenter.getContainerManager().removeVectorContainer(container);
container = null;
shapes.clear();
} | [
"public",
"void",
"onGeometryEditStop",
"(",
"GeometryEditStopEvent",
"event",
")",
"{",
"// Remove the vector container from the map:",
"mapPresenter",
".",
"getContainerManager",
"(",
")",
".",
"removeVectorContainer",
"(",
"container",
")",
";",
"container",
"=",
"null... | Clean up all rendering. | [
"Clean",
"up",
"all",
"rendering",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L206-L211 |
146,180 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.onChangeEditingState | public void onChangeEditingState(GeometryEditChangeStateEvent event) {
switch (event.getEditingState()) {
case DRAGGING:
mapPresenter.setCursor("move");
break;
case IDLE:
default:
mapPresenter.setCursor("default");
redraw();
}
} | java | public void onChangeEditingState(GeometryEditChangeStateEvent event) {
switch (event.getEditingState()) {
case DRAGGING:
mapPresenter.setCursor("move");
break;
case IDLE:
default:
mapPresenter.setCursor("default");
redraw();
}
} | [
"public",
"void",
"onChangeEditingState",
"(",
"GeometryEditChangeStateEvent",
"event",
")",
"{",
"switch",
"(",
"event",
".",
"getEditingState",
"(",
")",
")",
"{",
"case",
"DRAGGING",
":",
"mapPresenter",
".",
"setCursor",
"(",
"\"move\"",
")",
";",
"break",
... | Change the cursor while dragging. | [
"Change",
"the",
"cursor",
"while",
"dragging",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L314-L324 |
146,181 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.onGeometryEditMove | public void onGeometryEditMove(GeometryEditMoveEvent event) {
// Find the elements that need updating:
Map<GeometryIndex, Boolean> indicesToUpdate = new HashMap<GeometryIndex, Boolean>();
for (GeometryIndex index : event.getIndices()) {
if (!indicesToUpdate.containsKey(index)) {
indicesToUpdate.put(index, ... | java | public void onGeometryEditMove(GeometryEditMoveEvent event) {
// Find the elements that need updating:
Map<GeometryIndex, Boolean> indicesToUpdate = new HashMap<GeometryIndex, Boolean>();
for (GeometryIndex index : event.getIndices()) {
if (!indicesToUpdate.containsKey(index)) {
indicesToUpdate.put(index, ... | [
"public",
"void",
"onGeometryEditMove",
"(",
"GeometryEditMoveEvent",
"event",
")",
"{",
"// Find the elements that need updating:",
"Map",
"<",
"GeometryIndex",
",",
"Boolean",
">",
"indicesToUpdate",
"=",
"new",
"HashMap",
"<",
"GeometryIndex",
",",
"Boolean",
">",
... | Figure out what's being moved and update only adjacent objects. This is far more performing than simply redrawing
everything. | [
"Figure",
"out",
"what",
"s",
"being",
"moved",
"and",
"update",
"only",
"adjacent",
"objects",
".",
"This",
"is",
"far",
"more",
"performing",
"than",
"simply",
"redrawing",
"everything",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L341-L411 |
146,182 | geomajas/geomajas-project-client-gwt2 | plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java | GeometryRendererImpl.onTentativeMove | public void onTentativeMove(GeometryEditTentativeMoveEvent event) {
try {
Coordinate[] vertices = editService.getIndexService().getSiblingVertices(editService.getGeometry(),
editService.getInsertIndex());
String geometryType = editService.getIndexService().getGeometryType(editService.getGeometry(),
ed... | java | public void onTentativeMove(GeometryEditTentativeMoveEvent event) {
try {
Coordinate[] vertices = editService.getIndexService().getSiblingVertices(editService.getGeometry(),
editService.getInsertIndex());
String geometryType = editService.getIndexService().getGeometryType(editService.getGeometry(),
ed... | [
"public",
"void",
"onTentativeMove",
"(",
"GeometryEditTentativeMoveEvent",
"event",
")",
"{",
"try",
"{",
"Coordinate",
"[",
"]",
"vertices",
"=",
"editService",
".",
"getIndexService",
"(",
")",
".",
"getSiblingVertices",
"(",
"editService",
".",
"getGeometry",
... | Renders a line from the last inserted point to the current mouse position, indicating what the new situation
would look like if a vertex where to be inserted at the mouse location. | [
"Renders",
"a",
"line",
"from",
"the",
"last",
"inserted",
"point",
"to",
"the",
"current",
"mouse",
"position",
"indicating",
"what",
"the",
"new",
"situation",
"would",
"look",
"like",
"if",
"a",
"vertex",
"where",
"to",
"be",
"inserted",
"at",
"the",
"m... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/impl/src/main/java/org/geomajas/gwt2/plugin/editing/client/gfx/GeometryRendererImpl.java#L417-L441 |
146,183 | geomajas/geomajas-project-client-gwt2 | plugin/wms/wms/src/main/java/org/geomajas/gwt2/plugin/wms/client/controller/WmsGetFeatureInfoController.java | WmsGetFeatureInfoController.onMouseUp | public void onMouseUp(MouseUpEvent event) {
// Do not interfere with default behaviour:
super.onMouseUp(event);
// Get the event location in world space:
Coordinate worldLocation = getLocation(event, RenderSpace.WORLD);
// Now execute the GetFeatureInfo for each layer:
for (FeatureInfoSupported layer : la... | java | public void onMouseUp(MouseUpEvent event) {
// Do not interfere with default behaviour:
super.onMouseUp(event);
// Get the event location in world space:
Coordinate worldLocation = getLocation(event, RenderSpace.WORLD);
// Now execute the GetFeatureInfo for each layer:
for (FeatureInfoSupported layer : la... | [
"public",
"void",
"onMouseUp",
"(",
"MouseUpEvent",
"event",
")",
"{",
"// Do not interfere with default behaviour:",
"super",
".",
"onMouseUp",
"(",
"event",
")",
";",
"// Get the event location in world space:",
"Coordinate",
"worldLocation",
"=",
"getLocation",
"(",
"e... | Execute a GetFeatureInfo on mouse up. | [
"Execute",
"a",
"GetFeatureInfo",
"on",
"mouse",
"up",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wms/wms/src/main/java/org/geomajas/gwt2/plugin/wms/client/controller/WmsGetFeatureInfoController.java#L75-L109 |
146,184 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/Query.java | Query.is | public boolean is(ComparisonExpression expr) {
try {
if (expr != null) {
return expr.evaluate(node);
}
} catch (MissingNodeException e) {
return false;
}
return false;
} | java | public boolean is(ComparisonExpression expr) {
try {
if (expr != null) {
return expr.evaluate(node);
}
} catch (MissingNodeException e) {
return false;
}
return false;
} | [
"public",
"boolean",
"is",
"(",
"ComparisonExpression",
"expr",
")",
"{",
"try",
"{",
"if",
"(",
"expr",
"!=",
"null",
")",
"{",
"return",
"expr",
".",
"evaluate",
"(",
"node",
")",
";",
"}",
"}",
"catch",
"(",
"MissingNodeException",
"e",
")",
"{",
... | Verifies if the passed expression is true for the JsonNode
@param expr
Comparison expression to be evaluated
@return returns if the expression is true for the JsonNode | [
"Verifies",
"if",
"the",
"passed",
"expression",
"is",
"true",
"for",
"the",
"JsonNode"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/Query.java#L53-L63 |
146,185 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/Query.java | Query.isExist | public boolean isExist(String property) {
try {
new ValueExpression(property).evaluate(node);
} catch (MissingNodeException e) {
return false;
}
return true;
} | java | public boolean isExist(String property) {
try {
new ValueExpression(property).evaluate(node);
} catch (MissingNodeException e) {
return false;
}
return true;
} | [
"public",
"boolean",
"isExist",
"(",
"String",
"property",
")",
"{",
"try",
"{",
"new",
"ValueExpression",
"(",
"property",
")",
".",
"evaluate",
"(",
"node",
")",
";",
"}",
"catch",
"(",
"MissingNodeException",
"e",
")",
"{",
"return",
"false",
";",
"}"... | Checks if property exist in the JsonNode
@param property
JSON property
@return Returns the value for the passed property | [
"Checks",
"if",
"property",
"exist",
"in",
"the",
"JsonNode"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/Query.java#L124-L131 |
146,186 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/Query.java | Query.filter | public ArrayNode filter(ComparisonExpression expression) {
ArrayNode result = new ObjectMapper().createArrayNode();
if (node.isArray()) {
Iterator<JsonNode> iterator = node.iterator();
int validObjectsCount = 0;
int topCount=0;
while (iterator.hasNext()) {
JsonNode curNode = iterator.next();
... | java | public ArrayNode filter(ComparisonExpression expression) {
ArrayNode result = new ObjectMapper().createArrayNode();
if (node.isArray()) {
Iterator<JsonNode> iterator = node.iterator();
int validObjectsCount = 0;
int topCount=0;
while (iterator.hasNext()) {
JsonNode curNode = iterator.next();
... | [
"public",
"ArrayNode",
"filter",
"(",
"ComparisonExpression",
"expression",
")",
"{",
"ArrayNode",
"result",
"=",
"new",
"ObjectMapper",
"(",
")",
".",
"createArrayNode",
"(",
")",
";",
"if",
"(",
"node",
".",
"isArray",
"(",
")",
")",
"{",
"Iterator",
"<"... | Allows filtering values in a ArrayNode as per passed ComparisonExpression
@param expression
@return | [
"Allows",
"filtering",
"values",
"in",
"a",
"ArrayNode",
"as",
"per",
"passed",
"ComparisonExpression"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/Query.java#L139-L165 |
146,187 | kcthota/JSONQuery | src/main/java/com/kcthota/JSONQuery/Query.java | Query.filter | public ArrayNode filter(String property, ComparisonExpression expression) {
JsonNode propValueNode = this.value(property);
return Query.q(propValueNode).top(this.getTop()).skip(this.getSkip()).filter(expression);
} | java | public ArrayNode filter(String property, ComparisonExpression expression) {
JsonNode propValueNode = this.value(property);
return Query.q(propValueNode).top(this.getTop()).skip(this.getSkip()).filter(expression);
} | [
"public",
"ArrayNode",
"filter",
"(",
"String",
"property",
",",
"ComparisonExpression",
"expression",
")",
"{",
"JsonNode",
"propValueNode",
"=",
"this",
".",
"value",
"(",
"property",
")",
";",
"return",
"Query",
".",
"q",
"(",
"propValueNode",
")",
".",
"... | Allows applying filter on a property value, which is ArrayNode, as per
passed ComparisonExpression
@param property
@param expression
@return | [
"Allows",
"applying",
"filter",
"on",
"a",
"property",
"value",
"which",
"is",
"ArrayNode",
"as",
"per",
"passed",
"ComparisonExpression"
] | 190f8fbcd05d42cfda265ecd8ce4ced192d57c16 | https://github.com/kcthota/JSONQuery/blob/190f8fbcd05d42cfda265ecd8ce4ced192d57c16/src/main/java/com/kcthota/JSONQuery/Query.java#L175-L178 |
146,188 | astrapi69/jaulp-wicket | jaulp-wicket-behaviors/src/main/java/de/alpharogroup/wicket/behaviors/animations/Animate.java | Animate.slideUpAndDown | public static void slideUpAndDown(final Component component, final AjaxRequestTarget target,
int slideUpDuration, int slideDownDuration)
{
component.add(new DisplayNoneBehavior());
target.prependJavaScript("notify|jQuery('#" + component.getMarkupId() + "').slideUp("
+ slideUpDuration + ", notify);");
targe... | java | public static void slideUpAndDown(final Component component, final AjaxRequestTarget target,
int slideUpDuration, int slideDownDuration)
{
component.add(new DisplayNoneBehavior());
target.prependJavaScript("notify|jQuery('#" + component.getMarkupId() + "').slideUp("
+ slideUpDuration + ", notify);");
targe... | [
"public",
"static",
"void",
"slideUpAndDown",
"(",
"final",
"Component",
"component",
",",
"final",
"AjaxRequestTarget",
"target",
",",
"int",
"slideUpDuration",
",",
"int",
"slideDownDuration",
")",
"{",
"component",
".",
"add",
"(",
"new",
"DisplayNoneBehavior",
... | Replace the given component with animation.
@param target
the target
@param component
the component
@param slideUpDuration
the slide up duration
@param slideDownDuration
the slide down duration | [
"Replace",
"the",
"given",
"component",
"with",
"animation",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-behaviors/src/main/java/de/alpharogroup/wicket/behaviors/animations/Animate.java#L54-L63 |
146,189 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/app/ApplicationUtils.java | ApplicationUtils.isDebuggable | public static boolean isDebuggable(Application app) {
ApplicationInfo info = app.getApplicationInfo();
return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} | java | public static boolean isDebuggable(Application app) {
ApplicationInfo info = app.getApplicationInfo();
return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} | [
"public",
"static",
"boolean",
"isDebuggable",
"(",
"Application",
"app",
")",
"{",
"ApplicationInfo",
"info",
"=",
"app",
".",
"getApplicationInfo",
"(",
")",
";",
"return",
"(",
"info",
".",
"flags",
"&",
"ApplicationInfo",
".",
"FLAG_DEBUGGABLE",
")",
"!=",... | Checks if the application is running as debug mode or not.
@param app the application to check
@return true if debuggable, false otherwise. | [
"Checks",
"if",
"the",
"application",
"is",
"running",
"as",
"debug",
"mode",
"or",
"not",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/ApplicationUtils.java#L58-L61 |
146,190 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/app/ApplicationUtils.java | ApplicationUtils.isInstalledOnSDCard | public static boolean isInstalledOnSDCard(Application app) {
try {
String packageName = app.getPackageName();
PackageInfo info = app.getPackageManager().getPackageInfo(packageName, 0);
String dir = info.applicationInfo.sourceDir;
for (String path : INTERNAL_PATH)... | java | public static boolean isInstalledOnSDCard(Application app) {
try {
String packageName = app.getPackageName();
PackageInfo info = app.getPackageManager().getPackageInfo(packageName, 0);
String dir = info.applicationInfo.sourceDir;
for (String path : INTERNAL_PATH)... | [
"public",
"static",
"boolean",
"isInstalledOnSDCard",
"(",
"Application",
"app",
")",
"{",
"try",
"{",
"String",
"packageName",
"=",
"app",
".",
"getPackageName",
"(",
")",
";",
"PackageInfo",
"info",
"=",
"app",
".",
"getPackageManager",
"(",
")",
".",
"get... | Checks if the application is installed on external storage, in most case on the SD card.
@param app the application to check.
@return true if the application is installed on external storage, false otherwise. | [
"Checks",
"if",
"the",
"application",
"is",
"installed",
"on",
"external",
"storage",
"in",
"most",
"case",
"on",
"the",
"SD",
"card",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/ApplicationUtils.java#L77-L91 |
146,191 | geomajas/geomajas-project-client-gwt2 | plugin/corewidget/corewidget/src/main/java/org/geomajas/gwt2/plugin/corewidget/client/feature/featureinfo/builder/AttributeWidgetFactory.java | AttributeWidgetFactory.removeAttributeBuilder | public void removeAttributeBuilder(AttributeWidgetBuilder<?> builder) {
Iterator<AttributeWidgetBuilder<?>> iterator = builders.values().iterator();
while (iterator.hasNext()) {
AttributeWidgetBuilder<?> widgetBuilder = iterator.next();
if (widgetBuilder.equals(builder)) {
iterator.remove();
}
}
} | java | public void removeAttributeBuilder(AttributeWidgetBuilder<?> builder) {
Iterator<AttributeWidgetBuilder<?>> iterator = builders.values().iterator();
while (iterator.hasNext()) {
AttributeWidgetBuilder<?> widgetBuilder = iterator.next();
if (widgetBuilder.equals(builder)) {
iterator.remove();
}
}
} | [
"public",
"void",
"removeAttributeBuilder",
"(",
"AttributeWidgetBuilder",
"<",
"?",
">",
"builder",
")",
"{",
"Iterator",
"<",
"AttributeWidgetBuilder",
"<",
"?",
">",
">",
"iterator",
"=",
"builders",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";"... | Remove an attribute widget builder from the collection.
@param builder the builder to remove. | [
"Remove",
"an",
"attribute",
"widget",
"builder",
"from",
"the",
"collection",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/corewidget/src/main/java/org/geomajas/gwt2/plugin/corewidget/client/feature/featureinfo/builder/AttributeWidgetFactory.java#L88-L96 |
146,192 | ihaolin/session | session-api/src/main/java/me/hao0/session/core/HttpSession2.java | HttpSession2.snapshot | public Map<String, Object> snapshot() {
Map<String, Object> snap = Maps.newHashMap();
snap.putAll(sessionStore);
snap.putAll(newAttributes);
for (String name : deleteAttribute) {
snap.remove(name);
}
return snap;
} | java | public Map<String, Object> snapshot() {
Map<String, Object> snap = Maps.newHashMap();
snap.putAll(sessionStore);
snap.putAll(newAttributes);
for (String name : deleteAttribute) {
snap.remove(name);
}
return snap;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"snapshot",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"snap",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"snap",
".",
"putAll",
"(",
"sessionStore",
")",
";",
"snap",
".",
"putA... | get session attributes' snapshot
@return session attributes' map object | [
"get",
"session",
"attributes",
"snapshot"
] | 322c3a9f47b305a39345135fa8163dd7e065b4f8 | https://github.com/ihaolin/session/blob/322c3a9f47b305a39345135fa8163dd7e065b4f8/session-api/src/main/java/me/hao0/session/core/HttpSession2.java#L207-L215 |
146,193 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.processInputDirectories | private void processInputDirectories() {
String[] inputdirs = getOptionValues(SHORT_OPT_IN_PATH);
final List<File> files = new ArrayList<File>();
final XBELFileFilter xbelFileFilter = new XBELFileFilter();
final BELFileFilter belFileFilter = new BELFileFilter();
for (String inpu... | java | private void processInputDirectories() {
String[] inputdirs = getOptionValues(SHORT_OPT_IN_PATH);
final List<File> files = new ArrayList<File>();
final XBELFileFilter xbelFileFilter = new XBELFileFilter();
final BELFileFilter belFileFilter = new BELFileFilter();
for (String inpu... | [
"private",
"void",
"processInputDirectories",
"(",
")",
"{",
"String",
"[",
"]",
"inputdirs",
"=",
"getOptionValues",
"(",
"SHORT_OPT_IN_PATH",
")",
";",
"final",
"List",
"<",
"File",
">",
"files",
"=",
"new",
"ArrayList",
"<",
"File",
">",
"(",
")",
";",
... | Process documents in the input directories. | [
"Process",
"documents",
"in",
"the",
"input",
"directories",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L195-L228 |
146,194 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.processFiles | private void processFiles() {
String[] fileArgs = getOptionValues(INFILE_SHORT_OPT);
final List<File> files = new ArrayList<File>(fileArgs.length);
for (final String fileArg : fileArgs) {
File file = new File(fileArg);
if (!file.canRead()) {
error(INPUT_FI... | java | private void processFiles() {
String[] fileArgs = getOptionValues(INFILE_SHORT_OPT);
final List<File> files = new ArrayList<File>(fileArgs.length);
for (final String fileArg : fileArgs) {
File file = new File(fileArg);
if (!file.canRead()) {
error(INPUT_FI... | [
"private",
"void",
"processFiles",
"(",
")",
"{",
"String",
"[",
"]",
"fileArgs",
"=",
"getOptionValues",
"(",
"INFILE_SHORT_OPT",
")",
";",
"final",
"List",
"<",
"File",
">",
"files",
"=",
"new",
"ArrayList",
"<",
"File",
">",
"(",
"fileArgs",
".",
"len... | Process file arguments. | [
"Process",
"file",
"arguments",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L233-L253 |
146,195 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.runCommonStages | private void runCommonStages(boolean pedantic, Document document) {
if (!stage2(document)) {
if (pedantic) {
bail(NAMESPACE_RESOLUTION_FAILURE);
}
}
if (!stage3(document)) {
if (pedantic) {
bail(SYMBOL_VERIFICATION_FAILURE);
... | java | private void runCommonStages(boolean pedantic, Document document) {
if (!stage2(document)) {
if (pedantic) {
bail(NAMESPACE_RESOLUTION_FAILURE);
}
}
if (!stage3(document)) {
if (pedantic) {
bail(SYMBOL_VERIFICATION_FAILURE);
... | [
"private",
"void",
"runCommonStages",
"(",
"boolean",
"pedantic",
",",
"Document",
"document",
")",
"{",
"if",
"(",
"!",
"stage2",
"(",
"document",
")",
")",
"{",
"if",
"(",
"pedantic",
")",
"{",
"bail",
"(",
"NAMESPACE_RESOLUTION_FAILURE",
")",
";",
"}",
... | Runs stages 2 - 7 which remain static regardless of the BEL document
input.
@param pedantic the flag for pedantic-ness
@param document the {@link Document BEL document} | [
"Runs",
"stages",
"2",
"-",
"7",
"which",
"remain",
"static",
"regardless",
"of",
"the",
"BEL",
"document",
"input",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L303-L335 |
146,196 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.stage2 | private boolean stage2(final Document document) {
beginStage(PHASE1_STAGE2_HDR, "2", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
Collection<Namespace> namespaces = document.getNamespaceMap().values();
final int docNSCount = namespaces.size();
bldr.append("Compi... | java | private boolean stage2(final Document document) {
beginStage(PHASE1_STAGE2_HDR, "2", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
Collection<Namespace> namespaces = document.getNamespaceMap().values();
final int docNSCount = namespaces.size();
bldr.append("Compi... | [
"private",
"boolean",
"stage2",
"(",
"final",
"Document",
"document",
")",
"{",
"beginStage",
"(",
"PHASE1_STAGE2_HDR",
",",
"\"2\"",
",",
"NUM_PHASES",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Collection",
"<",
... | Stage two resolution of document namespaces.
@param document BEL common document
@return boolean true if success, false otherwise | [
"Stage",
"two",
"resolution",
"of",
"document",
"namespaces",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L387-L422 |
146,197 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.stage3 | private boolean stage3(final Document document) {
beginStage(PHASE1_STAGE3_HDR, "3", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
if (hasOption(NO_SYNTAX_CHECK)) {
bldr.append(SYMBOL_CHECKS_DISABLED);
markEndStage(bldr);
stageOutput(bldr.toStri... | java | private boolean stage3(final Document document) {
beginStage(PHASE1_STAGE3_HDR, "3", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
if (hasOption(NO_SYNTAX_CHECK)) {
bldr.append(SYMBOL_CHECKS_DISABLED);
markEndStage(bldr);
stageOutput(bldr.toStri... | [
"private",
"boolean",
"stage3",
"(",
"final",
"Document",
"document",
")",
"{",
"beginStage",
"(",
"PHASE1_STAGE3_HDR",
",",
"\"3\"",
",",
"NUM_PHASES",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"hasOp... | Stage three symbol verification of the document.
@param document BEL common document
@return boolean true if success, false otherwise | [
"Stage",
"three",
"symbol",
"verification",
"of",
"the",
"document",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L430-L480 |
146,198 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.stage4 | private boolean stage4(final Document document) {
beginStage(PHASE1_STAGE4_HDR, "4", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
if (hasOption(NO_SEMANTIC_CHECK)) {
bldr.append(SEMANTIC_CHECKS_DISABLED);
markEndStage(bldr);
stageOutput(bldr.to... | java | private boolean stage4(final Document document) {
beginStage(PHASE1_STAGE4_HDR, "4", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
if (hasOption(NO_SEMANTIC_CHECK)) {
bldr.append(SEMANTIC_CHECKS_DISABLED);
markEndStage(bldr);
stageOutput(bldr.to... | [
"private",
"boolean",
"stage4",
"(",
"final",
"Document",
"document",
")",
"{",
"beginStage",
"(",
"PHASE1_STAGE4_HDR",
",",
"\"4\"",
",",
"NUM_PHASES",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"hasOp... | Stage four semantic verification of the document.
@param document BEL common document
@return boolean true if success, false otherwise | [
"Stage",
"four",
"semantic",
"verification",
"of",
"the",
"document",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L488-L535 |
146,199 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java | PhaseOneApplication.stage5 | private ProtoNetwork stage5(final Document document) {
beginStage(PHASE1_STAGE5_HDR, "5", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
bldr.append("Building proto-network for ");
bldr.append(document.getName());
stageOutput(bldr.toString());
long t1 = cu... | java | private ProtoNetwork stage5(final Document document) {
beginStage(PHASE1_STAGE5_HDR, "5", NUM_PHASES);
final StringBuilder bldr = new StringBuilder();
bldr.append("Building proto-network for ");
bldr.append(document.getName());
stageOutput(bldr.toString());
long t1 = cu... | [
"private",
"ProtoNetwork",
"stage5",
"(",
"final",
"Document",
"document",
")",
"{",
"beginStage",
"(",
"PHASE1_STAGE5_HDR",
",",
"\"5\"",
",",
"NUM_PHASES",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"bldr",
".",
... | Stage five build of proto-network.
@param document BEL common document | [
"Stage",
"five",
"build",
"of",
"proto",
"-",
"network",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L542-L560 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.