repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java
ConversionManager.convertGenericClazz
@SuppressWarnings("unchecked") private <T> ConversionStatus convertGenericClazz(String rawString, Class<T> type, TypeVariable<?> typeVariable) { ConversionStatus status = new ConversionStatus(); AnnotatedType[] bounds = typeVariable.getAnnotatedBounds(); for (AnnotatedType bound : bounds) { ...
java
@SuppressWarnings("unchecked") private <T> ConversionStatus convertGenericClazz(String rawString, Class<T> type, TypeVariable<?> typeVariable) { ConversionStatus status = new ConversionStatus(); AnnotatedType[] bounds = typeVariable.getAnnotatedBounds(); for (AnnotatedType bound : bounds) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "ConversionStatus", "convertGenericClazz", "(", "String", "rawString", ",", "Class", "<", "T", ">", "type", ",", "TypeVariable", "<", "?", ">", "typeVariable", ")", "{", "ConversionS...
Front end to (T)convert(rawString, typeVariable) if isAssignableFrom compatible Converter present @param rawString @param type @param typeVariable @return ConversionStatus<T> whether a converter is found and the converted value
[ "Front", "end", "to", "(", "T", ")", "convert", "(", "rawString", "typeVariable", ")", "if", "isAssignableFrom", "compatible", "Converter", "present" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java#L244-L261
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.writeMagic
private final void writeMagic() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { try { raf.seek(0); raf.write(MAGIC); } catch (SecurityException ex) { throw new FileSecurityEx...
java
private final void writeMagic() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { try { raf.seek(0); raf.write(MAGIC); } catch (SecurityException ex) { throw new FileSecurityEx...
[ "private", "final", "void", "writeMagic", "(", ")", "throws", "LockFile", ".", "FileSecurityException", ",", "LockFile", ".", "UnexpectedEndOfFileException", ",", "LockFile", ".", "UnexpectedFileIOException", "{", "try", "{", "raf", ".", "seek", "(", "0", ")", "...
Writes the {@link #MAGIC} value to this object's lock file that distiguishes it as an HSQLDB lock file. <p> @throws FileSecurityException possibly never (seek and write are native methods whose JavaDoc entries do not actually specify throwing <tt>SecurityException</tt>). However, it is conceivable that these native m...
[ "Writes", "the", "{", "@link", "#MAGIC", "}", "value", "to", "this", "object", "s", "lock", "file", "that", "distiguishes", "it", "as", "an", "HSQLDB", "lock", "file", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1221-L1236
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java
DiskClient.insertDisk
@BetaApi public final Operation insertDisk(ProjectZoneName zone, Disk diskResource) { InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder() .setZone(zone == null ? null : zone.toString()) .setDiskResource(diskResource) .build(); return insertDisk(reque...
java
@BetaApi public final Operation insertDisk(ProjectZoneName zone, Disk diskResource) { InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder() .setZone(zone == null ? null : zone.toString()) .setDiskResource(diskResource) .build(); return insertDisk(reque...
[ "@", "BetaApi", "public", "final", "Operation", "insertDisk", "(", "ProjectZoneName", "zone", ",", "Disk", "diskResource", ")", "{", "InsertDiskHttpRequest", "request", "=", "InsertDiskHttpRequest", ".", "newBuilder", "(", ")", ".", "setZone", "(", "zone", "==", ...
Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. <p>Sample code...
[ "Creates", "a", "persistent", "disk", "in", "the", "specified", "project", "using", "the", "data", "in", "the", "request", ".", "You", "can", "create", "a", "disk", "with", "a", "sourceImage", "a", "sourceSnapshot", "or", "create", "an", "empty", "500", "G...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java#L741-L750
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemsByExternalId
public ItemsResponse getItemsByExternalId(int appId, String externalId) { return getItems(appId, null, null, null, null, new FilterByValue<String>(new ExternalIdFilterBy(), externalId)); }
java
public ItemsResponse getItemsByExternalId(int appId, String externalId) { return getItems(appId, null, null, null, null, new FilterByValue<String>(new ExternalIdFilterBy(), externalId)); }
[ "public", "ItemsResponse", "getItemsByExternalId", "(", "int", "appId", ",", "String", "externalId", ")", "{", "return", "getItems", "(", "appId", ",", "null", ",", "null", ",", "null", ",", "null", ",", "new", "FilterByValue", "<", "String", ">", "(", "ne...
Utility method to get items matching an external id @param appId The id of the app @param externalId The external id @return The items matching the app and external id
[ "Utility", "method", "to", "get", "items", "matching", "an", "external", "id" ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L327-L330
yanzhenjie/AndPermission
support/src/main/java/com/yanzhenjie/permission/AndPermission.java
AndPermission.getFileUri
public static Uri getFileUri(Context context, File file) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return FileProvider.getUriForFile(context, context.getPackageName() + ".file.path.share", file); } return Uri.fromFile(file); }
java
public static Uri getFileUri(Context context, File file) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return FileProvider.getUriForFile(context, context.getPackageName() + ".file.path.share", file); } return Uri.fromFile(file); }
[ "public", "static", "Uri", "getFileUri", "(", "Context", "context", ",", "File", "file", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "N", ")", "{", "return", "FileProvider", ".", "getUriForFile", ...
Get compatible Android 7.0 and lower versions of Uri. @param context {@link Context}. @param file apk file. @return uri.
[ "Get", "compatible", "Android", "7", ".", "0", "and", "lower", "versions", "of", "Uri", "." ]
train
https://github.com/yanzhenjie/AndPermission/blob/bbfaaecdb8ecf0f2aa270d80c0b88d022dddda7c/support/src/main/java/com/yanzhenjie/permission/AndPermission.java#L323-L328
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.containsIgnoreCase
public static boolean containsIgnoreCase (@Nullable final String sText, final char cSearch, @Nonnull final Locale aSortLocale) { return getIndexOfIgnoreCase (sText, cSearch, aSortLocale) != STRING_NOT_FOUND; }
java
public static boolean containsIgnoreCase (@Nullable final String sText, final char cSearch, @Nonnull final Locale aSortLocale) { return getIndexOfIgnoreCase (sText, cSearch, aSortLocale) != STRING_NOT_FOUND; }
[ "public", "static", "boolean", "containsIgnoreCase", "(", "@", "Nullable", "final", "String", "sText", ",", "final", "char", "cSearch", ",", "@", "Nonnull", "final", "Locale", "aSortLocale", ")", "{", "return", "getIndexOfIgnoreCase", "(", "sText", ",", "cSearch...
Check if cSearch is contained within sText ignoring case. @param sText The text to search in. May be <code>null</code>. @param cSearch The char to search for. May be <code>null</code>. @param aSortLocale The locale to be used for case unifying. @return <code>true</code> if sSearch is contained in sText, <code>false</c...
[ "Check", "if", "cSearch", "is", "contained", "within", "sText", "ignoring", "case", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3082-L3087
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java
ST_CollectionExtract.getArealGeometry
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Polygon){ polygones.add((Polygon) subGeom); } ...
java
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Polygon){ polygones.add((Polygon) subGeom); } ...
[ "private", "static", "void", "getArealGeometry", "(", "ArrayList", "<", "Polygon", ">", "polygones", ",", "Geometry", "geometry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ...
Filter polygon from a geometry @param polygones @param geometry
[ "Filter", "polygon", "from", "a", "geometry" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L140-L150
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java
RequestUtil.addFileItem
public static void addFileItem(final Map<String, FileItem[]> files, final String name, final FileItem item) { if (files.containsKey(name)) { // This field contains multiple values, append the new value to the existing values. FileItem[] oldValues = files.get(name); FileItem[] newValues = new FileItem[oldValu...
java
public static void addFileItem(final Map<String, FileItem[]> files, final String name, final FileItem item) { if (files.containsKey(name)) { // This field contains multiple values, append the new value to the existing values. FileItem[] oldValues = files.get(name); FileItem[] newValues = new FileItem[oldValu...
[ "public", "static", "void", "addFileItem", "(", "final", "Map", "<", "String", ",", "FileItem", "[", "]", ">", "files", ",", "final", "String", "name", ",", "final", "FileItem", "item", ")", "{", "if", "(", "files", ".", "containsKey", "(", "name", ")"...
Add the file data to the files collection. If a file already exists with the given name then the value for this name will be an array of all registered files. @param files the map in which to store file data. @param name the name of the file, i.e. the key to store the file against. @param item the file data.
[ "Add", "the", "file", "data", "to", "the", "files", "collection", ".", "If", "a", "file", "already", "exists", "with", "the", "given", "name", "then", "the", "value", "for", "this", "name", "will", "be", "an", "array", "of", "all", "registered", "files",...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java#L28-L39
morfologik/morfologik-stemming
morfologik-stemming/src/main/java/morfologik/stemming/Dictionary.java
Dictionary.read
public static Dictionary read(Path location) throws IOException { final Path metadata = DictionaryMetadata.getExpectedMetadataLocation(location); try (InputStream fsaStream = Files.newInputStream(location); InputStream metadataStream = Files.newInputStream(metadata)) { return read(fsaStream...
java
public static Dictionary read(Path location) throws IOException { final Path metadata = DictionaryMetadata.getExpectedMetadataLocation(location); try (InputStream fsaStream = Files.newInputStream(location); InputStream metadataStream = Files.newInputStream(metadata)) { return read(fsaStream...
[ "public", "static", "Dictionary", "read", "(", "Path", "location", ")", "throws", "IOException", "{", "final", "Path", "metadata", "=", "DictionaryMetadata", ".", "getExpectedMetadataLocation", "(", "location", ")", ";", "try", "(", "InputStream", "fsaStream", "="...
Attempts to load a dictionary using the path to the FSA file and the expected metadata extension. @param location The location of the dictionary file (<code>*.dict</code>). @return An instantiated dictionary. @throws IOException if an I/O error occurs.
[ "Attempts", "to", "load", "a", "dictionary", "using", "the", "path", "to", "the", "FSA", "file", "and", "the", "expected", "metadata", "extension", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-stemming/src/main/java/morfologik/stemming/Dictionary.java#L60-L67
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/Ban.java
Ban.newBan
public static List<Ban> newBan(Collection<VM> vms, Collection<Node> nodes) { return vms.stream().map(v -> new Ban(v, nodes)).collect(Collectors.toList()); }
java
public static List<Ban> newBan(Collection<VM> vms, Collection<Node> nodes) { return vms.stream().map(v -> new Ban(v, nodes)).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "Ban", ">", "newBan", "(", "Collection", "<", "VM", ">", "vms", ",", "Collection", "<", "Node", ">", "nodes", ")", "{", "return", "vms", ".", "stream", "(", ")", ".", "map", "(", "v", "->", "new", "Ban", "(", "v",...
Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param nodes the hosts to disallow @return the associated list of constraints
[ "Instantiate", "discrete", "constraints", "for", "a", "collection", "of", "VMs", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/Ban.java#L103-L105
mapsforge/mapsforge
mapsforge-map-android/src/main/java/org/mapsforge/map/android/input/MapZoomControls.java
MapZoomControls.setZoomInFirst
public void setZoomInFirst(boolean zoomInFirst) { this.removeAllViews(); LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); if (zoomInFirst) { this.addView(buttonZoomIn, layoutParams); this.addView(buttonZoomOut, layoutPara...
java
public void setZoomInFirst(boolean zoomInFirst) { this.removeAllViews(); LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); if (zoomInFirst) { this.addView(buttonZoomIn, layoutParams); this.addView(buttonZoomOut, layoutPara...
[ "public", "void", "setZoomInFirst", "(", "boolean", "zoomInFirst", ")", "{", "this", ".", "removeAllViews", "(", ")", ";", "LayoutParams", "layoutParams", "=", "new", "LayoutParams", "(", "LayoutParams", ".", "WRAP_CONTENT", ",", "LayoutParams", ".", "WRAP_CONTENT...
For horizontal orientation, "zoom in first" means the zoom in button will appear on top of the zoom out button.<br/> For vertical orientation, "zoom in first" means the zoom in button will appear to the left of the zoom out button. @param zoomInFirst zoom in button will be first in layout.
[ "For", "horizontal", "orientation", "zoom", "in", "first", "means", "the", "zoom", "in", "button", "will", "appear", "on", "top", "of", "the", "zoom", "out", "button", ".", "<br", "/", ">", "For", "vertical", "orientation", "zoom", "in", "first", "means", ...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-android/src/main/java/org/mapsforge/map/android/input/MapZoomControls.java#L317-L327
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java
InvocationHandlerAdapter.toField
public static InvocationHandlerAdapter toField(String name, FieldLocator.Factory fieldLocatorFactory) { return new ForField(name, CACHED, UNPRIVILEGED, Assigner.DEFAULT, fieldLocatorFactory); }
java
public static InvocationHandlerAdapter toField(String name, FieldLocator.Factory fieldLocatorFactory) { return new ForField(name, CACHED, UNPRIVILEGED, Assigner.DEFAULT, fieldLocatorFactory); }
[ "public", "static", "InvocationHandlerAdapter", "toField", "(", "String", "name", ",", "FieldLocator", ".", "Factory", "fieldLocatorFactory", ")", "{", "return", "new", "ForField", "(", "name", ",", "CACHED", ",", "UNPRIVILEGED", ",", "Assigner", ".", "DEFAULT", ...
Creates an implementation for any {@link java.lang.reflect.InvocationHandler} that delegates all method interceptions to a field with the given name. This field has to be of a subtype of invocation handler and needs to be set before any invocations are intercepted. Otherwise, a {@link java.lang.NullPointerException} wi...
[ "Creates", "an", "implementation", "for", "any", "{", "@link", "java", ".", "lang", ".", "reflect", ".", "InvocationHandler", "}", "that", "delegates", "all", "method", "interceptions", "to", "a", "field", "with", "the", "given", "name", ".", "This", "field"...
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java#L161-L163
RuedigerMoeller/kontraktor
src/main/java/org/nustaq/kontraktor/remoting/base/RemoteRefPolling.java
RemoteRefPolling.scheduleSendLoop
public IPromise scheduleSendLoop(ConnectionRegistry reg) { Promise promise = new Promise(); sendJobs.add(new ScheduleEntry(reg, promise)); synchronized (this) { if ( ! loopStarted ) { loopStarted = true; Actor.current().execute(this); } ...
java
public IPromise scheduleSendLoop(ConnectionRegistry reg) { Promise promise = new Promise(); sendJobs.add(new ScheduleEntry(reg, promise)); synchronized (this) { if ( ! loopStarted ) { loopStarted = true; Actor.current().execute(this); } ...
[ "public", "IPromise", "scheduleSendLoop", "(", "ConnectionRegistry", "reg", ")", "{", "Promise", "promise", "=", "new", "Promise", "(", ")", ";", "sendJobs", ".", "add", "(", "new", "ScheduleEntry", "(", "reg", ",", "promise", ")", ")", ";", "synchronized", ...
return a future which is completed upon connection close @param reg @return future completed upon termination of scheduling (disconnect)
[ "return", "a", "future", "which", "is", "completed", "upon", "connection", "close" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/src/main/java/org/nustaq/kontraktor/remoting/base/RemoteRefPolling.java#L66-L76
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/acknowledge/RangedAcknowledger.java
RangedAcknowledger.action
@Override public void action(String queueUrl, List<String> receiptHandles) throws JMSException { if (receiptHandles == null || receiptHandles.isEmpty()) { return; } List<DeleteMessageBatchRequestEntry> deleteMessageBatchRequestEntries = new ArrayList<DeleteMessageBatchRequestEnt...
java
@Override public void action(String queueUrl, List<String> receiptHandles) throws JMSException { if (receiptHandles == null || receiptHandles.isEmpty()) { return; } List<DeleteMessageBatchRequestEntry> deleteMessageBatchRequestEntries = new ArrayList<DeleteMessageBatchRequestEnt...
[ "@", "Override", "public", "void", "action", "(", "String", "queueUrl", ",", "List", "<", "String", ">", "receiptHandles", ")", "throws", "JMSException", "{", "if", "(", "receiptHandles", "==", "null", "||", "receiptHandles", ".", "isEmpty", "(", ")", ")", ...
Acknowledges up to 10 messages via calling <code>deleteMessageBatch</code>.
[ "Acknowledges", "up", "to", "10", "messages", "via", "calling", "<code", ">", "deleteMessageBatch<", "/", "code", ">", "." ]
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/acknowledge/RangedAcknowledger.java#L131-L157
Alluxio/alluxio
core/common/src/main/java/alluxio/util/ThreadFactoryUtils.java
ThreadFactoryUtils.build
public static ThreadFactory build(final String nameFormat, boolean isDaemon) { return new ThreadFactoryBuilder().setDaemon(isDaemon).setNameFormat(nameFormat).build(); }
java
public static ThreadFactory build(final String nameFormat, boolean isDaemon) { return new ThreadFactoryBuilder().setDaemon(isDaemon).setNameFormat(nameFormat).build(); }
[ "public", "static", "ThreadFactory", "build", "(", "final", "String", "nameFormat", ",", "boolean", "isDaemon", ")", "{", "return", "new", "ThreadFactoryBuilder", "(", ")", ".", "setDaemon", "(", "isDaemon", ")", ".", "setNameFormat", "(", "nameFormat", ")", "...
Creates a {@link java.util.concurrent.ThreadFactory} that spawns off threads. @param nameFormat name pattern for each thread. should contain '%d' to distinguish between threads. @param isDaemon if true, the {@link java.util.concurrent.ThreadFactory} will create daemon threads. @return the created factory
[ "Creates", "a", "{", "@link", "java", ".", "util", ".", "concurrent", ".", "ThreadFactory", "}", "that", "spawns", "off", "threads", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/ThreadFactoryUtils.java#L36-L38
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java
ProductExtraUrl.getExtraUrl
public static MozuUrl getExtraUrl(String attributeFQN, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatt...
java
public static MozuUrl getExtraUrl(String attributeFQN, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatt...
[ "public", "static", "MozuUrl", "getExtraUrl", "(", "String", "attributeFQN", ",", "String", "productCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/products/{productCode}/Extras/{...
Get Resource Url for GetExtra @param attributeFQN Fully qualified name for an attribute. @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of d...
[ "Get", "Resource", "Url", "for", "GetExtra" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java#L71-L78
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_publicFolder_path_GET
public OvhPublicFolder organizationName_service_exchangeService_publicFolder_path_GET(String organizationName, String exchangeService, String path) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}"; StringBuilder sb = path(qPath, organizationName,...
java
public OvhPublicFolder organizationName_service_exchangeService_publicFolder_path_GET(String organizationName, String exchangeService, String path) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}"; StringBuilder sb = path(qPath, organizationName,...
[ "public", "OvhPublicFolder", "organizationName_service_exchangeService_publicFolder_path_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "path", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organization...
Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path} @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service @param path [required] Path for public fo...
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L166-L171
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java
FormatUtil.format
public static String format(double[][] m, int w, int d, String pre, String pos, String csep) { DecimalFormat format = new DecimalFormat(); format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US)); format.setMinimumIntegerDigits(1); format.setMaximumFractionDigits(d); format.setMinimumFrac...
java
public static String format(double[][] m, int w, int d, String pre, String pos, String csep) { DecimalFormat format = new DecimalFormat(); format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US)); format.setMinimumIntegerDigits(1); format.setMaximumFractionDigits(d); format.setMinimumFrac...
[ "public", "static", "String", "format", "(", "double", "[", "]", "[", "]", "m", ",", "int", "w", ",", "int", "d", ",", "String", "pre", ",", "String", "pos", ",", "String", "csep", ")", "{", "DecimalFormat", "format", "=", "new", "DecimalFormat", "("...
Returns a string representation of this matrix. @param w column width @param d number of digits after the decimal @param pre Row prefix (e.g. " [") @param pos Row postfix (e.g. "]\n") @param csep Column separator (e.g. ", ") @return a string representation of this matrix
[ "Returns", "a", "string", "representation", "of", "this", "matrix", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L646-L668
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/MetadataManager.java
MetadataManager.readDescriptorRepository
public DescriptorRepository readDescriptorRepository(InputStream inst) { try { RepositoryPersistor persistor = new RepositoryPersistor(); return persistor.readDescriptorRepository(inst); } catch (Exception e) { throw new MetadataEx...
java
public DescriptorRepository readDescriptorRepository(InputStream inst) { try { RepositoryPersistor persistor = new RepositoryPersistor(); return persistor.readDescriptorRepository(inst); } catch (Exception e) { throw new MetadataEx...
[ "public", "DescriptorRepository", "readDescriptorRepository", "(", "InputStream", "inst", ")", "{", "try", "{", "RepositoryPersistor", "persistor", "=", "new", "RepositoryPersistor", "(", ")", ";", "return", "persistor", ".", "readDescriptorRepository", "(", "inst", "...
Read ClassDescriptors from the given InputStream. @see #mergeDescriptorRepository
[ "Read", "ClassDescriptors", "from", "the", "given", "InputStream", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/MetadataManager.java#L351-L362
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.firePeerConnected
protected void firePeerConnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServic...
java
protected void firePeerConnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServic...
[ "protected", "void", "firePeerConnected", "(", "URI", "peerURI", ",", "SpaceID", "space", ")", "{", "final", "NetworkServiceListener", "[", "]", "ilisteners", ";", "synchronized", "(", "this", ".", "listeners", ")", "{", "ilisteners", "=", "new", "NetworkService...
Notifies that a peer space was connected. @param peerURI - the URI of the peer that was connected to. @param space - the identifier of the connected space.
[ "Notifies", "that", "a", "peer", "space", "was", "connected", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L185-L194
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/copy/CopyManager.java
CopyManager.copyIn
public long copyIn(final String sql, InputStream from) throws SQLException, IOException { return copyIn(sql, from, DEFAULT_BUFFER_SIZE); }
java
public long copyIn(final String sql, InputStream from) throws SQLException, IOException { return copyIn(sql, from, DEFAULT_BUFFER_SIZE); }
[ "public", "long", "copyIn", "(", "final", "String", "sql", ",", "InputStream", "from", ")", "throws", "SQLException", ",", "IOException", "{", "return", "copyIn", "(", "sql", ",", "from", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "}" ]
Use COPY FROM STDIN for very fast copying from an InputStream into a database table. @param sql COPY FROM STDIN statement @param from a CSV file or such @return number of rows updated for server 8.2 or newer; -1 for older @throws SQLException on database usage issues @throws IOException upon input stream or database c...
[ "Use", "COPY", "FROM", "STDIN", "for", "very", "fast", "copying", "from", "an", "InputStream", "into", "a", "database", "table", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/copy/CopyManager.java#L198-L200
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/internal/comm/betterssl/BetterSSLFactory.java
BetterSSLFactory.createSocketFactory
public static SSLSocketFactory createSocketFactory(Collection<KeyStore> extraStores) throws KeyStoreException, KeyManagementException { final Collection<X509TrustManager> managers = new ArrayList<>(); for (KeyStore ks : extraStores) { addX509Managers(managers, ks); } /* Add default manager. */ addX509Mana...
java
public static SSLSocketFactory createSocketFactory(Collection<KeyStore> extraStores) throws KeyStoreException, KeyManagementException { final Collection<X509TrustManager> managers = new ArrayList<>(); for (KeyStore ks : extraStores) { addX509Managers(managers, ks); } /* Add default manager. */ addX509Mana...
[ "public", "static", "SSLSocketFactory", "createSocketFactory", "(", "Collection", "<", "KeyStore", ">", "extraStores", ")", "throws", "KeyStoreException", ",", "KeyManagementException", "{", "final", "Collection", "<", "X509TrustManager", ">", "managers", "=", "new", ...
Creates a new SSL socket factory which supports both system-installed keys and all additional keys in the provided keystores. @param extraStores extra keystores containing root certificate authorities. @return Socket factory supporting authorization for both system (default) keystores and all the extraStores. @throws ...
[ "Creates", "a", "new", "SSL", "socket", "factory", "which", "supports", "both", "system", "-", "installed", "keys", "and", "all", "additional", "keys", "in", "the", "provided", "keystores", "." ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/internal/comm/betterssl/BetterSSLFactory.java#L37-L53
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java
ProcessApplicationContext.withProcessApplicationContext
public static <T> T withProcessApplicationContext(Callable<T> callable, String processApplicationName) throws Exception { try { setCurrentProcessApplication(processApplicationName); return callable.call(); } finally { clear(); } }
java
public static <T> T withProcessApplicationContext(Callable<T> callable, String processApplicationName) throws Exception { try { setCurrentProcessApplication(processApplicationName); return callable.call(); } finally { clear(); } }
[ "public", "static", "<", "T", ">", "T", "withProcessApplicationContext", "(", "Callable", "<", "T", ">", "callable", ",", "String", "processApplicationName", ")", "throws", "Exception", "{", "try", "{", "setCurrentProcessApplication", "(", "processApplicationName", ...
<p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { ProcessApplicationContext.setCurrentProcessApplication("someProcessApplication"); callable.call(); } finally { ProcessApplicationContext.clear(); } </pre> @para...
[ "<p", ">", "Takes", "a", "callable", "and", "executes", "all", "engine", "API", "invocations", "within", "that", "callable", "in", "the", "context", "of", "the", "given", "process", "application" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java#L120-L128
netty/netty
buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java
CompositeByteBuf.removeComponents
public CompositeByteBuf removeComponents(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents == 0) { return this; } int endIndex = cIndex + numComponents; boolean needsUpdate = false; for (int i = cIndex; i < endInde...
java
public CompositeByteBuf removeComponents(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents == 0) { return this; } int endIndex = cIndex + numComponents; boolean needsUpdate = false; for (int i = cIndex; i < endInde...
[ "public", "CompositeByteBuf", "removeComponents", "(", "int", "cIndex", ",", "int", "numComponents", ")", "{", "checkComponentIndex", "(", "cIndex", ",", "numComponents", ")", ";", "if", "(", "numComponents", "==", "0", ")", "{", "return", "this", ";", "}", ...
Remove the number of {@link ByteBuf}s starting from the given index. @param cIndex the index on which the {@link ByteBuf}s will be started to removed @param numComponents the number of components to remove
[ "Remove", "the", "number", "of", "{", "@link", "ByteBuf", "}", "s", "starting", "from", "the", "given", "index", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java#L599-L624
micronaut-projects/micronaut-core
http/src/main/java/io/micronaut/http/context/ServerRequestContext.java
ServerRequestContext.with
public static void with(HttpRequest request, Runnable runnable) { HttpRequest existing = REQUEST.get(); boolean isSet = false; try { if (request != existing) { isSet = true; REQUEST.set(request); } runnable.run(); } fina...
java
public static void with(HttpRequest request, Runnable runnable) { HttpRequest existing = REQUEST.get(); boolean isSet = false; try { if (request != existing) { isSet = true; REQUEST.set(request); } runnable.run(); } fina...
[ "public", "static", "void", "with", "(", "HttpRequest", "request", ",", "Runnable", "runnable", ")", "{", "HttpRequest", "existing", "=", "REQUEST", ".", "get", "(", ")", ";", "boolean", "isSet", "=", "false", ";", "try", "{", "if", "(", "request", "!=",...
Wrap the execution of the given runnable in request context processing. @param request The request @param runnable The runnable
[ "Wrap", "the", "execution", "of", "the", "given", "runnable", "in", "request", "context", "processing", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http/src/main/java/io/micronaut/http/context/ServerRequestContext.java#L44-L58
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/DragableArea.java
DragableArea.duringDrag
protected boolean duringDrag(SVGPoint startPoint, SVGPoint dragPoint, Event evt, boolean inside) { if (listener != null) { return listener.duringDrag(startPoint, dragPoint, evt, inside); } return true; }
java
protected boolean duringDrag(SVGPoint startPoint, SVGPoint dragPoint, Event evt, boolean inside) { if (listener != null) { return listener.duringDrag(startPoint, dragPoint, evt, inside); } return true; }
[ "protected", "boolean", "duringDrag", "(", "SVGPoint", "startPoint", ",", "SVGPoint", "dragPoint", ",", "Event", "evt", ",", "boolean", "inside", ")", "{", "if", "(", "listener", "!=", "null", ")", "{", "return", "listener", ".", "duringDrag", "(", "startPoi...
Method called during drags. @param startPoint Drag starting point @param dragPoint Drag end point @param evt The event object @param inside Inside the tracked element @return {@code true} to continue the drag
[ "Method", "called", "during", "drags", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/batikutil/DragableArea.java#L283-L288
HubSpot/Singularity
SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java
SingularityExecutor.killTask
@Override public void killTask(ExecutorDriver executorDriver, Protos.TaskID taskID) { final String taskId = taskID.getValue(); LOG.info("Asked to kill task {}", taskId); KillState killState = monitor.requestKill(taskId); switch (killState) { case DIDNT_EXIST: case INCONSISTENT_STATE: ...
java
@Override public void killTask(ExecutorDriver executorDriver, Protos.TaskID taskID) { final String taskId = taskID.getValue(); LOG.info("Asked to kill task {}", taskId); KillState killState = monitor.requestKill(taskId); switch (killState) { case DIDNT_EXIST: case INCONSISTENT_STATE: ...
[ "@", "Override", "public", "void", "killTask", "(", "ExecutorDriver", "executorDriver", ",", "Protos", ".", "TaskID", "taskID", ")", "{", "final", "String", "taskId", "=", "taskID", ".", "getValue", "(", ")", ";", "LOG", ".", "info", "(", "\"Asked to kill ta...
Invoked when a task running within this executor has been killed (via SchedulerDriver::killTask). Note that no status update will be sent on behalf of the executor, the executor is responsible for creating a new TaskStatus (i.e., with TASK_KILLED) and invoking ExecutorDriver::sendStatusUpdate.
[ "Invoked", "when", "a", "task", "running", "within", "this", "executor", "has", "been", "killed", "(", "via", "SchedulerDriver", "::", "killTask", ")", ".", "Note", "that", "no", "status", "update", "will", "be", "sent", "on", "behalf", "of", "the", "execu...
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java#L111-L130
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/object/TabularDataConverter.java
TabularDataConverter.checkForFullTabularDataRepresentation
private boolean checkForFullTabularDataRepresentation(JSONObject pValue, TabularType pType) { if (pValue.containsKey("indexNames") && pValue.containsKey("values") && pValue.size() == 2) { Object jsonVal = pValue.get("indexNames"); if (!(jsonVal instanceof JSONArray)) { th...
java
private boolean checkForFullTabularDataRepresentation(JSONObject pValue, TabularType pType) { if (pValue.containsKey("indexNames") && pValue.containsKey("values") && pValue.size() == 2) { Object jsonVal = pValue.get("indexNames"); if (!(jsonVal instanceof JSONArray)) { th...
[ "private", "boolean", "checkForFullTabularDataRepresentation", "(", "JSONObject", "pValue", ",", "TabularType", "pType", ")", "{", "if", "(", "pValue", ".", "containsKey", "(", "\"indexNames\"", ")", "&&", "pValue", ".", "containsKey", "(", "\"values\"", ")", "&&"...
Check for a full table data representation and do some sanity checks
[ "Check", "for", "a", "full", "table", "data", "representation", "and", "do", "some", "sanity", "checks" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/object/TabularDataConverter.java#L109-L130
Omertron/api-tvrage
src/main/java/com/omertron/tvrageapi/tools/TVRageParser.java
TVRageParser.parseEpisode
private static Episode parseEpisode(Element eEpisode, String season) { Episode episode = new Episode(); EpisodeNumber en = new EpisodeNumber(); en.setSeason(season); en.setEpisode(DOMHelper.getValueFromElement(eEpisode, "seasonnum")); en.setAbsolute(DOMHelper.getValueFromElement...
java
private static Episode parseEpisode(Element eEpisode, String season) { Episode episode = new Episode(); EpisodeNumber en = new EpisodeNumber(); en.setSeason(season); en.setEpisode(DOMHelper.getValueFromElement(eEpisode, "seasonnum")); en.setAbsolute(DOMHelper.getValueFromElement...
[ "private", "static", "Episode", "parseEpisode", "(", "Element", "eEpisode", ",", "String", "season", ")", "{", "Episode", "episode", "=", "new", "Episode", "(", ")", ";", "EpisodeNumber", "en", "=", "new", "EpisodeNumber", "(", ")", ";", "en", ".", "setSea...
Parse the episode node into an Episode object @param eEpisode @param season @return
[ "Parse", "the", "episode", "node", "into", "an", "Episode", "object" ]
train
https://github.com/Omertron/api-tvrage/blob/4e805a99de812fabea69d97098f2376be14d51bc/src/main/java/com/omertron/tvrageapi/tools/TVRageParser.java#L196-L214
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.Comment
public JBBPDslBuilder Comment(final String text) { this.addItem(new ItemComment(text == null ? "" : text, false)); return this; }
java
public JBBPDslBuilder Comment(final String text) { this.addItem(new ItemComment(text == null ? "" : text, false)); return this; }
[ "public", "JBBPDslBuilder", "Comment", "(", "final", "String", "text", ")", "{", "this", ".", "addItem", "(", "new", "ItemComment", "(", "text", "==", "null", "?", "\"\"", ":", "text", ",", "false", ")", ")", ";", "return", "this", ";", "}" ]
Add comment, in case that a field followed by the comment, the comment will be placed on the same line as field definition. @param text text of comment, can be null @return the builder instance, must not be null
[ "Add", "comment", "in", "case", "that", "a", "field", "followed", "by", "the", "comment", "the", "comment", "will", "be", "placed", "on", "the", "same", "line", "as", "field", "definition", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1301-L1304
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java
JBBPUtils.float2str
public static String float2str(final float floatValue, final int radix) { if (radix != 10 && radix != 16) { throw new IllegalArgumentException("Illegal radix [" + radix + ']'); } final String result; if (radix == 16) { String converted = Double.toHexString(floatValue); boolean minus = ...
java
public static String float2str(final float floatValue, final int radix) { if (radix != 10 && radix != 16) { throw new IllegalArgumentException("Illegal radix [" + radix + ']'); } final String result; if (radix == 16) { String converted = Double.toHexString(floatValue); boolean minus = ...
[ "public", "static", "String", "float2str", "(", "final", "float", "floatValue", ",", "final", "int", "radix", ")", "{", "if", "(", "radix", "!=", "10", "&&", "radix", "!=", "16", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Illegal radix [\"...
Convert float value into string representation with defined radix base. @param floatValue value to be converted in string @param radix radix base to be used for conversion, must be 10 or 16 @return converted value as upper case string @throws IllegalArgumentException for wrong radix base @since 1.4.0
[ "Convert", "float", "value", "into", "string", "representation", "with", "defined", "radix", "base", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java#L738-L757
gresrun/jesque
src/main/java/net/greghaines/jesque/utils/PoolUtils.java
PoolUtils.doWorkInPoolNicely
public static <V> V doWorkInPoolNicely(final Pool<Jedis> pool, final PoolWork<Jedis, V> work) { final V result; try { result = doWorkInPool(pool, work); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e); ...
java
public static <V> V doWorkInPoolNicely(final Pool<Jedis> pool, final PoolWork<Jedis, V> work) { final V result; try { result = doWorkInPool(pool, work); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e); ...
[ "public", "static", "<", "V", ">", "V", "doWorkInPoolNicely", "(", "final", "Pool", "<", "Jedis", ">", "pool", ",", "final", "PoolWork", "<", "Jedis", ",", "V", ">", "work", ")", "{", "final", "V", "result", ";", "try", "{", "result", "=", "doWorkInP...
Perform the given work with a Jedis connection from the given pool. Wraps any thrown checked exceptions in a RuntimeException. @param pool the resource pool @param work the work to perform @param <V> the result type @return the result of the given work
[ "Perform", "the", "given", "work", "with", "a", "Jedis", "connection", "from", "the", "given", "pool", ".", "Wraps", "any", "thrown", "checked", "exceptions", "in", "a", "RuntimeException", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/utils/PoolUtils.java#L68-L78
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.lte
public static StringLessThanOrEqualCondition.Builder lte(String variable, String expectedValue) { return StringLessThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static StringLessThanOrEqualCondition.Builder lte(String variable, String expectedValue) { return StringLessThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "StringLessThanOrEqualCondition", ".", "Builder", "lte", "(", "String", "variable", ",", "String", "expectedValue", ")", "{", "return", "StringLessThanOrEqualCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "exp...
Binary condition for String less than or equal to comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://...
[ "Binary", "condition", "for", "String", "less", "than", "or", "equal", "to", "comparison", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L416-L418
jenkinsci/ghprb-plugin
src/main/java/org/jenkinsci/plugins/ghprb/jobdsl/GhprbUpstreamStatusContext.java
GhprbUpstreamStatusContext.completedStatus
void completedStatus(String buildResult, String message) { completedStatus.add(new GhprbBuildResultMessage( GHCommitState.valueOf(buildResult), message )); }
java
void completedStatus(String buildResult, String message) { completedStatus.add(new GhprbBuildResultMessage( GHCommitState.valueOf(buildResult), message )); }
[ "void", "completedStatus", "(", "String", "buildResult", ",", "String", "message", ")", "{", "completedStatus", ".", "add", "(", "new", "GhprbBuildResultMessage", "(", "GHCommitState", ".", "valueOf", "(", "buildResult", ")", ",", "message", ")", ")", ";", "}"...
Use a custom status for when a build is completed. Can be called multiple times to set messages for different build results. Valid build results are {@code 'SUCCESS'}, {@code 'FAILURE'}, and {@code 'ERROR'}.
[ "Use", "a", "custom", "status", "for", "when", "a", "build", "is", "completed", ".", "Can", "be", "called", "multiple", "times", "to", "set", "messages", "for", "different", "build", "results", ".", "Valid", "build", "results", "are", "{" ]
train
https://github.com/jenkinsci/ghprb-plugin/blob/b972d3b94ebbe6d40542c2771407e297bff8430b/src/main/java/org/jenkinsci/plugins/ghprb/jobdsl/GhprbUpstreamStatusContext.java#L78-L83
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.fetchByG_K
@Override public CPOptionCategory fetchByG_K(long groupId, String key) { return fetchByG_K(groupId, key, true); }
java
@Override public CPOptionCategory fetchByG_K(long groupId, String key) { return fetchByG_K(groupId, key, true); }
[ "@", "Override", "public", "CPOptionCategory", "fetchByG_K", "(", "long", "groupId", ",", "String", "key", ")", "{", "return", "fetchByG_K", "(", "groupId", ",", "key", ",", "true", ")", ";", "}" ]
Returns the cp option category where groupId = &#63; and key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param groupId the group ID @param key the key @return the matching cp option category, or <code>null</code> if a matching cp option category could not be found
[ "Returns", "the", "cp", "option", "category", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "ca...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L2560-L2563
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/android/AuthActivity.java
AuthActivity.checkAppBeforeAuth
public static boolean checkAppBeforeAuth(Context context, String appKey, boolean alertUser) { // Check if the app has set up its manifest properly. Intent testIntent = new Intent(Intent.ACTION_VIEW); String scheme = "db-" +appKey; String uri = scheme + "://" + AUTH_VERSION + AUTH_PATH_CO...
java
public static boolean checkAppBeforeAuth(Context context, String appKey, boolean alertUser) { // Check if the app has set up its manifest properly. Intent testIntent = new Intent(Intent.ACTION_VIEW); String scheme = "db-" +appKey; String uri = scheme + "://" + AUTH_VERSION + AUTH_PATH_CO...
[ "public", "static", "boolean", "checkAppBeforeAuth", "(", "Context", "context", ",", "String", "appKey", ",", "boolean", "alertUser", ")", "{", "// Check if the app has set up its manifest properly.", "Intent", "testIntent", "=", "new", "Intent", "(", "Intent", ".", "...
Check's the current app's manifest setup for authentication. If the manifest is incorrect, an exception will be thrown. If another app on the device is conflicting with this one, the user will (optionally) be alerted and false will be returned. @param context the app context @param appKey the consumer key for the app ...
[ "Check", "s", "the", "current", "app", "s", "manifest", "setup", "for", "authentication", ".", "If", "the", "manifest", "is", "incorrect", "an", "exception", "will", "be", "thrown", ".", "If", "another", "app", "on", "the", "device", "is", "conflicting", "...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/android/AuthActivity.java#L275-L331
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.registerTypeWithKryoSerializer
public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) { config.registerTypeWithKryoSerializer(type, serializer); }
java
public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) { config.registerTypeWithKryoSerializer(type, serializer); }
[ "public", "<", "T", "extends", "Serializer", "<", "?", ">", "&", "Serializable", ">", "void", "registerTypeWithKryoSerializer", "(", "Class", "<", "?", ">", "type", ",", "T", "serializer", ")", "{", "config", ".", "registerTypeWithKryoSerializer", "(", "type",...
Registers the given type with a Kryo Serializer. <p>Note that the serializer instance must be serializable (as defined by java.io.Serializable), because it may be distributed to the worker nodes by java serialization. @param type The class of the types serialized with the given serializer. @param serializer The seria...
[ "Registers", "the", "given", "type", "with", "a", "Kryo", "Serializer", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L582-L584
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/codec/Base64.java
Base64.encodeBase64URLSafeString
public static String encodeBase64URLSafeString(final byte[] binaryData) { return new String(encodeBase64(binaryData, false, true), StandardCharsets.UTF_8); }
java
public static String encodeBase64URLSafeString(final byte[] binaryData) { return new String(encodeBase64(binaryData, false, true), StandardCharsets.UTF_8); }
[ "public", "static", "String", "encodeBase64URLSafeString", "(", "final", "byte", "[", "]", "binaryData", ")", "{", "return", "new", "String", "(", "encodeBase64", "(", "binaryData", ",", "false", ",", "true", ")", ",", "StandardCharsets", ".", "UTF_8", ")", ...
Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The url-safe variation emits - and _ instead of + and / characters. <b>Note: no padding is added.</b> @param binaryData binary data to encode @return String containing Base64 characters @since 1.4
[ "Encodes", "binary", "data", "using", "a", "URL", "-", "safe", "variation", "of", "the", "base64", "algorithm", "but", "does", "not", "chunk", "the", "output", ".", "The", "url", "-", "safe", "variation", "emits", "-", "and", "_", "instead", "of", "+", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/codec/Base64.java#L574-L576
jfrog/artifactory-client-java
httpClient/src/main/java/org/jfrog/artifactory/client/httpClient/http/HttpBuilderBase.java
HttpBuilderBase.hostFromUrl
public T hostFromUrl(String urlStr) { if (StringUtils.isNotBlank(urlStr)) { try { URL url = new URL(urlStr); defaultHost = new HttpHost(url.getHost(), url.getPort(), url.getProtocol()); } catch (MalformedURLException e) { throw new IllegalA...
java
public T hostFromUrl(String urlStr) { if (StringUtils.isNotBlank(urlStr)) { try { URL url = new URL(urlStr); defaultHost = new HttpHost(url.getHost(), url.getPort(), url.getProtocol()); } catch (MalformedURLException e) { throw new IllegalA...
[ "public", "T", "hostFromUrl", "(", "String", "urlStr", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "urlStr", ")", ")", "{", "try", "{", "URL", "url", "=", "new", "URL", "(", "urlStr", ")", ";", "defaultHost", "=", "new", "HttpHost", "...
Sets the host the client works with by default. This method accepts any valid {@link URL} formatted string. This will extract the schema, host and port to use by default. @throws IllegalArgumentException if the given URL is invalid
[ "Sets", "the", "host", "the", "client", "works", "with", "by", "default", ".", "This", "method", "accepts", "any", "valid", "{", "@link", "URL", "}", "formatted", "string", ".", "This", "will", "extract", "the", "schema", "host", "and", "port", "to", "us...
train
https://github.com/jfrog/artifactory-client-java/blob/e7443f4ffa8bf7d3b161f9cdc59bfc3036e9b46e/httpClient/src/main/java/org/jfrog/artifactory/client/httpClient/http/HttpBuilderBase.java#L87-L99
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getUIOfType
public static Object getUIOfType(ComponentUI ui, Class klass) { if (klass.isInstance(ui)) { return ui; } return null; }
java
public static Object getUIOfType(ComponentUI ui, Class klass) { if (klass.isInstance(ui)) { return ui; } return null; }
[ "public", "static", "Object", "getUIOfType", "(", "ComponentUI", "ui", ",", "Class", "klass", ")", "{", "if", "(", "klass", ".", "isInstance", "(", "ui", ")", ")", "{", "return", "ui", ";", "}", "return", "null", ";", "}" ]
Returns the ui that is of type <code>klass</code>, or null if one can not be found. @param ui the UI delegate to be tested. @param klass the class to test against. @return {@code ui} if {@code klass} is an instance of {@code ui}, {@code null} otherwise.
[ "Returns", "the", "ui", "that", "is", "of", "type", "<code", ">", "klass<", "/", "code", ">", "or", "null", "if", "one", "can", "not", "be", "found", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2555-L2561
OpenLiberty/open-liberty
dev/com.ibm.ws.repository.parsers/src/com/ibm/ws/repository/parsers/ParserBase.java
ParserBase.copyStreams
protected void copyStreams(InputStream is, OutputStream os) throws IOException { byte[] buffer = new byte[1024]; try { int read; while ((read = is.read(buffer)) != -1) { os.write(buffer, 0, read); buffer = new byte[1024]; } } fi...
java
protected void copyStreams(InputStream is, OutputStream os) throws IOException { byte[] buffer = new byte[1024]; try { int read; while ((read = is.read(buffer)) != -1) { os.write(buffer, 0, read); buffer = new byte[1024]; } } fi...
[ "protected", "void", "copyStreams", "(", "InputStream", "is", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "1024", "]", ";", "try", "{", "int", "read", ";", "while", "(", "(", "read"...
Reads from the input stream and copies to the output stream @param is @param os @throws IOException
[ "Reads", "from", "the", "input", "stream", "and", "copies", "to", "the", "output", "stream" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.parsers/src/com/ibm/ws/repository/parsers/ParserBase.java#L167-L181
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java
JBasePanel.addScrollbars
public JPanel addScrollbars(JComponent screen) { Dimension dimension = screen.getPreferredSize(); if ((dimension.height == 0) && (dimension.width == 0)) dimension = JScreenConstants.PREFERRED_SCREEN_SIZE; else if ((screen.getBounds().width != 0) && (screen.getBounds().height != 0...
java
public JPanel addScrollbars(JComponent screen) { Dimension dimension = screen.getPreferredSize(); if ((dimension.height == 0) && (dimension.width == 0)) dimension = JScreenConstants.PREFERRED_SCREEN_SIZE; else if ((screen.getBounds().width != 0) && (screen.getBounds().height != 0...
[ "public", "JPanel", "addScrollbars", "(", "JComponent", "screen", ")", "{", "Dimension", "dimension", "=", "screen", ".", "getPreferredSize", "(", ")", ";", "if", "(", "(", "dimension", ".", "height", "==", "0", ")", "&&", "(", "dimension", ".", "width", ...
Add a scrollpane to this component and return the component with the scroller and this screen in it. @param screen The screen to add a scroller around.
[ "Add", "a", "scrollpane", "to", "this", "component", "and", "return", "the", "component", "with", "the", "scroller", "and", "this", "screen", "in", "it", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L481-L507
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/FeaturePyramid.java
FeaturePyramid.detectCandidateFeatures
private void detectCandidateFeatures(T image, double sigma) { // adjust corner intensity threshold based upon the current scale factor float scaleThreshold = (float) (baseThreshold / Math.pow(sigma, scalePower)); detector.setThreshold(scaleThreshold); computeDerivative.setInput(image); D derivX = null, deriv...
java
private void detectCandidateFeatures(T image, double sigma) { // adjust corner intensity threshold based upon the current scale factor float scaleThreshold = (float) (baseThreshold / Math.pow(sigma, scalePower)); detector.setThreshold(scaleThreshold); computeDerivative.setInput(image); D derivX = null, deriv...
[ "private", "void", "detectCandidateFeatures", "(", "T", "image", ",", "double", "sigma", ")", "{", "// adjust corner intensity threshold based upon the current scale factor", "float", "scaleThreshold", "=", "(", "float", ")", "(", "baseThreshold", "/", "Math", ".", "pow...
Use the feature detector to find candidate features in each level. Only compute the needed image derivatives.
[ "Use", "the", "feature", "detector", "to", "find", "candidate", "features", "in", "each", "level", ".", "Only", "compute", "the", "needed", "image", "derivatives", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/FeaturePyramid.java#L129-L163
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java
ResourceUtils.buildInputStreamResourceFrom
public static InputStreamResource buildInputStreamResourceFrom(final String value, final String description) { val reader = new StringReader(value); val is = new ReaderInputStream(reader, StandardCharsets.UTF_8); return new InputStreamResource(is, description); }
java
public static InputStreamResource buildInputStreamResourceFrom(final String value, final String description) { val reader = new StringReader(value); val is = new ReaderInputStream(reader, StandardCharsets.UTF_8); return new InputStreamResource(is, description); }
[ "public", "static", "InputStreamResource", "buildInputStreamResourceFrom", "(", "final", "String", "value", ",", "final", "String", "description", ")", "{", "val", "reader", "=", "new", "StringReader", "(", "value", ")", ";", "val", "is", "=", "new", "ReaderInpu...
Build input stream resource from string value. @param value the value @param description the description @return the input stream resource
[ "Build", "input", "stream", "resource", "from", "string", "value", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java#L218-L222
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java
AbstractFaxClientSpi.fireFaxMonitorEvent
public final void fireFaxMonitorEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus) { this.fireFaxEvent(id,faxJob,faxJobStatus); }
java
public final void fireFaxMonitorEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus) { this.fireFaxEvent(id,faxJob,faxJobStatus); }
[ "public", "final", "void", "fireFaxMonitorEvent", "(", "FaxMonitorEventID", "id", ",", "FaxJob", "faxJob", ",", "FaxJobStatus", "faxJobStatus", ")", "{", "this", ".", "fireFaxEvent", "(", "id", ",", "faxJob", ",", "faxJobStatus", ")", ";", "}" ]
This function fires a new fax monitor event. @param id The fax monitor event ID @param faxJob The fax job @param faxJobStatus The fax job status
[ "This", "function", "fires", "a", "new", "fax", "monitor", "event", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java#L246-L249
Prototik/HoloEverywhere
library/src/org/holoeverywhere/widget/datetimepicker/time/RadialPickerLayout.java
RadialPickerLayout.setCurrentItemShowing
public void setCurrentItemShowing(int index, boolean animate) { if (index != HOUR_INDEX && index != MINUTE_INDEX) { Log.e(TAG, "TimePicker does not support view at index " + index); return; } int lastIndex = getCurrentItemShowing(); mCurrentItemShowing = index; ...
java
public void setCurrentItemShowing(int index, boolean animate) { if (index != HOUR_INDEX && index != MINUTE_INDEX) { Log.e(TAG, "TimePicker does not support view at index " + index); return; } int lastIndex = getCurrentItemShowing(); mCurrentItemShowing = index; ...
[ "public", "void", "setCurrentItemShowing", "(", "int", "index", ",", "boolean", "animate", ")", "{", "if", "(", "index", "!=", "HOUR_INDEX", "&&", "index", "!=", "MINUTE_INDEX", ")", "{", "Log", ".", "e", "(", "TAG", ",", "\"TimePicker does not support view at...
Set either minutes or hours as showing. @param animate True to animate the transition, false to show with no animation.
[ "Set", "either", "minutes", "or", "hours", "as", "showing", "." ]
train
https://github.com/Prototik/HoloEverywhere/blob/b870abb5ab009a5a6dbab3fb855ec2854e35e125/library/src/org/holoeverywhere/widget/datetimepicker/time/RadialPickerLayout.java#L515-L553
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java
MasterWorkerInfo.updateUsedBytes
public void updateUsedBytes(Map<String, Long> usedBytesOnTiers) { mUsedBytes = 0; mUsedBytesOnTiers = new HashMap<>(usedBytesOnTiers); for (long t : mUsedBytesOnTiers.values()) { mUsedBytes += t; } }
java
public void updateUsedBytes(Map<String, Long> usedBytesOnTiers) { mUsedBytes = 0; mUsedBytesOnTiers = new HashMap<>(usedBytesOnTiers); for (long t : mUsedBytesOnTiers.values()) { mUsedBytes += t; } }
[ "public", "void", "updateUsedBytes", "(", "Map", "<", "String", ",", "Long", ">", "usedBytesOnTiers", ")", "{", "mUsedBytes", "=", "0", ";", "mUsedBytesOnTiers", "=", "new", "HashMap", "<>", "(", "usedBytesOnTiers", ")", ";", "for", "(", "long", "t", ":", ...
Sets the used space of the worker in bytes. @param usedBytesOnTiers used bytes on each storage tier
[ "Sets", "the", "used", "space", "of", "the", "worker", "in", "bytes", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java#L425-L431
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixSuppressWarnings
@Fix("*") public void fixSuppressWarnings(Issue issue, IssueResolutionAcceptor acceptor) { if (isIgnorable(issue.getCode())) { SuppressWarningsAddModification.accept(this, issue, acceptor); } }
java
@Fix("*") public void fixSuppressWarnings(Issue issue, IssueResolutionAcceptor acceptor) { if (isIgnorable(issue.getCode())) { SuppressWarningsAddModification.accept(this, issue, acceptor); } }
[ "@", "Fix", "(", "\"*\"", ")", "public", "void", "fixSuppressWarnings", "(", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")", "{", "if", "(", "isIgnorable", "(", "issue", ".", "getCode", "(", ")", ")", ")", "{", "SuppressWarningsAddModificati...
Add the fixes with suppress-warning annotations. @param issue the issue. @param acceptor the resolution acceptor.
[ "Add", "the", "fixes", "with", "suppress", "-", "warning", "annotations", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L181-L186
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
XMLConfigAdmin.setMailLog
public void setMailLog(String logFile, String level) throws PageException { checkWriteAccess(); boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_MAIL); if (!hasAccess) throw new SecurityException("no access to update mail server settings"); ConfigWebUtil.getFile(config, config.getRootDirect...
java
public void setMailLog(String logFile, String level) throws PageException { checkWriteAccess(); boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_MAIL); if (!hasAccess) throw new SecurityException("no access to update mail server settings"); ConfigWebUtil.getFile(config, config.getRootDirect...
[ "public", "void", "setMailLog", "(", "String", "logFile", ",", "String", "level", ")", "throws", "PageException", "{", "checkWriteAccess", "(", ")", ";", "boolean", "hasAccess", "=", "ConfigWebUtil", ".", "hasAccess", "(", "config", ",", "SecurityManager", ".", ...
sets Mail Logger to Config @param logFile @param level @throws PageException
[ "sets", "Mail", "Logger", "to", "Config" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L353-L385
tehuti-io/tehuti
src/main/java/io/tehuti/metrics/Sensor.java
Sensor.checkQuotas
private void checkQuotas(long timeMs, boolean preCheck, double requestedValue) { for (int i = 0; i < this.metrics.size(); i++) { TehutiMetric metric = this.metrics.get(i); MetricConfig config = metric.config(); if (config != null) { Quota quota = config.quota(...
java
private void checkQuotas(long timeMs, boolean preCheck, double requestedValue) { for (int i = 0; i < this.metrics.size(); i++) { TehutiMetric metric = this.metrics.get(i); MetricConfig config = metric.config(); if (config != null) { Quota quota = config.quota(...
[ "private", "void", "checkQuotas", "(", "long", "timeMs", ",", "boolean", "preCheck", ",", "double", "requestedValue", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "metrics", ".", "size", "(", ")", ";", "i", "++", ")", "{"...
Check if we have violated our quota for any metric that has a configured quota @param timeMs The current POSIX time in milliseconds
[ "Check", "if", "we", "have", "violated", "our", "quota", "for", "any", "metric", "that", "has", "a", "configured", "quota" ]
train
https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/Sensor.java#L117-L139
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/TransparentDataEncryptionActivitiesInner.java
TransparentDataEncryptionActivitiesInner.listByConfiguration
public List<TransparentDataEncryptionActivityInner> listByConfiguration(String resourceGroupName, String serverName, String databaseName) { return listByConfigurationWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
java
public List<TransparentDataEncryptionActivityInner> listByConfiguration(String resourceGroupName, String serverName, String databaseName) { return listByConfigurationWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
[ "public", "List", "<", "TransparentDataEncryptionActivityInner", ">", "listByConfiguration", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "listByConfigurationWithServiceResponseAsync", "(", "resourceGroupN...
Returns a database's transparent data encryption operation result. @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 for ...
[ "Returns", "a", "database", "s", "transparent", "data", "encryption", "operation", "result", "." ]
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/TransparentDataEncryptionActivitiesInner.java#L72-L74
jayantk/jklol
src/com/jayantkrish/jklol/models/loglinear/DiscreteLogLinearFactor.java
DiscreteLogLinearFactor.createIndicatorFactor
public static DiscreteLogLinearFactor createIndicatorFactor(VariableNumMap vars, TableFactorBuilder initialWeights) { Preconditions.checkArgument(vars.size() == vars.getDiscreteVariables().size()); int featureVarNum = Ints.max(vars.getVariableNumsArray()) + 1; DiscreteFactor featureValues = createIn...
java
public static DiscreteLogLinearFactor createIndicatorFactor(VariableNumMap vars, TableFactorBuilder initialWeights) { Preconditions.checkArgument(vars.size() == vars.getDiscreteVariables().size()); int featureVarNum = Ints.max(vars.getVariableNumsArray()) + 1; DiscreteFactor featureValues = createIn...
[ "public", "static", "DiscreteLogLinearFactor", "createIndicatorFactor", "(", "VariableNumMap", "vars", ",", "TableFactorBuilder", "initialWeights", ")", "{", "Preconditions", ".", "checkArgument", "(", "vars", ".", "size", "(", ")", "==", "vars", ".", "getDiscreteVari...
Creates and returns a {@code DiscreteLogLinearFactor} over {@code vars} which is parameterized by indicator functions. The returned factor has one indicator feature for every possible assignment to {@code vars}. {@code initialWeights} determines the sparsity pattern of the factors created by the returned parametric fac...
[ "Creates", "and", "returns", "a", "{", "@code", "DiscreteLogLinearFactor", "}", "over", "{", "@code", "vars", "}", "which", "is", "parameterized", "by", "indicator", "functions", ".", "The", "returned", "factor", "has", "one", "indicator", "feature", "for", "e...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/loglinear/DiscreteLogLinearFactor.java#L250-L261
apache/groovy
src/main/groovy/groovy/util/FactoryBuilderSupport.java
FactoryBuilderSupport.withBuilder
public Object withBuilder(Map attributes, FactoryBuilderSupport builder, String name, Closure closure) { if (name == null) { return null; } Object result = getProxyBuilder().withBuilder(builder, closure); return getProxyBuilder().invokeMethod(name, new Object[]{attributes, re...
java
public Object withBuilder(Map attributes, FactoryBuilderSupport builder, String name, Closure closure) { if (name == null) { return null; } Object result = getProxyBuilder().withBuilder(builder, closure); return getProxyBuilder().invokeMethod(name, new Object[]{attributes, re...
[ "public", "Object", "withBuilder", "(", "Map", "attributes", ",", "FactoryBuilderSupport", "builder", ",", "String", "name", ",", "Closure", "closure", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "Object", "result", "="...
Switches the builder's proxyBuilder during the execution of a closure.<br> This is useful to temporary change the building context to another builder without the need for a contrived setup. It will also take care of restoring the previous proxyBuilder when the execution finishes, even if an exception was thrown from in...
[ "Switches", "the", "builder", "s", "proxyBuilder", "during", "the", "execution", "of", "a", "closure", ".", "<br", ">", "This", "is", "useful", "to", "temporary", "change", "the", "building", "context", "to", "another", "builder", "without", "the", "need", "...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/FactoryBuilderSupport.java#L1279-L1285
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java
OffsetDateTime.withOffsetSameInstant
public OffsetDateTime withOffsetSameInstant(ZoneOffset offset) { if (offset.equals(this.offset)) { return this; } int difference = offset.getTotalSeconds() - this.offset.getTotalSeconds(); LocalDateTime adjusted = dateTime.plusSeconds(difference); return new OffsetDat...
java
public OffsetDateTime withOffsetSameInstant(ZoneOffset offset) { if (offset.equals(this.offset)) { return this; } int difference = offset.getTotalSeconds() - this.offset.getTotalSeconds(); LocalDateTime adjusted = dateTime.plusSeconds(difference); return new OffsetDat...
[ "public", "OffsetDateTime", "withOffsetSameInstant", "(", "ZoneOffset", "offset", ")", "{", "if", "(", "offset", ".", "equals", "(", "this", ".", "offset", ")", ")", "{", "return", "this", ";", "}", "int", "difference", "=", "offset", ".", "getTotalSeconds",...
Returns a copy of this {@code OffsetDateTime} with the specified offset ensuring that the result is at the same instant. <p> This method returns an object with the specified {@code ZoneOffset} and a {@code LocalDateTime} adjusted by the difference between the two offsets. This will result in the old and new objects rep...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "OffsetDateTime", "}", "with", "the", "specified", "offset", "ensuring", "that", "the", "result", "is", "at", "the", "same", "instant", ".", "<p", ">", "This", "method", "returns", "an", "object", "with",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java#L690-L697
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java
LdapHelper.inAttributes
public static boolean inAttributes(String attrName, Attributes attrs) { for (NamingEnumeration<String> neu = attrs.getIDs(); neu.hasMoreElements();) { String attrId = neu.nextElement(); if (attrId.equalsIgnoreCase(attrName)) { return true; } } ...
java
public static boolean inAttributes(String attrName, Attributes attrs) { for (NamingEnumeration<String> neu = attrs.getIDs(); neu.hasMoreElements();) { String attrId = neu.nextElement(); if (attrId.equalsIgnoreCase(attrName)) { return true; } } ...
[ "public", "static", "boolean", "inAttributes", "(", "String", "attrName", ",", "Attributes", "attrs", ")", "{", "for", "(", "NamingEnumeration", "<", "String", ">", "neu", "=", "attrs", ".", "getIDs", "(", ")", ";", "neu", ".", "hasMoreElements", "(", ")",...
Whether the specified attribute name is contained in the attributes. @param attrName The name of the attribute @param attrs The Attributes object @return true if the Attributes contain the attribute name (case-insensitive); false otherwise
[ "Whether", "the", "specified", "attribute", "name", "is", "contained", "in", "the", "attributes", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L880-L888
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/HashIndex.java
HashIndex.indexOf
public int indexOf(E o, boolean add) { Integer index = indexes.get(o); if (index == null) { if (add && ! locked) { try { semaphore.acquire(); index = indexes.get(o); if (index == null) { index = objects.size(); objects.add(o); ...
java
public int indexOf(E o, boolean add) { Integer index = indexes.get(o); if (index == null) { if (add && ! locked) { try { semaphore.acquire(); index = indexes.get(o); if (index == null) { index = objects.size(); objects.add(o); ...
[ "public", "int", "indexOf", "(", "E", "o", ",", "boolean", "add", ")", "{", "Integer", "index", "=", "indexes", ".", "get", "(", "o", ")", ";", "if", "(", "index", "==", "null", ")", "{", "if", "(", "add", "&&", "!", "locked", ")", "{", "try", ...
Takes an Object and returns the integer index of the Object, perhaps adding it to the index first. Returns -1 if the Object is not in the Index. <p> <i>Notes:</i> The method indexOf(x, true) is the direct replacement for the number(x) method in the old Numberer class. This method now uses a Semaphore object to make th...
[ "Takes", "an", "Object", "and", "returns", "the", "integer", "index", "of", "the", "Object", "perhaps", "adding", "it", "to", "the", "index", "first", ".", "Returns", "-", "1", "if", "the", "Object", "is", "not", "in", "the", "Index", ".", "<p", ">", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/HashIndex.java#L161-L182
ops4j/org.ops4j.pax.exam2
core/pax-exam-spi/src/main/java/org/ops4j/pax/exam/spi/war/ZipBuilder.java
ZipBuilder.addFile
public ZipBuilder addFile(File sourceFile, String targetFile) throws IOException { FileInputStream fis = new FileInputStream(sourceFile); ZipEntry jarEntry = new ZipEntry(targetFile); jarOutputStream.putNextEntry(jarEntry); StreamUtils.copyStream(fis, jarOutputStream, false); fis...
java
public ZipBuilder addFile(File sourceFile, String targetFile) throws IOException { FileInputStream fis = new FileInputStream(sourceFile); ZipEntry jarEntry = new ZipEntry(targetFile); jarOutputStream.putNextEntry(jarEntry); StreamUtils.copyStream(fis, jarOutputStream, false); fis...
[ "public", "ZipBuilder", "addFile", "(", "File", "sourceFile", ",", "String", "targetFile", ")", "throws", "IOException", "{", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "sourceFile", ")", ";", "ZipEntry", "jarEntry", "=", "new", "ZipEntry", "(...
Adds a file to the archive. The archive must not be closed. <p> Example:<br> <pre> sourceFile = C:\opt\work\deps\foo.jar targetDir = WEB-INF/lib/foo.jar </pre> @param sourceFile File to be added @param targetFile Relative path for the file within the archive. Regardless of the OS, this path must use slashes ('/') as...
[ "Adds", "a", "file", "to", "the", "archive", ".", "The", "archive", "must", "not", "be", "closed", ".", "<p", ">", "Example", ":", "<br", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.exam2/blob/7f83796cbbb857123d8fc7fe817a7637218d5d77/core/pax-exam-spi/src/main/java/org/ops4j/pax/exam/spi/war/ZipBuilder.java#L103-L110
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrComponentFacet.java
MtasSolrComponentFacet.getFieldType
private String getFieldType(IndexSchema schema, String field) throws IOException { SchemaField sf = schema.getField(field); FieldType ft = sf.getType(); if (ft != null) { if (ft.isPointField() && !sf.hasDocValues()) { return ComponentFacet.TYPE_POINTFIELD_WITHOUT_DOCVALUES; } ...
java
private String getFieldType(IndexSchema schema, String field) throws IOException { SchemaField sf = schema.getField(field); FieldType ft = sf.getType(); if (ft != null) { if (ft.isPointField() && !sf.hasDocValues()) { return ComponentFacet.TYPE_POINTFIELD_WITHOUT_DOCVALUES; } ...
[ "private", "String", "getFieldType", "(", "IndexSchema", "schema", ",", "String", "field", ")", "throws", "IOException", "{", "SchemaField", "sf", "=", "schema", ".", "getField", "(", "field", ")", ";", "FieldType", "ft", "=", "sf", ".", "getType", "(", ")...
Gets the field type. @param schema the schema @param field the field @return the field type @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "field", "type", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrComponentFacet.java#L658-L676
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java
XML.getAttribute
private Attribute getAttribute(MappedField configuredField, Class<?> configuredClass){ // If configuredClass exists in XML configuration file for (Class<?> clazz : getAllsuperClasses(configuredClass)) if (isMapped(clazz)) // loads all configured attributes for (Attribute attribute : loadAttributes()...
java
private Attribute getAttribute(MappedField configuredField, Class<?> configuredClass){ // If configuredClass exists in XML configuration file for (Class<?> clazz : getAllsuperClasses(configuredClass)) if (isMapped(clazz)) // loads all configured attributes for (Attribute attribute : loadAttributes()...
[ "private", "Attribute", "getAttribute", "(", "MappedField", "configuredField", ",", "Class", "<", "?", ">", "configuredClass", ")", "{", "// If configuredClass exists in XML configuration file\r", "for", "(", "Class", "<", "?", ">", "clazz", ":", "getAllsuperClasses", ...
Returns the Attribute relative to the configured field, null otherwise. @param configuredField field to find @param configuredClass class of field @return
[ "Returns", "the", "Attribute", "relative", "to", "the", "configured", "field", "null", "otherwise", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java#L532-L550
btaz/data-util
src/main/java/com/btaz/util/xml/model/Xml.java
Xml.bsfHashCode
private int bsfHashCode(Node node, int result) { result += 31 * node.hashCode(); if(node instanceof Content) { return result; } Element elem = (Element) node; List<Node> childElements = elem.getChildElements(); for (Node childElement : childElements) { ...
java
private int bsfHashCode(Node node, int result) { result += 31 * node.hashCode(); if(node instanceof Content) { return result; } Element elem = (Element) node; List<Node> childElements = elem.getChildElements(); for (Node childElement : childElements) { ...
[ "private", "int", "bsfHashCode", "(", "Node", "node", ",", "int", "result", ")", "{", "result", "+=", "31", "*", "node", ".", "hashCode", "(", ")", ";", "if", "(", "node", "instanceof", "Content", ")", "{", "return", "result", ";", "}", "Element", "e...
Recursive hash code creator @param node root node @param result cumulative hash code value @return result resulting cumulative hash code value
[ "Recursive", "hash", "code", "creator" ]
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/xml/model/Xml.java#L228-L251
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.getProperty
public static PropertyDescriptor getProperty(Class<?> clazz, String propertyName) { if (clazz == null || propertyName == null) { return null; } try { return BeanUtils.getPropertyDescriptor(clazz, propertyName); } catch (Exception e) { // if th...
java
public static PropertyDescriptor getProperty(Class<?> clazz, String propertyName) { if (clazz == null || propertyName == null) { return null; } try { return BeanUtils.getPropertyDescriptor(clazz, propertyName); } catch (Exception e) { // if th...
[ "public", "static", "PropertyDescriptor", "getProperty", "(", "Class", "<", "?", ">", "clazz", ",", "String", "propertyName", ")", "{", "if", "(", "clazz", "==", "null", "||", "propertyName", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{"...
Retrieves a property of the given class of the specified name and type @param clazz The class to retrieve the property from @param propertyName The name of the property @return A PropertyDescriptor instance or null if none exists
[ "Retrieves", "a", "property", "of", "the", "given", "class", "of", "the", "specified", "name", "and", "type", "@param", "clazz", "The", "class", "to", "retrieve", "the", "property", "from", "@param", "propertyName", "The", "name", "of", "the", "property" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L421-L433
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.callSetter
public static void callSetter(Object o, String prop, Object value) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { prop = "set" + StringUtil.ucFirst(prop); Class c = o.getClass(); // Class[] cArg=new Class[]{value.getClass()}; Objec...
java
public static void callSetter(Object o, String prop, Object value) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { prop = "set" + StringUtil.ucFirst(prop); Class c = o.getClass(); // Class[] cArg=new Class[]{value.getClass()}; Objec...
[ "public", "static", "void", "callSetter", "(", "Object", "o", ",", "String", "prop", ",", "Object", "value", ")", "throws", "SecurityException", ",", "NoSuchMethodException", ",", "IllegalArgumentException", ",", "IllegalAccessException", ",", "InvocationTargetException...
to invoke a setter Method of a Object @param o Object to invoke method from @param prop Name of the Method without get @param value Value to set to the Method @throws SecurityException @throws NoSuchMethodException @throws IllegalArgumentException @throws IllegalAccessException @throws InvocationTargetException
[ "to", "invoke", "a", "setter", "Method", "of", "a", "Object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L338-L349
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationShardingDataSourceFactory.java
YamlOrchestrationShardingDataSourceFactory.createDataSource
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile); return createDataSource(dataSourceMap, config.getShardingRule(), config.getProps(), conf...
java
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile); return createDataSource(dataSourceMap, config.getShardingRule(), config.getProps(), conf...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "File", "yamlFile", ")", "throws", "SQLException", ",", "IOException", "{", "YamlOrchestrationShardingRuleConfiguration", "...
Create sharding data source. @param dataSourceMap data source map @param yamlFile YAML file for rule configuration of databases and tables sharding without data sources @return sharding data source @throws SQLException SQL exception @throws IOException IO exception
[ "Create", "sharding", "data", "source", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationShardingDataSourceFactory.java#L74-L77
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeDelete
private DiffPart decodeDelete(final int blockSize_S, final int blockSize_E) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_E: " + blockSize_E); } int s = r.read(blockSize_S); int e = r...
java
private DiffPart decodeDelete(final int blockSize_S, final int blockSize_E) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_E: " + blockSize_E); } int s = r.read(blockSize_S); int e = r...
[ "private", "DiffPart", "decodeDelete", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_E", ")", "throws", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_E", "<", "1", ")", "{", "throw", "new", "DecodingExcept...
Decodes a Delete operation. @param blockSize_S length of a S block @param blockSize_E length of a E block @return DiffPart, Delete operation @throws DecodingException if the decoding failed
[ "Decodes", "a", "Delete", "operation", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L305-L324
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqldayname
public static void sqldayname(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { if (parsedArgs.size() != 1) { throw new PSQLException(GT.tr("{0} function takes one and only one argument.", "dayname"), PSQLState.SYNTAX_ERROR); } appendCall(buf, "to_char(", ",",...
java
public static void sqldayname(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { if (parsedArgs.size() != 1) { throw new PSQLException(GT.tr("{0} function takes one and only one argument.", "dayname"), PSQLState.SYNTAX_ERROR); } appendCall(buf, "to_char(", ",",...
[ "public", "static", "void", "sqldayname", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "if", "(", "parsedArgs", ".", "size", "(", ")", "!=", "1", ")", "{", "throw", ...
dayname translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "dayname", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L353-L359
grails/grails-core
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java
DefaultGrailsApplication.getArtefactInfo
protected DefaultArtefactInfo getArtefactInfo(String artefactType, boolean create) { DefaultArtefactInfo cache = (DefaultArtefactInfo) artefactInfo.get(artefactType); if (cache == null && create) { cache = new DefaultArtefactInfo(); artefactInfo.put(artefactType, cache); ...
java
protected DefaultArtefactInfo getArtefactInfo(String artefactType, boolean create) { DefaultArtefactInfo cache = (DefaultArtefactInfo) artefactInfo.get(artefactType); if (cache == null && create) { cache = new DefaultArtefactInfo(); artefactInfo.put(artefactType, cache); ...
[ "protected", "DefaultArtefactInfo", "getArtefactInfo", "(", "String", "artefactType", ",", "boolean", "create", ")", "{", "DefaultArtefactInfo", "cache", "=", "(", "DefaultArtefactInfo", ")", "artefactInfo", ".", "get", "(", "artefactType", ")", ";", "if", "(", "c...
Get or create the cache of classes for the specified artefact type. @param artefactType The name of an artefact type @param create Set to true if you want non-existent caches to be created @return The cache of classes for the type, or null if no cache exists and create is false
[ "Get", "or", "create", "the", "cache", "of", "classes", "for", "the", "specified", "artefact", "type", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java#L603-L611
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java
DynamoDBMapper.batchWrite
public void batchWrite(List<? extends Object> objectsToWrite, List<? extends Object> objectsToDelete) { batchWrite(objectsToWrite, objectsToDelete, this.config); }
java
public void batchWrite(List<? extends Object> objectsToWrite, List<? extends Object> objectsToDelete) { batchWrite(objectsToWrite, objectsToDelete, this.config); }
[ "public", "void", "batchWrite", "(", "List", "<", "?", "extends", "Object", ">", "objectsToWrite", ",", "List", "<", "?", "extends", "Object", ">", "objectsToDelete", ")", "{", "batchWrite", "(", "objectsToWrite", ",", "objectsToDelete", ",", "this", ".", "c...
Saves and deletes the objects given using one or more calls to the {@link AmazonDynamoDB#batchWriteItem(BatchWriteItemRequest)} API. @see DynamoDBMapper#batchWrite(List, List, DynamoDBMapperConfig)
[ "Saves", "and", "deletes", "the", "objects", "given", "using", "one", "or", "more", "calls", "to", "the", "{", "@link", "AmazonDynamoDB#batchWriteItem", "(", "BatchWriteItemRequest", ")", "}", "API", "." ]
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java#L695-L697
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/InputRecordCountHelper.java
InputRecordCountHelper.readRecordCount
@Deprecated public static long readRecordCount (FileSystem fs, Path dir) throws IOException { State state = loadState(fs, dir); if (!state.contains(CompactionSlaEventHelper.RECORD_COUNT_TOTAL)) { if (fs.exists(new Path (dir, RECORD_COUNT_FILE))){ try (BufferedReader br = new BufferedReader(new ...
java
@Deprecated public static long readRecordCount (FileSystem fs, Path dir) throws IOException { State state = loadState(fs, dir); if (!state.contains(CompactionSlaEventHelper.RECORD_COUNT_TOTAL)) { if (fs.exists(new Path (dir, RECORD_COUNT_FILE))){ try (BufferedReader br = new BufferedReader(new ...
[ "@", "Deprecated", "public", "static", "long", "readRecordCount", "(", "FileSystem", "fs", ",", "Path", "dir", ")", "throws", "IOException", "{", "State", "state", "=", "loadState", "(", "fs", ",", "dir", ")", ";", "if", "(", "!", "state", ".", "contains...
Read record count from a specific directory. File name is {@link InputRecordCountHelper#STATE_FILE} @param fs file system in use @param dir directory where a state file is located @return record count
[ "Read", "record", "count", "from", "a", "specific", "directory", ".", "File", "name", "is", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/InputRecordCountHelper.java#L150-L166
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java
CProductPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { for (CProduct cProduct : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cProduct); } }
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CProduct cProduct : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cProduct); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CProduct", "cProduct", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", ...
Removes all the c products where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "c", "products", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java#L1390-L1396
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.addDocument
public ApiSuccessResponse addDocument(String mediatype, String id, AddDocumentData addDocumentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = addDocumentWithHttpInfo(mediatype, id, addDocumentData); return resp.getData(); }
java
public ApiSuccessResponse addDocument(String mediatype, String id, AddDocumentData addDocumentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = addDocumentWithHttpInfo(mediatype, id, addDocumentData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "addDocument", "(", "String", "mediatype", ",", "String", "id", ",", "AddDocumentData", "addDocumentData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "addDocumentWithHttpInfo", "(", "...
Add an attachment to the open-media interaction Add an attachment to the interaction specified in the id path parameter @param mediatype media-type of interaction to add attachment (required) @param id id of interaction (required) @param addDocumentData (required) @return ApiSuccessResponse @throws ApiException If fai...
[ "Add", "an", "attachment", "to", "the", "open", "-", "media", "interaction", "Add", "an", "attachment", "to", "the", "interaction", "specified", "in", "the", "id", "path", "parameter" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L594-L597
akberc/ceylon-maven-plugin
src/main/java/com/dgwave/car/maven/CeylonSdkDownload.java
CeylonSdkDownload.downloadSdk
private File downloadSdk(final String path) throws MojoExecutionException { File dotCeylon = new File(path); // or some other directory if (!dotCeylon.exists()) { dotCeylon.mkdirs(); } String[] segments = this.fromURL.split("/"); String file ...
java
private File downloadSdk(final String path) throws MojoExecutionException { File dotCeylon = new File(path); // or some other directory if (!dotCeylon.exists()) { dotCeylon.mkdirs(); } String[] segments = this.fromURL.split("/"); String file ...
[ "private", "File", "downloadSdk", "(", "final", "String", "path", ")", "throws", "MojoExecutionException", "{", "File", "dotCeylon", "=", "new", "File", "(", "path", ")", ";", "// or some other directory\r", "if", "(", "!", "dotCeylon", ".", "exists", "(", ")"...
Download the Ceylon SDK. @param path Where to download @return File The location of the SDK @throws MojoExecutionException In case of download error
[ "Download", "the", "Ceylon", "SDK", "." ]
train
https://github.com/akberc/ceylon-maven-plugin/blob/b7f6c4a2b24f2fa237350c9e715f4193e83415ef/src/main/java/com/dgwave/car/maven/CeylonSdkDownload.java#L100-L138
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgSaver.java
MsgSaver.urlCheckAndSave
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) { if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) { return; } List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMet...
java
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) { if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) { return; } List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMet...
[ "public", "void", "urlCheckAndSave", "(", "BasicCheckInfo", "basicCheckInfo", ",", "ParamType", "paramType", ",", "ReqUrl", "reqUrl", ",", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "!", "this", ".", "validationConfig", ".", "isFreshUrlSave", "(", ...
Url check and save. @param basicCheckInfo the basic check info @param paramType the param type @param reqUrl the req url @param type the type
[ "Url", "check", "and", "save", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgSaver.java#L74-L85
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/tag/CFMLTransformer.java
CFMLTransformer.transform
public Page transform(Factory factory, ConfigImpl config, SourceCode sc, TagLib[] tlibs, FunctionLib[] flibs, long sourceLastModified, Boolean dotNotationUpperCase, boolean returnValue, boolean ignoreScope) throws TemplateException { boolean dnuc; if (dotNotationUpperCase == null) { if (sc instanceof PageSo...
java
public Page transform(Factory factory, ConfigImpl config, SourceCode sc, TagLib[] tlibs, FunctionLib[] flibs, long sourceLastModified, Boolean dotNotationUpperCase, boolean returnValue, boolean ignoreScope) throws TemplateException { boolean dnuc; if (dotNotationUpperCase == null) { if (sc instanceof PageSo...
[ "public", "Page", "transform", "(", "Factory", "factory", ",", "ConfigImpl", "config", ",", "SourceCode", "sc", ",", "TagLib", "[", "]", "tlibs", ",", "FunctionLib", "[", "]", "flibs", ",", "long", "sourceLastModified", ",", "Boolean", "dotNotationUpperCase", ...
Startmethode zum transfomieren einer CFMLString. <br /> EBNF:<br /> <code>{body}</code> @param config @param sc CFMLString @param tlibs Tag Library Deskriptoren, nach denen innerhalb der CFML Datei geprueft werden soll. @param flibs Function Library Deskriptoren, nach denen innerhalb der Expressions der CFML Datei gep...
[ "Startmethode", "zum", "transfomieren", "einer", "CFMLString", ".", "<br", "/", ">", "EBNF", ":", "<br", "/", ">", "<code", ">", "{", "body", "}", "<", "/", "code", ">" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/tag/CFMLTransformer.java#L283-L309
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listDiagnostics
public List<HostingEnvironmentDiagnosticsInner> listDiagnostics(String resourceGroupName, String name) { return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
java
public List<HostingEnvironmentDiagnosticsInner> listDiagnostics(String resourceGroupName, String name) { return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "List", "<", "HostingEnvironmentDiagnosticsInner", ">", "listDiagnostics", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "listDiagnosticsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", ...
Get diagnostic information for an App Service Environment. Get diagnostic information for an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Get", "diagnostic", "information", "for", "an", "App", "Service", "Environment", ".", "Get", "diagnostic", "information", "for", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L1516-L1518
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/CurrentSpanUtils.java
CurrentSpanUtils.withSpan
static Runnable withSpan(Span span, boolean endSpan, Runnable runnable) { return new RunnableInSpan(span, runnable, endSpan); }
java
static Runnable withSpan(Span span, boolean endSpan, Runnable runnable) { return new RunnableInSpan(span, runnable, endSpan); }
[ "static", "Runnable", "withSpan", "(", "Span", "span", ",", "boolean", "endSpan", ",", "Runnable", "runnable", ")", "{", "return", "new", "RunnableInSpan", "(", "span", ",", "runnable", ",", "endSpan", ")", ";", "}" ]
Wraps a {@link Runnable} so that it executes with the {@code span} as the current {@code Span}. @param span the {@code Span} to be set as current. @param endSpan if {@code true} the returned {@code Runnable} will close the {@code Span}. @param runnable the {@code Runnable} to run in the {@code Span}. @return the wrapp...
[ "Wraps", "a", "{", "@link", "Runnable", "}", "so", "that", "it", "executes", "with", "the", "{", "@code", "span", "}", "as", "the", "current", "{", "@code", "Span", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/CurrentSpanUtils.java#L63-L65
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java
SharedBaseRecordTable.copyRecordInfo
public void copyRecordInfo(Record recDest, Record recSource, boolean bCopyEditMode, boolean bOnlyModifiedFields) { if (recDest == null) recDest = this.getCurrentRecord(); if (recDest != recSource) { boolean bAllowFieldChange = false; // This will disable field behavi...
java
public void copyRecordInfo(Record recDest, Record recSource, boolean bCopyEditMode, boolean bOnlyModifiedFields) { if (recDest == null) recDest = this.getCurrentRecord(); if (recDest != recSource) { boolean bAllowFieldChange = false; // This will disable field behavi...
[ "public", "void", "copyRecordInfo", "(", "Record", "recDest", ",", "Record", "recSource", ",", "boolean", "bCopyEditMode", ",", "boolean", "bOnlyModifiedFields", ")", "{", "if", "(", "recDest", "==", "null", ")", "recDest", "=", "this", ".", "getCurrentRecord", ...
Set the current table target. @param table The new current table.
[ "Set", "the", "current", "table", "target", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java#L431-L445
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Balancer.createNamenode
protected static NamenodeProtocol createNamenode(InetSocketAddress nameNodeAddr, Configuration conf) throws IOException { RetryPolicy timeoutPolicy = RetryPolicies.exponentialBackoffRetry( 5, 200, TimeUnit.MILLISECONDS); Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap = new Ha...
java
protected static NamenodeProtocol createNamenode(InetSocketAddress nameNodeAddr, Configuration conf) throws IOException { RetryPolicy timeoutPolicy = RetryPolicies.exponentialBackoffRetry( 5, 200, TimeUnit.MILLISECONDS); Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap = new Ha...
[ "protected", "static", "NamenodeProtocol", "createNamenode", "(", "InetSocketAddress", "nameNodeAddr", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "RetryPolicy", "timeoutPolicy", "=", "RetryPolicies", ".", "exponentialBackoffRetry", "(", "5", ",", "...
/* Build a NamenodeProtocol connection to the namenode and set up the retry policy
[ "/", "*", "Build", "a", "NamenodeProtocol", "connection", "to", "the", "namenode", "and", "set", "up", "the", "retry", "policy" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java#L930-L958
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/BicValueValidator.java
BicValueValidator.isValid
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { final String valueAsString; if (ignoreWhitspaces) { valueAsString = Objects.toString(pvalue, StringUtils.EMPTY).replaceAll("\\s+", StringUtils.EMPTY); } else { valueAsString = Obj...
java
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { final String valueAsString; if (ignoreWhitspaces) { valueAsString = Objects.toString(pvalue, StringUtils.EMPTY).replaceAll("\\s+", StringUtils.EMPTY); } else { valueAsString = Obj...
[ "@", "Override", "public", "final", "boolean", "isValid", "(", "final", "Object", "pvalue", ",", "final", "ConstraintValidatorContext", "pcontext", ")", "{", "final", "String", "valueAsString", ";", "if", "(", "ignoreWhitspaces", ")", "{", "valueAsString", "=", ...
{@inheritDoc} check if given string is a valid BIC. @see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext)
[ "{", "@inheritDoc", "}", "check", "if", "given", "string", "is", "a", "valid", "BIC", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/BicValueValidator.java#L63-L88
drewnoakes/metadata-extractor
Source/com/drew/imaging/jpeg/JpegSegmentReader.java
JpegSegmentReader.readSegments
@NotNull public static JpegSegmentData readSegments(@NotNull File file, @Nullable Iterable<JpegSegmentType> segmentTypes) throws JpegProcessingException, IOException { FileInputStream stream = null; try { stream = new FileInputStream(file); return readSegments(new StreamR...
java
@NotNull public static JpegSegmentData readSegments(@NotNull File file, @Nullable Iterable<JpegSegmentType> segmentTypes) throws JpegProcessingException, IOException { FileInputStream stream = null; try { stream = new FileInputStream(file); return readSegments(new StreamR...
[ "@", "NotNull", "public", "static", "JpegSegmentData", "readSegments", "(", "@", "NotNull", "File", "file", ",", "@", "Nullable", "Iterable", "<", "JpegSegmentType", ">", "segmentTypes", ")", "throws", "JpegProcessingException", ",", "IOException", "{", "FileInputSt...
Processes the provided JPEG data, and extracts the specified JPEG segments into a {@link JpegSegmentData} object. <p> Will not return SOS (start of scan) or EOI (end of image) segments. @param file a {@link File} from which the JPEG data will be read. @param segmentTypes the set of JPEG segments types that are to be r...
[ "Processes", "the", "provided", "JPEG", "data", "and", "extracts", "the", "specified", "JPEG", "segments", "into", "a", "{", "@link", "JpegSegmentData", "}", "object", ".", "<p", ">", "Will", "not", "return", "SOS", "(", "start", "of", "scan", ")", "or", ...
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/jpeg/JpegSegmentReader.java#L69-L81
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.getPointIndex
@Pure public int getPointIndex(int groupIndex, int position) { final int groupMemberCount = getPointCountInGroup(groupIndex); final int pos; if (position < 0) { pos = 0; } else if (position >= groupMemberCount) { pos = groupMemberCount - 1; } else { pos = position; } // Move the start/end index...
java
@Pure public int getPointIndex(int groupIndex, int position) { final int groupMemberCount = getPointCountInGroup(groupIndex); final int pos; if (position < 0) { pos = 0; } else if (position >= groupMemberCount) { pos = groupMemberCount - 1; } else { pos = position; } // Move the start/end index...
[ "@", "Pure", "public", "int", "getPointIndex", "(", "int", "groupIndex", ",", "int", "position", ")", "{", "final", "int", "groupMemberCount", "=", "getPointCountInGroup", "(", "groupIndex", ")", ";", "final", "int", "pos", ";", "if", "(", "position", "<", ...
Replies the global index of the point that corresponds to the position in the given group. @param groupIndex the group index. @param position is the index of the point in the group @return the global index of the point @throws IndexOutOfBoundsException in case of error.
[ "Replies", "the", "global", "index", "of", "the", "point", "that", "corresponds", "to", "the", "position", "in", "the", "given", "group", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L416-L430
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.populateResponseValues
@Sensitive public Map<String, String> populateResponseValues(@Sensitive String responseBody) { Map<String, String> responseValues = new HashMap<String, String>(); if (responseBody == null) { return responseValues; } StringTokenizer st = new StringTokenizer(responseBody,...
java
@Sensitive public Map<String, String> populateResponseValues(@Sensitive String responseBody) { Map<String, String> responseValues = new HashMap<String, String>(); if (responseBody == null) { return responseValues; } StringTokenizer st = new StringTokenizer(responseBody,...
[ "@", "Sensitive", "public", "Map", "<", "String", ",", "String", ">", "populateResponseValues", "(", "@", "Sensitive", "String", "responseBody", ")", "{", "Map", "<", "String", ",", "String", ">", "responseValues", "=", "new", "HashMap", "<", "String", ",", ...
Populates a map of key/value pairs from the response body. Because the response body may contain token secrets, that value has been annotated as @Sensitive. This method expects the responseBody value to be formatted: key=value[&key2=value2]* @param responseBody @return
[ "Populates", "a", "map", "of", "key", "/", "value", "pairs", "from", "the", "response", "body", ".", "Because", "the", "response", "body", "may", "contain", "token", "secrets", "that", "value", "has", "been", "annotated", "as", "@Sensitive", ".", "This", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L467-L491
floragunncom/search-guard
src/main/java/com/floragunn/searchguard/support/WildcardMatcher.java
WildcardMatcher.checkIndexOf
private static int checkIndexOf(final String str, final int strStartIndex, final String search) { final int endIndex = str.length() - search.length(); if (endIndex >= strStartIndex) { for (int i = strStartIndex; i <= endIndex; i++) { if (checkRegionMatches(str, i, search)) { ...
java
private static int checkIndexOf(final String str, final int strStartIndex, final String search) { final int endIndex = str.length() - search.length(); if (endIndex >= strStartIndex) { for (int i = strStartIndex; i <= endIndex; i++) { if (checkRegionMatches(str, i, search)) { ...
[ "private", "static", "int", "checkIndexOf", "(", "final", "String", "str", ",", "final", "int", "strStartIndex", ",", "final", "String", "search", ")", "{", "final", "int", "endIndex", "=", "str", ".", "length", "(", ")", "-", "search", ".", "length", "(...
Checks if one string contains another starting at a specific index using the case-sensitivity rule. <p> This method mimics parts of {@link String#indexOf(String, int)} but takes case-sensitivity into account. @param str the string to check, not null @param strStartIndex the index to start at in str @param search th...
[ "Checks", "if", "one", "string", "contains", "another", "starting", "at", "a", "specific", "index", "using", "the", "case", "-", "sensitivity", "rule", ".", "<p", ">", "This", "method", "mimics", "parts", "of", "{", "@link", "String#indexOf", "(", "String", ...
train
https://github.com/floragunncom/search-guard/blob/f9828004e11dc0e4b6da4dead1fafcf3be8f7f6d/src/main/java/com/floragunn/searchguard/support/WildcardMatcher.java#L599-L609
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsDestinationAddressFactoryImpl.java
JsDestinationAddressFactoryImpl.createJsDestinationAddress
public final JsDestinationAddress createJsDestinationAddress(String destinationName ,boolean localOnly ,SIBUuid8 meId ) ...
java
public final JsDestinationAddress createJsDestinationAddress(String destinationName ,boolean localOnly ,SIBUuid8 meId ) ...
[ "public", "final", "JsDestinationAddress", "createJsDestinationAddress", "(", "String", "destinationName", ",", "boolean", "localOnly", ",", "SIBUuid8", "meId", ")", "throws", "NullPointerException", "{", "if", "(", "destinationName", "==", "null", ")", "{", "throw", ...
Create a JsDestinationAddress from the given parameters @param destinationName The name of the SIBus Destination @param localOnly Indicates that the Destination should be limited to only the queue or mediation point on the Messaging Engine that the application is connected to, if one exists. If no such message...
[ "Create", "a", "JsDestinationAddress", "from", "the", "given", "parameters" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsDestinationAddressFactoryImpl.java#L135-L144
UrielCh/ovh-java-sdk
ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java
ApiOvhHorizonView.serviceName_domainTrust_domainTrustId_addDomainController_POST
public OvhTask serviceName_domainTrust_domainTrustId_addDomainController_POST(String serviceName, Long domainTrustId, String domain, String domainControllerIp) throws IOException { String qPath = "/horizonView/{serviceName}/domainTrust/{domainTrustId}/addDomainController"; StringBuilder sb = path(qPath, serviceName...
java
public OvhTask serviceName_domainTrust_domainTrustId_addDomainController_POST(String serviceName, Long domainTrustId, String domain, String domainControllerIp) throws IOException { String qPath = "/horizonView/{serviceName}/domainTrust/{domainTrustId}/addDomainController"; StringBuilder sb = path(qPath, serviceName...
[ "public", "OvhTask", "serviceName_domainTrust_domainTrustId_addDomainController_POST", "(", "String", "serviceName", ",", "Long", "domainTrustId", ",", "String", "domain", ",", "String", "domainControllerIp", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/...
Add a Domain Controller for this domain. REST: POST /horizonView/{serviceName}/domainTrust/{domainTrustId}/addDomainController @param domainControllerIp [required] IP of your Domain Controller @param domain [required] Name of your Domain Controller (example : domain.local) @param serviceName [required] Domain of the s...
[ "Add", "a", "Domain", "Controller", "for", "this", "domain", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L334-L342
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/SeaGlassGraphicsUtils.java
SeaGlassGraphicsUtils.drawEmphasizedText
public void drawEmphasizedText(Graphics g, Color foreground, Color emphasis, String s, int x, int y) { drawEmphasizedText(g, foreground, emphasis, s, -1, x, y); }
java
public void drawEmphasizedText(Graphics g, Color foreground, Color emphasis, String s, int x, int y) { drawEmphasizedText(g, foreground, emphasis, s, -1, x, y); }
[ "public", "void", "drawEmphasizedText", "(", "Graphics", "g", ",", "Color", "foreground", ",", "Color", "emphasis", ",", "String", "s", ",", "int", "x", ",", "int", "y", ")", "{", "drawEmphasizedText", "(", "g", ",", "foreground", ",", "emphasis", ",", "...
Draw text with an emphasized background. @param g the Graphics context to draw with. @param foreground the foreground color. @param emphasis the emphasis color. @param s the text to draw. @param x the x coordinate to draw at. @param y the y coordinate to draw at.
[ "Draw", "text", "with", "an", "emphasized", "background", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/SeaGlassGraphicsUtils.java#L343-L345
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/tregex/tsurgeon/TsurgeonPatternRoot.java
TsurgeonPatternRoot.evaluate
@Override public Tree evaluate(Tree t, TregexMatcher m) { newNodeNames = new HashMap<String,Tree>(); coindexer.setLastIndex(t); for (TsurgeonPattern child : children) { t = child.evaluate(t, m); if (t == null) { return null; } } return t; }
java
@Override public Tree evaluate(Tree t, TregexMatcher m) { newNodeNames = new HashMap<String,Tree>(); coindexer.setLastIndex(t); for (TsurgeonPattern child : children) { t = child.evaluate(t, m); if (t == null) { return null; } } return t; }
[ "@", "Override", "public", "Tree", "evaluate", "(", "Tree", "t", ",", "TregexMatcher", "m", ")", "{", "newNodeNames", "=", "new", "HashMap", "<", "String", ",", "Tree", ">", "(", ")", ";", "coindexer", ".", "setLastIndex", "(", "t", ")", ";", "for", ...
returns null if one of the surgeries eliminates the tree entirely. The operated-on tree is not to be trusted in this instance.
[ "returns", "null", "if", "one", "of", "the", "surgeries", "eliminates", "the", "tree", "entirely", ".", "The", "operated", "-", "on", "tree", "is", "not", "to", "be", "trusted", "in", "this", "instance", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/tregex/tsurgeon/TsurgeonPatternRoot.java#L28-L39
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownNtoN_F32.java
RemoveBrownNtoN_F32.compute
@Override public void compute(float x, float y, Point2D_F32 out) { removeRadial(x, y, params.radial, params.t1, params.t2, out, tol ); }
java
@Override public void compute(float x, float y, Point2D_F32 out) { removeRadial(x, y, params.radial, params.t1, params.t2, out, tol ); }
[ "@", "Override", "public", "void", "compute", "(", "float", "x", ",", "float", "y", ",", "Point2D_F32", "out", ")", "{", "removeRadial", "(", "x", ",", "y", ",", "params", ".", "radial", ",", "params", ".", "t1", ",", "params", ".", "t2", ",", "out...
Removes radial distortion @param x Distorted x-coordinate normalized image coordinate @param y Distorted y-coordinate normalized image coordinate @param out Undistorted normalized coordinate.
[ "Removes", "radial", "distortion" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownNtoN_F32.java#L60-L64
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java
DelegateView.paint
@Override public void paint(Graphics g, Shape allocation) { if (view != null) { view.paint(g, allocation); } }
java
@Override public void paint(Graphics g, Shape allocation) { if (view != null) { view.paint(g, allocation); } }
[ "@", "Override", "public", "void", "paint", "(", "Graphics", "g", ",", "Shape", "allocation", ")", "{", "if", "(", "view", "!=", "null", ")", "{", "view", ".", "paint", "(", "g", ",", "allocation", ")", ";", "}", "}" ]
Renders the view. @param g the graphics context @param allocation the region to render into
[ "Renders", "the", "view", "." ]
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java#L278-L285
xiancloud/xian
xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/ScopeService.java
ScopeService.deleteScope
public String deleteScope(String scopeName) throws OAuthException { String responseMsg; Scope foundScope = DBManagerFactory.getInstance().findScope(scopeName).blockingGet(); if (foundScope == null) { LOG.error("scope does not exist"); throw new OAuthException(SCOPE_NOT_EX...
java
public String deleteScope(String scopeName) throws OAuthException { String responseMsg; Scope foundScope = DBManagerFactory.getInstance().findScope(scopeName).blockingGet(); if (foundScope == null) { LOG.error("scope does not exist"); throw new OAuthException(SCOPE_NOT_EX...
[ "public", "String", "deleteScope", "(", "String", "scopeName", ")", "throws", "OAuthException", "{", "String", "responseMsg", ";", "Scope", "foundScope", "=", "DBManagerFactory", ".", "getInstance", "(", ")", ".", "findScope", "(", "scopeName", ")", ".", "blocki...
Deletes a scope. If the scope does not exists, returns an error. @param scopeName scopeName @return String message that will be returned in the response
[ "Deletes", "a", "scope", ".", "If", "the", "scope", "does", "not", "exists", "returns", "an", "error", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/ScopeService.java#L251-L272
FXMisc/WellBehavedFX
src/main/java/org/fxmisc/wellbehaved/event/template/InputMapTemplate.java
InputMapTemplate.consumeWhen
public static <S, T extends Event, U extends T> InputMapTemplate<S, U> consumeWhen( EventPattern<? super T, ? extends U> eventPattern, Predicate<? super S> condition, BiConsumer<? super S, ? super U> action) { return process(eventPattern, (s, u) -> { if(condition....
java
public static <S, T extends Event, U extends T> InputMapTemplate<S, U> consumeWhen( EventPattern<? super T, ? extends U> eventPattern, Predicate<? super S> condition, BiConsumer<? super S, ? super U> action) { return process(eventPattern, (s, u) -> { if(condition....
[ "public", "static", "<", "S", ",", "T", "extends", "Event", ",", "U", "extends", "T", ">", "InputMapTemplate", "<", "S", ",", "U", ">", "consumeWhen", "(", "EventPattern", "<", "?", "super", "T", ",", "?", "extends", "U", ">", "eventPattern", ",", "P...
If the given {@link EventPattern} matches the given event type and {@code condition} is true, consumes the event and does not attempt to match additional {@code InputMap}s (if they exist).
[ "If", "the", "given", "{" ]
train
https://github.com/FXMisc/WellBehavedFX/blob/ca889734481f5439655ca8deb6f742964b5654b0/src/main/java/org/fxmisc/wellbehaved/event/template/InputMapTemplate.java#L260-L272
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/TraversalContext.java
TraversalContext.proceedToRelationships
Builder<BE, Relationship> proceedToRelationships(Relationships.Direction direction) { return new Builder<>(this, hop(), Query.filter(), Relationship.class) .hop(new SwitchElementType(direction, false)); }
java
Builder<BE, Relationship> proceedToRelationships(Relationships.Direction direction) { return new Builder<>(this, hop(), Query.filter(), Relationship.class) .hop(new SwitchElementType(direction, false)); }
[ "Builder", "<", "BE", ",", "Relationship", ">", "proceedToRelationships", "(", "Relationships", ".", "Direction", "direction", ")", "{", "return", "new", "Builder", "<>", "(", "this", ",", "hop", "(", ")", ",", "Query", ".", "filter", "(", ")", ",", "Rel...
The new context will have the source path composed by appending current select candidates to the current source path. The new context will have select candidates such that it will select the relationships in given direction stemming from the entities on the new source path. @param direction the direction of the relati...
[ "The", "new", "context", "will", "have", "the", "source", "path", "composed", "by", "appending", "current", "select", "candidates", "to", "the", "current", "source", "path", ".", "The", "new", "context", "will", "have", "select", "candidates", "such", "that", ...
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/TraversalContext.java#L217-L220
google/closure-compiler
src/com/google/javascript/jscomp/FunctionInjector.java
FunctionInjector.estimateCallCost
private static int estimateCallCost(Node fnNode, boolean referencesThis) { Node argsNode = NodeUtil.getFunctionParameters(fnNode); int numArgs = argsNode.getChildCount(); int callCost = NAME_COST_ESTIMATE + PAREN_COST; if (numArgs > 0) { callCost += (numArgs * NAME_COST_ESTIMATE) + ((numArgs - 1)...
java
private static int estimateCallCost(Node fnNode, boolean referencesThis) { Node argsNode = NodeUtil.getFunctionParameters(fnNode); int numArgs = argsNode.getChildCount(); int callCost = NAME_COST_ESTIMATE + PAREN_COST; if (numArgs > 0) { callCost += (numArgs * NAME_COST_ESTIMATE) + ((numArgs - 1)...
[ "private", "static", "int", "estimateCallCost", "(", "Node", "fnNode", ",", "boolean", "referencesThis", ")", "{", "Node", "argsNode", "=", "NodeUtil", ".", "getFunctionParameters", "(", "fnNode", ")", ";", "int", "numArgs", "=", "argsNode", ".", "getChildCount"...
Gets an estimate of the cost in characters of making the function call: the sum of the identifiers and the separators. @param referencesThis
[ "Gets", "an", "estimate", "of", "the", "cost", "in", "characters", "of", "making", "the", "function", "call", ":", "the", "sum", "of", "the", "identifiers", "and", "the", "separators", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FunctionInjector.java#L923-L941
googleapis/google-cloud-java
google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
DeviceManagerClient.modifyCloudToDeviceConfig
public final DeviceConfig modifyCloudToDeviceConfig(String name, ByteString binaryData) { ModifyCloudToDeviceConfigRequest request = ModifyCloudToDeviceConfigRequest.newBuilder() .setName(name) .setBinaryData(binaryData) .build(); return modifyCloudToDeviceConfig(req...
java
public final DeviceConfig modifyCloudToDeviceConfig(String name, ByteString binaryData) { ModifyCloudToDeviceConfigRequest request = ModifyCloudToDeviceConfigRequest.newBuilder() .setName(name) .setBinaryData(binaryData) .build(); return modifyCloudToDeviceConfig(req...
[ "public", "final", "DeviceConfig", "modifyCloudToDeviceConfig", "(", "String", "name", ",", "ByteString", "binaryData", ")", "{", "ModifyCloudToDeviceConfigRequest", "request", "=", "ModifyCloudToDeviceConfigRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "n...
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata. <p>Sample code: <pre><code> try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { DeviceName name = DeviceName.of("[PROJECT]", "[LO...
[ "Modifies", "the", "configuration", "for", "the", "device", "which", "is", "eventually", "sent", "from", "the", "Cloud", "IoT", "Core", "servers", ".", "Returns", "the", "modified", "configuration", "version", "and", "its", "metadata", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java#L1241-L1249
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDefinitionList.java
WDefinitionList.addTerm
public void addTerm(final String term, final WComponent... data) { for (WComponent component : data) { if (component != null) { content.add(component, term); } } // If the term doesn't exist, we may need to add a dummy component if (getComponentsForTerm(term).isEmpty()) { content.add(new DefaultWC...
java
public void addTerm(final String term, final WComponent... data) { for (WComponent component : data) { if (component != null) { content.add(component, term); } } // If the term doesn't exist, we may need to add a dummy component if (getComponentsForTerm(term).isEmpty()) { content.add(new DefaultWC...
[ "public", "void", "addTerm", "(", "final", "String", "term", ",", "final", "WComponent", "...", "data", ")", "{", "for", "(", "WComponent", "component", ":", "data", ")", "{", "if", "(", "component", "!=", "null", ")", "{", "content", ".", "add", "(", ...
Adds a term to this definition list. If there is an existing term, the component is added to the list of data for the term. @param term the term to add. @param data the term data.
[ "Adds", "a", "term", "to", "this", "definition", "list", ".", "If", "there", "is", "an", "existing", "term", "the", "component", "is", "added", "to", "the", "list", "of", "data", "for", "the", "term", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDefinitionList.java#L102-L113
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.retryPrepareAndExecuteOnce
protected Observable<AsyncN1qlQueryResult> retryPrepareAndExecuteOnce(Throwable error, N1qlQuery query, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { if (error instanceof QueryExecutionException && shouldRetry(((QueryExecutionException) error).getN1qlError())) { queryC...
java
protected Observable<AsyncN1qlQueryResult> retryPrepareAndExecuteOnce(Throwable error, N1qlQuery query, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { if (error instanceof QueryExecutionException && shouldRetry(((QueryExecutionException) error).getN1qlError())) { queryC...
[ "protected", "Observable", "<", "AsyncN1qlQueryResult", ">", "retryPrepareAndExecuteOnce", "(", "Throwable", "error", ",", "N1qlQuery", "query", ",", "CouchbaseEnvironment", "env", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "if", "(", "error", ...
In case the error warrants a retry, issue a PREPARE, followed by an update of the cache and an EXECUTE. Any failure in the EXECUTE won't continue the retry cycle.
[ "In", "case", "the", "error", "warrants", "a", "retry", "issue", "a", "PREPARE", "followed", "by", "an", "update", "of", "the", "cache", "and", "an", "EXECUTE", ".", "Any", "failure", "in", "the", "EXECUTE", "won", "t", "continue", "the", "retry", "cycle...
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L384-L391
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/AccountManager.java
AccountManager.setEmail
@CheckReturnValue public AccountManager setEmail(String email, String currentPassword) { Checks.notNull(email, "email"); this.currentPassword = currentPassword; this.email = email; set |= EMAIL; return this; }
java
@CheckReturnValue public AccountManager setEmail(String email, String currentPassword) { Checks.notNull(email, "email"); this.currentPassword = currentPassword; this.email = email; set |= EMAIL; return this; }
[ "@", "CheckReturnValue", "public", "AccountManager", "setEmail", "(", "String", "email", ",", "String", "currentPassword", ")", "{", "Checks", ".", "notNull", "(", "email", ",", "\"email\"", ")", ";", "this", ".", "currentPassword", "=", "currentPassword", ";", ...
Sets the email for the currently logged in client account. @param email The new email @param currentPassword The <b>valid</b> current password for the represented account @throws net.dv8tion.jda.core.exceptions.AccountTypeException If the currently logged in account is not from {@link net.dv8tion.jda.core.AccountTy...
[ "Sets", "the", "email", "for", "the", "currently", "logged", "in", "client", "account", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/AccountManager.java#L278-L286
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java
LogAnalyticsInner.exportThrottledRequests
public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().last().body(); }
java
public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().last().body(); }
[ "public", "LogAnalyticsOperationResultInner", "exportThrottledRequests", "(", "String", "location", ",", "ThrottledRequestsInput", "parameters", ")", "{", "return", "exportThrottledRequestsWithServiceResponseAsync", "(", "location", ",", "parameters", ")", ".", "toBlocking", ...
Export logs that show total throttled Api requests for this subscription in the given time window. @param location The location upon which virtual-machine-sizes is queried. @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. @throws IllegalArgumentException thrown if parameters fail the...
[ "Export", "logs", "that", "show", "total", "throttled", "Api", "requests", "for", "this", "subscription", "in", "the", "given", "time", "window", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java#L244-L246
interedition/collatex
collatex-core/src/main/java/eu/interedition/collatex/dekker/island/IslandConflictResolver.java
IslandConflictResolver.resolveConflictsBySelectingPreferredIslands
private void resolveConflictsBySelectingPreferredIslands(IslandSelection selection, Map<IslandCompetition, List<Island>> islandConflictMap) { // First select competing islands that are on the ideal line LOG.fine("addBestOfCompeting with competingIslandsOnIdealLine"); makeDistanceMap(islandConfli...
java
private void resolveConflictsBySelectingPreferredIslands(IslandSelection selection, Map<IslandCompetition, List<Island>> islandConflictMap) { // First select competing islands that are on the ideal line LOG.fine("addBestOfCompeting with competingIslandsOnIdealLine"); makeDistanceMap(islandConfli...
[ "private", "void", "resolveConflictsBySelectingPreferredIslands", "(", "IslandSelection", "selection", ",", "Map", "<", "IslandCompetition", ",", "List", "<", "Island", ">", ">", "islandConflictMap", ")", "{", "// First select competing islands that are on the ideal line", "L...
/* The preferred Islands are directly added to the result Archipelago If we want to re-factor this into a pull construction rather then a push construction we have to move this code out of this method and move it to the caller class
[ "/", "*", "The", "preferred", "Islands", "are", "directly", "added", "to", "the", "result", "Archipelago", "If", "we", "want", "to", "re", "-", "factor", "this", "into", "a", "pull", "construction", "rather", "then", "a", "push", "construction", "we", "hav...
train
https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/dekker/island/IslandConflictResolver.java#L98-L119
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.beginListAvailableProviders
public AvailableProvidersListInner beginListAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
java
public AvailableProvidersListInner beginListAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
[ "public", "AvailableProvidersListInner", "beginListAvailableProviders", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "AvailableProvidersListParameters", "parameters", ")", "{", "return", "beginListAvailableProvidersWithServiceResponseAsync", "(", "r...
Lists all available internet service providers for a specified Azure region. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that scope the list of available providers. @throws IllegalArgumentExcep...
[ "Lists", "all", "available", "internet", "service", "providers", "for", "a", "specified", "Azure", "region", "." ]
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#L2551-L2553
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/apple/XcodeProjectWriter.java
XcodeProjectWriter.addDocumentationGroup
private PBXObjectRef addDocumentationGroup(final Map objects, final String sourceTree) { final List productsList = new ArrayList(); final PBXObjectRef products = createPBXGroup("Documentation", sourceTree, productsList); objects.put(products.getID(), products.getProperties()); return products; }
java
private PBXObjectRef addDocumentationGroup(final Map objects, final String sourceTree) { final List productsList = new ArrayList(); final PBXObjectRef products = createPBXGroup("Documentation", sourceTree, productsList); objects.put(products.getID(), products.getProperties()); return products; }
[ "private", "PBXObjectRef", "addDocumentationGroup", "(", "final", "Map", "objects", ",", "final", "String", "sourceTree", ")", "{", "final", "List", "productsList", "=", "new", "ArrayList", "(", ")", ";", "final", "PBXObjectRef", "products", "=", "createPBXGroup",...
Add documentation group to map of objects. @param objects object map. @param sourceTree source tree description. @return documentation group.
[ "Add", "documentation", "group", "to", "map", "of", "objects", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/apple/XcodeProjectWriter.java#L474-L479