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
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/QueryParsers.java
QueryParsers.registerParser
public void registerParser(Class<? extends SolrDataQuery> clazz, QueryParser parser) { """ Register additional {@link QueryParser} for {@link SolrQuery} @param clazz @param parser """ Assert.notNull(parser, "Cannot register 'null' parser."); parserPairs.add(0, new QueryParserPair(clazz, parser)); cac...
java
public void registerParser(Class<? extends SolrDataQuery> clazz, QueryParser parser) { Assert.notNull(parser, "Cannot register 'null' parser."); parserPairs.add(0, new QueryParserPair(clazz, parser)); cache.clear(); }
[ "public", "void", "registerParser", "(", "Class", "<", "?", "extends", "SolrDataQuery", ">", "clazz", ",", "QueryParser", "parser", ")", "{", "Assert", ".", "notNull", "(", "parser", ",", "\"Cannot register 'null' parser.\"", ")", ";", "parserPairs", ".", "add",...
Register additional {@link QueryParser} for {@link SolrQuery} @param clazz @param parser
[ "Register", "additional", "{", "@link", "QueryParser", "}", "for", "{", "@link", "SolrQuery", "}" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/QueryParsers.java#L93-L97
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/MetricName.java
MetricName.tagged
public MetricName tagged(Map<String, String> add) { """ Add tags to a metric name and return the newly created MetricName. @param add Tags to add. @return A newly created metric name with the specified tags associated with it. """ final Map<String, String> tags = new HashMap<>(add); tags.pu...
java
public MetricName tagged(Map<String, String> add) { final Map<String, String> tags = new HashMap<>(add); tags.putAll(this.tags); return new MetricName(key, tags); }
[ "public", "MetricName", "tagged", "(", "Map", "<", "String", ",", "String", ">", "add", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "tags", "=", "new", "HashMap", "<>", "(", "add", ")", ";", "tags", ".", "putAll", "(", "this", ".",...
Add tags to a metric name and return the newly created MetricName. @param add Tags to add. @return A newly created metric name with the specified tags associated with it.
[ "Add", "tags", "to", "a", "metric", "name", "and", "return", "the", "newly", "created", "MetricName", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/MetricName.java#L104-L108
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.getJob
public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException { """ Get single job in a project. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the job for @p...
java
public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId); return (response.readEntity(Job.class)); }
[ "public", "Job", "getJob", "(", "Object", "projectIdOrPath", ",", "int", "jobId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPat...
Get single job in a project. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the job for @param jobId the job ID to get @return a single job for the specified project ID @throws GitLabAp...
[ "Get", "single", "job", "in", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L175-L178
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/PathPatternUtils.java
PathPatternUtils.acceptName
public static boolean acceptName(String pattern, String absPath) { """ Returns <code>true</code> if a specified path is matched by pattern and has the same depth in term of JCR path. @param pattern pattern for node path @param absPath node absolute path @return a <code>boolean</code>. """ absPath...
java
public static boolean acceptName(String pattern, String absPath) { absPath = normalizePath(absPath); pattern = adopt2JavaPattern(pattern); return absPath.matches(pattern); }
[ "public", "static", "boolean", "acceptName", "(", "String", "pattern", ",", "String", "absPath", ")", "{", "absPath", "=", "normalizePath", "(", "absPath", ")", ";", "pattern", "=", "adopt2JavaPattern", "(", "pattern", ")", ";", "return", "absPath", ".", "ma...
Returns <code>true</code> if a specified path is matched by pattern and has the same depth in term of JCR path. @param pattern pattern for node path @param absPath node absolute path @return a <code>boolean</code>.
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "a", "specified", "path", "is", "matched", "by", "pattern", "and", "has", "the", "same", "depth", "in", "term", "of", "JCR", "path", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/PathPatternUtils.java#L66-L72
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java
H2GISFunctions.getBooleanProperty
private static boolean getBooleanProperty(Function function, String propertyKey, boolean defaultValue) { """ Return a boolean property of the function @param function @param propertyKey @param defaultValue @return """ Object value = function.getProperty(propertyKey); return value instance...
java
private static boolean getBooleanProperty(Function function, String propertyKey, boolean defaultValue) { Object value = function.getProperty(propertyKey); return value instanceof Boolean ? (Boolean)value : defaultValue; }
[ "private", "static", "boolean", "getBooleanProperty", "(", "Function", "function", ",", "String", "propertyKey", ",", "boolean", "defaultValue", ")", "{", "Object", "value", "=", "function", ".", "getProperty", "(", "propertyKey", ")", ";", "return", "value", "i...
Return a boolean property of the function @param function @param propertyKey @param defaultValue @return
[ "Return", "a", "boolean", "property", "of", "the", "function" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java#L430-L433
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTileQueryIndex
public BufferedImage drawTileQueryIndex(int x, int y, int zoom) { """ Draw a tile image from the x, y, and zoom level by querying features in the tile location @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null """ // Get the web mercator bounding box ...
java
public BufferedImage drawTileQueryIndex(int x, int y, int zoom) { // Get the web mercator bounding box BoundingBox webMercatorBoundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for the geometry count matching the bounds in the index long tile...
[ "public", "BufferedImage", "drawTileQueryIndex", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "// Get the web mercator bounding box", "BoundingBox", "webMercatorBoundingBox", "=", "TileBoundingBoxUtils", ".", "getWebMercatorBoundingBox", "(", "x", ","...
Draw a tile image from the x, y, and zoom level by querying features in the tile location @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level", "by", "querying", "features", "in", "the", "tile", "location" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L947-L990
CenturyLinkCloud/clc-java-sdk
sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/domain/ip/Subnet.java
Subnet.getCidr
public String getCidr() { """ Returns IP address in CIDR format. If specified {@code cidr} - returns {@code cidr} value. If specified {@code ipAddress} and {@code mask} - returns calculated IP address. If specified {@code ipAddress} and {@code cidrMask} - returns calculated IP address. Otherwise returns {@co...
java
public String getCidr() { if (cidr != null) { return cidr; } if (ipAddress != null) { if (mask != null) { return new SubnetUtils(ipAddress, mask).getCidrSignature(); } if (cidrMask != null) { return new SubnetUtils(i...
[ "public", "String", "getCidr", "(", ")", "{", "if", "(", "cidr", "!=", "null", ")", "{", "return", "cidr", ";", "}", "if", "(", "ipAddress", "!=", "null", ")", "{", "if", "(", "mask", "!=", "null", ")", "{", "return", "new", "SubnetUtils", "(", "...
Returns IP address in CIDR format. If specified {@code cidr} - returns {@code cidr} value. If specified {@code ipAddress} and {@code mask} - returns calculated IP address. If specified {@code ipAddress} and {@code cidrMask} - returns calculated IP address. Otherwise returns {@code null} @return ip address string repr...
[ "Returns", "IP", "address", "in", "CIDR", "format", "." ]
train
https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/domain/ip/Subnet.java#L72-L85
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionRelPersistenceImpl.java
CPDefinitionOptionRelPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp definition option rels where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPDefinitionOptionRel cpDefinitionOptionRel : findByUuid_C(uuid, ...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDefinitionOptionRel cpDefinitionOptionRel : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionOptionRel); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPDefinitionOptionRel", "cpDefinitionOptionRel", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",...
Removes all the cp definition option rels where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "definition", "option", "rels", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionRelPersistenceImpl.java#L1413-L1419
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/Buffer.java
Buffer.readStringLengthEncoded
public String readStringLengthEncoded(final Charset charset) { """ Reads length-encoded string. @param charset the charset to use, for example ASCII @return the read string """ int length = (int) getLengthEncodedNumeric(); String string = new String(buf, position, length, charset); position += ...
java
public String readStringLengthEncoded(final Charset charset) { int length = (int) getLengthEncodedNumeric(); String string = new String(buf, position, length, charset); position += length; return string; }
[ "public", "String", "readStringLengthEncoded", "(", "final", "Charset", "charset", ")", "{", "int", "length", "=", "(", "int", ")", "getLengthEncodedNumeric", "(", ")", ";", "String", "string", "=", "new", "String", "(", "buf", ",", "position", ",", "length"...
Reads length-encoded string. @param charset the charset to use, for example ASCII @return the read string
[ "Reads", "length", "-", "encoded", "string", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/Buffer.java#L121-L126
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.notReadyForMedia
public ApiSuccessResponse notReadyForMedia(String mediatype, NotReadyForMediaData notReadyForMediaData) throws ApiException { """ Set the agent state to Not Ready Set the current agent&#39;s state to Not Ready on the specified media channel. @param mediatype The media channel. (required) @param notReadyForMedia...
java
public ApiSuccessResponse notReadyForMedia(String mediatype, NotReadyForMediaData notReadyForMediaData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = notReadyForMediaWithHttpInfo(mediatype, notReadyForMediaData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "notReadyForMedia", "(", "String", "mediatype", ",", "NotReadyForMediaData", "notReadyForMediaData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "notReadyForMediaWithHttpInfo", "(", "mediaty...
Set the agent state to Not Ready Set the current agent&#39;s state to Not Ready on the specified media channel. @param mediatype The media channel. (required) @param notReadyForMediaData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the resp...
[ "Set", "the", "agent", "state", "to", "Not", "Ready", "Set", "the", "current", "agent&#39", ";", "s", "state", "to", "Not", "Ready", "on", "the", "specified", "media", "channel", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L2978-L2981
facebookarchive/hadoop-20
src/core/org/apache/hadoop/http/HtmlQuoting.java
HtmlQuoting.needsQuoting
public static boolean needsQuoting(byte[] data, int off, int len) { """ Does the given string need to be quoted? @param data the string to check @param off the starting position @param len the number of bytes to check @return does the string contain any of the active html characters? """ for(int i=off;...
java
public static boolean needsQuoting(byte[] data, int off, int len) { for(int i=off; i< off+len; ++i) { switch(data[i]) { case '&': case '<': case '>': case '\'': case '"': return true; default: break; } } return false; }
[ "public", "static", "boolean", "needsQuoting", "(", "byte", "[", "]", "data", ",", "int", "off", ",", "int", "len", ")", "{", "for", "(", "int", "i", "=", "off", ";", "i", "<", "off", "+", "len", ";", "++", "i", ")", "{", "switch", "(", "data",...
Does the given string need to be quoted? @param data the string to check @param off the starting position @param len the number of bytes to check @return does the string contain any of the active html characters?
[ "Does", "the", "given", "string", "need", "to", "be", "quoted?" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/http/HtmlQuoting.java#L41-L55
seam/faces
impl/src/main/java/org/jboss/seam/faces/security/SecurityPhaseListener.java
SecurityPhaseListener.performObservation
private void performObservation(PhaseEvent event, PhaseIdType phaseIdType) { """ Inspect the annotations in the ViewConfigStore, enforcing any restrictions applicable to this phase @param event @param phaseIdType """ UIViewRoot viewRoot = (UIViewRoot) event.getFacesContext().getViewRoot(); ...
java
private void performObservation(PhaseEvent event, PhaseIdType phaseIdType) { UIViewRoot viewRoot = (UIViewRoot) event.getFacesContext().getViewRoot(); List<? extends Annotation> restrictionsForPhase = getRestrictionsForPhase(phaseIdType, viewRoot.getViewId()); if (restrictionsForPhase != null) {...
[ "private", "void", "performObservation", "(", "PhaseEvent", "event", ",", "PhaseIdType", "phaseIdType", ")", "{", "UIViewRoot", "viewRoot", "=", "(", "UIViewRoot", ")", "event", ".", "getFacesContext", "(", ")", ".", "getViewRoot", "(", ")", ";", "List", "<", ...
Inspect the annotations in the ViewConfigStore, enforcing any restrictions applicable to this phase @param event @param phaseIdType
[ "Inspect", "the", "annotations", "in", "the", "ViewConfigStore", "enforcing", "any", "restrictions", "applicable", "to", "this", "phase" ]
train
https://github.com/seam/faces/blob/2fdedbc7070318c2c58bfffb8a26f1ea1d0ee1e3/impl/src/main/java/org/jboss/seam/faces/security/SecurityPhaseListener.java#L150-L157
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel_binding.java
dnspolicylabel_binding.get
public static dnspolicylabel_binding get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch dnspolicylabel_binding resource of given name . """ dnspolicylabel_binding obj = new dnspolicylabel_binding(); obj.set_labelname(labelname); dnspolicylabel_binding response = (dn...
java
public static dnspolicylabel_binding get(nitro_service service, String labelname) throws Exception{ dnspolicylabel_binding obj = new dnspolicylabel_binding(); obj.set_labelname(labelname); dnspolicylabel_binding response = (dnspolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "dnspolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "dnspolicylabel_binding", "obj", "=", "new", "dnspolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", "(",...
Use this API to fetch dnspolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "dnspolicylabel_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel_binding.java#L114-L119
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/accounts/A_CmsOrgUnitDialog.java
A_CmsOrgUnitDialog.setResourcesInBean
public void setResourcesInBean(CmsOrgUnitBean orgUnitBean, List<CmsResource> resources) { """ Sets the resources for the given orgUnitBean.<p> @param orgUnitBean the <code>CmsOrgUnitBean</code> object @param resources the list of resources """ List<String> resourceNames = new ArrayList<String>(); ...
java
public void setResourcesInBean(CmsOrgUnitBean orgUnitBean, List<CmsResource> resources) { List<String> resourceNames = new ArrayList<String>(); Iterator<CmsResource> itResources = resources.iterator(); while (itResources.hasNext()) { CmsResource resource = itResources.next(); ...
[ "public", "void", "setResourcesInBean", "(", "CmsOrgUnitBean", "orgUnitBean", ",", "List", "<", "CmsResource", ">", "resources", ")", "{", "List", "<", "String", ">", "resourceNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "Iterator", "<...
Sets the resources for the given orgUnitBean.<p> @param orgUnitBean the <code>CmsOrgUnitBean</code> object @param resources the list of resources
[ "Sets", "the", "resources", "for", "the", "given", "orgUnitBean", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/accounts/A_CmsOrgUnitDialog.java#L120-L129
calimero-project/calimero-core
src/tuwien/auto/calimero/mgmt/ManagementClientImpl.java
ManagementClientImpl.readProperty2
List<byte[]> readProperty2(final Destination dst, final int objIndex, final int propertyId, final int start, final int elements) throws KNXTimeoutException, KNXRemoteException, KNXDisconnectException, KNXLinkClosedException, InterruptedException { """ as readProperty, but collects all responses until response ...
java
List<byte[]> readProperty2(final Destination dst, final int objIndex, final int propertyId, final int start, final int elements) throws KNXTimeoutException, KNXRemoteException, KNXDisconnectException, KNXLinkClosedException, InterruptedException { return readProperty(dst, objIndex, propertyId, start, elements, f...
[ "List", "<", "byte", "[", "]", ">", "readProperty2", "(", "final", "Destination", "dst", ",", "final", "int", "objIndex", ",", "final", "int", "propertyId", ",", "final", "int", "start", ",", "final", "int", "elements", ")", "throws", "KNXTimeoutException", ...
as readProperty, but collects all responses until response timeout is reached
[ "as", "readProperty", "but", "collects", "all", "responses", "until", "response", "timeout", "is", "reached" ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/mgmt/ManagementClientImpl.java#L624-L629
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.hostAndPorts
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key) { """ Method is used to parse hosts and ports @param config @param key @return """ return hostAndPorts(config, key, null); }
java
public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key) { return hostAndPorts(config, key, null); }
[ "public", "static", "List", "<", "HostAndPort", ">", "hostAndPorts", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "return", "hostAndPorts", "(", "config", ",", "key", ",", "null", ")", ";", "}" ]
Method is used to parse hosts and ports @param config @param key @return
[ "Method", "is", "used", "to", "parse", "hosts", "and", "ports" ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L199-L201
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/core/jackson/JAXBAnnotationsHelper.java
JAXBAnnotationsHelper.apply
public static void apply(Annotated member, Schema property) { """ Applies annotations to property's {@link XML} definition. @param member annotations provider @param property property instance to be updated """ if (member.hasAnnotation(XmlElementWrapper.class) || member.hasAnnotation(XmlElement.cla...
java
public static void apply(Annotated member, Schema property) { if (member.hasAnnotation(XmlElementWrapper.class) || member.hasAnnotation(XmlElement.class)) { applyElement(member, property); } else if (member.hasAnnotation(XmlAttribute.class) && isAttributeAllowed(property)) { appl...
[ "public", "static", "void", "apply", "(", "Annotated", "member", ",", "Schema", "property", ")", "{", "if", "(", "member", ".", "hasAnnotation", "(", "XmlElementWrapper", ".", "class", ")", "||", "member", ".", "hasAnnotation", "(", "XmlElement", ".", "class...
Applies annotations to property's {@link XML} definition. @param member annotations provider @param property property instance to be updated
[ "Applies", "annotations", "to", "property", "s", "{", "@link", "XML", "}", "definition", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/core/jackson/JAXBAnnotationsHelper.java#L41-L47
DDTH/ddth-tsc
ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/RedisCounterFactory.java
RedisCounterFactory.newJedisPool
public static JedisPool newJedisPool(String hostAndPort, String password) { """ Creates a new {@link JedisPool}, with default database and timeout. @param hostAndPort @param password @return @sincec 0.7.0 """ return newJedisPool(hostAndPort, password, Protocol.DEFAULT_DATABASE, DEFAULT_TIMEOUT_MS...
java
public static JedisPool newJedisPool(String hostAndPort, String password) { return newJedisPool(hostAndPort, password, Protocol.DEFAULT_DATABASE, DEFAULT_TIMEOUT_MS); }
[ "public", "static", "JedisPool", "newJedisPool", "(", "String", "hostAndPort", ",", "String", "password", ")", "{", "return", "newJedisPool", "(", "hostAndPort", ",", "password", ",", "Protocol", ".", "DEFAULT_DATABASE", ",", "DEFAULT_TIMEOUT_MS", ")", ";", "}" ]
Creates a new {@link JedisPool}, with default database and timeout. @param hostAndPort @param password @return @sincec 0.7.0
[ "Creates", "a", "new", "{", "@link", "JedisPool", "}", "with", "default", "database", "and", "timeout", "." ]
train
https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/RedisCounterFactory.java#L35-L37
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/ant/WriteDataSqlToFileCommand.java
WriteDataSqlToFileCommand.readSingleDataFile
private void readSingleDataFile(Task task, DdlUtilsDataHandling handling, File dataFile, Writer output) { """ Reads a single data file. @param task The parent task @param reader The data reader @param schemaFile The schema file """ if (!dataFile.exists()) { task.lo...
java
private void readSingleDataFile(Task task, DdlUtilsDataHandling handling, File dataFile, Writer output) { if (!dataFile.exists()) { task.log("Could not find data file "+dataFile.getAbsolutePath(), Project.MSG_ERR); } else if (!dataFile.isFile()) { ...
[ "private", "void", "readSingleDataFile", "(", "Task", "task", ",", "DdlUtilsDataHandling", "handling", ",", "File", "dataFile", ",", "Writer", "output", ")", "{", "if", "(", "!", "dataFile", ".", "exists", "(", ")", ")", "{", "task", ".", "log", "(", "\"...
Reads a single data file. @param task The parent task @param reader The data reader @param schemaFile The schema file
[ "Reads", "a", "single", "data", "file", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/WriteDataSqlToFileCommand.java#L132-L165
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java
GenomicsDataSourceFactory.configure
public void configure(String rootUrl, Settings settings) { """ Sets the settings for a given root url, that will be used for creating the data source. Has no effect if the data source has already been created. """ Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) {...
java
public void configure(String rootUrl, Settings settings) { Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) { data = new Data<Read, ReadGroupSet, Reference>(settings, null); dataSources.put(rootUrl, data); } else { data.settings = settings; } }
[ "public", "void", "configure", "(", "String", "rootUrl", ",", "Settings", "settings", ")", "{", "Data", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "data", "=", "dataSources", ".", "get", "(", "rootUrl", ")", ";", "if", "(", "data", "==", ...
Sets the settings for a given root url, that will be used for creating the data source. Has no effect if the data source has already been created.
[ "Sets", "the", "settings", "for", "a", "given", "root", "url", "that", "will", "be", "used", "for", "creating", "the", "data", "source", ".", "Has", "no", "effect", "if", "the", "data", "source", "has", "already", "been", "created", "." ]
train
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java#L66-L74
OpenLiberty/open-liberty
dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/ShadowClassLoader.java
ShadowClassLoader.definePackage
@FFDCIgnore(IllegalArgumentException.class) private void definePackage(final ByteResourceInformation classBytesResourceInformation, String packageName) { """ Defines the package for this class by trying to load the manifest for the package and if that fails just sets all of the package properties to <code>null...
java
@FFDCIgnore(IllegalArgumentException.class) private void definePackage(final ByteResourceInformation classBytesResourceInformation, String packageName) { /* * We don't extend URL classloader so we automatically pass the manifest from the JAR to our supertype, still try to get hold of it though so t...
[ "@", "FFDCIgnore", "(", "IllegalArgumentException", ".", "class", ")", "private", "void", "definePackage", "(", "final", "ByteResourceInformation", "classBytesResourceInformation", ",", "String", "packageName", ")", "{", "/*\n * We don't extend URL classloader so we aut...
Defines the package for this class by trying to load the manifest for the package and if that fails just sets all of the package properties to <code>null</code>. @param classBytesResourceInformation @param packageName
[ "Defines", "the", "package", "for", "this", "class", "by", "trying", "to", "load", "the", "manifest", "for", "the", "package", "and", "if", "that", "fails", "just", "sets", "all", "of", "the", "package", "properties", "to", "<code", ">", "null<", "/", "c...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/ShadowClassLoader.java#L150-L201
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuMipmappedArrayGetLevel
public static int cuMipmappedArrayGetLevel(CUarray pLevelArray, CUmipmappedArray hMipmappedArray, int level) { """ Gets a mipmap level of a CUDA mipmapped array. <pre> CUresult cuMipmappedArrayGetLevel ( CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level ) </pre> <div> <p>Gets a ...
java
public static int cuMipmappedArrayGetLevel(CUarray pLevelArray, CUmipmappedArray hMipmappedArray, int level) { return checkResult(cuMipmappedArrayGetLevelNative(pLevelArray, hMipmappedArray, level)); }
[ "public", "static", "int", "cuMipmappedArrayGetLevel", "(", "CUarray", "pLevelArray", ",", "CUmipmappedArray", "hMipmappedArray", ",", "int", "level", ")", "{", "return", "checkResult", "(", "cuMipmappedArrayGetLevelNative", "(", "pLevelArray", ",", "hMipmappedArray", "...
Gets a mipmap level of a CUDA mipmapped array. <pre> CUresult cuMipmappedArrayGetLevel ( CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level ) </pre> <div> <p>Gets a mipmap level of a CUDA mipmapped array. Returns in <tt>*pLevelArray</tt> a CUDA array that represents a single mipmap level of t...
[ "Gets", "a", "mipmap", "level", "of", "a", "CUDA", "mipmapped", "array", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L9567-L9570
tdomzal/junit-docker-rule
src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java
DockerRuleBuilder.addLabel
public DockerRuleBuilder addLabel(String name, String value) { """ Add container label (call multiple times to add more than one). @param name Label name. @param value Label value. """ labels.put(name, value); return this; }
java
public DockerRuleBuilder addLabel(String name, String value) { labels.put(name, value); return this; }
[ "public", "DockerRuleBuilder", "addLabel", "(", "String", "name", ",", "String", "value", ")", "{", "labels", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add container label (call multiple times to add more than one). @param name Label name. @param value Label value.
[ "Add", "container", "label", "(", "call", "multiple", "times", "to", "add", "more", "than", "one", ")", "." ]
train
https://github.com/tdomzal/junit-docker-rule/blob/5a0ba2fd095d201530d3f9e614bc5e88d0afaeb2/src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java#L482-L485
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java
InvokerTask.serializeResult
@FFDCIgnore(Throwable.class) @Sensitive private byte[] serializeResult(Object result, ClassLoader loader) throws IOException { """ Utility method that serializes a task result, or the failure that occurred when attempting to serialize the task result. @param result non-null task result @param loader c...
java
@FFDCIgnore(Throwable.class) @Sensitive private byte[] serializeResult(Object result, ClassLoader loader) throws IOException { try { return persistentExecutor.serialize(result); } catch (Throwable x) { return persistentExecutor.serialize(new TaskFailure(x, loader, persist...
[ "@", "FFDCIgnore", "(", "Throwable", ".", "class", ")", "@", "Sensitive", "private", "byte", "[", "]", "serializeResult", "(", "Object", "result", ",", "ClassLoader", "loader", ")", "throws", "IOException", "{", "try", "{", "return", "persistentExecutor", ".",...
Utility method that serializes a task result, or the failure that occurred when attempting to serialize the task result. @param result non-null task result @param loader class loader that can deserialize the task and result. @return serialized bytes
[ "Utility", "method", "that", "serializes", "a", "task", "result", "or", "the", "failure", "that", "occurred", "when", "attempting", "to", "serialize", "the", "task", "result", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java#L605-L613
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java
JDBC4CallableStatement.setBlob
@Override public void setBlob(String parameterName, Blob x) throws SQLException { """ Sets the designated parameter to the given java.sql.Blob object. """ checkClosed(); throw SQLError.noSupport(); }
java
@Override public void setBlob(String parameterName, Blob x) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setBlob", "(", "String", "parameterName", ",", "Blob", "x", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.sql.Blob object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "Blob", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java#L623-L628
duracloud/duracloud
irodsstorageprovider/src/main/java/org/duracloud/irodsstorage/IrodsStorageProvider.java
IrodsStorageProvider.addContent
@Override public String addContent(String spaceId, String contentId, String contentMimeType, Map<String, String> userProperties, long contentSize, String contentChecksum, ...
java
@Override public String addContent(String spaceId, String contentId, String contentMimeType, Map<String, String> userProperties, long contentSize, String contentChecksum, ...
[ "@", "Override", "public", "String", "addContent", "(", "String", "spaceId", ",", "String", "contentId", ",", "String", "contentMimeType", ",", "Map", "<", "String", ",", "String", ">", "userProperties", ",", "long", "contentSize", ",", "String", "contentChecksu...
Add new content to irods, content path is baseDirectory /spaceId/contentId @param spaceId @param contentId @param contentMimeType @param contentSize may be set to 0 in some cases (entry through admin client) @param contentChecksum @param content @return
[ "Add", "new", "content", "to", "irods", "content", "path", "is", "baseDirectory", "/", "spaceId", "/", "contentId" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/irodsstorageprovider/src/main/java/org/duracloud/irodsstorage/IrodsStorageProvider.java#L306-L359
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getUntilLastExcl
@Nullable public static String getUntilLastExcl (@Nullable final String sStr, final char cSearch) { """ Get everything from the string up to and excluding first the passed char. @param sStr The source string. May be <code>null</code>. @param cSearch The character to search. @return <code>null</code> if th...
java
@Nullable public static String getUntilLastExcl (@Nullable final String sStr, final char cSearch) { return _getUntilLast (sStr, cSearch, false); }
[ "@", "Nullable", "public", "static", "String", "getUntilLastExcl", "(", "@", "Nullable", "final", "String", "sStr", ",", "final", "char", "cSearch", ")", "{", "return", "_getUntilLast", "(", "sStr", ",", "cSearch", ",", "false", ")", ";", "}" ]
Get everything from the string up to and excluding first the passed char. @param sStr The source string. May be <code>null</code>. @param cSearch The character to search. @return <code>null</code> if the passed string does not contain the search character.
[ "Get", "everything", "from", "the", "string", "up", "to", "and", "excluding", "first", "the", "passed", "char", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4861-L4865
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java
FileOutputCommitter.commitTask
public void commitTask(TaskAttemptContext context) throws IOException { """ Move the files from the work directory to the job output directory @param context the task context """ TaskAttemptID attemptId = context.getTaskAttemptID(); if (workPath != null) { context.progress(); if (output...
java
public void commitTask(TaskAttemptContext context) throws IOException { TaskAttemptID attemptId = context.getTaskAttemptID(); if (workPath != null) { context.progress(); if (outputFileSystem.exists(workPath)) { // Move the task outputs to their final place moveTaskOutputs(context,...
[ "public", "void", "commitTask", "(", "TaskAttemptContext", "context", ")", "throws", "IOException", "{", "TaskAttemptID", "attemptId", "=", "context", ".", "getTaskAttemptID", "(", ")", ";", "if", "(", "workPath", "!=", "null", ")", "{", "context", ".", "progr...
Move the files from the work directory to the job output directory @param context the task context
[ "Move", "the", "files", "from", "the", "work", "directory", "to", "the", "job", "output", "directory" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java#L161-L178
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/hll/DirectCouponList.java
DirectCouponList.newInstance
static DirectCouponList newInstance(final int lgConfigK, final TgtHllType tgtHllType, final WritableMemory dstMem) { """ Standard factory for new DirectCouponList. This initializes the given WritableMemory. @param lgConfigK the configured Lg K @param tgtHllType the configured HLL target @param dstMem the...
java
static DirectCouponList newInstance(final int lgConfigK, final TgtHllType tgtHllType, final WritableMemory dstMem) { insertPreInts(dstMem, LIST_PREINTS); insertSerVer(dstMem); insertFamilyId(dstMem); insertLgK(dstMem, lgConfigK); insertLgArr(dstMem, LG_INIT_LIST_SIZE); insertFlags(dstMem, ...
[ "static", "DirectCouponList", "newInstance", "(", "final", "int", "lgConfigK", ",", "final", "TgtHllType", "tgtHllType", ",", "final", "WritableMemory", "dstMem", ")", "{", "insertPreInts", "(", "dstMem", ",", "LIST_PREINTS", ")", ";", "insertSerVer", "(", "dstMem...
Standard factory for new DirectCouponList. This initializes the given WritableMemory. @param lgConfigK the configured Lg K @param tgtHllType the configured HLL target @param dstMem the destination memory for the sketch. @return a new DirectCouponList
[ "Standard", "factory", "for", "new", "DirectCouponList", ".", "This", "initializes", "the", "given", "WritableMemory", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hll/DirectCouponList.java#L86-L97
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectX
public int getObjectX(int groupID, int objectID) { """ Returns the x-coordinate of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The x-coordinate of an object, or -1, when error occurred """ if (groupID >= 0 && groupID < objectGrou...
java
public int getObjectX(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); return object.x; ...
[ "public", "int", "getObjectX", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "objectG...
Returns the x-coordinate of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The x-coordinate of an object, or -1, when error occurred
[ "Returns", "the", "x", "-", "coordinate", "of", "a", "specific", "object", "from", "a", "specific", "group", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L846-L855
amzn/ion-java
src/com/amazon/ion/impl/lite/IonLobLite.java
IonLobLite.lobHashCode
protected int lobHashCode(int seed, SymbolTableProvider symbolTableProvider) { """ Calculate LOB hash code as XOR of seed with CRC-32 of the LOB data. This distinguishes BLOBs from CLOBs @param seed Seed value @return hash code """ int result = seed; if (!isNullValue()) { CRC32...
java
protected int lobHashCode(int seed, SymbolTableProvider symbolTableProvider) { int result = seed; if (!isNullValue()) { CRC32 crc = new CRC32(); crc.update(getBytes()); result ^= (int) crc.getValue(); } return hashTypeAnnotations(result, symbolT...
[ "protected", "int", "lobHashCode", "(", "int", "seed", ",", "SymbolTableProvider", "symbolTableProvider", ")", "{", "int", "result", "=", "seed", ";", "if", "(", "!", "isNullValue", "(", ")", ")", "{", "CRC32", "crc", "=", "new", "CRC32", "(", ")", ";", ...
Calculate LOB hash code as XOR of seed with CRC-32 of the LOB data. This distinguishes BLOBs from CLOBs @param seed Seed value @return hash code
[ "Calculate", "LOB", "hash", "code", "as", "XOR", "of", "seed", "with", "CRC", "-", "32", "of", "the", "LOB", "data", ".", "This", "distinguishes", "BLOBs", "from", "CLOBs" ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/IonLobLite.java#L55-L66
zxing/zxing
core/src/main/java/com/google/zxing/aztec/detector/Detector.java
Detector.expandSquare
private static ResultPoint[] expandSquare(ResultPoint[] cornerPoints, int oldSide, int newSide) { """ Expand the square represented by the corner points by pushing out equally in all directions @param cornerPoints the corners of the square, which has the bull's eye at its center @param oldSide the original len...
java
private static ResultPoint[] expandSquare(ResultPoint[] cornerPoints, int oldSide, int newSide) { float ratio = newSide / (2.0f * oldSide); float dx = cornerPoints[0].getX() - cornerPoints[2].getX(); float dy = cornerPoints[0].getY() - cornerPoints[2].getY(); float centerx = (cornerPoints[0].getX() + co...
[ "private", "static", "ResultPoint", "[", "]", "expandSquare", "(", "ResultPoint", "[", "]", "cornerPoints", ",", "int", "oldSide", ",", "int", "newSide", ")", "{", "float", "ratio", "=", "newSide", "/", "(", "2.0f", "*", "oldSide", ")", ";", "float", "dx...
Expand the square represented by the corner points by pushing out equally in all directions @param cornerPoints the corners of the square, which has the bull's eye at its center @param oldSide the original length of the side of the square in the target bit matrix @param newSide the new length of the size of the square...
[ "Expand", "the", "square", "represented", "by", "the", "corner", "points", "by", "pushing", "out", "equally", "in", "all", "directions" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/aztec/detector/Detector.java#L527-L545
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/LocalDirAllocator.java
LocalDirAllocator.getLocalPathForWrite
public Path getLocalPathForWrite(String pathStr, Configuration conf) throws IOException { """ Get a path from the local FS. This method should be used if the size of the file is not known apriori. We go round-robin over the set of disks (via the configured dirs) and return the first complete path where w...
java
public Path getLocalPathForWrite(String pathStr, Configuration conf) throws IOException { return getLocalPathForWrite(pathStr, -1, conf); }
[ "public", "Path", "getLocalPathForWrite", "(", "String", "pathStr", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "return", "getLocalPathForWrite", "(", "pathStr", ",", "-", "1", ",", "conf", ")", ";", "}" ]
Get a path from the local FS. This method should be used if the size of the file is not known apriori. We go round-robin over the set of disks (via the configured dirs) and return the first complete path where we could create the parent directory of the passed path. @param pathStr the requested path (this will be creat...
[ "Get", "a", "path", "from", "the", "local", "FS", ".", "This", "method", "should", "be", "used", "if", "the", "size", "of", "the", "file", "is", "not", "known", "apriori", ".", "We", "go", "round", "-", "robin", "over", "the", "set", "of", "disks", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/LocalDirAllocator.java#L107-L110
jenkinsci/jenkins
core/src/main/java/jenkins/util/Timer.java
Timer.get
@Nonnull public static synchronized ScheduledExecutorService get() { """ Returns the scheduled executor service used by all timed tasks in Jenkins. @return the single {@link ScheduledExecutorService}. """ if (executorService == null) { // corePoolSize is set to 10, but will only be c...
java
@Nonnull public static synchronized ScheduledExecutorService get() { if (executorService == null) { // corePoolSize is set to 10, but will only be created if needed. // ScheduledThreadPoolExecutor "acts as a fixed-sized pool using corePoolSize threads" // TODO consider al...
[ "@", "Nonnull", "public", "static", "synchronized", "ScheduledExecutorService", "get", "(", ")", "{", "if", "(", "executorService", "==", "null", ")", "{", "// corePoolSize is set to 10, but will only be created if needed.", "// ScheduledThreadPoolExecutor \"acts as a fixed-sized...
Returns the scheduled executor service used by all timed tasks in Jenkins. @return the single {@link ScheduledExecutorService}.
[ "Returns", "the", "scheduled", "executor", "service", "used", "by", "all", "timed", "tasks", "in", "Jenkins", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/Timer.java#L41-L50
threerings/narya
core/src/main/java/com/threerings/presents/dobj/DObject.java
DObject.updateSet
public void updateSet (String setName, DSet.Entry entry) { """ Request to have the specified item updated in the specified DSet. """ requestEntryUpdate(setName, getSet(setName), entry); }
java
public void updateSet (String setName, DSet.Entry entry) { requestEntryUpdate(setName, getSet(setName), entry); }
[ "public", "void", "updateSet", "(", "String", "setName", ",", "DSet", ".", "Entry", "entry", ")", "{", "requestEntryUpdate", "(", "setName", ",", "getSet", "(", "setName", ")", ",", "entry", ")", ";", "}" ]
Request to have the specified item updated in the specified DSet.
[ "Request", "to", "have", "the", "specified", "item", "updated", "in", "the", "specified", "DSet", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/dobj/DObject.java#L275-L278
RogerParkinson/madura-objects-parent
madura-rules/src/main/java/nz/co/senanque/rulesparser/ParsePackage.java
ParsePackage.processConstraint
private AbstractRule processConstraint(RulesTextProvider textProvider) throws ParserException { """ Method processConstraint. A constraint is a list of conditions and an explanation. @return Rule @throws ParserException """ log.debug("processConstraint"); Constraint rule = new Constraint()...
java
private AbstractRule processConstraint(RulesTextProvider textProvider) throws ParserException { log.debug("processConstraint"); Constraint rule = new Constraint(); int start = textProvider.getPos(); LoadCommonRuleData(rule,textProvider); textProvider.addTOCElement(null, rul...
[ "private", "AbstractRule", "processConstraint", "(", "RulesTextProvider", "textProvider", ")", "throws", "ParserException", "{", "log", ".", "debug", "(", "\"processConstraint\"", ")", ";", "Constraint", "rule", "=", "new", "Constraint", "(", ")", ";", "int", "sta...
Method processConstraint. A constraint is a list of conditions and an explanation. @return Rule @throws ParserException
[ "Method", "processConstraint", ".", "A", "constraint", "is", "a", "list", "of", "conditions", "and", "an", "explanation", "." ]
train
https://github.com/RogerParkinson/madura-objects-parent/blob/9b5385dd0437611f0ce8506f63646e018d06fb8e/madura-rules/src/main/java/nz/co/senanque/rulesparser/ParsePackage.java#L273-L291
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateClosedListEntityRole
public OperationStatus updateClosedListEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateClosedListEntityRoleOptionalParameter updateClosedListEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. ...
java
public OperationStatus updateClosedListEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateClosedListEntityRoleOptionalParameter updateClosedListEntityRoleOptionalParameter) { return updateClosedListEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId, updateClosedListEnt...
[ "public", "OperationStatus", "updateClosedListEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ",", "UpdateClosedListEntityRoleOptionalParameter", "updateClosedListEntityRoleOptionalParameter", ")", "{", "return", ...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role ID. @param updateClosedListEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws Illeg...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L11648-L11650
grpc/grpc-java
okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/ConnectionSpec.java
ConnectionSpec.supportedSpec
private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) { """ Returns a copy of this that omits cipher suites and TLS versions not enabled by {@code sslSocket}. """ String[] cipherSuitesToEnable = null; if (cipherSuites != null) { String[] cipherSuitesToSelectFrom = sslSock...
java
private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) { String[] cipherSuitesToEnable = null; if (cipherSuites != null) { String[] cipherSuitesToSelectFrom = sslSocket.getEnabledCipherSuites(); cipherSuitesToEnable = Util.intersect(String.class, cipherSuites, cipher...
[ "private", "ConnectionSpec", "supportedSpec", "(", "SSLSocket", "sslSocket", ",", "boolean", "isFallback", ")", "{", "String", "[", "]", "cipherSuitesToEnable", "=", "null", ";", "if", "(", "cipherSuites", "!=", "null", ")", "{", "String", "[", "]", "cipherSui...
Returns a copy of this that omits cipher suites and TLS versions not enabled by {@code sslSocket}.
[ "Returns", "a", "copy", "of", "this", "that", "omits", "cipher", "suites", "and", "TLS", "versions", "not", "enabled", "by", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/ConnectionSpec.java#L141-L175
bazaarvoice/emodb
auth/auth-core/src/main/java/com/bazaarvoice/emodb/auth/apikey/ApiKeyRealm.java
ApiKeyRealm.hasPermissionsById
public boolean hasPermissionsById(String id, Collection<Permission> permissions) { """ Test for whether an API key has specific permissions using its ID. """ AuthorizationInfo authorizationInfo = getAuthorizationInfoById(id); return authorizationInfo != null && isPermittedAll(permissions, autho...
java
public boolean hasPermissionsById(String id, Collection<Permission> permissions) { AuthorizationInfo authorizationInfo = getAuthorizationInfoById(id); return authorizationInfo != null && isPermittedAll(permissions, authorizationInfo); }
[ "public", "boolean", "hasPermissionsById", "(", "String", "id", ",", "Collection", "<", "Permission", ">", "permissions", ")", "{", "AuthorizationInfo", "authorizationInfo", "=", "getAuthorizationInfoById", "(", "id", ")", ";", "return", "authorizationInfo", "!=", "...
Test for whether an API key has specific permissions using its ID.
[ "Test", "for", "whether", "an", "API", "key", "has", "specific", "permissions", "using", "its", "ID", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/auth/auth-core/src/main/java/com/bazaarvoice/emodb/auth/apikey/ApiKeyRealm.java#L465-L468
intel/jndn-utils
src/main/java/com/intel/jndn/utils/impl/SegmentationHelper.java
SegmentationHelper.isSegmented
public static boolean isSegmented(Name name, byte marker) { """ Determine if a name is segmented, i.e. if it ends with the correct marker type. @param name the name of a packet @param marker the marker type (the initial byte of the component) @return true if the name is segmented """ return name.size(...
java
public static boolean isSegmented(Name name, byte marker) { return name.size() > 0 && name.get(-1).getValue().buf().get(0) == marker; }
[ "public", "static", "boolean", "isSegmented", "(", "Name", "name", ",", "byte", "marker", ")", "{", "return", "name", ".", "size", "(", ")", ">", "0", "&&", "name", ".", "get", "(", "-", "1", ")", ".", "getValue", "(", ")", ".", "buf", "(", ")", ...
Determine if a name is segmented, i.e. if it ends with the correct marker type. @param name the name of a packet @param marker the marker type (the initial byte of the component) @return true if the name is segmented
[ "Determine", "if", "a", "name", "is", "segmented", "i", ".", "e", ".", "if", "it", "ends", "with", "the", "correct", "marker", "type", "." ]
train
https://github.com/intel/jndn-utils/blob/7f670b259484c35d51a6c5acce5715b0573faedd/src/main/java/com/intel/jndn/utils/impl/SegmentationHelper.java#L56-L58
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonToAssembler.java
GeoJsonToAssembler.fromTransferObject
public MultiPolygon fromTransferObject(MultiPolygonTo input, CrsId crsId) { """ Creates a multipolygon object starting from a transfer object. @param input the multipolygon transfer object @param crsId the crs id to use (ignores the crs of the input). If null, uses the crs of the input. @return the correspond...
java
public MultiPolygon fromTransferObject(MultiPolygonTo input, CrsId crsId) { if (input == null) { return null; } crsId = getCrsId(input, crsId); isValid(input); Polygon[] polygons = new Polygon[input.getCoordinates().length]; for (int i = 0; i < polygons.length; i++) { ...
[ "public", "MultiPolygon", "fromTransferObject", "(", "MultiPolygonTo", "input", ",", "CrsId", "crsId", ")", "{", "if", "(", "input", "==", "null", ")", "{", "return", "null", ";", "}", "crsId", "=", "getCrsId", "(", "input", ",", "crsId", ")", ";", "isVa...
Creates a multipolygon object starting from a transfer object. @param input the multipolygon transfer object @param crsId the crs id to use (ignores the crs of the input). If null, uses the crs of the input. @return the corresponding geometry @throws IllegalArgumentException If the geometry could not be constructed du...
[ "Creates", "a", "multipolygon", "object", "starting", "from", "a", "transfer", "object", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonToAssembler.java#L304-L315
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.decodePassword
public static final String decodePassword(byte[] data, byte encryptionCode) { """ Decode the password from the given data. Will decode the data block as well. @param data encrypted data block @param encryptionCode encryption code @return password """ String result; if (data.length < MINIMUM...
java
public static final String decodePassword(byte[] data, byte encryptionCode) { String result; if (data.length < MINIMUM_PASSWORD_DATA_LENGTH) { result = null; } else { MPPUtility.decodeBuffer(data, encryptionCode); StringBuilder buffer = new StringBuild...
[ "public", "static", "final", "String", "decodePassword", "(", "byte", "[", "]", "data", ",", "byte", "encryptionCode", ")", "{", "String", "result", ";", "if", "(", "data", ".", "length", "<", "MINIMUM_PASSWORD_DATA_LENGTH", ")", "{", "result", "=", "null", ...
Decode the password from the given data. Will decode the data block as well. @param data encrypted data block @param encryptionCode encryption code @return password
[ "Decode", "the", "password", "from", "the", "given", "data", ".", "Will", "decode", "the", "data", "block", "as", "well", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L112-L143
grails/grails-core
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java
RegexUrlMapping.createRuntimeConstraintEvaluator
private Object createRuntimeConstraintEvaluator(final String name, ConstrainedProperty[] constraints) { """ This method will look for a constraint for the given name and return a closure that when executed will attempt to evaluate its value from the bound request parameters at runtime. @param name The n...
java
private Object createRuntimeConstraintEvaluator(final String name, ConstrainedProperty[] constraints) { if (constraints == null) return null; for (ConstrainedProperty constraint : constraints) { if (constraint.getPropertyName().equals(name)) { return new Closure(this) { ...
[ "private", "Object", "createRuntimeConstraintEvaluator", "(", "final", "String", "name", ",", "ConstrainedProperty", "[", "]", "constraints", ")", "{", "if", "(", "constraints", "==", "null", ")", "return", "null", ";", "for", "(", "ConstrainedProperty", "constrai...
This method will look for a constraint for the given name and return a closure that when executed will attempt to evaluate its value from the bound request parameters at runtime. @param name The name of the constrained property @param constraints The array of current ConstrainedProperty instances @return Either...
[ "This", "method", "will", "look", "for", "a", "constraint", "for", "the", "given", "name", "and", "return", "a", "closure", "that", "when", "executed", "will", "attempt", "to", "evaluate", "its", "value", "from", "the", "bound", "request", "parameters", "at"...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java#L700-L717
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteBuffer.java
ByteBuffer.toHexString
public String toHexString(int offset, int length) { """ Return a hexidecimal String representation of the current buffer with each byte displayed in a 2 character hexidecimal format. Useful for debugging. Convert a ByteBuffer to a String with a hexidecimal format. @param offset @param length @return The stri...
java
public String toHexString(int offset, int length) { // is offset, length valid for the current size() of our internal byte[] checkOffsetLength(size(), offset, length); // if length is 0, return an empty string if (length == 0 || size() == 0) { return ""; } S...
[ "public", "String", "toHexString", "(", "int", "offset", ",", "int", "length", ")", "{", "// is offset, length valid for the current size() of our internal byte[]", "checkOffsetLength", "(", "size", "(", ")", ",", "offset", ",", "length", ")", ";", "// if length is 0, r...
Return a hexidecimal String representation of the current buffer with each byte displayed in a 2 character hexidecimal format. Useful for debugging. Convert a ByteBuffer to a String with a hexidecimal format. @param offset @param length @return The string in hex representation
[ "Return", "a", "hexidecimal", "String", "representation", "of", "the", "current", "buffer", "with", "each", "byte", "displayed", "in", "a", "2", "character", "hexidecimal", "format", ".", "Useful", "for", "debugging", ".", "Convert", "a", "ByteBuffer", "to", "...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteBuffer.java#L1092-L1108
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.obtainRequestToken
public Map<String, Object> obtainRequestToken(SocialLoginConfig config, String callbackUrl) { """ Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_REQUEST_TOKEN} endpoint in order to obtain a request token. The request is authorized for the consumer key set by the class and the callback URL provided to the m...
java
public Map<String, Object> obtainRequestToken(SocialLoginConfig config, String callbackUrl) { String endpointUrl = config.getRequestTokenUrl(); try { SocialUtil.validateEndpointWithQuery(endpointUrl); } catch (SocialLoginException e) { return createErrorResponse("TWITTER...
[ "public", "Map", "<", "String", ",", "Object", ">", "obtainRequestToken", "(", "SocialLoginConfig", "config", ",", "String", "callbackUrl", ")", "{", "String", "endpointUrl", "=", "config", ".", "getRequestTokenUrl", "(", ")", ";", "try", "{", "SocialUtil", "....
Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_REQUEST_TOKEN} endpoint in order to obtain a request token. The request is authorized for the consumer key set by the class and the callback URL provided to the method. The appropriate consumer key must be set before invoking this method in order to obtain a request...
[ "Invokes", "the", "{", "@value", "TwitterConstants#TWITTER_ENDPOINT_REQUEST_TOKEN", "}", "endpoint", "in", "order", "to", "obtain", "a", "request", "token", ".", "The", "request", "is", "authorized", "for", "the", "consumer", "key", "set", "by", "the", "class", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L914-L930
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/evaluator/EvaluatorManager.java
EvaluatorManager.onEvaluatorFailed
private synchronized void onEvaluatorFailed(final EvaluatorStatusPOJO evaluatorStatus) { """ Process an evaluator message that indicates a crash. @param evaluatorStatus """ assert evaluatorStatus.getState() == State.FAILED; final EvaluatorException evaluatorException; if (evaluatorStatus.hasE...
java
private synchronized void onEvaluatorFailed(final EvaluatorStatusPOJO evaluatorStatus) { assert evaluatorStatus.getState() == State.FAILED; final EvaluatorException evaluatorException; if (evaluatorStatus.hasError()) { final Optional<Throwable> exception = this.exceptionCodec.fromBytes(e...
[ "private", "synchronized", "void", "onEvaluatorFailed", "(", "final", "EvaluatorStatusPOJO", "evaluatorStatus", ")", "{", "assert", "evaluatorStatus", ".", "getState", "(", ")", "==", "State", ".", "FAILED", ";", "final", "EvaluatorException", "evaluatorException", ";...
Process an evaluator message that indicates a crash. @param evaluatorStatus
[ "Process", "an", "evaluator", "message", "that", "indicates", "a", "crash", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/evaluator/EvaluatorManager.java#L522-L541
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Reflect.java
Reflect.copyFields
public static <T> void copyFields(Class<T> type, T dest, T source) { """ Clone the fields. @param <T> the type of the objects. @param type the type of the objects. @param dest the destination. @param source the source. """ Class<?> clazz = type; while (clazz != null && !Object.class.equals(clazz)) { ...
java
public static <T> void copyFields(Class<T> type, T dest, T source) { Class<?> clazz = type; while (clazz != null && !Object.class.equals(clazz)) { for (final Field field : clazz.getDeclaredFields()) { if (!Modifier.isStatic(field.getModifiers())) { field.setAccessible(true); try { field.set(d...
[ "public", "static", "<", "T", ">", "void", "copyFields", "(", "Class", "<", "T", ">", "type", ",", "T", "dest", ",", "T", "source", ")", "{", "Class", "<", "?", ">", "clazz", "=", "type", ";", "while", "(", "clazz", "!=", "null", "&&", "!", "Ob...
Clone the fields. @param <T> the type of the objects. @param type the type of the objects. @param dest the destination. @param source the source.
[ "Clone", "the", "fields", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Reflect.java#L136-L151
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/EventHandler.java
EventHandler.pushError
@Deprecated public void pushError(final String errorMessage, final int errorCode) { """ Internally records an "Error Occurred" event, which can be viewed in the dashboard. @param errorMessage The error message @param errorCode The error code @deprecated use {@link CleverTapAPI#pushError(String errorMes...
java
@Deprecated public void pushError(final String errorMessage, final int errorCode) { CleverTapAPI cleverTapAPI = weakReference.get(); if(cleverTapAPI == null){ Logger.d("CleverTap Instance is null."); } else { cleverTapAPI.pushError(errorMessage, errorCode); } ...
[ "@", "Deprecated", "public", "void", "pushError", "(", "final", "String", "errorMessage", ",", "final", "int", "errorCode", ")", "{", "CleverTapAPI", "cleverTapAPI", "=", "weakReference", ".", "get", "(", ")", ";", "if", "(", "cleverTapAPI", "==", "null", ")...
Internally records an "Error Occurred" event, which can be viewed in the dashboard. @param errorMessage The error message @param errorCode The error code @deprecated use {@link CleverTapAPI#pushError(String errorMessage, int errorCode)}
[ "Internally", "records", "an", "Error", "Occurred", "event", "which", "can", "be", "viewed", "in", "the", "dashboard", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/EventHandler.java#L213-L221
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java
VariantMetadataManager.removeIndividual
public void removeIndividual(Member member, String studyId) { """ Remove an individual of a given variant study metadata (from study ID). @param member Individual @param studyId Study ID """ // Sanity check if (member == null) { logger.error("Individual is null."); ...
java
public void removeIndividual(Member member, String studyId) { // Sanity check if (member == null) { logger.error("Individual is null."); return; } removeIndividual(member.getName(), studyId); }
[ "public", "void", "removeIndividual", "(", "Member", "member", ",", "String", "studyId", ")", "{", "// Sanity check", "if", "(", "member", "==", "null", ")", "{", "logger", ".", "error", "(", "\"Individual is null.\"", ")", ";", "return", ";", "}", "removeIn...
Remove an individual of a given variant study metadata (from study ID). @param member Individual @param studyId Study ID
[ "Remove", "an", "individual", "of", "a", "given", "variant", "study", "metadata", "(", "from", "study", "ID", ")", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L357-L364
banq/jdonframework
JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java
PageIteratorSolver.querySingleObject
public Object querySingleObject(Collection queryParams, String sqlquery) throws Exception { """ query one object from database delgate to JdbCQueryTemp's querySingleObject method @param queryParams query sql parameter (?) @param sqlquery query sql @return Object @throws Exception """ JdbcTemp jdbcT...
java
public Object querySingleObject(Collection queryParams, String sqlquery) throws Exception { JdbcTemp jdbcTemp = new JdbcTemp(dataSource); return jdbcTemp.querySingleObject(queryParams, sqlquery); }
[ "public", "Object", "querySingleObject", "(", "Collection", "queryParams", ",", "String", "sqlquery", ")", "throws", "Exception", "{", "JdbcTemp", "jdbcTemp", "=", "new", "JdbcTemp", "(", "dataSource", ")", ";", "return", "jdbcTemp", ".", "querySingleObject", "(",...
query one object from database delgate to JdbCQueryTemp's querySingleObject method @param queryParams query sql parameter (?) @param sqlquery query sql @return Object @throws Exception
[ "query", "one", "object", "from", "database", "delgate", "to", "JdbCQueryTemp", "s", "querySingleObject", "method" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L134-L137
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java
Integer.getInteger
public static Integer getInteger(String nm, int val) { """ Determines the integer value of the system property with the specified name. <p>The first argument is treated as the name of a system property. System properties are accessible through the {@link java.lang.System#getProperty(java.lang.String)} metho...
java
public static Integer getInteger(String nm, int val) { Integer result = getInteger(nm, null); return (result == null) ? Integer.valueOf(val) : result; }
[ "public", "static", "Integer", "getInteger", "(", "String", "nm", ",", "int", "val", ")", "{", "Integer", "result", "=", "getInteger", "(", "nm", ",", "null", ")", ";", "return", "(", "result", "==", "null", ")", "?", "Integer", ".", "valueOf", "(", ...
Determines the integer value of the system property with the specified name. <p>The first argument is treated as the name of a system property. System properties are accessible through the {@link java.lang.System#getProperty(java.lang.String)} method. The string value of this property is then interpreted as an intege...
[ "Determines", "the", "integer", "value", "of", "the", "system", "property", "with", "the", "specified", "name", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java#L856-L859
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/component/UISelectMany.java
UISelectMany.setValueExpression
public void setValueExpression(String name, ValueExpression binding) { """ <p>Store any {@link ValueExpression} specified for <code>selectedValues</code> under <code>value</code> instead; otherwise, perform the default superclass processing for this method.</p> @param name Name of the attribute or property fo...
java
public void setValueExpression(String name, ValueExpression binding) { if ("selectedValues".equals(name)) { super.setValueExpression("value", binding); } else { super.setValueExpression(name, binding); } }
[ "public", "void", "setValueExpression", "(", "String", "name", ",", "ValueExpression", "binding", ")", "{", "if", "(", "\"selectedValues\"", ".", "equals", "(", "name", ")", ")", "{", "super", ".", "setValueExpression", "(", "\"value\"", ",", "binding", ")", ...
<p>Store any {@link ValueExpression} specified for <code>selectedValues</code> under <code>value</code> instead; otherwise, perform the default superclass processing for this method.</p> @param name Name of the attribute or property for which to set a {@link ValueExpression} @param binding The {@link ValueExpression} ...
[ "<p", ">", "Store", "any", "{", "@link", "ValueExpression", "}", "specified", "for", "<code", ">", "selectedValues<", "/", "code", ">", "under", "<code", ">", "value<", "/", "code", ">", "instead", ";", "otherwise", "perform", "the", "default", "superclass",...
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/component/UISelectMany.java#L407-L415
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
BinaryRowProtocol.getInternalDouble
public double getInternalDouble(ColumnInformation columnInfo) throws SQLException { """ Get double from raw binary format. @param columnInfo column information @return double value @throws SQLException if column is not numeric or is not in Double bounds (unsigned columns). """ if (lastValueWasNull()) ...
java
public double getInternalDouble(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return 0; } switch (columnInfo.getColumnType()) { case BIT: return parseBit(); case TINYINT: return getInternalTinyInt(columnInfo); case SMALLINT: case ...
[ "public", "double", "getInternalDouble", "(", "ColumnInformation", "columnInfo", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "0", ";", "}", "switch", "(", "columnInfo", ".", "getColumnType", "(", ")", ")", ...
Get double from raw binary format. @param columnInfo column information @return double value @throws SQLException if column is not numeric or is not in Double bounds (unsigned columns).
[ "Get", "double", "from", "raw", "binary", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java#L595-L659
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/settings/Editors.java
Editors.convertFromString
public static <T> T convertFromString(String text, Class<T> typeClass) { """ Converts the given text string to an object of the given type class. <br /> If no editor is registered for the given type class, or if it fails the conversion, the default property editor from {@link PropertyEditorManager} is tried. ...
java
public static <T> T convertFromString(String text, Class<T> typeClass) { Class<? extends PropertyEditor> editorClass = null; synchronized (editors) { editorClass = editors.get(typeClass); } if (editorClass != null) { PropertyEditor editor = new...
[ "public", "static", "<", "T", ">", "T", "convertFromString", "(", "String", "text", ",", "Class", "<", "T", ">", "typeClass", ")", "{", "Class", "<", "?", "extends", "PropertyEditor", ">", "editorClass", "=", "null", ";", "synchronized", "(", "editors", ...
Converts the given text string to an object of the given type class. <br /> If no editor is registered for the given type class, or if it fails the conversion, the default property editor from {@link PropertyEditorManager} is tried. @param text the text string to convert into an object @param typeClass the class ...
[ "Converts", "the", "given", "text", "string", "to", "an", "object", "of", "the", "given", "type", "class", ".", "<br", "/", ">", "If", "no", "editor", "is", "registered", "for", "the", "given", "type", "class", "or", "if", "it", "fails", "the", "conver...
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/settings/Editors.java#L60-L87
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.fastZeroPaddingNumber
private void fastZeroPaddingNumber(StringBuffer buf, int value, int minDigits, int maxDigits) { """ /* Lightweight zero padding integer number format function. Note: This implementation is almost equivalent to format method in DateNumberFormat. In the method zeroPaddingNumber above should be able to use the o...
java
private void fastZeroPaddingNumber(StringBuffer buf, int value, int minDigits, int maxDigits) { int limit = decimalBuf.length < maxDigits ? decimalBuf.length : maxDigits; int index = limit - 1; while (true) { decimalBuf[index] = decDigits[(value % 10)]; value /= 10; ...
[ "private", "void", "fastZeroPaddingNumber", "(", "StringBuffer", "buf", ",", "int", "value", ",", "int", "minDigits", ",", "int", "maxDigits", ")", "{", "int", "limit", "=", "decimalBuf", ".", "length", "<", "maxDigits", "?", "decimalBuf", ".", "length", ":"...
/* Lightweight zero padding integer number format function. Note: This implementation is almost equivalent to format method in DateNumberFormat. In the method zeroPaddingNumber above should be able to use the one in DateNumberFormat, but, it does not help IBM J9's JIT to optimize the performance much. In simple repea...
[ "/", "*", "Lightweight", "zero", "padding", "integer", "number", "format", "function", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2259-L2282
JOML-CI/JOML
src/org/joml/Vector2d.java
Vector2d.set
public Vector2d set(int index, DoubleBuffer buffer) { """ Read this vector from the supplied {@link DoubleBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given DoubleBuffer. @param index the absolute position into the DoubleBuffer @pa...
java
public Vector2d set(int index, DoubleBuffer buffer) { MemUtil.INSTANCE.get(this, index, buffer); return this; }
[ "public", "Vector2d", "set", "(", "int", "index", ",", "DoubleBuffer", "buffer", ")", "{", "MemUtil", ".", "INSTANCE", ".", "get", "(", "this", ",", "index", ",", "buffer", ")", ";", "return", "this", ";", "}" ]
Read this vector from the supplied {@link DoubleBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given DoubleBuffer. @param index the absolute position into the DoubleBuffer @param buffer values will be read in <code>x, y</code> order @return this
[ "Read", "this", "vector", "from", "the", "supplied", "{", "@link", "DoubleBuffer", "}", "starting", "at", "the", "specified", "absolute", "buffer", "position", "/", "index", ".", "<p", ">", "This", "method", "will", "not", "increment", "the", "position", "of...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector2d.java#L337-L340
structurizr/java
structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java
ViewpointsAndPerspectivesDocumentationTemplate.addSystemQualitiesSection
public Section addSystemQualitiesSection(SoftwareSystem softwareSystem, File... files) throws IOException { """ Adds a "System Qualities" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param files ...
java
public Section addSystemQualitiesSection(SoftwareSystem softwareSystem, File... files) throws IOException { return addSection(softwareSystem, "System Qualities", files); }
[ "public", "Section", "addSystemQualitiesSection", "(", "SoftwareSystem", "softwareSystem", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "addSection", "(", "softwareSystem", ",", "\"System Qualities\"", ",", "files", ")", ";", "}" ]
Adds a "System Qualities" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param files one or more File objects that point to the documentation content @return a documentation {@li...
[ "Adds", "a", "System", "Qualities", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java#L164-L166
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Abort.java
Abort.setType
public void setType(String type) throws ApplicationException { """ sets the type of the abort (page,request) @param type @throws ApplicationException """ type = type.toLowerCase().trim(); if (type.equals("page")) this.type = lucee.runtime.exp.Abort.SCOPE_PAGE; else if (type.equals("request")) this.type ...
java
public void setType(String type) throws ApplicationException { type = type.toLowerCase().trim(); if (type.equals("page")) this.type = lucee.runtime.exp.Abort.SCOPE_PAGE; else if (type.equals("request")) this.type = lucee.runtime.exp.Abort.SCOPE_REQUEST; else throw new ApplicationException("attribute type has an inv...
[ "public", "void", "setType", "(", "String", "type", ")", "throws", "ApplicationException", "{", "type", "=", "type", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "type", ".", "equals", "(", "\"page\"", ")", ")", "this", ".", "...
sets the type of the abort (page,request) @param type @throws ApplicationException
[ "sets", "the", "type", "of", "the", "abort", "(", "page", "request", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Abort.java#L59-L64
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java
clusternodegroup.get
public static clusternodegroup get(nitro_service service, String name) throws Exception { """ Use this API to fetch clusternodegroup resource of given name . """ clusternodegroup obj = new clusternodegroup(); obj.set_name(name); clusternodegroup response = (clusternodegroup) obj.get_resource(service); ...
java
public static clusternodegroup get(nitro_service service, String name) throws Exception{ clusternodegroup obj = new clusternodegroup(); obj.set_name(name); clusternodegroup response = (clusternodegroup) obj.get_resource(service); return response; }
[ "public", "static", "clusternodegroup", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "clusternodegroup", "obj", "=", "new", "clusternodegroup", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch clusternodegroup resource of given name .
[ "Use", "this", "API", "to", "fetch", "clusternodegroup", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L343-L348
kiegroup/drools
drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java
RuleSheetParserUtil.rc2name
public static String rc2name( int row, int col ) { """ Convert spreadsheet row, column numbers to a cell name. @param row row number @param col the column number. Start with zero. @return The spreadsheet name for this cell, "A" to "ZZZ". """ StringBuilder sb = new StringBuilder(); int b = ...
java
public static String rc2name( int row, int col ){ StringBuilder sb = new StringBuilder(); int b = 26; int p = 1; if( col >= b ){ col -= b; p *= b; } if( col >= b*b ){ col -= b*b; p *= b; } while( p > 0 ){ ...
[ "public", "static", "String", "rc2name", "(", "int", "row", ",", "int", "col", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "int", "b", "=", "26", ";", "int", "p", "=", "1", ";", "if", "(", "col", ">=", "b", ")", ...
Convert spreadsheet row, column numbers to a cell name. @param row row number @param col the column number. Start with zero. @return The spreadsheet name for this cell, "A" to "ZZZ".
[ "Convert", "spreadsheet", "row", "column", "numbers", "to", "a", "cell", "name", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L121-L140
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XString.java
XString.startsWith
public boolean startsWith(XMLString prefix, int toffset) { """ Tests if this string starts with the specified prefix beginning a specified index. @param prefix the prefix. @param toffset where to begin looking in the string. @return <code>true</code> if the character sequence represented by the ar...
java
public boolean startsWith(XMLString prefix, int toffset) { int to = toffset; int tlim = this.length(); int po = 0; int pc = prefix.length(); // Note: toffset might be near -1>>>1. if ((toffset < 0) || (toffset > tlim - pc)) { return false; } while (--pc >= 0) { i...
[ "public", "boolean", "startsWith", "(", "XMLString", "prefix", ",", "int", "toffset", ")", "{", "int", "to", "=", "toffset", ";", "int", "tlim", "=", "this", ".", "length", "(", ")", ";", "int", "po", "=", "0", ";", "int", "pc", "=", "prefix", ".",...
Tests if this string starts with the specified prefix beginning a specified index. @param prefix the prefix. @param toffset where to begin looking in the string. @return <code>true</code> if the character sequence represented by the argument is a prefix of the substring of this object starting at index <code...
[ "Tests", "if", "this", "string", "starts", "with", "the", "specified", "prefix", "beginning", "a", "specified", "index", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XString.java#L547-L573
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java
GeneralStorable.setValue
public void setValue(String field, byte[] value) throws IOException { """ Sets the value belonging to the given field. @param field the name of the field @param value the value to set @throws IOException """ int hash = Arrays.hashCode(field.getBytes()); if (!structure.valueHash2Index.con...
java
public void setValue(String field, byte[] value) throws IOException { int hash = Arrays.hashCode(field.getBytes()); if (!structure.valueHash2Index.containsKey(hash)) { throw new IOException("The field " + field + " is unknown."); } setValue(structure.valueHash2Index.get(hash)...
[ "public", "void", "setValue", "(", "String", "field", ",", "byte", "[", "]", "value", ")", "throws", "IOException", "{", "int", "hash", "=", "Arrays", ".", "hashCode", "(", "field", ".", "getBytes", "(", ")", ")", ";", "if", "(", "!", "structure", "....
Sets the value belonging to the given field. @param field the name of the field @param value the value to set @throws IOException
[ "Sets", "the", "value", "belonging", "to", "the", "given", "field", "." ]
train
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L120-L126
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java
DeploymentHelper.runInNewTransaction
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, @NotNull final TransactionCallback<T> action) { """ Executes the modifying action in new transaction @param txManager transaction manager interface @param transactionName the...
java
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, @NotNull final TransactionCallback<T> action) { return runInNewTransaction(txManager, transactionName, Isolation.DEFAULT.value(), action); }
[ "public", "static", "<", "T", ">", "T", "runInNewTransaction", "(", "@", "NotNull", "final", "PlatformTransactionManager", "txManager", ",", "final", "String", "transactionName", ",", "@", "NotNull", "final", "TransactionCallback", "<", "T", ">", "action", ")", ...
Executes the modifying action in new transaction @param txManager transaction manager interface @param transactionName the name of the new transaction @param action the callback to execute in new tranaction @return the result of the action
[ "Executes", "the", "modifying", "action", "in", "new", "transaction" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java#L85-L88
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java
InstantSearch.registerSearchView
@SuppressWarnings( { """ Registers a {@link SearchView} to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param searchView a SearchView whose query text will be used. """"WeakerAccess", "unused"})...
java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public void registerSearchView(@NonNull final Activity activity, @NonNull final SearchView searchView) { registerSearchView(activity, new SearchViewFacade(searchView)); }
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "public", "void", "registerSearchView", "(", "@", "NonNull", "final", "Activity", "activity", ",", "@", "NonNull", "final", "SearchView", "searchView", ")", ...
Registers a {@link SearchView} to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param searchView a SearchView whose query text will be used.
[ "Registers", "a", "{", "@link", "SearchView", "}", "to", "trigger", "search", "requests", "on", "text", "change", "replacing", "the", "current", "one", "if", "any", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L203-L206
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java
TouchActions.singleTap
public TouchActions singleTap(WebElement onElement) { """ Allows the execution of single tap on the screen, analogous to click using a Mouse. @param onElement the {@link WebElement} on the screen. @return self """ if (touchScreen != null) { action.addAction(new SingleTapAction(touchScreen, (Locat...
java
public TouchActions singleTap(WebElement onElement) { if (touchScreen != null) { action.addAction(new SingleTapAction(touchScreen, (Locatable) onElement)); } tick(touchPointer.createPointerDown(0)); tick(touchPointer.createPointerUp(0)); return this; }
[ "public", "TouchActions", "singleTap", "(", "WebElement", "onElement", ")", "{", "if", "(", "touchScreen", "!=", "null", ")", "{", "action", ".", "addAction", "(", "new", "SingleTapAction", "(", "touchScreen", ",", "(", "Locatable", ")", "onElement", ")", ")...
Allows the execution of single tap on the screen, analogous to click using a Mouse. @param onElement the {@link WebElement} on the screen. @return self
[ "Allows", "the", "execution", "of", "single", "tap", "on", "the", "screen", "analogous", "to", "click", "using", "a", "Mouse", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java#L54-L61
aol/cyclops
cyclops-futurestream/src/main/java/com/oath/cyclops/types/futurestream/LazyFutureStreamFunctions.java
LazyFutureStreamFunctions.takeWhile
public static <T> ReactiveSeq<T> takeWhile(final Stream<T> stream, final Predicate<? super T> predicate) { """ Returns a stream limited to all elements for which a predicate evaluates to <code>true</code>. <p> <code> // (1, 2) Seq.of(1, 2, 3, 4, 5).limitWhile(i -&gt; i &lt; 3) </code> """ return ...
java
public static <T> ReactiveSeq<T> takeWhile(final Stream<T> stream, final Predicate<? super T> predicate) { return takeUntil(stream, predicate.negate()); }
[ "public", "static", "<", "T", ">", "ReactiveSeq", "<", "T", ">", "takeWhile", "(", "final", "Stream", "<", "T", ">", "stream", ",", "final", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "return", "takeUntil", "(", "stream", ",", "...
Returns a stream limited to all elements for which a predicate evaluates to <code>true</code>. <p> <code> // (1, 2) Seq.of(1, 2, 3, 4, 5).limitWhile(i -&gt; i &lt; 3) </code>
[ "Returns", "a", "stream", "limited", "to", "all", "elements", "for", "which", "a", "predicate", "evaluates", "to", "<code", ">", "true<", "/", "code", ">", ".", "<p", ">", "<code", ">", "//", "(", "1", "2", ")", "Seq", ".", "of", "(", "1", "2", "...
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops-futurestream/src/main/java/com/oath/cyclops/types/futurestream/LazyFutureStreamFunctions.java#L85-L87
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/InputUtil.java
InputUtil.requireNonEmpty
public static <T extends FocusWidget & HasText> String requireNonEmpty (T widget, String error) { """ Returns a text widget's value, making sure it is non-empty. @throws InputException if the widget has no text """ String text = widget.getText().trim(); if (text.length() == 0) { Po...
java
public static <T extends FocusWidget & HasText> String requireNonEmpty (T widget, String error) { String text = widget.getText().trim(); if (text.length() == 0) { Popups.errorBelow(error, widget); widget.setFocus(true); throw new InputException(); } ...
[ "public", "static", "<", "T", "extends", "FocusWidget", "&", "HasText", ">", "String", "requireNonEmpty", "(", "T", "widget", ",", "String", "error", ")", "{", "String", "text", "=", "widget", ".", "getText", "(", ")", ".", "trim", "(", ")", ";", "if",...
Returns a text widget's value, making sure it is non-empty. @throws InputException if the widget has no text
[ "Returns", "a", "text", "widget", "s", "value", "making", "sure", "it", "is", "non", "-", "empty", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/InputUtil.java#L23-L32
jtrfp/javamod
src/main/java/de/quippy/jflac/FixedPredictor.java
FixedPredictor.computeBestPredictor
public static int computeBestPredictor(int[] data, int dataLen, double[] residualBitsPerSample) { """ Compute the best predictor order. @param data @param dataLen @param residualBitsPerSample @return """ int lastError0 = data[-1]; int lastError1 = data[-1] - data[-2]; int lastError2...
java
public static int computeBestPredictor(int[] data, int dataLen, double[] residualBitsPerSample) { int lastError0 = data[-1]; int lastError1 = data[-1] - data[-2]; int lastError2 = lastError1 - (data[-2] - data[-3]); int lastError3 = lastError2 - (data[-2] - 2 * data[-3] + data[-4]); ...
[ "public", "static", "int", "computeBestPredictor", "(", "int", "[", "]", "data", ",", "int", "dataLen", ",", "double", "[", "]", "residualBitsPerSample", ")", "{", "int", "lastError0", "=", "data", "[", "-", "1", "]", ";", "int", "lastError1", "=", "data...
Compute the best predictor order. @param data @param dataLen @param residualBitsPerSample @return
[ "Compute", "the", "best", "predictor", "order", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FixedPredictor.java#L38-L89
airbnb/AirMapView
library/src/main/java/com/airbnb/android/airmapview/RuntimePermissionUtils.java
RuntimePermissionUtils.shouldShowRequestPermissionRationale
static boolean shouldShowRequestPermissionRationale(Activity activity, String... permissions) { """ Checks given permissions are needed to show rationale. @return returns true if one of the permission is needed to show rationale. """ for (String permission : permissions) { if (ActivityCompat.shoul...
java
static boolean shouldShowRequestPermissionRationale(Activity activity, String... permissions) { for (String permission : permissions) { if (ActivityCompat.shouldShowRequestPermissionRationale(activity, permission)) { return true; } } return false; }
[ "static", "boolean", "shouldShowRequestPermissionRationale", "(", "Activity", "activity", ",", "String", "...", "permissions", ")", "{", "for", "(", "String", "permission", ":", "permissions", ")", "{", "if", "(", "ActivityCompat", ".", "shouldShowRequestPermissionRat...
Checks given permissions are needed to show rationale. @return returns true if one of the permission is needed to show rationale.
[ "Checks", "given", "permissions", "are", "needed", "to", "show", "rationale", "." ]
train
https://github.com/airbnb/AirMapView/blob/f715197db2cc2903e8d70f78385d339c3f6a1c3b/library/src/main/java/com/airbnb/android/airmapview/RuntimePermissionUtils.java#L55-L62
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java
HiveConverterUtils.getStagingDataLocation
public static String getStagingDataLocation(String outputDataLocation, String stagingTableName) { """ * Get the staging table location of format: <final table location>/<staging table name> @param outputDataLocation output table data lcoation. @return staging table location. """ return outputDataLocatio...
java
public static String getStagingDataLocation(String outputDataLocation, String stagingTableName) { return outputDataLocation + Path.SEPARATOR + stagingTableName; }
[ "public", "static", "String", "getStagingDataLocation", "(", "String", "outputDataLocation", ",", "String", "stagingTableName", ")", "{", "return", "outputDataLocation", "+", "Path", ".", "SEPARATOR", "+", "stagingTableName", ";", "}" ]
* Get the staging table location of format: <final table location>/<staging table name> @param outputDataLocation output table data lcoation. @return staging table location.
[ "*", "Get", "the", "staging", "table", "location", "of", "format", ":", "<final", "table", "location", ">", "/", "<staging", "table", "name", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L126-L128
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findResult
public static <T, U extends T, V extends T,E> T findResult(Collection<E> self, U defaultResult, @ClosureParams(FirstParam.FirstGenericType.class) Closure<V> closure) { """ Iterates through the collection calling the given closure for each item but stopping once the first non-null result is found and returning tha...
java
public static <T, U extends T, V extends T,E> T findResult(Collection<E> self, U defaultResult, @ClosureParams(FirstParam.FirstGenericType.class) Closure<V> closure) { T result = findResult(self, closure); if (result == null) return defaultResult; return result; }
[ "public", "static", "<", "T", ",", "U", "extends", "T", ",", "V", "extends", "T", ",", "E", ">", "T", "findResult", "(", "Collection", "<", "E", ">", "self", ",", "U", "defaultResult", ",", "@", "ClosureParams", "(", "FirstParam", ".", "FirstGenericTyp...
Iterates through the collection calling the given closure for each item but stopping once the first non-null result is found and returning that result. If all are null, the defaultResult is returned. <p> Examples: <pre class="groovyTestCase"> def list = [1,2,3] assert "Found 2" == list.findResult("default") { it > 1 ? ...
[ "Iterates", "through", "the", "collection", "calling", "the", "given", "closure", "for", "each", "item", "but", "stopping", "once", "the", "first", "non", "-", "null", "result", "is", "found", "and", "returning", "that", "result", ".", "If", "all", "are", ...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L3950-L3954
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SmUtil.java
SmUtil.rsPlainToAsn1
public static byte[] rsPlainToAsn1(byte[] sign) { """ BC的SM3withSM2验签需要的rs是asn1格式的,这个方法将直接拼接r||s的字节数组转化成asn1格式<br> 来自:https://blog.csdn.net/pridas/article/details/86118774 @param sign in plain byte array @return rs result in asn1 format @since 4.5.0 """ if (sign.length != RS_LEN * 2) { throw new C...
java
public static byte[] rsPlainToAsn1(byte[] sign) { if (sign.length != RS_LEN * 2) { throw new CryptoException("err rs. "); } BigInteger r = new BigInteger(1, Arrays.copyOfRange(sign, 0, RS_LEN)); BigInteger s = new BigInteger(1, Arrays.copyOfRange(sign, RS_LEN, RS_LEN * 2)); ASN1EncodableVector v = ne...
[ "public", "static", "byte", "[", "]", "rsPlainToAsn1", "(", "byte", "[", "]", "sign", ")", "{", "if", "(", "sign", ".", "length", "!=", "RS_LEN", "*", "2", ")", "{", "throw", "new", "CryptoException", "(", "\"err rs. \"", ")", ";", "}", "BigInteger", ...
BC的SM3withSM2验签需要的rs是asn1格式的,这个方法将直接拼接r||s的字节数组转化成asn1格式<br> 来自:https://blog.csdn.net/pridas/article/details/86118774 @param sign in plain byte array @return rs result in asn1 format @since 4.5.0
[ "BC的SM3withSM2验签需要的rs是asn1格式的,这个方法将直接拼接r||s的字节数组转化成asn1格式<br", ">", "来自:https", ":", "//", "blog", ".", "csdn", ".", "net", "/", "pridas", "/", "article", "/", "details", "/", "86118774" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SmUtil.java#L206-L220
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_freedom_domain_GET
public OvhFreedom serviceName_freedom_domain_GET(String serviceName, String domain) throws IOException { """ Get this object properties REST: GET /hosting/web/{serviceName}/freedom/{domain} @param serviceName [required] The internal name of your hosting @param domain [required] Freedom domain """ String...
java
public OvhFreedom serviceName_freedom_domain_GET(String serviceName, String domain) throws IOException { String qPath = "/hosting/web/{serviceName}/freedom/{domain}"; StringBuilder sb = path(qPath, serviceName, domain); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhFreedom.cla...
[ "public", "OvhFreedom", "serviceName_freedom_domain_GET", "(", "String", "serviceName", ",", "String", "domain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/freedom/{domain}\"", ";", "StringBuilder", "sb", "=", "path", "(", "...
Get this object properties REST: GET /hosting/web/{serviceName}/freedom/{domain} @param serviceName [required] The internal name of your hosting @param domain [required] Freedom domain
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L599-L604
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
AbstractQueuedSynchronizer.tryAcquireNanos
public final boolean tryAcquireNanos(int arg, long nanosTimeout) throws InterruptedException { """ Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses. Implemented by first checking interrupt status, then invoking at least once {@link #tryAcquire...
java
public final boolean tryAcquireNanos(int arg, long nanosTimeout) throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); return tryAcquire(arg) || doAcquireNanos(arg, nanosTimeout); }
[ "public", "final", "boolean", "tryAcquireNanos", "(", "int", "arg", ",", "long", "nanosTimeout", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "throw", "new", "InterruptedException", "(", ")", ";", "return"...
Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses. Implemented by first checking interrupt status, then invoking at least once {@link #tryAcquire}, returning on success. Otherwise, the thread is queued, possibly repeatedly blocking and unblocking, invoking {@link...
[ "Attempts", "to", "acquire", "in", "exclusive", "mode", "aborting", "if", "interrupted", "and", "failing", "if", "the", "given", "timeout", "elapses", ".", "Implemented", "by", "first", "checking", "interrupt", "status", "then", "invoking", "at", "least", "once"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java#L1270-L1276
StripesFramework/stripes-stuff
src/main/java/org/stripesstuff/plugin/security/InstanceBasedSecurityManager.java
InstanceBasedSecurityManager.hasRoleName
protected Boolean hasRoleName(ActionBean bean, Method handler, String roleName) { """ Checks to see if the user has an individual role by name. The default is to use the parent class and call {@code super.hasRole(bean,roleName)}. When subclassing {@link InstanceBasedSecurityManager}, override this method instead...
java
protected Boolean hasRoleName(ActionBean bean, Method handler, String roleName) { // Let our superclass check if the user has the required role. return super.hasRole(bean, handler, roleName); }
[ "protected", "Boolean", "hasRoleName", "(", "ActionBean", "bean", ",", "Method", "handler", ",", "String", "roleName", ")", "{", "// Let our superclass check if the user has the required role.", "return", "super", ".", "hasRole", "(", "bean", ",", "handler", ",", "rol...
Checks to see if the user has an individual role by name. The default is to use the parent class and call {@code super.hasRole(bean,roleName)}. When subclassing {@link InstanceBasedSecurityManager}, override this method instead of {@link #hasRole(ActionBean, Method, String)} to keep using the EL expression logic but ch...
[ "Checks", "to", "see", "if", "the", "user", "has", "an", "individual", "role", "by", "name", ".", "The", "default", "is", "to", "use", "the", "parent", "class", "and", "call", "{", "@code", "super", ".", "hasRole", "(", "bean", "roleName", ")", "}", ...
train
https://github.com/StripesFramework/stripes-stuff/blob/51ad92b4bd5862ba34d7c18c5829fb00ea3a3811/src/main/java/org/stripesstuff/plugin/security/InstanceBasedSecurityManager.java#L106-L110
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.processTaskEnterpriseColumns
private void processTaskEnterpriseColumns(Integer id, Task task, Var2Data taskVarData, byte[] metaData2) { """ Extracts task enterprise column values. @param id task unique ID @param task task instance @param taskVarData task var data @param metaData2 task meta data """ if (metaData2 != null) ...
java
private void processTaskEnterpriseColumns(Integer id, Task task, Var2Data taskVarData, byte[] metaData2) { if (metaData2 != null) { int bits = MPPUtility.getInt(metaData2, 29); task.set(TaskField.ENTERPRISE_FLAG1, Boolean.valueOf((bits & 0x0000800) != 0)); task.set(TaskField.EN...
[ "private", "void", "processTaskEnterpriseColumns", "(", "Integer", "id", ",", "Task", "task", ",", "Var2Data", "taskVarData", ",", "byte", "[", "]", "metaData2", ")", "{", "if", "(", "metaData2", "!=", "null", ")", "{", "int", "bits", "=", "MPPUtility", "....
Extracts task enterprise column values. @param id task unique ID @param task task instance @param taskVarData task var data @param metaData2 task meta data
[ "Extracts", "task", "enterprise", "column", "values", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1386-L1412
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/GenericsResolutionUtils.java
GenericsResolutionUtils.resolveDirectRawGenerics
public static LinkedHashMap<String, Type> resolveDirectRawGenerics(final Class<?> type) { """ Resolve type generics by declaration (as upper bound). Used for cases when actual generic definition is not available (so actual generics are unknown). In most cases such generics resolved as Object (for example, {@code...
java
public static LinkedHashMap<String, Type> resolveDirectRawGenerics(final Class<?> type) { final TypeVariable[] declaredGenerics = type.getTypeParameters(); if (declaredGenerics.length == 0) { return EmptyGenericsMap.getInstance(); } final LinkedHashMap<String, Type> res = new...
[ "public", "static", "LinkedHashMap", "<", "String", ",", "Type", ">", "resolveDirectRawGenerics", "(", "final", "Class", "<", "?", ">", "type", ")", "{", "final", "TypeVariable", "[", "]", "declaredGenerics", "=", "type", ".", "getTypeParameters", "(", ")", ...
Resolve type generics by declaration (as upper bound). Used for cases when actual generic definition is not available (so actual generics are unknown). In most cases such generics resolved as Object (for example, {@code Some<T>}). <p> IMPORTANT: this method does not count possible outer class generics! Use {@link #reso...
[ "Resolve", "type", "generics", "by", "declaration", "(", "as", "upper", "bound", ")", ".", "Used", "for", "cases", "when", "actual", "generic", "definition", "is", "not", "available", "(", "so", "actual", "generics", "are", "unknown", ")", ".", "In", "most...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/GenericsResolutionUtils.java#L196-L222
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.closeResources
protected void closeResources(Connection connection, Statement statement, ResultSet results) { """ An extension point allowing derived classes to change the behavior of resource closing. @param connection the connection to close @param statement the statement to close @param results the results to close ...
java
protected void closeResources(Connection connection, Statement statement, ResultSet results) { if (results != null) { try { results.close(); } catch (SQLException e) { LOG.finest("Caught exception closing resultSet: " + e.getMessage() + " - continuing"); ...
[ "protected", "void", "closeResources", "(", "Connection", "connection", ",", "Statement", "statement", ",", "ResultSet", "results", ")", "{", "if", "(", "results", "!=", "null", ")", "{", "try", "{", "results", ".", "close", "(", ")", ";", "}", "catch", ...
An extension point allowing derived classes to change the behavior of resource closing. @param connection the connection to close @param statement the statement to close @param results the results to close
[ "An", "extension", "point", "allowing", "derived", "classes", "to", "change", "the", "behavior", "of", "resource", "closing", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L4266-L4275
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphAnalyzeClustering
public static int nvgraphAnalyzeClustering( nvgraphHandle handle, nvgraphGraphDescr graph_descr, long weight_index, int n_clusters, Pointer clustering, int metric, Pointer score) { """ <pre> nvGRAPH analyze clustering Given a graph, a clustering, and ...
java
public static int nvgraphAnalyzeClustering( nvgraphHandle handle, nvgraphGraphDescr graph_descr, long weight_index, int n_clusters, Pointer clustering, int metric, Pointer score) { return checkResult(nvgraphAnalyzeClusteringNative(handle, graph_d...
[ "public", "static", "int", "nvgraphAnalyzeClustering", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "graph_descr", ",", "long", "weight_index", ",", "int", "n_clusters", ",", "Pointer", "clustering", ",", "int", "metric", ",", "Pointer", "score", ")", ...
<pre> nvGRAPH analyze clustering Given a graph, a clustering, and a metric compute the score that measures the clustering quality according to the metric. </pre>
[ "<pre", ">", "nvGRAPH", "analyze", "clustering", "Given", "a", "graph", "a", "clustering", "and", "a", "metric", "compute", "the", "score", "that", "measures", "the", "clustering", "quality", "according", "to", "the", "metric", ".", "<", "/", "pre", ">" ]
train
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L742-L752
psamsotha/jersey-properties
src/main/java/com/github/psamsotha/jersey/properties/JerseyPropertiesFeature.java
JerseyPropertiesFeature.addDefaultProviderToMap
private void addDefaultProviderToMap(Map<String, String> propertiesMap, String propertiesPath) { """ Add default {@code PropertiesProvider} to global properties. @param propertiesMap the global properties. @param propertiesPath the path for the provider to find the properties file. """ DefaultProp...
java
private void addDefaultProviderToMap(Map<String, String> propertiesMap, String propertiesPath) { DefaultPropertiesProvider provider = new DefaultPropertiesProvider(propertiesPath); propertiesMap.putAll(provider.getProperties()); }
[ "private", "void", "addDefaultProviderToMap", "(", "Map", "<", "String", ",", "String", ">", "propertiesMap", ",", "String", "propertiesPath", ")", "{", "DefaultPropertiesProvider", "provider", "=", "new", "DefaultPropertiesProvider", "(", "propertiesPath", ")", ";", ...
Add default {@code PropertiesProvider} to global properties. @param propertiesMap the global properties. @param propertiesPath the path for the provider to find the properties file.
[ "Add", "default", "{", "@code", "PropertiesProvider", "}", "to", "global", "properties", "." ]
train
https://github.com/psamsotha/jersey-properties/blob/97ea8c5d31189c64688ca60bf3995239fce8830b/src/main/java/com/github/psamsotha/jersey/properties/JerseyPropertiesFeature.java#L140-L143
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/i18n/ResourceManager.java
ResourceManager.putCachedResource
private static void putCachedResource( String baseName, Resources resources ) { """ Cache specified resource in weak reference. @param baseName the resource key @param resources the resources object """ synchronized( ResourceManager.class ) { WeakReference<Resources> ref = new ...
java
private static void putCachedResource( String baseName, Resources resources ) { synchronized( ResourceManager.class ) { WeakReference<Resources> ref = new WeakReference<Resources>( resources ); RESOURCES.put( baseName, ref ); } }
[ "private", "static", "void", "putCachedResource", "(", "String", "baseName", ",", "Resources", "resources", ")", "{", "synchronized", "(", "ResourceManager", ".", "class", ")", "{", "WeakReference", "<", "Resources", ">", "ref", "=", "new", "WeakReference", "<",...
Cache specified resource in weak reference. @param baseName the resource key @param resources the resources object
[ "Cache", "specified", "resource", "in", "weak", "reference", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/i18n/ResourceManager.java#L138-L145
alkacon/opencms-core
src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java
CmsSolrSpellchecker.getSpellcheckingResult
public void getSpellcheckingResult( final HttpServletResponse res, final ServletRequest servletRequest, final CmsObject cms) throws CmsPermissionViolationException, IOException { """ Performs spellchecking using Solr and returns the spellchecking results using JSON. @param res The Ht...
java
public void getSpellcheckingResult( final HttpServletResponse res, final ServletRequest servletRequest, final CmsObject cms) throws CmsPermissionViolationException, IOException { // Perform a permission check performPermissionCheck(cms); // Set the appropriate respo...
[ "public", "void", "getSpellcheckingResult", "(", "final", "HttpServletResponse", "res", ",", "final", "ServletRequest", "servletRequest", ",", "final", "CmsObject", "cms", ")", "throws", "CmsPermissionViolationException", ",", "IOException", "{", "// Perform a permission ch...
Performs spellchecking using Solr and returns the spellchecking results using JSON. @param res The HttpServletResponse object. @param servletRequest The ServletRequest object. @param cms The CmsObject object. @throws CmsPermissionViolationException in case of the anonymous guest user @throws IOException if writing th...
[ "Performs", "spellchecking", "using", "Solr", "and", "returns", "the", "spellchecking", "results", "using", "JSON", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L187-L228
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java
HelpUtil.removeViewer
protected static void removeViewer(Page page, boolean close) { """ Remove and optionally close the help viewer associated with the specified page. @param page The page owning the help viewer. @param close If true, close the help viewer after removing it. """ IHelpViewer viewer = (IHelpViewer) page....
java
protected static void removeViewer(Page page, boolean close) { IHelpViewer viewer = (IHelpViewer) page.removeAttribute(VIEWER_ATTRIB); if (viewer != null && close) { viewer.close(); } }
[ "protected", "static", "void", "removeViewer", "(", "Page", "page", ",", "boolean", "close", ")", "{", "IHelpViewer", "viewer", "=", "(", "IHelpViewer", ")", "page", ".", "removeAttribute", "(", "VIEWER_ATTRIB", ")", ";", "if", "(", "viewer", "!=", "null", ...
Remove and optionally close the help viewer associated with the specified page. @param page The page owning the help viewer. @param close If true, close the help viewer after removing it.
[ "Remove", "and", "optionally", "close", "the", "help", "viewer", "associated", "with", "the", "specified", "page", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java#L160-L166
VoltDB/voltdb
src/frontend/org/voltcore/messaging/SocketJoiner.java
SocketJoiner.requestHostId
private RequestHostIdResponse requestHostId ( MessagingChannel messagingChannel, Set<String> activeVersions) throws Exception { """ Connection handshake to the leader, ask the leader to assign a host Id for current node. @param @return array of two JSON objects, first is leader info, sec...
java
private RequestHostIdResponse requestHostId ( MessagingChannel messagingChannel, Set<String> activeVersions) throws Exception { VersionChecker versionChecker = m_acceptor.getVersionChecker(); activeVersions.add(versionChecker.getVersionString()); JSONObject jsObj = n...
[ "private", "RequestHostIdResponse", "requestHostId", "(", "MessagingChannel", "messagingChannel", ",", "Set", "<", "String", ">", "activeVersions", ")", "throws", "Exception", "{", "VersionChecker", "versionChecker", "=", "m_acceptor", ".", "getVersionChecker", "(", ")"...
Connection handshake to the leader, ask the leader to assign a host Id for current node. @param @return array of two JSON objects, first is leader info, second is the response to our request @throws Exception
[ "Connection", "handshake", "to", "the", "leader", "ask", "the", "leader", "to", "assign", "a", "host", "Id", "for", "current", "node", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/SocketJoiner.java#L763-L801
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java
KeyStore.getInstance
public static KeyStore getInstance(String type) throws KeyStoreException { """ Returns a keystore object of the specified type. <p> This method traverses the list of registered security Providers, starting with the most preferred Provider. A new KeyStore object encapsulating the KeyStoreSpi implement...
java
public static KeyStore getInstance(String type) throws KeyStoreException { try { Object[] objs = Security.getImpl(type, "KeyStore", (String)null); return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); } catch (NoSuchAlgorithmException nsae) { ...
[ "public", "static", "KeyStore", "getInstance", "(", "String", "type", ")", "throws", "KeyStoreException", "{", "try", "{", "Object", "[", "]", "objs", "=", "Security", ".", "getImpl", "(", "type", ",", "\"KeyStore\"", ",", "(", "String", ")", "null", ")", ...
Returns a keystore object of the specified type. <p> This method traverses the list of registered security Providers, starting with the most preferred Provider. A new KeyStore object encapsulating the KeyStoreSpi implementation from the first Provider that supports the specified type is returned. <p> Note that the li...
[ "Returns", "a", "keystore", "object", "of", "the", "specified", "type", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java#L651-L662
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
Gen.genExpr
public Item genExpr(JCTree tree, Type pt) { """ Visitor method: generate code for an expression, catching and reporting any completion failures. @param tree The expression to be visited. @param pt The expression's expected type (proto-type). """ Type prevPt = this.pt; try { ...
java
public Item genExpr(JCTree tree, Type pt) { Type prevPt = this.pt; try { if (tree.type.constValue() != null) { // Short circuit any expressions which are constants tree.accept(classReferenceVisitor); checkStringConstant(tree.pos(), tree.type.co...
[ "public", "Item", "genExpr", "(", "JCTree", "tree", ",", "Type", "pt", ")", "{", "Type", "prevPt", "=", "this", ".", "pt", ";", "try", "{", "if", "(", "tree", ".", "type", ".", "constValue", "(", ")", "!=", "null", ")", "{", "// Short circuit any exp...
Visitor method: generate code for an expression, catching and reporting any completion failures. @param tree The expression to be visited. @param pt The expression's expected type (proto-type).
[ "Visitor", "method", ":", "generate", "code", "for", "an", "expression", "catching", "and", "reporting", "any", "completion", "failures", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L805-L825
LAW-Unimi/BUbiNG
src/it/unimi/di/law/bubing/RuntimeConfiguration.java
RuntimeConfiguration.handleIPv4
private int handleIPv4(final String s) throws ConfigurationException { """ Converts a string specifying an IPv4 address into an integer. The string can be either a single integer (representing the address) or a dot-separated 4-tuple of bytes. @param s the string to be converted. @return the integer representi...
java
private int handleIPv4(final String s) throws ConfigurationException { try { if (!RuntimeConfiguration.DOTTED_ADDRESS.matcher(s).matches()) throw new ConfigurationException("Malformed IPv4 " + s + " for blacklisting"); // Note that since we're sure this is a dotted-notation address, we pass directly through Ine...
[ "private", "int", "handleIPv4", "(", "final", "String", "s", ")", "throws", "ConfigurationException", "{", "try", "{", "if", "(", "!", "RuntimeConfiguration", ".", "DOTTED_ADDRESS", ".", "matcher", "(", "s", ")", ".", "matches", "(", ")", ")", "throw", "ne...
Converts a string specifying an IPv4 address into an integer. The string can be either a single integer (representing the address) or a dot-separated 4-tuple of bytes. @param s the string to be converted. @return the integer representing the IP address specified by s. @throws ConfigurationException
[ "Converts", "a", "string", "specifying", "an", "IPv4", "address", "into", "an", "integer", ".", "The", "string", "can", "be", "either", "a", "single", "integer", "(", "representing", "the", "address", ")", "or", "a", "dot", "-", "separated", "4", "-", "t...
train
https://github.com/LAW-Unimi/BUbiNG/blob/e148acc90031a4f3967422705a9fb07ddaf155e4/src/it/unimi/di/law/bubing/RuntimeConfiguration.java#L302-L312
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadPoolExecutor.java
ThreadPoolExecutor.setKeepAliveTime
public void setKeepAliveTime(long time, TimeUnit unit) { """ Sets the thread keep-alive time, which is the amount of time that threads may remain idle before being terminated. Threads that wait this amount of time without processing a task will be terminated if there are more than the core number of threads cu...
java
public void setKeepAliveTime(long time, TimeUnit unit) { if (time < 0) throw new IllegalArgumentException(); if (time == 0 && allowsCoreThreadTimeOut()) throw new IllegalArgumentException("Core threads must have nonzero keep alive times"); long keepAliveTime = unit.toNano...
[ "public", "void", "setKeepAliveTime", "(", "long", "time", ",", "TimeUnit", "unit", ")", "{", "if", "(", "time", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "if", "(", "time", "==", "0", "&&", "allowsCoreThreadTimeOut", "(", ...
Sets the thread keep-alive time, which is the amount of time that threads may remain idle before being terminated. Threads that wait this amount of time without processing a task will be terminated if there are more than the core number of threads currently in the pool, or if this pool {@linkplain #allowsCoreThreadTime...
[ "Sets", "the", "thread", "keep", "-", "alive", "time", "which", "is", "the", "amount", "of", "time", "that", "threads", "may", "remain", "idle", "before", "being", "terminated", ".", "Threads", "that", "wait", "this", "amount", "of", "time", "without", "pr...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadPoolExecutor.java#L1463-L1473
google/error-prone-javac
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
Main.processDirectory
boolean processDirectory(String dirname, Collection<String> classNames) throws IOException { """ Processes named class files in the given directory. The directory should be the root of a package hierarchy. If classNames is empty, walks the directory hierarchy to find all classes. @param dirname the name of th...
java
boolean processDirectory(String dirname, Collection<String> classNames) throws IOException { if (!Files.isDirectory(Paths.get(dirname))) { err.printf("%s: not a directory%n", dirname); return false; } classPath.add(0, new File(dirname)); if (classNames.isEmpty()...
[ "boolean", "processDirectory", "(", "String", "dirname", ",", "Collection", "<", "String", ">", "classNames", ")", "throws", "IOException", "{", "if", "(", "!", "Files", ".", "isDirectory", "(", "Paths", ".", "get", "(", "dirname", ")", ")", ")", "{", "e...
Processes named class files in the given directory. The directory should be the root of a package hierarchy. If classNames is empty, walks the directory hierarchy to find all classes. @param dirname the name of the directory to process @param classNames the names of classes to process @return true for success, false f...
[ "Processes", "named", "class", "files", "in", "the", "given", "directory", ".", "The", "directory", "should", "be", "the", "root", "of", "a", "package", "hierarchy", ".", "If", "classNames", "is", "empty", "walks", "the", "directory", "hierarchy", "to", "fin...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java#L233-L254
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.createCoverageFromTemplate
public static GridCoverage2D createCoverageFromTemplate( GridCoverage2D template, Double value, WritableRaster[] writableRasterHolder ) { """ Creates a new {@link GridCoverage2D} using an existing as template. @param template the template to use. @param value the value to set the new raster to, if ...
java
public static GridCoverage2D createCoverageFromTemplate( GridCoverage2D template, Double value, WritableRaster[] writableRasterHolder ) { RegionMap regionMap = getRegionParamsFromGridCoverage(template); double west = regionMap.getWest(); double south = regionMap.getSouth(); ...
[ "public", "static", "GridCoverage2D", "createCoverageFromTemplate", "(", "GridCoverage2D", "template", ",", "Double", "value", ",", "WritableRaster", "[", "]", "writableRasterHolder", ")", "{", "RegionMap", "regionMap", "=", "getRegionParamsFromGridCoverage", "(", "templa...
Creates a new {@link GridCoverage2D} using an existing as template. @param template the template to use. @param value the value to set the new raster to, if not <code>null</code>. @param writableRasterHolder an array of length 1 to place the writable raster in, that was can be used to populate the coverage. If <code>n...
[ "Creates", "a", "new", "{", "@link", "GridCoverage2D", "}", "using", "an", "existing", "as", "template", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L299-L330
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java
AuthorizationRequestManager.submitAnswer
public void submitAnswer(JSONObject answer, String realm) { """ Adds an expected challenge answer to collection of answers. @param answer Answer to add. @param realm Authentication realm for the answer. """ if (answers == null) { answers = new JSONObject(); } try { ...
java
public void submitAnswer(JSONObject answer, String realm) { if (answers == null) { answers = new JSONObject(); } try { answers.put(realm, answer); if (isAnswersFilled()) { resendRequest(); } } catch (Throwable t) { ...
[ "public", "void", "submitAnswer", "(", "JSONObject", "answer", ",", "String", "realm", ")", "{", "if", "(", "answers", "==", "null", ")", "{", "answers", "=", "new", "JSONObject", "(", ")", ";", "}", "try", "{", "answers", ".", "put", "(", "realm", "...
Adds an expected challenge answer to collection of answers. @param answer Answer to add. @param realm Authentication realm for the answer.
[ "Adds", "an", "expected", "challenge", "answer", "to", "collection", "of", "answers", "." ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java#L306-L319
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java
RobustLoaderWriterResilienceStrategy.getFailure
@Override public V getFailure(K key, StoreAccessException e) { """ Get the value from the loader-writer. @param key the key being retrieved @param e the triggered failure @return value as loaded from the loader-writer """ try { return loaderWriter.load(key); } catch (Exception e1) { ...
java
@Override public V getFailure(K key, StoreAccessException e) { try { return loaderWriter.load(key); } catch (Exception e1) { throw ExceptionFactory.newCacheLoadingException(e1, e); } finally { cleanup(key, e); } }
[ "@", "Override", "public", "V", "getFailure", "(", "K", "key", ",", "StoreAccessException", "e", ")", "{", "try", "{", "return", "loaderWriter", ".", "load", "(", "key", ")", ";", "}", "catch", "(", "Exception", "e1", ")", "{", "throw", "ExceptionFactory...
Get the value from the loader-writer. @param key the key being retrieved @param e the triggered failure @return value as loaded from the loader-writer
[ "Get", "the", "value", "from", "the", "loader", "-", "writer", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java#L55-L64
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.getAttachment
public InputStream getAttachment(String docId, String attachmentName) { """ Reads an attachment from the database. The stream must be closed after usage, otherwise http connection leaks will occur. @param docId the document id @param attachmentName the attachment name @return the attachment in the form of ...
java
public InputStream getAttachment(String docId, String attachmentName) { return getAttachment(docId, attachmentName, null); }
[ "public", "InputStream", "getAttachment", "(", "String", "docId", ",", "String", "attachmentName", ")", "{", "return", "getAttachment", "(", "docId", ",", "attachmentName", ",", "null", ")", ";", "}" ]
Reads an attachment from the database. The stream must be closed after usage, otherwise http connection leaks will occur. @param docId the document id @param attachmentName the attachment name @return the attachment in the form of an {@code InputStream}.
[ "Reads", "an", "attachment", "from", "the", "database", "." ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L1204-L1206
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRTextViewSceneObject.java
GVRTextViewSceneObject.setTypeface
public boolean setTypeface(GVRContext gvrContext, String font) { """ Sets the typeface (font) @param gvrContext @param font a string that matches the font name saved in the assets directory Must include the file ending such as "myFont.ttf" @return """ return setTypeface(gvrContext, font, fontSty...
java
public boolean setTypeface(GVRContext gvrContext, String font) { return setTypeface(gvrContext, font, fontStyleTypes.PLAIN); }
[ "public", "boolean", "setTypeface", "(", "GVRContext", "gvrContext", ",", "String", "font", ")", "{", "return", "setTypeface", "(", "gvrContext", ",", "font", ",", "fontStyleTypes", ".", "PLAIN", ")", ";", "}" ]
Sets the typeface (font) @param gvrContext @param font a string that matches the font name saved in the assets directory Must include the file ending such as "myFont.ttf" @return
[ "Sets", "the", "typeface", "(", "font", ")", "@param", "gvrContext", "@param", "font", "a", "string", "that", "matches", "the", "font", "name", "saved", "in", "the", "assets", "directory", "Must", "include", "the", "file", "ending", "such", "as", "myFont", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRTextViewSceneObject.java#L463-L465
google/auto
common/src/main/java/com/google/auto/common/AnnotationMirrors.java
AnnotationMirrors.getAnnotationValue
public static AnnotationValue getAnnotationValue( AnnotationMirror annotationMirror, String elementName) { """ Returns an {@link AnnotationValue} for the named element if such an element was either declared in the usage represented by the provided {@link AnnotationMirror}, or if such an element was defined...
java
public static AnnotationValue getAnnotationValue( AnnotationMirror annotationMirror, String elementName) { return getAnnotationElementAndValue(annotationMirror, elementName).getValue(); }
[ "public", "static", "AnnotationValue", "getAnnotationValue", "(", "AnnotationMirror", "annotationMirror", ",", "String", "elementName", ")", "{", "return", "getAnnotationElementAndValue", "(", "annotationMirror", ",", "elementName", ")", ".", "getValue", "(", ")", ";", ...
Returns an {@link AnnotationValue} for the named element if such an element was either declared in the usage represented by the provided {@link AnnotationMirror}, or if such an element was defined with a default. @throws IllegalArgumentException if no element is defined with the given elementName.
[ "Returns", "an", "{", "@link", "AnnotationValue", "}", "for", "the", "named", "element", "if", "such", "an", "element", "was", "either", "declared", "in", "the", "usage", "represented", "by", "the", "provided", "{", "@link", "AnnotationMirror", "}", "or", "i...
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/common/src/main/java/com/google/auto/common/AnnotationMirrors.java#L112-L115
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <T1, T2, T3, R> Func3<T1, T2, T3, Observable<R>> toAsync(Func3<? super T1, ? super T2, ? super T3, ? extends R> func) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-...
java
public static <T1, T2, T3, R> Func3<T1, T2, T3, Observable<R>> toAsync(Func3<? super T1, ? super T2, ? super T3, ? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "R", ">", "Func3", "<", "T1", ",", "T2", ",", "T3", ",", "Observable", "<", "R", ">", ">", "toAsync", "(", "Func3", "<", "?", "super", "T1", ",", "?", "super", "T2", ",", "?", "super",...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type @...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L308-L310
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Maybe.java
Maybe.flatMapPublisher
@BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Flowable<R> flatMapPublisher(Function<? super T, ? extends Publisher<? extends R>> mapper) { """ Returns a Flowable that emits items based on applying a specified function to the item...
java
@BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Flowable<R> flatMapPublisher(Function<? super T, ? extends Publisher<? extends R>> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); return RxJavaPlugins.onA...
[ "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "R", ">", "Flowable", "<", "R", ">", "flatMapPublisher", "(", "Function", ...
Returns a Flowable that emits items based on applying a specified function to the item emitted by the source Maybe, where that function returns a Publisher. <p> <img width="640" height="260" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.flatMapPublisher.png" alt=""> <dl> <dt><b>Backpressur...
[ "Returns", "a", "Flowable", "that", "emits", "items", "based", "on", "applying", "a", "specified", "function", "to", "the", "item", "emitted", "by", "the", "source", "Maybe", "where", "that", "function", "returns", "a", "Publisher", ".", "<p", ">", "<img", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Maybe.java#L3065-L3071
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java
StyleUtils.createPolygonOptions
public static PolygonOptions createPolygonOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { """ Create new polygon options populated with the feature row style @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#...
java
public static PolygonOptions createPolygonOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { PolygonOptions polygonOptions = new PolygonOptions(); setFeatureStyle(polygonOptions, geoPackage, featureRow, density); return polygonOptions; }
[ "public", "static", "PolygonOptions", "createPolygonOptions", "(", "GeoPackage", "geoPackage", ",", "FeatureRow", "featureRow", ",", "float", "density", ")", "{", "PolygonOptions", "polygonOptions", "=", "new", "PolygonOptions", "(", ")", ";", "setFeatureStyle", "(", ...
Create new polygon options populated with the feature row style @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#density} @return polygon options populated with the feature style
[ "Create", "new", "polygon", "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#L488-L494
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/content/CmsElementChangeLocaleDialog.java
CmsElementChangeLocaleDialog.getLocaleConfigOptions
public List getLocaleConfigOptions() { """ Returns the selector widget options to build a Locale selector widget.<p> @return the selector widget options to build a Locale selector widget """ List result = new ArrayList(); List locales = OpenCms.getLocaleManager().getAvailableLocales(); ...
java
public List getLocaleConfigOptions() { List result = new ArrayList(); List locales = OpenCms.getLocaleManager().getAvailableLocales(); Iterator i = locales.iterator(); while (i.hasNext()) { Locale locale = (Locale)i.next(); String localeStr = locale.toString(); ...
[ "public", "List", "getLocaleConfigOptions", "(", ")", "{", "List", "result", "=", "new", "ArrayList", "(", ")", ";", "List", "locales", "=", "OpenCms", ".", "getLocaleManager", "(", ")", ".", "getAvailableLocales", "(", ")", ";", "Iterator", "i", "=", "loc...
Returns the selector widget options to build a Locale selector widget.<p> @return the selector widget options to build a Locale selector widget
[ "Returns", "the", "selector", "widget", "options", "to", "build", "a", "Locale", "selector", "widget", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/CmsElementChangeLocaleDialog.java#L148-L163
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.verifyEntityId
private <T extends IEntity> Object verifyEntityId(T entity) throws FMSException { """ Verifies that entity has getID method which can be invoked to retrieve entity id @param entity @param <T> @return the result of dispatching getId method @throws FMSException """ Class<?> objectClass = entity.getCl...
java
private <T extends IEntity> Object verifyEntityId(T entity) throws FMSException { Class<?> objectClass = entity.getClass(); Object rid = null; Method m; try { m = objectClass.getMethod("getId"); rid = m.invoke(entity); } catch (Exception e) { ...
[ "private", "<", "T", "extends", "IEntity", ">", "Object", "verifyEntityId", "(", "T", "entity", ")", "throws", "FMSException", "{", "Class", "<", "?", ">", "objectClass", "=", "entity", ".", "getClass", "(", ")", ";", "Object", "rid", "=", "null", ";", ...
Verifies that entity has getID method which can be invoked to retrieve entity id @param entity @param <T> @return the result of dispatching getId method @throws FMSException
[ "Verifies", "that", "entity", "has", "getID", "method", "which", "can", "be", "invoked", "to", "retrieve", "entity", "id" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L1385-L1401