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
jMotif/GI
src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java
DistanceComputation.calcDistTSAndPattern
protected double calcDistTSAndPattern(double[] ts, double[] pValue) { """ Calculating the distance between time series and pattern. @param ts a series of points for time series. @param pValue a series of points for pattern. @return the distance value. """ double INF = 10000000000000000000f; doub...
java
protected double calcDistTSAndPattern(double[] ts, double[] pValue) { double INF = 10000000000000000000f; double bestDist = INF; int patternLen = pValue.length; int lastStartP = ts.length - pValue.length + 1; if (lastStartP < 1) return bestDist; Random rand = new Random(); ...
[ "protected", "double", "calcDistTSAndPattern", "(", "double", "[", "]", "ts", ",", "double", "[", "]", "pValue", ")", "{", "double", "INF", "=", "10000000000000000000f", ";", "double", "bestDist", "=", "INF", ";", "int", "patternLen", "=", "pValue", ".", "...
Calculating the distance between time series and pattern. @param ts a series of points for time series. @param pValue a series of points for pattern. @return the distance value.
[ "Calculating", "the", "distance", "between", "time", "series", "and", "pattern", "." ]
train
https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java#L14-L42
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnPeek
public QueueItem txnPeek(long offerId, String transactionId) { """ Retrieves, but does not remove, the head of the queue. If the queue is empty checks if there is a reserved item with the associated {@code offerId} and returns it. If the item was retrieved from the queue but does not contain any data and the que...
java
public QueueItem txnPeek(long offerId, String transactionId) { QueueItem item = getItemQueue().peek(); if (item == null) { if (offerId == -1) { return null; } TxQueueItem txItem = txMap.get(offerId); if (txItem == null) { re...
[ "public", "QueueItem", "txnPeek", "(", "long", "offerId", ",", "String", "transactionId", ")", "{", "QueueItem", "item", "=", "getItemQueue", "(", ")", ".", "peek", "(", ")", ";", "if", "(", "item", "==", "null", ")", "{", "if", "(", "offerId", "==", ...
Retrieves, but does not remove, the head of the queue. If the queue is empty checks if there is a reserved item with the associated {@code offerId} and returns it. If the item was retrieved from the queue but does not contain any data and the queue store is enabled, this method will try load the data from the data stor...
[ "Retrieves", "but", "does", "not", "remove", "the", "head", "of", "the", "queue", ".", "If", "the", "queue", "is", "empty", "checks", "if", "there", "is", "a", "reserved", "item", "with", "the", "associated", "{", "@code", "offerId", "}", "and", "returns...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L413-L434
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java
MemberRemoval.stripInvokables
public MemberRemoval stripInvokables(ElementMatcher<? super MethodDescription> matcher) { """ Specifies that any method or constructor that matches the specified matcher should be removed. @param matcher The matcher that decides upon method and constructor removal. @return A new member removal instance that re...
java
public MemberRemoval stripInvokables(ElementMatcher<? super MethodDescription> matcher) { return new MemberRemoval(fieldMatcher, methodMatcher.or(matcher)); }
[ "public", "MemberRemoval", "stripInvokables", "(", "ElementMatcher", "<", "?", "super", "MethodDescription", ">", "matcher", ")", "{", "return", "new", "MemberRemoval", "(", "fieldMatcher", ",", "methodMatcher", ".", "or", "(", "matcher", ")", ")", ";", "}" ]
Specifies that any method or constructor that matches the specified matcher should be removed. @param matcher The matcher that decides upon method and constructor removal. @return A new member removal instance that removes all previously specified members and any method or constructor that matches the specified matche...
[ "Specifies", "that", "any", "method", "or", "constructor", "that", "matches", "the", "specified", "matcher", "should", "be", "removed", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java#L122-L124
apache/incubator-druid
processing/src/main/java/org/apache/druid/segment/DimensionSelectorUtils.java
DimensionSelectorUtils.makeValueMatcherGeneric
public static ValueMatcher makeValueMatcherGeneric(DimensionSelector selector, @Nullable String value) { """ Generic implementation of {@link DimensionSelector#makeValueMatcher(String)}, uses {@link DimensionSelector#getRow()} of the given {@link DimensionSelector}. "Lazy" DimensionSelectors could delegate {@cod...
java
public static ValueMatcher makeValueMatcherGeneric(DimensionSelector selector, @Nullable String value) { IdLookup idLookup = selector.idLookup(); if (idLookup != null) { return makeDictionaryEncodedValueMatcherGeneric(selector, idLookup.lookupId(value), value == null); } else if (selector.getValueCa...
[ "public", "static", "ValueMatcher", "makeValueMatcherGeneric", "(", "DimensionSelector", "selector", ",", "@", "Nullable", "String", "value", ")", "{", "IdLookup", "idLookup", "=", "selector", ".", "idLookup", "(", ")", ";", "if", "(", "idLookup", "!=", "null", ...
Generic implementation of {@link DimensionSelector#makeValueMatcher(String)}, uses {@link DimensionSelector#getRow()} of the given {@link DimensionSelector}. "Lazy" DimensionSelectors could delegate {@code makeValueMatcher()} to this method, but encouraged to implement {@code makeValueMatcher()} themselves, bypassing t...
[ "Generic", "implementation", "of", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/DimensionSelectorUtils.java#L47-L58
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilMath.java
UtilMath.getDistance
public static double getDistance(Localizable a, Localizable b) { """ Get distance of two points. @param a The first localizable (must not be <code>null</code>). @param b The second localizable (must not be <code>null</code>). @return The distance between them. @throws LionEngineException If invalid argument....
java
public static double getDistance(Localizable a, Localizable b) { Check.notNull(a); Check.notNull(b); final double x = b.getX() - a.getX(); final double y = b.getY() - a.getY(); return StrictMath.sqrt(x * x + y * y); }
[ "public", "static", "double", "getDistance", "(", "Localizable", "a", ",", "Localizable", "b", ")", "{", "Check", ".", "notNull", "(", "a", ")", ";", "Check", ".", "notNull", "(", "b", ")", ";", "final", "double", "x", "=", "b", ".", "getX", "(", "...
Get distance of two points. @param a The first localizable (must not be <code>null</code>). @param b The second localizable (must not be <code>null</code>). @return The distance between them. @throws LionEngineException If invalid argument.
[ "Get", "distance", "of", "two", "points", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilMath.java#L192-L201
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ThemeServlet.java
ThemeServlet.doGet
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { """ Serves up a file from the theme. @param req the request with the file name in parameter "f", or following the servlet path. @param resp the response to write to. @thro...
java
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { ServletUtil.handleThemeResourceRequest(req, resp); }
[ "@", "Override", "protected", "void", "doGet", "(", "final", "HttpServletRequest", "req", ",", "final", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", "{", "ServletUtil", ".", "handleThemeResourceRequest", "(", "req", ",", "res...
Serves up a file from the theme. @param req the request with the file name in parameter "f", or following the servlet path. @param resp the response to write to. @throws ServletException on error. @throws IOException if there is an error reading the file / writing the response.
[ "Serves", "up", "a", "file", "from", "the", "theme", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ThemeServlet.java#L46-L51
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.emailAddress
public static Validator<CharSequence> emailAddress(@NonNull final Context context) { """ Creates and returns a validator, which allows to validate texts to ensure, that they represent valid email addresses. Empty texts are also accepted. @param context The context, which should be used to retrieve the error m...
java
public static Validator<CharSequence> emailAddress(@NonNull final Context context) { return new EmailAddressValidator(context, R.string.default_error_message); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "emailAddress", "(", "@", "NonNull", "final", "Context", "context", ")", "{", "return", "new", "EmailAddressValidator", "(", "context", ",", "R", ".", "string", ".", "default_error_message", ")", ";", ...
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid email addresses. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @return The valid...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "represent", "valid", "email", "addresses", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L1056-L1058
netty/netty
codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoder.java
HAProxyMessageDecoder.decodeStruct
private ByteBuf decodeStruct(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception { """ Create a frame out of the {@link ByteBuf} and return it. Based on code from {@link LineBasedFrameDecoder#decode(ChannelHandlerContext, ByteBuf)}. @param ctx the {@link ChannelHandlerContext} which this {@link HAP...
java
private ByteBuf decodeStruct(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception { final int eoh = findEndOfHeader(buffer); if (!discarding) { if (eoh >= 0) { final int length = eoh - buffer.readerIndex(); if (length > v2MaxHeaderSize) { ...
[ "private", "ByteBuf", "decodeStruct", "(", "ChannelHandlerContext", "ctx", ",", "ByteBuf", "buffer", ")", "throws", "Exception", "{", "final", "int", "eoh", "=", "findEndOfHeader", "(", "buffer", ")", ";", "if", "(", "!", "discarding", ")", "{", "if", "(", ...
Create a frame out of the {@link ByteBuf} and return it. Based on code from {@link LineBasedFrameDecoder#decode(ChannelHandlerContext, ByteBuf)}. @param ctx the {@link ChannelHandlerContext} which this {@link HAProxyMessageDecoder} belongs to @param buffer the {@link ByteBuf} from which to read data @return frame...
[ "Create", "a", "frame", "out", "of", "the", "{", "@link", "ByteBuf", "}", "and", "return", "it", ".", "Based", "on", "code", "from", "{", "@link", "LineBasedFrameDecoder#decode", "(", "ChannelHandlerContext", "ByteBuf", ")", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoder.java#L269-L301
sebastiangraf/perfidix
src/main/java/org/perfidix/element/BenchmarkExecutor.java
BenchmarkExecutor.checkMethod
public static PerfidixMethodCheckException checkMethod(final Object obj, final Class<? extends Annotation> anno, final Method... meths) { """ Checking a method if it is reflective executable and if the mapping to the object fits. @param obj on which the execution takes place @param anno the related annotati...
java
public static PerfidixMethodCheckException checkMethod(final Object obj, final Class<? extends Annotation> anno, final Method... meths) { for (Method meth : meths) { // check if the class of the object to be executed has the given // method boolean classMethodCorr = false; ...
[ "public", "static", "PerfidixMethodCheckException", "checkMethod", "(", "final", "Object", "obj", ",", "final", "Class", "<", "?", "extends", "Annotation", ">", "anno", ",", "final", "Method", "...", "meths", ")", "{", "for", "(", "Method", "meth", ":", "met...
Checking a method if it is reflective executable and if the mapping to the object fits. @param obj on which the execution takes place @param anno the related annotation for the check @param meths to be checked @return {@link PerfidixMethodCheckException} if something is wrong in the mapping, null otherwise.
[ "Checking", "a", "method", "if", "it", "is", "reflective", "executable", "and", "if", "the", "mapping", "to", "the", "object", "fits", "." ]
train
https://github.com/sebastiangraf/perfidix/blob/f13aa793b6a3055215ed4edbb946c1bb5d564886/src/main/java/org/perfidix/element/BenchmarkExecutor.java#L161-L182
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(String message, JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param message Error message to be disp...
java
public static void assertEquals(String message, JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { JSONCompareResult result = JSONCompare.compareJSON(expected, actual, compareMode); if (result.failed()) { throw new AssertionError(getCombinedMe...
[ "public", "static", "void", "assertEquals", "(", "String", "message", ",", "JSONObject", "expected", ",", "JSONObject", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "JSONCompareResult", "result", "=", "JSONCompare", ".", "com...
Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param message Error message to be displayed in case of assertion failure @param expected Expected JSONObject @param actual JSONObject to compare @param compareMode Specifies which comparison mode to...
[ "Asserts", "that", "the", "JSONObject", "provided", "matches", "the", "expected", "JSONObject", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L600-L606
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java
CPDefinitionLinkPersistenceImpl.fetchByUUID_G
@Override public CPDefinitionLink fetchByUUID_G(String uuid, long groupId) { """ Returns the cp definition link where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp definit...
java
@Override public CPDefinitionLink fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPDefinitionLink", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp definition link where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp definition link, or <code>null</code> if a matching cp definition link could not be found
[ "Returns", "the", "cp", "definition", "link", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "c...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java#L701-L704
watson-developer-cloud/java-sdk
discovery/src/main/java/com/ibm/watson/discovery/v1/query/AggregationDeserializer.java
AggregationDeserializer.collapseMap
private void collapseMap(HashMap<String, Object> objMap) { """ Condenses the main object map to eliminate unnecessary nesting and allow for proper type conversion when the map is complete. @param objMap Map used to build the structure for the resulting {@link QueryAggregation} object """ while (objMap....
java
private void collapseMap(HashMap<String, Object> objMap) { while (objMap.keySet().size() == 1 && objMap.keySet().contains("")) { HashMap<String, Object> innerMap = (HashMap<String, Object>) objMap.get(""); objMap.clear(); objMap.putAll(innerMap); } }
[ "private", "void", "collapseMap", "(", "HashMap", "<", "String", ",", "Object", ">", "objMap", ")", "{", "while", "(", "objMap", ".", "keySet", "(", ")", ".", "size", "(", ")", "==", "1", "&&", "objMap", ".", "keySet", "(", ")", ".", "contains", "(...
Condenses the main object map to eliminate unnecessary nesting and allow for proper type conversion when the map is complete. @param objMap Map used to build the structure for the resulting {@link QueryAggregation} object
[ "Condenses", "the", "main", "object", "map", "to", "eliminate", "unnecessary", "nesting", "and", "allow", "for", "proper", "type", "conversion", "when", "the", "map", "is", "complete", "." ]
train
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/discovery/src/main/java/com/ibm/watson/discovery/v1/query/AggregationDeserializer.java#L197-L203
wigforss/Ka-Jmx
core/src/main/java/org/kasource/jmx/core/service/JmxServiceImpl.java
JmxServiceImpl.handleNotification
@Override public void handleNotification(Notification notification, Object handback) { """ Handles JMX Notifications and relays notifications to the notification listers registered with this service. """ if(notification instanceof MBeanServerNotification) { MBeanServerNotification mbea...
java
@Override public void handleNotification(Notification notification, Object handback) { if(notification instanceof MBeanServerNotification) { MBeanServerNotification mbeanNotification = (MBeanServerNotification) notification; if(mbeanNotification.getType().equals("JMX.mbean.registered...
[ "@", "Override", "public", "void", "handleNotification", "(", "Notification", "notification", ",", "Object", "handback", ")", "{", "if", "(", "notification", "instanceof", "MBeanServerNotification", ")", "{", "MBeanServerNotification", "mbeanNotification", "=", "(", "...
Handles JMX Notifications and relays notifications to the notification listers registered with this service.
[ "Handles", "JMX", "Notifications", "and", "relays", "notifications", "to", "the", "notification", "listers", "registered", "with", "this", "service", "." ]
train
https://github.com/wigforss/Ka-Jmx/blob/7f096394e5a11ad5ef483c90ce511a2ba2c14ab2/core/src/main/java/org/kasource/jmx/core/service/JmxServiceImpl.java#L212-L229
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLStreamEvents.java
XMLStreamEvents.getAttributeWithPrefix
public Attribute getAttributeWithPrefix(CharSequence prefix, CharSequence name) { """ Shortcut to get the attribute for the given namespace prefix and local name. """ for (Attribute attr : event.attributes) if (attr.localName.equals(name) && attr.namespacePrefix.equals(prefix)) return attr; retu...
java
public Attribute getAttributeWithPrefix(CharSequence prefix, CharSequence name) { for (Attribute attr : event.attributes) if (attr.localName.equals(name) && attr.namespacePrefix.equals(prefix)) return attr; return null; }
[ "public", "Attribute", "getAttributeWithPrefix", "(", "CharSequence", "prefix", ",", "CharSequence", "name", ")", "{", "for", "(", "Attribute", "attr", ":", "event", ".", "attributes", ")", "if", "(", "attr", ".", "localName", ".", "equals", "(", "name", ")"...
Shortcut to get the attribute for the given namespace prefix and local name.
[ "Shortcut", "to", "get", "the", "attribute", "for", "the", "given", "namespace", "prefix", "and", "local", "name", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLStreamEvents.java#L161-L166
BradleyWood/Software-Quality-Test-Framework
sqtf-core/src/main/java/org/sqtf/assertions/Assert.java
Assert.assertEquals
public static void assertEquals(Object expected, Object actual) { """ Asserts that the two objects are equal. If they are not the test will fail @param expected The expected value @param actual The actual value """ assertEquals(expected, actual, "Expected value " + expected + " but got " + actua...
java
public static void assertEquals(Object expected, Object actual) { assertEquals(expected, actual, "Expected value " + expected + " but got " + actual); }
[ "public", "static", "void", "assertEquals", "(", "Object", "expected", ",", "Object", "actual", ")", "{", "assertEquals", "(", "expected", ",", "actual", ",", "\"Expected value \"", "+", "expected", "+", "\" but got \"", "+", "actual", ")", ";", "}" ]
Asserts that the two objects are equal. If they are not the test will fail @param expected The expected value @param actual The actual value
[ "Asserts", "that", "the", "two", "objects", "are", "equal", ".", "If", "they", "are", "not", "the", "test", "will", "fail" ]
train
https://github.com/BradleyWood/Software-Quality-Test-Framework/blob/010dea3bfc8e025a4304ab9ef4a213c1adcb1aa0/sqtf-core/src/main/java/org/sqtf/assertions/Assert.java#L74-L76
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteSubListAsync
public Observable<OperationStatus> deleteSubListAsync(UUID appId, String versionId, UUID clEntityId, int subListId) { """ Deletes a sublist of a specific closed list model. @param appId The application ID. @param versionId The version ID. @param clEntityId The closed list entity extractor ID. @param subListI...
java
public Observable<OperationStatus> deleteSubListAsync(UUID appId, String versionId, UUID clEntityId, int subListId) { return deleteSubListWithServiceResponseAsync(appId, versionId, clEntityId, subListId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override publi...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteSubListAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "clEntityId", ",", "int", "subListId", ")", "{", "return", "deleteSubListWithServiceResponseAsync", "(", "appId", ",", "versionI...
Deletes a sublist of a specific closed list model. @param appId The application ID. @param versionId The version ID. @param clEntityId The closed list entity extractor ID. @param subListId The sublist ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationS...
[ "Deletes", "a", "sublist", "of", "a", "specific", "closed", "list", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L4901-L4908
nightcode/yaranga
core/src/org/nightcode/common/net/http/MacAuthUtils.java
MacAuthUtils.getSignatureBaseString
public static String getSignatureBaseString(String nonce, String requestMethod, String headerHost, String requestUrl, @Nullable String payloadBodyHash, @Nullable String ext) throws AuthException { """ Returns a signature base string. The signature base string is constructed by concatenating together, in o...
java
public static String getSignatureBaseString(String nonce, String requestMethod, String headerHost, String requestUrl, @Nullable String payloadBodyHash, @Nullable String ext) throws AuthException { return nonce + '\n' + requestMethod.toUpperCase() + '\n' + normalizeUrl(headerHost, requestUrl) +...
[ "public", "static", "String", "getSignatureBaseString", "(", "String", "nonce", ",", "String", "requestMethod", ",", "String", "headerHost", ",", "String", "requestUrl", ",", "@", "Nullable", "String", "payloadBodyHash", ",", "@", "Nullable", "String", "ext", ")",...
Returns a signature base string. The signature base string is constructed by concatenating together, in order, the following HTTP request elements, each followed by a new line character (%x0A): 1. The nonce value generated for the request. 2. The HTTP request method in upper case. For example: "HEAD", "GET", "POST"...
[ "Returns", "a", "signature", "base", "string", "." ]
train
https://github.com/nightcode/yaranga/blob/f02cf8d8bcd365b6b1d55638938631a00e9ee808/core/src/org/nightcode/common/net/http/MacAuthUtils.java#L82-L89
arquillian/arquillian-cube
core/src/main/java/org/arquillian/cube/impl/util/Timespan.java
Timespan.truncateDurationToUnit
private static Timespan truncateDurationToUnit(long durationInMillis, TimeUnit timeUnit) { """ Expresses the provided duration in the unit provided. Note that the timespan returned represent only the truncated version of the duration: if duration is 1002ms and timeunit is seconds, then the timespan returned is 1...
java
private static Timespan truncateDurationToUnit(long durationInMillis, TimeUnit timeUnit) { Timespan res; if (durationInMillis >= timeUnit.getMillisecondsCount()) { res = new Timespan(durationInMillis / timeUnit.getMillisecondsCount(), timeUnit); } else { ...
[ "private", "static", "Timespan", "truncateDurationToUnit", "(", "long", "durationInMillis", ",", "TimeUnit", "timeUnit", ")", "{", "Timespan", "res", ";", "if", "(", "durationInMillis", ">=", "timeUnit", ".", "getMillisecondsCount", "(", ")", ")", "{", "res", "=...
Expresses the provided duration in the unit provided. Note that the timespan returned represent only the truncated version of the duration: if duration is 1002ms and timeunit is seconds, then the timespan returned is 1 second... leaving behind 2ms. @return the timespan
[ "Expresses", "the", "provided", "duration", "in", "the", "unit", "provided", ".", "Note", "that", "the", "timespan", "returned", "represent", "only", "the", "truncated", "version", "of", "the", "duration", ":", "if", "duration", "is", "1002ms", "and", "timeuni...
train
https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/core/src/main/java/org/arquillian/cube/impl/util/Timespan.java#L444-L455
LearnLib/automatalib
util/src/main/java/net/automatalib/util/partitionrefinement/PaigeTarjanExtractors.java
PaigeTarjanExtractors.toDeterministic
public static <I, T, SP, TP, A extends MutableDeterministic<?, I, ?, SP, TP>> A toDeterministic(PaigeTarjan pt, AutomatonCreator<A, I> creator, ...
java
public static <I, T, SP, TP, A extends MutableDeterministic<?, I, ?, SP, TP>> A toDeterministic(PaigeTarjan pt, AutomatonCreator<A, I> creator, ...
[ "public", "static", "<", "I", ",", "T", ",", "SP", ",", "TP", ",", "A", "extends", "MutableDeterministic", "<", "?", ",", "I", ",", "?", ",", "SP", ",", "TP", ">", ">", "A", "toDeterministic", "(", "PaigeTarjan", "pt", ",", "AutomatonCreator", "<", ...
Translates the results of a coarsest stable partition computation into a deterministic automaton. <p> This method is designed to match the following methods from {@link PaigeTarjanInitializers}: <ul> <li> {@link PaigeTarjanInitializers#initCompleteDeterministic(PaigeTarjan, net.automatalib.automata.simple.SimpleDetermi...
[ "Translates", "the", "results", "of", "a", "coarsest", "stable", "partition", "computation", "into", "a", "deterministic", "automaton", ".", "<p", ">", "This", "method", "is", "designed", "to", "match", "the", "following", "methods", "from", "{", "@link", "Pai...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/partitionrefinement/PaigeTarjanExtractors.java#L138-L153
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/javadoc/Utils.java
Utils.diagnosticPosition
static DiagnosticPosition diagnosticPosition(DocTreePath path, VisitorState state) { """ Gets a {@link DiagnosticPosition} for the {@link DocTree} pointed to by {@code path}, attached to the {@link Tree} which it documents. """ int startPosition = getStartPosition(path.getLeaf(), state); Tree tree = p...
java
static DiagnosticPosition diagnosticPosition(DocTreePath path, VisitorState state) { int startPosition = getStartPosition(path.getLeaf(), state); Tree tree = path.getTreePath().getLeaf(); return getDiagnosticPosition(startPosition, tree); }
[ "static", "DiagnosticPosition", "diagnosticPosition", "(", "DocTreePath", "path", ",", "VisitorState", "state", ")", "{", "int", "startPosition", "=", "getStartPosition", "(", "path", ".", "getLeaf", "(", ")", ",", "state", ")", ";", "Tree", "tree", "=", "path...
Gets a {@link DiagnosticPosition} for the {@link DocTree} pointed to by {@code path}, attached to the {@link Tree} which it documents.
[ "Gets", "a", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/javadoc/Utils.java#L87-L91
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_portability_id_status_GET
public ArrayList<OvhPortabilityStep> billingAccount_portability_id_status_GET(String billingAccount, Long id) throws IOException { """ Indicates the current status of the portability, with a list of steps REST: GET /telephony/{billingAccount}/portability/{id}/status @param billingAccount [required] The name of...
java
public ArrayList<OvhPortabilityStep> billingAccount_portability_id_status_GET(String billingAccount, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/portability/{id}/status"; StringBuilder sb = path(qPath, billingAccount, id); String resp = exec(qPath, "GET", sb.toString(), null); retu...
[ "public", "ArrayList", "<", "OvhPortabilityStep", ">", "billingAccount_portability_id_status_GET", "(", "String", "billingAccount", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/portability/{id}/status\"", ";", ...
Indicates the current status of the portability, with a list of steps REST: GET /telephony/{billingAccount}/portability/{id}/status @param billingAccount [required] The name of your billingAccount @param id [required] The ID of the portability
[ "Indicates", "the", "current", "status", "of", "the", "portability", "with", "a", "list", "of", "steps" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L404-L409
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringGrabber.java
StringGrabber.replaceEnclosedIn
public StringGrabber replaceEnclosedIn(String startToken, String endToken, String replacement) { """ replace specified string enclosed in speficied token @param startToken @param endToken @param replacement @return """ StringCropper cropper = getCropper(); final List<StrPosition> stringEnclosedInWi...
java
public StringGrabber replaceEnclosedIn(String startToken, String endToken, String replacement) { StringCropper cropper = getCropper(); final List<StrPosition> stringEnclosedInWithDetails = cropper.getStringEnclosedInWithDetails(sb.toString(), startToken, endToken); final List<Integer> splitList = new ArrayList...
[ "public", "StringGrabber", "replaceEnclosedIn", "(", "String", "startToken", ",", "String", "endToken", ",", "String", "replacement", ")", "{", "StringCropper", "cropper", "=", "getCropper", "(", ")", ";", "final", "List", "<", "StrPosition", ">", "stringEnclosedI...
replace specified string enclosed in speficied token @param startToken @param endToken @param replacement @return
[ "replace", "specified", "string", "enclosed", "in", "speficied", "token" ]
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringGrabber.java#L400-L460
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonReader.java
JsonReader.nextKeyValue
public <T> Tuple2<String, T> nextKeyValue(Class<T> clazz) throws IOException { """ Reads the next key-value pair with the value being of the given type @param <T> the value type parameter @param clazz the clazz associated with the value type @return the next key-value pair @throws IOException Something wen...
java
public <T> Tuple2<String, T> nextKeyValue(Class<T> clazz) throws IOException { if (currentValue.getKey() != NAME) { throw new IOException("Expecting NAME, but found " + jsonTokenToStructuredElement(null)); } String name = currentValue.getValue().asString(); consume(); return Tuple...
[ "public", "<", "T", ">", "Tuple2", "<", "String", ",", "T", ">", "nextKeyValue", "(", "Class", "<", "T", ">", "clazz", ")", "throws", "IOException", "{", "if", "(", "currentValue", ".", "getKey", "(", ")", "!=", "NAME", ")", "{", "throw", "new", "I...
Reads the next key-value pair with the value being of the given type @param <T> the value type parameter @param clazz the clazz associated with the value type @return the next key-value pair @throws IOException Something went wrong reading
[ "Reads", "the", "next", "key", "-", "value", "pair", "with", "the", "value", "being", "of", "the", "given", "type" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonReader.java#L490-L497
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/ApkParser.java
ApkParser.compXmlStringAt
private String compXmlStringAt(byte[] arr, int strOff) { """ <p>Get a {@link String} of the value stored in StringTable format at offset strOff. This offset points to the 16 bit string length, which is followed by that number of 16 bit (Unicode) chars.</p> @param arr The {@link Byte} array to be processed....
java
private String compXmlStringAt(byte[] arr, int strOff) { int strLen = arr[strOff + 1] << 8 & 0xff00 | arr[strOff] & 0xff; byte[] chars = new byte[strLen]; for (int ii = 0; ii < strLen; ii++) { chars[ii] = arr[strOff + 2 + ii * 2]; } return new String(chars); // Hack,...
[ "private", "String", "compXmlStringAt", "(", "byte", "[", "]", "arr", ",", "int", "strOff", ")", "{", "int", "strLen", "=", "arr", "[", "strOff", "+", "1", "]", "<<", "8", "&", "0xff00", "|", "arr", "[", "strOff", "]", "&", "0xff", ";", "byte", "...
<p>Get a {@link String} of the value stored in StringTable format at offset strOff. This offset points to the 16 bit string length, which is followed by that number of 16 bit (Unicode) chars.</p> @param arr The {@link Byte} array to be processed. @param strOff An {@link Integer} denoting the offset within the array...
[ "<p", ">", "Get", "a", "{", "@link", "String", "}", "of", "the", "value", "stored", "in", "StringTable", "format", "at", "offset", "strOff", ".", "This", "offset", "points", "to", "the", "16", "bit", "string", "length", "which", "is", "followed", "by", ...
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/ApkParser.java#L261-L268
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java
ICUService.getDisplayNames
public SortedMap<String, String> getDisplayNames(ULocale locale) { """ Convenience override of getDisplayNames(ULocale, Comparator, String) that uses null for the comparator, and null for the matchID. """ return getDisplayNames(locale, null, null); }
java
public SortedMap<String, String> getDisplayNames(ULocale locale) { return getDisplayNames(locale, null, null); }
[ "public", "SortedMap", "<", "String", ",", "String", ">", "getDisplayNames", "(", "ULocale", "locale", ")", "{", "return", "getDisplayNames", "(", "locale", ",", "null", ",", "null", ")", ";", "}" ]
Convenience override of getDisplayNames(ULocale, Comparator, String) that uses null for the comparator, and null for the matchID.
[ "Convenience", "override", "of", "getDisplayNames", "(", "ULocale", "Comparator", "String", ")", "that", "uses", "null", "for", "the", "comparator", "and", "null", "for", "the", "matchID", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L652-L654
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java
CommerceOrderItemPersistenceImpl.findByCProductId
@Override public List<CommerceOrderItem> findByCProductId(long CProductId, int start, int end) { """ Returns a range of all the commerce order items where CProductId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> ...
java
@Override public List<CommerceOrderItem> findByCProductId(long CProductId, int start, int end) { return findByCProductId(CProductId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderItem", ">", "findByCProductId", "(", "long", "CProductId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCProductId", "(", "CProductId", ",", "start", ",", "end", ",", "null", ")", ...
Returns a range of all the commerce order items where CProductId = &#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 result in the...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "order", "items", "where", "CProductId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java#L663-L667
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.getEntitySetByEntityTypeName
public static EntitySet getEntitySetByEntityTypeName(EntityDataModel entityDataModel, String entityTypeName) throws ODataEdmException { """ Get the Entity Set for a given Entity Type name through the Entity Data Model. @param entityDataModel The Entity Data Model. @param entityTypeName The Entity ...
java
public static EntitySet getEntitySetByEntityTypeName(EntityDataModel entityDataModel, String entityTypeName) throws ODataEdmException { for (EntitySet entitySet : entityDataModel.getEntityContainer().getEntitySets()) { if (entitySet.getTypeName().equals(entityTypeName)) { ...
[ "public", "static", "EntitySet", "getEntitySetByEntityTypeName", "(", "EntityDataModel", "entityDataModel", ",", "String", "entityTypeName", ")", "throws", "ODataEdmException", "{", "for", "(", "EntitySet", "entitySet", ":", "entityDataModel", ".", "getEntityContainer", "...
Get the Entity Set for a given Entity Type name through the Entity Data Model. @param entityDataModel The Entity Data Model. @param entityTypeName The Entity Type name. @return The Entity Set. @throws ODataEdmException if unable to get entity set in entity data model
[ "Get", "the", "Entity", "Set", "for", "a", "given", "Entity", "Type", "name", "through", "the", "Entity", "Data", "Model", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L463-L471
btrplace/scheduler
btrpsl/src/main/java/org/btrplace/btrpsl/constraint/SplitAmongBuilder.java
SplitAmongBuilder.buildConstraint
@Override public List<? extends SatConstraint> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) { """ Build a constraint. @param args the parameters of the constraint. Must be 2 non-empty set of virtual machines. @return the constraint """ if (checkConformance(t, args)) { @Su...
java
@Override public List<? extends SatConstraint> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) { if (checkConformance(t, args)) { @SuppressWarnings("unchecked") Collection<Collection<VM>> vs = (Collection<Collection<VM>>) params[0].transform(this, t, args.get(0)); ...
[ "@", "Override", "public", "List", "<", "?", "extends", "SatConstraint", ">", "buildConstraint", "(", "BtrPlaceTree", "t", ",", "List", "<", "BtrpOperand", ">", "args", ")", "{", "if", "(", "checkConformance", "(", "t", ",", "args", ")", ")", "{", "@", ...
Build a constraint. @param args the parameters of the constraint. Must be 2 non-empty set of virtual machines. @return the constraint
[ "Build", "a", "constraint", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/constraint/SplitAmongBuilder.java#L52-L62
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20HandlerInterceptorAdapter.java
OAuth20HandlerInterceptorAdapter.doesUriMatchPattern
protected boolean doesUriMatchPattern(final String requestPath, final String patternUrl) { """ Does uri match pattern. @param requestPath the request path @param patternUrl the pattern @return the boolean """ val pattern = Pattern.compile('/' + patternUrl + "(/)*$"); return pattern.matche...
java
protected boolean doesUriMatchPattern(final String requestPath, final String patternUrl) { val pattern = Pattern.compile('/' + patternUrl + "(/)*$"); return pattern.matcher(requestPath).find(); }
[ "protected", "boolean", "doesUriMatchPattern", "(", "final", "String", "requestPath", ",", "final", "String", "patternUrl", ")", "{", "val", "pattern", "=", "Pattern", ".", "compile", "(", "'", "'", "+", "patternUrl", "+", "\"(/)*$\"", ")", ";", "return", "p...
Does uri match pattern. @param requestPath the request path @param patternUrl the pattern @return the boolean
[ "Does", "uri", "match", "pattern", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20HandlerInterceptorAdapter.java#L132-L135
qiniu/java-sdk
src/main/java/com/qiniu/storage/BucketManager.java
BucketManager.prefetch
public void prefetch(String bucket, String key) throws QiniuException { """ 对于设置了镜像存储的空间,从镜像源站抓取指定名称的资源并存储到该空间中 如果该空间中已存在该名称的资源,则会将镜像源站的资源覆盖空间中相同名称的资源 @param bucket 空间名称 @param key 文件名称 @throws QiniuException """ String resource = encodedEntry(bucket, key); String path = String.format(...
java
public void prefetch(String bucket, String key) throws QiniuException { String resource = encodedEntry(bucket, key); String path = String.format("/prefetch/%s", resource); Response res = ioPost(bucket, path); if (!res.isOK()) { throw new QiniuException(res); } ...
[ "public", "void", "prefetch", "(", "String", "bucket", ",", "String", "key", ")", "throws", "QiniuException", "{", "String", "resource", "=", "encodedEntry", "(", "bucket", ",", "key", ")", ";", "String", "path", "=", "String", ".", "format", "(", "\"/pref...
对于设置了镜像存储的空间,从镜像源站抓取指定名称的资源并存储到该空间中 如果该空间中已存在该名称的资源,则会将镜像源站的资源覆盖空间中相同名称的资源 @param bucket 空间名称 @param key 文件名称 @throws QiniuException
[ "对于设置了镜像存储的空间,从镜像源站抓取指定名称的资源并存储到该空间中", "如果该空间中已存在该名称的资源,则会将镜像源站的资源覆盖空间中相同名称的资源" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/BucketManager.java#L534-L542
Viascom/groundwork
service-result/src/main/java/ch/viascom/groundwork/serviceresult/exception/ServiceFault.java
ServiceFault.addRequestParam
public ServiceFault addRequestParam(String key, String value) { """ Adds a name-value pair to the request parameter list. @return The fault which is used. """ if (requestParams == null) requestParams = new ArrayList<>(); requestParams.add(new NameValuePair(key, value)); ...
java
public ServiceFault addRequestParam(String key, String value) { if (requestParams == null) requestParams = new ArrayList<>(); requestParams.add(new NameValuePair(key, value)); return this; }
[ "public", "ServiceFault", "addRequestParam", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "requestParams", "==", "null", ")", "requestParams", "=", "new", "ArrayList", "<>", "(", ")", ";", "requestParams", ".", "add", "(", "new", "Nam...
Adds a name-value pair to the request parameter list. @return The fault which is used.
[ "Adds", "a", "name", "-", "value", "pair", "to", "the", "request", "parameter", "list", "." ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/service-result/src/main/java/ch/viascom/groundwork/serviceresult/exception/ServiceFault.java#L63-L70
app55/app55-java
src/support/java/com/googlecode/openbeans/EventSetDescriptor.java
EventSetDescriptor.findAddRemoveListenerMethod
private Method findAddRemoveListenerMethod(Class<?> sourceClass, String methodName) throws IntrospectionException { """ Searches for {add|remove}Listener methods in the event source. Parameter check is also performed. @param sourceClass event source class @param methodName method name to search @return foun...
java
private Method findAddRemoveListenerMethod(Class<?> sourceClass, String methodName) throws IntrospectionException { try { return sourceClass.getMethod(methodName, listenerType); } catch (NoSuchMethodException e) { return findAddRemoveListnerMethodWithLessCheck(sourceClass, methodName); } catch (Exc...
[ "private", "Method", "findAddRemoveListenerMethod", "(", "Class", "<", "?", ">", "sourceClass", ",", "String", "methodName", ")", "throws", "IntrospectionException", "{", "try", "{", "return", "sourceClass", ".", "getMethod", "(", "methodName", ",", "listenerType", ...
Searches for {add|remove}Listener methods in the event source. Parameter check is also performed. @param sourceClass event source class @param methodName method name to search @return found method @throws IntrospectionException if no valid method found
[ "Searches", "for", "{", "add|remove", "}", "Listener", "methods", "in", "the", "event", "source", ".", "Parameter", "check", "is", "also", "performed", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/EventSetDescriptor.java#L338-L353
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imageutils/TiffUtil.java
TiffUtil.getOrientationFromTiffEntry
private static int getOrientationFromTiffEntry(InputStream is, int length, boolean isLittleEndian) throws IOException { """ Reads the orientation information from the TIFF entry. It is assumed that the entry has a TIFF orientation tag and that tag has already been consumed. @param is the input stream posit...
java
private static int getOrientationFromTiffEntry(InputStream is, int length, boolean isLittleEndian) throws IOException { if (length < 10) { return 0; } // orientation entry has type = short int type = StreamProcessor.readPackedInt(is, 2, isLittleEndian); if (type != TIFF_TYPE_SHORT) { ...
[ "private", "static", "int", "getOrientationFromTiffEntry", "(", "InputStream", "is", ",", "int", "length", ",", "boolean", "isLittleEndian", ")", "throws", "IOException", "{", "if", "(", "length", "<", "10", ")", "{", "return", "0", ";", "}", "// orientation e...
Reads the orientation information from the TIFF entry. It is assumed that the entry has a TIFF orientation tag and that tag has already been consumed. @param is the input stream positioned at the TIFF entry with tag already being consumed @param isLittleEndian whether the TIFF data is stored in little or big endian for...
[ "Reads", "the", "orientation", "information", "from", "the", "TIFF", "entry", ".", "It", "is", "assumed", "that", "the", "entry", "has", "a", "TIFF", "orientation", "tag", "and", "that", "tag", "has", "already", "been", "consumed", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageutils/TiffUtil.java#L160-L178
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java
InstantSearch.registerSearchView
@SuppressWarnings( { """ Registers a {@link android.support.v7.widget.SearchView} to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param searchView a SearchView whose query text will be used. """...
java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public void registerSearchView(@NonNull final Activity activity, @NonNull final android.support.v7.widget.SearchView searchView) { registerSearchView(activity, new SearchViewFacade(searchView)); }
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "public", "void", "registerSearchView", "(", "@", "NonNull", "final", "Activity", "activity", ",", "@", "NonNull", "final", "android", ".", "support", ".", ...
Registers a {@link android.support.v7.widget.SearchView} to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param searchView a SearchView whose query text will be used.
[ "Registers", "a", "{", "@link", "android", ".", "support", ".", "v7", ".", "widget", ".", "SearchView", "}", "to", "trigger", "search", "requests", "on", "text", "change", "replacing", "the", "current", "one", "if", "any", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L214-L217
henkexbg/gallery-api
src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java
GalleryController.returnResource
private ResponseEntity<InputStreamResource> returnResource(WebRequest request, GalleryFile galleryFile) throws IOException { """ Method used to return the binary of a gallery file ( {@link GalleryFile#getActualFile()} ). This method handles 304 redirects (if file has not changed) and range headers if requested b...
java
private ResponseEntity<InputStreamResource> returnResource(WebRequest request, GalleryFile galleryFile) throws IOException { LOG.debug("Entering returnResource()"); if (request.checkNotModified(galleryFile.getActualFile().lastModified())) { return null; } File file = galleryF...
[ "private", "ResponseEntity", "<", "InputStreamResource", ">", "returnResource", "(", "WebRequest", "request", ",", "GalleryFile", "galleryFile", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"Entering returnResource()\"", ")", ";", "if", "(", "reque...
Method used to return the binary of a gallery file ( {@link GalleryFile#getActualFile()} ). This method handles 304 redirects (if file has not changed) and range headers if requested by browser. The range parts is particularly important for videos. The correct response status is set depending on the circumstances. <p> ...
[ "Method", "used", "to", "return", "the", "binary", "of", "a", "gallery", "file", "(", "{", "@link", "GalleryFile#getActualFile", "()", "}", ")", ".", "This", "method", "handles", "304", "redirects", "(", "if", "file", "has", "not", "changed", ")", "and", ...
train
https://github.com/henkexbg/gallery-api/blob/530e68c225b5e8fc3b608d670b34bd539a5b0a71/src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java#L323-L358
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java
ReturnValueIgnored.methodReturnsSameTypeAsReceiver
private static Matcher<ExpressionTree> methodReturnsSameTypeAsReceiver() { """ Matches method invocations that return the same type as the receiver object. """ return new Matcher<ExpressionTree>() { @Override public boolean matches(ExpressionTree expressionTree, VisitorState state) { re...
java
private static Matcher<ExpressionTree> methodReturnsSameTypeAsReceiver() { return new Matcher<ExpressionTree>() { @Override public boolean matches(ExpressionTree expressionTree, VisitorState state) { return isSameType( ASTHelpers.getReceiverType(expressionTree), ASTHelper...
[ "private", "static", "Matcher", "<", "ExpressionTree", ">", "methodReturnsSameTypeAsReceiver", "(", ")", "{", "return", "new", "Matcher", "<", "ExpressionTree", ">", "(", ")", "{", "@", "Override", "public", "boolean", "matches", "(", "ExpressionTree", "expression...
Matches method invocations that return the same type as the receiver object.
[ "Matches", "method", "invocations", "that", "return", "the", "same", "type", "as", "the", "receiver", "object", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java#L161-L171
OpenTSDB/opentsdb
src/meta/Annotation.java
Annotation.getAnnotation
public static Deferred<Annotation> getAnnotation(final TSDB tsdb, final String tsuid, final long start_time) { """ Attempts to fetch a global or local annotation from storage @param tsdb The TSDB to use for storage access @param tsuid The TSUID as a string. May be empty if retrieving a global annotation ...
java
public static Deferred<Annotation> getAnnotation(final TSDB tsdb, final String tsuid, final long start_time) { if (tsuid != null && !tsuid.isEmpty()) { return getAnnotation(tsdb, UniqueId.stringToUid(tsuid), start_time); } return getAnnotation(tsdb, (byte[])null, start_time); }
[ "public", "static", "Deferred", "<", "Annotation", ">", "getAnnotation", "(", "final", "TSDB", "tsdb", ",", "final", "String", "tsuid", ",", "final", "long", "start_time", ")", "{", "if", "(", "tsuid", "!=", "null", "&&", "!", "tsuid", ".", "isEmpty", "(...
Attempts to fetch a global or local annotation from storage @param tsdb The TSDB to use for storage access @param tsuid The TSUID as a string. May be empty if retrieving a global annotation @param start_time The start time as a Unix epoch timestamp @return A valid annotation object if found, null if not
[ "Attempts", "to", "fetch", "a", "global", "or", "local", "annotation", "from", "storage" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/meta/Annotation.java#L244-L250
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.substringBetween
public static final Function<String, String> substringBetween(final String open, final String close) { """ <p> Returns the substring between open and close or null if there is no match. It calls {@link StringUtils#substringBetween(String, String, String)} </p> @param open the String before the substring, may...
java
public static final Function<String, String> substringBetween(final String open, final String close) { return new SubStringBetween(open, close); }
[ "public", "static", "final", "Function", "<", "String", ",", "String", ">", "substringBetween", "(", "final", "String", "open", ",", "final", "String", "close", ")", "{", "return", "new", "SubStringBetween", "(", "open", ",", "close", ")", ";", "}" ]
<p> Returns the substring between open and close or null if there is no match. It calls {@link StringUtils#substringBetween(String, String, String)} </p> @param open the String before the substring, may be null @param close the String after the substring, may be null @return the substring, null if no match
[ "<p", ">", "Returns", "the", "substring", "between", "open", "and", "close", "or", "null", "if", "there", "is", "no", "match", ".", "It", "calls", "{", "@link", "StringUtils#substringBetween", "(", "String", "String", "String", ")", "}", "<", "/", "p", "...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L4423-L4425
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.shutdown
public static void shutdown() throws SundialSchedulerException { """ Halts the Scheduler's firing of Triggers, and cleans up all resources associated with the Scheduler. """ logger.debug("shutdown() called."); try { getScheduler().shutdown(); scheduler = null; } catch (Excepti...
java
public static void shutdown() throws SundialSchedulerException { logger.debug("shutdown() called."); try { getScheduler().shutdown(); scheduler = null; } catch (Exception e) { throw new SundialSchedulerException("COULD NOT SHUTDOWN SCHEDULER!!!", e); } }
[ "public", "static", "void", "shutdown", "(", ")", "throws", "SundialSchedulerException", "{", "logger", ".", "debug", "(", "\"shutdown() called.\"", ")", ";", "try", "{", "getScheduler", "(", ")", ".", "shutdown", "(", ")", ";", "scheduler", "=", "null", ";"...
Halts the Scheduler's firing of Triggers, and cleans up all resources associated with the Scheduler.
[ "Halts", "the", "Scheduler", "s", "firing", "of", "Triggers", "and", "cleans", "up", "all", "resources", "associated", "with", "the", "Scheduler", "." ]
train
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L565-L575
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendLocalized
public DateTimeFormatterBuilder appendLocalized(FormatStyle dateStyle, FormatStyle timeStyle) { """ Appends a localized date-time pattern to the formatter. <p> This appends a localized section to the builder, suitable for outputting a date, time or date-time combination. The format of the localized section is ...
java
public DateTimeFormatterBuilder appendLocalized(FormatStyle dateStyle, FormatStyle timeStyle) { if (dateStyle == null && timeStyle == null) { throw new IllegalArgumentException("Either the date or time style must be non-null"); } appendInternal(new LocalizedPrinterParser(dateStyle, t...
[ "public", "DateTimeFormatterBuilder", "appendLocalized", "(", "FormatStyle", "dateStyle", ",", "FormatStyle", "timeStyle", ")", "{", "if", "(", "dateStyle", "==", "null", "&&", "timeStyle", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "...
Appends a localized date-time pattern to the formatter. <p> This appends a localized section to the builder, suitable for outputting a date, time or date-time combination. The format of the localized section is lazily looked up based on four items: <p><ul> <li>the {@code dateStyle} specified to this method <li>the {@co...
[ "Appends", "a", "localized", "date", "-", "time", "pattern", "to", "the", "formatter", ".", "<p", ">", "This", "appends", "a", "localized", "section", "to", "the", "builder", "suitable", "for", "outputting", "a", "date", "time", "or", "date", "-", "time", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L1135-L1141
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java
JsonFactory.fromString
public final <T> T fromString(String value, Class<T> destinationClass) throws IOException { """ Parses a string value as a JSON object, array, or value into a new instance of the given destination class using {@link JsonParser#parse(Class)}. @param value JSON string value @param destinationClass destination c...
java
public final <T> T fromString(String value, Class<T> destinationClass) throws IOException { return createJsonParser(value).parse(destinationClass); }
[ "public", "final", "<", "T", ">", "T", "fromString", "(", "String", "value", ",", "Class", "<", "T", ">", "destinationClass", ")", "throws", "IOException", "{", "return", "createJsonParser", "(", "value", ")", ".", "parse", "(", "destinationClass", ")", ";...
Parses a string value as a JSON object, array, or value into a new instance of the given destination class using {@link JsonParser#parse(Class)}. @param value JSON string value @param destinationClass destination class that has an accessible default constructor to use to create a new instance @return new instance of t...
[ "Parses", "a", "string", "value", "as", "a", "JSON", "object", "array", "or", "value", "into", "a", "new", "instance", "of", "the", "given", "destination", "class", "using", "{", "@link", "JsonParser#parse", "(", "Class", ")", "}", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java#L181-L183
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java
JobHistoryFileParserHadoop2.populatePut
private void populatePut(Put p, byte[] family, String key, long value) { """ populates a put for long values @param {@link Put} p @param {@link Constants} family @param String key @param long value """ byte[] valueBytes = null; valueBytes = (value != 0L) ? Bytes.toBytes(value) : Constants.ZERO_LON...
java
private void populatePut(Put p, byte[] family, String key, long value) { byte[] valueBytes = null; valueBytes = (value != 0L) ? Bytes.toBytes(value) : Constants.ZERO_LONG_BYTES; byte[] qualifier = Bytes.toBytes(getKey(key).toLowerCase()); p.addColumn(family, qualifier, valueBytes); }
[ "private", "void", "populatePut", "(", "Put", "p", ",", "byte", "[", "]", "family", ",", "String", "key", ",", "long", "value", ")", "{", "byte", "[", "]", "valueBytes", "=", "null", ";", "valueBytes", "=", "(", "value", "!=", "0L", ")", "?", "Byte...
populates a put for long values @param {@link Put} p @param {@link Constants} family @param String key @param long value
[ "populates", "a", "put", "for", "long", "values" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java#L611-L617
audit4j/audit4j-core
src/main/java/org/audit4j/core/schedule/ThreadPoolTaskScheduler.java
ThreadPoolTaskScheduler.errorHandlingTask
private Runnable errorHandlingTask(Runnable task, boolean isRepeatingTask) { """ Error handling task. @param task the task @param isRepeatingTask the is repeating task @return the runnable """ return TaskUtils.decorateTaskWithErrorHandler(task, this.errorHandler, isRepeatingTask); }
java
private Runnable errorHandlingTask(Runnable task, boolean isRepeatingTask) { return TaskUtils.decorateTaskWithErrorHandler(task, this.errorHandler, isRepeatingTask); }
[ "private", "Runnable", "errorHandlingTask", "(", "Runnable", "task", ",", "boolean", "isRepeatingTask", ")", "{", "return", "TaskUtils", ".", "decorateTaskWithErrorHandler", "(", "task", ",", "this", ".", "errorHandler", ",", "isRepeatingTask", ")", ";", "}" ]
Error handling task. @param task the task @param isRepeatingTask the is repeating task @return the runnable
[ "Error", "handling", "task", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/schedule/ThreadPoolTaskScheduler.java#L407-L409
apiman/apiman
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ok/OkUrlFactory.java
OkUrlFactory.createURLStreamHandler
@Override public URLStreamHandler createURLStreamHandler(final String protocol) { """ Creates a URLStreamHandler as a {@link java.net.URL#setURLStreamHandlerFactory}. <p>This code configures OkHttp to handle all HTTP and HTTPS connections created with {@link java.net.URL#openConnection()}: <pre> {@code Ok...
java
@Override public URLStreamHandler createURLStreamHandler(final String protocol) { if (!protocol.equals("http") && !protocol.equals("https")) return null; return new URLStreamHandler() { @Override protected URLConnection openConnection(URL url) { return open(url); } @Override protecte...
[ "@", "Override", "public", "URLStreamHandler", "createURLStreamHandler", "(", "final", "String", "protocol", ")", "{", "if", "(", "!", "protocol", ".", "equals", "(", "\"http\"", ")", "&&", "!", "protocol", ".", "equals", "(", "\"https\"", ")", ")", "return"...
Creates a URLStreamHandler as a {@link java.net.URL#setURLStreamHandlerFactory}. <p>This code configures OkHttp to handle all HTTP and HTTPS connections created with {@link java.net.URL#openConnection()}: <pre> {@code OkHttpClient okHttpClient = new OkHttpClient(); URL.setURLStreamHandlerFactory(new OkUrlFactory(ok...
[ "Creates", "a", "URLStreamHandler", "as", "a", "{", "@link", "java", ".", "net", ".", "URL#setURLStreamHandlerFactory", "}", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ok/OkUrlFactory.java#L70-L88
qiniu/java-sdk
src/main/java/com/qiniu/common/AutoRegion.java
AutoRegion.queryRegionInfo
public RegionInfo queryRegionInfo(String accessKey, String bucket) throws QiniuException { """ 首先从缓存读取Region信息,如果没有则发送请求从接口查询 @param accessKey 账号 accessKey @param bucket 空间名 @return 机房域名信息 """ RegionIndex index = new RegionIndex(accessKey, bucket); RegionInfo info = regions.get(index); ...
java
public RegionInfo queryRegionInfo(String accessKey, String bucket) throws QiniuException { RegionIndex index = new RegionIndex(accessKey, bucket); RegionInfo info = regions.get(index); if (info == null) { UCRet ret = getRegionJson(index); try { info = Regi...
[ "public", "RegionInfo", "queryRegionInfo", "(", "String", "accessKey", ",", "String", "bucket", ")", "throws", "QiniuException", "{", "RegionIndex", "index", "=", "new", "RegionIndex", "(", "accessKey", ",", "bucket", ")", ";", "RegionInfo", "info", "=", "region...
首先从缓存读取Region信息,如果没有则发送请求从接口查询 @param accessKey 账号 accessKey @param bucket 空间名 @return 机房域名信息
[ "首先从缓存读取Region信息,如果没有则发送请求从接口查询" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/common/AutoRegion.java#L78-L94
lievendoclo/Valkyrie-RCP
valkyrie-rcp-samples/valkyrie-rcp-simple-sample/src/main/java/org/valkyriercp/sample/simple/domain/SimpleValidationRulesSource.java
SimpleValidationRulesSource.createContactRules
private Rules createContactRules() { """ Construct the rules that are used to validate a Contact domain object. @return validation rules @see Rules """ // Construct a Rules object that contains all the constraints we need to apply // to our domain object. The Rules class offers a lot of convenience metho...
java
private Rules createContactRules() { // Construct a Rules object that contains all the constraints we need to apply // to our domain object. The Rules class offers a lot of convenience methods // for creating constraints on named properties. return new Rules(Contact.class) { protected void initRules() { ...
[ "private", "Rules", "createContactRules", "(", ")", "{", "// Construct a Rules object that contains all the constraints we need to apply", "// to our domain object. The Rules class offers a lot of convenience methods", "// for creating constraints on named properties.", "return", "new", "Rules...
Construct the rules that are used to validate a Contact domain object. @return validation rules @see Rules
[ "Construct", "the", "rules", "that", "are", "used", "to", "validate", "a", "Contact", "domain", "object", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-samples/valkyrie-rcp-simple-sample/src/main/java/org/valkyriercp/sample/simple/domain/SimpleValidationRulesSource.java#L73-L104
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java
ListWidget.setupHost
private void setupHost(ListItemHostWidget host, Widget view, final int dataIndex) { """ Set up the view at specified position in {@link Adapter} @param dataIndex position in {@link Adapter} associated with this layout. @return host view """ boolean selected = setupView(view, dataIndex); host....
java
private void setupHost(ListItemHostWidget host, Widget view, final int dataIndex) { boolean selected = setupView(view, dataIndex); host.setGuest(view, dataIndex); host.setSelected(selected); host.requestLayout(); if (mContent.getChildren().contains(host)) { Log.d(Log...
[ "private", "void", "setupHost", "(", "ListItemHostWidget", "host", ",", "Widget", "view", ",", "final", "int", "dataIndex", ")", "{", "boolean", "selected", "=", "setupView", "(", "view", ",", "dataIndex", ")", ";", "host", ".", "setGuest", "(", "view", ",...
Set up the view at specified position in {@link Adapter} @param dataIndex position in {@link Adapter} associated with this layout. @return host view
[ "Set", "up", "the", "view", "at", "specified", "position", "in", "{" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L930-L943
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.addEntries
public static void addEntries(File zip, ZipEntrySource[] entries, OutputStream destOut) { """ Copies an existing ZIP file and appends it with new entries. @param zip an existing ZIP file (only read). @param entries new ZIP entries appended. @param destOut new ZIP destination output stream """ if (l...
java
public static void addEntries(File zip, ZipEntrySource[] entries, OutputStream destOut) { if (log.isDebugEnabled()) { log.debug("Copying '" + zip + "' to a stream and adding " + Arrays.asList(entries) + "."); } ZipOutputStream out = null; try { out = new ZipOutputStream(destOut); copy...
[ "public", "static", "void", "addEntries", "(", "File", "zip", ",", "ZipEntrySource", "[", "]", "entries", ",", "OutputStream", "destOut", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Copying '\"", "+...
Copies an existing ZIP file and appends it with new entries. @param zip an existing ZIP file (only read). @param entries new ZIP entries appended. @param destOut new ZIP destination output stream
[ "Copies", "an", "existing", "ZIP", "file", "and", "appends", "it", "with", "new", "entries", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2192-L2209
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getImagesByIdsWithServiceResponseAsync
public Observable<ServiceResponse<List<Image>>> getImagesByIdsWithServiceResponseAsync(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter) { """ Get images by id for a given project iteration. This API will return a set of Images for the specified tags and optionally iteration. If no ...
java
public Observable<ServiceResponse<List<Image>>> getImagesByIdsWithServiceResponseAsync(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter) { if (projectId == null) { throw new IllegalArgumentException("Parameter projectId is required and cannot be null."); } ...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "Image", ">", ">", ">", "getImagesByIdsWithServiceResponseAsync", "(", "UUID", "projectId", ",", "GetImagesByIdsOptionalParameter", "getImagesByIdsOptionalParameter", ")", "{", "if", "(", "projectId", "==...
Get images by id for a given project iteration. This API will return a set of Images for the specified tags and optionally iteration. If no iteration is specified the current workspace is used. @param projectId The project id @param getImagesByIdsOptionalParameter the object representing the optional parameters to be ...
[ "Get", "images", "by", "id", "for", "a", "given", "project", "iteration", ".", "This", "API", "will", "return", "a", "set", "of", "Images", "for", "the", "specified", "tags", "and", "optionally", "iteration", ".", "If", "no", "iteration", "is", "specified"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L4331-L4342
kuali/ojb-1.0.4
src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java
PersonArticleManagerPBBean.storeUsingSubBeans
public void storeUsingSubBeans(List articles, List persons) { """ Stores article and persons using other beans. @ejb:interface-method """ //store all objects ArticleManagerPBLocal am = getArticleManager(); PersonManagerPBLocal pm = getPersonManager(); am.storeArticles(art...
java
public void storeUsingSubBeans(List articles, List persons) { //store all objects ArticleManagerPBLocal am = getArticleManager(); PersonManagerPBLocal pm = getPersonManager(); am.storeArticles(articles); pm.storePersons(persons); }
[ "public", "void", "storeUsingSubBeans", "(", "List", "articles", ",", "List", "persons", ")", "{", "//store all objects\r", "ArticleManagerPBLocal", "am", "=", "getArticleManager", "(", ")", ";", "PersonManagerPBLocal", "pm", "=", "getPersonManager", "(", ")", ";", ...
Stores article and persons using other beans. @ejb:interface-method
[ "Stores", "article", "and", "persons", "using", "other", "beans", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java#L149-L156
mattprecious/telescope
telescope/src/main/java/com/mattprecious/telescope/FileProvider.java
FileProvider.attachInfo
@Override public void attachInfo(Context context, ProviderInfo info) { """ After the FileProvider is instantiated, this method is called to provide the system with information about the provider. @param context A {@link Context} for the current component. @param info A {@link ProviderInfo} for the new provide...
java
@Override public void attachInfo(Context context, ProviderInfo info) { super.attachInfo(context, info); // Sanity check our security if (info.exported) { throw new SecurityException("Provider must not be exported"); } if (!info.grantUriPermissions) { throw new SecurityException("Provide...
[ "@", "Override", "public", "void", "attachInfo", "(", "Context", "context", ",", "ProviderInfo", "info", ")", "{", "super", ".", "attachInfo", "(", "context", ",", "info", ")", ";", "// Sanity check our security", "if", "(", "info", ".", "exported", ")", "{"...
After the FileProvider is instantiated, this method is called to provide the system with information about the provider. @param context A {@link Context} for the current component. @param info A {@link ProviderInfo} for the new provider.
[ "After", "the", "FileProvider", "is", "instantiated", "this", "method", "is", "called", "to", "provide", "the", "system", "with", "information", "about", "the", "provider", "." ]
train
https://github.com/mattprecious/telescope/blob/ce5e2710fb16ee214026fc25b091eb946fdbbb3c/telescope/src/main/java/com/mattprecious/telescope/FileProvider.java#L347-L359
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.recognizePrintedTextAsync
public Observable<OcrResult> recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter) { """ Optical Character Recognition (OCR) detects printed text in an image and extracts the recognized characters into a machine-usable characte...
java
public Observable<OcrResult> recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter) { return recognizePrintedTextWithServiceResponseAsync(detectOrientation, url, recognizePrintedTextOptionalParameter).map(new Func1<ServiceRes...
[ "public", "Observable", "<", "OcrResult", ">", "recognizePrintedTextAsync", "(", "boolean", "detectOrientation", ",", "String", "url", ",", "RecognizePrintedTextOptionalParameter", "recognizePrintedTextOptionalParameter", ")", "{", "return", "recognizePrintedTextWithServiceRespon...
Optical Character Recognition (OCR) detects printed text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl...
[ "Optical", "Character", "Recognition", "(", "OCR", ")", "detects", "printed", "text", "in", "an", "image", "and", "extracts", "the", "recognized", "characters", "into", "a", "machine", "-", "usable", "character", "stream", ".", "Upon", "success", "the", "OCR",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1927-L1934
JDBDT/jdbdt
src/main/java/org/jdbdt/JDBDT.java
JDBDT.assertEmpty
@SafeVarargs public static void assertEmpty(String message, DataSource... dataSources) throws DBAssertionError { """ Assert that the given data sources have no rows (error message variant). @param message Assertion error message. @param dataSources Data sources. @throws DBAssertionError if the assertion fai...
java
@SafeVarargs public static void assertEmpty(String message, DataSource... dataSources) throws DBAssertionError { multipleEmptyStateAssertions(CallInfo.create(message), dataSources); }
[ "@", "SafeVarargs", "public", "static", "void", "assertEmpty", "(", "String", "message", ",", "DataSource", "...", "dataSources", ")", "throws", "DBAssertionError", "{", "multipleEmptyStateAssertions", "(", "CallInfo", ".", "create", "(", "message", ")", ",", "dat...
Assert that the given data sources have no rows (error message variant). @param message Assertion error message. @param dataSources Data sources. @throws DBAssertionError if the assertion fails. @see #assertEmpty(String,DataSource) @see #assertState(String,DataSet...) @see #empty(DataSource) @since 1.2
[ "Assert", "that", "the", "given", "data", "sources", "have", "no", "rows", "(", "error", "message", "variant", ")", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L701-L704
stripe/stripe-android
stripe/src/main/java/com/stripe/android/Stripe.java
Stripe.createCvcUpdateTokenSynchronous
@Nullable public Token createCvcUpdateTokenSynchronous(@NonNull String cvc) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { """ Blocking method to create a {@link Token} for CVC updating. ...
java
@Nullable public Token createCvcUpdateTokenSynchronous(@NonNull String cvc) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createCvcUpdateTokenSynchronous(cvc, mDefaultPublishab...
[ "@", "Nullable", "public", "Token", "createCvcUpdateTokenSynchronous", "(", "@", "NonNull", "String", "cvc", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", ",", "APIConnectionException", ",", "CardException", ",", "APIException", "{", "return", ...
Blocking method to create a {@link Token} for CVC updating. Do not call this on the UI thread or your app will crash. The method uses the currently set {@link #mDefaultPublishableKey}. @param cvc the CVC to use for this token @return a {@link Token} that can be used for this card @throws AuthenticationException failu...
[ "Blocking", "method", "to", "create", "a", "{", "@link", "Token", "}", "for", "CVC", "updating", ".", "Do", "not", "call", "this", "on", "the", "UI", "thread", "or", "your", "app", "will", "crash", ".", "The", "method", "uses", "the", "currently", "set...
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/Stripe.java#L631-L639
allure-framework/allure-java
allure-java-commons/src/main/java/io/qameta/allure/AllureLifecycle.java
AllureLifecycle.startPrepareFixture
public void startPrepareFixture(final String containerUuid, final String uuid, final FixtureResult result) { """ Start a new prepare fixture with given parent. @param containerUuid the uuid of parent container. @param uuid the fixture uuid. @param result the fixture. """ storage.ge...
java
public void startPrepareFixture(final String containerUuid, final String uuid, final FixtureResult result) { storage.getContainer(containerUuid).ifPresent(container -> { synchronized (storage) { container.getBefores().add(result); } }); notifier.beforeFixt...
[ "public", "void", "startPrepareFixture", "(", "final", "String", "containerUuid", ",", "final", "String", "uuid", ",", "final", "FixtureResult", "result", ")", "{", "storage", ".", "getContainer", "(", "containerUuid", ")", ".", "ifPresent", "(", "container", "-...
Start a new prepare fixture with given parent. @param containerUuid the uuid of parent container. @param uuid the fixture uuid. @param result the fixture.
[ "Start", "a", "new", "prepare", "fixture", "with", "given", "parent", "." ]
train
https://github.com/allure-framework/allure-java/blob/64015ca2b789aa6f7b19c793f1512e2f11d0174e/allure-java-commons/src/main/java/io/qameta/allure/AllureLifecycle.java#L183-L192
teknux-org/jetty-bootstrap
jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java
JettyBootstrap.addExplodedWarAppFromClasspath
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor, String contextPath) throws JettyBootstrapException { """ Add an exploded (not packaged) War application from the current classpath, specifying the context path. @param explodedWar the exploded war path @param descriptor...
java
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor, String contextPath) throws JettyBootstrapException { ExplodedWarAppJettyHandler explodedWarAppJettyHandler = new ExplodedWarAppJettyHandler(getInitializedConfiguration()); explodedWarAppJettyHandler.setWebAppBaseF...
[ "public", "WebAppContext", "addExplodedWarAppFromClasspath", "(", "String", "explodedWar", ",", "String", "descriptor", ",", "String", "contextPath", ")", "throws", "JettyBootstrapException", "{", "ExplodedWarAppJettyHandler", "explodedWarAppJettyHandler", "=", "new", "Explod...
Add an exploded (not packaged) War application from the current classpath, specifying the context path. @param explodedWar the exploded war path @param descriptor the web.xml descriptor path @param contextPath the path (base URL) to make the resource available @return WebAppContext @throws JettyBootstrapException on f...
[ "Add", "an", "exploded", "(", "not", "packaged", ")", "War", "application", "from", "the", "current", "classpath", "specifying", "the", "context", "path", "." ]
train
https://github.com/teknux-org/jetty-bootstrap/blob/c16e710b833084c650fce35aa8c1ccaf83cd93ef/jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java#L375-L385
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/misc/AgentUtils.java
AgentUtils.injectConfigurations
public static void injectConfigurations( String karafEtc, String applicationName, String scopedInstancePath, String domain, String ipAddress ) { """ Generates configuration files from templates. @param karafEtc Karaf's etc directory @param applicationName the application name @param scopedInstanc...
java
public static void injectConfigurations( String karafEtc, String applicationName, String scopedInstancePath, String domain, String ipAddress ) { File injectionDir = new File( karafEtc, INJECTED_CONFIGS_DIR ); if( injectionDir.isDirectory()) { for( File source : Utils.listAllFiles( injectionDir, "...
[ "public", "static", "void", "injectConfigurations", "(", "String", "karafEtc", ",", "String", "applicationName", ",", "String", "scopedInstancePath", ",", "String", "domain", ",", "String", "ipAddress", ")", "{", "File", "injectionDir", "=", "new", "File", "(", ...
Generates configuration files from templates. @param karafEtc Karaf's etc directory @param applicationName the application name @param scopedInstancePath the scoped instance path @param domain the domain @param ipAddress the IP address
[ "Generates", "configuration", "files", "from", "templates", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/misc/AgentUtils.java#L272-L303
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/AbstractDatabase.java
AbstractDatabase.setLogLevel
@Deprecated public static void setLogLevel(@NonNull LogDomain domain, @NonNull LogLevel level) { """ Set log level for the given log domain. @param domain The log domain @param level The log level @deprecated As of 2.5 because it is being replaced with the {@link com.couchbase.lite.Log#getConsole() getC...
java
@Deprecated public static void setLogLevel(@NonNull LogDomain domain, @NonNull LogLevel level) { if (domain == null) { throw new IllegalArgumentException("domain cannot be null."); } if (level == null) { throw new IllegalArgumentException("level cannot be null."); } Log.setLogLevel(domain, ...
[ "@", "Deprecated", "public", "static", "void", "setLogLevel", "(", "@", "NonNull", "LogDomain", "domain", ",", "@", "NonNull", "LogLevel", "level", ")", "{", "if", "(", "domain", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"dom...
Set log level for the given log domain. @param domain The log domain @param level The log level @deprecated As of 2.5 because it is being replaced with the {@link com.couchbase.lite.Log#getConsole() getConsole} method from the {@link #LOG log} property. This method has been replaced with a no-op to preserve API comp...
[ "Set", "log", "level", "for", "the", "given", "log", "domain", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/AbstractDatabase.java#L184-L190
kiegroup/drools
kie-ci/src/main/java/org/kie/api/builder/helper/KieModuleDeploymentHelperImpl.java
KieModuleDeploymentHelperImpl.loadResources
private static List<KJarResource> loadResources(List<String> resourceFilePaths) { """ Find the resource files specified and create {@link KJarResource} instances from them. @param resourceFilePaths A list of resource files or directories containing resource files @return A List of {@link KJarResource} instance...
java
private static List<KJarResource> loadResources(List<String> resourceFilePaths) { List<KJarResource> kjarResources = new ArrayList<KieModuleDeploymentHelperImpl.KJarResource>(); for( String filePath : resourceFilePaths ) { if( filePath.endsWith("/") ) { try { ...
[ "private", "static", "List", "<", "KJarResource", ">", "loadResources", "(", "List", "<", "String", ">", "resourceFilePaths", ")", "{", "List", "<", "KJarResource", ">", "kjarResources", "=", "new", "ArrayList", "<", "KieModuleDeploymentHelperImpl", ".", "KJarReso...
Find the resource files specified and create {@link KJarResource} instances from them. @param resourceFilePaths A list of resource files or directories containing resource files @return A List of {@link KJarResource} instances representing the given list of resource files
[ "Find", "the", "resource", "files", "specified", "and", "create", "{", "@link", "KJarResource", "}", "instances", "from", "them", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-ci/src/main/java/org/kie/api/builder/helper/KieModuleDeploymentHelperImpl.java#L484-L505
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/text/CharTrieIndex.java
CharTrieIndex.indexFulltext
public static CharTrie indexFulltext(Collection<String> documents, int maxLevels, int minWeight) { """ Index fulltext char trie. @param documents the documents @param maxLevels the max levels @param minWeight the min weight @return the char trie """ return create(documents, maxLevels, minWeight, fals...
java
public static CharTrie indexFulltext(Collection<String> documents, int maxLevels, int minWeight) { return create(documents, maxLevels, minWeight, false); }
[ "public", "static", "CharTrie", "indexFulltext", "(", "Collection", "<", "String", ">", "documents", ",", "int", "maxLevels", ",", "int", "minWeight", ")", "{", "return", "create", "(", "documents", ",", "maxLevels", ",", "minWeight", ",", "false", ")", ";",...
Index fulltext char trie. @param documents the documents @param maxLevels the max levels @param minWeight the min weight @return the char trie
[ "Index", "fulltext", "char", "trie", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/CharTrieIndex.java#L89-L91
StefanLiebenberg/kute
kute-core/src/main/java/slieb/kute/Kute.java
Kute.renameResource
public static RenamedPathResource renameResource(String path, Resource.Readable resource) { """ Create a resource with alternate name @param resource Any resource. @param path The new path location for this resource. @return A resource of type A extends...
java
public static RenamedPathResource renameResource(String path, Resource.Readable resource) { return new RenamedPathResource(path, resource); }
[ "public", "static", "RenamedPathResource", "renameResource", "(", "String", "path", ",", "Resource", ".", "Readable", "resource", ")", "{", "return", "new", "RenamedPathResource", "(", "path", ",", "resource", ")", ";", "}" ]
Create a resource with alternate name @param resource Any resource. @param path The new path location for this resource. @return A resource of type A extends Resource that is a copy of the old resource, but with a new name.
[ "Create", "a", "resource", "with", "alternate", "name" ]
train
https://github.com/StefanLiebenberg/kute/blob/1db0e8d2c76459d22c7d4b0ba99c18f74748f6fd/kute-core/src/main/java/slieb/kute/Kute.java#L176-L179
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.traceMethodsWhen
public ProxyDataSourceBuilder traceMethodsWhen(TracingMethodListener.TracingCondition condition, TracingMethodListener.TracingMessageConsumer messageConsumer) { """ Enable {@link TracingMethodListener}. When given condition returns {@code true}, it prints out trace log. The condition is used for dynamically tu...
java
public ProxyDataSourceBuilder traceMethodsWhen(TracingMethodListener.TracingCondition condition, TracingMethodListener.TracingMessageConsumer messageConsumer) { this.createTracingMethodListener = true; this.tracingCondition = condition; this.tracingMessageConsumer = messageConsumer; retu...
[ "public", "ProxyDataSourceBuilder", "traceMethodsWhen", "(", "TracingMethodListener", ".", "TracingCondition", "condition", ",", "TracingMethodListener", ".", "TracingMessageConsumer", "messageConsumer", ")", "{", "this", ".", "createTracingMethodListener", "=", "true", ";", ...
Enable {@link TracingMethodListener}. When given condition returns {@code true}, it prints out trace log. The condition is used for dynamically turn on/off tracing. The message consumer receives a tracing message that can be printed to console, logger, etc. @param condition decide to turn on/off tracing @param ...
[ "Enable", "{", "@link", "TracingMethodListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L928-L933
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java
FastTrackUtility.skipToNextMatchingShort
public static int skipToNextMatchingShort(byte[] buffer, int offset, int value) { """ Skip to the next matching short value. @param buffer input data array @param offset start offset into the input array @param value value to match @return offset of matching pattern """ int nextOffset = offset; ...
java
public static int skipToNextMatchingShort(byte[] buffer, int offset, int value) { int nextOffset = offset; while (getShort(buffer, nextOffset) != value) { ++nextOffset; } nextOffset += 2; return nextOffset; }
[ "public", "static", "int", "skipToNextMatchingShort", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "value", ")", "{", "int", "nextOffset", "=", "offset", ";", "while", "(", "getShort", "(", "buffer", ",", "nextOffset", ")", "!=", "v...
Skip to the next matching short value. @param buffer input data array @param offset start offset into the input array @param value value to match @return offset of matching pattern
[ "Skip", "to", "the", "next", "matching", "short", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L226-L236
alkacon/opencms-core
src/org/opencms/db/generic/CmsUserQueryBuilder.java
CmsUserQueryBuilder.addSorting
protected void addSorting(CmsSelectQuery select, TableAlias users, CmsUserSearchParameters searchParams) { """ Adds a sort order to an SQL query.<p> @param select the query @param users the user table alias @param searchParams the user search criteria """ boolean ascending = searchParams.isAscend...
java
protected void addSorting(CmsSelectQuery select, TableAlias users, CmsUserSearchParameters searchParams) { boolean ascending = searchParams.isAscending(); String ordering = getSortExpression(users, searchParams); if (ascending) { ordering += " ASC"; } else { orde...
[ "protected", "void", "addSorting", "(", "CmsSelectQuery", "select", ",", "TableAlias", "users", ",", "CmsUserSearchParameters", "searchParams", ")", "{", "boolean", "ascending", "=", "searchParams", ".", "isAscending", "(", ")", ";", "String", "ordering", "=", "ge...
Adds a sort order to an SQL query.<p> @param select the query @param users the user table alias @param searchParams the user search criteria
[ "Adds", "a", "sort", "order", "to", "an", "SQL", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsUserQueryBuilder.java#L345-L356
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/DatePickerSettings.java
DatePickerSettings.setDateRangeLimits
public boolean setDateRangeLimits(LocalDate firstAllowedDate, LocalDate lastAllowedDate) { """ setDateRangeLimits, This is a convenience function, for setting a DateVetoPolicy that will limit the allowed dates in the parent object to a specified minimum and maximum date value. Calling this function will always r...
java
public boolean setDateRangeLimits(LocalDate firstAllowedDate, LocalDate lastAllowedDate) { if (!hasParent()) { throw new RuntimeException("DatePickerSettings.setDateRangeLimits(), " + "A date range limit can only be set after constructing the parent " + "DatePicker or...
[ "public", "boolean", "setDateRangeLimits", "(", "LocalDate", "firstAllowedDate", ",", "LocalDate", "lastAllowedDate", ")", "{", "if", "(", "!", "hasParent", "(", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"DatePickerSettings.setDateRangeLimits(), \"", "...
setDateRangeLimits, This is a convenience function, for setting a DateVetoPolicy that will limit the allowed dates in the parent object to a specified minimum and maximum date value. Calling this function will always replace any existing DateVetoPolicy. If you only want to limit one side of the date range, then you ca...
[ "setDateRangeLimits", "This", "is", "a", "convenience", "function", "for", "setting", "a", "DateVetoPolicy", "that", "will", "limit", "the", "allowed", "dates", "in", "the", "parent", "object", "to", "a", "specified", "minimum", "and", "maximum", "date", "value"...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/DatePickerSettings.java#L1404-L1418
cdk/cdk
legacy/src/main/java/org/openscience/cdk/io/inchi/INChIHandler.java
INChIHandler.startElement
@Override public void startElement(String uri, String local, String raw, Attributes atts) { """ Implementation of the startElement() procedure overwriting the DefaultHandler interface. @param uri the Universal Resource Identifier @param local the local name (without namespace part) @param raw ...
java
@Override public void startElement(String uri, String local, String raw, Attributes atts) { currentChars = ""; logger.debug("startElement: ", raw); logger.debug("uri: ", uri); logger.debug("local: ", local); logger.debug("raw: ", raw); if ("INChI".equals(local)) { ...
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "local", ",", "String", "raw", ",", "Attributes", "atts", ")", "{", "currentChars", "=", "\"\"", ";", "logger", ".", "debug", "(", "\"startElement: \"", ",", "raw", ")"...
Implementation of the startElement() procedure overwriting the DefaultHandler interface. @param uri the Universal Resource Identifier @param local the local name (without namespace part) @param raw the complete element name (with namespace part) @param atts the attributes of this element
[ "Implementation", "of", "the", "startElement", "()", "procedure", "overwriting", "the", "DefaultHandler", "interface", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/io/inchi/INChIHandler.java#L131-L148
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/entity/StreamMessage.java
StreamMessage.addField
@SuppressWarnings( { """ Add field to message body. @param key key @param value value """"unchecked", "rawtypes"}) public void addField(String key, Object value) { if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false) { this.body = Maps.newL...
java
@SuppressWarnings({"unchecked", "rawtypes"}) public void addField(String key, Object value) { if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false) { this.body = Maps.newLinkedHashMap(); } ((Map) this.body).put(key, value); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "void", "addField", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "this", ".", "body", "==", "null", "||", "Map", ".", "class", ".", "isAs...
Add field to message body. @param key key @param value value
[ "Add", "field", "to", "message", "body", "." ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/entity/StreamMessage.java#L94-L103
jhalterman/failsafe
src/main/java/net/jodah/failsafe/CircuitBreaker.java
CircuitBreaker.withFailureThreshold
public CircuitBreaker<R> withFailureThreshold(int failureThreshold) { """ Sets the number of successive failures that must occur when in a closed state in order to open the circuit. @throws IllegalArgumentException if {@code failureThresh} < 1 """ Assert.isTrue(failureThreshold >= 1, "failureThreshold m...
java
public CircuitBreaker<R> withFailureThreshold(int failureThreshold) { Assert.isTrue(failureThreshold >= 1, "failureThreshold must be greater than or equal to 1"); return withFailureThreshold(failureThreshold, failureThreshold); }
[ "public", "CircuitBreaker", "<", "R", ">", "withFailureThreshold", "(", "int", "failureThreshold", ")", "{", "Assert", ".", "isTrue", "(", "failureThreshold", ">=", "1", ",", "\"failureThreshold must be greater than or equal to 1\"", ")", ";", "return", "withFailureThre...
Sets the number of successive failures that must occur when in a closed state in order to open the circuit. @throws IllegalArgumentException if {@code failureThresh} < 1
[ "Sets", "the", "number", "of", "successive", "failures", "that", "must", "occur", "when", "in", "a", "closed", "state", "in", "order", "to", "open", "the", "circuit", "." ]
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/CircuitBreaker.java#L298-L301
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java
MPIO.changeConnection
public void changeConnection(MEConnection downConn, MEConnection upConn) { """ Indiciates a failed connection, a newly created connection, or a connection swap. If upConn is null, then connection "downConn" has been removed from the system. If downConn is null, then connection "upConn" has been added to the s...
java
public void changeConnection(MEConnection downConn, MEConnection upConn) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "changeConnection", new Object[] { this, downConn, upConn} ); if(downConn != null) { //remove the connection which has gone down re...
[ "public", "void", "changeConnection", "(", "MEConnection", "downConn", ",", "MEConnection", "upConn", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "...
Indiciates a failed connection, a newly created connection, or a connection swap. If upConn is null, then connection "downConn" has been removed from the system. If downConn is null, then connection "upConn" has been added to the system. Otherwise, "downConn" has been removed and replaced by "upConn". @param downCo...
[ "Indiciates", "a", "failed", "connection", "a", "newly", "created", "connection", "or", "a", "connection", "swap", ".", "If", "upConn", "is", "null", "then", "connection", "downConn", "has", "been", "removed", "from", "the", "system", ".", "If", "downConn", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java#L478-L493
j256/simplejmx
src/main/java/com/j256/simplejmx/server/ReflectionMbean.java
ReflectionMbean.discoverAttributeMethods
private void discoverAttributeMethods(Map<String, JmxAttributeMethodInfo> attributeMethodInfoMap, Set<String> attributeNameSet, List<MBeanAttributeInfo> attributes, boolean ignoreErrors) { """ Find attribute methods from our object that will be exposed via JMX. """ for (Class<?> clazz = target.getClass();...
java
private void discoverAttributeMethods(Map<String, JmxAttributeMethodInfo> attributeMethodInfoMap, Set<String> attributeNameSet, List<MBeanAttributeInfo> attributes, boolean ignoreErrors) { for (Class<?> clazz = target.getClass(); clazz != Object.class; clazz = clazz.getSuperclass()) { discoverAttributeMethods(a...
[ "private", "void", "discoverAttributeMethods", "(", "Map", "<", "String", ",", "JmxAttributeMethodInfo", ">", "attributeMethodInfoMap", ",", "Set", "<", "String", ">", "attributeNameSet", ",", "List", "<", "MBeanAttributeInfo", ">", "attributes", ",", "boolean", "ig...
Find attribute methods from our object that will be exposed via JMX.
[ "Find", "attribute", "methods", "from", "our", "object", "that", "will", "be", "exposed", "via", "JMX", "." ]
train
https://github.com/j256/simplejmx/blob/1a04f52512dfa0a711ba0cc7023c604dbc82a352/src/main/java/com/j256/simplejmx/server/ReflectionMbean.java#L230-L245
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java
SwapFragmentPanel.onSwapToView
public void onSwapToView(final AjaxRequestTarget target, final Form<?> form) { """ Swaps from the edit fragment to the view fragment. @param target the target @param form the form """ if (target != null) { Animate.slideUpAndDown(edit, target); } else { LOGGER.error( "AjaxRequestTarget...
java
public void onSwapToView(final AjaxRequestTarget target, final Form<?> form) { if (target != null) { Animate.slideUpAndDown(edit, target); } else { LOGGER.error( "AjaxRequestTarget is null on method SwapFragmentPanel#onSwapToView(AjaxRequestTarget, Form)"); } swapFragments(); modeContext = Mo...
[ "public", "void", "onSwapToView", "(", "final", "AjaxRequestTarget", "target", ",", "final", "Form", "<", "?", ">", "form", ")", "{", "if", "(", "target", "!=", "null", ")", "{", "Animate", ".", "slideUpAndDown", "(", "edit", ",", "target", ")", ";", "...
Swaps from the edit fragment to the view fragment. @param target the target @param form the form
[ "Swaps", "from", "the", "edit", "fragment", "to", "the", "view", "fragment", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java#L148-L161
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateEqual
public static Object validateEqual(Object t1, Object t2, String errorMsg) throws ValidateException { """ 验证是否相等,不相等抛出异常<br> @param t1 对象1 @param t2 对象2 @param errorMsg 错误信息 @return 相同值 @throws ValidateException 验证异常 """ if (false == equal(t1, t2)) { throw new ValidateException(errorMsg); } ...
java
public static Object validateEqual(Object t1, Object t2, String errorMsg) throws ValidateException { if (false == equal(t1, t2)) { throw new ValidateException(errorMsg); } return t1; }
[ "public", "static", "Object", "validateEqual", "(", "Object", "t1", ",", "Object", "t2", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "equal", "(", "t1", ",", "t2", ")", ")", "{", "throw", "new", "Validate...
验证是否相等,不相等抛出异常<br> @param t1 对象1 @param t2 对象2 @param errorMsg 错误信息 @return 相同值 @throws ValidateException 验证异常
[ "验证是否相等,不相等抛出异常<br", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L248-L253
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/Rapids.java
Rapids.exec
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter") public static Val exec(String rapids, Session session) { """ Compute and return a value in this session. Any returned frame shares Vecs with the session (is not deep copied), and so must be deleted by the caller (with a Rapids "rm" call) or ...
java
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter") public static Val exec(String rapids, Session session) { try { H2O.incrementActiveRapidsCounter(); AstRoot ast = Rapids.parse(rapids); // Synchronize the session, to stop back-to-back overlapping Rapids calls // on the s...
[ "@", "SuppressWarnings", "(", "\"SynchronizationOnLocalVariableOrMethodParameter\"", ")", "public", "static", "Val", "exec", "(", "String", "rapids", ",", "Session", "session", ")", "{", "try", "{", "H2O", ".", "incrementActiveRapidsCounter", "(", ")", ";", "AstRoot...
Compute and return a value in this session. Any returned frame shares Vecs with the session (is not deep copied), and so must be deleted by the caller (with a Rapids "rm" call) or will disappear on session exit, or is a normal global frame. @param rapids expression to parse
[ "Compute", "and", "return", "a", "value", "in", "this", "session", ".", "Any", "returned", "frame", "shares", "Vecs", "with", "the", "session", "(", "is", "not", "deep", "copied", ")", "and", "so", "must", "be", "deleted", "by", "the", "caller", "(", "...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/Rapids.java#L85-L110
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/XmlConfigurer.java
XmlConfigurer.setSerializerConfigParameter
public void setSerializerConfigParameter(LSSerializer serializer, String parameterName, Object value) { """ Sets a config parameter on LSParser instance if settable. Otherwise logging unset parameter. @param serializer @param parameterName @param value """ if (serializer.getDomConfig().canSetParamet...
java
public void setSerializerConfigParameter(LSSerializer serializer, String parameterName, Object value) { if (serializer.getDomConfig().canSetParameter(parameterName, value)) { serializer.getDomConfig().setParameter(parameterName, value); } else { logParameterNotSet(parameterName, ...
[ "public", "void", "setSerializerConfigParameter", "(", "LSSerializer", "serializer", ",", "String", "parameterName", ",", "Object", "value", ")", "{", "if", "(", "serializer", ".", "getDomConfig", "(", ")", ".", "canSetParameter", "(", "parameterName", ",", "value...
Sets a config parameter on LSParser instance if settable. Otherwise logging unset parameter. @param serializer @param parameterName @param value
[ "Sets", "a", "config", "parameter", "on", "LSParser", "instance", "if", "settable", ".", "Otherwise", "logging", "unset", "parameter", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/XmlConfigurer.java#L204-L210
graknlabs/grakn
server/src/graql/reasoner/cache/SemanticCache.java
SemanticCache.propagateAnswersToQuery
private boolean propagateAnswersToQuery(ReasonerAtomicQuery target, CacheEntry<ReasonerAtomicQuery, SE> childMatch, boolean inferred) { """ NB: uses getEntry NB: target and childMatch.query() are in general not the same hence explicit arguments @param target query we want propagate the answers to @param childMa...
java
private boolean propagateAnswersToQuery(ReasonerAtomicQuery target, CacheEntry<ReasonerAtomicQuery, SE> childMatch, boolean inferred){ ReasonerAtomicQuery child = childMatch.query(); boolean[] newAnswersFound = {false}; boolean childGround = child.isGround(); getParents(target) ...
[ "private", "boolean", "propagateAnswersToQuery", "(", "ReasonerAtomicQuery", "target", ",", "CacheEntry", "<", "ReasonerAtomicQuery", ",", "SE", ">", "childMatch", ",", "boolean", "inferred", ")", "{", "ReasonerAtomicQuery", "child", "=", "childMatch", ".", "query", ...
NB: uses getEntry NB: target and childMatch.query() are in general not the same hence explicit arguments @param target query we want propagate the answers to @param childMatch entry to which we want to propagate answers @param inferred true if inferred answers should be propagated
[ "NB", ":", "uses", "getEntry", "NB", ":", "target", "and", "childMatch", ".", "query", "()", "are", "in", "general", "not", "the", "same", "hence", "explicit", "arguments" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/reasoner/cache/SemanticCache.java#L205-L222
osglworks/java-mvc
src/main/java/org/osgl/mvc/result/TooManyRequests.java
TooManyRequests.of
public static TooManyRequests of(int errorCode) { """ Returns a static TooManyRequests instance and set the {@link #payload} thread local with error code and default message. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @para...
java
public static TooManyRequests of(int errorCode) { if (_localizedErrorMsg()) { return of(errorCode, defaultMessage(TOO_MANY_REQUESTS)); } else { touchPayload().errorCode(errorCode); return _INSTANCE; } }
[ "public", "static", "TooManyRequests", "of", "(", "int", "errorCode", ")", "{", "if", "(", "_localizedErrorMsg", "(", ")", ")", "{", "return", "of", "(", "errorCode", ",", "defaultMessage", "(", "TOO_MANY_REQUESTS", ")", ")", ";", "}", "else", "{", "touchP...
Returns a static TooManyRequests instance and set the {@link #payload} thread local with error code and default message. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param errorCode the app defined error code @return a static TooManyRe...
[ "Returns", "a", "static", "TooManyRequests", "instance", "and", "set", "the", "{", "@link", "#payload", "}", "thread", "local", "with", "error", "code", "and", "default", "message", "." ]
train
https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/TooManyRequests.java#L164-L171
kiegroup/drools
drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java
RuleSheetParserUtil.getVariableList
public static List<Global> getVariableList( final List<String> variableCells ) { """ Create a list of Global model objects from cell contents. @param variableCella The cells containing text for all the global variables to set. @return A list of Variable classes, which can be added to the ruleset. """ ...
java
public static List<Global> getVariableList( final List<String> variableCells ){ final List<Global> variableList = new ArrayList<Global>(); if ( variableCells == null ) return variableList; for( String variableCell: variableCells ){ final StringTokenizer tokens = new StringTokenizer(...
[ "public", "static", "List", "<", "Global", ">", "getVariableList", "(", "final", "List", "<", "String", ">", "variableCells", ")", "{", "final", "List", "<", "Global", ">", "variableList", "=", "new", "ArrayList", "<", "Global", ">", "(", ")", ";", "if",...
Create a list of Global model objects from cell contents. @param variableCella The cells containing text for all the global variables to set. @return A list of Variable classes, which can be added to the ruleset.
[ "Create", "a", "list", "of", "Global", "model", "objects", "from", "cell", "contents", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L72-L91
Metatavu/edelphi
rest/src/main/java/fi/metatavu/edelphi/rest/AbstractApi.java
AbstractApi.streamResponse
protected Response streamResponse(byte[] data, String type) { """ Creates streamed response from byte array @param data data @param type content type @return Response """ try (InputStream byteStream = new ByteArrayInputStream(data)) { return streamResponse(type, byteStream, data.length); } c...
java
protected Response streamResponse(byte[] data, String type) { try (InputStream byteStream = new ByteArrayInputStream(data)) { return streamResponse(type, byteStream, data.length); } catch (IOException e) { logger.error("Failed to stream data to client", e); return createInternalServerError("Fa...
[ "protected", "Response", "streamResponse", "(", "byte", "[", "]", "data", ",", "String", "type", ")", "{", "try", "(", "InputStream", "byteStream", "=", "new", "ByteArrayInputStream", "(", "data", ")", ")", "{", "return", "streamResponse", "(", "type", ",", ...
Creates streamed response from byte array @param data data @param type content type @return Response
[ "Creates", "streamed", "response", "from", "byte", "array" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/rest/src/main/java/fi/metatavu/edelphi/rest/AbstractApi.java#L160-L167
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/client/rest/internal/Connector.java
Connector.validatePossibleEndpoint
private void validatePossibleEndpoint(String possibleEndpoint) throws IllegalArgumentException { """ Validate the possible endpoint String. @param possibleEndpoint @throws IllegalArgumentException if the String is not a valid endpoint """ if (!possibleEndpoint.contains(":")) { throw new...
java
private void validatePossibleEndpoint(String possibleEndpoint) throws IllegalArgumentException { if (!possibleEndpoint.contains(":")) { throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, possibleEndpoint)); } String[] compone...
[ "private", "void", "validatePossibleEndpoint", "(", "String", "possibleEndpoint", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "possibleEndpoint", ".", "contains", "(", "\":\"", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "REST...
Validate the possible endpoint String. @param possibleEndpoint @throws IllegalArgumentException if the String is not a valid endpoint
[ "Validate", "the", "possible", "endpoint", "String", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/client/rest/internal/Connector.java#L193-L206
Jasig/uPortal
uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BasePortletLayoutStatisticsController.java
BasePortletLayoutStatisticsController.getColumnDescriptions
@Override protected List<ColumnDescription> getColumnDescriptions( PortletLayoutAggregationDiscriminator reportColumnDiscriminator, F form) { """ Create column descriptions for the portlet report. The default column description is the group name, but those items that are singular will move to the ...
java
@Override protected List<ColumnDescription> getColumnDescriptions( PortletLayoutAggregationDiscriminator reportColumnDiscriminator, F form) { int groupSize = form.getGroups().size(); int portletSize = form.getPortlets().size(); String portletName = reportColumnDiscriminator.getP...
[ "@", "Override", "protected", "List", "<", "ColumnDescription", ">", "getColumnDescriptions", "(", "PortletLayoutAggregationDiscriminator", "reportColumnDiscriminator", ",", "F", "form", ")", "{", "int", "groupSize", "=", "form", ".", "getGroups", "(", ")", ".", "si...
Create column descriptions for the portlet report. The default column description is the group name, but those items that are singular will move to the report title and only those that have 2 or more values selected on the form will be in the column title. Format: P - G P G P - G where P is portlet name, G is group nam...
[ "Create", "column", "descriptions", "for", "the", "portlet", "report", ".", "The", "default", "column", "description", "is", "the", "group", "name", "but", "those", "items", "that", "are", "singular", "will", "move", "to", "the", "report", "title", "and", "o...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/BasePortletLayoutStatisticsController.java#L224-L244
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/collector/BytesRefTermStream.java
BytesRefTermStream.get
public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) { """ Instantiates a new reusable {@link BytesRefTermStream} based on the field type. """ if (indexFieldData instanceof IndexNumericFieldData) { IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFi...
java
public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) { if (indexFieldData instanceof IndexNumericFieldData) { IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFieldData; switch (numFieldData.getNumericType()) { case INT: return new I...
[ "public", "static", "BytesRefTermStream", "get", "(", "IndexReader", "reader", ",", "IndexFieldData", "indexFieldData", ")", "{", "if", "(", "indexFieldData", "instanceof", "IndexNumericFieldData", ")", "{", "IndexNumericFieldData", "numFieldData", "=", "(", "IndexNumer...
Instantiates a new reusable {@link BytesRefTermStream} based on the field type.
[ "Instantiates", "a", "new", "reusable", "{" ]
train
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/collector/BytesRefTermStream.java#L164-L183
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/map/AbstractIntObjectMap.java
AbstractIntObjectMap.keyOf
public int keyOf(final Object value) { """ Returns the first key the given value is associated with. It is often a good idea to first check with {@link #containsValue(Object)} whether there exists an association from a key to this value. Search order is guaranteed to be <i>identical</i> to the order used by meth...
java
public int keyOf(final Object value) { final int[] foundKey = new int[1]; boolean notFound = forEachPair( new IntObjectProcedure() { public boolean apply(int iterKey, Object iterValue) { boolean found = value == iterValue; if (found) foundKey[0] = iterKey; return !found; } } ); if (...
[ "public", "int", "keyOf", "(", "final", "Object", "value", ")", "{", "final", "int", "[", "]", "foundKey", "=", "new", "int", "[", "1", "]", ";", "boolean", "notFound", "=", "forEachPair", "(", "new", "IntObjectProcedure", "(", ")", "{", "public", "boo...
Returns the first key the given value is associated with. It is often a good idea to first check with {@link #containsValue(Object)} whether there exists an association from a key to this value. Search order is guaranteed to be <i>identical</i> to the order used by method {@link #forEachKey(IntProcedure)}. @param valu...
[ "Returns", "the", "first", "key", "the", "given", "value", "is", "associated", "with", ".", "It", "is", "often", "a", "good", "idea", "to", "first", "check", "with", "{", "@link", "#containsValue", "(", "Object", ")", "}", "whether", "there", "exists", "...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/map/AbstractIntObjectMap.java#L170-L183
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/ReflectUtil.java
ReflectUtil.setFieldValue
public static <T extends Object> T setFieldValue(Object obj, Field field, T fieldValue) { """ 设置field值 @param obj 对象 @param field 对象的字段 @param fieldValue 字段值 @param <T> 字段值泛型 @return 字段值 """ Assert.notNull(obj, "obj不能为空"); Assert.notNull(field, "field不能为空"); try { fiel...
java
public static <T extends Object> T setFieldValue(Object obj, Field field, T fieldValue) { Assert.notNull(obj, "obj不能为空"); Assert.notNull(field, "field不能为空"); try { field.set(obj, fieldValue); } catch (IllegalAccessException e) { String msg = StringUtils.format("类...
[ "public", "static", "<", "T", "extends", "Object", ">", "T", "setFieldValue", "(", "Object", "obj", ",", "Field", "field", ",", "T", "fieldValue", ")", "{", "Assert", ".", "notNull", "(", "obj", ",", "\"obj不能为空\");", "", "", "Assert", ".", "notNull", "...
设置field值 @param obj 对象 @param field 对象的字段 @param fieldValue 字段值 @param <T> 字段值泛型 @return 字段值
[ "设置field值" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/ReflectUtil.java#L370-L383
fcrepo4/fcrepo4
fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/responses/ViewHelpers.java
ViewHelpers.getVersionSubjectUrl
public String getVersionSubjectUrl(final UriInfo uriInfo, final Node subject) { """ Gets the URL of the node whose version is represented by the current node. The current implementation assumes the URI of that node will be the same as the breadcrumb entry that precedes one with the path "fcr:versions". @param...
java
public String getVersionSubjectUrl(final UriInfo uriInfo, final Node subject) { final Map<String, String> breadcrumbs = getNodeBreadcrumbs(uriInfo, subject); String lastUrl = null; for (final Map.Entry<String, String> entry : breadcrumbs.entrySet()) { if (entry.getValue().equals("fcr...
[ "public", "String", "getVersionSubjectUrl", "(", "final", "UriInfo", "uriInfo", ",", "final", "Node", "subject", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "breadcrumbs", "=", "getNodeBreadcrumbs", "(", "uriInfo", ",", "subject", ")", ";", ...
Gets the URL of the node whose version is represented by the current node. The current implementation assumes the URI of that node will be the same as the breadcrumb entry that precedes one with the path "fcr:versions". @param uriInfo the uri info @param subject the subject @return the URL of the node
[ "Gets", "the", "URL", "of", "the", "node", "whose", "version", "is", "represented", "by", "the", "current", "node", ".", "The", "current", "implementation", "assumes", "the", "URI", "of", "that", "node", "will", "be", "the", "same", "as", "the", "breadcrum...
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/responses/ViewHelpers.java#L136-L146
daimajia/AndroidImageSlider
library/src/main/java/com/daimajia/slider/library/SliderAdapter.java
SliderAdapter.onEnd
@Override public void onEnd(boolean result, BaseSliderView target) { """ When image download error, then remove. @param result @param target """ if(target.isErrorDisappear() == false || result == true){ return; } for (BaseSliderView slider: mImageContents){ ...
java
@Override public void onEnd(boolean result, BaseSliderView target) { if(target.isErrorDisappear() == false || result == true){ return; } for (BaseSliderView slider: mImageContents){ if(slider.equals(target)){ removeSlider(target); break...
[ "@", "Override", "public", "void", "onEnd", "(", "boolean", "result", ",", "BaseSliderView", "target", ")", "{", "if", "(", "target", ".", "isErrorDisappear", "(", ")", "==", "false", "||", "result", "==", "true", ")", "{", "return", ";", "}", "for", "...
When image download error, then remove. @param result @param target
[ "When", "image", "download", "error", "then", "remove", "." ]
train
https://github.com/daimajia/AndroidImageSlider/blob/e318cabdef668de985efdcc45ca304e2ac6f58b5/library/src/main/java/com/daimajia/slider/library/SliderAdapter.java#L96-L107
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.getDocument
public byte[] getDocument(String accountId, String templateId, String documentId) throws ApiException { """ Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify &#x60;combined&#x60; to retrieve all d...
java
public byte[] getDocument(String accountId, String templateId, String documentId) throws ApiException { return getDocument(accountId, templateId, documentId, null); }
[ "public", "byte", "[", "]", "getDocument", "(", "String", "accountId", ",", "String", "templateId", ",", "String", "documentId", ")", "throws", "ApiException", "{", "return", "getDocument", "(", "accountId", ",", "templateId", ",", "documentId", ",", "null", "...
Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify &#x60;combined&#x60; to retrieve all documents in the template as one pdf. @param accountId The external account number (int) or account ID Guid. (requi...
[ "Gets", "PDF", "documents", "from", "a", "template", ".", "Retrieves", "one", "or", "more", "PDF", "documents", "from", "the", "specified", "template", ".", "You", "can", "specify", "the", "ID", "of", "the", "document", "to", "retrieve", "or", "can", "spec...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L1245-L1247
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/LocaleSwitchFormatter.java
LocaleSwitchFormatter.register
public LocaleSwitchFormatter register(final CellFormatter cellFormatter, final Locale... locales) { """ ローケールとフォーマッタを登録する。 @param cellFormatter 登録対象のフォーマッタ。 @param locales 登録対象のロケール。複数指定可能。 @return 現在の自身のインスタンス。 @throws IllegalArgumentException {@literal cellFormatter == null.} @throws IllegalArgumentExceptio...
java
public LocaleSwitchFormatter register(final CellFormatter cellFormatter, final Locale... locales) { ArgUtils.notNull(cellFormatter, "cellFormatter"); ArgUtils.notEmpty(locales, "locales"); for(Locale locale : locales) { formatterMap.put(locale, cellFormatter); } ...
[ "public", "LocaleSwitchFormatter", "register", "(", "final", "CellFormatter", "cellFormatter", ",", "final", "Locale", "...", "locales", ")", "{", "ArgUtils", ".", "notNull", "(", "cellFormatter", ",", "\"cellFormatter\"", ")", ";", "ArgUtils", ".", "notEmpty", "(...
ローケールとフォーマッタを登録する。 @param cellFormatter 登録対象のフォーマッタ。 @param locales 登録対象のロケール。複数指定可能。 @return 現在の自身のインスタンス。 @throws IllegalArgumentException {@literal cellFormatter == null.} @throws IllegalArgumentException {@literal locales == null || locales.length == 0.}
[ "ローケールとフォーマッタを登録する。" ]
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/LocaleSwitchFormatter.java#L66-L75
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/maxent/LogLinearXYData.java
LogLinearXYData.addEx
public void addEx(double weight, Object xObj, Object yObj, FeatureVector[] fvs) { """ Adds a new log-linear model instance. @param weight The weight of this example. @param x The observation, x. @param y The prediction, y. @param fvs The binary features on the observations, x, for all possible labels, y'. In...
java
public void addEx(double weight, Object xObj, Object yObj, FeatureVector[] fvs) { int x = xAlphabet.lookupIndex(xObj); int y = yAlphabet.lookupIndex(yObj); addEx(weight, x, y, fvs); }
[ "public", "void", "addEx", "(", "double", "weight", ",", "Object", "xObj", ",", "Object", "yObj", ",", "FeatureVector", "[", "]", "fvs", ")", "{", "int", "x", "=", "xAlphabet", ".", "lookupIndex", "(", "xObj", ")", ";", "int", "y", "=", "yAlphabet", ...
Adds a new log-linear model instance. @param weight The weight of this example. @param x The observation, x. @param y The prediction, y. @param fvs The binary features on the observations, x, for all possible labels, y'. Indexed by y'.
[ "Adds", "a", "new", "log", "-", "linear", "model", "instance", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/maxent/LogLinearXYData.java#L131-L135
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/actions/AbstractActionPanel.java
AbstractActionPanel.newActionLinkLabel
protected Label newActionLinkLabel(final String id, final IModel<String> model) { """ Factory method for creating the new Label. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new Label. @param id the id @param model the m...
java
protected Label newActionLinkLabel(final String id, final IModel<String> model) { final Label label = ComponentFactory.newLabel(id, model); return label; }
[ "protected", "Label", "newActionLinkLabel", "(", "final", "String", "id", ",", "final", "IModel", "<", "String", ">", "model", ")", "{", "final", "Label", "label", "=", "ComponentFactory", ".", "newLabel", "(", "id", ",", "model", ")", ";", "return", "labe...
Factory method for creating the new Label. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new Label. @param id the id @param model the model @return the label
[ "Factory", "method", "for", "creating", "the", "new", "Label", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide", "their", "own", "versio...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/actions/AbstractActionPanel.java#L83-L87
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java
JdbcCpoAdapter.updateObject
@Override public <T> long updateObject(T obj) throws CpoException { """ Update the Object in the datasource. The CpoAdapter will check to see if the object exists in the datasource. If it exists then the object will be updated. If it does not exist, an exception will be thrown <p/> <pre>Example: <code> <p/>...
java
@Override public <T> long updateObject(T obj) throws CpoException { return processUpdateGroup(obj, JdbcCpoAdapter.UPDATE_GROUP, null, null, null, null); }
[ "@", "Override", "public", "<", "T", ">", "long", "updateObject", "(", "T", "obj", ")", "throws", "CpoException", "{", "return", "processUpdateGroup", "(", "obj", ",", "JdbcCpoAdapter", ".", "UPDATE_GROUP", ",", "null", ",", "null", ",", "null", ",", "null...
Update the Object in the datasource. The CpoAdapter will check to see if the object exists in the datasource. If it exists then the object will be updated. If it does not exist, an exception will be thrown <p/> <pre>Example: <code> <p/> class SomeObject so = new SomeObject(); class CpoAdapter cpo = null; <p/> try { cpo...
[ "Update", "the", "Object", "in", "the", "datasource", ".", "The", "CpoAdapter", "will", "check", "to", "see", "if", "the", "object", "exists", "in", "the", "datasource", ".", "If", "it", "exists", "then", "the", "object", "will", "be", "updated", ".", "I...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L1747-L1750
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/js/tostring/JSToString.java
JSToString.objectToJSString
@Nonnull public static String objectToJSString (@Nullable final Object aObject) { """ Auto-detect the type of the passed object and convert it to a JS string. If the type detection failed, an {@link IllegalArgumentException} is thrown. @param aObject The object to be converted. May be <code>null</code>. Not...
java
@Nonnull public static String objectToJSString (@Nullable final Object aObject) { return objectToJSString (aObject, JSType.AUTO_DETECT, false); }
[ "@", "Nonnull", "public", "static", "String", "objectToJSString", "(", "@", "Nullable", "final", "Object", "aObject", ")", "{", "return", "objectToJSString", "(", "aObject", ",", "JSType", ".", "AUTO_DETECT", ",", "false", ")", ";", "}" ]
Auto-detect the type of the passed object and convert it to a JS string. If the type detection failed, an {@link IllegalArgumentException} is thrown. @param aObject The object to be converted. May be <code>null</code>. Note: works for atomic types and arrays, but <b>not</b> for collection types! @return The string rep...
[ "Auto", "-", "detect", "the", "type", "of", "the", "passed", "object", "and", "convert", "it", "to", "a", "JS", "string", ".", "If", "the", "type", "detection", "failed", "an", "{", "@link", "IllegalArgumentException", "}", "is", "thrown", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/js/tostring/JSToString.java#L233-L237
alkacon/opencms-core
src/org/opencms/file/wrapper/CmsObjectWrapper.java
CmsObjectWrapper.readResource
public CmsResource readResource(CmsUUID structureID, CmsResourceFilter filter) throws CmsException { """ Delegate method for {@link CmsObject#readResource(CmsUUID, CmsResourceFilter)}.<p> @see CmsObject#readResource(CmsUUID, CmsResourceFilter) @param structureID the ID of the structure to read @param filter...
java
public CmsResource readResource(CmsUUID structureID, CmsResourceFilter filter) throws CmsException { return m_cms.readResource(structureID, filter); }
[ "public", "CmsResource", "readResource", "(", "CmsUUID", "structureID", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "return", "m_cms", ".", "readResource", "(", "structureID", ",", "filter", ")", ";", "}" ]
Delegate method for {@link CmsObject#readResource(CmsUUID, CmsResourceFilter)}.<p> @see CmsObject#readResource(CmsUUID, CmsResourceFilter) @param structureID the ID of the structure to read @param filter the resource filter to use while reading @return the resource that was read @throws CmsException if the resource...
[ "Delegate", "method", "for", "{", "@link", "CmsObject#readResource", "(", "CmsUUID", "CmsResourceFilter", ")", "}", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/wrapper/CmsObjectWrapper.java#L614-L617
aboutsip/sipstack
sipstack-netty-codec-sip/src/main/java/io/sipstack/netty/codec/sip/SipMessageDatagramDecoder.java
SipMessageDatagramDecoder.decode
@Override protected void decode(final ChannelHandlerContext ctx, final DatagramPacket msg, final List<Object> out) throws Exception { """ Framing an UDP packet is much simpler than for a stream based protocol like TCP. We just assumes that everything is correct and therefore all is needed is to r...
java
@Override protected void decode(final ChannelHandlerContext ctx, final DatagramPacket msg, final List<Object> out) throws Exception { final long arrivalTime = this.clock.getCurrentTimeMillis(); final ByteBuf content = msg.content(); // some clients are sending various types of p...
[ "@", "Override", "protected", "void", "decode", "(", "final", "ChannelHandlerContext", "ctx", ",", "final", "DatagramPacket", "msg", ",", "final", "List", "<", "Object", ">", "out", ")", "throws", "Exception", "{", "final", "long", "arrivalTime", "=", "this", ...
Framing an UDP packet is much simpler than for a stream based protocol like TCP. We just assumes that everything is correct and therefore all is needed is to read the first line, which is assumed to be a SIP initial line, then read all headers as one big block and whatever is left better be the payload (if there is one...
[ "Framing", "an", "UDP", "packet", "is", "much", "simpler", "than", "for", "a", "stream", "based", "protocol", "like", "TCP", ".", "We", "just", "assumes", "that", "everything", "is", "correct", "and", "therefore", "all", "is", "needed", "is", "to", "read",...
train
https://github.com/aboutsip/sipstack/blob/33f2db1d580738f0385687b0429fab0630118f42/sipstack-netty-codec-sip/src/main/java/io/sipstack/netty/codec/sip/SipMessageDatagramDecoder.java#L49-L86
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
RpcEndpoint.scheduleRunAsync
protected void scheduleRunAsync(Runnable runnable, Time delay) { """ Execute the runnable in the main thread of the underlying RPC endpoint, with a delay of the given number of milliseconds. @param runnable Runnable to be executed @param delay The delay after which the runnable will be executed """ s...
java
protected void scheduleRunAsync(Runnable runnable, Time delay) { scheduleRunAsync(runnable, delay.getSize(), delay.getUnit()); }
[ "protected", "void", "scheduleRunAsync", "(", "Runnable", "runnable", ",", "Time", "delay", ")", "{", "scheduleRunAsync", "(", "runnable", ",", "delay", ".", "getSize", "(", ")", ",", "delay", ".", "getUnit", "(", ")", ")", ";", "}" ]
Execute the runnable in the main thread of the underlying RPC endpoint, with a delay of the given number of milliseconds. @param runnable Runnable to be executed @param delay The delay after which the runnable will be executed
[ "Execute", "the", "runnable", "in", "the", "main", "thread", "of", "the", "underlying", "RPC", "endpoint", "with", "a", "delay", "of", "the", "given", "number", "of", "milliseconds", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java#L274-L276
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.listAccountSASAsync
public Observable<ListAccountSasResponseInner> listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { """ List SAS credentials of a storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive....
java
public Observable<ListAccountSasResponseInner> listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<ListAccountSasResponseInner>, ListAccountSas...
[ "public", "Observable", "<", "ListAccountSasResponseInner", ">", "listAccountSASAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "AccountSasParameters", "parameters", ")", "{", "return", "listAccountSASWithServiceResponseAsync", "(", "resourceGro...
List SAS credentials of a storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length an...
[ "List", "SAS", "credentials", "of", "a", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L1042-L1049
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.checkParentFolders
private void checkParentFolders(CmsDbContext dbc, CmsPublishList publishList) throws CmsVfsException { """ Checks that no one of the resources to be published has a 'new' parent (that has not been published yet).<p> @param dbc the db context @param publishList the publish list to check @throws CmsVfsExcepti...
java
private void checkParentFolders(CmsDbContext dbc, CmsPublishList publishList) throws CmsVfsException { boolean directPublish = publishList.isDirectPublish(); // if we direct publish a file, check if all parent folders are already published if (directPublish) { // first get the names...
[ "private", "void", "checkParentFolders", "(", "CmsDbContext", "dbc", ",", "CmsPublishList", "publishList", ")", "throws", "CmsVfsException", "{", "boolean", "directPublish", "=", "publishList", ".", "isDirectPublish", "(", ")", ";", "// if we direct publish a file, check ...
Checks that no one of the resources to be published has a 'new' parent (that has not been published yet).<p> @param dbc the db context @param publishList the publish list to check @throws CmsVfsException if there is a resource to be published with a 'new' parent
[ "Checks", "that", "no", "one", "of", "the", "resources", "to", "be", "published", "has", "a", "new", "parent", "(", "that", "has", "not", "been", "published", "yet", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L10771-L10802
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java
WSConnectionRequestInfoImpl.matchTypeMap
private final boolean matchTypeMap(WSConnectionRequestInfoImpl cri) { """ Determine if the type map property matches. It is considered to match if - Both type map values are unspecified. - Both type map values are the same value. - One of the type map values is unspecified and the other CRI requested the defaul...
java
private final boolean matchTypeMap(WSConnectionRequestInfoImpl cri) { // At least one of the CRIs should know the default value. Map<String, Class<?>> defaultValue = defaultTypeMap == null ? cri.defaultTypeMap : defaultTypeMap; return matchTypeMap(ivTypeMap, cri.ivTypeMap) || ivT...
[ "private", "final", "boolean", "matchTypeMap", "(", "WSConnectionRequestInfoImpl", "cri", ")", "{", "// At least one of the CRIs should know the default value.", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "defaultValue", "=", "defaultTypeMap", "==", "null",...
Determine if the type map property matches. It is considered to match if - Both type map values are unspecified. - Both type map values are the same value. - One of the type map values is unspecified and the other CRI requested the default value. @return true if the type map values match, otherwise false.
[ "Determine", "if", "the", "type", "map", "property", "matches", ".", "It", "is", "considered", "to", "match", "if", "-", "Both", "type", "map", "values", "are", "unspecified", ".", "-", "Both", "type", "map", "values", "are", "the", "same", "value", ".",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java#L659-L666
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/serde/binary/BinarySerde.java
BinarySerde.toArrayAndByteBuffer
public static Pair<INDArray, ByteBuffer> toArrayAndByteBuffer(ByteBuffer buffer, int offset) { """ Create an ndarray and existing bytebuffer @param buffer @param offset @return """ ByteBuffer byteBuffer = buffer.hasArray() ? ByteBuffer.allocateDirect(buffer.array().length).put(buffer.array()) ...
java
public static Pair<INDArray, ByteBuffer> toArrayAndByteBuffer(ByteBuffer buffer, int offset) { ByteBuffer byteBuffer = buffer.hasArray() ? ByteBuffer.allocateDirect(buffer.array().length).put(buffer.array()) .order(ByteOrder.nativeOrder()) : buffer.order(ByteOrder.nativeOrder()); //bump ...
[ "public", "static", "Pair", "<", "INDArray", ",", "ByteBuffer", ">", "toArrayAndByteBuffer", "(", "ByteBuffer", "buffer", ",", "int", "offset", ")", "{", "ByteBuffer", "byteBuffer", "=", "buffer", ".", "hasArray", "(", ")", "?", "ByteBuffer", ".", "allocateDir...
Create an ndarray and existing bytebuffer @param buffer @param offset @return
[ "Create", "an", "ndarray", "and", "existing", "bytebuffer" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/serde/binary/BinarySerde.java#L74-L122
aoindustries/aocode-public
src/main/java/com/aoindustries/md5/MD5.java
MD5.Final
public synchronized byte[] Final () { """ Returns array of bytes (16 bytes) representing hash as of the current state of this object. Note: getting a hash does not invalidate the hash object, it only creates a copy of the real state which is finalized. @return Array of 16 bytes, the hash of all updated bytes...
java
public synchronized byte[] Final () { byte[] bits; int index, padlen; MD5State fin; if (finals == null) { fin = new MD5State(state); bits = Encode(fin.count, 8); index = (fin.count[0] >>> 3) & 0x3f; padlen = (index < 56) ? (56 - index) : (120 - index); Update(fin, padding, 0, padlen); /**...
[ "public", "synchronized", "byte", "[", "]", "Final", "(", ")", "{", "byte", "[", "]", "bits", ";", "int", "index", ",", "padlen", ";", "MD5State", "fin", ";", "if", "(", "finals", "==", "null", ")", "{", "fin", "=", "new", "MD5State", "(", "state",...
Returns array of bytes (16 bytes) representing hash as of the current state of this object. Note: getting a hash does not invalidate the hash object, it only creates a copy of the real state which is finalized. @return Array of 16 bytes, the hash of all updated bytes
[ "Returns", "array", "of", "bytes", "(", "16", "bytes", ")", "representing", "hash", "as", "of", "the", "current", "state", "of", "this", "object", ".", "Note", ":", "getting", "a", "hash", "does", "not", "invalidate", "the", "hash", "object", "it", "only...
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/md5/MD5.java#L427-L449
ChannelFinder/javaCFClient
src/main/java/gov/bnl/channelfinder/api/ChannelFinderClientImpl.java
ChannelFinderClientImpl.findByName
public Collection<Channel> findByName(String pattern) throws ChannelFinderException { """ Search for channels who's name match the pattern <tt>pattern</tt>.<br> The pattern can contain wildcard char * or ?.<br> @param pattern - the search pattern for the channel names @return A Collection of channels who's n...
java
public Collection<Channel> findByName(String pattern) throws ChannelFinderException { // return wrappedSubmit(new FindByParam("~name", pattern)); Map<String, String> searchMap = new HashMap<String, String>(); searchMap.put("~name", pattern); return wrappedSubmit(new FindByMap(searchMap)); }
[ "public", "Collection", "<", "Channel", ">", "findByName", "(", "String", "pattern", ")", "throws", "ChannelFinderException", "{", "// return wrappedSubmit(new FindByParam(\"~name\", pattern));", "Map", "<", "String", ",", "String", ">", "searchMap", "=", "new", "HashMa...
Search for channels who's name match the pattern <tt>pattern</tt>.<br> The pattern can contain wildcard char * or ?.<br> @param pattern - the search pattern for the channel names @return A Collection of channels who's name match the pattern <tt>pattern</tt> @throws ChannelFinderException - channelfinder exception
[ "Search", "for", "channels", "who", "s", "name", "match", "the", "pattern", "<tt", ">", "pattern<", "/", "tt", ">", ".", "<br", ">", "The", "pattern", "can", "contain", "wildcard", "char", "*", "or", "?", ".", "<br", ">" ]
train
https://github.com/ChannelFinder/javaCFClient/blob/000fce53ad2b8f8c38ef24fec5b5ec65e383ac9d/src/main/java/gov/bnl/channelfinder/api/ChannelFinderClientImpl.java#L960-L965