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
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormatted
@Nonnull public static String getFormatted (final double dValue, @Nonnull final Locale aDisplayLocale) { """ Format the passed value according to the rules specified by the given locale. All calls to {@link Double#toString(double)} that are displayed to the user should instead use this method. @param dValue...
java
@Nonnull public static String getFormatted (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getNumberInstance (aDisplayLocale).format (dValue); }
[ "@", "Nonnull", "public", "static", "String", "getFormatted", "(", "final", "double", "dValue", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDisplayLocale", ",", "\"DisplayLocale\"", ")", ";", "retur...
Format the passed value according to the rules specified by the given locale. All calls to {@link Double#toString(double)} that are displayed to the user should instead use this method. @param dValue The value to be formatted. @param aDisplayLocale The locale to be used. May not be <code>null</code>. @return The forma...
[ "Format", "the", "passed", "value", "according", "to", "the", "rules", "specified", "by", "the", "given", "locale", ".", "All", "calls", "to", "{", "@link", "Double#toString", "(", "double", ")", "}", "that", "are", "displayed", "to", "the", "user", "shoul...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L56-L62
RobertStewart/privateer
src/main/java/com/wombatnation/privateer/Privateer.java
Privateer.findSupertypeMethod
private Method findSupertypeMethod(Object o, String methodName, Class<?>[] types) { """ Examines each argument to see if a param in the same position is a supertype. This method is needed because getDeclaredMethod() does a formal type match. For example, if the method takes a java.util.List as a parameter, getDe...
java
private Method findSupertypeMethod(Object o, String methodName, Class<?>[] types) { Method matchingMethod = null; Method[] methods = o.getClass().getDeclaredMethods(); methodloop: for (Method method : methods) { if (methodName.equals(method.getName())) { Class<?>[] params = metho...
[ "private", "Method", "findSupertypeMethod", "(", "Object", "o", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "types", ")", "{", "Method", "matchingMethod", "=", "null", ";", "Method", "[", "]", "methods", "=", "o", ".", "getClass",...
Examines each argument to see if a param in the same position is a supertype. This method is needed because getDeclaredMethod() does a formal type match. For example, if the method takes a java.util.List as a parameter, getDeclaredMethod() will never match, since the formal type of whatever you pass will be a concrete ...
[ "Examines", "each", "argument", "to", "see", "if", "a", "param", "in", "the", "same", "position", "is", "a", "supertype", ".", "This", "method", "is", "needed", "because", "getDeclaredMethod", "()", "does", "a", "formal", "type", "match", ".", "For", "exam...
train
https://github.com/RobertStewart/privateer/blob/766603021ff406c950e798ce3fb259c9f1f460c7/src/main/java/com/wombatnation/privateer/Privateer.java#L163-L187
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java
EasterRule.firstBetween
@Override public Date firstBetween(Date start, Date end) { """ Return the first occurrence of this rule on or after the given start date and before the given end date. """ return doFirstBetween(start, end); }
java
@Override public Date firstBetween(Date start, Date end) { return doFirstBetween(start, end); }
[ "@", "Override", "public", "Date", "firstBetween", "(", "Date", "start", ",", "Date", "end", ")", "{", "return", "doFirstBetween", "(", "start", ",", "end", ")", ";", "}" ]
Return the first occurrence of this rule on or after the given start date and before the given end date.
[ "Return", "the", "first", "occurrence", "of", "this", "rule", "on", "or", "after", "the", "given", "start", "date", "and", "before", "the", "given", "end", "date", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java#L161-L165
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java
DataSynchronizer.insertOne
void insertOne(final MongoNamespace namespace, final BsonDocument document) { """ Inserts a single document locally and being to synchronize it based on its _id. Inserting a document with the same _id twice will result in a duplicate key exception. @param namespace the namespace to put the document in. @param...
java
void insertOne(final MongoNamespace namespace, final BsonDocument document) { this.waitUntilInitialized(); try { ongoingOperationsGroup.enter(); // Remove forbidden fields from the document before inserting it into the local collection. final BsonDocument docForStorage = sanitizeDocument(docu...
[ "void", "insertOne", "(", "final", "MongoNamespace", "namespace", ",", "final", "BsonDocument", "document", ")", "{", "this", ".", "waitUntilInitialized", "(", ")", ";", "try", "{", "ongoingOperationsGroup", ".", "enter", "(", ")", ";", "// Remove forbidden fields...
Inserts a single document locally and being to synchronize it based on its _id. Inserting a document with the same _id twice will result in a duplicate key exception. @param namespace the namespace to put the document in. @param document the document to insert.
[ "Inserts", "a", "single", "document", "locally", "and", "being", "to", "synchronize", "it", "based", "on", "its", "_id", ".", "Inserting", "a", "document", "with", "the", "same", "_id", "twice", "will", "result", "in", "a", "duplicate", "key", "exception", ...
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java#L2247-L2278
cucumber/cucumber-jvm
java/src/main/java/cucumber/runtime/java/JavaBackend.java
JavaBackend.loadGlue
public void loadGlue(Glue glue, Method method, Class<?> glueCodeClass) { """ Convenience method for frameworks that wish to load glue from methods explicitly (possibly found with a different mechanism than Cucumber's built-in classpath scanning). @param glue where stepdefs and hooks will be added. @p...
java
public void loadGlue(Glue glue, Method method, Class<?> glueCodeClass) { this.glue = glue; methodScanner.scan(this, method, glueCodeClass); }
[ "public", "void", "loadGlue", "(", "Glue", "glue", ",", "Method", "method", ",", "Class", "<", "?", ">", "glueCodeClass", ")", "{", "this", ".", "glue", "=", "glue", ";", "methodScanner", ".", "scan", "(", "this", ",", "method", ",", "glueCodeClass", "...
Convenience method for frameworks that wish to load glue from methods explicitly (possibly found with a different mechanism than Cucumber's built-in classpath scanning). @param glue where stepdefs and hooks will be added. @param method a candidate method. @param glueCodeClass the class implementing the...
[ "Convenience", "method", "for", "frameworks", "that", "wish", "to", "load", "glue", "from", "methods", "explicitly", "(", "possibly", "found", "with", "a", "different", "mechanism", "than", "Cucumber", "s", "built", "-", "in", "classpath", "scanning", ")", "."...
train
https://github.com/cucumber/cucumber-jvm/blob/437bb3a1f1d91b56f44059c835765b395eefc777/java/src/main/java/cucumber/runtime/java/JavaBackend.java#L107-L110
alkacon/opencms-core
src-modules/org/opencms/workplace/list/A_CmsListDialog.java
A_CmsListDialog.setSearchAction
protected void setSearchAction(CmsListMetadata metadata, String columnId) { """ Creates the default search action.<p> Can be overridden for more sophisticated search.<p> @param metadata the metadata of the list to do searchable @param columnId the if of the column to search into """ CmsListColu...
java
protected void setSearchAction(CmsListMetadata metadata, String columnId) { CmsListColumnDefinition col = metadata.getColumnDefinition(columnId); if ((columnId != null) && (col != null)) { if (metadata.getSearchAction() == null) { // makes the list searchable ...
[ "protected", "void", "setSearchAction", "(", "CmsListMetadata", "metadata", ",", "String", "columnId", ")", "{", "CmsListColumnDefinition", "col", "=", "metadata", ".", "getColumnDefinition", "(", "columnId", ")", ";", "if", "(", "(", "columnId", "!=", "null", "...
Creates the default search action.<p> Can be overridden for more sophisticated search.<p> @param metadata the metadata of the list to do searchable @param columnId the if of the column to search into
[ "Creates", "the", "default", "search", "action", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/list/A_CmsListDialog.java#L1117-L1128
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java
ESClient.addDiscriminator
private void addDiscriminator(Map<String, Object> values, EntityType entityType) { """ Adds the discriminator. @param values the values @param entityType the entity type """ String discrColumn = ((AbstractManagedType) entityType).getDiscriminatorColumn(); String discrValue = ((AbstractMan...
java
private void addDiscriminator(Map<String, Object> values, EntityType entityType) { String discrColumn = ((AbstractManagedType) entityType).getDiscriminatorColumn(); String discrValue = ((AbstractManagedType) entityType).getDiscriminatorValue(); // No need to check for empty or blank, as con...
[ "private", "void", "addDiscriminator", "(", "Map", "<", "String", ",", "Object", ">", "values", ",", "EntityType", "entityType", ")", "{", "String", "discrColumn", "=", "(", "(", "AbstractManagedType", ")", "entityType", ")", ".", "getDiscriminatorColumn", "(", ...
Adds the discriminator. @param values the values @param entityType the entity type
[ "Adds", "the", "discriminator", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java#L193-L204
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asBoolean
public static Boolean asBoolean(String expression, Node node) throws XPathExpressionException { """ Evaluates the specified XPath expression and returns the result as a Boolean. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly ...
java
public static Boolean asBoolean(String expression, Node node) throws XPathExpressionException { return asBoolean(expression, node, xpath()); }
[ "public", "static", "Boolean", "asBoolean", "(", "String", "expression", ",", "Node", "node", ")", "throws", "XPathExpressionException", "{", "return", "asBoolean", "(", "expression", ",", "node", ",", "xpath", "(", ")", ")", ";", "}" ]
Evaluates the specified XPath expression and returns the result as a Boolean. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly via { {@link #asDouble(String, Node, XPath)} instead. Note {@link XPath} is not thread-safe and not reentrant. @param e...
[ "Evaluates", "the", "specified", "XPath", "expression", "and", "returns", "the", "result", "as", "a", "Boolean", ".", "<p", ">", "This", "method", "can", "be", "expensive", "as", "a", "new", "xpath", "is", "instantiated", "per", "invocation", ".", "Consider"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L312-L315
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.openTag
public static String openTag(String tag, String clazz, String style, String... content) { """ Build a String containing a HTML opening tag with given CSS class and/or style and concatenates the given content. Content should contain no HTML, because it is prepared with {@link #htmlEncode(String)}. @param tag St...
java
public static String openTag(String tag, String clazz, String style, String... content) { return openTag(tag, clazz, style, false, content); }
[ "public", "static", "String", "openTag", "(", "String", "tag", ",", "String", "clazz", ",", "String", "style", ",", "String", "...", "content", ")", "{", "return", "openTag", "(", "tag", ",", "clazz", ",", "style", ",", "false", ",", "content", ")", ";...
Build a String containing a HTML opening tag with given CSS class and/or style and concatenates the given content. Content should contain no HTML, because it is prepared with {@link #htmlEncode(String)}. @param tag String name of HTML tag @param clazz CSS class of the tag @param style style for tag (plain CSS) @param ...
[ "Build", "a", "String", "containing", "a", "HTML", "opening", "tag", "with", "given", "CSS", "class", "and", "/", "or", "style", "and", "concatenates", "the", "given", "content", ".", "Content", "should", "contain", "no", "HTML", "because", "it", "is", "pr...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L390-L392
BioPAX/Paxtools
sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java
L3ToSBGNPDConverter.addComplexAsMember
private void addComplexAsMember(Complex cx, Glyph container) { """ /* Recursive method for creating the content of a complex. A complex may contain other complexes (bad practice), but SBGN needs them flattened. If an inner complex is empty, then we represent it using a glyph. Otherwise we represent only the mem...
java
private void addComplexAsMember(Complex cx, Glyph container) { // Create a glyph for the inner complex Glyph inner = createComplexMember(cx, container); for (PhysicalEntity mem : cx.getComponent()) { if (mem instanceof Complex) { // Recursive call for inner complexes addComplexAsMember((Complex) ...
[ "private", "void", "addComplexAsMember", "(", "Complex", "cx", ",", "Glyph", "container", ")", "{", "// Create a glyph for the inner complex", "Glyph", "inner", "=", "createComplexMember", "(", "cx", ",", "container", ")", ";", "for", "(", "PhysicalEntity", "mem", ...
/* Recursive method for creating the content of a complex. A complex may contain other complexes (bad practice), but SBGN needs them flattened. If an inner complex is empty, then we represent it using a glyph. Otherwise we represent only the members of this inner complex, merging them with the most outer complex. @par...
[ "/", "*", "Recursive", "method", "for", "creating", "the", "content", "of", "a", "complex", ".", "A", "complex", "may", "contain", "other", "complexes", "(", "bad", "practice", ")", "but", "SBGN", "needs", "them", "flattened", ".", "If", "an", "inner", "...
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L592-L608
javagl/ND
nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/i/IntTupleIterators.java
IntTupleIterators.clampingIterator
public static Iterator<MutableIntTuple> clampingIterator( IntTuple min, IntTuple max, Iterator<? extends MutableIntTuple> delegate) { """ Returns an iterator that returns the {@link MutableIntTuple}s from the given delegate that are contained in the given bounds.<br> @param min The minimum, ...
java
public static Iterator<MutableIntTuple> clampingIterator( IntTuple min, IntTuple max, Iterator<? extends MutableIntTuple> delegate) { Utils.checkForEqualSize(min, max); IntTuple localMin = IntTuples.copy(min); IntTuple localMax = IntTuples.copy(max); return cl...
[ "public", "static", "Iterator", "<", "MutableIntTuple", ">", "clampingIterator", "(", "IntTuple", "min", ",", "IntTuple", "max", ",", "Iterator", "<", "?", "extends", "MutableIntTuple", ">", "delegate", ")", "{", "Utils", ".", "checkForEqualSize", "(", "min", ...
Returns an iterator that returns the {@link MutableIntTuple}s from the given delegate that are contained in the given bounds.<br> @param min The minimum, inclusive. A copy of this tuple will be stored internally. @param max The maximum, exclusive. A copy of this tuple will be stored internally. @param delegate The del...
[ "Returns", "an", "iterator", "that", "returns", "the", "{", "@link", "MutableIntTuple", "}", "s", "from", "the", "given", "delegate", "that", "are", "contained", "in", "the", "given", "bounds", ".", "<br", ">" ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/i/IntTupleIterators.java#L197-L205
groupon/monsoon
intf/src/main/java/com/groupon/lex/metrics/timeseries/TimeSeriesMetricDeltaSet.java
TimeSeriesMetricDeltaSet.mapOptional
public TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn) { """ Apply a single-argument function to the set. @param fn A function that takes a TimeSeriesMetricDelta and returns a TimeSeriesMetricDelta. @return The mapped TimeSeriesMetricDelta from this set. ...
java
public TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn) { return values_ .map( fn, (x) -> x.entrySet().stream() .map((entry) -> apply_fn_optional_(entry, fn)) ...
[ "public", "TimeSeriesMetricDeltaSet", "mapOptional", "(", "Function", "<", "?", "super", "MetricValue", ",", "Optional", "<", "?", "extends", "MetricValue", ">", ">", "fn", ")", "{", "return", "values_", ".", "map", "(", "fn", ",", "(", "x", ")", "-", ">...
Apply a single-argument function to the set. @param fn A function that takes a TimeSeriesMetricDelta and returns a TimeSeriesMetricDelta. @return The mapped TimeSeriesMetricDelta from this set.
[ "Apply", "a", "single", "-", "argument", "function", "to", "the", "set", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/intf/src/main/java/com/groupon/lex/metrics/timeseries/TimeSeriesMetricDeltaSet.java#L173-L184
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java
TupleCombiner.assertApplicable
private void assertApplicable( FunctionInputDef inputDef, VarNamePattern varNamePattern) throws IllegalArgumentException { """ Throws an exception if the given variable pattern is not applicable to the given input definition. """ if( !varNamePattern.isApplicable( inputDef)) { throw new IllegalA...
java
private void assertApplicable( FunctionInputDef inputDef, VarNamePattern varNamePattern) throws IllegalArgumentException { if( !varNamePattern.isApplicable( inputDef)) { throw new IllegalArgumentException( "Can't find variable matching pattern=" + varNamePattern); } }
[ "private", "void", "assertApplicable", "(", "FunctionInputDef", "inputDef", ",", "VarNamePattern", "varNamePattern", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "varNamePattern", ".", "isApplicable", "(", "inputDef", ")", ")", "{", "throw", "new"...
Throws an exception if the given variable pattern is not applicable to the given input definition.
[ "Throws", "an", "exception", "if", "the", "given", "variable", "pattern", "is", "not", "applicable", "to", "the", "given", "input", "definition", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java#L494-L500
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/Document.java
Document.create
public static Document create(@NonNull String text, @NonNull Map<AttributeType, ?> attributes) { """ Convenience method for creating a document using the default document factory. @param text the text content making up the document @param attributes the attributes, i.e. metadata, associated with the docu...
java
public static Document create(@NonNull String text, @NonNull Map<AttributeType, ?> attributes) { return DocumentFactory.getInstance().create(text, Hermes.defaultLanguage(), attributes); }
[ "public", "static", "Document", "create", "(", "@", "NonNull", "String", "text", ",", "@", "NonNull", "Map", "<", "AttributeType", ",", "?", ">", "attributes", ")", "{", "return", "DocumentFactory", ".", "getInstance", "(", ")", ".", "create", "(", "text",...
Convenience method for creating a document using the default document factory. @param text the text content making up the document @param attributes the attributes, i.e. metadata, associated with the document @return the document
[ "Convenience", "method", "for", "creating", "a", "document", "using", "the", "default", "document", "factory", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/Document.java#L138-L140
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.forceNegativeIfTrue
public static BigDecimal forceNegativeIfTrue(final boolean condition, final BigDecimal amount) { """ Return a negative amount based on amount if true, otherwise return the ABS. """ return condition ? BigDecimalUtil.negate(BigDecimalUtil.abs(amount)) : BigDecimalUtil.abs(amount); }
java
public static BigDecimal forceNegativeIfTrue(final boolean condition, final BigDecimal amount) { return condition ? BigDecimalUtil.negate(BigDecimalUtil.abs(amount)) : BigDecimalUtil.abs(amount); }
[ "public", "static", "BigDecimal", "forceNegativeIfTrue", "(", "final", "boolean", "condition", ",", "final", "BigDecimal", "amount", ")", "{", "return", "condition", "?", "BigDecimalUtil", ".", "negate", "(", "BigDecimalUtil", ".", "abs", "(", "amount", ")", ")"...
Return a negative amount based on amount if true, otherwise return the ABS.
[ "Return", "a", "negative", "amount", "based", "on", "amount", "if", "true", "otherwise", "return", "the", "ABS", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L708-L710
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.buildRuns
public Collection<BuildRun> buildRuns(BuildRunFilter filter) { """ Get Build Runs filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter. """ return get(BuildRun.cl...
java
public Collection<BuildRun> buildRuns(BuildRunFilter filter) { return get(BuildRun.class, (filter != null) ? filter : new BuildRunFilter()); }
[ "public", "Collection", "<", "BuildRun", ">", "buildRuns", "(", "BuildRunFilter", "filter", ")", "{", "return", "get", "(", "BuildRun", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "BuildRunFilter", "(", ")", ")", ";", ...
Get Build Runs filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "Build", "Runs", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L294-L296
Netflix/Hystrix
hystrix-examples/src/main/java/com/netflix/hystrix/examples/demo/GetUserAccountCommand.java
GetUserAccountCommand.getFallback
@Override protected UserAccount getFallback() { """ Fallback that will use data from the UserCookie and stubbed defaults to create a UserAccount if the network call failed. """ /* * first 3 come from the HttpCookie * next 3 are stubbed defaults */ return new User...
java
@Override protected UserAccount getFallback() { /* * first 3 come from the HttpCookie * next 3 are stubbed defaults */ return new UserAccount(userCookie.userId, userCookie.name, userCookie.accountType, true, true, true); }
[ "@", "Override", "protected", "UserAccount", "getFallback", "(", ")", "{", "/*\n * first 3 come from the HttpCookie\n * next 3 are stubbed defaults\n */", "return", "new", "UserAccount", "(", "userCookie", ".", "userId", ",", "userCookie", ".", "name", ...
Fallback that will use data from the UserCookie and stubbed defaults to create a UserAccount if the network call failed.
[ "Fallback", "that", "will", "use", "data", "from", "the", "UserCookie", "and", "stubbed", "defaults", "to", "create", "a", "UserAccount", "if", "the", "network", "call", "failed", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-examples/src/main/java/com/netflix/hystrix/examples/demo/GetUserAccountCommand.java#L87-L94
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/SamlServiceProvider.java
SamlServiceProvider.newSamlDecorator
public Function<Service<HttpRequest, HttpResponse>, Service<HttpRequest, HttpResponse>> newSamlDecorator() { """ Creates a decorator which initiates a SAML authentication if a request is not authenticated. """ return delegate -> new SamlDecorator(this, delegate); }
java
public Function<Service<HttpRequest, HttpResponse>, Service<HttpRequest, HttpResponse>> newSamlDecorator() { return delegate -> new SamlDecorator(this, delegate); }
[ "public", "Function", "<", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", ",", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", ">", "newSamlDecorator", "(", ")", "{", "return", "delegate", "->", "new", "SamlDecorator", "(", "this", ",", "d...
Creates a decorator which initiates a SAML authentication if a request is not authenticated.
[ "Creates", "a", "decorator", "which", "initiates", "a", "SAML", "authentication", "if", "a", "request", "is", "not", "authenticated", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/SamlServiceProvider.java#L245-L248
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/LongShapeDescriptor.java
LongShapeDescriptor.asDataType
public LongShapeDescriptor asDataType(DataType dataType) { """ Return a new LongShapeDescriptor with the same shape, strides, order etc but with the specified datatype instead @param dataType Datatype of the returned descriptor """ long extras = 0L; extras = ArrayOptionsHelper.setOptionBit(ext...
java
public LongShapeDescriptor asDataType(DataType dataType){ long extras = 0L; extras = ArrayOptionsHelper.setOptionBit(extras, dataType); if(isEmpty()){ extras = ArrayOptionsHelper.setOptionBit(extras, ArrayType.EMPTY); } return new LongShapeDescriptor(shape, stride, of...
[ "public", "LongShapeDescriptor", "asDataType", "(", "DataType", "dataType", ")", "{", "long", "extras", "=", "0L", ";", "extras", "=", "ArrayOptionsHelper", ".", "setOptionBit", "(", "extras", ",", "dataType", ")", ";", "if", "(", "isEmpty", "(", ")", ")", ...
Return a new LongShapeDescriptor with the same shape, strides, order etc but with the specified datatype instead @param dataType Datatype of the returned descriptor
[ "Return", "a", "new", "LongShapeDescriptor", "with", "the", "same", "shape", "strides", "order", "etc", "but", "with", "the", "specified", "datatype", "instead" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/LongShapeDescriptor.java#L164-L171
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.box
@SafeVarargs public static Short[] box(final short... a) { """ <p> Converts an array of primitive shorts to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code short} array @return a {@code Short} array, {@code null} if null array input """...
java
@SafeVarargs public static Short[] box(final short... a) { if (a == null) { return null; } return box(a, 0, a.length); }
[ "@", "SafeVarargs", "public", "static", "Short", "[", "]", "box", "(", "final", "short", "...", "a", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "box", "(", "a", ",", "0", ",", "a", ".", "length", ")"...
<p> Converts an array of primitive shorts to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code short} array @return a {@code Short} array, {@code null} if null array input
[ "<p", ">", "Converts", "an", "array", "of", "primitive", "shorts", "to", "objects", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L237-L244
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XSynchronizedExpression synchronizedStatement, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param synchronizedStatement the synchronized statement. @param it the target for the generated content. @param context the context. @return ...
java
protected XExpression _generate(XSynchronizedExpression synchronizedStatement, IAppendable it, IExtraLanguageGeneratorContext context) { return generate(synchronizedStatement.getExpression(), context.getExpectedExpressionType(), it, context); }
[ "protected", "XExpression", "_generate", "(", "XSynchronizedExpression", "synchronizedStatement", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "return", "generate", "(", "synchronizedStatement", ".", "getExpression", "(", ")", ",",...
Generate the given object. @param synchronizedStatement the synchronized statement. @param it the target for the generated content. @param context the context. @return the statement.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L905-L907
operasoftware/operaprestodriver
src/com/opera/core/systems/scope/stp/services/desktop/ScopeDesktopWindowManager.java
ScopeDesktopWindowManager.getQuickWindow
public QuickWindow getQuickWindow(QuickWidgetSearchType property, String value) { """ Note: This grabs the first window with a matching name, there might be more """ QuickWindow lastFound = null; List<QuickWindow> windows = getQuickWindowList(); for (QuickWindow window : windows) { if (prope...
java
public QuickWindow getQuickWindow(QuickWidgetSearchType property, String value) { QuickWindow lastFound = null; List<QuickWindow> windows = getQuickWindowList(); for (QuickWindow window : windows) { if (property.equals(QuickWidgetSearchType.NAME)) { if (window.getName().equals(value)) { ...
[ "public", "QuickWindow", "getQuickWindow", "(", "QuickWidgetSearchType", "property", ",", "String", "value", ")", "{", "QuickWindow", "lastFound", "=", "null", ";", "List", "<", "QuickWindow", ">", "windows", "=", "getQuickWindowList", "(", ")", ";", "for", "(",...
Note: This grabs the first window with a matching name, there might be more
[ "Note", ":", "This", "grabs", "the", "first", "window", "with", "a", "matching", "name", "there", "might", "be", "more" ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/scope/stp/services/desktop/ScopeDesktopWindowManager.java#L78-L94
apache/reef
lang/java/reef-runtime-hdinsight/src/main/java/org/apache/reef/runtime/hdinsight/client/yarnrest/HDInsightInstance.java
HDInsightInstance.submitApplication
public void submitApplication(final ApplicationSubmission applicationSubmission) throws IOException { """ Submits an application for execution. @param applicationSubmission @throws IOException """ final String url = "ws/v1/cluster/apps"; final HttpPost post = preparePost(url); final StringWrit...
java
public void submitApplication(final ApplicationSubmission applicationSubmission) throws IOException { final String url = "ws/v1/cluster/apps"; final HttpPost post = preparePost(url); final StringWriter writer = new StringWriter(); try { this.objectMapper.writeValue(writer, applicationSubmission);...
[ "public", "void", "submitApplication", "(", "final", "ApplicationSubmission", "applicationSubmission", ")", "throws", "IOException", "{", "final", "String", "url", "=", "\"ws/v1/cluster/apps\"", ";", "final", "HttpPost", "post", "=", "preparePost", "(", "url", ")", ...
Submits an application for execution. @param applicationSubmission @throws IOException
[ "Submits", "an", "application", "for", "execution", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-hdinsight/src/main/java/org/apache/reef/runtime/hdinsight/client/yarnrest/HDInsightInstance.java#L106-L124
Azure/autorest-clientruntime-for-java
azure-client-authentication/src/main/java/com/microsoft/azure/credentials/UserTokenCredentials.java
UserTokenCredentials.acquireAccessTokenFromRefreshToken
AuthenticationResult acquireAccessTokenFromRefreshToken(String resource, String refreshToken, boolean isMultipleResourceRefreshToken) throws IOException { """ Refresh tokens are currently not used since we don't know if the refresh token has expired """ ExecutorService executor = Executors.newSingleThr...
java
AuthenticationResult acquireAccessTokenFromRefreshToken(String resource, String refreshToken, boolean isMultipleResourceRefreshToken) throws IOException { ExecutorService executor = Executors.newSingleThreadExecutor(); try { return refreshTokenClient.refreshToken(domain(), clientId(), resour...
[ "AuthenticationResult", "acquireAccessTokenFromRefreshToken", "(", "String", "resource", ",", "String", "refreshToken", ",", "boolean", "isMultipleResourceRefreshToken", ")", "throws", "IOException", "{", "ExecutorService", "executor", "=", "Executors", ".", "newSingleThreadE...
Refresh tokens are currently not used since we don't know if the refresh token has expired
[ "Refresh", "tokens", "are", "currently", "not", "used", "since", "we", "don", "t", "know", "if", "the", "refresh", "token", "has", "expired" ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-client-authentication/src/main/java/com/microsoft/azure/credentials/UserTokenCredentials.java#L122-L131
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java
Http2Exception.closedStreamError
public static Http2Exception closedStreamError(Http2Error error, String fmt, Object... args) { """ Use if an error has occurred which can not be isolated to a single stream, but instead applies to the entire connection. @param error The type of error as defined by the HTTP/2 specification. @param fmt String wit...
java
public static Http2Exception closedStreamError(Http2Error error, String fmt, Object... args) { return new ClosedStreamCreationException(error, String.format(fmt, args)); }
[ "public", "static", "Http2Exception", "closedStreamError", "(", "Http2Error", "error", ",", "String", "fmt", ",", "Object", "...", "args", ")", "{", "return", "new", "ClosedStreamCreationException", "(", "error", ",", "String", ".", "format", "(", "fmt", ",", ...
Use if an error has occurred which can not be isolated to a single stream, but instead applies to the entire connection. @param error The type of error as defined by the HTTP/2 specification. @param fmt String with the content and format for the additional debug data. @param args Objects which fit into the format defin...
[ "Use", "if", "an", "error", "has", "occurred", "which", "can", "not", "be", "isolated", "to", "a", "single", "stream", "but", "instead", "applies", "to", "the", "entire", "connection", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java#L110-L112
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.calculateScore
public double calculateScore(JavaRDD<DataSet> data, boolean average, int minibatchSize) { """ Calculate the score for all examples in the provided {@code JavaRDD<DataSet>}, either by summing or averaging over the entire data set. To calculate a score for each example individually, use {@link #scoreExamples(JavaPa...
java
public double calculateScore(JavaRDD<DataSet> data, boolean average, int minibatchSize) { JavaRDD<Tuple2<Integer, Double>> rdd = data.mapPartitions(new ScoreFlatMapFunctionCGDataSet(conf.toJson(), sc.broadcast(network.params(false)), minibatchSize)); //Reduce to a single tuple, ...
[ "public", "double", "calculateScore", "(", "JavaRDD", "<", "DataSet", ">", "data", ",", "boolean", "average", ",", "int", "minibatchSize", ")", "{", "JavaRDD", "<", "Tuple2", "<", "Integer", ",", "Double", ">", ">", "rdd", "=", "data", ".", "mapPartitions"...
Calculate the score for all examples in the provided {@code JavaRDD<DataSet>}, either by summing or averaging over the entire data set. To calculate a score for each example individually, use {@link #scoreExamples(JavaPairRDD, boolean)} or one of the similar methods @param data Data to score @param average ...
[ "Calculate", "the", "score", "for", "all", "examples", "in", "the", "provided", "{", "@code", "JavaRDD<DataSet", ">", "}", "either", "by", "summing", "or", "averaging", "over", "the", "entire", "data", "set", ".", "To", "calculate", "a", "score", "for", "e...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L376-L387
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/graph/GraphEncoder.java
GraphEncoder.decode
public static Graph decode(String encodedGraph, boolean noMonth) throws GraphEncodingException { """ convert a String-encoded graph into a usable Graph object, using default GraphConfiguration @param encodedGraph String encoded graph, as returned by getEncoded() @param noMonth if true, disable the month highl...
java
public static Graph decode(String encodedGraph, boolean noMonth) throws GraphEncodingException { GraphConfiguration config = new GraphConfiguration(); if(noMonth) { config.valueHighlightColor = config.valueColor; } return decode(encodedGraph, config); }
[ "public", "static", "Graph", "decode", "(", "String", "encodedGraph", ",", "boolean", "noMonth", ")", "throws", "GraphEncodingException", "{", "GraphConfiguration", "config", "=", "new", "GraphConfiguration", "(", ")", ";", "if", "(", "noMonth", ")", "{", "confi...
convert a String-encoded graph into a usable Graph object, using default GraphConfiguration @param encodedGraph String encoded graph, as returned by getEncoded() @param noMonth if true, disable the month highlight color @return a Graph, ready to use @throws GraphEncodingException if there were problems with the encoded...
[ "convert", "a", "String", "-", "encoded", "graph", "into", "a", "usable", "Graph", "object", "using", "default", "GraphConfiguration" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/graph/GraphEncoder.java#L39-L46
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java
SessionAffinityManager.encodeURL
@Override public String encodeURL(ServletRequest request, String uri, SessionAffinityContext affinityContext) { """ Method encodeURL <p> @param request @param uri @param affinityContext @return String encoded URI @see com.ibm.wsspi.session.ISessionAffinityManager#encodeURL(javax.servlet.ServletRequest,...
java
@Override public String encodeURL(ServletRequest request, String uri, SessionAffinityContext affinityContext) { return encodeURL(null, request, uri, affinityContext); }
[ "@", "Override", "public", "String", "encodeURL", "(", "ServletRequest", "request", ",", "String", "uri", ",", "SessionAffinityContext", "affinityContext", ")", "{", "return", "encodeURL", "(", "null", ",", "request", ",", "uri", ",", "affinityContext", ")", ";"...
Method encodeURL <p> @param request @param uri @param affinityContext @return String encoded URI @see com.ibm.wsspi.session.ISessionAffinityManager#encodeURL(javax.servlet.ServletRequest, java.lang.String, SessionAffinityContext)
[ "Method", "encodeURL", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java#L349-L352
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyEncoder.java
KeyEncoder.encodeDesc
public static void encodeDesc(float value, byte[] dst, int dstOffset) { """ Encodes the given float into exactly 4 bytes for descending order. @param value float value to encode @param dst destination for encoded bytes @param dstOffset offset into destination array """ int bits = Float.floatToInt...
java
public static void encodeDesc(float value, byte[] dst, int dstOffset) { int bits = Float.floatToIntBits(value); if (bits >= 0) { bits ^= 0x7fffffff; } dst[dstOffset ] = (byte)(bits >> 24); dst[dstOffset + 1] = (byte)(bits >> 16); dst[dstOffset + 2] =...
[ "public", "static", "void", "encodeDesc", "(", "float", "value", ",", "byte", "[", "]", "dst", ",", "int", "dstOffset", ")", "{", "int", "bits", "=", "Float", ".", "floatToIntBits", "(", "value", ")", ";", "if", "(", "bits", ">=", "0", ")", "{", "b...
Encodes the given float into exactly 4 bytes for descending order. @param value float value to encode @param dst destination for encoded bytes @param dstOffset offset into destination array
[ "Encodes", "the", "given", "float", "into", "exactly", "4", "bytes", "for", "descending", "order", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyEncoder.java#L236-L245
line/armeria
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
ServerBuilder.gracefulShutdownTimeout
public ServerBuilder gracefulShutdownTimeout(Duration quietPeriod, Duration timeout) { """ Sets the amount of time to wait after calling {@link Server#stop()} for requests to go away before actually shutting down. @param quietPeriod the number of milliseconds to wait for active requests to go end before shutt...
java
public ServerBuilder gracefulShutdownTimeout(Duration quietPeriod, Duration timeout) { requireNonNull(quietPeriod, "quietPeriod"); requireNonNull(timeout, "timeout"); gracefulShutdownQuietPeriod = validateNonNegative(quietPeriod, "quietPeriod"); gracefulShutdownTimeout = validateNonNegat...
[ "public", "ServerBuilder", "gracefulShutdownTimeout", "(", "Duration", "quietPeriod", ",", "Duration", "timeout", ")", "{", "requireNonNull", "(", "quietPeriod", ",", "\"quietPeriod\"", ")", ";", "requireNonNull", "(", "timeout", ",", "\"timeout\"", ")", ";", "grace...
Sets the amount of time to wait after calling {@link Server#stop()} for requests to go away before actually shutting down. @param quietPeriod the number of milliseconds to wait for active requests to go end before shutting down. {@link Duration#ZERO} means the server will stop right away without waiting. @param timeou...
[ "Sets", "the", "amount", "of", "time", "to", "wait", "after", "calling", "{", "@link", "Server#stop", "()", "}", "for", "requests", "to", "go", "away", "before", "actually", "shutting", "down", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java#L639-L647
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.classNotMapped
public static void classNotMapped(Class<?> aClass) { """ Thrown if the class isn't mapped. @param aClass class to analyze """ throw new ClassNotMappedException(MSG.INSTANCE.message(classNotMappedException1,aClass.getSimpleName())); }
java
public static void classNotMapped(Class<?> aClass){ throw new ClassNotMappedException(MSG.INSTANCE.message(classNotMappedException1,aClass.getSimpleName())); }
[ "public", "static", "void", "classNotMapped", "(", "Class", "<", "?", ">", "aClass", ")", "{", "throw", "new", "ClassNotMappedException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "classNotMappedException1", ",", "aClass", ".", "getSimpleName", "(", ")...
Thrown if the class isn't mapped. @param aClass class to analyze
[ "Thrown", "if", "the", "class", "isn", "t", "mapped", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L565-L567
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.writeValue
public void writeValue(final int length, final int value) throws EncodingException { """ Writes a positive integer to the buffer. @param length the number of bits to write @param value an integer value @throws EncodingException if the length of the input is more than 31 bits. """ if (length > 31)...
java
public void writeValue(final int length, final int value) throws EncodingException { if (length > 31) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + value); } for (int i = length - 1; i >= 0; i--) { writeBit((value >...
[ "public", "void", "writeValue", "(", "final", "int", "length", ",", "final", "int", "value", ")", "throws", "EncodingException", "{", "if", "(", "length", ">", "31", ")", "{", "throw", "ErrorFactory", ".", "createEncodingException", "(", "ErrorKeys", ".", "D...
Writes a positive integer to the buffer. @param length the number of bits to write @param value an integer value @throws EncodingException if the length of the input is more than 31 bits.
[ "Writes", "a", "positive", "integer", "to", "the", "buffer", "." ]
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/BitWriter.java#L127-L139
xm-online/xm-commons
xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/repository/PermittedRepository.java
PermittedRepository.findByCondition
public <T> Page<T> findByCondition(String whereCondition, Map<String, Object> conditionParams, Pageable pageable, Class<T> entityClass, String privilegeKey) { "...
java
public <T> Page<T> findByCondition(String whereCondition, Map<String, Object> conditionParams, Pageable pageable, Class<T> entityClass, String privilegeKey) { ...
[ "public", "<", "T", ">", "Page", "<", "T", ">", "findByCondition", "(", "String", "whereCondition", ",", "Map", "<", "String", ",", "Object", ">", "conditionParams", ",", "Pageable", "pageable", ",", "Class", "<", "T", ">", "entityClass", ",", "String", ...
Find permitted entities by parameters. @param whereCondition the parameters condition @param conditionParams the parameters map @param pageable the page info @param entityClass the entity class to get @param privilegeKey the privilege key for permission lookup @param <T> the type of entity @return page of permitted ent...
[ "Find", "permitted", "entities", "by", "parameters", "." ]
train
https://github.com/xm-online/xm-commons/blob/43eb2273adb96f40830d7b905ee3a767b8715caf/xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/repository/PermittedRepository.java#L113-L119
alkacon/opencms-core
src/org/opencms/cache/CmsMemoryObjectCache.java
CmsMemoryObjectCache.putCachedObject
public void putCachedObject(Class<?> owner, String key, Object value) { """ Puts an object into the cache.<p> @param owner the owner class of the cached object (used to ensure keys don't overlap) @param key the key to store the object at @param value the object to store """ key = owner.getName()....
java
public void putCachedObject(Class<?> owner, String key, Object value) { key = owner.getName().concat(key); OpenCms.getMemoryMonitor().cacheMemObject(key, value); }
[ "public", "void", "putCachedObject", "(", "Class", "<", "?", ">", "owner", ",", "String", "key", ",", "Object", "value", ")", "{", "key", "=", "owner", ".", "getName", "(", ")", ".", "concat", "(", "key", ")", ";", "OpenCms", ".", "getMemoryMonitor", ...
Puts an object into the cache.<p> @param owner the owner class of the cached object (used to ensure keys don't overlap) @param key the key to store the object at @param value the object to store
[ "Puts", "an", "object", "into", "the", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cache/CmsMemoryObjectCache.java#L116-L120
rey5137/material
material/src/main/java/com/rey/material/widget/FloatingActionButton.java
FloatingActionButton.setLineMorphingState
public void setLineMorphingState(int state, boolean animation) { """ Set the line state of LineMorphingDrawable that is used as this button's icon. @param state The line state. @param animation Indicate should show animation when switch line state or not. """ if(mIcon != null && mIcon instanceof LineMorphi...
java
public void setLineMorphingState(int state, boolean animation){ if(mIcon != null && mIcon instanceof LineMorphingDrawable) ((LineMorphingDrawable)mIcon).switchLineState(state, animation); }
[ "public", "void", "setLineMorphingState", "(", "int", "state", ",", "boolean", "animation", ")", "{", "if", "(", "mIcon", "!=", "null", "&&", "mIcon", "instanceof", "LineMorphingDrawable", ")", "(", "(", "LineMorphingDrawable", ")", "mIcon", ")", ".", "switchL...
Set the line state of LineMorphingDrawable that is used as this button's icon. @param state The line state. @param animation Indicate should show animation when switch line state or not.
[ "Set", "the", "line", "state", "of", "LineMorphingDrawable", "that", "is", "used", "as", "this", "button", "s", "icon", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/FloatingActionButton.java#L253-L256
gresrun/jesque
src/main/java/net/greghaines/jesque/utils/ReflectionUtils.java
ReflectionUtils.createObject
public static <T> T createObject(final Class<T> clazz, final Object[] args, final Map<String,Object> vars) throws NoSuchConstructorException, AmbiguousConstructorException, ReflectiveOperationException { """ Create an object of the given type using a constructor that matches the supplied arguments an...
java
public static <T> T createObject(final Class<T> clazz, final Object[] args, final Map<String,Object> vars) throws NoSuchConstructorException, AmbiguousConstructorException, ReflectiveOperationException { return invokeSetters(findConstructor(clazz, args).newInstance(args), vars); }
[ "public", "static", "<", "T", ">", "T", "createObject", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Object", "[", "]", "args", ",", "final", "Map", "<", "String", ",", "Object", ">", "vars", ")", "throws", "NoSuchConstructorException", ...
Create an object of the given type using a constructor that matches the supplied arguments and invoke the setters with the supplied variables. @param <T> the object type @param clazz the type to create @param args the arguments to the constructor @param vars the named arguments for setters @return a new object of the ...
[ "Create", "an", "object", "of", "the", "given", "type", "using", "a", "constructor", "that", "matches", "the", "supplied", "arguments", "and", "invoke", "the", "setters", "with", "the", "supplied", "variables", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/utils/ReflectionUtils.java#L145-L148
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java
AbstractAggregatorImpl.callExtensionInitializers
protected void callExtensionInitializers(Iterable<IAggregatorExtension> extensions, ExtensionRegistrar reg) { """ For each extension specified, call the extension's {@link IExtensionInitializer#initialize} method. Note that this can cause additional extensions to be registered though the {@link ExtensionRegist...
java
protected void callExtensionInitializers(Iterable<IAggregatorExtension> extensions, ExtensionRegistrar reg) { final String sourceMethod = "callextensionInitializers"; //$NON-NLS-1$ boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(AbstractAggregatorImpl.class.getName(...
[ "protected", "void", "callExtensionInitializers", "(", "Iterable", "<", "IAggregatorExtension", ">", "extensions", ",", "ExtensionRegistrar", "reg", ")", "{", "final", "String", "sourceMethod", "=", "\"callextensionInitializers\"", ";", "//$NON-NLS-1$\r", "boolean", "isTr...
For each extension specified, call the extension's {@link IExtensionInitializer#initialize} method. Note that this can cause additional extensions to be registered though the {@link ExtensionRegistrar}. @param extensions The list of extensions to initialize @param reg The extension registrar.
[ "For", "each", "extension", "specified", "call", "the", "extension", "s", "{", "@link", "IExtensionInitializer#initialize", "}", "method", ".", "Note", "that", "this", "can", "cause", "additional", "extensions", "to", "be", "registered", "though", "the", "{", "@...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1329-L1344
Harium/keel
src/main/java/com/harium/keel/catalano/math/function/Gabor.java
Gabor.Function1D
public static double Function1D(double x, double mean, double amplitude, double position, double width, double phase, double frequency) { """ 1-D Gabor function. @param x Value. @param mean Mean. @param amplitude Amplitude. @param position Position. @param width Width. @param phase Ph...
java
public static double Function1D(double x, double mean, double amplitude, double position, double width, double phase, double frequency) { double envelope = mean + amplitude * Math.exp(-Math.pow((x - position), 2) / Math.pow((2 * width), 2)); double carry = Math.cos(2 * Math.PI * frequency * (x - positio...
[ "public", "static", "double", "Function1D", "(", "double", "x", ",", "double", "mean", ",", "double", "amplitude", ",", "double", "position", ",", "double", "width", ",", "double", "phase", ",", "double", "frequency", ")", "{", "double", "envelope", "=", "...
1-D Gabor function. @param x Value. @param mean Mean. @param amplitude Amplitude. @param position Position. @param width Width. @param phase Phase. @param frequency Frequency. @return Gabor response.
[ "1", "-", "D", "Gabor", "function", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/function/Gabor.java#L78-L82
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/HerokuAPI.java
HerokuAPI.renameApp
public String renameApp(String appName, String newName) { """ Rename an existing app. @param appName Existing app name. See {@link #listApps()} for names that can be used. @param newName New name to give the existing app. @return the new name of the object """ return connection.execute(new AppRename...
java
public String renameApp(String appName, String newName) { return connection.execute(new AppRename(appName, newName), apiKey).getName(); }
[ "public", "String", "renameApp", "(", "String", "appName", ",", "String", "newName", ")", "{", "return", "connection", ".", "execute", "(", "new", "AppRename", "(", "appName", ",", "newName", ")", ",", "apiKey", ")", ".", "getName", "(", ")", ";", "}" ]
Rename an existing app. @param appName Existing app name. See {@link #listApps()} for names that can be used. @param newName New name to give the existing app. @return the new name of the object
[ "Rename", "an", "existing", "app", "." ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/HerokuAPI.java#L196-L198
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.listUsageMetricsNextWithServiceResponseAsync
public Observable<ServiceResponseWithHeaders<Page<PoolUsageMetrics>, PoolListUsageMetricsHeaders>> listUsageMetricsNextWithServiceResponseAsync(final String nextPageLink, final PoolListUsageMetricsNextOptions poolListUsageMetricsNextOptions) { """ Lists the usage metrics, aggregated by pool across individual time ...
java
public Observable<ServiceResponseWithHeaders<Page<PoolUsageMetrics>, PoolListUsageMetricsHeaders>> listUsageMetricsNextWithServiceResponseAsync(final String nextPageLink, final PoolListUsageMetricsNextOptions poolListUsageMetricsNextOptions) { return listUsageMetricsNextSinglePageAsync(nextPageLink, poolListUsa...
[ "public", "Observable", "<", "ServiceResponseWithHeaders", "<", "Page", "<", "PoolUsageMetrics", ">", ",", "PoolListUsageMetricsHeaders", ">", ">", "listUsageMetricsNextWithServiceResponseAsync", "(", "final", "String", "nextPageLink", ",", "final", "PoolListUsageMetricsNextO...
Lists the usage metrics, aggregated by pool across individual time intervals, for the specified account. If you do not specify a $filter clause including a poolId, the response includes all pools that existed in the account in the time range of the returned aggregation intervals. If you do not specify a $filter clause ...
[ "Lists", "the", "usage", "metrics", "aggregated", "by", "pool", "across", "individual", "time", "intervals", "for", "the", "specified", "account", ".", "If", "you", "do", "not", "specify", "a", "$filter", "clause", "including", "a", "poolId", "the", "response"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L3828-L3840
quattor/pan
panc/src/main/java/org/quattor/pan/Compiler.java
Compiler.run
public static CompilerResults run(CompilerOptions options, List<String> objectNames, Collection<File> tplFiles) { """ This is a convenience method which creates a compiler and then invokes the <code>process</code> method. @param options compiler options to use for the created compiler @param objectNames ob...
java
public static CompilerResults run(CompilerOptions options, List<String> objectNames, Collection<File> tplFiles) { return (new Compiler(options, objectNames, tplFiles)).process(); }
[ "public", "static", "CompilerResults", "run", "(", "CompilerOptions", "options", ",", "List", "<", "String", ">", "objectNames", ",", "Collection", "<", "File", ">", "tplFiles", ")", "{", "return", "(", "new", "Compiler", "(", "options", ",", "objectNames", ...
This is a convenience method which creates a compiler and then invokes the <code>process</code> method. @param options compiler options to use for the created compiler @param objectNames object template names to compile/build; these will be looked-up on the load path @param tplFiles absolute file names of templ...
[ "This", "is", "a", "convenience", "method", "which", "creates", "a", "compiler", "and", "then", "invokes", "the", "<code", ">", "process<", "/", "code", ">", "method", "." ]
train
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/pan/Compiler.java#L201-L203
spring-cloud/spring-cloud-sleuth
spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SleuthAnnotationUtils.java
SleuthAnnotationUtils.findAnnotation
static <T extends Annotation> T findAnnotation(Method method, Class<T> clazz) { """ Searches for an annotation either on a method or inside the method parameters. @param <T> - annotation @param clazz - class with annotation @param method - annotated method @return annotation """ T annotation = Annotation...
java
static <T extends Annotation> T findAnnotation(Method method, Class<T> clazz) { T annotation = AnnotationUtils.findAnnotation(method, clazz); if (annotation == null) { try { annotation = AnnotationUtils.findAnnotation(method.getDeclaringClass() .getMethod(method.getName(), method.getParameterTypes()), ...
[ "static", "<", "T", "extends", "Annotation", ">", "T", "findAnnotation", "(", "Method", "method", ",", "Class", "<", "T", ">", "clazz", ")", "{", "T", "annotation", "=", "AnnotationUtils", ".", "findAnnotation", "(", "method", ",", "clazz", ")", ";", "if...
Searches for an annotation either on a method or inside the method parameters. @param <T> - annotation @param clazz - class with annotation @param method - annotated method @return annotation
[ "Searches", "for", "an", "annotation", "either", "on", "a", "method", "or", "inside", "the", "method", "parameters", "." ]
train
https://github.com/spring-cloud/spring-cloud-sleuth/blob/f29c05fb8fba33e23aa21bb13aeb13ab8d27b485/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SleuthAnnotationUtils.java#L77-L92
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java
ConcurrentConveyor.drainTo
public final int drainTo(int queueIndex, Collection<? super E> drain, int limit) { """ Drains no more than {@code limit} items from the queue at the supplied index into the supplied collection. @return the number of items drained """ return drain(queues[queueIndex], drain, limit); }
java
public final int drainTo(int queueIndex, Collection<? super E> drain, int limit) { return drain(queues[queueIndex], drain, limit); }
[ "public", "final", "int", "drainTo", "(", "int", "queueIndex", ",", "Collection", "<", "?", "super", "E", ">", "drain", ",", "int", "limit", ")", "{", "return", "drain", "(", "queues", "[", "queueIndex", "]", ",", "drain", ",", "limit", ")", ";", "}"...
Drains no more than {@code limit} items from the queue at the supplied index into the supplied collection. @return the number of items drained
[ "Drains", "no", "more", "than", "{", "@code", "limit", "}", "items", "from", "the", "queue", "at", "the", "supplied", "index", "into", "the", "supplied", "collection", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java#L318-L320
spotify/apollo
examples/spotify-api-example/src/main/java/com/spotify/apollo/example/AlbumResource.java
AlbumResource.parseAlbumData
private ArrayList<Album> parseAlbumData(String json) { """ Parses an album response from a <a href="https://developer.spotify.com/web-api/album-endpoints/">Spotify API album query</a>. @param json The json response @return A list of albums with artist information """ ArrayList<Album> albums = new Arra...
java
private ArrayList<Album> parseAlbumData(String json) { ArrayList<Album> albums = new ArrayList<>(); try { JsonNode jsonNode = this.objectMapper.readTree(json); for (JsonNode albumNode : jsonNode.get("albums")) { JsonNode artistsNode = albumNode.get("artists"); // Exclude albums with ...
[ "private", "ArrayList", "<", "Album", ">", "parseAlbumData", "(", "String", "json", ")", "{", "ArrayList", "<", "Album", ">", "albums", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "JsonNode", "jsonNode", "=", "this", ".", "objectMapper", "....
Parses an album response from a <a href="https://developer.spotify.com/web-api/album-endpoints/">Spotify API album query</a>. @param json The json response @return A list of albums with artist information
[ "Parses", "an", "album", "response", "from", "a", "<a", "href", "=", "https", ":", "//", "developer", ".", "spotify", ".", "com", "/", "web", "-", "api", "/", "album", "-", "endpoints", "/", ">", "Spotify", "API", "album", "query<", "/", "a", ">", ...
train
https://github.com/spotify/apollo/blob/3aba09840538a2aff9cdac5be42cc114dd276c70/examples/spotify-api-example/src/main/java/com/spotify/apollo/example/AlbumResource.java#L74-L92
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.handleException
private static ReflectionException handleException(String methodName, NoSuchMethodException e) { """ Handle {@link NoSuchMethodException} by logging it and rethrown it as a {@link ReflectionException} @param methodName method name @param e exception @return wrapped exception """ LOGGER.er...
java
private static ReflectionException handleException(String methodName, NoSuchMethodException e) { LOGGER.error("Couldn't find method " + methodName, e); return new ReflectionException(e); }
[ "private", "static", "ReflectionException", "handleException", "(", "String", "methodName", ",", "NoSuchMethodException", "e", ")", "{", "LOGGER", ".", "error", "(", "\"Couldn't find method \"", "+", "methodName", ",", "e", ")", ";", "return", "new", "ReflectionExce...
Handle {@link NoSuchMethodException} by logging it and rethrown it as a {@link ReflectionException} @param methodName method name @param e exception @return wrapped exception
[ "Handle", "{", "@link", "NoSuchMethodException", "}", "by", "logging", "it", "and", "rethrown", "it", "as", "a", "{", "@link", "ReflectionException", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L172-L175
rometools/rome
rome-opml/src/main/java/com/rometools/opml/feed/synd/impl/ConverterForOPML10.java
ConverterForOPML10.copyInto
@Override public void copyInto(final WireFeed feed, final SyndFeed syndFeed) { """ Makes a deep copy/conversion of the values of a real feed into a SyndFeedImpl. <p> It assumes the given SyndFeedImpl has no properties set. <p> @param feed real feed to copy/convert. @param syndFeed the SyndFeedImpl that ...
java
@Override public void copyInto(final WireFeed feed, final SyndFeed syndFeed) { final Opml opml = (Opml) feed; syndFeed.setTitle(opml.getTitle()); addOwner(opml, syndFeed); syndFeed.setPublishedDate(opml.getModified() != null ? opml.getModified() : opml.getCreated()); syndFeed...
[ "@", "Override", "public", "void", "copyInto", "(", "final", "WireFeed", "feed", ",", "final", "SyndFeed", "syndFeed", ")", "{", "final", "Opml", "opml", "=", "(", "Opml", ")", "feed", ";", "syndFeed", ".", "setTitle", "(", "opml", ".", "getTitle", "(", ...
Makes a deep copy/conversion of the values of a real feed into a SyndFeedImpl. <p> It assumes the given SyndFeedImpl has no properties set. <p> @param feed real feed to copy/convert. @param syndFeed the SyndFeedImpl that will contain the copied/converted values of the real feed.
[ "Makes", "a", "deep", "copy", "/", "conversion", "of", "the", "values", "of", "a", "real", "feed", "into", "a", "SyndFeedImpl", ".", "<p", ">", "It", "assumes", "the", "given", "SyndFeedImpl", "has", "no", "properties", "set", ".", "<p", ">" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-opml/src/main/java/com/rometools/opml/feed/synd/impl/ConverterForOPML10.java#L73-L84
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Mail.java
Mail.setType
public void setType(String type) throws ApplicationException { """ set the value type Specifies extended type attributes for the message. @param type value to set @throws ApplicationException """ type = type.toLowerCase().trim(); if (type.equals("text/plain") || type.equals("plain") || type.equals("text"...
java
public void setType(String type) throws ApplicationException { type = type.toLowerCase().trim(); if (type.equals("text/plain") || type.equals("plain") || type.equals("text")) getPart().isHTML(false); // mail.setType(lucee.runtime.mail.Mail.TYPE_TEXT); else if (type.equals("text/html") || type.equals("html") || type...
[ "public", "void", "setType", "(", "String", "type", ")", "throws", "ApplicationException", "{", "type", "=", "type", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "type", ".", "equals", "(", "\"text/plain\"", ")", "||", "type", "...
set the value type Specifies extended type attributes for the message. @param type value to set @throws ApplicationException
[ "set", "the", "value", "type", "Specifies", "extended", "type", "attributes", "for", "the", "message", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Mail.java#L279-L286
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/decompose/qr/QRDecompositionHouseholderTran_ZDRM.java
QRDecompositionHouseholderTran_ZDRM.getR
@Override public ZMatrixRMaj getR(ZMatrixRMaj R, boolean compact) { """ Returns an upper triangular matrix which is the R in the QR decomposition. @param R An upper triangular matrix. @param compact """ if( compact ) R = UtilDecompositons_ZDRM.checkZerosLT(R,minLength,numCols); ...
java
@Override public ZMatrixRMaj getR(ZMatrixRMaj R, boolean compact) { if( compact ) R = UtilDecompositons_ZDRM.checkZerosLT(R,minLength,numCols); else R = UtilDecompositons_ZDRM.checkZerosLT(R,numRows,numCols); for( int i = 0; i < R.numRows; i++ ) { for( in...
[ "@", "Override", "public", "ZMatrixRMaj", "getR", "(", "ZMatrixRMaj", "R", ",", "boolean", "compact", ")", "{", "if", "(", "compact", ")", "R", "=", "UtilDecompositons_ZDRM", ".", "checkZerosLT", "(", "R", ",", "minLength", ",", "numCols", ")", ";", "else"...
Returns an upper triangular matrix which is the R in the QR decomposition. @param R An upper triangular matrix. @param compact
[ "Returns", "an", "upper", "triangular", "matrix", "which", "is", "the", "R", "in", "the", "QR", "decomposition", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/decompose/qr/QRDecompositionHouseholderTran_ZDRM.java#L177-L192
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.encodeListNullToBlank
public void encodeListNullToBlank(Writer writer, List<? extends T> list) throws IOException { """ Encodes the given {@link List} of values into the JSON format, and writes it using the given writer.<br> Writes "[]" if null is given. @param writer {@link Writer} to be used for writing value @param list {@link ...
java
public void encodeListNullToBlank(Writer writer, List<? extends T> list) throws IOException { if (list == null) { writer.write("[]"); writer.flush(); return; } encodeListNullToNull(writer, list); }
[ "public", "void", "encodeListNullToBlank", "(", "Writer", "writer", ",", "List", "<", "?", "extends", "T", ">", "list", ")", "throws", "IOException", "{", "if", "(", "list", "==", "null", ")", "{", "writer", ".", "write", "(", "\"[]\"", ")", ";", "writ...
Encodes the given {@link List} of values into the JSON format, and writes it using the given writer.<br> Writes "[]" if null is given. @param writer {@link Writer} to be used for writing value @param list {@link List} of values to be encoded @throws IOException
[ "Encodes", "the", "given", "{", "@link", "List", "}", "of", "values", "into", "the", "JSON", "format", "and", "writes", "it", "using", "the", "given", "writer", ".", "<br", ">", "Writes", "[]", "if", "null", "is", "given", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L337-L345
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.getObject
public BosObject getObject(String bucketName, String key) { """ Gets the object stored in Bos under the specified bucket and key. @param bucketName The name of the bucket containing the desired object. @param key The key under which the desired object is stored. @return The object stored in Bos in the specifi...
java
public BosObject getObject(String bucketName, String key) { return this.getObject(new GetObjectRequest(bucketName, key)); }
[ "public", "BosObject", "getObject", "(", "String", "bucketName", ",", "String", "key", ")", "{", "return", "this", ".", "getObject", "(", "new", "GetObjectRequest", "(", "bucketName", ",", "key", ")", ")", ";", "}" ]
Gets the object stored in Bos under the specified bucket and key. @param bucketName The name of the bucket containing the desired object. @param key The key under which the desired object is stored. @return The object stored in Bos in the specified bucket and key.
[ "Gets", "the", "object", "stored", "in", "Bos", "under", "the", "specified", "bucket", "and", "key", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L643-L645
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/international/pennchinese/CTBTreeReaderFactory.java
CTBTreeReaderFactory.newTreeReader
public TreeReader newTreeReader(Reader in) { """ Create a new <code>TreeReader</code> using the provided <code>Reader</code>. @param in The <code>Reader</code> to build on @return The new TreeReader """ if (discardFrags) { return new FragDiscardingPennTreeReader(in, new LabeledScoredTreeFactor...
java
public TreeReader newTreeReader(Reader in) { if (discardFrags) { return new FragDiscardingPennTreeReader(in, new LabeledScoredTreeFactory(), tn, new CHTBTokenizer(in)); } else { return new PennTreeReader(in, new LabeledScoredTreeFactory(), tn, new CHTBTokenizer(in)); } }
[ "public", "TreeReader", "newTreeReader", "(", "Reader", "in", ")", "{", "if", "(", "discardFrags", ")", "{", "return", "new", "FragDiscardingPennTreeReader", "(", "in", ",", "new", "LabeledScoredTreeFactory", "(", ")", ",", "tn", ",", "new", "CHTBTokenizer", "...
Create a new <code>TreeReader</code> using the provided <code>Reader</code>. @param in The <code>Reader</code> to build on @return The new TreeReader
[ "Create", "a", "new", "<code", ">", "TreeReader<", "/", "code", ">", "using", "the", "provided", "<code", ">", "Reader<", "/", "code", ">", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/international/pennchinese/CTBTreeReaderFactory.java#L39-L45
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java
AtomContainerDiscretePartitionRefinerImpl.getAutomorphismGroup
public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) { """ Get the automorphism group of the molecule given an initial partition. @param atomContainer the atom container to use @param initialPartition an initial partition of the atoms @return the automorphism ...
java
public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) { setup(atomContainer); super.refine(initialPartition); return super.getAutomorphismGroup(); }
[ "public", "PermutationGroup", "getAutomorphismGroup", "(", "IAtomContainer", "atomContainer", ",", "Partition", "initialPartition", ")", "{", "setup", "(", "atomContainer", ")", ";", "super", ".", "refine", "(", "initialPartition", ")", ";", "return", "super", ".", ...
Get the automorphism group of the molecule given an initial partition. @param atomContainer the atom container to use @param initialPartition an initial partition of the atoms @return the automorphism group starting with this partition
[ "Get", "the", "automorphism", "group", "of", "the", "molecule", "given", "an", "initial", "partition", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java#L115-L119
banq/jdonframework
JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java
PageIteratorSolver.getPageIterator
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, String queryParam, int start, int count) { """ same as getDatas the parameters sort is different from the getDatas method @param sqlqueryAllCount the sql sentence for "select count(1) .." @param sqlquery the sql sentence for "sele...
java
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, String queryParam, int start, int count) { if (UtilValidate.isEmpty(sqlqueryAllCount)) { Debug.logError(" the parameter sqlqueryAllCount is null", module); return new PageIterator(); } if (UtilValidate.isEmpty(sqlquery)) { ...
[ "public", "PageIterator", "getPageIterator", "(", "String", "sqlqueryAllCount", ",", "String", "sqlquery", ",", "String", "queryParam", ",", "int", "start", ",", "int", "count", ")", "{", "if", "(", "UtilValidate", ".", "isEmpty", "(", "sqlqueryAllCount", ")", ...
same as getDatas the parameters sort is different from the getDatas method @param sqlqueryAllCount the sql sentence for "select count(1) .." @param sqlquery the sql sentence for "select id from xxxx"; @param queryParam the parameter of String type for the sqlquery. @param start the starting number of a page in allCoun...
[ "same", "as", "getDatas", "the", "parameters", "sort", "is", "different", "from", "the", "getDatas", "method" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L201-L211
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java
WsAddressingHeaders.setFaultTo
public void setFaultTo(String faultTo) { """ Sets the fault to endpoint reference by string. @param faultTo the faultTo to set """ try { this.faultTo = new EndpointReference(new URI(faultTo)); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid fa...
java
public void setFaultTo(String faultTo) { try { this.faultTo = new EndpointReference(new URI(faultTo)); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid faultTo uri", e); } }
[ "public", "void", "setFaultTo", "(", "String", "faultTo", ")", "{", "try", "{", "this", ".", "faultTo", "=", "new", "EndpointReference", "(", "new", "URI", "(", "faultTo", ")", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", ...
Sets the fault to endpoint reference by string. @param faultTo the faultTo to set
[ "Sets", "the", "fault", "to", "endpoint", "reference", "by", "string", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java#L230-L236
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java
SymSpell.loadDictionary
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex) { """ / <returns>True if file loaded, or false if file not found.</returns> """ if (corpus == null) { return false; } BufferedReader br = new BufferedReader(new InputStreamReader(corpus, StandardCharsets.UTF_8));...
java
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex) { if (corpus == null) { return false; } BufferedReader br = new BufferedReader(new InputStreamReader(corpus, StandardCharsets.UTF_8)); return loadDictionary(br, termIndex, countIndex); }
[ "public", "boolean", "loadDictionary", "(", "InputStream", "corpus", ",", "int", "termIndex", ",", "int", "countIndex", ")", "{", "if", "(", "corpus", "==", "null", ")", "{", "return", "false", ";", "}", "BufferedReader", "br", "=", "new", "BufferedReader", ...
/ <returns>True if file loaded, or false if file not found.</returns>
[ "/", "<returns", ">", "True", "if", "file", "loaded", "or", "false", "if", "file", "not", "found", ".", "<", "/", "returns", ">" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java#L210-L216
graphql-java/graphql-java
src/main/java/graphql/execution/ExecutionStrategy.java
ExecutionStrategy.completeValueForScalar
protected CompletableFuture<ExecutionResult> completeValueForScalar(ExecutionContext executionContext, ExecutionStrategyParameters parameters, GraphQLScalarType scalarType, Object result) { """ Called to turn an object into a scalar value according to the {@link GraphQLScalarType} by asking that scalar type to coe...
java
protected CompletableFuture<ExecutionResult> completeValueForScalar(ExecutionContext executionContext, ExecutionStrategyParameters parameters, GraphQLScalarType scalarType, Object result) { Object serialized; try { serialized = scalarType.getCoercing().serialize(result); } catch (Coe...
[ "protected", "CompletableFuture", "<", "ExecutionResult", ">", "completeValueForScalar", "(", "ExecutionContext", "executionContext", ",", "ExecutionStrategyParameters", "parameters", ",", "GraphQLScalarType", "scalarType", ",", "Object", "result", ")", "{", "Object", "seri...
Called to turn an object into a scalar value according to the {@link GraphQLScalarType} by asking that scalar type to coerce the object into a valid value @param executionContext contains the top level execution parameters @param parameters contains the parameters holding the fields to be executed and source obj...
[ "Called", "to", "turn", "an", "object", "into", "a", "scalar", "value", "according", "to", "the", "{", "@link", "GraphQLScalarType", "}", "by", "asking", "that", "scalar", "type", "to", "coerce", "the", "object", "into", "a", "valid", "value" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/ExecutionStrategy.java#L558-L577
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CertificatesInner.java
CertificatesInner.createOrUpdateAsync
public Observable<CertificateInner> createOrUpdateAsync(String resourceGroupName, String automationAccountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { """ Create a certificate. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of ...
java
public Observable<CertificateInner> createOrUpdateAsync(String resourceGroupName, String automationAccountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, certificateName, parameters).map(new F...
[ "public", "Observable", "<", "CertificateInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "certificateName", ",", "CertificateCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOr...
Create a certificate. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param certificateName The parameters supplied to the create or update certificate operation. @param parameters The parameters supplied to the create or update certificate op...
[ "Create", "a", "certificate", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CertificatesInner.java#L315-L322
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java
StandardDirectoryAgentServer.handleTCPSrvRqst
protected void handleTCPSrvRqst(SrvRqst srvRqst, Socket socket) { """ Handles a unicast TCP SrvRqst message arrived to this directory agent. <br /> This directory agent will reply with a list of matching services. @param srvRqst the SrvRqst message to handle @param socket the socket connected to th client w...
java
protected void handleTCPSrvRqst(SrvRqst srvRqst, Socket socket) { // Match scopes, RFC 2608, 11.1 if (!scopes.weakMatch(srvRqst.getScopes())) { tcpSrvRply.perform(socket, srvRqst, SLPError.SCOPE_NOT_SUPPORTED); return; } ServiceType serviceType = srvR...
[ "protected", "void", "handleTCPSrvRqst", "(", "SrvRqst", "srvRqst", ",", "Socket", "socket", ")", "{", "// Match scopes, RFC 2608, 11.1", "if", "(", "!", "scopes", ".", "weakMatch", "(", "srvRqst", ".", "getScopes", "(", ")", ")", ")", "{", "tcpSrvRply", ".", ...
Handles a unicast TCP SrvRqst message arrived to this directory agent. <br /> This directory agent will reply with a list of matching services. @param srvRqst the SrvRqst message to handle @param socket the socket connected to th client where to write the reply @see #handleUDPSrvRqst(SrvRqst, InetSocketAddress, InetS...
[ "Handles", "a", "unicast", "TCP", "SrvRqst", "message", "arrived", "to", "this", "directory", "agent", ".", "<br", "/", ">", "This", "directory", "agent", "will", "reply", "with", "a", "list", "of", "matching", "services", "." ]
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java#L483-L497
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/jaxb/loader/RuleDefinitionFileConstant.java
RuleDefinitionFileConstant.getExtractorRuleDefinitionFileName
public static String getExtractorRuleDefinitionFileName(final String rootDir, final DatabaseType databaseType) { """ Get extractor rule definition file name. @param rootDir root dir @param databaseType database type @return extractor rule definition file name """ return Joiner.on('/').join(rootDir...
java
public static String getExtractorRuleDefinitionFileName(final String rootDir, final DatabaseType databaseType) { return Joiner.on('/').join(rootDir, databaseType.name().toLowerCase(), EXTRACTOR_RULE_DEFINITION_FILE_NAME); }
[ "public", "static", "String", "getExtractorRuleDefinitionFileName", "(", "final", "String", "rootDir", ",", "final", "DatabaseType", "databaseType", ")", "{", "return", "Joiner", ".", "on", "(", "'", "'", ")", ".", "join", "(", "rootDir", ",", "databaseType", ...
Get extractor rule definition file name. @param rootDir root dir @param databaseType database type @return extractor rule definition file name
[ "Get", "extractor", "rule", "definition", "file", "name", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/jaxb/loader/RuleDefinitionFileConstant.java#L65-L67
structr/structr
structr-core/src/main/java/org/structr/common/ValidationHelper.java
ValidationHelper.isValidStringMinLength
public static boolean isValidStringMinLength(final GraphObject node, final PropertyKey<String> key, final int minLength, final ErrorBuffer errorBuffer) { """ Checks whether the value for the given property key of the given node has at least the given length. @param node the node @param key the property key wh...
java
public static boolean isValidStringMinLength(final GraphObject node, final PropertyKey<String> key, final int minLength, final ErrorBuffer errorBuffer) { String value = node.getProperty(key); String type = node.getType(); if (StringUtils.isNotBlank(value)) { if (value.length() >= minLength) { return t...
[ "public", "static", "boolean", "isValidStringMinLength", "(", "final", "GraphObject", "node", ",", "final", "PropertyKey", "<", "String", ">", "key", ",", "final", "int", "minLength", ",", "final", "ErrorBuffer", "errorBuffer", ")", "{", "String", "value", "=", ...
Checks whether the value for the given property key of the given node has at least the given length. @param node the node @param key the property key whose value should be checked @param minLength the min length @param errorBuffer the error buffer @return true if the condition is valid
[ "Checks", "whether", "the", "value", "for", "the", "given", "property", "key", "of", "the", "given", "node", "has", "at", "least", "the", "given", "length", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/common/ValidationHelper.java#L70-L90
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getGuildMemberInfo
public void getGuildMemberInfo(String id, String api, Callback<List<GuildMember>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on guild member API go <a href="https://wiki.guildwars2.com/wiki/API:2/guild/:id/members">here</a><br/> Give user the access to {@link Callback#onRespons...
java
public void getGuildMemberInfo(String id, String api, Callback<List<GuildMember>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.GUILD, id), new ParamChecker(ParamType.API, api)); gw2API.getGuildMemberInfo(id, api).enqueue(callback); }
[ "public", "void", "getGuildMemberInfo", "(", "String", "id", ",", "String", "api", ",", "Callback", "<", "List", "<", "GuildMember", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamC...
For more info on guild member API go <a href="https://wiki.guildwars2.com/wiki/API:2/guild/:id/members">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions<br/> @param id guild id @param api Guild l...
[ "For", "more", "info", "on", "guild", "member", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "guild", "/", ":", "id", "/", "members", ">", "here<", "/", "a", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1501-L1504
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java
DefaultOptionParser.isShortOption
private boolean isShortOption(String token) { """ Tells if the token looks like a short option. @param token the command line token to handle @return true if the token like a short option """ // short options (-S, -SV, -S=V, -SV1=V2, -S1S2) if (!token.startsWith("-") || token.length() == 1)...
java
private boolean isShortOption(String token) { // short options (-S, -SV, -S=V, -SV1=V2, -S1S2) if (!token.startsWith("-") || token.length() == 1) { return false; } // remove leading "-" and "=value" int pos = token.indexOf("="); String name = (pos == -1 ? toke...
[ "private", "boolean", "isShortOption", "(", "String", "token", ")", "{", "// short options (-S, -SV, -S=V, -SV1=V2, -S1S2)", "if", "(", "!", "token", ".", "startsWith", "(", "\"-\"", ")", "||", "token", ".", "length", "(", ")", "==", "1", ")", "{", "return", ...
Tells if the token looks like a short option. @param token the command line token to handle @return true if the token like a short option
[ "Tells", "if", "the", "token", "looks", "like", "a", "short", "option", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java#L493-L506
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java
ResourceHealthMetadatasInner.getBySiteSlot
public ResourceHealthMetadataInner getBySiteSlot(String resourceGroupName, String name, String slot) { """ Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource group to which t...
java
public ResourceHealthMetadataInner getBySiteSlot(String resourceGroupName, String name, String slot) { return getBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); }
[ "public", "ResourceHealthMetadataInner", "getBySiteSlot", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "slot", ")", "{", "return", "getBySiteSlotWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "slot", ")", ".", "toBl...
Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of web app @param slot Name of web app slot. If not specified then will defau...
[ "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", ".", "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java#L701-L703
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/connmgmt/ConnectionHandle.java
ConnectionHandle.getConnectionHandle
public static ConnectionHandle getConnectionHandle(VirtualConnection vc) { """ Get ConnectionHandle stored in VirtualConnection state map (if one isn't there already, assign one). @param vc @return ConnectionHandle """ if (vc == null) { return null; } ConnectionHandle ...
java
public static ConnectionHandle getConnectionHandle(VirtualConnection vc) { if (vc == null) { return null; } ConnectionHandle connHandle = (ConnectionHandle) vc.getStateMap().get(CONNECTION_HANDLE_VC_KEY); // We can be here for two reasons: // a) We have one, just ne...
[ "public", "static", "ConnectionHandle", "getConnectionHandle", "(", "VirtualConnection", "vc", ")", "{", "if", "(", "vc", "==", "null", ")", "{", "return", "null", ";", "}", "ConnectionHandle", "connHandle", "=", "(", "ConnectionHandle", ")", "vc", ".", "getSt...
Get ConnectionHandle stored in VirtualConnection state map (if one isn't there already, assign one). @param vc @return ConnectionHandle
[ "Get", "ConnectionHandle", "stored", "in", "VirtualConnection", "state", "map", "(", "if", "one", "isn", "t", "there", "already", "assign", "one", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/connmgmt/ConnectionHandle.java#L68-L97
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
ZooKeeperUtils.createCheckpointIDCounter
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter( CuratorFramework client, Configuration configuration, JobID jobId) { """ Creates a {@link ZooKeeperCheckpointIDCounter} instance. @param client The {@link CuratorFramework} ZooKeeper client to use @param configuration {@link ...
java
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter( CuratorFramework client, Configuration configuration, JobID jobId) { String checkpointIdCounterPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH); checkpointIdCounterPath += ZooKeeperSubmi...
[ "public", "static", "ZooKeeperCheckpointIDCounter", "createCheckpointIDCounter", "(", "CuratorFramework", "client", ",", "Configuration", "configuration", ",", "JobID", "jobId", ")", "{", "String", "checkpointIdCounterPath", "=", "configuration", ".", "getString", "(", "H...
Creates a {@link ZooKeeperCheckpointIDCounter} instance. @param client The {@link CuratorFramework} ZooKeeper client to use @param configuration {@link Configuration} object @param jobId ID of job to create the instance for @return {@link ZooKeeperCheckpointIDCounter} instance
[ "Creates", "a", "{", "@link", "ZooKeeperCheckpointIDCounter", "}", "instance", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L331-L342
lets-blade/blade
src/main/java/com/blade/kit/PatternKit.java
PatternKit.isImage
public static boolean isImage(String suffix) { """ Verify that the suffix is a picture format. @param suffix filename suffix @return verify that success returns true, and the failure returns false. """ if (null != suffix && !"".equals(suffix) && suffix.contains(".")) { String regex = "(...
java
public static boolean isImage(String suffix) { if (null != suffix && !"".equals(suffix) && suffix.contains(".")) { String regex = "(.*?)(?i)(jpg|jpeg|png|gif|bmp|webp)"; return isMatch(regex, suffix); } return false; }
[ "public", "static", "boolean", "isImage", "(", "String", "suffix", ")", "{", "if", "(", "null", "!=", "suffix", "&&", "!", "\"\"", ".", "equals", "(", "suffix", ")", "&&", "suffix", ".", "contains", "(", "\".\"", ")", ")", "{", "String", "regex", "="...
Verify that the suffix is a picture format. @param suffix filename suffix @return verify that success returns true, and the failure returns false.
[ "Verify", "that", "the", "suffix", "is", "a", "picture", "format", "." ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/PatternKit.java#L61-L67
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java
ScriptUtils.containsSqlScriptDelimiters
public static boolean containsSqlScriptDelimiters(String script, String delim) { """ Does the provided SQL script contain the specified delimiter? @param script the SQL script @param delim String delimiting each statement - typically a ';' character """ boolean inLiteral = false; char[] co...
java
public static boolean containsSqlScriptDelimiters(String script, String delim) { boolean inLiteral = false; char[] content = script.toCharArray(); for (int i = 0; i < script.length(); i++) { if (content[i] == '\'') { inLiteral = !inLiteral; } i...
[ "public", "static", "boolean", "containsSqlScriptDelimiters", "(", "String", "script", ",", "String", "delim", ")", "{", "boolean", "inLiteral", "=", "false", ";", "char", "[", "]", "content", "=", "script", ".", "toCharArray", "(", ")", ";", "for", "(", "...
Does the provided SQL script contain the specified delimiter? @param script the SQL script @param delim String delimiting each statement - typically a ';' character
[ "Does", "the", "provided", "SQL", "script", "contain", "the", "specified", "delimiter?" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java#L335-L347
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java
AStar.addToPath
protected boolean addToPath(GP path, ST segment) { """ Add the given segment into the given path. <p>By default this function invokes the path factory passed as parameter of the constructor. @param path is the path to build. @param segment is the segment to add. @return <code>true</code> if the segment wa...
java
protected boolean addToPath(GP path, ST segment) { if (this.pathFactory != null) { return this.pathFactory.addToPath(path, segment); } assert path != null; assert segment != null; try { return path.add(segment); } catch (Throwable e) { throw new IllegalStateException(e); } }
[ "protected", "boolean", "addToPath", "(", "GP", "path", ",", "ST", "segment", ")", "{", "if", "(", "this", ".", "pathFactory", "!=", "null", ")", "{", "return", "this", ".", "pathFactory", ".", "addToPath", "(", "path", ",", "segment", ")", ";", "}", ...
Add the given segment into the given path. <p>By default this function invokes the path factory passed as parameter of the constructor. @param path is the path to build. @param segment is the segment to add. @return <code>true</code> if the segment was added; otherwise <code>false</code>.
[ "Add", "the", "given", "segment", "into", "the", "given", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L391-L402
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/jumbotron/JumbotronRenderer.java
JumbotronRenderer.encodeEnd
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:jumbotron. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the H...
java
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } Jumbotron jumbotron = (Jumbotron) component; ResponseWriter rw = context.getResponseWriter(); endDisabledFieldset(jumbotron, rw); rw.endElement("div"); ...
[ "@", "Override", "public", "void", "encodeEnd", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "Jumbotron", "jumbotro...
This methods generates the HTML code of the current b:jumbotron. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component th...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "jumbotron", ".", "<code", ">", "encodeBegin<", "/", "code", ">", "generates", "the", "start", "of", "the", "component", ".", "After", "the", "the", "JSF", "framework"...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/jumbotron/JumbotronRenderer.java#L81-L91
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/style/sld/RequestUtils.java
RequestUtils.getBufferedXMLReader
public static BufferedReader getBufferedXMLReader(Reader reader, int xmlLookahead) throws IOException { """ Wraps an xml reader in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing. @param reade...
java
public static BufferedReader getBufferedXMLReader(Reader reader, int xmlLookahead) throws IOException { // ensure the reader is a buffered reader if (!(reader instanceof BufferedReader)) { reader = new BufferedReader(reader); } // mark the input stream r...
[ "public", "static", "BufferedReader", "getBufferedXMLReader", "(", "Reader", "reader", ",", "int", "xmlLookahead", ")", "throws", "IOException", "{", "// ensure the reader is a buffered reader", "if", "(", "!", "(", "reader", "instanceof", "BufferedReader", ")", ")", ...
Wraps an xml reader in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing. @param reader The original xml reader. @param xmlLookahead The number of bytes to support for parse. If more than this number of bytes are p...
[ "Wraps", "an", "xml", "reader", "in", "a", "buffered", "reader", "specifying", "a", "lookahead", "that", "can", "be", "used", "to", "preparse", "some", "of", "the", "xml", "document", "resetting", "it", "back", "to", "its", "original", "state", "for", "act...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/style/sld/RequestUtils.java#L243-L255
Netflix/ndbench
ndbench-dyno-plugins/src/main/java/com/netflix/ndbench/plugin/dyno/DynoJedisUtils.java
DynoJedisUtils.nonpipelineWrite
public String nonpipelineWrite(String key, DataGenerator dataGenerator) { """ a simple write without a pipeline @param key @return the result of write (i.e. "OK" if it was successful """ String value = key + "__" + dataGenerator.getRandomValue() + "__" + key; String result = this.jedisClien...
java
public String nonpipelineWrite(String key, DataGenerator dataGenerator) { String value = key + "__" + dataGenerator.getRandomValue() + "__" + key; String result = this.jedisClient.get().set(key, value); if (!"OK".equals(result)) { logger.error("SET_ERROR: GOT " + result + " for SET ...
[ "public", "String", "nonpipelineWrite", "(", "String", "key", ",", "DataGenerator", "dataGenerator", ")", "{", "String", "value", "=", "key", "+", "\"__\"", "+", "dataGenerator", ".", "getRandomValue", "(", ")", "+", "\"__\"", "+", "key", ";", "String", "res...
a simple write without a pipeline @param key @return the result of write (i.e. "OK" if it was successful
[ "a", "simple", "write", "without", "a", "pipeline" ]
train
https://github.com/Netflix/ndbench/blob/8d664244b5f9d01395248a296b86a3c822e6d764/ndbench-dyno-plugins/src/main/java/com/netflix/ndbench/plugin/dyno/DynoJedisUtils.java#L162-L173
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java
CommercePriceEntryPersistenceImpl.findByCompanyId
@Override public List<CommercePriceEntry> findByCompanyId(long companyId, int start, int end, OrderByComparator<CommercePriceEntry> orderByComparator) { """ Returns an ordered range of all the commerce price entries where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end ...
java
@Override public List<CommercePriceEntry> findByCompanyId(long companyId, int start, int end, OrderByComparator<CommercePriceEntry> orderByComparator) { return findByCompanyId(companyId, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommercePriceEntry", ">", "findByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommercePriceEntry", ">", "orderByComparator", ")", "{", "return", "findByCompan...
Returns an ordered range of all the commerce price entries where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first res...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "price", "entries", "where", "companyId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L2065-L2069
apereo/cas
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/revocation/checker/CRLDistributionPointRevocationChecker.java
CRLDistributionPointRevocationChecker.addURL
private static void addURL(final List<URI> list, final String uriString) { """ Adds the url to the list. Build URI by components to facilitate proper encoding of querystring. e.g. http://example.com:8085/ca?action=crl&issuer=CN=CAS Test User CA <p> <p>If {@code uriString} is encoded, it will be decoded with {@...
java
private static void addURL(final List<URI> list, final String uriString) { try { try { val url = new URL(URLDecoder.decode(uriString, StandardCharsets.UTF_8.name())); list.add(new URI(url.getProtocol(), url.getAuthority(), url.getPath(), url.getQuery(), null)); ...
[ "private", "static", "void", "addURL", "(", "final", "List", "<", "URI", ">", "list", ",", "final", "String", "uriString", ")", "{", "try", "{", "try", "{", "val", "url", "=", "new", "URL", "(", "URLDecoder", ".", "decode", "(", "uriString", ",", "St...
Adds the url to the list. Build URI by components to facilitate proper encoding of querystring. e.g. http://example.com:8085/ca?action=crl&issuer=CN=CAS Test User CA <p> <p>If {@code uriString} is encoded, it will be decoded with {@code UTF-8} first before it's added to the list.</p> @param list the list @param u...
[ "Adds", "the", "url", "to", "the", "list", ".", "Build", "URI", "by", "components", "to", "facilitate", "proper", "encoding", "of", "querystring", ".", "e", ".", "g", ".", "http", ":", "//", "example", ".", "com", ":", "8085", "/", "ca?action", "=", ...
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/revocation/checker/CRLDistributionPointRevocationChecker.java#L151-L162
molgenis/molgenis
molgenis-one-click-importer/src/main/java/org/molgenis/oneclickimporter/service/impl/OneClickImporterServiceImpl.java
OneClickImporterServiceImpl.createColumnFromCell
private Column createColumnFromCell(Sheet sheet, Cell cell) { """ Specific columntypes are permitted in the import. The supported columntypes are specified in the method. @param sheet worksheet @param cell cell on worksheet @return Column """ if (cell.getCellTypeEnum() == CellType.STRING) { ret...
java
private Column createColumnFromCell(Sheet sheet, Cell cell) { if (cell.getCellTypeEnum() == CellType.STRING) { return Column.create( cell.getStringCellValue(), cell.getColumnIndex(), getColumnDataFromSheet(sheet, cell.getColumnIndex())); } else { throw new MolgenisDataE...
[ "private", "Column", "createColumnFromCell", "(", "Sheet", "sheet", ",", "Cell", "cell", ")", "{", "if", "(", "cell", ".", "getCellTypeEnum", "(", ")", "==", "CellType", ".", "STRING", ")", "{", "return", "Column", ".", "create", "(", "cell", ".", "getSt...
Specific columntypes are permitted in the import. The supported columntypes are specified in the method. @param sheet worksheet @param cell cell on worksheet @return Column
[ "Specific", "columntypes", "are", "permitted", "in", "the", "import", ".", "The", "supported", "columntypes", "are", "specified", "in", "the", "method", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-one-click-importer/src/main/java/org/molgenis/oneclickimporter/service/impl/OneClickImporterServiceImpl.java#L171-L182
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java
DatabaseURIHelper.documentUri
public URI documentUri(String documentId, Params params) { """ Returns URI for {@code documentId} with {@code query} key and value. """ return this.documentId(documentId).query(params).build(); }
java
public URI documentUri(String documentId, Params params) { return this.documentId(documentId).query(params).build(); }
[ "public", "URI", "documentUri", "(", "String", "documentId", ",", "Params", "params", ")", "{", "return", "this", ".", "documentId", "(", "documentId", ")", ".", "query", "(", "params", ")", ".", "build", "(", ")", ";", "}" ]
Returns URI for {@code documentId} with {@code query} key and value.
[ "Returns", "URI", "for", "{" ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java#L141-L143
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java
CollectionUtils.asMultiValueMap
public static MultiValueMap asMultiValueMap(final String key, final Object value) { """ As multi value map. @param key the key @param value the value @return the multi value map """ return org.springframework.util.CollectionUtils.toMultiValueMap(wrap(key, value)); }
java
public static MultiValueMap asMultiValueMap(final String key, final Object value) { return org.springframework.util.CollectionUtils.toMultiValueMap(wrap(key, value)); }
[ "public", "static", "MultiValueMap", "asMultiValueMap", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "return", "org", ".", "springframework", ".", "util", ".", "CollectionUtils", ".", "toMultiValueMap", "(", "wrap", "(", "key", ","...
As multi value map. @param key the key @param value the value @return the multi value map
[ "As", "multi", "value", "map", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L458-L460
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.onBindViewHolder
@Override @SuppressWarnings("unchecked") @UiThread public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int flatPosition) { """ Implementation of Adapter.onBindViewHolder(RecyclerView.ViewHolder, int) that determines if the list item is a parent or a child and calls through to the ap...
java
@Override @SuppressWarnings("unchecked") @UiThread public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int flatPosition) { if (flatPosition > mFlatItemList.size()) { throw new IllegalStateException("Trying to bind item out of bounds, size " + mFlatItemList.size() ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "UiThread", "public", "void", "onBindViewHolder", "(", "@", "NonNull", "RecyclerView", ".", "ViewHolder", "holder", ",", "int", "flatPosition", ")", "{", "if", "(", "flatPosition", ">", ...
Implementation of Adapter.onBindViewHolder(RecyclerView.ViewHolder, int) that determines if the list item is a parent or a child and calls through to the appropriate implementation of either {@link #onBindParentViewHolder(ParentViewHolder, int, Parent)} or {@link #onBindChildViewHolder(ChildViewHolder, int, int, Object...
[ "Implementation", "of", "Adapter", ".", "onBindViewHolder", "(", "RecyclerView", ".", "ViewHolder", "int", ")", "that", "determines", "if", "the", "list", "item", "is", "a", "parent", "or", "a", "child", "and", "calls", "through", "to", "the", "appropriate", ...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L163-L188
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
SerializedFormWriterImpl.getClassHeader
public Content getClassHeader(ClassDoc classDoc) { """ Get the serializable class heading. @param classDoc the class being processed @return a content tree for the class header """ Content classLink = (classDoc.isPublic() || classDoc.isProtected()) ? getLink(new LinkInfoImpl(configurati...
java
public Content getClassHeader(ClassDoc classDoc) { Content classLink = (classDoc.isPublic() || classDoc.isProtected()) ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, classDoc) .label(configuration.getClassName(classDoc))) : new StringContent(classDoc.qua...
[ "public", "Content", "getClassHeader", "(", "ClassDoc", "classDoc", ")", "{", "Content", "classLink", "=", "(", "classDoc", ".", "isPublic", "(", ")", "||", "classDoc", ".", "isProtected", "(", ")", ")", "?", "getLink", "(", "new", "LinkInfoImpl", "(", "co...
Get the serializable class heading. @param classDoc the class being processed @return a content tree for the class header
[ "Get", "the", "serializable", "class", "heading", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java#L129-L153
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java
AbstractMapBasedWALDAO._addItem
@MustBeLocked (ELockType.WRITE) private void _addItem (@Nonnull final IMPLTYPE aItem, @Nonnull final EDAOActionType eActionType) { """ Add or update an item. Must only be invoked inside a write-lock. @param aItem The item to be added or updated @param eActionType The action type. Must be CREATE or UPDATE! ...
java
@MustBeLocked (ELockType.WRITE) private void _addItem (@Nonnull final IMPLTYPE aItem, @Nonnull final EDAOActionType eActionType) { ValueEnforcer.notNull (aItem, "Item"); ValueEnforcer.isTrue (eActionType == EDAOActionType.CREATE || eActionType == EDAOActionType.UPDATE, "Invalid act...
[ "@", "MustBeLocked", "(", "ELockType", ".", "WRITE", ")", "private", "void", "_addItem", "(", "@", "Nonnull", "final", "IMPLTYPE", "aItem", ",", "@", "Nonnull", "final", "EDAOActionType", "eActionType", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aItem", ...
Add or update an item. Must only be invoked inside a write-lock. @param aItem The item to be added or updated @param eActionType The action type. Must be CREATE or UPDATE! @throws IllegalArgumentException If on CREATE an item with the same ID is already contained. If on UPDATE an item with the provided ID does NOT exi...
[ "Add", "or", "update", "an", "item", ".", "Must", "only", "be", "invoked", "inside", "a", "write", "-", "lock", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java#L240-L272
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/SelectionImpl.java
SelectionImpl.selectRange
@Override public void selectRange(int startParagraphIndex, int startColPosition, int endParagraphIndex, int endColPosition) { """ /* ********************************************************************** * * Actions * * Actions change the state...
java
@Override public void selectRange(int startParagraphIndex, int startColPosition, int endParagraphIndex, int endColPosition) { selectRange(textPosition(startParagraphIndex, startColPosition), textPosition(endParagraphIndex, endColPosition)); }
[ "@", "Override", "public", "void", "selectRange", "(", "int", "startParagraphIndex", ",", "int", "startColPosition", ",", "int", "endParagraphIndex", ",", "int", "endColPosition", ")", "{", "selectRange", "(", "textPosition", "(", "startParagraphIndex", ",", "startC...
/* ********************************************************************** * * Actions * * Actions change the state of this control. They typically cause a * change of one or more observables and/or produce an event. * * *******************...
[ "/", "*", "**********************************************************************", "*", "*", "Actions", "*", "*", "Actions", "change", "the", "state", "of", "this", "control", ".", "They", "typically", "cause", "a", "*", "change", "of", "one", "or", "more", "obse...
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/SelectionImpl.java#L308-L311
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java
PlacesApi.findByLatLon
public Places findByLatLon(Float latitude, Float longitude, Integer accuracy) throws JinxException { """ Return a place ID for a latitude, longitude and accuracy triple. <p> The flickr.places.findByLatLon method is not meant to be a (reverse) geocoder in the traditional sense. It is designed to allow users to f...
java
public Places findByLatLon(Float latitude, Float longitude, Integer accuracy) throws JinxException { JinxUtils.validateParams(latitude, longitude); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.findByLatLon"); params.put("lat", latitude.toString()); params.put("lo...
[ "public", "Places", "findByLatLon", "(", "Float", "latitude", ",", "Float", "longitude", ",", "Integer", "accuracy", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "latitude", ",", "longitude", ")", ";", "Map", "<", "String", ","...
Return a place ID for a latitude, longitude and accuracy triple. <p> The flickr.places.findByLatLon method is not meant to be a (reverse) geocoder in the traditional sense. It is designed to allow users to find photos for "places" and will round up to the nearest place type to which corresponding place IDs apply. <p> F...
[ "Return", "a", "place", "ID", "for", "a", "latitude", "longitude", "and", "accuracy", "triple", ".", "<p", ">", "The", "flickr", ".", "places", ".", "findByLatLon", "method", "is", "not", "meant", "to", "be", "a", "(", "reverse", ")", "geocoder", "in", ...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java#L101-L111
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.ensureModuleConfig
public static ModuleConfig ensureModuleConfig( String modulePath, ServletContext context ) { """ Get the Struts ModuleConfig for the given module path. If there is none registered, and if it is possible to register one automatically, do so. """ try { ModuleConfig ret = getModuleCo...
java
public static ModuleConfig ensureModuleConfig( String modulePath, ServletContext context ) { try { ModuleConfig ret = getModuleConfig( modulePath, context ); if ( ret != null ) { return ret; } else { ...
[ "public", "static", "ModuleConfig", "ensureModuleConfig", "(", "String", "modulePath", ",", "ServletContext", "context", ")", "{", "try", "{", "ModuleConfig", "ret", "=", "getModuleConfig", "(", "modulePath", ",", "context", ")", ";", "if", "(", "ret", "!=", "...
Get the Struts ModuleConfig for the given module path. If there is none registered, and if it is possible to register one automatically, do so.
[ "Get", "the", "Struts", "ModuleConfig", "for", "the", "given", "module", "path", ".", "If", "there", "is", "none", "registered", "and", "if", "it", "is", "possible", "to", "register", "one", "automatically", "do", "so", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L473-L503
citrusframework/citrus
modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/util/BrowserUtils.java
BrowserUtils.makeIECachingSafeUrl
public static String makeIECachingSafeUrl(String url, long unique) { """ Makes new unique URL to avoid IE caching. @param url @param unique @return """ if (url.contains("timestamp=")) { return url.replaceFirst("(.*)(timestamp=)(.*)([&#].*)", "$1$2" + unique + "$4") .r...
java
public static String makeIECachingSafeUrl(String url, long unique) { if (url.contains("timestamp=")) { return url.replaceFirst("(.*)(timestamp=)(.*)([&#].*)", "$1$2" + unique + "$4") .replaceFirst("(.*)(timestamp=)(.*)$", "$1$2" + unique); } else { return url....
[ "public", "static", "String", "makeIECachingSafeUrl", "(", "String", "url", ",", "long", "unique", ")", "{", "if", "(", "url", ".", "contains", "(", "\"timestamp=\"", ")", ")", "{", "return", "url", ".", "replaceFirst", "(", "\"(.*)(timestamp=)(.*)([&#].*)\"", ...
Makes new unique URL to avoid IE caching. @param url @param unique @return
[ "Makes", "new", "unique", "URL", "to", "avoid", "IE", "caching", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/util/BrowserUtils.java#L38-L47
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/network/vlan_stats.java
vlan_stats.get
public static vlan_stats get(nitro_service service, Long id) throws Exception { """ Use this API to fetch statistics of vlan_stats resource of given name . """ vlan_stats obj = new vlan_stats(); obj.set_id(id); vlan_stats response = (vlan_stats) obj.stat_resource(service); return response; }
java
public static vlan_stats get(nitro_service service, Long id) throws Exception{ vlan_stats obj = new vlan_stats(); obj.set_id(id); vlan_stats response = (vlan_stats) obj.stat_resource(service); return response; }
[ "public", "static", "vlan_stats", "get", "(", "nitro_service", "service", ",", "Long", "id", ")", "throws", "Exception", "{", "vlan_stats", "obj", "=", "new", "vlan_stats", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "vlan_stats", "response",...
Use this API to fetch statistics of vlan_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "vlan_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/vlan_stats.java#L241-L246
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java
JDescTextField.init
public void init(int cols, String strDescription, ActionListener actionListener) { """ Constructor. @param cols The columns for this text field. @param strDescription The description to display when this component is blank. @param actionListener The action listener for this field (must be removed and return add...
java
public void init(int cols, String strDescription, ActionListener actionListener) { m_strDescription = strDescription; m_actionListener = actionListener; this.setText(null); this.addFocusListener(new FocusAdapter() { // Make sure a tab with a changed field triggers action perf...
[ "public", "void", "init", "(", "int", "cols", ",", "String", "strDescription", ",", "ActionListener", "actionListener", ")", "{", "m_strDescription", "=", "strDescription", ";", "m_actionListener", "=", "actionListener", ";", "this", ".", "setText", "(", "null", ...
Constructor. @param cols The columns for this text field. @param strDescription The description to display when this component is blank. @param actionListener The action listener for this field (must be removed and return added for this to work).
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L79-L106
zanata/openprops
src/main/java/org/fedorahosted/openprops/Properties.java
Properties.setRawComment
public void setRawComment(String key, String rawComment) { """ Sets the "raw" comment for the specified key. Each line of the comment must be either empty, whitespace-only, or preceded by a comment marker ("#" or "!"). This is not enforced by this class. <br> Note: if you set a comment, you must set a corres...
java
public void setRawComment(String key, String rawComment) { if (rawComment == null) throw new NullPointerException(); Entry entry = props.get(key); if (entry == null) { entry = new Entry(rawComment, null); props.put(key, entry); } else { entry.setRawComme...
[ "public", "void", "setRawComment", "(", "String", "key", ",", "String", "rawComment", ")", "{", "if", "(", "rawComment", "==", "null", ")", "throw", "new", "NullPointerException", "(", ")", ";", "Entry", "entry", "=", "props", ".", "get", "(", "key", ")"...
Sets the "raw" comment for the specified key. Each line of the comment must be either empty, whitespace-only, or preceded by a comment marker ("#" or "!"). This is not enforced by this class. <br> Note: if you set a comment, you must set a corresponding value before calling store or storeToXML. @param key property k...
[ "Sets", "the", "raw", "comment", "for", "the", "specified", "key", ".", "Each", "line", "of", "the", "comment", "must", "be", "either", "empty", "whitespace", "-", "only", "or", "preceded", "by", "a", "comment", "marker", "(", "#", "or", "!", ")", ".",...
train
https://github.com/zanata/openprops/blob/46510e610a765e4a91b302fc0d6a2123ed589603/src/main/java/org/fedorahosted/openprops/Properties.java#L1253-L1263
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/libcore/reflect/Types.java
Types.appendArrayGenericType
@ObjectiveCName("appendArrayGenericType:types:") public static void appendArrayGenericType(StringBuilder out, Type[] types) { """ Appends names of the {@code types} to {@code out} separated by commas. """ if (types.length == 0) { return; } appendGenericType(out, types[0]...
java
@ObjectiveCName("appendArrayGenericType:types:") public static void appendArrayGenericType(StringBuilder out, Type[] types) { if (types.length == 0) { return; } appendGenericType(out, types[0]); for (int i = 1; i < types.length; i++) { out.append(','); ...
[ "@", "ObjectiveCName", "(", "\"appendArrayGenericType:types:\"", ")", "public", "static", "void", "appendArrayGenericType", "(", "StringBuilder", "out", ",", "Type", "[", "]", "types", ")", "{", "if", "(", "types", ".", "length", "==", "0", ")", "{", "return",...
Appends names of the {@code types} to {@code out} separated by commas.
[ "Appends", "names", "of", "the", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/reflect/Types.java#L120-L130
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/util/ScheduleExpressionParser.java
ScheduleExpressionParser.parseDate
private long parseDate(Date date, long defaultValue) // d666295 { """ Parses the date to milliseconds and rounds up to the nearest second. @param date the date to parse @param defaultValue the default value if the date is null @return the rounded milliseconds """ if (date == null) { ...
java
private long parseDate(Date date, long defaultValue) // d666295 { if (date == null) { return defaultValue; } long value = date.getTime(); if (value > 0) { // Round up to the nearest second. long remainder = value % 1000; ...
[ "private", "long", "parseDate", "(", "Date", "date", ",", "long", "defaultValue", ")", "// d666295", "{", "if", "(", "date", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "long", "value", "=", "date", ".", "getTime", "(", ")", ";", "if", ...
Parses the date to milliseconds and rounds up to the nearest second. @param date the date to parse @param defaultValue the default value if the date is null @return the rounded milliseconds
[ "Parses", "the", "date", "to", "milliseconds", "and", "rounds", "up", "to", "the", "nearest", "second", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/util/ScheduleExpressionParser.java#L331-L353
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java
DAOValidatorHelper.isExpressionContainsENV
public static boolean isExpressionContainsENV(String expression) { """ Methode permettant de verifier si un chemin contient des variables d'environnement @param expression Chaine a controler @return Resultat de la verification """ // Si la chaine est vide : false if(expression == null || expression...
java
public static boolean isExpressionContainsENV(String expression) { // Si la chaine est vide : false if(expression == null || expression.trim().length() == 0) { // On retourne false return false; } // On split return isExpressionContainPattern(expression, ENV_CHAIN_PATTERN); }
[ "public", "static", "boolean", "isExpressionContainsENV", "(", "String", "expression", ")", "{", "// Si la chaine est vide : false\r", "if", "(", "expression", "==", "null", "||", "expression", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{...
Methode permettant de verifier si un chemin contient des variables d'environnement @param expression Chaine a controler @return Resultat de la verification
[ "Methode", "permettant", "de", "verifier", "si", "un", "chemin", "contient", "des", "variables", "d", "environnement" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L413-L424
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.validateNotNull
public void validateNotNull(Object object, String name) { """ Validates a given object to be not null @param object The object to check @param name The name of the field to display the error message """ validateNotNull(object, name, messages.get(Validation.NOTNULL_KEY.name(), name)); }
java
public void validateNotNull(Object object, String name) { validateNotNull(object, name, messages.get(Validation.NOTNULL_KEY.name(), name)); }
[ "public", "void", "validateNotNull", "(", "Object", "object", ",", "String", "name", ")", "{", "validateNotNull", "(", "object", ",", "name", ",", "messages", ".", "get", "(", "Validation", ".", "NOTNULL_KEY", ".", "name", "(", ")", ",", "name", ")", ")"...
Validates a given object to be not null @param object The object to check @param name The name of the field to display the error message
[ "Validates", "a", "given", "object", "to", "be", "not", "null" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L488-L490
michel-kraemer/bson4jackson
src/main/java/de/undercouch/bson4jackson/io/StaticBuffers.java
StaticBuffers.byteBuffer
public ByteBuffer byteBuffer(Key key, int minSize) { """ Creates or re-uses a {@link ByteBuffer} that has a minimum size. Calling this method multiple times with the same key will always return the same buffer, as long as it has the minimum size and is marked to be re-used. Buffers that are allowed to be re-use...
java
public ByteBuffer byteBuffer(Key key, int minSize) { minSize = Math.max(minSize, GLOBAL_MIN_SIZE); ByteBuffer r = _byteBuffers[key.ordinal()]; if (r == null || r.capacity() < minSize) { r = ByteBuffer.allocate(minSize); } else { _byteBuffers[key.ordinal()] = null; r.clear(); } return r; }
[ "public", "ByteBuffer", "byteBuffer", "(", "Key", "key", ",", "int", "minSize", ")", "{", "minSize", "=", "Math", ".", "max", "(", "minSize", ",", "GLOBAL_MIN_SIZE", ")", ";", "ByteBuffer", "r", "=", "_byteBuffers", "[", "key", ".", "ordinal", "(", ")", ...
Creates or re-uses a {@link ByteBuffer} that has a minimum size. Calling this method multiple times with the same key will always return the same buffer, as long as it has the minimum size and is marked to be re-used. Buffers that are allowed to be re-used should be released using {@link #releaseByteBuffer(Key, ByteBuf...
[ "Creates", "or", "re", "-", "uses", "a", "{" ]
train
https://github.com/michel-kraemer/bson4jackson/blob/32d2ab3c516b3c07490fdfcf0c5e4ed0a2ee3979/src/main/java/de/undercouch/bson4jackson/io/StaticBuffers.java#L129-L140
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/TouchState.java
TouchState.canBeFoldedWith
boolean canBeFoldedWith(TouchState ts, boolean ignoreIDs) { """ Finds out whether two non-null states are identical in everything but their touch point coordinates @param ts the TouchState to compare to @param ignoreIDs if true, ignore IDs when comparing points """ if (ts.pointCount != pointCount)...
java
boolean canBeFoldedWith(TouchState ts, boolean ignoreIDs) { if (ts.pointCount != pointCount) { return false; } if (ignoreIDs) { return true; } for (int i = 0; i < pointCount; i++) { if (ts.points[i].id != points[i].id) { return ...
[ "boolean", "canBeFoldedWith", "(", "TouchState", "ts", ",", "boolean", "ignoreIDs", ")", "{", "if", "(", "ts", ".", "pointCount", "!=", "pointCount", ")", "{", "return", "false", ";", "}", "if", "(", "ignoreIDs", ")", "{", "return", "true", ";", "}", "...
Finds out whether two non-null states are identical in everything but their touch point coordinates @param ts the TouchState to compare to @param ignoreIDs if true, ignore IDs when comparing points
[ "Finds", "out", "whether", "two", "non", "-", "null", "states", "are", "identical", "in", "everything", "but", "their", "touch", "point", "coordinates" ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/TouchState.java#L272-L285
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.searchRules
public JSONObject searchRules(RuleQuery query, RequestOptions requestOptions) throws AlgoliaException, JSONException { """ Search for query rules @param query the query @param requestOptions Options to pass to this request """ JSONObject body = new JSONObject(); if (query.getQuery() != nul...
java
public JSONObject searchRules(RuleQuery query, RequestOptions requestOptions) throws AlgoliaException, JSONException { JSONObject body = new JSONObject(); if (query.getQuery() != null) { body = body.put("query", query.getQuery()); } if (query.getAnchoring() != null) { body = body.put("anchor...
[ "public", "JSONObject", "searchRules", "(", "RuleQuery", "query", ",", "RequestOptions", "requestOptions", ")", "throws", "AlgoliaException", ",", "JSONException", "{", "JSONObject", "body", "=", "new", "JSONObject", "(", ")", ";", "if", "(", "query", ".", "getQ...
Search for query rules @param query the query @param requestOptions Options to pass to this request
[ "Search", "for", "query", "rules" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L1857-L1876
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/price/Price.java
Price.createFromGrossAmount
@Nonnull public static Price createFromGrossAmount (@Nonnull final ICurrencyValue aGrossAmount, @Nonnull final IVATItem aVATItem) { """ Create a price from a gross amount using the scale and rounding mode from the currency. @param aGrossAmount The gross amount to...
java
@Nonnull public static Price createFromGrossAmount (@Nonnull final ICurrencyValue aGrossAmount, @Nonnull final IVATItem aVATItem) { ValueEnforcer.notNull (aGrossAmount, "GrossAmount"); final ECurrency eCurrency = aGrossAmount.getCurrency (); final PerCurrenc...
[ "@", "Nonnull", "public", "static", "Price", "createFromGrossAmount", "(", "@", "Nonnull", "final", "ICurrencyValue", "aGrossAmount", ",", "@", "Nonnull", "final", "IVATItem", "aVATItem", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aGrossAmount", ",", "\"Gros...
Create a price from a gross amount using the scale and rounding mode from the currency. @param aGrossAmount The gross amount to use. May not be <code>null</code>. @param aVATItem The VAT item to use. May not be <code>null</code>. @return The created {@link Price}
[ "Create", "a", "price", "from", "a", "gross", "amount", "using", "the", "scale", "and", "rounding", "mode", "from", "the", "currency", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/price/Price.java#L318-L327
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java
TableBuilder.setColumnStyle
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { """ Set the style of a column. @param col The column number @param ts The style to be used, make sure the style is of type TableFamilyStyle.STYLEFAMILY_TABLECOLUMN @throws FastOdsException Thrown if col has an inv...
java
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { TableBuilder.checkCol(col); this.stylesContainer.addContentFontFaceContainerStyle(ts); ts.addToContentStyles(this.stylesContainer); this.columnStyles.set(col, ts); }
[ "public", "void", "setColumnStyle", "(", "final", "int", "col", ",", "final", "TableColumnStyle", "ts", ")", "throws", "FastOdsException", "{", "TableBuilder", ".", "checkCol", "(", "col", ")", ";", "this", ".", "stylesContainer", ".", "addContentFontFaceContainer...
Set the style of a column. @param col The column number @param ts The style to be used, make sure the style is of type TableFamilyStyle.STYLEFAMILY_TABLECOLUMN @throws FastOdsException Thrown if col has an invalid value.
[ "Set", "the", "style", "of", "a", "column", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L369-L374
savoirtech/eos
core/src/main/java/com/savoirtech/eos/util/ServiceProperties.java
ServiceProperties.getProperty
@SuppressWarnings("unchecked") public <T> T getProperty(String key, T defaultValue) { """ Returns the service property value or the default value if the property is not present. @param key the service property key @param defaultValue the default value @param <T> the property type @retur...
java
@SuppressWarnings("unchecked") public <T> T getProperty(String key, T defaultValue) { T value = (T) serviceReference.getProperty(key); return value == null ? defaultValue : value; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getProperty", "(", "String", "key", ",", "T", "defaultValue", ")", "{", "T", "value", "=", "(", "T", ")", "serviceReference", ".", "getProperty", "(", "key", ")", ";", "...
Returns the service property value or the default value if the property is not present. @param key the service property key @param defaultValue the default value @param <T> the property type @return the property value or the default value @throws ClassCastException if the service property is not of t...
[ "Returns", "the", "service", "property", "value", "or", "the", "default", "value", "if", "the", "property", "is", "not", "present", "." ]
train
https://github.com/savoirtech/eos/blob/76c5c6b149d64adb15c5b85b9f0d75620117f54b/core/src/main/java/com/savoirtech/eos/util/ServiceProperties.java#L64-L68
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/TextMessageFrame.java
TextMessageFrame.initComponents
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { """ This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always re...
java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane()...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents", "private", "void", "initComponents", "(", ")", "{", "java", ".", "awt", ".", "GridBagConstraints", "gridBagConstraints", ";", "jP...
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "th...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/TextMessageFrame.java#L56-L124
census-instrumentation/opencensus-java
exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java
JaegerTraceExporter.createWithSender
public static void createWithSender(final ThriftSender sender, final String serviceName) { """ Creates and registers the Jaeger Trace exporter to the OpenCensus library using the provided HttpSender. Only one Jaeger exporter can be registered at any point. @param sender the pre-configured ThriftSender to use w...
java
public static void createWithSender(final ThriftSender sender, final String serviceName) { synchronized (monitor) { checkState(handler == null, "Jaeger exporter is already registered."); final SpanExporter.Handler newHandler = newHandlerWithSender(sender, serviceName); JaegerTraceExporter.handler ...
[ "public", "static", "void", "createWithSender", "(", "final", "ThriftSender", "sender", ",", "final", "String", "serviceName", ")", "{", "synchronized", "(", "monitor", ")", "{", "checkState", "(", "handler", "==", "null", ",", "\"Jaeger exporter is already register...
Creates and registers the Jaeger Trace exporter to the OpenCensus library using the provided HttpSender. Only one Jaeger exporter can be registered at any point. @param sender the pre-configured ThriftSender to use with the exporter @param serviceName the local service name of the process. @throws IllegalStateExceptio...
[ "Creates", "and", "registers", "the", "Jaeger", "Trace", "exporter", "to", "the", "OpenCensus", "library", "using", "the", "provided", "HttpSender", ".", "Only", "one", "Jaeger", "exporter", "can", "be", "registered", "at", "any", "point", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java#L81-L88
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/FileMovingUtil.java
FileMovingUtil.createTempFile
private static File createTempFile(File baseFile) { """ Create a temporary File object. Prefix the name of the base file with an underscore. """ File parentDirectory = baseFile.getParentFile(); String filename = baseFile.getName(); return new File(parentDirectory, '_' + filename); ...
java
private static File createTempFile(File baseFile) { File parentDirectory = baseFile.getParentFile(); String filename = baseFile.getName(); return new File(parentDirectory, '_' + filename); }
[ "private", "static", "File", "createTempFile", "(", "File", "baseFile", ")", "{", "File", "parentDirectory", "=", "baseFile", ".", "getParentFile", "(", ")", ";", "String", "filename", "=", "baseFile", ".", "getName", "(", ")", ";", "return", "new", "File", ...
Create a temporary File object. Prefix the name of the base file with an underscore.
[ "Create", "a", "temporary", "File", "object", ".", "Prefix", "the", "name", "of", "the", "base", "file", "with", "an", "underscore", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/FileMovingUtil.java#L108-L112
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.submitCallbackRequest
public void submitCallbackRequest(ProtocolHeader h, Protocol request, ProtocolCallback callBack, Object context) { """ Submit a Request with Callback. It is a asynchronized method, it returns on until Request complete. When the Request complete, SD API will invoke the Callback. @param h the ProtocolHeader....
java
public void submitCallbackRequest(ProtocolHeader h, Protocol request, ProtocolCallback callBack, Object context){ queuePacket(h, request, callBack, context, null, null); }
[ "public", "void", "submitCallbackRequest", "(", "ProtocolHeader", "h", ",", "Protocol", "request", ",", "ProtocolCallback", "callBack", ",", "Object", "context", ")", "{", "queuePacket", "(", "h", ",", "request", ",", "callBack", ",", "context", ",", "null", "...
Submit a Request with Callback. It is a asynchronized method, it returns on until Request complete. When the Request complete, SD API will invoke the Callback. @param h the ProtocolHeader. @param request the Protocol. @param callBack the Callback. @param context the Context object of the Callback.
[ "Submit", "a", "Request", "with", "Callback", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L384-L386