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
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java
Partitioner.getAppendLimitType
private static AppendMaxLimitType getAppendLimitType(ExtractType extractType, String maxLimit) { """ Get append max limit type from the input @param extractType Extract type @param maxLimit @return Max limit type """ LOG.debug("Getting append limit type"); AppendMaxLimitType limitType; switch ...
java
private static AppendMaxLimitType getAppendLimitType(ExtractType extractType, String maxLimit) { LOG.debug("Getting append limit type"); AppendMaxLimitType limitType; switch (extractType) { case APPEND_DAILY: limitType = AppendMaxLimitType.CURRENTDATE; break; case APPEND_HOURLY: ...
[ "private", "static", "AppendMaxLimitType", "getAppendLimitType", "(", "ExtractType", "extractType", ",", "String", "maxLimit", ")", "{", "LOG", ".", "debug", "(", "\"Getting append limit type\"", ")", ";", "AppendMaxLimitType", "limitType", ";", "switch", "(", "extrac...
Get append max limit type from the input @param extractType Extract type @param maxLimit @return Max limit type
[ "Get", "append", "max", "limit", "type", "from", "the", "input" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java#L550-L573
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.checkPermissions
public void checkPermissions( CmsRequestContext context, CmsResource resource, CmsPermissionSet requiredPermissions, boolean checkLock, CmsResourceFilter filter) throws CmsException, CmsSecurityException { """ Performs a blocking permission check on a resource.<p> If ...
java
public void checkPermissions( CmsRequestContext context, CmsResource resource, CmsPermissionSet requiredPermissions, boolean checkLock, CmsResourceFilter filter) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); ...
[ "public", "void", "checkPermissions", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ",", "CmsPermissionSet", "requiredPermissions", ",", "boolean", "checkLock", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", ",", "CmsSecurityExce...
Performs a blocking permission check on a resource.<p> If the required permissions are not satisfied by the permissions the user has on the resource, an exception is thrown.<p> @param context the current request context @param resource the resource on which permissions are required @param requiredPermissions the set ...
[ "Performs", "a", "blocking", "permission", "check", "on", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L445-L460
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/UserResources.java
UserResources.removeAccess
@DELETE @Produces(MediaType.APPLICATION_JSON) @Path("/revoke_oauth_access/ { """ Revokes Oauth access of app from argus for a particular user @param req The Http Request with authorization header @param appName Application Name which is recognized by Argus Oauth @return Returns either...
java
@DELETE @Produces(MediaType.APPLICATION_JSON) @Path("/revoke_oauth_access/{appName}") @Description("Revokes Oauth access of app from argus for a particular user") public Response removeAccess(@Context HttpServletRequest req,@PathParam("appName") String appName) { String userName=findUserByToken(...
[ "@", "DELETE", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Path", "(", "\"/revoke_oauth_access/{appName}\"", ")", "@", "Description", "(", "\"Revokes Oauth access of app from argus for a particular user\"", ")", "public", "Response", "removeAccess...
Revokes Oauth access of app from argus for a particular user @param req The Http Request with authorization header @param appName Application Name which is recognized by Argus Oauth @return Returns either Success or OAuthException
[ "Revokes", "Oauth", "access", "of", "app", "from", "argus", "for", "a", "particular", "user" ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/UserResources.java#L437-L454
stevespringett/Alpine
alpine/src/main/java/alpine/resources/AlpineResource.java
AlpineResource.logSecurityEvent
protected void logSecurityEvent(final Logger logger, final Marker marker, final String message) { """ Logs a security event to the security audit log. Expects one of: {@link SecurityMarkers#SECURITY_AUDIT} {@link SecurityMarkers#SECURITY_SUCCESS} {@link SecurityMarkers#SECURITY_FAILURE} @param logger the logge...
java
protected void logSecurityEvent(final Logger logger, final Marker marker, final String message) { if (!(SecurityMarkers.SECURITY_AUDIT == marker || SecurityMarkers.SECURITY_SUCCESS == marker || SecurityMarkers.SECURITY_FAILURE == marker)) { return; } final...
[ "protected", "void", "logSecurityEvent", "(", "final", "Logger", "logger", ",", "final", "Marker", "marker", ",", "final", "String", "message", ")", "{", "if", "(", "!", "(", "SecurityMarkers", ".", "SECURITY_AUDIT", "==", "marker", "||", "SecurityMarkers", "....
Logs a security event to the security audit log. Expects one of: {@link SecurityMarkers#SECURITY_AUDIT} {@link SecurityMarkers#SECURITY_SUCCESS} {@link SecurityMarkers#SECURITY_FAILURE} @param logger the logger to use @param marker the marker to add to the event @param message the initial content of the event @since 1....
[ "Logs", "a", "security", "event", "to", "the", "security", "audit", "log", ".", "Expects", "one", "of", ":", "{" ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/resources/AlpineResource.java#L395-L409
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_wifi_wifiName_PUT
public void serviceName_modem_wifi_wifiName_PUT(String serviceName, String wifiName, OvhWLAN body) throws IOException { """ Alter this object properties REST: PUT /xdsl/{serviceName}/modem/wifi/{wifiName} @param body [required] New object properties @param serviceName [required] The internal name of your XDSL...
java
public void serviceName_modem_wifi_wifiName_PUT(String serviceName, String wifiName, OvhWLAN body) throws IOException { String qPath = "/xdsl/{serviceName}/modem/wifi/{wifiName}"; StringBuilder sb = path(qPath, serviceName, wifiName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_modem_wifi_wifiName_PUT", "(", "String", "serviceName", ",", "String", "wifiName", ",", "OvhWLAN", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/wifi/{wifiName}\"", ";", "StringBuilder", "sb"...
Alter this object properties REST: PUT /xdsl/{serviceName}/modem/wifi/{wifiName} @param body [required] New object properties @param serviceName [required] The internal name of your XDSL offer @param wifiName [required] Name of the Wifi
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1176-L1180
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.performDeletion
private void performDeletion(final ClassDescriptor cld, final Object obj, final Identity oid, final boolean ignoreReferences) throws PersistenceBrokerException { """ This method perform the delete of the specified object based on the {@link org.apache.ojb.broker.metadata.ClassDescriptor}. """ // 1...
java
private void performDeletion(final ClassDescriptor cld, final Object obj, final Identity oid, final boolean ignoreReferences) throws PersistenceBrokerException { // 1. delete dependend collections if (!ignoreReferences && cld.getCollectionDescriptors().size() > 0) { ...
[ "private", "void", "performDeletion", "(", "final", "ClassDescriptor", "cld", ",", "final", "Object", "obj", ",", "final", "Identity", "oid", ",", "final", "boolean", "ignoreReferences", ")", "throws", "PersistenceBrokerException", "{", "// 1. delete dependend collectio...
This method perform the delete of the specified object based on the {@link org.apache.ojb.broker.metadata.ClassDescriptor}.
[ "This", "method", "perform", "the", "delete", "of", "the", "specified", "object", "based", "on", "the", "{" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L598-L627
lotaris/jee-validation
src/main/java/com/lotaris/jee/validation/preprocessing/BeanValidationPreprocessor.java
BeanValidationPreprocessor.addError
private void addError(IValidationContext context, ConstraintViolation violation, JsonPointer pointer) { """ Adds an error message describing a constraint violation. @param context the validation context to add errors to @param violation the constraint violation @param pointer a JSON pointer to the invalid val...
java
private void addError(IValidationContext context, ConstraintViolation violation, JsonPointer pointer) { // extract the error code, if any final Class<? extends Annotation> annotationType = violation.getConstraintDescriptor().getAnnotation().annotationType(); final IErrorCode validationCode = constraintConverter....
[ "private", "void", "addError", "(", "IValidationContext", "context", ",", "ConstraintViolation", "violation", ",", "JsonPointer", "pointer", ")", "{", "// extract the error code, if any", "final", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", "=", ...
Adds an error message describing a constraint violation. @param context the validation context to add errors to @param violation the constraint violation @param pointer a JSON pointer to the invalid value in the JSON document @return an API error message
[ "Adds", "an", "error", "message", "describing", "a", "constraint", "violation", "." ]
train
https://github.com/lotaris/jee-validation/blob/feefff820b5a67c7471a13e08fdaf2d60bb3ad16/src/main/java/com/lotaris/jee/validation/preprocessing/BeanValidationPreprocessor.java#L162-L171
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.notEquals
@ArgumentsChecked @Throws( { """ Ensures that a passed {@code Comparable} is not equal to another {@code Comparable}. The comparison is made using {@code expected.compareTo(check) == 0}. <p> We recommend to use the overloaded method {@link ConditionalCheck#notEquals(condition,Comparable, Comparable, String)...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalEqualException.class }) public static <T extends Comparable<T>> void notEquals(final boolean condition, @Nonnull final T expected, @Nonnull final T check) { Check.notNull(expected, "expected"); Check.notNull(check, "check"); if (condition) ...
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalEqualException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "void", "notEquals", "(", "final", ...
Ensures that a passed {@code Comparable} is not equal to another {@code Comparable}. The comparison is made using {@code expected.compareTo(check) == 0}. <p> We recommend to use the overloaded method {@link ConditionalCheck#notEquals(condition,Comparable, Comparable, String)} and pass as second argument the name of th...
[ "Ensures", "that", "a", "passed", "{", "@code", "Comparable", "}", "is", "not", "equal", "to", "another", "{", "@code", "Comparable", "}", ".", "The", "comparison", "is", "made", "using", "{", "@code", "expected", ".", "compareTo", "(", "check", ")", "==...
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L1755-L1764
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.printUsage
public void printUsage(Writer out, ResourceBundle rb, OptionHandlerFilter filter) { """ Prints the list of all the non-hidden options and their usages to the screen. @param rb If non-{@code null}, {@link Option#usage()} is treated as a key to obtain the actual message from this resource bundle. @param filter...
java
public void printUsage(Writer out, ResourceBundle rb, OptionHandlerFilter filter) { PrintWriter w = new PrintWriter(out); // determine the length of the option + metavar first int len = 0; for (OptionHandler h : arguments) { int curLen = getPrefixLen(h, rb); len =...
[ "public", "void", "printUsage", "(", "Writer", "out", ",", "ResourceBundle", "rb", ",", "OptionHandlerFilter", "filter", ")", "{", "PrintWriter", "w", "=", "new", "PrintWriter", "(", "out", ")", ";", "// determine the length of the option + metavar first", "int", "l...
Prints the list of all the non-hidden options and their usages to the screen. @param rb If non-{@code null}, {@link Option#usage()} is treated as a key to obtain the actual message from this resource bundle. @param filter Controls which options to be printed.
[ "Prints", "the", "list", "of", "all", "the", "non", "-", "hidden", "options", "and", "their", "usages", "to", "the", "screen", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L285-L307
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/WorkspaceResourcesImpl.java
WorkspaceResourcesImpl.getWorkspace
public Workspace getWorkspace(long id, Boolean loadAll, EnumSet<SourceInclusion> includes) throws SmartsheetException { """ Get a workspace. It mirrors to the following Smartsheet REST API method: GET /workspace/{id} Exceptions: - InvalidRequestException : if there is any problem with the REST API request...
java
public Workspace getWorkspace(long id, Boolean loadAll, EnumSet<SourceInclusion> includes) throws SmartsheetException { String path = "workspaces/" + id; // Add the parameters to a map and build the query string at the end HashMap<String, Object> parameters = new HashMap<String, Object>(); ...
[ "public", "Workspace", "getWorkspace", "(", "long", "id", ",", "Boolean", "loadAll", ",", "EnumSet", "<", "SourceInclusion", ">", "includes", ")", "throws", "SmartsheetException", "{", "String", "path", "=", "\"workspaces/\"", "+", "id", ";", "// Add the parameter...
Get a workspace. It mirrors to the following Smartsheet REST API method: GET /workspace/{id} Exceptions: - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ResourceNotFoundException : if th...
[ "Get", "a", "workspace", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/WorkspaceResourcesImpl.java#L132-L146
mapbox/mapbox-java
services-geojson/src/main/java/com/mapbox/geojson/LineString.java
LineString.fromLngLats
public static LineString fromLngLats(@NonNull MultiPoint multiPoint) { """ Create a new instance of this class by defining a {@link MultiPoint} object and passing. The multipoint object should comply with the GeoJson specifications described in the documentation. @param multiPoint which will make up the LineSt...
java
public static LineString fromLngLats(@NonNull MultiPoint multiPoint) { return new LineString(TYPE, null, multiPoint.coordinates()); }
[ "public", "static", "LineString", "fromLngLats", "(", "@", "NonNull", "MultiPoint", "multiPoint", ")", "{", "return", "new", "LineString", "(", "TYPE", ",", "null", ",", "multiPoint", ".", "coordinates", "(", ")", ")", ";", "}" ]
Create a new instance of this class by defining a {@link MultiPoint} object and passing. The multipoint object should comply with the GeoJson specifications described in the documentation. @param multiPoint which will make up the LineString geometry @return a new instance of this class defined by the values passed ins...
[ "Create", "a", "new", "instance", "of", "this", "class", "by", "defining", "a", "{", "@link", "MultiPoint", "}", "object", "and", "passing", ".", "The", "multipoint", "object", "should", "comply", "with", "the", "GeoJson", "specifications", "described", "in", ...
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geojson/src/main/java/com/mapbox/geojson/LineString.java#L90-L92
grantland/android-autofittextview
library/src/main/java/me/grantland/widget/AutofitHelper.java
AutofitHelper.setMinTextSize
public AutofitHelper setMinTextSize(int unit, float size) { """ Set the minimum text size to a given unit and value. See TypedValue for the possible dimension units. @param unit The desired dimension unit. @param size The desired size in the given units. @attr ref me.grantland.R.styleable#AutofitTextView_m...
java
public AutofitHelper setMinTextSize(int unit, float size) { Context context = mTextView.getContext(); Resources r = Resources.getSystem(); if (context != null) { r = context.getResources(); } setRawMinTextSize(TypedValue.applyDimension(unit, size, r.getDisplayMetric...
[ "public", "AutofitHelper", "setMinTextSize", "(", "int", "unit", ",", "float", "size", ")", "{", "Context", "context", "=", "mTextView", ".", "getContext", "(", ")", ";", "Resources", "r", "=", "Resources", ".", "getSystem", "(", ")", ";", "if", "(", "co...
Set the minimum text size to a given unit and value. See TypedValue for the possible dimension units. @param unit The desired dimension unit. @param size The desired size in the given units. @attr ref me.grantland.R.styleable#AutofitTextView_minTextSize
[ "Set", "the", "minimum", "text", "size", "to", "a", "given", "unit", "and", "value", ".", "See", "TypedValue", "for", "the", "possible", "dimension", "units", "." ]
train
https://github.com/grantland/android-autofittextview/blob/5c565aa5c3ed62aaa31140440bb526e7435e7947/library/src/main/java/me/grantland/widget/AutofitHelper.java#L333-L343
RestComm/Restcomm-Connect
restcomm/restcomm.core/src/main/java/org/restcomm/connect/core/service/number/NumberSelectorServiceImpl.java
NumberSelectorServiceImpl.findByNumber
private NumberSelectionResult findByNumber(List<String> numberQueries, Sid sourceOrganizationSid, Sid destinationOrganizationSid, Set<SearchModifier> modifiers) { """ Iterates over the list of given numbers, and returns the first matching. @param numberQueries the list of numbers to attempt @param ...
java
private NumberSelectionResult findByNumber(List<String> numberQueries, Sid sourceOrganizationSid, Sid destinationOrganizationSid, Set<SearchModifier> modifiers) { Boolean orgFiltered = false; NumberSelectionResult matchedNumber = new NumberSelectionResult(null, orgFiltered, null); in...
[ "private", "NumberSelectionResult", "findByNumber", "(", "List", "<", "String", ">", "numberQueries", ",", "Sid", "sourceOrganizationSid", ",", "Sid", "destinationOrganizationSid", ",", "Set", "<", "SearchModifier", ">", "modifiers", ")", "{", "Boolean", "orgFiltered"...
Iterates over the list of given numbers, and returns the first matching. @param numberQueries the list of numbers to attempt @param sourceOrganizationSid @param destinationOrganizationSid @return the matched number, null if not matched.
[ "Iterates", "over", "the", "list", "of", "given", "numbers", "and", "returns", "the", "first", "matching", "." ]
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.core/src/main/java/org/restcomm/connect/core/service/number/NumberSelectorServiceImpl.java#L184-L200
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/ArrayUtils.java
ArrayUtils.addAll
public static <T> void addAll(Collection<? super T> collection, Collection<? extends T> toAdd) { """ Same as {@link Collection#addAll(Collection)} but in case of RandomAccess iterates over indices """ if (collection == null || toAdd == null) { return; } if (toAdd ins...
java
public static <T> void addAll(Collection<? super T> collection, Collection<? extends T> toAdd) { if (collection == null || toAdd == null) { return; } if (toAdd instanceof RandomAccess) { List<? extends T> randomAccess = (List<? extends T>) toAdd; ...
[ "public", "static", "<", "T", ">", "void", "addAll", "(", "Collection", "<", "?", "super", "T", ">", "collection", ",", "Collection", "<", "?", "extends", "T", ">", "toAdd", ")", "{", "if", "(", "collection", "==", "null", "||", "toAdd", "==", "null"...
Same as {@link Collection#addAll(Collection)} but in case of RandomAccess iterates over indices
[ "Same", "as", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/ArrayUtils.java#L234-L253
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_license_GET
public ArrayList<OvhDailyLicense> organizationName_service_exchangeService_license_GET(String organizationName, String exchangeService, Date fromDate, OvhOvhLicenceEnum license, Date toDate) throws IOException { """ Get active licenses for specific period of time REST: GET /email/exchange/{organizationName}/ser...
java
public ArrayList<OvhDailyLicense> organizationName_service_exchangeService_license_GET(String organizationName, String exchangeService, Date fromDate, OvhOvhLicenceEnum license, Date toDate) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/license"; StringBuilder sb ...
[ "public", "ArrayList", "<", "OvhDailyLicense", ">", "organizationName_service_exchangeService_license_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "Date", "fromDate", ",", "OvhOvhLicenceEnum", "license", ",", "Date", "toDate", ")", "thro...
Get active licenses for specific period of time REST: GET /email/exchange/{organizationName}/service/{exchangeService}/license @param license [required] License type @param fromDate [required] Get active licenses since date @param toDate [required] Get active licenses until date @param organizationName [required] The ...
[ "Get", "active", "licenses", "for", "specific", "period", "of", "time" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2572-L2580
jurmous/etcd4j
src/main/java/mousio/etcd4j/security/SecurityContextBuilder.java
SecurityContextBuilder.forKeystore
public static SslContext forKeystore(InputStream keystore, String keystorePassword, String keyManagerAlgorithm) throws SecurityContextException { """ Builds SslContext using protected keystore file overriding default key manger algorithm. Adequate for non-mutual TLS connections. @param keystore Keys...
java
public static SslContext forKeystore(InputStream keystore, String keystorePassword, String keyManagerAlgorithm) throws SecurityContextException { try { final KeyStore ks = KeyStore.getInstance(KEYSTORE_JKS); final KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyMana...
[ "public", "static", "SslContext", "forKeystore", "(", "InputStream", "keystore", ",", "String", "keystorePassword", ",", "String", "keyManagerAlgorithm", ")", "throws", "SecurityContextException", "{", "try", "{", "final", "KeyStore", "ks", "=", "KeyStore", ".", "ge...
Builds SslContext using protected keystore file overriding default key manger algorithm. Adequate for non-mutual TLS connections. @param keystore Keystore inputstream (file, binaries, etc) @param keystorePassword Password for protected keystore file @param keyManagerAlgorithm Algorithm for keyManager used to process k...
[ "Builds", "SslContext", "using", "protected", "keystore", "file", "overriding", "default", "key", "manger", "algorithm", ".", "Adequate", "for", "non", "-", "mutual", "TLS", "connections", "." ]
train
https://github.com/jurmous/etcd4j/blob/ffb1d574cf85bbab025dd566ce250f1860bbcbc7/src/main/java/mousio/etcd4j/security/SecurityContextBuilder.java#L60-L75
apache/groovy
src/main/groovy/groovy/util/FactoryBuilderSupport.java
FactoryBuilderSupport.resolveFactory
protected Factory resolveFactory(Object name, Map attributes, Object value) { """ This is a hook for subclasses to plugin a custom strategy for mapping names to factories. @param name the name of the factory @param attributes the attributes from the node @param value value arguments from te node ...
java
protected Factory resolveFactory(Object name, Map attributes, Object value) { getProxyBuilder().getContext().put(CHILD_BUILDER, getProxyBuilder()); return getProxyBuilder().getFactories().get(name); }
[ "protected", "Factory", "resolveFactory", "(", "Object", "name", ",", "Map", "attributes", ",", "Object", "value", ")", "{", "getProxyBuilder", "(", ")", ".", "getContext", "(", ")", ".", "put", "(", "CHILD_BUILDER", ",", "getProxyBuilder", "(", ")", ")", ...
This is a hook for subclasses to plugin a custom strategy for mapping names to factories. @param name the name of the factory @param attributes the attributes from the node @param value value arguments from te node @return the Factory associated with name.<br>
[ "This", "is", "a", "hook", "for", "subclasses", "to", "plugin", "a", "custom", "strategy", "for", "mapping", "names", "to", "factories", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/FactoryBuilderSupport.java#L745-L748
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/GenericTransportReceiveListener.java
GenericTransportReceiveListener.getThreadContext
public Dispatchable getThreadContext(Conversation conversation, WsByteBuffer data, int segmentType) { """ This method is called by the JFap channel to give us the oppurtunity to specify which thread the receive listener should dispatch the data on. <p> In this instance, we do not want to do anything special her...
java
public Dispatchable getThreadContext(Conversation conversation, WsByteBuffer data, int segmentType) { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getThreadContext", new Object[] { conversation, data, segmentType }); if (tc.isEntryEnabled()) ...
[ "public", "Dispatchable", "getThreadContext", "(", "Conversation", "conversation", ",", "WsByteBuffer", "data", ",", "int", "segmentType", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", ...
This method is called by the JFap channel to give us the oppurtunity to specify which thread the receive listener should dispatch the data on. <p> In this instance, we do not want to do anything special here, so returning null indicates to the JFap channel that dispatching should be done on a per conversation basis. @...
[ "This", "method", "is", "called", "by", "the", "JFap", "channel", "to", "give", "us", "the", "oppurtunity", "to", "specify", "which", "thread", "the", "receive", "listener", "should", "dispatch", "the", "data", "on", ".", "<p", ">", "In", "this", "instance...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/GenericTransportReceiveListener.java#L252-L260
perwendel/spark
src/main/java/spark/resource/ClassPathResource.java
ClassPathResource.createRelative
@Override public Resource createRelative(String relativePath) { """ This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor. @return the resource. @see spark.utils.StringUtils#applyRelativePath(String, String) """ ...
java
@Override public Resource createRelative(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new ClassPathResource(pathToUse, this.classLoader, this.clazz); }
[ "@", "Override", "public", "Resource", "createRelative", "(", "String", "relativePath", ")", "{", "String", "pathToUse", "=", "StringUtils", ".", "applyRelativePath", "(", "this", ".", "path", ",", "relativePath", ")", ";", "return", "new", "ClassPathResource", ...
This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor. @return the resource. @see spark.utils.StringUtils#applyRelativePath(String, String)
[ "This", "implementation", "creates", "a", "ClassPathResource", "applying", "the", "given", "path", "relative", "to", "the", "path", "of", "the", "underlying", "resource", "of", "this", "descriptor", "." ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/resource/ClassPathResource.java#L203-L207
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/DirectoryOperation.java
DirectoryOperation.addDirectoryOperation
public void addDirectoryOperation(DirectoryOperation op, File f) { """ Add the contents of another directory operation. This is used to record changes when recuring through directories. @param op @param f """ addAll(op.getUpdatedFiles(), updatedFiles); addAll(op.getNewFiles(), newFiles); addAll(op.g...
java
public void addDirectoryOperation(DirectoryOperation op, File f) { addAll(op.getUpdatedFiles(), updatedFiles); addAll(op.getNewFiles(), newFiles); addAll(op.getUnchangedFiles(), unchangedFiles); addAll(op.getDeletedFiles(), deletedFiles); Object obj; for (Enumeration e = op.failedTransfers.keys(); e.hasMor...
[ "public", "void", "addDirectoryOperation", "(", "DirectoryOperation", "op", ",", "File", "f", ")", "{", "addAll", "(", "op", ".", "getUpdatedFiles", "(", ")", ",", "updatedFiles", ")", ";", "addAll", "(", "op", ".", "getNewFiles", "(", ")", ",", "newFiles"...
Add the contents of another directory operation. This is used to record changes when recuring through directories. @param op @param f
[ "Add", "the", "contents", "of", "another", "directory", "operation", ".", "This", "is", "used", "to", "record", "changes", "when", "recuring", "through", "directories", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/DirectoryOperation.java#L181-L194
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java
ActorSDK.startAfterLoginActivity
public void startAfterLoginActivity(Context context, Bundle extras) { """ Method is used internally for starting default activity or activity added in delegate @param context current context @param extras activity extras """ if (!startDelegateActivity(context, delegate.getStartAfterLoginIntent(), ...
java
public void startAfterLoginActivity(Context context, Bundle extras) { if (!startDelegateActivity(context, delegate.getStartAfterLoginIntent(), extras)) { startMessagingActivity(context, extras); } }
[ "public", "void", "startAfterLoginActivity", "(", "Context", "context", ",", "Bundle", "extras", ")", "{", "if", "(", "!", "startDelegateActivity", "(", "context", ",", "delegate", ".", "getStartAfterLoginIntent", "(", ")", ",", "extras", ")", ")", "{", "start...
Method is used internally for starting default activity or activity added in delegate @param context current context @param extras activity extras
[ "Method", "is", "used", "internally", "for", "starting", "default", "activity", "or", "activity", "added", "in", "delegate" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java#L912-L916
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/accesscontrol/rbac/RBACModel.java
RBACModel.createRandomModel
public static RBACModel createRandomModel(Collection<String> users, Collection<String> transactions, Collection<String> roles) { """ Creates a new RBAC model and randomly assigns uses and permissions to roles.<br> The role lattice contains no relations between different roles.<br> Only transaction permissions ar...
java
public static RBACModel createRandomModel(Collection<String> users, Collection<String> transactions, Collection<String> roles){ Validate.notNull(transactions); Validate.notEmpty(transactions); Validate.noNullElements(transactions); SOABase context = new SOABase("c1"); context.setSubjects(users); context.set...
[ "public", "static", "RBACModel", "createRandomModel", "(", "Collection", "<", "String", ">", "users", ",", "Collection", "<", "String", ">", "transactions", ",", "Collection", "<", "String", ">", "roles", ")", "{", "Validate", ".", "notNull", "(", "transaction...
Creates a new RBAC model and randomly assigns uses and permissions to roles.<br> The role lattice contains no relations between different roles.<br> Only transaction permissions are added to the RBAC model.<br> Each user is assigned to exactly one role. @param users The set of users. @param transactions @param roles Th...
[ "Creates", "a", "new", "RBAC", "model", "and", "randomly", "assigns", "uses", "and", "permissions", "to", "roles", ".", "<br", ">", "The", "role", "lattice", "contains", "no", "relations", "between", "different", "roles", ".", "<br", ">", "Only", "transactio...
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/accesscontrol/rbac/RBACModel.java#L454-L482
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java
FileListUtils.listFilesRecursively
public static List<FileStatus> listFilesRecursively(FileSystem fs, Path path, PathFilter fileFilter, boolean applyFilterToDirectories) throws IOException { """ Helper method to list out all files under a specified path. If applyFilterToDirectories is false, the supplied {@link PathFilter} will only be...
java
public static List<FileStatus> listFilesRecursively(FileSystem fs, Path path, PathFilter fileFilter, boolean applyFilterToDirectories) throws IOException { return listFilesRecursivelyHelper(fs, Lists.newArrayList(), fs.getFileStatus(path), fileFilter, applyFilterToDirectories, false); }
[ "public", "static", "List", "<", "FileStatus", ">", "listFilesRecursively", "(", "FileSystem", "fs", ",", "Path", "path", ",", "PathFilter", "fileFilter", ",", "boolean", "applyFilterToDirectories", ")", "throws", "IOException", "{", "return", "listFilesRecursivelyHel...
Helper method to list out all files under a specified path. If applyFilterToDirectories is false, the supplied {@link PathFilter} will only be applied to files.
[ "Helper", "method", "to", "list", "out", "all", "files", "under", "a", "specified", "path", ".", "If", "applyFilterToDirectories", "is", "false", "the", "supplied", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L125-L130
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.loadBalancing_serviceName_portsRedirection_POST
public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_POST(String serviceName, OvhLoadBalancingPort body) throws IOException { """ Add a new port redirection REST: POST /ip/loadBalancing/{serviceName}/portsRedirection @param body [required] The port you want to redirect to @param serviceName ...
java
public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_POST(String serviceName, OvhLoadBalancingPort body) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "POST", sb.toString(), body); ...
[ "public", "OvhLoadBalancingTask", "loadBalancing_serviceName_portsRedirection_POST", "(", "String", "serviceName", ",", "OvhLoadBalancingPort", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/loadBalancing/{serviceName}/portsRedirection\"", ";", "StringB...
Add a new port redirection REST: POST /ip/loadBalancing/{serviceName}/portsRedirection @param body [required] The port you want to redirect to @param serviceName [required] The internal name of your IP load balancing
[ "Add", "a", "new", "port", "redirection" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1541-L1546
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java
DatabasesInner.beginCreateOrUpdateAsync
public Observable<DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { """ Creates or updates a database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Ku...
java
public Observable<DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1<ServiceResponse<DatabaseInner>, Data...
[ "public", "Observable", "<", "DatabaseInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ",", "DatabaseInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsy...
Creates or updates a database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @param parameters The database parameters supplied to the CreateOrUpdate operation. @...
[ "Creates", "or", "updates", "a", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java#L518-L525
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.deleteAsync
public Observable<OperationStatusResponseInner> deleteAsync(String resourceGroupName, String vmScaleSetName) { """ Deletes a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the...
java
public Observable<OperationStatusResponseInner> deleteAsync(String resourceGroupName, String vmScaleSetName) { return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "deleteAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "map", ...
Deletes a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Deletes", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L572-L579
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/InputsInner.java
InputsInner.createOrReplace
public InputInner createOrReplace(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch) { """ Creates an input or replaces an already existing input under an existing streaming job. @param resourceGroupName The name of the resource group that contains ...
java
public InputInner createOrReplace(String resourceGroupName, String jobName, String inputName, InputInner input, String ifMatch, String ifNoneMatch) { return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, inputName, input, ifMatch, ifNoneMatch).toBlocking().single().body(); }
[ "public", "InputInner", "createOrReplace", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "String", "inputName", ",", "InputInner", "input", ",", "String", "ifMatch", ",", "String", "ifNoneMatch", ")", "{", "return", "createOrReplaceWithServiceResp...
Creates an input or replaces an already existing input under an existing streaming job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param jobName The name of the streaming job. @param inputName The nam...
[ "Creates", "an", "input", "or", "replaces", "an", "already", "existing", "input", "under", "an", "existing", "streaming", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/InputsInner.java#L214-L216
yannrichet/rsession
src/main/java/org/math/R/StartRserve.java
StartRserve.launchRserve
public static Process launchRserve(String cmd, /*String libloc,*/ String rargs, String rsrvargs, boolean debug) { """ attempt to start Rserve. Note: parameters are <b>not</b> quoted, so avoid using any quotes in arguments @param cmd command necessary to start R @param rargs arguments are are to be passed to R...
java
public static Process launchRserve(String cmd, /*String libloc,*/ String rargs, String rsrvargs, boolean debug) { Log.Out.println("Waiting for Rserve to start ... (" + cmd + " " + rargs + ")"); Log.Out.println(" From lib directory: " + RserveDaemon.app_dir() + " , which contains: " + Arrays.toString(Rs...
[ "public", "static", "Process", "launchRserve", "(", "String", "cmd", ",", "/*String libloc,*/", "String", "rargs", ",", "String", "rsrvargs", ",", "boolean", "debug", ")", "{", "Log", ".", "Out", ".", "println", "(", "\"Waiting for Rserve to start ... (\"", "+", ...
attempt to start Rserve. Note: parameters are <b>not</b> quoted, so avoid using any quotes in arguments @param cmd command necessary to start R @param rargs arguments are are to be passed to R @param rsrvargs arguments to be passed to Rserve @param debug Rserve debug mode ? @return <code>true</code> if Rserve is runni...
[ "attempt", "to", "start", "Rserve", ".", "Note", ":", "parameters", "are", "<b", ">", "not<", "/", "b", ">", "quoted", "so", "avoid", "using", "any", "quotes", "in", "arguments" ]
train
https://github.com/yannrichet/rsession/blob/acaa47f4da1644e0d067634130c0e88e38cb9035/src/main/java/org/math/R/StartRserve.java#L410-L450
attribyte/acp
src/main/java/org/attribyte/sql/pool/Util.java
Util.throwException
static final void throwException(final Throwable t, final String message) throws SQLException { """ Examine a <tt>Throwable</tt> to preserve <tt>RuntimeException</tt> and <tt>Error</tt>, otherwise throw a <tt>SQLException</tt>. @param t The exception. Ignored if <tt>null</tt>. @param message A message to be adde...
java
static final void throwException(final Throwable t, final String message) throws SQLException { if(t != null) { if(t instanceof SQLException) { throw (SQLException)t; } else if(t instanceof Error) { throw (Error)t; } else if(t instanceof RuntimeException) { ...
[ "static", "final", "void", "throwException", "(", "final", "Throwable", "t", ",", "final", "String", "message", ")", "throws", "SQLException", "{", "if", "(", "t", "!=", "null", ")", "{", "if", "(", "t", "instanceof", "SQLException", ")", "{", "throw", "...
Examine a <tt>Throwable</tt> to preserve <tt>RuntimeException</tt> and <tt>Error</tt>, otherwise throw a <tt>SQLException</tt>. @param t The exception. Ignored if <tt>null</tt>. @param message A message to be added to the <tt>SQLException</tt>. @throws java.sql.SQLException The exception.
[ "Examine", "a", "<tt", ">", "Throwable<", "/", "tt", ">", "to", "preserve", "<tt", ">", "RuntimeException<", "/", "tt", ">", "and", "<tt", ">", "Error<", "/", "tt", ">", "otherwise", "throw", "a", "<tt", ">", "SQLException<", "/", "tt", ">", "." ]
train
https://github.com/attribyte/acp/blob/dbee6ebb83fda4f19fbbbcb9d0ac2b527e3cb659/src/main/java/org/attribyte/sql/pool/Util.java#L49-L65
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java
AccountsInner.beginUpdate
public DataLakeStoreAccountInner beginUpdate(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { """ Updates the specified Data Lake Store account information. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lak...
java
public DataLakeStoreAccountInner beginUpdate(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
[ "public", "DataLakeStoreAccountInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "UpdateDataLakeStoreAccountParameters", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountN...
Updates the specified Data Lake Store account information. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @param parameters Parameters supplied to update the Data Lake Store account. @throws IllegalArgumentException thrown if parameters fail t...
[ "Updates", "the", "specified", "Data", "Lake", "Store", "account", "information", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java#L974-L976
OpenLiberty/open-liberty
dev/com.ibm.ws.tx.embeddable/src/com/ibm/tx/ltc/embeddable/impl/EmbeddableLTCUOWCallback.java
EmbeddableLTCUOWCallback.contextChange
@Override public void contextChange(int typeOfChange, UOWScope scope) throws IllegalStateException { """ /* Notification from UserTransaction or UserActivitySession interface implementations that the state of a bean-managed UOW has changed. As a result of this bean-managed UOW change we may have to change t...
java
@Override public void contextChange(int typeOfChange, UOWScope scope) throws IllegalStateException { final boolean traceOn = TraceComponent.isAnyTracingEnabled(); if (traceOn && tc.isEntryEnabled()) Tr.entry(tc, "contextChange", new Object[] { typeOfChange, scope, this }); ...
[ "@", "Override", "public", "void", "contextChange", "(", "int", "typeOfChange", ",", "UOWScope", "scope", ")", "throws", "IllegalStateException", "{", "final", "boolean", "traceOn", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "if", "(", "tr...
/* Notification from UserTransaction or UserActivitySession interface implementations that the state of a bean-managed UOW has changed. As a result of this bean-managed UOW change we may have to change the LTC that's on the thread.
[ "/", "*", "Notification", "from", "UserTransaction", "or", "UserActivitySession", "interface", "implementations", "that", "the", "state", "of", "a", "bean", "-", "managed", "UOW", "has", "changed", ".", "As", "a", "result", "of", "this", "bean", "-", "managed"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.tx.embeddable/src/com/ibm/tx/ltc/embeddable/impl/EmbeddableLTCUOWCallback.java#L50-L102
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/linear/StochasticSTLinearL1.java
StochasticSTLinearL1.setMinScaled
public void setMinScaled(double minFeature) { """ Sets the minimum value of any feature after scaling is applied. This value can be no smaller than -1 @param minFeature the minimum feature value after scaling """ if(Double.isNaN(minFeature)) throw new ArithmeticException("NaN is not a val...
java
public void setMinScaled(double minFeature) { if(Double.isNaN(minFeature)) throw new ArithmeticException("NaN is not a valid feature value"); else if(minFeature < -1) throw new ArithmeticException("Minimum possible feature value is -1, can not use " + minFeature); els...
[ "public", "void", "setMinScaled", "(", "double", "minFeature", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "minFeature", ")", ")", "throw", "new", "ArithmeticException", "(", "\"NaN is not a valid feature value\"", ")", ";", "else", "if", "(", "minFeature"...
Sets the minimum value of any feature after scaling is applied. This value can be no smaller than -1 @param minFeature the minimum feature value after scaling
[ "Sets", "the", "minimum", "value", "of", "any", "feature", "after", "scaling", "is", "applied", ".", "This", "value", "can", "be", "no", "smaller", "than", "-", "1" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/StochasticSTLinearL1.java#L258-L267
sevensource/html-email-service
src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java
DefaultEmailModel.setReplyTo
public void setReplyTo(String address, String personal) throws AddressException { """ sets the reply to address @param address a valid email address @param personal the real world name of the sender (can be null) @throws AddressException in case of an invalid email address """ replyTo = toInternetAddres...
java
public void setReplyTo(String address, String personal) throws AddressException { replyTo = toInternetAddress(address, personal); }
[ "public", "void", "setReplyTo", "(", "String", "address", ",", "String", "personal", ")", "throws", "AddressException", "{", "replyTo", "=", "toInternetAddress", "(", "address", ",", "personal", ")", ";", "}" ]
sets the reply to address @param address a valid email address @param personal the real world name of the sender (can be null) @throws AddressException in case of an invalid email address
[ "sets", "the", "reply", "to", "address" ]
train
https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L82-L84
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java
RtmpClient.sendRpcWithEndpoint
public InvokeCallback sendRpcWithEndpoint(String endpoint, String service, String method, Object... args) { """ Send a remote procedure call. @param endpoint The endpoint of the call @param service The service handling the call @param method The method to call @param args Optional args to the call @return The...
java
public InvokeCallback sendRpcWithEndpoint(String endpoint, String service, String method, Object... args) { RemotingMessage message = createRemotingMessage(endpoint, service, method, args); Invoke invoke = createAmf3InvokeSkeleton(null, message); InvokeCallback callback = getInvokeCallback(invok...
[ "public", "InvokeCallback", "sendRpcWithEndpoint", "(", "String", "endpoint", ",", "String", "service", ",", "String", "method", ",", "Object", "...", "args", ")", "{", "RemotingMessage", "message", "=", "createRemotingMessage", "(", "endpoint", ",", "service", ",...
Send a remote procedure call. @param endpoint The endpoint of the call @param service The service handling the call @param method The method to call @param args Optional args to the call @return The callback getting called once the rpc returns a result
[ "Send", "a", "remote", "procedure", "call", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java#L629-L636
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/TagsApi.java
TagsApi.getListUserPopular
public TagsForUser getListUserPopular(String userId, Integer count) throws JinxException { """ Get the popular tags for a given user (or the currently logged in user). This method does not require authentication. @param userId NSID of the user to fetch the tag list for. If this argument is not specified, th...
java
public TagsForUser getListUserPopular(String userId, Integer count) throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getListUserPopular"); if (!JinxUtils.isNullOrEmpty(userId)) { params.put("user_id", userId); } if (count != null) { p...
[ "public", "TagsForUser", "getListUserPopular", "(", "String", "userId", ",", "Integer", "count", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(",...
Get the popular tags for a given user (or the currently logged in user). This method does not require authentication. @param userId NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed. Optional. @param count number of popular tags to return....
[ "Get", "the", "popular", "tags", "for", "a", "given", "user", "(", "or", "the", "currently", "logged", "in", "user", ")", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/TagsApi.java#L188-L198
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/net/ConnectionUtils.java
ConnectionUtils.tryLocalHostBeforeReturning
private static InetAddress tryLocalHostBeforeReturning( InetAddress preliminaryResult, SocketAddress targetAddress, boolean logging) throws IOException { """ This utility method tries to connect to the JobManager using the InetAddress returned by InetAddress.getLocalHost(). The purpose of the utility is to ha...
java
private static InetAddress tryLocalHostBeforeReturning( InetAddress preliminaryResult, SocketAddress targetAddress, boolean logging) throws IOException { InetAddress localhostName = InetAddress.getLocalHost(); if (preliminaryResult.equals(localhostName)) { // preliminary result is equal to the local host n...
[ "private", "static", "InetAddress", "tryLocalHostBeforeReturning", "(", "InetAddress", "preliminaryResult", ",", "SocketAddress", "targetAddress", ",", "boolean", "logging", ")", "throws", "IOException", "{", "InetAddress", "localhostName", "=", "InetAddress", ".", "getLo...
This utility method tries to connect to the JobManager using the InetAddress returned by InetAddress.getLocalHost(). The purpose of the utility is to have a final try connecting to the target address using the LocalHost before using the address returned. We do a second try because the JM might have been unavailable dur...
[ "This", "utility", "method", "tries", "to", "connect", "to", "the", "JobManager", "using", "the", "InetAddress", "returned", "by", "InetAddress", ".", "getLocalHost", "()", ".", "The", "purpose", "of", "the", "utility", "is", "to", "have", "a", "final", "try...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/ConnectionUtils.java#L187-L206
mbenson/therian
core/src/main/java/therian/util/Positions.java
Positions.readOnly
public static <T> Position.Readable<T> readOnly(final Type type, final T value) { """ Get a read-only position of type {@code type} and value {@code value}. @param type not {@code null} @param value @return Position.Readable """ Validate.isTrue(TypeUtils.isInstance(value, type), "%s is not an inst...
java
public static <T> Position.Readable<T> readOnly(final Type type, final T value) { Validate.isTrue(TypeUtils.isInstance(value, type), "%s is not an instance of %s", value, Types.toString(type)); return readOnly(type, () -> value); }
[ "public", "static", "<", "T", ">", "Position", ".", "Readable", "<", "T", ">", "readOnly", "(", "final", "Type", "type", ",", "final", "T", "value", ")", "{", "Validate", ".", "isTrue", "(", "TypeUtils", ".", "isInstance", "(", "value", ",", "type", ...
Get a read-only position of type {@code type} and value {@code value}. @param type not {@code null} @param value @return Position.Readable
[ "Get", "a", "read", "-", "only", "position", "of", "type", "{", "@code", "type", "}", "and", "value", "{", "@code", "value", "}", "." ]
train
https://github.com/mbenson/therian/blob/0653505f73e2a6f5b0abc394ea6d83af03408254/core/src/main/java/therian/util/Positions.java#L178-L181
apache/incubator-shardingsphere
sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/XADataSourceFactory.java
XADataSourceFactory.build
@SneakyThrows public static XADataSource build(final DatabaseType databaseType, final DataSource dataSource) { """ Create XA data source through general data source. @param databaseType database type @param dataSource data source @return XA data source """ XADataSource result = createXADataSou...
java
@SneakyThrows public static XADataSource build(final DatabaseType databaseType, final DataSource dataSource) { XADataSource result = createXADataSource(databaseType); Properties xaProperties = XAPropertiesFactory.createXAProperties(databaseType).build(SWAPPER.swap(dataSource)); PropertyUtils...
[ "@", "SneakyThrows", "public", "static", "XADataSource", "build", "(", "final", "DatabaseType", "databaseType", ",", "final", "DataSource", "dataSource", ")", "{", "XADataSource", "result", "=", "createXADataSource", "(", "databaseType", ")", ";", "Properties", "xaP...
Create XA data source through general data source. @param databaseType database type @param dataSource data source @return XA data source
[ "Create", "XA", "data", "source", "through", "general", "data", "source", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/XADataSourceFactory.java#L75-L81
nguillaumin/slick2d-maven
slick2d-packulike/src/main/java/org/newdawn/slick/tools/packulike/SheetPanel.java
SheetPanel.setTextureSize
public void setTextureSize(int width, int height) { """ Set the size of the sprite sheet @param width The width of the sheet @param height The height of the sheet """ setPreferredSize(new Dimension(width, height)); setSize(new Dimension(width, height)); this.width = width; this.height = height;...
java
public void setTextureSize(int width, int height) { setPreferredSize(new Dimension(width, height)); setSize(new Dimension(width, height)); this.width = width; this.height = height; }
[ "public", "void", "setTextureSize", "(", "int", "width", ",", "int", "height", ")", "{", "setPreferredSize", "(", "new", "Dimension", "(", "width", ",", "height", ")", ")", ";", "setSize", "(", "new", "Dimension", "(", "width", ",", "height", ")", ")", ...
Set the size of the sprite sheet @param width The width of the sheet @param height The height of the sheet
[ "Set", "the", "size", "of", "the", "sprite", "sheet" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-packulike/src/main/java/org/newdawn/slick/tools/packulike/SheetPanel.java#L94-L99
riversun/d6
src/main/java/org/riversun/d6/core/D6DateUtil.java
D6DateUtil.getSqlDate
public static java.sql.Date getSqlDate(int year, int month, int date) { """ Get SQL Date(java.sql.Date) from supplied parameters @param month @param date @return """ Calendar cal = Calendar.getInstance(); cal.setTime(new java.util.Date(0)); cal.set(Calendar.YEAR, year); ...
java
public static java.sql.Date getSqlDate(int year, int month, int date) { Calendar cal = Calendar.getInstance(); cal.setTime(new java.util.Date(0)); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month - 1); cal.set(Calendar.DATE, date); cal.set(Calendar.HOUR_O...
[ "public", "static", "java", ".", "sql", ".", "Date", "getSqlDate", "(", "int", "year", ",", "int", "month", ",", "int", "date", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "new", "java"...
Get SQL Date(java.sql.Date) from supplied parameters @param month @param date @return
[ "Get", "SQL", "Date", "(", "java", ".", "sql", ".", "Date", ")", "from", "supplied", "parameters" ]
train
https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/core/D6DateUtil.java#L43-L55
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateRouteRequest.java
CreateRouteRequest.withRequestParameters
public CreateRouteRequest withRequestParameters(java.util.Map<String, ParameterConstraints> requestParameters) { """ <p> The request parameters for the route. </p> @param requestParameters The request parameters for the route. @return Returns a reference to this object so that method calls can be chained to...
java
public CreateRouteRequest withRequestParameters(java.util.Map<String, ParameterConstraints> requestParameters) { setRequestParameters(requestParameters); return this; }
[ "public", "CreateRouteRequest", "withRequestParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "ParameterConstraints", ">", "requestParameters", ")", "{", "setRequestParameters", "(", "requestParameters", ")", ";", "return", "this", ";", "}" ]
<p> The request parameters for the route. </p> @param requestParameters The request parameters for the route. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "request", "parameters", "for", "the", "route", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateRouteRequest.java#L549-L552
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java
UserResource.updateMe
@POST @Path("me") @RolesAllowed( { """ Update the current user. @param request injected @param uriInfo injected @param user new user info @return http 200 The URI of the updated user will be stated in the Location header """"ROLE_ADMIN", "ROLE_USER"}) public Response updateMe(@Context HttpServlet...
java
@POST @Path("me") @RolesAllowed({"ROLE_ADMIN", "ROLE_USER"}) public Response updateMe(@Context HttpServletRequest request, @Context UriInfo uriInfo, @Context SecurityContext securityContext, DUser user) { Long userId = (Long) re...
[ "@", "POST", "@", "Path", "(", "\"me\"", ")", "@", "RolesAllowed", "(", "{", "\"ROLE_ADMIN\"", ",", "\"ROLE_USER\"", "}", ")", "public", "Response", "updateMe", "(", "@", "Context", "HttpServletRequest", "request", ",", "@", "Context", "UriInfo", "uriInfo", ...
Update the current user. @param request injected @param uriInfo injected @param user new user info @return http 200 The URI of the updated user will be stated in the Location header
[ "Update", "the", "current", "user", "." ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L269-L285
jmrozanec/cron-utils
src/main/java/com/cronutils/mapper/CronMapper.java
CronMapper.returnOnZeroExpression
@VisibleForTesting static Function<CronField, CronField> returnOnZeroExpression(final CronFieldName name) { """ Creates a Function that returns a On instance with zero value. @param name - Cron field name @return new CronField -> CronField instance, never null """ return field -> { ...
java
@VisibleForTesting static Function<CronField, CronField> returnOnZeroExpression(final CronFieldName name) { return field -> { final FieldConstraints constraints = FieldConstraintsBuilder.instance().forField(name).createConstraintsInstance(); return new CronField(name, new On(new Inte...
[ "@", "VisibleForTesting", "static", "Function", "<", "CronField", ",", "CronField", ">", "returnOnZeroExpression", "(", "final", "CronFieldName", "name", ")", "{", "return", "field", "->", "{", "final", "FieldConstraints", "constraints", "=", "FieldConstraintsBuilder"...
Creates a Function that returns a On instance with zero value. @param name - Cron field name @return new CronField -> CronField instance, never null
[ "Creates", "a", "Function", "that", "returns", "a", "On", "instance", "with", "zero", "value", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/mapper/CronMapper.java#L226-L232
nguillaumin/slick2d-maven
slick2d-scalar/src/main/java/org/newdawn/slick/tools/scalar/RawScale2x.java
RawScale2x.getSourcePixel
private int getSourcePixel(int x,int y) { """ Get a pixel from the source image. This handles bonds checks and resolves to edge pixels @param x The x location of the pixel to retrieve @param y The y location of the pixel to retrieve @return The pixel value at the specified location """ x = Math....
java
private int getSourcePixel(int x,int y) { x = Math.max(0,x); x = Math.min(width-1,x); y = Math.max(0,y); y = Math.min(height-1,y); return srcImage[x+(y*width)]; }
[ "private", "int", "getSourcePixel", "(", "int", "x", ",", "int", "y", ")", "{", "x", "=", "Math", ".", "max", "(", "0", ",", "x", ")", ";", "x", "=", "Math", ".", "min", "(", "width", "-", "1", ",", "x", ")", ";", "y", "=", "Math", ".", "...
Get a pixel from the source image. This handles bonds checks and resolves to edge pixels @param x The x location of the pixel to retrieve @param y The y location of the pixel to retrieve @return The pixel value at the specified location
[ "Get", "a", "pixel", "from", "the", "source", "image", ".", "This", "handles", "bonds", "checks", "and", "resolves", "to", "edge", "pixels" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-scalar/src/main/java/org/newdawn/slick/tools/scalar/RawScale2x.java#L69-L77
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/JcCollection.java
JcCollection.head
@SuppressWarnings("unchecked") public T head() { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the first element of a collection</i></div> <br/> """ T ret; if (JcRelation.class.equals(type)) { ret =...
java
@SuppressWarnings("unchecked") public T head() { T ret; if (JcRelation.class.equals(type)) { ret = (T) new JcRelation(null, this, new FunctionInstance(FUNCTION.Collection.HEAD, 1)); } else if (JcNode.class.equals(type)) { ret = (T) new JcNode(null, this, new FunctionInstance(FUNCTION.Collection...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "head", "(", ")", "{", "T", "ret", ";", "if", "(", "JcRelation", ".", "class", ".", "equals", "(", "type", ")", ")", "{", "ret", "=", "(", "T", ")", "new", "JcRelation", "(", "null"...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the first element of a collection</i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/JcCollection.java#L152-L167
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.queryByChaincode
public Collection<ProposalResponse> queryByChaincode(QueryByChaincodeRequest queryByChaincodeRequest) throws InvalidArgumentException, ProposalException { """ Send Query proposal @param queryByChaincodeRequest @return Collection proposal responses. @throws InvalidArgumentException @throws ProposalException ...
java
public Collection<ProposalResponse> queryByChaincode(QueryByChaincodeRequest queryByChaincodeRequest) throws InvalidArgumentException, ProposalException { return queryByChaincode(queryByChaincodeRequest, getChaincodeQueryPeers()); }
[ "public", "Collection", "<", "ProposalResponse", ">", "queryByChaincode", "(", "QueryByChaincodeRequest", "queryByChaincodeRequest", ")", "throws", "InvalidArgumentException", ",", "ProposalException", "{", "return", "queryByChaincode", "(", "queryByChaincodeRequest", ",", "g...
Send Query proposal @param queryByChaincodeRequest @return Collection proposal responses. @throws InvalidArgumentException @throws ProposalException
[ "Send", "Query", "proposal" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4368-L4370
VueGWT/vue-gwt
processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java
VForDefinition.initKeyVariable
private void initKeyVariable(String name, TemplateParserContext context) { """ Init the key variable and add it to the parser context @param name Name of the variable @param context Context of the template parser """ this.keyVariableInfo = context.addLocalVariable("String", name.trim()); }
java
private void initKeyVariable(String name, TemplateParserContext context) { this.keyVariableInfo = context.addLocalVariable("String", name.trim()); }
[ "private", "void", "initKeyVariable", "(", "String", "name", ",", "TemplateParserContext", "context", ")", "{", "this", ".", "keyVariableInfo", "=", "context", ".", "addLocalVariable", "(", "\"String\"", ",", "name", ".", "trim", "(", ")", ")", ";", "}" ]
Init the key variable and add it to the parser context @param name Name of the variable @param context Context of the template parser
[ "Init", "the", "key", "variable", "and", "add", "it", "to", "the", "parser", "context" ]
train
https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java#L179-L181
oasp/oasp4j
modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java
RestServiceExceptionFacade.createResponse
protected Response createResponse(Throwable exception, ValidationErrorUserException error, Map<String, List<String>> errorsMap) { """ Creates the {@link Response} for the given validation exception. @param exception is the original validation exception. @param error is the wrapped exception or the same a...
java
protected Response createResponse(Throwable exception, ValidationErrorUserException error, Map<String, List<String>> errorsMap) { LOG.warn("Service failed due to validation failure.", error); if (exception == error) { return createResponse(Status.BAD_REQUEST, error, errorsMap); } else { r...
[ "protected", "Response", "createResponse", "(", "Throwable", "exception", ",", "ValidationErrorUserException", "error", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "errorsMap", ")", "{", "LOG", ".", "warn", "(", "\"Service failed due to valida...
Creates the {@link Response} for the given validation exception. @param exception is the original validation exception. @param error is the wrapped exception or the same as <code>exception</code>. @param errorsMap is a map with all validation errors @return the requested {@link Response}.
[ "Creates", "the", "{", "@link", "Response", "}", "for", "the", "given", "validation", "exception", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java#L251-L260
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.beginUpdateTagsAsync
public Observable<ExpressRouteCircuitInner> beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map<String, String> tags) { """ Updates an express route circuit tags. @param resourceGroupName The name of the resource group. @param circuitName The name of the circuit. @param tags Resource tags. ...
java
public Observable<ExpressRouteCircuitInner> beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1<ServiceResponse<ExpressRouteCircuitInner>, ExpressRouteCircuitInner>() { ...
[ "public", "Observable", "<", "ExpressRouteCircuitInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "circuitName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", ...
Updates an express route circuit tags. @param resourceGroupName The name of the resource group. @param circuitName The name of the circuit. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ExpressRouteCircuitInner object
[ "Updates", "an", "express", "route", "circuit", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L813-L820
vatbub/common
internet/src/main/java/com/github/vatbub/common/internet/Internet.java
Internet.sendErrorMail
public static void sendErrorMail(String phase, Throwable e, String gMailUsername, String gMailPassword) { """ Sends a error message via gMail. This method requires a gMail account to send emails from. Get a new account <a href="https://accounts.google.com/SignUp?continue=https%3A%2F%2Fwww.google.com%2F%3Fgfe_rd%3D...
java
public static void sendErrorMail(String phase, Throwable e, String gMailUsername, String gMailPassword) { sendErrorMail(phase, null, e, gMailUsername, gMailPassword); }
[ "public", "static", "void", "sendErrorMail", "(", "String", "phase", ",", "Throwable", "e", ",", "String", "gMailUsername", ",", "String", "gMailPassword", ")", "{", "sendErrorMail", "(", "phase", ",", "null", ",", "e", ",", "gMailUsername", ",", "gMailPasswor...
Sends a error message via gMail. This method requires a gMail account to send emails from. Get a new account <a href="https://accounts.google.com/SignUp?continue=https%3A%2F%2Fwww.google.com%2F%3Fgfe_rd%3Dcr%26ei%3D30aJWLDMDrP08Af3oLrwDg%26gws_rd%3Dssl&hl=en">here</a> @param phase The phase in which the error ...
[ "Sends", "a", "error", "message", "via", "gMail", ".", "This", "method", "requires", "a", "gMail", "account", "to", "send", "emails", "from", ".", "Get", "a", "new", "account", "<a", "href", "=", "https", ":", "//", "accounts", ".", "google", ".", "com...
train
https://github.com/vatbub/common/blob/8b9fd2ece0a23d520ce53b66c84cbd094e378443/internet/src/main/java/com/github/vatbub/common/internet/Internet.java#L238-L240
att/AAF
cadi/aaf/src/main/java/com/att/cadi/aaf/v2_0/AbsAAFLur.java
AbsAAFLur.fishOneOf
public<A> void fishOneOf(String bait, A obj, String type, String instance, List<Action<A>> actions) { """ This special case minimizes loops, avoids multiple Set hits, and calls all the appropriate Actions found. @param bait @param obj @param type @param instance @param actions """ User<PERM> user = ge...
java
public<A> void fishOneOf(String bait, A obj, String type, String instance, List<Action<A>> actions) { User<PERM> user = getUser(bait); if(user==null || (user.noPerms() && user.permExpired()))user = loadUser(bait); // return user==null?false:user.contains(pond); if(user!=null) { ReuseAAFPermission perm = new R...
[ "public", "<", "A", ">", "void", "fishOneOf", "(", "String", "bait", ",", "A", "obj", ",", "String", "type", ",", "String", "instance", ",", "List", "<", "Action", "<", "A", ">", ">", "actions", ")", "{", "User", "<", "PERM", ">", "user", "=", "g...
This special case minimizes loops, avoids multiple Set hits, and calls all the appropriate Actions found. @param bait @param obj @param type @param instance @param actions
[ "This", "special", "case", "minimizes", "loops", "avoids", "multiple", "Set", "hits", "and", "calls", "all", "the", "appropriate", "Actions", "found", "." ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/aaf/src/main/java/com/att/cadi/aaf/v2_0/AbsAAFLur.java#L210-L223
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificateOperationAsync
public Observable<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested) { """ Updates a certificate operation. Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permissio...
java
public Observable<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested) { return updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl, certificateName, cancellationRequested).map(new Func1<ServiceResponse<CertificateOperation...
[ "public", "Observable", "<", "CertificateOperation", ">", "updateCertificateOperationAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "boolean", "cancellationRequested", ")", "{", "return", "updateCertificateOperationWithServiceResponseAsync", "(", ...
Updates a certificate operation. Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @param cancellationRequ...
[ "Updates", "a", "certificate", "operation", ".", "Updates", "a", "certificate", "creation", "operation", "that", "is", "already", "in", "progress", ".", "This", "operation", "requires", "the", "certificates", "/", "update", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7670-L7677
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java
PublicanPODocBookBuilder.checkAndAddListInjections
protected void checkAndAddListInjections(final BuildData buildData, final Document doc, final ITopicNode topicNode, final Map<String, TranslationDetails> translations) { """ Checks to see if any list injections have been used and if so adds the translation xrefs. @param buildData Information and ...
java
protected void checkAndAddListInjections(final BuildData buildData, final Document doc, final ITopicNode topicNode, final Map<String, TranslationDetails> translations) { final DocBookXMLPreProcessor preProcessor = buildData.getXMLPreProcessor(); final List<Integer> types = Ar...
[ "protected", "void", "checkAndAddListInjections", "(", "final", "BuildData", "buildData", ",", "final", "Document", "doc", ",", "final", "ITopicNode", "topicNode", ",", "final", "Map", "<", "String", ",", "TranslationDetails", ">", "translations", ")", "{", "final...
Checks to see if any list injections have been used and if so adds the translation xrefs. @param buildData Information and data structures for the build. @param doc The DOM Document to look for list injections in. @param topicNode The topic to get the injections for. @param translations The mapping of o...
[ "Checks", "to", "see", "if", "any", "list", "injections", "have", "been", "used", "and", "if", "so", "adds", "the", "translation", "xrefs", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java#L447-L477
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/StoredProcedure.java
StoredProcedure.equalsNull
private boolean equalsNull(String value1, String value2) { """ Compares two values. Treats null as equal and is case insensitive @param value1 First value to compare @param value2 Second value to compare @return true if two values equals """ return (value1 == value2 || value1 == null || (value1 !=...
java
private boolean equalsNull(String value1, String value2) { return (value1 == value2 || value1 == null || (value1 != null && value1.equalsIgnoreCase(value2))); }
[ "private", "boolean", "equalsNull", "(", "String", "value1", ",", "String", "value2", ")", "{", "return", "(", "value1", "==", "value2", "||", "value1", "==", "null", "||", "(", "value1", "!=", "null", "&&", "value1", ".", "equalsIgnoreCase", "(", "value2"...
Compares two values. Treats null as equal and is case insensitive @param value1 First value to compare @param value2 Second value to compare @return true if two values equals
[ "Compares", "two", "values", ".", "Treats", "null", "as", "equal", "and", "is", "case", "insensitive" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/StoredProcedure.java#L126-L128
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/SimonCallbacks.java
SimonCallbacks.getCallbackByType
private static <T extends Callback> T getCallbackByType(Iterable<Callback> callbacks, Class<T> callbackType) { """ Search callback by type in list of callbacks @param callbacks List of callback @param callbackType Callback type @return Callback matching type """ T foundCallback = null; Iterator<Call...
java
private static <T extends Callback> T getCallbackByType(Iterable<Callback> callbacks, Class<T> callbackType) { T foundCallback = null; Iterator<Callback> callbackIterator = callbacks.iterator(); while (foundCallback == null && callbackIterator.hasNext()) { Callback callback = callbackIterator.next(); /...
[ "private", "static", "<", "T", "extends", "Callback", ">", "T", "getCallbackByType", "(", "Iterable", "<", "Callback", ">", "callbacks", ",", "Class", "<", "T", ">", "callbackType", ")", "{", "T", "foundCallback", "=", "null", ";", "Iterator", "<", "Callba...
Search callback by type in list of callbacks @param callbacks List of callback @param callbackType Callback type @return Callback matching type
[ "Search", "callback", "by", "type", "in", "list", "of", "callbacks" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/SimonCallbacks.java#L35-L53
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsConnectionImpl.java
JmsConnectionImpl.initExceptionThreadPool
private static void initExceptionThreadPool() { """ PK59962 Ensure the existence of a single thread pool within the process """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initExceptionThreadPool"); // Do a synchronous check to ensure once-only...
java
private static void initExceptionThreadPool() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initExceptionThreadPool"); // Do a synchronous check to ensure once-only creation synchronized (exceptionTPCreateSync) { if (exceptionThreadP...
[ "private", "static", "void", "initExceptionThreadPool", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"initExceptionThreadPool\"", ")...
PK59962 Ensure the existence of a single thread pool within the process
[ "PK59962", "Ensure", "the", "existence", "of", "a", "single", "thread", "pool", "within", "the", "process" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsConnectionImpl.java#L1167-L1197
wmdietl/jsr308-langtools
src/share/classes/javax/tools/ToolProvider.java
ToolProvider.getSystemToolClassLoader
public static ClassLoader getSystemToolClassLoader() { """ Returns the class loader for tools provided with this platform. This does not include user-installed tools. Use the {@linkplain java.util.ServiceLoader service provider mechanism} for locating user installed tools. @return the class loader for tools...
java
public static ClassLoader getSystemToolClassLoader() { try { Class<? extends JavaCompiler> c = instance().getSystemToolClass(JavaCompiler.class, defaultJavaCompilerName); return c.getClassLoader(); } catch (Throwable e) { return trace(WARNING, e); ...
[ "public", "static", "ClassLoader", "getSystemToolClassLoader", "(", ")", "{", "try", "{", "Class", "<", "?", "extends", "JavaCompiler", ">", "c", "=", "instance", "(", ")", ".", "getSystemToolClass", "(", "JavaCompiler", ".", "class", ",", "defaultJavaCompilerNa...
Returns the class loader for tools provided with this platform. This does not include user-installed tools. Use the {@linkplain java.util.ServiceLoader service provider mechanism} for locating user installed tools. @return the class loader for tools provided with this platform or {@code null} if no tools are provided
[ "Returns", "the", "class", "loader", "for", "tools", "provided", "with", "this", "platform", ".", "This", "does", "not", "include", "user", "-", "installed", "tools", ".", "Use", "the", "{", "@linkplain", "java", ".", "util", ".", "ServiceLoader", "service",...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/javax/tools/ToolProvider.java#L127-L135
windup/windup
config/impl/src/main/java/org/jboss/windup/config/metadata/TechnologyMetadataProviderImpl.java
TechnologyMetadataProviderImpl.getMetadata
public TechnologyMetadata getMetadata(GraphContext context, TechnologyReference reference) { """ Loads the {@link TechnologyMetadata} that is associated with the given {@link TechnologyReference}. """ for (TechnologyMetadataLoader loader : loaders) { TechnologyMetadata metadata = lo...
java
public TechnologyMetadata getMetadata(GraphContext context, TechnologyReference reference) { for (TechnologyMetadataLoader loader : loaders) { TechnologyMetadata metadata = loader.getMetadata(context, reference); if (metadata != null) return metadata; ...
[ "public", "TechnologyMetadata", "getMetadata", "(", "GraphContext", "context", ",", "TechnologyReference", "reference", ")", "{", "for", "(", "TechnologyMetadataLoader", "loader", ":", "loaders", ")", "{", "TechnologyMetadata", "metadata", "=", "loader", ".", "getMeta...
Loads the {@link TechnologyMetadata} that is associated with the given {@link TechnologyReference}.
[ "Loads", "the", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/impl/src/main/java/org/jboss/windup/config/metadata/TechnologyMetadataProviderImpl.java#L21-L30
jenetics/jpx
jpx/src/main/java/io/jenetics/jpx/IO.java
IO.writeString
static void writeString(final String value, final DataOutput out) throws IOException { """ Write the given string {@code value} to the given data output. @param value the string value to write @param out the data output @throws NullPointerException if one of the given arguments is {@code null} @throws IOEx...
java
static void writeString(final String value, final DataOutput out) throws IOException { final byte[] bytes = value.getBytes("UTF-8"); writeInt(bytes.length, out); out.write(bytes); }
[ "static", "void", "writeString", "(", "final", "String", "value", ",", "final", "DataOutput", "out", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "bytes", "=", "value", ".", "getBytes", "(", "\"UTF-8\"", ")", ";", "writeInt", "(", "bytes",...
Write the given string {@code value} to the given data output. @param value the string value to write @param out the data output @throws NullPointerException if one of the given arguments is {@code null} @throws IOException if an I/O error occurs
[ "Write", "the", "given", "string", "{", "@code", "value", "}", "to", "the", "given", "data", "output", "." ]
train
https://github.com/jenetics/jpx/blob/58fefc10580602d07f1480d6a5886d13a553ff8f/jpx/src/main/java/io/jenetics/jpx/IO.java#L113-L119
actorapp/droidkit-actors
actors/src/main/java/com/droidkit/actors/mailbox/AbsActorDispatcher.java
AbsActorDispatcher.initDispatcher
protected void initDispatcher(AbstractDispatcher<Envelope, MailboxesQueue> dispatcher) { """ Must be called in super constructor @param dispatcher thread dispatcher """ if (this.dispatcher != null) { throw new RuntimeException("Double dispatcher init"); } this.dispatcher ...
java
protected void initDispatcher(AbstractDispatcher<Envelope, MailboxesQueue> dispatcher) { if (this.dispatcher != null) { throw new RuntimeException("Double dispatcher init"); } this.dispatcher = dispatcher; }
[ "protected", "void", "initDispatcher", "(", "AbstractDispatcher", "<", "Envelope", ",", "MailboxesQueue", ">", "dispatcher", ")", "{", "if", "(", "this", ".", "dispatcher", "!=", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"Double dispatcher init\...
Must be called in super constructor @param dispatcher thread dispatcher
[ "Must", "be", "called", "in", "super", "constructor" ]
train
https://github.com/actorapp/droidkit-actors/blob/fdb72fcfdd1c5e54a970f203a33a71fa54344217/actors/src/main/java/com/droidkit/actors/mailbox/AbsActorDispatcher.java#L39-L44
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java
HasPositionalPredChecker.visitFunction
public boolean visitFunction(ExpressionOwner owner, Function func) { """ Visit a function. @param owner The owner of the expression, to which the expression can be reset if rewriting takes place. @param func The function reference object. @return true if the sub expressions should be traversed. """ if((f...
java
public boolean visitFunction(ExpressionOwner owner, Function func) { if((func instanceof FuncPosition) || (func instanceof FuncLast)) m_hasPositionalPred = true; return true; }
[ "public", "boolean", "visitFunction", "(", "ExpressionOwner", "owner", ",", "Function", "func", ")", "{", "if", "(", "(", "func", "instanceof", "FuncPosition", ")", "||", "(", "func", "instanceof", "FuncLast", ")", ")", "m_hasPositionalPred", "=", "true", ";",...
Visit a function. @param owner The owner of the expression, to which the expression can be reset if rewriting takes place. @param func The function reference object. @return true if the sub expressions should be traversed.
[ "Visit", "a", "function", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java#L64-L70
mailin-api/sendinblue-java-mvn
src/main/java/com/sendinblue/Sendinblue.java
Sendinblue.delete_child_account
public String delete_child_account(Map<String, String> data) { """ /* Delete Child Account. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory] """ String child_authke...
java
public String delete_child_account(Map<String, String> data) { String child_authkey = data.get("auth_key"); return delete("account/" + child_authkey, EMPTY_STRING); }
[ "public", "String", "delete_child_account", "(", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "String", "child_authkey", "=", "data", ".", "get", "(", "\"auth_key\"", ")", ";", "return", "delete", "(", "\"account/\"", "+", "child_authkey", ","...
/* Delete Child Account. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
[ "/", "*", "Delete", "Child", "Account", "." ]
train
https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L223-L226
OpenLiberty/open-liberty
dev/com.ibm.json4j/src/com/ibm/json/xml/internal/JSONObject.java
JSONObject.writeIndention
private void writeIndention(Writer writer, int indentDepth) throws IOException { """ Internal method for doing a simple indention write. @param writer The writer to use while writing the JSON text. @param indentDepth How deep to indent the text. @throws IOException Trhown if an error occurs on write. ""...
java
private void writeIndention(Writer writer, int indentDepth) throws IOException { if (logger.isLoggable(Level.FINER)) logger.entering(className, "writeIndention(Writer, int)"); try { for (int i = 0; i < indentDepth; i++) { writer.write(indent); ...
[ "private", "void", "writeIndention", "(", "Writer", "writer", ",", "int", "indentDepth", ")", "throws", "IOException", "{", "if", "(", "logger", ".", "isLoggable", "(", "Level", ".", "FINER", ")", ")", "logger", ".", "entering", "(", "className", ",", "\"w...
Internal method for doing a simple indention write. @param writer The writer to use while writing the JSON text. @param indentDepth How deep to indent the text. @throws IOException Trhown if an error occurs on write.
[ "Internal", "method", "for", "doing", "a", "simple", "indention", "write", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.json4j/src/com/ibm/json/xml/internal/JSONObject.java#L242-L262
dbracewell/mango
src/main/java/com/davidbracewell/conversion/Val.java
Val.asCollection
public <E, T extends Collection<E>> T asCollection(@NonNull Class<?> collectionClass, @NonNull Class<E> genericClass) { """ Converts the object to a collection @param <E> the type parameter @param <T> the type parameter @param collectionClass The collection to convert to @param generi...
java
public <E, T extends Collection<E>> T asCollection(@NonNull Class<?> collectionClass, @NonNull Class<E> genericClass) { T rval = Convert.convert(toConvert, collectionClass, genericClass); if (rval == null) { return Collect.create(Cast.as(collectionClass)); } return rval; }
[ "public", "<", "E", ",", "T", "extends", "Collection", "<", "E", ">", ">", "T", "asCollection", "(", "@", "NonNull", "Class", "<", "?", ">", "collectionClass", ",", "@", "NonNull", "Class", "<", "E", ">", "genericClass", ")", "{", "T", "rval", "=", ...
Converts the object to a collection @param <E> the type parameter @param <T> the type parameter @param collectionClass The collection to convert to @param genericClass The class of the item in the collection @return The object as a collection
[ "Converts", "the", "object", "to", "a", "collection" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/conversion/Val.java#L112-L118
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getAllExcept
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExcept (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE... aElementsToRemove) { """ Get an array that contains all elements, except for the...
java
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExcept (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE... aElementsToRemove) { if (isEmpty (aArray) || isEmpty (aElementsToRemove)) ...
[ "@", "Nullable", "@", "ReturnsMutableCopy", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "getAllExcept", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aArray", ",", "@", "Nullable", "final", "ELEMENTTYPE", ...
Get an array that contains all elements, except for the passed elements. @param <ELEMENTTYPE> Array element type @param aArray The source array. May be <code>null</code>. @param aElementsToRemove The elements to skip. @return <code>null</code> if the passed array is <code>null</code>. The original array, if no element...
[ "Get", "an", "array", "that", "contains", "all", "elements", "except", "for", "the", "passed", "elements", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L2787-L2802
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.openSiteMap
public void openSiteMap(String sitePath, boolean siteChange) { """ Opens the site-map specified.<p> @param sitePath the site path to the site-map folder @param siteChange in case the site was changed """ String uri = CmsCoreProvider.get().link( CmsCoreProvider.get().getUri()) + "?" + C...
java
public void openSiteMap(String sitePath, boolean siteChange) { String uri = CmsCoreProvider.get().link( CmsCoreProvider.get().getUri()) + "?" + CmsCoreData.PARAM_PATH + "=" + sitePath; if (!siteChange) { uri += "&" + CmsCoreData.PARAM_RETURNCODE + "=" + getData().getReturnCode()...
[ "public", "void", "openSiteMap", "(", "String", "sitePath", ",", "boolean", "siteChange", ")", "{", "String", "uri", "=", "CmsCoreProvider", ".", "get", "(", ")", ".", "link", "(", "CmsCoreProvider", ".", "get", "(", ")", ".", "getUri", "(", ")", ")", ...
Opens the site-map specified.<p> @param sitePath the site path to the site-map folder @param siteChange in case the site was changed
[ "Opens", "the", "site", "-", "map", "specified", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L1754-L1762
kite-sdk/kite
kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/AbstractParser.java
AbstractParser.isMimeTypeMatch
private boolean isMimeTypeMatch(MediaType mediaType, MediaType rangePattern) { """ Returns true if mediaType falls withing the given range (pattern), false otherwise """ String WILDCARD = "*"; String rangePatternType = rangePattern.getType(); String rangePatternSubtype = rangePattern.getSubtype(); ...
java
private boolean isMimeTypeMatch(MediaType mediaType, MediaType rangePattern) { String WILDCARD = "*"; String rangePatternType = rangePattern.getType(); String rangePatternSubtype = rangePattern.getSubtype(); return (rangePatternType.equals(WILDCARD) || rangePatternType.equals(mediaType.getType())) ...
[ "private", "boolean", "isMimeTypeMatch", "(", "MediaType", "mediaType", ",", "MediaType", "rangePattern", ")", "{", "String", "WILDCARD", "=", "\"*\"", ";", "String", "rangePatternType", "=", "rangePattern", ".", "getType", "(", ")", ";", "String", "rangePatternSu...
Returns true if mediaType falls withing the given range (pattern), false otherwise
[ "Returns", "true", "if", "mediaType", "falls", "withing", "the", "given", "range", "(", "pattern", ")", "false", "otherwise" ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/AbstractParser.java#L141-L147
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.renameFiles
public static void renameFiles(String[] filePath, String prefix, String suffix, int start) { """ 批量重命名文件 @param filePath 文件路径数组 @param prefix 文件前缀 @param suffix 文件后缀 @param start 开始位置 """ renameFiles(getFiles(filePath), prefix, suffix, start); }
java
public static void renameFiles(String[] filePath, String prefix, String suffix, int start) { renameFiles(getFiles(filePath), prefix, suffix, start); }
[ "public", "static", "void", "renameFiles", "(", "String", "[", "]", "filePath", ",", "String", "prefix", ",", "String", "suffix", ",", "int", "start", ")", "{", "renameFiles", "(", "getFiles", "(", "filePath", ")", ",", "prefix", ",", "suffix", ",", "sta...
批量重命名文件 @param filePath 文件路径数组 @param prefix 文件前缀 @param suffix 文件后缀 @param start 开始位置
[ "批量重命名文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L607-L609
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/ServerEnvironmentService.java
ServerEnvironmentService.addService
public static void addService(ServerEnvironment serverEnvironment, ServiceTarget target) { """ Adds a ServerEnvironmentService based on the given {@code serverEnvironment} to the given batch under name {@link #SERVICE_NAME}. @param serverEnvironment the {@code ServerEnvironment}. Cannot be {@code null} @param...
java
public static void addService(ServerEnvironment serverEnvironment, ServiceTarget target) { target.addService(SERVICE_NAME, new ServerEnvironmentService(serverEnvironment)) .install(); }
[ "public", "static", "void", "addService", "(", "ServerEnvironment", "serverEnvironment", ",", "ServiceTarget", "target", ")", "{", "target", ".", "addService", "(", "SERVICE_NAME", ",", "new", "ServerEnvironmentService", "(", "serverEnvironment", ")", ")", ".", "ins...
Adds a ServerEnvironmentService based on the given {@code serverEnvironment} to the given batch under name {@link #SERVICE_NAME}. @param serverEnvironment the {@code ServerEnvironment}. Cannot be {@code null} @param target the batch builder. Cannot be {@code null}
[ "Adds", "a", "ServerEnvironmentService", "based", "on", "the", "given", "{", "@code", "serverEnvironment", "}", "to", "the", "given", "batch", "under", "name", "{", "@link", "#SERVICE_NAME", "}", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/ServerEnvironmentService.java#L67-L70
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/NamespaceGatherer.java
NamespaceGatherer.doAction
@Override public void doAction(Bundle bu, ProvUtilities u) { """ /* Note how the same NamespaceGatherer is kept, and namespaces are not registered at their local bundle. (non-Javadoc) @see org.openprovenance.prov.model.StatementAction#doAction(org.openprovenance.prov.model.NamedBundle, org.openprovenance.pro...
java
@Override public void doAction(Bundle bu, ProvUtilities u) { register(bu.getId()); for (Statement s2: bu.getStatement()) { u.doAction(s2, this); } }
[ "@", "Override", "public", "void", "doAction", "(", "Bundle", "bu", ",", "ProvUtilities", "u", ")", "{", "register", "(", "bu", ".", "getId", "(", ")", ")", ";", "for", "(", "Statement", "s2", ":", "bu", ".", "getStatement", "(", ")", ")", "{", "u"...
/* Note how the same NamespaceGatherer is kept, and namespaces are not registered at their local bundle. (non-Javadoc) @see org.openprovenance.prov.model.StatementAction#doAction(org.openprovenance.prov.model.NamedBundle, org.openprovenance.prov.model.ProvUtilities)
[ "/", "*", "Note", "how", "the", "same", "NamespaceGatherer", "is", "kept", "and", "namespaces", "are", "not", "registered", "at", "their", "local", "bundle", ".", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/NamespaceGatherer.java#L388-L394
firebase/geofire-java
common/src/main/java/com/firebase/geofire/GeoFire.java
GeoFire.getLocation
public void getLocation(String key, LocationCallback callback) { """ Gets the current location for a key and calls the callback with the current value. @param key The key whose location to get @param callback The callback that is called once the location is retrieved """ DatabaseReference keyR...
java
public void getLocation(String key, LocationCallback callback) { DatabaseReference keyRef = this.getDatabaseRefForKey(key); LocationValueEventListener valueListener = new LocationValueEventListener(callback); keyRef.addListenerForSingleValueEvent(valueListener); }
[ "public", "void", "getLocation", "(", "String", "key", ",", "LocationCallback", "callback", ")", "{", "DatabaseReference", "keyRef", "=", "this", ".", "getDatabaseRefForKey", "(", "key", ")", ";", "LocationValueEventListener", "valueListener", "=", "new", "LocationV...
Gets the current location for a key and calls the callback with the current value. @param key The key whose location to get @param callback The callback that is called once the location is retrieved
[ "Gets", "the", "current", "location", "for", "a", "key", "and", "calls", "the", "callback", "with", "the", "current", "value", "." ]
train
https://github.com/firebase/geofire-java/blob/c46ff339060d150741a8d0d40c8e73b78edca6c3/common/src/main/java/com/firebase/geofire/GeoFire.java#L225-L229
logic-ng/LogicNG
src/main/java/org/logicng/solvers/sat/CleaneLingSolver.java
CleaneLingSolver.blockClause
private boolean blockClause(final CLClause c, final int blit) { """ Returns {@code true} if all resolvents of a given clause and a blocking literal are tautological, {@code false} otherwise. @param c the clause @param blit the blocking literal @return {@code true} if all resolvents with 'c' on 'blit' are tau...
java
private boolean blockClause(final CLClause c, final int blit) { if (c.dumped() || satisfied(c)) { return false; } final CLOccs os = occs(-blit); for (final CLClause d : os) { assert !d.redundant(); this.stats.steps++; if (d.dumped() || satisfied(d)) { continue...
[ "private", "boolean", "blockClause", "(", "final", "CLClause", "c", ",", "final", "int", "blit", ")", "{", "if", "(", "c", ".", "dumped", "(", ")", "||", "satisfied", "(", "c", ")", ")", "{", "return", "false", ";", "}", "final", "CLOccs", "os", "=...
Returns {@code true} if all resolvents of a given clause and a blocking literal are tautological, {@code false} otherwise. @param c the clause @param blit the blocking literal @return {@code true} if all resolvents with 'c' on 'blit' are tautological
[ "Returns", "{" ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingSolver.java#L1209-L1219
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java
DummyInvocationUtils.methodOn
public static <T> T methodOn(Class<T> type, Object... parameters) { """ Returns a proxy of the given type, backed by an {@link EmptyTargetSource} to simply drop method invocations but equips it with an {@link InvocationRecordingMethodInterceptor}. The interceptor records the last invocation and returns a proxy o...
java
public static <T> T methodOn(Class<T> type, Object... parameters) { Assert.notNull(type, "Given type must not be null!"); InvocationRecordingMethodInterceptor interceptor = new InvocationRecordingMethodInterceptor(type, parameters); return getProxyWithInterceptor(type, interceptor, type.getClassLoader()); }
[ "public", "static", "<", "T", ">", "T", "methodOn", "(", "Class", "<", "T", ">", "type", ",", "Object", "...", "parameters", ")", "{", "Assert", ".", "notNull", "(", "type", ",", "\"Given type must not be null!\"", ")", ";", "InvocationRecordingMethodIntercept...
Returns a proxy of the given type, backed by an {@link EmptyTargetSource} to simply drop method invocations but equips it with an {@link InvocationRecordingMethodInterceptor}. The interceptor records the last invocation and returns a proxy of the return type that also implements {@link LastInvocationAware} so that the ...
[ "Returns", "a", "proxy", "of", "the", "given", "type", "backed", "by", "an", "{", "@link", "EmptyTargetSource", "}", "to", "simply", "drop", "method", "invocations", "but", "equips", "it", "with", "an", "{", "@link", "InvocationRecordingMethodInterceptor", "}", ...
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java#L134-L140
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/SerializationHandleMap.java
SerializationHandleMap.findIndex
private int findIndex(Object key, Object[] array) { """ Returns the index where the key is found at, or the index of the next empty spot if the key is not found in this table. """ int length = array.length; int index = getModuloHash(key, length); int last = (index + length - 1) % lengt...
java
private int findIndex(Object key, Object[] array) { int length = array.length; int index = getModuloHash(key, length); int last = (index + length - 1) % length; while (index != last) { if (array[index] == key || array[index] == null) { /* * Fo...
[ "private", "int", "findIndex", "(", "Object", "key", ",", "Object", "[", "]", "array", ")", "{", "int", "length", "=", "array", ".", "length", ";", "int", "index", "=", "getModuloHash", "(", "key", ",", "length", ")", ";", "int", "last", "=", "(", ...
Returns the index where the key is found at, or the index of the next empty spot if the key is not found in this table.
[ "Returns", "the", "index", "where", "the", "key", "is", "found", "at", "or", "the", "index", "of", "the", "next", "empty", "spot", "if", "the", "key", "is", "not", "found", "in", "this", "table", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/SerializationHandleMap.java#L74-L89
icode/ameba-utils
src/main/java/ameba/util/FileUtils.java
FileUtils.byteCountToDisplaySize
public static String byteCountToDisplaySize(BigInteger size, int maxChars) { """ Adopted and improved version of {@link org.apache.commons.io.FileUtils#byteCountToDisplaySize(BigInteger)}. <p> Warning! it is not advised to use <code>maxChars &lt; 3</code> because it produces correctly rounded, but non-intuitiv...
java
public static String byteCountToDisplaySize(BigInteger size, int maxChars) { String displaySize; BigDecimal bdSize = new BigDecimal(size); SizeSuffix selectedSuffix = SizeSuffix.B; for (SizeSuffix sizeSuffix : SizeSuffix.values()) { if (sizeSuffix.equals(SizeSuffix.B)) { ...
[ "public", "static", "String", "byteCountToDisplaySize", "(", "BigInteger", "size", ",", "int", "maxChars", ")", "{", "String", "displaySize", ";", "BigDecimal", "bdSize", "=", "new", "BigDecimal", "(", "size", ")", ";", "SizeSuffix", "selectedSuffix", "=", "Size...
Adopted and improved version of {@link org.apache.commons.io.FileUtils#byteCountToDisplaySize(BigInteger)}. <p> Warning! it is not advised to use <code>maxChars &lt; 3</code> because it produces correctly rounded, but non-intuitive results like "0 KB" for 100 bytes. @param size a {@link java.math.BigInteger} object. @...
[ "Adopted", "and", "improved", "version", "of", "{", "@link", "org", ".", "apache", ".", "commons", ".", "io", ".", "FileUtils#byteCountToDisplaySize", "(", "BigInteger", ")", "}", ".", "<p", ">", "Warning!", "it", "is", "not", "advised", "to", "use", "<cod...
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/FileUtils.java#L35-L55
TakahikoKawasaki/nv-websocket-client
src/main/java/com/neovisionaries/ws/client/ProxySettings.java
ProxySettings.setServer
public ProxySettings setServer(URI uri) { """ Set the proxy server by a URI. The parameters are updated as described below. <blockquote> <dl> <dt>Secure</dt> <dd><p> If the URI contains the scheme part and its value is either {@code "http"} or {@code "https"} (case-insensitive), the {@code secure} parame...
java
public ProxySettings setServer(URI uri) { if (uri == null) { return this; } String scheme = uri.getScheme(); String userInfo = uri.getUserInfo(); String host = uri.getHost(); int port = uri.getPort(); return setServer(scheme,...
[ "public", "ProxySettings", "setServer", "(", "URI", "uri", ")", "{", "if", "(", "uri", "==", "null", ")", "{", "return", "this", ";", "}", "String", "scheme", "=", "uri", ".", "getScheme", "(", ")", ";", "String", "userInfo", "=", "uri", ".", "getUse...
Set the proxy server by a URI. The parameters are updated as described below. <blockquote> <dl> <dt>Secure</dt> <dd><p> If the URI contains the scheme part and its value is either {@code "http"} or {@code "https"} (case-insensitive), the {@code secure} parameter is updated to {@code false} or to {@code true} according...
[ "Set", "the", "proxy", "server", "by", "a", "URI", ".", "The", "parameters", "are", "updated", "as", "described", "below", "." ]
train
https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/ProxySettings.java#L486-L499
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4.java
AwsSigner4.task4
String task4(AwsSigner4Request sr, AuthConfig credentials) { """ Task 4. <a href="https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html">Add the Signing Information to the Request</a> """ StringBuilder sb = new StringBuilder("AWS4-HMAC-SHA256 Credential=") ....
java
String task4(AwsSigner4Request sr, AuthConfig credentials) { StringBuilder sb = new StringBuilder("AWS4-HMAC-SHA256 Credential=") .append(credentials.getUsername() ).append( '/' ).append( sr.getScope() ) .append(", SignedHeaders=").append(sr.getSignedHeaders()) .a...
[ "String", "task4", "(", "AwsSigner4Request", "sr", ",", "AuthConfig", "credentials", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"AWS4-HMAC-SHA256 Credential=\"", ")", ".", "append", "(", "credentials", ".", "getUsername", "(", ")", ")", ...
Task 4. <a href="https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html">Add the Signing Information to the Request</a>
[ "Task", "4", ".", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "general", "/", "latest", "/", "gr", "/", "sigv4", "-", "add", "-", "signature", "-", "to", "-", "request", ".", "html", ">", "Add", "t...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4.java#L114-L121
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createCompositeScope
protected CompositeScope createCompositeScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { """ Create a composite scope that returns description from multiple other scopes without applying shadowing semantics to then. """ return new CompositeScope(parent, session, asAbstractFeatureCall...
java
protected CompositeScope createCompositeScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { return new CompositeScope(parent, session, asAbstractFeatureCall(featureCall)); }
[ "protected", "CompositeScope", "createCompositeScope", "(", "EObject", "featureCall", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ")", "{", "return", "new", "CompositeScope", "(", "parent", ",", "session", ",", "asAbstractFeatureCall", "(", "featu...
Create a composite scope that returns description from multiple other scopes without applying shadowing semantics to then.
[ "Create", "a", "composite", "scope", "that", "returns", "description", "from", "multiple", "other", "scopes", "without", "applying", "shadowing", "semantics", "to", "then", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L643-L645
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/pbx/internal/asterisk/CallerIDImpl.java
CallerIDImpl.buildFromComponents
public static CallerID buildFromComponents(final String firstname, final String lastname, final String number) { """ This is a little helper class which will buid the name component of a clid from the first and lastnames. If both firstname and lastname are null then the name component will be an empty string. ...
java
public static CallerID buildFromComponents(final String firstname, final String lastname, final String number) { String name = ""; //$NON-NLS-1$ if (firstname != null) { name += firstname.trim(); } if (lastname != null) { if (name.length() > 0...
[ "public", "static", "CallerID", "buildFromComponents", "(", "final", "String", "firstname", ",", "final", "String", "lastname", ",", "final", "String", "number", ")", "{", "String", "name", "=", "\"\"", ";", "//$NON-NLS-1$", "if", "(", "firstname", "!=", "null...
This is a little helper class which will buid the name component of a clid from the first and lastnames. If both firstname and lastname are null then the name component will be an empty string. @param firstname the person's firstname, may be null. @param lastname the person's lastname, may be null @param number the ph...
[ "This", "is", "a", "little", "helper", "class", "which", "will", "buid", "the", "name", "component", "of", "a", "clid", "from", "the", "first", "and", "lastnames", ".", "If", "both", "firstname", "and", "lastname", "are", "null", "then", "the", "name", "...
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/asterisk/CallerIDImpl.java#L46-L64
arquillian/arquillian-recorder
arquillian-recorder/arquillian-recorder-api/src/main/java/org/arquillian/extension/recorder/Configuration.java
Configuration.setProperty
public void setProperty(String name, String value) { """ Sets some property. @param name acts as a key @param value value assigned to the {@code name} key @throws IllegalArgumentException if {@code name} is null or empty or {@code value} is null """ Validate.notNullOrEmpty(name, "Name of property ...
java
public void setProperty(String name, String value) { Validate.notNullOrEmpty(name, "Name of property can not be a null object nor an empty string!"); Validate.notNull(value, "Value of property can not be a null object!"); configuration.put(name, value); }
[ "public", "void", "setProperty", "(", "String", "name", ",", "String", "value", ")", "{", "Validate", ".", "notNullOrEmpty", "(", "name", ",", "\"Name of property can not be a null object nor an empty string!\"", ")", ";", "Validate", ".", "notNull", "(", "value", "...
Sets some property. @param name acts as a key @param value value assigned to the {@code name} key @throws IllegalArgumentException if {@code name} is null or empty or {@code value} is null
[ "Sets", "some", "property", "." ]
train
https://github.com/arquillian/arquillian-recorder/blob/e3417111deb03a2e2d9b96d38b986db17e2c1d19/arquillian-recorder/arquillian-recorder-api/src/main/java/org/arquillian/extension/recorder/Configuration.java#L84-L89
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java
JobsInner.get
public JobInner get(String resourceGroupName, String automationAccountName, UUID jobId) { """ Retrieve the job identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws IllegalArgumentExcep...
java
public JobInner get(String resourceGroupName, String automationAccountName, UUID jobId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId).toBlocking().single().body(); }
[ "public", "JobInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "jobId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "jobId", ")", ".", "toBlockin...
Retrieve the job identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is re...
[ "Retrieve", "the", "job", "identified", "by", "job", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java#L481-L483
umano/AndroidSlidingUpPanel
library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java
ViewDragHelper.findTopChildUnder
public View findTopChildUnder(int x, int y) { """ Find the topmost child under the given point within the parent view's coordinate system. The child order is determined using {@link Callback#getOrderedChildIndex(int)}. @param x X position to test in the parent's coordinate system @param y Y position to test i...
java
public View findTopChildUnder(int x, int y) { final int childCount = mParentView.getChildCount(); for (int i = childCount - 1; i >= 0; i--) { final View child = mParentView.getChildAt(mCallback.getOrderedChildIndex(i)); if (x >= child.getLeft() && x < child.getRight() && ...
[ "public", "View", "findTopChildUnder", "(", "int", "x", ",", "int", "y", ")", "{", "final", "int", "childCount", "=", "mParentView", ".", "getChildCount", "(", ")", ";", "for", "(", "int", "i", "=", "childCount", "-", "1", ";", "i", ">=", "0", ";", ...
Find the topmost child under the given point within the parent view's coordinate system. The child order is determined using {@link Callback#getOrderedChildIndex(int)}. @param x X position to test in the parent's coordinate system @param y Y position to test in the parent's coordinate system @return The topmost child ...
[ "Find", "the", "topmost", "child", "under", "the", "given", "point", "within", "the", "parent", "view", "s", "coordinate", "system", ".", "The", "child", "order", "is", "determined", "using", "{", "@link", "Callback#getOrderedChildIndex", "(", "int", ")", "}",...
train
https://github.com/umano/AndroidSlidingUpPanel/blob/45a460435b07e764138a700328836cafc1ed5c42/library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java#L1480-L1490
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/GCMMessage.java
GCMMessage.withData
public GCMMessage withData(java.util.Map<String, String> data) { """ The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' obj...
java
public GCMMessage withData(java.util.Map<String, String> data) { setData(data); return this; }
[ "public", "GCMMessage", "withData", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "setData", "(", "data", ")", ";", "return", "this", ";", "}" ]
The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @return Returns a reference to this object so that method calls can be chai...
[ "The", "data", "payload", "used", "for", "a", "silent", "push", ".", "This", "payload", "is", "added", "to", "the", "notifications", "data", ".", "pinpoint", ".", "jsonBody", "object" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/GCMMessage.java#L324-L327
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AbstractAggarwalYuOutlier.java
AbstractAggarwalYuOutlier.computeSubspace
protected DBIDs computeSubspace(int[] subspace, ArrayList<ArrayList<DBIDs>> ranges) { """ Method to get the ids in the given subspace. @param subspace Subspace to process @param ranges List of DBID ranges @return ids """ HashSetModifiableDBIDs ids = DBIDUtil.newHashSet(ranges.get(subspace[0]).get(subs...
java
protected DBIDs computeSubspace(int[] subspace, ArrayList<ArrayList<DBIDs>> ranges) { HashSetModifiableDBIDs ids = DBIDUtil.newHashSet(ranges.get(subspace[0]).get(subspace[1])); // intersect all selected dimensions for(int i = 2, e = subspace.length - 1; i < e; i += 2) { DBIDs current = ranges.get(sub...
[ "protected", "DBIDs", "computeSubspace", "(", "int", "[", "]", "subspace", ",", "ArrayList", "<", "ArrayList", "<", "DBIDs", ">", ">", "ranges", ")", "{", "HashSetModifiableDBIDs", "ids", "=", "DBIDUtil", ".", "newHashSet", "(", "ranges", ".", "get", "(", ...
Method to get the ids in the given subspace. @param subspace Subspace to process @param ranges List of DBID ranges @return ids
[ "Method", "to", "get", "the", "ids", "in", "the", "given", "subspace", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AbstractAggarwalYuOutlier.java#L158-L169
OpenLiberty/open-liberty
dev/com.ibm.ws.security.mp.jwt/src/com/ibm/ws/security/mp/jwt/impl/utils/ClaimsUtils.java
ClaimsUtils.convertToList
@FFDCIgnore( { """ Converts the value for the specified claim into a String list. """ MalformedClaimException.class }) private void convertToList(String claimName, JwtClaims claimsSet) { List<String> list = null; try { list = claimsSet.getStringListClaimValue(claimName); ...
java
@FFDCIgnore({ MalformedClaimException.class }) private void convertToList(String claimName, JwtClaims claimsSet) { List<String> list = null; try { list = claimsSet.getStringListClaimValue(claimName); } catch (MalformedClaimException e) { try { String v...
[ "@", "FFDCIgnore", "(", "{", "MalformedClaimException", ".", "class", "}", ")", "private", "void", "convertToList", "(", "String", "claimName", ",", "JwtClaims", "claimsSet", ")", "{", "List", "<", "String", ">", "list", "=", "null", ";", "try", "{", "list...
Converts the value for the specified claim into a String list.
[ "Converts", "the", "value", "for", "the", "specified", "claim", "into", "a", "String", "list", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.mp.jwt/src/com/ibm/ws/security/mp/jwt/impl/utils/ClaimsUtils.java#L177-L196
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/util/converter/ConverterRegistry.java
ConverterRegistry.addConverter
@Override public void addConverter(Class<?> from, Class<?> to, Converter converter) { """ Converter calls this method to register conversion path. @param from @param to @param converter """ Map toMap = fromMap.get(from); if (toMap == null) { toMap = new HashMap<Class<?>, Ma...
java
@Override public void addConverter(Class<?> from, Class<?> to, Converter converter) { Map toMap = fromMap.get(from); if (toMap == null) { toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>(); fromMap.put(from, toMap); } toMap.put(to, converter); }
[ "@", "Override", "public", "void", "addConverter", "(", "Class", "<", "?", ">", "from", ",", "Class", "<", "?", ">", "to", ",", "Converter", "converter", ")", "{", "Map", "toMap", "=", "fromMap", ".", "get", "(", "from", ")", ";", "if", "(", "toMap...
Converter calls this method to register conversion path. @param from @param to @param converter
[ "Converter", "calls", "this", "method", "to", "register", "conversion", "path", "." ]
train
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/util/converter/ConverterRegistry.java#L52-L60
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.optDouble
public Double optDouble(String name, Double fallback) { """ Returns the value mapped by {@code name} if it exists and is a double or can be coerced to a double, or {@code fallback} otherwise. """ return optDouble(name, fallback, true); }
java
public Double optDouble(String name, Double fallback) { return optDouble(name, fallback, true); }
[ "public", "Double", "optDouble", "(", "String", "name", ",", "Double", "fallback", ")", "{", "return", "optDouble", "(", "name", ",", "fallback", ",", "true", ")", ";", "}" ]
Returns the value mapped by {@code name} if it exists and is a double or can be coerced to a double, or {@code fallback} otherwise.
[ "Returns", "the", "value", "mapped", "by", "{" ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L447-L449
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/RepositoryApi.java
RepositoryApi.createTag
public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, File releaseNotesFile) throws GitLabApiException { """ Creates a tag on a particular ref of a given project. A message and a File instance containing the release notes are optional. This method is the same as {@link #createT...
java
public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, File releaseNotesFile) throws GitLabApiException { String releaseNotes; if (releaseNotesFile != null) { try { releaseNotes = FileUtils.readFileContents(releaseNotesFile); } c...
[ "public", "Tag", "createTag", "(", "Object", "projectIdOrPath", ",", "String", "tagName", ",", "String", "ref", ",", "String", "message", ",", "File", "releaseNotesFile", ")", "throws", "GitLabApiException", "{", "String", "releaseNotes", ";", "if", "(", "releas...
Creates a tag on a particular ref of a given project. A message and a File instance containing the release notes are optional. This method is the same as {@link #createTag(Object, String, String, String, String)}, but instead allows the release notes to be supplied in a file. <pre><code>GitLab Endpoint: POST /project...
[ "Creates", "a", "tag", "on", "a", "particular", "ref", "of", "a", "given", "project", ".", "A", "message", "and", "a", "File", "instance", "containing", "the", "release", "notes", "are", "optional", ".", "This", "method", "is", "the", "same", "as", "{", ...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L293-L307
pushtorefresh/storio
storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/put/PutResult.java
PutResult.newUpdateResult
@NonNull public static PutResult newUpdateResult( int numberOfRowsUpdated, @NonNull String affectedTable, @Nullable Collection<String> affectedTags ) { """ Creates {@link PutResult} of update. @param numberOfRowsUpdated number of rows that were updated, must be {@code...
java
@NonNull public static PutResult newUpdateResult( int numberOfRowsUpdated, @NonNull String affectedTable, @Nullable Collection<String> affectedTags ) { checkNotNull(affectedTable, "Please specify affected table"); return newUpdateResult(numberOfRowsUpdated, si...
[ "@", "NonNull", "public", "static", "PutResult", "newUpdateResult", "(", "int", "numberOfRowsUpdated", ",", "@", "NonNull", "String", "affectedTable", ",", "@", "Nullable", "Collection", "<", "String", ">", "affectedTags", ")", "{", "checkNotNull", "(", "affectedT...
Creates {@link PutResult} of update. @param numberOfRowsUpdated number of rows that were updated, must be {@code >= 0}. @param affectedTable table that was affected. @param affectedTags notification tags that were affected. @return new {@link PutResult} instance.
[ "Creates", "{", "@link", "PutResult", "}", "of", "update", "." ]
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/put/PutResult.java#L176-L184
messagebird/java-rest-api
api/src/main/java/com/messagebird/MessageBirdClient.java
MessageBirdClient.sendGroupContact
public void sendGroupContact(final String groupId, final String[] contactIds) throws NotFoundException, GeneralException, UnauthorizedException { """ Adds contact to group. You need to supply the IDs of the group and contact. """ // reuestByID appends the "ID" to the base path, so this workaround ...
java
public void sendGroupContact(final String groupId, final String[] contactIds) throws NotFoundException, GeneralException, UnauthorizedException { // reuestByID appends the "ID" to the base path, so this workaround // lets us add a query string. String path = String.format("%s%s?%s", groupId, CON...
[ "public", "void", "sendGroupContact", "(", "final", "String", "groupId", ",", "final", "String", "[", "]", "contactIds", ")", "throws", "NotFoundException", ",", "GeneralException", ",", "UnauthorizedException", "{", "// reuestByID appends the \"ID\" to the base path, so th...
Adds contact to group. You need to supply the IDs of the group and contact.
[ "Adds", "contact", "to", "group", ".", "You", "need", "to", "supply", "the", "IDs", "of", "the", "group", "and", "contact", "." ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L654-L659
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/ResourceBundleELResolver.java
ResourceBundleELResolver.setValue
@Override public void setValue(ELContext context, Object base, Object property, Object value) { """ If the base object is a ResourceBundle, throw a {@link PropertyNotWritableException}. @param context The context of this evaluation. @param base The bundle to analyze. Only bases of type ResourceBundle are ha...
java
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException("context is null"); } if (isResolvable(base)) { throw new PropertyNotWritableException("resolver is read-only"); } }
[ "@", "Override", "public", "void", "setValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ",", "Object", "value", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"co...
If the base object is a ResourceBundle, throw a {@link PropertyNotWritableException}. @param context The context of this evaluation. @param base The bundle to analyze. Only bases of type ResourceBundle are handled by this resolver. @param property The name of the property to analyze. Will be coerced to a String. @para...
[ "If", "the", "base", "object", "is", "a", "ResourceBundle", "throw", "a", "{", "@link", "PropertyNotWritableException", "}", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/ResourceBundleELResolver.java#L216-L224
apache/incubator-heron
heron/schedulers/src/java/org/apache/heron/scheduler/slurm/SlurmController.java
SlurmController.killJob
public boolean killJob(String jobIdFile) { """ Cancel the Slurm job by reading the jobid from the jobIdFile. Uses scancel command to cancel the job. The file contains a single line with the job id. This file is written by the slurm job script after the job is allocated. @param jobIdFile the jobId file @return ...
java
public boolean killJob(String jobIdFile) { List<String> jobIdFileContent = readFromFile(jobIdFile); if (jobIdFileContent.size() > 0) { String[] slurmCmd = new String[]{"scancel", jobIdFileContent.get(0)}; return runProcess(null, slurmCmd, new StringBuilder()); } else { LOG.log(Level.SEVERE...
[ "public", "boolean", "killJob", "(", "String", "jobIdFile", ")", "{", "List", "<", "String", ">", "jobIdFileContent", "=", "readFromFile", "(", "jobIdFile", ")", ";", "if", "(", "jobIdFileContent", ".", "size", "(", ")", ">", "0", ")", "{", "String", "["...
Cancel the Slurm job by reading the jobid from the jobIdFile. Uses scancel command to cancel the job. The file contains a single line with the job id. This file is written by the slurm job script after the job is allocated. @param jobIdFile the jobId file @return true if the job is cancelled successfully
[ "Cancel", "the", "Slurm", "job", "by", "reading", "the", "jobid", "from", "the", "jobIdFile", ".", "Uses", "scancel", "command", "to", "cancel", "the", "job", ".", "The", "file", "contains", "a", "single", "line", "with", "the", "job", "id", ".", "This",...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/schedulers/src/java/org/apache/heron/scheduler/slurm/SlurmController.java#L141-L150
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_orderableIpCountries_GET
public ArrayList<OvhIpCountriesEnum> serviceName_orderableIpCountries_GET(String serviceName) throws IOException { """ Get the countries you can select in /order/dedicatedCloud/{serviceName}/ip REST: GET /dedicatedCloud/{serviceName}/orderableIpCountries @param serviceName [required] Domain of the service ...
java
public ArrayList<OvhIpCountriesEnum> serviceName_orderableIpCountries_GET(String serviceName) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/orderableIpCountries"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t4); ...
[ "public", "ArrayList", "<", "OvhIpCountriesEnum", ">", "serviceName_orderableIpCountries_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/orderableIpCountries\"", ";", "StringBuilder", "sb", "=", ...
Get the countries you can select in /order/dedicatedCloud/{serviceName}/ip REST: GET /dedicatedCloud/{serviceName}/orderableIpCountries @param serviceName [required] Domain of the service
[ "Get", "the", "countries", "you", "can", "select", "in", "/", "order", "/", "dedicatedCloud", "/", "{", "serviceName", "}", "/", "ip" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1467-L1472
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/MatrixIO.java
MatrixIO.convertFormat
public static File convertFormat(File matrix, Format current, Format desired) throws IOException { """ Converts the format of the input {@code matrix}, returning a temporary file containing the matrix's data in the desired format. @param matrix a file containing a matrix t...
java
public static File convertFormat(File matrix, Format current, Format desired) throws IOException { return convertFormat(matrix, current, desired, false); }
[ "public", "static", "File", "convertFormat", "(", "File", "matrix", ",", "Format", "current", ",", "Format", "desired", ")", "throws", "IOException", "{", "return", "convertFormat", "(", "matrix", ",", "current", ",", "desired", ",", "false", ")", ";", "}" ]
Converts the format of the input {@code matrix}, returning a temporary file containing the matrix's data in the desired format. @param matrix a file containing a matrix to convert @param current the format of the {@code matrix} file @param desired the format of the returned matrix file @return a matrix file with the ...
[ "Converts", "the", "format", "of", "the", "input", "{", "@code", "matrix", "}", "returning", "a", "temporary", "file", "containing", "the", "matrix", "s", "data", "in", "the", "desired", "format", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/MatrixIO.java#L219-L222
b3dgs/lionengine
lionengine-network/src/main/java/com/b3dgs/lionengine/network/ClientImpl.java
ClientImpl.readString
private String readString() throws IOException { """ Get the name value read from the stream. @return The name string. @throws IOException In case of error. """ final int size = in.readByte(); if (size > 0) { final byte[] name = new byte[size]; if (in.read(na...
java
private String readString() throws IOException { final int size = in.readByte(); if (size > 0) { final byte[] name = new byte[size]; if (in.read(name) != -1) { return new String(name, NetworkMessage.CHARSET); } } ...
[ "private", "String", "readString", "(", ")", "throws", "IOException", "{", "final", "int", "size", "=", "in", ".", "readByte", "(", ")", ";", "if", "(", "size", ">", "0", ")", "{", "final", "byte", "[", "]", "name", "=", "new", "byte", "[", "size",...
Get the name value read from the stream. @return The name string. @throws IOException In case of error.
[ "Get", "the", "name", "value", "read", "from", "the", "stream", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/ClientImpl.java#L135-L147
gsi-upm/BeastTool
beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/Reader.java
Reader.createDotStoryFile
public static void createDotStoryFile(String scenarioName, String srcTestRootFolder, String packagePath, String givenDescription, String whenDescription, String thenDescription) throws BeastException { """ Creates the .story file necessary for every Beast Test Case. @param sc...
java
public static void createDotStoryFile(String scenarioName, String srcTestRootFolder, String packagePath, String givenDescription, String whenDescription, String thenDescription) throws BeastException { String[] folders = packagePath.split("."); for (String folder : fo...
[ "public", "static", "void", "createDotStoryFile", "(", "String", "scenarioName", ",", "String", "srcTestRootFolder", ",", "String", "packagePath", ",", "String", "givenDescription", ",", "String", "whenDescription", ",", "String", "thenDescription", ")", "throws", "Be...
Creates the .story file necessary for every Beast Test Case. @param scenarioName - The name of the scenario, with spaces @param srcTestRootFolder - The test root folder @param packagePath - The package of the BeastTestCase @param scenarioDescription - the scenario name @param givenDescription - The given description @...
[ "Creates", "the", ".", "story", "file", "necessary", "for", "every", "Beast", "Test", "Case", "." ]
train
https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/Reader.java#L307-L331
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.executePatchRequest
protected void executePatchRequest(URI uri, Object obj) { """ Execute a PATCH request. @param uri The URI to call @param obj The object to use for the PATCH """ executePatchRequest(uri, obj, null, null); }
java
protected void executePatchRequest(URI uri, Object obj) { executePatchRequest(uri, obj, null, null); }
[ "protected", "void", "executePatchRequest", "(", "URI", "uri", ",", "Object", "obj", ")", "{", "executePatchRequest", "(", "uri", ",", "obj", ",", "null", ",", "null", ")", ";", "}" ]
Execute a PATCH request. @param uri The URI to call @param obj The object to use for the PATCH
[ "Execute", "a", "PATCH", "request", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L476-L479
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionUtil.java
CPOptionUtil.removeByG_K
public static CPOption removeByG_K(long groupId, String key) throws com.liferay.commerce.product.exception.NoSuchCPOptionException { """ Removes the cp option where groupId = &#63; and key = &#63; from the database. @param groupId the group ID @param key the key @return the cp option that was removed ""...
java
public static CPOption removeByG_K(long groupId, String key) throws com.liferay.commerce.product.exception.NoSuchCPOptionException { return getPersistence().removeByG_K(groupId, key); }
[ "public", "static", "CPOption", "removeByG_K", "(", "long", "groupId", ",", "String", "key", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "exception", ".", "NoSuchCPOptionException", "{", "return", "getPersistence", "(", ")", "."...
Removes the cp option where groupId = &#63; and key = &#63; from the database. @param groupId the group ID @param key the key @return the cp option that was removed
[ "Removes", "the", "cp", "option", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionUtil.java#L697-L700
FitLayout/segmentation
src/main/java/org/fit/segm/grouping/SegmentationAreaTree.java
SegmentationAreaTree.findBasicAreas
public Area findBasicAreas() { """ Creates the area tree skeleton - selects the visible boxes and converts them to areas """ AreaImpl rootarea = new AreaImpl(0, 0, 0, 0); setRoot(rootarea); rootarea.setAreaTree(this); rootarea.setPage(page); for (int i = 0; i < page.get...
java
public Area findBasicAreas() { AreaImpl rootarea = new AreaImpl(0, 0, 0, 0); setRoot(rootarea); rootarea.setAreaTree(this); rootarea.setPage(page); for (int i = 0; i < page.getRoot().getChildCount(); i++) { Box cbox = page.getRoot().getChildAt(i); ...
[ "public", "Area", "findBasicAreas", "(", ")", "{", "AreaImpl", "rootarea", "=", "new", "AreaImpl", "(", "0", ",", "0", ",", "0", ",", "0", ")", ";", "setRoot", "(", "rootarea", ")", ";", "rootarea", ".", "setAreaTree", "(", "this", ")", ";", "rootare...
Creates the area tree skeleton - selects the visible boxes and converts them to areas
[ "Creates", "the", "area", "tree", "skeleton", "-", "selects", "the", "visible", "boxes", "and", "converts", "them", "to", "areas" ]
train
https://github.com/FitLayout/segmentation/blob/12998087d576640c2f2a6360cf6088af95eea5f4/src/main/java/org/fit/segm/grouping/SegmentationAreaTree.java#L52-L70
structurizr/java
structurizr-core/src/com/structurizr/model/StaticStructureElement.java
StaticStructureElement.delivers
@Nullable public Relationship delivers(@Nonnull Person destination, String description, String technology) { """ Adds a unidirectional relationship between this element and a person. @param destination the target of the relationship @param description a description of the relationship (e.g. "sends e-mail t...
java
@Nullable public Relationship delivers(@Nonnull Person destination, String description, String technology) { return delivers(destination, description, technology, InteractionStyle.Synchronous); }
[ "@", "Nullable", "public", "Relationship", "delivers", "(", "@", "Nonnull", "Person", "destination", ",", "String", "description", ",", "String", "technology", ")", "{", "return", "delivers", "(", "destination", ",", "description", ",", "technology", ",", "Inter...
Adds a unidirectional relationship between this element and a person. @param destination the target of the relationship @param description a description of the relationship (e.g. "sends e-mail to") @param technology the technology details (e.g. JSON/HTTPS) @return the relationship that has just been created and added...
[ "Adds", "a", "unidirectional", "relationship", "between", "this", "element", "and", "a", "person", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/StaticStructureElement.java#L152-L155