id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
147,500 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/painter/FeatureTransactionPainter.java | FeatureTransactionPainter.paint | public void paint(Paintable paintable, Object group, MapContext context) {
FeatureTransaction featureTransaction = (FeatureTransaction) paintable;
Feature[] features = featureTransaction.getNewFeatures();
if (features == null) {
return;
}
context.getVectorContext().drawGroup(mapWidget.getGroup(RenderGroup... | java | public void paint(Paintable paintable, Object group, MapContext context) {
FeatureTransaction featureTransaction = (FeatureTransaction) paintable;
Feature[] features = featureTransaction.getNewFeatures();
if (features == null) {
return;
}
context.getVectorContext().drawGroup(mapWidget.getGroup(RenderGroup... | [
"public",
"void",
"paint",
"(",
"Paintable",
"paintable",
",",
"Object",
"group",
",",
"MapContext",
"context",
")",
"{",
"FeatureTransaction",
"featureTransaction",
"=",
"(",
"FeatureTransaction",
")",
"paintable",
";",
"Feature",
"[",
"]",
"features",
"=",
"fe... | The actual painting function.
@param paintable
A {@link FeatureTransaction} object.
@param group
The group where the object resides in (optional).
@param context
A MapContext object, responsible for actual drawing. | [
"The",
"actual",
"painting",
"function",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/FeatureTransactionPainter.java#L80-L108 |
147,501 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java | ScaleSelect.setScales | @Api
public void setScales(Double... scales) {
// Sort decreasing and store the list:
Arrays.sort(scales, Collections.reverseOrder());
scaleList = Arrays.asList(scales);
// Apply the requested scales on the SelectItem. Make sure only available scales are added:
updateScaleList();
} | java | @Api
public void setScales(Double... scales) {
// Sort decreasing and store the list:
Arrays.sort(scales, Collections.reverseOrder());
scaleList = Arrays.asList(scales);
// Apply the requested scales on the SelectItem. Make sure only available scales are added:
updateScaleList();
} | [
"@",
"Api",
"public",
"void",
"setScales",
"(",
"Double",
"...",
"scales",
")",
"{",
"// Sort decreasing and store the list:",
"Arrays",
".",
"sort",
"(",
"scales",
",",
"Collections",
".",
"reverseOrder",
"(",
")",
")",
";",
"scaleList",
"=",
"Arrays",
".",
... | Set the specified relative scale values in the select item.
@param scales
array of relative scales (should be multiplied by pixelLength if in pixels/m)
@since 1.6.0 | [
"Set",
"the",
"specified",
"relative",
"scale",
"values",
"in",
"the",
"select",
"item",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java#L172-L179 |
147,502 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java | ScaleSelect.onKeyPress | public void onKeyPress(KeyPressEvent event) {
String name = event.getKeyName();
if (KeyNames.ENTER.equals(name)) {
reorderValues();
}
} | java | public void onKeyPress(KeyPressEvent event) {
String name = event.getKeyName();
if (KeyNames.ENTER.equals(name)) {
reorderValues();
}
} | [
"public",
"void",
"onKeyPress",
"(",
"KeyPressEvent",
"event",
")",
"{",
"String",
"name",
"=",
"event",
".",
"getKeyName",
"(",
")",
";",
"if",
"(",
"KeyNames",
".",
"ENTER",
".",
"equals",
"(",
"name",
")",
")",
"{",
"reorderValues",
"(",
")",
";",
... | Make sure that the scale in the scale select is applied on the map, when the user presses the 'Enter' key.
@see com.smartgwt.client.widgets.form.fields.events.KeyPressHandler#onKeyPress
(com.smartgwt.client.widgets.form.fields.events.KeyPressEvent) | [
"Make",
"sure",
"that",
"the",
"scale",
"in",
"the",
"scale",
"select",
"is",
"applied",
"on",
"the",
"map",
"when",
"the",
"user",
"presses",
"the",
"Enter",
"key",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java#L278-L283 |
147,503 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java | ScaleSelect.onChanged | public void onChanged(ChangedEvent event) {
String value = (String) scaleItem.getValue();
Double scale = valueToScale.get(value);
if (scale != null && !Double.isNaN(pixelLength) && 0.0 != pixelLength) {
mapView.setCurrentScale(scale / pixelLength, MapView.ZoomOption.LEVEL_CLOSEST);
}
} | java | public void onChanged(ChangedEvent event) {
String value = (String) scaleItem.getValue();
Double scale = valueToScale.get(value);
if (scale != null && !Double.isNaN(pixelLength) && 0.0 != pixelLength) {
mapView.setCurrentScale(scale / pixelLength, MapView.ZoomOption.LEVEL_CLOSEST);
}
} | [
"public",
"void",
"onChanged",
"(",
"ChangedEvent",
"event",
")",
"{",
"String",
"value",
"=",
"(",
"String",
")",
"scaleItem",
".",
"getValue",
"(",
")",
";",
"Double",
"scale",
"=",
"valueToScale",
".",
"get",
"(",
"value",
")",
";",
"if",
"(",
"scal... | When the user selects a different scale, have the map zoom to it.
@see com.smartgwt.client.widgets.form.fields.events.ChangedHandler#onChanged
(com.smartgwt.client.widgets.form.fields.events.ChangedEvent) | [
"When",
"the",
"user",
"selects",
"a",
"different",
"scale",
"have",
"the",
"map",
"zoom",
"to",
"it",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java#L291-L298 |
147,504 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java | ScaleSelect.updateScaleList | private void updateScaleList() {
refreshPixelLength(); /* retrieve pixelLength from mapWidget. Needed in case mapWidget wasn't fully initialized
the previous time the pixelLength was requested */
// Update lookup map (stores user friendly representation):
valueToScale.clear();
if (!Double.isNaN(pixelLengt... | java | private void updateScaleList() {
refreshPixelLength(); /* retrieve pixelLength from mapWidget. Needed in case mapWidget wasn't fully initialized
the previous time the pixelLength was requested */
// Update lookup map (stores user friendly representation):
valueToScale.clear();
if (!Double.isNaN(pixelLengt... | [
"private",
"void",
"updateScaleList",
"(",
")",
"{",
"refreshPixelLength",
"(",
")",
";",
"/* retrieve pixelLength from mapWidget. Needed in case mapWidget wasn't fully initialized\n\t\t\t\t\tthe previous time the pixelLength was requested */",
"// Update lookup map (stores user friendly repre... | Given the full list of desirable resolutions, which ones are actually available? Update the widget accordingly. | [
"Given",
"the",
"full",
"list",
"of",
"desirable",
"resolutions",
"which",
"ones",
"are",
"actually",
"available?",
"Update",
"the",
"widget",
"accordingly",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ScaleSelect.java#L311-L338 |
147,505 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java | TranslationsResourceIT.outdated_scenario | @Test
public void outdated_scenario() throws JSONException {
httpPost("keys", jsonKey.toString(), 201);
try {
// Add two outdated translations
sendTranslationUpdate("zztranslation", EN, true);
sendTranslationUpdate("translation", FR, true);
// Update... | java | @Test
public void outdated_scenario() throws JSONException {
httpPost("keys", jsonKey.toString(), 201);
try {
// Add two outdated translations
sendTranslationUpdate("zztranslation", EN, true);
sendTranslationUpdate("translation", FR, true);
// Update... | [
"@",
"Test",
"public",
"void",
"outdated_scenario",
"(",
")",
"throws",
"JSONException",
"{",
"httpPost",
"(",
"\"keys\"",
",",
"jsonKey",
".",
"toString",
"(",
")",
",",
"201",
")",
";",
"try",
"{",
"// Add two outdated translations",
"sendTranslationUpdate",
"... | Checks the outdated scenario.
1) A key is added
2) Add fr translation
3) Update default translation => key become outdated
4) Update en translation => key is still outdated
5) Update fr translation => key is no longer outdated | [
"Checks",
"the",
"outdated",
"scenario",
".",
"1",
")",
"A",
"key",
"is",
"added",
"2",
")",
"Add",
"fr",
"translation",
"3",
")",
"Update",
"default",
"translation",
"=",
">",
"key",
"become",
"outdated",
"4",
")",
"Update",
"en",
"translation",
"=",
... | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java#L76-L108 |
147,506 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java | TranslationsResourceIT.assertOutdatedStatus | private Response assertOutdatedStatus(boolean outdated) throws JSONException {
Response response = httpGet("keys/" + keyName);
JSONObject actual = new JSONObject(response.asString());
Assertions.assertThat(actual.getBoolean("outdated")).isEqualTo(outdated);
return response;
} | java | private Response assertOutdatedStatus(boolean outdated) throws JSONException {
Response response = httpGet("keys/" + keyName);
JSONObject actual = new JSONObject(response.asString());
Assertions.assertThat(actual.getBoolean("outdated")).isEqualTo(outdated);
return response;
} | [
"private",
"Response",
"assertOutdatedStatus",
"(",
"boolean",
"outdated",
")",
"throws",
"JSONException",
"{",
"Response",
"response",
"=",
"httpGet",
"(",
"\"keys/\"",
"+",
"keyName",
")",
";",
"JSONObject",
"actual",
"=",
"new",
"JSONObject",
"(",
"response",
... | Checks the outdated state of the key.
@param outdated expected value
@return true if outdated state of the key corresponding to the outdated param | [
"Checks",
"the",
"outdated",
"state",
"of",
"the",
"key",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java#L116-L121 |
147,507 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java | TranslationsResourceIT.sendTranslationUpdate | private void sendTranslationUpdate(String translation, String locale, boolean outdated) throws JSONException {
JSONObject jsonTranslationValueObject = new JSONObject();
jsonTranslationValueObject.put("translation", translation);
jsonTranslationValueObject.put("outdated", outdated);
jsonT... | java | private void sendTranslationUpdate(String translation, String locale, boolean outdated) throws JSONException {
JSONObject jsonTranslationValueObject = new JSONObject();
jsonTranslationValueObject.put("translation", translation);
jsonTranslationValueObject.put("outdated", outdated);
jsonT... | [
"private",
"void",
"sendTranslationUpdate",
"(",
"String",
"translation",
",",
"String",
"locale",
",",
"boolean",
"outdated",
")",
"throws",
"JSONException",
"{",
"JSONObject",
"jsonTranslationValueObject",
"=",
"new",
"JSONObject",
"(",
")",
";",
"jsonTranslationVal... | Sends an HTTP put request to update the translation for the given locale.
@param translation translation
@param locale locale
@param outdated outdated | [
"Sends",
"an",
"HTTP",
"put",
"request",
"to",
"update",
"the",
"translation",
"for",
"the",
"given",
"locale",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java#L130-L140 |
147,508 | geomajas/geomajas-project-client-gwt | plugin/editing/editing-gwt/src/main/java/org/geomajas/plugin/editing/gwt/client/snap/VectorLayerSourceProvider.java | VectorLayerSourceProvider.getSnappingSources | public void getSnappingSources(final GeometryArrayFunction callback) {
GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
SearchByLocationRequest request = new SearchByLocationRequest();
request.addLayerWithFilter(layer.getServerLayerId(), layer.getServerLayerId(), layer.getFilter());
... | java | public void getSnappingSources(final GeometryArrayFunction callback) {
GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
SearchByLocationRequest request = new SearchByLocationRequest();
request.addLayerWithFilter(layer.getServerLayerId(), layer.getServerLayerId(), layer.getFilter());
... | [
"public",
"void",
"getSnappingSources",
"(",
"final",
"GeometryArrayFunction",
"callback",
")",
"{",
"GwtCommand",
"commandRequest",
"=",
"new",
"GwtCommand",
"(",
"SearchByLocationRequest",
".",
"COMMAND",
")",
";",
"SearchByLocationRequest",
"request",
"=",
"new",
"... | Get the geometries of all features within the map view bounds. | [
"Get",
"the",
"geometries",
"of",
"all",
"features",
"within",
"the",
"map",
"view",
"bounds",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-gwt/src/main/java/org/geomajas/plugin/editing/gwt/client/snap/VectorLayerSourceProvider.java#L49-L73 |
147,509 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.foreach | public static void foreach(String path, Consumer<? super String> block) {
Ruby.Enumerator.of(new EachLineIterable(new File(path))).each(block);
} | java | public static void foreach(String path, Consumer<? super String> block) {
Ruby.Enumerator.of(new EachLineIterable(new File(path))).each(block);
} | [
"public",
"static",
"void",
"foreach",
"(",
"String",
"path",
",",
"Consumer",
"<",
"?",
"super",
"String",
">",
"block",
")",
"{",
"Ruby",
".",
"Enumerator",
".",
"of",
"(",
"new",
"EachLineIterable",
"(",
"new",
"File",
"(",
"path",
")",
")",
")",
... | Iterates a file line by line.
@param path
of a File
@param block
to process each line | [
"Iterates",
"a",
"file",
"line",
"by",
"line",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L297-L299 |
147,510 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.close | public void close() {
try {
raFile.close();
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
} | java | public void close() {
try {
raFile.close();
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
} | [
"public",
"void",
"close",
"(",
")",
"{",
"try",
"{",
"raFile",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"SEVERE",
",",
"null",
",",
"e",
")",
";",
"throw",
"new",
"R... | Closes this IO. | [
"Closes",
"this",
"IO",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L304-L311 |
147,511 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.puts | public void puts(String words) {
if (mode.isWritable() == false)
throw new IllegalStateException("IOError: not opened for writing");
try {
raFile.write(words.getBytes());
raFile.writeBytes(System.getProperty("line.separator"));
} catch (IOException e) {
logger.log(Level.SEVERE, null... | java | public void puts(String words) {
if (mode.isWritable() == false)
throw new IllegalStateException("IOError: not opened for writing");
try {
raFile.write(words.getBytes());
raFile.writeBytes(System.getProperty("line.separator"));
} catch (IOException e) {
logger.log(Level.SEVERE, null... | [
"public",
"void",
"puts",
"(",
"String",
"words",
")",
"{",
"if",
"(",
"mode",
".",
"isWritable",
"(",
")",
"==",
"false",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"IOError: not opened for writing\"",
")",
";",
"try",
"{",
"raFile",
".",
"write",... | Writes a line in the file.
@param words
to write a line
@throws IllegalStateException
if file is not writable | [
"Writes",
"a",
"line",
"in",
"the",
"file",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L335-L346 |
147,512 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.read | public String read() {
if (mode.isReadable() == false)
throw new IllegalStateException("IOError: not opened for reading");
StringBuilder sb = new StringBuilder();
try {
BufferedReader reader = new BufferedReader(new FileReader(file));
char[] buf = new char[1024];
int numOfChars = 0;... | java | public String read() {
if (mode.isReadable() == false)
throw new IllegalStateException("IOError: not opened for reading");
StringBuilder sb = new StringBuilder();
try {
BufferedReader reader = new BufferedReader(new FileReader(file));
char[] buf = new char[1024];
int numOfChars = 0;... | [
"public",
"String",
"read",
"(",
")",
"{",
"if",
"(",
"mode",
".",
"isReadable",
"(",
")",
"==",
"false",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"IOError: not opened for reading\"",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(... | Reads the content of a file.
@return String
@throws IllegalStateException
if file is not readable | [
"Reads",
"the",
"content",
"of",
"a",
"file",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L355-L373 |
147,513 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.seek | public void seek(long pos) {
try {
raFile.seek(pos);
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
} | java | public void seek(long pos) {
try {
raFile.seek(pos);
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
} | [
"public",
"void",
"seek",
"(",
"long",
"pos",
")",
"{",
"try",
"{",
"raFile",
".",
"seek",
"(",
"pos",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"SEVERE",
",",
"null",
",",
"e",
")",
";"... | Moves the cursor to certain position.
@param pos
position of the file | [
"Moves",
"the",
"cursor",
"to",
"certain",
"position",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L381-L388 |
147,514 | wnameless/rubycollect4j | src/main/java/net/sf/rubycollect4j/RubyIO.java | RubyIO.write | public int write(String words) {
if (mode.isWritable() == false)
throw new IllegalStateException("IOError: not opened for writing");
try {
raFile.write(words.getBytes());
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
return wor... | java | public int write(String words) {
if (mode.isWritable() == false)
throw new IllegalStateException("IOError: not opened for writing");
try {
raFile.write(words.getBytes());
} catch (IOException e) {
logger.log(Level.SEVERE, null, e);
throw new RuntimeException(e);
}
return wor... | [
"public",
"int",
"write",
"(",
"String",
"words",
")",
"{",
"if",
"(",
"mode",
".",
"isWritable",
"(",
")",
"==",
"false",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"IOError: not opened for writing\"",
")",
";",
"try",
"{",
"raFile",
".",
"write",... | Writes to the file.
@param words
to write
@return the number of written bytes.
@throws IllegalStateException
if file is not writable | [
"Writes",
"to",
"the",
"file",
"."
] | b8b8d8eccaca2254a3d09b91745882fb7a0d5add | https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyIO.java#L399-L410 |
147,515 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/LayersModelImpl.java | LayersModelImpl.getLayer | public Layer getLayer(String layerId) {
org.geomajas.gwt.client.map.layer.Layer<?> layer = mapModel.getLayer(layerId);
if (layer instanceof org.geomajas.gwt.client.map.layer.VectorLayer) {
return new VectorLayer((org.geomajas.gwt.client.map.layer.VectorLayer) layer);
}
return new LayerImpl(layer);
} | java | public Layer getLayer(String layerId) {
org.geomajas.gwt.client.map.layer.Layer<?> layer = mapModel.getLayer(layerId);
if (layer instanceof org.geomajas.gwt.client.map.layer.VectorLayer) {
return new VectorLayer((org.geomajas.gwt.client.map.layer.VectorLayer) layer);
}
return new LayerImpl(layer);
} | [
"public",
"Layer",
"getLayer",
"(",
"String",
"layerId",
")",
"{",
"org",
".",
"geomajas",
".",
"gwt",
".",
"client",
".",
"map",
".",
"layer",
".",
"Layer",
"<",
"?",
">",
"layer",
"=",
"mapModel",
".",
"getLayer",
"(",
"layerId",
")",
";",
"if",
... | Get a single layer by its identifier.
@param id
The layers unique identifier within this map.
@return Returns the layer, or null if it could not be found. | [
"Get",
"a",
"single",
"layer",
"by",
"its",
"identifier",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/LayersModelImpl.java#L61-L67 |
147,516 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/LayersModelImpl.java | LayersModelImpl.getLayerAt | public Layer getLayerAt(int index) {
org.geomajas.gwt.client.map.layer.Layer<?> layer = mapModel.getLayers().get(index);
if (layer instanceof org.geomajas.gwt.client.map.layer.VectorLayer) {
return new VectorLayer((org.geomajas.gwt.client.map.layer.VectorLayer) layer);
}
return new LayerImpl(layer);
} | java | public Layer getLayerAt(int index) {
org.geomajas.gwt.client.map.layer.Layer<?> layer = mapModel.getLayers().get(index);
if (layer instanceof org.geomajas.gwt.client.map.layer.VectorLayer) {
return new VectorLayer((org.geomajas.gwt.client.map.layer.VectorLayer) layer);
}
return new LayerImpl(layer);
} | [
"public",
"Layer",
"getLayerAt",
"(",
"int",
"index",
")",
"{",
"org",
".",
"geomajas",
".",
"gwt",
".",
"client",
".",
"map",
".",
"layer",
".",
"Layer",
"<",
"?",
">",
"layer",
"=",
"mapModel",
".",
"getLayers",
"(",
")",
".",
"get",
"(",
"index"... | Return the layer at a certain index. If the index can't be found, null is returned.
@param index
The specified index.
@return Returns the layer, or null if the index can't be found. | [
"Return",
"the",
"layer",
"at",
"a",
"certain",
"index",
".",
"If",
"the",
"index",
"can",
"t",
"be",
"found",
"null",
"is",
"returned",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/LayersModelImpl.java#L76-L82 |
147,517 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/geometry/operation/InsertRingOperation.java | InsertRingOperation.execute | public Geometry execute(Geometry geometry) {
if (geometry instanceof Polygon) {
Polygon polygon = (Polygon) geometry;
if (geometry.isEmpty()) {
return null;
} else {
LinearRing[] interiorRings = new LinearRing[polygon.getNumInteriorRing() + 1];
int count = 0;
for (int n = 0; n < interiorRings... | java | public Geometry execute(Geometry geometry) {
if (geometry instanceof Polygon) {
Polygon polygon = (Polygon) geometry;
if (geometry.isEmpty()) {
return null;
} else {
LinearRing[] interiorRings = new LinearRing[polygon.getNumInteriorRing() + 1];
int count = 0;
for (int n = 0; n < interiorRings... | [
"public",
"Geometry",
"execute",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"geometry",
"instanceof",
"Polygon",
")",
"{",
"Polygon",
"polygon",
"=",
"(",
"Polygon",
")",
"geometry",
";",
"if",
"(",
"geometry",
".",
"isEmpty",
"(",
")",
")",
"{",
... | Execute the operation! When the geometry is not a Polygon, null is returned. | [
"Execute",
"the",
"operation!",
"When",
"the",
"geometry",
"is",
"not",
"a",
"Polygon",
"null",
"is",
"returned",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/operation/InsertRingOperation.java#L50-L69 |
147,518 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java | DefaultFeatureForm.createItem | @Api
public FormItem createItem(AbstractReadOnlyAttributeInfo info) {
return AttributeFormFieldRegistry.createFormItem(info, attributeProvider.createProvider(info.getName()));
} | java | @Api
public FormItem createItem(AbstractReadOnlyAttributeInfo info) {
return AttributeFormFieldRegistry.createFormItem(info, attributeProvider.createProvider(info.getName()));
} | [
"@",
"Api",
"public",
"FormItem",
"createItem",
"(",
"AbstractReadOnlyAttributeInfo",
"info",
")",
"{",
"return",
"AttributeFormFieldRegistry",
".",
"createFormItem",
"(",
"info",
",",
"attributeProvider",
".",
"createProvider",
"(",
"info",
".",
"getName",
"(",
")"... | Creates a form item for a specific attribute.
@param info the attribute information.
@return the form item
@since 1.11.1 | [
"Creates",
"a",
"form",
"item",
"for",
"a",
"specific",
"attribute",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L188-L191 |
147,519 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java | DefaultFeatureForm.setValue | public void setValue(String name, BooleanAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
} | java | public void setValue(String name, BooleanAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
} | [
"public",
"void",
"setValue",
"(",
"String",
"name",
",",
"BooleanAttribute",
"attribute",
")",
"{",
"FormItem",
"item",
"=",
"formWidget",
".",
"getField",
"(",
"name",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"item",
".",
"setValue",
"(",
... | Apply a boolean attribute value on the form, with the given name.
@param name attribute name
@param attribute attribute value
@since 1.11.1 | [
"Apply",
"a",
"boolean",
"attribute",
"value",
"on",
"the",
"form",
"with",
"the",
"given",
"name",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L483-L488 |
147,520 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java | DefaultFeatureForm.setValue | @Api
public void setValue(String name, ShortAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
} | java | @Api
public void setValue(String name, ShortAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
} | [
"@",
"Api",
"public",
"void",
"setValue",
"(",
"String",
"name",
",",
"ShortAttribute",
"attribute",
")",
"{",
"FormItem",
"item",
"=",
"formWidget",
".",
"getField",
"(",
"name",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"item",
".",
"setVa... | Apply a short attribute value on the form, with the given name.
@param name attribute name
@param attribute attribute value
@since 1.11.1 | [
"Apply",
"a",
"short",
"attribute",
"value",
"on",
"the",
"form",
"with",
"the",
"given",
"name",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L497-L503 |
147,521 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/action/menu/AttributesAction.java | AttributesAction.onClick | public void onClick(MenuItemClickEvent event) {
final FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
if (ft != null) {
SimpleFeatureAttributeWindow window = new SimpleFeatureAttributeWindow(ft.getNewFeatures()[0]) {
public void onOk(Feature feature) {
// Cop... | java | public void onClick(MenuItemClickEvent event) {
final FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
if (ft != null) {
SimpleFeatureAttributeWindow window = new SimpleFeatureAttributeWindow(ft.getNewFeatures()[0]) {
public void onOk(Feature feature) {
// Cop... | [
"public",
"void",
"onClick",
"(",
"MenuItemClickEvent",
"event",
")",
"{",
"final",
"FeatureTransaction",
"ft",
"=",
"mapWidget",
".",
"getMapModel",
"(",
")",
".",
"getFeatureEditor",
"(",
")",
".",
"getFeatureTransaction",
"(",
")",
";",
"if",
"(",
"ft",
"... | Remove an existing ring from a Polygon or MultiPolygon at a given index.
@param event
The {@link MenuItemClickEvent} from clicking the action. | [
"Remove",
"an",
"existing",
"ring",
"from",
"a",
"Polygon",
"or",
"MultiPolygon",
"at",
"a",
"given",
"index",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/AttributesAction.java#L57-L73 |
147,522 | geomajas/geomajas-project-client-gwt | plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java | WizardPage.savePage | public void savePage(WizardView view, Runnable successCallback, Runnable failureCallback) {
if (null != successCallback) {
successCallback.run();
}
} | java | public void savePage(WizardView view, Runnable successCallback, Runnable failureCallback) {
if (null != successCallback) {
successCallback.run();
}
} | [
"public",
"void",
"savePage",
"(",
"WizardView",
"view",
",",
"Runnable",
"successCallback",
",",
"Runnable",
"failureCallback",
")",
"{",
"if",
"(",
"null",
"!=",
"successCallback",
")",
"{",
"successCallback",
".",
"run",
"(",
")",
";",
"}",
"}"
] | Save the page data. This can communicate with the server if needed. The return is handled by calling either the
success or failure callback.
@param view wizard view
@param successCallback what to do on success
@param failureCallback what to do on failure | [
"Save",
"the",
"page",
"data",
".",
"This",
"can",
"communicate",
"with",
"the",
"server",
"if",
"needed",
".",
"The",
"return",
"is",
"handled",
"by",
"calling",
"either",
"the",
"success",
"or",
"failure",
"callback",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java#L117-L121 |
147,523 | geomajas/geomajas-project-client-gwt | plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java | WizardPage.canShow | public boolean canShow() {
WizardPage<DATA> back = getPreviousPage();
while (back != null && back.isValid()) {
back = back.getPreviousPage();
}
return back == null;
} | java | public boolean canShow() {
WizardPage<DATA> back = getPreviousPage();
while (back != null && back.isValid()) {
back = back.getPreviousPage();
}
return back == null;
} | [
"public",
"boolean",
"canShow",
"(",
")",
"{",
"WizardPage",
"<",
"DATA",
">",
"back",
"=",
"getPreviousPage",
"(",
")",
";",
"while",
"(",
"back",
"!=",
"null",
"&&",
"back",
".",
"isValid",
"(",
")",
")",
"{",
"back",
"=",
"back",
".",
"getPrevious... | Returns whether this page can already be shown to the user. Default implementation checks whether all previous
pages have been validated.
@return true if page can be shown | [
"Returns",
"whether",
"this",
"page",
"can",
"already",
"be",
"shown",
"to",
"the",
"user",
".",
"Default",
"implementation",
"checks",
"whether",
"all",
"previous",
"pages",
"have",
"been",
"validated",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java#L143-L149 |
147,524 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java | ExceptionWindow.buildGui | private void buildGui() {
setTitle(I18nProvider.getGlobal().commandError());
setHeaderIcon(WidgetLayout.iconError);
setIsModal(true);
setShowModalMask(true);
setModalMaskOpacity(WidgetLayout.modalMaskOpacity);
setWidth(WidgetLayout.exceptionWindowWidth);
setHeight(WidgetLayout.exceptionWindowHeightNormal)... | java | private void buildGui() {
setTitle(I18nProvider.getGlobal().commandError());
setHeaderIcon(WidgetLayout.iconError);
setIsModal(true);
setShowModalMask(true);
setModalMaskOpacity(WidgetLayout.modalMaskOpacity);
setWidth(WidgetLayout.exceptionWindowWidth);
setHeight(WidgetLayout.exceptionWindowHeightNormal)... | [
"private",
"void",
"buildGui",
"(",
")",
"{",
"setTitle",
"(",
"I18nProvider",
".",
"getGlobal",
"(",
")",
".",
"commandError",
"(",
")",
")",
";",
"setHeaderIcon",
"(",
"WidgetLayout",
".",
"iconError",
")",
";",
"setIsModal",
"(",
"true",
")",
";",
"se... | Build the entire GUI for this widget. | [
"Build",
"the",
"entire",
"GUI",
"for",
"this",
"widget",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java#L96-L111 |
147,525 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java | ExceptionWindow.createErrorLayout | private VLayout createErrorLayout(ExceptionDto error) {
VLayout layout = new VLayout();
layout.setWidth100();
layout.setHeight100();
layout.setPadding(WidgetLayout.marginLarge);
HLayout topLayout = new HLayout(WidgetLayout.marginLarge);
topLayout.setWidth100();
Img icon = new Img(WidgetLayout.iconError,
... | java | private VLayout createErrorLayout(ExceptionDto error) {
VLayout layout = new VLayout();
layout.setWidth100();
layout.setHeight100();
layout.setPadding(WidgetLayout.marginLarge);
HLayout topLayout = new HLayout(WidgetLayout.marginLarge);
topLayout.setWidth100();
Img icon = new Img(WidgetLayout.iconError,
... | [
"private",
"VLayout",
"createErrorLayout",
"(",
"ExceptionDto",
"error",
")",
"{",
"VLayout",
"layout",
"=",
"new",
"VLayout",
"(",
")",
";",
"layout",
".",
"setWidth100",
"(",
")",
";",
"layout",
".",
"setHeight100",
"(",
")",
";",
"layout",
".",
"setPadd... | Create the GUI for a single exception.
@param error error to report
@return layout | [
"Create",
"the",
"GUI",
"for",
"a",
"single",
"exception",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java#L129-L173 |
147,526 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java | ExceptionWindow.setDetailsVisible | private void setDetailsVisible(boolean detailsVisible) {
detailsLayout.setVisible(detailsVisible);
if (detailsVisible) {
setAutoSize(false);
expandButton.setTitle(MESSAGES.exceptionDetailsHide());
setHeight(WidgetLayout.exceptionWindowHeightDetails);
} else {
expandButton.setTitle(MESSAGES.exceptionDe... | java | private void setDetailsVisible(boolean detailsVisible) {
detailsLayout.setVisible(detailsVisible);
if (detailsVisible) {
setAutoSize(false);
expandButton.setTitle(MESSAGES.exceptionDetailsHide());
setHeight(WidgetLayout.exceptionWindowHeightDetails);
} else {
expandButton.setTitle(MESSAGES.exceptionDe... | [
"private",
"void",
"setDetailsVisible",
"(",
"boolean",
"detailsVisible",
")",
"{",
"detailsLayout",
".",
"setVisible",
"(",
"detailsVisible",
")",
";",
"if",
"(",
"detailsVisible",
")",
"{",
"setAutoSize",
"(",
"false",
")",
";",
"expandButton",
".",
"setTitle"... | Toggle the visibility of the exception details.
@param detailsVisible should details be visible | [
"Toggle",
"the",
"visibility",
"of",
"the",
"exception",
"details",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/ExceptionWindow.java#L219-L229 |
147,527 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java | HtmlBuilder.tagClassHtmlContent | public static String tagClassHtmlContent(String tag, String clazz, String... content) {
return openTagClassHtmlContent(tag, clazz, content) + closeTag(tag);
} | java | public static String tagClassHtmlContent(String tag, String clazz, String... content) {
return openTagClassHtmlContent(tag, clazz, content) + closeTag(tag);
} | [
"public",
"static",
"String",
"tagClassHtmlContent",
"(",
"String",
"tag",
",",
"String",
"clazz",
",",
"String",
"...",
"content",
")",
"{",
"return",
"openTagClassHtmlContent",
"(",
"tag",
",",
"clazz",
",",
"content",
")",
"+",
"closeTag",
"(",
"tag",
")"... | Build a String containing a HTML opening tag with given CSS class, HTML content and closing tag.
@param tag String name of HTML tag
@param clazz CSS class of the tag
@param content content string
@return HTML tag element as string | [
"Build",
"a",
"String",
"containing",
"a",
"HTML",
"opening",
"tag",
"with",
"given",
"CSS",
"class",
"HTML",
"content",
"and",
"closing",
"tag",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L325-L327 |
147,528 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java | HtmlBuilder.openTagClassHtmlContent | public static String openTagClassHtmlContent(String tag, String clazz, String... content) {
return openTagHtmlContent(tag, clazz, null, content);
} | java | public static String openTagClassHtmlContent(String tag, String clazz, String... content) {
return openTagHtmlContent(tag, clazz, null, content);
} | [
"public",
"static",
"String",
"openTagClassHtmlContent",
"(",
"String",
"tag",
",",
"String",
"clazz",
",",
"String",
"...",
"content",
")",
"{",
"return",
"openTagHtmlContent",
"(",
"tag",
",",
"clazz",
",",
"null",
",",
"content",
")",
";",
"}"
] | Build a String containing a HTML opening tag with given CSS class and concatenates the given HTML content.
@param tag String name of HTML tag
@param clazz CSS class of the tag
@param content content string
@return HTML tag element as string | [
"Build",
"a",
"String",
"containing",
"a",
"HTML",
"opening",
"tag",
"with",
"given",
"CSS",
"class",
"and",
"concatenates",
"the",
"given",
"HTML",
"content",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L350-L352 |
147,529 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/map/layer/VectorLayer.java | VectorLayer.clearSelectedFeatures | public void clearSelectedFeatures() {
List<Feature> clone = new LinkedList<Feature>(selectedFeatures.values());
for (Feature feature : clone) {
selectedFeatures.remove(feature.getId());
handlerManager.fireEvent(new FeatureDeselectedEvent(feature));
}
} | java | public void clearSelectedFeatures() {
List<Feature> clone = new LinkedList<Feature>(selectedFeatures.values());
for (Feature feature : clone) {
selectedFeatures.remove(feature.getId());
handlerManager.fireEvent(new FeatureDeselectedEvent(feature));
}
} | [
"public",
"void",
"clearSelectedFeatures",
"(",
")",
"{",
"List",
"<",
"Feature",
">",
"clone",
"=",
"new",
"LinkedList",
"<",
"Feature",
">",
"(",
"selectedFeatures",
".",
"values",
"(",
")",
")",
";",
"for",
"(",
"Feature",
"feature",
":",
"clone",
")"... | Clear the list of selected features. | [
"Clear",
"the",
"list",
"of",
"selected",
"features",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/layer/VectorLayer.java#L195-L201 |
147,530 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgStyleDecoder.java | SvgStyleDecoder.decode | public static String decode(Style style) {
if (style != null) {
if (style instanceof ShapeStyle) {
return decode((ShapeStyle) style);
} else if (style instanceof FontStyle) {
return decode((FontStyle) style);
} else if (style instanceof PictureStyle) {
return decode((PictureStyle) style);
}
... | java | public static String decode(Style style) {
if (style != null) {
if (style instanceof ShapeStyle) {
return decode((ShapeStyle) style);
} else if (style instanceof FontStyle) {
return decode((FontStyle) style);
} else if (style instanceof PictureStyle) {
return decode((PictureStyle) style);
}
... | [
"public",
"static",
"String",
"decode",
"(",
"Style",
"style",
")",
"{",
"if",
"(",
"style",
"!=",
"null",
")",
"{",
"if",
"(",
"style",
"instanceof",
"ShapeStyle",
")",
"{",
"return",
"decode",
"(",
"(",
"ShapeStyle",
")",
"style",
")",
";",
"}",
"e... | Return the CSS equivalent of the Style object.
@param style
@return | [
"Return",
"the",
"CSS",
"equivalent",
"of",
"the",
"Style",
"object",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgStyleDecoder.java#L34-L45 |
147,531 | geomajas/geomajas-project-client-gwt | plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndex.java | JsGeometryIndex.getType | @ExportInstanceMethod
public static String getType(GeometryIndex instance) {
switch (instance.getType()) {
case TYPE_GEOMETRY:
return "geometry";
case TYPE_VERTEX:
return "vertex";
case TYPE_EDGE:
return "edge";
default:
return "unknown";
}
} | java | @ExportInstanceMethod
public static String getType(GeometryIndex instance) {
switch (instance.getType()) {
case TYPE_GEOMETRY:
return "geometry";
case TYPE_VERTEX:
return "vertex";
case TYPE_EDGE:
return "edge";
default:
return "unknown";
}
} | [
"@",
"ExportInstanceMethod",
"public",
"static",
"String",
"getType",
"(",
"GeometryIndex",
"instance",
")",
"{",
"switch",
"(",
"instance",
".",
"getType",
"(",
")",
")",
"{",
"case",
"TYPE_GEOMETRY",
":",
"return",
"\"geometry\"",
";",
"case",
"TYPE_VERTEX",
... | Get the type of sub-part this index points to. Can be a vertex, edge or sub-geometry.
@return The type of sub-part this index points to. | [
"Get",
"the",
"type",
"of",
"sub",
"-",
"part",
"this",
"index",
"points",
"to",
".",
"Can",
"be",
"a",
"vertex",
"edge",
"or",
"sub",
"-",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndex.java#L38-L50 |
147,532 | geomajas/geomajas-project-client-gwt | plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/widget/CardLayout.java | CardLayout.addCard | @Api
public void addCard(KEY_TYPE key, Canvas card) {
if (currentCard != null) {
currentCard.hide();
}
addMember(card);
currentCard = card;
cards.put(key, card);
} | java | @Api
public void addCard(KEY_TYPE key, Canvas card) {
if (currentCard != null) {
currentCard.hide();
}
addMember(card);
currentCard = card;
cards.put(key, card);
} | [
"@",
"Api",
"public",
"void",
"addCard",
"(",
"KEY_TYPE",
"key",
",",
"Canvas",
"card",
")",
"{",
"if",
"(",
"currentCard",
"!=",
"null",
")",
"{",
"currentCard",
".",
"hide",
"(",
")",
";",
"}",
"addMember",
"(",
"card",
")",
";",
"currentCard",
"="... | Add a card to the deck and associate it with the specified key.
@param key key associated to the card
@param card the card
@since 1.0.0 | [
"Add",
"a",
"card",
"to",
"the",
"deck",
"and",
"associate",
"it",
"with",
"the",
"specified",
"key",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/widget/CardLayout.java#L41-L49 |
147,533 | geomajas/geomajas-project-client-gwt | plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/widget/CardLayout.java | CardLayout.showCard | @Api
public void showCard(KEY_TYPE key) {
Canvas newCurrent = cards.get(key);
if (null != newCurrent) {
if (newCurrent != currentCard && null != currentCard) {
currentCard.hide();
}
currentCard = newCurrent;
currentCard.show();
}
} | java | @Api
public void showCard(KEY_TYPE key) {
Canvas newCurrent = cards.get(key);
if (null != newCurrent) {
if (newCurrent != currentCard && null != currentCard) {
currentCard.hide();
}
currentCard = newCurrent;
currentCard.show();
}
} | [
"@",
"Api",
"public",
"void",
"showCard",
"(",
"KEY_TYPE",
"key",
")",
"{",
"Canvas",
"newCurrent",
"=",
"cards",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"null",
"!=",
"newCurrent",
")",
"{",
"if",
"(",
"newCurrent",
"!=",
"currentCard",
"&&",
"... | Show the card associated with the specified key.
@param key key associated to the card that should be shown
@since 1.0.0 | [
"Show",
"the",
"card",
"associated",
"with",
"the",
"specified",
"key",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/widget/CardLayout.java#L57-L67 |
147,534 | geomajas/geomajas-project-client-gwt | plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java | FeatureListGridTab.addFeatures | public void addFeatures(List<Feature> features) {
numFeatures += features.size();
for (Feature feature : features) {
featureListGrid.addFeature(feature);
}
if (sortFeatures) {
featureListGrid.sort(sortFieldName, sortDirGWT);
}
if (exportCsvHandler instanceof ExportFeatureListToCsvHandler) {
((Ex... | java | public void addFeatures(List<Feature> features) {
numFeatures += features.size();
for (Feature feature : features) {
featureListGrid.addFeature(feature);
}
if (sortFeatures) {
featureListGrid.sort(sortFieldName, sortDirGWT);
}
if (exportCsvHandler instanceof ExportFeatureListToCsvHandler) {
((Ex... | [
"public",
"void",
"addFeatures",
"(",
"List",
"<",
"Feature",
">",
"features",
")",
"{",
"numFeatures",
"+=",
"features",
".",
"size",
"(",
")",
";",
"for",
"(",
"Feature",
"feature",
":",
"features",
")",
"{",
"featureListGrid",
".",
"addFeature",
"(",
... | Add features to grid.
@param features features to add | [
"Add",
"features",
"to",
"grid",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java#L232-L244 |
147,535 | geomajas/geomajas-project-client-gwt | plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java | FeatureListGridTab.setCriterion | public void setCriterion(Criterion criterion) {
this.criterion = criterion;
// Replace the handler if it is of type featureList
// (when we have a criterion it is better to use that as it has no limitation on returned items)
if (exportCsvHandler == null || exportCsvHandler instanceof ExportFeatureListToCsvHan... | java | public void setCriterion(Criterion criterion) {
this.criterion = criterion;
// Replace the handler if it is of type featureList
// (when we have a criterion it is better to use that as it has no limitation on returned items)
if (exportCsvHandler == null || exportCsvHandler instanceof ExportFeatureListToCsvHan... | [
"public",
"void",
"setCriterion",
"(",
"Criterion",
"criterion",
")",
"{",
"this",
".",
"criterion",
"=",
"criterion",
";",
"// Replace the handler if it is of type featureList ",
"// (when we have a criterion it is better to use that as it has no limitation on returned items)",
"if"... | Set the search criterion.
@param criterion the criterion to set | [
"Set",
"the",
"search",
"criterion",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java#L321-L331 |
147,536 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Composite.java | Composite.contains | public boolean contains(Paintable p) {
if (children.contains(p)) {
return true;
}
for (Paintable t : children) {
if (t instanceof Composite) {
if (((Composite) t).contains(p)) {
return true;
}
}
}
return false;
} | java | public boolean contains(Paintable p) {
if (children.contains(p)) {
return true;
}
for (Paintable t : children) {
if (t instanceof Composite) {
if (((Composite) t).contains(p)) {
return true;
}
}
}
return false;
} | [
"public",
"boolean",
"contains",
"(",
"Paintable",
"p",
")",
"{",
"if",
"(",
"children",
".",
"contains",
"(",
"p",
")",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"Paintable",
"t",
":",
"children",
")",
"{",
"if",
"(",
"t",
"instanceof",
"C... | Recursively checks children to find p.
@param p
Paintable to search for
@return true when the composite contains the passed object | [
"Recursively",
"checks",
"children",
"to",
"find",
"p",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Composite.java#L111-L124 |
147,537 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java | LayerTree.onLeafClick | public void onLeafClick(LeafClickEvent event) {
LayerTreeTreeNode layerTreeNode = (LayerTreeTreeNode) event.getLeaf();
if (null != selectedLayerTreeNode
&& layerTreeNode.getLayer().getId().equals(selectedLayerTreeNode.getLayer().getId())) {
mapModel.selectLayer(null);
} else {
mapModel.selectLayer(layer... | java | public void onLeafClick(LeafClickEvent event) {
LayerTreeTreeNode layerTreeNode = (LayerTreeTreeNode) event.getLeaf();
if (null != selectedLayerTreeNode
&& layerTreeNode.getLayer().getId().equals(selectedLayerTreeNode.getLayer().getId())) {
mapModel.selectLayer(null);
} else {
mapModel.selectLayer(layer... | [
"public",
"void",
"onLeafClick",
"(",
"LeafClickEvent",
"event",
")",
"{",
"LayerTreeTreeNode",
"layerTreeNode",
"=",
"(",
"LayerTreeTreeNode",
")",
"event",
".",
"getLeaf",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"selectedLayerTreeNode",
"&&",
"layerTreeNode",
... | When the user clicks on a leaf the header text of the tree table is changed to the selected leaf and the toolbar
buttons are updated to represent the correct state of the buttons. | [
"When",
"the",
"user",
"clicks",
"on",
"a",
"leaf",
"the",
"header",
"text",
"of",
"the",
"tree",
"table",
"is",
"changed",
"to",
"the",
"selected",
"leaf",
"and",
"the",
"toolbar",
"buttons",
"are",
"updated",
"to",
"represent",
"the",
"correct",
"state",... | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java#L196-L204 |
147,538 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java | LayerTree.buildToolstrip | private ToolStrip buildToolstrip(MapWidget mapWidget) {
toolStrip = new ToolStrip();
toolStrip.setWidth100();
toolStrip.setPadding(3);
ClientLayerTreeInfo layerTreeInfo = mapModel.getMapInfo().getLayerTree();
if (layerTreeInfo != null) {
for (ClientToolInfo tool : layerTreeInfo.getTools()) {
String id... | java | private ToolStrip buildToolstrip(MapWidget mapWidget) {
toolStrip = new ToolStrip();
toolStrip.setWidth100();
toolStrip.setPadding(3);
ClientLayerTreeInfo layerTreeInfo = mapModel.getMapInfo().getLayerTree();
if (layerTreeInfo != null) {
for (ClientToolInfo tool : layerTreeInfo.getTools()) {
String id... | [
"private",
"ToolStrip",
"buildToolstrip",
"(",
"MapWidget",
"mapWidget",
")",
"{",
"toolStrip",
"=",
"new",
"ToolStrip",
"(",
")",
";",
"toolStrip",
".",
"setWidth100",
"(",
")",
";",
"toolStrip",
".",
"setPadding",
"(",
"3",
")",
";",
"ClientLayerTreeInfo",
... | Builds the toolbar
@param mapWidget
The mapWidget containing the layerTree
@return {@link com.smartgwt.client.widgets.toolbar.ToolStrip} which was built | [
"Builds",
"the",
"toolbar"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java#L230-L272 |
147,539 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java | LayerTree.buildTree | private void buildTree(MapModel mapModel) {
treeGrid.setWidth100();
treeGrid.setHeight100();
treeGrid.setShowHeader(false);
tree = new RefreshableTree();
final TreeNode nodeRoot = new TreeNode("ROOT");
tree.setRoot(nodeRoot); // invisible ROOT node (ROOT node is required)
ClientLayerTreeInfo layerTreeInf... | java | private void buildTree(MapModel mapModel) {
treeGrid.setWidth100();
treeGrid.setHeight100();
treeGrid.setShowHeader(false);
tree = new RefreshableTree();
final TreeNode nodeRoot = new TreeNode("ROOT");
tree.setRoot(nodeRoot); // invisible ROOT node (ROOT node is required)
ClientLayerTreeInfo layerTreeInf... | [
"private",
"void",
"buildTree",
"(",
"MapModel",
"mapModel",
")",
"{",
"treeGrid",
".",
"setWidth100",
"(",
")",
";",
"treeGrid",
".",
"setHeight100",
"(",
")",
";",
"treeGrid",
".",
"setShowHeader",
"(",
"false",
")",
";",
"tree",
"=",
"new",
"Refreshable... | Builds up the tree showing the layers
@param mapModel
The mapModel containing the layerTree | [
"Builds",
"up",
"the",
"tree",
"showing",
"the",
"layers"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java#L280-L315 |
147,540 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java | LayerTree.updateButtonIconsAndStates | private void updateButtonIconsAndStates(Canvas[] toolStripMembers) {
for (Canvas toolStripMember : toolStripMembers) {
if (toolStripMember instanceof LayerTreeModalButton) {
((LayerTreeModalButton) toolStripMember).update();
} else if (toolStripMember instanceof LayerTreeButton) {
((LayerTreeButton) too... | java | private void updateButtonIconsAndStates(Canvas[] toolStripMembers) {
for (Canvas toolStripMember : toolStripMembers) {
if (toolStripMember instanceof LayerTreeModalButton) {
((LayerTreeModalButton) toolStripMember).update();
} else if (toolStripMember instanceof LayerTreeButton) {
((LayerTreeButton) too... | [
"private",
"void",
"updateButtonIconsAndStates",
"(",
"Canvas",
"[",
"]",
"toolStripMembers",
")",
"{",
"for",
"(",
"Canvas",
"toolStripMember",
":",
"toolStripMembers",
")",
"{",
"if",
"(",
"toolStripMember",
"instanceof",
"LayerTreeModalButton",
")",
"{",
"(",
"... | Updates the icons and the state of the buttons in the toolbar based upon the currently selected layer
@param toolStripMembers
data for the toolbar | [
"Updates",
"the",
"icons",
"and",
"the",
"state",
"of",
"the",
"buttons",
"in",
"the",
"toolbar",
"based",
"upon",
"the",
"currently",
"selected",
"layer"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/LayerTree.java#L381-L389 |
147,541 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java | VmlGraphicsContext.unhide | public void unhide(Object group, String name) {
if (isAttached()) {
Element element = helper.getElement(group, name);
if (element != null) {
Dom.setStyleAttribute(element, "visibility", "inherit");
}
}
} | java | public void unhide(Object group, String name) {
if (isAttached()) {
Element element = helper.getElement(group, name);
if (element != null) {
Dom.setStyleAttribute(element, "visibility", "inherit");
}
}
} | [
"public",
"void",
"unhide",
"(",
"Object",
"group",
",",
"String",
"name",
")",
"{",
"if",
"(",
"isAttached",
"(",
")",
")",
"{",
"Element",
"element",
"=",
"helper",
".",
"getElement",
"(",
"group",
",",
"name",
")",
";",
"if",
"(",
"element",
"!=",... | Show the specified element in the specified group. If the element does not exist, nothing will happen.
@param group
The group object.
@param name
The element name. | [
"Show",
"the",
"specified",
"element",
"in",
"the",
"specified",
"group",
".",
"If",
"the",
"element",
"does",
"not",
"exist",
"nothing",
"will",
"happen",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java#L699-L706 |
147,542 | geomajas/geomajas-project-client-gwt | plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/widget/CombinedLayertree.java | CombinedLayertree.onLeafClick | public void onLeafClick(LeafClickEvent event) {
LayerTreeTreeNode layerTreeNode;
if (event.getLeaf() instanceof LayerTreeLegendItemNode) {
layerTreeNode = ((LayerTreeLegendItemNode) event.getLeaf()).parent;
treeGrid.deselectRecord(event.getLeaf());
treeGrid.selectRecord(layerTreeNode);
} else {
layerT... | java | public void onLeafClick(LeafClickEvent event) {
LayerTreeTreeNode layerTreeNode;
if (event.getLeaf() instanceof LayerTreeLegendItemNode) {
layerTreeNode = ((LayerTreeLegendItemNode) event.getLeaf()).parent;
treeGrid.deselectRecord(event.getLeaf());
treeGrid.selectRecord(layerTreeNode);
} else {
layerT... | [
"public",
"void",
"onLeafClick",
"(",
"LeafClickEvent",
"event",
")",
"{",
"LayerTreeTreeNode",
"layerTreeNode",
";",
"if",
"(",
"event",
".",
"getLeaf",
"(",
")",
"instanceof",
"LayerTreeLegendItemNode",
")",
"{",
"layerTreeNode",
"=",
"(",
"(",
"LayerTreeLegendI... | When a legendItem is selected, select the layer instead.
@param event
event | [
"When",
"a",
"legendItem",
"is",
"selected",
"select",
"the",
"layer",
"instead",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/widget/CombinedLayertree.java#L148-L160 |
147,543 | ykrasik/jaci | jaci-libgdx-cli/src/main/java/com/github/ykrasik/jaci/cli/libgdx/output/LibGdxCliOutputBuffer.java | LibGdxCliOutputBuffer.println | public void println(String text, Color color) {
final Label label = new Label(text, skin, "outputEntry");
label.setColor(color);
label.setWrap(true);
addLabel(label);
} | java | public void println(String text, Color color) {
final Label label = new Label(text, skin, "outputEntry");
label.setColor(color);
label.setWrap(true);
addLabel(label);
} | [
"public",
"void",
"println",
"(",
"String",
"text",
",",
"Color",
"color",
")",
"{",
"final",
"Label",
"label",
"=",
"new",
"Label",
"(",
"text",
",",
"skin",
",",
"\"outputEntry\"",
")",
";",
"label",
".",
"setColor",
"(",
"color",
")",
";",
"label",
... | Add a single line to this buffer.
The line may contain a '\n' character, and it will be honored, but this is discouraged.
@param text Line text.
@param color Line color. | [
"Add",
"a",
"single",
"line",
"to",
"this",
"buffer",
".",
"The",
"line",
"may",
"contain",
"a",
"\\",
"n",
"character",
"and",
"it",
"will",
"be",
"honored",
"but",
"this",
"is",
"discouraged",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-libgdx-cli/src/main/java/com/github/ykrasik/jaci/cli/libgdx/output/LibGdxCliOutputBuffer.java#L81-L86 |
147,544 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/AbstractMessage.java | AbstractMessage.hashFields | @SuppressWarnings("unchecked")
protected int hashFields(int hash, Map<FieldDescriptor, Object> map) {
for (Map.Entry<FieldDescriptor, Object> entry : map.entrySet()) {
FieldDescriptor field = entry.getKey();
Object value = entry.getValue();
hash = (37 * hash) + field.getNumber();
if (field... | java | @SuppressWarnings("unchecked")
protected int hashFields(int hash, Map<FieldDescriptor, Object> map) {
for (Map.Entry<FieldDescriptor, Object> entry : map.entrySet()) {
FieldDescriptor field = entry.getKey();
Object value = entry.getValue();
hash = (37 * hash) + field.getNumber();
if (field... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"int",
"hashFields",
"(",
"int",
"hash",
",",
"Map",
"<",
"FieldDescriptor",
",",
"Object",
">",
"map",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"FieldDescriptor",
",",
"Object",
">",
... | Get a hash code for given fields and values, using the given seed. | [
"Get",
"a",
"hash",
"code",
"for",
"given",
"fields",
"and",
"values",
"using",
"the",
"given",
"seed",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/AbstractMessage.java#L197-L213 |
147,545 | awltech/org.parallelj | parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/tcp/command/option/OptionsUtils.java | OptionsUtils.initializeArg | public static void initializeArg(final RemoteProgram remoteProgram, final String[] arguments, final Launch<?> launch)
throws OptionException, ParserException {
int numberOfEquals = 0;
for (String argument : arguments) {
if (argument.indexOf('=') > -1)
numberOfEquals++;
}
if (numberOfEquals != argu... | java | public static void initializeArg(final RemoteProgram remoteProgram, final String[] arguments, final Launch<?> launch)
throws OptionException, ParserException {
int numberOfEquals = 0;
for (String argument : arguments) {
if (argument.indexOf('=') > -1)
numberOfEquals++;
}
if (numberOfEquals != argu... | [
"public",
"static",
"void",
"initializeArg",
"(",
"final",
"RemoteProgram",
"remoteProgram",
",",
"final",
"String",
"[",
"]",
"arguments",
",",
"final",
"Launch",
"<",
"?",
">",
"launch",
")",
"throws",
"OptionException",
",",
"ParserException",
"{",
"int",
"... | Check the validity of arguments values coming from remote launching with
regard to types. If not done, the Quartz Exception thrown doesn't stop
the launch and Program may be launched with invalid arguments values.
@param adapterArguments
@param arguments
@throws ParserException | [
"Check",
"the",
"validity",
"of",
"arguments",
"values",
"coming",
"from",
"remote",
"launching",
"with",
"regard",
"to",
"types",
".",
"If",
"not",
"done",
"the",
"Quartz",
"Exception",
"thrown",
"doesn",
"t",
"stop",
"the",
"launch",
"and",
"Program",
"may... | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/tcp/command/option/OptionsUtils.java#L83-L137 |
147,546 | mlhartme/sushi | src/main/java/net/oneandone/sushi/fs/filter/Filter.java | Filter.invoke | public void invoke(Node root, Action result) throws IOException {
doInvoke(0, root, root.isLink(), new ArrayList<>(includes), new ArrayList<>(excludes), result);
} | java | public void invoke(Node root, Action result) throws IOException {
doInvoke(0, root, root.isLink(), new ArrayList<>(includes), new ArrayList<>(excludes), result);
} | [
"public",
"void",
"invoke",
"(",
"Node",
"root",
",",
"Action",
"result",
")",
"throws",
"IOException",
"{",
"doInvoke",
"(",
"0",
",",
"root",
",",
"root",
".",
"isLink",
"(",
")",
",",
"new",
"ArrayList",
"<>",
"(",
"includes",
")",
",",
"new",
"Ar... | Main methods of this class.
@throws IOException as thrown by the specified FileTask | [
"Main",
"methods",
"of",
"this",
"class",
"."
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/filter/Filter.java#L274-L276 |
147,547 | mlhartme/sushi | src/main/java/net/oneandone/sushi/xml/Serializer.java | Serializer.serialize | public String serialize(Node node, boolean format) {
Result result;
StringWriter dest;
if (node == null) {
throw new IllegalArgumentException();
}
dest = new StringWriter();
result = new StreamResult(dest);
try {
serialize(node, result, fo... | java | public String serialize(Node node, boolean format) {
Result result;
StringWriter dest;
if (node == null) {
throw new IllegalArgumentException();
}
dest = new StringWriter();
result = new StreamResult(dest);
try {
serialize(node, result, fo... | [
"public",
"String",
"serialize",
"(",
"Node",
"node",
",",
"boolean",
"format",
")",
"{",
"Result",
"result",
";",
"StringWriter",
"dest",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"de... | does not genereate encoding headers | [
"does",
"not",
"genereate",
"encoding",
"headers"
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/xml/Serializer.java#L123-L138 |
147,548 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.filter | public IContextMapping<INode> filter(IContextMapping<INode> mapping) throws MappingFilterException {
//add the first mapping element for the root to the mappings result
if (0 < mapping.size()) {
IContext sourceContext = mapping.getSourceContext();
IContext targetContext = m... | java | public IContextMapping<INode> filter(IContextMapping<INode> mapping) throws MappingFilterException {
//add the first mapping element for the root to the mappings result
if (0 < mapping.size()) {
IContext sourceContext = mapping.getSourceContext();
IContext targetContext = m... | [
"public",
"IContextMapping",
"<",
"INode",
">",
"filter",
"(",
"IContextMapping",
"<",
"INode",
">",
"mapping",
")",
"throws",
"MappingFilterException",
"{",
"//add the first mapping element for the root to the mappings result\r",
"if",
"(",
"0",
"<",
"mapping",
".",
"s... | Sorts the siblings in the source and target tree defined in the constructor using
the given mapping. | [
"Sorts",
"the",
"siblings",
"in",
"the",
"source",
"and",
"target",
"tree",
"defined",
"in",
"the",
"constructor",
"using",
"the",
"given",
"mapping",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L59-L90 |
147,549 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.filterMappingsOfChildren | private void filterMappingsOfChildren(INode sourceParent, INode targetParent, char semanticRelation) {
List<INode> source = new ArrayList<INode>(sourceParent.getChildrenList());
List<INode> target = new ArrayList<INode>(targetParent.getChildrenList());
sourceIndex.add(sourceParent.getLevel(... | java | private void filterMappingsOfChildren(INode sourceParent, INode targetParent, char semanticRelation) {
List<INode> source = new ArrayList<INode>(sourceParent.getChildrenList());
List<INode> target = new ArrayList<INode>(targetParent.getChildrenList());
sourceIndex.add(sourceParent.getLevel(... | [
"private",
"void",
"filterMappingsOfChildren",
"(",
"INode",
"sourceParent",
",",
"INode",
"targetParent",
",",
"char",
"semanticRelation",
")",
"{",
"List",
"<",
"INode",
">",
"source",
"=",
"new",
"ArrayList",
"<",
"INode",
">",
"(",
"sourceParent",
".",
"ge... | Sorts the children of the given nodes.
@param sourceParent Source node.
@param targetParent Target node.
@param semanticRelation the relation to use for comparison. | [
"Sorts",
"the",
"children",
"of",
"the",
"given",
"nodes",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L122-L136 |
147,550 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.filterMappingsOfSiblingsByRelation | private void filterMappingsOfSiblingsByRelation(List<INode> source, List<INode> target, char semanticRelation) {
int sourceDepth = (source.get(0).getLevel() - 1);
int targetDepth = (target.get(0).getLevel() - 1);
int sourceSize = source.size();
int targetSize = target.size();
... | java | private void filterMappingsOfSiblingsByRelation(List<INode> source, List<INode> target, char semanticRelation) {
int sourceDepth = (source.get(0).getLevel() - 1);
int targetDepth = (target.get(0).getLevel() - 1);
int sourceSize = source.size();
int targetSize = target.size();
... | [
"private",
"void",
"filterMappingsOfSiblingsByRelation",
"(",
"List",
"<",
"INode",
">",
"source",
",",
"List",
"<",
"INode",
">",
"target",
",",
"char",
"semanticRelation",
")",
"{",
"int",
"sourceDepth",
"=",
"(",
"source",
".",
"get",
"(",
"0",
")",
"."... | Filters the mappings of two siblings node list for which the parents are also supposed to
be related. Checks whether in the two given node list there is a pair of nodes related
by the given relation and if so, if deletes all the other relations for the given 2
nodes setting the current one as strongest.
@param source ... | [
"Filters",
"the",
"mappings",
"of",
"two",
"siblings",
"node",
"list",
"for",
"which",
"the",
"parents",
"are",
"also",
"supposed",
"to",
"be",
"related",
".",
"Checks",
"whether",
"in",
"the",
"two",
"given",
"node",
"list",
"there",
"is",
"a",
"pair",
... | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L149-L192 |
147,551 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.swapINodes | private void swapINodes(List<INode> listOfNodes, int source, int target) {
INode aux = listOfNodes.get(source);
listOfNodes.set(source, listOfNodes.get(target));
listOfNodes.set(target, aux);
} | java | private void swapINodes(List<INode> listOfNodes, int source, int target) {
INode aux = listOfNodes.get(source);
listOfNodes.set(source, listOfNodes.get(target));
listOfNodes.set(target, aux);
} | [
"private",
"void",
"swapINodes",
"(",
"List",
"<",
"INode",
">",
"listOfNodes",
",",
"int",
"source",
",",
"int",
"target",
")",
"{",
"INode",
"aux",
"=",
"listOfNodes",
".",
"get",
"(",
"source",
")",
";",
"listOfNodes",
".",
"set",
"(",
"source",
","... | Swaps the INodes in listOfNodes in the positions source and target.
@param listOfNodes List of INodes of which the elements should be swapped.
@param source index of the source element to be swapped.
@param target index of the target element to be swapped. | [
"Swaps",
"the",
"INodes",
"in",
"listOfNodes",
"in",
"the",
"positions",
"source",
"and",
"target",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L202-L206 |
147,552 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.getRelatedIndex | private int getRelatedIndex(List<INode> source, List<INode> target, char relation) {
int srcIndex = sourceIndex.get(source.get(0).getLevel() - 1);
int tgtIndex = targetIndex.get(target.get(0).getLevel() - 1);
int returnIndex = -1;
INode sourceNode = source.get(srcIndex);
... | java | private int getRelatedIndex(List<INode> source, List<INode> target, char relation) {
int srcIndex = sourceIndex.get(source.get(0).getLevel() - 1);
int tgtIndex = targetIndex.get(target.get(0).getLevel() - 1);
int returnIndex = -1;
INode sourceNode = source.get(srcIndex);
... | [
"private",
"int",
"getRelatedIndex",
"(",
"List",
"<",
"INode",
">",
"source",
",",
"List",
"<",
"INode",
">",
"target",
",",
"char",
"relation",
")",
"{",
"int",
"srcIndex",
"=",
"sourceIndex",
".",
"get",
"(",
"source",
".",
"get",
"(",
"0",
")",
"... | Looks for the related index for the source list at the position sourceIndex
in the target list beginning at the targetIndex position for the defined relation.
@param source source list of siblings.
@param target target list of siblings.
@param relation relation
@return the index of the related element in target, o... | [
"Looks",
"for",
"the",
"related",
"index",
"for",
"the",
"source",
"list",
"at",
"the",
"position",
"sourceIndex",
"in",
"the",
"target",
"list",
"beginning",
"at",
"the",
"targetIndex",
"position",
"for",
"the",
"defined",
"relation",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L218-L240 |
147,553 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.inc | private void inc(ArrayList<Integer> array, int index) {
array.set(index, array.get(index) + 1);
} | java | private void inc(ArrayList<Integer> array, int index) {
array.set(index, array.get(index) + 1);
} | [
"private",
"void",
"inc",
"(",
"ArrayList",
"<",
"Integer",
">",
"array",
",",
"int",
"index",
")",
"{",
"array",
".",
"set",
"(",
"index",
",",
"array",
".",
"get",
"(",
"index",
")",
"+",
"1",
")",
";",
"}"
] | Increments by 1 the Integer of the given list of integers at the index position.
@param array array list of integers.
@param index index of the element to be incremented. | [
"Increments",
"by",
"1",
"the",
"Integer",
"of",
"the",
"given",
"list",
"of",
"integers",
"at",
"the",
"index",
"position",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L248-L250 |
147,554 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.isRelated | private boolean isRelated(final INode source, final INode target, final char relation) {
return relation == defautlMappings.getRelation(source, target);
} | java | private boolean isRelated(final INode source, final INode target, final char relation) {
return relation == defautlMappings.getRelation(source, target);
} | [
"private",
"boolean",
"isRelated",
"(",
"final",
"INode",
"source",
",",
"final",
"INode",
"target",
",",
"final",
"char",
"relation",
")",
"{",
"return",
"relation",
"==",
"defautlMappings",
".",
"getRelation",
"(",
"source",
",",
"target",
")",
";",
"}"
] | Checks if the given source and target elements are related considering the defined relation and the temp.
@param source source
@param target target
@param relation relation
@return true if the relation holds between source and target, false otherwise. | [
"Checks",
"if",
"the",
"given",
"source",
"and",
"target",
"elements",
"are",
"related",
"considering",
"the",
"defined",
"relation",
"and",
"the",
"temp",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L260-L262 |
147,555 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.setStrongestMapping | private void setStrongestMapping(INode source, INode target) {
//if it's structure preserving
if (isSameStructure(source, target)) {
spsmMapping.setRelation(source, target, defautlMappings.getRelation(source, target));
//deletes all the less precedent relations for the same... | java | private void setStrongestMapping(INode source, INode target) {
//if it's structure preserving
if (isSameStructure(source, target)) {
spsmMapping.setRelation(source, target, defautlMappings.getRelation(source, target));
//deletes all the less precedent relations for the same... | [
"private",
"void",
"setStrongestMapping",
"(",
"INode",
"source",
",",
"INode",
"target",
")",
"{",
"//if it's structure preserving\r",
"if",
"(",
"isSameStructure",
"(",
"source",
",",
"target",
")",
")",
"{",
"spsmMapping",
".",
"setRelation",
"(",
"source",
"... | Sets the relation between source and target as the strongest in the temp, setting all the other relations
for the same source as IDK if the relations are weaker.
@param source source node
@param target target node | [
"Sets",
"the",
"relation",
"between",
"source",
"and",
"target",
"as",
"the",
"strongest",
"in",
"the",
"temp",
"setting",
"all",
"the",
"other",
"relations",
"for",
"the",
"same",
"source",
"as",
"IDK",
"if",
"the",
"relations",
"are",
"weaker",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L271-L295 |
147,556 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.computeStrongestMappingForSource | private void computeStrongestMappingForSource(INode source) {
INode strongetsRelationInTarget = null;
List<IMappingElement<INode>> strongest = new ArrayList<IMappingElement<INode>>();
//look for the strongest relation, and deletes all the non structure preserving relations
for (INo... | java | private void computeStrongestMappingForSource(INode source) {
INode strongetsRelationInTarget = null;
List<IMappingElement<INode>> strongest = new ArrayList<IMappingElement<INode>>();
//look for the strongest relation, and deletes all the non structure preserving relations
for (INo... | [
"private",
"void",
"computeStrongestMappingForSource",
"(",
"INode",
"source",
")",
"{",
"INode",
"strongetsRelationInTarget",
"=",
"null",
";",
"List",
"<",
"IMappingElement",
"<",
"INode",
">",
">",
"strongest",
"=",
"new",
"ArrayList",
"<",
"IMappingElement",
"... | Looks for the strongest relation for the given source and sets to
IDK all the other mappings existing for the same source if they are less precedent.
@param source INode to look for the strongest relation. | [
"Looks",
"for",
"the",
"strongest",
"relation",
"for",
"the",
"given",
"source",
"and",
"sets",
"to",
"IDK",
"all",
"the",
"other",
"mappings",
"existing",
"for",
"the",
"same",
"source",
"if",
"they",
"are",
"less",
"precedent",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L303-L364 |
147,557 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.resolveStrongestMappingConflicts | private void resolveStrongestMappingConflicts(INode source, List<IMappingElement<INode>> strongest) {
//copy the relations to a string to log it
int strongestIndex = -1;
String sourceString = source.getNodeData().getName().trim();
if (log.isEnabledFor(Level.DEBUG)) {
S... | java | private void resolveStrongestMappingConflicts(INode source, List<IMappingElement<INode>> strongest) {
//copy the relations to a string to log it
int strongestIndex = -1;
String sourceString = source.getNodeData().getName().trim();
if (log.isEnabledFor(Level.DEBUG)) {
S... | [
"private",
"void",
"resolveStrongestMappingConflicts",
"(",
"INode",
"source",
",",
"List",
"<",
"IMappingElement",
"<",
"INode",
">",
">",
"strongest",
")",
"{",
"//copy the relations to a string to log it\r",
"int",
"strongestIndex",
"=",
"-",
"1",
";",
"String",
... | Resolves conflicts in case there are more than one element with
the strongest relation for a given source node.
@param source the node for which more than one strongest relation is found
@param strongest the list of the strongest relations. | [
"Resolves",
"conflicts",
"in",
"case",
"there",
"are",
"more",
"than",
"one",
"element",
"with",
"the",
"strongest",
"relation",
"for",
"a",
"given",
"source",
"node",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L373-L407 |
147,558 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.isSameStructure | private boolean isSameStructure(INode source, INode target) {
boolean result = false;
if (null != source && null != target) {
if (source.getChildrenList() != null && target.getChildrenList() != null) {
int sourceChildren = source.getChildrenList().size();
... | java | private boolean isSameStructure(INode source, INode target) {
boolean result = false;
if (null != source && null != target) {
if (source.getChildrenList() != null && target.getChildrenList() != null) {
int sourceChildren = source.getChildrenList().size();
... | [
"private",
"boolean",
"isSameStructure",
"(",
"INode",
"source",
",",
"INode",
"target",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"if",
"(",
"null",
"!=",
"source",
"&&",
"null",
"!=",
"target",
")",
"{",
"if",
"(",
"source",
".",
"getChildrenLi... | Checks if source and target are structural preserving
this is, function to function and argument to argument match.
@param source source node.
@param target target node.
@return true if they are the same structure, false otherwise. | [
"Checks",
"if",
"source",
"and",
"target",
"are",
"structural",
"preserving",
"this",
"is",
"function",
"to",
"function",
"and",
"argument",
"to",
"argument",
"match",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L442-L460 |
147,559 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.existsStrongerInColumn | private boolean existsStrongerInColumn(INode source, INode target) {
boolean result = false;
char current = defautlMappings.getRelation(source, target);
//compare with the other relations in the column
for (INode i : defautlMappings.getSourceContext().getNodesList()) {
... | java | private boolean existsStrongerInColumn(INode source, INode target) {
boolean result = false;
char current = defautlMappings.getRelation(source, target);
//compare with the other relations in the column
for (INode i : defautlMappings.getSourceContext().getNodesList()) {
... | [
"private",
"boolean",
"existsStrongerInColumn",
"(",
"INode",
"source",
",",
"INode",
"target",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"char",
"current",
"=",
"defautlMappings",
".",
"getRelation",
"(",
"source",
",",
"target",
")",
";",
"//compare ... | Checks if there is no other stronger relation in the same column.
@param source source node
@param target target node
@return true if exists stronger relation in the same column, false otherwise. | [
"Checks",
"if",
"there",
"is",
"no",
"other",
"stronger",
"relation",
"in",
"the",
"same",
"column",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L469-L484 |
147,560 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java | SPSMMappingFilter.getPrecedenceNumber | private int getPrecedenceNumber(char semanticRelation) {
//initializes the precedence number to the least precedent
int precedence = Integer.MAX_VALUE;
if (semanticRelation == IMappingElement.EQUIVALENCE) {
precedence = 1;
} else if (semanticRelation == IMappingEleme... | java | private int getPrecedenceNumber(char semanticRelation) {
//initializes the precedence number to the least precedent
int precedence = Integer.MAX_VALUE;
if (semanticRelation == IMappingElement.EQUIVALENCE) {
precedence = 1;
} else if (semanticRelation == IMappingEleme... | [
"private",
"int",
"getPrecedenceNumber",
"(",
"char",
"semanticRelation",
")",
"{",
"//initializes the precedence number to the least precedent\r",
"int",
"precedence",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"if",
"(",
"semanticRelation",
"==",
"IMappingElement",
".",
"EQ... | Gives the precedence order for the given semanticRelation defined in IMappingElement.
EQUIVALENT_TO = 1
MORE_GENERAL = 2
LESS_GENERAL = 3
DISJOINT_FROM = 4
IDK = 5
@param semanticRelation the semantic relation as defined in IMappingElement.
@return the order of precedence for the given relation, Integer.MAX_VALUE if t... | [
"Gives",
"the",
"precedence",
"order",
"for",
"the",
"given",
"semanticRelation",
"defined",
"in",
"IMappingElement",
".",
"EQUIVALENT_TO",
"=",
"1",
"MORE_GENERAL",
"=",
"2",
"LESS_GENERAL",
"=",
"3",
"DISJOINT_FROM",
"=",
"4",
"IDK",
"=",
"5"
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/SPSMMappingFilter.java#L541-L559 |
147,561 | ykrasik/jaci | jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java | ParsedPath.append | public ParsedPath append(ParsedPath other) {
final List<String> composedPath = new ArrayList<>(this.elements.size() + other.elements.size());
composedPath.addAll(this.elements);
composedPath.addAll(other.elements);
return new ParsedPath(startsWithDelimiter, composedPath);
} | java | public ParsedPath append(ParsedPath other) {
final List<String> composedPath = new ArrayList<>(this.elements.size() + other.elements.size());
composedPath.addAll(this.elements);
composedPath.addAll(other.elements);
return new ParsedPath(startsWithDelimiter, composedPath);
} | [
"public",
"ParsedPath",
"append",
"(",
"ParsedPath",
"other",
")",
"{",
"final",
"List",
"<",
"String",
">",
"composedPath",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"elements",
".",
"size",
"(",
")",
"+",
"other",
".",
"elements",
".",
"size",
... | Append the received path to this path.
@param other Path to append to this path.
@return A {@link ParsedPath} resulting from appending the received path to this path. | [
"Append",
"the",
"received",
"path",
"to",
"this",
"path",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java#L89-L94 |
147,562 | scaleset/scaleset-search | es2/src/main/java/com/scaleset/search/es2/agg/AbstractCombinedConverter.java | AbstractCombinedConverter.addSubAggs | void addSubAggs(QueryConverter queryConverter, Aggregation agg, AggregationBuilder builder) {
Map<String, Aggregation> aggs = agg.getAggs();
for (String key : aggs.keySet()) {
Aggregation subAgg = aggs.get(key);
AbstractAggregationBuilder subBuilder = queryConverter.converterAggr... | java | void addSubAggs(QueryConverter queryConverter, Aggregation agg, AggregationBuilder builder) {
Map<String, Aggregation> aggs = agg.getAggs();
for (String key : aggs.keySet()) {
Aggregation subAgg = aggs.get(key);
AbstractAggregationBuilder subBuilder = queryConverter.converterAggr... | [
"void",
"addSubAggs",
"(",
"QueryConverter",
"queryConverter",
",",
"Aggregation",
"agg",
",",
"AggregationBuilder",
"builder",
")",
"{",
"Map",
"<",
"String",
",",
"Aggregation",
">",
"aggs",
"=",
"agg",
".",
"getAggs",
"(",
")",
";",
"for",
"(",
"String",
... | add sub-aggs when building search request | [
"add",
"sub",
"-",
"aggs",
"when",
"building",
"search",
"request"
] | b1d7a002aaea0d7cdefcaac9870d7fab0631ea2a | https://github.com/scaleset/scaleset-search/blob/b1d7a002aaea0d7cdefcaac9870d7fab0631ea2a/es2/src/main/java/com/scaleset/search/es2/agg/AbstractCombinedConverter.java#L41-L50 |
147,563 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/AbstractParser.java | AbstractParser.newUninitializedMessageException | private UninitializedMessageException
newUninitializedMessageException(MessageType message) {
if (message instanceof AbstractMessageLite) {
return ((AbstractMessageLite) message).newUninitializedMessageException();
}
return new UninitializedMessageException(message);
} | java | private UninitializedMessageException
newUninitializedMessageException(MessageType message) {
if (message instanceof AbstractMessageLite) {
return ((AbstractMessageLite) message).newUninitializedMessageException();
}
return new UninitializedMessageException(message);
} | [
"private",
"UninitializedMessageException",
"newUninitializedMessageException",
"(",
"MessageType",
"message",
")",
"{",
"if",
"(",
"message",
"instanceof",
"AbstractMessageLite",
")",
"{",
"return",
"(",
"(",
"AbstractMessageLite",
")",
"message",
")",
".",
"newUniniti... | Creates an UninitializedMessageException for MessageType. | [
"Creates",
"an",
"UninitializedMessageException",
"for",
"MessageType",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/AbstractParser.java#L54-L60 |
147,564 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/AbstractParser.java | AbstractParser.checkMessageInitialized | private MessageType checkMessageInitialized(MessageType message)
throws InvalidProtocolBufferException {
if (message != null && !message.isInitialized()) {
throw newUninitializedMessageException(message)
.asInvalidProtocolBufferException()
.setUnfinishedMessage(message);
}
re... | java | private MessageType checkMessageInitialized(MessageType message)
throws InvalidProtocolBufferException {
if (message != null && !message.isInitialized()) {
throw newUninitializedMessageException(message)
.asInvalidProtocolBufferException()
.setUnfinishedMessage(message);
}
re... | [
"private",
"MessageType",
"checkMessageInitialized",
"(",
"MessageType",
"message",
")",
"throws",
"InvalidProtocolBufferException",
"{",
"if",
"(",
"message",
"!=",
"null",
"&&",
"!",
"message",
".",
"isInitialized",
"(",
")",
")",
"{",
"throw",
"newUninitializedMe... | Helper method to check if message is initialized.
@throws InvalidProtocolBufferException if it is not initialized.
@return The message to check. | [
"Helper",
"method",
"to",
"check",
"if",
"message",
"is",
"initialized",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/AbstractParser.java#L68-L76 |
147,565 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/propertysheet/DefaultProperty.java | DefaultProperty.readFromObject | @Override
public void readFromObject(Object object) {
try {
Method method = BeanUtils.getReadMethod(object.getClass(), getName());
if (method != null) {
Object value = method.invoke(object);
initializeValue(value); // avoid updating parent or firing pr... | java | @Override
public void readFromObject(Object object) {
try {
Method method = BeanUtils.getReadMethod(object.getClass(), getName());
if (method != null) {
Object value = method.invoke(object);
initializeValue(value); // avoid updating parent or firing pr... | [
"@",
"Override",
"public",
"void",
"readFromObject",
"(",
"Object",
"object",
")",
"{",
"try",
"{",
"Method",
"method",
"=",
"BeanUtils",
".",
"getReadMethod",
"(",
"object",
".",
"getClass",
"(",
")",
",",
"getName",
"(",
")",
")",
";",
"if",
"(",
"me... | Reads the value of this Property from the given object. It uses
reflection and looks for a method starting with "is" or "get" followed by
the capitalized Property name.
@param object | [
"Reads",
"the",
"value",
"of",
"this",
"Property",
"from",
"the",
"given",
"object",
".",
"It",
"uses",
"reflection",
"and",
"looks",
"for",
"a",
"method",
"starting",
"with",
"is",
"or",
"get",
"followed",
"by",
"the",
"capitalized",
"Property",
"name",
"... | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/DefaultProperty.java#L103-L123 |
147,566 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/propertysheet/DefaultProperty.java | DefaultProperty.writeToObject | @Override
public void writeToObject(Object object) {
try {
Method method = BeanUtils.getWriteMethod(object.getClass(), getName());
if (method != null) {
method.invoke(object, new Object[]{getValue()});
}
} catch (IllegalAccessException e) {
... | java | @Override
public void writeToObject(Object object) {
try {
Method method = BeanUtils.getWriteMethod(object.getClass(), getName());
if (method != null) {
method.invoke(object, new Object[]{getValue()});
}
} catch (IllegalAccessException e) {
... | [
"@",
"Override",
"public",
"void",
"writeToObject",
"(",
"Object",
"object",
")",
"{",
"try",
"{",
"Method",
"method",
"=",
"BeanUtils",
".",
"getWriteMethod",
"(",
"object",
".",
"getClass",
"(",
")",
",",
"getName",
"(",
")",
")",
";",
"if",
"(",
"me... | Writes the value of the Property to the given object. It uses reflection
and looks for a method starting with "set" followed by the capitalized
Property name and with one parameter with the same type as the Property.
@param object | [
"Writes",
"the",
"value",
"of",
"the",
"Property",
"to",
"the",
"given",
"object",
".",
"It",
"uses",
"reflection",
"and",
"looks",
"for",
"a",
"method",
"starting",
"with",
"set",
"followed",
"by",
"the",
"capitalized",
"Property",
"name",
"and",
"with",
... | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/DefaultProperty.java#L132-L146 |
147,567 | awltech/org.parallelj | parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KExecutable.java | KExecutable.values | public Map<String, String> values(Object context) {
if (this.attributes.isEmpty()) {
return Collections.emptyMap();
}
Map<String, String> map = new HashMap<String, String>();
for (KAttribute attribute : this.attributes) {
String value = attribute.value(context);
if (value != null) {
map.put(attrib... | java | public Map<String, String> values(Object context) {
if (this.attributes.isEmpty()) {
return Collections.emptyMap();
}
Map<String, String> map = new HashMap<String, String>();
for (KAttribute attribute : this.attributes) {
String value = attribute.value(context);
if (value != null) {
map.put(attrib... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"values",
"(",
"Object",
"context",
")",
"{",
"if",
"(",
"this",
".",
"attributes",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"emptyMap",
"(",
")",
";",
"}",
"Map",
"<",
"S... | Get the attribute values
@param context
the context
@return a map of attribute name/value. Empty map if no attributes/ | [
"Get",
"the",
"attribute",
"values"
] | 2a2498cc4ac6227df6f45d295ec568cad3cffbc4 | https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/KExecutable.java#L61-L74 |
147,568 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java | UriUtil.getUniqueId | public static String getUniqueId(URI resourceUri, URI basePath) {
String result = null;
URI relativeUri = basePath.relativize(resourceUri);
// If it is relative the first part of the path is the Unique ID
if (!relativeUri.isAbsolute()) {
result = relativeUri.toASCIIString();
... | java | public static String getUniqueId(URI resourceUri, URI basePath) {
String result = null;
URI relativeUri = basePath.relativize(resourceUri);
// If it is relative the first part of the path is the Unique ID
if (!relativeUri.isAbsolute()) {
result = relativeUri.toASCIIString();
... | [
"public",
"static",
"String",
"getUniqueId",
"(",
"URI",
"resourceUri",
",",
"URI",
"basePath",
")",
"{",
"String",
"result",
"=",
"null",
";",
"URI",
"relativeUri",
"=",
"basePath",
".",
"relativize",
"(",
"resourceUri",
")",
";",
"// If it is relative the firs... | Given the URI of a resource it returns the Unique ID.
In reality this obtains the first path element after the basePath.
Checks for those that are local to the server only. Developed both for hash and slash URIs.
Works in iServe on the basis of the following assumption behind resource URIs:
http://host:port/...some..... | [
"Given",
"the",
"URI",
"of",
"a",
"resource",
"it",
"returns",
"the",
"Unique",
"ID",
".",
"In",
"reality",
"this",
"obtains",
"the",
"first",
"path",
"element",
"after",
"the",
"basePath",
".",
"Checks",
"for",
"those",
"that",
"are",
"local",
"to",
"th... | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java#L46-L61 |
147,569 | kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java | UriUtil.isResourceLocalToServer | public static boolean isResourceLocalToServer(URI resourceUri, URI serverUri) {
URI relativeUri = serverUri.relativize(resourceUri);
return !relativeUri.isAbsolute();
} | java | public static boolean isResourceLocalToServer(URI resourceUri, URI serverUri) {
URI relativeUri = serverUri.relativize(resourceUri);
return !relativeUri.isAbsolute();
} | [
"public",
"static",
"boolean",
"isResourceLocalToServer",
"(",
"URI",
"resourceUri",
",",
"URI",
"serverUri",
")",
"{",
"URI",
"relativeUri",
"=",
"serverUri",
".",
"relativize",
"(",
"resourceUri",
")",
";",
"return",
"!",
"relativeUri",
".",
"isAbsolute",
"(",... | Figure out whether the URI is actually local to the server. That is,
it tells whether the resouce is controlled by the server.
@param resourceUri
@param serverUri the server URI
@return | [
"Figure",
"out",
"whether",
"the",
"URI",
"is",
"actually",
"local",
"to",
"the",
"server",
".",
"That",
"is",
"it",
"tells",
"whether",
"the",
"resouce",
"is",
"controlled",
"by",
"the",
"server",
"."
] | 13e7016e64c1d5a539b838c6debf1a5cc4aefcb7 | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java#L71-L74 |
147,570 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/exporting/XLSExporter.java | XLSExporter.createStyles | private static Map<String, CellStyle> createStyles(Workbook wb) {
Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
CellStyle style;
Font headerFont = wb.createFont();
style = createBorderedStyle(wb);
style.setAlignment(CellStyle.ALIGN_CENTER);
style.setFillForegroundColor(HSSFC... | java | private static Map<String, CellStyle> createStyles(Workbook wb) {
Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
CellStyle style;
Font headerFont = wb.createFont();
style = createBorderedStyle(wb);
style.setAlignment(CellStyle.ALIGN_CENTER);
style.setFillForegroundColor(HSSFC... | [
"private",
"static",
"Map",
"<",
"String",
",",
"CellStyle",
">",
"createStyles",
"(",
"Workbook",
"wb",
")",
"{",
"Map",
"<",
"String",
",",
"CellStyle",
">",
"styles",
"=",
"new",
"HashMap",
"<",
"String",
",",
"CellStyle",
">",
"(",
")",
";",
"CellS... | Cell styles used. | [
"Cell",
"styles",
"used",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/exporting/XLSExporter.java#L125-L146 |
147,571 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/core/exporting/TremaCSVPrinter.java | TremaCSVPrinter.print | public void print(String[][] values) throws IOException {
if (values == null || values.length == 0) {
csvPrinter.println();
} else {
for (String[] value : values) {
csvPrinter.printRecords((Object) value);
}
}
csvPrinter.flush();
} | java | public void print(String[][] values) throws IOException {
if (values == null || values.length == 0) {
csvPrinter.println();
} else {
for (String[] value : values) {
csvPrinter.printRecords((Object) value);
}
}
csvPrinter.flush();
} | [
"public",
"void",
"print",
"(",
"String",
"[",
"]",
"[",
"]",
"values",
")",
"throws",
"IOException",
"{",
"if",
"(",
"values",
"==",
"null",
"||",
"values",
".",
"length",
"==",
"0",
")",
"{",
"csvPrinter",
".",
"println",
"(",
")",
";",
"}",
"els... | Print several lines of comma separated values.
The values will be quoted if needed. Quotes and
new line characters will be escaped.
@param values the values to be put out
@throws IOException if printing to the stream fails | [
"Print",
"several",
"lines",
"of",
"comma",
"separated",
"values",
".",
"The",
"values",
"will",
"be",
"quoted",
"if",
"needed",
".",
"Quotes",
"and",
"new",
"line",
"characters",
"will",
"be",
"escaped",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/exporting/TremaCSVPrinter.java#L42-L51 |
147,572 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/filters/RedundantGeneratorMappingFilter.java | RedundantGeneratorMappingFilter.isRedundant | private boolean isRedundant(IContextMapping<INode> mapping, INode source, INode target, char R) {
switch (R) {
case IMappingElement.LESS_GENERAL: {
if (verifyCondition1(mapping, source, target)) {
return true;
}
break;
... | java | private boolean isRedundant(IContextMapping<INode> mapping, INode source, INode target, char R) {
switch (R) {
case IMappingElement.LESS_GENERAL: {
if (verifyCondition1(mapping, source, target)) {
return true;
}
break;
... | [
"private",
"boolean",
"isRedundant",
"(",
"IContextMapping",
"<",
"INode",
">",
"mapping",
",",
"INode",
"source",
",",
"INode",
"target",
",",
"char",
"R",
")",
"{",
"switch",
"(",
"R",
")",
"{",
"case",
"IMappingElement",
".",
"LESS_GENERAL",
":",
"{",
... | Checks whether the relation between source and target is redundant or not for minimal mapping.
@param mapping a mapping
@param source source
@param target target
@param R relation between source and target node @return true for redundant relation
@return true if the relation between source and target is redun... | [
"Checks",
"whether",
"the",
"relation",
"between",
"source",
"and",
"target",
"is",
"redundant",
"or",
"not",
"for",
"minimal",
"mapping",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/filters/RedundantGeneratorMappingFilter.java#L122-L155 |
147,573 | mlhartme/sushi | src/main/java/net/oneandone/sushi/fs/http/io/ChunkedInputStream.java | ChunkedInputStream.before | private boolean before() throws IOException {
if (closed) {
throw new IOException("Attempted read from closed stream.");
}
switch (length) {
case EOF:
return false;
case UNKNOWN:
length = readLength();
pos = 0;
... | java | private boolean before() throws IOException {
if (closed) {
throw new IOException("Attempted read from closed stream.");
}
switch (length) {
case EOF:
return false;
case UNKNOWN:
length = readLength();
pos = 0;
... | [
"private",
"boolean",
"before",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"closed",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Attempted read from closed stream.\"",
")",
";",
"}",
"switch",
"(",
"length",
")",
"{",
"case",
"EOF",
":",
"return... | Standard processing before reading data.
@return false for eof | [
"Standard",
"processing",
"before",
"reading",
"data",
"."
] | 4af33414b04bd58584d4febe5cc63ef6c7346a75 | https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/http/io/ChunkedInputStream.java#L114-L132 |
147,574 | yfpeng/pengyifan-bioc | src/main/java/com/pengyifan/bioc/BioCAnnotation.java | BioCAnnotation.getTotalLocation | public BioCLocation getTotalLocation() {
checkArgument(getLocationCount() > 0, "No location added");
RangeSet<Integer> rangeSet = TreeRangeSet.create();
for (BioCLocation location : getLocations()) {
rangeSet.add(
Range.closedOpen(location.getOffset(), location.getOffset() + location.ge... | java | public BioCLocation getTotalLocation() {
checkArgument(getLocationCount() > 0, "No location added");
RangeSet<Integer> rangeSet = TreeRangeSet.create();
for (BioCLocation location : getLocations()) {
rangeSet.add(
Range.closedOpen(location.getOffset(), location.getOffset() + location.ge... | [
"public",
"BioCLocation",
"getTotalLocation",
"(",
")",
"{",
"checkArgument",
"(",
"getLocationCount",
"(",
")",
">",
"0",
",",
"\"No location added\"",
")",
";",
"RangeSet",
"<",
"Integer",
">",
"rangeSet",
"=",
"TreeRangeSet",
".",
"create",
"(",
")",
";",
... | Returns the minimal range which encloses all locations in this annotation.
@return the minimal range which encloses all locations in this annotation | [
"Returns",
"the",
"minimal",
"range",
"which",
"encloses",
"all",
"locations",
"in",
"this",
"annotation",
"."
] | e09cce1969aa598ff89e7957237375715d7a1a3a | https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/BioCAnnotation.java#L146-L156 |
147,575 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/common/TremaCoreUtil.java | TremaCoreUtil.getLanguages | public static Set<String> getLanguages(final ITextNode[] textNodes) {
SortedSet<String> languages = new TreeSet<String>();
for (ITextNode textNode : textNodes) {
IValueNode[] valueNodes = textNode.getValueNodes();
for (IValueNode valueNode : valueNodes) {
languages.add(valueNode.getLanguage(... | java | public static Set<String> getLanguages(final ITextNode[] textNodes) {
SortedSet<String> languages = new TreeSet<String>();
for (ITextNode textNode : textNodes) {
IValueNode[] valueNodes = textNode.getValueNodes();
for (IValueNode valueNode : valueNodes) {
languages.add(valueNode.getLanguage(... | [
"public",
"static",
"Set",
"<",
"String",
">",
"getLanguages",
"(",
"final",
"ITextNode",
"[",
"]",
"textNodes",
")",
"{",
"SortedSet",
"<",
"String",
">",
"languages",
"=",
"new",
"TreeSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"ITextNode",
... | Gets the languages of all value nodes whose parents are a given
array of text nodes.
@param textNodes the text nodes to extract the languages from
@return a sorted set containing all languages or an empty set if
none | [
"Gets",
"the",
"languages",
"of",
"all",
"value",
"nodes",
"whose",
"parents",
"are",
"a",
"given",
"array",
"of",
"text",
"nodes",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/common/TremaCoreUtil.java#L29-L38 |
147,576 | netceteragroup/trema-core | src/main/java/com/netcetera/trema/common/TremaCoreUtil.java | TremaCoreUtil.containsStatus | public static boolean containsStatus(final Status status, final Status[] statusArray) {
if (status == null) {
return false;
}
for (Status currentStatus : statusArray) {
if (currentStatus == status) {
return true;
}
}
return false;
} | java | public static boolean containsStatus(final Status status, final Status[] statusArray) {
if (status == null) {
return false;
}
for (Status currentStatus : statusArray) {
if (currentStatus == status) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"containsStatus",
"(",
"final",
"Status",
"status",
",",
"final",
"Status",
"[",
"]",
"statusArray",
")",
"{",
"if",
"(",
"status",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"Status",
"currentStatus",
... | Checks whether a given status is contained in an array of status.
@param status the status to be looked for
@param statusArray the status array.
@return true if the given status is contained in the array. | [
"Checks",
"whether",
"a",
"given",
"status",
"is",
"contained",
"in",
"an",
"array",
"of",
"status",
"."
] | e5367f4b80b38038d462627aa146a62bc34fc489 | https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/common/TremaCoreUtil.java#L46-L58 |
147,577 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/loaders/mapping/PlainMappingLoader.java | PlainMappingLoader.getNodePathToRoot | protected String getNodePathToRoot(INode node) {
StringBuilder sb = new StringBuilder();
INode parent = node;
while (null != parent) {
if (parent.getNodeData().getName().contains("\\")) {
log.debug("source: replacing \\ in: " + parent.getNodeData().getName());
... | java | protected String getNodePathToRoot(INode node) {
StringBuilder sb = new StringBuilder();
INode parent = node;
while (null != parent) {
if (parent.getNodeData().getName().contains("\\")) {
log.debug("source: replacing \\ in: " + parent.getNodeData().getName());
... | [
"protected",
"String",
"getNodePathToRoot",
"(",
"INode",
"node",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"INode",
"parent",
"=",
"node",
";",
"while",
"(",
"null",
"!=",
"parent",
")",
"{",
"if",
"(",
"parent",
".",
... | Gets the path of a node from root for hash mapping.
@param node the interface of data structure of input node
@return the string of the path from root to node | [
"Gets",
"the",
"path",
"of",
"a",
"node",
"from",
"root",
"for",
"hash",
"mapping",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/loaders/mapping/PlainMappingLoader.java#L84-L97 |
147,578 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/loaders/mapping/PlainMappingLoader.java | PlainMappingLoader.createHash | protected HashMap<String, INode> createHash(IContext context) {
HashMap<String, INode> result = new HashMap<String, INode>();
int nodeCount = 0;
for (INode node : context.getNodesList()) {
result.put(getNodePathToRoot(node), node);
nodeCount++;
}
... | java | protected HashMap<String, INode> createHash(IContext context) {
HashMap<String, INode> result = new HashMap<String, INode>();
int nodeCount = 0;
for (INode node : context.getNodesList()) {
result.put(getNodePathToRoot(node), node);
nodeCount++;
}
... | [
"protected",
"HashMap",
"<",
"String",
",",
"INode",
">",
"createHash",
"(",
"IContext",
"context",
")",
"{",
"HashMap",
"<",
"String",
",",
"INode",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
",",
"INode",
">",
"(",
")",
";",
"int",
"nodeCou... | Creates hash map for nodes which contains path from root to node for each node.
@param context a context
@return a hash table which contains path from root to node for each node | [
"Creates",
"hash",
"map",
"for",
"nodes",
"which",
"contains",
"path",
"from",
"root",
"to",
"node",
"for",
"each",
"node",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/loaders/mapping/PlainMappingLoader.java#L105-L119 |
147,579 | synchronoss/cpo-api | cpo-core/src/main/java/org/synchronoss/cpo/CpoException.java | CpoException.getMessage | @Override
public String getMessage() {
StringBuilder msg = new StringBuilder("\n");
msg.append(super.getMessage());
if (detail != null) {
msg.append("\n");
msg.append(detail.getMessage());
if (detail.getCause() != null) {
msg.append(detail.getCause().getMessage());
}
... | java | @Override
public String getMessage() {
StringBuilder msg = new StringBuilder("\n");
msg.append(super.getMessage());
if (detail != null) {
msg.append("\n");
msg.append(detail.getMessage());
if (detail.getCause() != null) {
msg.append(detail.getCause().getMessage());
}
... | [
"@",
"Override",
"public",
"String",
"getMessage",
"(",
")",
"{",
"StringBuilder",
"msg",
"=",
"new",
"StringBuilder",
"(",
"\"\\n\"",
")",
";",
"msg",
".",
"append",
"(",
"super",
".",
"getMessage",
"(",
")",
")",
";",
"if",
"(",
"detail",
"!=",
"null... | Returns the detail message, including the message from the nested exception if there is one. | [
"Returns",
"the",
"detail",
"message",
"including",
"the",
"message",
"from",
"the",
"nested",
"exception",
"if",
"there",
"is",
"one",
"."
] | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-core/src/main/java/org/synchronoss/cpo/CpoException.java#L87-L101 |
147,580 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/swing/PercentLayout.java | PercentLayout.maximumLayoutSize | @Override
public Dimension maximumLayoutSize(Container parent) {
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
} | java | @Override
public Dimension maximumLayoutSize(Container parent) {
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
} | [
"@",
"Override",
"public",
"Dimension",
"maximumLayoutSize",
"(",
"Container",
"parent",
")",
"{",
"return",
"new",
"Dimension",
"(",
"Integer",
".",
"MAX_VALUE",
",",
"Integer",
".",
"MAX_VALUE",
")",
";",
"}"
] | Returns the maximum size of this component.
@param parent
@return
@see java.awt.Component#getMinimumSize()
@see java.awt.Component#getPreferredSize()
@see java.awt.LayoutManager | [
"Returns",
"the",
"maximum",
"size",
"of",
"this",
"component",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/PercentLayout.java#L261-L264 |
147,581 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/element/string/GSuffix.java | GSuffix.matchSuffix | private char matchSuffix(String str1, String str2) {
//here always str1.endsWith(str2)
char rel = IMappingElement.IDK;
int spacePos1 = str1.lastIndexOf(' ');
String prefix = str1.substring(0, str1.length() - str2.length());
if (-1 < spacePos1 && !prefixes.containsKey(prefix)... | java | private char matchSuffix(String str1, String str2) {
//here always str1.endsWith(str2)
char rel = IMappingElement.IDK;
int spacePos1 = str1.lastIndexOf(' ');
String prefix = str1.substring(0, str1.length() - str2.length());
if (-1 < spacePos1 && !prefixes.containsKey(prefix)... | [
"private",
"char",
"matchSuffix",
"(",
"String",
"str1",
",",
"String",
"str2",
")",
"{",
"//here always str1.endsWith(str2)\r",
"char",
"rel",
"=",
"IMappingElement",
".",
"IDK",
";",
"int",
"spacePos1",
"=",
"str1",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
... | Computes the relation with suffix matcher.
@param str1 the source input
@param str2 the target input
@return synonym, more general, less general or IDK relation | [
"Computes",
"the",
"relation",
"with",
"suffix",
"matcher",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/string/GSuffix.java#L604-L651 |
147,582 | ykrasik/jaci | jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java | StringUtils.removeLeadingAndTrailingDelimiter | public static String removeLeadingAndTrailingDelimiter(String str, String delimiter) {
final int strLength = str.length();
final int delimiterLength = delimiter.length();
final boolean leadingDelimiter = str.startsWith(delimiter);
final boolean trailingDelimiter = strLength > delimiterL... | java | public static String removeLeadingAndTrailingDelimiter(String str, String delimiter) {
final int strLength = str.length();
final int delimiterLength = delimiter.length();
final boolean leadingDelimiter = str.startsWith(delimiter);
final boolean trailingDelimiter = strLength > delimiterL... | [
"public",
"static",
"String",
"removeLeadingAndTrailingDelimiter",
"(",
"String",
"str",
",",
"String",
"delimiter",
")",
"{",
"final",
"int",
"strLength",
"=",
"str",
".",
"length",
"(",
")",
";",
"final",
"int",
"delimiterLength",
"=",
"delimiter",
".",
"len... | Removes the leading and trailing delimiter from a string.
@param str String to process.
@param delimiter Delimiter to remove.
@return The string with the leading and trailing delimiter removed. | [
"Removes",
"the",
"leading",
"and",
"trailing",
"delimiter",
"from",
"a",
"string",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L38-L51 |
147,583 | ykrasik/jaci | jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java | StringUtils.removeTrailingDelimiter | public static String removeTrailingDelimiter(String str, String delimiter) {
if (!str.endsWith(delimiter)) {
return str;
} else {
return str.substring(0, str.length() - delimiter.length());
}
} | java | public static String removeTrailingDelimiter(String str, String delimiter) {
if (!str.endsWith(delimiter)) {
return str;
} else {
return str.substring(0, str.length() - delimiter.length());
}
} | [
"public",
"static",
"String",
"removeTrailingDelimiter",
"(",
"String",
"str",
",",
"String",
"delimiter",
")",
"{",
"if",
"(",
"!",
"str",
".",
"endsWith",
"(",
"delimiter",
")",
")",
"{",
"return",
"str",
";",
"}",
"else",
"{",
"return",
"str",
".",
... | Removes the trailing delimiter from a string.
@param str String to process.
@param delimiter Delimiter to remove.
@return The string with the trailing delimiter removed. | [
"Removes",
"the",
"trailing",
"delimiter",
"from",
"a",
"string",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L60-L66 |
147,584 | ykrasik/jaci | jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java | StringUtils.removeLeadingDelimiter | public static String removeLeadingDelimiter(String str, String delimiter) {
if (!str.startsWith(delimiter)) {
return str;
} else {
return str.substring(delimiter.length(), str.length());
}
} | java | public static String removeLeadingDelimiter(String str, String delimiter) {
if (!str.startsWith(delimiter)) {
return str;
} else {
return str.substring(delimiter.length(), str.length());
}
} | [
"public",
"static",
"String",
"removeLeadingDelimiter",
"(",
"String",
"str",
",",
"String",
"delimiter",
")",
"{",
"if",
"(",
"!",
"str",
".",
"startsWith",
"(",
"delimiter",
")",
")",
"{",
"return",
"str",
";",
"}",
"else",
"{",
"return",
"str",
".",
... | Removes the leading delimiter from a string.
@param str String to process.
@param delimiter Delimiter to remove.
@return The string with the leading delimiter removed. | [
"Removes",
"the",
"leading",
"delimiter",
"from",
"a",
"string",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L75-L81 |
147,585 | ykrasik/jaci | jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java | StringUtils.emptyToNull | public static String emptyToNull(String str) {
return (str != null && !str.isEmpty()) ? str : null;
} | java | public static String emptyToNull(String str) {
return (str != null && !str.isEmpty()) ? str : null;
} | [
"public",
"static",
"String",
"emptyToNull",
"(",
"String",
"str",
")",
"{",
"return",
"(",
"str",
"!=",
"null",
"&&",
"!",
"str",
".",
"isEmpty",
"(",
")",
")",
"?",
"str",
":",
"null",
";",
"}"
] | Transform an empty string into null.
@param str String to check.
@return The string if it was non-empty, or null otherwise. | [
"Transform",
"an",
"empty",
"string",
"into",
"null",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L100-L102 |
147,586 | ykrasik/jaci | jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java | StringUtils.join | public static <T> String join(List<T> list, String delimiter) {
if (list.isEmpty()) {
return "";
}
final StringBuilder sb = new StringBuilder();
for (T element : list) {
sb.append(element);
sb.append(delimiter);
}
sb.delete(sb.length()... | java | public static <T> String join(List<T> list, String delimiter) {
if (list.isEmpty()) {
return "";
}
final StringBuilder sb = new StringBuilder();
for (T element : list) {
sb.append(element);
sb.append(delimiter);
}
sb.delete(sb.length()... | [
"public",
"static",
"<",
"T",
">",
"String",
"join",
"(",
"List",
"<",
"T",
">",
"list",
",",
"String",
"delimiter",
")",
"{",
"if",
"(",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"final",
"StringBuilder",
"sb",
"=",
... | Create a string out of the list's elements using the given delimiter.
@param list List to create a string from.
@param delimiter Delimiter to use between elements.
@param <T> Type of elements in the list.
@return A string created from the given list's elements, delimited by the given delimiter. | [
"Create",
"a",
"string",
"out",
"of",
"the",
"list",
"s",
"elements",
"using",
"the",
"given",
"delimiter",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L112-L124 |
147,587 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java | BaseNodeMatcher.mkAxioms | protected static Object[] mkAxioms(HashMap<IAtomicConceptOfLabel, String> hashConceptNumber,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs,
Map<... | java | protected static Object[] mkAxioms(HashMap<IAtomicConceptOfLabel, String> hashConceptNumber,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs,
Map<... | [
"protected",
"static",
"Object",
"[",
"]",
"mkAxioms",
"(",
"HashMap",
"<",
"IAtomicConceptOfLabel",
",",
"String",
">",
"hashConceptNumber",
",",
"Map",
"<",
"INode",
",",
"ArrayList",
"<",
"IAtomicConceptOfLabel",
">",
">",
"nmtAcols",
",",
"Map",
"<",
"Stri... | Makes axioms for a CNF formula out of relations between atomic concepts.
@param hashConceptNumber HashMap for atomic concept of labels with its id
@param nmtAcols node -> list of node matching task acols
@param sourceACoLs acol id -> acol object
@param targetACoLs acol id -> acol object
@param aco... | [
"Makes",
"axioms",
"for",
"a",
"CNF",
"formula",
"out",
"of",
"relations",
"between",
"atomic",
"concepts",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java#L58-L119 |
147,588 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java | BaseNodeMatcher.DIMACSfromList | protected static String DIMACSfromList(ArrayList<ArrayList<String>> formula) {
StringBuilder dimacs = new StringBuilder("");
for (List<String> conjClause : formula) {
for (String disjClause : conjClause) {
dimacs.append(disjClause).append(" ");
}
... | java | protected static String DIMACSfromList(ArrayList<ArrayList<String>> formula) {
StringBuilder dimacs = new StringBuilder("");
for (List<String> conjClause : formula) {
for (String disjClause : conjClause) {
dimacs.append(disjClause).append(" ");
}
... | [
"protected",
"static",
"String",
"DIMACSfromList",
"(",
"ArrayList",
"<",
"ArrayList",
"<",
"String",
">",
">",
"formula",
")",
"{",
"StringBuilder",
"dimacs",
"=",
"new",
"StringBuilder",
"(",
"\"\"",
")",
";",
"for",
"(",
"List",
"<",
"String",
">",
"con... | Converts parsed formula into DIMACS format.
@param formula parsed formula
@return formula in DIMACS format | [
"Converts",
"parsed",
"formula",
"into",
"DIMACS",
"format",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java#L208-L217 |
147,589 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/swing/UserPreferences.java | UserPreferences.getFileChooser | public static JFileChooser getFileChooser(final String id) {
JFileChooser chooser = new JFileChooser();
track(chooser, "FileChooser." + id + ".path");
return chooser;
} | java | public static JFileChooser getFileChooser(final String id) {
JFileChooser chooser = new JFileChooser();
track(chooser, "FileChooser." + id + ".path");
return chooser;
} | [
"public",
"static",
"JFileChooser",
"getFileChooser",
"(",
"final",
"String",
"id",
")",
"{",
"JFileChooser",
"chooser",
"=",
"new",
"JFileChooser",
"(",
")",
";",
"track",
"(",
"chooser",
",",
"\"FileChooser.\"",
"+",
"id",
"+",
"\".path\"",
")",
";",
"retu... | Gets the file chooser with the given id. Its current directory will be
tracked and restored on subsequent calls.
@param id
@return the file chooser with the given id | [
"Gets",
"the",
"file",
"chooser",
"with",
"the",
"given",
"id",
".",
"Its",
"current",
"directory",
"will",
"be",
"tracked",
"and",
"restored",
"on",
"subsequent",
"calls",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/UserPreferences.java#L112-L116 |
147,590 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/swing/UserPreferences.java | UserPreferences.getDirectoryChooser | public static JFileChooser getDirectoryChooser(String id) {
JFileChooser chooser;
Class<?> directoryChooserClass;
try {
directoryChooserClass = Class
.forName("com.l2fprod.common.swing.JDirectoryChooser");
chooser = (JFileChooser) directoryChooserClass... | java | public static JFileChooser getDirectoryChooser(String id) {
JFileChooser chooser;
Class<?> directoryChooserClass;
try {
directoryChooserClass = Class
.forName("com.l2fprod.common.swing.JDirectoryChooser");
chooser = (JFileChooser) directoryChooserClass... | [
"public",
"static",
"JFileChooser",
"getDirectoryChooser",
"(",
"String",
"id",
")",
"{",
"JFileChooser",
"chooser",
";",
"Class",
"<",
"?",
">",
"directoryChooserClass",
";",
"try",
"{",
"directoryChooserClass",
"=",
"Class",
".",
"forName",
"(",
"\"com.l2fprod.c... | Gets the directory chooser with the given id. Its current directory will
be tracked and restored on subsequent calls.
@param id
@return the directory chooser with the given id | [
"Gets",
"the",
"directory",
"chooser",
"with",
"the",
"given",
"id",
".",
"Its",
"current",
"directory",
"will",
"be",
"tracked",
"and",
"restored",
"on",
"subsequent",
"calls",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/UserPreferences.java#L125-L144 |
147,591 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/swing/UserPreferences.java | UserPreferences.track | public static void track(Window window) {
Preferences prefs = node().node("Windows");
String bounds = prefs.get(window.getName() + ".bounds", null);
if (bounds != null) {
Rectangle rect = (Rectangle) ConverterRegistry.instance().convert(
Rectangle.class, bounds);... | java | public static void track(Window window) {
Preferences prefs = node().node("Windows");
String bounds = prefs.get(window.getName() + ".bounds", null);
if (bounds != null) {
Rectangle rect = (Rectangle) ConverterRegistry.instance().convert(
Rectangle.class, bounds);... | [
"public",
"static",
"void",
"track",
"(",
"Window",
"window",
")",
"{",
"Preferences",
"prefs",
"=",
"node",
"(",
")",
".",
"node",
"(",
"\"Windows\"",
")",
";",
"String",
"bounds",
"=",
"prefs",
".",
"get",
"(",
"window",
".",
"getName",
"(",
")",
"... | Restores the window size, position and state if possible. Tracks the
window size, position and state.
@param window | [
"Restores",
"the",
"window",
"size",
"position",
"and",
"state",
"if",
"possible",
".",
"Tracks",
"the",
"window",
"size",
"position",
"and",
"state",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/UserPreferences.java#L190-L201 |
147,592 | ykrasik/jaci | jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/param/AbstractCliParam.java | AbstractCliParam.parse | @Override
public T parse(String arg) throws ParseException {
if (isNull(arg)) {
if (nullable) {
return null;
} else {
throw new ParseException(ParseError.INVALID_PARAM, "Parameter doesn't take 'null' values: " + getName());
}
}
... | java | @Override
public T parse(String arg) throws ParseException {
if (isNull(arg)) {
if (nullable) {
return null;
} else {
throw new ParseException(ParseError.INVALID_PARAM, "Parameter doesn't take 'null' values: " + getName());
}
}
... | [
"@",
"Override",
"public",
"T",
"parse",
"(",
"String",
"arg",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"isNull",
"(",
"arg",
")",
")",
"{",
"if",
"(",
"nullable",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"throw",
"new",
"ParseExcep... | Type specialization - subclasses must parse a value of type T. | [
"Type",
"specialization",
"-",
"subclasses",
"must",
"parse",
"a",
"value",
"of",
"type",
"T",
"."
] | 4615edef7c76288ad5ea8d678132b161645ca1e3 | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/param/AbstractCliParam.java#L73-L83 |
147,593 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/SingleFieldBuilder.java | SingleFieldBuilder.setMessage | public SingleFieldBuilder<MType, BType, IType> setMessage(
MType message) {
if (message == null) {
throw new NullPointerException();
}
this.message = message;
if (builder != null) {
builder.dispose();
builder = null;
}
onChanged();
return this;
} | java | public SingleFieldBuilder<MType, BType, IType> setMessage(
MType message) {
if (message == null) {
throw new NullPointerException();
}
this.message = message;
if (builder != null) {
builder.dispose();
builder = null;
}
onChanged();
return this;
} | [
"public",
"SingleFieldBuilder",
"<",
"MType",
",",
"BType",
",",
"IType",
">",
"setMessage",
"(",
"MType",
"message",
")",
"{",
"if",
"(",
"message",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"this",
".",
"messag... | Sets a message for the field replacing any existing value.
@param message the message to set
@return the builder | [
"Sets",
"a",
"message",
"for",
"the",
"field",
"replacing",
"any",
"existing",
"value",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/SingleFieldBuilder.java#L170-L182 |
147,594 | udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/SingleFieldBuilder.java | SingleFieldBuilder.mergeFrom | public SingleFieldBuilder<MType, BType, IType> mergeFrom(
MType value) {
if (builder == null && message == message.getDefaultInstanceForType()) {
message = value;
} else {
getBuilder().mergeFrom(value);
}
onChanged();
return this;
} | java | public SingleFieldBuilder<MType, BType, IType> mergeFrom(
MType value) {
if (builder == null && message == message.getDefaultInstanceForType()) {
message = value;
} else {
getBuilder().mergeFrom(value);
}
onChanged();
return this;
} | [
"public",
"SingleFieldBuilder",
"<",
"MType",
",",
"BType",
",",
"IType",
">",
"mergeFrom",
"(",
"MType",
"value",
")",
"{",
"if",
"(",
"builder",
"==",
"null",
"&&",
"message",
"==",
"message",
".",
"getDefaultInstanceForType",
"(",
")",
")",
"{",
"messag... | Merges the field from another field.
@param value the value to merge from
@return the builder | [
"Merges",
"the",
"field",
"from",
"another",
"field",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/SingleFieldBuilder.java#L190-L199 |
147,595 | udoprog/ffwd-client-java | src/main/java/eu/toolchain/ffwd/FastForward.java | FastForward.setup | public static FastForward setup(InetAddress addr, int port) throws SocketException {
final DatagramSocket socket = new DatagramSocket();
return new FastForward(addr, port, socket);
} | java | public static FastForward setup(InetAddress addr, int port) throws SocketException {
final DatagramSocket socket = new DatagramSocket();
return new FastForward(addr, port, socket);
} | [
"public",
"static",
"FastForward",
"setup",
"(",
"InetAddress",
"addr",
",",
"int",
"port",
")",
"throws",
"SocketException",
"{",
"final",
"DatagramSocket",
"socket",
"=",
"new",
"DatagramSocket",
"(",
")",
";",
"return",
"new",
"FastForward",
"(",
"addr",
",... | Initialization method for a FastForward client.
@return A new instance of a FastForward client.
@throws SocketException If a datagram socket cannot be created. | [
"Initialization",
"method",
"for",
"a",
"FastForward",
"client",
"."
] | b4161d2b138e3edb8fa9420cc3cc653d5764cf5b | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/eu/toolchain/ffwd/FastForward.java#L40-L43 |
147,596 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/structure/node/OptimizedStageNodeMatcher.java | OptimizedStageNodeMatcher.nodeDisjoint | public boolean nodeDisjoint(IContextMapping<IAtomicConceptOfLabel> acolMapping,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs, Map<String, IAtomicConceptOfLabel> targetACoLs,
... | java | public boolean nodeDisjoint(IContextMapping<IAtomicConceptOfLabel> acolMapping,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs, Map<String, IAtomicConceptOfLabel> targetACoLs,
... | [
"public",
"boolean",
"nodeDisjoint",
"(",
"IContextMapping",
"<",
"IAtomicConceptOfLabel",
">",
"acolMapping",
",",
"Map",
"<",
"INode",
",",
"ArrayList",
"<",
"IAtomicConceptOfLabel",
">",
">",
"nmtAcols",
",",
"Map",
"<",
"String",
",",
"IAtomicConceptOfLabel",
... | Checks whether source node and target node are disjoint.
@param acolMapping mapping between acols
@param nmtAcols node -> list of node matching task acols
@param sourceACoLs mapping acol id -> acol object
@param targetACoLs mapping acol id -> acol object
@param sourceNode interface of source node
@param targetNode... | [
"Checks",
"whether",
"source",
"node",
"and",
"target",
"node",
"are",
"disjoint",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/node/OptimizedStageNodeMatcher.java#L31-L62 |
147,597 | opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/matchers/structure/node/OptimizedStageNodeMatcher.java | OptimizedStageNodeMatcher.nodeMatch | public char nodeMatch(IContextMapping<IAtomicConceptOfLabel> acolMapping,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs,
Map<String, IAtomicConceptOfLabel> targetACoLs,
... | java | public char nodeMatch(IContextMapping<IAtomicConceptOfLabel> acolMapping,
Map<INode, ArrayList<IAtomicConceptOfLabel>> nmtAcols,
Map<String, IAtomicConceptOfLabel> sourceACoLs,
Map<String, IAtomicConceptOfLabel> targetACoLs,
... | [
"public",
"char",
"nodeMatch",
"(",
"IContextMapping",
"<",
"IAtomicConceptOfLabel",
">",
"acolMapping",
",",
"Map",
"<",
"INode",
",",
"ArrayList",
"<",
"IAtomicConceptOfLabel",
">",
">",
"nmtAcols",
",",
"Map",
"<",
"String",
",",
"IAtomicConceptOfLabel",
">",
... | stub to allow it to be created as node matcher. | [
"stub",
"to",
"allow",
"it",
"to",
"be",
"created",
"as",
"node",
"matcher",
"."
] | ba5982ef406b7010c2f92592e43887a485935aa1 | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/node/OptimizedStageNodeMatcher.java#L133-L139 |
147,598 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java | PropertySheetTable.initDefaultColors | private void initDefaultColors() {
this.categoryBackground = UIManager.getColor(PANEL_BACKGROUND_COLOR_KEY);
this.categoryForeground = UIManager.getColor(TABLE_FOREGROUND_COLOR_KEY).darker().darker().darker();
this.selectedCategoryBackground = categoryBackground.darker();
this.sele... | java | private void initDefaultColors() {
this.categoryBackground = UIManager.getColor(PANEL_BACKGROUND_COLOR_KEY);
this.categoryForeground = UIManager.getColor(TABLE_FOREGROUND_COLOR_KEY).darker().darker().darker();
this.selectedCategoryBackground = categoryBackground.darker();
this.sele... | [
"private",
"void",
"initDefaultColors",
"(",
")",
"{",
"this",
".",
"categoryBackground",
"=",
"UIManager",
".",
"getColor",
"(",
"PANEL_BACKGROUND_COLOR_KEY",
")",
";",
"this",
".",
"categoryForeground",
"=",
"UIManager",
".",
"getColor",
"(",
"TABLE_FOREGROUND_COL... | Initializes the default set of colors used by the PropertySheetTable.
@see #categoryBackground
@see #categoryForeground
@see #selectedCategoryBackground
@see #selectedCategoryForeground
@see #propertyBackground
@see #propertyForeground
@see #selectedPropertyBackground
@see #selectedPropertyForeground | [
"Initializes",
"the",
"default",
"set",
"of",
"colors",
"used",
"by",
"the",
"PropertySheetTable",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java#L153-L169 |
147,599 | ZenHarbinger/l2fprod-properties-editor | src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java | PropertySheetTable.getCellEditor | @Override
public TableCellEditor getCellEditor(int row, int column) {
if (column == 0) {
return null;
}
Item item = getSheetModel().getPropertySheetElement(row);
if (!item.isProperty()) {
return null;
}
TableCellEditor result = nul... | java | @Override
public TableCellEditor getCellEditor(int row, int column) {
if (column == 0) {
return null;
}
Item item = getSheetModel().getPropertySheetElement(row);
if (!item.isProperty()) {
return null;
}
TableCellEditor result = nul... | [
"@",
"Override",
"public",
"TableCellEditor",
"getCellEditor",
"(",
"int",
"row",
",",
"int",
"column",
")",
"{",
"if",
"(",
"column",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"Item",
"item",
"=",
"getSheetModel",
"(",
")",
".",
"getPropertySheet... | Gets the CellEditor for the given row and column. It uses the editor
registry to find a suitable editor for the property.
@return
@see javax.swing.JTable#getCellEditor(int, int) | [
"Gets",
"the",
"CellEditor",
"for",
"the",
"given",
"row",
"and",
"column",
".",
"It",
"uses",
"the",
"editor",
"registry",
"to",
"find",
"a",
"suitable",
"editor",
"for",
"the",
"property",
"."
] | d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32 | https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java#L337-L356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.