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
jenkinsci/jenkins
cli/src/main/java/hudson/cli/FlightRecorderInputStream.java
FlightRecorderInputStream.analyzeCrash
public DiagnosedStreamCorruptionException analyzeCrash(Exception problem, String diagnosisName) { """ Creates a {@link DiagnosedStreamCorruptionException} based on the recorded content plus read ahead. The caller is responsible for throwing the exception. """ final ByteArrayOutputStream readAhead = ne...
java
public DiagnosedStreamCorruptionException analyzeCrash(Exception problem, String diagnosisName) { final ByteArrayOutputStream readAhead = new ByteArrayOutputStream(); final IOException[] error = new IOException[1]; Thread diagnosisThread = new Thread(diagnosisName+" stream corruption diagnosis ...
[ "public", "DiagnosedStreamCorruptionException", "analyzeCrash", "(", "Exception", "problem", ",", "String", "diagnosisName", ")", "{", "final", "ByteArrayOutputStream", "readAhead", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "final", "IOException", "[", "]", ...
Creates a {@link DiagnosedStreamCorruptionException} based on the recorded content plus read ahead. The caller is responsible for throwing the exception.
[ "Creates", "a", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/cli/src/main/java/hudson/cli/FlightRecorderInputStream.java#L50-L84
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java
ODataRendererUtils.buildContextUrlFromOperationCall
public static String buildContextUrlFromOperationCall(ODataUri oDataUri, EntityDataModel entityDataModel, boolean isPrimitive) { """ Builds the 'Context URL' when the request is an action or function call. @param oDataUri The odata uri @param ent...
java
public static String buildContextUrlFromOperationCall(ODataUri oDataUri, EntityDataModel entityDataModel, boolean isPrimitive) { String serviceRoot = oDataUri.serviceRoot(); String returnType = ODataUriUtil.getOperationReturnType(oDataUri, entity...
[ "public", "static", "String", "buildContextUrlFromOperationCall", "(", "ODataUri", "oDataUri", ",", "EntityDataModel", "entityDataModel", ",", "boolean", "isPrimitive", ")", "{", "String", "serviceRoot", "=", "oDataUri", ".", "serviceRoot", "(", ")", ";", "String", ...
Builds the 'Context URL' when the request is an action or function call. @param oDataUri The odata uri @param entityDataModel The entity data model. @param isPrimitive True if the context URL is for primitive. @return The built 'Context URL'. @see <a href= "http://docs.oasis-open.org/odata/odata/v4.0/os/par...
[ "Builds", "the", "Context", "URL", "when", "the", "request", "is", "an", "action", "or", "function", "call", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java#L90-L95
landawn/AbacusUtil
src/com/landawn/abacus/util/Matth.java
Matth.multiplyExact
public static long multiplyExact(long a, long b) { """ Returns the product of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a * b} overflows in signed {@code long} arithmetic """ // Hacker's Delight, Section 2-12 int leadingZeros = Long.numbe...
java
public static long multiplyExact(long a, long b) { // Hacker's Delight, Section 2-12 int leadingZeros = Long.numberOfLeadingZeros(a) + Long.numberOfLeadingZeros(~a) + Long.numberOfLeadingZeros(b) + Long.numberOfLeadingZeros(~b); /* * If leadingZeros > Long.SIZE + 1 it's definitely f...
[ "public", "static", "long", "multiplyExact", "(", "long", "a", ",", "long", "b", ")", "{", "// Hacker's Delight, Section 2-12\r", "int", "leadingZeros", "=", "Long", ".", "numberOfLeadingZeros", "(", "a", ")", "+", "Long", ".", "numberOfLeadingZeros", "(", "~", ...
Returns the product of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a * b} overflows in signed {@code long} arithmetic
[ "Returns", "the", "product", "of", "{", "@code", "a", "}", "and", "{", "@code", "b", "}", "provided", "it", "does", "not", "overflow", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Matth.java#L1426-L1447
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/FleetsApi.java
FleetsApi.putFleetsFleetId
public void putFleetsFleetId(Long fleetId, String datasource, String token, FleetNewSettings fleetNewSettings) throws ApiException { """ Update fleet Update settings about a fleet --- SSO Scope: esi-fleets.write_fleet.v1 @param fleetId ID for a fleet (required) @param datasource The server name ...
java
public void putFleetsFleetId(Long fleetId, String datasource, String token, FleetNewSettings fleetNewSettings) throws ApiException { putFleetsFleetIdWithHttpInfo(fleetId, datasource, token, fleetNewSettings); }
[ "public", "void", "putFleetsFleetId", "(", "Long", "fleetId", ",", "String", "datasource", ",", "String", "token", ",", "FleetNewSettings", "fleetNewSettings", ")", "throws", "ApiException", "{", "putFleetsFleetIdWithHttpInfo", "(", "fleetId", ",", "datasource", ",", ...
Update fleet Update settings about a fleet --- SSO Scope: esi-fleets.write_fleet.v1 @param fleetId ID for a fleet (required) @param datasource The server name you would like data from (optional, default to tranquility) @param token Access token to use if unable to set a header (optional) @param fleetNewSettings (optio...
[ "Update", "fleet", "Update", "settings", "about", "a", "fleet", "---", "SSO", "Scope", ":", "esi", "-", "fleets", ".", "write_fleet", ".", "v1" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/FleetsApi.java#L1784-L1787
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java
ServerDnsAliasesInner.acquireAsync
public Observable<Void> acquireAsync(String resourceGroupName, String serverName, String dnsAliasName, String oldServerDnsAliasId) { """ Acquires server DNS alias from another server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Res...
java
public Observable<Void> acquireAsync(String resourceGroupName, String serverName, String dnsAliasName, String oldServerDnsAliasId) { return acquireWithServiceResponseAsync(resourceGroupName, serverName, dnsAliasName, oldServerDnsAliasId).map(new Func1<ServiceResponse<Void>, Void>() { @Override ...
[ "public", "Observable", "<", "Void", ">", "acquireAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "dnsAliasName", ",", "String", "oldServerDnsAliasId", ")", "{", "return", "acquireWithServiceResponseAsync", "(", "resourceGroupName...
Acquires server DNS alias from another server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server that the alias is pointing to. @param dnsAliasName The name of the ser...
[ "Acquires", "server", "DNS", "alias", "from", "another", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java#L776-L783
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java
ScriptActionsInner.getExecutionDetail
public RuntimeScriptActionDetailInner getExecutionDetail(String resourceGroupName, String clusterName, String scriptExecutionId) { """ Gets the script execution detail for the given script execution ID. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param...
java
public RuntimeScriptActionDetailInner getExecutionDetail(String resourceGroupName, String clusterName, String scriptExecutionId) { return getExecutionDetailWithServiceResponseAsync(resourceGroupName, clusterName, scriptExecutionId).toBlocking().single().body(); }
[ "public", "RuntimeScriptActionDetailInner", "getExecutionDetail", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "scriptExecutionId", ")", "{", "return", "getExecutionDetailWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName"...
Gets the script execution detail for the given script execution ID. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param scriptExecutionId The script execution Id @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseExcept...
[ "Gets", "the", "script", "execution", "detail", "for", "the", "given", "script", "execution", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java#L305-L307
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/Tesseract1.java
Tesseract1.doOCR
@Override public String doOCR(int xsize, int ysize, ByteBuffer buf, String filename, Rectangle rect, int bpp) throws TesseractException { """ Performs OCR operation. Use <code>SetImage</code>, (optionally) <code>SetRectangle</code>, and one or more of the <code>Get*Text</code> functions. @param xsize widt...
java
@Override public String doOCR(int xsize, int ysize, ByteBuffer buf, String filename, Rectangle rect, int bpp) throws TesseractException { init(); setTessVariables(); try { setImage(xsize, ysize, buf, rect, bpp); return getOCRText(filename, 1); } catch (Except...
[ "@", "Override", "public", "String", "doOCR", "(", "int", "xsize", ",", "int", "ysize", ",", "ByteBuffer", "buf", ",", "String", "filename", ",", "Rectangle", "rect", ",", "int", "bpp", ")", "throws", "TesseractException", "{", "init", "(", ")", ";", "se...
Performs OCR operation. Use <code>SetImage</code>, (optionally) <code>SetRectangle</code>, and one or more of the <code>Get*Text</code> functions. @param xsize width of image @param ysize height of image @param buf pixel data @param filename input file name. Needed only for training and reading a UNLV zone file. @para...
[ "Performs", "OCR", "operation", ".", "Use", "<code", ">", "SetImage<", "/", "code", ">", "(", "optionally", ")", "<code", ">", "SetRectangle<", "/", "code", ">", "and", "one", "or", "more", "of", "the", "<code", ">", "Get", "*", "Text<", "/", "code", ...
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/Tesseract1.java#L387-L401
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.updatePrebuiltEntityRoleAsync
public Observable<OperationStatus> updatePrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdatePrebuiltEntityRoleOptionalParameter updatePrebuiltEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The application ID. @param versionId The v...
java
public Observable<OperationStatus> updatePrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdatePrebuiltEntityRoleOptionalParameter updatePrebuiltEntityRoleOptionalParameter) { return updatePrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId, updatePreb...
[ "public", "Observable", "<", "OperationStatus", ">", "updatePrebuiltEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ",", "UpdatePrebuiltEntityRoleOptionalParameter", "updatePrebuiltEntityRoleOptionalParameter...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role ID. @param updatePrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws Illegal...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
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#L11276-L11283
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/models/partitions/Partitions.java
Partitions.getPartition
public RedisClusterNode getPartition(String host, int port) { """ Retrieve a {@link RedisClusterNode} by its hostname/port considering node aliases. @param host hostname. @param port port number. @return the {@link RedisClusterNode} or {@literal null} if not found. """ for (RedisClusterNode parti...
java
public RedisClusterNode getPartition(String host, int port) { for (RedisClusterNode partition : nodeReadView) { RedisURI uri = partition.getUri(); if (matches(uri, host, port)) { return partition; } for (RedisURI redisURI : partition.getAliases...
[ "public", "RedisClusterNode", "getPartition", "(", "String", "host", ",", "int", "port", ")", "{", "for", "(", "RedisClusterNode", "partition", ":", "nodeReadView", ")", "{", "RedisURI", "uri", "=", "partition", ".", "getUri", "(", ")", ";", "if", "(", "ma...
Retrieve a {@link RedisClusterNode} by its hostname/port considering node aliases. @param host hostname. @param port port number. @return the {@link RedisClusterNode} or {@literal null} if not found.
[ "Retrieve", "a", "{", "@link", "RedisClusterNode", "}", "by", "its", "hostname", "/", "port", "considering", "node", "aliases", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/models/partitions/Partitions.java#L117-L136
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/context/CounterContext.java
CounterContext.updateDigest
public void updateDigest(MessageDigest message, ByteBuffer context) { """ Update a MessageDigest with the content of a context. Note that this skips the header entirely since the header information has local meaning only, while digests are meant for comparison across nodes. This means in particular that we alwa...
java
public void updateDigest(MessageDigest message, ByteBuffer context) { ByteBuffer dup = context.duplicate(); dup.position(context.position() + headerLength(context)); message.update(dup); }
[ "public", "void", "updateDigest", "(", "MessageDigest", "message", ",", "ByteBuffer", "context", ")", "{", "ByteBuffer", "dup", "=", "context", ".", "duplicate", "(", ")", ";", "dup", ".", "position", "(", "context", ".", "position", "(", ")", "+", "header...
Update a MessageDigest with the content of a context. Note that this skips the header entirely since the header information has local meaning only, while digests are meant for comparison across nodes. This means in particular that we always have: updateDigest(ctx) == updateDigest(clearAllLocal(ctx))
[ "Update", "a", "MessageDigest", "with", "the", "content", "of", "a", "context", ".", "Note", "that", "this", "skips", "the", "header", "entirely", "since", "the", "header", "information", "has", "local", "meaning", "only", "while", "digests", "are", "meant", ...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/context/CounterContext.java#L656-L661
c2nes/ircbot
brewtab-irc/src/main/java/com/brewtab/irc/User.java
User.fromPrefix
public static User fromPrefix(String prefix) { """ Construct a new IRCUser from the give String. The String should be in the format {@literal <nick>!<user>@<host>}. This format is the same as is used in IRC message prefixes @param prefix The prefix to extract the information from @return a new IRCUser object...
java
public static User fromPrefix(String prefix) { Matcher matcher = userPrefixPattern.matcher(prefix); if (matcher.find()) { String nick = matcher.group(1); String user = matcher.group(4); String host = matcher.group(5); return new User(nick, user, host); ...
[ "public", "static", "User", "fromPrefix", "(", "String", "prefix", ")", "{", "Matcher", "matcher", "=", "userPrefixPattern", ".", "matcher", "(", "prefix", ")", ";", "if", "(", "matcher", ".", "find", "(", ")", ")", "{", "String", "nick", "=", "matcher",...
Construct a new IRCUser from the give String. The String should be in the format {@literal <nick>!<user>@<host>}. This format is the same as is used in IRC message prefixes @param prefix The prefix to extract the information from @return a new IRCUser object or null if the prefix could not be parsed
[ "Construct", "a", "new", "IRCUser", "from", "the", "give", "String", ".", "The", "String", "should", "be", "in", "the", "format", "{", "@literal", "<nick", ">", "!<user", ">", "@<host", ">", "}", ".", "This", "format", "is", "the", "same", "as", "is", ...
train
https://github.com/c2nes/ircbot/blob/29cfc5b921ceee2a35e7d6077c5660e6db63ef35/brewtab-irc/src/main/java/com/brewtab/irc/User.java#L122-L134
graknlabs/grakn
server/src/server/session/optimisation/JanusPreviousPropertyStepStrategy.java
JanusPreviousPropertyStepStrategy.executeStrategy
private void executeStrategy( Traversal.Admin<?, ?> traversal, GraphStep<?, ?> graphStep, TraversalFilterStep<Vertex> filterStep, String propertyKey, String label) { """ Replace the {@code graphStep} and {@code filterStep} with a new {@link JanusPreviousPropertyStep} in the given {@code tr...
java
private void executeStrategy( Traversal.Admin<?, ?> traversal, GraphStep<?, ?> graphStep, TraversalFilterStep<Vertex> filterStep, String propertyKey, String label) { JanusPreviousPropertyStep newStep = new JanusPreviousPropertyStep(traversal, propertyKey, label); traversal.remov...
[ "private", "void", "executeStrategy", "(", "Traversal", ".", "Admin", "<", "?", ",", "?", ">", "traversal", ",", "GraphStep", "<", "?", ",", "?", ">", "graphStep", ",", "TraversalFilterStep", "<", "Vertex", ">", "filterStep", ",", "String", "propertyKey", ...
Replace the {@code graphStep} and {@code filterStep} with a new {@link JanusPreviousPropertyStep} in the given {@code traversal}.
[ "Replace", "the", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/session/optimisation/JanusPreviousPropertyStepStrategy.java#L111-L118
ACRA/acra
acra-http/src/main/java/org/acra/sender/HttpSender.java
HttpSender.convertToString
@NonNull @SuppressWarnings("WeakerAccess") protected String convertToString(CrashReportData report, @NonNull StringFormat format) throws Exception { """ Convert a report to string @param report the report to convert @param format the format to convert to @return a string representation of the report ...
java
@NonNull @SuppressWarnings("WeakerAccess") protected String convertToString(CrashReportData report, @NonNull StringFormat format) throws Exception { return format.toFormattedString(report, config.reportContent(), "&", "\n", true); }
[ "@", "NonNull", "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "protected", "String", "convertToString", "(", "CrashReportData", "report", ",", "@", "NonNull", "StringFormat", "format", ")", "throws", "Exception", "{", "return", "format", ".", "toFormattedSt...
Convert a report to string @param report the report to convert @param format the format to convert to @return a string representation of the report @throws Exception if conversion failed
[ "Convert", "a", "report", "to", "string" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-http/src/main/java/org/acra/sender/HttpSender.java#L196-L200
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java
JournalReader.readArguments
private void readArguments(XMLEventReader reader, ConsumerJournalEntry cje) throws XMLStreamException, JournalException { """ Read arguments and add them to the event, until we hit the end tag for the event. """ while (true) { XMLEvent nextTag = reader.nextTag(); if...
java
private void readArguments(XMLEventReader reader, ConsumerJournalEntry cje) throws XMLStreamException, JournalException { while (true) { XMLEvent nextTag = reader.nextTag(); if (isStartTagEvent(nextTag, QNAME_TAG_ARGUMENT)) { readArgument(nextTag, reader, cje)...
[ "private", "void", "readArguments", "(", "XMLEventReader", "reader", ",", "ConsumerJournalEntry", "cje", ")", "throws", "XMLStreamException", ",", "JournalException", "{", "while", "(", "true", ")", "{", "XMLEvent", "nextTag", "=", "reader", ".", "nextTag", "(", ...
Read arguments and add them to the event, until we hit the end tag for the event.
[ "Read", "arguments", "and", "add", "them", "to", "the", "event", "until", "we", "hit", "the", "end", "tag", "for", "the", "event", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java#L231-L245
outbrain/ob1k
ob1k-http/src/main/java/com/outbrain/ob1k/http/utils/UrlUtils.java
UrlUtils.replacePathParam
public static String replacePathParam(final String url, final String param, final String value) throws EncoderException { """ Replaces path param in uri to a valid, encoded value @param url url to replace in (path params should be in the uri within curly braces) @param param name of the path param (not inside ...
java
public static String replacePathParam(final String url, final String param, final String value) throws EncoderException { final String pathParam = param.startsWith("{") ? param : "{" + param + "}"; final String encodedValue = encode(value); return StringUtils.replace(url, pathParam, encodedValue); }
[ "public", "static", "String", "replacePathParam", "(", "final", "String", "url", ",", "final", "String", "param", ",", "final", "String", "value", ")", "throws", "EncoderException", "{", "final", "String", "pathParam", "=", "param", ".", "startsWith", "(", "\"...
Replaces path param in uri to a valid, encoded value @param url url to replace in (path params should be in the uri within curly braces) @param param name of the path param (not inside curly braces) @param value value to encode @return url with path param replaced to the value @throws EncoderException
[ "Replaces", "path", "param", "in", "uri", "to", "a", "valid", "encoded", "value" ]
train
https://github.com/outbrain/ob1k/blob/9e43ab39230c5787065053da0f766d822d0fe4e7/ob1k-http/src/main/java/com/outbrain/ob1k/http/utils/UrlUtils.java#L38-L43
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.requestMetadataInternal
private TrackMetadata requestMetadataInternal(final DataReference track, final CdjStatus.TrackType trackType, final boolean failIfPassive) { """ Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID, using cach...
java
private TrackMetadata requestMetadataInternal(final DataReference track, final CdjStatus.TrackType trackType, final boolean failIfPassive) { // First check if we are using cached data for this request. MetadataCache cache = getMetadataCache(SlotReference...
[ "private", "TrackMetadata", "requestMetadataInternal", "(", "final", "DataReference", "track", ",", "final", "CdjStatus", ".", "TrackType", "trackType", ",", "final", "boolean", "failIfPassive", ")", "{", "// First check if we are using cached data for this request.", "Metada...
Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID, using cached media instead if it is available, and possibly giving up if we are in passive mode. @param track uniquely identifies the track whose metadata is desired @param trackType identifies the type of trac...
[ "Ask", "the", "specified", "player", "for", "metadata", "about", "the", "track", "in", "the", "specified", "slot", "with", "the", "specified", "rekordbox", "ID", "using", "cached", "media", "instead", "if", "it", "is", "available", "and", "possibly", "giving",...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L90-L127
signit-wesign/java-sdk
src/main/java/cn/signit/sdk/util/FastjsonDecoder.java
FastjsonDecoder.decodeAsBean
@SuppressWarnings("unchecked") public static <T> T decodeAsBean(String jsonStr,Class<?> objectClass) { """ 反序列化JSON字符串到指定的java bean对象 @param jsonStr JSON字符串 @param objectClass java bean对象字节码对象 @param <T> 泛型参数 @return java bean对象 @since 0.0.2 @author Zhanghongdong """ return (T) JSON.parseObject(jsonSt...
java
@SuppressWarnings("unchecked") public static <T> T decodeAsBean(String jsonStr,Class<?> objectClass){ return (T) JSON.parseObject(jsonStr, objectClass); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "decodeAsBean", "(", "String", "jsonStr", ",", "Class", "<", "?", ">", "objectClass", ")", "{", "return", "(", "T", ")", "JSON", ".", "parseObject", "(", "jsonStr...
反序列化JSON字符串到指定的java bean对象 @param jsonStr JSON字符串 @param objectClass java bean对象字节码对象 @param <T> 泛型参数 @return java bean对象 @since 0.0.2 @author Zhanghongdong
[ "反序列化JSON字符串到指定的java", "bean对象" ]
train
https://github.com/signit-wesign/java-sdk/blob/6f3196c9d444818a953396fdaa8ffed9794d9530/src/main/java/cn/signit/sdk/util/FastjsonDecoder.java#L31-L34
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generatePopulate
private void generatePopulate(SQLiteDatabaseSchema schema, MethodSpec.Builder methodBuilder, boolean instance) { """ Generate populate. @param schema the schema @param methodBuilder the method builder @param instance the instance """ methodBuilder.beginControlFlow("try"); methodBuilder.addStatemen...
java
private void generatePopulate(SQLiteDatabaseSchema schema, MethodSpec.Builder methodBuilder, boolean instance) { methodBuilder.beginControlFlow("try"); methodBuilder.addStatement("instance.openWritableDatabase()"); methodBuilder.addStatement("instance.close()"); if ((instance && schema.configPopulatorClazz !=...
[ "private", "void", "generatePopulate", "(", "SQLiteDatabaseSchema", "schema", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "boolean", "instance", ")", "{", "methodBuilder", ".", "beginControlFlow", "(", "\"try\"", ")", ";", "methodBuilder", ".", "addStat...
Generate populate. @param schema the schema @param methodBuilder the method builder @param instance the instance
[ "Generate", "populate", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L693-L724
Zappos/zappos-json
src/main/java/com/zappos/json/util/Reflections.java
Reflections.getField
public static Field getField(Class<?> clazz, String fieldName) throws NoSuchFieldException { """ Recursively find the field by name up to the top of class hierarchy. @param clazz the class object @param fieldName declared field name of specified class @return the field object """ if (clazz == Ob...
java
public static Field getField(Class<?> clazz, String fieldName) throws NoSuchFieldException { if (clazz == Object.class) { return null; } try { Field field = clazz.getDeclaredField(fieldName); return field; } catch (NoSuchFieldException e) { return getField(clazz.getSupercla...
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "throws", "NoSuchFieldException", "{", "if", "(", "clazz", "==", "Object", ".", "class", ")", "{", "return", "null", ";", "}", "try", "{", "...
Recursively find the field by name up to the top of class hierarchy. @param clazz the class object @param fieldName declared field name of specified class @return the field object
[ "Recursively", "find", "the", "field", "by", "name", "up", "to", "the", "top", "of", "class", "hierarchy", "." ]
train
https://github.com/Zappos/zappos-json/blob/340633f5db75c2e09ce49bfc3e5f67e8823f5a37/src/main/java/com/zappos/json/util/Reflections.java#L51-L62
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.DT
public static HtmlTree DT(Content body) { """ Generates a DT tag with some content. @param body content for the tag @return an HtmlTree object for the DT tag """ HtmlTree htmltree = new HtmlTree(HtmlTag.DT, nullCheck(body)); return htmltree; }
java
public static HtmlTree DT(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DT, nullCheck(body)); return htmltree; }
[ "public", "static", "HtmlTree", "DT", "(", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "DT", ",", "nullCheck", "(", "body", ")", ")", ";", "return", "htmltree", ";", "}" ]
Generates a DT tag with some content. @param body content for the tag @return an HtmlTree object for the DT tag
[ "Generates", "a", "DT", "tag", "with", "some", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L357-L360
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java
PoliciesCache.fromSources
public static PoliciesCache fromSources(final Iterable<CacheableYamlSource> sources, final Set<Attribute> context) { """ Create a cache from cacheable sources @param sources source @return cache """ return fromSourceProvider( new SourceProvider() { @Override ...
java
public static PoliciesCache fromSources(final Iterable<CacheableYamlSource> sources, final Set<Attribute> context) { return fromSourceProvider( new SourceProvider() { @Override public Iterator<CacheableYamlSource> getSourceIterator() { ...
[ "public", "static", "PoliciesCache", "fromSources", "(", "final", "Iterable", "<", "CacheableYamlSource", ">", "sources", ",", "final", "Set", "<", "Attribute", ">", "context", ")", "{", "return", "fromSourceProvider", "(", "new", "SourceProvider", "(", ")", "{"...
Create a cache from cacheable sources @param sources source @return cache
[ "Create", "a", "cache", "from", "cacheable", "sources" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java#L220-L230
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.getRegexEntityRoleAsync
public Observable<EntityRole> getRegexEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { """ Get one entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity ID. @param roleId entity role ID. @throws IllegalArgumentExce...
java
public Observable<EntityRole> getRegexEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { return getRegexEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).map(new Func1<ServiceResponse<EntityRole>, EntityRole>() { @Override public EntityRole c...
[ "public", "Observable", "<", "EntityRole", ">", "getRegexEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ")", "{", "return", "getRegexEntityRoleWithServiceResponseAsync", "(", "appId", ",", "version...
Get one entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity ID. @param roleId entity role ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the EntityRole object
[ "Get", "one", "entity", "role", "for", "a", "given", "entity", "." ]
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#L11980-L11987
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/RaCodeGen.java
RaCodeGen.writeEndpointLifecycle
private void writeEndpointLifecycle(Definition def, Writer out, int indent) throws IOException { """ Output EndpointLifecycle method @param def definition @param out Writer @param indent space number @throws IOException ioException """ writeWithIndent(out, indent, "/**\n"); writeWithInd...
java
private void writeEndpointLifecycle(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * This is called during the activation of a message endpoint.\n"); writeWithIndent(out, indent, " *\n"); writeWithIndent(out, ...
[ "private", "void", "writeEndpointLifecycle", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeWithIndent", "(", "out", ",", "indent", ",", "\"/**\\n\"", ")", ";", "writeWithIndent", "(", "out", ",",...
Output EndpointLifecycle method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "EndpointLifecycle", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/RaCodeGen.java#L286-L334
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java
EntityUtilities.getTranslatedTopicByTopicId
public static TranslatedTopicWrapper getTranslatedTopicByTopicId(final DataProviderFactory providerFactory, final Integer id, final Integer rev, final String locale) { """ Gets a translated topic based on a topic id, revision and locale. """ return getTranslatedTopicByTopicAndNodeId(provide...
java
public static TranslatedTopicWrapper getTranslatedTopicByTopicId(final DataProviderFactory providerFactory, final Integer id, final Integer rev, final String locale) { return getTranslatedTopicByTopicAndNodeId(providerFactory, id, rev, null, locale); }
[ "public", "static", "TranslatedTopicWrapper", "getTranslatedTopicByTopicId", "(", "final", "DataProviderFactory", "providerFactory", ",", "final", "Integer", "id", ",", "final", "Integer", "rev", ",", "final", "String", "locale", ")", "{", "return", "getTranslatedTopicB...
Gets a translated topic based on a topic id, revision and locale.
[ "Gets", "a", "translated", "topic", "based", "on", "a", "topic", "id", "revision", "and", "locale", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java#L62-L65
Netflix/astyanax
astyanax-cql/src/main/java/com/netflix/astyanax/cql/reads/CFRowKeysQueryGen.java
CFRowKeysQueryGen.getQueryStatement
public BoundStatement getQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery, boolean useCaching) { """ Main method that is used to generate the java driver statement from the given Astyanax row slice query. Note that the method allows the caller to specify whether to use caching or not. If caching is disab...
java
public BoundStatement getQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery, boolean useCaching) { switch (rowSliceQuery.getColQueryType()) { case AllColumns: return SelectAllColumnsForRowKeys.getBoundStatement(rowSliceQuery, useCaching); case ColumnSet: return SelectColumnSetForRowKeys.getBoundState...
[ "public", "BoundStatement", "getQueryStatement", "(", "CqlRowSliceQueryImpl", "<", "?", ",", "?", ">", "rowSliceQuery", ",", "boolean", "useCaching", ")", "{", "switch", "(", "rowSliceQuery", ".", "getColQueryType", "(", ")", ")", "{", "case", "AllColumns", ":",...
Main method that is used to generate the java driver statement from the given Astyanax row slice query. Note that the method allows the caller to specify whether to use caching or not. If caching is disabled, then the PreparedStatement is generated every time If caching is enabled, then the cached PreparedStatement is...
[ "Main", "method", "that", "is", "used", "to", "generate", "the", "java", "driver", "statement", "from", "the", "given", "Astyanax", "row", "slice", "query", ".", "Note", "that", "the", "method", "allows", "the", "caller", "to", "specify", "whether", "to", ...
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-cql/src/main/java/com/netflix/astyanax/cql/reads/CFRowKeysQueryGen.java#L266-L283
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.postAccountInvoice
public InvoiceCollection postAccountInvoice(final String accountCode, final Invoice invoice) { """ Post an invoice: invoice pending charges on an account <p> Returns an invoice collection @param accountCode @return the invoice collection that was generated on success, null otherwise """ return do...
java
public InvoiceCollection postAccountInvoice(final String accountCode, final Invoice invoice) { return doPOST(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Invoices.INVOICES_RESOURCE, invoice, InvoiceCollection.class); }
[ "public", "InvoiceCollection", "postAccountInvoice", "(", "final", "String", "accountCode", ",", "final", "Invoice", "invoice", ")", "{", "return", "doPOST", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "Invoices", ".", "INVOIC...
Post an invoice: invoice pending charges on an account <p> Returns an invoice collection @param accountCode @return the invoice collection that was generated on success, null otherwise
[ "Post", "an", "invoice", ":", "invoice", "pending", "charges", "on", "an", "account", "<p", ">", "Returns", "an", "invoice", "collection" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1259-L1261
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplaceManager.java
CmsWorkplaceManager.setFileViewSettings
public void setFileViewSettings(CmsObject cms, CmsRfsFileViewer fileViewSettings) throws CmsRoleViolationException { """ Sets the system-wide file view settings for the workplace.<p> @param cms the CmsObject for ensuring security constraints. @param fileViewSettings the system-wide file view settings for the...
java
public void setFileViewSettings(CmsObject cms, CmsRfsFileViewer fileViewSettings) throws CmsRoleViolationException { if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN); } m_fileViewSettings = fileViewSettings; ...
[ "public", "void", "setFileViewSettings", "(", "CmsObject", "cms", ",", "CmsRfsFileViewer", "fileViewSettings", ")", "throws", "CmsRoleViolationException", "{", "if", "(", "OpenCms", ".", "getRunLevel", "(", ")", ">", "OpenCms", ".", "RUNLEVEL_2_INITIALIZING", ")", "...
Sets the system-wide file view settings for the workplace.<p> @param cms the CmsObject for ensuring security constraints. @param fileViewSettings the system-wide file view settings for the workplace to set @throws CmsRoleViolationException if the current user does not own the administrator role ({@link CmsRole#ROOT_...
[ "Sets", "the", "system", "-", "wide", "file", "view", "settings", "for", "the", "workplace", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplaceManager.java#L2071-L2079
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.vps_serviceName_additionalDisk_duration_GET
public OvhOrder vps_serviceName_additionalDisk_duration_GET(String serviceName, String duration, OvhAdditionalDiskSizeEnum additionalDiskSize) throws IOException { """ Get prices and contracts information REST: GET /order/vps/{serviceName}/additionalDisk/{duration} @param additionalDiskSize [required] Size of ...
java
public OvhOrder vps_serviceName_additionalDisk_duration_GET(String serviceName, String duration, OvhAdditionalDiskSizeEnum additionalDiskSize) throws IOException { String qPath = "/order/vps/{serviceName}/additionalDisk/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "additionalDiskS...
[ "public", "OvhOrder", "vps_serviceName_additionalDisk_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhAdditionalDiskSizeEnum", "additionalDiskSize", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/vps/{serviceName}/additiona...
Get prices and contracts information REST: GET /order/vps/{serviceName}/additionalDisk/{duration} @param additionalDiskSize [required] Size of the additional disk @param serviceName [required] The internal name of your VPS offer @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3602-L3608
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.swapRows
public static void swapRows(double[][] matrix, int row1, int row2) { """ Swap components in the two rows. @param matrix the matrix to modify @param row1 the first row @param row2 the second row """ double[] temp = matrix[row1]; matrix[row1] = matrix[row2]; matrix[row2] = temp; }
java
public static void swapRows(double[][] matrix, int row1, int row2) { double[] temp = matrix[row1]; matrix[row1] = matrix[row2]; matrix[row2] = temp; }
[ "public", "static", "void", "swapRows", "(", "double", "[", "]", "[", "]", "matrix", ",", "int", "row1", ",", "int", "row2", ")", "{", "double", "[", "]", "temp", "=", "matrix", "[", "row1", "]", ";", "matrix", "[", "row1", "]", "=", "matrix", "[...
Swap components in the two rows. @param matrix the matrix to modify @param row1 the first row @param row2 the second row
[ "Swap", "components", "in", "the", "two", "rows", "." ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L246-L250
jmxtrans/jmxtrans
jmxtrans-core/src/main/java/com/googlecode/jmxtrans/JmxTransformer.java
JmxTransformer.processServersIntoJobs
private void processServersIntoJobs() throws LifecycleException { """ Processes all the Servers into Job's <p/> Needs to be called after processFiles() """ for (Server server : this.masterServersList) { try { // need to inject the poolMap for (Query query : server.getQueries()) { for (Outp...
java
private void processServersIntoJobs() throws LifecycleException { for (Server server : this.masterServersList) { try { // need to inject the poolMap for (Query query : server.getQueries()) { for (OutputWriter writer : query.getOutputWriterInstances()) { writer.start(); } } // Now ...
[ "private", "void", "processServersIntoJobs", "(", ")", "throws", "LifecycleException", "{", "for", "(", "Server", "server", ":", "this", ".", "masterServersList", ")", "{", "try", "{", "// need to inject the poolMap", "for", "(", "Query", "query", ":", "server", ...
Processes all the Servers into Job's <p/> Needs to be called after processFiles()
[ "Processes", "all", "the", "Servers", "into", "Job", "s", "<p", "/", ">", "Needs", "to", "be", "called", "after", "processFiles", "()" ]
train
https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-core/src/main/java/com/googlecode/jmxtrans/JmxTransformer.java#L362-L383
meertensinstituut/mtas
src/main/java/mtas/solr/search/MtasSolrCollectionCache.java
MtasSolrCollectionCache.getAutomatonById
public Automaton getAutomatonById(String id) throws IOException { """ Gets the automaton by id. @param id the id @return the automaton by id @throws IOException Signals that an I/O exception has occurred. """ if (idToVersion.containsKey(id)) { List<BytesRef> bytesArray = new ArrayList<>(); ...
java
public Automaton getAutomatonById(String id) throws IOException { if (idToVersion.containsKey(id)) { List<BytesRef> bytesArray = new ArrayList<>(); Set<String> data = get(id); if (data != null) { Term term; for (String item : data) { term = new Term("dummy", item); ...
[ "public", "Automaton", "getAutomatonById", "(", "String", "id", ")", "throws", "IOException", "{", "if", "(", "idToVersion", ".", "containsKey", "(", "id", ")", ")", "{", "List", "<", "BytesRef", ">", "bytesArray", "=", "new", "ArrayList", "<>", "(", ")", ...
Gets the automaton by id. @param id the id @return the automaton by id @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "automaton", "by", "id", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/search/MtasSolrCollectionCache.java#L296-L311
koendeschacht/bow-utils
src/main/java/be/bagofwords/util/SerializationUtils.java
SerializationUtils.readObject
public static <T> T readObject(Class<T> _class, InputStream inputStream) { """ Careful! Not compatible with above method to convert objects to byte arrays! """ try { return defaultObjectMapper.readValue(inputStream, _class); } catch (IOException exp) { throw new RuntimeE...
java
public static <T> T readObject(Class<T> _class, InputStream inputStream) { try { return defaultObjectMapper.readValue(inputStream, _class); } catch (IOException exp) { throw new RuntimeException("Failed to read object from inputstream", exp); } }
[ "public", "static", "<", "T", ">", "T", "readObject", "(", "Class", "<", "T", ">", "_class", ",", "InputStream", "inputStream", ")", "{", "try", "{", "return", "defaultObjectMapper", ".", "readValue", "(", "inputStream", ",", "_class", ")", ";", "}", "ca...
Careful! Not compatible with above method to convert objects to byte arrays!
[ "Careful!", "Not", "compatible", "with", "above", "method", "to", "convert", "objects", "to", "byte", "arrays!" ]
train
https://github.com/koendeschacht/bow-utils/blob/f599da17cb7a40b8ffc5610a9761fa922e99d7cb/src/main/java/be/bagofwords/util/SerializationUtils.java#L367-L373
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java
CommerceAddressPersistenceImpl.findByC_C
@Override public List<CommerceAddress> findByC_C(long classNameId, long classPK, int start, int end) { """ Returns a range of all the commerce addresses where classNameId = &#63; and classPK = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</co...
java
@Override public List<CommerceAddress> findByC_C(long classNameId, long classPK, int start, int end) { return findByC_C(classNameId, classPK, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAddress", ">", "findByC_C", "(", "long", "classNameId", ",", "long", "classPK", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByC_C", "(", "classNameId", ",", "classPK", ",", "start", ",",...
Returns a range of all the commerce addresses where classNameId = &#63; and classPK = &#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 ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "addresses", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java#L1184-L1188
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/ConfigHelper.java
ConfigHelper.setOutputKeyspace
public static void setOutputKeyspace(Configuration conf, String keyspace) { """ Set the keyspace for the output of this job. @param conf Job configuration you are about to run @param keyspace """ if (keyspace == null) throw new UnsupportedOperationException("keyspace may not be null"); ...
java
public static void setOutputKeyspace(Configuration conf, String keyspace) { if (keyspace == null) throw new UnsupportedOperationException("keyspace may not be null"); conf.set(OUTPUT_KEYSPACE_CONFIG, keyspace); }
[ "public", "static", "void", "setOutputKeyspace", "(", "Configuration", "conf", ",", "String", "keyspace", ")", "{", "if", "(", "keyspace", "==", "null", ")", "throw", "new", "UnsupportedOperationException", "(", "\"keyspace may not be null\"", ")", ";", "conf", "....
Set the keyspace for the output of this job. @param conf Job configuration you are about to run @param keyspace
[ "Set", "the", "keyspace", "for", "the", "output", "of", "this", "job", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/ConfigHelper.java#L114-L120
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/KeyAreaInfo.java
KeyAreaInfo.reverseKeyBuffer
public void reverseKeyBuffer(BaseBuffer bufferSource, int iAreaDesc) // Move these keys back to the record { """ Move the key area to the record. @param destBuffer A BaseBuffer to fill with data (ignored for thin). @param iAreaDesc The (optional) temporary area to copy the current fields to (). """ ...
java
public void reverseKeyBuffer(BaseBuffer bufferSource, int iAreaDesc) // Move these keys back to the record { int iKeyFields = this.getKeyFields(); for (int iKeyFieldSeq = Constants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFields + Constants.MAIN_KEY_FIELD; iKeyFieldSeq++) { this...
[ "public", "void", "reverseKeyBuffer", "(", "BaseBuffer", "bufferSource", ",", "int", "iAreaDesc", ")", "// Move these keys back to the record", "{", "int", "iKeyFields", "=", "this", ".", "getKeyFields", "(", ")", ";", "for", "(", "int", "iKeyFieldSeq", "=", "Cons...
Move the key area to the record. @param destBuffer A BaseBuffer to fill with data (ignored for thin). @param iAreaDesc The (optional) temporary area to copy the current fields to ().
[ "Move", "the", "key", "area", "to", "the", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/KeyAreaInfo.java#L221-L228
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/util/LightWeightGSet.java
LightWeightGSet.computeCapacity
public static int computeCapacity(double percentage, String mapName) { """ Let t = percentage of max memory. Let e = round(log_2 t). Then, we choose capacity = 2^e/(size of reference), unless it is outside the close interval [1, 2^30]. """ return computeCapacity(Runtime.getRuntime().maxMemory(), percent...
java
public static int computeCapacity(double percentage, String mapName) { return computeCapacity(Runtime.getRuntime().maxMemory(), percentage, mapName); }
[ "public", "static", "int", "computeCapacity", "(", "double", "percentage", ",", "String", "mapName", ")", "{", "return", "computeCapacity", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "maxMemory", "(", ")", ",", "percentage", ",", "mapName", ")", ";", ...
Let t = percentage of max memory. Let e = round(log_2 t). Then, we choose capacity = 2^e/(size of reference), unless it is outside the close interval [1, 2^30].
[ "Let", "t", "=", "percentage", "of", "max", "memory", ".", "Let", "e", "=", "round", "(", "log_2", "t", ")", ".", "Then", "we", "choose", "capacity", "=", "2^e", "/", "(", "size", "of", "reference", ")", "unless", "it", "is", "outside", "the", "clo...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/util/LightWeightGSet.java#L323-L325
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/calendar/CalendarRecordItem.java
CalendarRecordItem.updateField
public void updateField(int iSFieldSeq, Object objData) { """ Change the data in this field. @param iFieldSeq The field sequence to set. @param objData The new data. """ try { ScreenField sField = null; if (iSFieldSeq != -1) sField = m_gridScreen.getSField(th...
java
public void updateField(int iSFieldSeq, Object objData) { try { ScreenField sField = null; if (iSFieldSeq != -1) sField = m_gridScreen.getSField(this.getRelativeSField(iSFieldSeq)); if (sField != null) { this.editTargetRecord(...
[ "public", "void", "updateField", "(", "int", "iSFieldSeq", ",", "Object", "objData", ")", "{", "try", "{", "ScreenField", "sField", "=", "null", ";", "if", "(", "iSFieldSeq", "!=", "-", "1", ")", "sField", "=", "m_gridScreen", ".", "getSField", "(", "thi...
Change the data in this field. @param iFieldSeq The field sequence to set. @param objData The new data.
[ "Change", "the", "data", "in", "this", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/calendar/CalendarRecordItem.java#L246-L261
restfb/restfb
src/main/java/com/restfb/util/UrlUtils.java
UrlUtils.urlEncode
public static String urlEncode(String string) { """ URL-encodes a string. <p> Assumes {@code string} is in {@link StandardCharsets#UTF_8} format. @param string The string to URL-encode. @return The URL-encoded version of the input string, or {@code null} if {@code string} is {@code null}. @throws IllegalSt...
java
public static String urlEncode(String string) { if (string == null) { return null; } try { return encode(string, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("Platform doesn't support " + StandardCharsets.UTF_8.name(), e); ...
[ "public", "static", "String", "urlEncode", "(", "String", "string", ")", "{", "if", "(", "string", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "return", "encode", "(", "string", ",", "StandardCharsets", ".", "UTF_8", ".", "name", "(...
URL-encodes a string. <p> Assumes {@code string} is in {@link StandardCharsets#UTF_8} format. @param string The string to URL-encode. @return The URL-encoded version of the input string, or {@code null} if {@code string} is {@code null}. @throws IllegalStateException If unable to URL-encode because the JVM doesn't sup...
[ "URL", "-", "encodes", "a", "string", ".", "<p", ">", "Assumes", "{", "@code", "string", "}", "is", "in", "{", "@link", "StandardCharsets#UTF_8", "}", "format", "." ]
train
https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/UrlUtils.java#L60-L69
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/UsagesInner.java
UsagesInner.listByAutomationAccountAsync
public Observable<List<UsageInner>> listByAutomationAccountAsync(String resourceGroupName, String automationAccountName) { """ Retrieve the usage for the account id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgume...
java
public Observable<List<UsageInner>> listByAutomationAccountAsync(String resourceGroupName, String automationAccountName) { return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName).map(new Func1<ServiceResponse<List<UsageInner>>, List<UsageInner>>() { @Override...
[ "public", "Observable", "<", "List", "<", "UsageInner", ">", ">", "listByAutomationAccountAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ")", "{", "return", "listByAutomationAccountWithServiceResponseAsync", "(", "resourceGroupName", ","...
Retrieve the usage for the account id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;UsageInner&gt; object
[ "Retrieve", "the", "usage", "for", "the", "account", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/UsagesInner.java#L96-L103
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.bill_billId_debt_operation_operationId_associatedObject_GET
public net.minidev.ovh.api.debt.entry.OvhAssociatedObject bill_billId_debt_operation_operationId_associatedObject_GET(String billId, Long operationId) throws IOException { """ Return main data about the object related to this debt operation REST: GET /me/bill/{billId}/debt/operation/{operationId}/associatedObje...
java
public net.minidev.ovh.api.debt.entry.OvhAssociatedObject bill_billId_debt_operation_operationId_associatedObject_GET(String billId, Long operationId) throws IOException { String qPath = "/me/bill/{billId}/debt/operation/{operationId}/associatedObject"; StringBuilder sb = path(qPath, billId, operationId); String ...
[ "public", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "debt", ".", "entry", ".", "OvhAssociatedObject", "bill_billId_debt_operation_operationId_associatedObject_GET", "(", "String", "billId", ",", "Long", "operationId", ")", "throws", "IOException", "{", "St...
Return main data about the object related to this debt operation REST: GET /me/bill/{billId}/debt/operation/{operationId}/associatedObject @param billId [required] @param operationId [required]
[ "Return", "main", "data", "about", "the", "object", "related", "to", "this", "debt", "operation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2894-L2899
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java
AbstractRectangularShape1dfx.minXProperty
@Pure public DoubleProperty minXProperty() { """ Replies the property that is the minimum x coordinate of the box. @return the minX property. """ if (this.minX == null) { this.minX = new SimpleDoubleProperty(this, MathFXAttributeNames.MINIMUM_X) { @Override protected void invalidated() { ...
java
@Pure public DoubleProperty minXProperty() { if (this.minX == null) { this.minX = new SimpleDoubleProperty(this, MathFXAttributeNames.MINIMUM_X) { @Override protected void invalidated() { final double currentMin = get(); final double currentMax = getMaxX(); if (currentMin > currentMax) { ...
[ "@", "Pure", "public", "DoubleProperty", "minXProperty", "(", ")", "{", "if", "(", "this", ".", "minX", "==", "null", ")", "{", "this", ".", "minX", "=", "new", "SimpleDoubleProperty", "(", "this", ",", "MathFXAttributeNames", ".", "MINIMUM_X", ")", "{", ...
Replies the property that is the minimum x coordinate of the box. @return the minX property.
[ "Replies", "the", "property", "that", "is", "the", "minimum", "x", "coordinate", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java#L148-L164
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesKey
public static String escapePropertiesKey(final String text, final PropertiesKeyEscapeLevel level) { """ <p> Perform a (configurable) Java Properties Key <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link org.unb...
java
public static String escapePropertiesKey(final String text, final PropertiesKeyEscapeLevel level) { if (level == null) { throw new IllegalArgumentException("The 'level' argument cannot be null"); } return PropertiesKeyEscapeUtil.escape(text, level); }
[ "public", "static", "String", "escapePropertiesKey", "(", "final", "String", "text", ",", "final", "PropertiesKeyEscapeLevel", "level", ")", "{", "if", "(", "level", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The 'level' argument can...
<p> Perform a (configurable) Java Properties Key <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.properties.PropertiesKeyEscapeLevel} argument value. </p> <p> All other <tt>String</tt>-based <tt>escapePro...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "Java", "Properties", "Key", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "This", "me...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L882-L889
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.loadRewards
public void loadRewards(BranchReferralStateChangedListener callback) { """ <p>Retrieves rewards for the current session, with a callback to perform a predefined action following successful report of state change. You'll then need to call getCredits in the callback to update the credit totals in your UX.</p> @...
java
public void loadRewards(BranchReferralStateChangedListener callback) { ServerRequest req = new ServerRequestGetRewards(context_, callback); if (!req.constructError_ && !req.handleErrors(context_)) { handleNewRequest(req); } }
[ "public", "void", "loadRewards", "(", "BranchReferralStateChangedListener", "callback", ")", "{", "ServerRequest", "req", "=", "new", "ServerRequestGetRewards", "(", "context_", ",", "callback", ")", ";", "if", "(", "!", "req", ".", "constructError_", "&&", "!", ...
<p>Retrieves rewards for the current session, with a callback to perform a predefined action following successful report of state change. You'll then need to call getCredits in the callback to update the credit totals in your UX.</p> @param callback A {@link BranchReferralStateChangedListener} callback instance that w...
[ "<p", ">", "Retrieves", "rewards", "for", "the", "current", "session", "with", "a", "callback", "to", "perform", "a", "predefined", "action", "following", "successful", "report", "of", "state", "change", ".", "You", "ll", "then", "need", "to", "call", "getCr...
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1834-L1839
JodaOrg/joda-time
src/main/java/org/joda/time/Hours.java
Hours.hoursBetween
public static Hours hoursBetween(ReadablePartial start, ReadablePartial end) { """ Creates a <code>Hours</code> representing the number of whole hours between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalTime</code> objects. ...
java
public static Hours hoursBetween(ReadablePartial start, ReadablePartial end) { if (start instanceof LocalTime && end instanceof LocalTime) { Chronology chrono = DateTimeUtils.getChronology(start.getChronology()); int hours = chrono.hours().getDifference( ((LocalTime...
[ "public", "static", "Hours", "hoursBetween", "(", "ReadablePartial", "start", ",", "ReadablePartial", "end", ")", "{", "if", "(", "start", "instanceof", "LocalTime", "&&", "end", "instanceof", "LocalTime", ")", "{", "Chronology", "chrono", "=", "DateTimeUtils", ...
Creates a <code>Hours</code> representing the number of whole hours between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalTime</code> objects. @param start the start partial date, must not be null @param end the end partial date, mu...
[ "Creates", "a", "<code", ">", "Hours<", "/", "code", ">", "representing", "the", "number", "of", "whole", "hours", "between", "the", "two", "specified", "partial", "datetimes", ".", "<p", ">", "The", "two", "partials", "must", "contain", "the", "same", "fi...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Hours.java#L137-L146
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/send/ComQuery.java
ComQuery.sendDirect
public static void sendDirect(final PacketOutputStream pos, byte[] sqlBytes) throws IOException { """ Send directly to socket the sql data. @param pos output stream @param sqlBytes the query in UTF-8 bytes @throws IOException if connection error occur """ pos.startPacket(0); pos.write(Packet....
java
public static void sendDirect(final PacketOutputStream pos, byte[] sqlBytes) throws IOException { pos.startPacket(0); pos.write(Packet.COM_QUERY); pos.write(sqlBytes); pos.flush(); }
[ "public", "static", "void", "sendDirect", "(", "final", "PacketOutputStream", "pos", ",", "byte", "[", "]", "sqlBytes", ")", "throws", "IOException", "{", "pos", ".", "startPacket", "(", "0", ")", ";", "pos", ".", "write", "(", "Packet", ".", "COM_QUERY", ...
Send directly to socket the sql data. @param pos output stream @param sqlBytes the query in UTF-8 bytes @throws IOException if connection error occur
[ "Send", "directly", "to", "socket", "the", "sql", "data", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/send/ComQuery.java#L298-L303
looly/hutool
hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.update
public int update(Entity record, Entity where) throws SQLException { """ 按照条件更新 @param record 更新的内容 @param where 条件 @return 更新条目数 @throws SQLException SQL执行异常 """ if (CollectionUtil.isEmpty(record)) { return 0; } return db.update(fixEntity(record), where); }
java
public int update(Entity record, Entity where) throws SQLException{ if (CollectionUtil.isEmpty(record)) { return 0; } return db.update(fixEntity(record), where); }
[ "public", "int", "update", "(", "Entity", "record", ",", "Entity", "where", ")", "throws", "SQLException", "{", "if", "(", "CollectionUtil", ".", "isEmpty", "(", "record", ")", ")", "{", "return", "0", ";", "}", "return", "db", ".", "update", "(", "fix...
按照条件更新 @param record 更新的内容 @param where 条件 @return 更新条目数 @throws SQLException SQL执行异常
[ "按照条件更新" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L168-L173
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/protocol/AuroraProtocol.java
AuroraProtocol.getNewProtocol
public static AuroraProtocol getNewProtocol(FailoverProxy proxy, final GlobalStateInfo globalInfo, UrlParser urlParser) { """ Initialize new protocol instance. @param proxy proxy @param globalInfo server global variables information @param urlParser connection string data's @return new AuroraProt...
java
public static AuroraProtocol getNewProtocol(FailoverProxy proxy, final GlobalStateInfo globalInfo, UrlParser urlParser) { AuroraProtocol newProtocol = new AuroraProtocol(urlParser, globalInfo, proxy.lock); newProtocol.setProxy(proxy); return newProtocol; }
[ "public", "static", "AuroraProtocol", "getNewProtocol", "(", "FailoverProxy", "proxy", ",", "final", "GlobalStateInfo", "globalInfo", ",", "UrlParser", "urlParser", ")", "{", "AuroraProtocol", "newProtocol", "=", "new", "AuroraProtocol", "(", "urlParser", ",", "global...
Initialize new protocol instance. @param proxy proxy @param globalInfo server global variables information @param urlParser connection string data's @return new AuroraProtocol
[ "Initialize", "new", "protocol", "instance", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/protocol/AuroraProtocol.java#L335-L340
OpenLiberty/open-liberty
dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OidcClientUtil.java
OidcClientUtil.invalidateReferrerURLCookie
public static void invalidateReferrerURLCookie(HttpServletRequest req, HttpServletResponse res, String cookieName) { """ 240540: rather than call webcontainer code, replace the cookie with an empty one having same cookie and domain name and add to response. """ // 240540 getReferrerURLCookieHandler().i...
java
public static void invalidateReferrerURLCookie(HttpServletRequest req, HttpServletResponse res, String cookieName) { // 240540 getReferrerURLCookieHandler().invalidateReferrerURLCookie(req, res, cookieName); // need to have domain here too if (cookieName == null || req == null || res == null) { ...
[ "public", "static", "void", "invalidateReferrerURLCookie", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "String", "cookieName", ")", "{", "// 240540 getReferrerURLCookieHandler().invalidateReferrerURLCookie(req, res, cookieName); // need to have domain here...
240540: rather than call webcontainer code, replace the cookie with an empty one having same cookie and domain name and add to response.
[ "240540", ":", "rather", "than", "call", "webcontainer", "code", "replace", "the", "cookie", "with", "an", "empty", "one", "having", "same", "cookie", "and", "domain", "name", "and", "add", "to", "response", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OidcClientUtil.java#L301-L316
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Completable.java
Completable.blockingAwait
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final boolean blockingAwait(long timeout, TimeUnit unit) { """ Subscribes to and awaits the termination of this Completable instance in a blocking manner with a specific timeout and rethrows any exception emitted within the timeout window. ...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final boolean blockingAwait(long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(unit, "unit is null"); BlockingMultiObserver<Void> observer = new BlockingMultiObserver<Void>(); subscribe(observer); return ob...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "boolean", "blockingAwait", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "unit", ",", "\"uni...
Subscribes to and awaits the termination of this Completable instance in a blocking manner with a specific timeout and rethrows any exception emitted within the timeout window. <p> <img width="640" height="348" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.blockingAwait.t.png" alt=""...
[ "Subscribes", "to", "and", "awaits", "the", "termination", "of", "this", "Completable", "instance", "in", "a", "blocking", "manner", "with", "a", "specific", "timeout", "and", "rethrows", "any", "exception", "emitted", "within", "the", "timeout", "window", ".", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Completable.java#L1209-L1216
soklet/soklet
src/main/java/com/soklet/web/HashedUrlManifest.java
HashedUrlManifest.writeToOutputStream
public void writeToOutputStream(OutputStream outputStream, PersistenceFormat persistenceFormat) throws IOException { """ Serializes this manifest to the given {@code outputStream}. The inverse of this operation is {@link #HashedUrlManifest(InputStream)}. <p> Caller is responsible for flushing and closing the {@...
java
public void writeToOutputStream(OutputStream outputStream, PersistenceFormat persistenceFormat) throws IOException { requireNonNull(outputStream); requireNonNull(persistenceFormat); @SuppressWarnings({ "unchecked", "rawtypes" }) JSONObject jsonObject = new JSONObject((Map) hashedUrlsByUrl()); Strin...
[ "public", "void", "writeToOutputStream", "(", "OutputStream", "outputStream", ",", "PersistenceFormat", "persistenceFormat", ")", "throws", "IOException", "{", "requireNonNull", "(", "outputStream", ")", ";", "requireNonNull", "(", "persistenceFormat", ")", ";", "@", ...
Serializes this manifest to the given {@code outputStream}. The inverse of this operation is {@link #HashedUrlManifest(InputStream)}. <p> Caller is responsible for flushing and closing the {@code outputStream} after this method has completed. <p> Note that the serialization format is not formally specified and is subje...
[ "Serializes", "this", "manifest", "to", "the", "given", "{", "@code", "outputStream", "}", ".", "The", "inverse", "of", "this", "operation", "is", "{", "@link", "#HashedUrlManifest", "(", "InputStream", ")", "}", ".", "<p", ">", "Caller", "is", "responsible"...
train
https://github.com/soklet/soklet/blob/4f12de07d9c132e0126d50ad11cc1d8576594700/src/main/java/com/soklet/web/HashedUrlManifest.java#L128-L137
phxql/argon2-jvm
src/main/java/de/mkammerer/argon2/Argon2Factory.java
Argon2Factory.createAdvanced
public static Argon2Advanced createAdvanced(Argon2Types type, int defaultSaltLength, int defaultHashLength) { """ Creates a new {@link Argon2Advanced} instance with the given type. @param type Argon2 type. @param defaultSaltLength Default salt length in bytes. Can be overridden by some methods. @...
java
public static Argon2Advanced createAdvanced(Argon2Types type, int defaultSaltLength, int defaultHashLength) { return createInternal(type, defaultSaltLength, defaultHashLength); }
[ "public", "static", "Argon2Advanced", "createAdvanced", "(", "Argon2Types", "type", ",", "int", "defaultSaltLength", ",", "int", "defaultHashLength", ")", "{", "return", "createInternal", "(", "type", ",", "defaultSaltLength", ",", "defaultHashLength", ")", ";", "}"...
Creates a new {@link Argon2Advanced} instance with the given type. @param type Argon2 type. @param defaultSaltLength Default salt length in bytes. Can be overridden by some methods. @param defaultHashLength Default hash length in bytes. Can be overridden by some methods. @return Argon2Advanced instance.
[ "Creates", "a", "new", "{", "@link", "Argon2Advanced", "}", "instance", "with", "the", "given", "type", "." ]
train
https://github.com/phxql/argon2-jvm/blob/27a13907729e67e98cca53eba279e109b60f04f1/src/main/java/de/mkammerer/argon2/Argon2Factory.java#L83-L85
JetBrains/xodus
openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java
EnvironmentConfig.setTreeDupMaxPageSize
public EnvironmentConfig setTreeDupMaxPageSize(final int pageSize) throws InvalidSettingException { """ Sets the maximum size of page of duplicates sub-B+Tree. Default value is {@code 8}. Only sizes in the range [8..128] are accepted. <p>Mutable at runtime: yes @param pageSize maximum size of page of duplicat...
java
public EnvironmentConfig setTreeDupMaxPageSize(final int pageSize) throws InvalidSettingException { if (pageSize < 8 || pageSize > 128) { throw new InvalidSettingException("Invalid dup tree page size: " + pageSize); } return setSetting(TREE_DUP_MAX_PAGE_SIZE, pageSize); }
[ "public", "EnvironmentConfig", "setTreeDupMaxPageSize", "(", "final", "int", "pageSize", ")", "throws", "InvalidSettingException", "{", "if", "(", "pageSize", "<", "8", "||", "pageSize", ">", "128", ")", "{", "throw", "new", "InvalidSettingException", "(", "\"Inva...
Sets the maximum size of page of duplicates sub-B+Tree. Default value is {@code 8}. Only sizes in the range [8..128] are accepted. <p>Mutable at runtime: yes @param pageSize maximum size of page of duplicates sub-B+Tree @return this {@code EnvironmentConfig} instance @throws InvalidSettingException page size is not in...
[ "Sets", "the", "maximum", "size", "of", "page", "of", "duplicates", "sub", "-", "B", "+", "Tree", ".", "Default", "value", "is", "{", "@code", "8", "}", ".", "Only", "sizes", "in", "the", "range", "[", "8", "..", "128", "]", "are", "accepted", ".",...
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java#L1748-L1753
apache/reef
lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizInjectionPlanVisitor.java
GraphvizInjectionPlanVisitor.visit
@Override public boolean visit(final InjectionPlan<?> nodeFrom, final InjectionPlan<?> nodeTo) { """ Process current edge of the injection plan. @param nodeFrom Current injection plan node. @param nodeTo Destination injection plan node. @return true to proceed with the next node, false to cancel. """ ...
java
@Override public boolean visit(final InjectionPlan<?> nodeFrom, final InjectionPlan<?> nodeTo) { this.graphStr .append(" \"") .append(nodeFrom.getClass()) .append('_') .append(nodeFrom.getNode().getName()) .append("\" -> \"") .append(nodeTo.getClass()) .app...
[ "@", "Override", "public", "boolean", "visit", "(", "final", "InjectionPlan", "<", "?", ">", "nodeFrom", ",", "final", "InjectionPlan", "<", "?", ">", "nodeTo", ")", "{", "this", ".", "graphStr", ".", "append", "(", "\" \\\"\"", ")", ".", "append", "(",...
Process current edge of the injection plan. @param nodeFrom Current injection plan node. @param nodeTo Destination injection plan node. @return true to proceed with the next node, false to cancel.
[ "Process", "current", "edge", "of", "the", "injection", "plan", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizInjectionPlanVisitor.java#L146-L159
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java
DomUtil.filterNodeListByType
public static List<DomElement> filterNodeListByType(NodeList nodeList, ModelInstanceImpl modelInstance, Class<?> type) { """ Filter a {@link NodeList} retaining all elements with a specific type @param nodeList the {@link NodeList} to filter @param modelInstance the model instance @param type the type cl...
java
public static List<DomElement> filterNodeListByType(NodeList nodeList, ModelInstanceImpl modelInstance, Class<?> type) { return filterNodeList(nodeList, new ElementByTypeListFilter(type, modelInstance)); }
[ "public", "static", "List", "<", "DomElement", ">", "filterNodeListByType", "(", "NodeList", "nodeList", ",", "ModelInstanceImpl", "modelInstance", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "filterNodeList", "(", "nodeList", ",", "new", "ElementBy...
Filter a {@link NodeList} retaining all elements with a specific type @param nodeList the {@link NodeList} to filter @param modelInstance the model instance @param type the type class to filter for @return the list of all Elements which match the filter
[ "Filter", "a", "{", "@link", "NodeList", "}", "retaining", "all", "elements", "with", "a", "specific", "type" ]
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java#L183-L185
morimekta/utils
console-util/src/main/java/net/morimekta/console/args/SubCommandSet.java
SubCommandSet.printUsage
public void printUsage(OutputStream out, String name, boolean showHidden) { """ Print the option usage list for the command. @param out The output stream. @param name The sub-command to print help for. @param showHidden If hidden sub-commands should be shown. """ printUsage(new PrintWriter(new Out...
java
public void printUsage(OutputStream out, String name, boolean showHidden) { printUsage(new PrintWriter(new OutputStreamWriter(out, UTF_8)), name, showHidden); }
[ "public", "void", "printUsage", "(", "OutputStream", "out", ",", "String", "name", ",", "boolean", "showHidden", ")", "{", "printUsage", "(", "new", "PrintWriter", "(", "new", "OutputStreamWriter", "(", "out", ",", "UTF_8", ")", ")", ",", "name", ",", "sho...
Print the option usage list for the command. @param out The output stream. @param name The sub-command to print help for. @param showHidden If hidden sub-commands should be shown.
[ "Print", "the", "option", "usage", "list", "for", "the", "command", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/console-util/src/main/java/net/morimekta/console/args/SubCommandSet.java#L214-L216
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/Util.java
Util.getLength
public static long getLength(ValueData value, int propType) { """ Returns length of the internal value. @param value a value. @param propType @return the length of the internal value or <code>-1</code> if the length cannot be determined. """ if (propType == PropertyType.BINARY) { ret...
java
public static long getLength(ValueData value, int propType) { if (propType == PropertyType.BINARY) { return value.getLength(); } else if (propType == PropertyType.NAME || propType == PropertyType.PATH) { return -1; } else { return value.toStr...
[ "public", "static", "long", "getLength", "(", "ValueData", "value", ",", "int", "propType", ")", "{", "if", "(", "propType", "==", "PropertyType", ".", "BINARY", ")", "{", "return", "value", ".", "getLength", "(", ")", ";", "}", "else", "if", "(", "pro...
Returns length of the internal value. @param value a value. @param propType @return the length of the internal value or <code>-1</code> if the length cannot be determined.
[ "Returns", "length", "of", "the", "internal", "value", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/Util.java#L286-L300
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
AnnotationTypeRequiredMemberBuilder.buildSignature
public void buildSignature(XMLNode node, Content annotationDocTree) { """ Build the signature. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added """ annotationDocTree.addContent(writer.getSignat...
java
public void buildSignature(XMLNode node, Content annotationDocTree) { annotationDocTree.addContent(writer.getSignature(currentMember)); }
[ "public", "void", "buildSignature", "(", "XMLNode", "node", ",", "Content", "annotationDocTree", ")", "{", "annotationDocTree", ".", "addContent", "(", "writer", ".", "getSignature", "(", "currentMember", ")", ")", ";", "}" ]
Build the signature. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added
[ "Build", "the", "signature", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java#L179-L181
facebookarchive/nifty
nifty-core/src/main/java/com/facebook/nifty/core/ThriftMessage.java
ThriftMessage.getMessageFactory
public Factory getMessageFactory() { """ Gets a {@link Factory} for creating messages similar to this one. Used by {@link NiftyDispatcher} to create response messages that are similar to their corresponding request messages. @return The {@link Factory} """ return new Factory() { ...
java
public Factory getMessageFactory() { return new Factory() { @Override public ThriftMessage create(ChannelBuffer messageBuffer) { return new ThriftMessage(messageBuffer, getTransportType()); } }; }
[ "public", "Factory", "getMessageFactory", "(", ")", "{", "return", "new", "Factory", "(", ")", "{", "@", "Override", "public", "ThriftMessage", "create", "(", "ChannelBuffer", "messageBuffer", ")", "{", "return", "new", "ThriftMessage", "(", "messageBuffer", ","...
Gets a {@link Factory} for creating messages similar to this one. Used by {@link NiftyDispatcher} to create response messages that are similar to their corresponding request messages. @return The {@link Factory}
[ "Gets", "a", "{", "@link", "Factory", "}", "for", "creating", "messages", "similar", "to", "this", "one", ".", "Used", "by", "{", "@link", "NiftyDispatcher", "}", "to", "create", "response", "messages", "that", "are", "similar", "to", "their", "corresponding...
train
https://github.com/facebookarchive/nifty/blob/ccacff7f0a723abe0b9ed399bcc3bc85784e7396/nifty-core/src/main/java/com/facebook/nifty/core/ThriftMessage.java#L49-L59
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java
PhotosApi.recentlyUpdated
public Photos recentlyUpdated(Date minDate, Set<JinxConstants.PhotoExtras> extras, int perPage, int page) throws JinxException { """ Return a list of your photos that have been recently created or which have been recently modified. <br> Recently modified may mean that the photo's metadata (title, description, ta...
java
public Photos recentlyUpdated(Date minDate, Set<JinxConstants.PhotoExtras> extras, int perPage, int page) throws JinxException { JinxUtils.validateParams(minDate); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.recentlyUpdated"); params.put("min_date", JinxUtils.format...
[ "public", "Photos", "recentlyUpdated", "(", "Date", "minDate", ",", "Set", "<", "JinxConstants", ".", "PhotoExtras", ">", "extras", ",", "int", "perPage", ",", "int", "page", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "minDat...
Return a list of your photos that have been recently created or which have been recently modified. <br> Recently modified may mean that the photo's metadata (title, description, tags) may have been changed or a comment has been added (or just modified somehow :-) <br> This method requires authentication with 'read' per...
[ "Return", "a", "list", "of", "your", "photos", "that", "have", "been", "recently", "created", "or", "which", "have", "been", "recently", "modified", ".", "<br", ">", "Recently", "modified", "may", "mean", "that", "the", "photo", "s", "metadata", "(", "titl...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java#L660-L675
samskivert/samskivert
src/main/java/com/samskivert/velocity/DataTool.java
DataTool.get
public Object get (Object array, int index) { """ Returns the object in the array at index. Wrapped as an object if it is a primitive. """ return (array == null) ? null : Array.get(array, index); }
java
public Object get (Object array, int index) { return (array == null) ? null : Array.get(array, index); }
[ "public", "Object", "get", "(", "Object", "array", ",", "int", "index", ")", "{", "return", "(", "array", "==", "null", ")", "?", "null", ":", "Array", ".", "get", "(", "array", ",", "index", ")", ";", "}" ]
Returns the object in the array at index. Wrapped as an object if it is a primitive.
[ "Returns", "the", "object", "in", "the", "array", "at", "index", ".", "Wrapped", "as", "an", "object", "if", "it", "is", "a", "primitive", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/velocity/DataTool.java#L37-L40
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/properties/HazelcastProperties.java
HazelcastProperties.getEnum
public <E extends Enum> E getEnum(HazelcastProperty property, Class<E> enumClazz) { """ Returns the configured enum value of a {@link GroupProperty}. <p> The case of the enum is ignored. @param property the {@link GroupProperty} to get the value from @return the enum @throws IllegalArgumentException if the ...
java
public <E extends Enum> E getEnum(HazelcastProperty property, Class<E> enumClazz) { String value = getString(property); for (E enumConstant : enumClazz.getEnumConstants()) { if (enumConstant.name().equalsIgnoreCase(value)) { return enumConstant; } } ...
[ "public", "<", "E", "extends", "Enum", ">", "E", "getEnum", "(", "HazelcastProperty", "property", ",", "Class", "<", "E", ">", "enumClazz", ")", "{", "String", "value", "=", "getString", "(", "property", ")", ";", "for", "(", "E", "enumConstant", ":", ...
Returns the configured enum value of a {@link GroupProperty}. <p> The case of the enum is ignored. @param property the {@link GroupProperty} to get the value from @return the enum @throws IllegalArgumentException if the enum value can't be found
[ "Returns", "the", "configured", "enum", "value", "of", "a", "{", "@link", "GroupProperty", "}", ".", "<p", ">", "The", "case", "of", "the", "enum", "is", "ignored", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/properties/HazelcastProperties.java#L289-L300
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobSynchronizer.java
BlobSynchronizer.updateKeySetForBlobStore
private void updateKeySetForBlobStore(Set<String> keySetBlobStore, CuratorFramework zkClient) { """ Update current key list inside the blobstore if the version changes """ try { for (String key : keySetBlobStore) { LOG.debug("updating blob"); BlobStoreUtils.u...
java
private void updateKeySetForBlobStore(Set<String> keySetBlobStore, CuratorFramework zkClient) { try { for (String key : keySetBlobStore) { LOG.debug("updating blob"); BlobStoreUtils.updateKeyForBlobStore(conf, blobStore, zkClient, key, nimbusInfo); } ...
[ "private", "void", "updateKeySetForBlobStore", "(", "Set", "<", "String", ">", "keySetBlobStore", ",", "CuratorFramework", "zkClient", ")", "{", "try", "{", "for", "(", "String", "key", ":", "keySetBlobStore", ")", "{", "LOG", ".", "debug", "(", "\"updating bl...
Update current key list inside the blobstore if the version changes
[ "Update", "current", "key", "list", "inside", "the", "blobstore", "if", "the", "version", "changes" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobSynchronizer.java#L110-L119
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
ClassReader.enterClass
public ClassSymbol enterClass(Name flatname) { """ Create a new member or toplevel class symbol with given flat name and enter in `classes' unless already there. """ ClassSymbol c = classes.get(flatname); if (c == null) return enterClass(flatname, (JavaFileObject)null); els...
java
public ClassSymbol enterClass(Name flatname) { ClassSymbol c = classes.get(flatname); if (c == null) return enterClass(flatname, (JavaFileObject)null); else return c; }
[ "public", "ClassSymbol", "enterClass", "(", "Name", "flatname", ")", "{", "ClassSymbol", "c", "=", "classes", ".", "get", "(", "flatname", ")", ";", "if", "(", "c", "==", "null", ")", "return", "enterClass", "(", "flatname", ",", "(", "JavaFileObject", "...
Create a new member or toplevel class symbol with given flat name and enter in `classes' unless already there.
[ "Create", "a", "new", "member", "or", "toplevel", "class", "symbol", "with", "given", "flat", "name", "and", "enter", "in", "classes", "unless", "already", "there", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java#L2431-L2437
sonyxperiadev/gerrit-events
src/main/java/com/sonymobile/tools/gerrit/gerritevents/ssh/SshConnectionFactory.java
SshConnectionFactory.getConnection
public static SshConnection getConnection(String host, int port, Authentication authentication) throws IOException { """ Creates a {@link SshConnection}. @param host the host name @param port the port @param authentication the credentials @ret...
java
public static SshConnection getConnection(String host, int port, Authentication authentication) throws IOException { return getConnection(host, port, GerritDefaultValues.DEFAULT_GERRIT_PROXY, authentication); }
[ "public", "static", "SshConnection", "getConnection", "(", "String", "host", ",", "int", "port", ",", "Authentication", "authentication", ")", "throws", "IOException", "{", "return", "getConnection", "(", "host", ",", "port", ",", "GerritDefaultValues", ".", "DEFA...
Creates a {@link SshConnection}. @param host the host name @param port the port @param authentication the credentials @return a new connection. @throws IOException if so. @see SshConnection @see SshConnectionImpl
[ "Creates", "a", "{", "@link", "SshConnection", "}", "." ]
train
https://github.com/sonyxperiadev/gerrit-events/blob/9a443d13dded85cc4709136ac33989f2bbb34fe2/src/main/java/com/sonymobile/tools/gerrit/gerritevents/ssh/SshConnectionFactory.java#L57-L60
zaproxy/zaproxy
src/org/zaproxy/zap/spider/filters/HttpPrefixFetchFilter.java
HttpPrefixFetchFilter.isDefaultHttpOrHttpsPort
private static boolean isDefaultHttpOrHttpsPort(String scheme, int port) { """ Tells whether or not the given {@code port} is the default for the given {@code scheme}. <p> The method returns always {@code false} for non HTTP or HTTPS schemes. @param scheme the scheme of a URI, might be {@code null} @param po...
java
private static boolean isDefaultHttpOrHttpsPort(String scheme, int port) { if (port == DEFAULT_HTTP_PORT && isHttp(scheme)) { return true; } if (port == DEFAULT_HTTPS_PORT && isHttps(scheme)) { return true; } return false; }
[ "private", "static", "boolean", "isDefaultHttpOrHttpsPort", "(", "String", "scheme", ",", "int", "port", ")", "{", "if", "(", "port", "==", "DEFAULT_HTTP_PORT", "&&", "isHttp", "(", "scheme", ")", ")", "{", "return", "true", ";", "}", "if", "(", "port", ...
Tells whether or not the given {@code port} is the default for the given {@code scheme}. <p> The method returns always {@code false} for non HTTP or HTTPS schemes. @param scheme the scheme of a URI, might be {@code null} @param port the port of a URI @return {@code true} if the {@code port} is the default for the give...
[ "Tells", "whether", "or", "not", "the", "given", "{", "@code", "port", "}", "is", "the", "default", "for", "the", "given", "{", "@code", "scheme", "}", ".", "<p", ">", "The", "method", "returns", "always", "{", "@code", "false", "}", "for", "non", "H...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/filters/HttpPrefixFetchFilter.java#L230-L238
tacitknowledge/discovery
src/main/java/com/tacitknowledge/util/discovery/ClasspathFileReader.java
ClasspathFileReader.findFile
private File findFile(String fileName, List path) { """ Finds a file if it exists in a list of provided paths @param fileName the name of the file @param path a list of file paths @return a file or null if none is found """ final String methodName = "findFile(): "; String fileSeparator = S...
java
private File findFile(String fileName, List path) { final String methodName = "findFile(): "; String fileSeparator = System.getProperty("file.separator"); for (Iterator i = path.iterator(); i.hasNext();) { String directory = (String) i.next(); if (!directory.e...
[ "private", "File", "findFile", "(", "String", "fileName", ",", "List", "path", ")", "{", "final", "String", "methodName", "=", "\"findFile(): \"", ";", "String", "fileSeparator", "=", "System", ".", "getProperty", "(", "\"file.separator\"", ")", ";", "for", "(...
Finds a file if it exists in a list of provided paths @param fileName the name of the file @param path a list of file paths @return a file or null if none is found
[ "Finds", "a", "file", "if", "it", "exists", "in", "a", "list", "of", "provided", "paths" ]
train
https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClasspathFileReader.java#L184-L208
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/Validator.java
Validator.validateHostImpl
static ParsedHost validateHostImpl(HostName fromHost) throws HostNameException { """ So we will follow rfc 1035 and in addition allow the underscore. """ final String str = fromHost.toString(); HostNameParameters validationOptions = fromHost.getValidationOptions(); return validateHost(fromHost, str, vali...
java
static ParsedHost validateHostImpl(HostName fromHost) throws HostNameException { final String str = fromHost.toString(); HostNameParameters validationOptions = fromHost.getValidationOptions(); return validateHost(fromHost, str, validationOptions); }
[ "static", "ParsedHost", "validateHostImpl", "(", "HostName", "fromHost", ")", "throws", "HostNameException", "{", "final", "String", "str", "=", "fromHost", ".", "toString", "(", ")", ";", "HostNameParameters", "validationOptions", "=", "fromHost", ".", "getValidati...
So we will follow rfc 1035 and in addition allow the underscore.
[ "So", "we", "will", "follow", "rfc", "1035", "and", "in", "addition", "allow", "the", "underscore", "." ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/Validator.java#L2426-L2430
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.replaceAll
public StrBuilder replaceAll(final StrMatcher matcher, final String replaceStr) { """ Replaces all matches within the builder with the replace string. <p> Matchers can be used to perform advanced replace behaviour. For example you could write a matcher to replace all occurrences where the character 'a' is foll...
java
public StrBuilder replaceAll(final StrMatcher matcher, final String replaceStr) { return replace(matcher, replaceStr, 0, size, -1); }
[ "public", "StrBuilder", "replaceAll", "(", "final", "StrMatcher", "matcher", ",", "final", "String", "replaceStr", ")", "{", "return", "replace", "(", "matcher", ",", "replaceStr", ",", "0", ",", "size", ",", "-", "1", ")", ";", "}" ]
Replaces all matches within the builder with the replace string. <p> Matchers can be used to perform advanced replace behaviour. For example you could write a matcher to replace all occurrences where the character 'a' is followed by a number. @param matcher the matcher to use to find the deletion, null causes no acti...
[ "Replaces", "all", "matches", "within", "the", "builder", "with", "the", "replace", "string", ".", "<p", ">", "Matchers", "can", "be", "used", "to", "perform", "advanced", "replace", "behaviour", ".", "For", "example", "you", "could", "write", "a", "matcher"...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L2050-L2052
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgVertex3D.java
DwgVertex3D.readDwgVertex3DV15
public void readDwgVertex3DV15(int[] data, int offset) throws Exception { """ Read a Vertex3D in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in ...
java
public void readDwgVertex3DV15(int[] data, int offset) throws Exception { int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.getRawChar(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int flags = ((Integer)v.get(1)).intValue(); this.flags = flags; v = DwgUtil.getBi...
[ "public", "void", "readDwgVertex3DV15", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "int", "bitPos", "=", "offset", ";", "bitPos", "=", "readObjectHeaderV15", "(", "data", ",", "bitPos", ")", ";", "Vector", "v", "...
Read a Vertex3D in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.
[ "Read", "a", "Vertex3D", "in", "the", "DWG", "format", "Version", "15" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgVertex3D.java#L43-L62
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/UpgradeProposalRequest.java
UpgradeProposalRequest.setTransientMap
public void setTransientMap(Map<String, byte[]> transientMap) throws InvalidArgumentException { """ Transient data added to the proposal that is not added to the ledger. @param transientMap Map of strings to bytes that's added to the proposal @throws InvalidArgumentException if the argument is null. """ ...
java
public void setTransientMap(Map<String, byte[]> transientMap) throws InvalidArgumentException { if (null == transientMap) { throw new InvalidArgumentException("Transient map may not be set to null"); } this.transientMap = transientMap; }
[ "public", "void", "setTransientMap", "(", "Map", "<", "String", ",", "byte", "[", "]", ">", "transientMap", ")", "throws", "InvalidArgumentException", "{", "if", "(", "null", "==", "transientMap", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"T...
Transient data added to the proposal that is not added to the ledger. @param transientMap Map of strings to bytes that's added to the proposal @throws InvalidArgumentException if the argument is null.
[ "Transient", "data", "added", "to", "the", "proposal", "that", "is", "not", "added", "to", "the", "ledger", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/UpgradeProposalRequest.java#L37-L44
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.isTrue
public static void isTrue(final boolean expression, final String message, final Object... values) { """ <p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as ...
java
public static void isTrue(final boolean expression, final String message, final Object... values) { if (!expression) { throw new IllegalArgumentException(StringUtils.simpleFormat(message, values)); } }
[ "public", "static", "void", "isTrue", "(", "final", "boolean", "expression", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "new", "IllegalArgumentException", "(", "Strin...
<p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.</p> <pre> Validate.isTrue(i &gt;...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "true", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L158-L162
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/storage/PayloadSender.java
PayloadSender.handleFinishSendingPayload
private synchronized void handleFinishSendingPayload(PayloadData payload, boolean cancelled, String errorMessage, int responseCode, JSONObject responseData) { """ Executed when we're done with the current payload @param payload - current payload @param cancelled - flag indicating if payload Http-request ...
java
private synchronized void handleFinishSendingPayload(PayloadData payload, boolean cancelled, String errorMessage, int responseCode, JSONObject responseData) { sendingFlag = false; // mark sender as 'not busy' try { if (listener != null) { listener.onFinishSending(this, payload, cancelled, errorMessage, resp...
[ "private", "synchronized", "void", "handleFinishSendingPayload", "(", "PayloadData", "payload", ",", "boolean", "cancelled", ",", "String", "errorMessage", ",", "int", "responseCode", ",", "JSONObject", "responseData", ")", "{", "sendingFlag", "=", "false", ";", "//...
Executed when we're done with the current payload @param payload - current payload @param cancelled - flag indicating if payload Http-request was cancelled @param errorMessage - if not <code>null</code> - payload request failed @param responseCode - http-request response code @param responseData - http-reqeust ...
[ "Executed", "when", "we", "re", "done", "with", "the", "current", "payload" ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/storage/PayloadSender.java#L156-L167
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.rightShift
public static Period rightShift(final Year self, Year year) { """ Returns a {@link java.time.Period} between the first day of this year (inclusive) and the first day of the provided {@link java.time.Year} (exclusive). @param self a Year @param year another Year @return a Period between the Years @since 2.5....
java
public static Period rightShift(final Year self, Year year) { return Period.between(self.atDay(1), year.atDay(1)); }
[ "public", "static", "Period", "rightShift", "(", "final", "Year", "self", ",", "Year", "year", ")", "{", "return", "Period", ".", "between", "(", "self", ".", "atDay", "(", "1", ")", ",", "year", ".", "atDay", "(", "1", ")", ")", ";", "}" ]
Returns a {@link java.time.Period} between the first day of this year (inclusive) and the first day of the provided {@link java.time.Year} (exclusive). @param self a Year @param year another Year @return a Period between the Years @since 2.5.0
[ "Returns", "a", "{", "@link", "java", ".", "time", ".", "Period", "}", "between", "the", "first", "day", "of", "this", "year", "(", "inclusive", ")", "and", "the", "first", "day", "of", "the", "provided", "{", "@link", "java", ".", "time", ".", "Year...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1478-L1480
mbenson/therian
core/src/main/java/therian/operator/copy/Copier.java
Copier.supports
@Override public boolean supports(TherianContext context, Copy<? extends SOURCE, ? extends TARGET> copy) { """ By default, rejects immutable target positions, and ensures that type parameters are compatible. @param copy operation @see ImmutableCheck """ if (context.eval(ImmutableCheck.of(copy...
java
@Override public boolean supports(TherianContext context, Copy<? extends SOURCE, ? extends TARGET> copy) { if (context.eval(ImmutableCheck.of(copy.getTargetPosition())).booleanValue() && isRejectImmutable()) { return false; } return TypeUtils.isAssignable(copy.getSourceType().get...
[ "@", "Override", "public", "boolean", "supports", "(", "TherianContext", "context", ",", "Copy", "<", "?", "extends", "SOURCE", ",", "?", "extends", "TARGET", ">", "copy", ")", "{", "if", "(", "context", ".", "eval", "(", "ImmutableCheck", ".", "of", "("...
By default, rejects immutable target positions, and ensures that type parameters are compatible. @param copy operation @see ImmutableCheck
[ "By", "default", "rejects", "immutable", "target", "positions", "and", "ensures", "that", "type", "parameters", "are", "compatible", "." ]
train
https://github.com/mbenson/therian/blob/0653505f73e2a6f5b0abc394ea6d83af03408254/core/src/main/java/therian/operator/copy/Copier.java#L69-L76
craigwblake/redline
src/main/java/org/redline_rpm/Builder.java
Builder.addDependencyLess
public void addDependencyLess( final CharSequence name, final CharSequence version) { """ Adds a dependency to the RPM package. This dependency version will be marked as the maximum allowed, and the package will require the named dependency with this version or lower at install time. @param name the name of t...
java
public void addDependencyLess( final CharSequence name, final CharSequence version) { int flag = LESS | EQUAL; if (name.toString().startsWith("rpmlib(")){ flag = flag | RPMLIB; } addDependency( name, version, flag); }
[ "public", "void", "addDependencyLess", "(", "final", "CharSequence", "name", ",", "final", "CharSequence", "version", ")", "{", "int", "flag", "=", "LESS", "|", "EQUAL", ";", "if", "(", "name", ".", "toString", "(", ")", ".", "startsWith", "(", "\"rpmlib(\...
Adds a dependency to the RPM package. This dependency version will be marked as the maximum allowed, and the package will require the named dependency with this version or lower at install time. @param name the name of the dependency. @param version the version identifier.
[ "Adds", "a", "dependency", "to", "the", "RPM", "package", ".", "This", "dependency", "version", "will", "be", "marked", "as", "the", "maximum", "allowed", "and", "the", "package", "will", "require", "the", "named", "dependency", "with", "this", "version", "o...
train
https://github.com/craigwblake/redline/blob/b2fee5eb6c8150e801a132a4478a643f9ec0df04/src/main/java/org/redline_rpm/Builder.java#L181-L187
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.exceptionListener
@SuppressWarnings("unchecked") public static <T, E extends Throwable> void exceptionListener(CompletableFuture<T> completableFuture, Class<E> exceptionClass, Consumer<E> exceptionListener) { """ Registers an exception listener to the given CompletableFuture for a particular type of exception. @param complet...
java
@SuppressWarnings("unchecked") public static <T, E extends Throwable> void exceptionListener(CompletableFuture<T> completableFuture, Class<E> exceptionClass, Consumer<E> exceptionListener) { completableFuture.whenComplete((r, ex) -> { if (ex != null && exceptionClass.isAssignableFrom(ex.getClass...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "E", "extends", "Throwable", ">", "void", "exceptionListener", "(", "CompletableFuture", "<", "T", ">", "completableFuture", ",", "Class", "<", "E", ">", "exceptionClass", "...
Registers an exception listener to the given CompletableFuture for a particular type of exception. @param completableFuture The Future to register to. @param exceptionClass The type of exception to listen to. @param exceptionListener The Listener to register. @param <T> The Type of the future's result...
[ "Registers", "an", "exception", "listener", "to", "the", "given", "CompletableFuture", "for", "a", "particular", "type", "of", "exception", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L254-L261
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaUrlUtils.java
UaaUrlUtils.findMatchingRedirectUri
public static String findMatchingRedirectUri(Collection<String> redirectUris, String requestedRedirectUri, String fallbackRedirectUri) { """ Finds and returns a matching redirect URL according to the following logic: <ul> <li>If the requstedRedirectUri matches the whitelist the requestedRedirectUri is returned</...
java
public static String findMatchingRedirectUri(Collection<String> redirectUris, String requestedRedirectUri, String fallbackRedirectUri) { AntPathMatcher matcher = new AntPathMatcher(); for (String pattern : ofNullable(redirectUris).orElse(emptyList())) { if (matcher.match(pattern, requestedR...
[ "public", "static", "String", "findMatchingRedirectUri", "(", "Collection", "<", "String", ">", "redirectUris", ",", "String", "requestedRedirectUri", ",", "String", "fallbackRedirectUri", ")", "{", "AntPathMatcher", "matcher", "=", "new", "AntPathMatcher", "(", ")", ...
Finds and returns a matching redirect URL according to the following logic: <ul> <li>If the requstedRedirectUri matches the whitelist the requestedRedirectUri is returned</li> <li>If the whitelist is null or empty AND the fallbackRedirectUri is null, the requestedRedirectUri is returned - OPEN REDIRECT</li> <li>If the ...
[ "Finds", "and", "returns", "a", "matching", "redirect", "URL", "according", "to", "the", "following", "logic", ":", "<ul", ">", "<li", ">", "If", "the", "requstedRedirectUri", "matches", "the", "whitelist", "the", "requestedRedirectUri", "is", "returned<", "/", ...
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/util/UaaUrlUtils.java#L87-L97
maxirosson/jdroid-android
jdroid-android-sqlite/src/main/java/com/jdroid/android/sqlite/repository/SQLiteRepository.java
SQLiteRepository.getCreateTableSQL
private String getCreateTableSQL(String columns, String references, String uniqueColumns) { """ Creates the SQL statement to create the table using given columns definitions. @param columns columns definitions. @param references reference constraints. @param uniqueColumns unique constraints. @return SQL stat...
java
private String getCreateTableSQL(String columns, String references, String uniqueColumns) { StringBuilder builder = new StringBuilder(); builder.append("CREATE TABLE ").append(getTableName()).append("("); builder.append(columns); builder.append(references); builder.append("UNIQUE (").append(uniqueColumns).app...
[ "private", "String", "getCreateTableSQL", "(", "String", "columns", ",", "String", "references", ",", "String", "uniqueColumns", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "\"CREATE TABLE \"", ...
Creates the SQL statement to create the table using given columns definitions. @param columns columns definitions. @param references reference constraints. @param uniqueColumns unique constraints. @return SQL statement.
[ "Creates", "the", "SQL", "statement", "to", "create", "the", "table", "using", "given", "columns", "definitions", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-sqlite/src/main/java/com/jdroid/android/sqlite/repository/SQLiteRepository.java#L492-L500
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/validation/CsvBindingErrors.java
CsvBindingErrors.reject
public void reject(final String[] errorCodes, final Map<String, Object> messageVariables, final String defaultMessage) { """ グローバルエラーを登録する。 @since 2.2 @param errorCodes エラーコード @param messageVariables メッセージ中の変数。 @param defaultMessage 指定したエラーコードに対するメッセージが見つからないときに使用するメッセージです。指定しない場合はnullを設定します。 """ ...
java
public void reject(final String[] errorCodes, final Map<String, Object> messageVariables, final String defaultMessage) { String[] codes = new String[0]; for(String errorCode : errorCodes) { codes = Utils.concat(codes, messageCodeGenerator.generateCodes(errorCode, getObjectName()...
[ "public", "void", "reject", "(", "final", "String", "[", "]", "errorCodes", ",", "final", "Map", "<", "String", ",", "Object", ">", "messageVariables", ",", "final", "String", "defaultMessage", ")", "{", "String", "[", "]", "codes", "=", "new", "String", ...
グローバルエラーを登録する。 @since 2.2 @param errorCodes エラーコード @param messageVariables メッセージ中の変数。 @param defaultMessage 指定したエラーコードに対するメッセージが見つからないときに使用するメッセージです。指定しない場合はnullを設定します。
[ "グローバルエラーを登録する。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/validation/CsvBindingErrors.java#L313-L320
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java
JMSManager.unsubscribeDurable
public void unsubscribeDurable(String subscriptionName) throws MessagingException { """ Removes the durable subscription with the given name. @param subscriptionName - name of the durable subscription @throws MessagingException """ try { Session session = con...
java
public void unsubscribeDurable(String subscriptionName) throws MessagingException { try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer consumer = durableSubscriptions.get(subscriptionName); if(consume...
[ "public", "void", "unsubscribeDurable", "(", "String", "subscriptionName", ")", "throws", "MessagingException", "{", "try", "{", "Session", "session", "=", "connection", ".", "createSession", "(", "false", ",", "Session", ".", "AUTO_ACKNOWLEDGE", ")", ";", "Messag...
Removes the durable subscription with the given name. @param subscriptionName - name of the durable subscription @throws MessagingException
[ "Removes", "the", "durable", "subscription", "with", "the", "given", "name", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java#L630-L647
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.terminateJobSchedule
public void terminateJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Terminates the specified job schedule. @param jobScheduleId The ID of the job schedule. @param additionalBehaviors A collection of {@link BatchClientBehavior} ...
java
public void terminateJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobScheduleTerminateOptions options = new JobScheduleTerminateOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehav...
[ "public", "void", "terminateJobSchedule", "(", "String", "jobScheduleId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "JobScheduleTerminateOptions", "options", "=", "new", "JobSche...
Terminates the specified job schedule. @param jobScheduleId The ID of the job schedule. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service....
[ "Terminates", "the", "specified", "job", "schedule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L347-L353
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/algorithm/TypeBasedSPIServiceLoader.java
TypeBasedSPIServiceLoader.newService
public final T newService(final String type, final Properties props) { """ Create new instance for type based SPI. @param type SPI type @param props SPI properties @return SPI instance """ Collection<T> typeBasedServices = loadTypeBasedServices(type); if (typeBasedServices.isEmpty()) { ...
java
public final T newService(final String type, final Properties props) { Collection<T> typeBasedServices = loadTypeBasedServices(type); if (typeBasedServices.isEmpty()) { throw new ShardingConfigurationException("Invalid `%s` SPI type `%s`.", classType.getName(), type); } T res...
[ "public", "final", "T", "newService", "(", "final", "String", "type", ",", "final", "Properties", "props", ")", "{", "Collection", "<", "T", ">", "typeBasedServices", "=", "loadTypeBasedServices", "(", "type", ")", ";", "if", "(", "typeBasedServices", ".", "...
Create new instance for type based SPI. @param type SPI type @param props SPI properties @return SPI instance
[ "Create", "new", "instance", "for", "type", "based", "SPI", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/algorithm/TypeBasedSPIServiceLoader.java#L50-L58
primefaces/primefaces
src/main/java/org/primefaces/expression/SearchExpressionFacade.java
SearchExpressionFacade.resolveClientId
public static String resolveClientId(FacesContext context, UIComponent source, String expression) { """ Resolves a {@link UIComponent} clientId and/or passtrough expression for the given expression. @param context The {@link FacesContext}. @param source The source component. E.g. a button. @param expression T...
java
public static String resolveClientId(FacesContext context, UIComponent source, String expression) { return resolveClientId(context, source, expression, SearchExpressionHint.NONE); }
[ "public", "static", "String", "resolveClientId", "(", "FacesContext", "context", ",", "UIComponent", "source", ",", "String", "expression", ")", "{", "return", "resolveClientId", "(", "context", ",", "source", ",", "expression", ",", "SearchExpressionHint", ".", "...
Resolves a {@link UIComponent} clientId and/or passtrough expression for the given expression. @param context The {@link FacesContext}. @param source The source component. E.g. a button. @param expression The search expression. @return A resolved clientId and/or passtrough expression (like PFS, widgetVar).
[ "Resolves", "a", "{", "@link", "UIComponent", "}", "clientId", "and", "/", "or", "passtrough", "expression", "for", "the", "given", "expression", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/expression/SearchExpressionFacade.java#L301-L303
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TriggerDef.java
TriggerDef.pushPair
synchronized void pushPair(Session session, Object[] row1, Object[] row2) { """ The main thread tells the trigger thread to fire by this call. If this Trigger is not threaded then the fire method is caled immediately and executed by the main thread. Otherwise, the row data objects are added to the queue to be u...
java
synchronized void pushPair(Session session, Object[] row1, Object[] row2) { if (maxRowsQueued == 0) { trigger.fire(triggerType, name.name, table.getName().name, row1, row2); return; } if (rowsQueued >= maxRowsQueued) { if (nowait) {...
[ "synchronized", "void", "pushPair", "(", "Session", "session", ",", "Object", "[", "]", "row1", ",", "Object", "[", "]", "row2", ")", "{", "if", "(", "maxRowsQueued", "==", "0", ")", "{", "trigger", ".", "fire", "(", "triggerType", ",", "name", ".", ...
The main thread tells the trigger thread to fire by this call. If this Trigger is not threaded then the fire method is caled immediately and executed by the main thread. Otherwise, the row data objects are added to the queue to be used by the Trigger thread. @param row1 @param row2
[ "The", "main", "thread", "tells", "the", "trigger", "thread", "to", "fire", "by", "this", "call", ".", "If", "this", "Trigger", "is", "not", "threaded", "then", "the", "fire", "method", "is", "caled", "immediately", "and", "executed", "by", "the", "main", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TriggerDef.java#L445-L473
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getThePricingTiers
public DeviceTypePricingTiersEnvelope getThePricingTiers(String dtid, Integer version) throws ApiException { """ Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return DeviceTypePricingTiersEnvelope @throws ApiExce...
java
public DeviceTypePricingTiersEnvelope getThePricingTiers(String dtid, Integer version) throws ApiException { ApiResponse<DeviceTypePricingTiersEnvelope> resp = getThePricingTiersWithHttpInfo(dtid, version); return resp.getData(); }
[ "public", "DeviceTypePricingTiersEnvelope", "getThePricingTiers", "(", "String", "dtid", ",", "Integer", "version", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceTypePricingTiersEnvelope", ">", "resp", "=", "getThePricingTiersWithHttpInfo", "(", "dtid", "...
Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return DeviceTypePricingTiersEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "devicetype&#39", ";", "s", "pricing", "tiers", ".", "Get", "devicetype&#39", ";", "s", "pricing", "tiers", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L387-L390
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java
ImageDrawing.drawInRound
public static void drawInRound(Bitmap src, Bitmap dest, int clearColor) { """ Drawing src bitmap to dest bitmap with round mask. Dest might be squared, src is recommended to be square @param src source bitmap @param dest destination bitmap @param clearColor clear color """ if (dest.ge...
java
public static void drawInRound(Bitmap src, Bitmap dest, int clearColor) { if (dest.getWidth() != dest.getHeight()) { throw new RuntimeException("dest Bitmap must have square size"); } clearBitmap(dest, clearColor); Canvas canvas = new Canvas(dest); int r = dest.getWi...
[ "public", "static", "void", "drawInRound", "(", "Bitmap", "src", ",", "Bitmap", "dest", ",", "int", "clearColor", ")", "{", "if", "(", "dest", ".", "getWidth", "(", ")", "!=", "dest", ".", "getHeight", "(", ")", ")", "{", "throw", "new", "RuntimeExcept...
Drawing src bitmap to dest bitmap with round mask. Dest might be squared, src is recommended to be square @param src source bitmap @param dest destination bitmap @param clearColor clear color
[ "Drawing", "src", "bitmap", "to", "dest", "bitmap", "with", "round", "mask", ".", "Dest", "might", "be", "squared", "src", "is", "recommended", "to", "be", "square" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java#L165-L191
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/service/PrintServiceImpl.java
PrintServiceImpl.removeDocument
public Document removeDocument(String key) throws PrintingException { """ Gets a document from the service. @param key unique key to reference the document @return the document or null if no such document """ if (documentMap.containsKey(key)) { return documentMap.remove(key); } else { throw new ...
java
public Document removeDocument(String key) throws PrintingException { if (documentMap.containsKey(key)) { return documentMap.remove(key); } else { throw new PrintingException(PrintingException.DOCUMENT_NOT_FOUND, key); } }
[ "public", "Document", "removeDocument", "(", "String", "key", ")", "throws", "PrintingException", "{", "if", "(", "documentMap", ".", "containsKey", "(", "key", ")", ")", "{", "return", "documentMap", ".", "remove", "(", "key", ")", ";", "}", "else", "{", ...
Gets a document from the service. @param key unique key to reference the document @return the document or null if no such document
[ "Gets", "a", "document", "from", "the", "service", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/service/PrintServiceImpl.java#L169-L175
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/report/tree/ContextTreeRenderer.java
ContextTreeRenderer.renderBundle
private void renderBundle(final ContextTreeConfig config, final TreeNode root, final Class<?> scope, final Class<Object> bundle) { """ Renders bundle if allowed. @param config tree config @param root current node @param scope current scope @param bundle bundle class """ ...
java
private void renderBundle(final ContextTreeConfig config, final TreeNode root, final Class<?> scope, final Class<Object> bundle) { final BundleItemInfo info = service.getData().getInfo(bundle); if (isHidden(config, info, scope)) { return; } final...
[ "private", "void", "renderBundle", "(", "final", "ContextTreeConfig", "config", ",", "final", "TreeNode", "root", ",", "final", "Class", "<", "?", ">", "scope", ",", "final", "Class", "<", "Object", ">", "bundle", ")", "{", "final", "BundleItemInfo", "info",...
Renders bundle if allowed. @param config tree config @param root current node @param scope current scope @param bundle bundle class
[ "Renders", "bundle", "if", "allowed", "." ]
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/report/tree/ContextTreeRenderer.java#L154-L172
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addLength
protected void addLength(Document doc, String propertyName, ValueData value, int propType) { """ Adds a {@link FieldNames#PROPERTY_LENGTHS} field to <code>document</code> with a named length value. @param doc the lucene document. @param propertyName the property name. @param value the interna...
java
protected void addLength(Document doc, String propertyName, ValueData value, int propType) { long length = Util.getLength(value, propType); if (length != -1) { doc.add(new Field(FieldNames.PROPERTY_LENGTHS, FieldNames.createNamedLength(propertyName, length), Field.Store.NO, Fie...
[ "protected", "void", "addLength", "(", "Document", "doc", ",", "String", "propertyName", ",", "ValueData", "value", ",", "int", "propType", ")", "{", "long", "length", "=", "Util", ".", "getLength", "(", "value", ",", "propType", ")", ";", "if", "(", "le...
Adds a {@link FieldNames#PROPERTY_LENGTHS} field to <code>document</code> with a named length value. @param doc the lucene document. @param propertyName the property name. @param value the internal value. @param propType
[ "Adds", "a", "{", "@link", "FieldNames#PROPERTY_LENGTHS", "}", "field", "to", "<code", ">", "document<", "/", "code", ">", "with", "a", "named", "length", "value", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L1033-L1041
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java
SQLMergeClause.addBatch
public SQLMergeClause addBatch() { """ Add the current state of bindings as a batch item @return the current object """ if (!configuration.getTemplates().isNativeMerge()) { throw new IllegalStateException("batch only supported for databases that support native merge"); } ...
java
public SQLMergeClause addBatch() { if (!configuration.getTemplates().isNativeMerge()) { throw new IllegalStateException("batch only supported for databases that support native merge"); } batches.add(new SQLMergeBatch(keys, columns, values, subQuery)); columns.clear(); ...
[ "public", "SQLMergeClause", "addBatch", "(", ")", "{", "if", "(", "!", "configuration", ".", "getTemplates", "(", ")", ".", "isNativeMerge", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"batch only supported for databases that support native mer...
Add the current state of bindings as a batch item @return the current object
[ "Add", "the", "current", "state", "of", "bindings", "as", "a", "batch", "item" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java#L120-L131
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setJobTrackerConfigs
public Config setJobTrackerConfigs(Map<String, JobTrackerConfig> jobTrackerConfigs) { """ Sets the map of job tracker configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param jobTrackerConfigs the job tracker configuration map ...
java
public Config setJobTrackerConfigs(Map<String, JobTrackerConfig> jobTrackerConfigs) { this.jobTrackerConfigs.clear(); this.jobTrackerConfigs.putAll(jobTrackerConfigs); for (final Entry<String, JobTrackerConfig> entry : this.jobTrackerConfigs.entrySet()) { entry.getValue().setName(ent...
[ "public", "Config", "setJobTrackerConfigs", "(", "Map", "<", "String", ",", "JobTrackerConfig", ">", "jobTrackerConfigs", ")", "{", "this", ".", "jobTrackerConfigs", ".", "clear", "(", ")", ";", "this", ".", "jobTrackerConfigs", ".", "putAll", "(", "jobTrackerCo...
Sets the map of job tracker configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param jobTrackerConfigs the job tracker configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "job", "tracker", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", "will", "be", "obtained", "in", "the", "future", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L2522-L2529
ZuInnoTe/hadoopoffice
flinkds/src/main/java/org/zuinnote/flink/office/common/FlinkKeyStoreManager.java
FlinkKeyStoreManager.openKeyStore
public void openKeyStore(Path path, String keyStoreType, String keyStorePassword) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException { """ ** Opens a keystore on any Hadoop compatible filesystem @param path path to key store, if null then a new keystore is created @param key...
java
public void openKeyStore(Path path, String keyStoreType, String keyStorePassword) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException { this.keystore = KeyStore.getInstance(keyStoreType); if (path!=null) { InputStream keyStoreInputStream = ffr.openFile(path); this.keystore.lo...
[ "public", "void", "openKeyStore", "(", "Path", "path", ",", "String", "keyStoreType", ",", "String", "keyStorePassword", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException", ",", "KeyStoreException", "{", "this", ".", "keystore",...
** Opens a keystore on any Hadoop compatible filesystem @param path path to key store, if null then a new keystore is created @param keyStoreType @param keyStorePassword @throws IOException @throws NoSuchAlgorithmException @throws CertificateException @throws KeyStoreException
[ "**", "Opens", "a", "keystore", "on", "any", "Hadoop", "compatible", "filesystem" ]
train
https://github.com/ZuInnoTe/hadoopoffice/blob/58fc9223ee290bcb14847aaaff3fadf39c465e46/flinkds/src/main/java/org/zuinnote/flink/office/common/FlinkKeyStoreManager.java#L69-L77
Squarespace/cldr
runtime/src/main/java/com/squarespace/cldr/MessageFormat.java
MessageFormat.parseArgs
private void parseArgs(MessageArgsParser parser) { """ Parse a list of zero or more arguments of the form: <key>:<value>. The ":<value>" is optional and will set the key = null. """ while (tag.peek() != Chars.EOF) { tag.skip(COMMA_WS); // Look for the argument key if (!tag.seek(IDENTI...
java
private void parseArgs(MessageArgsParser parser) { while (tag.peek() != Chars.EOF) { tag.skip(COMMA_WS); // Look for the argument key if (!tag.seek(IDENTIFIER, choice)) { return; } // Parse the <key>(:<value>)? sequence String key = choice.toString(); tag.jump(cho...
[ "private", "void", "parseArgs", "(", "MessageArgsParser", "parser", ")", "{", "while", "(", "tag", ".", "peek", "(", ")", "!=", "Chars", ".", "EOF", ")", "{", "tag", ".", "skip", "(", "COMMA_WS", ")", ";", "// Look for the argument key", "if", "(", "!", ...
Parse a list of zero or more arguments of the form: <key>:<value>. The ":<value>" is optional and will set the key = null.
[ "Parse", "a", "list", "of", "zero", "or", "more", "arguments", "of", "the", "form", ":", "<key", ">", ":", "<value", ">", ".", "The", ":", "<value", ">", "is", "optional", "and", "will", "set", "the", "key", "=", "null", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/runtime/src/main/java/com/squarespace/cldr/MessageFormat.java#L781-L808
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/remote/ResponseAttachmentInputStreamSupport.java
ResponseAttachmentInputStreamSupport.registerStreams
synchronized void registerStreams(int operationId, List<OperationResponse.StreamEntry> streams) { """ Registers a set of streams that were associated with a particular request. Does nothing if {@link #shutdown()} has been invoked, in which case any use of the {@link #getReadHandler() read handler} will result in ...
java
synchronized void registerStreams(int operationId, List<OperationResponse.StreamEntry> streams) { // ^^^ synchronize on 'this' to avoid races with shutdown if (!stopped) { // Streams share a timestamp so activity on any is sufficient to keep the rest alive AtomicLong timestamp =...
[ "synchronized", "void", "registerStreams", "(", "int", "operationId", ",", "List", "<", "OperationResponse", ".", "StreamEntry", ">", "streams", ")", "{", "// ^^^ synchronize on 'this' to avoid races with shutdown", "if", "(", "!", "stopped", ")", "{", "// Streams share...
Registers a set of streams that were associated with a particular request. Does nothing if {@link #shutdown()} has been invoked, in which case any use of the {@link #getReadHandler() read handler} will result in behavior equivalent to what would be seen if the the registered stream had 0 bytes of content. @param opera...
[ "Registers", "a", "set", "of", "streams", "that", "were", "associated", "with", "a", "particular", "request", ".", "Does", "nothing", "if", "{", "@link", "#shutdown", "()", "}", "has", "been", "invoked", "in", "which", "case", "any", "use", "of", "the", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/ResponseAttachmentInputStreamSupport.java#L134-L151
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java
UpdateInstanceRequest.setAllLabels
@SuppressWarnings("WeakerAccess") public UpdateInstanceRequest setAllLabels(@Nonnull Map<String, String> labels) { """ Replaces the labels associated with the instance. @see <a href="https://cloud.google.com/bigtable/docs/creating-managing-labels">For more details</a> """ Preconditions.checkNotNull(l...
java
@SuppressWarnings("WeakerAccess") public UpdateInstanceRequest setAllLabels(@Nonnull Map<String, String> labels) { Preconditions.checkNotNull(labels, "labels can't be null"); builder.getInstanceBuilder().clearLabels(); builder.getInstanceBuilder().putAllLabels(labels); updateFieldMask(Instance.LABELS_...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "UpdateInstanceRequest", "setAllLabels", "(", "@", "Nonnull", "Map", "<", "String", ",", "String", ">", "labels", ")", "{", "Preconditions", ".", "checkNotNull", "(", "labels", ",", "\"labels can't b...
Replaces the labels associated with the instance. @see <a href="https://cloud.google.com/bigtable/docs/creating-managing-labels">For more details</a>
[ "Replaces", "the", "labels", "associated", "with", "the", "instance", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java#L79-L87
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java
VirtualABoxStatistics.getStatistics
public int getStatistics(String datasourceId, String mappingId) { """ Returns one triple count from a particular mapping. @param datasourceId The data source identifier. @param mappingId The mapping identifier. @return The number of triples. """ final HashMap<String, Integer> mappingStat = getStatisti...
java
public int getStatistics(String datasourceId, String mappingId) { final HashMap<String, Integer> mappingStat = getStatistics(datasourceId); int triplesCount = mappingStat.get(mappingId).intValue(); return triplesCount; }
[ "public", "int", "getStatistics", "(", "String", "datasourceId", ",", "String", "mappingId", ")", "{", "final", "HashMap", "<", "String", ",", "Integer", ">", "mappingStat", "=", "getStatistics", "(", "datasourceId", ")", ";", "int", "triplesCount", "=", "mapp...
Returns one triple count from a particular mapping. @param datasourceId The data source identifier. @param mappingId The mapping identifier. @return The number of triples.
[ "Returns", "one", "triple", "count", "from", "a", "particular", "mapping", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java#L86-L91
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/StringHelper.java
StringHelper.isEqualIgnoreCase
public static boolean isEqualIgnoreCase(String pStr1, String pStr2) { """ Checks if both the strings are equal for value - Not Case sensitive. @param pStr1 A String value. @param pStr2 A String value. @return boolean A boolean <code>true</code> if the Strings are equal, otherwise <code>false</code>. @se...
java
public static boolean isEqualIgnoreCase(String pStr1, String pStr2) { if (pStr1 == null && pStr2 == null) { return true; } else if (pStr1 == null || pStr2 == null) { return false; } else if (pStr1.equalsIgnoreCase(pStr2)) { return true; } retur...
[ "public", "static", "boolean", "isEqualIgnoreCase", "(", "String", "pStr1", ",", "String", "pStr2", ")", "{", "if", "(", "pStr1", "==", "null", "&&", "pStr2", "==", "null", ")", "{", "return", "true", ";", "}", "else", "if", "(", "pStr1", "==", "null",...
Checks if both the strings are equal for value - Not Case sensitive. @param pStr1 A String value. @param pStr2 A String value. @return boolean A boolean <code>true</code> if the Strings are equal, otherwise <code>false</code>. @see String#equalsIgnoreCase(java.lang.String)
[ "Checks", "if", "both", "the", "strings", "are", "equal", "for", "value", "-", "Not", "Case", "sensitive", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/StringHelper.java#L878-L887
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.assertSeleniumIsSelected
@Then("^the element on index '(\\d+?)' (IS|IS NOT) selected$") public void assertSeleniumIsSelected(Integer index, Boolean isSelected) { """ Verifies that a webelement previously found {@code isSelected} @param index @param isSelected """ assertThat(this.commonspec, commonspec.getPreviousWebEle...
java
@Then("^the element on index '(\\d+?)' (IS|IS NOT) selected$") public void assertSeleniumIsSelected(Integer index, Boolean isSelected) { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required") .hasAtLeast(index); assertThat(t...
[ "@", "Then", "(", "\"^the element on index '(\\\\d+?)' (IS|IS NOT) selected$\"", ")", "public", "void", "assertSeleniumIsSelected", "(", "Integer", "index", ",", "Boolean", "isSelected", ")", "{", "assertThat", "(", "this", ".", "commonspec", ",", "commonspec", ".", "...
Verifies that a webelement previously found {@code isSelected} @param index @param isSelected
[ "Verifies", "that", "a", "webelement", "previously", "found", "{", "@code", "isSelected", "}" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L512-L518
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java
NormalizeUtils.getAdjacentBlankNodeName
private static String getAdjacentBlankNodeName(Map<String, Object> node, String id) { """ A helper function that gets the blank node name from an RDF quad node (subject or object). If the node is a blank node and its value does not match the given blank node ID, it will be returned. @param node the RDF quad ...
java
private static String getAdjacentBlankNodeName(Map<String, Object> node, String id) { return "blank node".equals(node.get("type")) && (!node.containsKey("value") || !Obj.equals(node.get("value"), id)) ? (String) node.get("value") : null; }
[ "private", "static", "String", "getAdjacentBlankNodeName", "(", "Map", "<", "String", ",", "Object", ">", "node", ",", "String", "id", ")", "{", "return", "\"blank node\"", ".", "equals", "(", "node", ".", "get", "(", "\"type\"", ")", ")", "&&", "(", "!"...
A helper function that gets the blank node name from an RDF quad node (subject or object). If the node is a blank node and its value does not match the given blank node ID, it will be returned. @param node the RDF quad node. @param id the ID of the blank node to look next to. @return the adjacent blank node name or n...
[ "A", "helper", "function", "that", "gets", "the", "blank", "node", "name", "from", "an", "RDF", "quad", "node", "(", "subject", "or", "object", ")", ".", "If", "the", "node", "is", "a", "blank", "node", "and", "its", "value", "does", "not", "match", ...
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java#L494-L499
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/util/StringUtils.java
StringUtils.capitalizeWords
public static String capitalizeWords(final Object target, final Object delimiters) { """ <p> Convert all the first letter of the words of target to uppercase (title-case, in fact), using the specified delimiter chars for determining word ends/starts. </p> @param target the String to be capitalized. If non-S...
java
public static String capitalizeWords(final Object target, final Object delimiters) { if (target == null) { return null; } final char[] buffer = target.toString().toCharArray(); final char[] delimiterChars = (delimiters == null ? null : delimiters.toString()....
[ "public", "static", "String", "capitalizeWords", "(", "final", "Object", "target", ",", "final", "Object", "delimiters", ")", "{", "if", "(", "target", "==", "null", ")", "{", "return", "null", ";", "}", "final", "char", "[", "]", "buffer", "=", "target"...
<p> Convert all the first letter of the words of target to uppercase (title-case, in fact), using the specified delimiter chars for determining word ends/starts. </p> @param target the String to be capitalized. If non-String object, toString() will be called. @param delimiters delimiters of the words. If non-String ob...
[ "<p", ">", "Convert", "all", "the", "first", "letter", "of", "the", "words", "of", "target", "to", "uppercase", "(", "title", "-", "case", "in", "fact", ")", "using", "the", "specified", "delimiter", "chars", "for", "determining", "word", "ends", "/", "s...
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/util/StringUtils.java#L671-L696