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
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRayLineSegment
public static double intersectRayLineSegment(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) { """ Determine whether the ray with given <code>origin</code> and direction <code>dir</code> intersects the undirected line segment given by the two end points <code>a</code> and <code>b</code>, and return the...
java
public static double intersectRayLineSegment(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) { return intersectRayLineSegment(origin.x(), origin.y(), dir.x(), dir.y(), a.x(), a.y(), b.x(), b.y()); }
[ "public", "static", "double", "intersectRayLineSegment", "(", "Vector2dc", "origin", ",", "Vector2dc", "dir", ",", "Vector2dc", "a", ",", "Vector2dc", "b", ")", "{", "return", "intersectRayLineSegment", "(", "origin", ".", "x", "(", ")", ",", "origin", ".", ...
Determine whether the ray with given <code>origin</code> and direction <code>dir</code> intersects the undirected line segment given by the two end points <code>a</code> and <code>b</code>, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point, if an...
[ "Determine", "whether", "the", "ray", "with", "given", "<code", ">", "origin<", "/", "code", ">", "and", "direction", "<code", ">", "dir<", "/", "code", ">", "intersects", "the", "undirected", "line", "segment", "given", "by", "the", "two", "end", "points"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L4015-L4017
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Array.java
Array.getValue
@Override public Object getValue(int index) { """ Gets value at the given index as an object. The object types are Blob, Array, Dictionary, Number, or String based on the underlying data type; or nil if the value is nil. @param index the index. This value must not exceed the bounds of the array. @return ...
java
@Override public Object getValue(int index) { synchronized (lock) { return getMValue(internalArray, index).asNative(internalArray); } }
[ "@", "Override", "public", "Object", "getValue", "(", "int", "index", ")", "{", "synchronized", "(", "lock", ")", "{", "return", "getMValue", "(", "internalArray", ",", "index", ")", ".", "asNative", "(", "internalArray", ")", ";", "}", "}" ]
Gets value at the given index as an object. The object types are Blob, Array, Dictionary, Number, or String based on the underlying data type; or nil if the value is nil. @param index the index. This value must not exceed the bounds of the array. @return the Object or null.
[ "Gets", "value", "at", "the", "given", "index", "as", "an", "object", ".", "The", "object", "types", "are", "Blob", "Array", "Dictionary", "Number", "or", "String", "based", "on", "the", "underlying", "data", "type", ";", "or", "nil", "if", "the", "value...
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Array.java#L116-L121
PawelAdamski/HttpClientMock
src/main/java/com/github/paweladamski/httpclientmock/HttpClientMockBuilder.java
HttpClientMockBuilder.doReturnXML
public HttpClientResponseBuilder doReturnXML(String response, Charset charset) { """ Adds action which returns provided XML in UTF-8 and status 200. Additionally it sets "Content-type" header to "application/xml". @param response JSON to return @return response builder """ return responseBuilder.do...
java
public HttpClientResponseBuilder doReturnXML(String response, Charset charset) { return responseBuilder.doReturnXML(response, charset); }
[ "public", "HttpClientResponseBuilder", "doReturnXML", "(", "String", "response", ",", "Charset", "charset", ")", "{", "return", "responseBuilder", ".", "doReturnXML", "(", "response", ",", "charset", ")", ";", "}" ]
Adds action which returns provided XML in UTF-8 and status 200. Additionally it sets "Content-type" header to "application/xml". @param response JSON to return @return response builder
[ "Adds", "action", "which", "returns", "provided", "XML", "in", "UTF", "-", "8", "and", "status", "200", ".", "Additionally", "it", "sets", "Content", "-", "type", "header", "to", "application", "/", "xml", "." ]
train
https://github.com/PawelAdamski/HttpClientMock/blob/0205498434bbc0c78c187a51181cac9b266a28fb/src/main/java/com/github/paweladamski/httpclientmock/HttpClientMockBuilder.java#L255-L257
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java
InstanceFailoverGroupsInner.getAsync
public Observable<InstanceFailoverGroupInner> getAsync(String resourceGroupName, String locationName, String failoverGroupName) { """ Gets a failover group. @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 po...
java
public Observable<InstanceFailoverGroupInner> getAsync(String resourceGroupName, String locationName, String failoverGroupName) { return getWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).map(new Func1<ServiceResponse<InstanceFailoverGroupInner>, InstanceFailoverGroupInner>() { ...
[ "public", "Observable", "<", "InstanceFailoverGroupInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "locationName", ",", "String", "failoverGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "locationNa...
Gets a failover group. @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 locationName The name of the region where the resource is located. @param failoverGroupName The name of the failover group. @thr...
[ "Gets", "a", "failover", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L149-L156
aws/aws-sdk-java
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/HyperParameterTrainingJobDefinition.java
HyperParameterTrainingJobDefinition.withStaticHyperParameters
public HyperParameterTrainingJobDefinition withStaticHyperParameters(java.util.Map<String, String> staticHyperParameters) { """ <p> Specifies the values of hyperparameters that do not change for the tuning job. </p> @param staticHyperParameters Specifies the values of hyperparameters that do not change for t...
java
public HyperParameterTrainingJobDefinition withStaticHyperParameters(java.util.Map<String, String> staticHyperParameters) { setStaticHyperParameters(staticHyperParameters); return this; }
[ "public", "HyperParameterTrainingJobDefinition", "withStaticHyperParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "staticHyperParameters", ")", "{", "setStaticHyperParameters", "(", "staticHyperParameters", ")", ";", "return", "this"...
<p> Specifies the values of hyperparameters that do not change for the tuning job. </p> @param staticHyperParameters Specifies the values of hyperparameters that do not change for the tuning job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Specifies", "the", "values", "of", "hyperparameters", "that", "do", "not", "change", "for", "the", "tuning", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/HyperParameterTrainingJobDefinition.java#L159-L162
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/internal/JavaURLContextFactory.java
JavaURLContextFactory.createJavaURLContext
JavaURLContext createJavaURLContext(Hashtable<?, ?> envmt, Name name) { """ This method should only be called by the JavaURLContextReplacer class for de-serializing an instance of JavaURLContext. The name parameter can be null. """ return new JavaURLContext(envmt, helperServices, name); }
java
JavaURLContext createJavaURLContext(Hashtable<?, ?> envmt, Name name) { return new JavaURLContext(envmt, helperServices, name); }
[ "JavaURLContext", "createJavaURLContext", "(", "Hashtable", "<", "?", ",", "?", ">", "envmt", ",", "Name", "name", ")", "{", "return", "new", "JavaURLContext", "(", "envmt", ",", "helperServices", ",", "name", ")", ";", "}" ]
This method should only be called by the JavaURLContextReplacer class for de-serializing an instance of JavaURLContext. The name parameter can be null.
[ "This", "method", "should", "only", "be", "called", "by", "the", "JavaURLContextReplacer", "class", "for", "de", "-", "serializing", "an", "instance", "of", "JavaURLContext", ".", "The", "name", "parameter", "can", "be", "null", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/internal/JavaURLContextFactory.java#L103-L105
jvirtanen/config-extras
src/main/java/org/jvirtanen/config/Configs.java
Configs.getPort
public static int getPort(Config config, String path) { """ Get a port number. @param config a configuration object @param path the path expression @return a port number @throws ConfigException.Missing if the value is absent or null @throws ConfigException.WrongType if the value is not convertible to an in...
java
public static int getPort(Config config, String path) { try { return new InetSocketAddress(config.getInt(path)).getPort(); } catch (IllegalArgumentException e) { throw badValue(e, config, path); } }
[ "public", "static", "int", "getPort", "(", "Config", "config", ",", "String", "path", ")", "{", "try", "{", "return", "new", "InetSocketAddress", "(", "config", ".", "getInt", "(", "path", ")", ")", ".", "getPort", "(", ")", ";", "}", "catch", "(", "...
Get a port number. @param config a configuration object @param path the path expression @return a port number @throws ConfigException.Missing if the value is absent or null @throws ConfigException.WrongType if the value is not convertible to an integer @throws ConfigException.BadValue if the value is outside the port ...
[ "Get", "a", "port", "number", "." ]
train
https://github.com/jvirtanen/config-extras/blob/eba3cff680c302fe07625dc8046f0bd4a56b9fc3/src/main/java/org/jvirtanen/config/Configs.java#L76-L82
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/local/connection/LocalConnection.java
LocalConnection.checkPermission
public final void checkPermission( String resource , String action ) throws JMSException { """ Check if the connection has the required credentials to use the given resource """ if (securityContext == null) return; // Security is disabled securityContext.checkPermission(resource, a...
java
public final void checkPermission( String resource , String action ) throws JMSException { if (securityContext == null) return; // Security is disabled securityContext.checkPermission(resource, action); }
[ "public", "final", "void", "checkPermission", "(", "String", "resource", ",", "String", "action", ")", "throws", "JMSException", "{", "if", "(", "securityContext", "==", "null", ")", "return", ";", "// Security is disabled", "securityContext", ".", "checkPermission"...
Check if the connection has the required credentials to use the given resource
[ "Check", "if", "the", "connection", "has", "the", "required", "credentials", "to", "use", "the", "given", "resource" ]
train
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/local/connection/LocalConnection.java#L203-L209
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getPathEle
public static Path getPathEle(Path path, int index) { """ 获取指定位置的子路径部分,支持负数,例如index为-1表示从后数第一个节点位置 @param path 路径 @param index 路径节点位置,支持负数(负数从后向前计数) @return 获取的子路径 @since 3.1.2 """ return subPath(path, index, index == -1 ? path.getNameCount() : index + 1); }
java
public static Path getPathEle(Path path, int index) { return subPath(path, index, index == -1 ? path.getNameCount() : index + 1); }
[ "public", "static", "Path", "getPathEle", "(", "Path", "path", ",", "int", "index", ")", "{", "return", "subPath", "(", "path", ",", "index", ",", "index", "==", "-", "1", "?", "path", ".", "getNameCount", "(", ")", ":", "index", "+", "1", ")", ";"...
获取指定位置的子路径部分,支持负数,例如index为-1表示从后数第一个节点位置 @param path 路径 @param index 路径节点位置,支持负数(负数从后向前计数) @return 获取的子路径 @since 3.1.2
[ "获取指定位置的子路径部分,支持负数,例如index为", "-", "1表示从后数第一个节点位置" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1642-L1644
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addConstraintsModCheckMessage
public FessMessages addConstraintsModCheckMessage(String property, String modType, String value) { """ Add the created action message for the key 'constraints.ModCheck.message' with parameters. <pre> message: The check digit for ${value} is invalid, ${modType} checksum failed. </pre> @param property The proper...
java
public FessMessages addConstraintsModCheckMessage(String property, String modType, String value) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_ModCheck_MESSAGE, modType, value)); return this; }
[ "public", "FessMessages", "addConstraintsModCheckMessage", "(", "String", "property", ",", "String", "modType", ",", "String", "value", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "CONSTRAIN...
Add the created action message for the key 'constraints.ModCheck.message' with parameters. <pre> message: The check digit for ${value} is invalid, ${modType} checksum failed. </pre> @param property The property name for the message. (NotNull) @param modType The parameter modType for message. (NotNull) @param value The ...
[ "Add", "the", "created", "action", "message", "for", "the", "key", "constraints", ".", "ModCheck", ".", "message", "with", "parameters", ".", "<pre", ">", "message", ":", "The", "check", "digit", "for", "$", "{", "value", "}", "is", "invalid", "$", "{", ...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L905-L909
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT
public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT(String billingAccount, String serviceName, Long agentId, OvhOvhPabxHuntingAgent body) throws IOException { """ Alter this object properties REST: PUT /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId} @param...
java
public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT(String billingAccount, String serviceName, Long agentId, OvhOvhPabxHuntingAgent body) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}"; StringBuilder sb = path(qPath, billi...
[ "public", "void", "billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "agentId", ",", "OvhOvhPabxHuntingAgent", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "...
Alter this object properties REST: PUT /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param agentId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2374-L2378
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.unlinkFK
public void unlinkFK(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds) { """ Unkink FK fields of target object. @param targetObject real (non-proxy) target object @param cld {@link ClassDescriptor} of the real target object @param rds An {@link ObjectReferenceDescriptor} or {@link Colle...
java
public void unlinkFK(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds) { setFKField(targetObject, cld, rds, null); }
[ "public", "void", "unlinkFK", "(", "Object", "targetObject", ",", "ClassDescriptor", "cld", ",", "ObjectReferenceDescriptor", "rds", ")", "{", "setFKField", "(", "targetObject", ",", "cld", ",", "rds", ",", "null", ")", ";", "}" ]
Unkink FK fields of target object. @param targetObject real (non-proxy) target object @param cld {@link ClassDescriptor} of the real target object @param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor} associated with the real object.
[ "Unkink", "FK", "fields", "of", "target", "object", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L1241-L1244
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.forEachValue
public static <K, V> void forEachValue(Map<K, V> map, Procedure<? super V> procedure) { """ For each value of the map, {@code procedure} is evaluated with the value as the parameter. """ if (map == null) { throw new IllegalArgumentException("Cannot perform a forEachValue on null"); ...
java
public static <K, V> void forEachValue(Map<K, V> map, Procedure<? super V> procedure) { if (map == null) { throw new IllegalArgumentException("Cannot perform a forEachValue on null"); } if (MapIterate.notEmpty(map)) { if (map instanceof UnsortedMapIte...
[ "public", "static", "<", "K", ",", "V", ">", "void", "forEachValue", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "Procedure", "<", "?", "super", "V", ">", "procedure", ")", "{", "if", "(", "map", "==", "null", ")", "{", "throw", "new", "Il...
For each value of the map, {@code procedure} is evaluated with the value as the parameter.
[ "For", "each", "value", "of", "the", "map", "{" ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L770-L788
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/UnitCellBoundingBox.java
UnitCellBoundingBox.getTranslatedBbs
public UnitCellBoundingBox getTranslatedBbs(Vector3d translation) { """ Returns a new BoundingBoxes object containing the same bounds as this BoundingBoxes object translated by the given translation @param translation @return """ UnitCellBoundingBox translatedBbs = new UnitCellBoundingBox(numOperatorsSg, ...
java
public UnitCellBoundingBox getTranslatedBbs(Vector3d translation) { UnitCellBoundingBox translatedBbs = new UnitCellBoundingBox(numOperatorsSg, numPolyChainsAu); for (int i=0; i<numOperatorsSg; i++) { for (int j = 0;j<numPolyChainsAu; j++) { translatedBbs.chainBbs[i][j] = new BoundingBox(this.chainBbs[i][j]...
[ "public", "UnitCellBoundingBox", "getTranslatedBbs", "(", "Vector3d", "translation", ")", "{", "UnitCellBoundingBox", "translatedBbs", "=", "new", "UnitCellBoundingBox", "(", "numOperatorsSg", ",", "numPolyChainsAu", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Returns a new BoundingBoxes object containing the same bounds as this BoundingBoxes object translated by the given translation @param translation @return
[ "Returns", "a", "new", "BoundingBoxes", "object", "containing", "the", "same", "bounds", "as", "this", "BoundingBoxes", "object", "translated", "by", "the", "given", "translation" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/UnitCellBoundingBox.java#L114-L126
jboss/jboss-common-beans
src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java
ArrayTokenizer.tokenize
public final String[] tokenize(String value) { """ Implementation of this method breaks down passed string into tokens. @param value @return """ StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; ...
java
public final String[] tokenize(String value) { StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; for(int index = 0; index< broken.length;index++){ broken[index] = stringTokenizer.nextToken(); ...
[ "public", "final", "String", "[", "]", "tokenize", "(", "String", "value", ")", "{", "StringTokenizer", "stringTokenizer", "=", "new", "StringTokenizer", "(", "value", ",", "getDelimiters", "(", ")", ")", ";", "String", "[", "]", "broken", "=", "new", "Str...
Implementation of this method breaks down passed string into tokens. @param value @return
[ "Implementation", "of", "this", "method", "breaks", "down", "passed", "string", "into", "tokens", "." ]
train
https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java#L42-L49
Talend/tesb-rt-se
policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java
CorrelationIdSoapCodec.writeCorrelationId
public static void writeCorrelationId(Message message, String correlationId) { """ Write correlation id to message. @param message the message @param correlationId the correlation id """ if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMe...
java
public static void writeCorrelationId(Message message, String correlationId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage) message; Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId...
[ "public", "static", "void", "writeCorrelationId", "(", "Message", "message", ",", "String", "correlationId", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", ";", "}", "SoapMessage", "soapMessage", "=", "(", "So...
Write correlation id to message. @param message the message @param correlationId the correlation id
[ "Write", "correlation", "id", "to", "message", "." ]
train
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java#L83-L114
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java
SystemInputJson.asSystemInputDef
public static SystemInputDef asSystemInputDef( JsonObject json) { """ Returns the SystemInputDef represented by the given JSON object. """ String systemName = json.getString( SYSTEM_KEY); try { SystemInputDef systemInputDef = new SystemInputDef( validIdentifier( systemName)); /...
java
public static SystemInputDef asSystemInputDef( JsonObject json) { String systemName = json.getString( SYSTEM_KEY); try { SystemInputDef systemInputDef = new SystemInputDef( validIdentifier( systemName)); // Get system annotations Optional.ofNullable( json.getJsonObject( HAS_KE...
[ "public", "static", "SystemInputDef", "asSystemInputDef", "(", "JsonObject", "json", ")", "{", "String", "systemName", "=", "json", ".", "getString", "(", "SYSTEM_KEY", ")", ";", "try", "{", "SystemInputDef", "systemInputDef", "=", "new", "SystemInputDef", "(", ...
Returns the SystemInputDef represented by the given JSON object.
[ "Returns", "the", "SystemInputDef", "represented", "by", "the", "given", "JSON", "object", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java#L176-L198
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java
UpdateAssertionForProxyIdpAction.setAuthenticatingAuthority
protected void setAuthenticatingAuthority(Assertion assertion, Assertion proxiedAssertion) { """ Assigns the AuthenticatingAuthority element holding the issuer of the proxied assertion. @param assertion the assertion to update @param proxiedAssertion the proxied assertion """ if (proxiedAssertion.get...
java
protected void setAuthenticatingAuthority(Assertion assertion, Assertion proxiedAssertion) { if (proxiedAssertion.getIssuer() == null || proxiedAssertion.getIssuer().getValue() == null) { log.warn("No issuer element found in proxied assertion"); return; } if (assertion.getAuthnStatements().isEmp...
[ "protected", "void", "setAuthenticatingAuthority", "(", "Assertion", "assertion", ",", "Assertion", "proxiedAssertion", ")", "{", "if", "(", "proxiedAssertion", ".", "getIssuer", "(", ")", "==", "null", "||", "proxiedAssertion", ".", "getIssuer", "(", ")", ".", ...
Assigns the AuthenticatingAuthority element holding the issuer of the proxied assertion. @param assertion the assertion to update @param proxiedAssertion the proxied assertion
[ "Assigns", "the", "AuthenticatingAuthority", "element", "holding", "the", "issuer", "of", "the", "proxied", "assertion", "." ]
train
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java#L100-L124
buschmais/jqa-core-framework
scanner/src/main/java/com/buschmais/jqassistant/core/scanner/impl/ScannerImpl.java
ScannerImpl.satisfies
private <I, D extends Descriptor> boolean satisfies(ScannerPlugin<I, D> selectedPlugin, D descriptor) { """ Verifies if the selected plugin requires a descriptor. @param selectedPlugin The selected plugin. @param descriptor The descriptor. @param <I> The item type of the plugin. @param <D> The descriptor...
java
private <I, D extends Descriptor> boolean satisfies(ScannerPlugin<I, D> selectedPlugin, D descriptor) { return !(selectedPlugin.getClass().isAnnotationPresent(Requires.class) && descriptor == null); }
[ "private", "<", "I", ",", "D", "extends", "Descriptor", ">", "boolean", "satisfies", "(", "ScannerPlugin", "<", "I", ",", "D", ">", "selectedPlugin", ",", "D", "descriptor", ")", "{", "return", "!", "(", "selectedPlugin", ".", "getClass", "(", ")", ".", ...
Verifies if the selected plugin requires a descriptor. @param selectedPlugin The selected plugin. @param descriptor The descriptor. @param <I> The item type of the plugin. @param <D> The descriptor type of the plugin. @return <code>true</code> if the selected plugin can be used.
[ "Verifies", "if", "the", "selected", "plugin", "requires", "a", "descriptor", "." ]
train
https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/impl/ScannerImpl.java#L147-L149
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/QueueUtil.java
QueueUtil.drainQueue
public static <E> int drainQueue(Queue<E> queue, Predicate<E> drainedCountFilter) { """ Drains the provided queue by the size of the queue as it is known upfront draining. <p> The rational for using this method is the same as for using {@link Queue#clear()}: to remove all the elements from the queue. There ar...
java
public static <E> int drainQueue(Queue<E> queue, Predicate<E> drainedCountFilter) { return drainQueue(queue, queue.size(), drainedCountFilter); }
[ "public", "static", "<", "E", ">", "int", "drainQueue", "(", "Queue", "<", "E", ">", "queue", ",", "Predicate", "<", "E", ">", "drainedCountFilter", ")", "{", "return", "drainQueue", "(", "queue", ",", "queue", ".", "size", "(", ")", ",", "drainedCount...
Drains the provided queue by the size of the queue as it is known upfront draining. <p> The rational for using this method is the same as for using {@link Queue#clear()}: to remove all the elements from the queue. There are two major differences to highlight: <ol> <li>This method doesn't guarantee that the queue is emp...
[ "Drains", "the", "provided", "queue", "by", "the", "size", "of", "the", "queue", "as", "it", "is", "known", "upfront", "draining", ".", "<p", ">", "The", "rational", "for", "using", "this", "method", "is", "the", "same", "as", "for", "using", "{", "@li...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/QueueUtil.java#L90-L92
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java
UserResourcesImpl.addUser
public User addUser(User user, boolean sendEmail) throws SmartsheetException { """ Add a user to the organization, without sending email. It mirrors to the following Smartsheet REST API method: POST /users Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there...
java
public User addUser(User user, boolean sendEmail) throws SmartsheetException { return this.createResource("users?sendEmail=" + sendEmail, User.class, user); }
[ "public", "User", "addUser", "(", "User", "user", ",", "boolean", "sendEmail", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"users?sendEmail=\"", "+", "sendEmail", ",", "User", ".", "class", ",", "user", ")", ";", ...
Add a user to the organization, without sending email. It mirrors to the following Smartsheet REST API method: POST /users Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem w...
[ "Add", "a", "user", "to", "the", "organization", "without", "sending", "email", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java#L145-L147
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractEventBuilder.java
AbstractEventBuilder.camundaInputParameter
public B camundaInputParameter(String name, String value) { """ Creates a new camunda input parameter extension element with the given name and value. @param name the name of the input parameter @param value the value of the input parameter @return the builder object """ CamundaInputOutput camundaInp...
java
public B camundaInputParameter(String name, String value) { CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement(CamundaInputOutput.class); CamundaInputParameter camundaInputParameter = createChild(camundaInputOutput, CamundaInputParameter.class); camundaInputParameter.setCamundaName(nam...
[ "public", "B", "camundaInputParameter", "(", "String", "name", ",", "String", "value", ")", "{", "CamundaInputOutput", "camundaInputOutput", "=", "getCreateSingleExtensionElement", "(", "CamundaInputOutput", ".", "class", ")", ";", "CamundaInputParameter", "camundaInputPa...
Creates a new camunda input parameter extension element with the given name and value. @param name the name of the input parameter @param value the value of the input parameter @return the builder object
[ "Creates", "a", "new", "camunda", "input", "parameter", "extension", "element", "with", "the", "given", "name", "and", "value", "." ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractEventBuilder.java#L42-L50
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineInternalFrames
private void defineInternalFrames(UIDefaults d) { """ Set the icons to paint the title pane decorations. @param d the UI defaults map. """ // Copied from nimbus //Initialize InternalFrameTitlePane d.put("InternalFrameTitlePane.contentMargins", new InsetsUIResource(0...
java
private void defineInternalFrames(UIDefaults d) { // Copied from nimbus //Initialize InternalFrameTitlePane d.put("InternalFrameTitlePane.contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("InternalFrameTitlePane.maxFrameIconSize", new DimensionUIResource(18, 18)...
[ "private", "void", "defineInternalFrames", "(", "UIDefaults", "d", ")", "{", "// Copied from nimbus", "//Initialize InternalFrameTitlePane", "d", ".", "put", "(", "\"InternalFrameTitlePane.contentMargins\"", ",", "new", "InsetsUIResource", "(", "0", ",", "0", ",", "0", ...
Set the icons to paint the title pane decorations. @param d the UI defaults map.
[ "Set", "the", "icons", "to", "paint", "the", "title", "pane", "decorations", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1163-L1227
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java
Locale.composeList
private static String[] composeList(MessageFormat format, String[] list) { """ Given a list of strings, return a list shortened to three elements. Shorten it by applying the given format to the first two elements recursively. @param format a format which takes two arguments @param list a list of strings @retu...
java
private static String[] composeList(MessageFormat format, String[] list) { if (list.length <= 3) return list; // Use the given format to compose the first two elements into one String[] listItems = { list[0], list[1] }; String newItem = format.format(listItems); // Form a new l...
[ "private", "static", "String", "[", "]", "composeList", "(", "MessageFormat", "format", ",", "String", "[", "]", "list", ")", "{", "if", "(", "list", ".", "length", "<=", "3", ")", "return", "list", ";", "// Use the given format to compose the first two elements...
Given a list of strings, return a list shortened to three elements. Shorten it by applying the given format to the first two elements recursively. @param format a format which takes two arguments @param list a list of strings @return if the list is three elements or shorter, the same list; otherwise, a new list of thre...
[ "Given", "a", "list", "of", "strings", "return", "a", "list", "shortened", "to", "three", "elements", ".", "Shorten", "it", "by", "applying", "the", "given", "format", "to", "the", "first", "two", "elements", "recursively", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L2082-L2096
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java
ExtensionHttpSessions.getHttpSessionTokensSetForContext
public HttpSessionTokensSet getHttpSessionTokensSetForContext(Context context) { """ Gets the http session tokens set for the first site matching a given Context. @param context the context @return the http session tokens set for context """ //TODO: Proper implementation. Hack for now for (Entry<String...
java
public HttpSessionTokensSet getHttpSessionTokensSetForContext(Context context){ //TODO: Proper implementation. Hack for now for (Entry<String, HttpSessionTokensSet> e : this.sessionTokens.entrySet()) { String siteName = e.getKey(); siteName = "http://" + siteName; if (context.isInContext(siteName)) ret...
[ "public", "HttpSessionTokensSet", "getHttpSessionTokensSetForContext", "(", "Context", "context", ")", "{", "//TODO: Proper implementation. Hack for now", "for", "(", "Entry", "<", "String", ",", "HttpSessionTokensSet", ">", "e", ":", "this", ".", "sessionTokens", ".", ...
Gets the http session tokens set for the first site matching a given Context. @param context the context @return the http session tokens set for context
[ "Gets", "the", "http", "session", "tokens", "set", "for", "the", "first", "site", "matching", "a", "given", "Context", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java#L587-L596
lambdazen/bitsy
src/main/java/com/lambdazen/bitsy/store/Record.java
Record.generateEdgeLine
public static void generateEdgeLine(StringWriter sw, ObjectMapper mapper, EdgeBean eBean) throws JsonGenerationException, JsonMappingException, IOException { """ Efficient method to write an edge -- avoids writeValueAsString """ sw.getBuffer().setLength(0); sw.append('E'); // Record ty...
java
public static void generateEdgeLine(StringWriter sw, ObjectMapper mapper, EdgeBean eBean) throws JsonGenerationException, JsonMappingException, IOException { sw.getBuffer().setLength(0); sw.append('E'); // Record type sw.append('='); mapper.writeValue(sw, eBean); ...
[ "public", "static", "void", "generateEdgeLine", "(", "StringWriter", "sw", ",", "ObjectMapper", "mapper", ",", "EdgeBean", "eBean", ")", "throws", "JsonGenerationException", ",", "JsonMappingException", ",", "IOException", "{", "sw", ".", "getBuffer", "(", ")", "....
Efficient method to write an edge -- avoids writeValueAsString
[ "Efficient", "method", "to", "write", "an", "edge", "--", "avoids", "writeValueAsString" ]
train
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/store/Record.java#L87-L100
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/StringUtils.java
StringUtils.toCharCount
public static String toCharCount(final String aString, final int aCount) { """ Formats a string with or without line breaks into a string with lines with less than a supplied number of characters per line. @param aString A string to format @param aCount A number of characters to allow per line @return A stri...
java
public static String toCharCount(final String aString, final int aCount) { final StringBuilder builder = new StringBuilder(); final String[] words = aString.split("\\s"); int count = 0; for (final String word : words) { count += word.length(); if (count < aCount...
[ "public", "static", "String", "toCharCount", "(", "final", "String", "aString", ",", "final", "int", "aCount", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "final", "String", "[", "]", "words", "=", "aString", ...
Formats a string with or without line breaks into a string with lines with less than a supplied number of characters per line. @param aString A string to format @param aCount A number of characters to allow per line @return A string formatted using the supplied count
[ "Formats", "a", "string", "with", "or", "without", "line", "breaks", "into", "a", "string", "with", "lines", "with", "less", "than", "a", "supplied", "number", "of", "characters", "per", "line", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/StringUtils.java#L207-L231
pushbit/sprockets
src/main/java/net/sf/sprockets/sql/SQLite.java
SQLite.groupConcat
public static String groupConcat(String column, String separator, String alias) { """ Get an aliased group_concat(column) with the separator. @since 2.6.0 """ return "group_concat(" + column + ", '" + separator + "') AS " + alias; }
java
public static String groupConcat(String column, String separator, String alias) { return "group_concat(" + column + ", '" + separator + "') AS " + alias; }
[ "public", "static", "String", "groupConcat", "(", "String", "column", ",", "String", "separator", ",", "String", "alias", ")", "{", "return", "\"group_concat(\"", "+", "column", "+", "\", '\"", "+", "separator", "+", "\"') AS \"", "+", "alias", ";", "}" ]
Get an aliased group_concat(column) with the separator. @since 2.6.0
[ "Get", "an", "aliased", "group_concat", "(", "column", ")", "with", "the", "separator", "." ]
train
https://github.com/pushbit/sprockets/blob/5d967317cbb2374c69d33271d3c7b7311e1ea4ac/src/main/java/net/sf/sprockets/sql/SQLite.java#L221-L223
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.startRecording
public void startRecording(String connId) throws WorkspaceApiException { """ Start recording the specified call. Recording stops when the call is completed or you send `stopRecording()` on either the call or the DN. @param connId The connection ID of the call. """ try { ApiSuccessRespon...
java
public void startRecording(String connId) throws WorkspaceApiException { try { ApiSuccessResponse response = this.voiceApi.startRecording(connId, null); throwIfNotOk("startRecording", response); } catch (ApiException e) { throw new WorkspaceApiException("startRec...
[ "public", "void", "startRecording", "(", "String", "connId", ")", "throws", "WorkspaceApiException", "{", "try", "{", "ApiSuccessResponse", "response", "=", "this", ".", "voiceApi", ".", "startRecording", "(", "connId", ",", "null", ")", ";", "throwIfNotOk", "("...
Start recording the specified call. Recording stops when the call is completed or you send `stopRecording()` on either the call or the DN. @param connId The connection ID of the call.
[ "Start", "recording", "the", "specified", "call", ".", "Recording", "stops", "when", "the", "call", "is", "completed", "or", "you", "send", "stopRecording", "()", "on", "either", "the", "call", "or", "the", "DN", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L1353-L1360
rythmengine/spring-rythm
src/main/java/org/rythmengine/spring/web/util/ControllerUtil.java
ControllerUtil.renderBinary
protected static void renderBinary(InputStream is, String name, long length) { """ Return a 200 OK application/binary response with content-disposition attachment. @param is The stream to copy. Content is streamed. @param name Name of file user is downloading. @param length Stream's size in bytes. """ ...
java
protected static void renderBinary(InputStream is, String name, long length) { throw new BinaryResult(is, name, length, false); }
[ "protected", "static", "void", "renderBinary", "(", "InputStream", "is", ",", "String", "name", ",", "long", "length", ")", "{", "throw", "new", "BinaryResult", "(", "is", ",", "name", ",", "length", ",", "false", ")", ";", "}" ]
Return a 200 OK application/binary response with content-disposition attachment. @param is The stream to copy. Content is streamed. @param name Name of file user is downloading. @param length Stream's size in bytes.
[ "Return", "a", "200", "OK", "application", "/", "binary", "response", "with", "content", "-", "disposition", "attachment", "." ]
train
https://github.com/rythmengine/spring-rythm/blob/a654016371c72dabaea50ac9a57626da7614d236/src/main/java/org/rythmengine/spring/web/util/ControllerUtil.java#L126-L128
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java
WSRdbManagedConnectionImpl.setTransactionIsolation
public final void setTransactionIsolation(int isoLevel) throws SQLException { """ Set the transactionIsolation level to the requested Isolation Level. If the requested and current are the same, then do not drive it to the database If they are different, drive it all the way to the database. """ if (c...
java
public final void setTransactionIsolation(int isoLevel) throws SQLException { if (currentTransactionIsolation != isoLevel) { // Reject switching to an isolation level of TRANSACTION_NONE if (isoLevel == Connection.TRANSACTION_NONE) { throw new SQLExce...
[ "public", "final", "void", "setTransactionIsolation", "(", "int", "isoLevel", ")", "throws", "SQLException", "{", "if", "(", "currentTransactionIsolation", "!=", "isoLevel", ")", "{", "// Reject switching to an isolation level of TRANSACTION_NONE", "if", "(", "isoLevel", ...
Set the transactionIsolation level to the requested Isolation Level. If the requested and current are the same, then do not drive it to the database If they are different, drive it all the way to the database.
[ "Set", "the", "transactionIsolation", "level", "to", "the", "requested", "Isolation", "Level", ".", "If", "the", "requested", "and", "current", "are", "the", "same", "then", "do", "not", "drive", "it", "to", "the", "database", "If", "they", "are", "different...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java#L3975-L3995
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/optimization/GoldenSectionLineSearch.java
GoldenSectionLineSearch.goldenMean
private double goldenMean(double a, double b) { """ The point that is the GOLDEN_SECTION along the way from a to b. a may be less or greater than b, you find the point 60-odd percent of the way from a to b. @param a Interval minimum @param b Interval maximum @return The GOLDEN_SECTION along the way from a t...
java
private double goldenMean(double a, double b) { if (geometric) { return a * Math.pow(b / a, GOLDEN_SECTION); } else { return a + (b - a) * GOLDEN_SECTION; } }
[ "private", "double", "goldenMean", "(", "double", "a", ",", "double", "b", ")", "{", "if", "(", "geometric", ")", "{", "return", "a", "*", "Math", ".", "pow", "(", "b", "/", "a", ",", "GOLDEN_SECTION", ")", ";", "}", "else", "{", "return", "a", "...
The point that is the GOLDEN_SECTION along the way from a to b. a may be less or greater than b, you find the point 60-odd percent of the way from a to b. @param a Interval minimum @param b Interval maximum @return The GOLDEN_SECTION along the way from a to b.
[ "The", "point", "that", "is", "the", "GOLDEN_SECTION", "along", "the", "way", "from", "a", "to", "b", ".", "a", "may", "be", "less", "or", "greater", "than", "b", "you", "find", "the", "point", "60", "-", "odd", "percent", "of", "the", "way", "from",...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/optimization/GoldenSectionLineSearch.java#L188-L194
oasp/oasp4j
modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/AbstractAccessControlBasedAuthenticationProvider.java
AbstractAccessControlBasedAuthenticationProvider.additionalAuthenticationChecks
@Override protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException { """ Here the actual authentication has to be implemented.<br/> <br/> """ // default implementation authentications via servlet API ...
java
@Override protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException { // default implementation authentications via servlet API (container managed) ServletRequestAttributes currentRequestAttributes = ...
[ "@", "Override", "protected", "void", "additionalAuthenticationChecks", "(", "UserDetails", "userDetails", ",", "UsernamePasswordAuthenticationToken", "authentication", ")", "throws", "AuthenticationException", "{", "// default implementation authentications via servlet API (container ...
Here the actual authentication has to be implemented.<br/> <br/>
[ "Here", "the", "actual", "authentication", "has", "to", "be", "implemented", ".", "<br", "/", ">", "<br", "/", ">" ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/AbstractAccessControlBasedAuthenticationProvider.java#L86-L108
morimekta/providence
providence-config/src/main/java/net/morimekta/providence/config/impl/ProvidenceConfigParser.java
ProvidenceConfigParser.parseConfig
@Nonnull <M extends PMessage<M, F>, F extends PField> Pair<M, Set<String>> parseConfig(@Nonnull Path configFile, @Nullable M parent) throws ProvidenceConfigException { """ Parse a providence config into a message. @param configFile The config file to be parsed. @param parent The parent config m...
java
@Nonnull <M extends PMessage<M, F>, F extends PField> Pair<M, Set<String>> parseConfig(@Nonnull Path configFile, @Nullable M parent) throws ProvidenceConfigException { try { configFile = canonicalFileLocation(configFile); } catch (IOException e) { throw new Provid...
[ "@", "Nonnull", "<", "M", "extends", "PMessage", "<", "M", ",", "F", ">", ",", "F", "extends", "PField", ">", "Pair", "<", "M", ",", "Set", "<", "String", ">", ">", "parseConfig", "(", "@", "Nonnull", "Path", "configFile", ",", "@", "Nullable", "M"...
Parse a providence config into a message. @param configFile The config file to be parsed. @param parent The parent config message. @param <M> The config message type. @param <F> The config field type. @return Pair of parsed config and set of included file paths. @throws ProvidenceConfigException If parsing failed.
[ "Parse", "a", "providence", "config", "into", "a", "message", "." ]
train
https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-config/src/main/java/net/morimekta/providence/config/impl/ProvidenceConfigParser.java#L106-L123
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpResponse.java
HttpResponse.writeBody
public long writeBody(File destFile, StreamProgress streamProgress) { """ 将响应内容写出到文件<br> 异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br> 写出后会关闭Http流(异步模式) @param destFile 写出到的文件 @param streamProgress 进度显示接口,通过实现此接口显示下载进度 @return 写出bytes数 @since 3.3.2 """ if (null == destFile) { throw new NullPointerExc...
java
public long writeBody(File destFile, StreamProgress streamProgress) { if (null == destFile) { throw new NullPointerException("[destFile] is null!"); } if (destFile.isDirectory()) { // 从头信息中获取文件名 String fileName = getFileNameFromDisposition(); if (StrUtil.isBlank(fileName)) { final String p...
[ "public", "long", "writeBody", "(", "File", "destFile", ",", "StreamProgress", "streamProgress", ")", "{", "if", "(", "null", "==", "destFile", ")", "{", "throw", "new", "NullPointerException", "(", "\"[destFile] is null!\"", ")", ";", "}", "if", "(", "destFil...
将响应内容写出到文件<br> 异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br> 写出后会关闭Http流(异步模式) @param destFile 写出到的文件 @param streamProgress 进度显示接口,通过实现此接口显示下载进度 @return 写出bytes数 @since 3.3.2
[ "将响应内容写出到文件<br", ">", "异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br", ">", "写出后会关闭Http流(异步模式)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java#L259-L279
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUserSegmentRelPersistenceImpl.java
CommerceDiscountUserSegmentRelPersistenceImpl.findAll
@Override public List<CommerceDiscountUserSegmentRel> findAll(int start, int end) { """ Returns a range of all the commerce discount user segment rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, the...
java
@Override public List<CommerceDiscountUserSegmentRel> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscountUserSegmentRel", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce discount user segment rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Sett...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "discount", "user", "segment", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUserSegmentRelPersistenceImpl.java#L1745-L1748
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.getByResourceGroup
public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { """ Get a certificate order. Get a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order....
java
public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); }
[ "public", "AppServiceCertificateOrderInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "certificateOrderName", ")", ".", "toBl...
Get a certificate order. Get a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order.. @throws IllegalArgumentException thrown if parameters fail the validation @throws DefaultErrorResponseException thrown if the ...
[ "Get", "a", "certificate", "order", ".", "Get", "a", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L503-L505
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java
PlatformBitmapFactory.createBitmap
private CloseableReference<Bitmap> createBitmap( int width, int height, Bitmap.Config config, boolean hasAlpha, @Nullable Object callerContext) { """ Creates a bitmap with the specified width and height. @param width The width of the bitmap @param height The height of the bit...
java
private CloseableReference<Bitmap> createBitmap( int width, int height, Bitmap.Config config, boolean hasAlpha, @Nullable Object callerContext) { return createBitmap(null, width, height, config, hasAlpha, callerContext); }
[ "private", "CloseableReference", "<", "Bitmap", ">", "createBitmap", "(", "int", "width", ",", "int", "height", ",", "Bitmap", ".", "Config", "config", ",", "boolean", "hasAlpha", ",", "@", "Nullable", "Object", "callerContext", ")", "{", "return", "createBitm...
Creates a bitmap with the specified width and height. @param width The width of the bitmap @param height The height of the bitmap @param config The bitmap config to create. @param hasAlpha If the bitmap is ARGB_8888 this flag can be used to mark the bitmap as opaque. Doing so will clear the bitmap in black inst...
[ "Creates", "a", "bitmap", "with", "the", "specified", "width", "and", "height", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L442-L449
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java
ST_SimplifyPreserveTopology.simplyPreserve
public static Geometry simplyPreserve(Geometry geometry, double distance) { """ Simplifies a geometry and ensures that the result is a valid geometry having the same dimension and number of components as the input, and with the components having the same topological relationship. @param geometry @param dista...
java
public static Geometry simplyPreserve(Geometry geometry, double distance) { if(geometry == null){ return null; } return TopologyPreservingSimplifier.simplify(geometry, distance); }
[ "public", "static", "Geometry", "simplyPreserve", "(", "Geometry", "geometry", ",", "double", "distance", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "TopologyPreservingSimplifier", ".", "simplify", "(", "geom...
Simplifies a geometry and ensures that the result is a valid geometry having the same dimension and number of components as the input, and with the components having the same topological relationship. @param geometry @param distance @return
[ "Simplifies", "a", "geometry", "and", "ensures", "that", "the", "result", "is", "a", "valid", "geometry", "having", "the", "same", "dimension", "and", "number", "of", "components", "as", "the", "input", "and", "with", "the", "components", "having", "the", "s...
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java#L51-L56
ltsopensource/light-task-scheduler
lts-core/src/main/java/com/github/ltsopensource/core/commons/utils/GenericsUtils.java
GenericsUtils.getFieldGenericType
public static Class getFieldGenericType(Field field, int index) { """ 通过反射,获得Field泛型参数的实际类型. 如: public Map<String, Buyer> names; @param field 字段 @param index 泛型参数所在索引,从0开始. @return 泛型参数的实际类型, 如果没有实现ParameterizedType接口,即不支持泛型,所以直接返回<code>Object.class</code> """ Type genericFieldType = field.getGener...
java
public static Class getFieldGenericType(Field field, int index) { Type genericFieldType = field.getGenericType(); if(genericFieldType instanceof ParameterizedType){ ParameterizedType aType = (ParameterizedType) genericFieldType; Type[] fieldArgTypes = aType.getActualTypeArguments(); ...
[ "public", "static", "Class", "getFieldGenericType", "(", "Field", "field", ",", "int", "index", ")", "{", "Type", "genericFieldType", "=", "field", ".", "getGenericType", "(", ")", ";", "if", "(", "genericFieldType", "instanceof", "ParameterizedType", ")", "{", ...
通过反射,获得Field泛型参数的实际类型. 如: public Map<String, Buyer> names; @param field 字段 @param index 泛型参数所在索引,从0开始. @return 泛型参数的实际类型, 如果没有实现ParameterizedType接口,即不支持泛型,所以直接返回<code>Object.class</code>
[ "通过反射", "获得Field泛型参数的实际类型", ".", "如", ":", "public", "Map<String", "Buyer", ">", "names", ";" ]
train
https://github.com/ltsopensource/light-task-scheduler/blob/64d3aa000ff5022be5e94f511b58f405e5f4c8eb/lts-core/src/main/java/com/github/ltsopensource/core/commons/utils/GenericsUtils.java#L118-L130
SQLDroid/SQLDroid
src/main/java/org/sqldroid/SQLDroidPreparedStatement.java
SQLDroidPreparedStatement.setBinaryStream
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException { """ Set the parameter from the contents of a binary stream. @param parameterIndex the index of the parameter to set @param inputStream the input stream from which a byte array will be read and ...
java
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException { if (length <= 0) { throw new SQLException ("Invalid length " + length); } if (inputStream == null ) { throw new SQLException ("Input Stream cannot be null"); } final in...
[ "@", "Override", "public", "void", "setBinaryStream", "(", "int", "parameterIndex", ",", "InputStream", "inputStream", ",", "int", "length", ")", "throws", "SQLException", "{", "if", "(", "length", "<=", "0", ")", "{", "throw", "new", "SQLException", "(", "\...
Set the parameter from the contents of a binary stream. @param parameterIndex the index of the parameter to set @param inputStream the input stream from which a byte array will be read and set as the value. If inputStream is null this method will throw a SQLException @param length a positive non-zero length values @ex...
[ "Set", "the", "parameter", "from", "the", "contents", "of", "a", "binary", "stream", "." ]
train
https://github.com/SQLDroid/SQLDroid/blob/4fb38ee40338673cb0205044571e4379573762c4/src/main/java/org/sqldroid/SQLDroidPreparedStatement.java#L514-L544
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/Histogram.java
Histogram.setStrategy
public void setStrategy( double median, double standardDeviation, int sigma ) { """ Set the histogram to use the standard deviation to determine the bucket sizes. @param median @param standardDeviation @param sigma """ this.bucketingStrateg...
java
public void setStrategy( double median, double standardDeviation, int sigma ) { this.bucketingStrategy = new StandardDeviationBucketingStrategy(median, standardDeviation, sigma); this.bucketWidth = null; }
[ "public", "void", "setStrategy", "(", "double", "median", ",", "double", "standardDeviation", ",", "int", "sigma", ")", "{", "this", ".", "bucketingStrategy", "=", "new", "StandardDeviationBucketingStrategy", "(", "median", ",", "standardDeviation", ",", "sigma", ...
Set the histogram to use the standard deviation to determine the bucket sizes. @param median @param standardDeviation @param sigma
[ "Set", "the", "histogram", "to", "use", "the", "standard", "deviation", "to", "determine", "the", "bucket", "sizes", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/Histogram.java#L81-L86
pawelprazak/java-extended
guava/src/main/java/com/bluecatcode/common/contract/Checks.java
Checks.checkNotEmpty
public static <T> T checkNotEmpty(T reference, @Nullable Object errorMessage) { """ Performs emptiness and nullness check. @param reference reference to check @param errorMessage the exception message to use if the check fails; will be converted to a string using {@link String#valueOf(Object)} @param <T> ...
java
public static <T> T checkNotEmpty(T reference, @Nullable Object errorMessage) { checkNotEmpty(reference, String.valueOf(errorMessage), EMPTY_ERROR_MESSAGE_ARGS); return reference; }
[ "public", "static", "<", "T", ">", "T", "checkNotEmpty", "(", "T", "reference", ",", "@", "Nullable", "Object", "errorMessage", ")", "{", "checkNotEmpty", "(", "reference", ",", "String", ".", "valueOf", "(", "errorMessage", ")", ",", "EMPTY_ERROR_MESSAGE_ARGS...
Performs emptiness and nullness check. @param reference reference to check @param errorMessage the exception message to use if the check fails; will be converted to a string using {@link String#valueOf(Object)} @param <T> the reference type @return the checked reference @throws IllegalArgumentException if ...
[ "Performs", "emptiness", "and", "nullness", "check", "." ]
train
https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/contract/Checks.java#L290-L293
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.checkForSequenceMethod
void checkForSequenceMethod(ClassWriter classWriter, String className) { """ Verifies if there is any postponed sequence method creation in pendingSequenceMethods and performs the method if it exists. @param classWriter The {@link ClassWriter} object for the class that contains the postponed sequence method crea...
java
void checkForSequenceMethod(ClassWriter classWriter, String className) { Consumer<ClassWriter> sequenceMethodCreator = pendingSequenceMethods.get(className); if (sequenceMethodCreator != null){ sequenceMethodCreator.accept(classWriter); } }
[ "void", "checkForSequenceMethod", "(", "ClassWriter", "classWriter", ",", "String", "className", ")", "{", "Consumer", "<", "ClassWriter", ">", "sequenceMethodCreator", "=", "pendingSequenceMethods", ".", "get", "(", "className", ")", ";", "if", "(", "sequenceMethod...
Verifies if there is any postponed sequence method creation in pendingSequenceMethods and performs the method if it exists. @param classWriter The {@link ClassWriter} object for the class that contains the postponed sequence method creation. @param className The name of the class that contains the sequence.
[ "Verifies", "if", "there", "is", "any", "postponed", "sequence", "method", "creation", "in", "pendingSequenceMethods", "and", "performs", "the", "method", "if", "it", "exists", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L867-L873
vdurmont/semver4j
src/main/java/com/vdurmont/semver4j/Requirement.java
Requirement.caretRequirement
protected static Requirement caretRequirement(String version, Semver.SemverType type) { """ Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple. """ if (type != Semver.SemverType.NPM) { throw new SemverException("The caret requirements are only ...
java
protected static Requirement caretRequirement(String version, Semver.SemverType type) { if (type != Semver.SemverType.NPM) { throw new SemverException("The caret requirements are only compatible with NPM."); } Semver semver = new Semver(version, type); Requirement req1 = new ...
[ "protected", "static", "Requirement", "caretRequirement", "(", "String", "version", ",", "Semver", ".", "SemverType", "type", ")", "{", "if", "(", "type", "!=", "Semver", ".", "SemverType", ".", "NPM", ")", "{", "throw", "new", "SemverException", "(", "\"The...
Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple.
[ "Allows", "changes", "that", "do", "not", "modify", "the", "left", "-", "most", "non", "-", "zero", "digit", "in", "the", "[", "major", "minor", "patch", "]", "tuple", "." ]
train
https://github.com/vdurmont/semver4j/blob/3f0266e4985ac29e9da482e04001ed15fad6c3e2/src/main/java/com/vdurmont/semver4j/Requirement.java#L422-L448
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/reflect/Array.java
Array.newInstance
public static Object newInstance(Class<?> componentType, int... dimensions) throws IllegalArgumentException, NegativeArraySizeException { """ Creates a new array with the specified component type and dimensions. If {@code componentType} represents a non-array class or interface, the new array has {@cod...
java
public static Object newInstance(Class<?> componentType, int... dimensions) throws IllegalArgumentException, NegativeArraySizeException { if (dimensions.length <= 0 || dimensions.length > 255) { throw new IllegalArgumentException("Bad number of dimensions: " + dimensions.length); } ...
[ "public", "static", "Object", "newInstance", "(", "Class", "<", "?", ">", "componentType", ",", "int", "...", "dimensions", ")", "throws", "IllegalArgumentException", ",", "NegativeArraySizeException", "{", "if", "(", "dimensions", ".", "length", "<=", "0", "||"...
Creates a new array with the specified component type and dimensions. If {@code componentType} represents a non-array class or interface, the new array has {@code dimensions.length} dimensions and {@code componentType} as its component type. If {@code componentType} represents an array class, the number of dimensions o...
[ "Creates", "a", "new", "array", "with", "the", "specified", "component", "type", "and", "dimensions", ".", "If", "{", "@code", "componentType", "}", "represents", "a", "non", "-", "array", "class", "or", "interface", "the", "new", "array", "has", "{", "@co...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/reflect/Array.java#L109-L121
infinispan/infinispan
core/src/main/java/org/infinispan/metadata/Metadatas.java
Metadatas.updateMetadata
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) { """ Set the {@code providedMetadata} on the cache entry. If the entry already has a version, copy the version in the new metadata. """ if (entry != null && providedMetadata != null) { Metadata mergedMetadata; ...
java
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) { if (entry != null && providedMetadata != null) { Metadata mergedMetadata; if (entry.getMetadata() == null) { mergedMetadata = providedMetadata; } else { mergedMetadata = applyVersion...
[ "public", "static", "void", "updateMetadata", "(", "CacheEntry", "entry", ",", "Metadata", "providedMetadata", ")", "{", "if", "(", "entry", "!=", "null", "&&", "providedMetadata", "!=", "null", ")", "{", "Metadata", "mergedMetadata", ";", "if", "(", "entry", ...
Set the {@code providedMetadata} on the cache entry. If the entry already has a version, copy the version in the new metadata.
[ "Set", "the", "{", "@code", "providedMetadata", "}", "on", "the", "cache", "entry", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/metadata/Metadatas.java#L41-L51
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.health/src/com/ibm/ws/microprofile/health/services/impl/AppModuleContextService.java
AppModuleContextService.createThreadContext
protected ThreadContextDescriptor createThreadContext(Map<String, String> execProps, J2EEName j2eeName) { """ Capture the current security context and create the JeeMetadata and Classloader context for the given app component (j2eeName). @return a ThreadContextDescriptor containing the current security context...
java
protected ThreadContextDescriptor createThreadContext(Map<String, String> execProps, J2EEName j2eeName) { ThreadContext classloaderContext = classLoaderContextProvider.createThreadContext(execProps, getContextClassLoaderIdentifier(j2eeName)); ThreadContext jeeContext = jeeMetaDataContextProvider.create...
[ "protected", "ThreadContextDescriptor", "createThreadContext", "(", "Map", "<", "String", ",", "String", ">", "execProps", ",", "J2EEName", "j2eeName", ")", "{", "ThreadContext", "classloaderContext", "=", "classLoaderContextProvider", ".", "createThreadContext", "(", "...
Capture the current security context and create the JeeMetadata and Classloader context for the given app component (j2eeName). @return a ThreadContextDescriptor containing the current security context and the jeemetadata and classloader context for the given app component (j2eeName). @throws IllegalStateException if...
[ "Capture", "the", "current", "security", "context", "and", "create", "the", "JeeMetadata", "and", "Classloader", "context", "for", "the", "given", "app", "component", "(", "j2eeName", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.health/src/com/ibm/ws/microprofile/health/services/impl/AppModuleContextService.java#L166-L176
alkacon/opencms-core
src/org/opencms/i18n/CmsLocaleManager.java
CmsLocaleManager.getResourceEncoding
public static final String getResourceEncoding(CmsObject cms, CmsResource res) { """ Returns the content encoding set for the given resource.<p> The content encoding is controlled by the property {@link CmsPropertyDefinition#PROPERTY_CONTENT_ENCODING}, which can be set on the resource or on a parent folder for...
java
public static final String getResourceEncoding(CmsObject cms, CmsResource res) { String encoding = null; // get the encoding try { encoding = cms.readPropertyObject(res, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true).getValue(); if (encoding != null) { ...
[ "public", "static", "final", "String", "getResourceEncoding", "(", "CmsObject", "cms", ",", "CmsResource", "res", ")", "{", "String", "encoding", "=", "null", ";", "// get the encoding", "try", "{", "encoding", "=", "cms", ".", "readPropertyObject", "(", "res", ...
Returns the content encoding set for the given resource.<p> The content encoding is controlled by the property {@link CmsPropertyDefinition#PROPERTY_CONTENT_ENCODING}, which can be set on the resource or on a parent folder for all resources in this folder.<p> In case no encoding has been set, the default encoding fro...
[ "Returns", "the", "content", "encoding", "set", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsLocaleManager.java#L365-L383
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getExportsAsync
public Observable<List<Export>> getExportsAsync(UUID projectId, UUID iterationId) { """ Get the list of exports for a specific iteration. @param projectId The project id @param iterationId The iteration id @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
java
public Observable<List<Export>> getExportsAsync(UUID projectId, UUID iterationId) { return getExportsWithServiceResponseAsync(projectId, iterationId).map(new Func1<ServiceResponse<List<Export>>, List<Export>>() { @Override public List<Export> call(ServiceResponse<List<Export>> response) ...
[ "public", "Observable", "<", "List", "<", "Export", ">", ">", "getExportsAsync", "(", "UUID", "projectId", ",", "UUID", "iterationId", ")", "{", "return", "getExportsWithServiceResponseAsync", "(", "projectId", ",", "iterationId", ")", ".", "map", "(", "new", ...
Get the list of exports for a specific iteration. @param projectId The project id @param iterationId The iteration id @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;Export&gt; object
[ "Get", "the", "list", "of", "exports", "for", "a", "specific", "iteration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L1154-L1161
alibaba/canal
client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java
ESTemplate.getEsType
@SuppressWarnings("unchecked") private String getEsType(ESMapping mapping, String fieldName) { """ 获取es mapping中的属性类型 @param mapping mapping配置 @param fieldName 属性名 @return 类型 """ String key = mapping.get_index() + "-" + mapping.get_type(); Map<String, String> fieldType = esFieldTypes.g...
java
@SuppressWarnings("unchecked") private String getEsType(ESMapping mapping, String fieldName) { String key = mapping.get_index() + "-" + mapping.get_type(); Map<String, String> fieldType = esFieldTypes.get(key); if (fieldType == null) { ImmutableOpenMap<String, MappingMetaData> ma...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "String", "getEsType", "(", "ESMapping", "mapping", ",", "String", "fieldName", ")", "{", "String", "key", "=", "mapping", ".", "get_index", "(", ")", "+", "\"-\"", "+", "mapping", ".", "get_type...
获取es mapping中的属性类型 @param mapping mapping配置 @param fieldName 属性名 @return 类型
[ "获取es", "mapping中的属性类型" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java#L489-L530
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java
LongExtensions.operator_doubleGreaterThan
@Pure @Inline(value="($1 >> $2)", constantExpression=true) public static long operator_doubleGreaterThan(long a, int distance) { """ The binary <code>signed right sift</code> operator. This is the equivalent to the java <code>&gt;&gt;</code> operator. Shifts in the value of the sign bit as the leftmost bit, thu...
java
@Pure @Inline(value="($1 >> $2)", constantExpression=true) public static long operator_doubleGreaterThan(long a, int distance) { return a >> distance; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 >> $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "long", "operator_doubleGreaterThan", "(", "long", "a", ",", "int", "distance", ")", "{", "return", "a", ">>", "distance", ";", ...
The binary <code>signed right sift</code> operator. This is the equivalent to the java <code>&gt;&gt;</code> operator. Shifts in the value of the sign bit as the leftmost bit, thus preserving the sign of the initial value. @param a a long. @param distance the number of times to shift. @return <code>a&gt;&gt;distance</...
[ "The", "binary", "<code", ">", "signed", "right", "sift<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "java", "<code", ">", "&gt", ";", "&gt", ";", "<", "/", "code", ">", "operator", ".", "Shifts", "in", "the",...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java#L141-L145
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphDump.java
ObjectGraphDump.visitComplexTypeWithDiff
private void visitComplexTypeWithDiff(final ObjectGraphNode node, final Object otherInstance) { """ Visits all the fields in the given complex object, noting differences. @param node the ObjectGraphNode containing the object. @param otherInstance the other instance to compare to """ if (otherInstance == ...
java
private void visitComplexTypeWithDiff(final ObjectGraphNode node, final Object otherInstance) { if (otherInstance == null) { // Nothing to compare against, just use the default visit visitComplexType(node); } else { Field[] fields = getAllInstanceFields(node.getValue()); for (int i = 0; i < fields.leng...
[ "private", "void", "visitComplexTypeWithDiff", "(", "final", "ObjectGraphNode", "node", ",", "final", "Object", "otherInstance", ")", "{", "if", "(", "otherInstance", "==", "null", ")", "{", "// Nothing to compare against, just use the default visit", "visitComplexType", ...
Visits all the fields in the given complex object, noting differences. @param node the ObjectGraphNode containing the object. @param otherInstance the other instance to compare to
[ "Visits", "all", "the", "fields", "in", "the", "given", "complex", "object", "noting", "differences", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphDump.java#L139-L158
carrotsearch/hppc
hppc/src/main/java/com/carrotsearch/hppc/sorting/IndirectSort.java
IndirectSort.topDownMergeSort
private static void topDownMergeSort(int[] src, int[] dst, int fromIndex, int toIndex, IndirectComparator comp) { """ Perform a recursive, descending merge sort. @param fromIndex inclusive @param toIndex exclusive """ if (toIndex - fromIndex <= MIN_LENGTH_FOR_INSERTION_SORT) { insertionSort(fro...
java
private static void topDownMergeSort(int[] src, int[] dst, int fromIndex, int toIndex, IndirectComparator comp) { if (toIndex - fromIndex <= MIN_LENGTH_FOR_INSERTION_SORT) { insertionSort(fromIndex, toIndex - fromIndex, dst, comp); return; } final int mid = (fromIndex + toIndex) >>> 1; topD...
[ "private", "static", "void", "topDownMergeSort", "(", "int", "[", "]", "src", ",", "int", "[", "]", "dst", ",", "int", "fromIndex", ",", "int", "toIndex", ",", "IndirectComparator", "comp", ")", "{", "if", "(", "toIndex", "-", "fromIndex", "<=", "MIN_LEN...
Perform a recursive, descending merge sort. @param fromIndex inclusive @param toIndex exclusive
[ "Perform", "a", "recursive", "descending", "merge", "sort", "." ]
train
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/java/com/carrotsearch/hppc/sorting/IndirectSort.java#L70-L101
derari/cthul
objects/src/main/java/org/cthul/objects/Boxing.java
Boxing.unboxAllAs
public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) { """ Transforms any array into a primitive array. @param <T> @param src source array @param srcPos start position @param len length @param type target type @return primitive array """ return (T) unboxAll(type, src, sr...
java
public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) { return (T) unboxAll(type, src, srcPos, len); }
[ "public", "static", "<", "T", ">", "T", "unboxAllAs", "(", "Object", "src", ",", "int", "srcPos", ",", "int", "len", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "(", "T", ")", "unboxAll", "(", "type", ",", "src", ",", "srcPos", ",", ...
Transforms any array into a primitive array. @param <T> @param src source array @param srcPos start position @param len length @param type target type @return primitive array
[ "Transforms", "any", "array", "into", "a", "primitive", "array", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L216-L218
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.getReadOnlyKeysAsync
public Observable<DatabaseAccountListReadOnlyKeysResultInner> getReadOnlyKeysAsync(String resourceGroupName, String accountName) { """ Lists the read-only access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB datab...
java
public Observable<DatabaseAccountListReadOnlyKeysResultInner> getReadOnlyKeysAsync(String resourceGroupName, String accountName) { return getReadOnlyKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<DatabaseAccountListReadOnlyKeysResultInner>, DatabaseAccountListReadOnly...
[ "public", "Observable", "<", "DatabaseAccountListReadOnlyKeysResultInner", ">", "getReadOnlyKeysAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "getReadOnlyKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName",...
Lists the read-only access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DatabaseAccountListRe...
[ "Lists", "the", "read", "-", "only", "access", "keys", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1653-L1660
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java
Utils.createUrl
public static URL createUrl(String url) { """ Helper method to create a {@link URL} without dealing with a checked exception. @param url String URL. @return {@link URL} object. """ try { return new URL(url); } catch (MalformedURLException e) { throw new SdkClientExce...
java
public static URL createUrl(String url) { try { return new URL(url); } catch (MalformedURLException e) { throw new SdkClientException("Could not create URL: " + url, e); } }
[ "public", "static", "URL", "createUrl", "(", "String", "url", ")", "{", "try", "{", "return", "new", "URL", "(", "url", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")", "{", "throw", "new", "SdkClientException", "(", "\"Could not create URL: \...
Helper method to create a {@link URL} without dealing with a checked exception. @param url String URL. @return {@link URL} object.
[ "Helper", "method", "to", "create", "a", "{", "@link", "URL", "}", "without", "dealing", "with", "a", "checked", "exception", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java#L39-L45
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ServletUtil.java
ServletUtil.extractCookie
public static String extractCookie(final HttpServletRequest request, final String name) { """ Find the value of a cookie on the request, by name. @param request The request on which to check for the cookie. @param name The name of the cookie we want the value of. @return The value of the cookie, if present, oth...
java
public static String extractCookie(final HttpServletRequest request, final String name) { for (Cookie cookie : request.getCookies()) { if (cookie.getName().equals(name)) { return cookie.getValue(); } } return null; }
[ "public", "static", "String", "extractCookie", "(", "final", "HttpServletRequest", "request", ",", "final", "String", "name", ")", "{", "for", "(", "Cookie", "cookie", ":", "request", ".", "getCookies", "(", ")", ")", "{", "if", "(", "cookie", ".", "getNam...
Find the value of a cookie on the request, by name. @param request The request on which to check for the cookie. @param name The name of the cookie we want the value of. @return The value of the cookie, if present, otherwise null.
[ "Find", "the", "value", "of", "a", "cookie", "on", "the", "request", "by", "name", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/ServletUtil.java#L657-L664
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.toLightweightTypeReference
public static LightweightTypeReference toLightweightTypeReference( JvmType type, CommonTypeComputationServices services, boolean keepUnboundWildcardInformation) { """ Convert a type to a lightweight type reference. @param type - type to convert. @param services - services used for the conversion @param ...
java
public static LightweightTypeReference toLightweightTypeReference( JvmType type, CommonTypeComputationServices services, boolean keepUnboundWildcardInformation) { if (type == null) { return null; } final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type); final Lightweigh...
[ "public", "static", "LightweightTypeReference", "toLightweightTypeReference", "(", "JvmType", "type", ",", "CommonTypeComputationServices", "services", ",", "boolean", "keepUnboundWildcardInformation", ")", "{", "if", "(", "type", "==", "null", ")", "{", "return", "null...
Convert a type to a lightweight type reference. @param type - type to convert. @param services - services used for the conversion @param keepUnboundWildcardInformation - indicates if the unbound wild card information must be keeped in the lightweight reference. @return the lightweight type reference.
[ "Convert", "a", "type", "to", "a", "lightweight", "type", "reference", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L641-L652
ow2-chameleon/fuchsia
importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java
ZWaveController.requestNodeInfo
public void requestNodeInfo(int nodeId) { """ Send Request Node info message to the controller. @param nodeId the nodeId of the node to identify @throws SerialInterfaceException when timing out or getting an invalid response. """ SerialMessage newMessage = new SerialMessage(nodeId, SerialMessage.SerialMess...
java
public void requestNodeInfo(int nodeId) { SerialMessage newMessage = new SerialMessage(nodeId, SerialMessage.SerialMessageClass.RequestNodeInfo, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.ApplicationUpdate, SerialMessage.SerialMessagePriority.High); byte[] newPayload = { (byte) nod...
[ "public", "void", "requestNodeInfo", "(", "int", "nodeId", ")", "{", "SerialMessage", "newMessage", "=", "new", "SerialMessage", "(", "nodeId", ",", "SerialMessage", ".", "SerialMessageClass", ".", "RequestNodeInfo", ",", "SerialMessage", ".", "SerialMessageType", "...
Send Request Node info message to the controller. @param nodeId the nodeId of the node to identify @throws SerialInterfaceException when timing out or getting an invalid response.
[ "Send", "Request", "Node", "info", "message", "to", "the", "controller", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java#L796-L801
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfPKCS7.java
PdfPKCS7.getAuthenticatedAttributeBytes
public byte[] getAuthenticatedAttributeBytes(byte secondDigest[], Calendar signingTime, byte[] ocsp) { """ When using authenticatedAttributes the authentication process is different. The document digest is generated and put inside the attribute. The signing is done over the DER encoded authenticatedAttributes. T...
java
public byte[] getAuthenticatedAttributeBytes(byte secondDigest[], Calendar signingTime, byte[] ocsp) { try { return getAuthenticatedAttributeSet(secondDigest, signingTime, ocsp).getEncoded(ASN1Encoding.DER); } catch (Exception e) { throw new ExceptionConverter(e); ...
[ "public", "byte", "[", "]", "getAuthenticatedAttributeBytes", "(", "byte", "secondDigest", "[", "]", ",", "Calendar", "signingTime", ",", "byte", "[", "]", "ocsp", ")", "{", "try", "{", "return", "getAuthenticatedAttributeSet", "(", "secondDigest", ",", "signing...
When using authenticatedAttributes the authentication process is different. The document digest is generated and put inside the attribute. The signing is done over the DER encoded authenticatedAttributes. This method provides that encoding and the parameters must be exactly the same as in {@link #getEncodedPKCS7(byte[]...
[ "When", "using", "authenticatedAttributes", "the", "authentication", "process", "is", "different", ".", "The", "document", "digest", "is", "generated", "and", "put", "inside", "the", "attribute", ".", "The", "signing", "is", "done", "over", "the", "DER", "encode...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfPKCS7.java#L1356-L1363
geomajas/geomajas-project-server
common-servlet/src/main/java/org/geomajas/servlet/mvc/legend/LegendGraphicController.java
LegendGraphicController.getGraphic
@RequestMapping(value = "/legendgraphic", method = RequestMethod.GET) public ModelAndView getGraphic(@RequestParam("layerId") String layerId, @RequestParam(value = "styleName", required = false) String styleName, @RequestParam(value = "ruleIndex", required = false) Integer ruleIndex, @RequestParam(value = "fo...
java
@RequestMapping(value = "/legendgraphic", method = RequestMethod.GET) public ModelAndView getGraphic(@RequestParam("layerId") String layerId, @RequestParam(value = "styleName", required = false) String styleName, @RequestParam(value = "ruleIndex", required = false) Integer ruleIndex, @RequestParam(value = "fo...
[ "@", "RequestMapping", "(", "value", "=", "\"/legendgraphic\"", ",", "method", "=", "RequestMethod", ".", "GET", ")", "public", "ModelAndView", "getGraphic", "(", "@", "RequestParam", "(", "\"layerId\"", ")", "String", "layerId", ",", "@", "RequestParam", "(", ...
Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters. @param layerId the layer id @param styleName the style name @param ruleIndex the rule index @param format the image format ('png','jpg','gif') @param width the graphic's width @param height the graphic's heig...
[ "Gets", "a", "legend", "graphic", "with", "the", "specified", "metadata", "parameters", ".", "All", "parameters", "are", "passed", "as", "request", "parameters", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/mvc/legend/LegendGraphicController.java#L81-L96
jfinal/jfinal
src/main/java/com/jfinal/render/FreeMarkerRender.java
FreeMarkerRender.setSharedVariable
public static void setSharedVariable(String name, Object object) { """ 注入对象到 FreeMarker 页面供调用,通常注入一些辅助内容输出的工具类,相当于是 freemarker 的一种扩展方式 @param name 对象名 @param object 对象 """ try { FreeMarkerRender.getConfiguration().setSharedVariable(name, object); } catch (TemplateException e) { throw new Runtim...
java
public static void setSharedVariable(String name, Object object) { try { FreeMarkerRender.getConfiguration().setSharedVariable(name, object); } catch (TemplateException e) { throw new RuntimeException(e); } }
[ "public", "static", "void", "setSharedVariable", "(", "String", "name", ",", "Object", "object", ")", "{", "try", "{", "FreeMarkerRender", ".", "getConfiguration", "(", ")", ".", "setSharedVariable", "(", "name", ",", "object", ")", ";", "}", "catch", "(", ...
注入对象到 FreeMarker 页面供调用,通常注入一些辅助内容输出的工具类,相当于是 freemarker 的一种扩展方式 @param name 对象名 @param object 对象
[ "注入对象到", "FreeMarker", "页面供调用,通常注入一些辅助内容输出的工具类,相当于是", "freemarker", "的一种扩展方式" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/render/FreeMarkerRender.java#L70-L76
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/TriMarkers.java
TriMarkers.getNormalVector
public static Vector3D getNormalVector(Triangle t) throws IllegalArgumentException { """ Get the normal vector to this triangle, of length 1. @param t input triangle @return vector normal to the triangle. """ if(Double.isNaN(t.p0.z) || Double.isNaN(t.p1.z) || Double.isNaN(t.p2.z)) { thro...
java
public static Vector3D getNormalVector(Triangle t) throws IllegalArgumentException { if(Double.isNaN(t.p0.z) || Double.isNaN(t.p1.z) || Double.isNaN(t.p2.z)) { throw new IllegalArgumentException("Z is required, cannot compute triangle normal of "+t); } double dx1 = t.p0.x - t.p1.x; ...
[ "public", "static", "Vector3D", "getNormalVector", "(", "Triangle", "t", ")", "throws", "IllegalArgumentException", "{", "if", "(", "Double", ".", "isNaN", "(", "t", ".", "p0", ".", "z", ")", "||", "Double", ".", "isNaN", "(", "t", ".", "p1", ".", "z",...
Get the normal vector to this triangle, of length 1. @param t input triangle @return vector normal to the triangle.
[ "Get", "the", "normal", "vector", "to", "this", "triangle", "of", "length", "1", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/TriMarkers.java#L171-L182
appium/java-client
src/main/java/io/appium/java_client/ScreenshotState.java
ScreenshotState.verifyNotChanged
public ScreenshotState verifyNotChanged(Duration timeout, double minScore) { """ Verifies whether the state of the screenshot provided by stateProvider lambda function is not changed within the given timeout. @param timeout timeout value @param minScore the value in range (0.0, 1.0) @return self instance ...
java
public ScreenshotState verifyNotChanged(Duration timeout, double minScore) { return checkState((x) -> x >= minScore, timeout); }
[ "public", "ScreenshotState", "verifyNotChanged", "(", "Duration", "timeout", ",", "double", "minScore", ")", "{", "return", "checkState", "(", "(", "x", ")", "-", ">", "x", ">=", "minScore", ",", "timeout", ")", ";", "}" ]
Verifies whether the state of the screenshot provided by stateProvider lambda function is not changed within the given timeout. @param timeout timeout value @param minScore the value in range (0.0, 1.0) @return self instance for chaining @throws ScreenshotComparisonTimeout if the calculated score is still less than...
[ "Verifies", "whether", "the", "state", "of", "the", "screenshot", "provided", "by", "stateProvider", "lambda", "function", "is", "not", "changed", "within", "the", "given", "timeout", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/ScreenshotState.java#L201-L203
Jasig/resource-server
resource-server-core/src/main/java/org/jasig/resource/aggr/ResourcesAggregatorImpl.java
ResourcesAggregatorImpl.findFile
protected File findFile(final List<File> sourceDirectories, String resourceFileName) throws IOException { """ Find the File for the resource file in the various source directories. @param sourceDirectories List of directories to scan @param resourceFileName File name of resource file @return The resolved File...
java
protected File findFile(final List<File> sourceDirectories, String resourceFileName) throws IOException { for (final File sourceDirectory : sourceDirectories) { final File resourceFile = new File(sourceDirectory, resourceFileName); if (resourceFile.exists()) { return resourceFile; ...
[ "protected", "File", "findFile", "(", "final", "List", "<", "File", ">", "sourceDirectories", ",", "String", "resourceFileName", ")", "throws", "IOException", "{", "for", "(", "final", "File", "sourceDirectory", ":", "sourceDirectories", ")", "{", "final", "File...
Find the File for the resource file in the various source directories. @param sourceDirectories List of directories to scan @param resourceFileName File name of resource file @return The resolved File @throws IOException If the File cannot be found
[ "Find", "the", "File", "for", "the", "resource", "file", "in", "the", "various", "source", "directories", "." ]
train
https://github.com/Jasig/resource-server/blob/13375f716777ec3c99ae9917f672881d4aa32df3/resource-server-core/src/main/java/org/jasig/resource/aggr/ResourcesAggregatorImpl.java#L313-L322
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/BitmapUtil.java
BitmapUtil.clipCircle
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size, final int borderWidth, @ColorInt final int borderColor) { """ Clips the corners of a bitmap in order to transform it into a round shape. Additionally, the bitmap is resized to a specific size and a bo...
java
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size, final int borderWidth, @ColorInt final int borderColor) { Condition.INSTANCE.ensureAtLeast(borderWidth, 0, "The border width must be at least 0"); Bitmap clippedBitmap = clipCircle(bitmap, s...
[ "public", "static", "Bitmap", "clipCircle", "(", "@", "NonNull", "final", "Bitmap", "bitmap", ",", "final", "int", "size", ",", "final", "int", "borderWidth", ",", "@", "ColorInt", "final", "int", "borderColor", ")", "{", "Condition", ".", "INSTANCE", ".", ...
Clips the corners of a bitmap in order to transform it into a round shape. Additionally, the bitmap is resized to a specific size and a border will be added. Bitmaps, whose width and height are not equal, will be clipped to a square beforehand. @param bitmap The bitmap, which should be clipped, as an instance of the c...
[ "Clips", "the", "corners", "of", "a", "bitmap", "in", "order", "to", "transform", "it", "into", "a", "round", "shape", ".", "Additionally", "the", "bitmap", "is", "resized", "to", "a", "specific", "size", "and", "a", "border", "will", "be", "added", ".",...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/BitmapUtil.java#L191-L219
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/api/HttpApiUtil.java
HttpApiUtil.throwResponse
public static <T> T throwResponse(RequestContext ctx, HttpStatus status, String format, Object... args) { """ Throws a newly created {@link HttpResponseException} with the specified {@link HttpStatus} and the formatted message. """ throw HttpResponseException.of(newResponse(ctx, status, format, args))...
java
public static <T> T throwResponse(RequestContext ctx, HttpStatus status, String format, Object... args) { throw HttpResponseException.of(newResponse(ctx, status, format, args)); }
[ "public", "static", "<", "T", ">", "T", "throwResponse", "(", "RequestContext", "ctx", ",", "HttpStatus", "status", ",", "String", "format", ",", "Object", "...", "args", ")", "{", "throw", "HttpResponseException", ".", "of", "(", "newResponse", "(", "ctx", ...
Throws a newly created {@link HttpResponseException} with the specified {@link HttpStatus} and the formatted message.
[ "Throws", "a", "newly", "created", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/HttpApiUtil.java#L78-L80
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.rotateTowards
public Matrix4x3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) { """ Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>(dirX, dirY, dirZ)</code>. <p> If <code>M</code> is <code>this<...
java
public Matrix4x3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) { return rotateTowards(dirX, dirY, dirZ, upX, upY, upZ, this); }
[ "public", "Matrix4x3d", "rotateTowards", "(", "double", "dirX", ",", "double", "dirY", ",", "double", "dirZ", ",", "double", "upX", ",", "double", "upY", ",", "double", "upZ", ")", "{", "return", "rotateTowards", "(", "dirX", ",", "dirY", ",", "dirZ", ",...
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>(dirX, dirY, dirZ)</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming ...
[ "Apply", "a", "model", "transformation", "to", "this", "matrix", "for", "a", "right", "-", "handed", "coordinate", "system", "that", "aligns", "the", "local", "<code", ">", "+", "Z<", "/", "code", ">", "axis", "with", "<code", ">", "(", "dirX", "dirY", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L9624-L9626
threerings/nenya
core/src/main/java/com/threerings/util/KeyboardManager.java
KeyboardManager.keyReleased
protected boolean keyReleased (KeyEvent e) { """ Called when Swing notifies us that a key has been released while the keyboard manager is active. @return true to swallow the key event """ logKey("keyReleased", e); // get the info object for this key KeyInfo info = _keys.get(e.getKe...
java
protected boolean keyReleased (KeyEvent e) { logKey("keyReleased", e); // get the info object for this key KeyInfo info = _keys.get(e.getKeyCode()); if (info != null) { // remember the last time we received a key release info.setReleaseTime(RunAnywhere.getWhe...
[ "protected", "boolean", "keyReleased", "(", "KeyEvent", "e", ")", "{", "logKey", "(", "\"keyReleased\"", ",", "e", ")", ";", "// get the info object for this key", "KeyInfo", "info", "=", "_keys", ".", "get", "(", "e", ".", "getKeyCode", "(", ")", ")", ";", ...
Called when Swing notifies us that a key has been released while the keyboard manager is active. @return true to swallow the key event
[ "Called", "when", "Swing", "notifies", "us", "that", "a", "key", "has", "been", "released", "while", "the", "keyboard", "manager", "is", "active", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyboardManager.java#L361-L376
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java
DiSH.subspaceDimensionality
private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) { """ Compute the common subspace dimensionality of two vectors. @param v1 First vector @param v2 Second vector @param pv1 First preference @param pv2 Second preference @param commonPr...
java
private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) { // number of zero values in commonPreferenceVector int subspaceDim = v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector); // special case: v1 and v2 are in paralle...
[ "private", "int", "subspaceDimensionality", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ",", "long", "[", "]", "pv1", ",", "long", "[", "]", "pv2", ",", "long", "[", "]", "commonPreferenceVector", ")", "{", "// number of zero values in commonPreferenceVe...
Compute the common subspace dimensionality of two vectors. @param v1 First vector @param v2 Second vector @param pv1 First preference @param pv2 Second preference @param commonPreferenceVector Common preference @return Usually, v1.dim - commonPreference.cardinality, unless either pv1 and pv2 are a subset of the other.
[ "Compute", "the", "common", "subspace", "dimensionality", "of", "two", "vectors", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L577-L589
apache/spark
common/network-common/src/main/java/org/apache/spark/network/protocol/MessageWithHeader.java
MessageWithHeader.transferTo
@Override public long transferTo(final WritableByteChannel target, final long position) throws IOException { """ This code is more complicated than you would think because we might require multiple transferTo invocations in order to transfer a single MessageWithHeader to avoid busy waiting. The contract is t...
java
@Override public long transferTo(final WritableByteChannel target, final long position) throws IOException { Preconditions.checkArgument(position == totalBytesTransferred, "Invalid position."); // Bytes written for header in this call. long writtenHeader = 0; if (header.readableBytes() > 0) { wr...
[ "@", "Override", "public", "long", "transferTo", "(", "final", "WritableByteChannel", "target", ",", "final", "long", "position", ")", "throws", "IOException", "{", "Preconditions", ".", "checkArgument", "(", "position", "==", "totalBytesTransferred", ",", "\"Invali...
This code is more complicated than you would think because we might require multiple transferTo invocations in order to transfer a single MessageWithHeader to avoid busy waiting. The contract is that the caller will ensure position is properly set to the total number of bytes transferred so far (i.e. value returned by...
[ "This", "code", "is", "more", "complicated", "than", "you", "would", "think", "because", "we", "might", "require", "multiple", "transferTo", "invocations", "in", "order", "to", "transfer", "a", "single", "MessageWithHeader", "to", "avoid", "busy", "waiting", "."...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/protocol/MessageWithHeader.java#L105-L128
alkacon/opencms-core
src/org/opencms/ui/apps/lists/CmsResultFacets.java
CmsResultFacets.prepareCategoryFacets
private Component prepareCategoryFacets(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { """ Prepares the category facets for the given search result.<p> @param solrResultList the search result list @param resultWrapper the result wrapper @return the category facets component ""...
java
private Component prepareCategoryFacets(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { FacetField categoryFacets = solrResultList.getFacetField(CmsListManager.FIELD_CATEGORIES); I_CmsSearchControllerFacetField facetController = resultWrapper.getController().getFieldFacets().g...
[ "private", "Component", "prepareCategoryFacets", "(", "CmsSolrResultList", "solrResultList", ",", "CmsSearchResultWrapper", "resultWrapper", ")", "{", "FacetField", "categoryFacets", "=", "solrResultList", ".", "getFacetField", "(", "CmsListManager", ".", "FIELD_CATEGORIES", ...
Prepares the category facets for the given search result.<p> @param solrResultList the search result list @param resultWrapper the result wrapper @return the category facets component
[ "Prepares", "the", "category", "facets", "for", "the", "given", "search", "result", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/lists/CmsResultFacets.java#L319-L355
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/options/navigation/impl/ConfigurationContextImpl.java
ConfigurationContextImpl.createGlobalContext
@Override public <G extends GlobalContext<?, ?>> G createGlobalContext(Class<? extends G> globalContextImplType, final Class<? extends EntityContext<?, ?>> entityContextImplType, Class<? extends PropertyContext<?, ?>> propertyContextImplType) { """ Creates a new {@link GlobalContext} object based on the given ...
java
@Override public <G extends GlobalContext<?, ?>> G createGlobalContext(Class<? extends G> globalContextImplType, final Class<? extends EntityContext<?, ?>> entityContextImplType, Class<? extends PropertyContext<?, ?>> propertyContextImplType) { // ByteBuddyState#resolveClassLoadingStrategy static method is an Hi...
[ "@", "Override", "public", "<", "G", "extends", "GlobalContext", "<", "?", ",", "?", ">", ">", "G", "createGlobalContext", "(", "Class", "<", "?", "extends", "G", ">", "globalContextImplType", ",", "final", "Class", "<", "?", "extends", "EntityContext", "<...
Creates a new {@link GlobalContext} object based on the given context implementation types. All implementation types must declare a public or protected constructor with a single parameter, accepting {@link ConfigurationContext}. <p> Each context implementation type must provide an implementation of the method(s) declar...
[ "Creates", "a", "new", "{", "@link", "GlobalContext", "}", "object", "based", "on", "the", "given", "context", "implementation", "types", ".", "All", "implementation", "types", "must", "declare", "a", "public", "or", "protected", "constructor", "with", "a", "s...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/options/navigation/impl/ConfigurationContextImpl.java#L110-L129
jbundle/jbundle
thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java
Application.addTask
public int addTask(Task task, Object remoteTask) { """ Add this session, screen, or task that belongs to this application. @param objSession Session to remove. @return Number of remaining sessions still active. """ if (m_taskMain == null) { if (task != null) if (ta...
java
public int addTask(Task task, Object remoteTask) { if (m_taskMain == null) { if (task != null) if (task.isMainTaskCandidate()) m_taskMain = task; } m_mapTasks.put(task, (RemoteTask)remoteTask); return m_mapTasks.size(); }
[ "public", "int", "addTask", "(", "Task", "task", ",", "Object", "remoteTask", ")", "{", "if", "(", "m_taskMain", "==", "null", ")", "{", "if", "(", "task", "!=", "null", ")", "if", "(", "task", ".", "isMainTaskCandidate", "(", ")", ")", "m_taskMain", ...
Add this session, screen, or task that belongs to this application. @param objSession Session to remove. @return Number of remaining sessions still active.
[ "Add", "this", "session", "screen", "or", "task", "that", "belongs", "to", "this", "application", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java#L284-L294
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/ReplacedText.java
ReplacedText.getLayoutDimension
private Dimension getLayoutDimension() { """ Obtains the dimension that should be used for the layout. @return the dimension """ Dimension dim; if (layoutDimension != null) { dim = new Dimension(layoutDimension); if (dim.width <= 0) dim.width = 10; //use some mi...
java
private Dimension getLayoutDimension() { Dimension dim; if (layoutDimension != null) { dim = new Dimension(layoutDimension); if (dim.width <= 0) dim.width = 10; //use some minimum size when the size is not known if (dim.height <= 0) dim.height = 10; ...
[ "private", "Dimension", "getLayoutDimension", "(", ")", "{", "Dimension", "dim", ";", "if", "(", "layoutDimension", "!=", "null", ")", "{", "dim", "=", "new", "Dimension", "(", "layoutDimension", ")", ";", "if", "(", "dim", ".", "width", "<=", "0", ")", ...
Obtains the dimension that should be used for the layout. @return the dimension
[ "Obtains", "the", "dimension", "that", "should", "be", "used", "for", "the", "layout", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/ReplacedText.java#L130-L142
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java
WeeklyAutoScalingSchedule.withSaturday
public WeeklyAutoScalingSchedule withSaturday(java.util.Map<String, String> saturday) { """ <p> The schedule for Saturday. </p> @param saturday The schedule for Saturday. @return Returns a reference to this object so that method calls can be chained together. """ setSaturday(saturday); r...
java
public WeeklyAutoScalingSchedule withSaturday(java.util.Map<String, String> saturday) { setSaturday(saturday); return this; }
[ "public", "WeeklyAutoScalingSchedule", "withSaturday", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "saturday", ")", "{", "setSaturday", "(", "saturday", ")", ";", "return", "this", ";", "}" ]
<p> The schedule for Saturday. </p> @param saturday The schedule for Saturday. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "schedule", "for", "Saturday", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java#L457-L460
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getUDTs
@Override public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException { """ Retrieves a description of the user-defined types (UDTs) defined in a particular schema. """ checkClosed(); throw SQLError.noSupport(); }
java
@Override public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getUDTs", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "typeNamePattern", ",", "int", "[", "]", "types", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError",...
Retrieves a description of the user-defined types (UDTs) defined in a particular schema.
[ "Retrieves", "a", "description", "of", "the", "user", "-", "defined", "types", "(", "UDTs", ")", "defined", "in", "a", "particular", "schema", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L902-L907
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readPublishList
public CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { """ Reads the publish list assigned to a publish job.<p> @param dbc the current database context @param publishHistoryId the history id identifying the publish job @return the assigned publish list @throws...
java
public CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { return getProjectDriver(dbc).readPublishList(dbc, publishHistoryId); }
[ "public", "CmsPublishList", "readPublishList", "(", "CmsDbContext", "dbc", ",", "CmsUUID", "publishHistoryId", ")", "throws", "CmsException", "{", "return", "getProjectDriver", "(", "dbc", ")", ".", "readPublishList", "(", "dbc", ",", "publishHistoryId", ")", ";", ...
Reads the publish list assigned to a publish job.<p> @param dbc the current database context @param publishHistoryId the history id identifying the publish job @return the assigned publish list @throws CmsException if something goes wrong
[ "Reads", "the", "publish", "list", "assigned", "to", "a", "publish", "job", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7582-L7585
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.rpad
public UTF8String rpad(int len, UTF8String pad) { """ Returns str, right-padded with pad to a length of len For example: ('hi', 5, '??') =&gt; 'hi???' ('hi', 1, '??') =&gt; 'h' """ int spaces = len - this.numChars(); // number of char need to pad if (spaces <= 0 || pad.numBytes() == 0) { // no...
java
public UTF8String rpad(int len, UTF8String pad) { int spaces = len - this.numChars(); // number of char need to pad if (spaces <= 0 || pad.numBytes() == 0) { // no padding at all, return the substring of the current string return substring(0, len); } else { int padChars = pad.numChars(); ...
[ "public", "UTF8String", "rpad", "(", "int", "len", ",", "UTF8String", "pad", ")", "{", "int", "spaces", "=", "len", "-", "this", ".", "numChars", "(", ")", ";", "// number of char need to pad", "if", "(", "spaces", "<=", "0", "||", "pad", ".", "numBytes"...
Returns str, right-padded with pad to a length of len For example: ('hi', 5, '??') =&gt; 'hi???' ('hi', 1, '??') =&gt; 'h'
[ "Returns", "str", "right", "-", "padded", "with", "pad", "to", "a", "length", "of", "len", "For", "example", ":", "(", "hi", "5", "??", ")", "=", "&gt", ";", "hi???", "(", "hi", "1", "??", ")", "=", "&gt", ";", "h" ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L821-L845
belaban/JGroups
src/org/jgroups/blocks/MessageDispatcher.java
MessageDispatcher.sendMessageWithFuture
public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { """ Sends a unicast message to the target defined by msg.getDest() and returns a future @param dest the target to which to send the unicast message. Must not be null. @param data the payload t...
java
public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { if(dest == null) throw new IllegalArgumentException("message destination is null, cannot send message"); if(opts == null) { log.warn("request options were nul...
[ "public", "<", "T", ">", "CompletableFuture", "<", "T", ">", "sendMessageWithFuture", "(", "Address", "dest", ",", "Buffer", "data", ",", "RequestOptions", "opts", ")", "throws", "Exception", "{", "if", "(", "dest", "==", "null", ")", "throw", "new", "Ille...
Sends a unicast message to the target defined by msg.getDest() and returns a future @param dest the target to which to send the unicast message. Must not be null. @param data the payload to send @param opts the options @return CompletableFuture<T> A future from which the result can be fetched, or null if the call was a...
[ "Sends", "a", "unicast", "message", "to", "the", "target", "defined", "by", "msg", ".", "getDest", "()", "and", "returns", "a", "future" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/blocks/MessageDispatcher.java#L412-L431
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/CmsRegexValidator.java
CmsRegexValidator.matchRuleRegex
private static boolean matchRuleRegex(String regex, String value) { """ Matches a string against a regex, and inverts the match if the regex starts with a '!'.<p> @param regex the regular expression @param value the string to be matched @return true if the validation succeeded """ if (value == ...
java
private static boolean matchRuleRegex(String regex, String value) { if (value == null) { value = ""; } if (regex == null) { return true; } if ((regex.length() > 0) && (regex.charAt(0) == '!')) { return !value.matches(regex.substring(1)); ...
[ "private", "static", "boolean", "matchRuleRegex", "(", "String", "regex", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "value", "=", "\"\"", ";", "}", "if", "(", "regex", "==", "null", ")", "{", "return", "true", ";",...
Matches a string against a regex, and inverts the match if the regex starts with a '!'.<p> @param regex the regular expression @param value the string to be matched @return true if the validation succeeded
[ "Matches", "a", "string", "against", "a", "regex", "and", "inverts", "the", "match", "if", "the", "regex", "starts", "with", "a", "!", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/CmsRegexValidator.java#L79-L93
selenide/selenide
src/main/java/com/codeborne/selenide/Condition.java
Condition.selectedText
public static Condition selectedText(final String expectedText) { """ Checks for selected text on a given input web element <p>Sample: {@code $("input").shouldHave(selectedText("Text"))}</p> <p>NB! Case sensitive</p> @param expectedText expected selected text of the element """ return new Conditio...
java
public static Condition selectedText(final String expectedText) { return new Condition("selectedText") { String actualResult = ""; @Override public boolean apply(Driver driver, WebElement element) { actualResult = driver.executeJavaScript( "return arguments[0].value.substring(a...
[ "public", "static", "Condition", "selectedText", "(", "final", "String", "expectedText", ")", "{", "return", "new", "Condition", "(", "\"selectedText\"", ")", "{", "String", "actualResult", "=", "\"\"", ";", "@", "Override", "public", "boolean", "apply", "(", ...
Checks for selected text on a given input web element <p>Sample: {@code $("input").shouldHave(selectedText("Text"))}</p> <p>NB! Case sensitive</p> @param expectedText expected selected text of the element
[ "Checks", "for", "selected", "text", "on", "a", "given", "input", "web", "element" ]
train
https://github.com/selenide/selenide/blob/b867baf171942cf07725d83a985237428569883f/src/main/java/com/codeborne/selenide/Condition.java#L267-L288
SixDimensions/Component-Bindings-Provider
impl/src/main/java/com/sixdimensions/wcm/cq/component/bindings/impl/ComponentBindingsProviderCache.java
ComponentBindingsProviderCache.getReferences
public List<ServiceReference> getReferences(String resourceType) { """ Gets the ComponentBindingProvider references for the specified resource type. @param resourceType the resource type for which to retrieve the references @return the references for the resource type """ List<ServiceReference> referen...
java
public List<ServiceReference> getReferences(String resourceType) { List<ServiceReference> references = new ArrayList<ServiceReference>(); if (containsKey(resourceType)) { references.addAll(get(resourceType)); Collections.sort(references, new Comparator<ServiceReference>() { @Override public int compar...
[ "public", "List", "<", "ServiceReference", ">", "getReferences", "(", "String", "resourceType", ")", "{", "List", "<", "ServiceReference", ">", "references", "=", "new", "ArrayList", "<", "ServiceReference", ">", "(", ")", ";", "if", "(", "containsKey", "(", ...
Gets the ComponentBindingProvider references for the specified resource type. @param resourceType the resource type for which to retrieve the references @return the references for the resource type
[ "Gets", "the", "ComponentBindingProvider", "references", "for", "the", "specified", "resource", "type", "." ]
train
https://github.com/SixDimensions/Component-Bindings-Provider/blob/1d4da2f8c274d32edcd0a2593bec1255b8340b5b/impl/src/main/java/com/sixdimensions/wcm/cq/component/bindings/impl/ComponentBindingsProviderCache.java#L61-L80
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java
AtomDOSerializer.addAuditDatastream
private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException { """ AUDIT datastream is rebuilt from the latest in-memory audit trail which is a separate array list in the DigitalObject class. Audit trail datastream re-crea...
java
private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException { if (obj.getAuditRecords().size() == 0) { return; } String dsId = PID.toURI(obj.getPid()) + "/AUDIT"; String dsvId = ...
[ "private", "void", "addAuditDatastream", "(", "Feed", "feed", ",", "DigitalObject", "obj", ",", "ZipOutputStream", "zout", ",", "String", "encoding", ")", "throws", "ObjectIntegrityException", ",", "StreamIOException", "{", "if", "(", "obj", ".", "getAuditRecords", ...
AUDIT datastream is rebuilt from the latest in-memory audit trail which is a separate array list in the DigitalObject class. Audit trail datastream re-created from audit records. There is only ONE version of the audit trail datastream @throws ObjectIntegrityException @throws StreamIOException
[ "AUDIT", "datastream", "is", "rebuilt", "from", "the", "latest", "in", "-", "memory", "audit", "trail", "which", "is", "a", "separate", "array", "list", "in", "the", "DigitalObject", "class", ".", "Audit", "trail", "datastream", "re", "-", "created", "from",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java#L270-L321
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/cfg/multitenant/MultiSchemaMultiTenantProcessEngineConfiguration.java
MultiSchemaMultiTenantProcessEngineConfiguration.registerTenant
public void registerTenant(String tenantId, DataSource dataSource) { """ Add a new {@link DataSource} for a tenant, identified by the provided tenantId, to the engine. This can be done after the engine has booted up. Note that the tenant identifier must have been added to the {@link TenantInfoHolder} *prior* ...
java
public void registerTenant(String tenantId, DataSource dataSource) { ((TenantAwareDataSource) super.getDataSource()).addDataSource(tenantId, dataSource); if (booted) { createTenantSchema(tenantId); createTenantAsyncJobExecutor(tenantId); tenantInfoHolder.setCurrentTenantId(t...
[ "public", "void", "registerTenant", "(", "String", "tenantId", ",", "DataSource", "dataSource", ")", "{", "(", "(", "TenantAwareDataSource", ")", "super", ".", "getDataSource", "(", ")", ")", ".", "addDataSource", "(", "tenantId", ",", "dataSource", ")", ";", ...
Add a new {@link DataSource} for a tenant, identified by the provided tenantId, to the engine. This can be done after the engine has booted up. Note that the tenant identifier must have been added to the {@link TenantInfoHolder} *prior* to calling this method.
[ "Add", "a", "new", "{", "@link", "DataSource", "}", "for", "a", "tenant", "identified", "by", "the", "provided", "tenantId", "to", "the", "engine", ".", "This", "can", "be", "done", "after", "the", "engine", "has", "booted", "up", "." ]
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/multitenant/MultiSchemaMultiTenantProcessEngineConfiguration.java#L89-L101
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/sjavac/Source.java
Source.hasFileMatch
static private boolean hasFileMatch(String path, List<String> patterns) { """ The pattern */bar.java matches foo/bar.java and zoo/bar.java etc """ path = Util.normalizeDriveLetter(path); for (String p : patterns) { // Exact match if (p.equals(path)) { ret...
java
static private boolean hasFileMatch(String path, List<String> patterns) { path = Util.normalizeDriveLetter(path); for (String p : patterns) { // Exact match if (p.equals(path)) { return true; } // Single dot the end matches this package and...
[ "static", "private", "boolean", "hasFileMatch", "(", "String", "path", ",", "List", "<", "String", ">", "patterns", ")", "{", "path", "=", "Util", ".", "normalizeDriveLetter", "(", "path", ")", ";", "for", "(", "String", "p", ":", "patterns", ")", "{", ...
The pattern */bar.java matches foo/bar.java and zoo/bar.java etc
[ "The", "pattern", "*", "/", "bar", ".", "java", "matches", "foo", "/", "bar", ".", "java", "and", "zoo", "/", "bar", ".", "java", "etc" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Source.java#L253-L271
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httppanel/view/util/HttpTextViewUtils.java
HttpTextViewUtils.getViewToHeaderPosition
public static int[] getViewToHeaderPosition(JTextArea view, int start, int end) { """ Gets the given {@code start} and {@code end} view positions offset to a header. <p> The {@code view} is expected to replace the header line endings {@code \r\n} to {@code \n} (e.g. so there's no invisible newline ({@code \r}) ...
java
public static int[] getViewToHeaderPosition(JTextArea view, int start, int end) { validateView(view); validateStartEnd(start, end); if (!isValidStartEndForLength(start, end, view.getDocument().getLength())) { return INVALID_POSITION; } return getViewToHeaderPosition...
[ "public", "static", "int", "[", "]", "getViewToHeaderPosition", "(", "JTextArea", "view", ",", "int", "start", ",", "int", "end", ")", "{", "validateView", "(", "view", ")", ";", "validateStartEnd", "(", "start", ",", "end", ")", ";", "if", "(", "!", "...
Gets the given {@code start} and {@code end} view positions offset to a header. <p> The {@code view} is expected to replace the header line endings {@code \r\n} to {@code \n} (e.g. so there's no invisible newline ({@code \r}) characters when editing), as such the positions of the {@code view} need to be offset to match...
[ "Gets", "the", "given", "{", "@code", "start", "}", "and", "{", "@code", "end", "}", "view", "positions", "offset", "to", "a", "header", ".", "<p", ">", "The", "{", "@code", "view", "}", "is", "expected", "to", "replace", "the", "header", "line", "en...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httppanel/view/util/HttpTextViewUtils.java#L247-L256
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java
GetImageServlet.setVerificationHeaders
public static void setVerificationHeaders(HttpServletResponse response, File file) throws IOException { """ Set headers for content length, and, if available, md5. @throws IOException """ response.setHeader(TransferFsImage.CONTENT_LENGTH, String.valueOf(file.length())); MD5Hash hash = MD5Fil...
java
public static void setVerificationHeaders(HttpServletResponse response, File file) throws IOException { response.setHeader(TransferFsImage.CONTENT_LENGTH, String.valueOf(file.length())); MD5Hash hash = MD5FileUtils.readStoredMd5ForFile(file); if (hash != null) { response.setHeader(TransferFs...
[ "public", "static", "void", "setVerificationHeaders", "(", "HttpServletResponse", "response", ",", "File", "file", ")", "throws", "IOException", "{", "response", ".", "setHeader", "(", "TransferFsImage", ".", "CONTENT_LENGTH", ",", "String", ".", "valueOf", "(", "...
Set headers for content length, and, if available, md5. @throws IOException
[ "Set", "headers", "for", "content", "length", "and", "if", "available", "md5", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java#L168-L176
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/JCellButton.java
JCellButton.getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { """ Get the renderer for this location in the table. From the TableCellRenderer interface. @return this. """ if (value == null) this.setEnabled(false); ...
java
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (value == null) this.setEnabled(false); else this.setEnabled(true); if (hasFocus) { this.setOpaque(false); ...
[ "public", "Component", "getTableCellRendererComponent", "(", "JTable", "table", ",", "Object", "value", ",", "boolean", "isSelected", ",", "boolean", "hasFocus", ",", "int", "row", ",", "int", "column", ")", "{", "if", "(", "value", "==", "null", ")", "this"...
Get the renderer for this location in the table. From the TableCellRenderer interface. @return this.
[ "Get", "the", "renderer", "for", "this", "location", "in", "the", "table", ".", "From", "the", "TableCellRenderer", "interface", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/JCellButton.java#L93-L112
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/SslCodec.java
SslCodec.onAccepted
@Handler(channels = EncryptedChannel.class) public void onAccepted(Accepted event, IOSubchannel encryptedChannel) { """ Creates a new downstream connection as {@link LinkedIOSubchannel} of the network connection together with an {@link SSLEngine}. @param event the accepted event """ new PlainC...
java
@Handler(channels = EncryptedChannel.class) public void onAccepted(Accepted event, IOSubchannel encryptedChannel) { new PlainChannel(event, encryptedChannel); }
[ "@", "Handler", "(", "channels", "=", "EncryptedChannel", ".", "class", ")", "public", "void", "onAccepted", "(", "Accepted", "event", ",", "IOSubchannel", "encryptedChannel", ")", "{", "new", "PlainChannel", "(", "event", ",", "encryptedChannel", ")", ";", "}...
Creates a new downstream connection as {@link LinkedIOSubchannel} of the network connection together with an {@link SSLEngine}. @param event the accepted event
[ "Creates", "a", "new", "downstream", "connection", "as", "{", "@link", "LinkedIOSubchannel", "}", "of", "the", "network", "connection", "together", "with", "an", "{", "@link", "SSLEngine", "}", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/SslCodec.java#L155-L158
craftercms/commons
utilities/src/main/java/org/craftercms/commons/zip/ZipUtils.java
ZipUtils.addFolderToZip
private static void addFolderToZip(String path, File folder, ZipOutputStream zos) throws IOException { """ Adds a directory to the current zip @param path the path of the parent folder in the zip @param folder the directory to be added @param zos the current zip output stream @throws FileNotFoundExcept...
java
private static void addFolderToZip(String path, File folder, ZipOutputStream zos) throws IOException { String currentPath = StringUtils.isNotEmpty(path)? path + "/" + folder.getName(): folder.getName(); for (File file : folder.listFiles()) { if (file.isDirectory()) { addFold...
[ "private", "static", "void", "addFolderToZip", "(", "String", "path", ",", "File", "folder", ",", "ZipOutputStream", "zos", ")", "throws", "IOException", "{", "String", "currentPath", "=", "StringUtils", ".", "isNotEmpty", "(", "path", ")", "?", "path", "+", ...
Adds a directory to the current zip @param path the path of the parent folder in the zip @param folder the directory to be added @param zos the current zip output stream @throws FileNotFoundException @throws IOException
[ "Adds", "a", "directory", "to", "the", "current", "zip" ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/zip/ZipUtils.java#L135-L145
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/BamUtils.java
BamUtils.checkBamOrCramFile
public static void checkBamOrCramFile(InputStream is, String bamFileName) throws IOException { """ Check if the file is a sorted binary bam file. @param is Bam InputStream @param bamFileName Bam FileName @throws IOException """ checkBamOrCramFile(is, bamFileName, true); }
java
public static void checkBamOrCramFile(InputStream is, String bamFileName) throws IOException { checkBamOrCramFile(is, bamFileName, true); }
[ "public", "static", "void", "checkBamOrCramFile", "(", "InputStream", "is", ",", "String", "bamFileName", ")", "throws", "IOException", "{", "checkBamOrCramFile", "(", "is", ",", "bamFileName", ",", "true", ")", ";", "}" ]
Check if the file is a sorted binary bam file. @param is Bam InputStream @param bamFileName Bam FileName @throws IOException
[ "Check", "if", "the", "file", "is", "a", "sorted", "binary", "bam", "file", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/BamUtils.java#L122-L124
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/xml/XmlUtil.java
XmlUtil.printDocument
public static void printDocument(Node _docOrNode, OutputStream _outStream) throws IOException { """ Dump a {@link Document} or {@link Node}-compatible object to the given {@link OutputStream} (e.g. System.out). @param _docOrNode {@link Document} or {@link Node} object @param _outStream {@link OutputStream} to ...
java
public static void printDocument(Node _docOrNode, OutputStream _outStream) throws IOException { if (_docOrNode == null || _outStream == null) { throw new IOException("Cannot print (on) 'null' object"); } TransformerFactory tf = TransformerFactory.newInstance(); Transformer t...
[ "public", "static", "void", "printDocument", "(", "Node", "_docOrNode", ",", "OutputStream", "_outStream", ")", "throws", "IOException", "{", "if", "(", "_docOrNode", "==", "null", "||", "_outStream", "==", "null", ")", "{", "throw", "new", "IOException", "(",...
Dump a {@link Document} or {@link Node}-compatible object to the given {@link OutputStream} (e.g. System.out). @param _docOrNode {@link Document} or {@link Node} object @param _outStream {@link OutputStream} to print on @throws IOException on error
[ "Dump", "a", "{", "@link", "Document", "}", "or", "{", "@link", "Node", "}", "-", "compatible", "object", "to", "the", "given", "{", "@link", "OutputStream", "}", "(", "e", ".", "g", ".", "System", ".", "out", ")", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/xml/XmlUtil.java#L208-L229
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/adapters/ModelAdapter.java
ModelAdapter.setNewList
public ModelAdapter<Model, Item> setNewList(List<Model> items) { """ sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged @param items the new items to set """ return setNewList(items, false); }
java
public ModelAdapter<Model, Item> setNewList(List<Model> items) { return setNewList(items, false); }
[ "public", "ModelAdapter", "<", "Model", ",", "Item", ">", "setNewList", "(", "List", "<", "Model", ">", "items", ")", "{", "return", "setNewList", "(", "items", ",", "false", ")", ";", "}" ]
sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged @param items the new items to set
[ "sets", "a", "complete", "new", "list", "of", "items", "onto", "this", "adapter", "using", "the", "new", "list", ".", "Calls", "notifyDataSetChanged" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/adapters/ModelAdapter.java#L336-L338
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPOut.java
JBBPOut.Byte
public JBBPOut Byte(final String str, final JBBPBitOrder bitOrder) throws IOException { """ Write String chars trimmed to bytes, only the lower 8 bit will be saved per char code. @param str a String which chars should be trimmed to bytes and saved @param bitOrder the bit outOrder to save bytes @return t...
java
public JBBPOut Byte(final String str, final JBBPBitOrder bitOrder) throws IOException { assertNotEnded(); assertStringNotNull(str); if (this.processCommands) { for (int i = 0; i < str.length(); i++) { byte value = (byte) str.charAt(i); if (bitOrder == JBBPBitOrder.MSB0) { val...
[ "public", "JBBPOut", "Byte", "(", "final", "String", "str", ",", "final", "JBBPBitOrder", "bitOrder", ")", "throws", "IOException", "{", "assertNotEnded", "(", ")", ";", "assertStringNotNull", "(", "str", ")", ";", "if", "(", "this", ".", "processCommands", ...
Write String chars trimmed to bytes, only the lower 8 bit will be saved per char code. @param str a String which chars should be trimmed to bytes and saved @param bitOrder the bit outOrder to save bytes @return the DSL session @throws IOException it will be thrown for transport errors @since 1.1
[ "Write", "String", "chars", "trimmed", "to", "bytes", "only", "the", "lower", "8", "bit", "will", "be", "saved", "per", "char", "code", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPOut.java#L518-L531
bsblabs/embed-for-vaadin
com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/PropertiesHelper.java
PropertiesHelper.getBooleanProperty
public boolean getBooleanProperty(String key, boolean defaultValue) { """ Returns the boolean value for the specified property. If no such key is found, returns the <tt>defaultValue</tt> instead. @param key the key of the property @param defaultValue the default value if no such property is found @return a b...
java
public boolean getBooleanProperty(String key, boolean defaultValue) { final String value = properties.getProperty(key, String.valueOf(defaultValue)); return Boolean.valueOf(value); }
[ "public", "boolean", "getBooleanProperty", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "final", "String", "value", "=", "properties", ".", "getProperty", "(", "key", ",", "String", ".", "valueOf", "(", "defaultValue", ")", ")", ";", "retu...
Returns the boolean value for the specified property. If no such key is found, returns the <tt>defaultValue</tt> instead. @param key the key of the property @param defaultValue the default value if no such property is found @return a boolean value @see Properties#getProperty(String, String)
[ "Returns", "the", "boolean", "value", "for", "the", "specified", "property", ".", "If", "no", "such", "key", "is", "found", "returns", "the", "<tt", ">", "defaultValue<", "/", "tt", ">", "instead", "." ]
train
https://github.com/bsblabs/embed-for-vaadin/blob/f902e70def56ab54d287d2600f9c6eef9e66c225/com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/PropertiesHelper.java#L51-L54
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteConnection.java
SQLiteConnection.collectDbStats
void collectDbStats(ArrayList<DbStats> dbStatsList) { """ Collects statistics about database connection memory usage. @param dbStatsList The list to populate. """ // Get information about the main database. int lookaside = nativeGetDbLookaside(mConnectionPtr); long pageCount = 0; ...
java
void collectDbStats(ArrayList<DbStats> dbStatsList) { // Get information about the main database. int lookaside = nativeGetDbLookaside(mConnectionPtr); long pageCount = 0; long pageSize = 0; try { pageCount = executeForLong("PRAGMA page_count;", null, null); ...
[ "void", "collectDbStats", "(", "ArrayList", "<", "DbStats", ">", "dbStatsList", ")", "{", "// Get information about the main database.", "int", "lookaside", "=", "nativeGetDbLookaside", "(", "mConnectionPtr", ")", ";", "long", "pageCount", "=", "0", ";", "long", "pa...
Collects statistics about database connection memory usage. @param dbStatsList The list to populate.
[ "Collects", "statistics", "about", "database", "connection", "memory", "usage", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteConnection.java#L1115-L1156
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java
StyleUtils.createPolylineOptions
public static PolylineOptions createPolylineOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { """ Create new polyline options populated with the feature row style @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.DisplayMetri...
java
public static PolylineOptions createPolylineOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { PolylineOptions polylineOptions = new PolylineOptions(); setFeatureStyle(polylineOptions, geoPackage, featureRow, density); return polylineOptions; }
[ "public", "static", "PolylineOptions", "createPolylineOptions", "(", "GeoPackage", "geoPackage", ",", "FeatureRow", "featureRow", ",", "float", "density", ")", "{", "PolylineOptions", "polylineOptions", "=", "new", "PolylineOptions", "(", ")", ";", "setFeatureStyle", ...
Create new polyline options populated with the feature row style @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#density} @return polyline options populated with the feature style
[ "Create", "new", "polyline", "options", "populated", "with", "the", "feature", "row", "style" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L350-L356
googleads/googleads-java-lib
modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/AdManagerJaxWsHeaderHandler.java
AdManagerJaxWsHeaderHandler.setAuthenticationHeaders
private void setAuthenticationHeaders(Object soapClient, AdManagerSession adManagerSession) throws AuthenticationException { """ Sets the authentication headers. @param soapClient the SOAP client @param adManagerSession the Ad Manager session @throws AuthenticationException if there was a problem gettin...
java
private void setAuthenticationHeaders(Object soapClient, AdManagerSession adManagerSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adManagerSession); }
[ "private", "void", "setAuthenticationHeaders", "(", "Object", "soapClient", ",", "AdManagerSession", "adManagerSession", ")", "throws", "AuthenticationException", "{", "authorizationHeaderHandler", ".", "setAuthorization", "(", "soapClient", ",", "adManagerSession", ")", ";...
Sets the authentication headers. @param soapClient the SOAP client @param adManagerSession the Ad Manager session @throws AuthenticationException if there was a problem getting/setting the header
[ "Sets", "the", "authentication", "headers", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/AdManagerJaxWsHeaderHandler.java#L108-L111