id
stringlengths
24
24
repo
stringlengths
7
59
path
stringlengths
11
234
func_name
stringlengths
3
140
url
stringlengths
102
339
split
stringclasses
3 values
language
stringclasses
1 value
docstring
stringlengths
1
34k
code
stringlengths
63
466k
text
stringlengths
101
467k
token_count
int32
22
125k
doc_chars
int32
1
34k
code_chars
int32
63
466k
license_basis
stringclasses
1 value
source
stringclasses
1 value
added
stringdate
2026-12-05 00:00:00
2026-12-05 00:00:00
record_sha256
stringlengths
64
64
license
stringclasses
18 values
license_class
stringclasses
4 values
license_source
stringlengths
45
101
52ef4b9f0f7851c9c45f4a9f
cchabanois/transmorph
src/main/java/net/entropysoft/transmorph/converters/beans/AbstractSimpleBeanConverter.java
AbstractSimpleBeanConverter.convertElement
https://github.com/cchabanois/transmorph/blob/118550f30b9680a84eab7496bd8b04118740dcec/src/main/java/net/entropysoft/transmorph/converters/beans/AbstractSimpleBeanConverter.java#L78-L82
train
java
Convert element to another object given a parameterized type signature @param context @param destinationType the destination type @param source the source object @return the converted object @throws ConverterException if conversion failed
@SuppressWarnings("unchecked") public <T> T convertElement(ConversionContext context, Object source, TypeReference<T> destinationType) throws ConverterException { return (T) elementConverter.convert(context, source, destinationType); }
Convert element to another object given a parameterized type signature @param context @param destinationType the destination type @param source the source object @return the converted object @throws ConverterException if conversion failed @SuppressWarnings("unchecked") public <T> T convertElement(ConversionContext...
92
240
246
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5304e34ca748685d4cbb92efe0b376c74025bf75a8fca0b6096e2348f851b6c9
Apache-2.0
permissive
https://github.com/cchabanois/transmorph/blob/master/LICENSE
250323f3c71807ec4d61156f
httpcache4j/httpcache4j
httpcache4j-core/src/main/java/org/codehaus/httpcache4j/cache/HTTPCacheHelper.java
HTTPCacheHelper.isCacheableResponse
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-core/src/main/java/org/codehaus/httpcache4j/cache/HTTPCacheHelper.java#L98-L104
train
java
A response received with a status code of 200, 203, 206, 300, 301 or 410 MAY be stored by a cache and used in reply to a subsequent request, subject to the expiration mechanism, unless a cache-control directive prohibits caching. However, a cache that does not support the Range and Content-Range headers MUST NOT cache ...
boolean isCacheableResponse(HTTPResponse response) { if (!cacheableStatuses.contains(response.getStatus())) { return false; } Headers headers = response.getHeaders(); return headers.isCachable(); }
A response received with a status code of 200, 203, 206, 300, 301 or 410 MAY be stored by a cache and used in reply to a subsequent request, subject to the expiration mechanism, unless a cache-control directive prohibits caching. However, a cache that does not support the Range and Content-Range headers MUST NOT cache ...
188
575
245
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
50512702cd2259537120c468eb9fedcd3d2f7a5d596b92228dece7d9ca8679cd
Apache-2.0
permissive
https://github.com/httpcache4j/httpcache4j/blob/master/LICENSE.txt
0491faab8d883ac793d0af6f
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java
Conditionals.addIfMatch
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java#L90-L110
train
java
Adds tags to the If-Match header. @param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL} @throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once. @return a new Conditionals object with the If-Match tag added.
public Conditionals addIfMatch(Tag tag) { Preconditions.checkArgument(!modifiedSince.isPresent(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MATCH, HeaderConstants.IF_MODIFIED_SINCE)); Preconditions.checkArgument(noneMatch.isEmpty(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MATCH, HeaderCons...
Adds tags to the If-Match header. @param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL} @throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once. @return a new Conditionals object with the If-Match tag added. public Conditionals addIfMatc...
241
289
894
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d5d4dae2e3ee78ea1114c3267d83b7324d231d9898a7849a1a30232bd1ad4844
Apache-2.0
permissive
https://github.com/httpcache4j/httpcache4j/blob/master/LICENSE.txt
e4008336d4edaac9670830a4
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java
Conditionals.ifModifiedSince
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java#L160-L165
train
java
You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified()); </pre> @param time the time to check. @...
public Conditionals ifModifiedSince(LocalDateTime time) { Preconditions.checkArgument(match.isEmpty(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MODIFIED_SINCE, HeaderConstants.IF_MATCH)); Preconditions.checkArgument(!unModifiedSince.isPresent(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MOD...
You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified()); </pre> @param time the time to check. @...
177
380
500
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
eefefe46b612620f2d882064ec04df393d1fff4091668b763fdc2c88449ef048
Apache-2.0
permissive
https://github.com/httpcache4j/httpcache4j/blob/master/LICENSE.txt
8f3c754abd0a4114b8487dc2
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java
Conditionals.ifUnModifiedSince
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java#L181-L186
train
java
You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifUnModifiedSince(response.getLastModified()); </pre> @param time the time to check. ...
public Conditionals ifUnModifiedSince(LocalDateTime time) { Preconditions.checkArgument(noneMatch.isEmpty(), String.format(ERROR_MESSAGE, HeaderConstants.IF_UNMODIFIED_SINCE, HeaderConstants.IF_NONE_MATCH)); Preconditions.checkArgument(!modifiedSince.isPresent(), String.format(ERROR_MESSAGE, HeaderConst...
You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifUnModifiedSince(response.getLastModified()); </pre> @param time the time to check. ...
182
383
507
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
898d57afa2e1e2b8dcd8ecc1da2de453364451c5584e95c5499e53b0fa734f31
Apache-2.0
permissive
https://github.com/httpcache4j/httpcache4j/blob/master/LICENSE.txt
387eb7f517d73eff65fc00b3
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java
Conditionals.toHeaders
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java#L216-L232
train
java
Converts the Conditionals into real headers. @return real headers.
public Headers toHeaders() { Headers headers = new Headers(); if (!getMatch().isEmpty()) { headers = headers.add(new Header(HeaderConstants.IF_MATCH, buildTagHeaderValue(getMatch()))); } if (!getNoneMatch().isEmpty()) { headers = headers.add(new Header(HeaderConst...
Converts the Conditionals into real headers. @return real headers. public Headers toHeaders() { Headers headers = new Headers(); if (!getMatch().isEmpty()) { headers = headers.add(new Header(HeaderConstants.IF_MATCH, buildTagHeaderValue(getMatch()))); } if (!getNoneMatch().i...
171
66
757
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0a9e2317b23bda9bb348a9587727565c2fefe5791680ac625c58441a8c28bc0d
Apache-2.0
permissive
https://github.com/httpcache4j/httpcache4j/blob/master/LICENSE.txt
b2dddd1f15bfed4dafa7f38f
jbossws/jbossws-spi
src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
WebserviceDescriptionMetaData.getPortComponentQNames
https://github.com/jbossws/jbossws-spi/blob/845e66c18679ce3aaf76f849822110b4650a9d78/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java#L102-L114
train
java
Get the QNames of the port components to be declared in the namespaces @return collection of QNames
public Collection<QName> getPortComponentQNames() { //TODO:Check if there is just one QName that drives all portcomponents //or each port component can have a distinct QName (namespace/prefix) //Maintain uniqueness of the QName Map<String, QName> map = new HashMap<String, QName>(); for ...
Get the QNames of the port components to be declared in the namespaces @return collection of QNames public Collection<QName> getPortComponentQNames() { //TODO:Check if there is just one QName that drives all portcomponents //or each port component can have a distinct QName (namespace/prefix) //M...
136
101
498
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4aac4c51556029692e83ea315e166dcb0dfc5f4dc72f2d41ab4562f99a407122
Apache-2.0
permissive
https://github.com/jbossws/jbossws-spi/blob/main/LICENSE.txt
50e5ba10cb546db12b44ebe7
jbossws/jbossws-spi
src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
WebserviceDescriptionMetaData.getPortComponentByWsdlPort
https://github.com/jbossws/jbossws-spi/blob/845e66c18679ce3aaf76f849822110b4650a9d78/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java#L122-L136
train
java
Lookup a PortComponentMetaData by wsdl-port local part @param name - the wsdl-port local part @return PortComponentMetaData if found, null otherwise
public PortComponentMetaData getPortComponentByWsdlPort(String name) { ArrayList<String> pcNames = new ArrayList<String>(); for (PortComponentMetaData pc : portComponents) { String wsdlPortName = pc.getWsdlPort().getLocalPart(); if (wsdlPortName.equals(name)) return pc...
Lookup a PortComponentMetaData by wsdl-port local part @param name - the wsdl-port local part @return PortComponentMetaData if found, null otherwise public PortComponentMetaData getPortComponentByWsdlPort(String name) { ArrayList<String> pcNames = new ArrayList<String>(); for (PortComponentMetaData pc ...
138
149
464
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
eb6c497859253571d5ff9f566e70ee36476cbefb543abac49bb955df67893691
Apache-2.0
permissive
https://github.com/jbossws/jbossws-spi/blob/main/LICENSE.txt
3879f48674a4e72f6dfb0263
jbossws/jbossws-spi
src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
WebserviceDescriptionMetaData.serialize
https://github.com/jbossws/jbossws-spi/blob/845e66c18679ce3aaf76f849822110b4650a9d78/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java#L168-L178
train
java
Serialize as a String @return string
public String serialize() { StringBuilder buffer = new StringBuilder("<webservice-description>"); buffer.append("<webservice-description-name>").append(webserviceDescriptionName).append("</webservice-description-name>"); buffer.append("<wsdl-file>").append(wsdlFile).append("</wsdl-file>"); bu...
Serialize as a String @return string public String serialize() { StringBuilder buffer = new StringBuilder("<webservice-description>"); buffer.append("<webservice-description-name>").append(webserviceDescriptionName).append("</webservice-description-name>"); buffer.append("<wsdl-file>").append(ws...
125
38
597
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e3978af2f588384d8d7337d4860dffa5253ec85a694a50ebd519d4b5272e12ab
Apache-2.0
permissive
https://github.com/jbossws/jbossws-spi/blob/main/LICENSE.txt
5b70c0a5e2fb5f73bae7af6d
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.getW
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L63-L70
train
java
Updated to factor in border and padding
public static final int getW(Element e) { int ret = e.getOffsetWidth(); ret -= MiscUtils.getComputedStyleInt(e, "paddingLeft"); ret -= MiscUtils.getComputedStyleInt(e, "paddingRight"); ret -= MiscUtils.getComputedStyleInt(e, "borderLeftWidth"); ret -= MiscUtils.getComputedStyleIn...
Updated to factor in border and padding public static final int getW(Element e) { int ret = e.getOffsetWidth(); ret -= MiscUtils.getComputedStyleInt(e, "paddingLeft"); ret -= MiscUtils.getComputedStyleInt(e, "paddingRight"); ret -= MiscUtils.getComputedStyleInt(e, "borderLeftWidth"); ...
96
39
384
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
68f9da8f5e754aa8e1b63fb4f4284e137ab26859c9d43941e6afca18ca4910cf
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
7c81ab0cb79d8da5835f105c
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.getH
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L75-L82
train
java
Updated to factor in border and padding
public static final int getH(Element e) { int ret = e.getOffsetHeight(); ret -= MiscUtils.getComputedStyleInt(e, "paddingTop"); ret -= MiscUtils.getComputedStyleInt(e, "paddingBottom"); ret -= MiscUtils.getComputedStyleInt(e, "borderTopWidth"); ret -= MiscUtils.getComputedStyleIn...
Updated to factor in border and padding public static final int getH(Element e) { int ret = e.getOffsetHeight(); ret -= MiscUtils.getComputedStyleInt(e, "paddingTop"); ret -= MiscUtils.getComputedStyleInt(e, "paddingBottom"); ret -= MiscUtils.getComputedStyleInt(e, "borderTopWidth"); ...
96
39
385
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
52eeab5d2a4f16a0c4826c8c85f7de3b369070e80d5071ba423ec01e64260773
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
5385d1dbed0a322df9887591
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.setBounds
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L89-L92
train
java
Sets the bounds of a UIObject, moving and sizing to match the bounds specified. Currently used for the itemhover and useful for other absolutely positioned elements.
public static final void setBounds(UIObject o, Rect bounds) { setPosition(o, bounds); setSize(o, bounds); }
Sets the bounds of a UIObject, moving and sizing to match the bounds specified. Currently used for the itemhover and useful for other absolutely positioned elements. public static final void setBounds(UIObject o, Rect bounds) { setPosition(o, bounds); setSize(o, bounds); }
61
165
127
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7e03d2bb3c7afd7a47dceb5b1965d038d93a360c4669c0d77a50fb1154340e86
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
c92aad8114968463d74c8440
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.setPosition
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L97-L101
train
java
Sets the position of a UIObject
public static final void setPosition(UIObject o, Rect pos) { Style style = o.getElement().getStyle(); style.setPropertyPx("left", pos.x); style.setPropertyPx("top", pos.y); }
Sets the position of a UIObject public static final void setPosition(UIObject o, Rect pos) { Style style = o.getElement().getStyle(); style.setPropertyPx("left", pos.x); style.setPropertyPx("top", pos.y); }
52
31
202
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
536974d931771a9f66bc256f91c5742e697c1b115f8400a1a4d20aea6ecb244b
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
eb78b9e0cd6e8782e813d969
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.setSize
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L106-L109
train
java
Sets the size of a UIObject
public static final void setSize(UIObject o, Rect size) { o.setPixelSize(size.w, size.h); }
Sets the size of a UIObject public static final void setSize(UIObject o, Rect size) { o.setPixelSize(size.w, size.h); }
34
27
104
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5ca99a93a78182e88280e819ea21758ab671e25fc1fa8803f3e313b3d10eb324
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
422aa445007284c7589e6556
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.isInside
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L114-L116
train
java
Determines if a point is inside a box.
public static final boolean isInside(int x, int y, Rect box) { return (box.x < x && x < box.x + box.w && box.y < y && y < box.y + box.h); }
Determines if a point is inside a box. public static final boolean isInside(int x, int y, Rect box) { return (box.x < x && x < box.x + box.w && box.y < y && y < box.y + box.h); }
57
38
151
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
656f93ae7bb4d1bba09325fffa05aff34cbeaf2eb2f47c90185264a59a407e2d
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
c2f966cf82d5c23d9924240c
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.isMouseInside
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L121-L123
train
java
Determines if a mouse event is inside a box.
public static final boolean isMouseInside(NativeEvent event, Element element) { return isInside(event.getClientX() + Window.getScrollLeft(), event.getClientY() + Window.getScrollTop(), getBounds(element)); }
Determines if a mouse event is inside a box. public static final boolean isMouseInside(NativeEvent event, Element element) { return isInside(event.getClientX() + Window.getScrollLeft(), event.getClientY() + Window.getScrollTop(), getBounds(element)); }
57
44
219
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8019d04d03429614961c46b23c7e2716d6789b95f3041bd4e8037efa1cb56d5d
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
41ea12849eef07bc819505ad
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java
Geometry.getViewportBounds
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Geometry.java#L130-L132
train
java
This takes into account scrolling and will be in absolute coordinates where the top left corner of the page is 0,0 but the viewport may be scrolled to something else.
public static final Rect getViewportBounds() { return new Rect(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight()); }
This takes into account scrolling and will be in absolute coordinates where the top left corner of the page is 0,0 but the viewport may be scrolled to something else. public static final Rect getViewportBounds() { return new Rect(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.ge...
69
166
175
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6ec88e06d8c0d9bffb9d499dae0d27b9e167095846fe1327db984502f7e18ceb
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
9d4358d195fb0b7b37a7e9f2
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java
UTCDateBox.utc2date
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java#L206-L215
train
java
Converts a time in UTC to a gwt Date object which is in the timezone of the current browser. @return The Date corresponding to the time, adjusted for the timezone of the current browser. null if the specified time is null or represents a negative number.
public static final Date utc2date(Long time) { // don't accept negative values if (time == null || time < 0) return null; // add the timezone offset time += timezoneOffsetMillis(new Date(time)); return new Date(time); }
Converts a time in UTC to a gwt Date object which is in the timezone of the current browser. @return The Date corresponding to the time, adjusted for the timezone of the current browser. null if the specified time is null or represents a negative number. public static final Date utc2date(Long time) { // don'...
116
255
274
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bcb1eb0581ce8b188e8d3d72da040fbcb04fe726b1780cd83b7f3310cfe7c68d
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
eed474d127a0a6e96929e68b
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java
UTCDateBox.date2utc
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java#L224-L235
train
java
Converts a gwt Date in the timezone of the current browser to a time in UTC. @return A Long corresponding to the number of milliseconds since January 1, 1970, 00:00:00 GMT or null if the specified Date is null.
public static final Long date2utc(Date date) { // use null for a null date if (date == null) return null; long time = date.getTime(); // remove the timezone offset time -= timezoneOffsetMillis(date); return time; }
Converts a gwt Date in the timezone of the current browser to a time in UTC. @return A Long corresponding to the number of milliseconds since January 1, 1970, 00:00:00 GMT or null if the specified Date is null. public static final Long date2utc(Date date) { // use null for a null date if (date == nul...
115
211
302
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8fd020643c902eb52776666b636ec37983a6065886be3793f4908972a2d7ea4a
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
cb089c73f18dd8511778fbec
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java
UTCDateTimeUtils.getTimeBoxValue
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java#L48-L65
train
java
Returns an appropriate value for the UTCTimeBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox @return the value for the UTCTimeBox or null if the supplied date is null
public static final Long getTimeBoxValue(TimeZone zone, Date date) { if (date == null) return null; // use a Calendar in the specified timezone to figure out the // time which is edited in a format independent of TimeZone. Calendar cal = GregorianCalendar.getInstance(zone); cal...
Returns an appropriate value for the UTCTimeBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox @return the value for the UTCTimeBox or null if the supplied date is null public st...
238
309
725
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
be10a93096f1403cf543103fee743cb0c69362a8a2035894fa2c47a98d245024
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
917640d0d2ce6954d2620f17
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java
UTCDateTimeUtils.getDateBoxValue
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java#L80-L102
train
java
Returns the value for the UTCDateBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox @return the value for the UTCDateBox or null if the supplied date is null
public static final Long getDateBoxValue(TimeZone zone, Date date) { if (date == null) return null; // use a Calendar in the specified timezone to figure out the // date and then convert to GMT Calendar cal = GregorianCalendar.getInstance(zone); cal.setTime(date); Cale...
Returns the value for the UTCDateBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox @return the value for the UTCDateBox or null if the supplied date is null public static final ...
259
298
850
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
22d7b6b1c2ab7f80fac86947b210cb432d98575577201bcd080c86a9378bc10c
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
34c07726223acf9d0c9fcbe9
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java
UTCDateTimeUtils.getDateValue
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java#L118-L163
train
java
Returns the {@link Date} for the values of the UTCDateBox and UTCTimeBox which were edited in the specified {@link TimeZone}. @param zone The {@link TimeZone} in which the Date was edited. @param dateBoxValue The value of the {@link UTCDateBox} control. @param timeBoxValue The value of the {@link UTCTimeBox} control. ...
public static final Date getDateValue(TimeZone zone, Long dateBoxValue, Long timeBoxValue) { if (dateBoxValue == null) return null; Calendar gmt = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT")); gmt.setTimeInMillis(dateBoxValue.longValue()); Calendar cal = GregorianCalenda...
Returns the {@link Date} for the values of the UTCDateBox and UTCTimeBox which were edited in the specified {@link TimeZone}. @param zone The {@link TimeZone} in which the Date was edited. @param dateBoxValue The value of the {@link UTCDateBox} control. @param timeBoxValue The value of the {@link UTCTimeBox} control. ...
481
482
1,613
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
494753bc1825a9a9b94c341e00f36d2ac717f323943daf2411f6fb36788ce3e5
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
6b77cfe5565911e96b6178dc
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/Rect.java
Rect.moveInside
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/Rect.java#L67-L89
train
java
Note, this actually changes this Rect (if that wasn't obvious)
public final void moveInside(Rect bounds) { // check the right edge int distanceOffRightSide = (x + w) - (bounds.x + bounds.w); if (distanceOffRightSide > 0) { x -= distanceOffRightSide; } // check the left edge (we prefer this to fit) int distanceOffLeftSide = bounds.x - x; if (distanceOffLeftSide > 0) { ...
Note, this actually changes this Rect (if that wasn't obvious) public final void moveInside(Rect bounds) { // check the right edge int distanceOffRightSide = (x + w) - (bounds.x + bounds.w); if (distanceOffRightSide > 0) { x -= distanceOffRightSide; } // check the left edge (we prefer this to fit) int dista...
204
62
645
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e1d18fbad4b288d33a1f5b49622eb85b005a410d3192075bf4f344a40c7ce845
Apache-2.0
permissive
https://github.com/tractionsoftware/gwt-traction/blob/master/LICENSE
ba3db12318b833a6fe49e17d
cchabanois/transmorph
src/main/java/net/entropysoft/transmorph/signature/TypeSignatureFactory.java
TypeSignatureFactory.getTypeSignature
https://github.com/cchabanois/transmorph/blob/118550f30b9680a84eab7496bd8b04118740dcec/src/main/java/net/entropysoft/transmorph/signature/TypeSignatureFactory.java#L57-L78
train
java
get TypeSignature given the signature @param typeSignature @param useInternalFormFullyQualifiedName if true, fqn in parameterizedTypeSignature must be in the form 'java/lang/Thread'. If false fqn must be of the form 'java.lang.Thread' @return
public static FullTypeSignature getTypeSignature(String typeSignatureString, boolean useInternalFormFullyQualifiedName) { String key; if (!useInternalFormFullyQualifiedName) { key = typeSignatureString.replace('.', '/') .replace('$', '.'); } else { key = typeSignatureString; } // we always use ...
get TypeSignature given the signature @param typeSignature @param useInternalFormFullyQualifiedName if true, fqn in parameterizedTypeSignature must be in the form 'java/lang/Thread'. If false fqn must be of the form 'java.lang.Thread' @return public static FullTypeSignature getTypeSignature(String typeSignatureString...
233
243
823
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0b843ffa1f4f5fc6038c20de02c577ee5d082aae256f46f9c68565b61758028d
Apache-2.0
permissive
https://github.com/cchabanois/transmorph/blob/master/LICENSE
1a8e253989be8a9e7872155b
cchabanois/transmorph
src/main/java/net/entropysoft/transmorph/signature/TypeSignatureFactory.java
TypeSignatureFactory.getTypeSignature
https://github.com/cchabanois/transmorph/blob/118550f30b9680a84eab7496bd8b04118740dcec/src/main/java/net/entropysoft/transmorph/signature/TypeSignatureFactory.java#L112-L127
train
java
get the TypeSignature corresponding to given class with given type arguments @param clazz @param typeArgs @return
public static FullTypeSignature getTypeSignature(Class<?> clazz, Class<?>[] typeArgs) { ClassTypeSignature rawClassTypeSignature = (ClassTypeSignature) javaTypeToTypeSignature .getTypeSignature(clazz); TypeArgSignature[] typeArgSignatures = new TypeArgSignature[typeArgs.length]; for (int i = 0; i < typeArgs.l...
get the TypeSignature corresponding to given class with given type arguments @param clazz @param typeArgs @return public static FullTypeSignature getTypeSignature(Class<?> clazz, Class<?>[] typeArgs) { ClassTypeSignature rawClassTypeSignature = (ClassTypeSignature) javaTypeToTypeSignature .getTypeSignature(claz...
194
114
723
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0799bf1276a743bc1b7a60b11b235d438239527b16ceb2b654b2805b33905f82
Apache-2.0
permissive
https://github.com/cchabanois/transmorph/blob/master/LICENSE
f83c9d36a0314355345a1584
resource4j/resource4j
core/src/main/java/com/github/resource4j/values/ResourceStrings.java
ResourceStrings.ofNullable
https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/values/ResourceStrings.java#L41-L43
train
java
Returns new instance of OptionalString with given key and value @param key key of the returned OptionalString @param value wrapped string @return given object wrapped in OptionalString with given key
public static OptionalString ofNullable(ResourceKey key, String value) { return new GenericOptionalString(RUNTIME_SOURCE, key, value); }
Returns new instance of OptionalString with given key and value @param key key of the returned OptionalString @param value wrapped string @return given object wrapped in OptionalString with given key public static OptionalString ofNullable(ResourceKey key, String value) { return new GenericOptionalString(RUNTI...
68
199
148
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6bcc06455f0e3b1ca4fae8bf0ffebc3c6ff7e52fd4147e70a195ea481feebb4c
BSD-3-Clause
permissive
https://github.com/resource4j/resource4j/blob/latest/LICENSE.txt
d8fe1ad2042b120218825e83
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java
FutureImpl.set
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java#L126-L131
train
java
All callers to get() are now returned.<br> Multiple calls are ignored.<br> Calls after cancel are ignored. @param value Value
public void set(final T value) { if (this.value.compareAndSet(null, value)) { this.listeners.clear(); this.cdl.countDown(); } }
All callers to get() are now returned.<br> Multiple calls are ignored.<br> Calls after cancel are ignored. @param value Value public void set(final T value) { if (this.value.compareAndSet(null, value)) { this.listeners.clear(); this.cdl.countDown(); } }
66
126
138
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
485a15ed92842f09fb9dc16f9de5f52e6d5e55e6e46e8113180fc8f2fe870bd1
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
098739bf464f5a2db8dfa5fe
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java
FutureImpl.set
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java#L140-L145
train
java
The get() method throws this exception wrapped as the cause of an ExecutionException.<br> Multiple calls are ignored.<br> Calls after cancel are ignored. @param e Exception
public void set(final Exception e) { if (this.value.compareAndSet(null, e)) { this.listeners.clear(); this.cdl.countDown(); } }
The get() method throws this exception wrapped as the cause of an ExecutionException.<br> Multiple calls are ignored.<br> Calls after cancel are ignored. @param e Exception public void set(final Exception e) { if (this.value.compareAndSet(null, e)) { this.listeners.clear(); this.cdl.countDown(); } }
73
173
138
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
94eaa94dd01cebd9608bfd53717b1c177bf02c4052820e6017b9cc8a7a0c0313
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
b44e07e0329f98cfe606152e
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java
FutureImpl.addCancelListener
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/FutureImpl.java#L173-L180
train
java
IMPORTANT: In the event that the Cancel listener is added after cancel() was called the event is immediately fired.<br> IMPORTANT2: Keep in mind, that the Cancel listener may not be called from your own thread, so you must care about thread-safety! @param listener Cancel listener
public void addCancelListener(final CancelListener<T> listener) { final Object v = this.value.get(); if (v == null) { this.listeners.add(listener); } else if (FutureImpl.CANCELLED_FLAG.equals(v)) { listener.wasCancelled(this.getId()); } }
IMPORTANT: In the event that the Cancel listener is added after cancel() was called the event is immediately fired.<br> IMPORTANT2: Keep in mind, that the Cancel listener may not be called from your own thread, so you must care about thread-safety! @param listener Cancel listener public void addCancelListener(final C...
124
281
253
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
19e4d5369d3d6b7249ffaa160530a97b896edc64f994df3100350b9432e1b169
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
dcede5c57c44d7786e3cc61a
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/util/Escape.java
Escape.urlEncode
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/util/Escape.java#L49-L59
train
java
Applies URL-Encoding to the given parameter name or value. Uses {@link URLEncoder#encode(String, String)} with UTF-8 character set, while avoiding the need to catch the UnsupportedEncodingException. @param value the parameter name or value to encode @return URL-encoded string - or empty string if the specified value wa...
public static @NotNull String urlEncode(@Nullable String value) { if (value == null) { return ""; } try { return URLEncoder.encode(value, CharEncoding.UTF_8); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } }
Applies URL-Encoding to the given parameter name or value. Uses {@link URLEncoder#encode(String, String)} with UTF-8 character set, while avoiding the need to catch the UnsupportedEncodingException. @param value the parameter name or value to encode @return URL-encoded string - or empty string if the specified value wa...
148
427
282
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
947d47f5249562f44566d55be343d0fc711266f969f967313f06f1e89fba57fd
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
ac3048a68bcce73bed7b61f2
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/util/Escape.java
Escape.validName
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/util/Escape.java#L66-L87
train
java
Creates a valid node name. Replaces all chars not in a-z, A-Z and 0-9 or '_' with '-' and converts all to lowercase. @param value String to be labelized. @return The labelized string.
public static @NotNull String validName(@NotNull String value) { // convert to lowercase String text = value.toLowerCase(); // replace some special chars first text = StringUtils.replace(text, "ä", "ae"); text = StringUtils.replace(text, "ö", "oe"); text = StringUtils.replace(text, "ü", "ue");...
Creates a valid node name. Replaces all chars not in a-z, A-Z and 0-9 or '_' with '-' and converts all to lowercase. @param value String to be labelized. @return The labelized string. public static @NotNull String validName(@NotNull String value) { // convert to lowercase String text = value.toLowerCase(); ...
243
183
728
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c82a5c40e92fea412033e3c8839f661d61211707bae765af54f6b0a993e8fb49
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
f48f25227747aa415c78738a
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/util/Escape.java
Escape.validFilename
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/util/Escape.java#L94-L101
train
java
Create valid filename by applying method {@link Escape#validName(String)} on filename and extension. @param value Filename @return Valid filename
public static @NotNull String validFilename(@NotNull String value) { String fileExtension = StringUtils.substringAfterLast(value, "."); String fileName = StringUtils.substringBeforeLast(value, "."); if (StringUtils.isEmpty(fileExtension)) { return validName(fileName); } return validName(fileNa...
Create valid filename by applying method {@link Escape#validName(String)} on filename and extension. @param value Filename @return Valid filename public static @NotNull String validFilename(@NotNull String value) { String fileExtension = StringUtils.substringAfterLast(value, "."); String fileName = StringUtils...
96
145
361
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
38cb7201c381658135ef1a24727e98f5515612811bed87ec8e89492b9d72ac26
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
ee0113b2bf602fa3d6efca4f
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/util/Escape.java
Escape.jcrQueryLiteral
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/util/Escape.java#L109-L115
train
java
Convert a string to a literal, suitable for inclusion in a query (XPath or JCR-SQL2). See JSR-283 specification v2.0, Section 4.6.6.19. @param value Any string. @return A valid JCR query string literal, including enclosing quotes.
@SuppressWarnings({ "unused", "null" }) public static @NotNull String jcrQueryLiteral(@NotNull String value) { if (value == null) { throw new IllegalArgumentException("Invalid query string value: " + value); } return "'" + StringUtils.replace(value, "'", "''") + "'"; }
Convert a string to a literal, suitable for inclusion in a query (XPath or JCR-SQL2). See JSR-283 specification v2.0, Section 4.6.6.19. @param value Any string. @return A valid JCR query string literal, including enclosing quotes. @SuppressWarnings({ "unused", "null" }) public static @NotNull String jcrQueryLiteral(...
126
230
291
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f1e0fbdb5ffcac0372c9b57ffddcc30646a50aa028abac01300a2ebe13023dff
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
3180e2828436100e69554cfc
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/util/Escape.java
Escape.jcrQueryContainsExpr
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/util/Escape.java#L125-L132
train
java
Convert a string to a JCR search expression literal, suitable for use in jcr:contains() (inside XPath) or contains (JCR-SQL2). The characters - and " have special meaning, and may be escaped with a backslash to obtain their literal value. See JSR-283 specification v2.0, Section 4.6.6.19. @param value Any string. @retur...
@SuppressWarnings("null") public static @NotNull String jcrQueryContainsExpr(@NotNull String value) { if (value == null || value.isEmpty()) { throw new IllegalArgumentException("Invalid query string value: " + value); } // Escape special characters not allowed in jcr:contains expression return j...
Convert a string to a JCR search expression literal, suitable for use in jcr:contains() (inside XPath) or contains (JCR-SQL2). The characters - and " have special meaning, and may be escaped with a backslash to obtain their literal value. See JSR-283 specification v2.0, Section 4.6.6.19. @param value Any string. @retur...
180
414
382
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ed33504143fb38b2b590c6f4ccb16e0502ac687a79b636b4e86974b876b58c1e
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
ff02d37ebd81acc8fd375d7d
openEHR/adl2-core
adl2core-parser/src/main/java/org/openehr/adl/parser/AdlDeserializer.java
AdlDeserializer.parse
https://github.com/openEHR/adl2-core/blob/dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c/adl2core-parser/src/main/java/org/openehr/adl/parser/AdlDeserializer.java#L52-L59
train
java
Parses an adl source into a differential archetype. @param adl contents of an adl source file @return parsed archetype @throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing
public Archetype parse(String adl) { try { return parse(new StringReader(adl)); } catch (IOException e) { // StringReader should never throw an IOException throw new AssertionError(e); } }
Parses an adl source into a differential archetype. @param adl contents of an adl source file @return parsed archetype @throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing public Archetype parse(String adl) { try { return parse(new StringReader(adl)); } catc...
96
204
252
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4094cebb28dd7bfb77a2ab97beac24c81bd4fa40647d15803823b943dcad9fa3
AGPL-3.0
strong-copyleft
https://github.com/openEHR/adl2-core/blob/master/LICENSE
da3160fd983e6b8b7162bf14
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java
DaemonScanner.isAnnotationPresent
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java#L134-L137
train
java
Checks also the inheritance hierarchy. @param annotation Annotation @param method Method @return Is present?
public static boolean isAnnotationPresent(final Class<? extends Annotation> annotation, final Method method) { final Annotation e = DaemonScanner.getAnnotation(annotation, method); return e != null; }
Checks also the inheritance hierarchy. @param annotation Annotation @param method Method @return Is present? public static boolean isAnnotationPresent(final Class<? extends Annotation> annotation, final Method method) { final Annotation e = DaemonScanner.getAnnotation(annotation, method); return e...
59
113
220
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c77f1f42fca04f009725395aee97c18474588c2e9921ba63133077068aaa25be
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
c8fcc9c107acd025431b5ae2
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java
DaemonScanner.getAnnotation
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java#L147-L153
train
java
Checks also the inheritance hierarchy. @param annotation Annotation @param method Method @param <A> Annotation @return Annotation or null
public static <A extends Annotation> A getAnnotation(final Class<A> annotation, final Method method) { try { return DaemonScanner.isAnnotationPresent(annotation, method.getDeclaringClass(), method.getName(), method.getParameterTypes()); } catch(final NoSuchMethodException e) { re...
Checks also the inheritance hierarchy. @param annotation Annotation @param method Method @param <A> Annotation @return Annotation or null public static <A extends Annotation> A getAnnotation(final Class<A> annotation, final Method method) { try { return DaemonScanner.isAnnotationPresent...
91
149
346
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
699763a386f8e317b8362208064608161c1b2dc0f52bd2b299864e512260e4db
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
3a51ae8ab9b3c6ddfb011c91
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java
DaemonScanner.object2Array
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/service/DaemonScanner.java#L271-L274
train
java
We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic. @param <T> Type of elements @param clazz Clazz of the Objct elements @param obj Object @return Array
@SuppressWarnings({"unchecked", "unused"}) public static <T> T[] object2Array(final Class<T> clazz, final Object obj) { return (T[]) obj; }
We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic. @param <T> Type of elements @param clazz Clazz of the Objct elements @param obj Object @return Array @SuppressWarnings({"unchecked", "unused"}) public static <T> T[] object2Array(final Class<T> clazz, ...
91
214
155
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fc83f53e3a8e9446b0ff5aa1364f9ebfce22d6808fada05eb05cb1aee025d71e
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
dca41a5f6e89581c10851f8f
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.pauseUpload
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L68-L75
train
java
Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads have actually been paused if possible. @throws LocalOperationException if the method is called while no upload is going on.
public void pauseUpload() throws LocalOperationException { if (state == State.UPLOADING) { setState(State.PAUSED); executor.hardStop(); } else { throw new LocalOperationException("Attempt to pause upload while assembly is not uploading"); } }
Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads have actually been paused if possible. @throws LocalOperationException if the method is called while no upload is going on. public void pauseUpload() throws LocalOperationException { if (state == State.UP...
102
230
306
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d82a8264952ddfbfab06215d086d27dbf57fc7518c115550df63e4bd43460671
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
be8e76ab05983102ae78b0da
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.watchStatus
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L123-L136
train
java
Runs intermediate check on the Assembly status until it is finished executing, then returns it as a response. @return {@link AssemblyResponse} @throws LocalOperationException if something goes wrong while running non-http operations. @throws RequestException if request to Transloadit server fails.
protected AssemblyResponse watchStatus() throws LocalOperationException, RequestException { AssemblyResponse response; do { response = getClient().getAssemblyByUrl(url); try { Thread.sleep(1000); } catch (InterruptedException e) { throw...
Runs intermediate check on the Assembly status until it is finished executing, then returns it as a response. @return {@link AssemblyResponse} @throws LocalOperationException if something goes wrong while running non-http operations. @throws RequestException if request to Transloadit server fails. protected AssemblyR...
132
299
474
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
73f8dfa065b388d3c052a62d7df24cba3bf49bce647c735f5ed1aa29097b4314
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ebc16295418aeb5c0974c12e
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.uploadTusFiles
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L144-L190
train
java
Does the actual uploading of files (when tus is enabled) @throws IOException when there's a failure with file retrieval @throws ProtocolException when there's a failure with tus upload
@Override protected void uploadTusFiles() throws IOException, ProtocolException { setState(State.UPLOADING); while (uploads.size() > 0) { final TusUploader tusUploader; // don't recreate uploader if it already exists. // this is to avoid multiple connections being...
Does the actual uploading of files (when tus is enabled) @throws IOException when there's a failure with file retrieval @throws ProtocolException when there's a failure with tus upload @Override protected void uploadTusFiles() throws IOException, ProtocolException { setState(State.UPLOADING); whil...
370
185
1,898
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a0eaed67e800c7699e9a0fde5a62e87f4035b196e61b1d96f6a5964459d4c6b0
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
9bd338a229eaf8f4503ebec8
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.handleTusUpload
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L199-L205
train
java
If tus uploads are enabled, this method would be called by {@link Assembly#save()} to handle the file uploads @param response {@link AssemblyResponse} @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload.
@Override protected void handleTusUpload(AssemblyResponse response) throws IOException, ProtocolException { url = response.getSslUrl(); totalUploadSize = getTotalUploadSize(); processTusFiles(url); startExecutor(); }
If tus uploads are enabled, this method would be called by {@link Assembly#save()} to handle the file uploads @param response {@link AssemblyResponse} @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload. @Override protected void handleTu...
106
281
256
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
40e119d034e82c22f282c3b4e0f8f347f8995fbf06da52c567060577246ecbc9
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
d749a6d67bc87c68d8daf52f
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.getTotalUploadSize
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L252-L262
train
java
used for upload progress
private long getTotalUploadSize() throws IOException { long size = 0; for (Map.Entry<String, File> entry : files.entrySet()) { size += entry.getValue().length(); } for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) { size += entry.getValue().avai...
used for upload progress private long getTotalUploadSize() throws IOException { long size = 0; for (Map.Entry<String, File> entry : files.entrySet()) { size += entry.getValue().length(); } for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) { siz...
78
24
365
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f30ab83d3bf44c5944dd4cf2601e553662f51b47ccab8f38a0ac827a112fed97
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ca6c2544770f58ce34a23ff8
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java
InterconnectMapper.fromJson
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java#L77-L79
train
java
Creates an object from the given JSON data. @param data the JSON data @param clazz the class object for the content of the JSON data @param <T> the type of the class object extending {@link InterconnectObject} @return the object contained in the given JSON data @throws JsonParseException if a the JSON data could ...
public static <T extends InterconnectObject> T fromJson(String data, Class<T> clazz) throws IOException { return InterconnectMapper.mapper.readValue(data, clazz); }
Creates an object from the given JSON data. @param data the JSON data @param clazz the class object for the content of the JSON data @param <T> the type of the class object extending {@link InterconnectObject} @return the object contained in the given JSON data @throws JsonParseException if a the JSON data could ...
138
476
176
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
077b96139ace77a666600cc99510ca54fe75d684f27f4c12904d7e38b5f5affb
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
f2d399003642c9cd95d66336
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java
InterconnectMapper.cloneObject
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java#L103-L105
train
java
Returns a clone of the given object using JSON (de)serialization. @param object the object to be cloned @return a clone of this object. @throws JsonGenerationException if the JSON data could not be generated @throws JsonMappingException if the object could not be mapped to a JSON string @throws IOException ...
public static <T extends InterconnectObject> T cloneObject(T object) throws IOException { return InterconnectMapper.fromJson(InterconnectMapper.toJson(object), (Class<T>) object.getClass()); }
Returns a clone of the given object using JSON (de)serialization. @param object the object to be cloned @return a clone of this object. @throws JsonGenerationException if the JSON data could not be generated @throws JsonMappingException if the object could not be mapped to a JSON string @throws IOException ...
113
358
204
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5558c8490ba9a05f0e0a01f4af859da2f939e8136ca185c3159854c647aa9b8e
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
72a27d2f479cafee3ca1dbf5
dhemery/victor
src/main/java/com/dhemery/victor/frank/frankly/MessageResponseParser.java
MessageResponseParser.deserialize
https://github.com/dhemery/victor/blob/52fa85737f01965cc2b15bf62d9b86b5ad6a974b/src/main/java/com/dhemery/victor/frank/frankly/MessageResponseParser.java#L21-L43
train
java
Create a {@code MessageResponse} object from a serialized JSON representation.
@Override public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) { List<String> results = new ArrayList<String>(); String reason = ""; String details = ""; JsonObject body = element.getAsJsonObject(); boolean succeeded =...
Create a {@code MessageResponse} object from a serialized JSON representation. @Override public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) { List<String> results = new ArrayList<String>(); String reason = ""; String details = ""; ...
196
78
984
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7d9a335162b0c10b57df9aa37d5e4e05b48d48a906f964f22c5fc10150c1d55a
MIT
permissive
https://github.com/dhemery/victor/blob/master/LICENSE.txt
6630c7f3376f6326c86f9fa7
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnConvolutionBwdFilterAlgo.java
cudnnConvolutionBwdFilterAlgo.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnConvolutionBwdFilterAlgo.java#L63-L77
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0"; case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1"; case CUDNN_CONVOLUTION_BWD_FI...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0"; case CUDNN_CONVOLUTI...
312
108
1,038
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
50e42822274cd1c7169e1eae36df625dc5aa49a6c90507d5e14e802f5d4fdba4
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
b3a94d41b53b0119f2dc2518
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Template.java
Template.save
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Template.java#L62-L71
train
java
Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response save() throws RequestException, LocalOperationException { Map<String, Object> templateData = new HashMap<String, Object>(); templateData.put("name", name); options.put("steps", steps.toMap()); templateData.put("template", options); Request request = new Request(...
Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response save() throws RequestException, LocalOperationException { Map<Str...
120
229
410
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
93cca8ae81c6d340139472a99455b08b10361c245f6cd2ffd34a6c4acaefa60a
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
e1c38ea04601d9fa6ed75ad7
resource4j/resource4j
core/src/main/java/com/github/resource4j/objects/providers/MappingResourceObjectProvider.java
MappingResourceObjectProvider.setMappings
https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/objects/providers/MappingResourceObjectProvider.java#L37-L42
train
java
Specify list of pattern to resource object provider mappings. Note, that if the actual object name matches two or more patterns, first one in the map will be used. You may use {@link LinkedHashMap} to specify exact order. @param mappings a set of pattern-factory pairs stored in {@link Map}
public void setMappings(Map<String,ResourceObjectProvider> mappings) { this.mappings = new ArrayList<>(mappings.size()); for (Map.Entry<String, ResourceObjectProvider> entry : mappings.entrySet()) { this.mappings.add(new Mapping(compile(entry.getKey()), entry.getValue())); } }
Specify list of pattern to resource object provider mappings. Note, that if the actual object name matches two or more patterns, first one in the map will be used. You may use {@link LinkedHashMap} to specify exact order. @param mappings a set of pattern-factory pairs stored in {@link Map} public void setMappings(Map<...
124
290
287
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f5c96fd12468bcc68cd96f97e421bc3bde5c2ceccad82f8516d2ad3e37a4ebef
BSD-3-Clause
permissive
https://github.com/resource4j/resource4j/blob/latest/LICENSE.txt
d85b8e07f5ec86929c1cc92c
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/caservice/impl/ServiceInfo.java
ServiceInfo.matches
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/caservice/impl/ServiceInfo.java#L148-L162
train
java
Checks if this service implementation accepts the given resource path. @param resourcePath Resource path @return true if the implementation matches and the configuration is not invalid.
public boolean matches(String resourcePath) { if (!valid) { return false; } if (resourcePath == null) { return acceptsContextPathEmpty; } if (contextPathRegex != null && !contextPathRegex.matcher(resourcePath).matches()) { return false; } if (contextPathBlacklistRegex != nu...
Checks if this service implementation accepts the given resource path. @param resourcePath Resource path @return true if the implementation matches and the configuration is not invalid. public boolean matches(String resourcePath) { if (!valid) { return false; } if (resourcePath == null) { retur...
129
185
433
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a924bdc5bb1c065ebb334e54a47badda6e09f576ad4d7aa1a56ee8fe1c81bd29
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
7c823efde0622473aab26159
cenobites/struts2-json-plugin
src/main/java/es/cenobit/struts2/json/JsonService.java
JsonService.getClassLoader
https://github.com/cenobites/struts2-json-plugin/blob/00f948942d85b6f696d46672332ff7b3942ecb1b/src/main/java/es/cenobit/struts2/json/JsonService.java#L105-L111
train
java
this class loader interface can be used by other plugins to lookup resources from the bundles. A temporary class loader interface is set during other configuration loading as well @return ClassLoaderInterface (BundleClassLoaderInterface)
private ClassLoaderInterface getClassLoader() { Map<String, Object> application = ActionContext.getContext().getApplication(); if (application != null) { return (ClassLoaderInterface) application.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE); } return null; }
this class loader interface can be used by other plugins to lookup resources from the bundles. A temporary class loader interface is set during other configuration loading as well @return ClassLoaderInterface (BundleClassLoaderInterface) private ClassLoaderInterface getClassLoader() { Map<String, Object> applicatio...
97
238
274
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3edca3e767465a19f8dbd132db9c779c09cccc633b9a264da6d37d46bfb130ac
Apache-2.0
permissive
https://github.com/cenobites/struts2-json-plugin/blob/master/LICENSE
26ba7a948aff76735dc167a0
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java
QueryStringBuilder.param
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java#L51-L70
train
java
Add parameter to query string. @param name Parameter name @param value Parameter value. Will be converted to string. If value is an array or {@link Iterable} the value items will be added as separate parameters. @return this
@SuppressWarnings("unchecked") public @NotNull QueryStringBuilder param(@NotNull String name, @Nullable Object value) { if (value instanceof Iterable) { Iterable<Object> valueItems = (Iterable)value; for (Object valueItem : valueItems) { params.add(new NameValuePair(name, valueItem)); } ...
Add parameter to query string. @param name Parameter name @param value Parameter value. Will be converted to string. If value is an array or {@link Iterable} the value items will be added as separate parameters. @return this @SuppressWarnings("unchecked") public @NotNull QueryStringBuilder param(@NotNull String name...
191
224
646
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
47e7440779a3e947a8cfbc3750d2fac04444b5ab8eebeeb9f3454d2f59527624
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
e5fad2e0e5a8c084dc2352a9
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java
QueryStringBuilder.params
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java#L78-L83
train
java
Add map of parameters to query string. @param values Map with parameter names and values. Values will be converted to strings. If a value is an array or {@link Iterable} the value items will be added as separate parameters. @return this
public @NotNull QueryStringBuilder params(@NotNull Map<String, Object> values) { for (Map.Entry<String, Object> entry : values.entrySet()) { param(entry.getKey(), entry.getValue()); } return this; }
Add map of parameters to query string. @param values Map with parameter names and values. Values will be converted to strings. If a value is an array or {@link Iterable} the value items will be added as separate parameters. @return this public @NotNull QueryStringBuilder params(@NotNull Map<String, Object> values) { ...
95
236
218
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
37c777b199ed1d38eddde4f7f5da647ed681295c2537debeade0c43dc946ece6
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
aed44e48a6a30f436b286741
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java
QueryStringBuilder.build
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/QueryStringBuilder.java#L89-L107
train
java
Build query string. @return Query string or null if query string contains no parameters at all.
public @Nullable String build() { StringBuilder queryString = new StringBuilder(); for (NameValuePair param : params) { if (queryString.length() > 0) { queryString.append(PARAM_SEPARATOR); } queryString.append(Escape.urlEncode(param.getName())); queryString.append(VALUE_SEPARATO...
Build query string. @return Query string or null if query string contains no parameters at all. public @Nullable String build() { StringBuilder queryString = new StringBuilder(); for (NameValuePair param : params) { if (queryString.length() > 0) { queryString.append(PARAM_SEPARATOR); } ...
117
95
511
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
03e3f63838b5d242abf80629e0ec9a70c2a222446bd14b1b0cb9e76e9def7add
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
eb70d0741db0c472237bd1dd
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/adapter/AdaptTo.java
AdaptTo.notNull
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/adapter/AdaptTo.java#L44-L51
train
java
Try to adapt the adaptable to the given type and ensures that it succeeds. @param adaptable Adaptable @param type Type @param <T> Type @return Adaption result (not null) @throws UnableToAdaptException if the adaption was not successful
@SuppressWarnings("null") public static <T> @NotNull T notNull(@NotNull Adaptable adaptable, @NotNull Class<T> type) { T object = adaptable.adaptTo(type); if (object == null) { throw new UnableToAdaptException(adaptable, type); } return object; }
Try to adapt the adaptable to the given type and ensures that it succeeds. @param adaptable Adaptable @param type Type @param <T> Type @return Adaption result (not null) @throws UnableToAdaptException if the adaption was not successful @SuppressWarnings("null") public static <T> @NotNull T notNull(@NotNull Adaptable...
124
235
272
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3dc14c1ac71b27f9157b3085dbca2e1e3909d3485f247d699d933d3a6c8b72a2
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
044a48f641a4114578fce11d
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getAssembly
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L125-L128
train
java
Returns a single assembly. @param id id of the Assembly to retrieve. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse getAssembly(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.get("/assemblies/" + id)); }
Returns a single assembly. @param id id of the Assembly to retrieve. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse getAssembly(String id) throws Reques...
86
258
219
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e72a2737f58da571ff553e2ed5e56660112a8372f2359cf8c3dc34bf343e0eb5
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
fd18ab1d0c09f85b9a24bbb3
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getAssemblyByUrl
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L138-L142
train
java
Returns a single assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse getAssemblyByUrl(String url) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.get(url)); }
Returns a single assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse getAssemblyByUrl(String url) ...
82
253
221
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d3bacecba534e1b8ad66e9847c1dd5821285e82c726b02348d3f985e83a846f8
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
26d4ed075a5a36c338d53a30
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.cancelAssembly
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L152-L156
train
java
cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse cancelAssembly(String url) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.delete(url, new HashMap<String, Object>())); }
cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse cancelAssembly(String url) t...
90
254
253
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1ae74bbca8560e44cef4b58ae3e6aa35ca4b1f66befad1b6f1d85c298453be84
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
681fdb9687df1cddb2f30fc2
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L195-L198
train
java
Returns a single template. @param id id of the template to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response getTemplate(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/templates/" + id)); }
Returns a single template. @param id id of the template to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response getTemplate(String id) throws RequestException, Loc...
82
251
202
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e353eeaf67f19fe90e014f852a017bc02f609eb1d8b489943d1177f9969fdca5
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ca78b8a4732281066393e717
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.updateTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L210-L214
train
java
Updates the template with the specified id. @param id id of the template to update @param options a Map of options to update/add. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response updateTemplate(String id, Map<String, Object> options) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.put("/templates/" + id, options)); }
Updates the template with the specified id. @param id id of the template to update @param options a Map of options to update/add. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public...
105
312
255
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6131dc9bbf28e02a342cb0fe58b18a4c4503822b322d5d37cd1ea59c6d8d29a6
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
6966a23ac36be2a71957f1ad
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.deleteTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L225-L229
train
java
Deletes a template. @param id id of the template to delete. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response deleteTemplate(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.delete("/templates/" + id, new HashMap<String, Object>())); }
Deletes a template. @param id id of the template to delete. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response deleteTemplate(String id) throws RequestExceptio...
89
242
251
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
75f4bfe996ca97a528bb9e085892e32c8e369c9d1498488f5b6d679472f2cac6
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
488c4f4e1a4c75b596b77572
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.listTemplates
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L240-L244
train
java
Returns a list of all templates under the user account @param options {@link Map} extra options to send along with the request. @return {@link ListResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public ListResponse listTemplates(Map<String, Object> options) throws RequestException, LocalOperationException { Request request = new Request(this); return new ListResponse(request.get("/templates", options)); }
Returns a list of all templates under the user account @param options {@link Map} extra options to send along with the request. @return {@link ListResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. publ...
101
314
245
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
242feed8b70f0f92e657228ab46bde614b91fe98ba1766afc91bb3f7f3bc87a0
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
c62a8df536c719f34961d634
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getBill
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L269-L273
train
java
Returns the bill for the month specified. @param month for which bill to retrieve. @param year for which bill to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response getBill(int month, int year) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/bill/" + year + String.format("-%02d", month))); }
Returns the bill for the month specified. @param month for which bill to retrieve. @param year for which bill to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Respon...
105
305
249
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e632626215ca6fc64c7cd529fa3d8ceddacdd7084b89c1e4763b26de83364b15
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
67bef7e2b12ac94b39d53b84
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.mapReduce
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L83-L85
train
java
runs a map-reduce-job on the collection. same as {@link #mapReduce(String, DBObject, DBObject, Map, MapReduceResultHandler) mapReduce(name, null, null, null, conv)} @param <R> the type of the result class @param name the name of the map-reduce functions @param conv the converter to convert the result @return an {@lin...
protected final <R> Iterable<R> mapReduce(String name, final MapReduceResultHandler<R> conv) { return this.dataAccess.mapReduce(name, conv); }
runs a map-reduce-job on the collection. same as {@link #mapReduce(String, DBObject, DBObject, Map, MapReduceResultHandler) mapReduce(name, null, null, null, conv)} @param <R> the type of the result class @param name the name of the map-reduce functions @param conv the converter to convert the result @return an {@lin...
123
355
154
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f620637632769dad08ef43def3416a01e867b8f207fb932f1ee917fa11a8a177
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
7d4ff403c563e52784dcc62b
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.mapReduce
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L101-L103
train
java
runs a map-reduce-job on the collection. The functions are read from the classpath in the folder mongodb. The systems reads them from files called &lt;name&gt;.map.js, &lt;name&gt;.reduce.js and optionally &lt;name&gt;.finalize.js. After this the result is converted using the given {@link MapReduceResultHandler} @para...
protected final <R> Iterable<R> mapReduce(String name, DBObject query, DBObject sort, Map<String, Object> scope, final MapReduceResultHandler<R> conv) { return this.dataAccess.mapReduce(name, query, sort, scope, conv); }
runs a map-reduce-job on the collection. The functions are read from the classpath in the folder mongodb. The systems reads them from files called &lt;name&gt;.map.js, &lt;name&gt;.reduce.js and optionally &lt;name&gt;.finalize.js. After this the result is converted using the given {@link MapReduceResultHandler} @para...
226
750
232
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
23a946b6eb126bdaba12ddd4b83c52cfbb459d1f893dbda6c301cf72acb0e216
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
78522332d39607d902dab2f4
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L122-L124
train
java
finds all elements matching the given query @param query the query to search for @param params the parameters to replace # symbols @return the list of elements found
protected final List<T> findByQuery(String query, Object... params) { return this.dataAccess.findByQuery(query, params); }
finds all elements matching the given query @param query the query to search for @param params the parameters to replace # symbols @return the list of elements found protected final List<T> findByQuery(String query, Object... params) { return this.dataAccess.findByQuery(query, params); }
62
167
134
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cba2eb49d5bb92dd30582a73b6cf75859398fe0ae20b37b3eed0225b40c80226
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
be711c530e2ea7e4eca404ad
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findSortedByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L134-L136
train
java
finds all elements matching the given query and sorts them accordingly @param query the query to search for @param sort the sort query to apply @param params the parameters to replace # symbols @return the list of elements found
protected final List<T> findSortedByQuery(String query, String sort, Object... params) { return this.dataAccess.findSortedByQuery(query, sort, params); }
finds all elements matching the given query and sorts them accordingly @param query the query to search for @param sort the sort query to apply @param params the parameters to replace # symbols @return the list of elements found protected final List<T> findSortedByQuery(String query, String sort, Object... params)...
84
232
165
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d845f02113d987e3735cbe0ef675ec4c8da816713ac4c5f1c3b26ab953c155b4
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
dfb6a3c57b5219fea030c023
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findSortedByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L168-L170
train
java
finds all elements matching the given query and sorts them accordingly. With this method it is possible to specify a projection to rename or filter fields in the result elements. Instead of returning typed objects it returns objects converted by the given {@link ResultHandler} @param query the query to search for...
protected final <P> List<P> findSortedByQuery(String query, String sort, String projection, ResultHandler<P> handler, Object... params) { return this.dataAccess.findSortedByQuery(query, sort, projection, handler, params); }
finds all elements matching the given query and sorts them accordingly. With this method it is possible to specify a projection to rename or filter fields in the result elements. Instead of returning typed objects it returns objects converted by the given {@link ResultHandler} @param query the query to search for...
169
598
235
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1e482cfdf737049ca159132e4e3b0720c31ecf3298e212f13308fb1838949e76
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
f5b6e4e36333ac2538cb3787
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findSortedByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L182-L184
train
java
finds all elements matching the given query and sorts them accordingly @param query the query to search for @param sort the sort query to apply @param skip the number of elements to skip @param limit the number of elements to fetch @param params the parameters to replace # symbols @return the list of elements fo...
protected final List<T> findSortedByQuery(String query, String sort, Integer skip, Integer limit, Object... params) { return this.dataAccess.findSortedByQuery(query, sort, skip, limit, params); }
finds all elements matching the given query and sorts them accordingly @param query the query to search for @param sort the sort query to apply @param skip the number of elements to skip @param limit the number of elements to fetch @param params the parameters to replace # symbols @return the list of elements fo...
114
323
207
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fd945ce31abe7ce18991c16551761b04f3d13b6f4adb1a06938085326bbeace9
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
0a2aedf9380c6d2e033e2fa9
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findSortedByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L201-L203
train
java
finds all elements matching the given query and sorts them accordingly. With this method it is possible to specify a projection to rename or filter fields in the result elements. Instead of returning typed objects it returns objects of type <code>as</code> @param query the query to search for @param sort th...
protected final <P> List<P> findSortedByQuery(String query, String sort, Integer skip, Integer limit, String projection, Class<P> as, Object... params) { return this.dataAccess.findSortedByQuery(query, sort, skip, limit, projection, as, params); }
finds all elements matching the given query and sorts them accordingly. With this method it is possible to specify a projection to rename or filter fields in the result elements. Instead of returning typed objects it returns objects of type <code>as</code> @param query the query to search for @param sort th...
198
673
259
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
39ef1da6f44b95768fa364235941e44e5155b34bb36ea433daa079ce606a3408
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
158d90fb43139678acbb220c
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.searchSorted
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L231-L233
train
java
finds all elements containing the given searchString in any text field and sorts them accordingly. @param searchString the searchString to search for @param sort the sort query to apply @return the list of elements found
protected final List<T> searchSorted(String searchString, String sort) { return this.dataAccess.searchSorted(searchString, sort); }
finds all elements containing the given searchString in any text field and sorts them accordingly. @param searchString the searchString to search for @param sort the sort query to apply @return the list of elements found protected final List<T> searchSorted(String searchString, String sort) { retur...
70
232
143
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ef22b89e2745e8dc723b866807f59aa46399a5b704a5179c92e9c9ac21781059
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
a827efacbb73ebd2e9f8837b
taimos/dvalin
mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java
AbstractMongoDAO.findFirstByQuery
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/AbstractMongoDAO.java#L243-L245
train
java
queries with the given string, sorts the result and returns the first element. <code>null</code> is returned if no element is found. @param query the query string @param sort the sort string @param params the parameters to replace # symbols @return the first element found or <code>null</code> if none is found
protected final T findFirstByQuery(String query, String sort, Object... params) { return this.dataAccess.findFirstByQuery(query, sort, params).orElse(null); }
queries with the given string, sorts the result and returns the first element. <code>null</code> is returned if no element is found. @param query the query string @param sort the sort string @param params the parameters to replace # symbols @return the first element found or <code>null</code> if none is found prot...
107
314
170
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e1a5b0f031d994e86b019887ab0ce31c43a65e8c71c1fc4e332a3d0d37eb9f28
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
c94c806af50afd940a620877
taimos/dvalin
dynamodb/src/main/java/de/taimos/dvalin/dynamodb/AbstractDynamoDAO.java
AbstractDynamoDAO.getTableName
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/dynamodb/src/main/java/de/taimos/dvalin/dynamodb/AbstractDynamoDAO.java#L98-L104
train
java
override to use custom table name instead of @{@link DynamoDBTable} annotation @return the name of the table to use
protected String getTableName() { Class<T> entityClass = this.getEntityClass(); if (!entityClass.isAnnotationPresent(DynamoDBTable.class)) { throw new IllegalStateException("Used getTableName on entity without @DynamoDBTable annotation"); } return entityClass.getAnnotation(Dy...
override to use custom table name instead of @{@link DynamoDBTable} annotation @return the name of the table to use protected String getTableName() { Class<T> entityClass = this.getEntityClass(); if (!entityClass.isAnnotationPresent(DynamoDBTable.class)) { throw new IllegalStateException("...
94
116
357
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
90970419cffdfc72f7f513c153b06994acf45e1ab44fec5458e910aa5b88d251
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
1a0f2f8b6abe028572784152
resource4j/resource4j
converters/src/main/java/com/github/resource4j/converters/TypeConverter.java
TypeConverter.convert
https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/converters/src/main/java/com/github/resource4j/converters/TypeConverter.java#L122-L125
train
java
Convert given value to given target @param fromValue the value to convert @param toType target target @param <T> target of the result @return the value converted to given target @throws TypeCastException if conversion was not possible
@SuppressWarnings("unchecked") public static <T> T convert(Object fromValue, Class<T> toType) throws TypeCastException { return convert(fromValue, toType, (String) null); }
Convert given value to given target @param fromValue the value to convert @param toType target target @param <T> target of the result @return the value converted to given target @throws TypeCastException if conversion was not possible @SuppressWarnings("unchecked") public static <T> T convert(Object fromValue, Cl...
93
235
188
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6a4438de3ddb768fe03df5cacfbc498d2f5512bab61dabd3cce5bd4bea74a515
BSD-3-Clause
permissive
https://github.com/resource4j/resource4j/blob/latest/LICENSE.txt
132f8b7aa55c654d1d43d820
taimos/dvalin
interconnect/interconnect-maven-plugin/src/main/java/de/taimos/dvalin/interconnect/model/maven/model/AbstractInterconnectModel.java
AbstractInterconnectModel.getInterfaceImplements
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/interconnect-maven-plugin/src/main/java/de/taimos/dvalin/interconnect/model/maven/model/AbstractInterconnectModel.java#L213-L223
train
java
velocity use @return the interface implementations
public String getInterfaceImplements() { StringBuilder builder = new StringBuilder(); for(ImplementsDef i : this.implementsDef) { builder.append(", "); builder.append(i.getName()); } if(builder.toString().trim().length() < 1) { return ""; } ...
velocity use @return the interface implementations public String getInterfaceImplements() { StringBuilder builder = new StringBuilder(); for(ImplementsDef i : this.implementsDef) { builder.append(", "); builder.append(i.getName()); } if(builder.toString().trim()...
82
51
372
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a8b927b36c8533fab02d84a73c485ce790b653c7cd9864f0ccf3953dee61c2be
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
bc5c78a255a529f78fb8a307
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/MessageCryptoUtil.java
MessageCryptoUtil.main
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/MessageCryptoUtil.java#L141-L170
train
java
start this to generate an AES key or (de/en)crypt data @param args the CLI arguments
@SuppressWarnings("resource") public static void main(String[] args) { try { System.out.println("Select (k=generate key; c=crypt; d=decrypt):"); System.out.println(); Scanner scan = new Scanner(System.in, "UTF-8"); if (!scan.hasNextLine()) { return; } switch (scan.nextLine()) { case "k": ...
start this to generate an AES key or (de/en)crypt data @param args the CLI arguments @SuppressWarnings("resource") public static void main(String[] args) { try { System.out.println("Select (k=generate key; c=crypt; d=decrypt):"); System.out.println(); Scanner scan = new Scanner(System.in, "UTF-8"); if ...
214
85
775
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f02bf5cc4082a47480970b23f1ac3cbc9562cb379886a0a20070594ea9b605e6
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
02d2b15393499614349d6cd0
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getInstanceTags
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L72-L79
train
java
<br> Needed AWS actions: <ul> <li>ec2:DescribeInstances</li> </ul> @return the tags of the current instance
public Map<String, String> getInstanceTags() { Map<String, String> map = new HashMap<>(); Instance instance = this.getInstance(); for (Tag tag : instance.getTags()) { map.put(tag.getKey(), tag.getValue()); } return map; }
<br> Needed AWS actions: <ul> <li>ec2:DescribeInstances</li> </ul> @return the tags of the current instance public Map<String, String> getInstanceTags() { Map<String, String> map = new HashMap<>(); Instance instance = this.getInstance(); for (Tag tag : instance.getTags()) { map.put...
85
108
277
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2f29311d3305aa2452393cbc38a292ae4ea96cc520c3bd7ced687efd1960cb39
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
1fb6a6bc97c0d1ef63a9a79b
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getAutoScalingGroup
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L90-L98
train
java
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingInstances</li> </ul> @return the name of the auto scaling group the current instance is a member of
public String getAutoScalingGroup() { DescribeAutoScalingInstancesRequest req = new DescribeAutoScalingInstancesRequest(); req.setInstanceIds(Collections.singleton(this.getInstanceId())); DescribeAutoScalingInstancesResult result = this.autoScalingClient.describeAutoScalingInstances(req); ...
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingInstances</li> </ul> @return the name of the auto scaling group the current instance is a member of public String getAutoScalingGroup() { DescribeAutoScalingInstancesRequest req = new DescribeAutoScalingInstancesRequest(); req.setInstanc...
139
165
557
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4b8db95c94f0fd7df54cc136a7358187f00ed0f9dccadc1a0d2c680950349a12
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
7e20a452d5b30203b59539bc
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getAutoScalingMembers
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L110-L121
train
java
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @param autoScalingGroupName the name to search for @return the members of the given auto scaling group
public List<String> getAutoScalingMembers(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty()); AutoScalingGroup autoScalingGroup = this.getAutoScalingGroup(autoScalingGroupName); List<String> list = new ArrayList<>(); ...
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @param autoScalingGroupName the name to search for @return the members of the given auto scaling group public List<String> getAutoScalingMembers(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName !=...
149
186
590
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4f64ac2bc5d4754f5ecd110e16197a8e35150fc42cb77fb6ad99098c270d0741
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
d39acdf81b240669cca058fe
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getPrivateAutoScalingMemberIPs
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L134-L149
train
java
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> <li>ec2:DescribeInstances</li> </ul> @param autoScalingGroupName the name of the group @return the list of private IP addresses of the members
public List<String> getPrivateAutoScalingMemberIPs(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty()); List<String> members = this.getAutoScalingMembers(autoScalingGroupName); DescribeInstancesRequest req = new DescribeInst...
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> <li>ec2:DescribeInstances</li> </ul> @param autoScalingGroupName the name of the group @return the list of private IP addresses of the members public List<String> getPrivateAutoScalingMemberIPs(String autoScalingGroupName) { Precondi...
200
220
835
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e3565527691a530c928226bf7e49e721132fd6ffc0561b800c92800f480fa526
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
7e91f5661848509f8cef119f
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getAutoScalingGroup
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L161-L170
train
java
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @param autoScalingGroupName the name to search for @return the given auto scaling group
public AutoScalingGroup getAutoScalingGroup(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty()); DescribeAutoScalingGroupsRequest req = new DescribeAutoScalingGroupsRequest(); req.setAutoScalingGroupNames(Collections.singlet...
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @param autoScalingGroupName the name to search for @return the given auto scaling group public AutoScalingGroup getAutoScalingGroup(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !aut...
158
171
659
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
11243e5ea9cf4d33c5ec508f53561a7794802352621327a187d66972e35842ef
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
961a855b75b3108b43674bc3
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getAutoScalingGroupTags
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L181-L189
train
java
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @return the tags of the given auto sclaing group
public Map<String, String> getAutoScalingGroupTags(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty()); AutoScalingGroup group = this.getAutoScalingGroup(autoScalingGroupName); Map<String, String> tags = new HashMap<>(); ...
<br> Needed AWS actions: <ul> <li>autoscaling:DescribeAutoScalingGroups</li> </ul> @return the tags of the given auto sclaing group public Map<String, String> getAutoScalingGroupTags(String autoScalingGroupName) { Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty()); ...
126
132
491
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9e04ad95c393f56387a7159db5f0b6c165e61264f631daaf98a2b2c80041c132
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
38fded694d2338533bece712
taimos/dvalin
cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java
EC2Context.getInstance
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/cloud/aws/src/main/java/de/taimos/dvalin/cloud/aws/EC2Context.java#L200-L212
train
java
<br> Needed AWS actions: <ul> <li>ec2:DescribeInstances</li> </ul> @return the current EC2 instance
public Instance getInstance() { DescribeInstancesRequest req = new DescribeInstancesRequest(); req.setInstanceIds(Collections.singleton(this.getInstanceId())); DescribeInstancesResult result = this.ec2Client.describeInstances(req); if (result.getReservations().size() != 1) { ...
<br> Needed AWS actions: <ul> <li>ec2:DescribeInstances</li> </ul> @return the current EC2 instance public Instance getInstance() { DescribeInstancesRequest req = new DescribeInstancesRequest(); req.setInstanceIds(Collections.singleton(this.getInstanceId())); DescribeInstancesResult result = t...
145
100
632
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
97f484651d100d3c746a82d46ed84308806bebbd4788a0ffccd24c9b13617805
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
ebf4086eac733ba4e2c507c5
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnReduceTensorOp.java
cudnnReduceTensorOp.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnReduceTensorOp.java#L58-L73
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_REDUCE_TENSOR_ADD: return "CUDNN_REDUCE_TENSOR_ADD"; case CUDNN_REDUCE_TENSOR_MUL: return "CUDNN_REDUCE_TENSOR_MUL"; case CUDNN_REDUCE_TENSOR_MIN: return "CUDNN_REDUCE_TENSOR_MIN"; ...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_REDUCE_TENSOR_ADD: return "CUDNN_REDUCE_TENSOR_ADD"; case CUDNN_REDUCE_TENSOR_MUL: return "CUDNN_...
288
108
865
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0edfeea4b4d8e41109e5f550af4ed1fde62822fd6f1bf10ff27e86dfef5dd8ac
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
d70d97185727a912d4559cef
taimos/dvalin
jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
JWTAuth.signToken
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java#L67-L75
train
java
Sign the given claims @param claims the claims to sign @return the created and signed JSON Web Token
public SignedJWT signToken(JWTClaimsSet claims) { try { SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claims); signedJWT.sign(new MACSigner(this.jwtSharedSecret)); return signedJWT; } catch (JOSEException e) { throw new RuntimeExce...
Sign the given claims @param claims the claims to sign @return the created and signed JSON Web Token public SignedJWT signToken(JWTClaimsSet claims) { try { SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claims); signedJWT.sign(new MACSigner(this.jwtSharedSecret...
103
101
377
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0b23e893081c4f22f0171f057c807909e99a69b5875e8d219a6e66a909f0db34
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
b388b357a4f02a1879cacc0e
taimos/dvalin
jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
JWTAuth.signToken
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java#L83-L88
train
java
Sign the given claims @param user the user to create the claims from @return the created and signed JSON Web Token as string
public String signToken(AuthenticatedUser user) { Date expiry = new Date(System.currentTimeMillis() + this.jwtTimeout); JWTClaimsSet claimsSet = user.toClaimSet(this.jwtIssuer, expiry); SignedJWT jwt = this.signToken(claimsSet); return jwt.serialize(); }
Sign the given claims @param user the user to create the claims from @return the created and signed JSON Web Token as string public String signToken(AuthenticatedUser user) { Date expiry = new Date(System.currentTimeMillis() + this.jwtTimeout); JWTClaimsSet claimsSet = user.toClaimSet(this.jwtIssuer, ...
86
125
290
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4a6367ad62c716f12eb857f4532e27dde4f3ebf6c3fd3e4e99862cda1864215e
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
4e66fe812d6e52997aefd525
taimos/dvalin
jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
JWTAuth.verifyToken
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java#L97-L107
train
java
Check the given JWT @param jwtString the JSON Web Token @return the parsed and verified token or null if token is invalid @throws ParseException if the token cannot be parsed
public SignedJWT verifyToken(String jwtString) throws ParseException { try { SignedJWT jwt = SignedJWT.parse(jwtString); if (jwt.verify(new MACVerifier(this.jwtSharedSecret))) { return jwt; } return null; } catch (JOSEException e) { ...
Check the given JWT @param jwtString the JSON Web Token @return the parsed and verified token or null if token is invalid @throws ParseException if the token cannot be parsed public SignedJWT verifyToken(String jwtString) throws ParseException { try { SignedJWT jwt = SignedJWT.parse(jwtString); ...
114
175
405
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b65e8b4e8a7b2085e5829b71d621865ad9313f5af3a5416e77315a369b823375
Apache-2.0
permissive
https://github.com/taimos/dvalin/blob/master/LICENSE.txt
bb28ec56b29159b409b6a091
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java
RankedServices.bind
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java#L69-L74
train
java
Handle bind service event. @param service Service instance @param props Service reference properties
public void bind(T service, Map<String, Object> props) { synchronized (serviceMap) { serviceMap.put(ServiceUtil.getComparableForServiceRanking(props), service); updateSortedServices(); } }
Handle bind service event. @param service Service instance @param props Service reference properties public void bind(T service, Map<String, Object> props) { synchronized (serviceMap) { serviceMap.put(ServiceUtil.getComparableForServiceRanking(props), service); updateSortedServices(); } }
62
100
210
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea13384aac96bcd19602ab032b761192474fb44969604540ee39cb4c33b28097
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
e49bf3f8cdd59c7257a6c7f8
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java
RankedServices.unbind
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java#L81-L86
train
java
Handle unbind service event. @param service Service instance @param props Service reference properties
public void unbind(T service, Map<String, Object> props) { synchronized (serviceMap) { serviceMap.remove(ServiceUtil.getComparableForServiceRanking(props)); updateSortedServices(); } }
Handle unbind service event. @param service Service instance @param props Service reference properties public void unbind(T service, Map<String, Object> props) { synchronized (serviceMap) { serviceMap.remove(ServiceUtil.getComparableForServiceRanking(props)); updateSortedServices(); } }
62
102
206
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
59b398108725b6920f6a9e6d5d72ff72261541b1aeb8d57dadba7870936e17c5
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
7ff655fe0746546b9d3310ac
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java
RankedServices.updateSortedServices
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/osgi/RankedServices.java#L91-L97
train
java
Update list of sorted services by copying it from the array and making it unmodifiable.
private void updateSortedServices() { List<T> copiedList = new ArrayList<T>(serviceMap.values()); sortedServices = Collections.unmodifiableList(copiedList); if (changeListener != null) { changeListener.changed(); } }
Update list of sorted services by copying it from the array and making it unmodifiable. private void updateSortedServices() { List<T> copiedList = new ArrayList<T>(serviceMap.values()); sortedServices = Collections.unmodifiableList(copiedList); if (changeListener != null) { changeListener.changed(); ...
70
87
240
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a5610d245cf3638dbdfe80146fad7a15cc30afbc0e4c52ce64adc50d4bd6f6d8
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
73821498f0493fcbf1b9d320
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java
RequestPath.hasSelector
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java#L43-L46
train
java
Checks if the given selector is present in the current URL request (at any position). @param request Sling request @param expectedSelector Selector string to check for. @return true if the selector was found
public static boolean hasSelector(@NotNull SlingHttpServletRequest request, @NotNull String expectedSelector) { String[] selectors = request.getRequestPathInfo().getSelectors(); return ArrayUtils.contains(selectors, expectedSelector); }
Checks if the given selector is present in the current URL request (at any position). @param request Sling request @param expectedSelector Selector string to check for. @return true if the selector was found public static boolean hasSelector(@NotNull SlingHttpServletRequest request, @NotNull String expectedSelector) {...
85
207
246
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b915a4d6069af81378600bc6baa4ea997c8284f4d9afc6f6fc31602df72c687b
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
59ddb56393863ff425216231
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java
RequestPath.hasAnySelector
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java#L54-L65
train
java
Checks if one of the given selectors is present in the current URL request (at any position). @param request Sling request @param expectedSelectors Selectors string to check for. @return true if the selector was found
@SuppressWarnings("null") public static boolean hasAnySelector(@NotNull SlingHttpServletRequest request, @NotNull String @NotNull... expectedSelectors) { String[] selectors = request.getRequestPathInfo().getSelectors(); if (selectors != null && expectedSelectors != null) { for (String expectedSelector :...
Checks if one of the given selectors is present in the current URL request (at any position). @param request Sling request @param expectedSelectors Selectors string to check for. @return true if the selector was found @SuppressWarnings("null") public static boolean hasAnySelector(@NotNull SlingHttpServletRequest req...
137
217
474
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1897aef99a7002c79d12ee979fd90513198926f670c3968fffef9abeeaa98d74
Apache-2.0
permissive
https://github.com/wcm-io/wcm-io-sling/blob/develop/LICENSE
84685339e45983cf26a1adeb
resource4j/resource4j
integration/extras/src/main/java/com/github/resource4j/extras/json/JacksonParser.java
JacksonParser.json
https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/integration/extras/src/main/java/com/github/resource4j/extras/json/JacksonParser.java#L35-L37
train
java
Creates typed parser @param contentType class of parsed object @param <T> type of parsed object @return parser of objects of given type
public static <T> JacksonParser<T> json(Class<T> contentType) { return new JacksonParser<>(null, contentType); }
Creates typed parser @param contentType class of parsed object @param <T> type of parsed object @return parser of objects of given type public static <T> JacksonParser<T> json(Class<T> contentType) { return new JacksonParser<>(null, contentType); }
56
135
124
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9aec02fb5da721cba91d200fb0d6f2b8951416c65c13d1a3451306867d321901
BSD-3-Clause
permissive
https://github.com/resource4j/resource4j/blob/latest/LICENSE.txt
bd7b3616eb770cdcb82f8048
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnStatus.java
cudnnStatus.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnStatus.java#L63-L83
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_STATUS_SUCCESS: return "CUDNN_STATUS_SUCCESS"; case CUDNN_STATUS_NOT_INITIALIZED: return "CUDNN_STATUS_NOT_INITIALIZED"; case CUDNN_STATUS_ALLOC_FAILED: return "CUDNN_STATUS_ALLOC_FAILED"; ...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_STATUS_SUCCESS: return "CUDNN_STATUS_SUCCESS"; case CUDNN_STATUS_NOT_INITIALIZED: return "CUDNN_S...
320
108
1,342
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d4106bc0c9c246c1a9a7946aca0f7b7354d148151c044cd16bfd5d5676729d17
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
392ad40c63d312bc7ed0b901
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Steps.java
Steps.addStep
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Steps.java#L54-L56
train
java
Adds a new step to the list of steps. @param name Name of the step to add. @param robot The name of the robot ot use with the step. @param options extra options required for the step.
public void addStep(String name, String robot, Map<String, Object> options) { all.put(name, new Step(name, robot, options)); }
Adds a new step to the list of steps. @param name Name of the step to add. @param robot The name of the robot ot use with the step. @param options extra options required for the step. public void addStep(String name, String robot, Map<String, Object> options) { all.put(name, new Step(name, robot, options)); ...
74
184
138
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1bdfe67be8abb67b0f5e695c4590397b9e614f777372f101056307df39499180
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
769fd51e36cd17f0f39c3ce9
heneke/thymeleaf-extras-togglz
src/main/java/com/github/heneke/thymeleaf/togglz/processor/AbstractFeatureAttrProcessor.java
AbstractFeatureAttrProcessor.determineFeatureState
https://github.com/heneke/thymeleaf-extras-togglz/blob/768984cd373c7220c35557799e79ddbc5d7f9cf2/src/main/java/com/github/heneke/thymeleaf/togglz/processor/AbstractFeatureAttrProcessor.java#L53-L63
train
java
Determines the feature state @param context the template context @param tag the tag @param attributeName the attribute name @param attributeValue the attribute value @param defaultState the default state if the expression evaluates to null @return the feature state
protected boolean determineFeatureState(final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, boolean defaultState) { final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(context.getConfiguration())...
Determines the feature state @param context the template context @param tag the tag @param attributeName the attribute name @param attributeValue the attribute value @param defaultState the default state if the expression evaluates to null @return the feature state protected boolean determineFeat...
159
287
642
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6e4eae8cef6b8fe66537b75ff80f682d337ecf9f3ed28c91f223ba8a9e3b8d09
Apache-2.0
permissive
https://github.com/heneke/thymeleaf-extras-togglz/blob/master/LICENSE.txt
196760d2847af02f203bafb5
cenobites/struts2-json-plugin
src/main/java/es/cenobit/struts2/json/ClasspathConfigurationProvider.java
ClasspathConfigurationProvider.init
https://github.com/cenobites/struts2-json-plugin/blob/00f948942d85b6f696d46672332ff7b3942ecb1b/src/main/java/es/cenobit/struts2/json/ClasspathConfigurationProvider.java#L71-L79
train
java
Not used.
public void init(Configuration configuration) { if (devMode && reload && !listeningToDispatcher) { // this is the only way I found to be able to get added to to // ConfigurationProvider list // listening to events in Dispatcher listeningToDispatcher = true; ...
Not used. public void init(Configuration configuration) { if (devMode && reload && !listeningToDispatcher) { // this is the only way I found to be able to get added to to // ConfigurationProvider list // listening to events in Dispatcher listeningToDispatcher = t...
74
9
381
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
abe2fa33ac58599d78bc4e13ac820434083eda243d3dce48ac5fae77e10da2c0
Apache-2.0
permissive
https://github.com/cenobites/struts2-json-plugin/blob/master/LICENSE
33e9ddb2ad42337e176d3e6d
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L57-L64
train
java
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param file {@link File} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit.
public void addFile(File file, String name) { files.put(name, file); // remove duplicate key if (fileStreams.containsKey(name)) { fileStreams.remove(name); } }
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param file {@link File} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit. public void addFile(File file, String name) { files.p...
99
257
208
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0d02166b1be9c8378e3547599ec4bcc541103ace0d537d6dd627d49c1e2fba8f
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
d5359fa4d7729c9adb1b6bbf
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L71-L74
train
java
Adds a file to your assembly but automatically generates the field name of the file. @param file {@link File} the file to be uploaded.
public void addFile(File file) { String name = "file"; files.put(normalizeDuplicateName(name), file); }
Adds a file to your assembly but automatically generates the field name of the file. @param file {@link File} the file to be uploaded. public void addFile(File file) { String name = "file"; files.put(normalizeDuplicateName(name), file); }
56
135
123
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fe54a523b7e00526d77a1ee72cf4e75e4c0ac775186dc08292107f628eda0e1b
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
bac190727b1c6ffca5e5bec8
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L83-L90
train
java
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param inputStream {@link InputStream} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit.
public void addFile(InputStream inputStream, String name) { fileStreams.put(name, inputStream); // remove duplicate key if (files.containsKey(name)) { files.remove(name); } }
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param inputStream {@link InputStream} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit. public void addFile(InputStream inputStream, St...
98
271
223
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1534d49ec1182143efeb5b8e9251b7e6335c25f9cae0d28e7403bbee7dd9958
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE