repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
deephacks/confit
provider-hbase-filter/src/main/java/org/deephacks/confit/internal/hbase/Bytes.java
Bytes.setShort
public static void setShort(final byte[] b, final short n, final int offset) { """ Writes a big-endian 2-byte short at an offset in the given array. @param b The array to write to. @param offset The offset in the array to start writing at. @throws IndexOutOfBoundsException if the byte array is too small. ""...
java
public static void setShort(final byte[] b, final short n, final int offset) { b[offset + 0] = (byte) (n >>> 8); b[offset + 1] = (byte) (n >>> 0); }
[ "public", "static", "void", "setShort", "(", "final", "byte", "[", "]", "b", ",", "final", "short", "n", ",", "final", "int", "offset", ")", "{", "b", "[", "offset", "+", "0", "]", "=", "(", "byte", ")", "(", "n", ">>>", "8", ")", ";", "b", "...
Writes a big-endian 2-byte short at an offset in the given array. @param b The array to write to. @param offset The offset in the array to start writing at. @throws IndexOutOfBoundsException if the byte array is too small.
[ "Writes", "a", "big", "-", "endian", "2", "-", "byte", "short", "at", "an", "offset", "in", "the", "given", "array", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/provider-hbase-filter/src/main/java/org/deephacks/confit/internal/hbase/Bytes.java#L108-L111
windup/windup
config-xml/addon/src/main/java/org/jboss/windup/config/parser/ParserContext.java
ParserContext.processDocument
public <T> T processDocument(URI uri) throws ConfigurationException { """ Processes the XML document at the provided {@link URL} and returns a result from the namespace element handlers. """ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(tru...
java
public <T> T processDocument(URI uri) throws ConfigurationException { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(true); DocumentBuilder dBuilder = null; try { dBuilder = dbFactory.newDocumentBuilder(); ...
[ "public", "<", "T", ">", "T", "processDocument", "(", "URI", "uri", ")", "throws", "ConfigurationException", "{", "DocumentBuilderFactory", "dbFactory", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "dbFactory", ".", "setNamespaceAware", "(", "...
Processes the XML document at the provided {@link URL} and returns a result from the namespace element handlers.
[ "Processes", "the", "XML", "document", "at", "the", "provided", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config-xml/addon/src/main/java/org/jboss/windup/config/parser/ParserContext.java#L108-L133
Pkmmte/CircularImageView
circularimageview/src/main/java/com/pkmmte/view/CircularImageView.java
CircularImageView.setShadow
public void setShadow(float radius, float dx, float dy, int color) { """ Enables a dark shadow for this CircularImageView. If the radius is set to 0, the shadow is removed. @param radius Radius for the shadow to extend to. @param dx Horizontal shadow offset. @param dy Vertical shadow offset. @param color The ...
java
public void setShadow(float radius, float dx, float dy, int color) { shadowRadius = radius; shadowDx = dx; shadowDy = dy; shadowColor = color; updateShadow(); }
[ "public", "void", "setShadow", "(", "float", "radius", ",", "float", "dx", ",", "float", "dy", ",", "int", "color", ")", "{", "shadowRadius", "=", "radius", ";", "shadowDx", "=", "dx", ";", "shadowDy", "=", "dy", ";", "shadowColor", "=", "color", ";", ...
Enables a dark shadow for this CircularImageView. If the radius is set to 0, the shadow is removed. @param radius Radius for the shadow to extend to. @param dx Horizontal shadow offset. @param dy Vertical shadow offset. @param color The color of the shadow to apply.
[ "Enables", "a", "dark", "shadow", "for", "this", "CircularImageView", ".", "If", "the", "radius", "is", "set", "to", "0", "the", "shadow", "is", "removed", "." ]
train
https://github.com/Pkmmte/CircularImageView/blob/aca59f32d9267c943eb6c930bdaed59c417a4d16/circularimageview/src/main/java/com/pkmmte/view/CircularImageView.java#L210-L216
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newScrollPanelX
public static ScrollPanel newScrollPanelX (Widget contents, int maxWidth) { """ Wraps the supplied contents in a scroll panel with the specified maximum width. """ ScrollPanel panel = new ScrollPanel(contents); DOM.setStyleAttribute(panel.getElement(), "maxWidth", maxWidth + "px"); retu...
java
public static ScrollPanel newScrollPanelX (Widget contents, int maxWidth) { ScrollPanel panel = new ScrollPanel(contents); DOM.setStyleAttribute(panel.getElement(), "maxWidth", maxWidth + "px"); return panel; }
[ "public", "static", "ScrollPanel", "newScrollPanelX", "(", "Widget", "contents", ",", "int", "maxWidth", ")", "{", "ScrollPanel", "panel", "=", "new", "ScrollPanel", "(", "contents", ")", ";", "DOM", ".", "setStyleAttribute", "(", "panel", ".", "getElement", "...
Wraps the supplied contents in a scroll panel with the specified maximum width.
[ "Wraps", "the", "supplied", "contents", "in", "a", "scroll", "panel", "with", "the", "specified", "maximum", "width", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L119-L124
rnorth/visible-assertions
src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java
VisibleAssertions.assertThrows
public static void assertThrows(String message, Class<? extends Exception> exceptionClass, Runnable runnable) { """ Assert that a given runnable throws an exception of a particular class. <p> The assertion passes if the runnable throws exactly the same class of exception (not a subclass). <p> If the runnable d...
java
public static void assertThrows(String message, Class<? extends Exception> exceptionClass, Runnable runnable) { try { runnable.run(); fail(message, "No exception was thrown (expected " + exceptionClass.getSimpleName() + ")"); } catch (Exception e) { if (!e.getClass()....
[ "public", "static", "void", "assertThrows", "(", "String", "message", ",", "Class", "<", "?", "extends", "Exception", ">", "exceptionClass", ",", "Runnable", "runnable", ")", "{", "try", "{", "runnable", ".", "run", "(", ")", ";", "fail", "(", "message", ...
Assert that a given runnable throws an exception of a particular class. <p> The assertion passes if the runnable throws exactly the same class of exception (not a subclass). <p> If the runnable doesn't throw an exception at all, or if another class of exception is thrown, the assertion fails. <p> If the assertion passe...
[ "Assert", "that", "a", "given", "runnable", "throws", "an", "exception", "of", "a", "particular", "class", ".", "<p", ">", "The", "assertion", "passes", "if", "the", "runnable", "throws", "exactly", "the", "same", "class", "of", "exception", "(", "not", "a...
train
https://github.com/rnorth/visible-assertions/blob/6d7a7724db40ac0e9f87279553f814b790310b3b/src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java#L404-L415
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java
Neighbours.createBus
private BusGroup createBus(String busId) { """ Creates a BusGroup with the given name. As this is a new Bus, the current subscription state in the MatchSpace is read and assigned to the Bus as active subscriptions. @param busId The name of the Busgroup @return The new BusGroup object representing the b...
java
private BusGroup createBus(String busId) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createBus", busId); // Create a new group and add it to the list. boolean isLocalBus = busId.equals(_localBusName); final BusGroup group = new BusGroup(busId, _proxyHandl...
[ "private", "BusGroup", "createBus", "(", "String", "busId", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"createBus\"", ",", "busId",...
Creates a BusGroup with the given name. As this is a new Bus, the current subscription state in the MatchSpace is read and assigned to the Bus as active subscriptions. @param busId The name of the Busgroup @return The new BusGroup object representing the bus.
[ "Creates", "a", "BusGroup", "with", "the", "given", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java#L1127-L1147
google/auto
value/src/main/java/com/google/auto/value/processor/TypeVariables.java
TypeVariables.rewriteReturnTypes
static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes( Elements elementUtils, Types typeUtils, Collection<ExecutableElement> methods, TypeElement sourceType, TypeElement targetType) { """ Returns a map from methods to return types, where the return types are not necess...
java
static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes( Elements elementUtils, Types typeUtils, Collection<ExecutableElement> methods, TypeElement sourceType, TypeElement targetType) { List<? extends TypeParameterElement> sourceTypeParameters = sourceType.getTypeParamete...
[ "static", "ImmutableMap", "<", "ExecutableElement", ",", "TypeMirror", ">", "rewriteReturnTypes", "(", "Elements", "elementUtils", ",", "Types", "typeUtils", ",", "Collection", "<", "ExecutableElement", ">", "methods", ",", "TypeElement", "sourceType", ",", "TypeEleme...
Returns a map from methods to return types, where the return types are not necessarily the original return types of the methods. Consider this example: <pre> &#64;AutoValue class {@code Foo<T>} { abstract T getFoo(); &#64;AutoValue.Builder abstract class {@code Builder<T>} { abstract Builder setFoo(T t); abstract {@c...
[ "Returns", "a", "map", "from", "methods", "to", "return", "types", "where", "the", "return", "types", "are", "not", "necessarily", "the", "original", "return", "types", "of", "the", "methods", ".", "Consider", "this", "example", ":" ]
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/value/src/main/java/com/google/auto/value/processor/TypeVariables.java#L81-L107
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCopyModelPageMenuEntry.java
CmsCopyModelPageMenuEntry.openEditConfirmDialog
public static void openEditConfirmDialog(final CmsNewResourceInfo resourceInfo) { """ Opens the confirmation dialog for editing a model page.<p> @param resourceInfo the resource information bean which belongs to the model page to edit """ I_CmsConfirmDialogHandler handler = new I_CmsConfirmDialogHa...
java
public static void openEditConfirmDialog(final CmsNewResourceInfo resourceInfo) { I_CmsConfirmDialogHandler handler = new I_CmsConfirmDialogHandler() { public void onClose() { // noop } public void onOk() { String resourcePath = resourceIn...
[ "public", "static", "void", "openEditConfirmDialog", "(", "final", "CmsNewResourceInfo", "resourceInfo", ")", "{", "I_CmsConfirmDialogHandler", "handler", "=", "new", "I_CmsConfirmDialogHandler", "(", ")", "{", "public", "void", "onClose", "(", ")", "{", "// noop", ...
Opens the confirmation dialog for editing a model page.<p> @param resourceInfo the resource information bean which belongs to the model page to edit
[ "Opens", "the", "confirmation", "dialog", "for", "editing", "a", "model", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCopyModelPageMenuEntry.java#L69-L101
FXMisc/WellBehavedFX
src/main/java/org/fxmisc/wellbehaved/event/Nodes.java
Nodes.addInputMap
public static void addInputMap(Node node, InputMap<?> im) { """ Adds the given input map to the start of the node's list of input maps, so that an event will be pattern-matched against the given input map before being pattern-matched against any other input maps currently "installed" in the node. """ ...
java
public static void addInputMap(Node node, InputMap<?> im) { // getInputMap calls init, so can use unsafe setter setInputMapUnsafe(node, InputMap.sequence(im, getInputMap(node))); }
[ "public", "static", "void", "addInputMap", "(", "Node", "node", ",", "InputMap", "<", "?", ">", "im", ")", "{", "// getInputMap calls init, so can use unsafe setter", "setInputMapUnsafe", "(", "node", ",", "InputMap", ".", "sequence", "(", "im", ",", "getInputMap"...
Adds the given input map to the start of the node's list of input maps, so that an event will be pattern-matched against the given input map before being pattern-matched against any other input maps currently "installed" in the node.
[ "Adds", "the", "given", "input", "map", "to", "the", "start", "of", "the", "node", "s", "list", "of", "input", "maps", "so", "that", "an", "event", "will", "be", "pattern", "-", "matched", "against", "the", "given", "input", "map", "before", "being", "...
train
https://github.com/FXMisc/WellBehavedFX/blob/ca889734481f5439655ca8deb6f742964b5654b0/src/main/java/org/fxmisc/wellbehaved/event/Nodes.java#L51-L54
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/lifecycle/ClientConfig.java
ClientConfig.setJavaScriptEnabled
public void setJavaScriptEnabled(boolean javaScriptEnabled) { """ Set it to <code>false</code> if you don't like to use the JavaScript based client side windowhandler. In this case the request will be returned directly. @param javaScriptEnabled """ this.javaScriptEnabled = javaScriptEnabled; ...
java
public void setJavaScriptEnabled(boolean javaScriptEnabled) { this.javaScriptEnabled = javaScriptEnabled; // and now also store this information inside a cookie! FacesContext facesContext = FacesContext.getCurrentInstance(); if (facesContext != null) { Object r =...
[ "public", "void", "setJavaScriptEnabled", "(", "boolean", "javaScriptEnabled", ")", "{", "this", ".", "javaScriptEnabled", "=", "javaScriptEnabled", ";", "// and now also store this information inside a cookie!", "FacesContext", "facesContext", "=", "FacesContext", ".", "getC...
Set it to <code>false</code> if you don't like to use the JavaScript based client side windowhandler. In this case the request will be returned directly. @param javaScriptEnabled
[ "Set", "it", "to", "<code", ">", "false<", "/", "code", ">", "if", "you", "don", "t", "like", "to", "use", "the", "JavaScript", "based", "client", "side", "windowhandler", ".", "In", "this", "case", "the", "request", "will", "be", "returned", "directly",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/lifecycle/ClientConfig.java#L97-L114
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArrayFor
public static <T> Level0ArrayOperator<Long[],Long> onArrayFor(final Long... elements) { """ <p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining """ return o...
java
public static <T> Level0ArrayOperator<Long[],Long> onArrayFor(final Long... elements) { return onArrayOf(Types.LONG, VarArgsUtil.asRequiredObjectArray(elements)); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Long", "[", "]", ",", "Long", ">", "onArrayFor", "(", "final", "Long", "...", "elements", ")", "{", "return", "onArrayOf", "(", "Types", ".", "LONG", ",", "VarArgsUtil", ".", "asRequiredObject...
<p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "array", "with", "the", "specified", "elements", "and", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L919-L921
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/ReplaceInListRepairer.java
ReplaceInListRepairer.repairCommand
public ReplaceInList repairCommand(final ReplaceInList toRepair, final AddToList repairAgainst) { """ Repairs a {@link ReplaceInList} in relation to an {@link AddToList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired command. """ ...
java
public ReplaceInList repairCommand(final ReplaceInList toRepair, final AddToList repairAgainst) { if (repairAgainst.getPosition() > toRepair.getPosition()) { return toRepair; } return new ReplaceInList(toRepair.getListId(), toRepair.getListVersionChange(), toRepair.getValue(), ...
[ "public", "ReplaceInList", "repairCommand", "(", "final", "ReplaceInList", "toRepair", ",", "final", "AddToList", "repairAgainst", ")", "{", "if", "(", "repairAgainst", ".", "getPosition", "(", ")", ">", "toRepair", ".", "getPosition", "(", ")", ")", "{", "ret...
Repairs a {@link ReplaceInList} in relation to an {@link AddToList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired command.
[ "Repairs", "a", "{", "@link", "ReplaceInList", "}", "in", "relation", "to", "an", "{", "@link", "AddToList", "}", "command", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/ReplaceInListRepairer.java#L46-L52
Microsoft/azure-maven-plugins
azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/Utils.java
Utils.getValueFromServerConfiguration
public static String getValueFromServerConfiguration(final Server server, final String key) { """ Get string value from server configuration section in settings.xml. @param server Server object. @param key Key string. @return String value if key exists; otherwise, return null. """ if (server =...
java
public static String getValueFromServerConfiguration(final Server server, final String key) { if (server == null) { return null; } final Xpp3Dom configuration = (Xpp3Dom) server.getConfiguration(); if (configuration == null) { return null; } ...
[ "public", "static", "String", "getValueFromServerConfiguration", "(", "final", "Server", "server", ",", "final", "String", "key", ")", "{", "if", "(", "server", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Xpp3Dom", "configuration", "=", "("...
Get string value from server configuration section in settings.xml. @param server Server object. @param key Key string. @return String value if key exists; otherwise, return null.
[ "Get", "string", "value", "from", "server", "configuration", "section", "in", "settings", ".", "xml", "." ]
train
https://github.com/Microsoft/azure-maven-plugins/blob/a254902e820185df1823b1d692c7c1d119490b1e/azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/Utils.java#L67-L83
osglworks/java-mvc
src/main/java/org/osgl/mvc/result/RequestTimeout.java
RequestTimeout.of
public static RequestTimeout of(Throwable cause) { """ Returns a static RequestTimeout instance and set the {@link #payload} thread local with cause specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param cause the cau...
java
public static RequestTimeout of(Throwable cause) { if (_localizedErrorMsg()) { return of(cause, defaultMessage(REQUEST_TIMEOUT)); } else { touchPayload().cause(cause); return _INSTANCE; } }
[ "public", "static", "RequestTimeout", "of", "(", "Throwable", "cause", ")", "{", "if", "(", "_localizedErrorMsg", "(", ")", ")", "{", "return", "of", "(", "cause", ",", "defaultMessage", "(", "REQUEST_TIMEOUT", ")", ")", ";", "}", "else", "{", "touchPayloa...
Returns a static RequestTimeout instance and set the {@link #payload} thread local with cause specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param cause the cause @return a static RequestTimeout instance as described above
[ "Returns", "a", "static", "RequestTimeout", "instance", "and", "set", "the", "{", "@link", "#payload", "}", "thread", "local", "with", "cause", "specified", "." ]
train
https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/RequestTimeout.java#L120-L127
alkacon/opencms-core
src/org/opencms/file/wrapper/CmsResourceWrapperModules.java
CmsResourceWrapperModules.matchPath
private boolean matchPath(String expected, String actual) { """ Checks if a path matches another part.<p> This is basically an equality test, but ignores the presence/absence of trailing slashes. @param expected the expected path @param actual the actual path @return true if the actual path matches the exp...
java
private boolean matchPath(String expected, String actual) { return CmsStringUtil.joinPaths(actual, "/").equals(CmsStringUtil.joinPaths(expected, "/")); }
[ "private", "boolean", "matchPath", "(", "String", "expected", ",", "String", "actual", ")", "{", "return", "CmsStringUtil", ".", "joinPaths", "(", "actual", ",", "\"/\"", ")", ".", "equals", "(", "CmsStringUtil", ".", "joinPaths", "(", "expected", ",", "\"/\...
Checks if a path matches another part.<p> This is basically an equality test, but ignores the presence/absence of trailing slashes. @param expected the expected path @param actual the actual path @return true if the actual path matches the expected path
[ "Checks", "if", "a", "path", "matches", "another", "part", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/wrapper/CmsResourceWrapperModules.java#L571-L574
bwkimmel/jdcp
jdcp-worker/src/main/java/ca/eandb/jdcp/worker/CachingJobServiceClassLoaderStrategy.java
CachingJobServiceClassLoaderStrategy.endLookup
private synchronized void endLookup(Map<String, String> pending, String name) { """ Signals that the current thread is done looking up a class digest or definition. @param pending The <code>Map</code> in which to store pending lookups. @param name The name of the class that was looked up. """ String can...
java
private synchronized void endLookup(Map<String, String> pending, String name) { String canonical = pending.remove(name); if (canonical != null) { canonical.notifyAll(); } }
[ "private", "synchronized", "void", "endLookup", "(", "Map", "<", "String", ",", "String", ">", "pending", ",", "String", "name", ")", "{", "String", "canonical", "=", "pending", ".", "remove", "(", "name", ")", ";", "if", "(", "canonical", "!=", "null", ...
Signals that the current thread is done looking up a class digest or definition. @param pending The <code>Map</code> in which to store pending lookups. @param name The name of the class that was looked up.
[ "Signals", "that", "the", "current", "thread", "is", "done", "looking", "up", "a", "class", "digest", "or", "definition", "." ]
train
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker/src/main/java/ca/eandb/jdcp/worker/CachingJobServiceClassLoaderStrategy.java#L145-L150
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getAccessControlList
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource, boolean inheritedOnly) throws CmsException { """ Returns the access control list of a given resource.<p> If <code>inheritedOnly</code> is set, only inherited access control entries are returned.<p> Note: For file re...
java
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource, boolean inheritedOnly) throws CmsException { return getAccessControlList(dbc, resource, inheritedOnly, resource.isFolder(), 0); }
[ "public", "CmsAccessControlList", "getAccessControlList", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ",", "boolean", "inheritedOnly", ")", "throws", "CmsException", "{", "return", "getAccessControlList", "(", "dbc", ",", "resource", ",", "inheritedOnly"...
Returns the access control list of a given resource.<p> If <code>inheritedOnly</code> is set, only inherited access control entries are returned.<p> Note: For file resources, *all* permissions set at the immediate parent folder are inherited, not only these marked to inherit. @param dbc the current database context ...
[ "Returns", "the", "access", "control", "list", "of", "a", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L3481-L3485
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
TypeUtils.parameterizeWithOwner
public static final ParameterizedType parameterizeWithOwner(final Type owner, final Class<?> raw, final Type... typeArguments) { """ Create a parameterized type instance. @param owner the owning type @param raw the raw class to create a parameterized type instance for @param typeArguments the types us...
java
public static final ParameterizedType parameterizeWithOwner(final Type owner, final Class<?> raw, final Type... typeArguments) { Validate.notNull(raw, "raw class is null"); final Type useOwner; if (raw.getEnclosingClass() == null) { Validate.isTrue(owner == null, "no owner al...
[ "public", "static", "final", "ParameterizedType", "parameterizeWithOwner", "(", "final", "Type", "owner", ",", "final", "Class", "<", "?", ">", "raw", ",", "final", "Type", "...", "typeArguments", ")", "{", "Validate", ".", "notNull", "(", "raw", ",", "\"raw...
Create a parameterized type instance. @param owner the owning type @param raw the raw class to create a parameterized type instance for @param typeArguments the types used for parameterization @return {@link ParameterizedType} @since 3.2
[ "Create", "a", "parameterized", "type", "instance", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java#L1493-L1513
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.addParticipants
public Observable<ComapiResult<Void>> addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants) { """ Returns observable to add a list of participants to a conversation. @param conversationId ID of a conversation to update. @param participants New conversation parti...
java
public Observable<ComapiResult<Void>> addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants) { final String token = getToken(); if (sessionController.isCreatingSession()) { return getTaskQueue().queueAddParticipants(conversationId, participants...
[ "public", "Observable", "<", "ComapiResult", "<", "Void", ">", ">", "addParticipants", "(", "@", "NonNull", "final", "String", "conversationId", ",", "@", "NonNull", "final", "List", "<", "Participant", ">", "participants", ")", "{", "final", "String", "token"...
Returns observable to add a list of participants to a conversation. @param conversationId ID of a conversation to update. @param participants New conversation participants details. @return Observable to add participants to a conversation.
[ "Returns", "observable", "to", "add", "a", "list", "of", "participants", "to", "a", "conversation", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L666-L677
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPartialDateFieldRenderer.java
WPartialDateFieldRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WPartialDateField. @param component the WPartialDateField to paint. @param renderContext the RenderContext to paint to. """ WPartialDateField dateField = (WPartialDateField) compone...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WPartialDateField dateField = (WPartialDateField) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = dateField.isReadOnly(); String date = formatDate(dateField); xml.appendTagO...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WPartialDateField", "dateField", "=", "(", "WPartialDateField", ")", "component", ";", "XmlStringBuilder", "xml", ...
Paints the given WPartialDateField. @param component the WPartialDateField to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WPartialDateField", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPartialDateFieldRenderer.java#L23-L60
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.createOrUpdate
public ApplicationGatewayInner createOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { """ Creates or updates the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the applicati...
java
public ApplicationGatewayInner createOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).toBlocking().last().body(); }
[ "public", "ApplicationGatewayInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ",", "ApplicationGatewayInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "applic...
Creates or updates the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @param parameters Parameters supplied to the create or update application gateway operation. @throws IllegalArgumentException thrown if param...
[ "Creates", "or", "updates", "the", "specified", "application", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L406-L408
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java
DateTimePatternGenerator.getBestAppending
private String getBestAppending(DateTimeMatcher source, int missingFields, DistanceInfo distInfo, DateTimeMatcher skipMatcher, EnumSet<DTPGflags> flags, int options) { """ We only get called here if we failed to find an exact skeleton. We have broken it into date + time, and look for the pieces. If we fail to fin...
java
private String getBestAppending(DateTimeMatcher source, int missingFields, DistanceInfo distInfo, DateTimeMatcher skipMatcher, EnumSet<DTPGflags> flags, int options) { String resultPattern = null; if (missingFields != 0) { PatternWithMatcher resultPatternWithMatcher = getBestRaw(source, miss...
[ "private", "String", "getBestAppending", "(", "DateTimeMatcher", "source", ",", "int", "missingFields", ",", "DistanceInfo", "distInfo", ",", "DateTimeMatcher", "skipMatcher", ",", "EnumSet", "<", "DTPGflags", ">", "flags", ",", "int", "options", ")", "{", "String...
We only get called here if we failed to find an exact skeleton. We have broken it into date + time, and look for the pieces. If we fail to find a complete skeleton, we compose in a loop until we have all the fields.
[ "We", "only", "get", "called", "here", "if", "we", "failed", "to", "find", "an", "exact", "skeleton", ".", "We", "have", "broken", "it", "into", "date", "+", "time", "and", "look", "for", "the", "pieces", ".", "If", "we", "fail", "to", "find", "a", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L1761-L1791
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/svm/DCDs.java
DCDs.setEps
public void setEps(double eps) { """ Sets the {@code eps} used in the epsilon insensitive loss function used when performing regression. Errors in the output that less than {@code eps} during training are treated as correct. <br> This parameter has no impact on classification problems. @param eps the non-ne...
java
public void setEps(double eps) { if(Double.isNaN(eps) || eps < 0 || Double.isInfinite(eps)) throw new IllegalArgumentException("eps must be non-negative, not "+eps); this.eps = eps; }
[ "public", "void", "setEps", "(", "double", "eps", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "eps", ")", "||", "eps", "<", "0", "||", "Double", ".", "isInfinite", "(", "eps", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"eps must...
Sets the {@code eps} used in the epsilon insensitive loss function used when performing regression. Errors in the output that less than {@code eps} during training are treated as correct. <br> This parameter has no impact on classification problems. @param eps the non-negative value to use as the error tolerance in re...
[ "Sets", "the", "{", "@code", "eps", "}", "used", "in", "the", "epsilon", "insensitive", "loss", "function", "used", "when", "performing", "regression", ".", "Errors", "in", "the", "output", "that", "less", "than", "{", "@code", "eps", "}", "during", "train...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/svm/DCDs.java#L139-L144
real-logic/agrona
agrona/src/main/java/org/agrona/Verify.java
Verify.present
public static void present(final Map<?, ?> map, final Object key, final String name) { """ Verify that a map contains an entry for a given key. @param map to be checked. @param key to get by. @param name of entry. @throws NullPointerException if map or key is null @throws IllegalStateException if the ent...
java
public static void present(final Map<?, ?> map, final Object key, final String name) { if (null == map.get(key)) { throw new IllegalStateException(name + " not found in map for key: " + key); } }
[ "public", "static", "void", "present", "(", "final", "Map", "<", "?", ",", "?", ">", "map", ",", "final", "Object", "key", ",", "final", "String", "name", ")", "{", "if", "(", "null", "==", "map", ".", "get", "(", "key", ")", ")", "{", "throw", ...
Verify that a map contains an entry for a given key. @param map to be checked. @param key to get by. @param name of entry. @throws NullPointerException if map or key is null @throws IllegalStateException if the entry does not exist.
[ "Verify", "that", "a", "map", "contains", "an", "entry", "for", "a", "given", "key", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/Verify.java#L62-L68
groupby/api-java
src/main/java/com/groupbyinc/util/UrlBeautifier.java
UrlBeautifier.toUrl
public String toUrl(String searchString, Map<String, Navigation> navigations) throws UrlBeautifier.UrlBeautificationException { """ <code> Convert a search term and a list of refinements into a beautified URL. Each refinement that has a mapping will be turned into a path segment. If a mapping has been created f...
java
public String toUrl(String searchString, Map<String, Navigation> navigations) throws UrlBeautifier.UrlBeautificationException { StringBuilder pathSegmentLookup = new StringBuilder("/"); Query query = createQuery(); if (StringUtils.isNotBlank(searchString)) { query.setQuery(searchString); } URI...
[ "public", "String", "toUrl", "(", "String", "searchString", ",", "Map", "<", "String", ",", "Navigation", ">", "navigations", ")", "throws", "UrlBeautifier", ".", "UrlBeautificationException", "{", "StringBuilder", "pathSegmentLookup", "=", "new", "StringBuilder", "...
<code> Convert a search term and a list of refinements into a beautified URL. Each refinement that has a mapping will be turned into a path segment. If a mapping has been created for search, the search term will also be placed into a URL path segment. </code> @param searchString The current search state. @param naviga...
[ "<code", ">", "Convert", "a", "search", "term", "and", "a", "list", "of", "refinements", "into", "a", "beautified", "URL", ".", "Each", "refinement", "that", "has", "a", "mapping", "will", "be", "turned", "into", "a", "path", "segment", ".", "If", "a", ...
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/util/UrlBeautifier.java#L255-L282
lagom/lagom
service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/RequestHeader.java
RequestHeader.clearPrincipal
public RequestHeader clearPrincipal() { """ Return a copy of this request header with the principal cleared. @return A copy of this request header. """ return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, Optional.empty(), headers, lowercaseHeaders); }
java
public RequestHeader clearPrincipal() { return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, Optional.empty(), headers, lowercaseHeaders); }
[ "public", "RequestHeader", "clearPrincipal", "(", ")", "{", "return", "new", "RequestHeader", "(", "method", ",", "uri", ",", "protocol", ",", "acceptedResponseProtocols", ",", "Optional", ".", "empty", "(", ")", ",", "headers", ",", "lowercaseHeaders", ")", "...
Return a copy of this request header with the principal cleared. @return A copy of this request header.
[ "Return", "a", "copy", "of", "this", "request", "header", "with", "the", "principal", "cleared", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/RequestHeader.java#L137-L139
james-hu/jabb-core
src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java
AbstractHibernateDao.getAllBySql
public List< T> getAllBySql(String fullSql, Object[] paramValues, Type[] paramTypes) { """ Get all by SQL with pairs of parameterType-value @param fullSql @param paramValues @param paramTypes @return the query result """ return getAllBySql(fullSql, paramValues, paramTypes, null, null); }
java
public List< T> getAllBySql(String fullSql, Object[] paramValues, Type[] paramTypes) { return getAllBySql(fullSql, paramValues, paramTypes, null, null); }
[ "public", "List", "<", "T", ">", "getAllBySql", "(", "String", "fullSql", ",", "Object", "[", "]", "paramValues", ",", "Type", "[", "]", "paramTypes", ")", "{", "return", "getAllBySql", "(", "fullSql", ",", "paramValues", ",", "paramTypes", ",", "null", ...
Get all by SQL with pairs of parameterType-value @param fullSql @param paramValues @param paramTypes @return the query result
[ "Get", "all", "by", "SQL", "with", "pairs", "of", "parameterType", "-", "value" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java#L243-L245
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/zinternaltools/TranslationSource.java
TranslationSource.getTranslation
public static String getTranslation(Locale locale, String key, String defaultText) { """ getTranslation, This returns a local language translation for the text that is represented by the specified key. The supplied locale is used to indicate the desired language. If a translation cannot be found, then the defaul...
java
public static String getTranslation(Locale locale, String key, String defaultText) { initializePropertiesIfNeeded(); String language = locale.getLanguage(); if (language == null || language.isEmpty()) { return defaultText; } String propertyKey = language + ".text." + ...
[ "public", "static", "String", "getTranslation", "(", "Locale", "locale", ",", "String", "key", ",", "String", "defaultText", ")", "{", "initializePropertiesIfNeeded", "(", ")", ";", "String", "language", "=", "locale", ".", "getLanguage", "(", ")", ";", "if", ...
getTranslation, This returns a local language translation for the text that is represented by the specified key. The supplied locale is used to indicate the desired language. If a translation cannot be found, then the default text will be returned instead.
[ "getTranslation", "This", "returns", "a", "local", "language", "translation", "for", "the", "text", "that", "is", "represented", "by", "the", "specified", "key", ".", "The", "supplied", "locale", "is", "used", "to", "indicate", "the", "desired", "language", "....
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/zinternaltools/TranslationSource.java#L29-L38
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java
MP3FileID3Controller.setAlbum
public void setAlbum(String album, int type) { """ Set the album of this mp3. @param album the album of the mp3 """ if (allow(type&ID3V1)) { id3v1.setAlbum(album); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.ALBUM, album); } }
java
public void setAlbum(String album, int type) { if (allow(type&ID3V1)) { id3v1.setAlbum(album); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.ALBUM, album); } }
[ "public", "void", "setAlbum", "(", "String", "album", ",", "int", "type", ")", "{", "if", "(", "allow", "(", "type", "&", "ID3V1", ")", ")", "{", "id3v1", ".", "setAlbum", "(", "album", ")", ";", "}", "if", "(", "allow", "(", "type", "&", "ID3V2"...
Set the album of this mp3. @param album the album of the mp3
[ "Set", "the", "album", "of", "this", "mp3", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L176-L186
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java
HttpOutputStream.addObserver
public void addObserver(OutputObserver observer, Object data) { """ Add an Output Observer. Output Observers get notified of significant events on the output stream. Observers are called in the reverse order they were added. They are removed when the stream is closed. @param observer The observer. @param dat...
java
public void addObserver(OutputObserver observer, Object data) { if (_observers==null) _observers=new ArrayList(4); _observers.add(observer); _observers.add(data); }
[ "public", "void", "addObserver", "(", "OutputObserver", "observer", ",", "Object", "data", ")", "{", "if", "(", "_observers", "==", "null", ")", "_observers", "=", "new", "ArrayList", "(", "4", ")", ";", "_observers", ".", "add", "(", "observer", ")", ";...
Add an Output Observer. Output Observers get notified of significant events on the output stream. Observers are called in the reverse order they were added. They are removed when the stream is closed. @param observer The observer. @param data Data to be passed wit notify calls.
[ "Add", "an", "Output", "Observer", ".", "Output", "Observers", "get", "notified", "of", "significant", "events", "on", "the", "output", "stream", ".", "Observers", "are", "called", "in", "the", "reverse", "order", "they", "were", "added", ".", "They", "are",...
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L272-L278
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.getField
public static Field getField(Class<?> type,String fieldName) { """ This function returns the field wrapper for the requested field @param type The class type @param fieldName The field name @return The field """ Field field=null; try { //get field fie...
java
public static Field getField(Class<?> type,String fieldName) { Field field=null; try { //get field field=type.getDeclaredField(fieldName); } catch(Exception exception) { throw new FaxException("Unable to extract field: "+fieldName+"...
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ")", "{", "Field", "field", "=", "null", ";", "try", "{", "//get field", "field", "=", "type", ".", "getDeclaredField", "(", "fieldName", ")", ";", ...
This function returns the field wrapper for the requested field @param type The class type @param fieldName The field name @return The field
[ "This", "function", "returns", "the", "field", "wrapper", "for", "the", "requested", "field" ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L157-L174
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.analyzeImageInStreamWithServiceResponseAsync
public Observable<ServiceResponse<ImageAnalysis>> analyzeImageInStreamWithServiceResponseAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter) { """ This operation extracts a rich set of visual features based on the image content. @param image An image stream. @param ...
java
public Observable<ServiceResponse<ImageAnalysis>> analyzeImageInStreamWithServiceResponseAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is re...
[ "public", "Observable", "<", "ServiceResponse", "<", "ImageAnalysis", ">", ">", "analyzeImageInStreamWithServiceResponseAsync", "(", "byte", "[", "]", "image", ",", "AnalyzeImageInStreamOptionalParameter", "analyzeImageInStreamOptionalParameter", ")", "{", "if", "(", "this"...
This operation extracts a rich set of visual features based on the image content. @param image An image stream. @param analyzeImageInStreamOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @retur...
[ "This", "operation", "extracts", "a", "rich", "set", "of", "visual", "features", "based", "on", "the", "image", "content", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1121-L1133
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.gt
public static StringGreaterThanCondition.Builder gt(String variable, String expectedValue) { """ Binary condition for String greater than comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected valu...
java
public static StringGreaterThanCondition.Builder gt(String variable, String expectedValue) { return StringGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "StringGreaterThanCondition", ".", "Builder", "gt", "(", "String", "variable", ",", "String", "expectedValue", ")", "{", "return", "StringGreaterThanCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValu...
Binary condition for String greater than comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-la...
[ "Binary", "condition", "for", "String", "greater", "than", "comparison", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L272-L274
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java
DefaultAsyncSearchQueryResult.fromIndexNotFound
@Deprecated public static AsyncSearchQueryResult fromIndexNotFound(final String indexName) { """ A utility method to return a result when the index is not found. @return an {@link AsyncSearchQueryResult} that will emit a {@link IndexDoesNotExistException} when calling its {@link AsyncSearchQueryResult#hits...
java
@Deprecated public static AsyncSearchQueryResult fromIndexNotFound(final String indexName) { //dummy default values SearchStatus status = new DefaultSearchStatus(1L, 1L, 0L); SearchMetrics metrics = new DefaultSearchMetrics(0L, 0L, 0d); return new DefaultAsyncSearchQueryResult( ...
[ "@", "Deprecated", "public", "static", "AsyncSearchQueryResult", "fromIndexNotFound", "(", "final", "String", "indexName", ")", "{", "//dummy default values", "SearchStatus", "status", "=", "new", "DefaultSearchStatus", "(", "1L", ",", "1L", ",", "0L", ")", ";", "...
A utility method to return a result when the index is not found. @return an {@link AsyncSearchQueryResult} that will emit a {@link IndexDoesNotExistException} when calling its {@link AsyncSearchQueryResult#hits() hits()} method. @deprecated FTS is still in BETA so the response format is likely to change in a future ve...
[ "A", "utility", "method", "to", "return", "a", "result", "when", "the", "index", "is", "not", "found", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/search/result/impl/DefaultAsyncSearchQueryResult.java#L325-L339
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/SiftDetector.java
SiftDetector.processFeatureCandidate
protected void processFeatureCandidate( int x , int y , float value ,boolean maximum ) { """ Examines a local spatial extremum and interpolates its coordinates using a quadratic function. Very first thing it does is check to see if the feature is really an edge/false positive. After that interpolates the coord...
java
protected void processFeatureCandidate( int x , int y , float value ,boolean maximum ) { // suppress response along edges if( isEdge(x,y) ) return; // Estimate the scale and 2D point by fitting 2nd order polynomials // This is different from the original paper float signAdj = maximum ? 1 : -1; value *=...
[ "protected", "void", "processFeatureCandidate", "(", "int", "x", ",", "int", "y", ",", "float", "value", ",", "boolean", "maximum", ")", "{", "// suppress response along edges", "if", "(", "isEdge", "(", "x", ",", "y", ")", ")", "return", ";", "// Estimate t...
Examines a local spatial extremum and interpolates its coordinates using a quadratic function. Very first thing it does is check to see if the feature is really an edge/false positive. After that interpolates the coordinate independently using a quadratic function along each axis. Resulting coordinate will be in the...
[ "Examines", "a", "local", "spatial", "extremum", "and", "interpolates", "its", "coordinates", "using", "a", "quadratic", "function", ".", "Very", "first", "thing", "it", "does", "is", "check", "to", "see", "if", "the", "feature", "is", "really", "an", "edge"...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/SiftDetector.java#L262-L299
JM-Lab/utils-java8
src/main/java/kr/jm/utils/time/JMTimeUtil.java
JMTimeUtil.getCurrentTimestamp
public static String getCurrentTimestamp(String timeFormat, String zoneId) { """ Gets current timestamp. @param timeFormat the time format @param zoneId the zone id @return the current timestamp """ return getTime(System.currentTimeMillis(), timeFormat, zoneId); }
java
public static String getCurrentTimestamp(String timeFormat, String zoneId) { return getTime(System.currentTimeMillis(), timeFormat, zoneId); }
[ "public", "static", "String", "getCurrentTimestamp", "(", "String", "timeFormat", ",", "String", "zoneId", ")", "{", "return", "getTime", "(", "System", ".", "currentTimeMillis", "(", ")", ",", "timeFormat", ",", "zoneId", ")", ";", "}" ]
Gets current timestamp. @param timeFormat the time format @param zoneId the zone id @return the current timestamp
[ "Gets", "current", "timestamp", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/time/JMTimeUtil.java#L178-L180
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java
DisksInner.beginUpdateAsync
public Observable<DiskInner> beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { """ Updates (patches) a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is crea...
java
public Observable<DiskInner> beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1<ServiceResponse<DiskInner>, DiskInner>() { @Override public DiskInner call(ServiceRespon...
[ "public", "Observable", "<", "DiskInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "diskName", ",", "DiskUpdate", "disk", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ",", "dis...
Updates (patches) a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @param disk Di...
[ "Updates", "(", "patches", ")", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L420-L427
kaazing/java.client
ws/ws/src/main/java/org/kaazing/gateway/client/impl/ws/WebSocketCompositeHandler.java
WebSocketCompositeHandler.processClose
@Override public void processClose(WebSocketChannel channel, int code, String reason) { """ Disconnect the WebSocket @throws Exception if the disconnect does not succeed """ LOG.entering(CLASS_NAME, "close"); //2. check current readyState WebSocketCompositeChannel parent = (Web...
java
@Override public void processClose(WebSocketChannel channel, int code, String reason) { LOG.entering(CLASS_NAME, "close"); //2. check current readyState WebSocketCompositeChannel parent = (WebSocketCompositeChannel)channel; // When the connection timeout expires due to network loss...
[ "@", "Override", "public", "void", "processClose", "(", "WebSocketChannel", "channel", ",", "int", "code", ",", "String", "reason", ")", "{", "LOG", ".", "entering", "(", "CLASS_NAME", ",", "\"close\"", ")", ";", "//2. check current readyState", "WebSocketComposit...
Disconnect the WebSocket @throws Exception if the disconnect does not succeed
[ "Disconnect", "the", "WebSocket" ]
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/impl/ws/WebSocketCompositeHandler.java#L280-L307
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java
DestinationManager.getDestination
public DestinationHandler getDestination(String destinationName, String busName, boolean includeInvisible) throws SIResourceException, SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException { """ Get a destination from its name. This is the full name, which is bot...
java
public DestinationHandler getDestination(String destinationName, String busName, boolean includeInvisible) throws SIResourceException, SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException { return getDestination(destinationName, busName, includeInvisible,...
[ "public", "DestinationHandler", "getDestination", "(", "String", "destinationName", ",", "String", "busName", ",", "boolean", "includeInvisible", ")", "throws", "SIResourceException", ",", "SITemporaryDestinationNotFoundException", ",", "SINotPossibleInCurrentConfigurationExcepti...
Get a destination from its name. This is the full name, which is both the destination name and its bus name. @param destinationName. @param busName. Can be null, in which case the local bus will be assumed. @return Destination
[ "Get", "a", "destination", "from", "its", "name", ".", "This", "is", "the", "full", "name", "which", "is", "both", "the", "destination", "name", "and", "its", "bus", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java#L1171-L1175
OpenBEL/openbel-framework
org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseThreeApplication.java
PhaseThreeApplication.stage5Term
private void stage5Term(final ProtoNetwork network, int pct) { """ Stage five term equivalencing. @param network the {@link ProtoNetwork network} to equivalence @param pct the parameter equivalencing count to control output """ if (pct > 0) { stageOutput("Equivalencing terms"); ...
java
private void stage5Term(final ProtoNetwork network, int pct) { if (pct > 0) { stageOutput("Equivalencing terms"); int tct = p2.stage3EquivalenceTerms(network); stageOutput("(" + tct + " equivalences)"); } else { stageOutput("Skipping term equivalencing"); ...
[ "private", "void", "stage5Term", "(", "final", "ProtoNetwork", "network", ",", "int", "pct", ")", "{", "if", "(", "pct", ">", "0", ")", "{", "stageOutput", "(", "\"Equivalencing terms\"", ")", ";", "int", "tct", "=", "p2", ".", "stage3EquivalenceTerms", "(...
Stage five term equivalencing. @param network the {@link ProtoNetwork network} to equivalence @param pct the parameter equivalencing count to control output
[ "Stage", "five", "term", "equivalencing", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseThreeApplication.java#L1247-L1255
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/view/zml/ZScreenField.java
ZScreenField.addHiddenParams
public void addHiddenParams(PrintWriter out, Map<String, Object> mapParams) { """ Display this screen's hidden params. @param out The html out stream. @exception DBException File exception. """ for (String key : mapParams.keySet()) { if (mapParams.get(key) != null) ...
java
public void addHiddenParams(PrintWriter out, Map<String, Object> mapParams) { for (String key : mapParams.keySet()) { if (mapParams.get(key) != null) this.addHiddenParam(out, key, mapParams.get(key).toString()); } }
[ "public", "void", "addHiddenParams", "(", "PrintWriter", "out", ",", "Map", "<", "String", ",", "Object", ">", "mapParams", ")", "{", "for", "(", "String", "key", ":", "mapParams", ".", "keySet", "(", ")", ")", "{", "if", "(", "mapParams", ".", "get", ...
Display this screen's hidden params. @param out The html out stream. @exception DBException File exception.
[ "Display", "this", "screen", "s", "hidden", "params", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/view/zml/ZScreenField.java#L332-L339
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java
PropertiesConfigHelper.getCustomBundlePropertyAsMap
public Map<String, List<String>> getCustomBundlePropertyAsMap(String bundleName, String key) { """ Returns as a set, the comma separated values of a property @param bundleName the bundle name @param key the key of the property @return a set of the comma separated values of a property """ Map<String, L...
java
public Map<String, List<String>> getCustomBundlePropertyAsMap(String bundleName, String key) { Map<String, List<String>> propertiesMap = new HashMap<>(); StringTokenizer tk = new StringTokenizer(getCustomBundleProperty(bundleName, key, ""), ";"); while (tk.hasMoreTokens()) { String[] mapEntry = tk.nextToken()...
[ "public", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "getCustomBundlePropertyAsMap", "(", "String", "bundleName", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "propertiesMap", "=", "new", "H...
Returns as a set, the comma separated values of a property @param bundleName the bundle name @param key the key of the property @return a set of the comma separated values of a property
[ "Returns", "as", "a", "set", "the", "comma", "separated", "values", "of", "a", "property" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java#L215-L232
ykrasik/jaci
jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java
StringUtils.removeLeadingAndTrailingDelimiter
public static String removeLeadingAndTrailingDelimiter(String str, String delimiter) { """ Removes the leading and trailing delimiter from a string. @param str String to process. @param delimiter Delimiter to remove. @return The string with the leading and trailing delimiter removed. """ final int...
java
public static String removeLeadingAndTrailingDelimiter(String str, String delimiter) { final int strLength = str.length(); final int delimiterLength = delimiter.length(); final boolean leadingDelimiter = str.startsWith(delimiter); final boolean trailingDelimiter = strLength > delimiterL...
[ "public", "static", "String", "removeLeadingAndTrailingDelimiter", "(", "String", "str", ",", "String", "delimiter", ")", "{", "final", "int", "strLength", "=", "str", ".", "length", "(", ")", ";", "final", "int", "delimiterLength", "=", "delimiter", ".", "len...
Removes the leading and trailing delimiter from a string. @param str String to process. @param delimiter Delimiter to remove. @return The string with the leading and trailing delimiter removed.
[ "Removes", "the", "leading", "and", "trailing", "delimiter", "from", "a", "string", "." ]
train
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-utils/src/main/java/com/github/ykrasik/jaci/util/string/StringUtils.java#L38-L51
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.completeResponse
public boolean completeResponse(int surveyId, int responseId, LocalDateTime date) throws LimesurveyRCException { """ Complete a response. @param surveyId the survey id of the survey you want to complete the response @param responseId the response id of the response you want to complete @param date the...
java
public boolean completeResponse(int surveyId, int responseId, LocalDateTime date) throws LimesurveyRCException { Map<String, String> responseData = new HashMap<>(); responseData.put("submitdate", date.format(DateTimeFormatter.ISO_LOCAL_DATE) + " " + date.format(DateTimeFormatter.ISO_LOCAL_TIME)); ...
[ "public", "boolean", "completeResponse", "(", "int", "surveyId", ",", "int", "responseId", ",", "LocalDateTime", "date", ")", "throws", "LimesurveyRCException", "{", "Map", "<", "String", ",", "String", ">", "responseData", "=", "new", "HashMap", "<>", "(", ")...
Complete a response. @param surveyId the survey id of the survey you want to complete the response @param responseId the response id of the response you want to complete @param date the date where the response will be completed (submitdate) @return true if the response was successfuly completed @throws Limesur...
[ "Complete", "a", "response", "." ]
train
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L167-L177
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java
CurrencyHelper.parseValueFormatUnchanged
@Nullable public static BigDecimal parseValueFormatUnchanged (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { """ Try to parse a string value ...
java
@Nullable public static BigDecimal parseValueFormatUnchanged (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { final PerCurrencySettings aPCS ...
[ "@", "Nullable", "public", "static", "BigDecimal", "parseValueFormatUnchanged", "(", "@", "Nullable", "final", "ECurrency", "eCurrency", ",", "@", "Nullable", "final", "String", "sTextValue", ",", "@", "Nullable", "final", "BigDecimal", "aDefault", ")", "{", "fina...
Try to parse a string value formatted by the {@link DecimalFormat} object returned from {@link #getValueFormat(ECurrency)} @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param sTextValue The string value. It will be parsed unmodified! @param aDef...
[ "Try", "to", "parse", "a", "string", "value", "formatted", "by", "the", "{", "@link", "DecimalFormat", "}", "object", "returned", "from", "{", "@link", "#getValueFormat", "(", "ECurrency", ")", "}" ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java#L563-L572
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
HtmlTableRendererBase.beforeBody
protected void beforeBody(FacesContext facesContext, UIData uiData) throws IOException { """ Perform any operations necessary after TABLE start tag is output but before the TBODY start tag. <p> This method generates the THEAD/TFOOT sections of a table if there are any header or footer facets defined on the tab...
java
protected void beforeBody(FacesContext facesContext, UIData uiData) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); renderCaptionFacet(facesContext, writer, uiData); renderColgroupsFacet(facesContext, writer, uiData); renderFacet(facesContext, writer, ...
[ "protected", "void", "beforeBody", "(", "FacesContext", "facesContext", ",", "UIData", "uiData", ")", "throws", "IOException", "{", "ResponseWriter", "writer", "=", "facesContext", ".", "getResponseWriter", "(", ")", ";", "renderCaptionFacet", "(", "facesContext", "...
Perform any operations necessary after TABLE start tag is output but before the TBODY start tag. <p> This method generates the THEAD/TFOOT sections of a table if there are any header or footer facets defined on the table or on any child UIColumn component. @param facesContext the <code>FacesContext</code>. @param uiDa...
[ "Perform", "any", "operations", "necessary", "after", "TABLE", "start", "tag", "is", "output", "but", "before", "the", "TBODY", "start", "tag", ".", "<p", ">", "This", "method", "generates", "the", "THEAD", "/", "TFOOT", "sections", "of", "a", "table", "if...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java#L763-L771
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteLinksInner.java
ExpressRouteLinksInner.get
public ExpressRouteLinkInner get(String resourceGroupName, String expressRoutePortName, String linkName) { """ Retrieves the specified ExpressRouteLink resource. @param resourceGroupName The name of the resource group. @param expressRoutePortName The name of the ExpressRoutePort resource. @param linkName The ...
java
public ExpressRouteLinkInner get(String resourceGroupName, String expressRoutePortName, String linkName) { return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).toBlocking().single().body(); }
[ "public", "ExpressRouteLinkInner", "get", "(", "String", "resourceGroupName", ",", "String", "expressRoutePortName", ",", "String", "linkName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "expressRoutePortName", ",", "linkName", ")", ...
Retrieves the specified ExpressRouteLink resource. @param resourceGroupName The name of the resource group. @param expressRoutePortName The name of the ExpressRoutePort resource. @param linkName The name of the ExpressRouteLink resource. @throws IllegalArgumentException thrown if parameters fail the validation @throws...
[ "Retrieves", "the", "specified", "ExpressRouteLink", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteLinksInner.java#L85-L87
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.compare
public int compare(final Object a, final Object b) { """ Required to back the priority queue for scheduled tasks. @param a the first Task @param b the second Task @return 0 if equal, < 0 if a < b, > 0 if a > b """ final long awhen = ((Task) (a)).getNextScheduled(); final long bwhen = ((Ta...
java
public int compare(final Object a, final Object b) { final long awhen = ((Task) (a)).getNextScheduled(); final long bwhen = ((Task) (b)).getNextScheduled(); return (awhen < bwhen) ? -1 : (awhen == bwhen) ? 0 : 1; ...
[ "public", "int", "compare", "(", "final", "Object", "a", ",", "final", "Object", "b", ")", "{", "final", "long", "awhen", "=", "(", "(", "Task", ")", "(", "a", ")", ")", ".", "getNextScheduled", "(", ")", ";", "final", "long", "bwhen", "=", "(", ...
Required to back the priority queue for scheduled tasks. @param a the first Task @param b the second Task @return 0 if equal, < 0 if a < b, > 0 if a > b
[ "Required", "to", "back", "the", "priority", "queue", "for", "scheduled", "tasks", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L106-L114
aerogear/aerogear-unifiedpush-server
push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java
AbstractJMSMessageProducer.sendNonTransacted
protected void sendNonTransacted(Destination destination, Serializable message, String propertyName, String propertValue) { """ Sends message to destination with given JMS message property name and value in non-transactional manner. @param destination where to send @param message what to send @param propertyN...
java
protected void sendNonTransacted(Destination destination, Serializable message, String propertyName, String propertValue) { send(destination, message, propertyName, propertValue, false); }
[ "protected", "void", "sendNonTransacted", "(", "Destination", "destination", ",", "Serializable", "message", ",", "String", "propertyName", ",", "String", "propertValue", ")", "{", "send", "(", "destination", ",", "message", ",", "propertyName", ",", "propertValue",...
Sends message to destination with given JMS message property name and value in non-transactional manner. @param destination where to send @param message what to send @param propertyName property of obj @param propertValue value of obj Since non-transacted session is used, the message is send immediately without requi...
[ "Sends", "message", "to", "destination", "with", "given", "JMS", "message", "property", "name", "and", "value", "in", "non", "-", "transactional", "manner", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java#L80-L82
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.addEntry
private static void addEntry(ZipEntrySource entry, ZipOutputStream out) throws IOException { """ Adds a given ZIP entry to a ZIP file. @param entry new ZIP entry. @param out target ZIP stream. """ out.putNextEntry(entry.getEntry()); InputStream in = entry.getInputStream(); if (in != null) { ...
java
private static void addEntry(ZipEntrySource entry, ZipOutputStream out) throws IOException { out.putNextEntry(entry.getEntry()); InputStream in = entry.getInputStream(); if (in != null) { try { IOUtils.copy(in, out); } finally { IOUtils.closeQuietly(in); } } o...
[ "private", "static", "void", "addEntry", "(", "ZipEntrySource", "entry", ",", "ZipOutputStream", "out", ")", "throws", "IOException", "{", "out", ".", "putNextEntry", "(", "entry", ".", "getEntry", "(", ")", ")", ";", "InputStream", "in", "=", "entry", ".", ...
Adds a given ZIP entry to a ZIP file. @param entry new ZIP entry. @param out target ZIP stream.
[ "Adds", "a", "given", "ZIP", "entry", "to", "a", "ZIP", "file", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2999-L3011
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java
AnnotatedTextBuilder.addGlobalMetaData
public AnnotatedTextBuilder addGlobalMetaData(AnnotatedText.MetaDataKey key, String value) { """ Add global meta data like document title or receiver name (when writing an email). Some rules may use this information. @since 3.9 """ metaData.put(key, value); return this; }
java
public AnnotatedTextBuilder addGlobalMetaData(AnnotatedText.MetaDataKey key, String value) { metaData.put(key, value); return this; }
[ "public", "AnnotatedTextBuilder", "addGlobalMetaData", "(", "AnnotatedText", ".", "MetaDataKey", "key", ",", "String", "value", ")", "{", "metaData", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add global meta data like document title or receiver name (when writing an email). Some rules may use this information. @since 3.9
[ "Add", "global", "meta", "data", "like", "document", "title", "or", "receiver", "name", "(", "when", "writing", "an", "email", ")", ".", "Some", "rules", "may", "use", "this", "information", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java#L64-L67
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/resource/DirContextDnsResolver.java
DirContextDnsResolver.resolve
@Override public InetAddress[] resolve(String host) throws UnknownHostException { """ Perform hostname to address resolution. @param host the hostname, must not be empty or {@literal null}. @return array of one or more {@link InetAddress adresses} @throws UnknownHostException """ if (ipString...
java
@Override public InetAddress[] resolve(String host) throws UnknownHostException { if (ipStringToBytes(host) != null) { return new InetAddress[] { InetAddress.getByAddress(ipStringToBytes(host)) }; } List<InetAddress> inetAddresses = new ArrayList<>(); try { ...
[ "@", "Override", "public", "InetAddress", "[", "]", "resolve", "(", "String", "host", ")", "throws", "UnknownHostException", "{", "if", "(", "ipStringToBytes", "(", "host", ")", "!=", "null", ")", "{", "return", "new", "InetAddress", "[", "]", "{", "InetAd...
Perform hostname to address resolution. @param host the hostname, must not be empty or {@literal null}. @return array of one or more {@link InetAddress adresses} @throws UnknownHostException
[ "Perform", "hostname", "to", "address", "resolution", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/resource/DirContextDnsResolver.java#L158-L177
Sciss/abc4j
abc/src/main/java/abc/parser/AbcGrammar.java
AbcGrammar.ParenVoice
Rule ParenVoice() { """ paren-voice ::= "(" single-voice 1*( 1*WSP single-voice) ")" <p> on same staff """ return Sequence('(', SingleVoice(), OneOrMore(Sequence(OneOrMore(WSP()), SingleVoice()))) .label(ParenVoice); }
java
Rule ParenVoice() { return Sequence('(', SingleVoice(), OneOrMore(Sequence(OneOrMore(WSP()), SingleVoice()))) .label(ParenVoice); }
[ "Rule", "ParenVoice", "(", ")", "{", "return", "Sequence", "(", "'", "'", ",", "SingleVoice", "(", ")", ",", "OneOrMore", "(", "Sequence", "(", "OneOrMore", "(", "WSP", "(", ")", ")", ",", "SingleVoice", "(", ")", ")", ")", ")", ".", "label", "(", ...
paren-voice ::= "(" single-voice 1*( 1*WSP single-voice) ")" <p> on same staff
[ "paren", "-", "voice", "::", "=", "(", "single", "-", "voice", "1", "*", "(", "1", "*", "WSP", "single", "-", "voice", ")", ")", "<p", ">", "on", "same", "staff" ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/parser/AbcGrammar.java#L2142-L2146
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.timestampFormat
protected static void timestampFormat(DateFormat format, String... attributeNames) { """ Registers date format for specified attributes. This format will be used to convert between Date -> String -> java.sql.Timestamp when using the appropriate getters and setters. <p>See example in {@link #timestampFormat(Str...
java
protected static void timestampFormat(DateFormat format, String... attributeNames) { ModelDelegate.timestampFormat(modelClass(), format, attributeNames); }
[ "protected", "static", "void", "timestampFormat", "(", "DateFormat", "format", ",", "String", "...", "attributeNames", ")", "{", "ModelDelegate", ".", "timestampFormat", "(", "modelClass", "(", ")", ",", "format", ",", "attributeNames", ")", ";", "}" ]
Registers date format for specified attributes. This format will be used to convert between Date -> String -> java.sql.Timestamp when using the appropriate getters and setters. <p>See example in {@link #timestampFormat(String, String...)}. @param format format to use for conversion @param attributeNames attribute nam...
[ "Registers", "date", "format", "for", "specified", "attributes", ".", "This", "format", "will", "be", "used", "to", "convert", "between", "Date", "-", ">", "String", "-", ">", "java", ".", "sql", ".", "Timestamp", "when", "using", "the", "appropriate", "ge...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2183-L2185
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitSerialData
@Override public R visitSerialData(SerialDataTree node, P p) { """ {@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(node, p); }
java
@Override public R visitSerialData(SerialDataTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitSerialData", "(", "SerialDataTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L357-L360
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/CharInfo.java
CharInfo.defineEntity
private boolean defineEntity(String name, char value) { """ Defines a new character reference. The reference's name and value are supplied. Nothing happens if the character reference is already defined. <p>Unlike internal entities, character references are a string to single character mapping. They are used to ...
java
private boolean defineEntity(String name, char value) { StringBuffer sb = new StringBuffer("&"); sb.append(name); sb.append(';'); String entityString = sb.toString(); boolean extra = defineChar2StringMapping(entityString, value); return extra; }
[ "private", "boolean", "defineEntity", "(", "String", "name", ",", "char", "value", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "\"&\"", ")", ";", "sb", ".", "append", "(", "name", ")", ";", "sb", ".", "append", "(", "'", "'", ")"...
Defines a new character reference. The reference's name and value are supplied. Nothing happens if the character reference is already defined. <p>Unlike internal entities, character references are a string to single character mapping. They are used to map non-ASCII characters both on parsing and printing, primarily for...
[ "Defines", "a", "new", "character", "reference", ".", "The", "reference", "s", "name", "and", "value", "are", "supplied", ".", "Nothing", "happens", "if", "the", "character", "reference", "is", "already", "defined", ".", "<p", ">", "Unlike", "internal", "ent...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/CharInfo.java#L373-L382
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseProperties
public void parseProperties(Element element, ActivityImpl activity) { """ Parses the properties of an element (if any) that can contain properties (processes, activities, etc.) Returns true if property subelemens are found. @param element The element that can contain properties. @param activity The activ...
java
public void parseProperties(Element element, ActivityImpl activity) { List<Element> propertyElements = element.elements("property"); for (Element propertyElement : propertyElements) { parseProperty(propertyElement, activity); } }
[ "public", "void", "parseProperties", "(", "Element", "element", ",", "ActivityImpl", "activity", ")", "{", "List", "<", "Element", ">", "propertyElements", "=", "element", ".", "elements", "(", "\"property\"", ")", ";", "for", "(", "Element", "propertyElement", ...
Parses the properties of an element (if any) that can contain properties (processes, activities, etc.) Returns true if property subelemens are found. @param element The element that can contain properties. @param activity The activity where the property declaration is done.
[ "Parses", "the", "properties", "of", "an", "element", "(", "if", "any", ")", "that", "can", "contain", "properties", "(", "processes", "activities", "etc", ".", ")" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L3881-L3886
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java
PactDslRequestWithPath.matchHeader
public PactDslRequestWithPath matchHeader(String header, String regex, String headerExample) { """ Match a request header. @param header Header to match @param regex Regular expression to match @param headerExample Example value to use """ requestMatchers.addCategory("header").setRu...
java
public PactDslRequestWithPath matchHeader(String header, String regex, String headerExample) { requestMatchers.addCategory("header").setRule(header, new RegexMatcher(regex)); requestHeaders.put(header, Collections.singletonList(headerExample)); return this; }
[ "public", "PactDslRequestWithPath", "matchHeader", "(", "String", "header", ",", "String", "regex", ",", "String", "headerExample", ")", "{", "requestMatchers", ".", "addCategory", "(", "\"header\"", ")", ".", "setRule", "(", "header", ",", "new", "RegexMatcher", ...
Match a request header. @param header Header to match @param regex Regular expression to match @param headerExample Example value to use
[ "Match", "a", "request", "header", "." ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java#L346-L350
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableDictionary.java
MutableDictionary.setString
@NonNull @Override public MutableDictionary setString(@NonNull String key, String value) { """ Set a String value for the given key. @param key The key @param value The String value. @return The self object. """ return setValue(key, value); }
java
@NonNull @Override public MutableDictionary setString(@NonNull String key, String value) { return setValue(key, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableDictionary", "setString", "(", "@", "NonNull", "String", "key", ",", "String", "value", ")", "{", "return", "setValue", "(", "key", ",", "value", ")", ";", "}" ]
Set a String value for the given key. @param key The key @param value The String value. @return The self object.
[ "Set", "a", "String", "value", "for", "the", "given", "key", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDictionary.java#L117-L121
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BasicChecker.java
BasicChecker.verifySignature
private void verifySignature(X509Certificate cert) throws CertPathValidatorException { """ Verifies the signature on the certificate using the previous public key. @param cert the X509Certificate @throws CertPathValidatorException if certificate does not verify """ String msg = "signature";...
java
private void verifySignature(X509Certificate cert) throws CertPathValidatorException { String msg = "signature"; if (debug != null) debug.println("---checking " + msg + "..."); try { if (sigProvider != null) { cert.verify(prevPubKey, sigProvid...
[ "private", "void", "verifySignature", "(", "X509Certificate", "cert", ")", "throws", "CertPathValidatorException", "{", "String", "msg", "=", "\"signature\"", ";", "if", "(", "debug", "!=", "null", ")", "debug", ".", "println", "(", "\"---checking \"", "+", "msg...
Verifies the signature on the certificate using the previous public key. @param cert the X509Certificate @throws CertPathValidatorException if certificate does not verify
[ "Verifies", "the", "signature", "on", "the", "certificate", "using", "the", "previous", "public", "key", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BasicChecker.java#L158-L181
randomsync/robotframework-mqttlibrary-java
src/main/java/net/randomsync/robotframework/mqtt/MQTTLibrary.java
MQTTLibrary.connectToMQTTBroker
@RobotKeyword("Connect to MQTT Broker") @ArgumentNames( { """ Connect to an MQTT broker. @param broker Uri of the broker to connect to @param clientId Client Id @throws MqttException if there is an issue connecting to the broker """ "broker", "clientId" }) public void connectToMQTTBroker(String...
java
@RobotKeyword("Connect to MQTT Broker") @ArgumentNames({ "broker", "clientId" }) public void connectToMQTTBroker(String broker, String clientId) throws MqttException { client = new MqttClient(broker, clientId); System.out.println("*INFO:" + System.currentTimeMillis() ...
[ "@", "RobotKeyword", "(", "\"Connect to MQTT Broker\"", ")", "@", "ArgumentNames", "(", "{", "\"broker\"", ",", "\"clientId\"", "}", ")", "public", "void", "connectToMQTTBroker", "(", "String", "broker", ",", "String", "clientId", ")", "throws", "MqttException", "...
Connect to an MQTT broker. @param broker Uri of the broker to connect to @param clientId Client Id @throws MqttException if there is an issue connecting to the broker
[ "Connect", "to", "an", "MQTT", "broker", "." ]
train
https://github.com/randomsync/robotframework-mqttlibrary-java/blob/b10e346ea159d86e60a73062297c4a0d57149c89/src/main/java/net/randomsync/robotframework/mqtt/MQTTLibrary.java#L53-L63
apereo/cas
support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationHelper.java
WsFederationHelper.buildSignatureTrustEngine
@SneakyThrows private static SignatureTrustEngine buildSignatureTrustEngine(final WsFederationConfiguration wsFederationConfiguration) { """ Build signature trust engine. @param wsFederationConfiguration the ws federation configuration @return the signature trust engine """ val signingWallet = ...
java
@SneakyThrows private static SignatureTrustEngine buildSignatureTrustEngine(final WsFederationConfiguration wsFederationConfiguration) { val signingWallet = wsFederationConfiguration.getSigningWallet(); LOGGER.debug("Building signature trust engine based on the following signing certificates:"); ...
[ "@", "SneakyThrows", "private", "static", "SignatureTrustEngine", "buildSignatureTrustEngine", "(", "final", "WsFederationConfiguration", "wsFederationConfiguration", ")", "{", "val", "signingWallet", "=", "wsFederationConfiguration", ".", "getSigningWallet", "(", ")", ";", ...
Build signature trust engine. @param wsFederationConfiguration the ws federation configuration @return the signature trust engine
[ "Build", "signature", "trust", "engine", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationHelper.java#L92-L101
irmen/Pyrolite
java/src/main/java/net/razorvine/pickle/Pickler.java
Pickler.lookupMemo
private boolean lookupMemo(Class<?> objectType, Object obj) throws IOException { """ Check the memo table and output a memo lookup if the object is found """ if(!this.useMemo) return false; if(!objectType.isPrimitive()) { int hash = valueCompare ? obj.hashCode() : System.identityHashCode(obj); if(...
java
private boolean lookupMemo(Class<?> objectType, Object obj) throws IOException { if(!this.useMemo) return false; if(!objectType.isPrimitive()) { int hash = valueCompare ? obj.hashCode() : System.identityHashCode(obj); if(memo.containsKey(hash) && (valueCompare ? memo.get(hash).obj.equals(obj) : memo.get(ha...
[ "private", "boolean", "lookupMemo", "(", "Class", "<", "?", ">", "objectType", ",", "Object", "obj", ")", "throws", "IOException", "{", "if", "(", "!", "this", ".", "useMemo", ")", "return", "false", ";", "if", "(", "!", "objectType", ".", "isPrimitive",...
Check the memo table and output a memo lookup if the object is found
[ "Check", "the", "memo", "table", "and", "output", "a", "memo", "lookup", "if", "the", "object", "is", "found" ]
train
https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pickle/Pickler.java#L231-L250
lets-blade/blade
src/main/java/com/blade/Environment.java
Environment.of
public static Environment of(@NonNull Map<String, String> map) { """ Map to Environment @param map config map @return return Environment instance """ var environment = new Environment(); map.forEach((key, value) -> environment.props.setProperty(key, value)); return environment; ...
java
public static Environment of(@NonNull Map<String, String> map) { var environment = new Environment(); map.forEach((key, value) -> environment.props.setProperty(key, value)); return environment; }
[ "public", "static", "Environment", "of", "(", "@", "NonNull", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "var", "environment", "=", "new", "Environment", "(", ")", ";", "map", ".", "forEach", "(", "(", "key", ",", "value", ")", "->", ...
Map to Environment @param map config map @return return Environment instance
[ "Map", "to", "Environment" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/Environment.java#L86-L90
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/LauncherDelegateImpl.java
LauncherDelegateImpl.getLogProviderImpl
protected LogProvider getLogProviderImpl(ClassLoader loader, BootstrapConfig config) { """ Initialize RAS/FFDC LogProviders @param loader Classloader to use when locating the log provider impl @param config BootstrapConfig containing log provider class name. @return LogProvider instance initial properties co...
java
protected LogProvider getLogProviderImpl(ClassLoader loader, BootstrapConfig config) { // consume/remove ras provider from the map String providerClassName = config.getKernelResolver().getLogProvider(); LogProvider p = null; try { Class<?> providerClass = loader.loadClass(pr...
[ "protected", "LogProvider", "getLogProviderImpl", "(", "ClassLoader", "loader", ",", "BootstrapConfig", "config", ")", "{", "// consume/remove ras provider from the map", "String", "providerClassName", "=", "config", ".", "getKernelResolver", "(", ")", ".", "getLogProvider"...
Initialize RAS/FFDC LogProviders @param loader Classloader to use when locating the log provider impl @param config BootstrapConfig containing log provider class name. @return LogProvider instance initial properties containing install directory locations @throws RuntimeException If a RuntimeException is thrown during ...
[ "Initialize", "RAS", "/", "FFDC", "LogProviders" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/LauncherDelegateImpl.java#L175-L198
mgormley/pacaya
src/main/java/edu/jhu/pacaya/parse/cky/chart/Chart.java
Chart.getNewChart
private static ChartCell[][] getNewChart(Sentence sentence, CnfGrammar grammar, ChartCellType cellType, ParseType parseType, ChartCellConstraint constraint) { """ Gets a new chart of the appropriate size for the sentence, specific to this grammar, and with cells of the specified type. """ ChartCell[][...
java
private static ChartCell[][] getNewChart(Sentence sentence, CnfGrammar grammar, ChartCellType cellType, ParseType parseType, ChartCellConstraint constraint) { ChartCell[][] chart = new ChartCell[sentence.size()][sentence.size()+1]; for (int i = 0; i < chart.length; i++) { for (int j = i+1; j...
[ "private", "static", "ChartCell", "[", "]", "[", "]", "getNewChart", "(", "Sentence", "sentence", ",", "CnfGrammar", "grammar", ",", "ChartCellType", "cellType", ",", "ParseType", "parseType", ",", "ChartCellConstraint", "constraint", ")", "{", "ChartCell", "[", ...
Gets a new chart of the appropriate size for the sentence, specific to this grammar, and with cells of the specified type.
[ "Gets", "a", "new", "chart", "of", "the", "appropriate", "size", "for", "the", "sentence", "specific", "to", "this", "grammar", "and", "with", "cells", "of", "the", "specified", "type", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/parse/cky/chart/Chart.java#L93-L131
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
ClassBuilder.getInstance
public static ClassBuilder getInstance(Context context, ClassDoc classDoc, ClassWriter writer) { """ Construct a new ClassBuilder. @param context the build context @param classDoc the class being documented. @param writer the doclet specific writer. """ return new ClassBuilder(context...
java
public static ClassBuilder getInstance(Context context, ClassDoc classDoc, ClassWriter writer) { return new ClassBuilder(context, classDoc, writer); }
[ "public", "static", "ClassBuilder", "getInstance", "(", "Context", "context", ",", "ClassDoc", "classDoc", ",", "ClassWriter", "writer", ")", "{", "return", "new", "ClassBuilder", "(", "context", ",", "classDoc", ",", "writer", ")", ";", "}" ]
Construct a new ClassBuilder. @param context the build context @param classDoc the class being documented. @param writer the doclet specific writer.
[ "Construct", "a", "new", "ClassBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java#L110-L113
MenoData/Time4J
base/src/main/java/net/time4j/history/NewYearStrategy.java
NewYearStrategy.newYear
HistoricDate newYear( HistoricEra era, int yearOfDisplay ) { """ <p>Determines the date of New Year. </p> @param era historic era @param yearOfDisplay historic year of era as displayed (deviating from standard calendar year) @return historic date of New Year @since 3....
java
HistoricDate newYear( HistoricEra era, int yearOfDisplay ) { return rule(era, yearOfDisplay).newYear(era, yearOfDisplay); }
[ "HistoricDate", "newYear", "(", "HistoricEra", "era", ",", "int", "yearOfDisplay", ")", "{", "return", "rule", "(", "era", ",", "yearOfDisplay", ")", ".", "newYear", "(", "era", ",", "yearOfDisplay", ")", ";", "}" ]
<p>Determines the date of New Year. </p> @param era historic era @param yearOfDisplay historic year of era as displayed (deviating from standard calendar year) @return historic date of New Year @since 3.14/4.11
[ "<p", ">", "Determines", "the", "date", "of", "New", "Year", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/history/NewYearStrategy.java#L217-L224
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.writeXML
public static void writeXML(Document xmldocument, OutputStream stream) throws IOException { """ Write the given node tree into a XML file. @param xmldocument is the object that contains the node tree @param stream is the target stream @throws IOException if the stream cannot be read. """ assert xmldocum...
java
public static void writeXML(Document xmldocument, OutputStream stream) throws IOException { assert xmldocument != null : AssertMessages.notNullParameter(0); assert stream != null : AssertMessages.notNullParameter(1); writeNode(xmldocument, stream); }
[ "public", "static", "void", "writeXML", "(", "Document", "xmldocument", ",", "OutputStream", "stream", ")", "throws", "IOException", "{", "assert", "xmldocument", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "assert", "stream...
Write the given node tree into a XML file. @param xmldocument is the object that contains the node tree @param stream is the target stream @throws IOException if the stream cannot be read.
[ "Write", "the", "given", "node", "tree", "into", "a", "XML", "file", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2364-L2368
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_instanceId_snapshot_POST
public void project_serviceName_instance_instanceId_snapshot_POST(String serviceName, String instanceId, String snapshotName) throws IOException { """ Snapshot an instance REST: POST /cloud/project/{serviceName}/instance/{instanceId}/snapshot @param instanceId [required] Instance id @param serviceName [requir...
java
public void project_serviceName_instance_instanceId_snapshot_POST(String serviceName, String instanceId, String snapshotName) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/snapshot"; StringBuilder sb = path(qPath, serviceName, instanceId); HashMap<String, Object>o = new H...
[ "public", "void", "project_serviceName_instance_instanceId_snapshot_POST", "(", "String", "serviceName", ",", "String", "instanceId", ",", "String", "snapshotName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/{instanceId}/...
Snapshot an instance REST: POST /cloud/project/{serviceName}/instance/{instanceId}/snapshot @param instanceId [required] Instance id @param serviceName [required] Service name @param snapshotName [required] Snapshot name
[ "Snapshot", "an", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1879-L1885
shrinkwrap/descriptors
spi/src/main/java/org/jboss/shrinkwrap/descriptor/api/ApiExposition.java
ApiExposition.createFromImplModelType
public static Descriptor createFromImplModelType(final Class<? extends Descriptor> implClass, String descriptorName) throws IllegalArgumentException { """ Creates a {@link Descriptor} instance from the specified implementation class name, also using the specified name @param implClass @param descriptor...
java
public static Descriptor createFromImplModelType(final Class<? extends Descriptor> implClass, String descriptorName) throws IllegalArgumentException { return DescriptorInstantiator.createFromImplModelType(implClass, descriptorName); }
[ "public", "static", "Descriptor", "createFromImplModelType", "(", "final", "Class", "<", "?", "extends", "Descriptor", ">", "implClass", ",", "String", "descriptorName", ")", "throws", "IllegalArgumentException", "{", "return", "DescriptorInstantiator", ".", "createFrom...
Creates a {@link Descriptor} instance from the specified implementation class name, also using the specified name @param implClass @param descriptorName @return @throws IllegalArgumentException If either argument is not specified
[ "Creates", "a", "{", "@link", "Descriptor", "}", "instance", "from", "the", "specified", "implementation", "class", "name", "also", "using", "the", "specified", "name" ]
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/spi/src/main/java/org/jboss/shrinkwrap/descriptor/api/ApiExposition.java#L55-L58
netty/netty
handler/src/main/java/io/netty/handler/ssl/SniHandler.java
SniHandler.replaceHandler
protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception { """ The default implementation of this method will simply replace {@code this} {@link SniHandler} instance with a {@link SslHandler}. Users may override this method to implement custom behavior. ...
java
protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception { SslHandler sslHandler = null; try { sslHandler = newSslHandler(sslContext, ctx.alloc()); ctx.pipeline().replace(this, SslHandler.class.getName(), sslHandler); ...
[ "protected", "void", "replaceHandler", "(", "ChannelHandlerContext", "ctx", ",", "String", "hostname", ",", "SslContext", "sslContext", ")", "throws", "Exception", "{", "SslHandler", "sslHandler", "=", "null", ";", "try", "{", "sslHandler", "=", "newSslHandler", "...
The default implementation of this method will simply replace {@code this} {@link SniHandler} instance with a {@link SslHandler}. Users may override this method to implement custom behavior. Please be aware that this method may get called after a client has already disconnected and custom implementations must take it ...
[ "The", "default", "implementation", "of", "this", "method", "will", "simply", "replace", "{", "@code", "this", "}", "{", "@link", "SniHandler", "}", "instance", "with", "a", "{", "@link", "SslHandler", "}", ".", "Users", "may", "override", "this", "method", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SniHandler.java#L130-L144
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.listAvailableSizes
public List<VirtualMachineSizeInner> listAvailableSizes(String resourceGroupName, String vmName) { """ Lists all available virtual machine sizes to which the specified virtual machine can be resized. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throw...
java
public List<VirtualMachineSizeInner> listAvailableSizes(String resourceGroupName, String vmName) { return listAvailableSizesWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
[ "public", "List", "<", "VirtualMachineSizeInner", ">", "listAvailableSizes", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "listAvailableSizesWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "toBlocking", "...
Lists all available virtual machine sizes to which the specified virtual machine can be resized. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request...
[ "Lists", "all", "available", "virtual", "machine", "sizes", "to", "which", "the", "specified", "virtual", "machine", "can", "be", "resized", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L1754-L1756
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/core/internal/utils/PropertyUtils.java
PropertyUtils.getPropertyType
public static Type getPropertyType(Class<?> beanClass, String field) { """ Similar to {@link PropertyUtils#getPropertyClass(Class,List)} but returns the property class. @param beanClass bean to be accessed @param field bean's fieldName @return bean's property class """ try { return IN...
java
public static Type getPropertyType(Class<?> beanClass, String field) { try { return INSTANCE.findPropertyType(beanClass, field); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { throw handleReflectionException(beanClass, field, e); ...
[ "public", "static", "Type", "getPropertyType", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "field", ")", "{", "try", "{", "return", "INSTANCE", ".", "findPropertyType", "(", "beanClass", ",", "field", ")", ";", "}", "catch", "(", "NoSuchMethod...
Similar to {@link PropertyUtils#getPropertyClass(Class,List)} but returns the property class. @param beanClass bean to be accessed @param field bean's fieldName @return bean's property class
[ "Similar", "to", "{", "@link", "PropertyUtils#getPropertyClass", "(", "Class", "List", ")", "}", "but", "returns", "the", "property", "class", "." ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/core/internal/utils/PropertyUtils.java#L78-L84
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.retrieveSiteSealAsync
public Observable<SiteSealInner> retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { """ Verify domain ownership for this certificate order. Verify domain ownership for this certificate order. @param resourceGroupName Name of the resource group to whi...
java
public Observable<SiteSealInner> retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { return retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest).map(new Func1<ServiceResponse<SiteSealInner>, SiteSealInner>(...
[ "public", "Observable", "<", "SiteSealInner", ">", "retrieveSiteSealAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "SiteSealRequest", "siteSealRequest", ")", "{", "return", "retrieveSiteSealWithServiceResponseAsync", "(", "resourceGrou...
Verify domain ownership for this certificate order. Verify domain ownership for this certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param siteSealRequest Site seal request. @throws IllegalArgumentExceptio...
[ "Verify", "domain", "ownership", "for", "this", "certificate", "order", ".", "Verify", "domain", "ownership", "for", "this", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L2077-L2084
scireum/s3ninja
src/main/java/ninja/Aws4HashCalculator.java
Aws4HashCalculator.computeHash
public String computeHash(WebContext ctx, String pathPrefix) throws Exception { """ Computes the authentication hash as specified by the AWS SDK for verification purposes. @param ctx the current request to fetch parameters from @param pathPrefix the path prefix to preped to the {@link S3Dispatcher#getEf...
java
public String computeHash(WebContext ctx, String pathPrefix) throws Exception { Matcher matcher = AWS_AUTH4_PATTERN.matcher(ctx.getHeaderValue("Authorization").asString("")); if (!matcher.matches()) { // If the header doesn't match, let's try an URL parameter as we might be processing a pre...
[ "public", "String", "computeHash", "(", "WebContext", "ctx", ",", "String", "pathPrefix", ")", "throws", "Exception", "{", "Matcher", "matcher", "=", "AWS_AUTH4_PATTERN", ".", "matcher", "(", "ctx", ".", "getHeaderValue", "(", "\"Authorization\"", ")", ".", "asS...
Computes the authentication hash as specified by the AWS SDK for verification purposes. @param ctx the current request to fetch parameters from @param pathPrefix the path prefix to preped to the {@link S3Dispatcher#getEffectiveURI(WebContext) effective URI} of the request @return the computes hash value @throws...
[ "Computes", "the", "authentication", "hash", "as", "specified", "by", "the", "AWS", "SDK", "for", "verification", "purposes", "." ]
train
https://github.com/scireum/s3ninja/blob/445eec55c91780267a7f987818b3fedecae009c5/src/main/java/ninja/Aws4HashCalculator.java#L68-L95
opentok/Opentok-Java-SDK
src/main/java/com/opentok/OpenTok.java
OpenTok.startBroadcast
public Broadcast startBroadcast(String sessionId, BroadcastProperties properties) throws OpenTokException { """ Use this method to start a live streaming for an OpenTok session. This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams. <p> To successfully start broadcasting a session, at l...
java
public Broadcast startBroadcast(String sessionId, BroadcastProperties properties) throws OpenTokException { if (StringUtils.isEmpty(sessionId) || (properties == null)) { throw new InvalidArgumentException("Session not valid or broadcast properties is null"); } String broadcast = th...
[ "public", "Broadcast", "startBroadcast", "(", "String", "sessionId", ",", "BroadcastProperties", "properties", ")", "throws", "OpenTokException", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "sessionId", ")", "||", "(", "properties", "==", "null", ")", ")...
Use this method to start a live streaming for an OpenTok session. This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams. <p> To successfully start broadcasting a session, at least one client must be connected to the session. <p> You can only have one active live streaming broadcast at a time fo...
[ "Use", "this", "method", "to", "start", "a", "live", "streaming", "for", "an", "OpenTok", "session", ".", "This", "broadcasts", "the", "session", "to", "an", "HLS", "(", "HTTP", "live", "streaming", ")", "or", "to", "RTMP", "streams", ".", "<p", ">", "...
train
https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/OpenTok.java#L531-L543
jparsec/jparsec
jparsec/src/main/java/org/jparsec/pattern/Patterns.java
Patterns.and
public static Pattern and(final Pattern... patterns) { """ Returns a {@link Pattern} that matches if all of {@code patterns} matches, in which case, the maximum match length is returned. Mismatch if any one mismatches. """ return new Pattern() { @Override public int match(CharSequence src, int begin...
java
public static Pattern and(final Pattern... patterns) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { int ret = 0; for (Pattern pattern : patterns) { int l = pattern.match(src, begin, end); if (l == MISMATCH) return MISMATCH; ...
[ "public", "static", "Pattern", "and", "(", "final", "Pattern", "...", "patterns", ")", "{", "return", "new", "Pattern", "(", ")", "{", "@", "Override", "public", "int", "match", "(", "CharSequence", "src", ",", "int", "begin", ",", "int", "end", ")", "...
Returns a {@link Pattern} that matches if all of {@code patterns} matches, in which case, the maximum match length is returned. Mismatch if any one mismatches.
[ "Returns", "a", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/pattern/Patterns.java#L287-L311
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobInProgress.java
JobInProgress.getLocalityLevel
int getLocalityLevel(TaskInProgress tip, TaskTrackerStatus tts) { """ Get the level of locality that a given task would have if launched on a particular TaskTracker. Returns 0 if the task has data on that machine, 1 if it has data on the same rack, etc (depending on number of levels in the network hierarchy). ...
java
int getLocalityLevel(TaskInProgress tip, TaskTrackerStatus tts) { Node tracker = jobtracker.getNode(tts.getHost()); int level = this.maxLevel; // find the right level across split locations for (String local : maps[tip.getIdWithinJob()].getSplitLocations()) { Node datanode = jobtracker.getNode(loc...
[ "int", "getLocalityLevel", "(", "TaskInProgress", "tip", ",", "TaskTrackerStatus", "tts", ")", "{", "Node", "tracker", "=", "jobtracker", ".", "getNode", "(", "tts", ".", "getHost", "(", ")", ")", ";", "int", "level", "=", "this", ".", "maxLevel", ";", "...
Get the level of locality that a given task would have if launched on a particular TaskTracker. Returns 0 if the task has data on that machine, 1 if it has data on the same rack, etc (depending on number of levels in the network hierarchy).
[ "Get", "the", "level", "of", "locality", "that", "a", "given", "task", "would", "have", "if", "launched", "on", "a", "particular", "TaskTracker", ".", "Returns", "0", "if", "the", "task", "has", "data", "on", "that", "machine", "1", "if", "it", "has", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobInProgress.java#L3551-L3570
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/SkipBadRecords.java
SkipBadRecords.setSkipOutputPath
public static void setSkipOutputPath(JobConf conf, Path path) { """ Set the directory to which skipped records are written. By default it is the sub directory of the output _logs directory. User can stop writing skipped records by setting the value null. @param conf the configuration. @param path skip output...
java
public static void setSkipOutputPath(JobConf conf, Path path) { String pathStr = null; if(path==null) { pathStr = "none"; } else { pathStr = path.toString(); } conf.set(OUT_PATH, pathStr); }
[ "public", "static", "void", "setSkipOutputPath", "(", "JobConf", "conf", ",", "Path", "path", ")", "{", "String", "pathStr", "=", "null", ";", "if", "(", "path", "==", "null", ")", "{", "pathStr", "=", "\"none\"", ";", "}", "else", "{", "pathStr", "=",...
Set the directory to which skipped records are written. By default it is the sub directory of the output _logs directory. User can stop writing skipped records by setting the value null. @param conf the configuration. @param path skip output directory path
[ "Set", "the", "directory", "to", "which", "skipped", "records", "are", "written", ".", "By", "default", "it", "is", "the", "sub", "directory", "of", "the", "output", "_logs", "directory", ".", "User", "can", "stop", "writing", "skipped", "records", "by", "...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/SkipBadRecords.java#L221-L229
netty/netty
buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java
CompositeByteBuf.addComponents
public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers) { """ Add the given {@link ByteBuf}s on the specific index <p> Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. If you need to have it increased you need to handle it by your own. <p> {@li...
java
public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers) { checkNotNull(buffers, "buffers"); addComponents0(false, cIndex, buffers, 0); consolidateIfNeeded(); return this; }
[ "public", "CompositeByteBuf", "addComponents", "(", "int", "cIndex", ",", "ByteBuf", "...", "buffers", ")", "{", "checkNotNull", "(", "buffers", ",", "\"buffers\"", ")", ";", "addComponents0", "(", "false", ",", "cIndex", ",", "buffers", ",", "0", ")", ";", ...
Add the given {@link ByteBuf}s on the specific index <p> Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. If you need to have it increased you need to handle it by your own. <p> {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is t...
[ "Add", "the", "given", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java#L335-L340
zk1931/jzab
src/main/java/com/github/zk1931/jzab/Participant.java
Participant.sendMessage
protected void sendMessage(String dest, Message message) { """ Sends message to the specific destination. @param dest the destination of the message. @param message the message to be sent. """ if (LOG.isTraceEnabled()) { LOG.trace("Sends message {} to {}.", TextFormat.shortDebugSt...
java
protected void sendMessage(String dest, Message message) { if (LOG.isTraceEnabled()) { LOG.trace("Sends message {} to {}.", TextFormat.shortDebugString(message), dest); } this.transport.send(dest, message); }
[ "protected", "void", "sendMessage", "(", "String", "dest", ",", "Message", "message", ")", "{", "if", "(", "LOG", ".", "isTraceEnabled", "(", ")", ")", "{", "LOG", ".", "trace", "(", "\"Sends message {} to {}.\"", ",", "TextFormat", ".", "shortDebugString", ...
Sends message to the specific destination. @param dest the destination of the message. @param message the message to be sent.
[ "Sends", "message", "to", "the", "specific", "destination", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/Participant.java#L265-L272
google/closure-templates
java/src/com/google/template/soy/data/SanitizedContents.java
SanitizedContents.constantTrustedResourceUri
public static SanitizedContent constantTrustedResourceUri( @CompileTimeConstant final String constant) { """ Wraps an assumed-safe trusted_resource_uri constant. <p>This only accepts compile-time constants, based on the assumption that trusted resource URIs that are controlled by the application (and not...
java
public static SanitizedContent constantTrustedResourceUri( @CompileTimeConstant final String constant) { return fromConstant(constant, ContentKind.TRUSTED_RESOURCE_URI, Dir.LTR); }
[ "public", "static", "SanitizedContent", "constantTrustedResourceUri", "(", "@", "CompileTimeConstant", "final", "String", "constant", ")", "{", "return", "fromConstant", "(", "constant", ",", "ContentKind", ".", "TRUSTED_RESOURCE_URI", ",", "Dir", ".", "LTR", ")", "...
Wraps an assumed-safe trusted_resource_uri constant. <p>This only accepts compile-time constants, based on the assumption that trusted resource URIs that are controlled by the application (and not user input) are considered safe.
[ "Wraps", "an", "assumed", "-", "safe", "trusted_resource_uri", "constant", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/data/SanitizedContents.java#L238-L241
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/basic/LinearLayout.java
LinearLayout.setDividerPadding
public void setDividerPadding(float padding, final Axis axis) { """ Sets divider padding for axis. If axis does not match the orientation, it has no effect. @param padding @param axis {@link Axis} """ if (axis == getOrientationAxis()) { super.setDividerPadding(padding, axis); } el...
java
public void setDividerPadding(float padding, final Axis axis) { if (axis == getOrientationAxis()) { super.setDividerPadding(padding, axis); } else { Log.w(TAG, "Cannot apply divider padding for wrong axis [%s], orientation = %s", axis, getOrientation()); ...
[ "public", "void", "setDividerPadding", "(", "float", "padding", ",", "final", "Axis", "axis", ")", "{", "if", "(", "axis", "==", "getOrientationAxis", "(", ")", ")", "{", "super", ".", "setDividerPadding", "(", "padding", ",", "axis", ")", ";", "}", "els...
Sets divider padding for axis. If axis does not match the orientation, it has no effect. @param padding @param axis {@link Axis}
[ "Sets", "divider", "padding", "for", "axis", ".", "If", "axis", "does", "not", "match", "the", "orientation", "it", "has", "no", "effect", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/basic/LinearLayout.java#L137-L144
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificate
public CertificateBundle updateCertificate(String vaultBaseUrl, String certificateName, String certificateVersion, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map<String, String> tags) { """ Updates the specified attributes associated with the given certificate. The UpdateCer...
java
public CertificateBundle updateCertificate(String vaultBaseUrl, String certificateName, String certificateVersion, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map<String, String> tags) { return updateCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certifi...
[ "public", "CertificateBundle", "updateCertificate", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "String", "certificateVersion", ",", "CertificatePolicy", "certificatePolicy", ",", "CertificateAttributes", "certificateAttributes", ",", "Map", "<", "...
Updates the specified attributes associated with the given certificate. The UpdateCertificate operation applies the specified update on the given certificate; the only elements updated are the certificate's attributes. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for ...
[ "Updates", "the", "specified", "attributes", "associated", "with", "the", "given", "certificate", ".", "The", "UpdateCertificate", "operation", "applies", "the", "specified", "update", "on", "the", "given", "certificate", ";", "the", "only", "elements", "updated", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7435-L7437
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabasesInner.java
DatabasesInner.listMetricDefinitions
public List<MetricDefinitionInner> listMetricDefinitions(String resourceGroupName, String accountName, String databaseRid) { """ Retrieves metric defintions for the given database. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param databaseRid ...
java
public List<MetricDefinitionInner> listMetricDefinitions(String resourceGroupName, String accountName, String databaseRid) { return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, accountName, databaseRid).toBlocking().single().body(); }
[ "public", "List", "<", "MetricDefinitionInner", ">", "listMetricDefinitions", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "databaseRid", ")", "{", "return", "listMetricDefinitionsWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Retrieves metric defintions for the given database. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param databaseRid Cosmos DB database rid. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the req...
[ "Retrieves", "metric", "defintions", "for", "the", "given", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabasesInner.java#L379-L381
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java
MailUtil.send
public static void send(String to, String subject, String content, boolean isHtml, File... files) { """ 使用配置文件中设置的账户发送邮件,发送单个或多个收件人<br> 多个收件人可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param to 收件人 @param subject 标题 @param content 正文 @param isHtml 是否为HTML @param files 附件列表 """ send(splitAddress(to), subject, content,...
java
public static void send(String to, String subject, String content, boolean isHtml, File... files) { send(splitAddress(to), subject, content, isHtml, files); }
[ "public", "static", "void", "send", "(", "String", "to", ",", "String", "subject", ",", "String", "content", ",", "boolean", "isHtml", ",", "File", "...", "files", ")", "{", "send", "(", "splitAddress", "(", "to", ")", ",", "subject", ",", "content", "...
使用配置文件中设置的账户发送邮件,发送单个或多个收件人<br> 多个收件人可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param to 收件人 @param subject 标题 @param content 正文 @param isHtml 是否为HTML @param files 附件列表
[ "使用配置文件中设置的账户发送邮件,发送单个或多个收件人<br", ">", "多个收件人可以使用逗号“", "”分隔,也可以通过分号“", ";", "”分隔" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L56-L58
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/localization/MessageInterpolator.java
MessageInterpolator.interpolate
public String interpolate(final String message, final Map<String, ?> vars, boolean recursive) { """ メッセージを引数varsで指定した変数で補完する。 @param message 対象のメッセージ。 @param vars メッセージ中の変数に対する値のマップ。 @param recursive 変換したメッセージに対しても再帰的に処理するかどうか @return 補完したメッセージ。 """ return parse(message, vars, recursive, null); ...
java
public String interpolate(final String message, final Map<String, ?> vars, boolean recursive) { return parse(message, vars, recursive, null); }
[ "public", "String", "interpolate", "(", "final", "String", "message", ",", "final", "Map", "<", "String", ",", "?", ">", "vars", ",", "boolean", "recursive", ")", "{", "return", "parse", "(", "message", ",", "vars", ",", "recursive", ",", "null", ")", ...
メッセージを引数varsで指定した変数で補完する。 @param message 対象のメッセージ。 @param vars メッセージ中の変数に対する値のマップ。 @param recursive 変換したメッセージに対しても再帰的に処理するかどうか @return 補完したメッセージ。
[ "メッセージを引数varsで指定した変数で補完する。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/localization/MessageInterpolator.java#L86-L88
GerdHolz/TOVAL
src/de/invation/code/toval/graphic/diagrams/panels/ScatterChartPanel.java
ScatterChartPanel.paintValues
protected void paintValues(Graphics g, boolean paintLines) { """ Paints diagram-content on the base of the values for different dimensions. @param g Graphics context """ Point valueLocation; Point lastLocation = null; for (int i = 0; i < getValueCount(); i++) { valueLocation = getPointFor(i); ...
java
protected void paintValues(Graphics g, boolean paintLines) { Point valueLocation; Point lastLocation = null; for (int i = 0; i < getValueCount(); i++) { valueLocation = getPointFor(i); GraphicUtils.fillCircle(g, valueLocation, getPointDiameter()); if(paintLines && lastLocation!=null){ g.drawLi...
[ "protected", "void", "paintValues", "(", "Graphics", "g", ",", "boolean", "paintLines", ")", "{", "Point", "valueLocation", ";", "Point", "lastLocation", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getValueCount", "(", ")", ";", ...
Paints diagram-content on the base of the values for different dimensions. @param g Graphics context
[ "Paints", "diagram", "-", "content", "on", "the", "base", "of", "the", "values", "for", "different", "dimensions", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/graphic/diagrams/panels/ScatterChartPanel.java#L366-L377
orientechnologies/orientdb-gremlin
driver/src/main/java/org/apache/tinkerpop/gremlin/orientdb/OrientGraphFactory.java
OrientGraphFactory.setupPool
public OrientGraphBaseFactory setupPool(final int max) { """ Setting up the factory to use database pool instead of creation a new instance of database connection each time. """ pool = new OPartitionedReCreatableDatabasePool(this.factory, dbName, user, password, max); return this; }
java
public OrientGraphBaseFactory setupPool(final int max) { pool = new OPartitionedReCreatableDatabasePool(this.factory, dbName, user, password, max); return this; }
[ "public", "OrientGraphBaseFactory", "setupPool", "(", "final", "int", "max", ")", "{", "pool", "=", "new", "OPartitionedReCreatableDatabasePool", "(", "this", ".", "factory", ",", "dbName", ",", "user", ",", "password", ",", "max", ")", ";", "return", "this", ...
Setting up the factory to use database pool instead of creation a new instance of database connection each time.
[ "Setting", "up", "the", "factory", "to", "use", "database", "pool", "instead", "of", "creation", "a", "new", "instance", "of", "database", "connection", "each", "time", "." ]
train
https://github.com/orientechnologies/orientdb-gremlin/blob/94549ee82431dd3b4c53a1aedb4b5107e4763b71/driver/src/main/java/org/apache/tinkerpop/gremlin/orientdb/OrientGraphFactory.java#L196-L199
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeAdd
private DiffPart decodeAdd(final int blockSize_S, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { """ Decodes an Add operation. @param blockSize_S length of a S block @param blockSize_L length of a L block @return DiffPart, Add operation @throws UnsupportedEncodingExcept...
java
private DiffPart decodeAdd(final int blockSize_S, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_S < 1 || blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_L: " + blockSize_L); } int s = r.rea...
[ "private", "DiffPart", "decodeAdd", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_L", ")", "throws", "UnsupportedEncodingException", ",", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_L", "<", "1", ")", "{",...
Decodes an Add operation. @param blockSize_S length of a S block @param blockSize_L length of a L block @return DiffPart, Add operation @throws UnsupportedEncodingException if the character encoding is unsupported @throws DecodingException if the decoding failed
[ "Decodes", "an", "Add", "operation", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L230-L252
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java
ProfilerTimerFilter.sessionClosed
@Override public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception { """ Profile a SessionClosed event. This method will gather the following informations : - the method duration - the shortest execution time - the slowest execution time - the average execution time...
java
@Override public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception { if (profileSessionClosed) { long start = timeNow(); nextFilter.sessionClosed(session); long end = timeNow(); sessionClosedTimerWorker.addNewDuration(en...
[ "@", "Override", "public", "void", "sessionClosed", "(", "NextFilter", "nextFilter", ",", "IoSession", "session", ")", "throws", "Exception", "{", "if", "(", "profileSessionClosed", ")", "{", "long", "start", "=", "timeNow", "(", ")", ";", "nextFilter", ".", ...
Profile a SessionClosed event. This method will gather the following informations : - the method duration - the shortest execution time - the slowest execution time - the average execution time - the global number of calls @param nextFilter The filter to call next @param session The associated session
[ "Profile", "a", "SessionClosed", "event", ".", "This", "method", "will", "gather", "the", "following", "informations", ":", "-", "the", "method", "duration", "-", "the", "shortest", "execution", "time", "-", "the", "slowest", "execution", "time", "-", "the", ...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java#L465-L476
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java
AbstractAsymmetricCrypto.encrypt
public byte[] encrypt(String data, String charset, KeyType keyType) { """ 加密 @param data 被加密的字符串 @param charset 编码 @param keyType 私钥或公钥 {@link KeyType} @return 加密后的bytes """ return encrypt(StrUtil.bytes(data, charset), keyType); }
java
public byte[] encrypt(String data, String charset, KeyType keyType) { return encrypt(StrUtil.bytes(data, charset), keyType); }
[ "public", "byte", "[", "]", "encrypt", "(", "String", "data", ",", "String", "charset", ",", "KeyType", "keyType", ")", "{", "return", "encrypt", "(", "StrUtil", ".", "bytes", "(", "data", ",", "charset", ")", ",", "keyType", ")", ";", "}" ]
加密 @param data 被加密的字符串 @param charset 编码 @param keyType 私钥或公钥 {@link KeyType} @return 加密后的bytes
[ "加密" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L77-L79
DavidPizarro/PinView
library/src/main/java/com/dpizarro/pinview/library/PinView.java
PinView.setPin
public void setPin(int numberPinBoxes, int inputType) { """ Set PinBoxes (see {@link EditText}) number to add to {@link PinView}, with all attributes, including splits. @param numberPinBoxes number of PinBoxes @param inputType input type of each PinBox (see {@link InputType}) """ if(numberPinBoxes<...
java
public void setPin(int numberPinBoxes, int inputType) { if(numberPinBoxes<=0) { numberPinBoxes = mNumberPinBoxes; } mLinearLayoutPinBoxes.removeAllViews(); setNumberPinBoxes(numberPinBoxes); pinBoxesIds = new int[numberPinBoxes]; pinSplitsIds = new int[number...
[ "public", "void", "setPin", "(", "int", "numberPinBoxes", ",", "int", "inputType", ")", "{", "if", "(", "numberPinBoxes", "<=", "0", ")", "{", "numberPinBoxes", "=", "mNumberPinBoxes", ";", "}", "mLinearLayoutPinBoxes", ".", "removeAllViews", "(", ")", ";", ...
Set PinBoxes (see {@link EditText}) number to add to {@link PinView}, with all attributes, including splits. @param numberPinBoxes number of PinBoxes @param inputType input type of each PinBox (see {@link InputType})
[ "Set", "PinBoxes", "(", "see", "{", "@link", "EditText", "}", ")", "number", "to", "add", "to", "{", "@link", "PinView", "}", "with", "all", "attributes", "including", "splits", "." ]
train
https://github.com/DavidPizarro/PinView/blob/b171a89694921475b5442585810b8475ef1cfe35/library/src/main/java/com/dpizarro/pinview/library/PinView.java#L94-L115
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java
MatchSpaceImpl.getCacheEntry
private CacheEntry getCacheEntry(Object value, boolean create) { """ Gets the appropriate CacheEntry for a value of the root Identifier @param value the value whose CacheEntry is desired @param create if true, the CacheEntry is created (empty) if it doesn't already exist. This should only be done in synchro...
java
private CacheEntry getCacheEntry(Object value, boolean create) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry( this,cclass, "getCacheEntry", new Object[] { value, new Boolean(create), matchCache }); CacheEntry e = (CacheEntry) matchCache.get(value);...
[ "private", "CacheEntry", "getCacheEntry", "(", "Object", "value", ",", "boolean", "create", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "tc", ".", "entry", "(", "this", ",",...
Gets the appropriate CacheEntry for a value of the root Identifier @param value the value whose CacheEntry is desired @param create if true, the CacheEntry is created (empty) if it doesn't already exist. This should only be done in synchronized methods.
[ "Gets", "the", "appropriate", "CacheEntry", "for", "a", "value", "of", "the", "root", "Identifier" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java#L315-L341
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
IssueIndex.configureRouting
private static void configureRouting(IssueQuery query, SearchOptions options, SearchRequestBuilder requestBuilder) { """ Optimization - do not send ES request to all shards when scope is restricted to a set of projects. Because project UUID is used for routing, the request can be sent to only the shards containi...
java
private static void configureRouting(IssueQuery query, SearchOptions options, SearchRequestBuilder requestBuilder) { Collection<String> uuids = query.projectUuids(); if (!uuids.isEmpty() && options.getFacets().isEmpty()) { requestBuilder.setRouting(uuids.stream().map(AuthorizationDoc::idOf).toArray(String...
[ "private", "static", "void", "configureRouting", "(", "IssueQuery", "query", ",", "SearchOptions", "options", ",", "SearchRequestBuilder", "requestBuilder", ")", "{", "Collection", "<", "String", ">", "uuids", "=", "query", ".", "projectUuids", "(", ")", ";", "i...
Optimization - do not send ES request to all shards when scope is restricted to a set of projects. Because project UUID is used for routing, the request can be sent to only the shards containing the specified projects. Note that sticky facets may involve all projects, so this optimization must be disabled when facets a...
[ "Optimization", "-", "do", "not", "send", "ES", "request", "to", "all", "shards", "when", "scope", "is", "restricted", "to", "a", "set", "of", "projects", ".", "Because", "project", "UUID", "is", "used", "for", "routing", "the", "request", "can", "be", "...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java#L319-L324
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.checkArgNotNullOrEmptyOrBlank
public static <T extends CharSequence> T checkArgNotNullOrEmptyOrBlank(final T arg, final String msg) { """ DON'T change 'OrEmptyOrBlank' to 'OrBlank' because of the occurring order in the auto-completed context menu. """ if (N.isNullOrEmptyOrBlank(arg)) { if (isNullErrorMsg(msg)) { ...
java
public static <T extends CharSequence> T checkArgNotNullOrEmptyOrBlank(final T arg, final String msg) { if (N.isNullOrEmptyOrBlank(arg)) { if (isNullErrorMsg(msg)) { throw new IllegalArgumentException(msg); } else { throw new IllegalArgumentException(...
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "checkArgNotNullOrEmptyOrBlank", "(", "final", "T", "arg", ",", "final", "String", "msg", ")", "{", "if", "(", "N", ".", "isNullOrEmptyOrBlank", "(", "arg", ")", ")", "{", "if", "(", "isN...
DON'T change 'OrEmptyOrBlank' to 'OrBlank' because of the occurring order in the auto-completed context menu.
[ "DON", "T", "change", "OrEmptyOrBlank", "to", "OrBlank", "because", "of", "the", "occurring", "order", "in", "the", "auto", "-", "completed", "context", "menu", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L5808-L5818
netty/netty
common/src/main/java/io/netty/util/internal/StringUtil.java
StringUtil.unescapeCsv
public static CharSequence unescapeCsv(CharSequence value) { """ Unescapes the specified escaped CSV field, if necessary according to <a href="https://tools.ietf.org/html/rfc4180#section-2">RFC-4180</a>. @param value The escaped CSV field which will be unescaped according to <a href="https://tools.ietf.org/ht...
java
public static CharSequence unescapeCsv(CharSequence value) { int length = checkNotNull(value, "value").length(); if (length == 0) { return value; } int last = length - 1; boolean quoted = isDoubleQuote(value.charAt(0)) && isDoubleQuote(value.charAt(last)) && length !=...
[ "public", "static", "CharSequence", "unescapeCsv", "(", "CharSequence", "value", ")", "{", "int", "length", "=", "checkNotNull", "(", "value", ",", "\"value\"", ")", ".", "length", "(", ")", ";", "if", "(", "length", "==", "0", ")", "{", "return", "value...
Unescapes the specified escaped CSV field, if necessary according to <a href="https://tools.ietf.org/html/rfc4180#section-2">RFC-4180</a>. @param value The escaped CSV field which will be unescaped according to <a href="https://tools.ietf.org/html/rfc4180#section-2">RFC-4180</a> @return {@link CharSequence} the unesca...
[ "Unescapes", "the", "specified", "escaped", "CSV", "field", "if", "necessary", "according", "to", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc4180#section", "-", "2", ">", "RFC", "-", "4180<", "/", "a"...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/StringUtil.java#L400-L427
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java
GraphicsUtilities.createCompatibleImage
public static BufferedImage createCompatibleImage(int width, int height) { """ <p>Returns a new opaque compatible image of the specified width and height. That is, the returned <code>BufferedImage</code> is compatible with the graphics hardware. If the method is called in a headless environment, then the return...
java
public static BufferedImage createCompatibleImage(int width, int height) { return isHeadless() ? new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB) : getGraphicsConfiguration().createCompatibleImage(width, height); }
[ "public", "static", "BufferedImage", "createCompatibleImage", "(", "int", "width", ",", "int", "height", ")", "{", "return", "isHeadless", "(", ")", "?", "new", "BufferedImage", "(", "width", ",", "height", ",", "BufferedImage", ".", "TYPE_INT_RGB", ")", ":", ...
<p>Returns a new opaque compatible image of the specified width and height. That is, the returned <code>BufferedImage</code> is compatible with the graphics hardware. If the method is called in a headless environment, then the returned BufferedImage will be compatible with the source image.</p> @see #createCompatibleI...
[ "<p", ">", "Returns", "a", "new", "opaque", "compatible", "image", "of", "the", "specified", "width", "and", "height", ".", "That", "is", "the", "returned", "<code", ">", "BufferedImage<", "/", "code", ">", "is", "compatible", "with", "the", "graphics", "h...
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java#L218-L222
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java
FormatUtil.padRightAligned
public static String padRightAligned(String o, int len) { """ Pad a string to a given length by adding whitespace to the left. @param o original string @param len destination length @return padded string of at least length len (and o otherwise) """ return o.length() >= len ? o : (whitespace(len - o.le...
java
public static String padRightAligned(String o, int len) { return o.length() >= len ? o : (whitespace(len - o.length()) + o); }
[ "public", "static", "String", "padRightAligned", "(", "String", "o", ",", "int", "len", ")", "{", "return", "o", ".", "length", "(", ")", ">=", "len", "?", "o", ":", "(", "whitespace", "(", "len", "-", "o", ".", "length", "(", ")", ")", "+", "o",...
Pad a string to a given length by adding whitespace to the left. @param o original string @param len destination length @return padded string of at least length len (and o otherwise)
[ "Pad", "a", "string", "to", "a", "given", "length", "by", "adding", "whitespace", "to", "the", "left", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L880-L882