repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
landawn/AbacusUtil
src/com/landawn/abacus/util/FileSystemUtil.java
FileSystemUtil.freeSpaceWindows
long freeSpaceWindows(String path, final long timeout) throws IOException { path = FilenameUtil.normalize(path, false); if (path.length() > 0 && path.charAt(0) != '"') { path = "\"" + path + "\""; } // build and run the 'dir' command final String[] cmdAttribs ...
java
long freeSpaceWindows(String path, final long timeout) throws IOException { path = FilenameUtil.normalize(path, false); if (path.length() > 0 && path.charAt(0) != '"') { path = "\"" + path + "\""; } // build and run the 'dir' command final String[] cmdAttribs ...
[ "long", "freeSpaceWindows", "(", "String", "path", ",", "final", "long", "timeout", ")", "throws", "IOException", "{", "path", "=", "FilenameUtil", ".", "normalize", "(", "path", ",", "false", ")", ";", "if", "(", "path", ".", "length", "(", ")", ">", ...
Find free space on the Windows platform using the 'dir' command. @param path the path to get free space for, including the colon @param timeout The timeout amount in milliseconds or no timeout if the value is zero or less @return the amount of free drive space on the drive @throws IOException if an error occurs
[ "Find", "free", "space", "on", "the", "Windows", "platform", "using", "the", "dir", "command", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FileSystemUtil.java#L248-L272
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getHostingEnvironmentDetectorResponse
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).toBlocking().single().body(); }
java
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).toBlocking().single().body(); }
[ "public", "DetectorResponseInner", "getHostingEnvironmentDetectorResponse", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "detectorName", ")", "{", "return", "getHostingEnvironmentDetectorResponseWithServiceResponseAsync", "(", "resourceGroupName", ","...
Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the resource group to which the resource belongs. @param name App Service Environment Name @param detectorName Detector Resource Name @throws IllegalArgumentException thrown if parameters fail the val...
[ "Get", "Hosting", "Environment", "Detector", "Response", ".", "Get", "Hosting", "Environment", "Detector", "Response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L336-L338
meertensinstituut/mtas
src/main/java/mtas/analysis/parser/MtasBasicParser.java
MtasBasicParser.addAndEncodeValue
private String addAndEncodeValue(String originalValue, String newValue, boolean encode) { return addAndEncode(originalValue, null, newValue, encode); }
java
private String addAndEncodeValue(String originalValue, String newValue, boolean encode) { return addAndEncode(originalValue, null, newValue, encode); }
[ "private", "String", "addAndEncodeValue", "(", "String", "originalValue", ",", "String", "newValue", ",", "boolean", "encode", ")", "{", "return", "addAndEncode", "(", "originalValue", ",", "null", ",", "newValue", ",", "encode", ")", ";", "}" ]
Adds the and encode value. @param originalValue the original value @param newValue the new value @param encode the encode @return the string
[ "Adds", "the", "and", "encode", "value", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/analysis/parser/MtasBasicParser.java#L1031-L1034
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.getCanonicalURI
public static String getCanonicalURI(String uriString, boolean canonicalizePath) { if ((uriString != null) && !"".equals(uriString)) { return getCanonicalizedURI(uriString, canonicalizePath); } return null; }
java
public static String getCanonicalURI(String uriString, boolean canonicalizePath) { if ((uriString != null) && !"".equals(uriString)) { return getCanonicalizedURI(uriString, canonicalizePath); } return null; }
[ "public", "static", "String", "getCanonicalURI", "(", "String", "uriString", ",", "boolean", "canonicalizePath", ")", "{", "if", "(", "(", "uriString", "!=", "null", ")", "&&", "!", "\"\"", ".", "equals", "(", "uriString", ")", ")", "{", "return", "getCano...
Create a canonical URI from a given URI. A canonical URI is a URI with:<ul> <li>the host part of the authority lower-case since URI semantics dictate that hostnames are case insensitive <li>(optionally, NOT appropriate for Origin headers) the path part set to "/" if there was no path in the input URI (this conforms t...
[ "Create", "a", "canonical", "URI", "from", "a", "given", "URI", ".", "A", "canonical", "URI", "is", "a", "URI", "with", ":", "<ul", ">", "<li", ">", "the", "host", "part", "of", "the", "authority", "lower", "-", "case", "since", "URI", "semantics", "...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L641-L646
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_module_POST
public OvhTask serviceName_module_POST(String serviceName, String adminName, String adminPassword, OvhDependencyType[] dependencies, String domain, net.minidev.ovh.api.hosting.web.module.OvhLanguageEnum language, Long moduleId, String path) throws IOException { String qPath = "/hosting/web/{serviceName}/module"; St...
java
public OvhTask serviceName_module_POST(String serviceName, String adminName, String adminPassword, OvhDependencyType[] dependencies, String domain, net.minidev.ovh.api.hosting.web.module.OvhLanguageEnum language, Long moduleId, String path) throws IOException { String qPath = "/hosting/web/{serviceName}/module"; St...
[ "public", "OvhTask", "serviceName_module_POST", "(", "String", "serviceName", ",", "String", "adminName", ",", "String", "adminPassword", ",", "OvhDependencyType", "[", "]", "dependencies", ",", "String", "domain", ",", "net", ".", "minidev", ".", "ovh", ".", "a...
Install a new module REST: POST /hosting/web/{serviceName}/module @param language [required] The language to set to your module @param adminName [required] The login for the admin account (may be a standard string or your email) @param adminPassword [required] The password for the admin account (at least 8 characters)...
[ "Install", "a", "new", "module" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1652-L1665
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.isListAttribute
private boolean isListAttribute(PluralAttribute<? super X, ?, ?> attribute) { return attribute != null && attribute.getCollectionType().equals(CollectionType.LIST); }
java
private boolean isListAttribute(PluralAttribute<? super X, ?, ?> attribute) { return attribute != null && attribute.getCollectionType().equals(CollectionType.LIST); }
[ "private", "boolean", "isListAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "attribute", ")", "{", "return", "attribute", "!=", "null", "&&", "attribute", ".", "getCollectionType", "(", ")", ".", "equals", "(", "Collec...
Checks if is list attribute. @param attribute the attribute @return true, if is list attribute
[ "Checks", "if", "is", "list", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1039-L1042
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.noLocality
public static SlotProfile noLocality(ResourceProfile resourceProfile) { return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
java
public static SlotProfile noLocality(ResourceProfile resourceProfile) { return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
[ "public", "static", "SlotProfile", "noLocality", "(", "ResourceProfile", "resourceProfile", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "Collections", ".", "emptyList", "(", ")", ",", "Collections", ".", "emptyList", "(", ")", ")", ";"...
Returns a slot profile for the given resource profile, without any locality requirements.
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "without", "any", "locality", "requirements", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L121-L123
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Client/MalmoModClient.java
MalmoModClient.setUpExtraKeys
private void setUpExtraKeys(GameSettings settings) { // Create extra key bindings here and pass them to the KeyManager. ArrayList<InternalKey> extraKeys = new ArrayList<InternalKey>(); // Create a key binding to toggle between player and Malmo control: extraKeys.add(new InternalKey("...
java
private void setUpExtraKeys(GameSettings settings) { // Create extra key bindings here and pass them to the KeyManager. ArrayList<InternalKey> extraKeys = new ArrayList<InternalKey>(); // Create a key binding to toggle between player and Malmo control: extraKeys.add(new InternalKey("...
[ "private", "void", "setUpExtraKeys", "(", "GameSettings", "settings", ")", "{", "// Create extra key bindings here and pass them to the KeyManager.", "ArrayList", "<", "InternalKey", ">", "extraKeys", "=", "new", "ArrayList", "<", "InternalKey", ">", "(", ")", ";", "// ...
Set up some handy extra keys: @param settings Minecraft's original GameSettings object
[ "Set", "up", "some", "handy", "extra", "keys", ":" ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Client/MalmoModClient.java#L159-L193
javagl/Common
src/main/java/de/javagl/common/xml/XmlUtils.java
XmlUtils.createTextNode
public static Node createTextNode(String tagName, Object contents) { Document d = XmlUtils.getDefaultDocument(); Element node = d.createElement(tagName); node.appendChild(d.createTextNode(String.valueOf(contents))); return node; }
java
public static Node createTextNode(String tagName, Object contents) { Document d = XmlUtils.getDefaultDocument(); Element node = d.createElement(tagName); node.appendChild(d.createTextNode(String.valueOf(contents))); return node; }
[ "public", "static", "Node", "createTextNode", "(", "String", "tagName", ",", "Object", "contents", ")", "{", "Document", "d", "=", "XmlUtils", ".", "getDefaultDocument", "(", ")", ";", "Element", "node", "=", "d", ".", "createElement", "(", "tagName", ")", ...
Creates an XML node from the {@link #getDefaultDocument() default document} whose only child is a text node that contains the string representation of the given object @param tagName The tag name for the node @param contents The object whose string representation will be the contents of the text node @return The node
[ "Creates", "an", "XML", "node", "from", "the", "{", "@link", "#getDefaultDocument", "()", "default", "document", "}", "whose", "only", "child", "is", "a", "text", "node", "that", "contains", "the", "string", "representation", "of", "the", "given", "object" ]
train
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L275-L281
square/okhttp
okhttp/src/main/java/okhttp3/internal/connection/RealConnection.java
RealConnection.createTunnel
private Request createTunnel(int readTimeout, int writeTimeout, Request tunnelRequest, HttpUrl url) throws IOException { // Make an SSL Tunnel on the first message pair of each SSL + proxy connection. String requestLine = "CONNECT " + Util.hostHeader(url, true) + " HTTP/1.1"; while (true) { Http...
java
private Request createTunnel(int readTimeout, int writeTimeout, Request tunnelRequest, HttpUrl url) throws IOException { // Make an SSL Tunnel on the first message pair of each SSL + proxy connection. String requestLine = "CONNECT " + Util.hostHeader(url, true) + " HTTP/1.1"; while (true) { Http...
[ "private", "Request", "createTunnel", "(", "int", "readTimeout", ",", "int", "writeTimeout", ",", "Request", "tunnelRequest", ",", "HttpUrl", "url", ")", "throws", "IOException", "{", "// Make an SSL Tunnel on the first message pair of each SSL + proxy connection.", "String",...
To make an HTTPS connection over an HTTP proxy, send an unencrypted CONNECT request to create the proxy connection. This may need to be retried if the proxy requires authorization.
[ "To", "make", "an", "HTTPS", "connection", "over", "an", "HTTP", "proxy", "send", "an", "unencrypted", "CONNECT", "request", "to", "create", "the", "proxy", "connection", ".", "This", "may", "need", "to", "be", "retried", "if", "the", "proxy", "requires", ...
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/connection/RealConnection.java#L391-L431
VoltDB/voltdb
src/frontend/org/voltdb/client/exampleutils/ClientConnection.java
ClientConnection.executeAsync
public boolean executeAsync(ProcedureCallback callback, String procedure, Object... parameters) throws Exception { return this.Client.callProcedure(new TrackingCallback(this, procedure, callback), procedure, parameters); }
java
public boolean executeAsync(ProcedureCallback callback, String procedure, Object... parameters) throws Exception { return this.Client.callProcedure(new TrackingCallback(this, procedure, callback), procedure, parameters); }
[ "public", "boolean", "executeAsync", "(", "ProcedureCallback", "callback", ",", "String", "procedure", ",", "Object", "...", "parameters", ")", "throws", "Exception", "{", "return", "this", ".", "Client", ".", "callProcedure", "(", "new", "TrackingCallback", "(", ...
Executes a procedure asynchronously, then calls the provided user callback with the server response upon completion. @param callback the user-specified callback to call with the server response upon execution completion. @param procedure the name of the procedure to call. @param parameters the list of parameters to pa...
[ "Executes", "a", "procedure", "asynchronously", "then", "calls", "the", "provided", "user", "callback", "with", "the", "server", "response", "upon", "completion", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/ClientConnection.java#L207-L210
openengsb-labs/labs-endtoend
core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java
MavenConfigurationHelper.getMavenHome
public static File getMavenHome() throws Exception { final String command; switch (OS.current()) { case LINUX: case MAC: command = "mvn"; break; case WINDOWS: command = "mvn.bat"; break; default: throw new Illega...
java
public static File getMavenHome() throws Exception { final String command; switch (OS.current()) { case LINUX: case MAC: command = "mvn"; break; case WINDOWS: command = "mvn.bat"; break; default: throw new Illega...
[ "public", "static", "File", "getMavenHome", "(", ")", "throws", "Exception", "{", "final", "String", "command", ";", "switch", "(", "OS", ".", "current", "(", ")", ")", "{", "case", "LINUX", ":", "case", "MAC", ":", "command", "=", "\"mvn\"", ";", "bre...
Discover maven home from executable on PATH, using conventions.
[ "Discover", "maven", "home", "from", "executable", "on", "PATH", "using", "conventions", "." ]
train
https://github.com/openengsb-labs/labs-endtoend/blob/5604227b47cd9f45f1757256ca0fd0ddf5ac5871/core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java#L39-L65
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/beans/ELTools.java
ELTools.readAnnotations
public static Annotation[] readAnnotations(UIComponent p_component) { ValueExpression valueExpression = p_component.getValueExpression("value"); if (valueExpression != null && valueExpression.getExpressionString() != null && valueExpression.getExpressionString().length()>0) { return readAnnotations(valueExpressi...
java
public static Annotation[] readAnnotations(UIComponent p_component) { ValueExpression valueExpression = p_component.getValueExpression("value"); if (valueExpression != null && valueExpression.getExpressionString() != null && valueExpression.getExpressionString().length()>0) { return readAnnotations(valueExpressi...
[ "public", "static", "Annotation", "[", "]", "readAnnotations", "(", "UIComponent", "p_component", ")", "{", "ValueExpression", "valueExpression", "=", "p_component", ".", "getValueExpression", "(", "\"value\"", ")", ";", "if", "(", "valueExpression", "!=", "null", ...
Which annotations are given to an object displayed by a JSF component? @param p_component the component @return null if there are no annotations, or if they cannot be accessed
[ "Which", "annotations", "are", "given", "to", "an", "object", "displayed", "by", "a", "JSF", "component?" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/beans/ELTools.java#L412-L418
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java
UserProfileExample.registerSchemas
private void registerSchemas(Configuration conf, SchemaManager schemaManager) throws InterruptedException { HBaseAdmin admin; try { // Construct an HBaseAdmin object (required by schema tool), and delete it // if it exists so we start fresh. admin = new HBaseAdmin(conf); if (admin....
java
private void registerSchemas(Configuration conf, SchemaManager schemaManager) throws InterruptedException { HBaseAdmin admin; try { // Construct an HBaseAdmin object (required by schema tool), and delete it // if it exists so we start fresh. admin = new HBaseAdmin(conf); if (admin....
[ "private", "void", "registerSchemas", "(", "Configuration", "conf", ",", "SchemaManager", "schemaManager", ")", "throws", "InterruptedException", "{", "HBaseAdmin", "admin", ";", "try", "{", "// Construct an HBaseAdmin object (required by schema tool), and delete it", "// if it...
Uses SchemaTool to register the required schemas and create the required tables. @param conf The HBaseConfiguration. @param schemaManager The schema manager SchemaTool needs to create the schemas.
[ "Uses", "SchemaTool", "to", "register", "the", "required", "schemas", "and", "create", "the", "required", "tables", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L275-L294
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java
MSPDIWriter.writeExceptions9
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions) { for (ProjectCalendarException exception : exceptions) { boolean working = exception.getWorking(); Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa...
java
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions) { for (ProjectCalendarException exception : exceptions) { boolean working = exception.getWorking(); Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa...
[ "private", "void", "writeExceptions9", "(", "List", "<", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", ">", "dayList", ",", "List", "<", "ProjectCalendarException", ">", "exceptions", ")", "{", "for", "(", "ProjectCalendarExcepti...
Write exceptions in the format used by MSPDI files prior to Project 2007. @param dayList list of calendar days @param exceptions list of exceptions
[ "Write", "exceptions", "in", "the", "format", "used", "by", "MSPDI", "files", "prior", "to", "Project", "2007", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L488-L520
structurizr/java
structurizr-core/src/com/structurizr/model/ContainerInstance.java
ContainerInstance.addHealthCheck
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The name must not be null or empty."); } if (url == null || url.trim().length() == 0) { ...
java
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The name must not be null or empty."); } if (url == null || url.trim().length() == 0) { ...
[ "@", "Nonnull", "public", "HttpHealthCheck", "addHealthCheck", "(", "String", "name", ",", "String", "url", ",", "int", "interval", ",", "long", "timeout", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "...
Adds a new health check. @param name the name of the health check @param url the URL of the health check @param interval the polling interval, in seconds @param timeout the timeout, in milliseconds @return a HttpHealthCheck instance representing the health check that has been added @throws IllegalArgume...
[ "Adds", "a", "new", "health", "check", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ContainerInstance.java#L145-L171
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
TreeScanner.visitUnionType
@Override public R visitUnionType(UnionTypeTree node, P p) { return scan(node.getTypeAlternatives(), p); }
java
@Override public R visitUnionType(UnionTypeTree node, P p) { return scan(node.getTypeAlternatives(), p); }
[ "@", "Override", "public", "R", "visitUnionType", "(", "UnionTypeTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getTypeAlternatives", "(", ")", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java#L766-L769
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java
CareWebShellEx.registerMenu
public ElementMenuItem registerMenu(String path, String action) { ElementMenuItem menu = getElement(path, getDesktop().getMenubar(), ElementMenuItem.class); menu.setAction(action); return menu; }
java
public ElementMenuItem registerMenu(String path, String action) { ElementMenuItem menu = getElement(path, getDesktop().getMenubar(), ElementMenuItem.class); menu.setAction(action); return menu; }
[ "public", "ElementMenuItem", "registerMenu", "(", "String", "path", ",", "String", "action", ")", "{", "ElementMenuItem", "menu", "=", "getElement", "(", "path", ",", "getDesktop", "(", ")", ".", "getMenubar", "(", ")", ",", "ElementMenuItem", ".", "class", ...
Register a menu. @param path Path for the menu. @param action Associated action for the menu. @return Created menu.
[ "Register", "a", "menu", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java#L216-L220
sstrickx/yahoofinance-api
src/main/java/yahoofinance/YahooFinance.java
YahooFinance.get
public static Stock get(String symbol, Calendar from, Calendar to, Interval interval) throws IOException { Map<String, Stock> result = YahooFinance.getQuotes(symbol, from, to, interval); return result.get(symbol.toUpperCase()); }
java
public static Stock get(String symbol, Calendar from, Calendar to, Interval interval) throws IOException { Map<String, Stock> result = YahooFinance.getQuotes(symbol, from, to, interval); return result.get(symbol.toUpperCase()); }
[ "public", "static", "Stock", "get", "(", "String", "symbol", ",", "Calendar", "from", ",", "Calendar", "to", ",", "Interval", "interval", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "Stock", ">", "result", "=", "YahooFinance", ".", "getQu...
Sends a request with the historical quotes included starting from the specified {@link Calendar} date until the specified Calendar date (to) at the specified interval. Returns null if the data can't be retrieved from Yahoo Finance. @param symbol the symbol of the stock for which you want to retrieve information...
[ "Sends", "a", "request", "with", "the", "historical", "quotes", "included", "starting", "from", "the", "specified", "{", "@link", "Calendar", "}", "date", "until", "the", "specified", "Calendar", "date", "(", "to", ")", "at", "the", "specified", "interval", ...
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/YahooFinance.java#L178-L181
molgenis/molgenis
molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlQueryGenerator.java
PostgreSqlQueryGenerator.isDistinctSelectRequired
private static <E extends Entity> boolean isDistinctSelectRequired( EntityType entityType, Query<E> q) { return isDistinctSelectRequiredRec(entityType, q.getRules()); }
java
private static <E extends Entity> boolean isDistinctSelectRequired( EntityType entityType, Query<E> q) { return isDistinctSelectRequiredRec(entityType, q.getRules()); }
[ "private", "static", "<", "E", "extends", "Entity", ">", "boolean", "isDistinctSelectRequired", "(", "EntityType", "entityType", ",", "Query", "<", "E", ">", "q", ")", "{", "return", "isDistinctSelectRequiredRec", "(", "entityType", ",", "q", ".", "getRules", ...
Determines whether a distinct select is required based on a given query. @param entityType entity meta data @param q query @param <E> entity type @return <code>true</code> if a distinct select is required for SQL queries based on the given query @throws UnknownAttributeException if query field refers to an attribute t...
[ "Determines", "whether", "a", "distinct", "select", "is", "required", "based", "on", "a", "given", "query", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlQueryGenerator.java#L511-L514
RestComm/media-core
control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/call/MgcpCall.java
MgcpCall.removeConnection
public boolean removeConnection(String endpointId, int connectionId) { boolean removed = this.entries.remove(endpointId, connectionId); if (removed && log.isDebugEnabled()) { int left = this.entries.get(endpointId).size(); log.debug("Call " + getCallIdHex() + " unregistered conne...
java
public boolean removeConnection(String endpointId, int connectionId) { boolean removed = this.entries.remove(endpointId, connectionId); if (removed && log.isDebugEnabled()) { int left = this.entries.get(endpointId).size(); log.debug("Call " + getCallIdHex() + " unregistered conne...
[ "public", "boolean", "removeConnection", "(", "String", "endpointId", ",", "int", "connectionId", ")", "{", "boolean", "removed", "=", "this", ".", "entries", ".", "remove", "(", "endpointId", ",", "connectionId", ")", ";", "if", "(", "removed", "&&", "log",...
Unregisters a connection from the call. @param endpointId The identifier of the endpoint that owns the connection. @param connectionId The connection identifier. @return Returns <code>true</code> if connection was removed successfully. Returns <code>false</code> otherwise.
[ "Unregisters", "a", "connection", "from", "the", "call", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/call/MgcpCall.java#L122-L129
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsm.java
XsdAsm.generateClassFromElement
void generateClassFromElement(XsdElement element, String apiName){ XsdAsmElements.generateClassFromElement(interfaceGenerator, createdAttributes, element, apiName); }
java
void generateClassFromElement(XsdElement element, String apiName){ XsdAsmElements.generateClassFromElement(interfaceGenerator, createdAttributes, element, apiName); }
[ "void", "generateClassFromElement", "(", "XsdElement", "element", ",", "String", "apiName", ")", "{", "XsdAsmElements", ".", "generateClassFromElement", "(", "interfaceGenerator", ",", "createdAttributes", ",", "element", ",", "apiName", ")", ";", "}" ]
Generates an element class based on the received {@link XsdElement} object. @param element The {@link XsdElement} containing information needed for the class creation. @param apiName The name of the resulting fluent interface.
[ "Generates", "an", "element", "class", "based", "on", "the", "received", "{" ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsm.java#L74-L76
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java
MethodBuilder.getInstance
public static MethodBuilder getInstance(Context context, TypeElement typeElement, MethodWriter writer) { return new MethodBuilder(context, typeElement, writer); }
java
public static MethodBuilder getInstance(Context context, TypeElement typeElement, MethodWriter writer) { return new MethodBuilder(context, typeElement, writer); }
[ "public", "static", "MethodBuilder", "getInstance", "(", "Context", "context", ",", "TypeElement", "typeElement", ",", "MethodWriter", "writer", ")", "{", "return", "new", "MethodBuilder", "(", "context", ",", "typeElement", ",", "writer", ")", ";", "}" ]
Construct a new MethodBuilder. @param context the build context. @param typeElement the class whoses members are being documented. @param writer the doclet specific writer. @return an instance of a MethodBuilder.
[ "Construct", "a", "new", "MethodBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java#L111-L114
jenkinsci/favorite-plugin
src/main/java/hudson/plugins/favorite/Favorites.java
Favorites.isFavorite
public static boolean isFavorite(@Nonnull User user, @Nonnull Item item) { FavoriteUserProperty fup = user.getProperty(FavoriteUserProperty.class); return fup != null && fup.isJobFavorite(item.getFullName()); }
java
public static boolean isFavorite(@Nonnull User user, @Nonnull Item item) { FavoriteUserProperty fup = user.getProperty(FavoriteUserProperty.class); return fup != null && fup.isJobFavorite(item.getFullName()); }
[ "public", "static", "boolean", "isFavorite", "(", "@", "Nonnull", "User", "user", ",", "@", "Nonnull", "Item", "item", ")", "{", "FavoriteUserProperty", "fup", "=", "user", ".", "getProperty", "(", "FavoriteUserProperty", ".", "class", ")", ";", "return", "f...
Check if the item is favorited @param user to check @param item to check @return favorite state
[ "Check", "if", "the", "item", "is", "favorited" ]
train
https://github.com/jenkinsci/favorite-plugin/blob/4ce9b195b4d888190fe12c92d546d64f22728c22/src/main/java/hudson/plugins/favorite/Favorites.java#L43-L46
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java
OpenCensusUtils.recordMessageEvent
@VisibleForTesting static void recordMessageEvent(Span span, long size, Type eventType) { Preconditions.checkArgument(span != null, "span should not be null."); if (size < 0) { size = 0; } MessageEvent event = MessageEvent.builder(eventType, idGenerator.getAndIncrement()) .se...
java
@VisibleForTesting static void recordMessageEvent(Span span, long size, Type eventType) { Preconditions.checkArgument(span != null, "span should not be null."); if (size < 0) { size = 0; } MessageEvent event = MessageEvent.builder(eventType, idGenerator.getAndIncrement()) .se...
[ "@", "VisibleForTesting", "static", "void", "recordMessageEvent", "(", "Span", "span", ",", "long", "size", ",", "Type", "eventType", ")", "{", "Preconditions", ".", "checkArgument", "(", "span", "!=", "null", ",", "\"span should not be null.\"", ")", ";", "if",...
Records a message event of a certain {@link MessageEvent.Type}. This method is package protected since {@link MessageEvent} might be deprecated in future releases. @param span The {@code span} in which the event occurs. @param size Size of the message. @param eventType The {@code NetworkEvent.Type} of the message even...
[ "Records", "a", "message", "event", "of", "a", "certain", "{", "@link", "MessageEvent", ".", "Type", "}", ".", "This", "method", "is", "package", "protected", "since", "{", "@link", "MessageEvent", "}", "might", "be", "deprecated", "in", "future", "releases"...
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java#L212-L223
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.wrapMethodBodyInTryCatchDebugStatements
public static void wrapMethodBodyInTryCatchDebugStatements(MethodNode methodNode) { BlockStatement code = (BlockStatement) methodNode.getCode(); BlockStatement newCode = new BlockStatement(); TryCatchStatement tryCatchStatement = new TryCatchStatement(code, new BlockStatement()); newCode...
java
public static void wrapMethodBodyInTryCatchDebugStatements(MethodNode methodNode) { BlockStatement code = (BlockStatement) methodNode.getCode(); BlockStatement newCode = new BlockStatement(); TryCatchStatement tryCatchStatement = new TryCatchStatement(code, new BlockStatement()); newCode...
[ "public", "static", "void", "wrapMethodBodyInTryCatchDebugStatements", "(", "MethodNode", "methodNode", ")", "{", "BlockStatement", "code", "=", "(", "BlockStatement", ")", "methodNode", ".", "getCode", "(", ")", ";", "BlockStatement", "newCode", "=", "new", "BlockS...
Wraps a method body in try / catch logic that catches any errors and logs an error, but does not rethrow! @param methodNode The method node
[ "Wraps", "a", "method", "body", "in", "try", "/", "catch", "logic", "that", "catches", "any", "errors", "and", "logs", "an", "error", "but", "does", "not", "rethrow!" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1003-L1015
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsUserTable.java
CmsUserTable.getStatus
String getStatus(CmsUser user, boolean disabled, boolean newUser) { if (disabled) { return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_0); } if (newUser) { return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE_0); ...
java
String getStatus(CmsUser user, boolean disabled, boolean newUser) { if (disabled) { return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_0); } if (newUser) { return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE_0); ...
[ "String", "getStatus", "(", "CmsUser", "user", ",", "boolean", "disabled", ",", "boolean", "newUser", ")", "{", "if", "(", "disabled", ")", "{", "return", "CmsVaadinUtils", ".", "getMessageText", "(", "Messages", ".", "GUI_USERMANAGEMENT_USER_DISABLED_0", ")", "...
Returns status message. @param user CmsUser @param disabled boolean @param newUser boolean @return String
[ "Returns", "status", "message", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserTable.java#L1351-L1366
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/XMLFactory.java
XMLFactory.createXMLWriter
public XMLWriter createXMLWriter(String systemID) throws KNXMLException { final XMLWriter w = (XMLWriter) create(DEFAULT_WRITER); final EntityResolver res = (EntityResolver) create(DEFAULT_RESOLVER); final OutputStream os = res.resolveOutput(systemID); try { w.setOutput(new OutputStreamWriter(os, "UTF...
java
public XMLWriter createXMLWriter(String systemID) throws KNXMLException { final XMLWriter w = (XMLWriter) create(DEFAULT_WRITER); final EntityResolver res = (EntityResolver) create(DEFAULT_RESOLVER); final OutputStream os = res.resolveOutput(systemID); try { w.setOutput(new OutputStreamWriter(os, "UTF...
[ "public", "XMLWriter", "createXMLWriter", "(", "String", "systemID", ")", "throws", "KNXMLException", "{", "final", "XMLWriter", "w", "=", "(", "XMLWriter", ")", "create", "(", "DEFAULT_WRITER", ")", ";", "final", "EntityResolver", "res", "=", "(", "EntityResolv...
Creates a {@link XMLWriter} to write into the XML resource located by the specified identifier. <p> @param systemID location identifier of the XML resource @return XML writer @throws KNXMLException if creation of the writer failed or XML resource can't be resolved
[ "Creates", "a", "{", "@link", "XMLWriter", "}", "to", "write", "into", "the", "XML", "resource", "located", "by", "the", "specified", "identifier", ".", "<p", ">" ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/XMLFactory.java#L145-L161
derari/cthul
objects/src/main/java/org/cthul/objects/reflection/Signatures.java
Signatures.candidateMethods
public static Method[] candidateMethods(Class<?> clazz, String name, Object[] args) { return candidateMethods(collectMethods(clazz, name), args); }
java
public static Method[] candidateMethods(Class<?> clazz, String name, Object[] args) { return candidateMethods(collectMethods(clazz, name), args); }
[ "public", "static", "Method", "[", "]", "candidateMethods", "(", "Class", "<", "?", ">", "clazz", ",", "String", "name", ",", "Object", "[", "]", "args", ")", "{", "return", "candidateMethods", "(", "collectMethods", "(", "clazz", ",", "name", ")", ",", ...
Finds the best equally-matching methods for the given arguments. @param clazz @param name @param args @return methods
[ "Finds", "the", "best", "equally", "-", "matching", "methods", "for", "the", "given", "arguments", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/reflection/Signatures.java#L176-L178
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/Validator.java
Validator.validate
public VM validate(Iterator<Split> dataSplits, TrainingParameters trainingParameters) { AbstractModeler modeler = MLBuilder.create(trainingParameters, configuration); List<VM> validationMetricsList = new LinkedList<>(); while (dataSplits.hasNext()) { Split s = dataSplits.next(); ...
java
public VM validate(Iterator<Split> dataSplits, TrainingParameters trainingParameters) { AbstractModeler modeler = MLBuilder.create(trainingParameters, configuration); List<VM> validationMetricsList = new LinkedList<>(); while (dataSplits.hasNext()) { Split s = dataSplits.next(); ...
[ "public", "VM", "validate", "(", "Iterator", "<", "Split", ">", "dataSplits", ",", "TrainingParameters", "trainingParameters", ")", "{", "AbstractModeler", "modeler", "=", "MLBuilder", ".", "create", "(", "trainingParameters", ",", "configuration", ")", ";", "List...
Estimates the average validation metrics on the provided data splits. @param dataSplits @param trainingParameters @return
[ "Estimates", "the", "average", "validation", "metrics", "on", "the", "provided", "data", "splits", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/Validator.java#L58-L81
alkacon/opencms-core
src/org/opencms/main/CmsSessionManager.java
CmsSessionManager.sendBroadcast
public void sendBroadcast(CmsObject cms, String message, String sessionId, boolean repeat) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(message)) { // don't broadcast empty messages return; } // send the broadcast only to the selected session CmsSessionInfo sessio...
java
public void sendBroadcast(CmsObject cms, String message, String sessionId, boolean repeat) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(message)) { // don't broadcast empty messages return; } // send the broadcast only to the selected session CmsSessionInfo sessio...
[ "public", "void", "sendBroadcast", "(", "CmsObject", "cms", ",", "String", "message", ",", "String", "sessionId", ",", "boolean", "repeat", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "message", ")", ")", "{", "// don't broadcast e...
Sends a broadcast to the specified user session.<p> @param cms the OpenCms user context of the user sending the broadcast @param message the message to broadcast @param sessionId the OpenCms session uuid target (receiver) of the broadcast @param repeat repeat this message
[ "Sends", "a", "broadcast", "to", "the", "specified", "user", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsSessionManager.java#L392-L406
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java
AbstractDataDictionaryParser.parseMappingDefinitions
private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) { HashMap<String, String> mappings = new HashMap<String, String>(); for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) { mappings.put(matcher.getAttribute("path"), matcher.getAttr...
java
private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) { HashMap<String, String> mappings = new HashMap<String, String>(); for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) { mappings.put(matcher.getAttribute("path"), matcher.getAttr...
[ "private", "void", "parseMappingDefinitions", "(", "BeanDefinitionBuilder", "builder", ",", "Element", "element", ")", "{", "HashMap", "<", "String", ",", "String", ">", "mappings", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "fo...
Parses all mapping definitions and adds those to the bean definition builder as property value. @param builder the target bean definition builder. @param element the source element.
[ "Parses", "all", "mapping", "definitions", "and", "adds", "those", "to", "the", "bean", "definition", "builder", "as", "property", "value", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java#L67-L76
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileSystem.java
FileSystem.getStatistics
public static synchronized Statistics getStatistics(String scheme, Class<? extends FileSystem> cls) { Statistics result = statisticsTable.get(cls); if (result == null) { result = new Statistics(scheme); statisticsTable.put(cls, result); } return result; }
java
public static synchronized Statistics getStatistics(String scheme, Class<? extends FileSystem> cls) { Statistics result = statisticsTable.get(cls); if (result == null) { result = new Statistics(scheme); statisticsTable.put(cls, result); } return result; }
[ "public", "static", "synchronized", "Statistics", "getStatistics", "(", "String", "scheme", ",", "Class", "<", "?", "extends", "FileSystem", ">", "cls", ")", "{", "Statistics", "result", "=", "statisticsTable", ".", "get", "(", "cls", ")", ";", "if", "(", ...
Get the statistics for a particular file system @param cls the class to lookup @return a statistics object
[ "Get", "the", "statistics", "for", "a", "particular", "file", "system" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileSystem.java#L2429-L2437
JakeWharton/ActionBarSherlock
actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java
ResourcesCompat.getResources_getInteger
public static int getResources_getInteger(Context context, int id) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { return context.getResources().getInteger(id); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); float widthDp = metrics...
java
public static int getResources_getInteger(Context context, int id) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { return context.getResources().getInteger(id); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); float widthDp = metrics...
[ "public", "static", "int", "getResources_getInteger", "(", "Context", "context", ",", "int", "id", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB_MR2", ")", "{", "return", "context", ".", ...
Support implementation of {@code getResources().getInteger()} that we can use to simulate filtering based on width qualifiers on pre-3.2. @param context Context to load integers from on 3.2+ and to fetch the display metrics. @param id Id of integer to load. @return Associated integer value as reflected by the current ...
[ "Support", "implementation", "of", "{", "@code", "getResources", "()", ".", "getInteger", "()", "}", "that", "we", "can", "use", "to", "simulate", "filtering", "based", "on", "width", "qualifiers", "on", "pre", "-", "3", ".", "2", "." ]
train
https://github.com/JakeWharton/ActionBarSherlock/blob/2c71339e756bcc0b1424c4525680549ba3a2dc97/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java#L80-L102
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_virtualNumbers_number_jobs_id_GET
public OvhVirtualNumberJob serviceName_virtualNumbers_number_jobs_id_GET(String serviceName, String number, Long id) throws IOException { String qPath = "/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}"; StringBuilder sb = path(qPath, serviceName, number, id); String resp = exec(qPath, "GET", sb.toString(), ...
java
public OvhVirtualNumberJob serviceName_virtualNumbers_number_jobs_id_GET(String serviceName, String number, Long id) throws IOException { String qPath = "/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}"; StringBuilder sb = path(qPath, serviceName, number, id); String resp = exec(qPath, "GET", sb.toString(), ...
[ "public", "OvhVirtualNumberJob", "serviceName_virtualNumbers_number_jobs_id_GET", "(", "String", "serviceName", ",", "String", "number", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}\"", "...
Get this object properties REST: GET /sms/{serviceName}/virtualNumbers/{number}/jobs/{id} @param serviceName [required] The internal name of your SMS offer @param number [required] The virtual number @param id [required] Id of the object
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L253-L258
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java
BoxApiFolder.getMoveRequest
public BoxRequestsFolder.UpdateFolder getMoveRequest(String id, String parentId) { BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession) .setParentId(parentId); return request; }
java
public BoxRequestsFolder.UpdateFolder getMoveRequest(String id, String parentId) { BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession) .setParentId(parentId); return request; }
[ "public", "BoxRequestsFolder", ".", "UpdateFolder", "getMoveRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsFolder", ".", "UpdateFolder", "request", "=", "new", "BoxRequestsFolder", ".", "UpdateFolder", "(", "id", ",", "getFolderInfoU...
Gets a request that moves a folder to another folder @param id id of folder to move @param parentId id of parent folder to move folder into @return request to move a folder
[ "Gets", "a", "request", "that", "moves", "a", "folder", "to", "another", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java#L157-L161
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.setContentView
public SwipeBack setContentView(View view, LayoutParams params) { switch (mDragMode) { case SwipeBack.DRAG_CONTENT: mContentContainer.removeAllViews(); mContentContainer.addView(view, params); break; case SwipeBack.DRAG_WINDOW: // mActivity can be null if inflated from xml, so retrieve activity /...
java
public SwipeBack setContentView(View view, LayoutParams params) { switch (mDragMode) { case SwipeBack.DRAG_CONTENT: mContentContainer.removeAllViews(); mContentContainer.addView(view, params); break; case SwipeBack.DRAG_WINDOW: // mActivity can be null if inflated from xml, so retrieve activity /...
[ "public", "SwipeBack", "setContentView", "(", "View", "view", ",", "LayoutParams", "params", ")", "{", "switch", "(", "mDragMode", ")", "{", "case", "SwipeBack", ".", "DRAG_CONTENT", ":", "mContentContainer", ".", "removeAllViews", "(", ")", ";", "mContentContai...
Set the content to an explicit view. @param view The desired content to display. @param params Layout parameters for the view.
[ "Set", "the", "content", "to", "an", "explicit", "view", "." ]
train
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1454-L1473
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.ortho2DLH
public Matrix4f ortho2DLH(float left, float right, float bottom, float top, Matrix4f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setOrtho2DLH(left, right, bottom, top); return ortho2DLHGeneric(left, right, bottom, top, dest); }
java
public Matrix4f ortho2DLH(float left, float right, float bottom, float top, Matrix4f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setOrtho2DLH(left, right, bottom, top); return ortho2DLHGeneric(left, right, bottom, top, dest); }
[ "public", "Matrix4f", "ortho2DLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "Matrix4f", "dest", ")", "{", "if", "(", "(", "properties", "&", "PROPERTY_IDENTITY", ")", "!=", "0", ")", "return", "dest",...
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(float, float, float, float, float, float, Matrix4f) orthoLH()} with <code>zNear=-1</code> and <code>zFar=+1</code>. <p> I...
[ "Apply", "an", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "to", "this", "matrix", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ">", "This", "metho...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L7901-L7905
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.intArrayContains
public static boolean intArrayContains(int[] array, int numToCheck) { for (int i = 0; i < array.length; i++) { if (array[i] == numToCheck) { return true; } } return false; }
java
public static boolean intArrayContains(int[] array, int numToCheck) { for (int i = 0; i < array.length; i++) { if (array[i] == numToCheck) { return true; } } return false; }
[ "public", "static", "boolean", "intArrayContains", "(", "int", "[", "]", "array", ",", "int", "numToCheck", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", "[", "i",...
a simple contains helper method, checks if array contains a numToCheck @param array array of ints @param numToCheck value to find @return True if found, false otherwise
[ "a", "simple", "contains", "helper", "method", "checks", "if", "array", "contains", "a", "numToCheck" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L310-L317
tomdcc/sham
sham-core/src/main/java/org/shamdata/text/SpewGenerator.java
SpewGenerator.nextLine
public String nextLine(Map<String,Object> extraClasses) { return mainClass.render(null, preprocessExtraClasses(extraClasses)); }
java
public String nextLine(Map<String,Object> extraClasses) { return mainClass.render(null, preprocessExtraClasses(extraClasses)); }
[ "public", "String", "nextLine", "(", "Map", "<", "String", ",", "Object", ">", "extraClasses", ")", "{", "return", "mainClass", ".", "render", "(", "null", ",", "preprocessExtraClasses", "(", "extraClasses", ")", ")", ";", "}" ]
Returns a random line of text, driven by the underlying spew file and the given classes. For example, to drive a spew file but add some parameters to it, call this method with the class names as the map keys, and the Strings that you'd like substituted as the values. @param extraClasses the extra classes to use @retur...
[ "Returns", "a", "random", "line", "of", "text", "driven", "by", "the", "underlying", "spew", "file", "and", "the", "given", "classes", ".", "For", "example", "to", "drive", "a", "spew", "file", "but", "add", "some", "parameters", "to", "it", "call", "thi...
train
https://github.com/tomdcc/sham/blob/33ede5e7130888736d6c84368e16a56e9e31e033/sham-core/src/main/java/org/shamdata/text/SpewGenerator.java#L45-L47
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java
CartItemUrl.updateCartItemQuantityUrl
public static MozuUrl updateCartItemQuantityUrl(String cartItemId, Integer quantity, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}/{quantity}?responseFields={responseFields}"); formatter.formatUrl("cartItemId", cartItemId); formatter.format...
java
public static MozuUrl updateCartItemQuantityUrl(String cartItemId, Integer quantity, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}/{quantity}?responseFields={responseFields}"); formatter.formatUrl("cartItemId", cartItemId); formatter.format...
[ "public", "static", "MozuUrl", "updateCartItemQuantityUrl", "(", "String", "cartItemId", ",", "Integer", "quantity", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/carts/current/items/{cartItemId}/{q...
Get Resource Url for UpdateCartItemQuantity @param cartItemId Identifier of the cart item to delete. @param quantity The number of cart items in the shopper's active cart. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parame...
[ "Get", "Resource", "Url", "for", "UpdateCartItemQuantity" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L73-L80
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java
DateFormatSymbols.setYearNames
public void setYearNames(String[] yearNames, int context, int width) { if (context == FORMAT && width == ABBREVIATED) { shortYearNames = duplicate(yearNames); } }
java
public void setYearNames(String[] yearNames, int context, int width) { if (context == FORMAT && width == ABBREVIATED) { shortYearNames = duplicate(yearNames); } }
[ "public", "void", "setYearNames", "(", "String", "[", "]", "yearNames", ",", "int", "context", ",", "int", "width", ")", "{", "if", "(", "context", "==", "FORMAT", "&&", "width", "==", "ABBREVIATED", ")", "{", "shortYearNames", "=", "duplicate", "(", "ye...
Sets cyclic year name strings, for example: "jia-zi", "yi-chou", etc. @param yearNames The new cyclic year name strings. @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
[ "Sets", "cyclic", "year", "name", "strings", "for", "example", ":", "jia", "-", "zi", "yi", "-", "chou", "etc", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L1120-L1124
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.emptyIfNotPresent
public static String emptyIfNotPresent(Config config, String path) { return getString(config, path, StringUtils.EMPTY); }
java
public static String emptyIfNotPresent(Config config, String path) { return getString(config, path, StringUtils.EMPTY); }
[ "public", "static", "String", "emptyIfNotPresent", "(", "Config", "config", ",", "String", "path", ")", "{", "return", "getString", "(", "config", ",", "path", ",", "StringUtils", ".", "EMPTY", ")", ";", "}" ]
Return string value at <code>path</code> if <code>config</code> has path. If not return an empty string @param config in which the path may be present @param path key to look for in the config object @return string value at <code>path</code> if <code>config</code> has path. If not return an empty string
[ "Return", "string", "value", "at", "<code", ">", "path<", "/", "code", ">", "if", "<code", ">", "config<", "/", "code", ">", "has", "path", ".", "If", "not", "return", "an", "empty", "string" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L311-L313
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java
PredictionsImpl.predictImageWithServiceResponseAsync
public Observable<ServiceResponse<ImagePrediction>> predictImageWithServiceResponseAsync(UUID projectId, byte[] imageData, PredictImageOptionalParameter predictImageOptionalParameter) { if (projectId == null) { throw new IllegalArgumentException("Parameter projectId is required and cannot be null.")...
java
public Observable<ServiceResponse<ImagePrediction>> predictImageWithServiceResponseAsync(UUID projectId, byte[] imageData, PredictImageOptionalParameter predictImageOptionalParameter) { if (projectId == null) { throw new IllegalArgumentException("Parameter projectId is required and cannot be null.")...
[ "public", "Observable", "<", "ServiceResponse", "<", "ImagePrediction", ">", ">", "predictImageWithServiceResponseAsync", "(", "UUID", "projectId", ",", "byte", "[", "]", "imageData", ",", "PredictImageOptionalParameter", "predictImageOptionalParameter", ")", "{", "if", ...
Predict an image and saves the result. @param projectId The project id @param imageData the InputStream value @param predictImageOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the obse...
[ "Predict", "an", "image", "and", "saves", "the", "result", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java#L492-L506
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
JobmanagerInfoServlet.writeJsonForArchive
private void writeJsonForArchive(PrintWriter wrt, List<RecentJobEvent> jobs) { wrt.write("["); // sort jobs by time Collections.sort(jobs, new Comparator<RecentJobEvent>() { @Override public int compare(RecentJobEvent o1, RecentJobEvent o2) { if(o1.getTimestamp() < o2.getTimestamp()) { retur...
java
private void writeJsonForArchive(PrintWriter wrt, List<RecentJobEvent> jobs) { wrt.write("["); // sort jobs by time Collections.sort(jobs, new Comparator<RecentJobEvent>() { @Override public int compare(RecentJobEvent o1, RecentJobEvent o2) { if(o1.getTimestamp() < o2.getTimestamp()) { retur...
[ "private", "void", "writeJsonForArchive", "(", "PrintWriter", "wrt", ",", "List", "<", "RecentJobEvent", ">", "jobs", ")", "{", "wrt", ".", "write", "(", "\"[\"", ")", ";", "// sort jobs by time", "Collections", ".", "sort", "(", "jobs", ",", "new", "Compara...
Writes Json with a list of currently archived jobs, sorted by time @param wrt @param jobs
[ "Writes", "Json", "with", "a", "list", "of", "currently", "archived", "jobs", "sorted", "by", "time" ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java#L180-L217
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java
ApplicationsInner.beginCreateAsync
public Observable<ApplicationInner> beginCreateAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, Appli...
java
public Observable<ApplicationInner> beginCreateAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, Appli...
[ "public", "Observable", "<", "ApplicationInner", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "applicationName", ",", "ApplicationInner", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", ...
Creates applications for the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param applicationName The constant value for the application name. @param parameters The application create request. @throws IllegalArgumentException thrown if parameter...
[ "Creates", "applications", "for", "the", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java#L435-L442
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
JsonPath.read
@SuppressWarnings({"unchecked"}) public static <T> T read(InputStream jsonInputStream, String jsonPath, Predicate... filters) throws IOException { return new ParseContextImpl().parse(jsonInputStream).read(jsonPath, filters); }
java
@SuppressWarnings({"unchecked"}) public static <T> T read(InputStream jsonInputStream, String jsonPath, Predicate... filters) throws IOException { return new ParseContextImpl().parse(jsonInputStream).read(jsonPath, filters); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "static", "<", "T", ">", "T", "read", "(", "InputStream", "jsonInputStream", ",", "String", "jsonPath", ",", "Predicate", "...", "filters", ")", "throws", "IOException", "{", "return", "...
Creates a new JsonPath and applies it to the provided Json object @param jsonInputStream json input stream @param jsonPath the json path @param filters filters to be applied to the filter place holders [?] in the path @param <T> expected return type @return list of objects matched by the gi...
[ "Creates", "a", "new", "JsonPath", "and", "applies", "it", "to", "the", "provided", "Json", "object" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L540-L543
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/UsersApi.java
UsersApi.getUsers
public ApiSuccessResponse getUsers(String searchTerm, BigDecimal groupId, String sort, String sortBy, BigDecimal limit, BigDecimal offset, String channels) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getUsersWithHttpInfo(searchTerm, groupId, sort, sortBy, limit, offset, channels); retur...
java
public ApiSuccessResponse getUsers(String searchTerm, BigDecimal groupId, String sort, String sortBy, BigDecimal limit, BigDecimal offset, String channels) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getUsersWithHttpInfo(searchTerm, groupId, sort, sortBy, limit, offset, channels); retur...
[ "public", "ApiSuccessResponse", "getUsers", "(", "String", "searchTerm", ",", "BigDecimal", "groupId", ",", "String", "sort", ",", "String", "sortBy", ",", "BigDecimal", "limit", ",", "BigDecimal", "offset", ",", "String", "channels", ")", "throws", "ApiException"...
Search for users. Search for users with the specified filters. @param searchTerm The text to search. (optional) @param groupId The ID of the group where the user belongs. (optional) @param sort The sort order, either &#x60;asc&#x60; (ascending) or &#x60;desc&#x60; (descending). The default is &#x60;asc&#x60;. (optional...
[ "Search", "for", "users", ".", "Search", "for", "users", "with", "the", "specified", "filters", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UsersApi.java#L152-L155
camunda/camunda-bpm-platform
engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistry.java
ActivitiStateHandlerRegistry.findRegistrationForProcessAndState
public ActivitiStateHandlerRegistration findRegistrationForProcessAndState(String processName, String stateName) { ActivitiStateHandlerRegistration r = null; String key = registrationKey(processName, stateName); Collection<ActivitiStateHandlerRegistration> rs = this.findRegistrationsForProcessAndState( pro...
java
public ActivitiStateHandlerRegistration findRegistrationForProcessAndState(String processName, String stateName) { ActivitiStateHandlerRegistration r = null; String key = registrationKey(processName, stateName); Collection<ActivitiStateHandlerRegistration> rs = this.findRegistrationsForProcessAndState( pro...
[ "public", "ActivitiStateHandlerRegistration", "findRegistrationForProcessAndState", "(", "String", "processName", ",", "String", "stateName", ")", "{", "ActivitiStateHandlerRegistration", "r", "=", "null", ";", "String", "key", "=", "registrationKey", "(", "processName", ...
this scours the registry looking for candidate registrations that match a given process name and/ or state nanme @param processName the name of the process @param stateName the name of the state @return an unambiguous {@link org.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistry} or null
[ "this", "scours", "the", "registry", "looking", "for", "candidate", "registrations", "that", "match", "a", "given", "process", "name", "and", "/", "or", "state", "nanme" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistry.java#L123-L153
baneizalfe/PullToDismissPager
PullToDismissPager/src/main/java/com/mrbug/pulltodismisspager/PullToDismissPager.java
PullToDismissPager.expandPanel
public boolean expandPanel(float mSlideOffset) { if (mSlideableView == null || mSlideState == SlideState.EXPANDED) return false; mSlideableView.setVisibility(View.VISIBLE); return expandPanel(mSlideableView, 0, mSlideOffset); }
java
public boolean expandPanel(float mSlideOffset) { if (mSlideableView == null || mSlideState == SlideState.EXPANDED) return false; mSlideableView.setVisibility(View.VISIBLE); return expandPanel(mSlideableView, 0, mSlideOffset); }
[ "public", "boolean", "expandPanel", "(", "float", "mSlideOffset", ")", "{", "if", "(", "mSlideableView", "==", "null", "||", "mSlideState", "==", "SlideState", ".", "EXPANDED", ")", "return", "false", ";", "mSlideableView", ".", "setVisibility", "(", "View", "...
Partially expand the sliding panel up to a specific offset @param mSlideOffset Value between 0 and 1, where 0 is completely expanded. @return true if the pane was slideable and is now expanded/in the process of expanding
[ "Partially", "expand", "the", "sliding", "panel", "up", "to", "a", "specific", "offset" ]
train
https://github.com/baneizalfe/PullToDismissPager/blob/14b12725f8ab9274b2499432d85e1b8b2b1850a5/PullToDismissPager/src/main/java/com/mrbug/pulltodismisspager/PullToDismissPager.java#L736-L740
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java
Constraints.eqProperty
public PropertyConstraint eqProperty(String propertyName, String otherPropertyName) { return valueProperties(propertyName, EqualTo.instance(), otherPropertyName); }
java
public PropertyConstraint eqProperty(String propertyName, String otherPropertyName) { return valueProperties(propertyName, EqualTo.instance(), otherPropertyName); }
[ "public", "PropertyConstraint", "eqProperty", "(", "String", "propertyName", ",", "String", "otherPropertyName", ")", "{", "return", "valueProperties", "(", "propertyName", ",", "EqualTo", ".", "instance", "(", ")", ",", "otherPropertyName", ")", ";", "}" ]
Apply a "equal to" constraint to two bean properties. @param propertyName The first property @param otherPropertyName The other property @return The constraint
[ "Apply", "a", "equal", "to", "constraint", "to", "two", "bean", "properties", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L842-L844
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/io/WritableUtils.java
WritableUtils.readEnum
public static <T extends Enum<T>> T readEnum(DataInput in, Class<T> enumType) throws IOException { return T.valueOf(enumType, Text.readString(in)); }
java
public static <T extends Enum<T>> T readEnum(DataInput in, Class<T> enumType) throws IOException { return T.valueOf(enumType, Text.readString(in)); }
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "readEnum", "(", "DataInput", "in", ",", "Class", "<", "T", ">", "enumType", ")", "throws", "IOException", "{", "return", "T", ".", "valueOf", "(", "enumType", ",", "Text", "."...
Read an Enum value from DataInput, Enums are read and written using String values. @param <T> Enum type @param in DataInput to read from @param enumType Class type of Enum @return Enum represented by String read from DataInput @throws IOException
[ "Read", "an", "Enum", "value", "from", "DataInput", "Enums", "are", "read", "and", "written", "using", "String", "values", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/io/WritableUtils.java#L370-L372
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/describe/DescribeParserFactory.java
DescribeParserFactory.newInstance
public static AbstractDescribeParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDescribeParser(shardingRule, lexerEngine); default: ...
java
public static AbstractDescribeParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDescribeParser(shardingRule, lexerEngine); default: ...
[ "public", "static", "AbstractDescribeParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "case", ...
Create describe parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return describe parser instance
[ "Create", "describe", "parser", "instance", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/describe/DescribeParserFactory.java#L43-L51
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/ext/listen/ListenParamExtension.java
ListenParamExtension.resolveListenerGeneric
private Class<?> resolveListenerGeneric(final MethodGenericsContext generics, final Class listenerType, final int position) { // TO BE IMPROVED here must be correct resolution of RequiresRecordConversion generic, but it requires // some improvements in generic...
java
private Class<?> resolveListenerGeneric(final MethodGenericsContext generics, final Class listenerType, final int position) { // TO BE IMPROVED here must be correct resolution of RequiresRecordConversion generic, but it requires // some improvements in generic...
[ "private", "Class", "<", "?", ">", "resolveListenerGeneric", "(", "final", "MethodGenericsContext", "generics", ",", "final", "Class", "listenerType", ",", "final", "int", "position", ")", "{", "// TO BE IMPROVED here must be correct resolution of RequiresRecordConversion gen...
Resolve generic specified directly in listener parameter (e.g. {@code QueryListener<Model>}). It would be useful if, for some reason, correct type could not be resolved from listener instance (in most cases it would be possible). @param generics repository method generics context @param listenerType type of specif...
[ "Resolve", "generic", "specified", "directly", "in", "listener", "parameter", "(", "e", ".", "g", ".", "{", "@code", "QueryListener<Model", ">", "}", ")", ".", "It", "would", "be", "useful", "if", "for", "some", "reason", "correct", "type", "could", "not",...
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/ext/listen/ListenParamExtension.java#L121-L137
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java
P2sVpnGatewaysInner.createOrUpdate
public P2SVpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).toBlocking().last().body(); }
java
public P2SVpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).toBlocking().last().body(); }
[ "public", "P2SVpnGatewayInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "P2SVpnGatewayInner", "p2SVpnGatewayParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "gatewayName", ...
Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the P2SVpnGateway. @param gatewayName The name of the gateway. @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. @throws I...
[ "Creates", "a", "virtual", "wan", "p2s", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java#L223-L225
anotheria/moskito
moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java
GenericStats.getStatValueAsDouble
public double getStatValueAsDouble(T metric, String interval) { StatValue statValue = getMonitoredStatValue(metric); if (metric.isRateMetric()) { //check for DEFAULT can be removed when same check removed from statValueImpl if("default".equals(interval)) { interva...
java
public double getStatValueAsDouble(T metric, String interval) { StatValue statValue = getMonitoredStatValue(metric); if (metric.isRateMetric()) { //check for DEFAULT can be removed when same check removed from statValueImpl if("default".equals(interval)) { interva...
[ "public", "double", "getStatValueAsDouble", "(", "T", "metric", ",", "String", "interval", ")", "{", "StatValue", "statValue", "=", "getMonitoredStatValue", "(", "metric", ")", ";", "if", "(", "metric", ".", "isRateMetric", "(", ")", ")", "{", "//check for DEF...
Get value of provided metric for the given interval as double value. @param metric metric which value we wanna get @param interval the name of the Interval or <code>null</code> to get the absolute value @return the current value
[ "Get", "value", "of", "provided", "metric", "for", "the", "given", "interval", "as", "double", "value", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java#L204-L218
timehop/sticky-headers-recyclerview
library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java
DimensionCalculator.initMarginRect
private void initMarginRect(Rect marginRect, MarginLayoutParams marginLayoutParams) { marginRect.set( marginLayoutParams.leftMargin, marginLayoutParams.topMargin, marginLayoutParams.rightMargin, marginLayoutParams.bottomMargin ); }
java
private void initMarginRect(Rect marginRect, MarginLayoutParams marginLayoutParams) { marginRect.set( marginLayoutParams.leftMargin, marginLayoutParams.topMargin, marginLayoutParams.rightMargin, marginLayoutParams.bottomMargin ); }
[ "private", "void", "initMarginRect", "(", "Rect", "marginRect", ",", "MarginLayoutParams", "marginLayoutParams", ")", "{", "marginRect", ".", "set", "(", "marginLayoutParams", ".", "leftMargin", ",", "marginLayoutParams", ".", "topMargin", ",", "marginLayoutParams", "...
Converts {@link MarginLayoutParams} into a representative {@link Rect}. @param marginRect Rect to be initialized with margins coordinates, where {@link MarginLayoutParams#leftMargin} is equivalent to {@link Rect#left}, etc. @param marginLayoutParams margins to populate the Rect with
[ "Converts", "{", "@link", "MarginLayoutParams", "}", "into", "a", "representative", "{", "@link", "Rect", "}", "." ]
train
https://github.com/timehop/sticky-headers-recyclerview/blob/f5a9e9b8f5d96734e20439b0a41381865fa52fb7/library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java#L39-L46
h2oai/h2o-3
h2o-core/src/main/java/water/parser/Parser.java
Parser.readOneFile
private StreamInfo readOneFile(final InputStream is, final StreamParseWriter dout, InputStream bvs, StreamParseWriter nextChunk, int zidx, int fileIndex) throws IOException { int cidx = 0; StreamData din = new StreamData(is); // only check header for 2nd file onward since gu...
java
private StreamInfo readOneFile(final InputStream is, final StreamParseWriter dout, InputStream bvs, StreamParseWriter nextChunk, int zidx, int fileIndex) throws IOException { int cidx = 0; StreamData din = new StreamData(is); // only check header for 2nd file onward since gu...
[ "private", "StreamInfo", "readOneFile", "(", "final", "InputStream", "is", ",", "final", "StreamParseWriter", "dout", ",", "InputStream", "bvs", ",", "StreamParseWriter", "nextChunk", ",", "int", "zidx", ",", "int", "fileIndex", ")", "throws", "IOException", "{", ...
This method reads in one zip file. Before reading the file, it will check if the current file has the same number of columns and separator type as the previous files it has parssed. If they do not match, no file will be parsed in this case. @param is @param dout @param bvs @param nextChunk @param zidx @return @throw...
[ "This", "method", "reads", "in", "one", "zip", "file", ".", "Before", "reading", "the", "file", "it", "will", "check", "if", "the", "current", "file", "has", "the", "same", "number", "of", "columns", "and", "separator", "type", "as", "the", "previous", "...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/Parser.java#L193-L217
jmchilton/galaxy-bootstrap
src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java
DownloadProperties.forGalaxyCentral
@Deprecated public static DownloadProperties forGalaxyCentral(final File destination, String revision) { return new DownloadProperties(GALAXY_CENTRAL_REPOSITORY_URL, BRANCH_DEFAULT, revision, destination); }
java
@Deprecated public static DownloadProperties forGalaxyCentral(final File destination, String revision) { return new DownloadProperties(GALAXY_CENTRAL_REPOSITORY_URL, BRANCH_DEFAULT, revision, destination); }
[ "@", "Deprecated", "public", "static", "DownloadProperties", "forGalaxyCentral", "(", "final", "File", "destination", ",", "String", "revision", ")", "{", "return", "new", "DownloadProperties", "(", "GALAXY_CENTRAL_REPOSITORY_URL", ",", "BRANCH_DEFAULT", ",", "revision"...
Builds a new DownloadProperties for downloading Galaxy from galaxy-central. @param destination The destination directory to store Galaxy, null if a directory should be chosen by default. @param revision The revision to use for Galaxy. @return A new DownloadProperties for downloading Galaxy from galaxy-central.
[ "Builds", "a", "new", "DownloadProperties", "for", "downloading", "Galaxy", "from", "galaxy", "-", "central", "." ]
train
https://github.com/jmchilton/galaxy-bootstrap/blob/4a899f5e6ec0c9f6f4b9b21d5a0320e5925ec649/src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java#L349-L352
korpling/ANNIS
annis-libgui/src/main/java/annis/libgui/Helper.java
Helper.getAnnisAsyncWebResource
public static AsyncWebResource getAnnisAsyncWebResource() { // get URI used by the application String uri = (String) VaadinSession.getCurrent().getAttribute( KEY_WEB_SERVICE_URL); // if already authentificated the REST client is set as the "user" property AnnisUser user = getUser(); return...
java
public static AsyncWebResource getAnnisAsyncWebResource() { // get URI used by the application String uri = (String) VaadinSession.getCurrent().getAttribute( KEY_WEB_SERVICE_URL); // if already authentificated the REST client is set as the "user" property AnnisUser user = getUser(); return...
[ "public", "static", "AsyncWebResource", "getAnnisAsyncWebResource", "(", ")", "{", "// get URI used by the application", "String", "uri", "=", "(", "String", ")", "VaadinSession", ".", "getCurrent", "(", ")", ".", "getAttribute", "(", "KEY_WEB_SERVICE_URL", ")", ";", ...
Gets or creates an asynchronous web resource to the ANNIS service. This is a convenience wrapper to {@link #getAnnisWebResource(java.lang.String, annis.security.AnnisUser) } that does not need any arguments @return A reference to the ANNIS service root resource.
[ "Gets", "or", "creates", "an", "asynchronous", "web", "resource", "to", "the", "ANNIS", "service", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-libgui/src/main/java/annis/libgui/Helper.java#L351-L361
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java
ProcessUtil.invokeProcess
public static int invokeProcess(String[] commandLine, Reader input, Consumer<String> consumer) throws IOException, InterruptedException { return invokeProcess(commandLine, input, new DelegatingConsumer(consumer)); }
java
public static int invokeProcess(String[] commandLine, Reader input, Consumer<String> consumer) throws IOException, InterruptedException { return invokeProcess(commandLine, input, new DelegatingConsumer(consumer)); }
[ "public", "static", "int", "invokeProcess", "(", "String", "[", "]", "commandLine", ",", "Reader", "input", ",", "Consumer", "<", "String", ">", "consumer", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "invokeProcess", "(", "commandL...
Runs the given set of command line arguments as a system process and returns the exit value of the spawned process. Additionally allows to supply an input stream to the invoked program. Outputs of the process (both normal and error) are passed to the {@code consumer}. @param commandLine the list of command line argume...
[ "Runs", "the", "given", "set", "of", "command", "line", "arguments", "as", "a", "system", "process", "and", "returns", "the", "exit", "value", "of", "the", "spawned", "process", ".", "Additionally", "allows", "to", "supply", "an", "input", "stream", "to", ...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java#L122-L125
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java
ScriptContext.copyFormEntry
@Cmd public void copyFormEntry(final String srcDataSetKey, final String srcKey, final String destDataSetKey, final String destKey) { Map<String, DataSet> currentDataSets = dataSourceProvider.get().getCurrentDataSets(); DataSet srcDataSet = currentDataSets.get(srcDataSetKey); DataSet destDataSet = currentDataSets...
java
@Cmd public void copyFormEntry(final String srcDataSetKey, final String srcKey, final String destDataSetKey, final String destKey) { Map<String, DataSet> currentDataSets = dataSourceProvider.get().getCurrentDataSets(); DataSet srcDataSet = currentDataSets.get(srcDataSetKey); DataSet destDataSet = currentDataSets...
[ "@", "Cmd", "public", "void", "copyFormEntry", "(", "final", "String", "srcDataSetKey", ",", "final", "String", "srcKey", ",", "final", "String", "destDataSetKey", ",", "final", "String", "destKey", ")", "{", "Map", "<", "String", ",", "DataSet", ">", "curre...
Copies a {@link DataSet} entry from one {@link DataSet} to another. @param srcDataSetKey the source data set key @param srcKey the source entry key @param destDataSetKey the destination data set key @param destKey the destination entry key
[ "Copies", "a", "{", "@link", "DataSet", "}", "entry", "from", "one", "{", "@link", "DataSet", "}", "to", "another", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java#L254-L260
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.registerFactory
private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) { Preconditions.checkNotNull(t, "Type parameter must not be null."); Preconditions.checkNotNull(factory, "Factory parameter must not be null."); if (!TypeInfoFactory.class.isAssignableFrom(factory)) { throw new IllegalArgume...
java
private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) { Preconditions.checkNotNull(t, "Type parameter must not be null."); Preconditions.checkNotNull(factory, "Factory parameter must not be null."); if (!TypeInfoFactory.class.isAssignableFrom(factory)) { throw new IllegalArgume...
[ "private", "static", "void", "registerFactory", "(", "Type", "t", ",", "Class", "<", "?", "extends", "TypeInfoFactory", ">", "factory", ")", "{", "Preconditions", ".", "checkNotNull", "(", "t", ",", "\"Type parameter must not be null.\"", ")", ";", "Preconditions"...
Registers a type information factory globally for a certain type. Every following type extraction operation will use the provided factory for this type. The factory will have highest precedence for this type. In a hierarchy of types the registered factory has higher precedence than annotations at the same level but low...
[ "Registers", "a", "type", "information", "factory", "globally", "for", "a", "certain", "type", ".", "Every", "following", "type", "extraction", "operation", "will", "use", "the", "provided", "factory", "for", "this", "type", ".", "The", "factory", "will", "hav...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L149-L160
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getCertificateIssuer
public IssuerBundle getCertificateIssuer(String vaultBaseUrl, String issuerName) { return getCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName).toBlocking().single().body(); }
java
public IssuerBundle getCertificateIssuer(String vaultBaseUrl, String issuerName) { return getCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName).toBlocking().single().body(); }
[ "public", "IssuerBundle", "getCertificateIssuer", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ")", "{", "return", "getCertificateIssuerWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "issuerName", ")", ".", "toBlocking", "(", ")", ".", "single", "...
Lists the specified certificate issuer. The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param...
[ "Lists", "the", "specified", "certificate", "issuer", ".", "The", "GetCertificateIssuer", "operation", "returns", "the", "specified", "certificate", "issuer", "resources", "in", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "certif...
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#L6312-L6314
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlAgent agent, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(agent); final PyAppendable appendable = createAppendable(jvmType, context); final List<JvmTypeReference> superTypes; if (agent.getExtends() != null) { ...
java
protected void _generate(SarlAgent agent, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(agent); final PyAppendable appendable = createAppendable(jvmType, context); final List<JvmTypeReference> superTypes; if (agent.getExtends() != null) { ...
[ "protected", "void", "_generate", "(", "SarlAgent", "agent", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "final", "JvmDeclaredType", "jvmType", "=", "getJvmModelAssociations", "(", ")", ".", "getInferredType", "(", "agent", ")", ";", "final", "PyAppe...
Generate the given object. @param agent the agent. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L769-L790
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java
ClassDocImpl.findConstructor
public ConstructorDoc findConstructor(String constrName, String[] paramTypes) { Names names = tsym.name.table.names; for (Scope.Entry e = tsym.members().lookup(names.fromString("<init>")); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH)...
java
public ConstructorDoc findConstructor(String constrName, String[] paramTypes) { Names names = tsym.name.table.names; for (Scope.Entry e = tsym.members().lookup(names.fromString("<init>")); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH)...
[ "public", "ConstructorDoc", "findConstructor", "(", "String", "constrName", ",", "String", "[", "]", "paramTypes", ")", "{", "Names", "names", "=", "tsym", ".", "name", ".", "table", ".", "names", ";", "for", "(", "Scope", ".", "Entry", "e", "=", "tsym",...
Find constructor in this class. @param constrName the unqualified name to search for. @param paramTypes the array of Strings for constructor parameters. @return the first ConstructorDocImpl which matches, null if not found.
[ "Find", "constructor", "in", "this", "class", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java#L1001-L1021
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java
JMElasticsearchIndex.upsertData
public UpdateResponse upsertData(String jsonSource, String index, String type, String id) { return upsertQuery(buildPrepareUpsert(index, type, id, jsonSource)); }
java
public UpdateResponse upsertData(String jsonSource, String index, String type, String id) { return upsertQuery(buildPrepareUpsert(index, type, id, jsonSource)); }
[ "public", "UpdateResponse", "upsertData", "(", "String", "jsonSource", ",", "String", "index", ",", "String", "type", ",", "String", "id", ")", "{", "return", "upsertQuery", "(", "buildPrepareUpsert", "(", "index", ",", "type", ",", "id", ",", "jsonSource", ...
Upsert data update response. @param jsonSource the json source @param index the index @param type the type @param id the id @return the update response
[ "Upsert", "data", "update", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L146-L149
lamydev/Android-Notification
core/src/zemin/notification/NotificationEntry.java
NotificationEntry.addAction
public void addAction(int icon, CharSequence title, Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { addAction(new Action(icon, title, listener, activity, service, broadcast, extra)); }
java
public void addAction(int icon, CharSequence title, Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { addAction(new Action(icon, title, listener, activity, service, broadcast, extra)); }
[ "public", "void", "addAction", "(", "int", "icon", ",", "CharSequence", "title", ",", "Action", ".", "OnActionListener", "listener", ",", "ComponentName", "activity", ",", "ComponentName", "service", ",", "String", "broadcast", ",", "Bundle", "extra", ")", "{", ...
Add a action to this notification. Actions are typically displayed as a button adjacent to the notification content. @see android.app.Notification#addAction @param icon @param title @param listener @param activity The activity to be started. @param service The service to be started. @param broadcast The broadcast to ...
[ "Add", "a", "action", "to", "this", "notification", ".", "Actions", "are", "typically", "displayed", "as", "a", "button", "adjacent", "to", "the", "notification", "content", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L557-L561
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/ConnectApi.java
ConnectApi.getEventLog
public ConnectLog getEventLog(String accountId, String logId, ConnectApi.GetEventLogOptions options) throws ApiException { Object localVarPostBody = "{}"; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required parameter '...
java
public ConnectLog getEventLog(String accountId, String logId, ConnectApi.GetEventLogOptions options) throws ApiException { Object localVarPostBody = "{}"; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required parameter '...
[ "public", "ConnectLog", "getEventLog", "(", "String", "accountId", ",", "String", "logId", ",", "ConnectApi", ".", "GetEventLogOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "\"{}\"", ";", "// verify the required parameter 'a...
Get the specified Connect log entry. Retrieves the specified Connect log entry for your account. ###### Note: The &#x60;enableLog&#x60; setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded. @param accountId The external account number (...
[ "Get", "the", "specified", "Connect", "log", "entry", ".", "Retrieves", "the", "specified", "Connect", "log", "entry", "for", "your", "account", ".", "######", "Note", ":", "The", "&#x60", ";", "enableLog&#x60", ";", "setting", "in", "the", "Connect", "confi...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/ConnectApi.java#L362-L404
alkacon/opencms-core
src-gwt/org/opencms/ui/client/CmsSitemapExtensionConnector.java
CmsSitemapExtensionConnector.openPageCopyDialog
public void openPageCopyDialog(String structureId, AsyncCallback<String> callback) { String callId = "" + CALL_COUNTER++; m_callbacks.put(callId, callback); getRpcProxy(I_CmsSitemapServerRpc.class).openPageCopyDialog(callId, "" + structureId); }
java
public void openPageCopyDialog(String structureId, AsyncCallback<String> callback) { String callId = "" + CALL_COUNTER++; m_callbacks.put(callId, callback); getRpcProxy(I_CmsSitemapServerRpc.class).openPageCopyDialog(callId, "" + structureId); }
[ "public", "void", "openPageCopyDialog", "(", "String", "structureId", ",", "AsyncCallback", "<", "String", ">", "callback", ")", "{", "String", "callId", "=", "\"\"", "+", "CALL_COUNTER", "++", ";", "m_callbacks", ".", "put", "(", "callId", ",", "callback", ...
Opens the page copy dialog.<p> @param structureId the structure id of the resource for which to open the dialog @param callback the callback to call with the result when the dialog has finished
[ "Opens", "the", "page", "copy", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ui/client/CmsSitemapExtensionConnector.java#L111-L117
stephanenicolas/robospice
robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/request/notifier/SpiceServiceListenerNotifier.java
SpiceServiceListenerNotifier.notifyObserversOfRequestNotFound
public void notifyObserversOfRequestNotFound(CachedSpiceRequest<?> request) { RequestProcessingContext requestProcessingContext = new RequestProcessingContext(); requestProcessingContext.setExecutionThread(Thread.currentThread()); post(new RequestNotFoundNotifier(request, spiceServiceListenerLis...
java
public void notifyObserversOfRequestNotFound(CachedSpiceRequest<?> request) { RequestProcessingContext requestProcessingContext = new RequestProcessingContext(); requestProcessingContext.setExecutionThread(Thread.currentThread()); post(new RequestNotFoundNotifier(request, spiceServiceListenerLis...
[ "public", "void", "notifyObserversOfRequestNotFound", "(", "CachedSpiceRequest", "<", "?", ">", "request", ")", "{", "RequestProcessingContext", "requestProcessingContext", "=", "new", "RequestProcessingContext", "(", ")", ";", "requestProcessingContext", ".", "setExecution...
Inform the observers of a request. The observers can optionally observe the new request if required. @param request the request that couldn't be aggregated to another request.
[ "Inform", "the", "observers", "of", "a", "request", ".", "The", "observers", "can", "optionally", "observe", "the", "new", "request", "if", "required", "." ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/request/notifier/SpiceServiceListenerNotifier.java#L56-L60
sebastiangraf/perfidix
src/main/java/org/perfidix/element/BenchmarkExecutor.java
BenchmarkExecutor.executeBench
public void executeBench(final Object objToExecute, final Object... args) { final double[] meterResults = new double[METERS_TO_BENCH.size()]; final Method meth = element.getMethodToBench(); int meterIndex1 = 0; int meterIndex2 = 0; for (final AbstractMeter meter : METERS_TO_BE...
java
public void executeBench(final Object objToExecute, final Object... args) { final double[] meterResults = new double[METERS_TO_BENCH.size()]; final Method meth = element.getMethodToBench(); int meterIndex1 = 0; int meterIndex2 = 0; for (final AbstractMeter meter : METERS_TO_BE...
[ "public", "void", "executeBench", "(", "final", "Object", "objToExecute", ",", "final", "Object", "...", "args", ")", "{", "final", "double", "[", "]", "meterResults", "=", "new", "double", "[", "METERS_TO_BENCH", ".", "size", "(", ")", "]", ";", "final", ...
Execution of bench method. All data is stored corresponding to the meters. @param objToExecute the instance of the benchclass where the method should be executed with. @param args arguments for the method to execure
[ "Execution", "of", "bench", "method", ".", "All", "data", "is", "stored", "corresponding", "to", "the", "meters", "." ]
train
https://github.com/sebastiangraf/perfidix/blob/f13aa793b6a3055215ed4edbb946c1bb5d564886/src/main/java/org/perfidix/element/BenchmarkExecutor.java#L226-L256
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalTransform.java
CrystalTransform.getTranslScrewComponent
public static Vector3d getTranslScrewComponent(Matrix4d m) { int foldType = SpaceGroup.getRotAxisType(m); // For reference see: // http://www.crystallography.fr/mathcryst/pdf/Gargnano/Aroyo_Gargnano_1.pdf Vector3d transl = null; Matrix3d W = new Matrix3d(m.m00,m.m01,m.m02, m.m10,m.m11,m.m12, ...
java
public static Vector3d getTranslScrewComponent(Matrix4d m) { int foldType = SpaceGroup.getRotAxisType(m); // For reference see: // http://www.crystallography.fr/mathcryst/pdf/Gargnano/Aroyo_Gargnano_1.pdf Vector3d transl = null; Matrix3d W = new Matrix3d(m.m00,m.m01,m.m02, m.m10,m.m11,m.m12, ...
[ "public", "static", "Vector3d", "getTranslScrewComponent", "(", "Matrix4d", "m", ")", "{", "int", "foldType", "=", "SpaceGroup", ".", "getRotAxisType", "(", "m", ")", ";", "// For reference see:", "// http://www.crystallography.fr/mathcryst/pdf/Gargnano/Aroyo_Gargnano_1.pdf",...
Given a transformation matrix containing a rotation and translation returns the screw component of the rotation. See http://www.crystallography.fr/mathcryst/pdf/Gargnano/Aroyo_Gargnano_1.pdf @param m @return
[ "Given", "a", "transformation", "matrix", "containing", "a", "rotation", "and", "translation", "returns", "the", "screw", "component", "of", "the", "rotation", ".", "See", "http", ":", "//", "www", ".", "crystallography", ".", "fr", "/", "mathcryst", "/", "p...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalTransform.java#L464-L509
BlueBrain/bluima
modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/maxent/AbstractDataIndexer.java
AbstractDataIndexer.toIndexedStringArray
protected static String[] toIndexedStringArray(TObjectIntHashMap labelToIndexMap) { final String[] array = new String[labelToIndexMap.size()]; labelToIndexMap.forEachEntry(new TObjectIntProcedure() { public boolean execute(Object str, int index) { array[index] = (String)str; ...
java
protected static String[] toIndexedStringArray(TObjectIntHashMap labelToIndexMap) { final String[] array = new String[labelToIndexMap.size()]; labelToIndexMap.forEachEntry(new TObjectIntProcedure() { public boolean execute(Object str, int index) { array[index] = (String)str; ...
[ "protected", "static", "String", "[", "]", "toIndexedStringArray", "(", "TObjectIntHashMap", "labelToIndexMap", ")", "{", "final", "String", "[", "]", "array", "=", "new", "String", "[", "labelToIndexMap", ".", "size", "(", ")", "]", ";", "labelToIndexMap", "....
Utility method for creating a String[] array from a map whose keys are labels (Strings) to be stored in the array and whose values are the indices (Integers) at which the corresponding labels should be inserted. @param labelToIndexMap a <code>TObjectIntHashMap</code> value @return a <code>String[]</code> value @since ...
[ "Utility", "method", "for", "creating", "a", "String", "[]", "array", "from", "a", "map", "whose", "keys", "are", "labels", "(", "Strings", ")", "to", "be", "stored", "in", "the", "array", "and", "whose", "values", "are", "the", "indices", "(", "Integers...
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/maxent/AbstractDataIndexer.java#L124-L133
Impetus/Kundera
src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBClient.java
KuduDBClient.addPrimaryKeyToRow
private void addPrimaryKeyToRow(PartialRow row, EmbeddableType embeddable, Field[] fields, MetamodelImpl metaModel, Object key) { for (Field f : fields) { if (!ReflectUtils.isTransientOrStatic(f)) { Object value = PropertyAccessorHelper.getObject(k...
java
private void addPrimaryKeyToRow(PartialRow row, EmbeddableType embeddable, Field[] fields, MetamodelImpl metaModel, Object key) { for (Field f : fields) { if (!ReflectUtils.isTransientOrStatic(f)) { Object value = PropertyAccessorHelper.getObject(k...
[ "private", "void", "addPrimaryKeyToRow", "(", "PartialRow", "row", ",", "EmbeddableType", "embeddable", ",", "Field", "[", "]", "fields", ",", "MetamodelImpl", "metaModel", ",", "Object", "key", ")", "{", "for", "(", "Field", "f", ":", "fields", ")", "{", ...
Adds the primary key to row. @param row the row @param embeddable the embeddable @param fields the fields @param metaModel the meta model @param key the key
[ "Adds", "the", "primary", "key", "to", "row", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBClient.java#L822-L846
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java
IndexWriter.groupByBucket
CompletableFuture<Collection<BucketUpdate.Builder>> groupByBucket(DirectSegmentAccess segment, Collection<BucketUpdate.KeyUpdate> keyUpdates, TimeoutTimer timer) { val updatesByHash = keyUpdates.stream() .collect...
java
CompletableFuture<Collection<BucketUpdate.Builder>> groupByBucket(DirectSegmentAccess segment, Collection<BucketUpdate.KeyUpdate> keyUpdates, TimeoutTimer timer) { val updatesByHash = keyUpdates.stream() .collect...
[ "CompletableFuture", "<", "Collection", "<", "BucketUpdate", ".", "Builder", ">", ">", "groupByBucket", "(", "DirectSegmentAccess", "segment", ",", "Collection", "<", "BucketUpdate", ".", "KeyUpdate", ">", "keyUpdates", ",", "TimeoutTimer", "timer", ")", "{", "val...
Groups the given {@link BucketUpdate.KeyUpdate} instances by their associated buckets. @param segment The Segment to read from. @param keyUpdates A Collection of {@link BucketUpdate.KeyUpdate} instances to index. @param timer Timer for the operation. @return A CompletableFuture that, when completed, will conta...
[ "Groups", "the", "given", "{", "@link", "BucketUpdate", ".", "KeyUpdate", "}", "instances", "by", "their", "associated", "buckets", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java#L73-L88
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainerCreator.java
QueryAtomContainerCreator.createAnyAtomAnyBondContainer
public static QueryAtomContainer createAnyAtomAnyBondContainer(IAtomContainer container, boolean aromaticity) { if (aromaticity) return QueryAtomContainer.create(container, Expr.Type.IS_AROMATIC); else return QueryAtomContainer.create(container); }
java
public static QueryAtomContainer createAnyAtomAnyBondContainer(IAtomContainer container, boolean aromaticity) { if (aromaticity) return QueryAtomContainer.create(container, Expr.Type.IS_AROMATIC); else return QueryAtomContainer.create(container); }
[ "public", "static", "QueryAtomContainer", "createAnyAtomAnyBondContainer", "(", "IAtomContainer", "container", ",", "boolean", "aromaticity", ")", "{", "if", "(", "aromaticity", ")", "return", "QueryAtomContainer", ".", "create", "(", "container", ",", "Expr", ".", ...
Creates a QueryAtomContainer with the following settings: <pre> // aromaticity = true QueryAtomContainer.create(container, Expr.Type.IS_AROMATIC); // aromaticity = false QueryAtomContainer.create(container); </pre> @param container The AtomContainer that stands as model @param aromaticity option flag @return The ne...
[ "Creates", "a", "QueryAtomContainer", "with", "the", "following", "settings", ":" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainerCreator.java#L176-L181
vanilladb/vanillacore
src/main/java/org/vanilladb/core/storage/file/Page.java
Page.setVal
public synchronized void setVal(int offset, Constant val) { byte[] byteval = val.asBytes(); // Append the size of value if it is not fixed size if (!val.getType().isFixedSize()) { // check the field capacity and value size if (offset + ByteHelper.INT_SIZE + byteval.length > BLOCK_SIZE) throw new...
java
public synchronized void setVal(int offset, Constant val) { byte[] byteval = val.asBytes(); // Append the size of value if it is not fixed size if (!val.getType().isFixedSize()) { // check the field capacity and value size if (offset + ByteHelper.INT_SIZE + byteval.length > BLOCK_SIZE) throw new...
[ "public", "synchronized", "void", "setVal", "(", "int", "offset", ",", "Constant", "val", ")", "{", "byte", "[", "]", "byteval", "=", "val", ".", "asBytes", "(", ")", ";", "// Append the size of value if it is not fixed size\r", "if", "(", "!", "val", ".", "...
Writes a constant value to the specified offset on the page. @param offset the byte offset within the page @param val the constant value to be written to the page
[ "Writes", "a", "constant", "value", "to", "the", "specified", "offset", "on", "the", "page", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/storage/file/Page.java#L179-L195
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java
ClusterClient.getAccumulators
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception { return getAccumulators(jobID, ClassLoader.getSystemClassLoader()); }
java
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception { return getAccumulators(jobID, ClassLoader.getSystemClassLoader()); }
[ "public", "Map", "<", "String", ",", "OptionalFailure", "<", "Object", ">", ">", "getAccumulators", "(", "JobID", "jobID", ")", "throws", "Exception", "{", "return", "getAccumulators", "(", "jobID", ",", "ClassLoader", ".", "getSystemClassLoader", "(", ")", ")...
Requests and returns the accumulators for the given job identifier. Accumulators can be requested while a is running or after it has finished. The default class loader is used to deserialize the incoming accumulator results. @param jobID The job identifier of a job. @return A Map containing the accumulator's name and i...
[ "Requests", "and", "returns", "the", "accumulators", "for", "the", "given", "job", "identifier", ".", "Accumulators", "can", "be", "requested", "while", "a", "is", "running", "or", "after", "it", "has", "finished", ".", "The", "default", "class", "loader", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java#L397-L399
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/pricelists/PriceListEntryUrl.java
PriceListEntryUrl.deletePriceListEntryUrl
public static MozuUrl deletePriceListEntryUrl(String currencyCode, String priceListCode, String productCode, DateTime startDate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}"); formatter.formatUrl("...
java
public static MozuUrl deletePriceListEntryUrl(String currencyCode, String priceListCode, String productCode, DateTime startDate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}"); formatter.formatUrl("...
[ "public", "static", "MozuUrl", "deletePriceListEntryUrl", "(", "String", "currencyCode", ",", "String", "priceListCode", ",", "String", "productCode", ",", "DateTime", "startDate", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerc...
Get Resource Url for DeletePriceListEntry @param currencyCode The three character ISO currency code, such as USD for US Dollars. @param priceListCode The code of the specified price list associated with the price list entry. @param productCode The unique, user-defined product code of a product, used throughout to re...
[ "Get", "Resource", "Url", "for", "DeletePriceListEntry" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/pricelists/PriceListEntryUrl.java#L100-L108
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/XmlFixture.java
XmlFixture.registerPrefixForNamespace
public void registerPrefixForNamespace(String prefix, String namespace) { getEnvironment().registerNamespace(prefix, getUrl(namespace)); }
java
public void registerPrefixForNamespace(String prefix, String namespace) { getEnvironment().registerNamespace(prefix, getUrl(namespace)); }
[ "public", "void", "registerPrefixForNamespace", "(", "String", "prefix", ",", "String", "namespace", ")", "{", "getEnvironment", "(", ")", ".", "registerNamespace", "(", "prefix", ",", "getUrl", "(", "namespace", ")", ")", ";", "}" ]
Register a prefix to use in XPath expressions. @param prefix prefix to be used in xPath expressions. @param namespace XML namespace the prefix should point to.
[ "Register", "a", "prefix", "to", "use", "in", "XPath", "expressions", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/XmlFixture.java#L52-L54
cdk/cdk
descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
MoleculeSignature.fromSignatureString
public static IAtomContainer fromSignatureString(String signatureString, IChemObjectBuilder coBuilder) { ColoredTree tree = AtomSignature.parse(signatureString); MoleculeFromSignatureBuilder builder = new MoleculeFromSignatureBuilder(coBuilder); builder.makeFromColoredTree(tree); return ...
java
public static IAtomContainer fromSignatureString(String signatureString, IChemObjectBuilder coBuilder) { ColoredTree tree = AtomSignature.parse(signatureString); MoleculeFromSignatureBuilder builder = new MoleculeFromSignatureBuilder(coBuilder); builder.makeFromColoredTree(tree); return ...
[ "public", "static", "IAtomContainer", "fromSignatureString", "(", "String", "signatureString", ",", "IChemObjectBuilder", "coBuilder", ")", "{", "ColoredTree", "tree", "=", "AtomSignature", ".", "parse", "(", "signatureString", ")", ";", "MoleculeFromSignatureBuilder", ...
Builder for molecules (rather, for atom containers) from signature strings. @param signatureString the signature string to use @param coBuilder {@link IChemObjectBuilder} to build the returned atom container from @return an atom container
[ "Builder", "for", "molecules", "(", "rather", "for", "atom", "containers", ")", "from", "signature", "strings", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java#L179-L184
houbb/log-integration
src/main/java/com/github/houbb/log/integration/adaptors/jdbc/ConnectionLogger.java
ConnectionLogger.newInstance
public static Connection newInstance(Connection conn, Log statementLog, int queryStack) { InvocationHandler handler = new ConnectionLogger(conn, statementLog, queryStack); ClassLoader cl = Connection.class.getClassLoader(); return (Connection) Proxy.newProxyInstance(cl, new Class[]{Connection.cl...
java
public static Connection newInstance(Connection conn, Log statementLog, int queryStack) { InvocationHandler handler = new ConnectionLogger(conn, statementLog, queryStack); ClassLoader cl = Connection.class.getClassLoader(); return (Connection) Proxy.newProxyInstance(cl, new Class[]{Connection.cl...
[ "public", "static", "Connection", "newInstance", "(", "Connection", "conn", ",", "Log", "statementLog", ",", "int", "queryStack", ")", "{", "InvocationHandler", "handler", "=", "new", "ConnectionLogger", "(", "conn", ",", "statementLog", ",", "queryStack", ")", ...
/* Creates a logging version of a connection @param conn - the original connection @return - the connection with logging
[ "/", "*", "Creates", "a", "logging", "version", "of", "a", "connection" ]
train
https://github.com/houbb/log-integration/blob/c5e979719aec12a02f7d22b24b04b6fbb1789ca5/src/main/java/com/github/houbb/log/integration/adaptors/jdbc/ConnectionLogger.java#L81-L85
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateTime.java
DateTime.isIn
public boolean isIn(Date beginDate, Date endDate) { long beginMills = beginDate.getTime(); long endMills = endDate.getTime(); long thisMills = this.getTime(); return thisMills >= Math.min(beginMills, endMills) && thisMills <= Math.max(beginMills, endMills); }
java
public boolean isIn(Date beginDate, Date endDate) { long beginMills = beginDate.getTime(); long endMills = endDate.getTime(); long thisMills = this.getTime(); return thisMills >= Math.min(beginMills, endMills) && thisMills <= Math.max(beginMills, endMills); }
[ "public", "boolean", "isIn", "(", "Date", "beginDate", ",", "Date", "endDate", ")", "{", "long", "beginMills", "=", "beginDate", ".", "getTime", "(", ")", ";", "long", "endMills", "=", "endDate", ".", "getTime", "(", ")", ";", "long", "thisMills", "=", ...
当前日期是否在日期指定范围内<br> 起始日期和结束日期可以互换 @param beginDate 起始日期 @param endDate 结束日期 @return 是否在范围内 @since 3.0.8
[ "当前日期是否在日期指定范围内<br", ">", "起始日期和结束日期可以互换" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateTime.java#L622-L628
voldemort/voldemort
src/java/voldemort/client/rebalance/task/RebalanceTask.java
RebalanceTask.logPermitStatus
protected void logPermitStatus(int nodeId, String prefix) { String durationString = ""; if(permitAcquisitionTimeMs >= 0) { long durationMs = System.currentTimeMillis() - permitAcquisitionTimeMs; permitAcquisitionTimeMs = -1; durationString = " in " + TimeUnit.MILLISEC...
java
protected void logPermitStatus(int nodeId, String prefix) { String durationString = ""; if(permitAcquisitionTimeMs >= 0) { long durationMs = System.currentTimeMillis() - permitAcquisitionTimeMs; permitAcquisitionTimeMs = -1; durationString = " in " + TimeUnit.MILLISEC...
[ "protected", "void", "logPermitStatus", "(", "int", "nodeId", ",", "String", "prefix", ")", "{", "String", "durationString", "=", "\"\"", ";", "if", "(", "permitAcquisitionTimeMs", ">=", "0", ")", "{", "long", "durationMs", "=", "System", ".", "currentTimeMill...
Helper method to pretty print progress and timing info. @param nodeId node ID for which donor permit is required
[ "Helper", "method", "to", "pretty", "print", "progress", "and", "timing", "info", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/rebalance/task/RebalanceTask.java#L131-L139
sababado/CircularView
library/src/main/java/com/sababado/circularview/CircularViewObject.java
CircularViewObject.distanceFromCenter
public double distanceFromCenter(final float x, final float y) { return Math.sqrt(Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2)); }
java
public double distanceFromCenter(final float x, final float y) { return Math.sqrt(Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2)); }
[ "public", "double", "distanceFromCenter", "(", "final", "float", "x", ",", "final", "float", "y", ")", "{", "return", "Math", ".", "sqrt", "(", "Math", ".", "pow", "(", "x", "-", "this", ".", "x", ",", "2", ")", "+", "Math", ".", "pow", "(", "y",...
Get the distance from the given point to the center of this object. @param x X coordinate. @param y Y coordinate. @return Distance from the given point to the center of this object.
[ "Get", "the", "distance", "from", "the", "given", "point", "to", "the", "center", "of", "this", "object", "." ]
train
https://github.com/sababado/CircularView/blob/c9ab818d063bcc0796183616f8a82166a9b80aac/library/src/main/java/com/sababado/circularview/CircularViewObject.java#L153-L155
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/user/db/UserInfo.java
UserInfo.addPropertyListeners
public void addPropertyListeners() { BaseField fldProperties = this.getField(PropertiesRecord.PROPERTIES); if (fldProperties.getListener(CopyConvertersHandler.class) != null) return; this.addPropertiesFieldBehavior(this.getField(UserInfo.FRAMES), DBParams.FRAMES); ...
java
public void addPropertyListeners() { BaseField fldProperties = this.getField(PropertiesRecord.PROPERTIES); if (fldProperties.getListener(CopyConvertersHandler.class) != null) return; this.addPropertiesFieldBehavior(this.getField(UserInfo.FRAMES), DBParams.FRAMES); ...
[ "public", "void", "addPropertyListeners", "(", ")", "{", "BaseField", "fldProperties", "=", "this", ".", "getField", "(", "PropertiesRecord", ".", "PROPERTIES", ")", ";", "if", "(", "fldProperties", ".", "getListener", "(", "CopyConvertersHandler", ".", "class", ...
Add The listeners to sync the property field with the virtual fields.
[ "Add", "The", "listeners", "to", "sync", "the", "property", "field", "with", "the", "virtual", "fields", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/UserInfo.java#L309-L338
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NodeVector.java
NodeVector.pushPair
public final void pushPair(int v1, int v2) { if (null == m_map) { m_map = new int[m_blocksize]; m_mapSize = m_blocksize; } else { if ((m_firstFree + 2) >= m_mapSize) { m_mapSize += m_blocksize; int newMap[] = new int[m_mapSize]; System.arraycopy(m...
java
public final void pushPair(int v1, int v2) { if (null == m_map) { m_map = new int[m_blocksize]; m_mapSize = m_blocksize; } else { if ((m_firstFree + 2) >= m_mapSize) { m_mapSize += m_blocksize; int newMap[] = new int[m_mapSize]; System.arraycopy(m...
[ "public", "final", "void", "pushPair", "(", "int", "v1", ",", "int", "v2", ")", "{", "if", "(", "null", "==", "m_map", ")", "{", "m_map", "=", "new", "int", "[", "m_blocksize", "]", ";", "m_mapSize", "=", "m_blocksize", ";", "}", "else", "{", "if",...
Push a pair of nodes into the stack. Special purpose method for TransformerImpl, pushElemTemplateElement. Performance critical. @param v1 First node to add to vector @param v2 Second node to add to vector
[ "Push", "a", "pair", "of", "nodes", "into", "the", "stack", ".", "Special", "purpose", "method", "for", "TransformerImpl", "pushElemTemplateElement", ".", "Performance", "critical", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NodeVector.java#L244-L269
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java
ClusterHeartbeatManager.logIfConnectionToEndpointIsMissing
private void logIfConnectionToEndpointIsMissing(long now, Member member) { long heartbeatTime = heartbeatFailureDetector.lastHeartbeat(member); if ((now - heartbeatTime) >= heartbeatIntervalMillis * HEART_BEAT_INTERVAL_FACTOR) { Connection conn = node.getEndpointManager(MEMBER).getOrConnect(...
java
private void logIfConnectionToEndpointIsMissing(long now, Member member) { long heartbeatTime = heartbeatFailureDetector.lastHeartbeat(member); if ((now - heartbeatTime) >= heartbeatIntervalMillis * HEART_BEAT_INTERVAL_FACTOR) { Connection conn = node.getEndpointManager(MEMBER).getOrConnect(...
[ "private", "void", "logIfConnectionToEndpointIsMissing", "(", "long", "now", ",", "Member", "member", ")", "{", "long", "heartbeatTime", "=", "heartbeatFailureDetector", ".", "lastHeartbeat", "(", "member", ")", ";", "if", "(", "(", "now", "-", "heartbeatTime", ...
Logs a warning if the {@code member} hasn't sent a heartbeat in {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeat intervals and there is no live connection to the member
[ "Logs", "a", "warning", "if", "the", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java#L634-L642
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/util/StringUtilities.java
StringUtilities.getWildcardMatcher
public static Matcher getWildcardMatcher(String str, String expr, boolean whole) { expr = expr.replaceAll("\\?",".?"); expr = expr.replaceAll("\\*",".*?"); if(whole) expr = "^"+expr+"$"; Pattern pattern = Pattern.compile(expr/*, Pattern.DOTALL*/); return pattern.m...
java
public static Matcher getWildcardMatcher(String str, String expr, boolean whole) { expr = expr.replaceAll("\\?",".?"); expr = expr.replaceAll("\\*",".*?"); if(whole) expr = "^"+expr+"$"; Pattern pattern = Pattern.compile(expr/*, Pattern.DOTALL*/); return pattern.m...
[ "public", "static", "Matcher", "getWildcardMatcher", "(", "String", "str", ",", "String", "expr", ",", "boolean", "whole", ")", "{", "expr", "=", "expr", ".", "replaceAll", "(", "\"\\\\?\"", ",", "\".?\"", ")", ";", "expr", "=", "expr", ".", "replaceAll", ...
Returns <CODE>true</CODE> if the given string matches the given regular expression. @param str The string against which the expression is to be matched @param expr The regular expression to match with the input string @param whole Indicates that a whole word match is required @return An object giving the results of the...
[ "Returns", "<CODE", ">", "true<", "/", "CODE", ">", "if", "the", "given", "string", "matches", "the", "given", "regular", "expression", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/StringUtilities.java#L318-L326
spring-cloud/spring-cloud-contract
spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/util/ContractVerifierUtil.java
ContractVerifierUtil.valueFromXPath
public static String valueFromXPath(Document parsedXml, String path) { XPath xPath = XPathFactory.newInstance().newXPath(); try { return xPath.evaluate(path, parsedXml.getDocumentElement()); } catch (XPathExpressionException exception) { LOG.error("Incorrect xpath provided: " + path, exception); throw ...
java
public static String valueFromXPath(Document parsedXml, String path) { XPath xPath = XPathFactory.newInstance().newXPath(); try { return xPath.evaluate(path, parsedXml.getDocumentElement()); } catch (XPathExpressionException exception) { LOG.error("Incorrect xpath provided: " + path, exception); throw ...
[ "public", "static", "String", "valueFromXPath", "(", "Document", "parsedXml", ",", "String", "path", ")", "{", "XPath", "xPath", "=", "XPathFactory", ".", "newInstance", "(", ")", ".", "newXPath", "(", ")", ";", "try", "{", "return", "xPath", ".", "evaluat...
Helper method to retrieve XML node value with provided xPath. @param parsedXml - a {@link Document} object with parsed XML content @param path - the xPath expression to retrieve the value with @return {@link String} value of the XML node @since 2.1.0
[ "Helper", "method", "to", "retrieve", "XML", "node", "value", "with", "provided", "xPath", "." ]
train
https://github.com/spring-cloud/spring-cloud-contract/blob/857da51950a87b393286e3bb1b2208c420c01087/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/util/ContractVerifierUtil.java#L78-L87
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.getPhraseListAsync
public Observable<PhraseListFeatureInfo> getPhraseListAsync(UUID appId, String versionId, int phraselistId) { return getPhraseListWithServiceResponseAsync(appId, versionId, phraselistId).map(new Func1<ServiceResponse<PhraseListFeatureInfo>, PhraseListFeatureInfo>() { @Override public Phr...
java
public Observable<PhraseListFeatureInfo> getPhraseListAsync(UUID appId, String versionId, int phraselistId) { return getPhraseListWithServiceResponseAsync(appId, versionId, phraselistId).map(new Func1<ServiceResponse<PhraseListFeatureInfo>, PhraseListFeatureInfo>() { @Override public Phr...
[ "public", "Observable", "<", "PhraseListFeatureInfo", ">", "getPhraseListAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "int", "phraselistId", ")", "{", "return", "getPhraseListWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "phraselist...
Gets phraselist feature info. @param appId The application ID. @param versionId The version ID. @param phraselistId The ID of the feature to be retrieved. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PhraseListFeatureInfo object
[ "Gets", "phraselist", "feature", "info", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java#L583-L590
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java
SimpleElementVisitor9.visitModule
@Override public R visitModule(ModuleElement e, P p) { return defaultAction(e, p); }
java
@Override public R visitModule(ModuleElement e, P p) { return defaultAction(e, p); }
[ "@", "Override", "public", "R", "visitModule", "(", "ModuleElement", "e", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "e", ",", "p", ")", ";", "}" ]
Visits a {@code ModuleElement} by calling {@code defaultAction}. @param e the element to visit @param p a visitor-specified parameter @return the result of {@code defaultAction}
[ "Visits", "a", "{", "@code", "ModuleElement", "}", "by", "calling", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java#L104-L107
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/memento/FileMemento.java
FileMemento.restore
public Object restore(String savePoint, Class<?> objClass) { String location = whereIs(savePoint, objClass); Object cacheObject = CacheFarm.getCache().get(location); if(cacheObject != null) return cacheObject; cacheObject = IO.deserialize(new File(location)); CacheFarm.getCache().put(location,...
java
public Object restore(String savePoint, Class<?> objClass) { String location = whereIs(savePoint, objClass); Object cacheObject = CacheFarm.getCache().get(location); if(cacheObject != null) return cacheObject; cacheObject = IO.deserialize(new File(location)); CacheFarm.getCache().put(location,...
[ "public", "Object", "restore", "(", "String", "savePoint", ",", "Class", "<", "?", ">", "objClass", ")", "{", "String", "location", "=", "whereIs", "(", "savePoint", ",", "objClass", ")", ";", "Object", "cacheObject", "=", "CacheFarm", ".", "getCache", "("...
Retrieve the de-serialized object @param savePoint the save point @param objClass the object class @return the object the object
[ "Retrieve", "the", "de", "-", "serialized", "object" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/memento/FileMemento.java#L33-L45
passwordmaker/java-passwordmaker-lib
src/main/java/org/daveware/passwordmaker/Database.java
Database.findParent
private Account findParent(Account parent, Account account) { if (parent == null || account == null) return null; // Does this parent contain the child account? if (parent.getChildren().contains(account)) return parent; // Recurse through the children fo...
java
private Account findParent(Account parent, Account account) { if (parent == null || account == null) return null; // Does this parent contain the child account? if (parent.getChildren().contains(account)) return parent; // Recurse through the children fo...
[ "private", "Account", "findParent", "(", "Account", "parent", ",", "Account", "account", ")", "{", "if", "(", "parent", "==", "null", "||", "account", "==", "null", ")", "return", "null", ";", "// Does this parent contain the child account?", "if", "(", "parent"...
Internal routine to locate a parent (recursive, don't loop your trees!). @param parent The parent to start searching with. @param account The account to find the parent of. @return The parent account, else null if not found.
[ "Internal", "routine", "to", "locate", "a", "parent", "(", "recursive", "don", "t", "loop", "your", "trees!", ")", "." ]
train
https://github.com/passwordmaker/java-passwordmaker-lib/blob/18c22fca7dd9a47f08161425b85a5bd257afbb2b/src/main/java/org/daveware/passwordmaker/Database.java#L443-L459
Stratio/cassandra-lucene-index
plugin/src/main/java/com/stratio/cassandra/lucene/search/sort/SimpleSortField.java
SimpleSortField.sortField
@Override public org.apache.lucene.search.SortField sortField(Schema schema) { if (field.equalsIgnoreCase("score")) { return FIELD_SCORE; } Mapper mapper = schema.mapper(field); if (mapper == null) { throw new IndexException("No mapper found for sortFields fie...
java
@Override public org.apache.lucene.search.SortField sortField(Schema schema) { if (field.equalsIgnoreCase("score")) { return FIELD_SCORE; } Mapper mapper = schema.mapper(field); if (mapper == null) { throw new IndexException("No mapper found for sortFields fie...
[ "@", "Override", "public", "org", ".", "apache", ".", "lucene", ".", "search", ".", "SortField", "sortField", "(", "Schema", "schema", ")", "{", "if", "(", "field", ".", "equalsIgnoreCase", "(", "\"score\"", ")", ")", "{", "return", "FIELD_SCORE", ";", "...
Returns the Lucene {@link org.apache.lucene.search.SortField} representing this {@link SortField}. @param schema the {@link Schema} to be used @return the equivalent Lucene sort field
[ "Returns", "the", "Lucene", "{", "@link", "org", ".", "apache", ".", "lucene", ".", "search", ".", "SortField", "}", "representing", "this", "{", "@link", "SortField", "}", "." ]
train
https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/search/sort/SimpleSortField.java#L66-L79
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/StandardTypeReferenceOwner.java
StandardTypeReferenceOwner.newReferenceTo
@Override public LightweightTypeReference newReferenceTo(Class<?> type, TypeReferenceInitializer<? super ParameterizedTypeReference> init) { if (init == null) { throw new NullPointerException("initializer"); } JvmType rawType = getServices().getTypeReferences().findDeclaredType(type, getContextResourceSet());...
java
@Override public LightweightTypeReference newReferenceTo(Class<?> type, TypeReferenceInitializer<? super ParameterizedTypeReference> init) { if (init == null) { throw new NullPointerException("initializer"); } JvmType rawType = getServices().getTypeReferences().findDeclaredType(type, getContextResourceSet());...
[ "@", "Override", "public", "LightweightTypeReference", "newReferenceTo", "(", "Class", "<", "?", ">", "type", ",", "TypeReferenceInitializer", "<", "?", "super", "ParameterizedTypeReference", ">", "init", ")", "{", "if", "(", "init", "==", "null", ")", "{", "t...
Creates a references to the given class or returns an {@link UnknownTypeReference} if no JRE is available. If the type is available, the given acceptor is used to initialize it further.
[ "Creates", "a", "references", "to", "the", "given", "class", "or", "returns", "an", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/StandardTypeReferenceOwner.java#L227-L241
nemerosa/ontrack
ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java
Utils.toHexString
public static String toHexString(byte[] bytes, int start, int len) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < len; i++) { int b = bytes[start + i] & 0xFF; if (b < 16) buf.append('0'); buf.append(Integer.toHexString(b)); } return buf...
java
public static String toHexString(byte[] bytes, int start, int len) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < len; i++) { int b = bytes[start + i] & 0xFF; if (b < 16) buf.append('0'); buf.append(Integer.toHexString(b)); } return buf...
[ "public", "static", "String", "toHexString", "(", "byte", "[", "]", "bytes", ",", "int", "start", ",", "int", "len", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len...
Writes some bytes in Hexadecimal format @param bytes Bytes to format @param start Start position for the conversion @param len Number of bytes to convert @return Hex string
[ "Writes", "some", "bytes", "in", "Hexadecimal", "format" ]
train
https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java#L118-L126
jenkinsci/jenkins
core/src/main/java/hudson/util/ArgumentListBuilder.java
ArgumentListBuilder.addKeyValuePairs
public ArgumentListBuilder addKeyValuePairs(String prefix, Map<String,String> props, Set<String> propsToMask) { for (Entry<String,String> e : props.entrySet()) { addKeyValuePair(prefix, e.getKey(), e.getValue(), (propsToMask != null) && propsToMask.contains(e.getKey())); } return thi...
java
public ArgumentListBuilder addKeyValuePairs(String prefix, Map<String,String> props, Set<String> propsToMask) { for (Entry<String,String> e : props.entrySet()) { addKeyValuePair(prefix, e.getKey(), e.getValue(), (propsToMask != null) && propsToMask.contains(e.getKey())); } return thi...
[ "public", "ArgumentListBuilder", "addKeyValuePairs", "(", "String", "prefix", ",", "Map", "<", "String", ",", "String", ">", "props", ",", "Set", "<", "String", ">", "propsToMask", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "e", ":...
Adds key value pairs as "-Dkey=value -Dkey=value ..." with masking. @param prefix Configures the -D portion of the example. Defaults to -D if null. @param props The map of key/value pairs to add @param propsToMask Set containing key names to mark as masked in the argument list. Key names that do not exist in the set w...
[ "Adds", "key", "value", "pairs", "as", "-", "Dkey", "=", "value", "-", "Dkey", "=", "value", "...", "with", "masking", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/ArgumentListBuilder.java#L189-L194
digipost/signature-api-client-java
src/main/java/no/digipost/signature/client/security/KeyStoreConfig.java
KeyStoreConfig.fromJavaKeyStore
public static KeyStoreConfig fromJavaKeyStore(final InputStream javaKeyStore, final String alias, final String keyStorePassword, final String privatekeyPassword) { KeyStore ks = KeyStoreType.JCEKS.loadKeyStore(javaKeyStore, keyStorePassword); return new KeyStoreConfig(ks, alias, keyStorePassword, privat...
java
public static KeyStoreConfig fromJavaKeyStore(final InputStream javaKeyStore, final String alias, final String keyStorePassword, final String privatekeyPassword) { KeyStore ks = KeyStoreType.JCEKS.loadKeyStore(javaKeyStore, keyStorePassword); return new KeyStoreConfig(ks, alias, keyStorePassword, privat...
[ "public", "static", "KeyStoreConfig", "fromJavaKeyStore", "(", "final", "InputStream", "javaKeyStore", ",", "final", "String", "alias", ",", "final", "String", "keyStorePassword", ",", "final", "String", "privatekeyPassword", ")", "{", "KeyStore", "ks", "=", "KeySto...
Create a {@link KeyStoreConfig} from a Java Key Store containing an Organization Certificate (Virksomhetssertifikat). @param javaKeyStore A stream of the certificate in JCEKS format. @param alias The alias of the organization certificate in the key store. @param keyStorePassword The password for t...
[ "Create", "a", "{", "@link", "KeyStoreConfig", "}", "from", "a", "Java", "Key", "Store", "containing", "an", "Organization", "Certificate", "(", "Virksomhetssertifikat", ")", "." ]
train
https://github.com/digipost/signature-api-client-java/blob/246207571641fbac6beda5ffc585eec188825c45/src/main/java/no/digipost/signature/client/security/KeyStoreConfig.java#L108-L112