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
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Member.java
Member.getTotalDetailEstimate
public Double getTotalDetailEstimate(WorkitemFilter filter) { filter = (filter != null) ? filter : new WorkitemFilter(); return getSum("OwnedWorkitems", filter, "DetailEstimate"); }
java
public Double getTotalDetailEstimate(WorkitemFilter filter) { filter = (filter != null) ? filter : new WorkitemFilter(); return getSum("OwnedWorkitems", filter, "DetailEstimate"); }
[ "public", "Double", "getTotalDetailEstimate", "(", "WorkitemFilter", "filter", ")", "{", "filter", "=", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "WorkitemFilter", "(", ")", ";", "return", "getSum", "(", "\"OwnedWorkitems\"", ",", "filter", ...
Return the total detail estimate for all workitems owned by this member optionally filtered. @param filter Criteria to filter workitems on. @return total detail estimate of selected Workitems.
[ "Return", "the", "total", "detail", "estimate", "for", "all", "workitems", "owned", "by", "this", "member", "optionally", "filtered", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Member.java#L296-L300
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/ZipUtils.java
ZipUtils.unzip
public static void unzip(final File zip, final File patchDir) throws IOException { try (final ZipFile zipFile = new ZipFile(zip)){ unzip(zipFile, patchDir); } }
java
public static void unzip(final File zip, final File patchDir) throws IOException { try (final ZipFile zipFile = new ZipFile(zip)){ unzip(zipFile, patchDir); } }
[ "public", "static", "void", "unzip", "(", "final", "File", "zip", ",", "final", "File", "patchDir", ")", "throws", "IOException", "{", "try", "(", "final", "ZipFile", "zipFile", "=", "new", "ZipFile", "(", "zip", ")", ")", "{", "unzip", "(", "zipFile", ...
unpack... @param zip the zip @param patchDir the patch dir @throws IOException
[ "unpack", "..." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/ZipUtils.java#L100-L104
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MessagesApi.java
MessagesApi.getNormalizedMessagesAsync
public com.squareup.okhttp.Call getNormalizedMessagesAsync(String uid, String sdid, String mid, String fieldPresence, String filter, String offset, Integer count, Long startDate, Long endDate, String order, final ApiCallback<NormalizedMessagesEnvelope> callback) throws ApiException { ProgressResponseBody.Progr...
java
public com.squareup.okhttp.Call getNormalizedMessagesAsync(String uid, String sdid, String mid, String fieldPresence, String filter, String offset, Integer count, Long startDate, Long endDate, String order, final ApiCallback<NormalizedMessagesEnvelope> callback) throws ApiException { ProgressResponseBody.Progr...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "getNormalizedMessagesAsync", "(", "String", "uid", ",", "String", "sdid", ",", "String", "mid", ",", "String", "fieldPresence", ",", "String", "filter", ",", "String", "offset", ",", "Integer", "...
Get Normalized Messages (asynchronously) Get the messages normalized @param uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to. (optional) @param sdid Source device ID of the messages being sea...
[ "Get", "Normalized", "Messages", "(", "asynchronously", ")", "Get", "the", "messages", "normalized" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MessagesApi.java#L1044-L1069
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readNewestUrlNameForId
public String readNewestUrlNameForId(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException { List<CmsUrlNameMappingEntry> entries = getVfsDriver(dbc).readUrlNameMappingEntries( dbc, dbc.currentProject().isOnlineProject(), CmsUrlNameMappingFilter.ALL.filterStructureId(i...
java
public String readNewestUrlNameForId(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException { List<CmsUrlNameMappingEntry> entries = getVfsDriver(dbc).readUrlNameMappingEntries( dbc, dbc.currentProject().isOnlineProject(), CmsUrlNameMappingFilter.ALL.filterStructureId(i...
[ "public", "String", "readNewestUrlNameForId", "(", "CmsDbContext", "dbc", ",", "CmsUUID", "id", ")", "throws", "CmsDataAccessException", "{", "List", "<", "CmsUrlNameMappingEntry", ">", "entries", "=", "getVfsDriver", "(", "dbc", ")", ".", "readUrlNameMappingEntries",...
Reads the URL name which has been most recently mapped to the given structure id, or null if no URL name is mapped to the id.<p> @param dbc the current database context @param id a structure id @return the name which has been most recently mapped to the given structure id @throws CmsDataAccessException if something g...
[ "Reads", "the", "URL", "name", "which", "has", "been", "most", "recently", "mapped", "to", "the", "given", "structure", "id", "or", "null", "if", "no", "URL", "name", "is", "mapped", "to", "the", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7071-L7084
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/TriMarkers.java
TriMarkers.getSteepestVector
public static Vector3D getSteepestVector(final Vector3D normal, final double epsilon) { if (Math.abs(normal.getX()) < epsilon && Math.abs(normal.getY()) < epsilon) { return new Vector3D(0, 0, 0); } Vector3D slope; if (Math.abs(normal.getX()) < epsilon) { slope = n...
java
public static Vector3D getSteepestVector(final Vector3D normal, final double epsilon) { if (Math.abs(normal.getX()) < epsilon && Math.abs(normal.getY()) < epsilon) { return new Vector3D(0, 0, 0); } Vector3D slope; if (Math.abs(normal.getX()) < epsilon) { slope = n...
[ "public", "static", "Vector3D", "getSteepestVector", "(", "final", "Vector3D", "normal", ",", "final", "double", "epsilon", ")", "{", "if", "(", "Math", ".", "abs", "(", "normal", ".", "getX", "(", ")", ")", "<", "epsilon", "&&", "Math", ".", "abs", "(...
Get the vector with the highest down slope in the plan. @param normal @param epsilon @return the steepest vector.
[ "Get", "the", "vector", "with", "the", "highest", "down", "slope", "in", "the", "plan", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/TriMarkers.java#L190-L209
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java
RingbufferContainer.readMany
public long readMany(long beginSequence, ReadResultSetImpl result) { checkReadSequence(beginSequence); long seq = beginSequence; while (seq <= ringbuffer.tailSequence()) { result.addItem(seq, readOrLoadItem(seq)); seq++; if (result.isMaxSizeReached()) { ...
java
public long readMany(long beginSequence, ReadResultSetImpl result) { checkReadSequence(beginSequence); long seq = beginSequence; while (seq <= ringbuffer.tailSequence()) { result.addItem(seq, readOrLoadItem(seq)); seq++; if (result.isMaxSizeReached()) { ...
[ "public", "long", "readMany", "(", "long", "beginSequence", ",", "ReadResultSetImpl", "result", ")", "{", "checkReadSequence", "(", "beginSequence", ")", ";", "long", "seq", "=", "beginSequence", ";", "while", "(", "seq", "<=", "ringbuffer", ".", "tailSequence",...
Reads multiple items from the ring buffer and adds them to {@code result} in the stored format. If an item is not available, it will try and load it from the ringbuffer store. @param beginSequence the sequence of the first item to read. @param result the List where the result are stored in. @return returns the ...
[ "Reads", "multiple", "items", "from", "the", "ring", "buffer", "and", "adds", "them", "to", "{", "@code", "result", "}", "in", "the", "stored", "format", ".", "If", "an", "item", "is", "not", "available", "it", "will", "try", "and", "load", "it", "from...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L407-L420
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/common/base/Objects.java
Objects.deepCopy
public static <T extends Serializable> T deepCopy(T original) { if (original == null) { return null; } try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); final ObjectOutputStream oas = new ObjectOutputStream(baos); oas.writeO...
java
public static <T extends Serializable> T deepCopy(T original) { if (original == null) { return null; } try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); final ObjectOutputStream oas = new ObjectOutputStream(baos); oas.writeO...
[ "public", "static", "<", "T", "extends", "Serializable", ">", "T", "deepCopy", "(", "T", "original", ")", "{", "if", "(", "original", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "final", "ByteArrayOutputStream", "baos", "=", "new", ...
Provides a means to copy objects that do not implement Cloneable. Performs a deep copy where the copied object has no references to the original object for any object that implements Serializable. If the original is {@code null}, this method just returns {@code null}. @param <T> the type of the object to be cloned @pa...
[ "Provides", "a", "means", "to", "copy", "objects", "that", "do", "not", "implement", "Cloneable", ".", "Performs", "a", "deep", "copy", "where", "the", "copied", "object", "has", "no", "references", "to", "the", "original", "object", "for", "any", "object", ...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/common/base/Objects.java#L61-L77
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java
GVRShader.generateSignature
public String generateSignature(HashMap<String, Integer> defined, GVRLight[] lightlist) { return getClass().getSimpleName(); }
java
public String generateSignature(HashMap<String, Integer> defined, GVRLight[] lightlist) { return getClass().getSimpleName(); }
[ "public", "String", "generateSignature", "(", "HashMap", "<", "String", ",", "Integer", ">", "defined", ",", "GVRLight", "[", "]", "lightlist", ")", "{", "return", "getClass", "(", ")", ".", "getSimpleName", "(", ")", ";", "}" ]
Create a unique signature for this shader. The signature for simple shaders is just the class name. For the more complex shaders generated by GVRShaderTemplate the signature includes information about the vertex attributes, uniforms, textures and lights used by the shader variant. @param defined names to be defined fo...
[ "Create", "a", "unique", "signature", "for", "this", "shader", ".", "The", "signature", "for", "simple", "shaders", "is", "just", "the", "class", "name", ".", "For", "the", "more", "complex", "shaders", "generated", "by", "GVRShaderTemplate", "the", "signature...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java#L244-L247
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.lockImmutabilityPolicy
public ImmutabilityPolicyInner lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); }
java
public ImmutabilityPolicyInner lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); }
[ "public", "ImmutabilityPolicyInner", "lockImmutabilityPolicy", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ")", "{", "return", "lockImmutabilityPolicyWithServiceResponseAsync", "(", "resourceGroup...
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name ...
[ "Sets", "the", "ImmutabilityPolicy", "to", "Locked", "state", ".", "The", "only", "action", "allowed", "on", "a", "Locked", "policy", "is", "ExtendImmutabilityPolicy", "action", ".", "ETag", "in", "If", "-", "Match", "is", "required", "for", "this", "operation...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1486-L1488
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebPage.java
WebPage.doPostWithSearch
protected void doPostWithSearch(WebSiteRequest req, HttpServletResponse resp) throws ServletException, IOException, SQLException { String query=req.getParameter("search_query"); String searchTarget=req.getParameter("search_target"); WebPageLayout layout=getWebPageLayout(req); if(query!=null && searchTarget!=nul...
java
protected void doPostWithSearch(WebSiteRequest req, HttpServletResponse resp) throws ServletException, IOException, SQLException { String query=req.getParameter("search_query"); String searchTarget=req.getParameter("search_target"); WebPageLayout layout=getWebPageLayout(req); if(query!=null && searchTarget!=nul...
[ "protected", "void", "doPostWithSearch", "(", "WebSiteRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", ",", "SQLException", "{", "String", "query", "=", "req", ".", "getParameter", "(", "\"search_query\"", "...
Handles any search posts, sends everything else on to <code>doPost(WebSiteRequest,HttpServletResponse)</code>. The search assumes the search parameters of <code>search_query</code> and <code>search_target</code>. Both these values must be present for a search to be performed. Search target may be either <code>"this_a...
[ "Handles", "any", "search", "posts", "sends", "everything", "else", "on", "to", "<code", ">", "doPost", "(", "WebSiteRequest", "HttpServletResponse", ")", "<", "/", "code", ">", ".", "The", "search", "assumes", "the", "search", "parameters", "of", "<code", "...
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebPage.java#L428-L459
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/RPC.java
RPC.getServer
public static Server getServer(final Object instance, final String bindAddress, final int port, Configuration conf) throws IOException { return getServer(instance, bindAddress, port, 1, false, conf); }
java
public static Server getServer(final Object instance, final String bindAddress, final int port, Configuration conf) throws IOException { return getServer(instance, bindAddress, port, 1, false, conf); }
[ "public", "static", "Server", "getServer", "(", "final", "Object", "instance", ",", "final", "String", "bindAddress", ",", "final", "int", "port", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "return", "getServer", "(", "instance", ",", "bi...
Construct a server for a protocol implementation instance listening on a port and address.
[ "Construct", "a", "server", "for", "a", "protocol", "implementation", "instance", "listening", "on", "a", "port", "and", "address", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/RPC.java#L716-L719
threerings/nenya
core/src/main/java/com/threerings/media/tile/TileSet.java
TileSet.initTile
protected void initTile (Tile tile, int tileIndex, Colorization[] zations) { if (_improv != null) { tile.setImage(getTileMirage(tileIndex, zations)); } }
java
protected void initTile (Tile tile, int tileIndex, Colorization[] zations) { if (_improv != null) { tile.setImage(getTileMirage(tileIndex, zations)); } }
[ "protected", "void", "initTile", "(", "Tile", "tile", ",", "int", "tileIndex", ",", "Colorization", "[", "]", "zations", ")", "{", "if", "(", "_improv", "!=", "null", ")", "{", "tile", ".", "setImage", "(", "getTileMirage", "(", "tileIndex", ",", "zation...
Initializes the supplied tile. Derived classes can override this method to add in their own tile information, but should be sure to call <code>super.initTile()</code>. @param tile the tile to initialize. @param tileIndex the index of the tile. @param zations the colorizations to be used when generating the tile image.
[ "Initializes", "the", "supplied", "tile", ".", "Derived", "classes", "can", "override", "this", "method", "to", "add", "in", "their", "own", "tile", "information", "but", "should", "be", "sure", "to", "call", "<code", ">", "super", ".", "initTile", "()", "...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/TileSet.java#L362-L367
yavijava/yavijava
src/main/java/com/vmware/vim25/mox/VirtualMachineDeviceManager.java
VirtualMachineDeviceManager.removeDevice
public Task removeDevice(VirtualDevice device, boolean destroyDeviceBacking) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ArrayList<VirtualDevice> deviceList = new Array...
java
public Task removeDevice(VirtualDevice device, boolean destroyDeviceBacking) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ArrayList<VirtualDevice> deviceList = new Array...
[ "public", "Task", "removeDevice", "(", "VirtualDevice", "device", ",", "boolean", "destroyDeviceBacking", ")", "throws", "InvalidName", ",", "VmConfigFault", ",", "DuplicateName", ",", "TaskInProgress", ",", "FileFault", ",", "InvalidState", ",", "ConcurrentAccess", "...
Remove the device. Make sure the VM is powered off before calling this method. If destroyDeviceBacking is true, it deletes backings for example files in datastore. BE CAREFUL!
[ "Remove", "the", "device", ".", "Make", "sure", "the", "VM", "is", "powered", "off", "before", "calling", "this", "method", ".", "If", "destroyDeviceBacking", "is", "true", "it", "deletes", "backings", "for", "example", "files", "in", "datastore", ".", "BE",...
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mox/VirtualMachineDeviceManager.java#L673-L677
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getKeysAsync
public Observable<Page<KeyItem>> getKeysAsync(final String vaultBaseUrl, final Integer maxresults) { return getKeysWithServiceResponseAsync(vaultBaseUrl, maxresults) .map(new Func1<ServiceResponse<Page<KeyItem>>, Page<KeyItem>>() { @Override public Page<KeyItem> call(...
java
public Observable<Page<KeyItem>> getKeysAsync(final String vaultBaseUrl, final Integer maxresults) { return getKeysWithServiceResponseAsync(vaultBaseUrl, maxresults) .map(new Func1<ServiceResponse<Page<KeyItem>>, Page<KeyItem>>() { @Override public Page<KeyItem> call(...
[ "public", "Observable", "<", "Page", "<", "KeyItem", ">", ">", "getKeysAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getKeysWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "maxresults", ")", ".", ...
List keys in the specified vault. Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier, attributes, and tags are provided in the response. Individual versions of a ke...
[ "List", "keys", "in", "the", "specified", "vault", ".", "Retrieves", "a", "list", "of", "the", "keys", "in", "the", "Key", "Vault", "as", "JSON", "Web", "Key", "structures", "that", "contain", "the", "public", "part", "of", "a", "stored", "key", ".", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1883-L1891
jamesdbloom/mockserver
mockserver-core/src/main/java/org/mockserver/model/HttpResponse.java
HttpResponse.withHeader
public HttpResponse withHeader(NottableString name, NottableString... values) { this.headers.withEntry(header(name, values)); return this; }
java
public HttpResponse withHeader(NottableString name, NottableString... values) { this.headers.withEntry(header(name, values)); return this; }
[ "public", "HttpResponse", "withHeader", "(", "NottableString", "name", ",", "NottableString", "...", "values", ")", "{", "this", ".", "headers", ".", "withEntry", "(", "header", "(", "name", ",", "values", ")", ")", ";", "return", "this", ";", "}" ]
Add a header to return as a Header object, if a header with the same name already exists this will NOT be modified but two headers will exist @param name the header name as a NottableString @param values the header values which can be a varags of NottableStrings
[ "Add", "a", "header", "to", "return", "as", "a", "Header", "object", "if", "a", "header", "with", "the", "same", "name", "already", "exists", "this", "will", "NOT", "be", "modified", "but", "two", "headers", "will", "exist" ]
train
https://github.com/jamesdbloom/mockserver/blob/8b84fdd877e57b4eb780c9f8c8b1d65bcb448025/mockserver-core/src/main/java/org/mockserver/model/HttpResponse.java#L235-L238
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngine.java
ExecutionEngine.crashVoltDB
public static void crashVoltDB(String reason, String traces[], String filename, int lineno) { VoltLogger hostLog = new VoltLogger("HOST"); String fn = (filename == null) ? "unknown" : filename; String re = (reason == null) ? "Fatal EE error." : reason; hostLog.fatal(re + " In " + fn + ":...
java
public static void crashVoltDB(String reason, String traces[], String filename, int lineno) { VoltLogger hostLog = new VoltLogger("HOST"); String fn = (filename == null) ? "unknown" : filename; String re = (reason == null) ? "Fatal EE error." : reason; hostLog.fatal(re + " In " + fn + ":...
[ "public", "static", "void", "crashVoltDB", "(", "String", "reason", ",", "String", "traces", "[", "]", ",", "String", "filename", ",", "int", "lineno", ")", "{", "VoltLogger", "hostLog", "=", "new", "VoltLogger", "(", "\"HOST\"", ")", ";", "String", "fn", ...
Call VoltDB.crashVoltDB on behalf of the EE @param reason Reason the EE crashed
[ "Call", "VoltDB", ".", "crashVoltDB", "on", "behalf", "of", "the", "EE" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L385-L396
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_ns_runningconfig.java
ns_ns_runningconfig.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_ns_runningconfig_responses result = (ns_ns_runningconfig_responses) service.get_payload_formatter().string_to_resource(ns_ns_runningconfig_responses.class, response); if(result.errorcode != 0) { ...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_ns_runningconfig_responses result = (ns_ns_runningconfig_responses) service.get_payload_formatter().string_to_resource(ns_ns_runningconfig_responses.class, response); if(result.errorcode != 0) { ...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ns_ns_runningconfig_responses", "result", "=", "(", "ns_ns_runningconfig_responses", ")", "service", ".", "ge...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_ns_runningconfig.java#L215-L232
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_monitor.java
xen_health_monitor.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_monitor_responses result = (xen_health_monitor_responses) service.get_payload_formatter().string_to_resource(xen_health_monitor_responses.class, response); if(result.errorcode != 0) { i...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_monitor_responses result = (xen_health_monitor_responses) service.get_payload_formatter().string_to_resource(xen_health_monitor_responses.class, response); if(result.errorcode != 0) { i...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_health_monitor_responses", "result", "=", "(", "xen_health_monitor_responses", ")", "service", ".", "get_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_monitor.java#L292-L309
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyChildMoved
@UiThread public void notifyChildMoved(int parentPosition, int fromChildPosition, int toChildPosition) { P parent = mParentList.get(parentPosition); int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);...
java
@UiThread public void notifyChildMoved(int parentPosition, int fromChildPosition, int toChildPosition) { P parent = mParentList.get(parentPosition); int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);...
[ "@", "UiThread", "public", "void", "notifyChildMoved", "(", "int", "parentPosition", ",", "int", "fromChildPosition", ",", "int", "toChildPosition", ")", "{", "P", "parent", "=", "mParentList", ".", "get", "(", "parentPosition", ")", ";", "int", "flatParentPosit...
Notify any registered observers that the child list item contained within the parent at {@code parentPosition} has moved from {@code fromChildPosition} to {@code toChildPosition}. <p> <p>This is a structural change event. Representations of other existing items in the data set are still considered up to date and will n...
[ "Notify", "any", "registered", "observers", "that", "the", "child", "list", "item", "contained", "within", "the", "parent", "at", "{", "@code", "parentPosition", "}", "has", "moved", "from", "{", "@code", "fromChildPosition", "}", "to", "{", "@code", "toChildP...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1297-L1309
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/f/FundamentalLinear.java
FundamentalLinear.createA
protected void createA(List<AssociatedPair> points, DMatrixRMaj A ) { A.reshape(points.size(),9, false); A.zero(); Point2D_F64 f_norm = new Point2D_F64(); Point2D_F64 s_norm = new Point2D_F64(); final int size = points.size(); for( int i = 0; i < size; i++ ) { AssociatedPair p = points.get(i); Poin...
java
protected void createA(List<AssociatedPair> points, DMatrixRMaj A ) { A.reshape(points.size(),9, false); A.zero(); Point2D_F64 f_norm = new Point2D_F64(); Point2D_F64 s_norm = new Point2D_F64(); final int size = points.size(); for( int i = 0; i < size; i++ ) { AssociatedPair p = points.get(i); Poin...
[ "protected", "void", "createA", "(", "List", "<", "AssociatedPair", ">", "points", ",", "DMatrixRMaj", "A", ")", "{", "A", ".", "reshape", "(", "points", ".", "size", "(", ")", ",", "9", ",", "false", ")", ";", "A", ".", "zero", "(", ")", ";", "P...
Reorganizes the epipolar constraint equation (x<sup>T</sup><sub>2</sub>*F*x<sub>1</sub> = 0) such that it is formulated as a standard linear system of the form Ax=0. Where A contains the pixel locations and x is the reformatted fundamental matrix. @param points Set of associated points in left and right images. @para...
[ "Reorganizes", "the", "epipolar", "constraint", "equation", "(", "x<sup", ">", "T<", "/", "sup", ">", "<sub", ">", "2<", "/", "sub", ">", "*", "F", "*", "x<sub", ">", "1<", "/", "sub", ">", "=", "0", ")", "such", "that", "it", "is", "formulated", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/f/FundamentalLinear.java#L141-L171
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/DirectCompilerVisitor.java
DirectCompilerVisitor.visitExpressionList
@Override public DirectCompilerResult visitExpressionList(FEEL_1_1Parser.ExpressionListContext ctx) { List<DirectCompilerResult> exprs = new ArrayList<>(); for (int i = 0; i < ctx.getChildCount(); i++) { if (ctx.getChild(i) instanceof FEEL_1_1Parser.ExpressionContext) { F...
java
@Override public DirectCompilerResult visitExpressionList(FEEL_1_1Parser.ExpressionListContext ctx) { List<DirectCompilerResult> exprs = new ArrayList<>(); for (int i = 0; i < ctx.getChildCount(); i++) { if (ctx.getChild(i) instanceof FEEL_1_1Parser.ExpressionContext) { F...
[ "@", "Override", "public", "DirectCompilerResult", "visitExpressionList", "(", "FEEL_1_1Parser", ".", "ExpressionListContext", "ctx", ")", "{", "List", "<", "DirectCompilerResult", ">", "exprs", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "int", "i...
NOTE: technically this rule of the grammar does not have an equivalent Java expression (or a valid FEEL expression) per-se. Using here as assuming if this grammar rule trigger, it is intended as a List, either to be returned, or re-used internally in this visitor.
[ "NOTE", ":", "technically", "this", "rule", "of", "the", "grammar", "does", "not", "have", "an", "equivalent", "Java", "expression", "(", "or", "a", "valid", "FEEL", "expression", ")", "per", "-", "se", ".", "Using", "here", "as", "assuming", "if", "this...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/DirectCompilerVisitor.java#L478-L491
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PaymentSummaryBuilder.java
PaymentSummaryBuilder.addPriceLabel
public PaymentSummaryBuilder addPriceLabel(String label, String amount) { PriceLabel priceLabel = new PriceLabel(label, amount); return addPriceLabel(priceLabel); }
java
public PaymentSummaryBuilder addPriceLabel(String label, String amount) { PriceLabel priceLabel = new PriceLabel(label, amount); return addPriceLabel(priceLabel); }
[ "public", "PaymentSummaryBuilder", "addPriceLabel", "(", "String", "label", ",", "String", "amount", ")", "{", "PriceLabel", "priceLabel", "=", "new", "PriceLabel", "(", "label", ",", "amount", ")", ";", "return", "addPriceLabel", "(", "priceLabel", ")", ";", ...
Adds a {@link PriceLabel} to the {@link PaymentSummary}. @param label the {@link PriceLabel#label}. @param amount the {@link PriceLabel#amount}. @return this builder.
[ "Adds", "a", "{", "@link", "PriceLabel", "}", "to", "the", "{", "@link", "PaymentSummary", "}", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PaymentSummaryBuilder.java#L93-L96
j256/ormlite-android
src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java
OrmLiteConfigUtil.writeConfigFile
public static void writeConfigFile(OutputStream outputStream, Class<?>[] classes) throws SQLException, IOException { writeConfigFile(outputStream, classes, false); }
java
public static void writeConfigFile(OutputStream outputStream, Class<?>[] classes) throws SQLException, IOException { writeConfigFile(outputStream, classes, false); }
[ "public", "static", "void", "writeConfigFile", "(", "OutputStream", "outputStream", ",", "Class", "<", "?", ">", "[", "]", "classes", ")", "throws", "SQLException", ",", "IOException", "{", "writeConfigFile", "(", "outputStream", ",", "classes", ",", "false", ...
Write a configuration file to an output stream with the configuration for classes.
[ "Write", "a", "configuration", "file", "to", "an", "output", "stream", "with", "the", "configuration", "for", "classes", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L225-L227
venmo/cursor-utils
cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java
IterableCursorWrapper.getString
public String getString(String columnName, String defaultValue) { int index = getColumnIndex(columnName); if (isValidIndex(index)) { return getString(index); } else { return defaultValue; } }
java
public String getString(String columnName, String defaultValue) { int index = getColumnIndex(columnName); if (isValidIndex(index)) { return getString(index); } else { return defaultValue; } }
[ "public", "String", "getString", "(", "String", "columnName", ",", "String", "defaultValue", ")", "{", "int", "index", "=", "getColumnIndex", "(", "columnName", ")", ";", "if", "(", "isValidIndex", "(", "index", ")", ")", "{", "return", "getString", "(", "...
Convenience alias to {@code getString\(getColumnIndex(columnName))}. If the column does not exist for the cursor, return {@code defaultValue}.
[ "Convenience", "alias", "to", "{" ]
train
https://github.com/venmo/cursor-utils/blob/52cf91c4253346632fe70b8d7b7eab8bbcc9b248/cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java#L70-L77
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.acceptChat
public ApiSuccessResponse acceptChat(String id, AcceptData acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = acceptChatWithHttpInfo(id, acceptData); return resp.getData(); }
java
public ApiSuccessResponse acceptChat(String id, AcceptData acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = acceptChatWithHttpInfo(id, acceptData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "acceptChat", "(", "String", "id", ",", "AcceptData", "acceptData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "acceptChatWithHttpInfo", "(", "id", ",", "acceptData", ")", ";", "r...
Accept a chat Accept the specified chat interaction. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Accept", "a", "chat", "Accept", "the", "specified", "chat", "interaction", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L149-L152
rackerlabs/clouddocs-maven-plugin
src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java
PDFBuilder.createStyleSheetResolver
private URIResolver createStyleSheetResolver(CatalogResolver catalogResolver) throws MojoExecutionException { URIResolver uriResolver; try { URL url = getNonDefaultStylesheetURL() == null ? getDefaultStylesheetURL() : getNonDefaultStylesheetURL(); if (getLog().isDebugEnabled()) { getLog().debug("Usi...
java
private URIResolver createStyleSheetResolver(CatalogResolver catalogResolver) throws MojoExecutionException { URIResolver uriResolver; try { URL url = getNonDefaultStylesheetURL() == null ? getDefaultStylesheetURL() : getNonDefaultStylesheetURL(); if (getLog().isDebugEnabled()) { getLog().debug("Usi...
[ "private", "URIResolver", "createStyleSheetResolver", "(", "CatalogResolver", "catalogResolver", ")", "throws", "MojoExecutionException", "{", "URIResolver", "uriResolver", ";", "try", "{", "URL", "url", "=", "getNonDefaultStylesheetURL", "(", ")", "==", "null", "?", ...
Creates an URI resolver to handle <code>urn:docbkx:stylesheet(/)</code> as a special URI. This URI points to the default docbook stylesheet location @param catalogResolver The initial resolver to use @return The Stylesheet resolver. @throws MojoExecutionException If an error occurs while reading the stylesheet
[ "Creates", "an", "URI", "resolver", "to", "handle", "<code", ">", "urn", ":", "docbkx", ":", "stylesheet", "(", "/", ")", "<", "/", "code", ">", "as", "a", "special", "URI", ".", "This", "URI", "points", "to", "the", "default", "docbook", "stylesheet",...
train
https://github.com/rackerlabs/clouddocs-maven-plugin/blob/ba8554dc340db674307efdaac647c6fd2b58a34b/src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java#L941-L954
Axway/Grapes
server/src/main/java/org/axway/grapes/server/webapp/resources/ArtifactResource.java
ArtifactResource.getGroupIds
@GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_GROUPIDS) public Response getGroupIds(@Context final UriInfo uriInfo){ LOG.info("Got a get groupIds request [" + uriInfo.getPath() + "]"); final ListView view = new ListView("GroupIds view", "groupId"); ...
java
@GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_GROUPIDS) public Response getGroupIds(@Context final UriInfo uriInfo){ LOG.info("Got a get groupIds request [" + uriInfo.getPath() + "]"); final ListView view = new ListView("GroupIds view", "groupId"); ...
[ "@", "GET", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_HTML", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Path", "(", "ServerAPI", ".", "GET_GROUPIDS", ")", "public", "Response", "getGroupIds", "(", "@", "Context", "final", "UriInfo", ...
Return a list of groupIds, stored in Grapes. This method is call via GET <grapes_url>/artifact/groupids @return Response A list (in HTML or JSON) of gavc
[ "Return", "a", "list", "of", "groupIds", "stored", "in", "Grapes", ".", "This", "method", "is", "call", "via", "GET", "<grapes_url", ">", "/", "artifact", "/", "groupids" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/ArtifactResource.java#L144-L158
apereo/cas
support/cas-server-support-couchdb-service-registry/src/main/java/org/apereo/cas/couchdb/services/RegisteredServiceCouchDbRepository.java
RegisteredServiceCouchDbRepository.findByServiceId
@View(name = "by_serviceId", map = "function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}") public RegisteredServiceDocument findByServiceId(final String serviceId) { return queryView("by_serviceId", serviceId).stream().findFirst().orElse(null); }
java
@View(name = "by_serviceId", map = "function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}") public RegisteredServiceDocument findByServiceId(final String serviceId) { return queryView("by_serviceId", serviceId).stream().findFirst().orElse(null); }
[ "@", "View", "(", "name", "=", "\"by_serviceId\"", ",", "map", "=", "\"function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}\"", ")", "public", "RegisteredServiceDocument", "findByServiceId", "(", "final", "String", "serviceId", ")", "{", "return", "que...
Implements search by serviceId. @param serviceId The serviceId of the service to find. @return The service found or +null+.
[ "Implements", "search", "by", "serviceId", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-couchdb-service-registry/src/main/java/org/apereo/cas/couchdb/services/RegisteredServiceCouchDbRepository.java#L36-L39
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.incrBy
@Override public Long incrBy(final byte[] key, final long increment) { checkIsInMultiOrPipeline(); client.incrBy(key, increment); return client.getIntegerReply(); }
java
@Override public Long incrBy(final byte[] key, final long increment) { checkIsInMultiOrPipeline(); client.incrBy(key, increment); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "incrBy", "(", "final", "byte", "[", "]", "key", ",", "final", "long", "increment", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "incrBy", "(", "key", ",", "increment", ")", ";", "return", "client...
INCRBY work just like {@link #incr(byte[]) INCR} but instead to increment by 1 the increment is integer. <p> INCR commands are limited to 64 bit signed integers. <p> Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 ...
[ "INCRBY", "work", "just", "like", "{" ]
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L781-L786
dmart28/reveno
reveno-core/src/main/java/org/reveno/atp/core/repository/ImmutableModelRepository.java
ImmutableModelRepository.isDeleted
protected boolean isDeleted(Class<?> type, long key) { return removed.size() > 0 && removed.containsKey(type) && removed.get(type).size() > 0 && removed.get(type).contains(key); }
java
protected boolean isDeleted(Class<?> type, long key) { return removed.size() > 0 && removed.containsKey(type) && removed.get(type).size() > 0 && removed.get(type).contains(key); }
[ "protected", "boolean", "isDeleted", "(", "Class", "<", "?", ">", "type", ",", "long", "key", ")", "{", "return", "removed", ".", "size", "(", ")", ">", "0", "&&", "removed", ".", "containsKey", "(", "type", ")", "&&", "removed", ".", "get", "(", "...
/* size checking mainly for performance issues on cases where there is no need to check map
[ "/", "*", "size", "checking", "mainly", "for", "performance", "issues", "on", "cases", "where", "there", "is", "no", "need", "to", "check", "map" ]
train
https://github.com/dmart28/reveno/blob/33617651fab8f0c0af70e7d3af7273cdbfe164d2/reveno-core/src/main/java/org/reveno/atp/core/repository/ImmutableModelRepository.java#L164-L166
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/OUTRES.java
OUTRES.subsetNeighborhoodQuery
private DoubleDBIDList subsetNeighborhoodQuery(DoubleDBIDList neighc, DBIDRef dbid, PrimitiveDistanceFunction<? super NumberVector> df, double adjustedEps, KernelDensityEstimator kernel, ModifiableDoubleDBIDList n) { n.clear(); NumberVector query = kernel.relation.get(dbid); for(DoubleDBIDListIter neighbor ...
java
private DoubleDBIDList subsetNeighborhoodQuery(DoubleDBIDList neighc, DBIDRef dbid, PrimitiveDistanceFunction<? super NumberVector> df, double adjustedEps, KernelDensityEstimator kernel, ModifiableDoubleDBIDList n) { n.clear(); NumberVector query = kernel.relation.get(dbid); for(DoubleDBIDListIter neighbor ...
[ "private", "DoubleDBIDList", "subsetNeighborhoodQuery", "(", "DoubleDBIDList", "neighc", ",", "DBIDRef", "dbid", ",", "PrimitiveDistanceFunction", "<", "?", "super", "NumberVector", ">", "df", ",", "double", "adjustedEps", ",", "KernelDensityEstimator", "kernel", ",", ...
Refine neighbors within a subset. @param neighc Neighbor candidates @param dbid Query object @param df distance function @param adjustedEps Epsilon range @param kernel Kernel @param n Output list @return Neighbors of neighbor object
[ "Refine", "neighbors", "within", "a", "subset", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/OUTRES.java#L228-L239
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java
TaskManagerService.attemptToExecuteTask
private void attemptToExecuteTask(ApplicationDefinition appDef, Task task, TaskRecord taskRecord) { Tenant tenant = Tenant.getTenant(appDef); String taskID = taskRecord.getTaskID(); String claimID = "_claim/" + taskID; long claimStamp = System.currentTimeMillis(); writeTaskClaim(...
java
private void attemptToExecuteTask(ApplicationDefinition appDef, Task task, TaskRecord taskRecord) { Tenant tenant = Tenant.getTenant(appDef); String taskID = taskRecord.getTaskID(); String claimID = "_claim/" + taskID; long claimStamp = System.currentTimeMillis(); writeTaskClaim(...
[ "private", "void", "attemptToExecuteTask", "(", "ApplicationDefinition", "appDef", ",", "Task", "task", ",", "TaskRecord", "taskRecord", ")", "{", "Tenant", "tenant", "=", "Tenant", ".", "getTenant", "(", "appDef", ")", ";", "String", "taskID", "=", "taskRecord"...
Attempt to start the given task by creating claim and see if we win it.
[ "Attempt", "to", "start", "the", "given", "task", "by", "creating", "claim", "and", "see", "if", "we", "win", "it", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java#L398-L409
m-m-m/util
collection/src/main/java/net/sf/mmm/util/collection/base/AbstractClassHierarchyMap.java
AbstractClassHierarchyMap.isPreferable
protected boolean isPreferable(E element, Class<?> elementType, E existing, Class<?> currentType) { return false; }
java
protected boolean isPreferable(E element, Class<?> elementType, E existing, Class<?> currentType) { return false; }
[ "protected", "boolean", "isPreferable", "(", "E", "element", ",", "Class", "<", "?", ">", "elementType", ",", "E", "existing", ",", "Class", "<", "?", ">", "currentType", ")", "{", "return", "false", ";", "}" ]
This method determines if the given {@code element} should be {@link #get(Class) associated} with {@code currentType} in preference to the element {@code existing} that is already registered and will be replaced according to the result of this method. @param element is the element to register. @param elementType is th...
[ "This", "method", "determines", "if", "the", "given", "{", "@code", "element", "}", "should", "be", "{", "@link", "#get", "(", "Class", ")", "associated", "}", "with", "{", "@code", "currentType", "}", "in", "preference", "to", "the", "element", "{", "@c...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/collection/src/main/java/net/sf/mmm/util/collection/base/AbstractClassHierarchyMap.java#L69-L72
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsUserTable.java
CmsUserTable.addUserToContainer
protected void addUserToContainer(IndexedContainer container, CmsUser user) { if (m_blackList.contains(user)) { return; } Item item = container.addItem(user); fillItem(item, user); }
java
protected void addUserToContainer(IndexedContainer container, CmsUser user) { if (m_blackList.contains(user)) { return; } Item item = container.addItem(user); fillItem(item, user); }
[ "protected", "void", "addUserToContainer", "(", "IndexedContainer", "container", ",", "CmsUser", "user", ")", "{", "if", "(", "m_blackList", ".", "contains", "(", "user", ")", ")", "{", "return", ";", "}", "Item", "item", "=", "container", ".", "addItem", ...
Adds given user to given IndexedContainer.<p> @param container to add the user to @param user to add
[ "Adds", "given", "user", "to", "given", "IndexedContainer", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L1017-L1024
Jasig/uPortal
uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/login/LoginPortletHelper.java
LoginPortletHelper.getSelectedProfile
public String getSelectedProfile(PortletRequest request) { // if a profile selection exists in the session, use it final PortletSession session = request.getPortletSession(); String profileName = (String) session.getAttribute( ...
java
public String getSelectedProfile(PortletRequest request) { // if a profile selection exists in the session, use it final PortletSession session = request.getPortletSession(); String profileName = (String) session.getAttribute( ...
[ "public", "String", "getSelectedProfile", "(", "PortletRequest", "request", ")", "{", "// if a profile selection exists in the session, use it", "final", "PortletSession", "session", "=", "request", ".", "getPortletSession", "(", ")", ";", "String", "profileName", "=", "(...
Get the profile that should be pre-selected in the local login form. @param request @return
[ "Get", "the", "profile", "that", "should", "be", "pre", "-", "selected", "in", "the", "local", "login", "form", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/login/LoginPortletHelper.java#L69-L99
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NewInstance.java
NewInstance.newInstance
static Object newInstance (ClassLoader classLoader, String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException { Class driverClass; if (classLoader == null) { driverClass = Class.forName(className); } else { dri...
java
static Object newInstance (ClassLoader classLoader, String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException { Class driverClass; if (classLoader == null) { driverClass = Class.forName(className); } else { dri...
[ "static", "Object", "newInstance", "(", "ClassLoader", "classLoader", ",", "String", "className", ")", "throws", "ClassNotFoundException", ",", "IllegalAccessException", ",", "InstantiationException", "{", "Class", "driverClass", ";", "if", "(", "classLoader", "==", "...
Creates a new instance of the specified class name Package private so this code is not exposed at the API level.
[ "Creates", "a", "new", "instance", "of", "the", "specified", "class", "name" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NewInstance.java#L41-L52
steveohara/j2mod
src/main/java/com/ghgande/j2mod/modbus/io/ModbusRTUTransport.java
ModbusRTUTransport.readResponseIn
protected ModbusResponse readResponseIn() throws ModbusIOException { boolean done; ModbusResponse response; int dlength; try { do { // 1. read to function code, create request and read function // specific bytes synchronized (b...
java
protected ModbusResponse readResponseIn() throws ModbusIOException { boolean done; ModbusResponse response; int dlength; try { do { // 1. read to function code, create request and read function // specific bytes synchronized (b...
[ "protected", "ModbusResponse", "readResponseIn", "(", ")", "throws", "ModbusIOException", "{", "boolean", "done", ";", "ModbusResponse", "response", ";", "int", "dlength", ";", "try", "{", "do", "{", "// 1. read to function code, create request and read function", "// spe...
readResponse - Read the bytes for the response from the slave. @return a <tt>ModbusRespose</tt> @throws com.ghgande.j2mod.modbus.ModbusIOException If the response cannot be read from the socket/port
[ "readResponse", "-", "Read", "the", "bytes", "for", "the", "response", "from", "the", "slave", "." ]
train
https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/io/ModbusRTUTransport.java#L406-L466
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAEntry.java
CMAEntry.setField
public CMAEntry setField(String key, String locale, Object value) { if (fields == null) { fields = new LinkedHashMap<String, LinkedHashMap<String, Object>>(); } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { field = new LinkedHashMap<String, Object>(); } ...
java
public CMAEntry setField(String key, String locale, Object value) { if (fields == null) { fields = new LinkedHashMap<String, LinkedHashMap<String, Object>>(); } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { field = new LinkedHashMap<String, Object>(); } ...
[ "public", "CMAEntry", "setField", "(", "String", "key", ",", "String", "locale", ",", "Object", "value", ")", "{", "if", "(", "fields", "==", "null", ")", "{", "fields", "=", "new", "LinkedHashMap", "<", "String", ",", "LinkedHashMap", "<", "String", ","...
Creates a new field with the given {@code value}. If a field named {@code key} already exists it will be replaced. @param key field key @param locale locale @param value value @return this {@code CMAEntry}
[ "Creates", "a", "new", "field", "with", "the", "given", "{", "@code", "value", "}", ".", "If", "a", "field", "named", "{", "@code", "key", "}", "already", "exists", "it", "will", "be", "replaced", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAEntry.java#L99-L112
telly/groundy
library/src/main/java/com/telly/groundy/TaskResult.java
TaskResult.add
public TaskResult add(String key, String[] value) { mBundle.putStringArray(key, value); return this; }
java
public TaskResult add(String key, String[] value) { mBundle.putStringArray(key, value); return this; }
[ "public", "TaskResult", "add", "(", "String", "key", ",", "String", "[", "]", "value", ")", "{", "mBundle", ".", "putStringArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String array object, or null
[ "Inserts", "a", "String", "array", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/TaskResult.java#L372-L375
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
AbstractIndexWriter.addDescription
protected void addDescription(PackageDoc pkg, Content dlTree) { Content link = getPackageLink(pkg, new StringContent(Util.getPackageName(pkg))); Content dt = HtmlTree.DT(link); dt.addContent(" - "); dt.addContent(getResource("doclet.package")); dt.addContent(" " + pkg.name()); ...
java
protected void addDescription(PackageDoc pkg, Content dlTree) { Content link = getPackageLink(pkg, new StringContent(Util.getPackageName(pkg))); Content dt = HtmlTree.DT(link); dt.addContent(" - "); dt.addContent(getResource("doclet.package")); dt.addContent(" " + pkg.name()); ...
[ "protected", "void", "addDescription", "(", "PackageDoc", "pkg", ",", "Content", "dlTree", ")", "{", "Content", "link", "=", "getPackageLink", "(", "pkg", ",", "new", "StringContent", "(", "Util", ".", "getPackageName", "(", "pkg", ")", ")", ")", ";", "Con...
Add one line summary comment for the package. @param pkg the package to be documented @param dlTree the content tree to which the description will be added
[ "Add", "one", "line", "summary", "comment", "for", "the", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java#L124-L134
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertSys
public int insertSys(PersistentStore store, Result ins) { RowSetNavigator nav = ins.getNavigator(); int count = 0; while (nav.hasNext()) { insertSys(store, nav.getNext()); count++; } return count; }
java
public int insertSys(PersistentStore store, Result ins) { RowSetNavigator nav = ins.getNavigator(); int count = 0; while (nav.hasNext()) { insertSys(store, nav.getNext()); count++; } return count; }
[ "public", "int", "insertSys", "(", "PersistentStore", "store", ",", "Result", "ins", ")", "{", "RowSetNavigator", "nav", "=", "ins", ".", "getNavigator", "(", ")", ";", "int", "count", "=", "0", ";", "while", "(", "nav", ".", "hasNext", "(", ")", ")", ...
Used for system table inserts. No checks. No identity columns.
[ "Used", "for", "system", "table", "inserts", ".", "No", "checks", ".", "No", "identity", "columns", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2310-L2322
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/FdfWriter.java
FdfWriter.setFieldAsString
public boolean setFieldAsString(String field, String value) { return setField(field, new PdfString(value, PdfObject.TEXT_UNICODE)); }
java
public boolean setFieldAsString(String field, String value) { return setField(field, new PdfString(value, PdfObject.TEXT_UNICODE)); }
[ "public", "boolean", "setFieldAsString", "(", "String", "field", ",", "String", "value", ")", "{", "return", "setField", "(", "field", ",", "new", "PdfString", "(", "value", ",", "PdfObject", ".", "TEXT_UNICODE", ")", ")", ";", "}" ]
Sets the field value as a string. @param field the fully qualified field name @param value the value @return <CODE>true</CODE> if the value was inserted, <CODE>false</CODE> if the name is incompatible with an existing field
[ "Sets", "the", "field", "value", "as", "a", "string", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/FdfWriter.java#L227-L229
mgormley/optimize
src/main/java/edu/jhu/hlt/util/Utilities.java
Utilities.logSubtractExact
public static double logSubtractExact(double x, double y) { if (x < y) { throw new IllegalStateException("x must be >= y. x=" + x + " y=" + y); } // p = 0 or q = 0, where x = log(p), y = log(q) if (Double.NEGATIVE_INFINITY == y) { return x; } else...
java
public static double logSubtractExact(double x, double y) { if (x < y) { throw new IllegalStateException("x must be >= y. x=" + x + " y=" + y); } // p = 0 or q = 0, where x = log(p), y = log(q) if (Double.NEGATIVE_INFINITY == y) { return x; } else...
[ "public", "static", "double", "logSubtractExact", "(", "double", "x", ",", "double", "y", ")", "{", "if", "(", "x", "<", "y", ")", "{", "throw", "new", "IllegalStateException", "(", "\"x must be >= y. x=\"", "+", "x", "+", "\" y=\"", "+", "y", ")", ";", ...
Subtracts two probabilities that are stored as log probabilities. Note that x >= y. @param x log(p) @param y log(q) @return log(p - q) = log(exp(p) + exp(q)) @throws IllegalStateException if x < y
[ "Subtracts", "two", "probabilities", "that", "are", "stored", "as", "log", "probabilities", ".", "Note", "that", "x", ">", "=", "y", "." ]
train
https://github.com/mgormley/optimize/blob/3d1b93260b99febb8a5ecd9e8543c223e151a8d3/src/main/java/edu/jhu/hlt/util/Utilities.java#L222-L236
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java
IntegrationAccountsInner.logTrackingEvents
public void logTrackingEvents(String resourceGroupName, String integrationAccountName, TrackingEventsDefinition logTrackingEvents) { logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents).toBlocking().single().body(); }
java
public void logTrackingEvents(String resourceGroupName, String integrationAccountName, TrackingEventsDefinition logTrackingEvents) { logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents).toBlocking().single().body(); }
[ "public", "void", "logTrackingEvents", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "TrackingEventsDefinition", "logTrackingEvents", ")", "{", "logTrackingEventsWithServiceResponseAsync", "(", "resourceGroupName", ",", "integrationAccountName"...
Logs the integration account's tracking events. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param logTrackingEvents The callback URL parameters. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if ...
[ "Logs", "the", "integration", "account", "s", "tracking", "events", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L1130-L1132
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/MiscUtil.java
MiscUtil.createRequestBody
public static RequestBody createRequestBody(final MediaType contentType, final InputStream stream) { return new RequestBody() { @Override public MediaType contentType() { return contentType; } @Override public v...
java
public static RequestBody createRequestBody(final MediaType contentType, final InputStream stream) { return new RequestBody() { @Override public MediaType contentType() { return contentType; } @Override public v...
[ "public", "static", "RequestBody", "createRequestBody", "(", "final", "MediaType", "contentType", ",", "final", "InputStream", "stream", ")", "{", "return", "new", "RequestBody", "(", ")", "{", "@", "Override", "public", "MediaType", "contentType", "(", ")", "{"...
Creates a new request body that transmits the provided {@link java.io.InputStream InputStream}. @param contentType The {@link okhttp3.MediaType MediaType} of the data @param stream The {@link java.io.InputStream InputStream} to be transmitted @return RequestBody capable of transmitting the provided InputStream of d...
[ "Creates", "a", "new", "request", "body", "that", "transmits", "the", "provided", "{", "@link", "java", ".", "io", ".", "InputStream", "InputStream", "}", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/MiscUtil.java#L299-L318
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/SourceStream.java
SourceStream.msgCanBeSent
private synchronized boolean msgCanBeSent( long stamp, boolean nackMsg ) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "msgCanBeSent", new Object[] { Long.valueOf(stamp), Boolean.valueOf(nackMsg), Long.valueOf(firstMsgOutsideWindow), B...
java
private synchronized boolean msgCanBeSent( long stamp, boolean nackMsg ) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "msgCanBeSent", new Object[] { Long.valueOf(stamp), Boolean.valueOf(nackMsg), Long.valueOf(firstMsgOutsideWindow), B...
[ "private", "synchronized", "boolean", "msgCanBeSent", "(", "long", "stamp", ",", "boolean", "nackMsg", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", ...
Method that determines if the message can be sent. If the message is a NACK message then we should not check the stream for guesses, but we should still follow the other checks for the stream. @param stamp @return
[ "Method", "that", "determines", "if", "the", "message", "can", "be", "sent", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/SourceStream.java#L2037-L2063
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java
WorkerHelper.serializeXML
public static XMLSerializer serializeXML(final ISession session, final OutputStream out, final boolean serializeXMLDec, final boolean serializeRest, final Long revision) { final XMLSerializerBuilder builder; if (revision == null) builder = new XMLSerializerBuilder(session, out); ...
java
public static XMLSerializer serializeXML(final ISession session, final OutputStream out, final boolean serializeXMLDec, final boolean serializeRest, final Long revision) { final XMLSerializerBuilder builder; if (revision == null) builder = new XMLSerializerBuilder(session, out); ...
[ "public", "static", "XMLSerializer", "serializeXML", "(", "final", "ISession", "session", ",", "final", "OutputStream", "out", ",", "final", "boolean", "serializeXMLDec", ",", "final", "boolean", "serializeRest", ",", "final", "Long", "revision", ")", "{", "final"...
This method creates a new XMLSerializer reference @param session Associated session. @param out OutputStream @param serializeXMLDec specifies whether XML declaration should be shown @param serializeRest specifies whether node id should be shown @return new XMLSerializer reference
[ "This", "method", "creates", "a", "new", "XMLSerializer", "reference" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java#L125-L137
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java
DateUtils.formatDate
public static String formatDate(final Date date, final String pattern) { notNull(date, "Date"); notNull(pattern, "Pattern"); final SimpleDateFormat formatter = DateFormatHolder.formatFor(pattern); return formatter.format(date); }
java
public static String formatDate(final Date date, final String pattern) { notNull(date, "Date"); notNull(pattern, "Pattern"); final SimpleDateFormat formatter = DateFormatHolder.formatFor(pattern); return formatter.format(date); }
[ "public", "static", "String", "formatDate", "(", "final", "Date", "date", ",", "final", "String", "pattern", ")", "{", "notNull", "(", "date", ",", "\"Date\"", ")", ";", "notNull", "(", "pattern", ",", "\"Pattern\"", ")", ";", "final", "SimpleDateFormat", ...
Formats the given date according to the specified pattern. The pattern must conform to that used by the {@link SimpleDateFormat simple date format} class. @param date The date to format. @param pattern The pattern to use for formatting the date. @return A formatted date string. @throws IllegalArgumentException If th...
[ "Formats", "the", "given", "date", "according", "to", "the", "specified", "pattern", ".", "The", "pattern", "must", "conform", "to", "that", "used", "by", "the", "{", "@link", "SimpleDateFormat", "simple", "date", "format", "}", "class", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/DateUtils.java#L188-L193
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerCache.java
MessageControllerCache.saveToCache
public void saveToCache(String topic, Class<? extends JsTopicMessageController> cls) { if(null != topic && null != cls) { messageControllers.put(topic, cls); } }
java
public void saveToCache(String topic, Class<? extends JsTopicMessageController> cls) { if(null != topic && null != cls) { messageControllers.put(topic, cls); } }
[ "public", "void", "saveToCache", "(", "String", "topic", ",", "Class", "<", "?", "extends", "JsTopicMessageController", ">", "cls", ")", "{", "if", "(", "null", "!=", "topic", "&&", "null", "!=", "cls", ")", "{", "messageControllers", ".", "put", "(", "t...
Save messageController Factory for topic @param topic @param cls
[ "Save", "messageController", "Factory", "for", "topic" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerCache.java#L32-L36
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java
CellsUtils.subDocumentListCase
private static <T> Object subDocumentListCase(Type type, List<T> jsonObject) throws IllegalAccessException, InstantiationException, InvocationTargetException { ParameterizedType listType = (ParameterizedType) type; Class<?> listClass = (Class<?>) listType.getActualTypeArguments()[0]; ...
java
private static <T> Object subDocumentListCase(Type type, List<T> jsonObject) throws IllegalAccessException, InstantiationException, InvocationTargetException { ParameterizedType listType = (ParameterizedType) type; Class<?> listClass = (Class<?>) listType.getActualTypeArguments()[0]; ...
[ "private", "static", "<", "T", ">", "Object", "subDocumentListCase", "(", "Type", "type", ",", "List", "<", "T", ">", "jsonObject", ")", "throws", "IllegalAccessException", ",", "InstantiationException", ",", "InvocationTargetException", "{", "ParameterizedType", "l...
Sub document list case. @param <T> the type parameter @param type the type @param jsonObject the json object @return the object @throws IllegalAccessException the illegal access exception @throws InstantiationException the instantiation exception @throws InvocationTargetException the invocation targ...
[ "Sub", "document", "list", "case", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java#L379-L391
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/NumberExpression.java
NumberExpression.notBetween
public final <A extends Number & Comparable<?>> BooleanExpression notBetween(A from, A to) { return between(from, to).not(); }
java
public final <A extends Number & Comparable<?>> BooleanExpression notBetween(A from, A to) { return between(from, to).not(); }
[ "public", "final", "<", "A", "extends", "Number", "&", "Comparable", "<", "?", ">", ">", "BooleanExpression", "notBetween", "(", "A", "from", ",", "A", "to", ")", "{", "return", "between", "(", "from", ",", "to", ")", ".", "not", "(", ")", ";", "}"...
Create a {@code this not between from and to} expression <p>Is equivalent to {@code this < from || this > to}</p> @param from inclusive start of range @param to inclusive end of range @return this not between from and to
[ "Create", "a", "{", "@code", "this", "not", "between", "from", "and", "to", "}", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/NumberExpression.java#L450-L452
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
AssemblyAnalyzer.addMatchingValues
protected static void addMatchingValues(List<String> packages, String value, Dependency dep, EvidenceType type) { if (value == null || value.isEmpty() || packages == null || packages.isEmpty()) { return; } for (String key : packages) { final int pos = StringUtils.indexOfI...
java
protected static void addMatchingValues(List<String> packages, String value, Dependency dep, EvidenceType type) { if (value == null || value.isEmpty() || packages == null || packages.isEmpty()) { return; } for (String key : packages) { final int pos = StringUtils.indexOfI...
[ "protected", "static", "void", "addMatchingValues", "(", "List", "<", "String", ">", "packages", ",", "String", "value", ",", "Dependency", "dep", ",", "EvidenceType", "type", ")", "{", "if", "(", "value", "==", "null", "||", "value", ".", "isEmpty", "(", ...
Cycles through the collection of class name information to see if parts of the package names are contained in the provided value. If found, it will be added as the HIGHEST confidence evidence because we have more then one source corroborating the value. @param packages a collection of class name information @param val...
[ "Cycles", "through", "the", "collection", "of", "class", "name", "information", "to", "see", "if", "parts", "of", "the", "package", "names", "are", "contained", "in", "the", "provided", "value", ".", "If", "found", "it", "will", "be", "added", "as", "the",...
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java#L480-L495
netty/netty
handler/src/main/java/io/netty/handler/traffic/TrafficCounter.java
TrafficCounter.writeTimeToWait
@Deprecated public long writeTimeToWait(final long size, final long limitTraffic, final long maxTime) { return writeTimeToWait(size, limitTraffic, maxTime, milliSecondFromNano()); }
java
@Deprecated public long writeTimeToWait(final long size, final long limitTraffic, final long maxTime) { return writeTimeToWait(size, limitTraffic, maxTime, milliSecondFromNano()); }
[ "@", "Deprecated", "public", "long", "writeTimeToWait", "(", "final", "long", "size", ",", "final", "long", "limitTraffic", ",", "final", "long", "maxTime", ")", "{", "return", "writeTimeToWait", "(", "size", ",", "limitTraffic", ",", "maxTime", ",", "milliSec...
Returns the time to wait (if any) for the given length message, using the given limitTraffic and the max wait time. @param size the write size @param limitTraffic the traffic limit in bytes per second. @param maxTime the max time in ms to wait in case of excess of traffic. @return the current time to wait (in ms) if n...
[ "Returns", "the", "time", "to", "wait", "(", "if", "any", ")", "for", "the", "given", "length", "message", "using", "the", "given", "limitTraffic", "and", "the", "max", "wait", "time", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/TrafficCounter.java#L555-L558
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/r/houghes/HoughCircles.java
HoughCircles.getCenterPoints
private Coordinate[] getCenterPoints( double[][][] houghValues, int maxCircles ) { Coordinate[] centerPoints = new Coordinate[maxCircles]; int xMax = 0; int yMax = 0; int rMax = 0; for( int c = 0; c < maxCircles; c++ ) { double counterMax = -1; for( int ...
java
private Coordinate[] getCenterPoints( double[][][] houghValues, int maxCircles ) { Coordinate[] centerPoints = new Coordinate[maxCircles]; int xMax = 0; int yMax = 0; int rMax = 0; for( int c = 0; c < maxCircles; c++ ) { double counterMax = -1; for( int ...
[ "private", "Coordinate", "[", "]", "getCenterPoints", "(", "double", "[", "]", "[", "]", "[", "]", "houghValues", ",", "int", "maxCircles", ")", "{", "Coordinate", "[", "]", "centerPoints", "=", "new", "Coordinate", "[", "maxCircles", "]", ";", "int", "x...
Search for a fixed number of circles. @param maxCircles The number of circles that should be found. @param houghValues
[ "Search", "for", "a", "fixed", "number", "of", "circles", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/r/houghes/HoughCircles.java#L315-L345
aws/aws-sdk-java
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/RequestMetricCollectorSupport.java
RequestMetricCollectorSupport.collectMetrics
@Override public void collectMetrics(Request<?> request, Response<?> response) { try { collectMetrics0(request, response); } catch(Exception ex) { // defensive code if (log.isDebugEnabled()) { log.debug("Ignoring unexpected failure", ex); } ...
java
@Override public void collectMetrics(Request<?> request, Response<?> response) { try { collectMetrics0(request, response); } catch(Exception ex) { // defensive code if (log.isDebugEnabled()) { log.debug("Ignoring unexpected failure", ex); } ...
[ "@", "Override", "public", "void", "collectMetrics", "(", "Request", "<", "?", ">", "request", ",", "Response", "<", "?", ">", "response", ")", "{", "try", "{", "collectMetrics0", "(", "request", ",", "response", ")", ";", "}", "catch", "(", "Exception",...
Collects the metrics at the end of a request/response cycle, transforms the metric data points into a cloud watch metric datum representation, and then adds it to a memory queue so it will get summarized into the necessary statistics and uploaded to Amazon CloudWatch.
[ "Collects", "the", "metrics", "at", "the", "end", "of", "a", "request", "/", "response", "cycle", "transforms", "the", "metric", "data", "points", "into", "a", "cloud", "watch", "metric", "datum", "representation", "and", "then", "adds", "it", "to", "a", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/RequestMetricCollectorSupport.java#L55-L64
strator-dev/greenpepper
greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/AbstractGreenPepperMacro.java
AbstractGreenPepperMacro.isExpanded
protected boolean isExpanded(Map<String,String> parameters) { String all = parameters.get("expanded"); return all != null && Boolean.valueOf(all); }
java
protected boolean isExpanded(Map<String,String> parameters) { String all = parameters.get("expanded"); return all != null && Boolean.valueOf(all); }
[ "protected", "boolean", "isExpanded", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "String", "all", "=", "parameters", ".", "get", "(", "\"expanded\"", ")", ";", "return", "all", "!=", "null", "&&", "Boolean", ".", "valueOf", "(...
<p>isExpanded.</p> @param parameters a {@link java.util.Map} object. @return a boolean.
[ "<p", ">", "isExpanded", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/AbstractGreenPepperMacro.java#L251-L255
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_serviceInfos_PUT
public void billingAccount_serviceInfos_PUT(String billingAccount, OvhService body) throws IOException { String qPath = "/telephony/{billingAccount}/serviceInfos"; StringBuilder sb = path(qPath, billingAccount); exec(qPath, "PUT", sb.toString(), body); }
java
public void billingAccount_serviceInfos_PUT(String billingAccount, OvhService body) throws IOException { String qPath = "/telephony/{billingAccount}/serviceInfos"; StringBuilder sb = path(qPath, billingAccount); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "billingAccount_serviceInfos_PUT", "(", "String", "billingAccount", ",", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPa...
Alter this object properties REST: PUT /telephony/{billingAccount}/serviceInfos @param body [required] New object properties @param billingAccount [required] The name of your billingAccount
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8386-L8390
mike10004/common-helper
native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/StreamConduit.java
StreamConduit.createPump
private Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { BlockingStreamPumper pumper = new BlockingStreamPumper(is, os, closeWhenExhausted); // pumper.setAutoflush(true); // always auto-flush final Thread result = new ThreadWithPump...
java
private Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { BlockingStreamPumper pumper = new BlockingStreamPumper(is, os, closeWhenExhausted); // pumper.setAutoflush(true); // always auto-flush final Thread result = new ThreadWithPump...
[ "private", "Thread", "createPump", "(", "InputStream", "is", ",", "OutputStream", "os", ",", "boolean", "closeWhenExhausted", ")", "{", "BlockingStreamPumper", "pumper", "=", "new", "BlockingStreamPumper", "(", "is", ",", "os", ",", "closeWhenExhausted", ")", ";",...
Creates a stream pumper to copy the given input stream to the given output stream. @param is the input stream to copy from. @param os the output stream to copy to. @param closeWhenExhausted if true close the inputstream. @return a thread object that does the pumping, subclasses should return an instance of {@code PumpS...
[ "Creates", "a", "stream", "pumper", "to", "copy", "the", "given", "input", "stream", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/mike10004/common-helper/blob/744f82d9b0768a9ad9c63a57a37ab2c93bf408f4/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/StreamConduit.java#L213-L220
threerings/nenya
core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java
FringeConfiguration.fringesOn
public int fringesOn (int first, int second) { FringeRecord f1 = _frecs.get(first); // we better have a fringe record for the first if (null != f1) { // it had better have some tilesets defined if (f1.tilesets.size() > 0) { FringeRecord f2 = _frecs....
java
public int fringesOn (int first, int second) { FringeRecord f1 = _frecs.get(first); // we better have a fringe record for the first if (null != f1) { // it had better have some tilesets defined if (f1.tilesets.size() > 0) { FringeRecord f2 = _frecs....
[ "public", "int", "fringesOn", "(", "int", "first", ",", "int", "second", ")", "{", "FringeRecord", "f1", "=", "_frecs", ".", "get", "(", "first", ")", ";", "// we better have a fringe record for the first", "if", "(", "null", "!=", "f1", ")", "{", "// it had...
If the first base tileset fringes upon the second, return the fringe priority of the first base tileset, otherwise return -1.
[ "If", "the", "first", "base", "tileset", "fringes", "upon", "the", "second", "return", "the", "fringe", "priority", "of", "the", "first", "base", "tileset", "otherwise", "return", "-", "1", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java#L119-L140
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.arg
public Groundy arg(String key, Parcelable value) { mArgs.putParcelable(key, value); return this; }
java
public Groundy arg(String key, Parcelable value) { mArgs.putParcelable(key, value); return this; }
[ "public", "Groundy", "arg", "(", "String", "key", ",", "Parcelable", "value", ")", "{", "mArgs", ".", "putParcelable", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Parcelable object, or null
[ "Inserts", "a", "Parcelable", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L536-L539
astrapi69/jaulp-wicket
jaulp-wicket-dialogs/src/main/java/de/alpharogroup/wicket/dialogs/panels/save/SaveDialogPanel.java
SaveDialogPanel.newSaveLabel
protected Label newSaveLabel(final String id, final ResourceBundleKey resourceKey) { return ComponentFactory.newLabel(id, resourceKey, this); }
java
protected Label newSaveLabel(final String id, final ResourceBundleKey resourceKey) { return ComponentFactory.newLabel(id, resourceKey, this); }
[ "protected", "Label", "newSaveLabel", "(", "final", "String", "id", ",", "final", "ResourceBundleKey", "resourceKey", ")", "{", "return", "ComponentFactory", ".", "newLabel", "(", "id", ",", "resourceKey", ",", "this", ")", ";", "}" ]
Factory method for creating a new save {@link Label} with a {@link ResourceBundleKey}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a save {@link Label}. @param id the id @param resourceKey the resource key @return the new {@link Lab...
[ "Factory", "method", "for", "creating", "a", "new", "save", "{", "@link", "Label", "}", "with", "a", "{", "@link", "ResourceBundleKey", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "ca...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-dialogs/src/main/java/de/alpharogroup/wicket/dialogs/panels/save/SaveDialogPanel.java#L235-L238
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDiagnosticCategorySlot
public DiagnosticCategoryInner getSiteDiagnosticCategorySlot(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { return getSiteDiagnosticCategorySlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot).toBlocking().single().body(); }
java
public DiagnosticCategoryInner getSiteDiagnosticCategorySlot(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { return getSiteDiagnosticCategorySlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot).toBlocking().single().body(); }
[ "public", "DiagnosticCategoryInner", "getSiteDiagnosticCategorySlot", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "diagnosticCategory", ",", "String", "slot", ")", "{", "return", "getSiteDiagnosticCategorySlotWithServiceResponseAsync", "(", "...
Get Diagnostics Category. Get Diagnostics Category. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param diagnosticCategory Diagnostic Category @param slot Slot Name @throws IllegalArgumentException thrown if parameters fail the validation @throws DefaultE...
[ "Get", "Diagnostics", "Category", ".", "Get", "Diagnostics", "Category", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L1486-L1488
SpringForAll/spring-boot-starter-swagger
src/main/java/com/spring4all/swagger/SwaggerAutoConfiguration.java
SwaggerAutoConfiguration.buildGlobalResponseMessage
private void buildGlobalResponseMessage(SwaggerProperties swaggerProperties, Docket docketForBuilder) { SwaggerProperties.GlobalResponseMessage globalResponseMessages = swaggerProperties.getGlobalResponseMessage(); /* POST,GET,PUT,PATCH,DELETE,HEAD,OPTIONS,TRACE 响应消息体 **/ List<...
java
private void buildGlobalResponseMessage(SwaggerProperties swaggerProperties, Docket docketForBuilder) { SwaggerProperties.GlobalResponseMessage globalResponseMessages = swaggerProperties.getGlobalResponseMessage(); /* POST,GET,PUT,PATCH,DELETE,HEAD,OPTIONS,TRACE 响应消息体 **/ List<...
[ "private", "void", "buildGlobalResponseMessage", "(", "SwaggerProperties", "swaggerProperties", ",", "Docket", "docketForBuilder", ")", "{", "SwaggerProperties", ".", "GlobalResponseMessage", "globalResponseMessages", "=", "swaggerProperties", ".", "getGlobalResponseMessage", "...
设置全局响应消息 @param swaggerProperties swaggerProperties 支持 POST,GET,PUT,PATCH,DELETE,HEAD,OPTIONS,TRACE @param docketForBuilder swagger docket builder
[ "设置全局响应消息" ]
train
https://github.com/SpringForAll/spring-boot-starter-swagger/blob/420e146f0ac2fcfd3a63b43cd4d605e895502fe4/src/main/java/com/spring4all/swagger/SwaggerAutoConfiguration.java#L332-L356
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
StylesheetHandler.createXPath
public XPath createXPath(String str, ElemTemplateElement owningTemplate) throws javax.xml.transform.TransformerException { ErrorListener handler = m_stylesheetProcessor.getErrorListener(); XPath xpath = new XPath(str, owningTemplate, this, XPath.SELECT, handler, m_funcTable); // Vis...
java
public XPath createXPath(String str, ElemTemplateElement owningTemplate) throws javax.xml.transform.TransformerException { ErrorListener handler = m_stylesheetProcessor.getErrorListener(); XPath xpath = new XPath(str, owningTemplate, this, XPath.SELECT, handler, m_funcTable); // Vis...
[ "public", "XPath", "createXPath", "(", "String", "str", ",", "ElemTemplateElement", "owningTemplate", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "ErrorListener", "handler", "=", "m_stylesheetProcessor", ".", "getErrorListen...
Process an expression string into an XPath. Must be public for access by the AVT class. @param str A non-null reference to a valid or invalid XPath expression string. @return A non-null reference to an XPath object that represents the string argument. @throws javax.xml.transform.TransformerException if the expressio...
[ "Process", "an", "expression", "string", "into", "an", "XPath", ".", "Must", "be", "public", "for", "access", "by", "the", "AVT", "class", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java#L151-L160
Faylixe/googlecodejam-client
src/main/java/fr/faylixe/googlecodejam/client/CodeJamSession.java
CodeJamSession.createContent
private MultipartContent createContent(final ProblemInput input, final File output, final File source) throws IOException { final HttpMediaType type = new HttpMediaType(MEDIA_TYPE); type.setParameter(BOUNDARY, createBoundary()); // Submission from Chrome through contest website sends fake path for security, // ...
java
private MultipartContent createContent(final ProblemInput input, final File output, final File source) throws IOException { final HttpMediaType type = new HttpMediaType(MEDIA_TYPE); type.setParameter(BOUNDARY, createBoundary()); // Submission from Chrome through contest website sends fake path for security, // ...
[ "private", "MultipartContent", "createContent", "(", "final", "ProblemInput", "input", ",", "final", "File", "output", ",", "final", "File", "source", ")", "throws", "IOException", "{", "final", "HttpMediaType", "type", "=", "new", "HttpMediaType", "(", "MEDIA_TYP...
<p>Created and returns a valid {@link MultipartContent} instance that contains data required for submission.</p> @param input Input file to submit solution for. @param output Output file produced by the algorithm. @param source Source code file of the algorithm to submit. @return Created multipart content.
[ "<p", ">", "Created", "and", "returns", "a", "valid", "{", "@link", "MultipartContent", "}", "instance", "that", "contains", "data", "required", "for", "submission", ".", "<", "/", "p", ">" ]
train
https://github.com/Faylixe/googlecodejam-client/blob/84a5fed4e049dca48994dc3f70213976aaff4bd3/src/main/java/fr/faylixe/googlecodejam/client/CodeJamSession.java#L332-L356
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/face/AipFace.java
AipFace.videoFaceliveness
public JSONObject videoFaceliveness(String sessionId, byte[] video, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("session_id", sessionId); String base64Content = Base64Util.encode(video); request.addBody("video...
java
public JSONObject videoFaceliveness(String sessionId, byte[] video, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("session_id", sessionId); String base64Content = Base64Util.encode(video); request.addBody("video...
[ "public", "JSONObject", "videoFaceliveness", "(", "String", "sessionId", ",", "byte", "[", "]", "video", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation",...
视频活体检测接口接口 @param sessionId - 语音校验码会话id,使用此接口的前提是已经调用了语音校验码接口 @param video - 二进制图像数据 @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject
[ "视频活体检测接口接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/face/AipFace.java#L441-L455
citrusframework/citrus
modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/SftpEndpointComponent.java
SftpEndpointComponent.getPort
private Integer getPort(String resourcePath, FtpEndpointConfiguration endpointConfiguration) { if (resourcePath.contains(":")) { return Integer.valueOf(resourcePath.split(":")[1]); } return endpointConfiguration.getPort(); }
java
private Integer getPort(String resourcePath, FtpEndpointConfiguration endpointConfiguration) { if (resourcePath.contains(":")) { return Integer.valueOf(resourcePath.split(":")[1]); } return endpointConfiguration.getPort(); }
[ "private", "Integer", "getPort", "(", "String", "resourcePath", ",", "FtpEndpointConfiguration", "endpointConfiguration", ")", "{", "if", "(", "resourcePath", ".", "contains", "(", "\":\"", ")", ")", "{", "return", "Integer", ".", "valueOf", "(", "resourcePath", ...
Extract port number from resource path. If not present use default port from endpoint configuration. @param resourcePath @param endpointConfiguration @return
[ "Extract", "port", "number", "from", "resource", "path", ".", "If", "not", "present", "use", "default", "port", "from", "endpoint", "configuration", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/SftpEndpointComponent.java#L57-L63
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.longitudeToPixelXWithScaleFactor
public static double longitudeToPixelXWithScaleFactor(double longitude, double scaleFactor, int tileSize) { long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize); return (longitude + 180) / 360 * mapSize; }
java
public static double longitudeToPixelXWithScaleFactor(double longitude, double scaleFactor, int tileSize) { long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize); return (longitude + 180) / 360 * mapSize; }
[ "public", "static", "double", "longitudeToPixelXWithScaleFactor", "(", "double", "longitude", ",", "double", "scaleFactor", ",", "int", "tileSize", ")", "{", "long", "mapSize", "=", "getMapSizeWithScaleFactor", "(", "scaleFactor", ",", "tileSize", ")", ";", "return"...
Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain scale factor. @param longitude the longitude coordinate that should be converted. @param scaleFactor the scale factor at which the coordinate should be converted. @return the pixel X coordinate of the longitude value.
[ "Converts", "a", "longitude", "coordinate", "(", "in", "degrees", ")", "to", "a", "pixel", "X", "coordinate", "at", "a", "certain", "scale", "factor", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L253-L256
Erudika/para
para-core/src/main/java/com/erudika/para/utils/Config.java
Config.getConfigInt
public static int getConfigInt(String key, int defaultValue) { return NumberUtils.toInt(getConfigParam(key, Integer.toString(defaultValue))); }
java
public static int getConfigInt(String key, int defaultValue) { return NumberUtils.toInt(getConfigParam(key, Integer.toString(defaultValue))); }
[ "public", "static", "int", "getConfigInt", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "return", "NumberUtils", ".", "toInt", "(", "getConfigParam", "(", "key", ",", "Integer", ".", "toString", "(", "defaultValue", ")", ")", ")", ";", "}" ]
Returns the integer value of a configuration parameter. @param key the param key @param defaultValue the default param value @return the value of a param
[ "Returns", "the", "integer", "value", "of", "a", "configuration", "parameter", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/Config.java#L334-L336
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.findByG_B_A
@Override public List<CommerceCountry> findByG_B_A(long groupId, boolean billingAllowed, boolean active, int start, int end) { return findByG_B_A(groupId, billingAllowed, active, start, end, null); }
java
@Override public List<CommerceCountry> findByG_B_A(long groupId, boolean billingAllowed, boolean active, int start, int end) { return findByG_B_A(groupId, billingAllowed, active, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceCountry", ">", "findByG_B_A", "(", "long", "groupId", ",", "boolean", "billingAllowed", ",", "boolean", "active", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_B_A", "(", "groupId", ",",...
Returns a range of all the commerce countries where groupId = &#63; and billingAllowed = &#63; and active = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "countries", "where", "groupId", "=", "&#63", ";", "and", "billingAllowed", "=", "&#63", ";", "and", "active", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L3060-L3064
fuinorg/units4j
src/main/java/org/fuin/units4j/assertionrules/Utils.java
Utils.hasAnnotation
public static boolean hasAnnotation(final List<AnnotationInstance> annotations, final String annotationClaszName) { final DotName annotationName = DotName.createSimple(annotationClaszName); for (final AnnotationInstance annotation : annotations) { if (annotation.name().equals(annotationNa...
java
public static boolean hasAnnotation(final List<AnnotationInstance> annotations, final String annotationClaszName) { final DotName annotationName = DotName.createSimple(annotationClaszName); for (final AnnotationInstance annotation : annotations) { if (annotation.name().equals(annotationNa...
[ "public", "static", "boolean", "hasAnnotation", "(", "final", "List", "<", "AnnotationInstance", ">", "annotations", ",", "final", "String", "annotationClaszName", ")", "{", "final", "DotName", "annotationName", "=", "DotName", ".", "createSimple", "(", "annotationC...
Verifies if a list of annotations contains a given one. @param annotations List with annotations to check. @param annotationClaszName Full qualified name of annotation class to find. @return TRUE if the list contains the annotation, else FALSE.
[ "Verifies", "if", "a", "list", "of", "annotations", "contains", "a", "given", "one", "." ]
train
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/assertionrules/Utils.java#L56-L64
aggregateknowledge/java-hll
src/main/java/net/agkn/hll/serialization/SerializationUtil.java
SerializationUtil.packParametersByte
public static byte packParametersByte(final int registerWidth, final int registerCountLog2) { final int widthBits = ((registerWidth - 1) & REGISTER_WIDTH_MASK); final int countBits = (registerCountLog2 & LOG2_REGISTER_COUNT_MASK); return (byte)((widthBits << LOG2_REGISTER_COUNT_BITS) | countBits...
java
public static byte packParametersByte(final int registerWidth, final int registerCountLog2) { final int widthBits = ((registerWidth - 1) & REGISTER_WIDTH_MASK); final int countBits = (registerCountLog2 & LOG2_REGISTER_COUNT_MASK); return (byte)((widthBits << LOG2_REGISTER_COUNT_BITS) | countBits...
[ "public", "static", "byte", "packParametersByte", "(", "final", "int", "registerWidth", ",", "final", "int", "registerCountLog2", ")", "{", "final", "int", "widthBits", "=", "(", "(", "registerWidth", "-", "1", ")", "&", "REGISTER_WIDTH_MASK", ")", ";", "final...
Generates a byte that encodes the parameters of a {@link HLLType#FULL} or {@link HLLType#SPARSE} HLL.<p/> The top 3 bits are used to encode <code>registerWidth - 1</code> (range of <code>registerWidth</code> is thus 1-9) and the bottom 5 bits are used to encode <code>registerCountLog2</code> (range of <code>registerCo...
[ "Generates", "a", "byte", "that", "encodes", "the", "parameters", "of", "a", "{", "@link", "HLLType#FULL", "}", "or", "{", "@link", "HLLType#SPARSE", "}", "HLL", ".", "<p", "/", ">" ]
train
https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/serialization/SerializationUtil.java#L206-L210
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/results/ResultInterpreter.java
ResultInterpreter.addResponseComments
private void addResponseComments(MethodResult methodResult, ResourceMethod resourceMethod) { MethodComment methodDoc = methodResult.getMethodDoc(); if (methodDoc == null) return; methodDoc.getResponseComments() .forEach((k, v) -> addResponseComment(k, v, resourceMeth...
java
private void addResponseComments(MethodResult methodResult, ResourceMethod resourceMethod) { MethodComment methodDoc = methodResult.getMethodDoc(); if (methodDoc == null) return; methodDoc.getResponseComments() .forEach((k, v) -> addResponseComment(k, v, resourceMeth...
[ "private", "void", "addResponseComments", "(", "MethodResult", "methodResult", ",", "ResourceMethod", "resourceMethod", ")", "{", "MethodComment", "methodDoc", "=", "methodResult", ".", "getMethodDoc", "(", ")", ";", "if", "(", "methodDoc", "==", "null", ")", "ret...
Adds the comments for the individual status code to the corresponding Responses. The information is based on the {@code @response} javadoc tags.
[ "Adds", "the", "comments", "for", "the", "individual", "status", "code", "to", "the", "corresponding", "Responses", ".", "The", "information", "is", "based", "on", "the", "{" ]
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/results/ResultInterpreter.java#L139-L153
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/MapPrinter.java
MapPrinter.parseSpec
public static PJsonObject parseSpec(final String spec) { final JSONObject jsonSpec; try { jsonSpec = new JSONObject(spec); } catch (JSONException e) { throw new RuntimeException("Cannot parse the spec file: " + spec, e); } return new PJsonObject(jsonSpec, ...
java
public static PJsonObject parseSpec(final String spec) { final JSONObject jsonSpec; try { jsonSpec = new JSONObject(spec); } catch (JSONException e) { throw new RuntimeException("Cannot parse the spec file: " + spec, e); } return new PJsonObject(jsonSpec, ...
[ "public", "static", "PJsonObject", "parseSpec", "(", "final", "String", "spec", ")", "{", "final", "JSONObject", "jsonSpec", ";", "try", "{", "jsonSpec", "=", "new", "JSONObject", "(", "spec", ")", ";", "}", "catch", "(", "JSONException", "e", ")", "{", ...
Parse the JSON string and return the object. The string is expected to be the JSON print data from the client. @param spec the JSON formatted string. @return The encapsulated JSON object
[ "Parse", "the", "JSON", "string", "and", "return", "the", "object", ".", "The", "string", "is", "expected", "to", "be", "the", "JSON", "print", "data", "from", "the", "client", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L54-L62
Danny02/JOpenCTM
src/main/java/darwin/jopenctm/compression/MG2Encoder.java
MG2Encoder.pointToGridIdx
private int pointToGridIdx(Grid grid, float x, float y, float z) { Vec3f size = grid.getSize(); int idx = calcIndex(x, size.getX(), grid.getMin().getX(), grid.getDivision().getX()); int idy = calcIndex(y, size.getY(), grid.getMin().getY(), grid.getDivision().getY()); int idz = calcIndex...
java
private int pointToGridIdx(Grid grid, float x, float y, float z) { Vec3f size = grid.getSize(); int idx = calcIndex(x, size.getX(), grid.getMin().getX(), grid.getDivision().getX()); int idy = calcIndex(y, size.getY(), grid.getMin().getY(), grid.getDivision().getY()); int idz = calcIndex...
[ "private", "int", "pointToGridIdx", "(", "Grid", "grid", ",", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "Vec3f", "size", "=", "grid", ".", "getSize", "(", ")", ";", "int", "idx", "=", "calcIndex", "(", "x", ",", "size", ".", "...
Convert a point to a grid index. @param grid grid definition @return grid index of point
[ "Convert", "a", "point", "to", "a", "grid", "index", "." ]
train
https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Encoder.java#L197-L205
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/metadata/IndexMetadataBuilder.java
IndexMetadataBuilder.withOptions
@TimerJ public IndexMetadataBuilder withOptions(Map<Selector, Selector> opts) { options = new HashMap<Selector, Selector>(opts); return this; }
java
@TimerJ public IndexMetadataBuilder withOptions(Map<Selector, Selector> opts) { options = new HashMap<Selector, Selector>(opts); return this; }
[ "@", "TimerJ", "public", "IndexMetadataBuilder", "withOptions", "(", "Map", "<", "Selector", ",", "Selector", ">", "opts", ")", "{", "options", "=", "new", "HashMap", "<", "Selector", ",", "Selector", ">", "(", "opts", ")", ";", "return", "this", ";", "}...
Set the options. Any options previously created are removed. @param opts the opts @return the index metadata builder
[ "Set", "the", "options", ".", "Any", "options", "previously", "created", "are", "removed", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/IndexMetadataBuilder.java#L92-L96
esigate/esigate
esigate-core/src/main/java/org/esigate/http/ProxyingHttpClientBuilder.java
ProxyingHttpClientBuilder.addFetchEvent
private ClientExecChain addFetchEvent(final ClientExecChain wrapped) { return new ClientExecChain() { @Override public CloseableHttpResponse execute(HttpRoute route, HttpRequestWrapper request, HttpClientContext httpClientContext, HttpExecutionAware execAware) throws...
java
private ClientExecChain addFetchEvent(final ClientExecChain wrapped) { return new ClientExecChain() { @Override public CloseableHttpResponse execute(HttpRoute route, HttpRequestWrapper request, HttpClientContext httpClientContext, HttpExecutionAware execAware) throws...
[ "private", "ClientExecChain", "addFetchEvent", "(", "final", "ClientExecChain", "wrapped", ")", "{", "return", "new", "ClientExecChain", "(", ")", "{", "@", "Override", "public", "CloseableHttpResponse", "execute", "(", "HttpRoute", "route", ",", "HttpRequestWrapper",...
Decorate with fetch event managements @param wrapped @return the decorated ClientExecChain
[ "Decorate", "with", "fetch", "event", "managements" ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/http/ProxyingHttpClientBuilder.java#L84-L122
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteUpdateTaskHelper.java
SQLiteUpdateTaskHelper.executeSQL
public static void executeSQL(final SQLiteDatabase database, InputStream fileInputStream) { List<String> commands = readSQLFromFile(fileInputStream); executeSQL(database, commands); }
java
public static void executeSQL(final SQLiteDatabase database, InputStream fileInputStream) { List<String> commands = readSQLFromFile(fileInputStream); executeSQL(database, commands); }
[ "public", "static", "void", "executeSQL", "(", "final", "SQLiteDatabase", "database", ",", "InputStream", "fileInputStream", ")", "{", "List", "<", "String", ">", "commands", "=", "readSQLFromFile", "(", "fileInputStream", ")", ";", "executeSQL", "(", "database", ...
Execute SQL. @param database the database @param fileInputStream the file input stream
[ "Execute", "SQL", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteUpdateTaskHelper.java#L289-L292
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.extractSubset
public static Properties extractSubset(final Properties properties, final String prefix) { final Properties subset = new Properties(); if (prefix == null || prefix.length() == 0) { return subset; } final String prefixToMatch = prefix.charAt(prefix.length() - 1) != '.' ? pre...
java
public static Properties extractSubset(final Properties properties, final String prefix) { final Properties subset = new Properties(); if (prefix == null || prefix.length() == 0) { return subset; } final String prefixToMatch = prefix.charAt(prefix.length() - 1) != '.' ? pre...
[ "public", "static", "Properties", "extractSubset", "(", "final", "Properties", "properties", ",", "final", "String", "prefix", ")", "{", "final", "Properties", "subset", "=", "new", "Properties", "(", ")", ";", "if", "(", "prefix", "==", "null", "||", "prefi...
Extracts properties that start with or are equals to the specific prefix and returns them in a new Properties object with the prefix removed. @param properties The Properties to evaluate. @param prefix The prefix to extract. @return The subset of properties.
[ "Extracts", "properties", "that", "start", "with", "or", "are", "equals", "to", "the", "specific", "prefix", "and", "returns", "them", "in", "a", "new", "Properties", "object", "with", "the", "prefix", "removed", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L288-L310
phax/as2-peppol-client
src/main/java/com/helger/peppol/as2client/AS2ClientBuilder.java
AS2ClientBuilder.setPKCS12KeyStore
@Nonnull @Deprecated public AS2ClientBuilder setPKCS12KeyStore (@Nullable final File aKeyStoreFile, @Nullable final String sKeyStorePassword) { return setKeyStore (EKeyStoreType.PKCS12, aKeyStoreFile, sKeyStorePassword); }
java
@Nonnull @Deprecated public AS2ClientBuilder setPKCS12KeyStore (@Nullable final File aKeyStoreFile, @Nullable final String sKeyStorePassword) { return setKeyStore (EKeyStoreType.PKCS12, aKeyStoreFile, sKeyStorePassword); }
[ "@", "Nonnull", "@", "Deprecated", "public", "AS2ClientBuilder", "setPKCS12KeyStore", "(", "@", "Nullable", "final", "File", "aKeyStoreFile", ",", "@", "Nullable", "final", "String", "sKeyStorePassword", ")", "{", "return", "setKeyStore", "(", "EKeyStoreType", ".", ...
Set the key store file and password for the AS2 client. The key store must be an existing file of type PKCS12 containing at least the key alias of the sender (see {@link #setSenderAS2ID(String)}). The key store file must be writable as dynamically certificates of partners are added. @param aKeyStoreFile The existing k...
[ "Set", "the", "key", "store", "file", "and", "password", "for", "the", "AS2", "client", ".", "The", "key", "store", "must", "be", "an", "existing", "file", "of", "type", "PKCS12", "containing", "at", "least", "the", "key", "alias", "of", "the", "sender",...
train
https://github.com/phax/as2-peppol-client/blob/499fea5938df1a3c69aade5bf8be26b6e261988f/src/main/java/com/helger/peppol/as2client/AS2ClientBuilder.java#L190-L196
fernandospr/java-wns
src/main/java/ar/com/fernandospr/wns/WnsService.java
WnsService.pushBadge
public WnsNotificationResponse pushBadge(String channelUri, WnsBadge badge) throws WnsException { return this.pushBadge(channelUri, null, badge); }
java
public WnsNotificationResponse pushBadge(String channelUri, WnsBadge badge) throws WnsException { return this.pushBadge(channelUri, null, badge); }
[ "public", "WnsNotificationResponse", "pushBadge", "(", "String", "channelUri", ",", "WnsBadge", "badge", ")", "throws", "WnsException", "{", "return", "this", ".", "pushBadge", "(", "channelUri", ",", "null", ",", "badge", ")", ";", "}" ]
Pushes a badge to channelUri @param channelUri @param badge which should be built with {@link ar.com.fernandospr.wns.model.builders.WnsBadgeBuilder} @return WnsNotificationResponse please see response headers from <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response">ht...
[ "Pushes", "a", "badge", "to", "channelUri" ]
train
https://github.com/fernandospr/java-wns/blob/cd621b9c17d1e706f6284e0913531d834904a90d/src/main/java/ar/com/fernandospr/wns/WnsService.java#L168-L170
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildConstantSummary
public void buildConstantSummary(XMLNode node, Content contentTree) throws Exception { contentTree = writer.getHeader(); buildChildren(node, contentTree); writer.addFooter(contentTree); writer.printDocument(contentTree); writer.close(); }
java
public void buildConstantSummary(XMLNode node, Content contentTree) throws Exception { contentTree = writer.getHeader(); buildChildren(node, contentTree); writer.addFooter(contentTree); writer.printDocument(contentTree); writer.close(); }
[ "public", "void", "buildConstantSummary", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "Exception", "{", "contentTree", "=", "writer", ".", "getHeader", "(", ")", ";", "buildChildren", "(", "node", ",", "contentTree", ")", ";", "writer...
Build the constant summary. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added
[ "Build", "the", "constant", "summary", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java#L144-L150
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/tuple/ArrayOfDoublesQuickSelectSketch.java
ArrayOfDoublesQuickSelectSketch.merge
void merge(final long key, final double[] values) { setNotEmpty(); if (key < theta_) { final int index = findOrInsertKey(key); if (index < 0) { incrementCount(); setValues(~index, values); } else { updateValues(index, values); } rebuildIfNeeded(); } }
java
void merge(final long key, final double[] values) { setNotEmpty(); if (key < theta_) { final int index = findOrInsertKey(key); if (index < 0) { incrementCount(); setValues(~index, values); } else { updateValues(index, values); } rebuildIfNeeded(); } }
[ "void", "merge", "(", "final", "long", "key", ",", "final", "double", "[", "]", "values", ")", "{", "setNotEmpty", "(", ")", ";", "if", "(", "key", "<", "theta_", ")", "{", "final", "int", "index", "=", "findOrInsertKey", "(", "key", ")", ";", "if"...
not sufficient by itself without keeping track of theta of another sketch
[ "not", "sufficient", "by", "itself", "without", "keeping", "track", "of", "theta", "of", "another", "sketch" ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/tuple/ArrayOfDoublesQuickSelectSketch.java#L100-L112
app55/app55-java
src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java
DefaultPersistenceDelegate.instantiate
@Override protected Expression instantiate(Object oldInstance, Encoder enc) { Object[] args = null; // Set the constructor arguments if any property names exist if (this.propertyNames.length > 0) { // Prepare the property descriptors for finding getter method later BeanInfo info = null; HashMap<Stri...
java
@Override protected Expression instantiate(Object oldInstance, Encoder enc) { Object[] args = null; // Set the constructor arguments if any property names exist if (this.propertyNames.length > 0) { // Prepare the property descriptors for finding getter method later BeanInfo info = null; HashMap<Stri...
[ "@", "Override", "protected", "Expression", "instantiate", "(", "Object", "oldInstance", ",", "Encoder", "enc", ")", "{", "Object", "[", "]", "args", "=", "null", ";", "// Set the constructor arguments if any property names exist", "if", "(", "this", ".", "propertyN...
Returns an expression that represents a call to the bean's constructor. The constructor may take zero or more parameters, as specified when this <code>DefaultPersistenceDelegate</code> is constructed. @param oldInstance the old instance @param enc the encoder that wants to record the old instance @return an expression...
[ "Returns", "an", "expression", "that", "represents", "a", "call", "to", "the", "bean", "s", "constructor", ".", "The", "constructor", "may", "take", "zero", "or", "more", "parameters", "as", "specified", "when", "this", "<code", ">", "DefaultPersistenceDelegate<...
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java#L213-L258
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/CalendarUtil.java
CalendarUtil.addDays
public XMLGregorianCalendar addDays(final XMLGregorianCalendar cal, final int amount) { XMLGregorianCalendar to = buildXMLGregorianCalendarDate(cal); // Add amount of months to.add(addDays(amount)); return to; }
java
public XMLGregorianCalendar addDays(final XMLGregorianCalendar cal, final int amount) { XMLGregorianCalendar to = buildXMLGregorianCalendarDate(cal); // Add amount of months to.add(addDays(amount)); return to; }
[ "public", "XMLGregorianCalendar", "addDays", "(", "final", "XMLGregorianCalendar", "cal", ",", "final", "int", "amount", ")", "{", "XMLGregorianCalendar", "to", "=", "buildXMLGregorianCalendarDate", "(", "cal", ")", ";", "// Add amount of months", "to", ".", "add", ...
Add Days to a Gregorian Calendar. @param cal The XMLGregorianCalendar source @param amount The amount of days. Can be a negative Integer to substract. @return A XMLGregorianCalendar with the new Date
[ "Add", "Days", "to", "a", "Gregorian", "Calendar", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/CalendarUtil.java#L33-L38
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/upload/firmware/OADProfile.java
OADProfile.onNotificationBlock
private void onNotificationBlock(BluetoothGattCharacteristic characteristic) { int requestedBlock = Convert.twoBytesToInt(characteristic.getValue(), Constants.CC2540_BYTE_ORDER); // Check for First block if (requestedBlock == 0) { Log.i(TAG, String.format("Image accepted (Name: %s)...
java
private void onNotificationBlock(BluetoothGattCharacteristic characteristic) { int requestedBlock = Convert.twoBytesToInt(characteristic.getValue(), Constants.CC2540_BYTE_ORDER); // Check for First block if (requestedBlock == 0) { Log.i(TAG, String.format("Image accepted (Name: %s)...
[ "private", "void", "onNotificationBlock", "(", "BluetoothGattCharacteristic", "characteristic", ")", "{", "int", "requestedBlock", "=", "Convert", ".", "twoBytesToInt", "(", "characteristic", ".", "getValue", "(", ")", ",", "Constants", ".", "CC2540_BYTE_ORDER", ")", ...
Received a notification on Block characteristic A notification to this characteristic means the Bean has accepted the most recent firmware file we have offered, which is stored as `this.currentImage`. It is now time to start sending blocks of FW to the device. @param characteristic BLE characteristic with a value equ...
[ "Received", "a", "notification", "on", "Block", "characteristic" ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/upload/firmware/OADProfile.java#L191-L230
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.pluralizeFormat
public static MessageFormat pluralizeFormat(final String pattern, final String... choices) { double[] indexes = new double[choices.length]; for (int i = 0; i < choices.length; i++) { indexes[i] = i; } ChoiceFormat choiceForm = new ChoiceFormat(indexes, choices);...
java
public static MessageFormat pluralizeFormat(final String pattern, final String... choices) { double[] indexes = new double[choices.length]; for (int i = 0; i < choices.length; i++) { indexes[i] = i; } ChoiceFormat choiceForm = new ChoiceFormat(indexes, choices);...
[ "public", "static", "MessageFormat", "pluralizeFormat", "(", "final", "String", "pattern", ",", "final", "String", "...", "choices", ")", "{", "double", "[", "]", "indexes", "=", "new", "double", "[", "choices", ".", "length", "]", ";", "for", "(", "int", ...
<p> Constructs a message with pluralization logic by the means of ChoiceFormat. </p> @param pattern Base pattern @param choices Values that match the pattern @return Message instance prepared to generate pluralized strings
[ "<p", ">", "Constructs", "a", "message", "with", "pluralization", "logic", "by", "the", "means", "of", "ChoiceFormat", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2430-L2444
jamesagnew/hapi-fhir
hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java
NpmPackage.load
public InputStream load(String folder, String file) throws IOException { if (content.containsKey(folder+"/"+file)) return new ByteArrayInputStream(content.get(folder+"/"+file)); else { File f = new File(Utilities.path(path, folder, file)); if (f.exists()) return new F...
java
public InputStream load(String folder, String file) throws IOException { if (content.containsKey(folder+"/"+file)) return new ByteArrayInputStream(content.get(folder+"/"+file)); else { File f = new File(Utilities.path(path, folder, file)); if (f.exists()) return new F...
[ "public", "InputStream", "load", "(", "String", "folder", ",", "String", "file", ")", "throws", "IOException", "{", "if", "(", "content", ".", "containsKey", "(", "folder", "+", "\"/\"", "+", "file", ")", ")", "return", "new", "ByteArrayInputStream", "(", ...
get a stream that contains the contents of one of the files in a folder @param folder @param file @return @throws IOException
[ "get", "a", "stream", "that", "contains", "the", "contents", "of", "one", "of", "the", "files", "in", "a", "folder" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java#L173-L182
apereo/cas
support/cas-server-support-surrogate-api/src/main/java/org/apereo/cas/services/SurrogateRegisteredServiceAccessStrategy.java
SurrogateRegisteredServiceAccessStrategy.doPrincipalAttributesAllowSurrogateServiceAccess
protected boolean doPrincipalAttributesAllowSurrogateServiceAccess(final Map<String, Object> principalAttributes) { if (!enoughRequiredAttributesAvailableToProcess(principalAttributes, this.surrogateRequiredAttributes)) { LOGGER.debug("Surrogate access is denied. There are not enough attributes avai...
java
protected boolean doPrincipalAttributesAllowSurrogateServiceAccess(final Map<String, Object> principalAttributes) { if (!enoughRequiredAttributesAvailableToProcess(principalAttributes, this.surrogateRequiredAttributes)) { LOGGER.debug("Surrogate access is denied. There are not enough attributes avai...
[ "protected", "boolean", "doPrincipalAttributesAllowSurrogateServiceAccess", "(", "final", "Map", "<", "String", ",", "Object", ">", "principalAttributes", ")", "{", "if", "(", "!", "enoughRequiredAttributesAvailableToProcess", "(", "principalAttributes", ",", "this", ".",...
Do principal attributes allow surrogate service access?. @param principalAttributes the principal attributes @return the boolean
[ "Do", "principal", "attributes", "allow", "surrogate", "service", "access?", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-surrogate-api/src/main/java/org/apereo/cas/services/SurrogateRegisteredServiceAccessStrategy.java#L47-L59
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.createDockerClient
public static DockerClient createDockerClient( Map<String,String> targetProperties ) throws TargetException { // Validate what needs to be validated. Logger logger = Logger.getLogger( DockerHandler.class.getName()); logger.fine( "Setting the target properties." ); String edpt = targetProperties.get( DockerHan...
java
public static DockerClient createDockerClient( Map<String,String> targetProperties ) throws TargetException { // Validate what needs to be validated. Logger logger = Logger.getLogger( DockerHandler.class.getName()); logger.fine( "Setting the target properties." ); String edpt = targetProperties.get( DockerHan...
[ "public", "static", "DockerClient", "createDockerClient", "(", "Map", "<", "String", ",", "String", ">", "targetProperties", ")", "throws", "TargetException", "{", "// Validate what needs to be validated.", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "Do...
Creates a Docker client from target properties. @param targetProperties a non-null map @return a Docker client @throws TargetException if something went wrong
[ "Creates", "a", "Docker", "client", "from", "target", "properties", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L71-L94
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetMatch.java
CharsetMatch.getReader
public Reader getReader() { InputStream inputStream = fInputStream; if (inputStream == null) { inputStream = new ByteArrayInputStream(fRawInput, 0, fRawLength); } try { inputStream.reset(); return new InputStreamReader(inputStream, getName()); ...
java
public Reader getReader() { InputStream inputStream = fInputStream; if (inputStream == null) { inputStream = new ByteArrayInputStream(fRawInput, 0, fRawLength); } try { inputStream.reset(); return new InputStreamReader(inputStream, getName()); ...
[ "public", "Reader", "getReader", "(", ")", "{", "InputStream", "inputStream", "=", "fInputStream", ";", "if", "(", "inputStream", "==", "null", ")", "{", "inputStream", "=", "new", "ByteArrayInputStream", "(", "fRawInput", ",", "0", ",", "fRawLength", ")", "...
Create a java.io.Reader for reading the Unicode character data corresponding to the original byte data supplied to the Charset detect operation. <p> CAUTION: if the source of the byte data was an InputStream, a Reader can be created for only one matching char set using this method. If more than one charset needs to b...
[ "Create", "a", "java", ".", "io", ".", "Reader", "for", "reading", "the", "Unicode", "character", "data", "corresponding", "to", "the", "original", "byte", "data", "supplied", "to", "the", "Charset", "detect", "operation", ".", "<p", ">", "CAUTION", ":", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetMatch.java#L46-L59
windup/windup
rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JNDIResourceService.java
JNDIResourceService.createUnique
public synchronized JNDIResourceModel createUnique(Set<ProjectModel> applications, String jndiName) { JNDIResourceModel jndiResourceModel = getUniqueByProperty(JNDIResourceModel.JNDI_LOCATION, jndiName); if (jndiResourceModel == null) { jndiResourceModel = super.create(); ...
java
public synchronized JNDIResourceModel createUnique(Set<ProjectModel> applications, String jndiName) { JNDIResourceModel jndiResourceModel = getUniqueByProperty(JNDIResourceModel.JNDI_LOCATION, jndiName); if (jndiResourceModel == null) { jndiResourceModel = super.create(); ...
[ "public", "synchronized", "JNDIResourceModel", "createUnique", "(", "Set", "<", "ProjectModel", ">", "applications", ",", "String", "jndiName", ")", "{", "JNDIResourceModel", "jndiResourceModel", "=", "getUniqueByProperty", "(", "JNDIResourceModel", ".", "JNDI_LOCATION", ...
Create unique; if existing convert an existing {@link JNDIResourceModel} if one exists.
[ "Create", "unique", ";", "if", "existing", "convert", "an", "existing", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JNDIResourceService.java#L31-L49
google/closure-compiler
src/com/google/javascript/jscomp/InlineSimpleMethods.java
InlineSimpleMethods.inlinePropertyReturn
private void inlinePropertyReturn(Node parent, Node call, Node returnedValue) { Node getProp = returnedValue.cloneTree(); replaceThis(getProp, call.getFirstChild().removeFirstChild()); parent.replaceChild(call, getProp); compiler.reportChangeToEnclosingScope(getProp); }
java
private void inlinePropertyReturn(Node parent, Node call, Node returnedValue) { Node getProp = returnedValue.cloneTree(); replaceThis(getProp, call.getFirstChild().removeFirstChild()); parent.replaceChild(call, getProp); compiler.reportChangeToEnclosingScope(getProp); }
[ "private", "void", "inlinePropertyReturn", "(", "Node", "parent", ",", "Node", "call", ",", "Node", "returnedValue", ")", "{", "Node", "getProp", "=", "returnedValue", ".", "cloneTree", "(", ")", ";", "replaceThis", "(", "getProp", ",", "call", ".", "getFirs...
Replace the provided method call with the tree specified in returnedValue Parse tree of a call is name call getprop obj string
[ "Replace", "the", "provided", "method", "call", "with", "the", "tree", "specified", "in", "returnedValue" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/InlineSimpleMethods.java#L220-L225
integration-technology/amazon-mws-orders
src/main/java/com/amazonservices/mws/client/MwsUtl.java
MwsUtl.signParameters
static String signParameters(URI serviceUri, String signatureVersion, String signatureMethod, Map<String, String> parameters, String aswSecretKey) { parameters.put("SignatureVersion", signatureVersion); String algorithm = "HmacSHA1"; String stringToSign = null; if ("0".equals...
java
static String signParameters(URI serviceUri, String signatureVersion, String signatureMethod, Map<String, String> parameters, String aswSecretKey) { parameters.put("SignatureVersion", signatureVersion); String algorithm = "HmacSHA1"; String stringToSign = null; if ("0".equals...
[ "static", "String", "signParameters", "(", "URI", "serviceUri", ",", "String", "signatureVersion", ",", "String", "signatureMethod", ",", "Map", "<", "String", ",", "String", ">", "parameters", ",", "String", "aswSecretKey", ")", "{", "parameters", ".", "put", ...
Computes RFC 2104-compliant HMAC signature for request parameters Implements AWS Signature, as per following spec: If Signature Version is 0, it signs concatenated Action and Timestamp If Signature Version is 1, it performs the following: Sorts all parameters (including SignatureVersion and excluding Signature, the ...
[ "Computes", "RFC", "2104", "-", "compliant", "HMAC", "signature", "for", "request", "parameters", "Implements", "AWS", "Signature", "as", "per", "following", "spec", ":" ]
train
https://github.com/integration-technology/amazon-mws-orders/blob/042e8cd5b10588a30150222bf9c91faf4f130b3c/src/main/java/com/amazonservices/mws/client/MwsUtl.java#L436-L453
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java
FactoryFinder.newInstance
private static Object newInstance(final String className, ClassLoader cl, final boolean doFallback) throws ConfigurationError { try { Class<?> providerClass; if (cl == null) { // If classloader is null Use the bootstrap ClassLoader. // Thus Class.forName(...
java
private static Object newInstance(final String className, ClassLoader cl, final boolean doFallback) throws ConfigurationError { try { Class<?> providerClass; if (cl == null) { // If classloader is null Use the bootstrap ClassLoader. // Thus Class.forName(...
[ "private", "static", "Object", "newInstance", "(", "final", "String", "className", ",", "ClassLoader", "cl", ",", "final", "boolean", "doFallback", ")", "throws", "ConfigurationError", "{", "try", "{", "Class", "<", "?", ">", "providerClass", ";", "if", "(", ...
Create an instance of a class using the specified ClassLoader and optionally fall back to the current ClassLoader if not found. @param className Name of the concrete class corresponding to the service provider @param cl ClassLoader to use to load the class, null means to use the bootstrap ClassLoader @param doFallba...
[ "Create", "an", "instance", "of", "a", "class", "using", "the", "specified", "ClassLoader", "and", "optionally", "fall", "back", "to", "the", "current", "ClassLoader", "if", "not", "found", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java#L58-L89
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Matchers.hasModifier
public static <T extends Tree> Matcher<T> hasModifier(final Modifier modifier) { return new Matcher<T>() { @Override public boolean matches(T tree, VisitorState state) { Symbol sym = ASTHelpers.getSymbol(tree); return sym != null && sym.getModifiers().contains(modifier); } }; ...
java
public static <T extends Tree> Matcher<T> hasModifier(final Modifier modifier) { return new Matcher<T>() { @Override public boolean matches(T tree, VisitorState state) { Symbol sym = ASTHelpers.getSymbol(tree); return sym != null && sym.getModifiers().contains(modifier); } }; ...
[ "public", "static", "<", "T", "extends", "Tree", ">", "Matcher", "<", "T", ">", "hasModifier", "(", "final", "Modifier", "modifier", ")", "{", "return", "new", "Matcher", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "boolean", "matches", "(...
Returns true if the Tree node has the expected {@code Modifier}.
[ "Returns", "true", "if", "the", "Tree", "node", "has", "the", "expected", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L1151-L1159
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/html/HtmlBuilder.java
HtmlBuilder.simonTypeImg
public T simonTypeImg(SimonType simonType, String rootPath) throws IOException { String image = null; switch (simonType) { case COUNTER: image = "TypeCounter.png"; break; case STOPWATCH: image = "TypeStopwatch.png"; break; case UNKNOWN: image = "TypeUnknown.png"; break; ...
java
public T simonTypeImg(SimonType simonType, String rootPath) throws IOException { String image = null; switch (simonType) { case COUNTER: image = "TypeCounter.png"; break; case STOPWATCH: image = "TypeStopwatch.png"; break; case UNKNOWN: image = "TypeUnknown.png"; break; ...
[ "public", "T", "simonTypeImg", "(", "SimonType", "simonType", ",", "String", "rootPath", ")", "throws", "IOException", "{", "String", "image", "=", "null", ";", "switch", "(", "simonType", ")", "{", "case", "COUNTER", ":", "image", "=", "\"TypeCounter.png\"", ...
Icon image representing Simon Type. @param simonType Simon Type @param rootPath Path to root of Simon Console resources
[ "Icon", "image", "representing", "Simon", "Type", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/html/HtmlBuilder.java#L223-L242
interedition/collatex
collatex-core/src/main/java/eu/interedition/collatex/suffixarray/BPR.java
BPR.computeBucketSize2_SaBucket
private void computeBucketSize2_SaBucket(int leftPtr, int rightPtr, int offset, int q) { int suffix1 = suffixArray[leftPtr] + offset; int suffix2 = suffixArray[rightPtr] + offset; while (sufPtrMap[suffix1] == sufPtrMap[suffix2]) { suffix1 += q; suffix2 += q; } ...
java
private void computeBucketSize2_SaBucket(int leftPtr, int rightPtr, int offset, int q) { int suffix1 = suffixArray[leftPtr] + offset; int suffix2 = suffixArray[rightPtr] + offset; while (sufPtrMap[suffix1] == sufPtrMap[suffix2]) { suffix1 += q; suffix2 += q; } ...
[ "private", "void", "computeBucketSize2_SaBucket", "(", "int", "leftPtr", ",", "int", "rightPtr", ",", "int", "offset", ",", "int", "q", ")", "{", "int", "suffix1", "=", "suffixArray", "[", "leftPtr", "]", "+", "offset", ";", "int", "suffix2", "=", "suffixA...
Completely sorts buckets of size 2. @param leftPtr points to the leftmost suffix of the current bucket. @param rightPtr points to the rightmost suffix of the current bucket. @param offset is the length of the common prefix of the suffixes rounded down to a multiple of q. @param q is the initial prefix length...
[ "Completely", "sorts", "buckets", "of", "size", "2", "." ]
train
https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixarray/BPR.java#L523-L538
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_plesk_serviceName_upgrade_duration_POST
public OvhOrder license_plesk_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhOrderableAntispamEnum antispam, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, OvhOrderablePleskLanguagePackEnum languagePackNumber, Bo...
java
public OvhOrder license_plesk_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhOrderableAntispamEnum antispam, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, OvhOrderablePleskLanguagePackEnum languagePackNumber, Bo...
[ "public", "OvhOrder", "license_plesk_serviceName_upgrade_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhOrderableAntispamEnum", "antispam", ",", "OvhOrderableAntivirusEnum", "antivirus", ",", "OvhPleskApplicationSetEnum", "applicationSet", ",", ...
Create order REST: POST /order/license/plesk/{serviceName}/upgrade/{duration} @param antispam [required] The antispam currently enabled on this Plesk License @param resellerManagement [required] Reseller management option activation @param languagePackNumber [required] The amount (between 0 and 5) of language pack num...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1927-L1942
apereo/cas
api/cas-server-core-api-util/src/main/java/org/apereo/cas/DistributedCacheObject.java
DistributedCacheObject.getProperty
public <T> T getProperty(final String name, final Class<T> clazz) { if (containsProperty(name)) { val item = this.properties.get(name); if (item == null) { return null; } if (!clazz.isAssignableFrom(item.getClass())) { throw new Cla...
java
public <T> T getProperty(final String name, final Class<T> clazz) { if (containsProperty(name)) { val item = this.properties.get(name); if (item == null) { return null; } if (!clazz.isAssignableFrom(item.getClass())) { throw new Cla...
[ "public", "<", "T", ">", "T", "getProperty", "(", "final", "String", "name", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "containsProperty", "(", "name", ")", ")", "{", "val", "item", "=", "this", ".", "properties", ".", "ge...
Gets property. @param <T> the type parameter @param name the name @param clazz the clazz @return the property
[ "Gets", "property", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-util/src/main/java/org/apereo/cas/DistributedCacheObject.java#L44-L56