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
dnsjava/dnsjava
org/xbill/DNS/utils/base64.java
base64.formatString
public static String formatString(byte [] b, int lineLength, String prefix, boolean addClose) { String s = toString(b); StringBuffer sb = new StringBuffer(); for (int i = 0; i < s.length(); i += lineLength) { sb.append (prefix); if (i + lineLength >= s.length()) { sb.append(s.substring(i)); if (addClose) ...
java
public static String formatString(byte [] b, int lineLength, String prefix, boolean addClose) { String s = toString(b); StringBuffer sb = new StringBuffer(); for (int i = 0; i < s.length(); i += lineLength) { sb.append (prefix); if (i + lineLength >= s.length()) { sb.append(s.substring(i)); if (addClose) ...
[ "public", "static", "String", "formatString", "(", "byte", "[", "]", "b", ",", "int", "lineLength", ",", "String", "prefix", ",", "boolean", "addClose", ")", "{", "String", "s", "=", "toString", "(", "b", ")", ";", "StringBuffer", "sb", "=", "new", "St...
Formats data into a nicely formatted base64 encoded String @param b An array containing binary data @param lineLength The number of characters per line @param prefix A string prefixing the characters on each line @param addClose Whether to add a close parenthesis or not @return A String representing the formatted outpu...
[ "Formats", "data", "into", "a", "nicely", "formatted", "base64", "encoded", "String" ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/utils/base64.java#L69-L86
powermock/powermock
powermock-modules/powermock-module-javaagent/src/main/java/sun/tools/attach/HotSpotVirtualMachine.java
HotSpotVirtualMachine.loadAgent
@Override public void loadAgent(String agent, String options) throws AgentLoadException, AgentInitializationException, IOException { String args = agent; if (options != null) { args = args + "=" + options; } try { loadAgentLibrary("instrument", arg...
java
@Override public void loadAgent(String agent, String options) throws AgentLoadException, AgentInitializationException, IOException { String args = agent; if (options != null) { args = args + "=" + options; } try { loadAgentLibrary("instrument", arg...
[ "@", "Override", "public", "void", "loadAgent", "(", "String", "agent", ",", "String", "options", ")", "throws", "AgentLoadException", ",", "AgentInitializationException", ",", "IOException", "{", "String", "args", "=", "agent", ";", "if", "(", "options", "!=", ...
/* Load JPLIS agent which will load the agent JAR file and invoke the agentmain method.
[ "/", "*", "Load", "JPLIS", "agent", "which", "will", "load", "the", "agent", "JAR", "file", "and", "invoke", "the", "agentmain", "method", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-modules/powermock-module-javaagent/src/main/java/sun/tools/attach/HotSpotVirtualMachine.java#L96-L128
ansell/restlet-utils
src/main/java/com/github/ansell/restletutils/FixedRedirectCookieAuthenticator.java
FixedRedirectCookieAuthenticator.getCredentialsCookie
protected CookieSetting getCredentialsCookie(final Request request, final Response response) { CookieSetting credentialsCookie = response.getCookieSettings().getFirst(this.getCookieName()); if(credentialsCookie == null) { credentialsCookie = new CookieSetting(this.getCoo...
java
protected CookieSetting getCredentialsCookie(final Request request, final Response response) { CookieSetting credentialsCookie = response.getCookieSettings().getFirst(this.getCookieName()); if(credentialsCookie == null) { credentialsCookie = new CookieSetting(this.getCoo...
[ "protected", "CookieSetting", "getCredentialsCookie", "(", "final", "Request", "request", ",", "final", "Response", "response", ")", "{", "CookieSetting", "credentialsCookie", "=", "response", ".", "getCookieSettings", "(", ")", ".", "getFirst", "(", "this", ".", ...
Returns the credentials cookie setting. It first try to find an existing cookie. If necessary, it creates a new one. @param request The current request. @param response The current response. @return The credentials cookie setting.
[ "Returns", "the", "credentials", "cookie", "setting", ".", "It", "first", "try", "to", "find", "an", "existing", "cookie", ".", "If", "necessary", "it", "creates", "a", "new", "one", "." ]
train
https://github.com/ansell/restlet-utils/blob/6c39a3e91aa8295936af1dbfccd6ba27230c40a9/src/main/java/com/github/ansell/restletutils/FixedRedirectCookieAuthenticator.java#L432-L456
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/internal/MessagingSecurityServiceImpl.java
MessagingSecurityServiceImpl.modify
@Modified protected void modify(ComponentContext cc, Map<String, Object> properties) { SibTr.entry(tc, CLASS_NAME + "modify", properties); this.properties = properties; populateDestinationPermissions(); runtimeSecurityService.modifyMessagingServices(this); if (TraceComponent...
java
@Modified protected void modify(ComponentContext cc, Map<String, Object> properties) { SibTr.entry(tc, CLASS_NAME + "modify", properties); this.properties = properties; populateDestinationPermissions(); runtimeSecurityService.modifyMessagingServices(this); if (TraceComponent...
[ "@", "Modified", "protected", "void", "modify", "(", "ComponentContext", "cc", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "SibTr", ".", "entry", "(", "tc", ",", "CLASS_NAME", "+", "\"modify\"", ",", "properties", ")", ";", "th...
Called by OSGI framework when there is a modification in server.xml for tag associated with this component @param cc Component Context object @param properties Properties for this component from server.xml
[ "Called", "by", "OSGI", "framework", "when", "there", "is", "a", "modification", "in", "server", ".", "xml", "for", "tag", "associated", "with", "this", "component" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/internal/MessagingSecurityServiceImpl.java#L140-L150
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/ExpressionUtil.java
ExpressionUtil.substituteImages
public static String substituteImages(String input, Map<String,String> imageMap) { StringBuffer substituted = new StringBuffer(input.length()); Matcher matcher = tokenPattern.matcher(input); int index = 0; while (matcher.find()) { String match = matcher.group(); s...
java
public static String substituteImages(String input, Map<String,String> imageMap) { StringBuffer substituted = new StringBuffer(input.length()); Matcher matcher = tokenPattern.matcher(input); int index = 0; while (matcher.find()) { String match = matcher.group(); s...
[ "public", "static", "String", "substituteImages", "(", "String", "input", ",", "Map", "<", "String", ",", "String", ">", "imageMap", ")", "{", "StringBuffer", "substituted", "=", "new", "StringBuffer", "(", "input", ".", "length", "(", ")", ")", ";", "Matc...
Input is email template with image tags: <code> &lt;img src="${image:com.centurylink.mdw.base/mdw.png}" alt="MDW"&gt; </code> Uses the unqualified image name as its CID. Populates imageMap with results.
[ "Input", "is", "email", "template", "with", "image", "tags", ":", "<code", ">", "&lt", ";", "img", "src", "=", "$", "{", "image", ":", "com", ".", "centurylink", ".", "mdw", ".", "base", "/", "mdw", ".", "png", "}", "alt", "=", "MDW", "&gt", ";",...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/ExpressionUtil.java#L144-L165
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/plugins/MetricValue.java
MetricValue.valueOf
public static MetricValue valueOf(BigDecimal val, final String format) { if (val instanceof MetricValue) { // TODO: check that val.format == format return (MetricValue) val; } return new MetricValue(val, new DecimalFormat(format)); }
java
public static MetricValue valueOf(BigDecimal val, final String format) { if (val instanceof MetricValue) { // TODO: check that val.format == format return (MetricValue) val; } return new MetricValue(val, new DecimalFormat(format)); }
[ "public", "static", "MetricValue", "valueOf", "(", "BigDecimal", "val", ",", "final", "String", "format", ")", "{", "if", "(", "val", "instanceof", "MetricValue", ")", "{", "// TODO: check that val.format == format", "return", "(", "MetricValue", ")", "val", ";", ...
Returns the MetricValue representation of the passed in BigDecimal. If <code>val</code> is already a {@link MetricValue} object, val is returned. WARNING: as of this version, no check is performed that the passed in value format, if a {@link MetricValue}, is equal to <code>format</code> @param val value to be converte...
[ "Returns", "the", "MetricValue", "representation", "of", "the", "passed", "in", "BigDecimal", ".", "If", "<code", ">", "val<", "/", "code", ">", "is", "already", "a", "{", "@link", "MetricValue", "}", "object", "val", "is", "returned", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/plugins/MetricValue.java#L176-L182
kiegroup/jbpmmigration
src/main/java/org/jbpm/migration/XmlUtils.java
XmlUtils.createTransformer
private static Transformer createTransformer(final Source xsltSource) throws Exception { final TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = null; if (xsltSource != null) { // Create a resolver for imported sheets (assumption:...
java
private static Transformer createTransformer(final Source xsltSource) throws Exception { final TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = null; if (xsltSource != null) { // Create a resolver for imported sheets (assumption:...
[ "private", "static", "Transformer", "createTransformer", "(", "final", "Source", "xsltSource", ")", "throws", "Exception", "{", "final", "TransformerFactory", "transformerFactory", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "Transformer", "transformer...
Create a {@link Transformer} from the given sheet. @param xsltSource The sheet to be used for the transformation, or <code>null</code> if an identity transformator is needed. @return The created {@link Transformer} @throws Exception If the creation or instrumentation of the {@link Transformer} runs into trouble.
[ "Create", "a", "{", "@link", "Transformer", "}", "from", "the", "given", "sheet", "." ]
train
https://github.com/kiegroup/jbpmmigration/blob/5e133e2824aa38f316a2eb061123313a7276aba0/src/main/java/org/jbpm/migration/XmlUtils.java#L238-L264
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableDocument.java
MutableDocument.setDouble
@NonNull @Override public MutableDocument setDouble(@NonNull String key, double value) { return setValue(key, value); }
java
@NonNull @Override public MutableDocument setDouble(@NonNull String key, double value) { return setValue(key, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableDocument", "setDouble", "(", "@", "NonNull", "String", "key", ",", "double", "value", ")", "{", "return", "setValue", "(", "key", ",", "value", ")", ";", "}" ]
Set a double value for the given key @param key the key. @param key the double value. @return this MutableDocument instance
[ "Set", "a", "double", "value", "for", "the", "given", "key" ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDocument.java#L223-L227
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java
AbstractTypeVisitor6.visitIntersection
@Override public R visitIntersection(IntersectionType t, P p) { return visitUnknown(t, p); }
java
@Override public R visitIntersection(IntersectionType t, P p) { return visitUnknown(t, p); }
[ "@", "Override", "public", "R", "visitIntersection", "(", "IntersectionType", "t", ",", "P", "p", ")", "{", "return", "visitUnknown", "(", "t", ",", "p", ")", ";", "}" ]
{@inheritDoc} @implSpec Visits an {@code IntersectionType} element by calling {@code visitUnknown}. @param t {@inheritDoc} @param p {@inheritDoc} @return the result of {@code visitUnknown} @since 1.8
[ "{", "@inheritDoc", "}" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java#L135-L138
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java
RouteTablesInner.beginCreateOrUpdate
public RouteTableInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().single().body(); }
java
public RouteTableInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().single().body(); }
[ "public", "RouteTableInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ",", "RouteTableInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeTableName", "...
Create or updates a route table in a specified resource group. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param parameters Parameters supplied to the create or update route table operation. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Create", "or", "updates", "a", "route", "table", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L519-L521
graphhopper/graphhopper
core/src/main/java/com/graphhopper/util/EngineWarmUp.java
EngineWarmUp.warmUp
public static void warmUp(GraphHopper graphHopper, int iterations) { GraphHopperStorage ghStorage = graphHopper.getGraphHopperStorage(); if (ghStorage == null) throw new IllegalArgumentException("The storage of GraphHopper must not be empty"); try { if (ghStorage.isCHPos...
java
public static void warmUp(GraphHopper graphHopper, int iterations) { GraphHopperStorage ghStorage = graphHopper.getGraphHopperStorage(); if (ghStorage == null) throw new IllegalArgumentException("The storage of GraphHopper must not be empty"); try { if (ghStorage.isCHPos...
[ "public", "static", "void", "warmUp", "(", "GraphHopper", "graphHopper", ",", "int", "iterations", ")", "{", "GraphHopperStorage", "ghStorage", "=", "graphHopper", ".", "getGraphHopperStorage", "(", ")", ";", "if", "(", "ghStorage", "==", "null", ")", "throw", ...
Do the 'warm up' for the specified GraphHopper instance. @param iterations the 'intensity' of the warm up procedure
[ "Do", "the", "warm", "up", "for", "the", "specified", "GraphHopper", "instance", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/util/EngineWarmUp.java#L40-L53
openbase/jul
exception/src/main/java/org/openbase/jul/exception/StackTracePrinter.java
StackTracePrinter.printAllStackTraces
public static void printAllStackTraces(final String filter, final Logger logger, final LogLevel logLevel) { for (Map.Entry<Thread, StackTraceElement[]> entry : Thread.getAllStackTraces().entrySet()) { if (filter == null || entry.getKey().getName().contains(filter)) { StackTracePrinte...
java
public static void printAllStackTraces(final String filter, final Logger logger, final LogLevel logLevel) { for (Map.Entry<Thread, StackTraceElement[]> entry : Thread.getAllStackTraces().entrySet()) { if (filter == null || entry.getKey().getName().contains(filter)) { StackTracePrinte...
[ "public", "static", "void", "printAllStackTraces", "(", "final", "String", "filter", ",", "final", "Logger", "logger", ",", "final", "LogLevel", "logLevel", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Thread", ",", "StackTraceElement", "[", "]", ">", ...
Method prints the stack traces of all running java threads via the given logger. @param filter only thread where the name of the thread contains this given {@code filter} key are printed. If the filter is null, no filtering will be performed. @param logger the logger used for printing. @param logLevel the level to...
[ "Method", "prints", "the", "stack", "traces", "of", "all", "running", "java", "threads", "via", "the", "given", "logger", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/StackTracePrinter.java#L150-L156
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/Csv2ExtJsLocaleService.java
Csv2ExtJsLocaleService.detectColumnIndexOfLocale
private int detectColumnIndexOfLocale(String locale, CSVReader csvReader) throws Exception { int indexOfLocale = -1; List<String> headerLine = Arrays.asList(ArrayUtils.nullToEmpty(csvReader.readNext())); if (headerLine == null || headerLine.isEmpty()) { throw new Exception("CSV loca...
java
private int detectColumnIndexOfLocale(String locale, CSVReader csvReader) throws Exception { int indexOfLocale = -1; List<String> headerLine = Arrays.asList(ArrayUtils.nullToEmpty(csvReader.readNext())); if (headerLine == null || headerLine.isEmpty()) { throw new Exception("CSV loca...
[ "private", "int", "detectColumnIndexOfLocale", "(", "String", "locale", ",", "CSVReader", "csvReader", ")", "throws", "Exception", "{", "int", "indexOfLocale", "=", "-", "1", ";", "List", "<", "String", ">", "headerLine", "=", "Arrays", ".", "asList", "(", "...
Extracts the column index of the given locale in the CSV file. @param locale @param csvReader @return @throws IOException @throws Exception
[ "Extracts", "the", "column", "index", "of", "the", "given", "locale", "in", "the", "CSV", "file", "." ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/Csv2ExtJsLocaleService.java#L140-L166
craterdog/java-security-framework
java-certificate-management-providers/src/main/java/craterdog/security/RsaCertificateManager.java
RsaCertificateManager.signCertificateRequest
public X509Certificate signCertificateRequest(PrivateKey caPrivateKey, X509Certificate caCertificate, PKCS10CertificationRequest request, BigInteger serialNumber, long lifetime) { try { logger.entry(); logger.debug("Extract public key and subject from the CSR..."); ...
java
public X509Certificate signCertificateRequest(PrivateKey caPrivateKey, X509Certificate caCertificate, PKCS10CertificationRequest request, BigInteger serialNumber, long lifetime) { try { logger.entry(); logger.debug("Extract public key and subject from the CSR..."); ...
[ "public", "X509Certificate", "signCertificateRequest", "(", "PrivateKey", "caPrivateKey", ",", "X509Certificate", "caCertificate", ",", "PKCS10CertificationRequest", "request", ",", "BigInteger", "serialNumber", ",", "long", "lifetime", ")", "{", "try", "{", "logger", "...
This method signs a certificate signing request (CSR) using the specified certificate authority (CA). This is a convenience method that really should be part of the <code>CertificateManagement</code> interface except that it depends on a Bouncy Castle class in the signature. The java security framework does not have...
[ "This", "method", "signs", "a", "certificate", "signing", "request", "(", "CSR", ")", "using", "the", "specified", "certificate", "authority", "(", "CA", ")", ".", "This", "is", "a", "convenience", "method", "that", "really", "should", "be", "part", "of", ...
train
https://github.com/craterdog/java-security-framework/blob/a5634c19812d473b608bc11060f5cbb4b4b0b5da/java-certificate-management-providers/src/main/java/craterdog/security/RsaCertificateManager.java#L150-L170
stickfigure/batchfb
src/main/java/com/googlecode/batchfb/impl/Batch.java
Batch.addParams
private void addParams(RequestBuilder call, Param[] params) { // Once upon a time this was necessary, now it isn't //call.addParam("format", "json"); if (this.accessToken != null) call.addParam("access_token", this.accessToken); if (this.appSecretProof != null) call.addParam("appsecret_pro...
java
private void addParams(RequestBuilder call, Param[] params) { // Once upon a time this was necessary, now it isn't //call.addParam("format", "json"); if (this.accessToken != null) call.addParam("access_token", this.accessToken); if (this.appSecretProof != null) call.addParam("appsecret_pro...
[ "private", "void", "addParams", "(", "RequestBuilder", "call", ",", "Param", "[", "]", "params", ")", "{", "// Once upon a time this was necessary, now it isn't\r", "//call.addParam(\"format\", \"json\");\r", "if", "(", "this", ".", "accessToken", "!=", "null", ")", "ca...
Adds the appropriate parameters to the call, including boilerplate ones (access token, format). @param params can be null or empty
[ "Adds", "the", "appropriate", "parameters", "to", "the", "call", "including", "boilerplate", "ones", "(", "access", "token", "format", ")", "." ]
train
https://github.com/stickfigure/batchfb/blob/ceeda78aa6d8397eec032ab1d8997adb7378e9e2/src/main/java/com/googlecode/batchfb/impl/Batch.java#L449-L470
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ObjectUtils.java
ObjectUtils.doOperationSafely
public static <T> T doOperationSafely(ExceptionThrowingOperation<T> operation, T defaultValue) { try { return operation.doExceptionThrowingOperation(); } catch (Exception cause) { return returnValueOrThrowIfNull(defaultValue, newIllegalStateException(cause, "Failed to execute operation ...
java
public static <T> T doOperationSafely(ExceptionThrowingOperation<T> operation, T defaultValue) { try { return operation.doExceptionThrowingOperation(); } catch (Exception cause) { return returnValueOrThrowIfNull(defaultValue, newIllegalStateException(cause, "Failed to execute operation ...
[ "public", "static", "<", "T", ">", "T", "doOperationSafely", "(", "ExceptionThrowingOperation", "<", "T", ">", "operation", ",", "T", "defaultValue", ")", "{", "try", "{", "return", "operation", ".", "doExceptionThrowingOperation", "(", ")", ";", "}", "catch",...
Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception} thrown during the normal execution of the operation by returning the given {@link Object default value} or rethrowing an {@link IllegalStateException} if the {@link Object default value} is {@literal null}. @param <T> {...
[ "Safely", "executes", "the", "given", "{", "@link", "ExceptionThrowingOperation", "}", "handling", "any", "checked", "{", "@link", "Exception", "}", "thrown", "during", "the", "normal", "execution", "of", "the", "operation", "by", "returning", "the", "given", "{...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ObjectUtils.java#L170-L179
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.formatProductName
@Deprecated public static final String formatProductName(String project, String location, String product) { return PRODUCT_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product); }
java
@Deprecated public static final String formatProductName(String project, String location, String product) { return PRODUCT_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatProductName", "(", "String", "project", ",", "String", "location", ",", "String", "product", ")", "{", "return", "PRODUCT_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",", ...
Formats a string containing the fully-qualified path to represent a product resource. @deprecated Use the {@link ProductName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "product", "resource", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L163-L169
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/CmsSitemapView.java
CmsSitemapView.setElementVisible
protected void setElementVisible(Widget widget, boolean visible) { if (visible) { widget.getElement().getStyle().clearDisplay(); } else { widget.getElement().getStyle().setDisplay(Display.NONE); } }
java
protected void setElementVisible(Widget widget, boolean visible) { if (visible) { widget.getElement().getStyle().clearDisplay(); } else { widget.getElement().getStyle().setDisplay(Display.NONE); } }
[ "protected", "void", "setElementVisible", "(", "Widget", "widget", ",", "boolean", "visible", ")", "{", "if", "(", "visible", ")", "{", "widget", ".", "getElement", "(", ")", ".", "getStyle", "(", ")", ".", "clearDisplay", "(", ")", ";", "}", "else", "...
Shows or hides the element for a widget.<p> @param widget the widget to show or hide @param visible true if the widget should be shown
[ "Shows", "or", "hides", "the", "element", "for", "a", "widget", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapView.java#L1431-L1439
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/EmailUtils.java
EmailUtils.sendJobCompletionEmail
public static void sendJobCompletionEmail(String jobId, String message, String state, State jobState) throws EmailException { sendEmail(jobState, String.format("Gobblin notification: job %s has completed with state %s", jobId, state), message); }
java
public static void sendJobCompletionEmail(String jobId, String message, String state, State jobState) throws EmailException { sendEmail(jobState, String.format("Gobblin notification: job %s has completed with state %s", jobId, state), message); }
[ "public", "static", "void", "sendJobCompletionEmail", "(", "String", "jobId", ",", "String", "message", ",", "String", "state", ",", "State", "jobState", ")", "throws", "EmailException", "{", "sendEmail", "(", "jobState", ",", "String", ".", "format", "(", "\"...
Send a job completion notification email. @param jobId job name @param message email message @param state job state @param jobState a {@link State} object carrying job configuration properties @throws EmailException if there is anything wrong sending the email
[ "Send", "a", "job", "completion", "notification", "email", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/EmailUtils.java#L93-L97
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunsInner.java
RunsInner.updateAsync
public Observable<RunInner> updateAsync(String resourceGroupName, String registryName, String runId) { return updateWithServiceResponseAsync(resourceGroupName, registryName, runId).map(new Func1<ServiceResponse<RunInner>, RunInner>() { @Override public RunInner call(ServiceResponse<RunIn...
java
public Observable<RunInner> updateAsync(String resourceGroupName, String registryName, String runId) { return updateWithServiceResponseAsync(resourceGroupName, registryName, runId).map(new Func1<ServiceResponse<RunInner>, RunInner>() { @Override public RunInner call(ServiceResponse<RunIn...
[ "public", "Observable", "<", "RunInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "runId", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "runId", ...
Patch the run properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param runId The run ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Patch", "the", "run", "properties", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunsInner.java#L474-L481
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
DemuxingIoHandler.exceptionCaught
@Override public void exceptionCaught(IoSession session, Throwable cause) throws Exception { ExceptionHandler<Throwable> handler = findExceptionHandler(cause.getClass()); if (handler != null) { handler.exceptionCaught(session, cause); } else { throw new UnknownMessage...
java
@Override public void exceptionCaught(IoSession session, Throwable cause) throws Exception { ExceptionHandler<Throwable> handler = findExceptionHandler(cause.getClass()); if (handler != null) { handler.exceptionCaught(session, cause); } else { throw new UnknownMessage...
[ "@", "Override", "public", "void", "exceptionCaught", "(", "IoSession", "session", ",", "Throwable", "cause", ")", "throws", "Exception", "{", "ExceptionHandler", "<", "Throwable", ">", "handler", "=", "findExceptionHandler", "(", "cause", ".", "getClass", "(", ...
Invoked when any exception is thrown by user IoHandler implementation or by MINA. If cause is an instance of IOException, MINA will close the connection automatically. <b>Warning !</b> If you are to overload this method, be aware that you _must_ call the messageHandler in your own method, otherwise it won't be called.
[ "Invoked", "when", "any", "exception", "is", "thrown", "by", "user", "IoHandler", "implementation", "or", "by", "MINA", ".", "If", "cause", "is", "an", "instance", "of", "IOException", "MINA", "will", "close", "the", "connection", "automatically", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java#L264-L274
contentful/contentful.java
src/main/java/com/contentful/java/cda/rich/RichTextFactory.java
RichTextFactory.resolveRichLink
private static void resolveRichLink(ArrayResource array, CDAEntry entry, CDAField field) { final Map<String, Object> rawValue = (Map<String, Object>) entry.rawFields().get(field.id()); if (rawValue == null) { return; } for (final String locale : rawValue.keySet()) { final CDARichDocument do...
java
private static void resolveRichLink(ArrayResource array, CDAEntry entry, CDAField field) { final Map<String, Object> rawValue = (Map<String, Object>) entry.rawFields().get(field.id()); if (rawValue == null) { return; } for (final String locale : rawValue.keySet()) { final CDARichDocument do...
[ "private", "static", "void", "resolveRichLink", "(", "ArrayResource", "array", ",", "CDAEntry", "entry", ",", "CDAField", "field", ")", "{", "final", "Map", "<", "String", ",", "Object", ">", "rawValue", "=", "(", "Map", "<", "String", ",", "Object", ">", ...
Resolve all links if possible. If linked to entry is not found, null it's field. @param array the array containing the complete response @param entry the entry to be completed. @param field the field pointing to a link.
[ "Resolve", "all", "links", "if", "possible", ".", "If", "linked", "to", "entry", "is", "not", "found", "null", "it", "s", "field", "." ]
train
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/rich/RichTextFactory.java#L350-L362
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.getFieldValue
public static <T> T getFieldValue(Object target, String fieldName) { try { Field field = target.getClass().getDeclaredField(fieldName); field.setAccessible(true); @SuppressWarnings("unchecked") T returnValue = (T) field.get(target); return returnValue;...
java
public static <T> T getFieldValue(Object target, String fieldName) { try { Field field = target.getClass().getDeclaredField(fieldName); field.setAccessible(true); @SuppressWarnings("unchecked") T returnValue = (T) field.get(target); return returnValue;...
[ "public", "static", "<", "T", ">", "T", "getFieldValue", "(", "Object", "target", ",", "String", "fieldName", ")", "{", "try", "{", "Field", "field", "=", "target", ".", "getClass", "(", ")", ".", "getDeclaredField", "(", "fieldName", ")", ";", "field", ...
Get target object field value @param target target object @param fieldName field name @param <T> field type @return field value
[ "Get", "target", "object", "field", "value" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L35-L47
KostyaSha/yet-another-docker-plugin
yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/client/ClientBuilderForConnector.java
ClientBuilderForConnector.forServer
public ClientBuilderForConnector forServer(String uri, @Nullable String version) { configBuilder.withDockerHost(URI.create(uri).toString()) .withApiVersion(version); return this; }
java
public ClientBuilderForConnector forServer(String uri, @Nullable String version) { configBuilder.withDockerHost(URI.create(uri).toString()) .withApiVersion(version); return this; }
[ "public", "ClientBuilderForConnector", "forServer", "(", "String", "uri", ",", "@", "Nullable", "String", "version", ")", "{", "configBuilder", ".", "withDockerHost", "(", "URI", ".", "create", "(", "uri", ")", ".", "toString", "(", ")", ")", ".", "withApiVe...
Method to setup url and docker-api version. Convenient for test-connection purposes and quick requests @param uri docker server uri @param version docker-api version @return this newClientBuilderForConnector
[ "Method", "to", "setup", "url", "and", "docker", "-", "api", "version", ".", "Convenient", "for", "test", "-", "connection", "purposes", "and", "quick", "requests" ]
train
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/client/ClientBuilderForConnector.java#L119-L123
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java
ESResponseWrapper.isValidBucket
private boolean isValidBucket(InternalAggregations internalAgg, KunderaQuery query, Expression conditionalExpression) { if (conditionalExpression instanceof ComparisonExpression) { Expression expression = ((ComparisonExpression) conditionalExpression).getLeftExpression(); Obj...
java
private boolean isValidBucket(InternalAggregations internalAgg, KunderaQuery query, Expression conditionalExpression) { if (conditionalExpression instanceof ComparisonExpression) { Expression expression = ((ComparisonExpression) conditionalExpression).getLeftExpression(); Obj...
[ "private", "boolean", "isValidBucket", "(", "InternalAggregations", "internalAgg", ",", "KunderaQuery", "query", ",", "Expression", "conditionalExpression", ")", "{", "if", "(", "conditionalExpression", "instanceof", "ComparisonExpression", ")", "{", "Expression", "expres...
Checks if is valid bucket. @param internalAgg the internal agg @param query the query @param conditionalExpression the conditional expression @return true, if is valid bucket
[ "Checks", "if", "is", "valid", "bucket", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L395-L433
google/closure-templates
java/src/com/google/template/soy/shared/internal/AbstractGenerateSoyEscapingDirectiveCode.java
AbstractGenerateSoyEscapingDirectiveCode.writeStringLiteral
protected void writeStringLiteral(String value, StringBuilder out) { out.append('\'').append(escapeOutputString(value)).append('\''); }
java
protected void writeStringLiteral(String value, StringBuilder out) { out.append('\'').append(escapeOutputString(value)).append('\''); }
[ "protected", "void", "writeStringLiteral", "(", "String", "value", ",", "StringBuilder", "out", ")", "{", "out", ".", "append", "(", "'", "'", ")", ".", "append", "(", "escapeOutputString", "(", "value", ")", ")", ".", "append", "(", "'", "'", ")", ";"...
Appends a string literal with the given value onto the given buffer.
[ "Appends", "a", "string", "literal", "with", "the", "given", "value", "onto", "the", "given", "buffer", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/shared/internal/AbstractGenerateSoyEscapingDirectiveCode.java#L455-L457
rhuss/jolokia
agent/core/src/main/java/org/jolokia/request/JmxSearchRequest.java
JmxSearchRequest.newCreator
static RequestCreator<JmxSearchRequest> newCreator() { return new RequestCreator<JmxSearchRequest>() { /** {@inheritDoc} */ public JmxSearchRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxSearchRequest...
java
static RequestCreator<JmxSearchRequest> newCreator() { return new RequestCreator<JmxSearchRequest>() { /** {@inheritDoc} */ public JmxSearchRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxSearchRequest...
[ "static", "RequestCreator", "<", "JmxSearchRequest", ">", "newCreator", "(", ")", "{", "return", "new", "RequestCreator", "<", "JmxSearchRequest", ">", "(", ")", "{", "/** {@inheritDoc} */", "public", "JmxSearchRequest", "create", "(", "Stack", "<", "String", ">",...
Creator for {@link JmxSearchRequest}s @return the creator implementation
[ "Creator", "for", "{", "@link", "JmxSearchRequest", "}", "s" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/request/JmxSearchRequest.java#L76-L89
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java
PrepareRequestInterceptor.isSendEmail
private boolean isSendEmail(Map<String, String> map) { return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR)) && map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(RequestElements.PARAM_SEND_SELECTOR); }
java
private boolean isSendEmail(Map<String, String> map) { return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR)) && map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(RequestElements.PARAM_SEND_SELECTOR); }
[ "private", "boolean", "isSendEmail", "(", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "return", "StringUtils", ".", "hasText", "(", "map", ".", "get", "(", "RequestElements", ".", "REQ_PARAM_ENTITY_SELECTOR", ")", ")", "&&", "map", ".", "get...
Method returns true if this request should be send as email @param map @return
[ "Method", "returns", "true", "if", "this", "request", "should", "be", "send", "as", "email" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L586-L589
samskivert/samskivert
src/main/java/com/samskivert/servlet/user/UserManager.java
UserManager.init
public void init (Properties config, ConnectionProvider conprov) throws PersistenceException { init(config, conprov, null); }
java
public void init (Properties config, ConnectionProvider conprov) throws PersistenceException { init(config, conprov, null); }
[ "public", "void", "init", "(", "Properties", "config", ",", "ConnectionProvider", "conprov", ")", "throws", "PersistenceException", "{", "init", "(", "config", ",", "conprov", ",", "null", ")", ";", "}" ]
Prepares this user manager for operation. Presently the user manager requires the following configuration information: <ul> <li><code>login_url</code>: Should be set to the URL to which to redirect a requester if they are required to login before accessing the requested page. For example: <pre> login_url = /usermgmt/...
[ "Prepares", "this", "user", "manager", "for", "operation", ".", "Presently", "the", "user", "manager", "requires", "the", "following", "configuration", "information", ":" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/user/UserManager.java#L89-L93
foundation-runtime/service-directory
1.2/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/HttpUtils.java
HttpUtils.postJson
public static HttpResponse postJson(String urlStr, String body) throws IOException, ServiceException { URL url = new URL(urlStr); HttpURLConnection urlConnection = (HttpURLConnection) url .openConnection(); if (urlConnection instanceof HttpsURLConnection) { setTLSCon...
java
public static HttpResponse postJson(String urlStr, String body) throws IOException, ServiceException { URL url = new URL(urlStr); HttpURLConnection urlConnection = (HttpURLConnection) url .openConnection(); if (urlConnection instanceof HttpsURLConnection) { setTLSCon...
[ "public", "static", "HttpResponse", "postJson", "(", "String", "urlStr", ",", "String", "body", ")", "throws", "IOException", ",", "ServiceException", "{", "URL", "url", "=", "new", "URL", "(", "urlStr", ")", ";", "HttpURLConnection", "urlConnection", "=", "("...
Invoke REST Service using POST method. @param urlStr the REST service URL String @param body the Http Body String. @return the HttpResponse. @throws IOException @throws ServiceException
[ "Invoke", "REST", "Service", "using", "POST", "method", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.2/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/HttpUtils.java#L74-L97
agmip/agmip-common-functions
src/main/java/org/agmip/functions/PTSaxton2006.java
PTSaxton2006.calcAdjustedDensity
public static String calcAdjustedDensity(String slsnd, String slcly, String omPct, String df) { if (compare(df, "0.9", CompareMode.NOTLESS) && compare(df, "1.3", CompareMode.NOTGREATER)) { String normalDensity = calcNormalDensity(slsnd, slcly, omPct); String ret = product(normalDensity,...
java
public static String calcAdjustedDensity(String slsnd, String slcly, String omPct, String df) { if (compare(df, "0.9", CompareMode.NOTLESS) && compare(df, "1.3", CompareMode.NOTGREATER)) { String normalDensity = calcNormalDensity(slsnd, slcly, omPct); String ret = product(normalDensity,...
[ "public", "static", "String", "calcAdjustedDensity", "(", "String", "slsnd", ",", "String", "slcly", ",", "String", "omPct", ",", "String", "df", ")", "{", "if", "(", "compare", "(", "df", ",", "\"0.9\"", ",", "CompareMode", ".", "NOTLESS", ")", "&&", "c...
Equation 7 for calculating Adjusted density, g/cm-3 @param slsnd Sand weight percentage by layer ([0,100]%) @param slcly Clay weight percentage by layer ([0,100]%) @param omPct Organic matter weight percentage by layer ([0,100]%), (= SLOC * 1.72) @param df Density adjustment Factor (0.9–1.3)
[ "Equation", "7", "for", "calculating", "Adjusted", "density", "g", "/", "cm", "-", "3" ]
train
https://github.com/agmip/agmip-common-functions/blob/4efa3042178841b026ca6fba9c96da02fbfb9a8e/src/main/java/org/agmip/functions/PTSaxton2006.java#L243-L254
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractThrowEventBuilder.java
AbstractThrowEventBuilder.signalEventDefinition
public SignalEventDefinitionBuilder signalEventDefinition(String signalName) { SignalEventDefinition signalEventDefinition = createSignalEventDefinition(signalName); element.getEventDefinitions().add(signalEventDefinition); return new SignalEventDefinitionBuilder(modelInstance, signalEventDefinition); }
java
public SignalEventDefinitionBuilder signalEventDefinition(String signalName) { SignalEventDefinition signalEventDefinition = createSignalEventDefinition(signalName); element.getEventDefinitions().add(signalEventDefinition); return new SignalEventDefinitionBuilder(modelInstance, signalEventDefinition); }
[ "public", "SignalEventDefinitionBuilder", "signalEventDefinition", "(", "String", "signalName", ")", "{", "SignalEventDefinition", "signalEventDefinition", "=", "createSignalEventDefinition", "(", "signalName", ")", ";", "element", ".", "getEventDefinitions", "(", ")", ".",...
Sets an event definition for the given Signal name. If a signal with this name already exists it will be used, otherwise a new signal is created. It returns a builder for the Signal Event Definition. @param signalName the name of the signal @return the signal event definition builder object
[ "Sets", "an", "event", "definition", "for", "the", "given", "Signal", "name", ".", "If", "a", "signal", "with", "this", "name", "already", "exists", "it", "will", "be", "used", "otherwise", "a", "new", "signal", "is", "created", ".", "It", "returns", "a"...
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractThrowEventBuilder.java#L98-L103
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createNicePartialMockAndInvokeDefaultConstructor
public static <T> T createNicePartialMockAndInvokeDefaultConstructor(Class<T> type, String... methodNames) throws Exception { return createNiceMock(type, new ConstructorArgs(Whitebox.getConstructor(type)), Whitebox.getMethods(type, methodNames)); }
java
public static <T> T createNicePartialMockAndInvokeDefaultConstructor(Class<T> type, String... methodNames) throws Exception { return createNiceMock(type, new ConstructorArgs(Whitebox.getConstructor(type)), Whitebox.getMethods(type, methodNames)); }
[ "public", "static", "<", "T", ">", "T", "createNicePartialMockAndInvokeDefaultConstructor", "(", "Class", "<", "T", ">", "type", ",", "String", "...", "methodNames", ")", "throws", "Exception", "{", "return", "createNiceMock", "(", "type", ",", "new", "Construct...
A utility method that may be used to nicely mock several methods in an easy way (by just passing in the method names of the method you wish to mock). The mock object created will support mocking of final methods and invokes the default constructor (even if it's private). @param <T> the type of the mock object ...
[ "A", "utility", "method", "that", "may", "be", "used", "to", "nicely", "mock", "several", "methods", "in", "an", "easy", "way", "(", "by", "just", "passing", "in", "the", "method", "names", "of", "the", "method", "you", "wish", "to", "mock", ")", ".", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L859-L863
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/XPath10ParserImpl.java
XPath10ParserImpl.postProcessOperands
private void postProcessOperands(OperatorImpl opImpl, String fullPath) throws InvalidXPathSyntaxException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry(cclass, "postProcessOperands", "opImpl: " + opImpl + ", fullPath: " + fullPath); ...
java
private void postProcessOperands(OperatorImpl opImpl, String fullPath) throws InvalidXPathSyntaxException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry(cclass, "postProcessOperands", "opImpl: " + opImpl + ", fullPath: " + fullPath); ...
[ "private", "void", "postProcessOperands", "(", "OperatorImpl", "opImpl", ",", "String", "fullPath", ")", "throws", "InvalidXPathSyntaxException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", "...
Traverse an Operator tree handling special character substitution. @param opImpl @throws InvalidXPathSyntaxException
[ "Traverse", "an", "Operator", "tree", "handling", "special", "character", "substitution", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/XPath10ParserImpl.java#L873-L888
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_backupStorage_GET
public ArrayList<String> dedicated_server_serviceName_backupStorage_GET(String serviceName, OvhBackupStorageCapacityEnum capacity) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/backupStorage"; StringBuilder sb = path(qPath, serviceName); query(sb, "capacity", capacity); String resp ...
java
public ArrayList<String> dedicated_server_serviceName_backupStorage_GET(String serviceName, OvhBackupStorageCapacityEnum capacity) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/backupStorage"; StringBuilder sb = path(qPath, serviceName); query(sb, "capacity", capacity); String resp ...
[ "public", "ArrayList", "<", "String", ">", "dedicated_server_serviceName_backupStorage_GET", "(", "String", "serviceName", ",", "OvhBackupStorageCapacityEnum", "capacity", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName}/backup...
Get allowed durations for 'backupStorage' option REST: GET /order/dedicated/server/{serviceName}/backupStorage @param capacity [required] The capacity in gigabytes of your backup storage @param serviceName [required] The internal name of your dedicated server
[ "Get", "allowed", "durations", "for", "backupStorage", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2484-L2490
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java
POIUtils.mergeCells
public static CellRangeAddress mergeCells(final Sheet sheet, int startCol, int startRow, int endCol, int endRow) { ArgUtils.notNull(sheet, "sheet"); // 結合先のセルの値を空に設定する for(int r=startRow; r <= endRow; r++) { for(int c=startCol; c <= endCol; c++) { if(r == sta...
java
public static CellRangeAddress mergeCells(final Sheet sheet, int startCol, int startRow, int endCol, int endRow) { ArgUtils.notNull(sheet, "sheet"); // 結合先のセルの値を空に設定する for(int r=startRow; r <= endRow; r++) { for(int c=startCol; c <= endCol; c++) { if(r == sta...
[ "public", "static", "CellRangeAddress", "mergeCells", "(", "final", "Sheet", "sheet", ",", "int", "startCol", ",", "int", "startRow", ",", "int", "endCol", ",", "int", "endRow", ")", "{", "ArgUtils", ".", "notNull", "(", "sheet", ",", "\"sheet\"", ")", ";"...
指定した範囲のセルを結合する。 @param sheet @param startCol @param startRow @param endCol @param endRow @return 結合した範囲のアドレス情報 @throws IllegalArgumentException {@literal sheet == null}
[ "指定した範囲のセルを結合する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java#L335-L354
joniles/mpxj
src/main/java/net/sf/mpxj/ResourceAssignment.java
ResourceAssignment.setStart
public void setStart(int index, Date value) { set(selectField(AssignmentFieldLists.CUSTOM_START, index), value); }
java
public void setStart(int index, Date value) { set(selectField(AssignmentFieldLists.CUSTOM_START, index), value); }
[ "public", "void", "setStart", "(", "int", "index", ",", "Date", "value", ")", "{", "set", "(", "selectField", "(", "AssignmentFieldLists", ".", "CUSTOM_START", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set a start value. @param index start index (1-10) @param value start value
[ "Set", "a", "start", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1540-L1543
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java
ServerUpdatePolicy.recordServerResult
public void recordServerResult(ServerIdentity server, ModelNode response) { if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) { throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server); } boolean serverFailed = response.has(FAIL...
java
public void recordServerResult(ServerIdentity server, ModelNode response) { if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) { throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server); } boolean serverFailed = response.has(FAIL...
[ "public", "void", "recordServerResult", "(", "ServerIdentity", "server", ",", "ModelNode", "response", ")", "{", "if", "(", "!", "serverGroupName", ".", "equals", "(", "server", ".", "getServerGroupName", "(", ")", ")", "||", "!", "servers", ".", "contains", ...
Records the result of updating a server. @param server the id of the server. Cannot be <code>null</code> @param response the result of the updates
[ "Records", "the", "result", "of", "updating", "a", "server", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java#L130-L160
apache/incubator-heron
heron/common/src/java/org/apache/heron/common/network/HeronClient.java
HeronClient.sendRequest
public void sendRequest(Message request, Message.Builder responseBuilder) { sendRequest(request, null, responseBuilder, Duration.ZERO); }
java
public void sendRequest(Message request, Message.Builder responseBuilder) { sendRequest(request, null, responseBuilder, Duration.ZERO); }
[ "public", "void", "sendRequest", "(", "Message", "request", ",", "Message", ".", "Builder", "responseBuilder", ")", "{", "sendRequest", "(", "request", ",", "null", ",", "responseBuilder", ",", "Duration", ".", "ZERO", ")", ";", "}" ]
Convenience method of the above method with no timeout or context
[ "Convenience", "method", "of", "the", "above", "method", "with", "no", "timeout", "or", "context" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/common/src/java/org/apache/heron/common/network/HeronClient.java#L214-L216
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putAuthenticationResult
public static void putAuthenticationResult(final AuthenticationResult authenticationResult, final RequestContext context) { context.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT, authenticationResult); }
java
public static void putAuthenticationResult(final AuthenticationResult authenticationResult, final RequestContext context) { context.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT, authenticationResult); }
[ "public", "static", "void", "putAuthenticationResult", "(", "final", "AuthenticationResult", "authenticationResult", ",", "final", "RequestContext", "context", ")", "{", "context", ".", "getConversationScope", "(", ")", ".", "put", "(", "PARAMETER_AUTHENTICATION_RESULT", ...
Put authentication result. @param authenticationResult the authentication result @param context the context
[ "Put", "authentication", "result", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L533-L535
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.listFromComputeNodeWithServiceResponseAsync
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromComputeNodeHeaders>> listFromComputeNodeWithServiceResponseAsync(final String poolId, final String nodeId, final Boolean recursive, final FileListFromComputeNodeOptions fileListFromComputeNodeOptions) { return listFromComputeNodeSinglePage...
java
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromComputeNodeHeaders>> listFromComputeNodeWithServiceResponseAsync(final String poolId, final String nodeId, final Boolean recursive, final FileListFromComputeNodeOptions fileListFromComputeNodeOptions) { return listFromComputeNodeSinglePage...
[ "public", "Observable", "<", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeFile", ">", ",", "FileListFromComputeNodeHeaders", ">", ">", "listFromComputeNodeWithServiceResponseAsync", "(", "final", "String", "poolId", ",", "final", "String", "nodeId", ",", "final"...
Lists all of the files in task directories on the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node whose files you want to list. @param recursive Whether to list children of a directory. @param fileListFromComputeNodeOptions Additional pa...
[ "Lists", "all", "of", "the", "files", "in", "task", "directories", "on", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L2126-L2145
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.getReader
public static ExcelReader getReader(File bookFile, String sheetName) { try { return new ExcelReader(bookFile, sheetName); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); } }
java
public static ExcelReader getReader(File bookFile, String sheetName) { try { return new ExcelReader(bookFile, sheetName); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); } }
[ "public", "static", "ExcelReader", "getReader", "(", "File", "bookFile", ",", "String", "sheetName", ")", "{", "try", "{", "return", "new", "ExcelReader", "(", "bookFile", ",", "sheetName", ")", ";", "}", "catch", "(", "NoClassDefFoundError", "e", ")", "{", ...
获取Excel读取器,通过调用{@link ExcelReader}的read或readXXX方法读取Excel内容 @param bookFile Excel文件 @param sheetName sheet名,第一个默认是sheet1 @return {@link ExcelReader}
[ "获取Excel读取器,通过调用", "{", "@link", "ExcelReader", "}", "的read或readXXX方法读取Excel内容" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L245-L251
sahan/RoboZombie
robozombie/src/main/java/com/lonepulse/robozombie/util/Assert.java
Assert.assertAssignable
public static <T extends Object> T assertAssignable(Object arg, Class<T> type) { assertNotNull(arg); assertNotNull(type); if(!type.isAssignableFrom(arg.getClass())) { throw new ClassCastException(new StringBuilder("The instance of type <") .append(arg.getClass().getName()).append("> cannot be assig...
java
public static <T extends Object> T assertAssignable(Object arg, Class<T> type) { assertNotNull(arg); assertNotNull(type); if(!type.isAssignableFrom(arg.getClass())) { throw new ClassCastException(new StringBuilder("The instance of type <") .append(arg.getClass().getName()).append("> cannot be assig...
[ "public", "static", "<", "T", "extends", "Object", ">", "T", "assertAssignable", "(", "Object", "arg", ",", "Class", "<", "T", ">", "type", ")", "{", "assertNotNull", "(", "arg", ")", ";", "assertNotNull", "(", "type", ")", ";", "if", "(", "!", "type...
<p>Asserts that the given Object is assignable to the specified type. If either the generic Object or the {@link Class} is {@code null} a {@link NullPointerException} will be thrown with the message, <i>"The supplied argument was found to be &lt;null&gt;"</i>. If the object was not found to be in conformance with the s...
[ "<p", ">", "Asserts", "that", "the", "given", "Object", "is", "assignable", "to", "the", "specified", "type", ".", "If", "either", "the", "generic", "Object", "or", "the", "{", "@link", "Class", "}", "is", "{", "@code", "null", "}", "a", "{", "@link", ...
train
https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/com/lonepulse/robozombie/util/Assert.java#L68-L82
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.findByU_T
@Override public List<CommerceAccount> findByU_T(long userId, int type, int start, int end, OrderByComparator<CommerceAccount> orderByComparator) { return findByU_T(userId, type, start, end, orderByComparator, true); }
java
@Override public List<CommerceAccount> findByU_T(long userId, int type, int start, int end, OrderByComparator<CommerceAccount> orderByComparator) { return findByU_T(userId, type, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommerceAccount", ">", "findByU_T", "(", "long", "userId", ",", "int", "type", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommerceAccount", ">", "orderByComparator", ")", "{", "return", "f...
Returns an ordered range of all the commerce accounts where userId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the ...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "accounts", "where", "userId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L1038-L1042
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/attributes/AttributeLocalizedContentUrl.java
AttributeLocalizedContentUrl.updateLocalizedContentUrl
public static MozuUrl updateLocalizedContentUrl(String attributeFQN, String localeCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/attributes/{attributeFQN}/LocalizedContent/{localeCode}?responseFields={responseFields}"); formatter.formatU...
java
public static MozuUrl updateLocalizedContentUrl(String attributeFQN, String localeCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/attributes/{attributeFQN}/LocalizedContent/{localeCode}?responseFields={responseFields}"); formatter.formatU...
[ "public", "static", "MozuUrl", "updateLocalizedContentUrl", "(", "String", "attributeFQN", ",", "String", "localeCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinitio...
Get Resource Url for UpdateLocalizedContent @param attributeFQN Fully qualified name for an attribute. @param localeCode The two character country code that sets the locale, such as US for United States. Sites, tenants, and catalogs use locale codes for localizing content, such as translated product text per supported ...
[ "Get", "Resource", "Url", "for", "UpdateLocalizedContent" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/attributes/AttributeLocalizedContentUrl.java#L77-L84
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/Shell.java
Shell.executeSystemCommandAndGetOutput
public final String executeSystemCommandAndGetOutput(final String[] command, final String encoding) throws IOException { Process p = Runtime.getRuntime().exec(command); StreamManager sm = new StreamManager(); try { InputStream input = sm.handle(p.getInputStream()); StringBuffer lines = new Stri...
java
public final String executeSystemCommandAndGetOutput(final String[] command, final String encoding) throws IOException { Process p = Runtime.getRuntime().exec(command); StreamManager sm = new StreamManager(); try { InputStream input = sm.handle(p.getInputStream()); StringBuffer lines = new Stri...
[ "public", "final", "String", "executeSystemCommandAndGetOutput", "(", "final", "String", "[", "]", "command", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "Process", "p", "=", "Runtime", ".", "getRuntime", "(", ")", ".", "exec", "(", ...
Executes a system command with arguments and returns the output. @param command command to be executed @param encoding encoding to be used @return command output @throws IOException on any error
[ "Executes", "a", "system", "command", "with", "arguments", "and", "returns", "the", "output", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/Shell.java#L55-L72
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-classloader/xwiki-commons-classloader-api/src/main/java/org/xwiki/classloader/URIClassLoader.java
URIClassLoader.isSealed
private boolean isSealed(String name, Manifest man) { String path = name.replace('.', '/').concat("/"); Attributes attr = man.getAttributes(path); String sealed = null; if (attr != null) { sealed = attr.getValue(Name.SEALED); } if (sealed == null) { ...
java
private boolean isSealed(String name, Manifest man) { String path = name.replace('.', '/').concat("/"); Attributes attr = man.getAttributes(path); String sealed = null; if (attr != null) { sealed = attr.getValue(Name.SEALED); } if (sealed == null) { ...
[ "private", "boolean", "isSealed", "(", "String", "name", ",", "Manifest", "man", ")", "{", "String", "path", "=", "name", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ".", "concat", "(", "\"/\"", ")", ";", "Attributes", "attr", "=", "man", "....
returns true if the specified package name is sealed according to the given manifest.
[ "returns", "true", "if", "the", "specified", "package", "name", "is", "sealed", "according", "to", "the", "given", "manifest", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-classloader/xwiki-commons-classloader-api/src/main/java/org/xwiki/classloader/URIClassLoader.java#L244-L258
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java
MetricContext.contextAwareMeter
public ContextAwareMeter contextAwareMeter(String name, ContextAwareMetricFactory<ContextAwareMeter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
java
public ContextAwareMeter contextAwareMeter(String name, ContextAwareMetricFactory<ContextAwareMeter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
[ "public", "ContextAwareMeter", "contextAwareMeter", "(", "String", "name", ",", "ContextAwareMetricFactory", "<", "ContextAwareMeter", ">", "factory", ")", "{", "return", "this", ".", "innerMetricContext", ".", "getOrCreate", "(", "name", ",", "factory", ")", ";", ...
Get a {@link ContextAwareMeter} with a given name. @param name name of the {@link ContextAwareMeter} @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareMeter}s @return the {@link ContextAwareMeter} with the given name
[ "Get", "a", "{", "@link", "ContextAwareMeter", "}", "with", "a", "given", "name", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java#L457-L459
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.createEvse
public Evse createEvse(Long chargingStationTypeId, Evse evse) throws ResourceAlreadyExistsException { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); if (getEvseByIdentifier(chargingStationType, evse.getIdentifier()) != null) { throw n...
java
public Evse createEvse(Long chargingStationTypeId, Evse evse) throws ResourceAlreadyExistsException { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); if (getEvseByIdentifier(chargingStationType, evse.getIdentifier()) != null) { throw n...
[ "public", "Evse", "createEvse", "(", "Long", "chargingStationTypeId", ",", "Evse", "evse", ")", "throws", "ResourceAlreadyExistsException", "{", "ChargingStationType", "chargingStationType", "=", "chargingStationTypeRepository", ".", "findOne", "(", "chargingStationTypeId", ...
Creates a Evse in a charging station type. @param chargingStationTypeId charging station type identifier. @param evse evse object @return created Evse
[ "Creates", "a", "Evse", "in", "a", "charging", "station", "type", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L73-L84
opentelecoms-org/zrtp-java
src/zorg/platform/android/AndroidCacheEntry.java
AndroidCacheEntry.fromString
public static ZrtpCacheEntry fromString(String key, String value) { String data = null; String number = null; int sep = value.indexOf(','); if (sep > 0) { data = value.substring(0, sep); number = value.substring(sep + 1); } else { data = value; number = ""; } byte[] buffer = new byt...
java
public static ZrtpCacheEntry fromString(String key, String value) { String data = null; String number = null; int sep = value.indexOf(','); if (sep > 0) { data = value.substring(0, sep); number = value.substring(sep + 1); } else { data = value; number = ""; } byte[] buffer = new byt...
[ "public", "static", "ZrtpCacheEntry", "fromString", "(", "String", "key", ",", "String", "value", ")", "{", "String", "data", "=", "null", ";", "String", "number", "=", "null", ";", "int", "sep", "=", "value", ".", "indexOf", "(", "'", "'", ")", ";", ...
Create a Cache Entry, from the Zid string and the CSV representation of HEX RAW data and phone number @param key ZID string @param value CSV of HEX raw data and phone number, for example "E84FE07E054660FFF5CF90B4,+3943332233323" @return a new ZRTP cache entry
[ "Create", "a", "Cache", "Entry", "from", "the", "Zid", "string", "and", "the", "CSV", "representation", "of", "HEX", "RAW", "data", "and", "phone", "number" ]
train
https://github.com/opentelecoms-org/zrtp-java/blob/10a0c77866c5d1b1504df161db9a447f5069ed54/src/zorg/platform/android/AndroidCacheEntry.java#L108-L126
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java
SyntaxReader.readDataType
public String readDataType(String name) { if (name.equals("map")) { if (readChar() != '<') throw unexpected("expected '<'"); String keyType = readDataType(); if (readChar() != ',') throw unexpected("expected ','"); String valueType = readDataType(); if (readChar() != '>') throw unexpec...
java
public String readDataType(String name) { if (name.equals("map")) { if (readChar() != '<') throw unexpected("expected '<'"); String keyType = readDataType(); if (readChar() != ',') throw unexpected("expected ','"); String valueType = readDataType(); if (readChar() != '>') throw unexpec...
[ "public", "String", "readDataType", "(", "String", "name", ")", "{", "if", "(", "name", ".", "equals", "(", "\"map\"", ")", ")", "{", "if", "(", "readChar", "(", ")", "!=", "'", "'", ")", "throw", "unexpected", "(", "\"expected '<'\"", ")", ";", "Str...
Reads a scalar, map, or type name with {@code name} as a prefix word.
[ "Reads", "a", "scalar", "map", "or", "type", "name", "with", "{" ]
train
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java#L177-L188
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.getComputeNodeRemoteLoginSettings
public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId) throws BatchErrorException, IOException { return getComputeNodeRemoteLoginSettings(poolId, nodeId, null); }
java
public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId) throws BatchErrorException, IOException { return getComputeNodeRemoteLoginSettings(poolId, nodeId, null); }
[ "public", "ComputeNodeGetRemoteLoginSettingsResult", "getComputeNodeRemoteLoginSettings", "(", "String", "poolId", ",", "String", "nodeId", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "getComputeNodeRemoteLoginSettings", "(", "poolId", ",", "nodeI...
Gets the settings required for remote login to a compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node for which to get a remote login settings. @return The remote settings for the specified compute node. @throws BatchErrorException Exception thrown whe...
[ "Gets", "the", "settings", "required", "for", "remote", "login", "to", "a", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L476-L478
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.find
public void find(ResultStream<Cursor> result, String sql, Object ...args) { _kraken.findStream(sql, args, result); }
java
public void find(ResultStream<Cursor> result, String sql, Object ...args) { _kraken.findStream(sql, args, result); }
[ "public", "void", "find", "(", "ResultStream", "<", "Cursor", ">", "result", ",", "String", "sql", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "findStream", "(", "sql", ",", "args", ",", "result", ")", ";", "}" ]
Queries the database, returning values to a result sink. @param sql the select query for the search @param result callback for the result iterator @param args arguments to the sql
[ "Queries", "the", "database", "returning", "values", "to", "a", "result", "sink", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L157-L160
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java
XPathParser.parseOccuranceIndicator
private char parseOccuranceIndicator() { char wildcard; if (is(TokenType.STAR, true)) { wildcard = '*'; } else if (is(TokenType.PLUS, true)) { wildcard = '+'; } else { consume(TokenType.INTERROGATION, true); wildcard = '?'; } ...
java
private char parseOccuranceIndicator() { char wildcard; if (is(TokenType.STAR, true)) { wildcard = '*'; } else if (is(TokenType.PLUS, true)) { wildcard = '+'; } else { consume(TokenType.INTERROGATION, true); wildcard = '?'; } ...
[ "private", "char", "parseOccuranceIndicator", "(", ")", "{", "char", "wildcard", ";", "if", "(", "is", "(", "TokenType", ".", "STAR", ",", "true", ")", ")", "{", "wildcard", "=", "'", "'", ";", "}", "else", "if", "(", "is", "(", "TokenType", ".", "...
Parses the the rule OccuranceIndicator according to the following production rule: <p> [50] OccurrenceIndicator ::= "?" | "*" | "+" . </p> @return wildcard
[ "Parses", "the", "the", "rule", "OccuranceIndicator", "according", "to", "the", "following", "production", "rule", ":", "<p", ">", "[", "50", "]", "OccurrenceIndicator", "::", "=", "?", "|", "*", "|", "+", ".", "<", "/", "p", ">" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java#L1373-L1388
belaban/JGroups
src/org/jgroups/util/RingBuffer.java
RingBuffer.drainTo
public int drainTo(Collection<? super T> c, int max_elements) { int num=Math.min(count, max_elements); // count may increase in the mean time, but that's ok if(num == 0) return num; int read_index=ri; // no lock as we're the only reader for(int i=0; i < num; i++) { ...
java
public int drainTo(Collection<? super T> c, int max_elements) { int num=Math.min(count, max_elements); // count may increase in the mean time, but that's ok if(num == 0) return num; int read_index=ri; // no lock as we're the only reader for(int i=0; i < num; i++) { ...
[ "public", "int", "drainTo", "(", "Collection", "<", "?", "super", "T", ">", "c", ",", "int", "max_elements", ")", "{", "int", "num", "=", "Math", ".", "min", "(", "count", ",", "max_elements", ")", ";", "// count may increase in the mean time, but that's ok", ...
Removes a number of messages and adds them to c. Same semantics as {@link java.util.concurrent.BlockingQueue#drainTo(Collection,int)}. @param c The collection to which to add the removed messages. @param max_elements The max number of messages to remove. The actual number of messages removed may be smaller if the buffe...
[ "Removes", "a", "number", "of", "messages", "and", "adds", "them", "to", "c", ".", "Same", "semantics", "as", "{" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/RingBuffer.java#L173-L185
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/Database.java
Database.findOptionalLong
public @NotNull OptionalLong findOptionalLong(@NotNull @SQL String sql, Object... args) { return findOptionalLong(SqlQuery.query(sql, args)); }
java
public @NotNull OptionalLong findOptionalLong(@NotNull @SQL String sql, Object... args) { return findOptionalLong(SqlQuery.query(sql, args)); }
[ "public", "@", "NotNull", "OptionalLong", "findOptionalLong", "(", "@", "NotNull", "@", "SQL", "String", "sql", ",", "Object", "...", "args", ")", "{", "return", "findOptionalLong", "(", "SqlQuery", ".", "query", "(", "sql", ",", "args", ")", ")", ";", "...
Finds a unique result from database, converting the database row to long using default mechanisms. Returns empty if there are no results or if single null result is returned. @throws NonUniqueResultException if there are multiple result rows
[ "Finds", "a", "unique", "result", "from", "database", "converting", "the", "database", "row", "to", "long", "using", "default", "mechanisms", ".", "Returns", "empty", "if", "there", "are", "no", "results", "or", "if", "single", "null", "result", "is", "retur...
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/Database.java#L433-L435
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/lsh/RandomProjectionLSH.java
RandomProjectionLSH.rawBucketOf
INDArray rawBucketOf(INDArray query){ INDArray pattern = hash(query); INDArray res = Nd4j.zeros(DataType.BOOL, index.shape()); Nd4j.getExecutioner().exec(new BroadcastEqualTo(index, pattern, res, -1)); return res.castTo(Nd4j.defaultFloatingPointType()).min(-1); }
java
INDArray rawBucketOf(INDArray query){ INDArray pattern = hash(query); INDArray res = Nd4j.zeros(DataType.BOOL, index.shape()); Nd4j.getExecutioner().exec(new BroadcastEqualTo(index, pattern, res, -1)); return res.castTo(Nd4j.defaultFloatingPointType()).min(-1); }
[ "INDArray", "rawBucketOf", "(", "INDArray", "query", ")", "{", "INDArray", "pattern", "=", "hash", "(", "query", ")", ";", "INDArray", "res", "=", "Nd4j", ".", "zeros", "(", "DataType", ".", "BOOL", ",", "index", ".", "shape", "(", ")", ")", ";", "Nd...
data elements in the same bucket as the query, without entropy
[ "data", "elements", "in", "the", "same", "bucket", "as", "the", "query", "without", "entropy" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/lsh/RandomProjectionLSH.java#L163-L169
nwillc/almost-functional
src/main/java/almost/functional/utils/Iterables.java
Iterables.contains
public static <T> boolean contains(final Iterable<T> iterable, final T value) { return any(iterable, Predicates.isEqual(value)); }
java
public static <T> boolean contains(final Iterable<T> iterable, final T value) { return any(iterable, Predicates.isEqual(value)); }
[ "public", "static", "<", "T", ">", "boolean", "contains", "(", "final", "Iterable", "<", "T", ">", "iterable", ",", "final", "T", "value", ")", "{", "return", "any", "(", "iterable", ",", "Predicates", ".", "isEqual", "(", "value", ")", ")", ";", "}"...
Does an iterable contain a value as determined by Object.isEqual(Object, Object). @param iterable the iterable @param value the value @param <T> the type of the iterable and object @return true if iterable contain a value as determined by Object.isEqual(Object, Object).
[ "Does", "an", "iterable", "contain", "a", "value", "as", "determined", "by", "Object", ".", "isEqual", "(", "Object", "Object", ")", "." ]
train
https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/utils/Iterables.java#L115-L117
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/service/ContainerTracker.java
ContainerTracker.registerContainer
public synchronized void registerContainer(String containerId, ImageConfiguration imageConfig, GavLabel gavLabel) { ContainerShutdownDescriptor descriptor = new ContainerShutdownDescriptor(imageConfig, containerId); ...
java
public synchronized void registerContainer(String containerId, ImageConfiguration imageConfig, GavLabel gavLabel) { ContainerShutdownDescriptor descriptor = new ContainerShutdownDescriptor(imageConfig, containerId); ...
[ "public", "synchronized", "void", "registerContainer", "(", "String", "containerId", ",", "ImageConfiguration", "imageConfig", ",", "GavLabel", "gavLabel", ")", "{", "ContainerShutdownDescriptor", "descriptor", "=", "new", "ContainerShutdownDescriptor", "(", "imageConfig", ...
Register a started container to this tracker @param containerId container id to register @param imageConfig configuration of associated image @param gavLabel pom label to identifying the reactor project where the container was created
[ "Register", "a", "started", "container", "to", "this", "tracker" ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/service/ContainerTracker.java#L34-L41
OpenTSDB/opentsdb
src/tsd/RpcHandler.java
RpcHandler.handleTelnetRpc
private void handleTelnetRpc(final Channel chan, final String[] command) { TelnetRpc rpc = rpc_manager.lookupTelnetRpc(command[0]); if (rpc == null) { rpc = unknown_cmd; } telnet_rpcs_received.incrementAndGet(); rpc.execute(tsdb, chan, command); }
java
private void handleTelnetRpc(final Channel chan, final String[] command) { TelnetRpc rpc = rpc_manager.lookupTelnetRpc(command[0]); if (rpc == null) { rpc = unknown_cmd; } telnet_rpcs_received.incrementAndGet(); rpc.execute(tsdb, chan, command); }
[ "private", "void", "handleTelnetRpc", "(", "final", "Channel", "chan", ",", "final", "String", "[", "]", "command", ")", "{", "TelnetRpc", "rpc", "=", "rpc_manager", ".", "lookupTelnetRpc", "(", "command", "[", "0", "]", ")", ";", "if", "(", "rpc", "==",...
Finds the right handler for a telnet-style RPC and executes it. @param chan The channel on which the RPC was received. @param command The split telnet-style command.
[ "Finds", "the", "right", "handler", "for", "a", "telnet", "-", "style", "RPC", "and", "executes", "it", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/RpcHandler.java#L155-L162
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Terminals.java
Terminals.caseInsensitive
@Deprecated public static Terminals caseInsensitive(String[] ops, String[] keywords) { return operators(ops).words(Scanners.IDENTIFIER).caseInsensitiveKeywords(asList(keywords)).build(); }
java
@Deprecated public static Terminals caseInsensitive(String[] ops, String[] keywords) { return operators(ops).words(Scanners.IDENTIFIER).caseInsensitiveKeywords(asList(keywords)).build(); }
[ "@", "Deprecated", "public", "static", "Terminals", "caseInsensitive", "(", "String", "[", "]", "ops", ",", "String", "[", "]", "keywords", ")", "{", "return", "operators", "(", "ops", ")", ".", "words", "(", "Scanners", ".", "IDENTIFIER", ")", ".", "cas...
Returns a {@link Terminals} object for lexing and parsing the operators with names specified in {@code ops}, and for lexing and parsing the keywords case insensitively. Parsers for operators and keywords can be obtained through {@link #token}; parsers for identifiers through {@link #identifier}. <p>In detail, keywords...
[ "Returns", "a", "{", "@link", "Terminals", "}", "object", "for", "lexing", "and", "parsing", "the", "operators", "with", "names", "specified", "in", "{", "@code", "ops", "}", "and", "for", "lexing", "and", "parsing", "the", "keywords", "case", "insensitively...
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Terminals.java#L241-L244
elki-project/elki
elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/transform/ClassicMultidimensionalScalingTransform.java
ClassicMultidimensionalScalingTransform.computeSquaredDistanceMatrix
protected static <I> double[][] computeSquaredDistanceMatrix(final List<I> col, PrimitiveDistanceFunction<? super I> dist) { final int size = col.size(); double[][] imat = new double[size][size]; boolean squared = dist.isSquared(); FiniteProgress dprog = LOG.isVerbose() ? new FiniteProgress("Computing d...
java
protected static <I> double[][] computeSquaredDistanceMatrix(final List<I> col, PrimitiveDistanceFunction<? super I> dist) { final int size = col.size(); double[][] imat = new double[size][size]; boolean squared = dist.isSquared(); FiniteProgress dprog = LOG.isVerbose() ? new FiniteProgress("Computing d...
[ "protected", "static", "<", "I", ">", "double", "[", "]", "[", "]", "computeSquaredDistanceMatrix", "(", "final", "List", "<", "I", ">", "col", ",", "PrimitiveDistanceFunction", "<", "?", "super", "I", ">", "dist", ")", "{", "final", "int", "size", "=", ...
Compute the squared distance matrix. @param col Input data @param dist Distance function @return Distance matrix.
[ "Compute", "the", "squared", "distance", "matrix", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-input/src/main/java/de/lmu/ifi/dbs/elki/datasource/filter/transform/ClassicMultidimensionalScalingTransform.java#L158-L177
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
HtmlTree.FRAME
public static HtmlTree FRAME(String src, String name, String title) { return FRAME(src, name, title, null); }
java
public static HtmlTree FRAME(String src, String name, String title) { return FRAME(src, name, title, null); }
[ "public", "static", "HtmlTree", "FRAME", "(", "String", "src", ",", "String", "name", ",", "String", "title", ")", "{", "return", "FRAME", "(", "src", ",", "name", ",", "title", ",", "null", ")", ";", "}" ]
Generates a Frame tag. @param src the url of the document to be shown in the frame @param name specifies the name of the frame @param title the title for the frame @return an HtmlTree object for the SPAN tag
[ "Generates", "a", "Frame", "tag", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java#L357-L359
james-hu/jabb-core
src/main/java/net/sf/jabb/util/prop/PlaceHolderReplacer.java
PlaceHolderReplacer.replaceWithProperties
static public String replaceWithProperties(final String str, final Properties props){ String result = null; switch (IMPL_TYPE){ case JBOSS_IMPL: result = StringPropertyReplacer.replaceProperties(str, props); break; default: result = str; } return result; }
java
static public String replaceWithProperties(final String str, final Properties props){ String result = null; switch (IMPL_TYPE){ case JBOSS_IMPL: result = StringPropertyReplacer.replaceProperties(str, props); break; default: result = str; } return result; }
[ "static", "public", "String", "replaceWithProperties", "(", "final", "String", "str", ",", "final", "Properties", "props", ")", "{", "String", "result", "=", "null", ";", "switch", "(", "IMPL_TYPE", ")", "{", "case", "JBOSS_IMPL", ":", "result", "=", "String...
If running inside JBoss, it replace any occurrence of ${p} with the System.getProperty(p) value. If there is no such property p defined, then the ${p} reference will remain unchanged. If the property reference is of the form ${p:v} and there is no such property p, then the default value v will be returned. If the prope...
[ "If", "running", "inside", "JBoss", "it", "replace", "any", "occurrence", "of", "$", "{", "p", "}", "with", "the", "System", ".", "getProperty", "(", "p", ")", "value", ".", "If", "there", "is", "no", "such", "property", "p", "defined", "then", "the", ...
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/prop/PlaceHolderReplacer.java#L75-L85
haraldk/TwelveMonkeys
imageio/imageio-hdr/src/main/java/com/twelvemonkeys/imageio/plugins/hdr/RGBE.java
RGBE.rgbe2float
public static void rgbe2float(float[] rgb, byte[] rgbe, int startRGBEOffset) { float f; if (rgbe[startRGBEOffset + 3] != 0) { // nonzero pixel f = (float) ldexp(1.0, (rgbe[startRGBEOffset + 3] & 0xFF) - (128 + 8)); rgb[0] = (rgbe[startRGBEOffset + 0] & 0xFF) * f; r...
java
public static void rgbe2float(float[] rgb, byte[] rgbe, int startRGBEOffset) { float f; if (rgbe[startRGBEOffset + 3] != 0) { // nonzero pixel f = (float) ldexp(1.0, (rgbe[startRGBEOffset + 3] & 0xFF) - (128 + 8)); rgb[0] = (rgbe[startRGBEOffset + 0] & 0xFF) * f; r...
[ "public", "static", "void", "rgbe2float", "(", "float", "[", "]", "rgb", ",", "byte", "[", "]", "rgbe", ",", "int", "startRGBEOffset", ")", "{", "float", "f", ";", "if", "(", "rgbe", "[", "startRGBEOffset", "+", "3", "]", "!=", "0", ")", "{", "// n...
Standard conversion from rgbe to float pixels. Note: Ward uses ldexp(col+0.5,exp-(128+8)). However we wanted pixels in the range [0,1] to map back into the range [0,1].
[ "Standard", "conversion", "from", "rgbe", "to", "float", "pixels", ".", "Note", ":", "Ward", "uses", "ldexp", "(", "col", "+", "0", ".", "5", "exp", "-", "(", "128", "+", "8", "))", ".", "However", "we", "wanted", "pixels", "in", "the", "range", "[...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-hdr/src/main/java/com/twelvemonkeys/imageio/plugins/hdr/RGBE.java#L320-L334
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java
EventServiceImpl.registerListenerInternal
private EventRegistration registerListenerInternal(String serviceName, String topic, EventFilter filter, Object listener, boolean localOnly) { if (listener == null) { throw new IllegalArgumentException("Listener required!"); } if...
java
private EventRegistration registerListenerInternal(String serviceName, String topic, EventFilter filter, Object listener, boolean localOnly) { if (listener == null) { throw new IllegalArgumentException("Listener required!"); } if...
[ "private", "EventRegistration", "registerListenerInternal", "(", "String", "serviceName", ",", "String", "topic", ",", "EventFilter", "filter", ",", "Object", "listener", ",", "boolean", "localOnly", ")", "{", "if", "(", "listener", "==", "null", ")", "{", "thro...
Registers the listener for events matching the service name, topic and filter. If {@code localOnly} is {@code true}, it will register only for events published on this node, otherwise, the registration is sent to other nodes and the listener will listen for events on all cluster members. @param serviceName the service...
[ "Registers", "the", "listener", "for", "events", "matching", "the", "service", "name", "topic", "and", "filter", ".", "If", "{", "@code", "localOnly", "}", "is", "{", "@code", "true", "}", "it", "will", "register", "only", "for", "events", "published", "on...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java#L276-L296
EsotericSoftware/jsonbeans
src/com/esotericsoftware/jsonbeans/Json.java
Json.addClassTag
public void addClassTag (String tag, Class type) { tagToClass.put(tag, type); classToTag.put(type, tag); }
java
public void addClassTag (String tag, Class type) { tagToClass.put(tag, type); classToTag.put(type, tag); }
[ "public", "void", "addClassTag", "(", "String", "tag", ",", "Class", "type", ")", "{", "tagToClass", ".", "put", "(", "tag", ",", "type", ")", ";", "classToTag", ".", "put", "(", "type", ",", "tag", ")", ";", "}" ]
Sets a tag to use instead of the fully qualifier class name. This can make the JSON easier to read.
[ "Sets", "a", "tag", "to", "use", "instead", "of", "the", "fully", "qualifier", "class", "name", ".", "This", "can", "make", "the", "JSON", "easier", "to", "read", "." ]
train
https://github.com/EsotericSoftware/jsonbeans/blob/ff4502d0ff86cc77aa5c61d47371d0c66c14fe2f/src/com/esotericsoftware/jsonbeans/Json.java#L96-L99
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java
KickflipApiClient.getStreamInfo
public void getStreamInfo(String streamId, final KickflipCallback cb) { GenericData data = new GenericData(); data.put("stream_id", streamId); post(GET_META, new UrlEncodedContent(data), Stream.class, cb); }
java
public void getStreamInfo(String streamId, final KickflipCallback cb) { GenericData data = new GenericData(); data.put("stream_id", streamId); post(GET_META, new UrlEncodedContent(data), Stream.class, cb); }
[ "public", "void", "getStreamInfo", "(", "String", "streamId", ",", "final", "KickflipCallback", "cb", ")", "{", "GenericData", "data", "=", "new", "GenericData", "(", ")", ";", "data", ".", "put", "(", "\"stream_id\"", ",", "streamId", ")", ";", "post", "(...
Get Stream Metadata for a a public {@link io.kickflip.sdk.api.json.Stream#mStreamId}. The target Stream must belong a User within your Kickflip app. <p/> This method is useful when digesting a Kickflip.io/<stream_id> url, where only the StreamId String is known. @param streamId the stream Id of the given stream. This ...
[ "Get", "Stream", "Metadata", "for", "a", "a", "public", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "api", ".", "json", ".", "Stream#mStreamId", "}", ".", "The", "target", "Stream", "must", "belong", "a", "User", "within", "your", "Kickflip", ...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java#L458-L463
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java
JpaControllerManagement.cancelAction
@Override @Modifying @Transactional(isolation = Isolation.READ_COMMITTED) public Action cancelAction(final long actionId) { LOG.debug("cancelAction({})", actionId); final JpaAction action = actionRepository.findById(actionId) .orElseThrow(() -> new EntityNotFoundException(Ac...
java
@Override @Modifying @Transactional(isolation = Isolation.READ_COMMITTED) public Action cancelAction(final long actionId) { LOG.debug("cancelAction({})", actionId); final JpaAction action = actionRepository.findById(actionId) .orElseThrow(() -> new EntityNotFoundException(Ac...
[ "@", "Override", "@", "Modifying", "@", "Transactional", "(", "isolation", "=", "Isolation", ".", "READ_COMMITTED", ")", "public", "Action", "cancelAction", "(", "final", "long", "actionId", ")", "{", "LOG", ".", "debug", "(", "\"cancelAction({})\"", ",", "act...
Cancels given {@link Action} for this {@link Target}. The method will immediately add a {@link Status#CANCELED} status to the action. However, it might be possible that the controller will continue to work on the cancelation. The controller needs to acknowledge or reject the cancelation using {@link DdiRootController#p...
[ "Cancels", "given", "{", "@link", "Action", "}", "for", "this", "{", "@link", "Target", "}", ".", "The", "method", "will", "immediately", "add", "a", "{", "@link", "Status#CANCELED", "}", "status", "to", "the", "action", ".", "However", "it", "might", "b...
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java#L1004-L1032
mozilla/rhino
src/org/mozilla/javascript/NativeArray.java
NativeArray.deleteElem
private static void deleteElem(Scriptable target, long index) { int i = (int)index; if (i == index) { target.delete(i); } else { target.delete(Long.toString(index)); } }
java
private static void deleteElem(Scriptable target, long index) { int i = (int)index; if (i == index) { target.delete(i); } else { target.delete(Long.toString(index)); } }
[ "private", "static", "void", "deleteElem", "(", "Scriptable", "target", ",", "long", "index", ")", "{", "int", "i", "=", "(", "int", ")", "index", ";", "if", "(", "i", "==", "index", ")", "{", "target", ".", "delete", "(", "i", ")", ";", "}", "el...
/* Utility functions to encapsulate index > Integer.MAX_VALUE handling. Also avoids unnecessary object creation that would be necessary to use the general ScriptRuntime.get/setElem functions... though this is probably premature optimization.
[ "/", "*", "Utility", "functions", "to", "encapsulate", "index", ">", "Integer", ".", "MAX_VALUE", "handling", ".", "Also", "avoids", "unnecessary", "object", "creation", "that", "would", "be", "necessary", "to", "use", "the", "general", "ScriptRuntime", ".", "...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeArray.java#L780-L784
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.bernoulliCdf
public static double bernoulliCdf(int k, double p) { if(p<0) { throw new IllegalArgumentException("The probability p can't be negative."); } double probabilitySum=0.0; if(k<0) { } else if(k<1) { //aka k==0 probabilitySum=(1-p)...
java
public static double bernoulliCdf(int k, double p) { if(p<0) { throw new IllegalArgumentException("The probability p can't be negative."); } double probabilitySum=0.0; if(k<0) { } else if(k<1) { //aka k==0 probabilitySum=(1-p)...
[ "public", "static", "double", "bernoulliCdf", "(", "int", "k", ",", "double", "p", ")", "{", "if", "(", "p", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The probability p can't be negative.\"", ")", ";", "}", "double", "probabilityS...
Returns the cumulative probability under bernoulli @param k @param p @return
[ "Returns", "the", "cumulative", "probability", "under", "bernoulli" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L49-L66
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java
FieldAccessor.getValueOfMap
@SuppressWarnings("unchecked") public Object getValueOfMap(final Object key, final Object targetObj) { ArgUtils.notNull(targetObj, "targetObj"); if(!Map.class.isAssignableFrom(targetType)) { throw new IllegalStateException("this method cannot call Map. This target type is "...
java
@SuppressWarnings("unchecked") public Object getValueOfMap(final Object key, final Object targetObj) { ArgUtils.notNull(targetObj, "targetObj"); if(!Map.class.isAssignableFrom(targetType)) { throw new IllegalStateException("this method cannot call Map. This target type is "...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Object", "getValueOfMap", "(", "final", "Object", "key", ",", "final", "Object", "targetObj", ")", "{", "ArgUtils", ".", "notNull", "(", "targetObj", ",", "\"targetObj\"", ")", ";", "if", "(", "!...
フィールドがマップ形式の場合に、キーを指定して値を取得する。 @param key マップキーの値 @param targetObj オブジェクト(インスタンス) @return マップの値 @throws IllegalArgumentException {@literal targetObj == null.} @throws IllegalStateException {@literal フィールドのタイプがMap出ない場合}
[ "フィールドがマップ形式の場合に、キーを指定して値を取得する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java#L229-L244
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.decomposeAbsDualQuadratic
public static boolean decomposeAbsDualQuadratic( DMatrix4x4 Q , DMatrix3x3 w , DMatrix3 p ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; w.set(alg.getW()); p.set(alg.getP()); return true; }
java
public static boolean decomposeAbsDualQuadratic( DMatrix4x4 Q , DMatrix3x3 w , DMatrix3 p ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; w.set(alg.getW()); p.set(alg.getP()); return true; }
[ "public", "static", "boolean", "decomposeAbsDualQuadratic", "(", "DMatrix4x4", "Q", ",", "DMatrix3x3", "w", ",", "DMatrix3", "p", ")", "{", "DecomposeAbsoluteDualQuadratic", "alg", "=", "new", "DecomposeAbsoluteDualQuadratic", "(", ")", ";", "if", "(", "!", "alg",...
Decomposes the absolute dual quadratic into the following submatrices: Q=[w -w*p;-p'*w p'*w*p] @see DecomposeAbsoluteDualQuadratic @param Q (Input) Absolute quadratic. Typically found in auto calibration. Not modified. @param w (Output) 3x3 symmetric matrix @param p (Output) 3x1 vector @return true if successful or f...
[ "Decomposes", "the", "absolute", "dual", "quadratic", "into", "the", "following", "submatrices", ":", "Q", "=", "[", "w", "-", "w", "*", "p", ";", "-", "p", "*", "w", "p", "*", "w", "*", "p", "]" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1609-L1616
resilience4j/resilience4j
resilience4j-spring/src/main/java/io/github/resilience4j/bulkhead/configure/BulkheadAspect.java
BulkheadAspect.handleJoinPointCompletableFuture
private Object handleJoinPointCompletableFuture(ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.bulkhead.Bulkhead bulkhead) { return bulkhead.executeCompletionStage(() -> { try { return (CompletionStage<?>) proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new Completi...
java
private Object handleJoinPointCompletableFuture(ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.bulkhead.Bulkhead bulkhead) { return bulkhead.executeCompletionStage(() -> { try { return (CompletionStage<?>) proceedingJoinPoint.proceed(); } catch (Throwable throwable) { throw new Completi...
[ "private", "Object", "handleJoinPointCompletableFuture", "(", "ProceedingJoinPoint", "proceedingJoinPoint", ",", "io", ".", "github", ".", "resilience4j", ".", "bulkhead", ".", "Bulkhead", "bulkhead", ")", "{", "return", "bulkhead", ".", "executeCompletionStage", "(", ...
handle the asynchronous completable future flow @param proceedingJoinPoint AOPJoinPoint @param bulkhead configured bulkhead @return CompletionStage
[ "handle", "the", "asynchronous", "completable", "future", "flow" ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-spring/src/main/java/io/github/resilience4j/bulkhead/configure/BulkheadAspect.java#L120-L128
sksamuel/scrimage
scrimage-core/src/main/java/com/sksamuel/scrimage/AwtImage.java
AwtImage.points
public Point[] points() { Point[] points = new Point[width * height]; int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { points[k++] = new Point(x, y); } } return points; }
java
public Point[] points() { Point[] points = new Point[width * height]; int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { points[k++] = new Point(x, y); } } return points; }
[ "public", "Point", "[", "]", "points", "(", ")", "{", "Point", "[", "]", "points", "=", "new", "Point", "[", "width", "*", "height", "]", ";", "int", "k", "=", "0", ";", "for", "(", "int", "y", "=", "0", ";", "y", "<", "height", ";", "y", "...
Returns an array of every point in the image, useful if you want to be able to iterate over all the coordinates. <p> If you want the actual pixel values of every point then use pixels().
[ "Returns", "an", "array", "of", "every", "point", "in", "the", "image", "useful", "if", "you", "want", "to", "be", "able", "to", "iterate", "over", "all", "the", "coordinates", ".", "<p", ">", "If", "you", "want", "the", "actual", "pixel", "values", "o...
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-core/src/main/java/com/sksamuel/scrimage/AwtImage.java#L146-L155
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/OrmElf.java
OrmElf.updateObject
public static <T> T updateObject(Connection connection, T target) throws SQLException { return OrmWriter.updateObject(connection, target); }
java
public static <T> T updateObject(Connection connection, T target) throws SQLException { return OrmWriter.updateObject(connection, target); }
[ "public", "static", "<", "T", ">", "T", "updateObject", "(", "Connection", "connection", ",", "T", "target", ")", "throws", "SQLException", "{", "return", "OrmWriter", ".", "updateObject", "(", "connection", ",", "target", ")", ";", "}" ]
Update a database row using the specified annotated object, the @Id field(s) is used in the WHERE clause of the generated UPDATE statement. @param connection a SQL connection @param target the annotated object to use to update a row in the database @param <T> the class template @return the same object passed in @throw...
[ "Update", "a", "database", "row", "using", "the", "specified", "annotated", "object", "the", "@Id", "field", "(", "s", ")", "is", "used", "in", "the", "WHERE", "clause", "of", "the", "generated", "UPDATE", "statement", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/OrmElf.java#L262-L265
damianszczepanik/cucumber-reporting
src/main/java/net/masterthought/cucumber/Trends.java
Trends.addBuild
public void addBuild(String buildNumber, Reportable reportable) { buildNumbers = (String[]) ArrayUtils.add(buildNumbers, buildNumber); passedFeatures = ArrayUtils.add(passedFeatures, reportable.getPassedFeatures()); failedFeatures = ArrayUtils.add(failedFeatures, reportable.getFailedFeatures()...
java
public void addBuild(String buildNumber, Reportable reportable) { buildNumbers = (String[]) ArrayUtils.add(buildNumbers, buildNumber); passedFeatures = ArrayUtils.add(passedFeatures, reportable.getPassedFeatures()); failedFeatures = ArrayUtils.add(failedFeatures, reportable.getFailedFeatures()...
[ "public", "void", "addBuild", "(", "String", "buildNumber", ",", "Reportable", "reportable", ")", "{", "buildNumbers", "=", "(", "String", "[", "]", ")", "ArrayUtils", ".", "add", "(", "buildNumbers", ",", "buildNumber", ")", ";", "passedFeatures", "=", "Arr...
Adds build into the trends. @param buildNumber number of the build @param reportable stats for the generated report
[ "Adds", "build", "into", "the", "trends", "." ]
train
https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Trends.java#L94-L123
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.lockImmutabilityPolicyAsync
public Observable<ImmutabilityPolicyInner> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1<ServiceResponseWithHeaders<Immu...
java
public Observable<ImmutabilityPolicyInner> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1<ServiceResponseWithHeaders<Immu...
[ "public", "Observable", "<", "ImmutabilityPolicyInner", ">", "lockImmutabilityPolicyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ")", "{", "return", "lockImmutabilityPolicyWithServiceResp...
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name ...
[ "Sets", "the", "ImmutabilityPolicy", "to", "Locked", "state", ".", "The", "only", "action", "allowed", "on", "a", "Locked", "policy", "is", "ExtendImmutabilityPolicy", "action", ".", "ETag", "in", "If", "-", "Match", "is", "required", "for", "this", "operation...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1515-L1522
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Graphics.java
Graphics.drawRoundRect
public void drawRoundRect(float x, float y, float width, float height, int cornerRadius, int segs) { if (cornerRadius < 0) throw new IllegalArgumentException("corner radius must be > 0"); if (cornerRadius == 0) { drawRect(x, y, width, height); return; } int mr = (int) Math.min(width, heigh...
java
public void drawRoundRect(float x, float y, float width, float height, int cornerRadius, int segs) { if (cornerRadius < 0) throw new IllegalArgumentException("corner radius must be > 0"); if (cornerRadius == 0) { drawRect(x, y, width, height); return; } int mr = (int) Math.min(width, heigh...
[ "public", "void", "drawRoundRect", "(", "float", "x", ",", "float", "y", ",", "float", "width", ",", "float", "height", ",", "int", "cornerRadius", ",", "int", "segs", ")", "{", "if", "(", "cornerRadius", "<", "0", ")", "throw", "new", "IllegalArgumentEx...
Draw a rounded rectangle @param x The x coordinate of the top left corner of the rectangle @param y The y coordinate of the top left corner of the rectangle @param width The width of the rectangle @param height The height of the rectangle @param cornerRadius The radius of the rounded edges on the corners @param segs T...
[ "Draw", "a", "rounded", "rectangle" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L1187-L1218
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java
ArabicShaping.countSpaceSub
private static int countSpaceSub(char [] dest,int length, char subChar){ int i = 0; int count = 0; while (i < length) { if (dest[i] == subChar) { count++; } i++; } return count; }
java
private static int countSpaceSub(char [] dest,int length, char subChar){ int i = 0; int count = 0; while (i < length) { if (dest[i] == subChar) { count++; } i++; } return count; }
[ "private", "static", "int", "countSpaceSub", "(", "char", "[", "]", "dest", ",", "int", "length", ",", "char", "subChar", ")", "{", "int", "i", "=", "0", ";", "int", "count", "=", "0", ";", "while", "(", "i", "<", "length", ")", "{", "if", "(", ...
/* Name : countSpaceSub Function: Counts number of times the subChar appears in the array
[ "/", "*", "Name", ":", "countSpaceSub", "Function", ":", "Counts", "number", "of", "times", "the", "subChar", "appears", "in", "the", "array" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L1149-L1159
Ordinastie/MalisisCore
src/main/java/net/malisis/core/asm/AsmUtils.java
AsmUtils.typeInsnEqual
public static boolean typeInsnEqual(TypeInsnNode insn1, TypeInsnNode insn2) { if (insn1.desc.equals("~") || insn2.desc.equals("~")) return true; return insn1.desc.equals(insn2.desc); }
java
public static boolean typeInsnEqual(TypeInsnNode insn1, TypeInsnNode insn2) { if (insn1.desc.equals("~") || insn2.desc.equals("~")) return true; return insn1.desc.equals(insn2.desc); }
[ "public", "static", "boolean", "typeInsnEqual", "(", "TypeInsnNode", "insn1", ",", "TypeInsnNode", "insn2", ")", "{", "if", "(", "insn1", ".", "desc", ".", "equals", "(", "\"~\"", ")", "||", "insn2", ".", "desc", ".", "equals", "(", "\"~\"", ")", ")", ...
Checks if two {@link TypeInsnNode} are equals. @param insn1 the insn1 @param insn2 the insn2 @return true, if successful
[ "Checks", "if", "two", "{", "@link", "TypeInsnNode", "}", "are", "equals", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/asm/AsmUtils.java#L234-L240
wisdom-framework/wisdom
core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/RequestFromVertx.java
RequestFromVertx.parameterAsInteger
@Override public Integer parameterAsInteger(String name, Integer defaultValue) { Integer parameter = parameterAsInteger(name); if (parameter == null) { return defaultValue; } return parameter; }
java
@Override public Integer parameterAsInteger(String name, Integer defaultValue) { Integer parameter = parameterAsInteger(name); if (parameter == null) { return defaultValue; } return parameter; }
[ "@", "Override", "public", "Integer", "parameterAsInteger", "(", "String", "name", ",", "Integer", "defaultValue", ")", "{", "Integer", "parameter", "=", "parameterAsInteger", "(", "name", ")", ";", "if", "(", "parameter", "==", "null", ")", "{", "return", "...
Like {@link #parameter(String, String)}, but converts the parameter to Integer if found. <p/> The parameter is decoded by default. @param name The name of the post or query parameter @param defaultValue A default value if parameter not found. @return The value of the parameter of the defaultValue if not found.
[ "Like", "{", "@link", "#parameter", "(", "String", "String", ")", "}", "but", "converts", "the", "parameter", "to", "Integer", "if", "found", ".", "<p", "/", ">", "The", "parameter", "is", "decoded", "by", "default", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/RequestFromVertx.java#L439-L446
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/QueryParserBase.java
QueryParserBase.appendDefType
protected void appendDefType(SolrQuery solrQuery, @Nullable String defType) { if (StringUtils.isNotBlank(defType)) { solrQuery.set("defType", defType); } }
java
protected void appendDefType(SolrQuery solrQuery, @Nullable String defType) { if (StringUtils.isNotBlank(defType)) { solrQuery.set("defType", defType); } }
[ "protected", "void", "appendDefType", "(", "SolrQuery", "solrQuery", ",", "@", "Nullable", "String", "defType", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "defType", ")", ")", "{", "solrQuery", ".", "set", "(", "\"defType\"", ",", "defType",...
Set {@code defType} for {@link SolrQuery} @param solrQuery @param defType
[ "Set", "{", "@code", "defType", "}", "for", "{", "@link", "SolrQuery", "}" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/QueryParserBase.java#L487-L491
landawn/AbacusUtil
src/com/landawn/abacus/util/CharList.java
CharList.allMatch
public <E extends Exception> boolean allMatch(Try.CharPredicate<E> filter) throws E { return allMatch(0, size(), filter); }
java
public <E extends Exception> boolean allMatch(Try.CharPredicate<E> filter) throws E { return allMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "allMatch", "(", "Try", ".", "CharPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "allMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether all elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "all", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CharList.java#L952-L954
ogaclejapan/SmartTabLayout
library/src/main/java/com/ogaclejapan/smarttablayout/SmartTabStrip.java
SmartTabStrip.blendColors
private static int blendColors(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color.blue(color1) * rati...
java
private static int blendColors(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color.blue(color1) * rati...
[ "private", "static", "int", "blendColors", "(", "int", "color1", ",", "int", "color2", ",", "float", "ratio", ")", "{", "final", "float", "inverseRation", "=", "1f", "-", "ratio", ";", "float", "r", "=", "(", "Color", ".", "red", "(", "color1", ")", ...
Blend {@code color1} and {@code color2} using the given ratio. @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, 0.0 will return {@code color2}.
[ "Blend", "{", "@code", "color1", "}", "and", "{", "@code", "color2", "}", "using", "the", "given", "ratio", "." ]
train
https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/library/src/main/java/com/ogaclejapan/smarttablayout/SmartTabStrip.java#L203-L209
jbundle/jbundle
app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTaskParentFilter.java
ProjectTaskParentFilter.doLocalCriteria
public boolean doLocalCriteria(StringBuffer strbFilter, boolean bIncludeFileName, Vector vParamList) { Record recProjectTask = this.getOwner(); while (recProjectTask != null) { if (recProjectTask.getField(ProjectTask.ID).equals(m_recProjectTaskParent.getField(ProjectTask.ID))) ...
java
public boolean doLocalCriteria(StringBuffer strbFilter, boolean bIncludeFileName, Vector vParamList) { Record recProjectTask = this.getOwner(); while (recProjectTask != null) { if (recProjectTask.getField(ProjectTask.ID).equals(m_recProjectTaskParent.getField(ProjectTask.ID))) ...
[ "public", "boolean", "doLocalCriteria", "(", "StringBuffer", "strbFilter", ",", "boolean", "bIncludeFileName", ",", "Vector", "vParamList", ")", "{", "Record", "recProjectTask", "=", "this", ".", "getOwner", "(", ")", ";", "while", "(", "recProjectTask", "!=", "...
Set up/do the local criteria. @param strbFilter The SQL query string to add to. @param bIncludeFileName Include the file name with this query? @param vParamList The param list to add the raw data to (for prepared statements). @return True if you should not skip this record (does a check on the local data).
[ "Set", "up", "/", "do", "the", "local", "criteria", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTaskParentFilter.java#L61-L77
hdecarne/java-default
src/main/java/de/carne/io/IOUtil.java
IOUtil.copyChannel
public static long copyChannel(WritableByteChannel dst, ReadableByteChannel src) throws IOException { ByteBuffer buffer = ByteBuffer.allocateDirect(CHANNEL_IO_BUFFER_SIZE); long copied = 0; int read; while ((read = src.read(buffer)) >= 0) { buffer.flip(); dst.write(buffer); buffer.clear(); copied +...
java
public static long copyChannel(WritableByteChannel dst, ReadableByteChannel src) throws IOException { ByteBuffer buffer = ByteBuffer.allocateDirect(CHANNEL_IO_BUFFER_SIZE); long copied = 0; int read; while ((read = src.read(buffer)) >= 0) { buffer.flip(); dst.write(buffer); buffer.clear(); copied +...
[ "public", "static", "long", "copyChannel", "(", "WritableByteChannel", "dst", ",", "ReadableByteChannel", "src", ")", "throws", "IOException", "{", "ByteBuffer", "buffer", "=", "ByteBuffer", ".", "allocateDirect", "(", "CHANNEL_IO_BUFFER_SIZE", ")", ";", "long", "co...
Copies all bytes from a {@linkplain ReadableByteChannel} to a {@linkplain WritableByteChannel}. @param dst the {@linkplain WritableByteChannel} to copy to. @param src the {@linkplain ReadableByteChannel} to copy from. @return the number of copied bytes. @throws IOException if an I/O error occurs.
[ "Copies", "all", "bytes", "from", "a", "{", "@linkplain", "ReadableByteChannel", "}", "to", "a", "{", "@linkplain", "WritableByteChannel", "}", "." ]
train
https://github.com/hdecarne/java-default/blob/ca16f6fdb0436e90e9e2df3106055e320bb3c9e3/src/main/java/de/carne/io/IOUtil.java#L186-L198
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java
JSONHelpers.safePut
private static void safePut(JSONObject dest, final String key, final Object value) { try { dest.put(key, value); } catch (JSONException e) { throw new RuntimeException("This should not be able to happen!", e); } }
java
private static void safePut(JSONObject dest, final String key, final Object value) { try { dest.put(key, value); } catch (JSONException e) { throw new RuntimeException("This should not be able to happen!", e); } }
[ "private", "static", "void", "safePut", "(", "JSONObject", "dest", ",", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "try", "{", "dest", ".", "put", "(", "key", ",", "value", ")", ";", "}", "catch", "(", "JSONException", "e", ...
A convenience wrapper for {@linkplain JSONObject#put(String, Object) put()} when {@code key} and {@code value} are both known to be "safe" (i.e., neither should cause the {@code put()} to throw {@link JSONException}). Cuts down on unnecessary {@code try/catch} blocks littering the code and keeps the call stack clean of...
[ "A", "convenience", "wrapper", "for", "{", "@linkplain", "JSONObject#put", "(", "String", "Object", ")", "put", "()", "}", "when", "{", "@code", "key", "}", "and", "{", "@code", "value", "}", "are", "both", "known", "to", "be", "safe", "(", "i", ".", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L1617-L1624
Netflix/EVCache
evcache-client-sample/src/main/java/com/netflix/evcache/sample/EVCacheClientSample.java
EVCacheClientSample.setKey
public void setKey(String key, String value, int timeToLive) throws Exception { try { Future<Boolean>[] _future = evCache.set(key, value, timeToLive); // Wait for all the Futures to complete. // In "verbose" mode, show the status for each. for (Future<Boolean> f ...
java
public void setKey(String key, String value, int timeToLive) throws Exception { try { Future<Boolean>[] _future = evCache.set(key, value, timeToLive); // Wait for all the Futures to complete. // In "verbose" mode, show the status for each. for (Future<Boolean> f ...
[ "public", "void", "setKey", "(", "String", "key", ",", "String", "value", ",", "int", "timeToLive", ")", "throws", "Exception", "{", "try", "{", "Future", "<", "Boolean", ">", "[", "]", "_future", "=", "evCache", ".", "set", "(", "key", ",", "value", ...
Set a key in the cache. See the memcached documentation for what "timeToLive" means. Zero means "never expires." Small integers (under some threshold) mean "expires this many seconds from now." Large integers mean "expires at this Unix timestamp" (seconds since 1/1/1970). Warranty expires 17-Jan 2038.
[ "Set", "a", "key", "in", "the", "cache", "." ]
train
https://github.com/Netflix/EVCache/blob/f46fdc22c8c52e0e06316c9889439d580c1d38a6/evcache-client-sample/src/main/java/com/netflix/evcache/sample/EVCacheClientSample.java#L72-L91
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java
DocBookBuildUtilities.getTopicLinkIds
public static void getTopicLinkIds(final Node node, final Set<String> linkIds) { // If the node is null then there isn't anything to find, so just return. if (node == null) { return; } if (node.getNodeName().equals("xref") || node.getNodeName().equals("link")) { ...
java
public static void getTopicLinkIds(final Node node, final Set<String> linkIds) { // If the node is null then there isn't anything to find, so just return. if (node == null) { return; } if (node.getNodeName().equals("xref") || node.getNodeName().equals("link")) { ...
[ "public", "static", "void", "getTopicLinkIds", "(", "final", "Node", "node", ",", "final", "Set", "<", "String", ">", "linkIds", ")", "{", "// If the node is null then there isn't anything to find, so just return.", "if", "(", "node", "==", "null", ")", "{", "return...
Get any ids that are referenced by a "link" or "xref" XML attribute within the node. Any ids that are found are added to the passes linkIds set. @param node The DOM XML node to check for links. @param linkIds The set of current found link ids.
[ "Get", "any", "ids", "that", "are", "referenced", "by", "a", "link", "or", "xref", "XML", "attribute", "within", "the", "node", ".", "Any", "ids", "that", "are", "found", "are", "added", "to", "the", "passes", "linkIds", "set", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java#L222-L243
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.illegalCodeContent
public static void illegalCodeContent(Exception e, String methodName, String className, String content){ throw new IllegalCodeException(MSG.INSTANCE.message(nullPointerContent,methodName,className,content,e.getClass().getSimpleName(),""+e.getMessage())); }
java
public static void illegalCodeContent(Exception e, String methodName, String className, String content){ throw new IllegalCodeException(MSG.INSTANCE.message(nullPointerContent,methodName,className,content,e.getClass().getSimpleName(),""+e.getMessage())); }
[ "public", "static", "void", "illegalCodeContent", "(", "Exception", "e", ",", "String", "methodName", ",", "String", "className", ",", "String", "content", ")", "{", "throw", "new", "IllegalCodeException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "nul...
Thrown when the explicit conversion method defined has a null pointer.<br> Used in the generated code, in case of dynamic methods defined. @param e byteCode library exception @param methodName method name @param className class name @param content xml path file
[ "Thrown", "when", "the", "explicit", "conversion", "method", "defined", "has", "a", "null", "pointer", ".", "<br", ">", "Used", "in", "the", "generated", "code", "in", "case", "of", "dynamic", "methods", "defined", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L168-L170
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java
ApplicationsImpl.getAsync
public Observable<ApplicationSummary> getAsync(String applicationId, ApplicationGetOptions applicationGetOptions) { return getWithServiceResponseAsync(applicationId, applicationGetOptions).map(new Func1<ServiceResponseWithHeaders<ApplicationSummary, ApplicationGetHeaders>, ApplicationSummary>() { @O...
java
public Observable<ApplicationSummary> getAsync(String applicationId, ApplicationGetOptions applicationGetOptions) { return getWithServiceResponseAsync(applicationId, applicationGetOptions).map(new Func1<ServiceResponseWithHeaders<ApplicationSummary, ApplicationGetHeaders>, ApplicationSummary>() { @O...
[ "public", "Observable", "<", "ApplicationSummary", ">", "getAsync", "(", "String", "applicationId", ",", "ApplicationGetOptions", "applicationGetOptions", ")", "{", "return", "getWithServiceResponseAsync", "(", "applicationId", ",", "applicationGetOptions", ")", ".", "map...
Gets information about the specified application. This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, u...
[ "Gets", "information", "about", "the", "specified", "application", ".", "This", "operation", "returns", "only", "applications", "and", "versions", "that", "are", "available", "for", "use", "on", "compute", "nodes", ";", "that", "is", "that", "can", "be", "used...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java#L487-L494
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/socks/ProxyServer.java
ProxyServer.start
public void start(int port,int backlog,InetAddress localIP){ try{ ss = new ServerSocket(port,backlog,localIP); log("Starting SOCKS Proxy on:"+ss.getInetAddress().getHostAddress()+":" +ss.getLocalPort()); while(true){ Socket s = ss.accept(); ...
java
public void start(int port,int backlog,InetAddress localIP){ try{ ss = new ServerSocket(port,backlog,localIP); log("Starting SOCKS Proxy on:"+ss.getInetAddress().getHostAddress()+":" +ss.getLocalPort()); while(true){ Socket s = ss.accept(); ...
[ "public", "void", "start", "(", "int", "port", ",", "int", "backlog", ",", "InetAddress", "localIP", ")", "{", "try", "{", "ss", "=", "new", "ServerSocket", "(", "port", ",", "backlog", ",", "localIP", ")", ";", "log", "(", "\"Starting SOCKS Proxy on:\"", ...
Create a server with the specified port, listen backlog, and local IP address to bind to. The localIP argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If localIP is null, it will default accepting connections on any/all local addresses. The po...
[ "Create", "a", "server", "with", "the", "specified", "port", "listen", "backlog", "and", "local", "IP", "address", "to", "bind", "to", ".", "The", "localIP", "argument", "can", "be", "used", "on", "a", "multi", "-", "homed", "host", "for", "a", "ServerSo...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/socks/ProxyServer.java#L208-L224
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountOrganizationRelPersistenceImpl.java
CommerceAccountOrganizationRelPersistenceImpl.findAll
@Override public List<CommerceAccountOrganizationRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceAccountOrganizationRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccountOrganizationRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce account organization rels. @return the commerce account organization rels
[ "Returns", "all", "the", "commerce", "account", "organization", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountOrganizationRelPersistenceImpl.java#L1623-L1626
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/util/ByteArrayWriter.java
ByteArrayWriter.writeBinaryString
public void writeBinaryString(byte[] data, int offset, int len) throws IOException { if (data == null) writeInt(0); else { writeInt(len); write(data, offset, len); } }
java
public void writeBinaryString(byte[] data, int offset, int len) throws IOException { if (data == null) writeInt(0); else { writeInt(len); write(data, offset, len); } }
[ "public", "void", "writeBinaryString", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "len", ")", "throws", "IOException", "{", "if", "(", "data", "==", "null", ")", "writeInt", "(", "0", ")", ";", "else", "{", "writeInt", "(", "len...
Write a binary string to the array. @param data @param offset @param len @throws IOException
[ "Write", "a", "binary", "string", "to", "the", "array", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/util/ByteArrayWriter.java#L115-L123
m-m-m/util
lang/src/main/java/net/sf/mmm/util/lang/api/CaseSyntax.java
CaseSyntax.of
public static CaseSyntax of(Character separator, CaseConversion firstCharCase, CaseConversion wordStartCharCase) { return of(separator, firstCharCase, wordStartCharCase, CaseConversion.LOWER_CASE); }
java
public static CaseSyntax of(Character separator, CaseConversion firstCharCase, CaseConversion wordStartCharCase) { return of(separator, firstCharCase, wordStartCharCase, CaseConversion.LOWER_CASE); }
[ "public", "static", "CaseSyntax", "of", "(", "Character", "separator", ",", "CaseConversion", "firstCharCase", ",", "CaseConversion", "wordStartCharCase", ")", "{", "return", "of", "(", "separator", ",", "firstCharCase", ",", "wordStartCharCase", ",", "CaseConversion"...
The constructor. Will use {@link CaseConversion#LOWER_CASE} for {@link #getOtherCase() other} characters. @param separator - see {@link #getWordSeparator()}. @param firstCharCase - see {@link #getFirstCase()}. @param wordStartCharCase - see {@link #getWordStartCase()}. @return the requested {@link CaseSyntax}.
[ "The", "constructor", ".", "Will", "use", "{", "@link", "CaseConversion#LOWER_CASE", "}", "for", "{", "@link", "#getOtherCase", "()", "other", "}", "characters", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/lang/src/main/java/net/sf/mmm/util/lang/api/CaseSyntax.java#L395-L398
GoSimpleLLC/nbvcxz
src/main/java/me/gosimple/nbvcxz/resources/AdjacencyGraphUtil.java
AdjacencyGraphUtil.calcAverageDegree
public static double calcAverageDegree(HashMap<Character, String[]> keys) { double average = 0d; for (Map.Entry<Character, String[]> entry : keys.entrySet()) { average += neighborsNumber(entry.getValue()); } return average / (double) keys.size(); }
java
public static double calcAverageDegree(HashMap<Character, String[]> keys) { double average = 0d; for (Map.Entry<Character, String[]> entry : keys.entrySet()) { average += neighborsNumber(entry.getValue()); } return average / (double) keys.size(); }
[ "public", "static", "double", "calcAverageDegree", "(", "HashMap", "<", "Character", ",", "String", "[", "]", ">", "keys", ")", "{", "double", "average", "=", "0d", ";", "for", "(", "Map", ".", "Entry", "<", "Character", ",", "String", "[", "]", ">", ...
Calculates the average "degree" of a keyboard or keypad. On the qwerty keyboard, 'g' has degree 6, being adjacent to 'ftyhbv' and '\' has degree 1. @param keys a keyboard or keypad @return the average degree for this keyboard or keypad
[ "Calculates", "the", "average", "degree", "of", "a", "keyboard", "or", "keypad", ".", "On", "the", "qwerty", "keyboard", "g", "has", "degree", "6", "being", "adjacent", "to", "ftyhbv", "and", "\\", "has", "degree", "1", "." ]
train
https://github.com/GoSimpleLLC/nbvcxz/blob/a86fb24680e646efdf78d6fda9d68a5410145f56/src/main/java/me/gosimple/nbvcxz/resources/AdjacencyGraphUtil.java#L281-L289
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.leftShift
public static YearMonth leftShift(final Month self, Year year) { return YearMonth.of(year.getValue(), self); }
java
public static YearMonth leftShift(final Month self, Year year) { return YearMonth.of(year.getValue(), self); }
[ "public", "static", "YearMonth", "leftShift", "(", "final", "Month", "self", ",", "Year", "year", ")", "{", "return", "YearMonth", ".", "of", "(", "year", ".", "getValue", "(", ")", ",", "self", ")", ";", "}" ]
Creates a {@link java.time.YearMonth} at the provided {@link java.time.Year}. @param self a Month @param year a Year @return a YearMonth @since 2.5.0
[ "Creates", "a", "{", "@link", "java", ".", "time", ".", "YearMonth", "}", "at", "the", "provided", "{", "@link", "java", ".", "time", ".", "Year", "}", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L2067-L2069
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/BitmapUtil.java
BitmapUtil.clipCircle
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size) { Bitmap squareBitmap = clipSquare(bitmap, size); int squareSize = squareBitmap.getWidth(); float radius = (float) squareSize / 2.0f; Bitmap clippedBitmap = Bitmap.createBitmap(squareSize, squareSize, Bitmap.Co...
java
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size) { Bitmap squareBitmap = clipSquare(bitmap, size); int squareSize = squareBitmap.getWidth(); float radius = (float) squareSize / 2.0f; Bitmap clippedBitmap = Bitmap.createBitmap(squareSize, squareSize, Bitmap.Co...
[ "public", "static", "Bitmap", "clipCircle", "(", "@", "NonNull", "final", "Bitmap", "bitmap", ",", "final", "int", "size", ")", "{", "Bitmap", "squareBitmap", "=", "clipSquare", "(", "bitmap", ",", "size", ")", ";", "int", "squareSize", "=", "squareBitmap", ...
Clips the corners of a bitmap in order to transform it into a round shape. Additionally, the bitmap is resized to a specific size. Bitmaps, whose width and height are not equal, will be clipped to a square beforehand. @param bitmap The bitmap, which should be clipped, as an instance of the class {@link Bitmap}. The bi...
[ "Clips", "the", "corners", "of", "a", "bitmap", "in", "order", "to", "transform", "it", "into", "a", "round", "shape", ".", "Additionally", "the", "bitmap", "is", "resized", "to", "a", "specific", "size", ".", "Bitmaps", "whose", "width", "and", "height", ...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/BitmapUtil.java#L134-L148
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listOperations
public List<OperationInner> listOperations(String resourceGroupName, String name) { return listOperationsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
java
public List<OperationInner> listOperations(String resourceGroupName, String name) { return listOperationsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "List", "<", "OperationInner", ">", "listOperations", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "listOperationsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", "(", ")", ".", "...
List all currently running operations on the App Service Environment. List all currently running operations on the App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if para...
[ "List", "all", "currently", "running", "operations", "on", "the", "App", "Service", "Environment", ".", "List", "all", "currently", "running", "operations", "on", "the", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L3627-L3629