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
aggregateknowledge/java-hll
src/main/java/net/agkn/hll/util/NumberUtil.java
NumberUtil.toHex
public static String toHex(final byte[] bytes, final int offset, final int count) { """ Converts the specified array of <code>byte</code>s into a string of hex characters (low <code>byte</code> first). @param bytes the array of <code>byte</code>s that are to be converted. This cannot be <code>null</code> tho...
java
public static String toHex(final byte[] bytes, final int offset, final int count) { if(offset >= bytes.length) throw new IllegalArgumentException("Offset is greater than the length (" + offset + " >= " + bytes.length + ").")/*by contract*/; final int byteCount = Math.min( (bytes.length - offset), count)...
[ "public", "static", "String", "toHex", "(", "final", "byte", "[", "]", "bytes", ",", "final", "int", "offset", ",", "final", "int", "count", ")", "{", "if", "(", "offset", ">=", "bytes", ".", "length", ")", "throw", "new", "IllegalArgumentException", "("...
Converts the specified array of <code>byte</code>s into a string of hex characters (low <code>byte</code> first). @param bytes the array of <code>byte</code>s that are to be converted. This cannot be <code>null</code> though it may be empty. @param offset the offset in <code>bytes</code> at which the bytes will be t...
[ "Converts", "the", "specified", "array", "of", "<code", ">", "byte<", "/", "code", ">", "s", "into", "a", "string", "of", "hex", "characters", "(", "low", "<code", ">", "byte<", "/", "code", ">", "first", ")", "." ]
train
https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/util/NumberUtil.java#L67-L81
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
CommitLogArchiver.maybeArchive
public void maybeArchive(final String path, final String name) { """ Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync). Used to archive files present in the commit log directory at startup (CASSANDRA-6904) """ ...
java
public void maybeArchive(final String path, final String name) { if (Strings.isNullOrEmpty(archiveCommand)) return; archivePending.put(name, executor.submit(new WrappedRunnable() { protected void runMayThrow() throws IOException { String c...
[ "public", "void", "maybeArchive", "(", "final", "String", "path", ",", "final", "String", "name", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "archiveCommand", ")", ")", "return", ";", "archivePending", ".", "put", "(", "name", ",", "executo...
Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync). Used to archive files present in the commit log directory at startup (CASSANDRA-6904)
[ "Differs", "from", "the", "above", "because", "it", "can", "be", "used", "on", "any", "file", "rather", "than", "only", "managed", "commit", "log", "segments", "(", "and", "thus", "cannot", "call", "waitForFinalSync", ")", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java#L144-L158
lamarios/sherdog-parser
src/main/java/com/ftpix/sherdogparser/Sherdog.java
Sherdog.getFighterFromHtml
public Fighter getFighterFromHtml(String html) throws IOException, ParseException, SherdogParserException { """ Get a fighter via it;s sherdog page HTML @param html The web page HTML @return a Fighter an all his fights @throws IOException if connecting to sherdog fails @throws ParseException ...
java
public Fighter getFighterFromHtml(String html) throws IOException, ParseException, SherdogParserException { return new FighterParser(pictureProcessor, zoneId).parseFromHtml(html); }
[ "public", "Fighter", "getFighterFromHtml", "(", "String", "html", ")", "throws", "IOException", ",", "ParseException", ",", "SherdogParserException", "{", "return", "new", "FighterParser", "(", "pictureProcessor", ",", "zoneId", ")", ".", "parseFromHtml", "(", "html...
Get a fighter via it;s sherdog page HTML @param html The web page HTML @return a Fighter an all his fights @throws IOException if connecting to sherdog fails @throws ParseException if the page structure has changed @throws SherdogParserException if anythign related to the parser goes wrong
[ "Get", "a", "fighter", "via", "it", ";", "s", "sherdog", "page", "HTML" ]
train
https://github.com/lamarios/sherdog-parser/blob/7cdb36280317caeaaa54db77c04dc4b4e1db053e/src/main/java/com/ftpix/sherdogparser/Sherdog.java#L127-L129
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.longConsumer
public static LongConsumer longConsumer(CheckedLongConsumer consumer, Consumer<Throwable> handler) { """ Wrap a {@link CheckedLongConsumer} in a {@link LongConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> Arrays.stream(new long[] { 1L, 2L }).forEach(Unchecked.longConsumer( l ->...
java
public static LongConsumer longConsumer(CheckedLongConsumer consumer, Consumer<Throwable> handler) { return l -> { try { consumer.accept(l); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("Exception ...
[ "public", "static", "LongConsumer", "longConsumer", "(", "CheckedLongConsumer", "consumer", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "l", "->", "{", "try", "{", "consumer", ".", "accept", "(", "l", ")", ";", "}", "catch", "(",...
Wrap a {@link CheckedLongConsumer} in a {@link LongConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> Arrays.stream(new long[] { 1L, 2L }).forEach(Unchecked.longConsumer( l -> { if (l &lt; 0) throw new Exception("Only positive numbers allowed"); }, e -> { throw new IllegalStateException(e)...
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L779-L790
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/filters/pattern/PatternFileFilter.java
PatternFileFilter.createIncludeFilterList
public static List<Filter<File>> createIncludeFilterList(final Log log, final String... patterns) { """ Creates a new List containing an include-mode PatternFileFilter using the supplied patternStrings which are interpreted as file suffixes. (I.e. prepended with {@code PATTERN_LETTER_DIGIT_PUNCT} and ...
java
public static List<Filter<File>> createIncludeFilterList(final Log log, final String... patterns) { return createFilterList(log, true, patterns); }
[ "public", "static", "List", "<", "Filter", "<", "File", ">", ">", "createIncludeFilterList", "(", "final", "Log", "log", ",", "final", "String", "...", "patterns", ")", "{", "return", "createFilterList", "(", "log", ",", "true", ",", "patterns", ")", ";", ...
Creates a new List containing an include-mode PatternFileFilter using the supplied patternStrings which are interpreted as file suffixes. (I.e. prepended with {@code PATTERN_LETTER_DIGIT_PUNCT} and compiled to Patterns). The {@code FILE_PATH_CONVERTER} is used to convert Files to strings. @param patterns A List of suf...
[ "Creates", "a", "new", "List", "containing", "an", "include", "-", "mode", "PatternFileFilter", "using", "the", "supplied", "patternStrings", "which", "are", "interpreted", "as", "file", "suffixes", ".", "(", "I", ".", "e", ".", "prepended", "with", "{", "@c...
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/filters/pattern/PatternFileFilter.java#L167-L170
ocelotds/ocelot
ocelot-processor/src/main/java/org/ocelotds/processors/visitors/DataServiceVisitorJsBuilder.java
DataServiceVisitorJsBuilder.createMethodBody
void createMethodBody(String classname, ExecutableElement methodElement, List<String> arguments, Writer writer) throws IOException { """ Create javascript method body @param classname @param methodElement @param arguments @param writer @throws IOException """ String methodName = getMethodName(methodE...
java
void createMethodBody(String classname, ExecutableElement methodElement, List<String> arguments, Writer writer) throws IOException { String methodName = getMethodName(methodElement); boolean ws = isWebsocketDataService(methodElement); String args = stringJoinAndDecorate(arguments, COMMA, new NothingDecorator()...
[ "void", "createMethodBody", "(", "String", "classname", ",", "ExecutableElement", "methodElement", ",", "List", "<", "String", ">", "arguments", ",", "Writer", "writer", ")", "throws", "IOException", "{", "String", "methodName", "=", "getMethodName", "(", "methodE...
Create javascript method body @param classname @param methodElement @param arguments @param writer @throws IOException
[ "Create", "javascript", "method", "body" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-processor/src/main/java/org/ocelotds/processors/visitors/DataServiceVisitorJsBuilder.java#L186-L192
jayantk/jklol
src/com/jayantkrish/jklol/models/parametric/TensorSufficientStatistics.java
TensorSufficientStatistics.incrementFeature
public void incrementFeature(Assignment featureAssignment, double amount) { """ Increments the element of that corresponds to the statistic/parameter featureAssignment. @param featureAssignment @param amount """ if (isDense) { statistics.incrementEntry(amount, statisticNames.assignmentToIntArray...
java
public void incrementFeature(Assignment featureAssignment, double amount) { if (isDense) { statistics.incrementEntry(amount, statisticNames.assignmentToIntArray(featureAssignment)); } else { Tensor increment = SparseTensor.singleElement(getTensorDimensions(), getTensorSizes(), statisticNam...
[ "public", "void", "incrementFeature", "(", "Assignment", "featureAssignment", ",", "double", "amount", ")", "{", "if", "(", "isDense", ")", "{", "statistics", ".", "incrementEntry", "(", "amount", ",", "statisticNames", ".", "assignmentToIntArray", "(", "featureAs...
Increments the element of that corresponds to the statistic/parameter featureAssignment. @param featureAssignment @param amount
[ "Increments", "the", "element", "of", "that", "corresponds", "to", "the", "statistic", "/", "parameter", "featureAssignment", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/parametric/TensorSufficientStatistics.java#L206-L214
nebula-plugins/nebula-dependency-recommender-plugin
src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java
DependencyRecommendationsPlugin.getRecommendedVersionRecursive
protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) { """ Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached @param project the gradle <code>Project</code> @param mvSelector the module to look...
java
protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) { String version = project.getExtensions().getByType(RecommendationProviderContainer.class) .getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName()); if (version != null) ...
[ "protected", "String", "getRecommendedVersionRecursive", "(", "Project", "project", ",", "ModuleVersionSelector", "mvSelector", ")", "{", "String", "version", "=", "project", ".", "getExtensions", "(", ")", ".", "getByType", "(", "RecommendationProviderContainer", ".", ...
Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached @param project the gradle <code>Project</code> @param mvSelector the module to lookup @return the recommended version or <code>null</code>
[ "Look", "for", "recommended", "versions", "in", "a", "project", "and", "each", "of", "its", "ancestors", "in", "order", "until", "one", "is", "found", "or", "the", "root", "is", "reached" ]
train
https://github.com/nebula-plugins/nebula-dependency-recommender-plugin/blob/7cd008bd202641cf4abb0a7a470dbe5c8c3a67dc/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java#L217-L225
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsADECache.java
CmsADECache.uncacheContainerPage
public void uncacheContainerPage(CmsUUID structureId, boolean online) { """ Removes the container page identified by its structure id from the cache.<p> @param structureId the container page's structure id @param online if online or offline """ try { m_lock.writeLock().lock(); ...
java
public void uncacheContainerPage(CmsUUID structureId, boolean online) { try { m_lock.writeLock().lock(); if (online) { m_containerPagesOnline.remove(getCacheKey(structureId, true)); m_containerPagesOnline.remove(getCacheKey(structureId, false)); ...
[ "public", "void", "uncacheContainerPage", "(", "CmsUUID", "structureId", ",", "boolean", "online", ")", "{", "try", "{", "m_lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "if", "(", "online", ")", "{", "m_containerPagesOnline", ".", "remove...
Removes the container page identified by its structure id from the cache.<p> @param structureId the container page's structure id @param online if online or offline
[ "Removes", "the", "container", "page", "identified", "by", "its", "structure", "id", "from", "the", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsADECache.java#L316-L330
googleapis/google-cloud-java
google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
DeviceManagerClient.updateDevice
public final Device updateDevice(Device device, FieldMask updateMask) { """ Updates a device. <p>Sample code: <pre><code> try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { Device device = Device.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Devi...
java
public final Device updateDevice(Device device, FieldMask updateMask) { UpdateDeviceRequest request = UpdateDeviceRequest.newBuilder().setDevice(device).setUpdateMask(updateMask).build(); return updateDevice(request); }
[ "public", "final", "Device", "updateDevice", "(", "Device", "device", ",", "FieldMask", "updateMask", ")", "{", "UpdateDeviceRequest", "request", "=", "UpdateDeviceRequest", ".", "newBuilder", "(", ")", ".", "setDevice", "(", "device", ")", ".", "setUpdateMask", ...
Updates a device. <p>Sample code: <pre><code> try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { Device device = Device.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Device response = deviceManagerClient.updateDevice(device, updateMask); } </code></pre> @par...
[ "Updates", "a", "device", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java#L907-L912
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.setBytes
public static void setBytes(File file, byte[] bytes) throws IOException { """ Write the bytes from the byte array to the File. @param file the file to write to @param bytes the byte[] to write to the file @throws IOException if an IOException occurs. @since 1.7.1 """ IOGroovyMethods.setBytes(new...
java
public static void setBytes(File file, byte[] bytes) throws IOException { IOGroovyMethods.setBytes(new FileOutputStream(file), bytes); }
[ "public", "static", "void", "setBytes", "(", "File", "file", ",", "byte", "[", "]", "bytes", ")", "throws", "IOException", "{", "IOGroovyMethods", ".", "setBytes", "(", "new", "FileOutputStream", "(", "file", ")", ",", "bytes", ")", ";", "}" ]
Write the bytes from the byte array to the File. @param file the file to write to @param bytes the byte[] to write to the file @throws IOException if an IOException occurs. @since 1.7.1
[ "Write", "the", "bytes", "from", "the", "byte", "array", "to", "the", "File", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L717-L719
CodeNarc/CodeNarc
src/main/java/org/codenarc/util/AstUtil.java
AstUtil.isBinaryExpressionType
public static boolean isBinaryExpressionType(Expression expression, List<String> tokens) { """ Returns true if the expression is a binary expression with the specified token. @param expression - the expression node @param tokens - the List of allowable (operator) tokens @return as described """ if ...
java
public static boolean isBinaryExpressionType(Expression expression, List<String> tokens) { if (expression instanceof BinaryExpression) { if (tokens.contains(((BinaryExpression) expression).getOperation().getText())) { return true; } } return false; ...
[ "public", "static", "boolean", "isBinaryExpressionType", "(", "Expression", "expression", ",", "List", "<", "String", ">", "tokens", ")", "{", "if", "(", "expression", "instanceof", "BinaryExpression", ")", "{", "if", "(", "tokens", ".", "contains", "(", "(", ...
Returns true if the expression is a binary expression with the specified token. @param expression - the expression node @param tokens - the List of allowable (operator) tokens @return as described
[ "Returns", "true", "if", "the", "expression", "is", "a", "binary", "expression", "with", "the", "specified", "token", "." ]
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/util/AstUtil.java#L786-L793
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.getPrebuiltEntityRoles
public List<EntityRole> getPrebuiltEntityRoles(UUID appId, String versionId, UUID entityId) { """ Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @th...
java
public List<EntityRole> getPrebuiltEntityRoles(UUID appId, String versionId, UUID entityId) { return getPrebuiltEntityRolesWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
[ "public", "List", "<", "EntityRole", ">", "getPrebuiltEntityRoles", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "getPrebuiltEntityRolesWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId", ")",...
Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeException all other wr...
[ "Get", "All", "Entity", "Roles", "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#L7939-L7941
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/http/MediaType.java
MediaType.copyQualityValue
public MediaType copyQualityValue(MediaType mediaType) { """ Return a replica of this instance with the quality value of the given MediaType. @return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise """ if (!mediaType.parameters.containsKey(PARAM_QUALITY_FACTOR))...
java
public MediaType copyQualityValue(MediaType mediaType) { if (!mediaType.parameters.containsKey(PARAM_QUALITY_FACTOR)) { return this; } Map<String, String> params = new LinkedHashMap<String, String>(this.parameters); params.put(PARAM_QUALITY_FACTOR, mediaType.parameters.get(PARAM_QUALITY_FACTOR)); return ne...
[ "public", "MediaType", "copyQualityValue", "(", "MediaType", "mediaType", ")", "{", "if", "(", "!", "mediaType", ".", "parameters", ".", "containsKey", "(", "PARAM_QUALITY_FACTOR", ")", ")", "{", "return", "this", ";", "}", "Map", "<", "String", ",", "String...
Return a replica of this instance with the quality value of the given MediaType. @return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise
[ "Return", "a", "replica", "of", "this", "instance", "with", "the", "quality", "value", "of", "the", "given", "MediaType", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/http/MediaType.java#L582-L589
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/WriteBehindConfigurationBuilder.java
WriteBehindConfigurationBuilder.newBatchedWriteBehindConfiguration
public static BatchedWriteBehindConfigurationBuilder newBatchedWriteBehindConfiguration(long maxDelay, TimeUnit maxDelayUnit, int batchSize) { """ Creates a new builder for {@link WriteBehindConfiguration} that supports batching. @param maxDelay the max delay for a batch @param maxDelayUnit the max delay unit ...
java
public static BatchedWriteBehindConfigurationBuilder newBatchedWriteBehindConfiguration(long maxDelay, TimeUnit maxDelayUnit, int batchSize) { return new BatchedWriteBehindConfigurationBuilder(maxDelay, maxDelayUnit, batchSize); }
[ "public", "static", "BatchedWriteBehindConfigurationBuilder", "newBatchedWriteBehindConfiguration", "(", "long", "maxDelay", ",", "TimeUnit", "maxDelayUnit", ",", "int", "batchSize", ")", "{", "return", "new", "BatchedWriteBehindConfigurationBuilder", "(", "maxDelay", ",", ...
Creates a new builder for {@link WriteBehindConfiguration} that supports batching. @param maxDelay the max delay for a batch @param maxDelayUnit the max delay unit @param batchSize the batch size @return a new builder
[ "Creates", "a", "new", "builder", "for", "{", "@link", "WriteBehindConfiguration", "}", "that", "supports", "batching", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/WriteBehindConfigurationBuilder.java#L57-L59
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsToolManager.java
CmsToolManager.linkForToolPath
public static String linkForToolPath(CmsJspActionElement jsp, String toolPath) { """ Returns the OpenCms link for the given tool path which requires no parameters.<p> @param jsp the jsp action element @param toolPath the tool path @return the OpenCms link for the given tool path which requires parameters ...
java
public static String linkForToolPath(CmsJspActionElement jsp, String toolPath) { StringBuffer result = new StringBuffer(); result.append(jsp.link(VIEW_JSPPAGE_LOCATION)); result.append('?'); result.append(CmsToolDialog.PARAM_PATH); result.append('='); result.append(CmsEn...
[ "public", "static", "String", "linkForToolPath", "(", "CmsJspActionElement", "jsp", ",", "String", "toolPath", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "result", ".", "append", "(", "jsp", ".", "link", "(", "VIEW_JSPPAGE_L...
Returns the OpenCms link for the given tool path which requires no parameters.<p> @param jsp the jsp action element @param toolPath the tool path @return the OpenCms link for the given tool path which requires parameters
[ "Returns", "the", "OpenCms", "link", "for", "the", "given", "tool", "path", "which", "requires", "no", "parameters", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L114-L123
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RepositoryReaderImpl.java
RepositoryReaderImpl.getLogLists
@Override public Iterable<ServerInstanceLogRecordList> getLogLists(Date minTime, Date maxTime) { """ returns log records from the binary repository that are between 2 dates (inclusive) @param minTime the minimum {@link Date} value that the returned records can have @param maxTime the maximum {@link Date} v...
java
@Override public Iterable<ServerInstanceLogRecordList> getLogLists(Date minTime, Date maxTime) { return getLogLists(minTime, maxTime, (LogRecordFilter) null); }
[ "@", "Override", "public", "Iterable", "<", "ServerInstanceLogRecordList", ">", "getLogLists", "(", "Date", "minTime", ",", "Date", "maxTime", ")", "{", "return", "getLogLists", "(", "minTime", ",", "maxTime", ",", "(", "LogRecordFilter", ")", "null", ")", ";"...
returns log records from the binary repository that are between 2 dates (inclusive) @param minTime the minimum {@link Date} value that the returned records can have @param maxTime the maximum {@link Date} value that the returned records can have @return the iterable instance of a list of log records within a process t...
[ "returns", "log", "records", "from", "the", "binary", "repository", "that", "are", "between", "2", "dates", "(", "inclusive", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RepositoryReaderImpl.java#L760-L763
FaritorKang/unmz-common-util
src/main/java/net/unmz/java/util/date/DateUtils.java
DateUtils.daysBetween
public static final int daysBetween(Date early, Date late) { """ Returns the days between two dates. Positive values indicate that the second date is after the first, and negative values indicate, well, the opposite. Relying on specific times is problematic. @param early the "first date" @param late the "s...
java
public static final int daysBetween(Date early, Date late) { java.util.GregorianCalendar calst = new java.util.GregorianCalendar(); java.util.GregorianCalendar caled = new java.util.GregorianCalendar(); calst.setTime(early); caled.setTime(late); // 设置时间为0时 calst.set(java....
[ "public", "static", "final", "int", "daysBetween", "(", "Date", "early", ",", "Date", "late", ")", "{", "java", ".", "util", ".", "GregorianCalendar", "calst", "=", "new", "java", ".", "util", ".", "GregorianCalendar", "(", ")", ";", "java", ".", "util",...
Returns the days between two dates. Positive values indicate that the second date is after the first, and negative values indicate, well, the opposite. Relying on specific times is problematic. @param early the "first date" @param late the "second date" @return the days between the two dates
[ "Returns", "the", "days", "between", "two", "dates", ".", "Positive", "values", "indicate", "that", "the", "second", "date", "is", "after", "the", "first", "and", "negative", "values", "indicate", "well", "the", "opposite", ".", "Relying", "on", "specific", ...
train
https://github.com/FaritorKang/unmz-common-util/blob/2912b8889b85ed910d536f85b24b6fa68035814a/src/main/java/net/unmz/java/util/date/DateUtils.java#L181-L198
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java
H2GISFunctions.registerFunction
public static void registerFunction(Statement st,Function function,String packagePrepend) throws SQLException { """ Register a H2GIS java code function @param st SQL Statement @param function Function instance @param packagePrepend For OSGi environment only, use Bundle-SymbolicName:Bundle-Version: @throws j...
java
public static void registerFunction(Statement st,Function function,String packagePrepend) throws SQLException { registerFunction(st,function,packagePrepend,true); }
[ "public", "static", "void", "registerFunction", "(", "Statement", "st", ",", "Function", "function", ",", "String", "packagePrepend", ")", "throws", "SQLException", "{", "registerFunction", "(", "st", ",", "function", ",", "packagePrepend", ",", "true", ")", ";"...
Register a H2GIS java code function @param st SQL Statement @param function Function instance @param packagePrepend For OSGi environment only, use Bundle-SymbolicName:Bundle-Version: @throws java.sql.SQLException
[ "Register", "a", "H2GIS", "java", "code", "function" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java#L444-L446
kenyee/android-ddp-client
src/com/keysolutions/ddpclient/android/DDPStateSingleton.java
DDPStateSingleton.initInstance
public static void initInstance(Context context, String meteorServerHostname) { """ Initializes instance to connect to given Meteor server @param context Android context @param meteorServerHostname Meteor hostname/IP """ initInstance(context, meteorServerHostname, sMeteorPort, false); }
java
public static void initInstance(Context context, String meteorServerHostname) { initInstance(context, meteorServerHostname, sMeteorPort, false); }
[ "public", "static", "void", "initInstance", "(", "Context", "context", ",", "String", "meteorServerHostname", ")", "{", "initInstance", "(", "context", ",", "meteorServerHostname", ",", "sMeteorPort", ",", "false", ")", ";", "}" ]
Initializes instance to connect to given Meteor server @param context Android context @param meteorServerHostname Meteor hostname/IP
[ "Initializes", "instance", "to", "connect", "to", "given", "Meteor", "server" ]
train
https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L157-L159
jenkinsci/jenkins
core/src/main/java/hudson/model/Items.java
Items.findNearest
public static @CheckForNull <T extends Item> T findNearest(Class<T> type, String name, ItemGroup context) { """ Finds an item whose name (when referenced from the specified context) is closest to the given name. @param <T> the type of item being considered @param type same as {@code T} @param name the supplied ...
java
public static @CheckForNull <T extends Item> T findNearest(Class<T> type, String name, ItemGroup context) { List<String> names = new ArrayList<>(); for (T item: Jenkins.getInstance().allItems(type)) { names.add(item.getRelativeNameFrom(context)); } String nearest = EditDistan...
[ "public", "static", "@", "CheckForNull", "<", "T", "extends", "Item", ">", "T", "findNearest", "(", "Class", "<", "T", ">", "type", ",", "String", "name", ",", "ItemGroup", "context", ")", "{", "List", "<", "String", ">", "names", "=", "new", "ArrayLis...
Finds an item whose name (when referenced from the specified context) is closest to the given name. @param <T> the type of item being considered @param type same as {@code T} @param name the supplied name @param context a context to start from (used to compute relative names) @return the closest available item @since 1...
[ "Finds", "an", "item", "whose", "name", "(", "when", "referenced", "from", "the", "specified", "context", ")", "is", "closest", "to", "the", "given", "name", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Items.java#L467-L474
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesInner.java
GeoBackupPoliciesInner.createOrUpdate
public GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyState state) { """ Updates a database geo backup policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resour...
java
public GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyState state) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, state).toBlocking().single().body(); }
[ "public", "GeoBackupPolicyInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "GeoBackupPolicyState", "state", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ...
Updates a database geo backup policy. @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. @param databaseName The name of the database. @param state The state of the ge...
[ "Updates", "a", "database", "geo", "backup", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesInner.java#L84-L86
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java
DefaultInstalledExtensionRepository.addInstalledFeatureToCache
private InstalledFeature addInstalledFeatureToCache(ExtensionId feature, String namespace, DefaultInstalledExtension installedExtension, boolean forceCreate) { """ Get extension registered as installed for the provided feature and namespace or can register it if provided. <p> Only look at provide namespa...
java
private InstalledFeature addInstalledFeatureToCache(ExtensionId feature, String namespace, DefaultInstalledExtension installedExtension, boolean forceCreate) { Map<String, InstalledFeature> installedExtensionsForFeature = this.extensionNamespaceByFeature.get(feature.getId()); if...
[ "private", "InstalledFeature", "addInstalledFeatureToCache", "(", "ExtensionId", "feature", ",", "String", "namespace", ",", "DefaultInstalledExtension", "installedExtension", ",", "boolean", "forceCreate", ")", "{", "Map", "<", "String", ",", "InstalledFeature", ">", "...
Get extension registered as installed for the provided feature and namespace or can register it if provided. <p> Only look at provide namespace and does take into account inheritance. @param feature the feature provided by the extension @param namespace the namespace where the extension is installed @param installedEx...
[ "Get", "extension", "registered", "as", "installed", "for", "the", "provided", "feature", "and", "namespace", "or", "can", "register", "it", "if", "provided", ".", "<p", ">", "Only", "look", "at", "provide", "namespace", "and", "does", "take", "into", "accou...
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java#L627-L662
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/windows/HdfsUrlChooser.java
HdfsUrlChooser.scanHadoopConfigFiles
private boolean scanHadoopConfigFiles(final ServerInformationCatalog serverInformationCatalog, final String selectedServer) { """ This scans Hadoop environment variables for a directory with configuration files @param serverInformationCatalog @return True if a configuration was yielded. """ ...
java
private boolean scanHadoopConfigFiles(final ServerInformationCatalog serverInformationCatalog, final String selectedServer) { final HadoopClusterInformation clusterInformation; if (selectedServer != null) { clusterInformation = (HadoopClusterInformation) serverInformationCatalog...
[ "private", "boolean", "scanHadoopConfigFiles", "(", "final", "ServerInformationCatalog", "serverInformationCatalog", ",", "final", "String", "selectedServer", ")", "{", "final", "HadoopClusterInformation", "clusterInformation", ";", "if", "(", "selectedServer", "!=", "null"...
This scans Hadoop environment variables for a directory with configuration files @param serverInformationCatalog @return True if a configuration was yielded.
[ "This", "scans", "Hadoop", "environment", "variables", "for", "a", "directory", "with", "configuration", "files" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/windows/HdfsUrlChooser.java#L519-L546
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java
StrSpliter.split
public static List<String> split(String str, Pattern separatorPattern, int limit, boolean isTrim, boolean ignoreEmpty) { """ 通过正则切分字符串 @param str 字符串 @param separatorPattern 分隔符正则{@link Pattern} @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8 ""...
java
public static List<String> split(String str, Pattern separatorPattern, int limit, boolean isTrim, boolean ignoreEmpty){ if(StrUtil.isEmpty(str)){ return new ArrayList<String>(0); } if(limit == 1){ return addToList(new ArrayList<String>(1), str, isTrim, ignoreEmpty); } if(null == separatorPatt...
[ "public", "static", "List", "<", "String", ">", "split", "(", "String", "str", ",", "Pattern", "separatorPattern", ",", "int", "limit", ",", "boolean", "isTrim", ",", "boolean", "ignoreEmpty", ")", "{", "if", "(", "StrUtil", ".", "isEmpty", "(", "str", "...
通过正则切分字符串 @param str 字符串 @param separatorPattern 分隔符正则{@link Pattern} @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8
[ "通过正则切分字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java#L414-L440
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java
MarkLogicRepositoryConnection.prepareUpdate
@Override public MarkLogicUpdateQuery prepareUpdate(QueryLanguage queryLanguage, String queryString, String baseURI) throws RepositoryException, MalformedQueryException { """ base method for prepareUpdate @param queryLanguage @param queryString @param baseURI @return MarkLogicUpdateQuery @throws Reposit...
java
@Override public MarkLogicUpdateQuery prepareUpdate(QueryLanguage queryLanguage, String queryString, String baseURI) throws RepositoryException, MalformedQueryException { if (QueryLanguage.SPARQL.equals(queryLanguage)) { return new MarkLogicUpdateQuery(this.client, new SPARQLQueryBindingSet(), b...
[ "@", "Override", "public", "MarkLogicUpdateQuery", "prepareUpdate", "(", "QueryLanguage", "queryLanguage", ",", "String", "queryString", ",", "String", "baseURI", ")", "throws", "RepositoryException", ",", "MalformedQueryException", "{", "if", "(", "QueryLanguage", ".",...
base method for prepareUpdate @param queryLanguage @param queryString @param baseURI @return MarkLogicUpdateQuery @throws RepositoryException @throws MalformedQueryException
[ "base", "method", "for", "prepareUpdate" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java#L445-L451
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/cmdline/Utils.java
Utils.getServerOutputDir
public static File getServerOutputDir(String serverName, boolean isClient) { """ Returns server output directory. This directory contains server generated output (logs, the server's workarea, generated files, etc). It corresponds to the value of ${server.output.dir} variable in server.xml configuration file. ...
java
public static File getServerOutputDir(String serverName, boolean isClient) { if (serverName == null) { throw new IllegalArgumentException("Parameter serverName can not be 'null'"); } File outputDir = Utils.getOutputDir(isClient); if (outputDir != null) { return ne...
[ "public", "static", "File", "getServerOutputDir", "(", "String", "serverName", ",", "boolean", "isClient", ")", "{", "if", "(", "serverName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter serverName can not be 'null'\"", ")", ...
Returns server output directory. This directory contains server generated output (logs, the server's workarea, generated files, etc). It corresponds to the value of ${server.output.dir} variable in server.xml configuration file. @param serverName server's name @param isClient true if the current process is client. @re...
[ "Returns", "server", "output", "directory", ".", "This", "directory", "contains", "server", "generated", "output", "(", "logs", "the", "server", "s", "workarea", "generated", "files", "etc", ")", ".", "It", "corresponds", "to", "the", "value", "of", "$", "{"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/cmdline/Utils.java#L212-L221
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/BidiLine.java
BidiLine.getWidth
public float getWidth(int startIdx, int lastIdx) { """ Gets the width of a range of characters. @param startIdx the first index to calculate @param lastIdx the last inclusive index to calculate @return the sum of all widths """ char c = 0; PdfChunk ck = null; float width = 0; ...
java
public float getWidth(int startIdx, int lastIdx) { char c = 0; PdfChunk ck = null; float width = 0; for (; startIdx <= lastIdx; ++startIdx) { boolean surrogate = Utilities.isSurrogatePair(text, startIdx); if (surrogate) { width += detailChunks[star...
[ "public", "float", "getWidth", "(", "int", "startIdx", ",", "int", "lastIdx", ")", "{", "char", "c", "=", "0", ";", "PdfChunk", "ck", "=", "null", ";", "float", "width", "=", "0", ";", "for", "(", ";", "startIdx", "<=", "lastIdx", ";", "++", "start...
Gets the width of a range of characters. @param startIdx the first index to calculate @param lastIdx the last inclusive index to calculate @return the sum of all widths
[ "Gets", "the", "width", "of", "a", "range", "of", "characters", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/BidiLine.java#L439-L458
spotify/crtauth-java
src/main/java/com/spotify/crtauth/protocol/CrtAuthCodec.java
CrtAuthCodec.constantTimeEquals
private static boolean constantTimeEquals(byte[] a, byte[] b) { """ Checks if byte arrays a and be are equal in an algorithm that runs in constant time provided that their lengths are equal. @param a the first byte array @param b the second byte array @return true if a and be are equal, else false """ ...
java
private static boolean constantTimeEquals(byte[] a, byte[] b) { if (a.length != b.length) { return false; } int result = 0; for (int i = 0; i < a.length; i++) { result |= a[i] ^ b[i]; } return result == 0; }
[ "private", "static", "boolean", "constantTimeEquals", "(", "byte", "[", "]", "a", ",", "byte", "[", "]", "b", ")", "{", "if", "(", "a", ".", "length", "!=", "b", ".", "length", ")", "{", "return", "false", ";", "}", "int", "result", "=", "0", ";"...
Checks if byte arrays a and be are equal in an algorithm that runs in constant time provided that their lengths are equal. @param a the first byte array @param b the second byte array @return true if a and be are equal, else false
[ "Checks", "if", "byte", "arrays", "a", "and", "be", "are", "equal", "in", "an", "algorithm", "that", "runs", "in", "constant", "time", "provided", "that", "their", "lengths", "are", "equal", "." ]
train
https://github.com/spotify/crtauth-java/blob/90f3b40323848740c915b195ad1b547fbeb41700/src/main/java/com/spotify/crtauth/protocol/CrtAuthCodec.java#L263-L273
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.unescapeUriFragmentId
public static void unescapeUriFragmentId(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform am URI fragment identifier <strong>unescape</strong> operation on a <tt>char[]</tt> input using <tt>UTF-8</tt> as encoding. </p> <p> This method wi...
java
public static void unescapeUriFragmentId(final char[] text, final int offset, final int len, final Writer writer) throws IOException { unescapeUriFragmentId(text, offset, len, writer, DEFAULT_ENCODING); }
[ "public", "static", "void", "unescapeUriFragmentId", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "unescapeUriFragmentId", "(", "text", ...
<p> Perform am URI fragment identifier <strong>unescape</strong> operation on a <tt>char[]</tt> input using <tt>UTF-8</tt> as encoding. </p> <p> This method will unescape every percent-encoded (<tt>%HH</tt>) sequences present in input, even for those characters that do not need to be percent-encoded in this context (un...
[ "<p", ">", "Perform", "am", "URI", "fragment", "identifier", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", "using", "<tt", ">", "UTF", "-", "8<", "/", "tt", ">", "as...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L2678-L2681
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java
JScreen.addScreenComponent
public void addScreenComponent(Container parent, Converter fieldInfo, JComponent component) { """ Add the screen controls to the second column of the grid. @param parent The container to add the control(s) to. @param fieldInfo the field to add a control for. @param component The component to add. @param gridba...
java
public void addScreenComponent(Container parent, Converter fieldInfo, JComponent component) { String strName = fieldInfo.getFieldName(); // Almost always if (strName != null) component.setName(strName); component.addFocusListener(this); // todo(don) Note: I never remove ...
[ "public", "void", "addScreenComponent", "(", "Container", "parent", ",", "Converter", "fieldInfo", ",", "JComponent", "component", ")", "{", "String", "strName", "=", "fieldInfo", ".", "getFieldName", "(", ")", ";", "// Almost always", "if", "(", "strName", "!="...
Add the screen controls to the second column of the grid. @param parent The container to add the control(s) to. @param fieldInfo the field to add a control for. @param component The component to add. @param gridbag The screen layout. @param c The constraint to use.
[ "Add", "the", "screen", "controls", "to", "the", "second", "column", "of", "the", "grid", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java#L334-L344
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannel.java
SSLChannel.createSSLHandshakeErrorTracker
private SSLHandshakeErrorTracker createSSLHandshakeErrorTracker(ChannelData inputData) { """ Create an SSLHandshakeErrorTracker using the properties in the property bag. These properties may or may not be there if the channel is created programmatically, and as such this provides defaults which the map will be ...
java
private SSLHandshakeErrorTracker createSSLHandshakeErrorTracker(ChannelData inputData) { Map<Object, Object> bag = inputData.getPropertyBag(); // Even though they are of type Boolean and Long in the metatype, they are // going to be a String in the property bag (not sure why though). boo...
[ "private", "SSLHandshakeErrorTracker", "createSSLHandshakeErrorTracker", "(", "ChannelData", "inputData", ")", "{", "Map", "<", "Object", ",", "Object", ">", "bag", "=", "inputData", ".", "getPropertyBag", "(", ")", ";", "// Even though they are of type Boolean and Long i...
Create an SSLHandshakeErrorTracker using the properties in the property bag. These properties may or may not be there if the channel is created programmatically, and as such this provides defaults which the map will be created with. These defaults should match the defaults from metatype. @param inputData
[ "Create", "an", "SSLHandshakeErrorTracker", "using", "the", "properties", "in", "the", "property", "bag", ".", "These", "properties", "may", "or", "may", "not", "be", "there", "if", "the", "channel", "is", "created", "programmatically", "and", "as", "such", "t...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannel.java#L149-L165
demidenko05/beigesoft-bcommon
src/main/java/org/beigesoft/service/UtlReflection.java
UtlReflection.retrieveSetterForField
@Override public final Method retrieveSetterForField(final Class<?> pClazz, final String pFieldName) throws Exception { """ <p>Retrieve setter from given class by field name.</p> @param pClazz - class @param pFieldName - field name @return Method setter. @throws Exception if method not exist """ ...
java
@Override public final Method retrieveSetterForField(final Class<?> pClazz, final String pFieldName) throws Exception { String setterName = "set" + pFieldName.substring(0, 1).toUpperCase() + pFieldName.substring(1); return retrieveMethod(pClazz, setterName); }
[ "@", "Override", "public", "final", "Method", "retrieveSetterForField", "(", "final", "Class", "<", "?", ">", "pClazz", ",", "final", "String", "pFieldName", ")", "throws", "Exception", "{", "String", "setterName", "=", "\"set\"", "+", "pFieldName", ".", "subs...
<p>Retrieve setter from given class by field name.</p> @param pClazz - class @param pFieldName - field name @return Method setter. @throws Exception if method not exist
[ "<p", ">", "Retrieve", "setter", "from", "given", "class", "by", "field", "name", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-bcommon/blob/bb446822b4fc9b5a6a8cd3cc98d0b3d83d718daf/src/main/java/org/beigesoft/service/UtlReflection.java#L155-L161
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java
JAltGridScreen.addGridDetailItems
public void addGridDetailItems(TableModel model, GridBagLayout gridbag, GridBagConstraints c) { """ Read through the table model and add add the items to the grid panel. @param model The table model to read through. @param gridbag The screen layout. @param c The constraint to use. """ m_vComponentCa...
java
public void addGridDetailItems(TableModel model, GridBagLayout gridbag, GridBagConstraints c) { m_vComponentCache = new Vector<ComponentCache>(); for (int iRow = 0; iRow < model.getRowCount(); iRow++) { c.weightx = 0.0; c.gridwidth = 1; c.anchor = GridBag...
[ "public", "void", "addGridDetailItems", "(", "TableModel", "model", ",", "GridBagLayout", "gridbag", ",", "GridBagConstraints", "c", ")", "{", "m_vComponentCache", "=", "new", "Vector", "<", "ComponentCache", ">", "(", ")", ";", "for", "(", "int", "iRow", "=",...
Read through the table model and add add the items to the grid panel. @param model The table model to read through. @param gridbag The screen layout. @param c The constraint to use.
[ "Read", "through", "the", "table", "model", "and", "add", "add", "the", "items", "to", "the", "grid", "panel", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L203-L215
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java
IntentsClient.createIntent
public final Intent createIntent(ProjectAgentName parent, Intent intent) { """ Creates an intent in the specified agent. <p>Sample code: <pre><code> try (IntentsClient intentsClient = IntentsClient.create()) { ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder()....
java
public final Intent createIntent(ProjectAgentName parent, Intent intent) { CreateIntentRequest request = CreateIntentRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setIntent(intent) .build(); return createIntent(request); }
[ "public", "final", "Intent", "createIntent", "(", "ProjectAgentName", "parent", ",", "Intent", "intent", ")", "{", "CreateIntentRequest", "request", "=", "CreateIntentRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "null", "?", "nul...
Creates an intent in the specified agent. <p>Sample code: <pre><code> try (IntentsClient intentsClient = IntentsClient.create()) { ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder().build(); Intent response = intentsClient.createIntent(parent, intent); } </code></pre> @pa...
[ "Creates", "an", "intent", "in", "the", "specified", "agent", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java#L567-L575
padrig64/ValidationFramework
validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java
TabbedPaneDemo.createTabContent
private Component createTabContent(CompositeReadableProperty<Boolean> tabResultsProperty) { """ Creates some content to put in a tab in the tabbed pane. @param tabResultsProperty Composite property to put the tab-wise result into. @return Component representing the tab content and to be added to the tabbed p...
java
private Component createTabContent(CompositeReadableProperty<Boolean> tabResultsProperty) { JPanel panel = new JPanel(); panel.setLayout(new MigLayout("fill, wrap 2", "[][grow, fill]")); for (int i = 0; i < 2; i++) { panel.add(new JLabel("Field " + (i + 1) + ":")); // C...
[ "private", "Component", "createTabContent", "(", "CompositeReadableProperty", "<", "Boolean", ">", "tabResultsProperty", ")", "{", "JPanel", "panel", "=", "new", "JPanel", "(", ")", ";", "panel", ".", "setLayout", "(", "new", "MigLayout", "(", "\"fill, wrap 2\"", ...
Creates some content to put in a tab in the tabbed pane. @param tabResultsProperty Composite property to put the tab-wise result into. @return Component representing the tab content and to be added to the tabbed pane.
[ "Creates", "some", "content", "to", "put", "in", "a", "tab", "in", "the", "tabbed", "pane", "." ]
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java#L157-L175
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java
ST_GeometryShadow.shadowPoint
private static Geometry shadowPoint(Point point, double[] shadowOffset, GeometryFactory factory) { """ Compute the shadow for a point @param point the input point @param shadowOffset computed according the sun position and the height of the geometry @return """ Coordinate startCoord = point.getCo...
java
private static Geometry shadowPoint(Point point, double[] shadowOffset, GeometryFactory factory) { Coordinate startCoord = point.getCoordinate(); Coordinate offset = moveCoordinate(startCoord, shadowOffset); if (offset.distance(point.getCoordinate()) < 10E-3) { return point; ...
[ "private", "static", "Geometry", "shadowPoint", "(", "Point", "point", ",", "double", "[", "]", "shadowOffset", ",", "GeometryFactory", "factory", ")", "{", "Coordinate", "startCoord", "=", "point", ".", "getCoordinate", "(", ")", ";", "Coordinate", "offset", ...
Compute the shadow for a point @param point the input point @param shadowOffset computed according the sun position and the height of the geometry @return
[ "Compute", "the", "shadow", "for", "a", "point" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java#L192-L201
Wikidata/Wikidata-Toolkit
wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandler.java
MediaWikiApiErrorHandler.throwMediaWikiApiErrorException
public static void throwMediaWikiApiErrorException(String errorCode, String errorMessage) throws MediaWikiApiErrorException { """ Creates and throws a suitable {@link MediaWikiApiErrorException} for the given error code and message. @param errorCode the error code reported by MediaWiki @param errorMessage...
java
public static void throwMediaWikiApiErrorException(String errorCode, String errorMessage) throws MediaWikiApiErrorException { switch (errorCode) { case ERROR_NO_TOKEN: case ERROR_INVALID_TOKEN: throw new TokenErrorException(errorCode, errorMessage); case ERROR_EDIT_CONFLICT: throw new EditConflictError...
[ "public", "static", "void", "throwMediaWikiApiErrorException", "(", "String", "errorCode", ",", "String", "errorMessage", ")", "throws", "MediaWikiApiErrorException", "{", "switch", "(", "errorCode", ")", "{", "case", "ERROR_NO_TOKEN", ":", "case", "ERROR_INVALID_TOKEN"...
Creates and throws a suitable {@link MediaWikiApiErrorException} for the given error code and message. @param errorCode the error code reported by MediaWiki @param errorMessage the error message reported by MediaWiki, or any other meaningful message for the user @throws MediaWikiApiErrorException in all cases, but may...
[ "Creates", "and", "throws", "a", "suitable", "{", "@link", "MediaWikiApiErrorException", "}", "for", "the", "given", "error", "code", "and", "message", "." ]
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandler.java#L50-L67
MGunlogson/CuckooFilter4J
src/main/java/com/github/mgunlogson/cuckoofilter4j/FilterTable.java
FilterTable.countTag
int countTag(long i1, long i2, long tag) { """ Similar to checkTag() except it counts the number of matches in the buckets. """ int tagCount = 0; for (int posInBucket = 0; posInBucket < CuckooFilter.BUCKET_SIZE; posInBucket++) { if (checkTag(i1, posInBucket, tag)) tagCount++; if (checkTag(i...
java
int countTag(long i1, long i2, long tag) { int tagCount = 0; for (int posInBucket = 0; posInBucket < CuckooFilter.BUCKET_SIZE; posInBucket++) { if (checkTag(i1, posInBucket, tag)) tagCount++; if (checkTag(i2, posInBucket, tag)) tagCount++; } return tagCount; }
[ "int", "countTag", "(", "long", "i1", ",", "long", "i2", ",", "long", "tag", ")", "{", "int", "tagCount", "=", "0", ";", "for", "(", "int", "posInBucket", "=", "0", ";", "posInBucket", "<", "CuckooFilter", ".", "BUCKET_SIZE", ";", "posInBucket", "++", ...
Similar to checkTag() except it counts the number of matches in the buckets.
[ "Similar", "to", "checkTag", "()", "except", "it", "counts", "the", "number", "of", "matches", "in", "the", "buckets", "." ]
train
https://github.com/MGunlogson/CuckooFilter4J/blob/e8472aa150b201f05046d1c81cac5a5ca4348db8/src/main/java/com/github/mgunlogson/cuckoofilter4j/FilterTable.java#L221-L230
alkacon/opencms-core
src/org/opencms/db/generic/CmsUserQueryBuilder.java
CmsUserQueryBuilder.addFlagCondition
protected void addFlagCondition(CmsSelectQuery select, TableAlias users, int flags, boolean allowCore) { """ Adds flag checking conditions to an SQL query.<p> @param select the query @param users the user table alias @param flags the flags @param allowCore set to true if core users should not be filtered out...
java
protected void addFlagCondition(CmsSelectQuery select, TableAlias users, int flags, boolean allowCore) { if (flags != 0) { I_CmsQueryFragment condition = createFlagCondition(users, flags); if (allowCore) { I_CmsQueryFragment coreCondition = createCoreCondition(users); ...
[ "protected", "void", "addFlagCondition", "(", "CmsSelectQuery", "select", ",", "TableAlias", "users", ",", "int", "flags", ",", "boolean", "allowCore", ")", "{", "if", "(", "flags", "!=", "0", ")", "{", "I_CmsQueryFragment", "condition", "=", "createFlagConditio...
Adds flag checking conditions to an SQL query.<p> @param select the query @param users the user table alias @param flags the flags @param allowCore set to true if core users should not be filtered out
[ "Adds", "flag", "checking", "conditions", "to", "an", "SQL", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsUserQueryBuilder.java#L151-L162
BellaDati/belladati-sdk-java
src/main/java/com/belladati/sdk/impl/BellaDatiClient.java
BellaDatiClient.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { """ Deserialization. Sets up an HTTP client instance. @param in Input stream of object to be de-serialized @throws IOException Thrown if IO error occurs during class reading @throws ClassNotFoundException Thrown if desire...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); try { Field client = getClass().getDeclaredField("client"); client.setAccessible(true); client.set(this, buildClient(trustSelfSigned)); } catch (NoSuchFieldException e) { throw new Intern...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "try", "{", "Field", "client", "=", "getClass", "(", ")", ".", "getDeclaredField", ...
Deserialization. Sets up an HTTP client instance. @param in Input stream of object to be de-serialized @throws IOException Thrown if IO error occurs during class reading @throws ClassNotFoundException Thrown if desired class does not exist
[ "Deserialization", ".", "Sets", "up", "an", "HTTP", "client", "instance", "." ]
train
https://github.com/BellaDati/belladati-sdk-java/blob/1a732a57ebc825ddf47ce405723cc958adb1a43f/src/main/java/com/belladati/sdk/impl/BellaDatiClient.java#L413-L428
amzn/ion-java
src/com/amazon/ion/impl/IonWriterSystem.java
IonWriterSystem.setSymbolTable
@Override public final void setSymbolTable(SymbolTable symbols) throws IOException { """ {@inheritDoc} <p> This implementation simply validates that the argument is not a shared symbol table, and assigns it to {@link #_symbol_table}. """ if (symbols == null || _Private_Utils.symtabIsShar...
java
@Override public final void setSymbolTable(SymbolTable symbols) throws IOException { if (symbols == null || _Private_Utils.symtabIsSharedNotSystem(symbols)) { throw new IllegalArgumentException("symbol table must be local or system to be set, or reset"); } if (getDept...
[ "@", "Override", "public", "final", "void", "setSymbolTable", "(", "SymbolTable", "symbols", ")", "throws", "IOException", "{", "if", "(", "symbols", "==", "null", "||", "_Private_Utils", ".", "symtabIsSharedNotSystem", "(", "symbols", ")", ")", "{", "throw", ...
{@inheritDoc} <p> This implementation simply validates that the argument is not a shared symbol table, and assigns it to {@link #_symbol_table}.
[ "{" ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonWriterSystem.java#L121-L132
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/linking/lazy/LazyLinkingResource.java
LazyLinkingResource.resolveLazyCrossReference
protected void resolveLazyCrossReference(InternalEObject source, EStructuralFeature crossRef) { """ If the given {@code crossRef} may hold lazy linking proxies, they are attempted to be resolved. @since 2.4 @see #isPotentialLazyCrossReference(EStructuralFeature) @see #doResolveLazyCrossReference(InternalEObject...
java
protected void resolveLazyCrossReference(InternalEObject source, EStructuralFeature crossRef) { if (isPotentialLazyCrossReference(crossRef)) { doResolveLazyCrossReference(source, crossRef); } }
[ "protected", "void", "resolveLazyCrossReference", "(", "InternalEObject", "source", ",", "EStructuralFeature", "crossRef", ")", "{", "if", "(", "isPotentialLazyCrossReference", "(", "crossRef", ")", ")", "{", "doResolveLazyCrossReference", "(", "source", ",", "crossRef"...
If the given {@code crossRef} may hold lazy linking proxies, they are attempted to be resolved. @since 2.4 @see #isPotentialLazyCrossReference(EStructuralFeature) @see #doResolveLazyCrossReference(InternalEObject, EStructuralFeature)
[ "If", "the", "given", "{" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/linking/lazy/LazyLinkingResource.java#L160-L164
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentImportResource.java
SegmentImportResource.withChannelCounts
public SegmentImportResource withChannelCounts(java.util.Map<String, Integer> channelCounts) { """ The number of channel types in the imported segment. @param channelCounts The number of channel types in the imported segment. @return Returns a reference to this object so that method calls can be chained toget...
java
public SegmentImportResource withChannelCounts(java.util.Map<String, Integer> channelCounts) { setChannelCounts(channelCounts); return this; }
[ "public", "SegmentImportResource", "withChannelCounts", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Integer", ">", "channelCounts", ")", "{", "setChannelCounts", "(", "channelCounts", ")", ";", "return", "this", ";", "}" ]
The number of channel types in the imported segment. @param channelCounts The number of channel types in the imported segment. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "number", "of", "channel", "types", "in", "the", "imported", "segment", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentImportResource.java#L77-L80
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.containsContentEqualsIgnoreCase
public static boolean containsContentEqualsIgnoreCase(Collection<CharSequence> collection, CharSequence value) { """ Determine if {@code collection} contains {@code value} and using {@link #contentEqualsIgnoreCase(CharSequence, CharSequence)} to compare values. @param collection The collection to look for and eq...
java
public static boolean containsContentEqualsIgnoreCase(Collection<CharSequence> collection, CharSequence value) { for (CharSequence v : collection) { if (contentEqualsIgnoreCase(value, v)) { return true; } } return false; }
[ "public", "static", "boolean", "containsContentEqualsIgnoreCase", "(", "Collection", "<", "CharSequence", ">", "collection", ",", "CharSequence", "value", ")", "{", "for", "(", "CharSequence", "v", ":", "collection", ")", "{", "if", "(", "contentEqualsIgnoreCase", ...
Determine if {@code collection} contains {@code value} and using {@link #contentEqualsIgnoreCase(CharSequence, CharSequence)} to compare values. @param collection The collection to look for and equivalent element as {@code value}. @param value The value to look for in {@code collection}. @return {@code true} if {@code ...
[ "Determine", "if", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L1472-L1479
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/pipeline/WatcherDelegate.java
WatcherDelegate.createWatchingException
public static WatchingException createWatchingException(InvocationTargetException exception, File file) { """ Even {@link org.wisdom.maven.WatchingException} cannot be used directly, so we need to use reflection to recreate the exception with the same content. <p> This method checks if the cause of the {@link j...
java
public static WatchingException createWatchingException(InvocationTargetException exception, File file) { Throwable cause = exception.getTargetException(); if (WatchingException.class.getName().equals(exception.getTargetException().getClass().getName())) { try { Method line =...
[ "public", "static", "WatchingException", "createWatchingException", "(", "InvocationTargetException", "exception", ",", "File", "file", ")", "{", "Throwable", "cause", "=", "exception", ".", "getTargetException", "(", ")", ";", "if", "(", "WatchingException", ".", "...
Even {@link org.wisdom.maven.WatchingException} cannot be used directly, so we need to use reflection to recreate the exception with the same content. <p> This method checks if the cause of the {@link java.lang.reflect .InvocationTargetException} is a {@link org.wisdom.maven.WatchingException}, in this case if create a...
[ "Even", "{", "@link", "org", ".", "wisdom", ".", "maven", ".", "WatchingException", "}", "cannot", "be", "used", "directly", "so", "we", "need", "to", "use", "reflection", "to", "recreate", "the", "exception", "with", "the", "same", "content", ".", "<p", ...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/pipeline/WatcherDelegate.java#L102-L124
alkacon/opencms-core
src/org/opencms/acacia/shared/CmsEntity.java
CmsEntity.setAttributeValue
public void setAttributeValue(String attributeName, CmsEntity value, int index) { """ Sets the given attribute value at the given index.<p> @param attributeName the attribute name @param value the attribute value @param index the value index """ if (m_simpleAttributes.containsKey(attributeName)...
java
public void setAttributeValue(String attributeName, CmsEntity value, int index) { if (m_simpleAttributes.containsKey(attributeName)) { throw new RuntimeException("Attribute already exists with a simple type value."); } if (!m_entityAttributes.containsKey(attributeName)) { ...
[ "public", "void", "setAttributeValue", "(", "String", "attributeName", ",", "CmsEntity", "value", ",", "int", "index", ")", "{", "if", "(", "m_simpleAttributes", ".", "containsKey", "(", "attributeName", ")", ")", "{", "throw", "new", "RuntimeException", "(", ...
Sets the given attribute value at the given index.<p> @param attributeName the attribute name @param value the attribute value @param index the value index
[ "Sets", "the", "given", "attribute", "value", "at", "the", "given", "index", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsEntity.java#L597-L616
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getExplodedToSet
@Nonnull @ReturnsMutableCopy public static CommonsHashSet <String> getExplodedToSet (@Nonnull final String sSep, @Nullable final String sElements) { """ Take a concatenated String and return a {@link Set} of all elements in the passed string, using specified separator string. @param sSep The separator to ...
java
@Nonnull @ReturnsMutableCopy public static CommonsHashSet <String> getExplodedToSet (@Nonnull final String sSep, @Nullable final String sElements) { return getExploded (sSep, sElements, -1, new CommonsHashSet <> ()); }
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "CommonsHashSet", "<", "String", ">", "getExplodedToSet", "(", "@", "Nonnull", "final", "String", "sSep", ",", "@", "Nullable", "final", "String", "sElements", ")", "{", "return", "getExploded", "(",...
Take a concatenated String and return a {@link Set} of all elements in the passed string, using specified separator string. @param sSep The separator to use. May not be <code>null</code>. @param sElements The concatenated String to convert. May be <code>null</code> or empty. @return The {@link Set} represented by the ...
[ "Take", "a", "concatenated", "String", "and", "return", "a", "{", "@link", "Set", "}", "of", "all", "elements", "in", "the", "passed", "string", "using", "specified", "separator", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L2295-L2300
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urls/URLRewriterService.java
URLRewriterService.allowParamsOnFormAction
public static boolean allowParamsOnFormAction( ServletContext servletContext, ServletRequest request ) { """ Tell whether rewritten form actions should be allowed to have query parameters. If this returns <code>false</code>, then a form-tag implementation should render query parameters into hidden fields on the...
java
public static boolean allowParamsOnFormAction( ServletContext servletContext, ServletRequest request ) { ArrayList/*< URLRewriter >*/ rewriters = getRewriters( request ); if ( rewriters != null ) { for ( Iterator i = rewriters.iterator(); i.hasNext(); ) { ...
[ "public", "static", "boolean", "allowParamsOnFormAction", "(", "ServletContext", "servletContext", ",", "ServletRequest", "request", ")", "{", "ArrayList", "/*< URLRewriter >*/", "rewriters", "=", "getRewriters", "(", "request", ")", ";", "if", "(", "rewriters", "!=",...
Tell whether rewritten form actions should be allowed to have query parameters. If this returns <code>false</code>, then a form-tag implementation should render query parameters into hidden fields on the form instead of allowing them to remain in the URL.
[ "Tell", "whether", "rewritten", "form", "actions", "should", "be", "allowed", "to", "have", "query", "parameters", ".", "If", "this", "returns", "<code", ">", "false<", "/", "code", ">", "then", "a", "form", "-", "tag", "implementation", "should", "render", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urls/URLRewriterService.java#L332-L346
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the commerce wish lists where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CommerceWishList commerceWishList : findByUuid_C(uuid, companyId, Quer...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceWishList commerceWishList : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishList); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommerceWishList", "commerceWishList", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "Quer...
Removes all the commerce wish lists where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "wish", "lists", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L1405-L1411
samskivert/samskivert
src/main/java/com/samskivert/net/HttpPostUtil.java
HttpPostUtil.httpPost
public static String httpPost (URL url, String submission, int timeout) throws IOException, ServiceWaiter.TimeoutException { """ Return the results of a form post. Note that the http request takes place on another thread, but this thread blocks until the results are returned or it times out. This overloa...
java
public static String httpPost (URL url, String submission, int timeout) throws IOException, ServiceWaiter.TimeoutException { return httpPost(url, submission, timeout, Collections.singletonMap("Content-Type", "application/x-www-form-urlencoded")); }
[ "public", "static", "String", "httpPost", "(", "URL", "url", ",", "String", "submission", ",", "int", "timeout", ")", "throws", "IOException", ",", "ServiceWaiter", ".", "TimeoutException", "{", "return", "httpPost", "(", "url", ",", "submission", ",", "timeou...
Return the results of a form post. Note that the http request takes place on another thread, but this thread blocks until the results are returned or it times out. This overload sets a single request property of <code>"Content-Type" = "application/x-www-form-urlencoded"</code>. @param url from which to make the reques...
[ "Return", "the", "results", "of", "a", "form", "post", ".", "Note", "that", "the", "http", "request", "takes", "place", "on", "another", "thread", "but", "this", "thread", "blocks", "until", "the", "results", "are", "returned", "or", "it", "times", "out", ...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/net/HttpPostUtil.java#L36-L41
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java
SnapshotsInner.beginCreateOrUpdateAsync
public Observable<SnapshotInner> beginCreateOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { """ Creates or updates a snapshot. @param resourceGroupName The name of the resource group. @param snapshotName The name of the snapshot that is being created. The name can't be ch...
java
public Observable<SnapshotInner> beginCreateOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1<ServiceResponse<SnapshotInner>, SnapshotInner>() { @Override ...
[ "public", "Observable", "<", "SnapshotInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "snapshotName", ",", "SnapshotInner", "snapshot", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", "...
Creates or updates a snapshot. @param resourceGroupName The name of the resource group. @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. @param sn...
[ "Creates", "or", "updates", "a", "snapshot", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java#L248-L255
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/io/BinaryInputFormat.java
BinaryInputFormat.createStatistics
protected SequentialStatistics createStatistics(List<FileStatus> files, FileBaseStatistics stats) throws IOException { """ Fill in the statistics. The last modification time and the total input size are prefilled. @param files The files that are associated with this block input format. @param stats The pr...
java
protected SequentialStatistics createStatistics(List<FileStatus> files, FileBaseStatistics stats) throws IOException { if (files.isEmpty()) { return null; } BlockInfo blockInfo = this.createBlockInfo(); long totalCount = 0; for (FileStatus file : files) { // invalid file if (file.getLen() < bloc...
[ "protected", "SequentialStatistics", "createStatistics", "(", "List", "<", "FileStatus", ">", "files", ",", "FileBaseStatistics", "stats", ")", "throws", "IOException", "{", "if", "(", "files", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", ...
Fill in the statistics. The last modification time and the total input size are prefilled. @param files The files that are associated with this block input format. @param stats The pre-filled statistics.
[ "Fill", "in", "the", "statistics", ".", "The", "last", "modification", "time", "and", "the", "total", "input", "size", "are", "prefilled", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/io/BinaryInputFormat.java#L197-L223
alkacon/opencms-core
src/org/opencms/ui/components/fileselect/CmsResourceTreeContainer.java
CmsResourceTreeContainer.getName
protected String getName(CmsObject cms, CmsResource resource, CmsUUID parentId) { """ Gets the name to display for the given resource.<p> @param cms the CMS context @param resource a resource @param parentId the id of the parent of the resource @return the name for the given resoure """ return...
java
protected String getName(CmsObject cms, CmsResource resource, CmsUUID parentId) { return parentId == null ? resource.getRootPath() : resource.getName(); }
[ "protected", "String", "getName", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "CmsUUID", "parentId", ")", "{", "return", "parentId", "==", "null", "?", "resource", ".", "getRootPath", "(", ")", ":", "resource", ".", "getName", "(", ")", "...
Gets the name to display for the given resource.<p> @param cms the CMS context @param resource a resource @param parentId the id of the parent of the resource @return the name for the given resoure
[ "Gets", "the", "name", "to", "display", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/fileselect/CmsResourceTreeContainer.java#L336-L339
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStructure.java
GeneralStructure.addValuePart
public boolean addValuePart(String name, Basic_Field_Types type) throws IOException { """ Adds a new ValuePart. This is a wrapper method for <code>addKeyPart(String, int)</code>. @param name the name of the key part. With this name you can access this part @param type the type of the key part. @return true ...
java
public boolean addValuePart(String name, Basic_Field_Types type) throws IOException { return addValuePart(name, type.size); }
[ "public", "boolean", "addValuePart", "(", "String", "name", ",", "Basic_Field_Types", "type", ")", "throws", "IOException", "{", "return", "addValuePart", "(", "name", ",", "type", ".", "size", ")", ";", "}" ]
Adds a new ValuePart. This is a wrapper method for <code>addKeyPart(String, int)</code>. @param name the name of the key part. With this name you can access this part @param type the type of the key part. @return true if adding the value part was successful @throws IOException
[ "Adds", "a", "new", "ValuePart", ".", "This", "is", "a", "wrapper", "method", "for", "<code", ">", "addKeyPart", "(", "String", "int", ")", "<", "/", "code", ">", "." ]
train
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStructure.java#L111-L113
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java
SeaGlassTabbedPaneUI.paintContentBorder
protected void paintContentBorder(SeaGlassContext ss, Graphics g, int tabPlacement, int selectedIndex) { """ Paint the content pane's border. @param ss the SynthContext. @param g the Graphics context. @param tabPlacement the side the tabs are on. @param selectedIndex the current selec...
java
protected void paintContentBorder(SeaGlassContext ss, Graphics g, int tabPlacement, int selectedIndex) { int width = tabPane.getWidth(); int height = tabPane.getHeight(); Insets insets = tabPane.getInsets(); int x = insets.left; int y = insets.top; int w = width -...
[ "protected", "void", "paintContentBorder", "(", "SeaGlassContext", "ss", ",", "Graphics", "g", ",", "int", "tabPlacement", ",", "int", "selectedIndex", ")", "{", "int", "width", "=", "tabPane", ".", "getWidth", "(", ")", ";", "int", "height", "=", "tabPane",...
Paint the content pane's border. @param ss the SynthContext. @param g the Graphics context. @param tabPlacement the side the tabs are on. @param selectedIndex the current selected tab index.
[ "Paint", "the", "content", "pane", "s", "border", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L913-L947
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeReviewEvaluator.java
CodeReviewEvaluator.getErrorResponse
protected CodeReviewAuditResponseV2 getErrorResponse(CollectorItem repoItem, String scmBranch, String scmUrl) { """ Return an empty response in error situation @param repoItem @param scmBranch @param scmUrl @return """ CodeReviewAuditResponseV2 noPRsCodeReviewAuditResponse = new CodeReviewAuditRe...
java
protected CodeReviewAuditResponseV2 getErrorResponse(CollectorItem repoItem, String scmBranch, String scmUrl) { CodeReviewAuditResponseV2 noPRsCodeReviewAuditResponse = new CodeReviewAuditResponseV2(); noPRsCodeReviewAuditResponse.addAuditStatus(CodeReviewAuditStatus.COLLECTOR_ITEM_ERROR); noPR...
[ "protected", "CodeReviewAuditResponseV2", "getErrorResponse", "(", "CollectorItem", "repoItem", ",", "String", "scmBranch", ",", "String", "scmUrl", ")", "{", "CodeReviewAuditResponseV2", "noPRsCodeReviewAuditResponse", "=", "new", "CodeReviewAuditResponseV2", "(", ")", ";"...
Return an empty response in error situation @param repoItem @param scmBranch @param scmUrl @return
[ "Return", "an", "empty", "response", "in", "error", "situation" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeReviewEvaluator.java#L122-L131
Axway/Grapes
server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java
ArtifactHandler.removeLicenseFromArtifact
public void removeLicenseFromArtifact(final String gavc, final String licenseId) { """ Remove a license from an artifact @param gavc String The artifact GAVC @param licenseId String The license id to be removed. """ final DbArtifact dbArtifact = getArtifact(gavc); // // The artifac...
java
public void removeLicenseFromArtifact(final String gavc, final String licenseId) { final DbArtifact dbArtifact = getArtifact(gavc); // // The artifact may not have the exact string associated with it, but rather one // matching license regexp expression. // repositoryHan...
[ "public", "void", "removeLicenseFromArtifact", "(", "final", "String", "gavc", ",", "final", "String", "licenseId", ")", "{", "final", "DbArtifact", "dbArtifact", "=", "getArtifact", "(", "gavc", ")", ";", "//", "// The artifact may not have the exact string associated ...
Remove a license from an artifact @param gavc String The artifact GAVC @param licenseId String The license id to be removed.
[ "Remove", "a", "license", "from", "an", "artifact" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L319-L327
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/AssetsInner.java
AssetsInner.getEncryptionKeyAsync
public Observable<AssetStorageEncryptionKeyInner> getEncryptionKeyAsync(String resourceGroupName, String accountName, String assetName) { """ Gets the Asset storage key. Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. @param resourceGroupName The n...
java
public Observable<AssetStorageEncryptionKeyInner> getEncryptionKeyAsync(String resourceGroupName, String accountName, String assetName) { return getEncryptionKeyWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<AssetStorageEncryptionKeyInner>, AssetStorageEncrypti...
[ "public", "Observable", "<", "AssetStorageEncryptionKeyInner", ">", "getEncryptionKeyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "assetName", ")", "{", "return", "getEncryptionKeyWithServiceResponseAsync", "(", "resourceGroupName",...
Gets the Asset storage key. Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param assetName The Asset name. @throws ...
[ "Gets", "the", "Asset", "storage", "key", ".", "Gets", "the", "Asset", "storage", "encryption", "keys", "used", "to", "decrypt", "content", "created", "by", "version", "2", "of", "the", "Media", "Services", "API", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/AssetsInner.java#L920-L927
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/view/Divider.java
Divider.setVisibility
public final void setVisibility(final int visibility, final boolean animate) { """ Sets the visibility of the divider. @param visibility The visibility, which should be set, as an {@link Integer} value. Must be one of {@link #VISIBLE}, {@link #INVISIBLE} or {@link #GONE}. @param animate True, if the visibil...
java
public final void setVisibility(final int visibility, final boolean animate) { boolean visible = visibility == View.VISIBLE; Boolean tag = (Boolean) getTag(); setTag(visible); if (animate) { if (tag == null || tag != visible) { if (getAnimation() != null) { ...
[ "public", "final", "void", "setVisibility", "(", "final", "int", "visibility", ",", "final", "boolean", "animate", ")", "{", "boolean", "visible", "=", "visibility", "==", "View", ".", "VISIBLE", ";", "Boolean", "tag", "=", "(", "Boolean", ")", "getTag", "...
Sets the visibility of the divider. @param visibility The visibility, which should be set, as an {@link Integer} value. Must be one of {@link #VISIBLE}, {@link #INVISIBLE} or {@link #GONE}. @param animate True, if the visibility should be changed in an animated manner, false otherwise
[ "Sets", "the", "visibility", "of", "the", "divider", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/Divider.java#L180-L199
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Mail.java
Mail.setMimeattach
public void setMimeattach(String strMimeattach, String fileName, String type, String disposition, String contentID, boolean removeAfterSend) throws PageException { """ set the value mimeattach Specifies the path of the file to be attached to the e-mail message. An attached file is MIME-encoded. @param strMimea...
java
public void setMimeattach(String strMimeattach, String fileName, String type, String disposition, String contentID, boolean removeAfterSend) throws PageException { Resource file = ResourceUtil.toResourceNotExisting(pageContext, strMimeattach); pageContext.getConfig().getSecurityManager().checkFileLocation(file); if ...
[ "public", "void", "setMimeattach", "(", "String", "strMimeattach", ",", "String", "fileName", ",", "String", "type", ",", "String", "disposition", ",", "String", "contentID", ",", "boolean", "removeAfterSend", ")", "throws", "PageException", "{", "Resource", "file...
set the value mimeattach Specifies the path of the file to be attached to the e-mail message. An attached file is MIME-encoded. @param strMimeattach value to set @param type mimetype of the file @param contentID @param disposition @throws PageException
[ "set", "the", "value", "mimeattach", "Specifies", "the", "path", "of", "the", "file", "to", "be", "attached", "to", "the", "e", "-", "mail", "message", ".", "An", "attached", "file", "is", "MIME", "-", "encoded", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Mail.java#L322-L329
phax/ph-jaxb22-plugin
src/main/java/com/helger/jaxb22/plugin/PluginValueExtender.java
PluginValueExtender.run
@Override public boolean run (@Nonnull final Outline aOutline, @Nonnull final Options aOpts, @Nonnull final ErrorHandler aErrorHandler) { """ Main method to create methods for value: constructors, derived constructors, setter and getter. @param aOutline JAXB Outli...
java
@Override public boolean run (@Nonnull final Outline aOutline, @Nonnull final Options aOpts, @Nonnull final ErrorHandler aErrorHandler) { _addDefaultCtors (aOutline); final ICommonsMap <JClass, JType> aAllCtorClasses = _addValueCtors (aOutline); // Create al...
[ "@", "Override", "public", "boolean", "run", "(", "@", "Nonnull", "final", "Outline", "aOutline", ",", "@", "Nonnull", "final", "Options", "aOpts", ",", "@", "Nonnull", "final", "ErrorHandler", "aErrorHandler", ")", "{", "_addDefaultCtors", "(", "aOutline", ")...
Main method to create methods for value: constructors, derived constructors, setter and getter. @param aOutline JAXB Outline @param aOpts Options @param aErrorHandler Error handler
[ "Main", "method", "to", "create", "methods", "for", "value", ":", "constructors", "derived", "constructors", "setter", "and", "getter", "." ]
train
https://github.com/phax/ph-jaxb22-plugin/blob/8f965b136ba54a2924d4c73ed2983c2fd0eb3daf/src/main/java/com/helger/jaxb22/plugin/PluginValueExtender.java#L417-L429
liyiorg/weixin-popular
src/main/java/weixin/popular/api/QrcodeAPI.java
QrcodeAPI.qrcodeCreateTemp
public static QrcodeTicket qrcodeCreateTemp(String access_token,int expire_seconds,long scene_id) { """ 创建临时二维码 @param access_token access_token @param expire_seconds 最大不超过604800秒(即30天) @param scene_id 场景值ID,32位非0整型 最多10万个 @return QrcodeTicket """ String json = String.format("{\"expire_seconds\": %d,...
java
public static QrcodeTicket qrcodeCreateTemp(String access_token,int expire_seconds,long scene_id){ String json = String.format("{\"expire_seconds\": %d, \"action_name\": \"QR_SCENE\", \"action_info\": {\"scene\": {\"scene_id\": %d}}}",expire_seconds,scene_id); return qrcodeCreate(access_token,json); }
[ "public", "static", "QrcodeTicket", "qrcodeCreateTemp", "(", "String", "access_token", ",", "int", "expire_seconds", ",", "long", "scene_id", ")", "{", "String", "json", "=", "String", ".", "format", "(", "\"{\\\"expire_seconds\\\": %d, \\\"action_name\\\": \\\"QR_SCENE\\...
创建临时二维码 @param access_token access_token @param expire_seconds 最大不超过604800秒(即30天) @param scene_id 场景值ID,32位非0整型 最多10万个 @return QrcodeTicket
[ "创建临时二维码" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/QrcodeAPI.java#L55-L58
motown-io/motown
samples/authentication/src/main/java/io/motown/sample/authentication/rest/AuthenticationTokenProcessingFilter.java
AuthenticationTokenProcessingFilter.doFilter
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { """ Retrieves the authorization token from the request and validates it against the {@code UserService}. @param request servlet request. @param response servlet respon...
java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; String authToken = getAuthTokenFromRequest(httpRequest); String userName = TokenUtils.get...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "httpRequest", "=", "(", "HttpServletReq...
Retrieves the authorization token from the request and validates it against the {@code UserService}. @param request servlet request. @param response servlet response. @param chain filter chain. @throws IOException @throws ServletException
[ "Retrieves", "the", "authorization", "token", "from", "the", "request", "and", "validates", "it", "against", "the", "{", "@code", "UserService", "}", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/samples/authentication/src/main/java/io/motown/sample/authentication/rest/AuthenticationTokenProcessingFilter.java#L51-L69
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/SimpleXpathEngine.java
SimpleXpathEngine.getMatchingNodes
public NodeList getMatchingNodes(String select, Document document) throws ConfigurationException, XpathException { """ Execute the specified xpath syntax <code>select</code> expression on the specified document and return the list of nodes (could have length zero) that match @param select @param docume...
java
public NodeList getMatchingNodes(String select, Document document) throws ConfigurationException, XpathException { try { return getXPathResultNode(select, document).getChildNodes(); } catch (TransformerException ex) { throw new XpathException("Failed to apply stylesheet",...
[ "public", "NodeList", "getMatchingNodes", "(", "String", "select", ",", "Document", "document", ")", "throws", "ConfigurationException", ",", "XpathException", "{", "try", "{", "return", "getXPathResultNode", "(", "select", ",", "document", ")", ".", "getChildNodes"...
Execute the specified xpath syntax <code>select</code> expression on the specified document and return the list of nodes (could have length zero) that match @param select @param document @return list of matching nodes
[ "Execute", "the", "specified", "xpath", "syntax", "<code", ">", "select<", "/", "code", ">", "expression", "on", "the", "specified", "document", "and", "return", "the", "list", "of", "nodes", "(", "could", "have", "length", "zero", ")", "that", "match" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/SimpleXpathEngine.java#L205-L212
Omertron/api-omdb
src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java
OmdbBuilder.setSearchTerm
public OmdbBuilder setSearchTerm(final String searchTerm) throws OMDBException { """ Set the search term @param searchTerm The text to build for @return @throws com.omertron.omdbapi.OMDBException """ if (StringUtils.isBlank(searchTerm)) { throw new OMDBException(ApiExceptionType.UNKNOW...
java
public OmdbBuilder setSearchTerm(final String searchTerm) throws OMDBException { if (StringUtils.isBlank(searchTerm)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide a search term!"); } params.add(Param.SEARCH, searchTerm); return this; }
[ "public", "OmdbBuilder", "setSearchTerm", "(", "final", "String", "searchTerm", ")", "throws", "OMDBException", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "searchTerm", ")", ")", "{", "throw", "new", "OMDBException", "(", "ApiExceptionType", ".", "UNKNO...
Set the search term @param searchTerm The text to build for @return @throws com.omertron.omdbapi.OMDBException
[ "Set", "the", "search", "term" ]
train
https://github.com/Omertron/api-omdb/blob/acb506ded2d7b8a4159b48161ffab8cb5b7bad44/src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java#L59-L65
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/util/file/PlainFileUtil.java
PlainFileUtil.newFile
public static File newFile(String path, String content) throws FileAlreadyExistsException { """ create a new named file, and write the content into it. 新建文件,并写文件,文件必须不存在 @throws FileAlreadyExistsException FileAlreadyExistsException """ File file = new File(path); boolean created; tr...
java
public static File newFile(String path, String content) throws FileAlreadyExistsException { File file = new File(path); boolean created; try { created = file.createNewFile(); } catch (IOException e) { throw new RuntimeException(e); } if (!created) ...
[ "public", "static", "File", "newFile", "(", "String", "path", ",", "String", "content", ")", "throws", "FileAlreadyExistsException", "{", "File", "file", "=", "new", "File", "(", "path", ")", ";", "boolean", "created", ";", "try", "{", "created", "=", "fil...
create a new named file, and write the content into it. 新建文件,并写文件,文件必须不存在 @throws FileAlreadyExistsException FileAlreadyExistsException
[ "create", "a", "new", "named", "file", "and", "write", "the", "content", "into", "it", ".", "新建文件", "并写文件", "文件必须不存在" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/util/file/PlainFileUtil.java#L42-L59
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java
Calendar.handleGetDateFormat
protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) { """ Creates a <code>DateFormat</code> appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols o...
java
protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) { FormatConfiguration fmtConfig = new FormatConfiguration(); fmtConfig.pattern = pattern; fmtConfig.override = override; fmtConfig.formatData = new DateFormatSymbols(this, locale); fmtConfig...
[ "protected", "DateFormat", "handleGetDateFormat", "(", "String", "pattern", ",", "String", "override", ",", "ULocale", "locale", ")", "{", "FormatConfiguration", "fmtConfig", "=", "new", "FormatConfiguration", "(", ")", ";", "fmtConfig", ".", "pattern", "=", "patt...
Creates a <code>DateFormat</code> appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols objects as needed. @param pattern the pattern, specific to the <code>DateFormat</code> subclass @param lo...
[ "Creates", "a", "<code", ">", "DateFormat<", "/", "code", ">", "appropriate", "to", "this", "calendar", ".", "This", "is", "a", "framework", "method", "for", "subclasses", "to", "override", ".", "This", "method", "is", "responsible", "for", "creating", "the"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L3405-L3414
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/OperatorCentroid2DLocal.java
OperatorCentroid2DLocal.computePolygonCentroid
private static Point2D computePolygonCentroid(Polygon polygon) { """ Polygon centroid: area weighted average of centroids in case of holes """ int pathCount = polygon.getPathCount(); if (pathCount == 1) { return getPolygonSansHolesCentroid(polygon); } double xSum =...
java
private static Point2D computePolygonCentroid(Polygon polygon) { int pathCount = polygon.getPathCount(); if (pathCount == 1) { return getPolygonSansHolesCentroid(polygon); } double xSum = 0; double ySum = 0; double areaSum = 0; for (int i = 0; i...
[ "private", "static", "Point2D", "computePolygonCentroid", "(", "Polygon", "polygon", ")", "{", "int", "pathCount", "=", "polygon", ".", "getPathCount", "(", ")", ";", "if", "(", "pathCount", "==", "1", ")", "{", "return", "getPolygonSansHolesCentroid", "(", "p...
Polygon centroid: area weighted average of centroids in case of holes
[ "Polygon", "centroid", ":", "area", "weighted", "average", "of", "centroids", "in", "case", "of", "holes" ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/OperatorCentroid2DLocal.java#L99-L126
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/Fence.java
Fence.newFence
public static List<Fence> newFence(Collection<VM> vms, Collection<Node> nodes) { """ Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param nodes the hosts to disallow @return the associated list of constraints """ return vms.stream().map(v -> new Fence(...
java
public static List<Fence> newFence(Collection<VM> vms, Collection<Node> nodes) { return vms.stream().map(v -> new Fence(v, nodes)).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "Fence", ">", "newFence", "(", "Collection", "<", "VM", ">", "vms", ",", "Collection", "<", "Node", ">", "nodes", ")", "{", "return", "vms", ".", "stream", "(", ")", ".", "map", "(", "v", "->", "new", "Fence", "(", ...
Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param nodes the hosts to disallow @return the associated list of constraints
[ "Instantiate", "discrete", "constraints", "for", "a", "collection", "of", "VMs", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/Fence.java#L121-L123
google/closure-compiler
src/com/google/javascript/jscomp/CrossChunkReferenceCollector.java
CrossChunkReferenceCollector.process
@Override public void process(Node externs, Node root) { """ Convenience method for running this pass over a tree with this class as a callback. """ checkState(topLevelStatements.isEmpty(), "process() called more than once"); NodeTraversal t = new NodeTraversal(compiler, this, scopeCreator); t.t...
java
@Override public void process(Node externs, Node root) { checkState(topLevelStatements.isEmpty(), "process() called more than once"); NodeTraversal t = new NodeTraversal(compiler, this, scopeCreator); t.traverseRoots(externs, root); }
[ "@", "Override", "public", "void", "process", "(", "Node", "externs", ",", "Node", "root", ")", "{", "checkState", "(", "topLevelStatements", ".", "isEmpty", "(", ")", ",", "\"process() called more than once\"", ")", ";", "NodeTraversal", "t", "=", "new", "Nod...
Convenience method for running this pass over a tree with this class as a callback.
[ "Convenience", "method", "for", "running", "this", "pass", "over", "a", "tree", "with", "this", "class", "as", "a", "callback", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CrossChunkReferenceCollector.java#L75-L80
rjstanford/protea-http
src/main/java/cc/protea/util/http/Message.java
Message.setHeaders
@SuppressWarnings("unchecked") public T setHeaders(final Map<String, List<String>> headers) { """ Sets all of the headers in one call. @param headers A Map of headers, where the header name is a String, and the value is a List of one or more values. @return this Message, to support chained method calls "...
java
@SuppressWarnings("unchecked") public T setHeaders(final Map<String, List<String>> headers) { this.headers = headers; return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "setHeaders", "(", "final", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", ")", "{", "this", ".", "headers", "=", "headers", ";", "return", "(", "T", ")", "this"...
Sets all of the headers in one call. @param headers A Map of headers, where the header name is a String, and the value is a List of one or more values. @return this Message, to support chained method calls
[ "Sets", "all", "of", "the", "headers", "in", "one", "call", "." ]
train
https://github.com/rjstanford/protea-http/blob/4d4a18805639181a738faff199e39d58337169ea/src/main/java/cc/protea/util/http/Message.java#L133-L137
LearnLib/automatalib
util/src/main/java/net/automatalib/util/ts/copy/TSCopy.java
TSCopy.copy
public static <S1, I1, T1, SP1, TP1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP1, ? extends TP1> in, ...
java
public static <S1, I1, T1, SP1, TP1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP1, ? extends TP1> in, ...
[ "public", "static", "<", "S1", ",", "I1", ",", "T1", ",", "SP1", ",", "TP1", ",", "S2", ",", "I2", ",", "T2", ",", "SP2", ",", "TP2", ">", "Mapping", "<", "S1", ",", "S2", ">", "copy", "(", "TSTraversalMethod", "method", ",", "UniversalTransitionSy...
Copies a {@link UniversalAutomaton} to a {@link MutableAutomaton} with possibly heterogeneous input alphabets and state and transition properties. @param method the traversal method to use @param in the input transition system @param limit the traversal limit, a value less than 0 means no limit @param inputs the input...
[ "Copies", "a", "{", "@link", "UniversalAutomaton", "}", "to", "a", "{", "@link", "MutableAutomaton", "}", "with", "possibly", "heterogeneous", "input", "alphabets", "and", "state", "and", "transition", "properties", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/ts/copy/TSCopy.java#L294-L309
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsHtmlImportConverter.java
CmsHtmlImportConverter.extractHtml
public static String extractHtml(String content, String startpoint, String endpoint) { """ Extracts the content of a HTML page.<p> This method should be pretty robust and work even if the input HTML does not contains the specified matchers.<p> @param content the content to extract the body from @param star...
java
public static String extractHtml(String content, String startpoint, String endpoint) { /** Regex that matches a start body tag. */ Pattern startPattern = Pattern.compile(startpoint, Pattern.CASE_INSENSITIVE); /** Regex that matches an end body tag. */ Pattern endPattern = Pattern.compi...
[ "public", "static", "String", "extractHtml", "(", "String", "content", ",", "String", "startpoint", ",", "String", "endpoint", ")", "{", "/** Regex that matches a start body tag. */", "Pattern", "startPattern", "=", "Pattern", ".", "compile", "(", "startpoint", ",", ...
Extracts the content of a HTML page.<p> This method should be pretty robust and work even if the input HTML does not contains the specified matchers.<p> @param content the content to extract the body from @param startpoint the point where matching starts @param endpoint the point where matching ends @return the extra...
[ "Extracts", "the", "content", "of", "a", "HTML", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsHtmlImportConverter.java#L160-L183
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/IdType.java
IdType.withServerBase
@Override public IdType withServerBase(String theServerBase, String theResourceType) { """ Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially, because IdType can contain eithe...
java
@Override public IdType withServerBase(String theServerBase, String theResourceType) { if (isLocal() || isUrn()) { return new IdType(getValueAsString()); } return new IdType(theServerBase, theResourceType, getIdPart(), getVersionIdPart()); }
[ "@", "Override", "public", "IdType", "withServerBase", "(", "String", "theServerBase", ",", "String", "theResourceType", ")", "{", "if", "(", "isLocal", "(", ")", "||", "isUrn", "(", ")", ")", "{", "return", "new", "IdType", "(", "getValueAsString", "(", "...
Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially, because IdType can contain either a complete URL or a partial one (or even jut a simple ID), this method may be used to translate in...
[ "Returns", "a", "view", "of", "this", "ID", "as", "a", "fully", "qualified", "URL", "given", "a", "server", "base", "and", "resource", "name", "(", "which", "will", "only", "be", "used", "if", "the", "ID", "does", "not", "already", "contain", "those", ...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/IdType.java#L702-L708
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java
C3P0PooledDataSourceProvider.openPooledDataSource
public DataSource openPooledDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword) throws SQLException { """ get the pooled datasource from c3p0 pool @param aDbType a supported database type. @param aDbUrl a connection url @param aUsername a username for the database @param aPassw...
java
public DataSource openPooledDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword) throws SQLException { final DataSource unPooledDS = DataSources.unpooledDataSource(aDbUrl, aUsername, aPassword); //override the default properties with ours final Map<String, Stri...
[ "public", "DataSource", "openPooledDataSource", "(", "DBType", "aDbType", ",", "String", "aDbUrl", ",", "String", "aUsername", ",", "String", "aPassword", ")", "throws", "SQLException", "{", "final", "DataSource", "unPooledDS", "=", "DataSources", ".", "unpooledData...
get the pooled datasource from c3p0 pool @param aDbType a supported database type. @param aDbUrl a connection url @param aUsername a username for the database @param aPassword a password for the database connection @return a DataSource a pooled data source @throws SQLException
[ "get", "the", "pooled", "datasource", "from", "c3p0", "pool" ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java#L111-L120
canhnt/sne-xacml
sne-xacml/src/main/java/nl/uva/sne/xacml/policy/parsers/AnyOfExpression.java
AnyOfExpression.createFromConjunctionClauses
public AbstractNode createFromConjunctionClauses(Map<String, AttributeInfo> intervals) throws MIDDParsingException, MIDDException { """ Create a MIDD from conjunctions of intervals @param intervals @return @throws MIDDParsingException @throws MIDDException """ if (intervals == null || intervals....
java
public AbstractNode createFromConjunctionClauses(Map<String, AttributeInfo> intervals) throws MIDDParsingException, MIDDException { if (intervals == null || intervals.size() == 0) { return ExternalNode.newInstance(); // return true-value external node } // Create edges from interva...
[ "public", "AbstractNode", "createFromConjunctionClauses", "(", "Map", "<", "String", ",", "AttributeInfo", ">", "intervals", ")", "throws", "MIDDParsingException", ",", "MIDDException", "{", "if", "(", "intervals", "==", "null", "||", "intervals", ".", "size", "("...
Create a MIDD from conjunctions of intervals @param intervals @return @throws MIDDParsingException @throws MIDDException
[ "Create", "a", "MIDD", "from", "conjunctions", "of", "intervals" ]
train
https://github.com/canhnt/sne-xacml/blob/7ffca16bf558d2c3ee16181d926f066ab1de75b2/sne-xacml/src/main/java/nl/uva/sne/xacml/policy/parsers/AnyOfExpression.java#L86-L136
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java
JsonLdProcessor.fromRDF
public static Object fromRDF(Object input, RDFParser parser) throws JsonLdError { """ Converts an RDF dataset to JSON-LD, using a specific instance of {@link RDFParser}, and the default {@link JsonLdOptions}. @param input a serialized string of RDF in a format specified by the format option or an RDF dataset...
java
public static Object fromRDF(Object input, RDFParser parser) throws JsonLdError { return fromRDF(input, new JsonLdOptions(""), parser); }
[ "public", "static", "Object", "fromRDF", "(", "Object", "input", ",", "RDFParser", "parser", ")", "throws", "JsonLdError", "{", "return", "fromRDF", "(", "input", ",", "new", "JsonLdOptions", "(", "\"\"", ")", ",", "parser", ")", ";", "}" ]
Converts an RDF dataset to JSON-LD, using a specific instance of {@link RDFParser}, and the default {@link JsonLdOptions}. @param input a serialized string of RDF in a format specified by the format option or an RDF dataset to convert. @param parser A specific instance of {@link RDFParser} to use for the conversion. @...
[ "Converts", "an", "RDF", "dataset", "to", "JSON", "-", "LD", "using", "a", "specific", "instance", "of", "{", "@link", "RDFParser", "}", "and", "the", "default", "{", "@link", "JsonLdOptions", "}", "." ]
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java#L478-L480
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java
ParallelNodeDispatcher.getThreadLocalForProject
public static String getThreadLocalForProject(final String nodeNameLocalRefId, final Project project) { """ Extract the threadlocal stored as a reference in the project, and return the string value or null. @param nodeNameLocalRefId refid for the thread local variable @param project Project @retu...
java
public static String getThreadLocalForProject(final String nodeNameLocalRefId, final Project project) { final Object o = project.getReference(nodeNameLocalRefId); String thrNode = null; if (null != o && o instanceof InheritableThreadLocal) { InheritableThreadLocal<String> local = (In...
[ "public", "static", "String", "getThreadLocalForProject", "(", "final", "String", "nodeNameLocalRefId", ",", "final", "Project", "project", ")", "{", "final", "Object", "o", "=", "project", ".", "getReference", "(", "nodeNameLocalRefId", ")", ";", "String", "thrNo...
Extract the threadlocal stored as a reference in the project, and return the string value or null. @param nodeNameLocalRefId refid for the thread local variable @param project Project @return value of the variable, or null if it is not found or the refid doesn't refer to a valid thread local
[ "Extract", "the", "threadlocal", "stored", "as", "a", "reference", "in", "the", "project", "and", "return", "the", "string", "value", "or", "null", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java#L284-L292
steveohara/j2mod
src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java
AbstractModbusMaster.writeCoil
public boolean writeCoil(int unitId, int ref, boolean state) throws ModbusException { """ Writes a coil state to the slave. @param unitId the slave unit id. @param ref the offset of the coil to be written. @param state the coil state to be written. @return the state of the coil as returned from the sla...
java
public boolean writeCoil(int unitId, int ref, boolean state) throws ModbusException { checkTransaction(); if (writeCoilRequest == null) { writeCoilRequest = new WriteCoilRequest(); } writeCoilRequest.setUnitID(unitId); writeCoilRequest.setReference(ref); write...
[ "public", "boolean", "writeCoil", "(", "int", "unitId", ",", "int", "ref", ",", "boolean", "state", ")", "throws", "ModbusException", "{", "checkTransaction", "(", ")", ";", "if", "(", "writeCoilRequest", "==", "null", ")", "{", "writeCoilRequest", "=", "new...
Writes a coil state to the slave. @param unitId the slave unit id. @param ref the offset of the coil to be written. @param state the coil state to be written. @return the state of the coil as returned from the slave. @throws ModbusException if an I/O error, a slave exception or a transaction error occurs.
[ "Writes", "a", "coil", "state", "to", "the", "slave", "." ]
train
https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java#L116-L127
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java
BasicAuthenticationPolicy.sendAuthFailure
protected void sendAuthFailure(IPolicyContext context, IPolicyChain<?> chain, BasicAuthenticationConfig config, int reason) { """ Sends the 'unauthenticated' response as a policy failure. @param context @param chain @param config @param reason """ IPolicyFailureFactoryComponent pff = context.getCom...
java
protected void sendAuthFailure(IPolicyContext context, IPolicyChain<?> chain, BasicAuthenticationConfig config, int reason) { IPolicyFailureFactoryComponent pff = context.getComponent(IPolicyFailureFactoryComponent.class); PolicyFailure failure = pff.createFailure(PolicyFailureType.Authentication, reaso...
[ "protected", "void", "sendAuthFailure", "(", "IPolicyContext", "context", ",", "IPolicyChain", "<", "?", ">", "chain", ",", "BasicAuthenticationConfig", "config", ",", "int", "reason", ")", "{", "IPolicyFailureFactoryComponent", "pff", "=", "context", ".", "getCompo...
Sends the 'unauthenticated' response as a policy failure. @param context @param chain @param config @param reason
[ "Sends", "the", "unauthenticated", "response", "as", "a", "policy", "failure", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java#L182-L191
apache/groovy
src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java
StampedCommonCache.doWithWriteLock
private <R> R doWithWriteLock(Action<K, V, R> action) { """ deal with the backed cache guarded by write lock @param action the content to complete """ long stamp = sl.writeLock(); try { return action.doWith(commonCache); } finally { sl.unlockWrite(stamp); ...
java
private <R> R doWithWriteLock(Action<K, V, R> action) { long stamp = sl.writeLock(); try { return action.doWith(commonCache); } finally { sl.unlockWrite(stamp); } }
[ "private", "<", "R", ">", "R", "doWithWriteLock", "(", "Action", "<", "K", ",", "V", ",", "R", ">", "action", ")", "{", "long", "stamp", "=", "sl", ".", "writeLock", "(", ")", ";", "try", "{", "return", "action", ".", "doWith", "(", "commonCache", ...
deal with the backed cache guarded by write lock @param action the content to complete
[ "deal", "with", "the", "backed", "cache", "guarded", "by", "write", "lock" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java#L269-L276
knowm/XChange
xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseAccountServiceRaw.java
CoinbaseAccountServiceRaw.getCoinbaseRecurringPayments
public CoinbaseRecurringPayments getCoinbaseRecurringPayments(Integer page, final Integer limit) throws IOException { """ Authenticated resource that lets you list all your recurring payments (scheduled buys, sells, and subscriptions you’ve created with merchants). @param page Optional parameter to reque...
java
public CoinbaseRecurringPayments getCoinbaseRecurringPayments(Integer page, final Integer limit) throws IOException { final CoinbaseRecurringPayments recurringPayments = coinbase.getRecurringPayments( page, limit, exchange.getExchangeSpecification().getApiKey(), ...
[ "public", "CoinbaseRecurringPayments", "getCoinbaseRecurringPayments", "(", "Integer", "page", ",", "final", "Integer", "limit", ")", "throws", "IOException", "{", "final", "CoinbaseRecurringPayments", "recurringPayments", "=", "coinbase", ".", "getRecurringPayments", "(", ...
Authenticated resource that lets you list all your recurring payments (scheduled buys, sells, and subscriptions you’ve created with merchants). @param page Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1. @param limit Optional parameter to limit t...
[ "Authenticated", "resource", "that", "lets", "you", "list", "all", "your", "recurring", "payments", "(", "scheduled", "buys", "sells", "and", "subscriptions", "you’ve", "created", "with", "merchants", ")", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseAccountServiceRaw.java#L623-L634
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.removeIf
public static <T> boolean removeIf(Iterable<T> iterable, Predicate<? super T> predicate) { """ Removes all elements from the iterable that evaluate to true for the specified predicate. """ if (iterable instanceof MutableCollection) { return ((MutableCollection<T>) iterable).removeIf...
java
public static <T> boolean removeIf(Iterable<T> iterable, Predicate<? super T> predicate) { if (iterable instanceof MutableCollection) { return ((MutableCollection<T>) iterable).removeIf(predicate); } if (iterable instanceof ArrayList) { return ArrayLis...
[ "public", "static", "<", "T", ">", "boolean", "removeIf", "(", "Iterable", "<", "T", ">", "iterable", ",", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "if", "(", "iterable", "instanceof", "MutableCollection", ")", "{", "return", "(",...
Removes all elements from the iterable that evaluate to true for the specified predicate.
[ "Removes", "all", "elements", "from", "the", "iterable", "that", "evaluate", "to", "true", "for", "the", "specified", "predicate", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L927-L946
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asFloat
public static Float asFloat(String expression, Node node) throws XPathExpressionException { """ Evaluates the specified XPath expression and returns the result as a Float. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly via { ...
java
public static Float asFloat(String expression, Node node) throws XPathExpressionException { return asFloat(expression, node, xpath()); }
[ "public", "static", "Float", "asFloat", "(", "String", "expression", ",", "Node", "node", ")", "throws", "XPathExpressionException", "{", "return", "asFloat", "(", "expression", ",", "node", ",", "xpath", "(", ")", ")", ";", "}" ]
Evaluates the specified XPath expression and returns the result as a Float. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly via { {@link #asDouble(String, Node, XPath)} instead. Note {@link XPath} is not thread-safe and not reentrant. @param exp...
[ "Evaluates", "the", "specified", "XPath", "expression", "and", "returns", "the", "result", "as", "a", "Float", ".", "<p", ">", "This", "method", "can", "be", "expensive", "as", "a", "new", "xpath", "is", "instantiated", "per", "invocation", ".", "Consider", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L347-L350
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.removeAlias
public String removeAlias(String indice,String alias) { """ removing that same alias [alias] of [indice] more detail see : * https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html @param indice @param alias @return """ String removeAlias = new StringBuilder().append("{\"act...
java
public String removeAlias(String indice,String alias){ String removeAlias = new StringBuilder().append("{\"actions\": [{\"remove\": {\"index\":\"").append(indice).append("\",\"alias\": \"").append(alias).append("\"}}]}").toString(); return this.client.executeHttp("_aliases",removeAlias,ClientUtil.HTTP_POST); }
[ "public", "String", "removeAlias", "(", "String", "indice", ",", "String", "alias", ")", "{", "String", "removeAlias", "=", "new", "StringBuilder", "(", ")", ".", "append", "(", "\"{\\\"actions\\\": [{\\\"remove\\\": {\\\"index\\\":\\\"\"", ")", ".", "append", "(", ...
removing that same alias [alias] of [indice] more detail see : * https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html @param indice @param alias @return
[ "removing", "that", "same", "alias", "[", "alias", "]", "of", "[", "indice", "]", "more", "detail", "see", ":", "*", "https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current"...
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L3513-L3516
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/core/Prefer.java
Prefer.ofOmit
public static Prefer ofOmit(final String... omits) { """ Build a Prefer object with a set of omitted IRIs. @param omits the IRIs to omit @return the Prefer object """ final List<String> iris = asList(omits); if (iris.isEmpty()) { return valueOf(join("=", PREFER_RETURN, PREFER_RE...
java
public static Prefer ofOmit(final String... omits) { final List<String> iris = asList(omits); if (iris.isEmpty()) { return valueOf(join("=", PREFER_RETURN, PREFER_REPRESENTATION)); } return valueOf(join("=", PREFER_RETURN, PREFER_REPRESENTATION) + "; " + PREFER_OMIT + "=\"" +...
[ "public", "static", "Prefer", "ofOmit", "(", "final", "String", "...", "omits", ")", "{", "final", "List", "<", "String", ">", "iris", "=", "asList", "(", "omits", ")", ";", "if", "(", "iris", ".", "isEmpty", "(", ")", ")", "{", "return", "valueOf", ...
Build a Prefer object with a set of omitted IRIs. @param omits the IRIs to omit @return the Prefer object
[ "Build", "a", "Prefer", "object", "with", "a", "set", "of", "omitted", "IRIs", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/core/Prefer.java#L176-L183
zandero/settings
src/main/java/com/zandero/settings/Settings.java
Settings.getStrings
public String[] getStrings(String name) { """ Returns setting as array of Strings @param name of setting @return Array of Strings @throws IllegalArgumentException in case setting is not an array """ Object value = super.get(name); if (value instanceof String[]) { return (String[]) value; } thro...
java
public String[] getStrings(String name) { Object value = super.get(name); if (value instanceof String[]) { return (String[]) value; } throw new IllegalArgumentException("Setting: '" + name + "', can't be converted to string array: '" + value + "'!"); }
[ "public", "String", "[", "]", "getStrings", "(", "String", "name", ")", "{", "Object", "value", "=", "super", ".", "get", "(", "name", ")", ";", "if", "(", "value", "instanceof", "String", "[", "]", ")", "{", "return", "(", "String", "[", "]", ")",...
Returns setting as array of Strings @param name of setting @return Array of Strings @throws IllegalArgumentException in case setting is not an array
[ "Returns", "setting", "as", "array", "of", "Strings" ]
train
https://github.com/zandero/settings/blob/802b44f41bc75e7eb2761028db8c73b7e59620c7/src/main/java/com/zandero/settings/Settings.java#L110-L118
killbill/killbill
util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java
InternalCallContextFactory.createInternalCallContext
public InternalCallContext createInternalCallContext(final TimeZoneAwareEntity accountModelDao, final Long accountRecordId, final InternalCallContext context) { """ Used during the account creation transaction (account not visible outside of the transaction yet) """ // See DefaultImmutableAccountData i...
java
public InternalCallContext createInternalCallContext(final TimeZoneAwareEntity accountModelDao, final Long accountRecordId, final InternalCallContext context) { // See DefaultImmutableAccountData implementation final DateTimeZone fixedOffsetTimeZone = AccountDateTimeUtils.getFixedOffsetTimeZone(accountM...
[ "public", "InternalCallContext", "createInternalCallContext", "(", "final", "TimeZoneAwareEntity", "accountModelDao", ",", "final", "Long", "accountRecordId", ",", "final", "InternalCallContext", "context", ")", "{", "// See DefaultImmutableAccountData implementation", "final", ...
Used during the account creation transaction (account not visible outside of the transaction yet)
[ "Used", "during", "the", "account", "creation", "transaction", "(", "account", "not", "visible", "outside", "of", "the", "transaction", "yet", ")" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java#L266-L272
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryRequest.java
QueryRequest.withQueryFilter
public QueryRequest withQueryFilter(java.util.Map<String, Condition> queryFilter) { """ <p> This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html" >Q...
java
public QueryRequest withQueryFilter(java.util.Map<String, Condition> queryFilter) { setQueryFilter(queryFilter); return this; }
[ "public", "QueryRequest", "withQueryFilter", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Condition", ">", "queryFilter", ")", "{", "setQueryFilter", "(", "queryFilter", ")", ";", "return", "this", ";", "}" ]
<p> This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html" >QueryFilter</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> @param queryFilter This is a...
[ "<p", ">", "This", "is", "a", "legacy", "parameter", ".", "Use", "<code", ">", "FilterExpression<", "/", "code", ">", "instead", ".", "For", "more", "information", "see", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryRequest.java#L1544-L1547
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/AliasedDiscoveryConfigUtils.java
AliasedDiscoveryConfigUtils.getConfigByTag
public static AliasedDiscoveryConfig getConfigByTag(JoinConfig config, String tag) { """ Gets the {@link AliasedDiscoveryConfig} from {@code config} by {@code tag}. """ if ("aws".equals(tag)) { return config.getAwsConfig(); } else if ("gcp".equals(tag)) { return config.g...
java
public static AliasedDiscoveryConfig getConfigByTag(JoinConfig config, String tag) { if ("aws".equals(tag)) { return config.getAwsConfig(); } else if ("gcp".equals(tag)) { return config.getGcpConfig(); } else if ("azure".equals(tag)) { return config.getAzureCo...
[ "public", "static", "AliasedDiscoveryConfig", "getConfigByTag", "(", "JoinConfig", "config", ",", "String", "tag", ")", "{", "if", "(", "\"aws\"", ".", "equals", "(", "tag", ")", ")", "{", "return", "config", ".", "getAwsConfig", "(", ")", ";", "}", "else"...
Gets the {@link AliasedDiscoveryConfig} from {@code config} by {@code tag}.
[ "Gets", "the", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/AliasedDiscoveryConfigUtils.java#L115-L129
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.sdiffstore
@Override public Long sdiffstore(final byte[] dstkey, final byte[]... keys) { """ This command works exactly like {@link #sdiff(byte[]...) SDIFF} but instead of being returned the resulting set is stored in dstkey. @param dstkey @param keys @return Status code reply """ checkIsInMultiOrPipeline(); ...
java
@Override public Long sdiffstore(final byte[] dstkey, final byte[]... keys) { checkIsInMultiOrPipeline(); client.sdiffstore(dstkey, keys); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "sdiffstore", "(", "final", "byte", "[", "]", "dstkey", ",", "final", "byte", "[", "]", "...", "keys", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "sdiffstore", "(", "dstkey", ",", "keys", ")", ...
This command works exactly like {@link #sdiff(byte[]...) SDIFF} but instead of being returned the resulting set is stored in dstkey. @param dstkey @param keys @return Status code reply
[ "This", "command", "works", "exactly", "like", "{" ]
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1612-L1617
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendSubQuery
private void appendSubQuery(Query subQuery, StringBuffer buf) { """ Append a SubQuery the SQL-Clause @param subQuery the subQuery value of SelectionCriteria """ buf.append(" ("); buf.append(getSubQuerySQL(subQuery)); buf.append(") "); }
java
private void appendSubQuery(Query subQuery, StringBuffer buf) { buf.append(" ("); buf.append(getSubQuerySQL(subQuery)); buf.append(") "); }
[ "private", "void", "appendSubQuery", "(", "Query", "subQuery", ",", "StringBuffer", "buf", ")", "{", "buf", ".", "append", "(", "\" (\"", ")", ";", "buf", ".", "append", "(", "getSubQuerySQL", "(", "subQuery", ")", ")", ";", "buf", ".", "append", "(", ...
Append a SubQuery the SQL-Clause @param subQuery the subQuery value of SelectionCriteria
[ "Append", "a", "SubQuery", "the", "SQL", "-", "Clause" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L971-L976
codeprimate-software/cp-elements
src/main/java/org/cp/elements/io/FileUtils.java
FileUtils.assertExists
@NullSafe public static File assertExists(File path) throws FileNotFoundException { """ Asserts that the given file exists. @param path the {@link File} to assert for existence. @return a reference back to the file. @throws java.io.FileNotFoundException if the file does not exist. @see #isExisting(File) ...
java
@NullSafe public static File assertExists(File path) throws FileNotFoundException { if (isExisting(path)) { return path; } throw new FileNotFoundException(String.format("[%1$s] was not found", path)); }
[ "@", "NullSafe", "public", "static", "File", "assertExists", "(", "File", "path", ")", "throws", "FileNotFoundException", "{", "if", "(", "isExisting", "(", "path", ")", ")", "{", "return", "path", ";", "}", "throw", "new", "FileNotFoundException", "(", "Str...
Asserts that the given file exists. @param path the {@link File} to assert for existence. @return a reference back to the file. @throws java.io.FileNotFoundException if the file does not exist. @see #isExisting(File)
[ "Asserts", "that", "the", "given", "file", "exists", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/io/FileUtils.java#L52-L59
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.scaling
public Matrix3x2f scaling(float x, float y) { """ Set this matrix to be a simple scale matrix. @param x the scale in x @param y the scale in y @return this """ m00 = x; m01 = 0.0f; m10 = 0.0f; m11 = y; m20 = 0.0f; m21 = 0.0f; return this; }
java
public Matrix3x2f scaling(float x, float y) { m00 = x; m01 = 0.0f; m10 = 0.0f; m11 = y; m20 = 0.0f; m21 = 0.0f; return this; }
[ "public", "Matrix3x2f", "scaling", "(", "float", "x", ",", "float", "y", ")", "{", "m00", "=", "x", ";", "m01", "=", "0.0f", ";", "m10", "=", "0.0f", ";", "m11", "=", "y", ";", "m20", "=", "0.0f", ";", "m21", "=", "0.0f", ";", "return", "this",...
Set this matrix to be a simple scale matrix. @param x the scale in x @param y the scale in y @return this
[ "Set", "this", "matrix", "to", "be", "a", "simple", "scale", "matrix", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L1583-L1591
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/EnumParse.java
EnumParse.enumWithRawValue
public static <T extends Enum & ParsableEnum> T enumWithRawValue(Class<T> enumClass, int value) throws NoEnumFoundException { """ Retrieve the enum of a given type from a given raw value. Enums must implement the {@link com.punchthrough.bean.sdk.internal.utility.EnumParse.ParsableEnum} interface to en...
java
public static <T extends Enum & ParsableEnum> T enumWithRawValue(Class<T> enumClass, int value) throws NoEnumFoundException { for (Object oneEnumRaw : EnumSet.allOf(enumClass)) { // This is an awkward hack: we _know_ T oneEnumRaw is of type T, since allOf(TClass) // only ret...
[ "public", "static", "<", "T", "extends", "Enum", "&", "ParsableEnum", ">", "T", "enumWithRawValue", "(", "Class", "<", "T", ">", "enumClass", ",", "int", "value", ")", "throws", "NoEnumFoundException", "{", "for", "(", "Object", "oneEnumRaw", ":", "EnumSet",...
Retrieve the enum of a given type from a given raw value. Enums must implement the {@link com.punchthrough.bean.sdk.internal.utility.EnumParse.ParsableEnum} interface to ensure they have a {@link com.punchthrough.bean.sdk.internal.utility.EnumParse.ParsableEnum#getRawValue()} method. <a href="http://stackoverflow.com/a...
[ "Retrieve", "the", "enum", "of", "a", "given", "type", "from", "a", "given", "raw", "value", ".", "Enums", "must", "implement", "the", "{", "@link", "com", ".", "punchthrough", ".", "bean", ".", "sdk", ".", "internal", ".", "utility", ".", "EnumParse", ...
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/EnumParse.java#L33-L48
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColorSelector.java
CmsColorSelector.onMapSelected
public void onMapSelected(float x, float y) { """ Fires whenever the user generates picking events on the color picker map.<p> @param x the distance along the x-axis, between 0 and 255 @param y the distance along the y-axis, between 0 and 255 """ if (x > 255) { x = 255; } ...
java
public void onMapSelected(float x, float y) { if (x > 255) { x = 255; } if (x < 0) { x = 0; } if (y > 255) { y = 255; } if (y < 0) { y = 0; } switch (m_colorMode) { case Cm...
[ "public", "void", "onMapSelected", "(", "float", "x", ",", "float", "y", ")", "{", "if", "(", "x", ">", "255", ")", "{", "x", "=", "255", ";", "}", "if", "(", "x", "<", "0", ")", "{", "x", "=", "0", ";", "}", "if", "(", "y", ">", "255", ...
Fires whenever the user generates picking events on the color picker map.<p> @param x the distance along the x-axis, between 0 and 255 @param y the distance along the y-axis, between 0 and 255
[ "Fires", "whenever", "the", "user", "generates", "picking", "events", "on", "the", "color", "picker", "map", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColorSelector.java#L655-L715
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/pooling/KerasPoolingUtils.java
KerasPoolingUtils.mapPoolingType
public static PoolingType mapPoolingType(String className, KerasLayerConfiguration conf) throws UnsupportedKerasConfigurationException { """ Map Keras pooling layers to DL4J pooling types. @param className name of the Keras pooling class @return DL4J pooling type @throws UnsupportedKerasConfigurat...
java
public static PoolingType mapPoolingType(String className, KerasLayerConfiguration conf) throws UnsupportedKerasConfigurationException { PoolingType poolingType; if (className.equals(conf.getLAYER_CLASS_NAME_MAX_POOLING_2D()) || className.equals(conf.getLAYER_CLASS_NAME_MAX_P...
[ "public", "static", "PoolingType", "mapPoolingType", "(", "String", "className", ",", "KerasLayerConfiguration", "conf", ")", "throws", "UnsupportedKerasConfigurationException", "{", "PoolingType", "poolingType", ";", "if", "(", "className", ".", "equals", "(", "conf", ...
Map Keras pooling layers to DL4J pooling types. @param className name of the Keras pooling class @return DL4J pooling type @throws UnsupportedKerasConfigurationException Unsupported Keras config
[ "Map", "Keras", "pooling", "layers", "to", "DL4J", "pooling", "types", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/pooling/KerasPoolingUtils.java#L37-L56
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/person/PersonNameHelper.java
PersonNameHelper._unifySinglePart
@Nullable private static String _unifySinglePart (@Nonnull final String sPart, @Nonnull final Locale aSortLocale) { """ Unify a single name part. Performs the following transformations: <ul> <li>Remove leading and trailing whitespaces</li> <li>If the name is all upper case, down case all except the first char...
java
@Nullable private static String _unifySinglePart (@Nonnull final String sPart, @Nonnull final Locale aSortLocale) { // empty name? String s = sPart.trim (); final int nLength = s.length (); if (nLength == 0) return null; // all upper case name? if (nLength == 1) return s.toUpper...
[ "@", "Nullable", "private", "static", "String", "_unifySinglePart", "(", "@", "Nonnull", "final", "String", "sPart", ",", "@", "Nonnull", "final", "Locale", "aSortLocale", ")", "{", "// empty name?", "String", "s", "=", "sPart", ".", "trim", "(", ")", ";", ...
Unify a single name part. Performs the following transformations: <ul> <li>Remove leading and trailing whitespaces</li> <li>If the name is all upper case, down case all except the first character </li> </ul> @param sPart The string part to be unified @param aSortLocale The local to use (for case changing) @return The ...
[ "Unify", "a", "single", "name", "part", ".", "Performs", "the", "following", "transformations", ":", "<ul", ">", "<li", ">", "Remove", "leading", "and", "trailing", "whitespaces<", "/", "li", ">", "<li", ">", "If", "the", "name", "is", "all", "upper", "c...
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/person/PersonNameHelper.java#L110-L131
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Query.java
Query.aroundLatitudeLongitude
public Query aroundLatitudeLongitude(float latitude, float longitude, int radius) { """ Search for entries around a given latitude/longitude. @param radius set the maximum distance in meters. Note: at indexing, geoloc of an object should be set with _geoloc attribute containing lat and lng attributes (for exa...
java
public Query aroundLatitudeLongitude(float latitude, float longitude, int radius) { aroundLatLong = "aroundLatLng=" + latitude + "," + longitude; aroundRadius = radius; return this; }
[ "public", "Query", "aroundLatitudeLongitude", "(", "float", "latitude", ",", "float", "longitude", ",", "int", "radius", ")", "{", "aroundLatLong", "=", "\"aroundLatLng=\"", "+", "latitude", "+", "\",\"", "+", "longitude", ";", "aroundRadius", "=", "radius", ";"...
Search for entries around a given latitude/longitude. @param radius set the maximum distance in meters. Note: at indexing, geoloc of an object should be set with _geoloc attribute containing lat and lng attributes (for example {"_geoloc":{"lat":48.853409, "lng":2.348800}})
[ "Search", "for", "entries", "around", "a", "given", "latitude", "/", "longitude", "." ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Query.java#L422-L426