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
lightblueseas/jcommons-lang
src/main/java/de/alpharogroup/lang/ScanPackageExtensions.java
ScanPackageExtensions.scanClassNames
public static Set<String> scanClassNames(final String packageName) throws IOException { """ Scan class names from the given package name. @param packageName the package name @return the list @throws IOException Signals that an I/O exception has occurred. """ return scanClassNames(packageName, false, t...
java
public static Set<String> scanClassNames(final String packageName) throws IOException { return scanClassNames(packageName, false, true); }
[ "public", "static", "Set", "<", "String", ">", "scanClassNames", "(", "final", "String", "packageName", ")", "throws", "IOException", "{", "return", "scanClassNames", "(", "packageName", ",", "false", ",", "true", ")", ";", "}" ]
Scan class names from the given package name. @param packageName the package name @return the list @throws IOException Signals that an I/O exception has occurred.
[ "Scan", "class", "names", "from", "the", "given", "package", "name", "." ]
train
https://github.com/lightblueseas/jcommons-lang/blob/000e1f198e949ec3e721fd0fc3f5946e945232a3/src/main/java/de/alpharogroup/lang/ScanPackageExtensions.java#L59-L62
scireum/server-sass
src/main/java/org/serversass/Functions.java
Functions.opacify
public static Expression opacify(Generator generator, FunctionCall input) { """ Increases the opacity of the given color by the given amount. @param generator the surrounding generator @param input the function call to evaluate @return the result of the evaluation """ Color color = input.getEx...
java
public static Expression opacify(Generator generator, FunctionCall input) { Color color = input.getExpectedColorParam(0); float amount = input.getExpectedFloatParam(1); return new Color(color.getR(), color.getG(), color.getB(), color.getA() + amount); }
[ "public", "static", "Expression", "opacify", "(", "Generator", "generator", ",", "FunctionCall", "input", ")", "{", "Color", "color", "=", "input", ".", "getExpectedColorParam", "(", "0", ")", ";", "float", "amount", "=", "input", ".", "getExpectedFloatParam", ...
Increases the opacity of the given color by the given amount. @param generator the surrounding generator @param input the function call to evaluate @return the result of the evaluation
[ "Increases", "the", "opacity", "of", "the", "given", "color", "by", "the", "given", "amount", "." ]
train
https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/Functions.java#L169-L173
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java
ExpressRouteCrossConnectionsInner.beginListArpTable
public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { """ Gets the currently advertised ARP table associated with the express route cross connection in a resource group. @param resourceGroupName The nam...
java
public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); ...
[ "public", "ExpressRouteCircuitsArpTableListResultInner", "beginListArpTable", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "String", "peeringName", ",", "String", "devicePath", ")", "{", "return", "beginListArpTableWithServiceResponseAsync", "(...
Gets the currently advertised ARP table associated with the express route cross connection in a resource group. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param peeringName The name of the peering. @param devicePath The path of the ...
[ "Gets", "the", "currently", "advertised", "ARP", "table", "associated", "with", "the", "express", "route", "cross", "connection", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java#L1007-L1009
darylteo/directory-watcher
src/main/java/com/darylteo/nio/AbstractDirectoryWatchService.java
AbstractDirectoryWatchService.newWatcher
public DirectoryWatcher newWatcher(String dir, String separator) throws IOException { """ <p> Instantiates a new DirectoryWatcher for the path given. </p> @param dir the path to watch for events. @param separator the file path separator for this watcher @return a DirectoryWatcher for this path (and al...
java
public DirectoryWatcher newWatcher(String dir, String separator) throws IOException { return newWatcher(Paths.get(dir), separator); }
[ "public", "DirectoryWatcher", "newWatcher", "(", "String", "dir", ",", "String", "separator", ")", "throws", "IOException", "{", "return", "newWatcher", "(", "Paths", ".", "get", "(", "dir", ")", ",", "separator", ")", ";", "}" ]
<p> Instantiates a new DirectoryWatcher for the path given. </p> @param dir the path to watch for events. @param separator the file path separator for this watcher @return a DirectoryWatcher for this path (and all child paths) @throws IOException
[ "<p", ">", "Instantiates", "a", "new", "DirectoryWatcher", "for", "the", "path", "given", ".", "<", "/", "p", ">" ]
train
https://github.com/darylteo/directory-watcher/blob/c1144366dcf58443073c0a67d1a5f6535ac5e8d8/src/main/java/com/darylteo/nio/AbstractDirectoryWatchService.java#L66-L68
Azure/azure-sdk-for-java
dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java
ZonesInner.createOrUpdateAsync
public Observable<ZoneInner> createOrUpdateAsync(String resourceGroupName, String zoneName, ZoneInner parameters) { """ Creates or updates a DNS zone. Does not modify DNS records within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a termin...
java
public Observable<ZoneInner> createOrUpdateAsync(String resourceGroupName, String zoneName, ZoneInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, zoneName, parameters).map(new Func1<ServiceResponse<ZoneInner>, ZoneInner>() { @Override public ZoneInner c...
[ "public", "Observable", "<", "ZoneInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "zoneName", ",", "ZoneInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "zoneName", ...
Creates or updates a DNS zone. Does not modify DNS records within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @param parameters Parameters supplied to the CreateOrUpdate operation. @throws IllegalArgumentException thrown if pa...
[ "Creates", "or", "updates", "a", "DNS", "zone", ".", "Does", "not", "modify", "DNS", "records", "within", "the", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java#L146-L153
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java
RedisJobStore.replaceTrigger
@Override public boolean replaceTrigger(final TriggerKey triggerKey, final OperableTrigger newTrigger) throws JobPersistenceException { """ Remove (delete) the <code>{@link org.quartz.Trigger}</code> with the given key, and store the new given one - which must be associated with the same job. @param trigg...
java
@Override public boolean replaceTrigger(final TriggerKey triggerKey, final OperableTrigger newTrigger) throws JobPersistenceException { return doWithLock(new LockCallback<Boolean>() { @Override public Boolean doWithLock(JedisCommands jedis) throws JobPersistenceException { ...
[ "@", "Override", "public", "boolean", "replaceTrigger", "(", "final", "TriggerKey", "triggerKey", ",", "final", "OperableTrigger", "newTrigger", ")", "throws", "JobPersistenceException", "{", "return", "doWithLock", "(", "new", "LockCallback", "<", "Boolean", ">", "...
Remove (delete) the <code>{@link org.quartz.Trigger}</code> with the given key, and store the new given one - which must be associated with the same job. @param triggerKey the key of the trigger to be replaced @param newTrigger The new <code>Trigger</code> to be stored. @return <code>true</code> if a <code>Trigger</co...
[ "Remove", "(", "delete", ")", "the", "<code", ">", "{", "@link", "org", ".", "quartz", ".", "Trigger", "}", "<", "/", "code", ">", "with", "the", "given", "key", "and", "store", "the", "new", "given", "one", "-", "which", "must", "be", "associated", ...
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java#L466-L478
jbundle/jbundle
base/message/service/src/main/java/org/jbundle/base/message/service/BaseMessageServiceActivator.java
BaseMessageServiceActivator.startupService
public Object startupService(BundleContext bundleContext) { """ Start this service. Override this to do all the startup. @return true if successful. """ Map<String,Object> props = this.getServiceProperties(); Environment env = (Environment)this.getService(Env.class); props = Utility.p...
java
public Object startupService(BundleContext bundleContext) { Map<String,Object> props = this.getServiceProperties(); Environment env = (Environment)this.getService(Env.class); props = Utility.putAllIfNew(props, env.getProperties()); // Use the same params as environment // Note the o...
[ "public", "Object", "startupService", "(", "BundleContext", "bundleContext", ")", "{", "Map", "<", "String", ",", "Object", ">", "props", "=", "this", ".", "getServiceProperties", "(", ")", ";", "Environment", "env", "=", "(", "Environment", ")", "this", "."...
Start this service. Override this to do all the startup. @return true if successful.
[ "Start", "this", "service", ".", "Override", "this", "to", "do", "all", "the", "startup", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/service/src/main/java/org/jbundle/base/message/service/BaseMessageServiceActivator.java#L84-L94
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
AllClassesFrameWriter.addAllClasses
protected void addAllClasses(Content content, boolean wantFrames) { """ Use the sorted index of all the classes and add all the classes to the content list. @param content HtmlTree content to which all classes information will be added @param wantFrames True if we want frames. """ for (int i = 0; ...
java
protected void addAllClasses(Content content, boolean wantFrames) { for (int i = 0; i < indexbuilder.elements().length; i++) { Character unicode = (Character)((indexbuilder.elements())[i]); addContents(indexbuilder.getMemberList(unicode), wantFrames, content); } }
[ "protected", "void", "addAllClasses", "(", "Content", "content", ",", "boolean", "wantFrames", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "indexbuilder", ".", "elements", "(", ")", ".", "length", ";", "i", "++", ")", "{", "Character", ...
Use the sorted index of all the classes and add all the classes to the content list. @param content HtmlTree content to which all classes information will be added @param wantFrames True if we want frames.
[ "Use", "the", "sorted", "index", "of", "all", "the", "classes", "and", "add", "all", "the", "classes", "to", "the", "content", "list", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java#L137-L142
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/MigratorController.java
MigratorController.retrieveJobs
public MigrationJob[] retrieveJobs(int batchSize, int startIndex, JobType jobType) throws IOException, LightblueException { """ Retrieves jobs that are available, and their scheduled time has passed. Returns at most batchSize jobs starting at startIndex """ LOGGER.debug("Retrieving jobs: b...
java
public MigrationJob[] retrieveJobs(int batchSize, int startIndex, JobType jobType) throws IOException, LightblueException { LOGGER.debug("Retrieving jobs: batchSize={}, startIndex={}", batchSize, startIndex); DataFindRequest findRequest = new DataFindRequest("migrationJob", null); ...
[ "public", "MigrationJob", "[", "]", "retrieveJobs", "(", "int", "batchSize", ",", "int", "startIndex", ",", "JobType", "jobType", ")", "throws", "IOException", ",", "LightblueException", "{", "LOGGER", ".", "debug", "(", "\"Retrieving jobs: batchSize={}, startIndex={}...
Retrieves jobs that are available, and their scheduled time has passed. Returns at most batchSize jobs starting at startIndex
[ "Retrieves", "jobs", "that", "are", "available", "and", "their", "scheduled", "time", "has", "passed", ".", "Returns", "at", "most", "batchSize", "jobs", "starting", "at", "startIndex" ]
train
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/MigratorController.java#L56-L88
jhunters/jprotobuf
android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/FieldUtils.java
FieldUtils.getField
public static Object getField(Object t, String name) { """ Get the field represented by the supplied {@link Field field object} on the specified {@link Object target object}. In accordance with {@link Field#get(Object)} semantics, the returned value is automatically wrapped if the underlying field has a primiti...
java
public static Object getField(Object t, String name) { Field field = findField(t.getClass(), name); return getField(t, field); }
[ "public", "static", "Object", "getField", "(", "Object", "t", ",", "String", "name", ")", "{", "Field", "field", "=", "findField", "(", "t", ".", "getClass", "(", ")", ",", "name", ")", ";", "return", "getField", "(", "t", ",", "field", ")", ";", "...
Get the field represented by the supplied {@link Field field object} on the specified {@link Object target object}. In accordance with {@link Field#get(Object)} semantics, the returned value is automatically wrapped if the underlying field has a primitive type. <p> Thrown exceptions are handled via a call to @param t ...
[ "Get", "the", "field", "represented", "by", "the", "supplied", "{", "@link", "Field", "field", "object", "}", "on", "the", "specified", "{", "@link", "Object", "target", "object", "}", ".", "In", "accordance", "with", "{", "@link", "Field#get", "(", "Objec...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/FieldUtils.java#L93-L96
haraldk/TwelveMonkeys
imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java
QuickDrawContext.eraseArc
public void eraseArc(final Rectangle2D pRectangle, int pStartAngle, int pArcAngle) { """ EraseArc(r,int,int) // fills the arc's interior with the background pattern @param pRectangle the rectangle to erase @param pStartAngle start angle in degrees (starting from 12'o clock, this differs from Java) @param pAr...
java
public void eraseArc(final Rectangle2D pRectangle, int pStartAngle, int pArcAngle) { eraseShape(toArc(pRectangle, pStartAngle, pArcAngle, true)); }
[ "public", "void", "eraseArc", "(", "final", "Rectangle2D", "pRectangle", ",", "int", "pStartAngle", ",", "int", "pArcAngle", ")", "{", "eraseShape", "(", "toArc", "(", "pRectangle", ",", "pStartAngle", ",", "pArcAngle", ",", "true", ")", ")", ";", "}" ]
EraseArc(r,int,int) // fills the arc's interior with the background pattern @param pRectangle the rectangle to erase @param pStartAngle start angle in degrees (starting from 12'o clock, this differs from Java) @param pArcAngle rotation angle in degrees (starting from {@code pStartAngle}, this differs from Java arcs...
[ "EraseArc", "(", "r", "int", "int", ")", "//", "fills", "the", "arc", "s", "interior", "with", "the", "background", "pattern" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java#L765-L767
larsga/Duke
duke-core/src/main/java/no/priv/garshol/duke/utils/Utils.java
Utils.createTempDirectory
public static File createTempDirectory(String prefix) { """ Creates a temporary folder using the given prefix to generate its name. @param prefix the prefix string to be used in generating the directory's name; may be <i>null</i> @return the <code>File</code> to the newly created folder @throws IOException ...
java
public static File createTempDirectory(String prefix) { File temp = null; try { temp = File.createTempFile(prefix != null ? prefix : "temp", Long.toString(System.nanoTime())); if (!(temp.delete())) { throw new IOException("Could not delete temp file: " + temp.getAbsolutePath()); } if (!(tem...
[ "public", "static", "File", "createTempDirectory", "(", "String", "prefix", ")", "{", "File", "temp", "=", "null", ";", "try", "{", "temp", "=", "File", ".", "createTempFile", "(", "prefix", "!=", "null", "?", "prefix", ":", "\"temp\"", ",", "Long", ".",...
Creates a temporary folder using the given prefix to generate its name. @param prefix the prefix string to be used in generating the directory's name; may be <i>null</i> @return the <code>File</code> to the newly created folder @throws IOException
[ "Creates", "a", "temporary", "folder", "using", "the", "given", "prefix", "to", "generate", "its", "name", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/Utils.java#L36-L56
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/io/ProjectJson.java
ProjectJson.asSystemInputRef
private static URI asSystemInputRef( JsonValue json) { """ Returns the system input definition URL represented by the given JSON value. """ try { URI uri = null; if( json != null && json.getValueType() == STRING) { uri = new URI( ((JsonString) json).getChars().toString());...
java
private static URI asSystemInputRef( JsonValue json) { try { URI uri = null; if( json != null && json.getValueType() == STRING) { uri = new URI( ((JsonString) json).getChars().toString()); } return uri; } catch( Exception e) { throw new Proj...
[ "private", "static", "URI", "asSystemInputRef", "(", "JsonValue", "json", ")", "{", "try", "{", "URI", "uri", "=", "null", ";", "if", "(", "json", "!=", "null", "&&", "json", ".", "getValueType", "(", ")", "==", "STRING", ")", "{", "uri", "=", "new",...
Returns the system input definition URL represented by the given JSON value.
[ "Returns", "the", "system", "input", "definition", "URL", "represented", "by", "the", "given", "JSON", "value", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/io/ProjectJson.java#L96-L112
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/AssetsInner.java
AssetsInner.createOrUpdateAsync
public Observable<AssetInner> createOrUpdateAsync(String resourceGroupName, String accountName, String assetName, AssetInner parameters) { """ Create or update an Asset. Creates or updates an Asset in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscript...
java
public Observable<AssetInner> createOrUpdateAsync(String resourceGroupName, String accountName, String assetName, AssetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, assetName, parameters).map(new Func1<ServiceResponse<AssetInner>, AssetInner>() { @...
[ "public", "Observable", "<", "AssetInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "assetName", ",", "AssetInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "reso...
Create or update an Asset. Creates or updates an Asset in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param assetName The Asset name. @param parameters The request parameters @throws IllegalArgum...
[ "Create", "or", "update", "an", "Asset", ".", "Creates", "or", "updates", "an", "Asset", "in", "the", "Media", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/AssetsInner.java#L510-L517
GerdHolz/TOVAL
src/de/invation/code/toval/misc/FormatUtils.java
FormatUtils.getTrimmedFormat
public static String getTrimmedFormat(String format, int length) { """ Extends a given format by additional constraints for trimmed (length-limited) outputs.<br> It assumes that the given String is a valid format. @param format Format to extend @param length Desired fixed output length for formatted output...
java
public static String getTrimmedFormat(String format, int length) { return String.format('%' + String.format(TRIM_BASE_FORMAT, length), format.substring(1)); }
[ "public", "static", "String", "getTrimmedFormat", "(", "String", "format", ",", "int", "length", ")", "{", "return", "String", ".", "format", "(", "'", "'", "+", "String", ".", "format", "(", "TRIM_BASE_FORMAT", ",", "length", ")", ",", "format", ".", "s...
Extends a given format by additional constraints for trimmed (length-limited) outputs.<br> It assumes that the given String is a valid format. @param format Format to extend @param length Desired fixed output length for formatted output @return Extended version of <code>format</code> by trim-constraints
[ "Extends", "a", "given", "format", "by", "additional", "constraints", "for", "trimmed", "(", "length", "-", "limited", ")", "outputs", ".", "<br", ">", "It", "assumes", "that", "the", "given", "String", "is", "a", "valid", "format", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/FormatUtils.java#L205-L207
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPolicyDefinitionsInner.java
ServiceEndpointPolicyDefinitionsInner.beginCreateOrUpdateAsync
public Observable<ServiceEndpointPolicyDefinitionInner> beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { """ Creates or updates a service endpoint policy definiti...
java
public Observable<ServiceEndpointPolicyDefinitionInner> beginCreateOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { return beginCreateOrUpdateWithServiceResponseAsync(res...
[ "public", "Observable", "<", "ServiceEndpointPolicyDefinitionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serviceEndpointPolicyName", ",", "String", "serviceEndpointPolicyDefinitionName", ",", "ServiceEndpointPolicyDefinitionInner", "...
Creates or updates a service endpoint policy definition in the specified service endpoint policy. @param resourceGroupName The name of the resource group. @param serviceEndpointPolicyName The name of the service endpoint policy. @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definit...
[ "Creates", "or", "updates", "a", "service", "endpoint", "policy", "definition", "in", "the", "specified", "service", "endpoint", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPolicyDefinitionsInner.java#L473-L480
op4j/op4j
src/main/java/org/op4j/functions/Call.java
Call.arrayOfString
public static Function<Object,String[]> arrayOfString(final String methodName, final Object... optionalParameters) { """ <p> Abbreviation for {{@link #methodForArrayOfString(String, Object...)}. </p> @since 1.1 @param methodName the name of the method @param optionalParameters the (optional) parameters of...
java
public static Function<Object,String[]> arrayOfString(final String methodName, final Object... optionalParameters) { return methodForArrayOfString(methodName, optionalParameters); }
[ "public", "static", "Function", "<", "Object", ",", "String", "[", "]", ">", "arrayOfString", "(", "final", "String", "methodName", ",", "final", "Object", "...", "optionalParameters", ")", "{", "return", "methodForArrayOfString", "(", "methodName", ",", "option...
<p> Abbreviation for {{@link #methodForArrayOfString(String, Object...)}. </p> @since 1.1 @param methodName the name of the method @param optionalParameters the (optional) parameters of the method. @return the result of the method execution
[ "<p", ">", "Abbreviation", "for", "{{", "@link", "#methodForArrayOfString", "(", "String", "Object", "...", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/Call.java#L612-L614
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/ContentMatcher.java
ContentMatcher.nextMatcher
ContentMatcher nextMatcher(Conjunction selector, ContentMatcher oldMatcher) { """ Determine the next matcher to which a put operation should be delegated. Except when cacheing is active, this method delegates to Factory.createMatcher. It is overridden in EqualityMatcher to wrap newly created Matchers in a Cache...
java
ContentMatcher nextMatcher(Conjunction selector, ContentMatcher oldMatcher) { return Factory.createMatcher(ordinalPosition, selector, oldMatcher); }
[ "ContentMatcher", "nextMatcher", "(", "Conjunction", "selector", ",", "ContentMatcher", "oldMatcher", ")", "{", "return", "Factory", ".", "createMatcher", "(", "ordinalPosition", ",", "selector", ",", "oldMatcher", ")", ";", "}" ]
Determine the next matcher to which a put operation should be delegated. Except when cacheing is active, this method delegates to Factory.createMatcher. It is overridden in EqualityMatcher to wrap newly created Matchers in a CacheingMatcher when appropriate @param selector @param oldMatcher
[ "Determine", "the", "next", "matcher", "to", "which", "a", "put", "operation", "should", "be", "delegated", ".", "Except", "when", "cacheing", "is", "active", "this", "method", "delegates", "to", "Factory", ".", "createMatcher", ".", "It", "is", "overridden", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/ContentMatcher.java#L106-L108
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/button/ButtonRenderer.java
ButtonRenderer.canOutcomeBeRendered
private boolean canOutcomeBeRendered(Button button, String fragment, String outcome) { """ Do we have to suppress the target URL? @param attrs the component's attribute list @param fragment the fragment of the URL behind the hash (outcome#fragment) @param outcome the value of the outcome attribute @return...
java
private boolean canOutcomeBeRendered(Button button, String fragment, String outcome) { boolean renderOutcome = true; if (null == outcome && button.getAttributes() != null && button.getAttributes().containsKey("ng-click")) { String ngClick = (String)button.getAttributes().get("ng-click"); if (null != ngClick &...
[ "private", "boolean", "canOutcomeBeRendered", "(", "Button", "button", ",", "String", "fragment", ",", "String", "outcome", ")", "{", "boolean", "renderOutcome", "=", "true", ";", "if", "(", "null", "==", "outcome", "&&", "button", ".", "getAttributes", "(", ...
Do we have to suppress the target URL? @param attrs the component's attribute list @param fragment the fragment of the URL behind the hash (outcome#fragment) @param outcome the value of the outcome attribute @return true if the outcome can be rendered.
[ "Do", "we", "have", "to", "suppress", "the", "target", "URL?" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/button/ButtonRenderer.java#L274-L285
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.getFirstCommonSuperclass
public ReferenceType getFirstCommonSuperclass(ReferenceType a, ReferenceType b) throws ClassNotFoundException { """ Get the first common superclass of the given reference types. Note that an interface type is never returned unless <code>a</code> and <code>b</code> are the same type. Otherwise, we try to return a...
java
public ReferenceType getFirstCommonSuperclass(ReferenceType a, ReferenceType b) throws ClassNotFoundException { // Easy case: same types if (a.equals(b)) { return a; } ReferenceType answer = checkFirstCommonSuperclassQueryCache(a, b); if (answer == null) { ...
[ "public", "ReferenceType", "getFirstCommonSuperclass", "(", "ReferenceType", "a", ",", "ReferenceType", "b", ")", "throws", "ClassNotFoundException", "{", "// Easy case: same types", "if", "(", "a", ".", "equals", "(", "b", ")", ")", "{", "return", "a", ";", "}"...
Get the first common superclass of the given reference types. Note that an interface type is never returned unless <code>a</code> and <code>b</code> are the same type. Otherwise, we try to return as accurate a type as possible. This method is used as the meet operator in TypeDataflowAnalysis, and is intended to follow ...
[ "Get", "the", "first", "common", "superclass", "of", "the", "given", "reference", "types", ".", "Note", "that", "an", "interface", "type", "is", "never", "returned", "unless", "<code", ">", "a<", "/", "code", ">", "and", "<code", ">", "b<", "/", "code", ...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L545-L557
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java
CommerceSubscriptionEntryPersistenceImpl.removeByG_U
@Override public void removeByG_U(long groupId, long userId) { """ Removes all the commerce subscription entries where groupId = &#63; and userId = &#63; from the database. @param groupId the group ID @param userId the user ID """ for (CommerceSubscriptionEntry commerceSubscriptionEntry : findByG_U( ...
java
@Override public void removeByG_U(long groupId, long userId) { for (CommerceSubscriptionEntry commerceSubscriptionEntry : findByG_U( groupId, userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceSubscriptionEntry); } }
[ "@", "Override", "public", "void", "removeByG_U", "(", "long", "groupId", ",", "long", "userId", ")", "{", "for", "(", "CommerceSubscriptionEntry", "commerceSubscriptionEntry", ":", "findByG_U", "(", "groupId", ",", "userId", ",", "QueryUtil", ".", "ALL_POS", ",...
Removes all the commerce subscription entries where groupId = &#63; and userId = &#63; from the database. @param groupId the group ID @param userId the user ID
[ "Removes", "all", "the", "commerce", "subscription", "entries", "where", "groupId", "=", "&#63", ";", "and", "userId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java#L3032-L3038
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/junit/TakeScreenshotOnFailureRule.java
TakeScreenshotOnFailureRule.filenameFor
private File filenameFor(final Description method) { """ Gets the name of the image file with the screenshot. @param method the method name @return the file that will cotain the screenshot """ String className = method.getClassName(); String methodName = method.getMethodName(); return new File(dire...
java
private File filenameFor(final Description method) { String className = method.getClassName(); String methodName = method.getMethodName(); return new File(directory, className + "_" + methodName + ".png"); }
[ "private", "File", "filenameFor", "(", "final", "Description", "method", ")", "{", "String", "className", "=", "method", ".", "getClassName", "(", ")", ";", "String", "methodName", "=", "method", ".", "getMethodName", "(", ")", ";", "return", "new", "File", ...
Gets the name of the image file with the screenshot. @param method the method name @return the file that will cotain the screenshot
[ "Gets", "the", "name", "of", "the", "image", "file", "with", "the", "screenshot", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/junit/TakeScreenshotOnFailureRule.java#L129-L134
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorePointsInner.java
RestorePointsInner.listByDatabase
public List<RestorePointInner> listByDatabase(String resourceGroupName, String serverName, String databaseName) { """ Gets a list of database restore points. @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 p...
java
public List<RestorePointInner> listByDatabase(String resourceGroupName, String serverName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
[ "public", "List", "<", "RestorePointInner", ">", "listByDatabase", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "listByDatabaseWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ...
Gets a list of database restore points. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database to get available restore points...
[ "Gets", "a", "list", "of", "database", "restore", "points", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorePointsInner.java#L72-L74
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_output_elasticsearch_alias_aliasId_GET
public OvhAlias serviceName_output_elasticsearch_alias_aliasId_GET(String serviceName, String aliasId) throws IOException { """ Returns specified elasticsearch alias REST: GET /dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId} @param serviceName [required] Service name @param aliasId [required] Al...
java
public OvhAlias serviceName_output_elasticsearch_alias_aliasId_GET(String serviceName, String aliasId) throws IOException { String qPath = "/dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId}"; StringBuilder sb = path(qPath, serviceName, aliasId); String resp = exec(qPath, "GET", sb.toString(), null); ...
[ "public", "OvhAlias", "serviceName_output_elasticsearch_alias_aliasId_GET", "(", "String", "serviceName", ",", "String", "aliasId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId}\"", ";", "StringBuilder...
Returns specified elasticsearch alias REST: GET /dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId} @param serviceName [required] Service name @param aliasId [required] Alias ID
[ "Returns", "specified", "elasticsearch", "alias" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L1702-L1707
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.createAccount
public static NKey createAccount(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { """ Create an Account NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The...
java
public static NKey createAccount(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { return createPair(Type.ACCOUNT, random); }
[ "public", "static", "NKey", "createAccount", "(", "SecureRandom", "random", ")", "throws", "IOException", ",", "NoSuchProviderException", ",", "NoSuchAlgorithmException", "{", "return", "createPair", "(", "Type", ".", "ACCOUNT", ",", "random", ")", ";", "}" ]
Create an Account NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The new NKey contains the private seed, which should be saved in a secure location. @param random A secure random provider @return the new Nkey @throws I...
[ "Create", "an", "Account", "NKey", "from", "the", "provided", "random", "number", "generator", "." ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L479-L482
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.pixelXToTileXWithScaleFactor
public static int pixelXToTileXWithScaleFactor(double pixelX, double scaleFactor, int tileSize) { """ Converts a pixel X coordinate to the tile X number. @param pixelX the pixel X coordinate that should be converted. @param scaleFactor the scale factor at which the coordinate should be converted. @return...
java
public static int pixelXToTileXWithScaleFactor(double pixelX, double scaleFactor, int tileSize) { return (int) Math.min(Math.max(pixelX / tileSize, 0), scaleFactor - 1); }
[ "public", "static", "int", "pixelXToTileXWithScaleFactor", "(", "double", "pixelX", ",", "double", "scaleFactor", ",", "int", "tileSize", ")", "{", "return", "(", "int", ")", "Math", ".", "min", "(", "Math", ".", "max", "(", "pixelX", "/", "tileSize", ",",...
Converts a pixel X coordinate to the tile X number. @param pixelX the pixel X coordinate that should be converted. @param scaleFactor the scale factor at which the coordinate should be converted. @return the tile X number.
[ "Converts", "a", "pixel", "X", "coordinate", "to", "the", "tile", "X", "number", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L367-L369
google/flogger
api/src/main/java/com/google/common/flogger/backend/system/AbstractBackend.java
AbstractBackend.publish
private static void publish(Logger logger, LogRecord record) { """ rate limiting. Thus we don't have to care about using iterative methods vs recursion here. """ // Annoyingly this method appears to copy the array every time it is called, but there's // nothing much we can do about this (and there coul...
java
private static void publish(Logger logger, LogRecord record) { // Annoyingly this method appears to copy the array every time it is called, but there's // nothing much we can do about this (and there could be synchronization issues even if we // could access things directly because handlers can be changed a...
[ "private", "static", "void", "publish", "(", "Logger", "logger", ",", "LogRecord", "record", ")", "{", "// Annoyingly this method appears to copy the array every time it is called, but there's", "// nothing much we can do about this (and there could be synchronization issues even if we", ...
rate limiting. Thus we don't have to care about using iterative methods vs recursion here.
[ "rate", "limiting", ".", "Thus", "we", "don", "t", "have", "to", "care", "about", "using", "iterative", "methods", "vs", "recursion", "here", "." ]
train
https://github.com/google/flogger/blob/a164967a93a9f4ce92f34319fc0cc7c91a57321c/api/src/main/java/com/google/common/flogger/backend/system/AbstractBackend.java#L123-L137
alkacon/opencms-core
src-setup/org/opencms/setup/CmsUpdateBean.java
CmsUpdateBean.removeModule
protected void removeModule(String moduleName, I_CmsReport report) throws CmsException { """ Removes a module.<p> @param moduleName the name of the module to remove @param report the report to write to @throws CmsException in case something goes wrong """ if (OpenCms.getModuleManager().getModul...
java
protected void removeModule(String moduleName, I_CmsReport report) throws CmsException { if (OpenCms.getModuleManager().getModule(moduleName) != null) { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, true, m_preserveLibMod...
[ "protected", "void", "removeModule", "(", "String", "moduleName", ",", "I_CmsReport", "report", ")", "throws", "CmsException", "{", "if", "(", "OpenCms", ".", "getModuleManager", "(", ")", ".", "getModule", "(", "moduleName", ")", "!=", "null", ")", "{", "Op...
Removes a module.<p> @param moduleName the name of the module to remove @param report the report to write to @throws CmsException in case something goes wrong
[ "Removes", "a", "module", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsUpdateBean.java#L1170-L1180
h2oai/h2o-2
src/main/java/hex/gbm/SharedTreeModelBuilder.java
ScoreBuildHistogram.accum_all
private void accum_all(Chunk chks[], Chunk wrks, int nnids[]) { """ histograms once-per-NID, but requires pre-sorting the rows by NID. """ final DHistogram hcs[][] = _hcs; // Sort the rows by NID, so we visit all the same NIDs in a row // Find the count of unique NIDs in this chunk int ...
java
private void accum_all(Chunk chks[], Chunk wrks, int nnids[]) { final DHistogram hcs[][] = _hcs; // Sort the rows by NID, so we visit all the same NIDs in a row // Find the count of unique NIDs in this chunk int nh[] = new int[hcs.length+1]; for( int i : nnids ) if( i >= 0 ) nh[i+1]++; ...
[ "private", "void", "accum_all", "(", "Chunk", "chks", "[", "]", ",", "Chunk", "wrks", ",", "int", "nnids", "[", "]", ")", "{", "final", "DHistogram", "hcs", "[", "]", "[", "]", "=", "_hcs", ";", "// Sort the rows by NID, so we visit all the same NIDs in a row"...
histograms once-per-NID, but requires pre-sorting the rows by NID.
[ "histograms", "once", "-", "per", "-", "NID", "but", "requires", "pre", "-", "sorting", "the", "rows", "by", "NID", "." ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/hex/gbm/SharedTreeModelBuilder.java#L546-L562
attribyte/wpdb
src/main/java/org/attribyte/wp/model/User.java
User.withId
public User withId(final long id) { """ Creates a user with a new id. @param id The new id. @return The user with new id. """ return new User(id, username, displayName, slug, email, createTimestamp, url, metadata); }
java
public User withId(final long id) { return new User(id, username, displayName, slug, email, createTimestamp, url, metadata); }
[ "public", "User", "withId", "(", "final", "long", "id", ")", "{", "return", "new", "User", "(", "id", ",", "username", ",", "displayName", ",", "slug", ",", "email", ",", "createTimestamp", ",", "url", ",", "metadata", ")", ";", "}" ]
Creates a user with a new id. @param id The new id. @return The user with new id.
[ "Creates", "a", "user", "with", "a", "new", "id", "." ]
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/User.java#L138-L140
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.checkExistenceByIdAsync
public Observable<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion) { """ Checks by ID whether a resource exists. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-nam...
java
public Observable<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion) { return checkExistenceByIdWithServiceResponseAsync(resourceId, apiVersion).map(new Func1<ServiceResponse<Boolean>, Boolean>() { @Override public Boolean call(ServiceResponse<Boolean> response) { ...
[ "public", "Observable", "<", "Boolean", ">", "checkExistenceByIdAsync", "(", "String", "resourceId", ",", "String", "apiVersion", ")", "{", "return", "checkExistenceByIdWithServiceResponseAsync", "(", "resourceId", ",", "apiVersion", ")", ".", "map", "(", "new", "Fu...
Checks by ID whether a resource exists. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} @param apiVersion The API version to ...
[ "Checks", "by", "ID", "whether", "a", "resource", "exists", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L1870-L1877
i-net-software/jlessc
src/com/inet/lib/less/Rule.java
Rule.appendMixinsTo
void appendMixinsTo( String[] parentSelector, CssFormatter formatter ) { """ Append the mixins of this rule to current output. @param parentSelector the resulting parent selector @param formatter current formatter """ for( Formattable prop : properties ) { switch( prop.getType()) { ...
java
void appendMixinsTo( String[] parentSelector, CssFormatter formatter ) { for( Formattable prop : properties ) { switch( prop.getType()) { case MIXIN: ((Mixin)prop).appendSubRules( parentSelector, formatter ); break; case CSS_AT_...
[ "void", "appendMixinsTo", "(", "String", "[", "]", "parentSelector", ",", "CssFormatter", "formatter", ")", "{", "for", "(", "Formattable", "prop", ":", "properties", ")", "{", "switch", "(", "prop", ".", "getType", "(", ")", ")", "{", "case", "MIXIN", "...
Append the mixins of this rule to current output. @param parentSelector the resulting parent selector @param formatter current formatter
[ "Append", "the", "mixins", "of", "this", "rule", "to", "current", "output", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/Rule.java#L298-L310
Stratio/stratio-cassandra
src/java/org/apache/cassandra/streaming/StreamPlan.java
StreamPlan.transferRanges
public StreamPlan transferRanges(InetAddress to, String keyspace, Collection<Range<Token>> ranges, String... columnFamilies) { """ Add transfer task to send data of specific {@code columnFamilies} under {@code keyspace} and {@code ranges}. @see #transferRanges(java.net.InetAddress, java.net.InetAddress, String,...
java
public StreamPlan transferRanges(InetAddress to, String keyspace, Collection<Range<Token>> ranges, String... columnFamilies) { return transferRanges(to, to, keyspace, ranges, columnFamilies); }
[ "public", "StreamPlan", "transferRanges", "(", "InetAddress", "to", ",", "String", "keyspace", ",", "Collection", "<", "Range", "<", "Token", ">", ">", "ranges", ",", "String", "...", "columnFamilies", ")", "{", "return", "transferRanges", "(", "to", ",", "t...
Add transfer task to send data of specific {@code columnFamilies} under {@code keyspace} and {@code ranges}. @see #transferRanges(java.net.InetAddress, java.net.InetAddress, String, java.util.Collection, String...)
[ "Add", "transfer", "task", "to", "send", "data", "of", "specific", "{", "@code", "columnFamilies", "}", "under", "{", "@code", "keyspace", "}", "and", "{", "@code", "ranges", "}", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/streaming/StreamPlan.java#L98-L101
cryptomator/cryptofs
src/main/java/org/cryptomator/cryptofs/fh/OpenCryptoFiles.java
OpenCryptoFiles.prepareMove
public TwoPhaseMove prepareMove(Path src, Path dst) throws FileAlreadyExistsException { """ Prepares to update any open file references during a move operation. MUST be invoked using a try-with-resource statement and committed after the physical file move succeeded. @param src The ciphertext file path before t...
java
public TwoPhaseMove prepareMove(Path src, Path dst) throws FileAlreadyExistsException { return new TwoPhaseMove(src, dst); }
[ "public", "TwoPhaseMove", "prepareMove", "(", "Path", "src", ",", "Path", "dst", ")", "throws", "FileAlreadyExistsException", "{", "return", "new", "TwoPhaseMove", "(", "src", ",", "dst", ")", ";", "}" ]
Prepares to update any open file references during a move operation. MUST be invoked using a try-with-resource statement and committed after the physical file move succeeded. @param src The ciphertext file path before the move @param dst The ciphertext file path after the move @return Utility to update OpenCryptoFile ...
[ "Prepares", "to", "update", "any", "open", "file", "references", "during", "a", "move", "operation", ".", "MUST", "be", "invoked", "using", "a", "try", "-", "with", "-", "resource", "statement", "and", "committed", "after", "the", "physical", "file", "move",...
train
https://github.com/cryptomator/cryptofs/blob/67fc1a4950dd1c150cd2e2c75bcabbeb7c9ac82e/src/main/java/org/cryptomator/cryptofs/fh/OpenCryptoFiles.java#L104-L106
google/closure-compiler
src/com/google/javascript/jscomp/ClosureRewriteModule.java
ClosureRewriteModule.maybeUpdateExportDeclaration
private void maybeUpdateExportDeclaration(NodeTraversal t, Node n) { """ In module "foo.Bar", rewrite "exports = Bar" to "var module$exports$foo$Bar = Bar". """ if (!currentScript.isModule || !n.getString().equals("exports") || !isAssignTarget(n)) { return; } Node assignNode ...
java
private void maybeUpdateExportDeclaration(NodeTraversal t, Node n) { if (!currentScript.isModule || !n.getString().equals("exports") || !isAssignTarget(n)) { return; } Node assignNode = n.getParent(); if (!currentScript.declareLegacyNamespace && currentScript.defaultExport...
[ "private", "void", "maybeUpdateExportDeclaration", "(", "NodeTraversal", "t", ",", "Node", "n", ")", "{", "if", "(", "!", "currentScript", ".", "isModule", "||", "!", "n", ".", "getString", "(", ")", ".", "equals", "(", "\"exports\"", ")", "||", "!", "is...
In module "foo.Bar", rewrite "exports = Bar" to "var module$exports$foo$Bar = Bar".
[ "In", "module", "foo", ".", "Bar", "rewrite", "exports", "=", "Bar", "to", "var", "module$exports$foo$Bar", "=", "Bar", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ClosureRewriteModule.java#L1387-L1425
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.validate
static boolean validate(String value, List<JQLPlaceHolder> placeHolders, int pos) { """ look for variable name in place holders defined through path of content provider. @param value the value @param placeHolders the place holders @param pos the pos @return <code>true</code> if we found it path """ ...
java
static boolean validate(String value, List<JQLPlaceHolder> placeHolders, int pos) { return placeHolders.get(pos).value.equals(value); }
[ "static", "boolean", "validate", "(", "String", "value", ",", "List", "<", "JQLPlaceHolder", ">", "placeHolders", ",", "int", "pos", ")", "{", "return", "placeHolders", ".", "get", "(", "pos", ")", ".", "value", ".", "equals", "(", "value", ")", ";", "...
look for variable name in place holders defined through path of content provider. @param value the value @param placeHolders the place holders @param pos the pos @return <code>true</code> if we found it path
[ "look", "for", "variable", "name", "in", "place", "holders", "defined", "through", "path", "of", "content", "provider", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L153-L155
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpScsrlsvqr
public static int cusolverSpScsrlsvqr( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrVal, Pointer csrRowPtr, Pointer csrColInd, Pointer b, float tol, int reorder, Pointer x, ...
java
public static int cusolverSpScsrlsvqr( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrVal, Pointer csrRowPtr, Pointer csrColInd, Pointer b, float tol, int reorder, Pointer x, ...
[ "public", "static", "int", "cusolverSpScsrlsvqr", "(", "cusolverSpHandle", "handle", ",", "int", "m", ",", "int", "nnz", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrVal", ",", "Pointer", "csrRowPtr", ",", "Pointer", "csrColInd", ",", "Pointer", "b", ...
<pre> -------- GPU linear solver by QR factorization solve A*x = b, A can be singular [ls] stands for linear solve [v] stands for vector [qr] stands for QR factorization </pre>
[ "<pre", ">", "--------", "GPU", "linear", "solver", "by", "QR", "factorization", "solve", "A", "*", "x", "=", "b", "A", "can", "be", "singular", "[", "ls", "]", "stands", "for", "linear", "solve", "[", "v", "]", "stands", "for", "vector", "[", "qr", ...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L270-L285
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java
Functions.randomString
public static String randomString(Long numberOfLetters, TestContext context) { """ Runs random string function with arguments. @param numberOfLetters @return """ return new RandomStringFunction().execute(Collections.singletonList(String.valueOf(numberOfLetters)), context); }
java
public static String randomString(Long numberOfLetters, TestContext context) { return new RandomStringFunction().execute(Collections.singletonList(String.valueOf(numberOfLetters)), context); }
[ "public", "static", "String", "randomString", "(", "Long", "numberOfLetters", ",", "TestContext", "context", ")", "{", "return", "new", "RandomStringFunction", "(", ")", ".", "execute", "(", "Collections", ".", "singletonList", "(", "String", ".", "valueOf", "("...
Runs random string function with arguments. @param numberOfLetters @return
[ "Runs", "random", "string", "function", "with", "arguments", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java#L187-L189
OpenLiberty/open-liberty
dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/cache/ZipCachingProperties.java
ZipCachingProperties.toRelSec
@Trivial public static String toRelSec(long baseNS, long actualNS, int pad) { """ Display the difference between two nano-seconds values as a decimal seconds value. Display three places after the decimal point, and left the integer value with '0' to a minimum of the specified number of characters. @pa...
java
@Trivial public static String toRelSec(long baseNS, long actualNS, int pad) { return toAbsSec(actualNS - baseNS, pad); }
[ "@", "Trivial", "public", "static", "String", "toRelSec", "(", "long", "baseNS", ",", "long", "actualNS", ",", "int", "pad", ")", "{", "return", "toAbsSec", "(", "actualNS", "-", "baseNS", ",", "pad", ")", ";", "}" ]
Display the difference between two nano-seconds values as a decimal seconds value. Display three places after the decimal point, and left the integer value with '0' to a minimum of the specified number of characters. @param baseNS The value to subtract from the second parameter. @param actualNS The from which to subt...
[ "Display", "the", "difference", "between", "two", "nano", "-", "seconds", "values", "as", "a", "decimal", "seconds", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/cache/ZipCachingProperties.java#L458-L461
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/writer/http/AbstractHttpWriter.java
AbstractHttpWriter.processResponse
@Override public void processResponse(CloseableHttpResponse response) throws IOException, UnexpectedResponseException { """ Default implementation where any status code equal to or greater than 400 is regarded as a failure. {@inheritDoc} @see org.apache.gobblin.writer.http.HttpWriterDecoration#processResponse(...
java
@Override public void processResponse(CloseableHttpResponse response) throws IOException, UnexpectedResponseException { if (response.getStatusLine().getStatusCode() >= 400) { if (response.getEntity() != null) { throw new RuntimeException("Failed. " + EntityUtils.toString(response.getEntity()) ...
[ "@", "Override", "public", "void", "processResponse", "(", "CloseableHttpResponse", "response", ")", "throws", "IOException", ",", "UnexpectedResponseException", "{", "if", "(", "response", ".", "getStatusLine", "(", ")", ".", "getStatusCode", "(", ")", ">=", "400...
Default implementation where any status code equal to or greater than 400 is regarded as a failure. {@inheritDoc} @see org.apache.gobblin.writer.http.HttpWriterDecoration#processResponse(org.apache.http.HttpResponse)
[ "Default", "implementation", "where", "any", "status", "code", "equal", "to", "or", "greater", "than", "400", "is", "regarded", "as", "a", "failure", ".", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/writer/http/AbstractHttpWriter.java#L218-L227
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/FileUtil.java
FileUtil.directoryOnlyIfNotIgnored
public static boolean directoryOnlyIfNotIgnored(File file) { """ Ignores directory (and children) if it contains a file named ".jbakeignore". @param file {@link File} @return {@link Boolean} true/false """ boolean accept = false; FilenameFilter ignoreFile = new FilenameFilter() { ...
java
public static boolean directoryOnlyIfNotIgnored(File file) { boolean accept = false; FilenameFilter ignoreFile = new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.equalsIgnoreCase(".jbakeignore"); } };...
[ "public", "static", "boolean", "directoryOnlyIfNotIgnored", "(", "File", "file", ")", "{", "boolean", "accept", "=", "false", ";", "FilenameFilter", "ignoreFile", "=", "new", "FilenameFilter", "(", ")", "{", "@", "Override", "public", "boolean", "accept", "(", ...
Ignores directory (and children) if it contains a file named ".jbakeignore". @param file {@link File} @return {@link Boolean} true/false
[ "Ignores", "directory", "(", "and", "children", ")", "if", "it", "contains", "a", "file", "named", ".", "jbakeignore", "." ]
train
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/FileUtil.java#L70-L83
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/management/JmxRegistration.java
JmxRegistration.registerMXBean
public static void registerMXBean(Cache<?, ?> cache, Object mxbean, MBeanType type) { """ Registers the JMX management bean for the cache. @param cache the cache to register @param mxbean the management bean @param type the mxbean type """ ObjectName objectName = getObjectName(cache, type); regist...
java
public static void registerMXBean(Cache<?, ?> cache, Object mxbean, MBeanType type) { ObjectName objectName = getObjectName(cache, type); register(objectName, mxbean); }
[ "public", "static", "void", "registerMXBean", "(", "Cache", "<", "?", ",", "?", ">", "cache", ",", "Object", "mxbean", ",", "MBeanType", "type", ")", "{", "ObjectName", "objectName", "=", "getObjectName", "(", "cache", ",", "type", ")", ";", "register", ...
Registers the JMX management bean for the cache. @param cache the cache to register @param mxbean the management bean @param type the mxbean type
[ "Registers", "the", "JMX", "management", "bean", "for", "the", "cache", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/management/JmxRegistration.java#L49-L52
shekhargulati/strman-java
src/main/java/strman/Strman.java
Strman.removeLeft
public static String removeLeft(final String value, final String prefix) { """ Returns a new String with the prefix removed, if present. This is case sensitive. @param value The input String @param prefix String to remove on left @return The String without prefix """ return removeLeft(value, pref...
java
public static String removeLeft(final String value, final String prefix) { return removeLeft(value, prefix, true); }
[ "public", "static", "String", "removeLeft", "(", "final", "String", "value", ",", "final", "String", "prefix", ")", "{", "return", "removeLeft", "(", "value", ",", "prefix", ",", "true", ")", ";", "}" ]
Returns a new String with the prefix removed, if present. This is case sensitive. @param value The input String @param prefix String to remove on left @return The String without prefix
[ "Returns", "a", "new", "String", "with", "the", "prefix", "removed", "if", "present", ".", "This", "is", "case", "sensitive", "." ]
train
https://github.com/shekhargulati/strman-java/blob/d0c2a10a6273fd6082f084e95156653ca55ce1be/src/main/java/strman/Strman.java#L725-L727
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.propertyDefinitionFor
final JcrPropertyDefinition propertyDefinitionFor( org.modeshape.jcr.value.Property property, Name primaryType, Set<Name> mixinTypes, NodeTypes nodeTypes )...
java
final JcrPropertyDefinition propertyDefinitionFor( org.modeshape.jcr.value.Property property, Name primaryType, Set<Name> mixinTypes, NodeTypes nodeTypes )...
[ "final", "JcrPropertyDefinition", "propertyDefinitionFor", "(", "org", ".", "modeshape", ".", "jcr", ".", "value", ".", "Property", "property", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "NodeTypes", "nodeTypes", ")", "throws", ...
Find the property definition for the property, given this node's primary type and mixin types. @param property the property owned by this node; may not be null @param primaryType the name of the node's primary type; may not be null @param mixinTypes the names of the node's mixin types; may be null or empty @param node...
[ "Find", "the", "property", "definition", "for", "the", "property", "given", "this", "node", "s", "primary", "type", "and", "mixin", "types", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L452-L477
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java
NetworkInterfacesInner.listVirtualMachineScaleSetVMNetworkInterfacesAsync
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { """ Gets information about all network interfaces in a virtual machine in a virtual machine scale set. @p...
java
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { return listVirtualMachineScaleSetVMNetworkInterfacesWithServiceResponseAsync(resourceGroupName, virtualMa...
[ "public", "Observable", "<", "Page", "<", "NetworkInterfaceInner", ">", ">", "listVirtualMachineScaleSetVMNetworkInterfacesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "virtualMachineScaleSetName", ",", "final", "String", "virtualmachineIndex",...
Gets information about all network interfaces in a virtual machine in a virtual machine scale set. @param resourceGroupName The name of the resource group. @param virtualMachineScaleSetName The name of the virtual machine scale set. @param virtualmachineIndex The virtual machine index. @throws IllegalArgumentException...
[ "Gets", "information", "about", "all", "network", "interfaces", "in", "a", "virtual", "machine", "in", "a", "virtual", "machine", "scale", "set", "." ]
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/NetworkInterfacesInner.java#L1538-L1546
alkacon/opencms-core
src/org/opencms/jsp/util/CmsDynamicFunctionBeanWrapper.java
CmsDynamicFunctionBeanWrapper.getParameters
public Map<String, String> getParameters() { """ Gets the parameters of the wrapped dynamic function bean's main format.<p> @return the map of parameters """ if (m_functionBean == null) { return Collections.emptyMap(); } Format format = m_functionBean.getMainFormat(...
java
public Map<String, String> getParameters() { if (m_functionBean == null) { return Collections.emptyMap(); } Format format = m_functionBean.getMainFormat(); CmsDynamicFunctionFormatWrapper wrapper = new CmsDynamicFunctionFormatWrapper(m_cms, format); return wra...
[ "public", "Map", "<", "String", ",", "String", ">", "getParameters", "(", ")", "{", "if", "(", "m_functionBean", "==", "null", ")", "{", "return", "Collections", ".", "emptyMap", "(", ")", ";", "}", "Format", "format", "=", "m_functionBean", ".", "getMai...
Gets the parameters of the wrapped dynamic function bean's main format.<p> @return the map of parameters
[ "Gets", "the", "parameters", "of", "the", "wrapped", "dynamic", "function", "bean", "s", "main", "format", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsDynamicFunctionBeanWrapper.java#L132-L140
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java
JCollapsiblePane.setAnimationParams
private void setAnimationParams(AnimationParams params) { """ Sets the parameters controlling the animation. @param params @throws IllegalArgumentException if params is null """ if (params == null) { throw new IllegalArgumentException( "params can't be null"); ...
java
private void setAnimationParams(AnimationParams params) { if (params == null) { throw new IllegalArgumentException( "params can't be null"); } if (animateTimer != null) { animateTimer.stop(); } animationParams = params; animateT...
[ "private", "void", "setAnimationParams", "(", "AnimationParams", "params", ")", "{", "if", "(", "params", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"params can't be null\"", ")", ";", "}", "if", "(", "animateTimer", "!=", "null",...
Sets the parameters controlling the animation. @param params @throws IllegalArgumentException if params is null
[ "Sets", "the", "parameters", "controlling", "the", "animation", "." ]
train
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java#L417-L428
landawn/AbacusUtil
src/com/landawn/abacus/util/ByteList.java
ByteList.reduce
public <E extends Exception> byte reduce(final byte identity, final Try.ByteBinaryOperator<E> accumulator) throws E { """ This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } byte result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsByte(result, elementData...
java
public <E extends Exception> byte reduce(final byte identity, final Try.ByteBinaryOperator<E> accumulator) throws E { if (isEmpty()) { return identity; } byte result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsByte(result, el...
[ "public", "<", "E", "extends", "Exception", ">", "byte", "reduce", "(", "final", "byte", "identity", ",", "final", "Try", ".", "ByteBinaryOperator", "<", "E", ">", "accumulator", ")", "throws", "E", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "retur...
This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } byte result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsByte(result, elementData[i]); } return result; </code> </pre> @param identity @param accumulator @return
[ "This", "is", "equivalent", "to", ":", "<pre", ">", "<code", ">", "if", "(", "isEmpty", "()", ")", "{", "return", "identity", ";", "}" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/ByteList.java#L1123-L1135
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicylabel_binding.java
authorizationpolicylabel_binding.get
public static authorizationpolicylabel_binding get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch authorizationpolicylabel_binding resource of given name . """ authorizationpolicylabel_binding obj = new authorizationpolicylabel_binding(); obj.set_labelname(labelname);...
java
public static authorizationpolicylabel_binding get(nitro_service service, String labelname) throws Exception{ authorizationpolicylabel_binding obj = new authorizationpolicylabel_binding(); obj.set_labelname(labelname); authorizationpolicylabel_binding response = (authorizationpolicylabel_binding) obj.get_resource...
[ "public", "static", "authorizationpolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "authorizationpolicylabel_binding", "obj", "=", "new", "authorizationpolicylabel_binding", "(", ")", ";", "obj", ...
Use this API to fetch authorizationpolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "authorizationpolicylabel_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicylabel_binding.java#L103-L108
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.spellBigNumber
@Expose public static String spellBigNumber(final Number value, final Locale locale) { """ <p> Same as {@link #spellBigNumber(Number)} for the specified locale. </p> @param value Number to be converted @param locale Target locale @return Friendly text representation of the given value """ ...
java
@Expose public static String spellBigNumber(final Number value, final Locale locale) { return withinLocale(new Callable<String>() { public String call() { return spellBigNumber(value); } }, locale); }
[ "@", "Expose", "public", "static", "String", "spellBigNumber", "(", "final", "Number", "value", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "String", ">", "(", ")", "{", "public", "String", "call", "("...
<p> Same as {@link #spellBigNumber(Number)} for the specified locale. </p> @param value Number to be converted @param locale Target locale @return Friendly text representation of the given value
[ "<p", ">", "Same", "as", "{", "@link", "#spellBigNumber", "(", "Number", ")", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2650-L2660
aws/aws-sdk-java
aws-java-sdk-servicediscovery/src/main/java/com/amazonaws/services/servicediscovery/model/GetInstancesHealthStatusResult.java
GetInstancesHealthStatusResult.withStatus
public GetInstancesHealthStatusResult withStatus(java.util.Map<String, String> status) { """ <p> A complex type that contains the IDs and the health status of the instances that you specified in the <code>GetInstancesHealthStatus</code> request. </p> @param status A complex type that contains the IDs and th...
java
public GetInstancesHealthStatusResult withStatus(java.util.Map<String, String> status) { setStatus(status); return this; }
[ "public", "GetInstancesHealthStatusResult", "withStatus", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "status", ")", "{", "setStatus", "(", "status", ")", ";", "return", "this", ";", "}" ]
<p> A complex type that contains the IDs and the health status of the instances that you specified in the <code>GetInstancesHealthStatus</code> request. </p> @param status A complex type that contains the IDs and the health status of the instances that you specified in the <code>GetInstancesHealthStatus</code> request...
[ "<p", ">", "A", "complex", "type", "that", "contains", "the", "IDs", "and", "the", "health", "status", "of", "the", "instances", "that", "you", "specified", "in", "the", "<code", ">", "GetInstancesHealthStatus<", "/", "code", ">", "request", ".", "<", "/",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-servicediscovery/src/main/java/com/amazonaws/services/servicediscovery/model/GetInstancesHealthStatusResult.java#L83-L86
kiswanij/jk-util
src/main/java/com/jk/util/JK.java
JK.validateNull
public static void validateNull(String name, Object object) { """ Validate null. @param name the name @param object the object """ if (object == null) { throw new IllegalStateException(name.concat(" cannot be null")); } }
java
public static void validateNull(String name, Object object) { if (object == null) { throw new IllegalStateException(name.concat(" cannot be null")); } }
[ "public", "static", "void", "validateNull", "(", "String", "name", ",", "Object", "object", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "name", ".", "concat", "(", "\" cannot be null\"", ")", ")", ";...
Validate null. @param name the name @param object the object
[ "Validate", "null", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JK.java#L307-L311
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
OtpInputStream.read_pid
public OtpErlangPid read_pid() throws OtpErlangDecodeException { """ Read an Erlang PID from the stream. @return the value of the PID. @exception OtpErlangDecodeException if the next term in the stream is not an Erlang PID. """ String node; int id; int serial; int creatio...
java
public OtpErlangPid read_pid() throws OtpErlangDecodeException { String node; int id; int serial; int creation; int tag; tag = read1skip_version(); if (tag != OtpExternal.pidTag && tag != OtpExternal.newPidTag) { throw new OtpErlangDecodeExcepti...
[ "public", "OtpErlangPid", "read_pid", "(", ")", "throws", "OtpErlangDecodeException", "{", "String", "node", ";", "int", "id", ";", "int", "serial", ";", "int", "creation", ";", "int", "tag", ";", "tag", "=", "read1skip_version", "(", ")", ";", "if", "(", ...
Read an Erlang PID from the stream. @return the value of the PID. @exception OtpErlangDecodeException if the next term in the stream is not an Erlang PID.
[ "Read", "an", "Erlang", "PID", "from", "the", "stream", "." ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L948-L974
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/r/interpolation2d/core/TPSInterpolator.java
TPSInterpolator.fillVMatrix
private GeneralMatrix fillVMatrix( int dim, Coordinate[] controlPoints ) { """ Fill V matrix (matrix of target values). @param dim 0 for dx, 1 for dy. @return V Matrix """ int controlPointsNum = controlPoints.length; GeneralMatrix V = new GeneralMatrix(controlPointsNum + 3, 1); for...
java
private GeneralMatrix fillVMatrix( int dim, Coordinate[] controlPoints ) { int controlPointsNum = controlPoints.length; GeneralMatrix V = new GeneralMatrix(controlPointsNum + 3, 1); for( int i = 0; i < controlPointsNum; i++ ) { V.setElement(i, 0, controlPoints[i].z); } ...
[ "private", "GeneralMatrix", "fillVMatrix", "(", "int", "dim", ",", "Coordinate", "[", "]", "controlPoints", ")", "{", "int", "controlPointsNum", "=", "controlPoints", ".", "length", ";", "GeneralMatrix", "V", "=", "new", "GeneralMatrix", "(", "controlPointsNum", ...
Fill V matrix (matrix of target values). @param dim 0 for dx, 1 for dy. @return V Matrix
[ "Fill", "V", "matrix", "(", "matrix", "of", "target", "values", ")", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/r/interpolation2d/core/TPSInterpolator.java#L170-L183
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_UpdateZ.java
ST_UpdateZ.updateZ
public static Geometry updateZ(Geometry geometry, double z, int updateCondition) throws SQLException { """ Replace the z value depending on the condition. @param geometry @param z @param updateCondition set if the NaN value must be updated or not @return @throws java.sql.SQLException """ if(geom...
java
public static Geometry updateZ(Geometry geometry, double z, int updateCondition) throws SQLException { if(geometry == null){ return null; } if (updateCondition == 1 || updateCondition == 2 || updateCondition == 3) { Geometry outPut = geometry.copy(); outPut.ap...
[ "public", "static", "Geometry", "updateZ", "(", "Geometry", "geometry", ",", "double", "z", ",", "int", "updateCondition", ")", "throws", "SQLException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "updateCond...
Replace the z value depending on the condition. @param geometry @param z @param updateCondition set if the NaN value must be updated or not @return @throws java.sql.SQLException
[ "Replace", "the", "z", "value", "depending", "on", "the", "condition", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_UpdateZ.java#L74-L86
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginVerifyIPFlow
public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { """ Verify IP flow from the specified VM to a location given the currently configured NSG rules. @param resourceGroupName The name of the resource group. @param...
java
public VerificationIPFlowResultInner beginVerifyIPFlow(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { return beginVerifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
[ "public", "VerificationIPFlowResultInner", "beginVerifyIPFlow", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "VerificationIPFlowParameters", "parameters", ")", "{", "return", "beginVerifyIPFlowWithServiceResponseAsync", "(", "resourceGroupName", "...
Verify IP flow from the specified VM to a location given the currently configured NSG rules. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher. @param parameters Parameters that define the IP flow to be verified. @throws IllegalArgumentException thrown i...
[ "Verify", "IP", "flow", "from", "the", "specified", "VM", "to", "a", "location", "given", "the", "currently", "configured", "NSG", "rules", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1033-L1035
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderAttributeUrl.java
OrderAttributeUrl.updateCheckoutAttributeUrl
public static MozuUrl updateCheckoutAttributeUrl(String checkoutId, Boolean removeMissing) { """ Get Resource Url for UpdateCheckoutAttribute @param checkoutId The unique identifier of the checkout. @param removeMissing If true, the operation removes missing properties so that the updated checkout attributes wil...
java
public static MozuUrl updateCheckoutAttributeUrl(String checkoutId, Boolean removeMissing) { UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/attributes?removeMissing={removeMissing}"); formatter.formatUrl("checkoutId", checkoutId); formatter.formatUrl("removeMissing", removeMi...
[ "public", "static", "MozuUrl", "updateCheckoutAttributeUrl", "(", "String", "checkoutId", ",", "Boolean", "removeMissing", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/checkouts/{checkoutId}/attributes?removeMissing={removeMissing}\"", ...
Get Resource Url for UpdateCheckoutAttribute @param checkoutId The unique identifier of the checkout. @param removeMissing If true, the operation removes missing properties so that the updated checkout attributes will not show properties with a null value. @return String Resource Url
[ "Get", "Resource", "Url", "for", "UpdateCheckoutAttribute" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderAttributeUrl.java#L46-L52
dmurph/jgoogleanalyticstracker
src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java
JGoogleAnalyticsTracker.trackEvent
public void trackEvent(String argCategory, String argAction) { """ Tracks an event. To provide more info about the page, use {@link #makeCustomRequest(AnalyticsRequestData)}. @param argCategory @param argAction """ trackEvent(argCategory, argAction, null, null); }
java
public void trackEvent(String argCategory, String argAction) { trackEvent(argCategory, argAction, null, null); }
[ "public", "void", "trackEvent", "(", "String", "argCategory", ",", "String", "argAction", ")", "{", "trackEvent", "(", "argCategory", ",", "argAction", ",", "null", ",", "null", ")", ";", "}" ]
Tracks an event. To provide more info about the page, use {@link #makeCustomRequest(AnalyticsRequestData)}. @param argCategory @param argAction
[ "Tracks", "an", "event", ".", "To", "provide", "more", "info", "about", "the", "page", "use", "{", "@link", "#makeCustomRequest", "(", "AnalyticsRequestData", ")", "}", "." ]
train
https://github.com/dmurph/jgoogleanalyticstracker/blob/69f68caf8e09a53e6f6076477bf05b84bc80e386/src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java#L364-L366
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java
HttpUploadRequest.addArrayParameter
public B addArrayParameter(final String paramName, final List<String> list) { """ Adds a parameter with multiple values to this upload request. @param paramName parameter name @param list values @return self instance """ for (String value : list) { httpParams.addParameter(paramName, va...
java
public B addArrayParameter(final String paramName, final List<String> list) { for (String value : list) { httpParams.addParameter(paramName, value); } return self(); }
[ "public", "B", "addArrayParameter", "(", "final", "String", "paramName", ",", "final", "List", "<", "String", ">", "list", ")", "{", "for", "(", "String", "value", ":", "list", ")", "{", "httpParams", ".", "addParameter", "(", "paramName", ",", "value", ...
Adds a parameter with multiple values to this upload request. @param paramName parameter name @param list values @return self instance
[ "Adds", "a", "parameter", "with", "multiple", "values", "to", "this", "upload", "request", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java#L111-L116
graknlabs/grakn
server/src/graql/gremlin/spanningtree/datastructure/FibonacciHeap.java
FibonacciHeap.decreasePriority
public void decreasePriority(Entry entry, P newPriority) { """ Decreases the priority for an entry. Runtime: O(1) (amortized) """ Preconditions.checkArgument( comparator.compare(newPriority, entry.priority) <= 0, "Cannot increase priority" ); assert oMi...
java
public void decreasePriority(Entry entry, P newPriority) { Preconditions.checkArgument( comparator.compare(newPriority, entry.priority) <= 0, "Cannot increase priority" ); assert oMinEntry != null; entry.priority = newPriority; Entry oParent = en...
[ "public", "void", "decreasePriority", "(", "Entry", "entry", ",", "P", "newPriority", ")", "{", "Preconditions", ".", "checkArgument", "(", "comparator", ".", "compare", "(", "newPriority", ",", "entry", ".", "priority", ")", "<=", "0", ",", "\"Cannot increase...
Decreases the priority for an entry. Runtime: O(1) (amortized)
[ "Decreases", "the", "priority", "for", "an", "entry", ".", "Runtime", ":", "O", "(", "1", ")", "(", "amortized", ")" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/gremlin/spanningtree/datastructure/FibonacciHeap.java#L102-L120
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/feature/WigUtils.java
WigUtils.getChromosome
public static String getChromosome(String headerLine) throws InvalidObjectException { """ Extract the chromosome value from the given Wig header line. @param headerLine Header line where to look for the chromosome @return Chromosome value """ String chromosome = getHeaderInfo("chrom...
java
public static String getChromosome(String headerLine) throws InvalidObjectException { String chromosome = getHeaderInfo("chrom", headerLine); if (chromosome == null) { throw new InvalidObjectException("WigFile format, it could not find 'chrom' in the header line"); } return c...
[ "public", "static", "String", "getChromosome", "(", "String", "headerLine", ")", "throws", "InvalidObjectException", "{", "String", "chromosome", "=", "getHeaderInfo", "(", "\"chrom\"", ",", "headerLine", ")", ";", "if", "(", "chromosome", "==", "null", ")", "{"...
Extract the chromosome value from the given Wig header line. @param headerLine Header line where to look for the chromosome @return Chromosome value
[ "Extract", "the", "chromosome", "value", "from", "the", "given", "Wig", "header", "line", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/feature/WigUtils.java#L155-L161
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java
CellConstraints.concreteAlignment
private static Alignment concreteAlignment(Alignment cellAlignment, FormSpec formSpec) { """ Computes and returns the concrete alignment. Takes into account the cell alignment and <i>the</i> {@code FormSpec} if applicable.<p> If this constraints object doesn't belong to a single column or row, the {@code formS...
java
private static Alignment concreteAlignment(Alignment cellAlignment, FormSpec formSpec) { return formSpec == null ? cellAlignment == DEFAULT ? FILL : cellAlignment : usedAlignment(cellAlignment, formSpec); }
[ "private", "static", "Alignment", "concreteAlignment", "(", "Alignment", "cellAlignment", ",", "FormSpec", "formSpec", ")", "{", "return", "formSpec", "==", "null", "?", "cellAlignment", "==", "DEFAULT", "?", "FILL", ":", "cellAlignment", ":", "usedAlignment", "("...
Computes and returns the concrete alignment. Takes into account the cell alignment and <i>the</i> {@code FormSpec} if applicable.<p> If this constraints object doesn't belong to a single column or row, the {@code formSpec} parameter is {@code null}. In this case the cell alignment is answered, but {@code DEFAULT} is m...
[ "Computes", "and", "returns", "the", "concrete", "alignment", ".", "Takes", "into", "account", "the", "cell", "alignment", "and", "<i", ">", "the<", "/", "i", ">", "{", "@code", "FormSpec", "}", "if", "applicable", ".", "<p", ">" ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java#L978-L982
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/APIClient.java
APIClient.addApiKey
public JSONObject addApiKey(List<String> acls) throws AlgoliaException { """ Create a new api key @param acls the list of ACL for this key. Defined by an array of strings that can contains the following values: - search: allow to search (https and http) - addObject: allows to add/update an object in the inde...
java
public JSONObject addApiKey(List<String> acls) throws AlgoliaException { return addApiKey(acls, 0, 0, 0, null, RequestOptions.empty); }
[ "public", "JSONObject", "addApiKey", "(", "List", "<", "String", ">", "acls", ")", "throws", "AlgoliaException", "{", "return", "addApiKey", "(", "acls", ",", "0", ",", "0", ",", "0", ",", "null", ",", "RequestOptions", ".", "empty", ")", ";", "}" ]
Create a new api key @param acls the list of ACL for this key. Defined by an array of strings that can contains the following values: - search: allow to search (https and http) - addObject: allows to add/update an object in the index (https only) - deleteObject : allows to delete an existing object (https only) - dele...
[ "Create", "a", "new", "api", "key" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/APIClient.java#L649-L651
tencentyun/cos-java-sdk
src/main/java/com/qcloud/cos/sign/Sign.java
Sign.getOneEffectiveSign
public static String getOneEffectiveSign(String bucketName, String cosPath, Credentials cred) throws AbstractCosException { """ 获取单次签名, 一次有效,针对删除和更新文件目录 @param bucketName bucket名称 @param cosPath 要签名的cos路径 @param cred 用户的身份信息, 包括appid, secret_id和secret_key @return base64编码的字符串 @throws AbstractCosExcept...
java
public static String getOneEffectiveSign(String bucketName, String cosPath, Credentials cred) throws AbstractCosException { return appSignatureBase(cred, bucketName, cosPath, 0, true); }
[ "public", "static", "String", "getOneEffectiveSign", "(", "String", "bucketName", ",", "String", "cosPath", ",", "Credentials", "cred", ")", "throws", "AbstractCosException", "{", "return", "appSignatureBase", "(", "cred", ",", "bucketName", ",", "cosPath", ",", "...
获取单次签名, 一次有效,针对删除和更新文件目录 @param bucketName bucket名称 @param cosPath 要签名的cos路径 @param cred 用户的身份信息, 包括appid, secret_id和secret_key @return base64编码的字符串 @throws AbstractCosException
[ "获取单次签名", "一次有效,针对删除和更新文件目录" ]
train
https://github.com/tencentyun/cos-java-sdk/blob/6709a48f67c1ea7b82a7215f5037d6ccf218b630/src/main/java/com/qcloud/cos/sign/Sign.java#L92-L95
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.dateAddMillis
public static Expression dateAddMillis(Expression expression, int n, DatePart part) { """ Returned expression performs Date arithmetic, and returns result of computation. n and part are used to define an interval or duration, which is then added (or subtracted) to the UNIX timestamp, returning the result. ""...
java
public static Expression dateAddMillis(Expression expression, int n, DatePart part) { return x("DATE_ADD_MILLIS(" + expression.toString() + ", " + n + ", \"" + part + "\")"); }
[ "public", "static", "Expression", "dateAddMillis", "(", "Expression", "expression", ",", "int", "n", ",", "DatePart", "part", ")", "{", "return", "x", "(", "\"DATE_ADD_MILLIS(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \"", "+", "n", "+", ...
Returned expression performs Date arithmetic, and returns result of computation. n and part are used to define an interval or duration, which is then added (or subtracted) to the UNIX timestamp, returning the result.
[ "Returned", "expression", "performs", "Date", "arithmetic", "and", "returns", "result", "of", "computation", ".", "n", "and", "part", "are", "used", "to", "define", "an", "interval", "or", "duration", "which", "is", "then", "added", "(", "or", "subtracted", ...
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L73-L75
Hygieia/Hygieia
collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/BaseClient.java
BaseClient.getQuery
public String getQuery(String changeDatePara, String queryName) { """ Retrieves source system queries based on the query name (without the file type) and a specified change date parameter. @param changeDatePara The change date specified from which to pull data with a given query template. @param queryName ...
java
public String getQuery(String changeDatePara, String queryName) { ST st = (new STGroupDir(featureSettings.getQueryFolder(), '$', '$')).getInstanceOf(queryName); st.add("changeDate", changeDatePara); return st.render(); }
[ "public", "String", "getQuery", "(", "String", "changeDatePara", ",", "String", "queryName", ")", "{", "ST", "st", "=", "(", "new", "STGroupDir", "(", "featureSettings", ".", "getQueryFolder", "(", ")", ",", "'", "'", ",", "'", "'", ")", ")", ".", "get...
Retrieves source system queries based on the query name (without the file type) and a specified change date parameter. @param changeDatePara The change date specified from which to pull data with a given query template. @param queryName The source system query name (without the file type). @return A given source syste...
[ "Retrieves", "source", "system", "queries", "based", "on", "the", "query", "name", "(", "without", "the", "file", "type", ")", "and", "a", "specified", "change", "date", "parameter", "." ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/BaseClient.java#L130-L134
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/profiles/TiffITProfile.java
TiffITProfile.validateIfdLW
private void validateIfdLW(IFD ifd, int p) { """ Validate Line Work. @param ifd the ifd @param p the profile (default = 0, P1 = 1, P2 = 2) """ IfdTags metadata = ifd.getMetadata(); if (p == 1) { checkRequiredTag(metadata, "NewSubfileType", 1, new long[]{0}); } checkRequiredTag(metada...
java
private void validateIfdLW(IFD ifd, int p) { IfdTags metadata = ifd.getMetadata(); if (p == 1) { checkRequiredTag(metadata, "NewSubfileType", 1, new long[]{0}); } checkRequiredTag(metadata, "ImageLength", 1); checkRequiredTag(metadata, "ImageWidth", 1); checkRequiredTag(metadata, "Samples...
[ "private", "void", "validateIfdLW", "(", "IFD", "ifd", ",", "int", "p", ")", "{", "IfdTags", "metadata", "=", "ifd", ".", "getMetadata", "(", ")", ";", "if", "(", "p", "==", "1", ")", "{", "checkRequiredTag", "(", "metadata", ",", "\"NewSubfileType\"", ...
Validate Line Work. @param ifd the ifd @param p the profile (default = 0, P1 = 1, P2 = 2)
[ "Validate", "Line", "Work", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/profiles/TiffITProfile.java#L332-L364
Netflix/astyanax
astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/Mapping.java
Mapping.setIdValue
public <V> void setIdValue(T instance, V value) { """ Set the value for the ID/Key column for the given instance @param instance the instance @param value The value (must match the actual native type in the instance's class) """ setColumnValue(instance, idFieldName, value); }
java
public <V> void setIdValue(T instance, V value) { setColumnValue(instance, idFieldName, value); }
[ "public", "<", "V", ">", "void", "setIdValue", "(", "T", "instance", ",", "V", "value", ")", "{", "setColumnValue", "(", "instance", ",", "idFieldName", ",", "value", ")", ";", "}" ]
Set the value for the ID/Key column for the given instance @param instance the instance @param value The value (must match the actual native type in the instance's class)
[ "Set", "the", "value", "for", "the", "ID", "/", "Key", "column", "for", "the", "given", "instance" ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/Mapping.java#L203-L205
prestodb/presto
presto-spi/src/main/java/com/facebook/presto/spi/block/ArrayBlock.java
ArrayBlock.fromElementBlock
public static Block fromElementBlock(int positionCount, Optional<boolean[]> valueIsNull, int[] arrayOffset, Block values) { """ Create an array block directly from columnar nulls, values, and offsets into the values. A null array must have no entries. """ validateConstructorArguments(0, positionCount,...
java
public static Block fromElementBlock(int positionCount, Optional<boolean[]> valueIsNull, int[] arrayOffset, Block values) { validateConstructorArguments(0, positionCount, valueIsNull.orElse(null), arrayOffset, values); // for performance reasons per element checks are only performed on the public co...
[ "public", "static", "Block", "fromElementBlock", "(", "int", "positionCount", ",", "Optional", "<", "boolean", "[", "]", ">", "valueIsNull", ",", "int", "[", "]", "arrayOffset", ",", "Block", "values", ")", "{", "validateConstructorArguments", "(", "0", ",", ...
Create an array block directly from columnar nulls, values, and offsets into the values. A null array must have no entries.
[ "Create", "an", "array", "block", "directly", "from", "columnar", "nulls", "values", "and", "offsets", "into", "the", "values", ".", "A", "null", "array", "must", "have", "no", "entries", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-spi/src/main/java/com/facebook/presto/spi/block/ArrayBlock.java#L45-L60
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateHierarchicalEntityAsync
public Observable<OperationStatus> updateHierarchicalEntityAsync(UUID appId, String versionId, UUID hEntityId, HierarchicalEntityModel hierarchicalModelUpdateObject) { """ Updates the name and children of a hierarchical entity model. @param appId The application ID. @param versionId The version ID. @param hEn...
java
public Observable<OperationStatus> updateHierarchicalEntityAsync(UUID appId, String versionId, UUID hEntityId, HierarchicalEntityModel hierarchicalModelUpdateObject) { return updateHierarchicalEntityWithServiceResponseAsync(appId, versionId, hEntityId, hierarchicalModelUpdateObject).map(new Func1<ServiceRespons...
[ "public", "Observable", "<", "OperationStatus", ">", "updateHierarchicalEntityAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "HierarchicalEntityModel", "hierarchicalModelUpdateObject", ")", "{", "return", "updateHierarchicalEntityWi...
Updates the name and children of a hierarchical entity model. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param hierarchicalModelUpdateObject Model containing names of the children of the hierarchical entity. @throws IllegalArgumentException...
[ "Updates", "the", "name", "and", "children", "of", "a", "hierarchical", "entity", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3777-L3784
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java
IntegrationAccountsInner.createOrUpdate
public IntegrationAccountInner createOrUpdate(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { """ Creates or updates an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @par...
java
public IntegrationAccountInner createOrUpdate(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).toBlocking().single().body(); }
[ "public", "IntegrationAccountInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "IntegrationAccountInner", "integrationAccount", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Creates or updates an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param integrationAccount The integration account. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the requ...
[ "Creates", "or", "updates", "an", "integration", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L663-L665
Jasig/uPortal
uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java
AuthorizationImpl.newPermission
@Override public IPermission newPermission(String owner, IAuthorizationPrincipal principal) { """ Factory method for an <code>IPermission</code>. @param owner String @param principal IAuthorizationPrincipal @return org.apereo.portal.security.IPermission """ IPermission p = getPermissionStore()...
java
@Override public IPermission newPermission(String owner, IAuthorizationPrincipal principal) { IPermission p = getPermissionStore().newInstance(owner); if (principal != null) { String pString = getPrincipalString(principal); p.setPrincipal(pString); } return p;...
[ "@", "Override", "public", "IPermission", "newPermission", "(", "String", "owner", ",", "IAuthorizationPrincipal", "principal", ")", "{", "IPermission", "p", "=", "getPermissionStore", "(", ")", ".", "newInstance", "(", "owner", ")", ";", "if", "(", "principal",...
Factory method for an <code>IPermission</code>. @param owner String @param principal IAuthorizationPrincipal @return org.apereo.portal.security.IPermission
[ "Factory", "method", "for", "an", "<code", ">", "IPermission<", "/", "code", ">", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java#L899-L907
landawn/AbacusUtil
src/com/landawn/abacus/util/IntList.java
IntList.reduce
public <E extends Exception> int reduce(final int identity, final Try.IntBinaryOperator<E> accumulator) throws E { """ This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } int result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsInt(result, elementData[i]);...
java
public <E extends Exception> int reduce(final int identity, final Try.IntBinaryOperator<E> accumulator) throws E { if (isEmpty()) { return identity; } int result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsInt(result, element...
[ "public", "<", "E", "extends", "Exception", ">", "int", "reduce", "(", "final", "int", "identity", ",", "final", "Try", ".", "IntBinaryOperator", "<", "E", ">", "accumulator", ")", "throws", "E", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "return",...
This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } int result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsInt(result, elementData[i]); } return result; </code> </pre> @param identity @param accumulator @return
[ "This", "is", "equivalent", "to", ":", "<pre", ">", "<code", ">", "if", "(", "isEmpty", "()", ")", "{", "return", "identity", ";", "}" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/IntList.java#L1187-L1199
seedstack/i18n-addon
rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java
TranslationsResourceIT.outdated_scenario
@Test public void outdated_scenario() throws JSONException { """ Checks the outdated scenario. 1) A key is added 2) Add fr translation 3) Update default translation => key become outdated 4) Update en translation => key is still outdated 5) Update fr translation => key is no longer outdated """ ...
java
@Test public void outdated_scenario() throws JSONException { httpPost("keys", jsonKey.toString(), 201); try { // Add two outdated translations sendTranslationUpdate("zztranslation", EN, true); sendTranslationUpdate("translation", FR, true); // Update...
[ "@", "Test", "public", "void", "outdated_scenario", "(", ")", "throws", "JSONException", "{", "httpPost", "(", "\"keys\"", ",", "jsonKey", ".", "toString", "(", ")", ",", "201", ")", ";", "try", "{", "// Add two outdated translations", "sendTranslationUpdate", "...
Checks the outdated scenario. 1) A key is added 2) Add fr translation 3) Update default translation => key become outdated 4) Update en translation => key is still outdated 5) Update fr translation => key is no longer outdated
[ "Checks", "the", "outdated", "scenario", ".", "1", ")", "A", "key", "is", "added", "2", ")", "Add", "fr", "translation", "3", ")", "Update", "default", "translation", "=", ">", "key", "become", "outdated", "4", ")", "Update", "en", "translation", "=", ...
train
https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java#L76-L108
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnInputStream.java
AsnInputStream.readSequenceStreamData
public AsnInputStream readSequenceStreamData(int length) throws AsnException, IOException { """ This method can be invoked after the sequence tag and length has been read. Returns the AsnInputStream that contains the sequence data. The origin stream advances to the begin of the next record @param length The ...
java
public AsnInputStream readSequenceStreamData(int length) throws AsnException, IOException { if (length == Tag.Indefinite_Length) { return this.readSequenceIndefinite(); } else { int startPos = this.pos; this.advance(length); return new AsnInputStream(this, startPos, length); } }
[ "public", "AsnInputStream", "readSequenceStreamData", "(", "int", "length", ")", "throws", "AsnException", ",", "IOException", "{", "if", "(", "length", "==", "Tag", ".", "Indefinite_Length", ")", "{", "return", "this", ".", "readSequenceIndefinite", "(", ")", "...
This method can be invoked after the sequence tag and length has been read. Returns the AsnInputStream that contains the sequence data. The origin stream advances to the begin of the next record @param length The sequence length @return @throws AsnException @throws IOException
[ "This", "method", "can", "be", "invoked", "after", "the", "sequence", "tag", "and", "length", "has", "been", "read", ".", "Returns", "the", "AsnInputStream", "that", "contains", "the", "sequence", "data", ".", "The", "origin", "stream", "advances", "to", "th...
train
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnInputStream.java#L367-L376
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/BaseNeo4jEntityQueries.java
BaseNeo4jEntityQueries.initMultiGetEntitiesQuery
private static String initMultiGetEntitiesQuery(EntityKeyMetadata entityKeyMetadata, boolean includeEmbedded) { """ /* This method will initialize the query string for a multi get. The query is different in the two scenarios: 1) the id is mapped on a single property: MATCH (n:ENTITY:table) WHERE n.id IN {0}...
java
private static String initMultiGetEntitiesQuery(EntityKeyMetadata entityKeyMetadata, boolean includeEmbedded) { StringBuilder queryBuilder = new StringBuilder( "MATCH " ); queryBuilder.append( "(" ); queryBuilder.append( ENTITY_ALIAS ); queryBuilder.append( ":" ); queryBuilder.append( ENTITY ); queryBuilder...
[ "private", "static", "String", "initMultiGetEntitiesQuery", "(", "EntityKeyMetadata", "entityKeyMetadata", ",", "boolean", "includeEmbedded", ")", "{", "StringBuilder", "queryBuilder", "=", "new", "StringBuilder", "(", "\"MATCH \"", ")", ";", "queryBuilder", ".", "appen...
/* This method will initialize the query string for a multi get. The query is different in the two scenarios: 1) the id is mapped on a single property: MATCH (n:ENTITY:table) WHERE n.id IN {0} RETURN n 2) id is mapped on multiple columns: MATCH (n:ENTITY:table) WHERE In this case the query depends on how many id we...
[ "/", "*", "This", "method", "will", "initialize", "the", "query", "string", "for", "a", "multi", "get", ".", "The", "query", "is", "different", "in", "the", "two", "scenarios", ":", "1", ")", "the", "id", "is", "mapped", "on", "a", "single", "property"...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/BaseNeo4jEntityQueries.java#L165-L183
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOC.java
DOC.findNeighbors
protected DBIDs findNeighbors(DBIDRef q, long[] nD, ArrayModifiableDBIDs S, Relation<V> relation) { """ Find the neighbors of point q in the given subspace @param q Query point @param nD Subspace mask @param S Remaining data points @param relation Data relation @return Neighbors """ // Weights for d...
java
protected DBIDs findNeighbors(DBIDRef q, long[] nD, ArrayModifiableDBIDs S, Relation<V> relation) { // Weights for distance (= rectangle query) DistanceQuery<V> dq = relation.getDistanceQuery(new SubspaceMaximumDistanceFunction(nD)); // TODO: add filtering capabilities into query API! // Until then, us...
[ "protected", "DBIDs", "findNeighbors", "(", "DBIDRef", "q", ",", "long", "[", "]", "nD", ",", "ArrayModifiableDBIDs", "S", ",", "Relation", "<", "V", ">", "relation", ")", "{", "// Weights for distance (= rectangle query)", "DistanceQuery", "<", "V", ">", "dq", ...
Find the neighbors of point q in the given subspace @param q Query point @param nD Subspace mask @param S Remaining data points @param relation Data relation @return Neighbors
[ "Find", "the", "neighbors", "of", "point", "q", "in", "the", "given", "subspace" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOC.java#L280-L294
classgraph/classgraph
src/main/java/io/github/classgraph/ReferenceTypeSignature.java
ReferenceTypeSignature.parseReferenceTypeSignature
static ReferenceTypeSignature parseReferenceTypeSignature(final Parser parser, final String definingClassName) throws ParseException { """ Parse a reference type signature. @param parser The parser @param definingClassName The class containing the type descriptor. @return The parsed type referen...
java
static ReferenceTypeSignature parseReferenceTypeSignature(final Parser parser, final String definingClassName) throws ParseException { final ClassRefTypeSignature classTypeSignature = ClassRefTypeSignature.parse(parser, definingClassName); if (classTypeSignature != null) { return...
[ "static", "ReferenceTypeSignature", "parseReferenceTypeSignature", "(", "final", "Parser", "parser", ",", "final", "String", "definingClassName", ")", "throws", "ParseException", "{", "final", "ClassRefTypeSignature", "classTypeSignature", "=", "ClassRefTypeSignature", ".", ...
Parse a reference type signature. @param parser The parser @param definingClassName The class containing the type descriptor. @return The parsed type reference type signature. @throws ParseException If the type signature could not be parsed.
[ "Parse", "a", "reference", "type", "signature", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ReferenceTypeSignature.java#L55-L70
threerings/nenya
core/src/main/java/com/threerings/media/image/ColorPository.java
ColorPository.isLegalStartColor
public boolean isLegalStartColor (int classId, int colorId) { """ Returns true if the specified color is legal for use at character creation time. false is always returned for non-existent colors or classes. """ ColorRecord color = getColorRecord(classId, colorId); return (color == null) ? fal...
java
public boolean isLegalStartColor (int classId, int colorId) { ColorRecord color = getColorRecord(classId, colorId); return (color == null) ? false : color.starter; }
[ "public", "boolean", "isLegalStartColor", "(", "int", "classId", ",", "int", "colorId", ")", "{", "ColorRecord", "color", "=", "getColorRecord", "(", "classId", ",", "colorId", ")", ";", "return", "(", "color", "==", "null", ")", "?", "false", ":", "color"...
Returns true if the specified color is legal for use at character creation time. false is always returned for non-existent colors or classes.
[ "Returns", "true", "if", "the", "specified", "color", "is", "legal", "for", "use", "at", "character", "creation", "time", ".", "false", "is", "always", "returned", "for", "non", "-", "existent", "colors", "or", "classes", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ColorPository.java#L338-L342
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/trace/export/SpanExporterImpl.java
SpanExporterImpl.create
static SpanExporterImpl create(int bufferSize, Duration scheduleDelay) { """ Constructs a {@code SpanExporterImpl} that exports the {@link SpanData} asynchronously. <p>Starts a separate thread that wakes up every {@code scheduleDelay} and exports any available spans data. If the number of buffered SpanData obj...
java
static SpanExporterImpl create(int bufferSize, Duration scheduleDelay) { // TODO(bdrutu): Consider to add a shutdown hook to not avoid dropping data. Worker worker = new Worker(bufferSize, scheduleDelay); return new SpanExporterImpl(worker); }
[ "static", "SpanExporterImpl", "create", "(", "int", "bufferSize", ",", "Duration", "scheduleDelay", ")", "{", "// TODO(bdrutu): Consider to add a shutdown hook to not avoid dropping data.", "Worker", "worker", "=", "new", "Worker", "(", "bufferSize", ",", "scheduleDelay", "...
Constructs a {@code SpanExporterImpl} that exports the {@link SpanData} asynchronously. <p>Starts a separate thread that wakes up every {@code scheduleDelay} and exports any available spans data. If the number of buffered SpanData objects is greater than {@code bufferSize} then the thread wakes up sooner. @param buff...
[ "Constructs", "a", "{", "@code", "SpanExporterImpl", "}", "that", "exports", "the", "{", "@link", "SpanData", "}", "asynchronously", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/trace/export/SpanExporterImpl.java#L52-L56
s1ck/gdl
src/main/java/org/s1ck/gdl/GDLLoader.java
GDLLoader.getGraphCache
Map<String, Graph> getGraphCache(boolean includeUserDefined, boolean includeAutoGenerated) { """ Returns a cache containing a mapping from variables to graphs. @param includeUserDefined include user-defined variables @param includeAutoGenerated include auto-generated variables @return immutable graph cache ...
java
Map<String, Graph> getGraphCache(boolean includeUserDefined, boolean includeAutoGenerated) { return getCache(userGraphCache, autoGraphCache, includeUserDefined, includeAutoGenerated); }
[ "Map", "<", "String", ",", "Graph", ">", "getGraphCache", "(", "boolean", "includeUserDefined", ",", "boolean", "includeAutoGenerated", ")", "{", "return", "getCache", "(", "userGraphCache", ",", "autoGraphCache", ",", "includeUserDefined", ",", "includeAutoGenerated"...
Returns a cache containing a mapping from variables to graphs. @param includeUserDefined include user-defined variables @param includeAutoGenerated include auto-generated variables @return immutable graph cache
[ "Returns", "a", "cache", "containing", "a", "mapping", "from", "variables", "to", "graphs", "." ]
train
https://github.com/s1ck/gdl/blob/c89b0f83526661823ad3392f338dbf7dc3e3f834/src/main/java/org/s1ck/gdl/GDLLoader.java#L216-L218
pravega/pravega
controller/src/main/java/io/pravega/controller/server/AuthResourceRepresentation.java
AuthResourceRepresentation.ofReaderGroupInScope
public static String ofReaderGroupInScope(String scopeName, String readerGroupName) { """ Creates a resource representation for use in authorization of actions pertaining to the specified reader group within the specified scope. @param scopeName the name of the scope @param readerGroupName the name of the rea...
java
public static String ofReaderGroupInScope(String scopeName, String readerGroupName) { Exceptions.checkNotNullOrEmpty(readerGroupName, "readerGroupName"); return String.format("%s/%s", ofReaderGroupsInScope(scopeName), readerGroupName); }
[ "public", "static", "String", "ofReaderGroupInScope", "(", "String", "scopeName", ",", "String", "readerGroupName", ")", "{", "Exceptions", ".", "checkNotNullOrEmpty", "(", "readerGroupName", ",", "\"readerGroupName\"", ")", ";", "return", "String", ".", "format", "...
Creates a resource representation for use in authorization of actions pertaining to the specified reader group within the specified scope. @param scopeName the name of the scope @param readerGroupName the name of the reader group @return a string representing the specified reader group @throws NullPointerException if ...
[ "Creates", "a", "resource", "representation", "for", "use", "in", "authorization", "of", "actions", "pertaining", "to", "the", "specified", "reader", "group", "within", "the", "specified", "scope", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/server/AuthResourceRepresentation.java#L106-L109
samskivert/samskivert
src/main/java/com/samskivert/util/MethodFinder.java
MethodFinder.memberIsMoreSpecific
protected boolean memberIsMoreSpecific (Member first, Member second) { """ @param first a Member. @param second a Member. @return true if the first Member is more specific than the second, false otherwise. Specificity is determined according to the procedure in the Java Language Specification, section 15.12....
java
protected boolean memberIsMoreSpecific (Member first, Member second) { Class<?>[] firstParamTypes = _paramMap.get(first); Class<?>[] secondParamTypes = _paramMap.get(second); return ClassUtil.compatibleClasses(secondParamTypes, firstParamTypes); }
[ "protected", "boolean", "memberIsMoreSpecific", "(", "Member", "first", ",", "Member", "second", ")", "{", "Class", "<", "?", ">", "[", "]", "firstParamTypes", "=", "_paramMap", ".", "get", "(", "first", ")", ";", "Class", "<", "?", ">", "[", "]", "sec...
@param first a Member. @param second a Member. @return true if the first Member is more specific than the second, false otherwise. Specificity is determined according to the procedure in the Java Language Specification, section 15.12.2.
[ "@param", "first", "a", "Member", ".", "@param", "second", "a", "Member", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/MethodFinder.java#L293-L298
jasminb/jsonapi-converter
src/main/java/com/github/jasminb/jsonapi/ConverterConfiguration.java
ConverterConfiguration.getRelationshipMetaField
public Field getRelationshipMetaField(Class<?> clazz, String relationshipName) { """ Returns relationship meta field. @param clazz {@link Class} class holding relationship @param relationshipName {@link String} name of the relationship @return {@link Field} field """ return relationshipMetaFieldMap.get(cl...
java
public Field getRelationshipMetaField(Class<?> clazz, String relationshipName) { return relationshipMetaFieldMap.get(clazz).get(relationshipName); }
[ "public", "Field", "getRelationshipMetaField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "relationshipName", ")", "{", "return", "relationshipMetaFieldMap", ".", "get", "(", "clazz", ")", ".", "get", "(", "relationshipName", ")", ";", "}" ]
Returns relationship meta field. @param clazz {@link Class} class holding relationship @param relationshipName {@link String} name of the relationship @return {@link Field} field
[ "Returns", "relationship", "meta", "field", "." ]
train
https://github.com/jasminb/jsonapi-converter/blob/73b41c3b9274e70e62b3425071ca8afdc7bddaf6/src/main/java/com/github/jasminb/jsonapi/ConverterConfiguration.java#L334-L336
JOML-CI/JOML
src/org/joml/Vector3i.java
Vector3i.distanceSquared
public static long distanceSquared(int x1, int y1, int z1, int x2, int y2, int z2) { """ Return the squared distance between <code>(x1, y1, z1)</code> and <code>(x2, y2, z2)</code>. @param x1 the x component of the first vector @param y1 the y component of the first vector @param z1 the z component of the ...
java
public static long distanceSquared(int x1, int y1, int z1, int x2, int y2, int z2) { int dx = x1 - x2; int dy = y1 - y2; int dz = z1 - z2; return dx * dx + dy * dy + dz * dz; }
[ "public", "static", "long", "distanceSquared", "(", "int", "x1", ",", "int", "y1", ",", "int", "z1", ",", "int", "x2", ",", "int", "y2", ",", "int", "z2", ")", "{", "int", "dx", "=", "x1", "-", "x2", ";", "int", "dy", "=", "y1", "-", "y2", ";...
Return the squared distance between <code>(x1, y1, z1)</code> and <code>(x2, y2, z2)</code>. @param x1 the x component of the first vector @param y1 the y component of the first vector @param z1 the z component of the first vector @param x2 the x component of the second vector @param y2 the y component of the second v...
[ "Return", "the", "squared", "distance", "between", "<code", ">", "(", "x1", "y1", "z1", ")", "<", "/", "code", ">", "and", "<code", ">", "(", "x2", "y2", "z2", ")", "<", "/", "code", ">", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3i.java#L762-L767
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_orderableFilerProfiles_GET
public ArrayList<OvhProfile> serviceName_datacenter_datacenterId_orderableFilerProfiles_GET(String serviceName, Long datacenterId) throws IOException { """ List available filers in a given Private Cloud Datacenter REST: GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles @param s...
java
public ArrayList<OvhProfile> serviceName_datacenter_datacenterId_orderableFilerProfiles_GET(String serviceName, Long datacenterId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles"; StringBuilder sb = path(qPath, serviceName, datacenterId); String...
[ "public", "ArrayList", "<", "OvhProfile", ">", "serviceName_datacenter_datacenterId_orderableFilerProfiles_GET", "(", "String", "serviceName", ",", "Long", "datacenterId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/datacenter/{da...
List available filers in a given Private Cloud Datacenter REST: GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles @param serviceName [required] Domain of the service @param datacenterId [required]
[ "List", "available", "filers", "in", "a", "given", "Private", "Cloud", "Datacenter" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1739-L1744
wealthfront/kawala
kawala-common/src/main/java/com/kaching/platform/common/reflect/ReflectUtils.java
ReflectUtils.getField
public static Object getField(Object obj, String name) { """ Gets a field from an object. @param obj object from which to read the field @param name the field name to read """ try { Class<? extends Object> klass = obj.getClass(); do { try { Field field = klass.getDeclaredFie...
java
public static Object getField(Object obj, String name) { try { Class<? extends Object> klass = obj.getClass(); do { try { Field field = klass.getDeclaredField(name); field.setAccessible(true); return field.get(obj); } catch (NoSuchFieldException e) { ...
[ "public", "static", "Object", "getField", "(", "Object", "obj", ",", "String", "name", ")", "{", "try", "{", "Class", "<", "?", "extends", "Object", ">", "klass", "=", "obj", ".", "getClass", "(", ")", ";", "do", "{", "try", "{", "Field", "field", ...
Gets a field from an object. @param obj object from which to read the field @param name the field name to read
[ "Gets", "a", "field", "from", "an", "object", "." ]
train
https://github.com/wealthfront/kawala/blob/acf24b7a9ef6e2f0fc1e862d44cfa4dcc4da8f6e/kawala-common/src/main/java/com/kaching/platform/common/reflect/ReflectUtils.java#L30-L50
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.contains
public boolean contains(CharSequence name, CharSequence value, boolean ignoreCase) { """ Returns {@code true} if a header with the {@code name} and {@code value} exists, {@code false} otherwise. <p> If {@code ignoreCase} is {@code true} then a case insensitive compare is done on the value. @param name the name ...
java
public boolean contains(CharSequence name, CharSequence value, boolean ignoreCase) { return contains(name.toString(), value.toString(), ignoreCase); }
[ "public", "boolean", "contains", "(", "CharSequence", "name", ",", "CharSequence", "value", ",", "boolean", "ignoreCase", ")", "{", "return", "contains", "(", "name", ".", "toString", "(", ")", ",", "value", ".", "toString", "(", ")", ",", "ignoreCase", ")...
Returns {@code true} if a header with the {@code name} and {@code value} exists, {@code false} otherwise. <p> If {@code ignoreCase} is {@code true} then a case insensitive compare is done on the value. @param name the name of the header to find @param value the value of the header to find @param ignoreCase {@code true}...
[ "Returns", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L1688-L1690
spring-projects/spring-flex
spring-flex-core/src/main/java/org/springframework/flex/core/io/SpringPropertyProxy.java
SpringPropertyProxy.getValue
@Override public Object getValue(Object instance, String propertyName) { """ {@inheritDoc} Delegates to the configured {@link ConversionService} to potentially convert the current value to the actual type of the property. """ PropertyAccessor accessor = PropertyProxyUtils.getPropertyAccessor(thi...
java
@Override public Object getValue(Object instance, String propertyName) { PropertyAccessor accessor = PropertyProxyUtils.getPropertyAccessor(this.conversionService, this.useDirectFieldAccess, instance); Object value = accessor.getPropertyValue(propertyName); if(log.isDebugEnabled()) { ...
[ "@", "Override", "public", "Object", "getValue", "(", "Object", "instance", ",", "String", "propertyName", ")", "{", "PropertyAccessor", "accessor", "=", "PropertyProxyUtils", ".", "getPropertyAccessor", "(", "this", ".", "conversionService", ",", "this", ".", "us...
{@inheritDoc} Delegates to the configured {@link ConversionService} to potentially convert the current value to the actual type of the property.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/spring-projects/spring-flex/blob/85f2bff300d74e2d77d565f97a09d12d18e19adc/spring-flex-core/src/main/java/org/springframework/flex/core/io/SpringPropertyProxy.java#L149-L164
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/ServiceUtils.java
ServiceUtils.getLastByteInPart
public static long getLastByteInPart(AmazonS3 s3, GetObjectRequest getObjectRequest, Integer partNumber) { """ Returns the last byte number in a part of an object. @param s3 The Amazon s3 client. @param getObjectRequest The request to check. @param partNumber The part in which we need the last byte number....
java
public static long getLastByteInPart(AmazonS3 s3, GetObjectRequest getObjectRequest, Integer partNumber) { ValidationUtils.assertNotNull(s3, "S3 client"); ValidationUtils.assertNotNull(getObjectRequest, "GetObjectRequest"); ValidationUtils.assertNotNull(partNumber, "partNumber"); Object...
[ "public", "static", "long", "getLastByteInPart", "(", "AmazonS3", "s3", ",", "GetObjectRequest", "getObjectRequest", ",", "Integer", "partNumber", ")", "{", "ValidationUtils", ".", "assertNotNull", "(", "s3", ",", "\"S3 client\"", ")", ";", "ValidationUtils", ".", ...
Returns the last byte number in a part of an object. @param s3 The Amazon s3 client. @param getObjectRequest The request to check. @param partNumber The part in which we need the last byte number. @return The last byte number in the part.
[ "Returns", "the", "last", "byte", "number", "in", "a", "part", "of", "an", "object", "." ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/ServiceUtils.java#L555-L564
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doDeleteForProxy
protected ClientResponse doDeleteForProxy(String path, MultivaluedMap<String, String> parameterMap, MultivaluedMap<String, String> headers) throws ClientException { """ Deletes a resource from a proxied server. @param path the path to the resource. Cannot be <code>null</code>. @param parameterMap query paramet...
java
protected ClientResponse doDeleteForProxy(String path, MultivaluedMap<String, String> parameterMap, MultivaluedMap<String, String> headers) throws ClientException { this.readLock.lock(); try { WebResource.Builder requestBuilder = getResourceWrapper().rewritten(path, HttpMethod.DELETE, parame...
[ "protected", "ClientResponse", "doDeleteForProxy", "(", "String", "path", ",", "MultivaluedMap", "<", "String", ",", "String", ">", "parameterMap", ",", "MultivaluedMap", "<", "String", ",", "String", ">", "headers", ")", "throws", "ClientException", "{", "this", ...
Deletes a resource from a proxied server. @param path the path to the resource. Cannot be <code>null</code>. @param parameterMap query parameters. May be <code>null</code>. @param headers any request headers to add. @return ClientResponse the proxied server's response information. @throws ClientException if the prox...
[ "Deletes", "a", "resource", "from", "a", "proxied", "server", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L1004-L1015
scireum/parsii
src/main/java/parsii/tokenizer/Tokenizer.java
Tokenizer.canConsumeThisString
protected boolean canConsumeThisString(String string, boolean consume) { """ Checks if the next characters, starting from the current, match the given string. @param string the string to check @param consume determines if the matched string should be consumed immediately @return <tt>true</tt> if the next cha...
java
protected boolean canConsumeThisString(String string, boolean consume) { if (string == null) { return false; } for (int i = 0; i < string.length(); i++) { if (!input.next(i).is(string.charAt(i))) { return false; } } if (consume)...
[ "protected", "boolean", "canConsumeThisString", "(", "String", "string", ",", "boolean", "consume", ")", "{", "if", "(", "string", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "string", ".", "l...
Checks if the next characters, starting from the current, match the given string. @param string the string to check @param consume determines if the matched string should be consumed immediately @return <tt>true</tt> if the next characters of the input match the given string, <tt>false</tt> otherwise
[ "Checks", "if", "the", "next", "characters", "starting", "from", "the", "current", "match", "the", "given", "string", "." ]
train
https://github.com/scireum/parsii/blob/fbf686155b1147b9e07ae21dcd02820b15c79a8c/src/main/java/parsii/tokenizer/Tokenizer.java#L242-L255
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java
AVIMConversation.getMemberInfo
public void getMemberInfo(final String memberId, final AVIMConversationMemberQueryCallback callback) { """ 获取对话内指定成员的角色信息 @param memberId 成员的 clientid @param callback 结果回调函数 """ QueryConditions conditions = new QueryConditions(); conditions.addWhereItem("cid", QueryOperation.EQUAL_OP, this.conversa...
java
public void getMemberInfo(final String memberId, final AVIMConversationMemberQueryCallback callback) { QueryConditions conditions = new QueryConditions(); conditions.addWhereItem("cid", QueryOperation.EQUAL_OP, this.conversationId); conditions.addWhereItem("peerId", QueryOperation.EQUAL_OP, memberId); q...
[ "public", "void", "getMemberInfo", "(", "final", "String", "memberId", ",", "final", "AVIMConversationMemberQueryCallback", "callback", ")", "{", "QueryConditions", "conditions", "=", "new", "QueryConditions", "(", ")", ";", "conditions", ".", "addWhereItem", "(", "...
获取对话内指定成员的角色信息 @param memberId 成员的 clientid @param callback 结果回调函数
[ "获取对话内指定成员的角色信息" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java#L1142-L1147
lucee/Lucee
core/src/main/java/lucee/runtime/cache/CacheUtil.java
CacheUtil.getInstance
public static Cache getInstance(CacheConnection cc, Config config) throws IOException { """ in difference to the getInstance method of the CacheConnection this method produces a wrapper Cache (if necessary) that creates Entry objects to make sure the Cache has meta data. @param cc @param config @return @thr...
java
public static Cache getInstance(CacheConnection cc, Config config) throws IOException { return cc.getInstance(config); }
[ "public", "static", "Cache", "getInstance", "(", "CacheConnection", "cc", ",", "Config", "config", ")", "throws", "IOException", "{", "return", "cc", ".", "getInstance", "(", "config", ")", ";", "}" ]
in difference to the getInstance method of the CacheConnection this method produces a wrapper Cache (if necessary) that creates Entry objects to make sure the Cache has meta data. @param cc @param config @return @throws IOException
[ "in", "difference", "to", "the", "getInstance", "method", "of", "the", "CacheConnection", "this", "method", "produces", "a", "wrapper", "Cache", "(", "if", "necessary", ")", "that", "creates", "Entry", "objects", "to", "make", "sure", "the", "Cache", "has", ...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/cache/CacheUtil.java#L250-L252
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java
Notification.setActiveForTriggerAndMetric
public void setActiveForTriggerAndMetric(Trigger trigger, Metric metric, boolean active) { """ When a notification is sent out when a metric violates the trigger threshold, set this notification active for that trigger,metric combination @param trigger The Trigger that caused this notification @param metric Th...
java
public void setActiveForTriggerAndMetric(Trigger trigger, Metric metric, boolean active) { String key = _hashTriggerAndMetric(trigger, metric); this.activeStatusByTriggerAndMetric.put(key, active); }
[ "public", "void", "setActiveForTriggerAndMetric", "(", "Trigger", "trigger", ",", "Metric", "metric", ",", "boolean", "active", ")", "{", "String", "key", "=", "_hashTriggerAndMetric", "(", "trigger", ",", "metric", ")", ";", "this", ".", "activeStatusByTriggerAnd...
When a notification is sent out when a metric violates the trigger threshold, set this notification active for that trigger,metric combination @param trigger The Trigger that caused this notification @param metric The metric that caused this notification @param active Whether to set the notification to active
[ "When", "a", "notification", "is", "sent", "out", "when", "a", "metric", "violates", "the", "trigger", "threshold", "set", "this", "notification", "active", "for", "that", "trigger", "metric", "combination" ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java#L612-L615
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imageutils/BitmapUtil.java
BitmapUtil.getSizeInByteForBitmap
public static int getSizeInByteForBitmap(int width, int height, Bitmap.Config bitmapConfig) { """ Returns the size in byte of an image with specific size and {@link android.graphics.Bitmap.Config} @param width the width of the image @param height the height of the image @param bitmapConfig the {@link android.g...
java
public static int getSizeInByteForBitmap(int width, int height, Bitmap.Config bitmapConfig) { return width * height * getPixelSizeForBitmapConfig(bitmapConfig); }
[ "public", "static", "int", "getSizeInByteForBitmap", "(", "int", "width", ",", "int", "height", ",", "Bitmap", ".", "Config", "bitmapConfig", ")", "{", "return", "width", "*", "height", "*", "getPixelSizeForBitmapConfig", "(", "bitmapConfig", ")", ";", "}" ]
Returns the size in byte of an image with specific size and {@link android.graphics.Bitmap.Config} @param width the width of the image @param height the height of the image @param bitmapConfig the {@link android.graphics.Bitmap.Config} for which the size in byte will be returned @return
[ "Returns", "the", "size", "in", "byte", "of", "an", "image", "with", "specific", "size", "and", "{" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageutils/BitmapUtil.java#L189-L191
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java
DefaultErrorWebExceptionHandler.isIncludeStackTrace
protected boolean isIncludeStackTrace(ServerRequest request, MediaType produces) { """ Determine if the stacktrace attribute should be included. @param request the source request @param produces the media type produced (or {@code MediaType.ALL}) @return if the stacktrace attribute should be included """ E...
java
protected boolean isIncludeStackTrace(ServerRequest request, MediaType produces) { ErrorProperties.IncludeStacktrace include = this.errorProperties .getIncludeStacktrace(); if (include == ErrorProperties.IncludeStacktrace.ALWAYS) { return true; } if (include == ErrorProperties.IncludeStacktrace.ON_TRACE_...
[ "protected", "boolean", "isIncludeStackTrace", "(", "ServerRequest", "request", ",", "MediaType", "produces", ")", "{", "ErrorProperties", ".", "IncludeStacktrace", "include", "=", "this", ".", "errorProperties", ".", "getIncludeStacktrace", "(", ")", ";", "if", "("...
Determine if the stacktrace attribute should be included. @param request the source request @param produces the media type produced (or {@code MediaType.ALL}) @return if the stacktrace attribute should be included
[ "Determine", "if", "the", "stacktrace", "attribute", "should", "be", "included", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java#L148-L158
roboconf/roboconf-platform
core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java
PluginFile.findActions
SortedSet<Action> findActions( String actionName, Properties properties ) { """ Finds the actions to execute for a given step. @return a non-null list of actions (sorted in the right execution order) """ Pattern pattern = Pattern.compile( actionName + "\\.(\\d)+\\.(.*)", Pattern.CASE_INSENSITIVE ); Sorte...
java
SortedSet<Action> findActions( String actionName, Properties properties ) { Pattern pattern = Pattern.compile( actionName + "\\.(\\d)+\\.(.*)", Pattern.CASE_INSENSITIVE ); SortedSet<Action> result = new TreeSet<Action>( new ActionComparator()); for( Map.Entry<Object,Object> entry : properties.entrySet()) { St...
[ "SortedSet", "<", "Action", ">", "findActions", "(", "String", "actionName", ",", "Properties", "properties", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "actionName", "+", "\"\\\\.(\\\\d)+\\\\.(.*)\"", ",", "Pattern", ".", "CASE_INSENSITI...
Finds the actions to execute for a given step. @return a non-null list of actions (sorted in the right execution order)
[ "Finds", "the", "actions", "to", "execute", "for", "a", "given", "step", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java#L166-L183
pravega/pravega
segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/admin/commands/BookKeeperCommand.java
BookKeeperCommand.outputLogSummary
protected void outputLogSummary(int logId, ReadOnlyLogMetadata m) { """ Outputs a summary for the given Log. @param logId The Log Id. @param m The Log Metadata for the given Log Id. """ if (m == null) { output("Log %d: No metadata.", logId); } else { output("Log ...
java
protected void outputLogSummary(int logId, ReadOnlyLogMetadata m) { if (m == null) { output("Log %d: No metadata.", logId); } else { output("Log %d: Epoch=%d, Version=%d, Enabled=%s, Ledgers=%d, Truncation={%s}", logId, m.getEpoch(), m.getUpdateVersion(), m.is...
[ "protected", "void", "outputLogSummary", "(", "int", "logId", ",", "ReadOnlyLogMetadata", "m", ")", "{", "if", "(", "m", "==", "null", ")", "{", "output", "(", "\"Log %d: No metadata.\"", ",", "logId", ")", ";", "}", "else", "{", "output", "(", "\"Log %d: ...
Outputs a summary for the given Log. @param logId The Log Id. @param m The Log Metadata for the given Log Id.
[ "Outputs", "a", "summary", "for", "the", "given", "Log", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/admin/commands/BookKeeperCommand.java#L42-L49
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.startUploadFile
public Uploader startUploadFile(String targetPath, DbxWriteMode writeMode, long numBytes) throws DbxException { """ Start an API request to upload a file to Dropbox. Returns a {@link DbxClientV1.Uploader} object that lets you actually send the file contents via {@link DbxClientV1.Uploader#getBody()}. Wh...
java
public Uploader startUploadFile(String targetPath, DbxWriteMode writeMode, long numBytes) throws DbxException { if (numBytes < 0) { if (numBytes != -1) { throw new IllegalArgumentException("numBytes must be -1 or greater; given " + numBytes); } // ...
[ "public", "Uploader", "startUploadFile", "(", "String", "targetPath", ",", "DbxWriteMode", "writeMode", ",", "long", "numBytes", ")", "throws", "DbxException", "{", "if", "(", "numBytes", "<", "0", ")", "{", "if", "(", "numBytes", "!=", "-", "1", ")", "{",...
Start an API request to upload a file to Dropbox. Returns a {@link DbxClientV1.Uploader} object that lets you actually send the file contents via {@link DbxClientV1.Uploader#getBody()}. When you're done copying the file body, call {@link DbxClientV1.Uploader#finish}. <p> You need to close the {@link Uploader} when y...
[ "Start", "an", "API", "request", "to", "upload", "a", "file", "to", "Dropbox", ".", "Returns", "a", "{", "@link", "DbxClientV1", ".", "Uploader", "}", "object", "that", "lets", "you", "actually", "send", "the", "file", "contents", "via", "{", "@link", "D...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L692-L710