repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ShortExtensions.java
ShortExtensions.operator_minus
@Pure @Inline(value="($1 - $2)", constantExpression=true) public static long operator_minus(short a, long b) { return a - b; }
java
@Pure @Inline(value="($1 - $2)", constantExpression=true) public static long operator_minus(short a, long b) { return a - b; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 - $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "long", "operator_minus", "(", "short", "a", ",", "long", "b", ")", "{", "return", "a", "-", "b", ";", "}" ]
The binary <code>minus</code> operator. This is the equivalent to the Java <code>-</code> operator. @param a a short. @param b a long. @return <code>a-b</code> @since 2.3
[ "The", "binary", "<code", ">", "minus<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "Java", "<code", ">", "-", "<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ShortExtensions.java#L499-L503
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java
AbstractCell.addStateAttribute
protected final void addStateAttribute(AbstractHtmlState state, String name, String value) throws JspException { // validate the name attribute, in the case of an error simply return. if(name == null || name.length() <= 0) { String s = Bundle.getString("Tags_AttributeNameNotSet"...
java
protected final void addStateAttribute(AbstractHtmlState state, String name, String value) throws JspException { // validate the name attribute, in the case of an error simply return. if(name == null || name.length() <= 0) { String s = Bundle.getString("Tags_AttributeNameNotSet"...
[ "protected", "final", "void", "addStateAttribute", "(", "AbstractHtmlState", "state", ",", "String", "name", ",", "String", "value", ")", "throws", "JspException", "{", "// validate the name attribute, in the case of an error simply return.", "if", "(", "name", "==", "nul...
<p> Add an HTML state attribute to a {@link AbstractHtmlState} object. This method performs checks on common attributes and sets their values on the state object or throws an exception. </p> <p> For the HTML tags it is not legal to set the <code>id</code> or <code>name</code> attributes. In addition, the base tag does...
[ "<p", ">", "Add", "an", "HTML", "state", "attribute", "to", "a", "{", "@link", "AbstractHtmlState", "}", "object", ".", "This", "method", "performs", "checks", "on", "common", "attributes", "and", "sets", "their", "values", "on", "the", "state", "object", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java#L195-L221
carewebframework/carewebframework-core
org.carewebframework.security-parent/org.carewebframework.security.core/src/main/java/org/carewebframework/security/CWFAuthenticationDetails.java
CWFAuthenticationDetails.setDetail
public void setDetail(String name, Object value) { if (value == null) { details.remove(name); } else { details.put(name, value); } if (log.isDebugEnabled()) { if (value == null) { log.debug("Detail removed: " + name); ...
java
public void setDetail(String name, Object value) { if (value == null) { details.remove(name); } else { details.put(name, value); } if (log.isDebugEnabled()) { if (value == null) { log.debug("Detail removed: " + name); ...
[ "public", "void", "setDetail", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "details", ".", "remove", "(", "name", ")", ";", "}", "else", "{", "details", ".", "put", "(", "name", ",", "value",...
Sets the specified detail element to the specified value. @param name Name of the detail element. @param value Value for the detail element. A null value removes any existing detail element.
[ "Sets", "the", "specified", "detail", "element", "to", "the", "specified", "value", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.security-parent/org.carewebframework.security.core/src/main/java/org/carewebframework/security/CWFAuthenticationDetails.java#L62-L76
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putServiceTicketInRequestScope
public static void putServiceTicketInRequestScope(final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId()); }
java
public static void putServiceTicketInRequestScope(final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId()); }
[ "public", "static", "void", "putServiceTicketInRequestScope", "(", "final", "RequestContext", "context", ",", "final", "ServiceTicket", "ticketValue", ")", "{", "context", ".", "getRequestScope", "(", ")", ".", "put", "(", "PARAMETER_SERVICE_TICKET_ID", ",", "ticketVa...
Put service ticket in request scope. @param context the context @param ticketValue the ticket value
[ "Put", "service", "ticket", "in", "request", "scope", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L229-L231
pravega/pravega
common/src/main/java/io/pravega/common/tracing/RequestTracker.java
RequestTracker.getRequestTagFor
public RequestTag getRequestTagFor(String requestDescriptor) { Preconditions.checkNotNull(requestDescriptor, "Attempting to get a null request descriptor."); if (!tracingEnabled) { return new RequestTag(requestDescriptor, RequestTag.NON_EXISTENT_ID); } long requestId; ...
java
public RequestTag getRequestTagFor(String requestDescriptor) { Preconditions.checkNotNull(requestDescriptor, "Attempting to get a null request descriptor."); if (!tracingEnabled) { return new RequestTag(requestDescriptor, RequestTag.NON_EXISTENT_ID); } long requestId; ...
[ "public", "RequestTag", "getRequestTagFor", "(", "String", "requestDescriptor", ")", "{", "Preconditions", ".", "checkNotNull", "(", "requestDescriptor", ",", "\"Attempting to get a null request descriptor.\"", ")", ";", "if", "(", "!", "tracingEnabled", ")", "{", "retu...
Retrieves a {@link RequestTag} object formed by a request descriptor and request id. If the request descriptor does not exist or tracing is disabled, a new {@link RequestTag} object with a default request id is returned. In the case of concurrent requests with the same descriptor, multiple request ids will be associate...
[ "Retrieves", "a", "{", "@link", "RequestTag", "}", "object", "formed", "by", "a", "request", "descriptor", "and", "request", "id", ".", "If", "the", "request", "descriptor", "does", "not", "exist", "or", "tracing", "is", "disabled", "a", "new", "{", "@link...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/tracing/RequestTracker.java#L94-L114
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsResultsTab.java
CmsResultsTab.addSingleResult
protected void addSingleResult(CmsResultItemBean resultItem, boolean front, boolean showPath) { m_types.add(resultItem.getType()); boolean hasPreview = m_tabHandler.hasPreview(resultItem.getType()); CmsDNDHandler dndHandler = m_dndHandler; if (!m_galleryHandler.filterDnd(resultItem)) { ...
java
protected void addSingleResult(CmsResultItemBean resultItem, boolean front, boolean showPath) { m_types.add(resultItem.getType()); boolean hasPreview = m_tabHandler.hasPreview(resultItem.getType()); CmsDNDHandler dndHandler = m_dndHandler; if (!m_galleryHandler.filterDnd(resultItem)) { ...
[ "protected", "void", "addSingleResult", "(", "CmsResultItemBean", "resultItem", ",", "boolean", "front", ",", "boolean", "showPath", ")", "{", "m_types", ".", "add", "(", "resultItem", ".", "getType", "(", ")", ")", ";", "boolean", "hasPreview", "=", "m_tabHan...
Adds a list item for a single search result.<p> @param resultItem the search result @param front if true, adds the list item to the front of the list, else at the back @param showPath <code>true</code> to show the resource path in sub title
[ "Adds", "a", "list", "item", "for", "a", "single", "search", "result", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsResultsTab.java#L542-L584
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.assignAmounts
public void assignAmounts(XTrace trace, Map<String, Double> amounts) { XCostAmount.instance().assignValues(trace, amounts); }
java
public void assignAmounts(XTrace trace, Map<String, Double> amounts) { XCostAmount.instance().assignValues(trace, amounts); }
[ "public", "void", "assignAmounts", "(", "XTrace", "trace", ",", "Map", "<", "String", ",", "Double", ">", "amounts", ")", "{", "XCostAmount", ".", "instance", "(", ")", ".", "assignValues", "(", "trace", ",", "amounts", ")", ";", "}" ]
Assigns (to the given trace) multiple amounts given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call: <pre> assignAmounts(trace, [[a 10.00] [b 15.00] [c 25.00]]) </pre> should result into the following XES fragment: <...
[ "Assigns", "(", "to", "the", "given", "trace", ")", "multiple", "amounts", "given", "their", "keys", ".", "Note", "that", "as", "a", "side", "effect", "this", "method", "creates", "attributes", "when", "it", "does", "not", "find", "an", "attribute", "with"...
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L570-L572
mapbox/mapbox-navigation-android
libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/turnlane/TurnLaneView.java
TurnLaneView.updateLaneView
public void updateLaneView(@NonNull BannerComponents lane, @NonNull String maneuverModifier) { if (hasInvalidData(lane)) { return; } TurnLaneViewData drawData = buildTurnLaneViewData(lane, maneuverModifier); Integer resId = findDrawableResId(drawData); if (resId == null) { return; }...
java
public void updateLaneView(@NonNull BannerComponents lane, @NonNull String maneuverModifier) { if (hasInvalidData(lane)) { return; } TurnLaneViewData drawData = buildTurnLaneViewData(lane, maneuverModifier); Integer resId = findDrawableResId(drawData); if (resId == null) { return; }...
[ "public", "void", "updateLaneView", "(", "@", "NonNull", "BannerComponents", "lane", ",", "@", "NonNull", "String", "maneuverModifier", ")", "{", "if", "(", "hasInvalidData", "(", "lane", ")", ")", "{", "return", ";", "}", "TurnLaneViewData", "drawData", "=", ...
Updates this view based on the banner component lane data and the given maneuver modifier (to highlight which lane should be chosen). @param lane data {@link BannerComponents} @param maneuverModifier for the given maneuver
[ "Updates", "this", "view", "based", "on", "the", "banner", "component", "lane", "data", "and", "the", "given", "maneuver", "modifier", "(", "to", "highlight", "which", "lane", "should", "be", "chosen", ")", "." ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/turnlane/TurnLaneView.java#L46-L57
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedKeysAsync
public Observable<Page<DeletedKeyItem>> getDeletedKeysAsync(final String vaultBaseUrl, final Integer maxresults) { return getDeletedKeysWithServiceResponseAsync(vaultBaseUrl, maxresults) .map(new Func1<ServiceResponse<Page<DeletedKeyItem>>, Page<DeletedKeyItem>>() { @Override ...
java
public Observable<Page<DeletedKeyItem>> getDeletedKeysAsync(final String vaultBaseUrl, final Integer maxresults) { return getDeletedKeysWithServiceResponseAsync(vaultBaseUrl, maxresults) .map(new Func1<ServiceResponse<Page<DeletedKeyItem>>, Page<DeletedKeyItem>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "DeletedKeyItem", ">", ">", "getDeletedKeysAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getDeletedKeysWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "maxresu...
Lists the deleted keys in the specified vault. Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys operation is applicable for vaults enabled for soft-delete. While the operati...
[ "Lists", "the", "deleted", "keys", "in", "the", "specified", "vault", ".", "Retrieves", "a", "list", "of", "the", "keys", "in", "the", "Key", "Vault", "as", "JSON", "Web", "Key", "structures", "that", "contain", "the", "public", "part", "of", "a", "delet...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2976-L2984
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.insertArg
public Signature insertArg(int index, String name, Class<?> type) { return insertArgs(index, new String[]{name}, new Class<?>[]{type}); }
java
public Signature insertArg(int index, String name, Class<?> type) { return insertArgs(index, new String[]{name}, new Class<?>[]{type}); }
[ "public", "Signature", "insertArg", "(", "int", "index", ",", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "insertArgs", "(", "index", ",", "new", "String", "[", "]", "{", "name", "}", ",", "new", "Class", "<", "?", ">...
Insert an argument (name + type) into the signature. @param index the index at which to insert @param name the name of the new argument @param type the type of the new argument @return a new signature with the added arguments
[ "Insert", "an", "argument", "(", "name", "+", "type", ")", "into", "the", "signature", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L250-L252
JoeKerouac/utils
src/main/java/com/joe/utils/common/StringUtils.java
StringUtils.lcs
private static long lcs(String arg0, String arg1, int i, int j) { if (arg0.length() == i || arg1.length() == j) { return 0; } if (arg0.charAt(i) == arg1.charAt(j)) { return 1 + lcs(arg0, arg1, ++i, ++j); } else { return Math.max(lcs(arg0, arg1, ++i, j...
java
private static long lcs(String arg0, String arg1, int i, int j) { if (arg0.length() == i || arg1.length() == j) { return 0; } if (arg0.charAt(i) == arg1.charAt(j)) { return 1 + lcs(arg0, arg1, ++i, ++j); } else { return Math.max(lcs(arg0, arg1, ++i, j...
[ "private", "static", "long", "lcs", "(", "String", "arg0", ",", "String", "arg1", ",", "int", "i", ",", "int", "j", ")", "{", "if", "(", "arg0", ".", "length", "(", ")", "==", "i", "||", "arg1", ".", "length", "(", ")", "==", "j", ")", "{", "...
求两个字符串的最大公共子序列的长度 @param arg0 字符串1 @param arg1 字符串2 @param i 字符串1的当前位置指针 @param j 字符串2的当前位置指针 @return 两个字符串的最大公共子序列的长度
[ "求两个字符串的最大公共子序列的长度" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/StringUtils.java#L261-L271
structr/structr
structr-ui/src/main/java/org/structr/web/common/FileHelper.java
FileHelper.getContentMimeType
public static String getContentMimeType(final java.io.File file, final String name) throws IOException { String mimeType; // try name first, if not null if (name != null) { mimeType = mimeTypeMap.getContentType(name); if (mimeType != null && !UNKNOWN_MIME_TYPE.equals(mimeType)) { return mimeType; }...
java
public static String getContentMimeType(final java.io.File file, final String name) throws IOException { String mimeType; // try name first, if not null if (name != null) { mimeType = mimeTypeMap.getContentType(name); if (mimeType != null && !UNKNOWN_MIME_TYPE.equals(mimeType)) { return mimeType; }...
[ "public", "static", "String", "getContentMimeType", "(", "final", "java", ".", "io", ".", "File", "file", ",", "final", "String", "name", ")", "throws", "IOException", "{", "String", "mimeType", ";", "// try name first, if not null", "if", "(", "name", "!=", "...
Return mime type of given file @param file @param name @return content type @throws java.io.IOException
[ "Return", "mime", "type", "of", "given", "file" ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/common/FileHelper.java#L594-L624
craftercms/deployer
src/main/java/org/craftercms/deployer/utils/ConfigUtils.java
ConfigUtils.getStringProperty
public static String getStringProperty(Configuration config, String key, String defaultValue) throws DeployerConfigurationException { try { return config.getString(key, defaultValue); } catch (Exception e) { throw new DeployerConfigurati...
java
public static String getStringProperty(Configuration config, String key, String defaultValue) throws DeployerConfigurationException { try { return config.getString(key, defaultValue); } catch (Exception e) { throw new DeployerConfigurati...
[ "public", "static", "String", "getStringProperty", "(", "Configuration", "config", ",", "String", "key", ",", "String", "defaultValue", ")", "throws", "DeployerConfigurationException", "{", "try", "{", "return", "config", ".", "getString", "(", "key", ",", "defaul...
Returns the specified String property from the configuration @param config the configuration @param key the key of the property @param defaultValue the default value if the property is not found @return the String value of the property, or the default value if not found @throws DeployerConfigurationExce...
[ "Returns", "the", "specified", "String", "property", "from", "the", "configuration" ]
train
https://github.com/craftercms/deployer/blob/3ed446e3cc8af1055de2de6f871907f90ef27f63/src/main/java/org/craftercms/deployer/utils/ConfigUtils.java#L103-L110
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriFragmentId
public static void escapeUriFragmentId(final Reader reader, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (encoding == null) { throw new Ill...
java
public static void escapeUriFragmentId(final Reader reader, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (encoding == null) { throw new Ill...
[ "public", "static", "void", "escapeUriFragmentId", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "Illega...
<p> Perform am URI fragment identifier <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> The following are the only allowed chars in an URI fragment identifier (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></li> <li><tt>- . _ ~</tt></li> <li><tt>! $ ...
[ "<p", ">", "Perform", "am", "URI", "fragment", "identifier", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L1094-L1107
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/Unicode.java
Unicode.char2DOS437
public static synchronized String char2DOS437( StringBuffer stringbuffer, int i, char c ) { if (unicode2DOS437 == null) { unicode2DOS437 = new char[0x10000]; for( int j = 0; j < 256; j++ ) { char c1; if ((c1 = unicode[2][j]) != '\uFFFF') ...
java
public static synchronized String char2DOS437( StringBuffer stringbuffer, int i, char c ) { if (unicode2DOS437 == null) { unicode2DOS437 = new char[0x10000]; for( int j = 0; j < 256; j++ ) { char c1; if ((c1 = unicode[2][j]) != '\uFFFF') ...
[ "public", "static", "synchronized", "String", "char2DOS437", "(", "StringBuffer", "stringbuffer", ",", "int", "i", ",", "char", "c", ")", "{", "if", "(", "unicode2DOS437", "==", "null", ")", "{", "unicode2DOS437", "=", "new", "char", "[", "0x10000", "]", "...
Char to DOS437 converter @param stringbuffer @param i @param c @return String
[ "Char", "to", "DOS437", "converter" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/Unicode.java#L293-L313
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.listAtResourceLevelWithServiceResponseAsync
public Observable<ServiceResponse<Page<ManagementLockObjectInner>>> listAtResourceLevelWithServiceResponseAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) { return listAtResou...
java
public Observable<ServiceResponse<Page<ManagementLockObjectInner>>> listAtResourceLevelWithServiceResponseAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName, final String filter) { return listAtResou...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ManagementLockObjectInner", ">", ">", ">", "listAtResourceLevelWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "resourceProviderNamespace", ",", "final", "St...
Gets all the management locks for a resource or any level below resource. @param resourceGroupName The name of the resource group containing the locked resource. The name is case insensitive. @param resourceProviderNamespace The namespace of the resource provider. @param parentResourcePath The parent resource identity...
[ "Gets", "all", "the", "management", "locks", "for", "a", "resource", "or", "any", "level", "below", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L1739-L1751
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java
BoxApiMetadata.getDeleteFolderMetadataTemplateRequest
public BoxRequestsMetadata.DeleteItemMetadata getDeleteFolderMetadataTemplateRequest(String id, String template) { BoxRequestsMetadata.DeleteItemMetadata request = new BoxRequestsMetadata.DeleteItemMetadata(getFolderMetadataUrl(id, template), mSession); return request; }
java
public BoxRequestsMetadata.DeleteItemMetadata getDeleteFolderMetadataTemplateRequest(String id, String template) { BoxRequestsMetadata.DeleteItemMetadata request = new BoxRequestsMetadata.DeleteItemMetadata(getFolderMetadataUrl(id, template), mSession); return request; }
[ "public", "BoxRequestsMetadata", ".", "DeleteItemMetadata", "getDeleteFolderMetadataTemplateRequest", "(", "String", "id", ",", "String", "template", ")", "{", "BoxRequestsMetadata", ".", "DeleteItemMetadata", "request", "=", "new", "BoxRequestsMetadata", ".", "DeleteItemMe...
Gets a request that deletes the metadata for a specific template on a folder @param id id of the folder to retrieve metadata for @param template metadata template to use @return request to delete metadata on a folder
[ "Gets", "a", "request", "that", "deletes", "the", "metadata", "for", "a", "specific", "template", "on", "a", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java#L277-L280
eiichiro/acidhouse
acidhouse-appengine/src/main/java/org/eiichiro/acidhouse/appengine/Translation.java
Translation.toEntities
public static List<Entity> toEntities(AppEngineTransaction transaction, com.google.appengine.api.datastore.Key parent) { List<Entity> entities = new ArrayList<Entity>(); com.google.appengine.api.datastore.Key key = Keys.create(parent, TRANSACTION_KIND, transaction.id()); entities.add(new Entity(key)); ...
java
public static List<Entity> toEntities(AppEngineTransaction transaction, com.google.appengine.api.datastore.Key parent) { List<Entity> entities = new ArrayList<Entity>(); com.google.appengine.api.datastore.Key key = Keys.create(parent, TRANSACTION_KIND, transaction.id()); entities.add(new Entity(key)); ...
[ "public", "static", "List", "<", "Entity", ">", "toEntities", "(", "AppEngineTransaction", "transaction", ",", "com", ".", "google", ".", "appengine", ".", "api", ".", "datastore", ".", "Key", "parent", ")", "{", "List", "<", "Entity", ">", "entities", "="...
Translates Acid House {@code AppEngineTransaction} entity to Google App Engine Datastore entities with the specified {@code Key} of parent. @param transaction Acid House {@code Lock} entity. @param parent The {@code Key} of parent. @return Google App Engine Datastore entities translated from Acid House {@code AppEngin...
[ "Translates", "Acid", "House", "{", "@code", "AppEngineTransaction", "}", "entity", "to", "Google", "App", "Engine", "Datastore", "entities", "with", "the", "specified", "{", "@code", "Key", "}", "of", "parent", "." ]
train
https://github.com/eiichiro/acidhouse/blob/c50eaa0bb0f24abb46def4afa611f170637cdd62/acidhouse-appengine/src/main/java/org/eiichiro/acidhouse/appengine/Translation.java#L586-L609
facebookarchive/hadoop-20
src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java
ZombieJob.getTaskAttemptInfo
public TaskAttemptInfo getTaskAttemptInfo(TaskType taskType, int taskNumber, int taskAttemptNumber) { // does not care about locality. assume default locality is NODE_LOCAL. // But if both task and task attempt exist in trace, use logged locality. int locality = 0; LoggedTask loggedTask = getLogge...
java
public TaskAttemptInfo getTaskAttemptInfo(TaskType taskType, int taskNumber, int taskAttemptNumber) { // does not care about locality. assume default locality is NODE_LOCAL. // But if both task and task attempt exist in trace, use logged locality. int locality = 0; LoggedTask loggedTask = getLogge...
[ "public", "TaskAttemptInfo", "getTaskAttemptInfo", "(", "TaskType", "taskType", ",", "int", "taskNumber", ",", "int", "taskAttemptNumber", ")", "{", "// does not care about locality. assume default locality is NODE_LOCAL.", "// But if both task and task attempt exist in trace, use logg...
Get a {@link TaskAttemptInfo} with a {@link TaskAttemptID} associated with taskType, taskNumber, and taskAttemptNumber. This function does not care about locality, and follows the following decision logic: 1. Make up a {@link TaskAttemptInfo} if the task attempt is missing in trace, 2. Make up a {@link TaskAttemptInfo}...
[ "Get", "a", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java#L394-L424
overturetool/overture
ide/plugins/poviewer/src/main/java/org/overture/ide/plugins/poviewer/view/PoOverviewTableView.java
PoOverviewTableView.createPartControl
@Override public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); // test setup columns... TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(20, true)); layout.addColumnData(new ColumnWeightData(...
java
@Override public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); // test setup columns... TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(20, true)); layout.addColumnData(new ColumnWeightData(...
[ "@", "Override", "public", "void", "createPartControl", "(", "Composite", "parent", ")", "{", "viewer", "=", "new", "TableViewer", "(", "parent", ",", "SWT", ".", "FULL_SELECTION", "|", "SWT", ".", "H_SCROLL", "|", "SWT", ".", "V_SCROLL", ")", ";", "// tes...
This is a callback that will allow us to create the viewer and initialize it.
[ "This", "is", "a", "callback", "that", "will", "allow", "us", "to", "create", "the", "viewer", "and", "initialize", "it", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/plugins/poviewer/src/main/java/org/overture/ide/plugins/poviewer/view/PoOverviewTableView.java#L225-L280
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.drawGroup
public void drawGroup(Object parent, Object object, Style style) { createOrUpdateGroup(parent, object, null, style); }
java
public void drawGroup(Object parent, Object object, Style style) { createOrUpdateGroup(parent, object, null, style); }
[ "public", "void", "drawGroup", "(", "Object", "parent", ",", "Object", "object", ",", "Style", "style", ")", "{", "createOrUpdateGroup", "(", "parent", ",", "object", ",", "null", ",", "style", ")", ";", "}" ]
Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements together, and in this case applying a style on them. @param parent parent group object @param object group object @param style Add a style to a group.
[ "Creates", "a", "group", "element", "in", "the", "technology", "(", "SVG", "/", "VML", "/", "...", ")", "of", "this", "context", ".", "A", "group", "is", "meant", "to", "group", "other", "elements", "together", "and", "in", "this", "case", "applying", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L251-L253
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelXmlHelper.java
CamelXmlHelper.xmlAsModel
public static Object xmlAsModel(Node node, ClassLoader classLoader) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(JAXB_CONTEXT_PACKAGES, classLoader); Unmarshaller marshaller = jaxbContext.createUnmarshaller(); Object answer = marshaller.unmarshal(node); retu...
java
public static Object xmlAsModel(Node node, ClassLoader classLoader) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(JAXB_CONTEXT_PACKAGES, classLoader); Unmarshaller marshaller = jaxbContext.createUnmarshaller(); Object answer = marshaller.unmarshal(node); retu...
[ "public", "static", "Object", "xmlAsModel", "(", "Node", "node", ",", "ClassLoader", "classLoader", ")", "throws", "JAXBException", "{", "JAXBContext", "jaxbContext", "=", "JAXBContext", ".", "newInstance", "(", "JAXB_CONTEXT_PACKAGES", ",", "classLoader", ")", ";",...
Turns the xml into EIP model classes @param node the node representing the XML @param classLoader the class loader @return the EIP model class @throws JAXBException is throw if error unmarshalling XML to Object
[ "Turns", "the", "xml", "into", "EIP", "model", "classes" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelXmlHelper.java#L503-L510
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addResources
private void addResources(MpxjTreeNode parentNode, ProjectFile file) { for (Resource resource : file.getResources()) { final Resource r = resource; MpxjTreeNode childNode = new MpxjTreeNode(resource) { @Override public String toString() { ...
java
private void addResources(MpxjTreeNode parentNode, ProjectFile file) { for (Resource resource : file.getResources()) { final Resource r = resource; MpxjTreeNode childNode = new MpxjTreeNode(resource) { @Override public String toString() { ...
[ "private", "void", "addResources", "(", "MpxjTreeNode", "parentNode", ",", "ProjectFile", "file", ")", "{", "for", "(", "Resource", "resource", ":", "file", ".", "getResources", "(", ")", ")", "{", "final", "Resource", "r", "=", "resource", ";", "MpxjTreeNod...
Add resources to the tree. @param parentNode parent tree node @param file resource container
[ "Add", "resources", "to", "the", "tree", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L221-L235
nikolavp/approval
approval-core/src/main/java/com/github/approval/reporters/Reporters.java
Reporters.imageMagick
public static Reporter imageMagick() { return SwingInteractiveReporter.wrap(new Reporter() { private final Reporter other = fileLauncher(); @Override public void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval) { ...
java
public static Reporter imageMagick() { return SwingInteractiveReporter.wrap(new Reporter() { private final Reporter other = fileLauncher(); @Override public void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval) { ...
[ "public", "static", "Reporter", "imageMagick", "(", ")", "{", "return", "SwingInteractiveReporter", ".", "wrap", "(", "new", "Reporter", "(", ")", "{", "private", "final", "Reporter", "other", "=", "fileLauncher", "(", ")", ";", "@", "Override", "public", "v...
A reporter that compares images. Currently this uses <a href="http://www.imagemagick.org/script/binary-releases.php">imagemagick</a> for comparison. If you only want to view the new image on first approval and when there is a difference, then you better use the {@link #fileLauncher()} reporter which will do this for yo...
[ "A", "reporter", "that", "compares", "images", ".", "Currently", "this", "uses", "<a", "href", "=", "http", ":", "//", "www", ".", "imagemagick", ".", "org", "/", "script", "/", "binary", "-", "releases", ".", "php", ">", "imagemagick<", "/", "a", ">",...
train
https://github.com/nikolavp/approval/blob/5e32ecc3bc7f631e94a7049894fdd99a3aa5b1b8/approval-core/src/main/java/com/github/approval/reporters/Reporters.java#L153-L184
mpetazzoni/ttorrent
ttorrent-tracker/src/main/java/com/turn/ttorrent/tracker/TrackerRequestProcessor.java
TrackerRequestProcessor.serveError
private void serveError(Status status, HTTPTrackerErrorMessage error, RequestHandler requestHandler) throws IOException { requestHandler.serveResponse(status.getCode(), status.getDescription(), error.getData()); }
java
private void serveError(Status status, HTTPTrackerErrorMessage error, RequestHandler requestHandler) throws IOException { requestHandler.serveResponse(status.getCode(), status.getDescription(), error.getData()); }
[ "private", "void", "serveError", "(", "Status", "status", ",", "HTTPTrackerErrorMessage", "error", ",", "RequestHandler", "requestHandler", ")", "throws", "IOException", "{", "requestHandler", ".", "serveResponse", "(", "status", ".", "getCode", "(", ")", ",", "st...
Write a {@link HTTPTrackerErrorMessage} to the response with the given HTTP status code. @param status The HTTP status code to return. @param error The error reported by the tracker.
[ "Write", "a", "{", "@link", "HTTPTrackerErrorMessage", "}", "to", "the", "response", "with", "the", "given", "HTTP", "status", "code", "." ]
train
https://github.com/mpetazzoni/ttorrent/blob/ecd0e6caf853b63393c4ab63cfd8f20114f73f70/ttorrent-tracker/src/main/java/com/turn/ttorrent/tracker/TrackerRequestProcessor.java#L290-L292
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/StereoDisparityWtoNaiveFive.java
StereoDisparityWtoNaiveFive.processPixel
private void processPixel( int c_x , int c_y , int maxDisparity ) { for( int i = minDisparity; i < maxDisparity; i++ ) { score[i] = computeScore( c_x , c_x-i,c_y); } }
java
private void processPixel( int c_x , int c_y , int maxDisparity ) { for( int i = minDisparity; i < maxDisparity; i++ ) { score[i] = computeScore( c_x , c_x-i,c_y); } }
[ "private", "void", "processPixel", "(", "int", "c_x", ",", "int", "c_y", ",", "int", "maxDisparity", ")", "{", "for", "(", "int", "i", "=", "minDisparity", ";", "i", "<", "maxDisparity", ";", "i", "++", ")", "{", "score", "[", "i", "]", "=", "compu...
Computes fit score for each possible disparity @param c_x Center of region on left image. x-axis @param c_y Center of region on left image. y-axis @param maxDisparity Max allowed disparity
[ "Computes", "fit", "score", "for", "each", "possible", "disparity" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/StereoDisparityWtoNaiveFive.java#L105-L110
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/AbstractSourceImporter.java
AbstractSourceImporter.readCode
protected void readCode() throws InstallationException { try { final char[] buf = new char[1024]; final InputStream input = getUrl().openStream(); final Reader reader = new InputStreamReader(input, AbstractSourceImporter.ENCODING); int length; ...
java
protected void readCode() throws InstallationException { try { final char[] buf = new char[1024]; final InputStream input = getUrl().openStream(); final Reader reader = new InputStreamReader(input, AbstractSourceImporter.ENCODING); int length; ...
[ "protected", "void", "readCode", "(", ")", "throws", "InstallationException", "{", "try", "{", "final", "char", "[", "]", "buf", "=", "new", "char", "[", "1024", "]", ";", "final", "InputStream", "input", "=", "getUrl", "(", ")", ".", "openStream", "(", ...
Read the code from the file defined through {@link #url} with character set {@link #ENCODING}. @throws InstallationException if the source code could not read from URL @see #url @see #ENCODING
[ "Read", "the", "code", "from", "the", "file", "defined", "through", "{", "@link", "#url", "}", "with", "character", "set", "{", "@link", "#ENCODING", "}", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/AbstractSourceImporter.java#L119-L136
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FacesBackingBean.java
FacesBackingBean.ensureFailover
public void ensureFailover( HttpServletRequest request ) { StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler(); HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request ); RequestContext rc = new RequestContext( unwrappedRequest, null ); St...
java
public void ensureFailover( HttpServletRequest request ) { StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler(); HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request ); RequestContext rc = new RequestContext( unwrappedRequest, null ); St...
[ "public", "void", "ensureFailover", "(", "HttpServletRequest", "request", ")", "{", "StorageHandler", "sh", "=", "Handlers", ".", "get", "(", "getServletContext", "(", ")", ")", ".", "getStorageHandler", "(", ")", ";", "HttpServletRequest", "unwrappedRequest", "="...
Ensures that any changes to this object will be replicated in a cluster (for failover), even if the replication scheme uses a change-detection algorithm that relies on HttpSession.setAttribute to be aware of changes. Note that this method is used by the framework and does not need to be called explicitly in most cases...
[ "Ensures", "that", "any", "changes", "to", "this", "object", "will", "be", "replicated", "in", "a", "cluster", "(", "for", "failover", ")", "even", "if", "the", "replication", "scheme", "uses", "a", "change", "-", "detection", "algorithm", "that", "relies", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FacesBackingBean.java#L103-L111
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.delegatedAccount_email_filter_name_rule_GET
public ArrayList<Long> delegatedAccount_email_filter_name_rule_GET(String email, String name) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}/rule"; StringBuilder sb = path(qPath, email, name); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp...
java
public ArrayList<Long> delegatedAccount_email_filter_name_rule_GET(String email, String name) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}/rule"; StringBuilder sb = path(qPath, email, name); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp...
[ "public", "ArrayList", "<", "Long", ">", "delegatedAccount_email_filter_name_rule_GET", "(", "String", "email", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/delegatedAccount/{email}/filter/{name}/rule\"", ";", "StringBui...
Get rules REST: GET /email/domain/delegatedAccount/{email}/filter/{name}/rule @param email [required] Email @param name [required] Filter name
[ "Get", "rules" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L208-L213
sundrio/sundrio
annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java
ToPojo.readPrimitiveArrayProperty
private static String readPrimitiveArrayProperty(String ref, TypeDef source, Property property) { StringBuilder sb = new StringBuilder(); Method getter = getterOf(source, property); sb.append("Arrays.asList(") .append(ref).append(".").append(getter.getName()).append("())") ...
java
private static String readPrimitiveArrayProperty(String ref, TypeDef source, Property property) { StringBuilder sb = new StringBuilder(); Method getter = getterOf(source, property); sb.append("Arrays.asList(") .append(ref).append(".").append(getter.getName()).append("())") ...
[ "private", "static", "String", "readPrimitiveArrayProperty", "(", "String", "ref", ",", "TypeDef", "source", ",", "Property", "property", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "Method", "getter", "=", "getterOf", "(", "so...
Returns the string representation of the code that reads a primitive array property. @param ref The reference. @param source The type of the reference. @param property The property to read. @return The code.
[ "Returns", "the", "string", "representation", "of", "the", "code", "that", "reads", "a", "primitive", "array", "property", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java#L659-L666
samskivert/pythagoras
src/main/java/pythagoras/f/Matrix4.java
Matrix4.setToRotation
public Matrix4 setToRotation (IVector3 from, IVector3 to) { float angle = from.angle(to); if (angle < MathUtil.EPSILON) { return setToIdentity(); } if (angle <= FloatMath.PI - MathUtil.EPSILON) { return setToRotation(angle, from.cross(to).normalizeLocal()); ...
java
public Matrix4 setToRotation (IVector3 from, IVector3 to) { float angle = from.angle(to); if (angle < MathUtil.EPSILON) { return setToIdentity(); } if (angle <= FloatMath.PI - MathUtil.EPSILON) { return setToRotation(angle, from.cross(to).normalizeLocal()); ...
[ "public", "Matrix4", "setToRotation", "(", "IVector3", "from", ",", "IVector3", "to", ")", "{", "float", "angle", "=", "from", ".", "angle", "(", "to", ")", ";", "if", "(", "angle", "<", "MathUtil", ".", "EPSILON", ")", "{", "return", "setToIdentity", ...
Sets this to a rotation matrix that rotates one vector onto another. @return a reference to this matrix, for chaining.
[ "Sets", "this", "to", "a", "rotation", "matrix", "that", "rotates", "one", "vector", "onto", "another", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Matrix4.java#L181-L195
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/RandomWindowTinyLfuPolicy.java
RandomWindowTinyLfuPolicy.removeFromTable
private void removeFromTable(Node[] table, Node node) { int last = table.length - 1; table[node.index] = table[last]; table[node.index].index = node.index; table[last] = null; }
java
private void removeFromTable(Node[] table, Node node) { int last = table.length - 1; table[node.index] = table[last]; table[node.index].index = node.index; table[last] = null; }
[ "private", "void", "removeFromTable", "(", "Node", "[", "]", "table", ",", "Node", "node", ")", "{", "int", "last", "=", "table", ".", "length", "-", "1", ";", "table", "[", "node", ".", "index", "]", "=", "table", "[", "last", "]", ";", "table", ...
Removes the node from the table and adds the index to the free list.
[ "Removes", "the", "node", "from", "the", "table", "and", "adds", "the", "index", "to", "the", "free", "list", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/RandomWindowTinyLfuPolicy.java#L123-L128
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.asEnum
public static <T extends Enum<T>> EnumExpression<T> asEnum(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new EnumPath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof Oper...
java
public static <T extends Enum<T>> EnumExpression<T> asEnum(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new EnumPath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof Oper...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "EnumExpression", "<", "T", ">", "asEnum", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", ...
Create a new EnumExpression @param expr Expression of type Enum @return new EnumExpression
[ "Create", "a", "new", "EnumExpression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L2054-L2075
Azure/azure-sdk-for-java
mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ConfigurationsInner.java
ConfigurationsInner.createOrUpdate
public ConfigurationInner createOrUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, configurationName, parameters).toBlocking().last().body(); }
java
public ConfigurationInner createOrUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, configurationName, parameters).toBlocking().last().body(); }
[ "public", "ConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "configurationName", ",", "ConfigurationInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupNam...
Updates a configuration of a server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param configurationName The name of the server configuration. @param parameter...
[ "Updates", "a", "configuration", "of", "a", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ConfigurationsInner.java#L88-L90
linkedin/PalDB
paldb/src/main/java/com/linkedin/paldb/impl/StorageWriter.java
StorageWriter.getDataStream
private DataOutputStream getDataStream(int keyLength) throws IOException { // Resize array if necessary if (dataStreams.length <= keyLength) { dataStreams = Arrays.copyOf(dataStreams, keyLength + 1); dataFiles = Arrays.copyOf(dataFiles, keyLength + 1); } DataOutputStream dos = dataStr...
java
private DataOutputStream getDataStream(int keyLength) throws IOException { // Resize array if necessary if (dataStreams.length <= keyLength) { dataStreams = Arrays.copyOf(dataStreams, keyLength + 1); dataFiles = Arrays.copyOf(dataFiles, keyLength + 1); } DataOutputStream dos = dataStr...
[ "private", "DataOutputStream", "getDataStream", "(", "int", "keyLength", ")", "throws", "IOException", "{", "// Resize array if necessary", "if", "(", "dataStreams", ".", "length", "<=", "keyLength", ")", "{", "dataStreams", "=", "Arrays", ".", "copyOf", "(", "dat...
Get the data stream for the specified keyLength, create it if needed
[ "Get", "the", "data", "stream", "for", "the", "specified", "keyLength", "create", "it", "if", "needed" ]
train
https://github.com/linkedin/PalDB/blob/d05ccdd3f67855eb2675dbd82599f19aa7a9f650/paldb/src/main/java/com/linkedin/paldb/impl/StorageWriter.java#L429-L450
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
ScriptContent.executeScript
private String executeScript(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream scriptStream) throws IOException { String result = ""; Map binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(Ext...
java
private String executeScript(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream scriptStream) throws IOException { String result = ""; Map binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(Ext...
[ "private", "String", "executeScript", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "FilePath", "workspace", ",", "TaskListener", "listener", ",", "InputStream", "scriptStream", ")", "throws", "IOException", "{", "String", "result", "=", "\"\"", ";", "M...
Executes a script and returns the last value as a String @param build the build to act on @param scriptStream the script input stream @return a String containing the toString of the last item in the script @throws IOException
[ "Executes", "a", "script", "and", "returns", "the", "last", "value", "as", "a", "String" ]
train
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java#L186-L233
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/layer/Layers.java
Layers.addAll
public synchronized void addAll(Collection<Layer> layers, boolean redraw) { checkIsNull(layers); for (Layer layer : layers) { layer.setDisplayModel(this.displayModel); } this.layersList.addAll(layers); for (Layer layer : layers) { layer.assign(this.redrawe...
java
public synchronized void addAll(Collection<Layer> layers, boolean redraw) { checkIsNull(layers); for (Layer layer : layers) { layer.setDisplayModel(this.displayModel); } this.layersList.addAll(layers); for (Layer layer : layers) { layer.assign(this.redrawe...
[ "public", "synchronized", "void", "addAll", "(", "Collection", "<", "Layer", ">", "layers", ",", "boolean", "redraw", ")", "{", "checkIsNull", "(", "layers", ")", ";", "for", "(", "Layer", "layer", ":", "layers", ")", "{", "layer", ".", "setDisplayModel", ...
Adds multiple new layers on top. @param layers The new layers to add @param redraw Whether the map should be redrawn after adding the layers @see List#addAll(Collection)
[ "Adds", "multiple", "new", "layers", "on", "top", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/layer/Layers.java#L142-L154
GoogleCloudPlatform/bigdata-interop
bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/output/ForwardingBigQueryFileOutputFormat.java
ForwardingBigQueryFileOutputFormat.checkOutputSpecs
@Override public void checkOutputSpecs(JobContext job) throws FileAlreadyExistsException, IOException { Configuration conf = job.getConfiguration(); // Validate the output configuration. BigQueryOutputConfiguration.validateConfiguration(conf); // Get the output path. Path outputPath = BigQueryOu...
java
@Override public void checkOutputSpecs(JobContext job) throws FileAlreadyExistsException, IOException { Configuration conf = job.getConfiguration(); // Validate the output configuration. BigQueryOutputConfiguration.validateConfiguration(conf); // Get the output path. Path outputPath = BigQueryOu...
[ "@", "Override", "public", "void", "checkOutputSpecs", "(", "JobContext", "job", ")", "throws", "FileAlreadyExistsException", ",", "IOException", "{", "Configuration", "conf", "=", "job", ".", "getConfiguration", "(", ")", ";", "// Validate the output configuration.", ...
Checks to make sure the configuration is valid, the output path doesn't already exist, and that a connection to BigQuery can be established.
[ "Checks", "to", "make", "sure", "the", "configuration", "is", "valid", "the", "output", "path", "doesn", "t", "already", "exist", "and", "that", "a", "connection", "to", "BigQuery", "can", "be", "established", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/output/ForwardingBigQueryFileOutputFormat.java#L58-L89
apache/groovy
src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java
BytecodeHelper.convertPrimitiveToBoolean
public static void convertPrimitiveToBoolean(MethodVisitor mv, ClassNode type) { if (type == boolean_TYPE) { return; } // Special handling is done for floating point types in order to // handle checking for 0 or NaN values. if (type == double_TYPE) { conve...
java
public static void convertPrimitiveToBoolean(MethodVisitor mv, ClassNode type) { if (type == boolean_TYPE) { return; } // Special handling is done for floating point types in order to // handle checking for 0 or NaN values. if (type == double_TYPE) { conve...
[ "public", "static", "void", "convertPrimitiveToBoolean", "(", "MethodVisitor", "mv", ",", "ClassNode", "type", ")", "{", "if", "(", "type", "==", "boolean_TYPE", ")", "{", "return", ";", "}", "// Special handling is done for floating point types in order to", "// handle...
Converts a primitive type to boolean. @param mv method visitor @param type primitive type to convert
[ "Converts", "a", "primitive", "type", "to", "boolean", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java#L592-L619
ggrandes/packer
src/main/java/org/javastack/packer/Packer.java
Packer.getStringF
public String getStringF() { int len = getInt(); byte[] utf = new byte[len]; System.arraycopy(buf, bufPosition, utf, 0, utf.length); bufPosition += utf.length; return new String(utf, 0, len, charsetUTF8); }
java
public String getStringF() { int len = getInt(); byte[] utf = new byte[len]; System.arraycopy(buf, bufPosition, utf, 0, utf.length); bufPosition += utf.length; return new String(utf, 0, len, charsetUTF8); }
[ "public", "String", "getStringF", "(", ")", "{", "int", "len", "=", "getInt", "(", ")", ";", "byte", "[", "]", "utf", "=", "new", "byte", "[", "len", "]", ";", "System", ".", "arraycopy", "(", "buf", ",", "bufPosition", ",", "utf", ",", "0", ",",...
Get String stored in UTF-8 format (encoded as: Int32-Length + bytes) @return @see #putString(String)
[ "Get", "String", "stored", "in", "UTF", "-", "8", "format", "(", "encoded", "as", ":", "Int32", "-", "Length", "+", "bytes", ")" ]
train
https://github.com/ggrandes/packer/blob/0b37b286a3d0555050eb2e65419dd74f8d8d3e78/src/main/java/org/javastack/packer/Packer.java#L1107-L1113
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/util/Reflection.java
Reflection.toType
public static <T> T toType(Object data, Class<T> type) { try { if (Reflection.instanceOf(data, type)) { return Reflection.cast(data, type); } if (Collection.class.isAssignableFrom(type)) { return toCollectionType(data, type); } ...
java
public static <T> T toType(Object data, Class<T> type) { try { if (Reflection.instanceOf(data, type)) { return Reflection.cast(data, type); } if (Collection.class.isAssignableFrom(type)) { return toCollectionType(data, type); } ...
[ "public", "static", "<", "T", ">", "T", "toType", "(", "Object", "data", ",", "Class", "<", "T", ">", "type", ")", "{", "try", "{", "if", "(", "Reflection", ".", "instanceOf", "(", "data", ",", "type", ")", ")", "{", "return", "Reflection", ".", ...
<p> This is a flexible tolerable type casting method with the help of serializing tools (fastjson currently). </p> Supports:<br> map to jsonObject to bean <br> collection ---- fetch the first element and cast it to map/json/bean<br> collection --set-- HashSet<br> collection --list-- ArrayList<br> collection --queue-- L...
[ "<p", ">", "This", "is", "a", "flexible", "tolerable", "type", "casting", "method", "with", "the", "help", "of", "serializing", "tools", "(", "fastjson", "currently", ")", ".", "<", "/", "p", ">", "Supports", ":", "<br", ">", "map", "to", "jsonObject", ...
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/util/Reflection.java#L300-L315
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java
TunnelRequest.getIntegerParameter
public Integer getIntegerParameter(String name) throws GuacamoleException { // Pull requested parameter String value = getParameter(name); if (value == null) return null; // Attempt to parse as an integer try { return Integer.parseInt(value); } ...
java
public Integer getIntegerParameter(String name) throws GuacamoleException { // Pull requested parameter String value = getParameter(name); if (value == null) return null; // Attempt to parse as an integer try { return Integer.parseInt(value); } ...
[ "public", "Integer", "getIntegerParameter", "(", "String", "name", ")", "throws", "GuacamoleException", "{", "// Pull requested parameter", "String", "value", "=", "getParameter", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "return", "null", ";...
Returns the integer value of the parameter having the given name, throwing an exception if the parameter cannot be parsed. @param name The name of the parameter to return. @return The integer value of the parameter having the given name, or null if the parameter is missing. @throws GuacamoleException If the paramete...
[ "Returns", "the", "integer", "value", "of", "the", "parameter", "having", "the", "given", "name", "throwing", "an", "exception", "if", "the", "parameter", "cannot", "be", "parsed", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java#L195-L212
aws/aws-sdk-java
aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/UpdateElasticsearchDomainConfigRequest.java
UpdateElasticsearchDomainConfigRequest.withLogPublishingOptions
public UpdateElasticsearchDomainConfigRequest withLogPublishingOptions(java.util.Map<String, LogPublishingOption> logPublishingOptions) { setLogPublishingOptions(logPublishingOptions); return this; }
java
public UpdateElasticsearchDomainConfigRequest withLogPublishingOptions(java.util.Map<String, LogPublishingOption> logPublishingOptions) { setLogPublishingOptions(logPublishingOptions); return this; }
[ "public", "UpdateElasticsearchDomainConfigRequest", "withLogPublishingOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "LogPublishingOption", ">", "logPublishingOptions", ")", "{", "setLogPublishingOptions", "(", "logPublishingOptions", ")", ";", "retur...
<p> Map of <code>LogType</code> and <code>LogPublishingOption</code>, each containing options to publish a given type of Elasticsearch log. </p> @param logPublishingOptions Map of <code>LogType</code> and <code>LogPublishingOption</code>, each containing options to publish a given type of Elasticsearch log. @return Re...
[ "<p", ">", "Map", "of", "<code", ">", "LogType<", "/", "code", ">", "and", "<code", ">", "LogPublishingOption<", "/", "code", ">", "each", "containing", "options", "to", "publish", "a", "given", "type", "of", "Elasticsearch", "log", ".", "<", "/", "p", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/UpdateElasticsearchDomainConfigRequest.java#L522-L525
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.addGroupBadge
public GitlabBadge addGroupBadge(Integer groupId, String linkUrl, String imageUrl) throws IOException { String tailUrl = GitlabGroup.URL + "/" + groupId + GitlabBadge.URL; return dispatch().with("link_url", linkUrl) .with("image_url", imageUrl) .to(tailUrl, GitlabBadge.cl...
java
public GitlabBadge addGroupBadge(Integer groupId, String linkUrl, String imageUrl) throws IOException { String tailUrl = GitlabGroup.URL + "/" + groupId + GitlabBadge.URL; return dispatch().with("link_url", linkUrl) .with("image_url", imageUrl) .to(tailUrl, GitlabBadge.cl...
[ "public", "GitlabBadge", "addGroupBadge", "(", "Integer", "groupId", ",", "String", "linkUrl", ",", "String", "imageUrl", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabGroup", ".", "URL", "+", "\"/\"", "+", "groupId", "+", "GitlabBadge", ...
Add group badge @param groupId The id of the group for which the badge should be added @param linkUrl The URL that the badge should link to @param imageUrl The URL to the badge image @return The created badge @throws IOException on GitLab API call error
[ "Add", "group", "badge" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2711-L2716
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Transaction.java
Transaction.hashForSignature
public Sha256Hash hashForSignature(int inputIndex, Script redeemScript, SigHash type, boolean anyoneCanPay) { int sigHash = TransactionSignature.calcSigHashValue(type, anyoneCanPay); return hashForSignature(inputIndex, redeemScript.getProgram(), (byte)...
java
public Sha256Hash hashForSignature(int inputIndex, Script redeemScript, SigHash type, boolean anyoneCanPay) { int sigHash = TransactionSignature.calcSigHashValue(type, anyoneCanPay); return hashForSignature(inputIndex, redeemScript.getProgram(), (byte)...
[ "public", "Sha256Hash", "hashForSignature", "(", "int", "inputIndex", ",", "Script", "redeemScript", ",", "SigHash", "type", ",", "boolean", "anyoneCanPay", ")", "{", "int", "sigHash", "=", "TransactionSignature", ".", "calcSigHashValue", "(", "type", ",", "anyone...
<p>Calculates a signature hash, that is, a hash of a simplified form of the transaction. How exactly the transaction is simplified is specified by the type and anyoneCanPay parameters.</p> <p>This is a low level API and when using the regular {@link Wallet} class you don't have to call this yourself. When working with...
[ "<p", ">", "Calculates", "a", "signature", "hash", "that", "is", "a", "hash", "of", "a", "simplified", "form", "of", "the", "transaction", ".", "How", "exactly", "the", "transaction", "is", "simplified", "is", "specified", "by", "the", "type", "and", "anyo...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Transaction.java#L1178-L1182
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterName.java
UCharacterName.getAlgorithmName
public String getAlgorithmName(int index, int codepoint) { String result = null; synchronized (m_utilStringBuffer_) { m_utilStringBuffer_.setLength(0); m_algorithm_[index].appendName(codepoint, m_utilStringBuffer_); result = m_utilStringBuffer_.toString(); ...
java
public String getAlgorithmName(int index, int codepoint) { String result = null; synchronized (m_utilStringBuffer_) { m_utilStringBuffer_.setLength(0); m_algorithm_[index].appendName(codepoint, m_utilStringBuffer_); result = m_utilStringBuffer_.toString(); ...
[ "public", "String", "getAlgorithmName", "(", "int", "index", ",", "int", "codepoint", ")", "{", "String", "result", "=", "null", ";", "synchronized", "(", "m_utilStringBuffer_", ")", "{", "m_utilStringBuffer_", ".", "setLength", "(", "0", ")", ";", "m_algorith...
Gets the Algorithmic name of the codepoint @param index algorithmic range index @param codepoint The codepoint value. @return algorithmic name of codepoint
[ "Gets", "the", "Algorithmic", "name", "of", "the", "codepoint" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterName.java#L491-L500
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.beginUpdate
public EventSubscriptionInner beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().single().body(); }
java
public EventSubscriptionInner beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { return beginUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).toBlocking().single().body(); }
[ "public", "EventSubscriptionInner", "beginUpdate", "(", "String", "scope", ",", "String", "eventSubscriptionName", ",", "EventSubscriptionUpdateParameters", "eventSubscriptionUpdateParameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "scope", ",", "event...
Update an event subscription. Asynchronously updates an existing event subscription. @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{...
[ "Update", "an", "event", "subscription", ".", "Asynchronously", "updates", "an", "existing", "event", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L643-L645
alkacon/opencms-core
src/org/opencms/ade/galleries/CmsSiteSelectorOptionBuilder.java
CmsSiteSelectorOptionBuilder.addOption
private void addOption(Type type, String siteRoot, String message) { if (m_usedSiteRoots.contains(CmsStringUtil.joinPaths(siteRoot, "/"))) { return; } CmsSiteSelectorOption option = new CmsSiteSelectorOption(type, siteRoot, m_siteRoot.equals(siteRoot), message); // make sur...
java
private void addOption(Type type, String siteRoot, String message) { if (m_usedSiteRoots.contains(CmsStringUtil.joinPaths(siteRoot, "/"))) { return; } CmsSiteSelectorOption option = new CmsSiteSelectorOption(type, siteRoot, m_siteRoot.equals(siteRoot), message); // make sur...
[ "private", "void", "addOption", "(", "Type", "type", ",", "String", "siteRoot", ",", "String", "message", ")", "{", "if", "(", "m_usedSiteRoots", ".", "contains", "(", "CmsStringUtil", ".", "joinPaths", "(", "siteRoot", ",", "\"/\"", ")", ")", ")", "{", ...
Internal helper method for adding an option.<p> @param type the option type @param siteRoot the site root @param message the message for the option
[ "Internal", "helper", "method", "for", "adding", "an", "option", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/galleries/CmsSiteSelectorOptionBuilder.java#L212-L232
datasalt/pangool
core/src/main/java/com/datasalt/pangool/tuplemr/TupleMRBuilder.java
TupleMRBuilder.addInput
public void addInput(Path path, InputFormat inputFormat, TupleMapper inputProcessor) { multipleInputs.addInput(new Input(path, inputFormat, inputProcessor, new HashMap<String, String>())); }
java
public void addInput(Path path, InputFormat inputFormat, TupleMapper inputProcessor) { multipleInputs.addInput(new Input(path, inputFormat, inputProcessor, new HashMap<String, String>())); }
[ "public", "void", "addInput", "(", "Path", "path", ",", "InputFormat", "inputFormat", ",", "TupleMapper", "inputProcessor", ")", "{", "multipleInputs", ".", "addInput", "(", "new", "Input", "(", "path", ",", "inputFormat", ",", "inputProcessor", ",", "new", "H...
Defines an input as in {@link PangoolMultipleInputs} @see PangoolMultipleInputs
[ "Defines", "an", "input", "as", "in", "{", "@link", "PangoolMultipleInputs", "}" ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/tuplemr/TupleMRBuilder.java#L213-L215
lessthanoptimal/BoofCV
main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/EstimatePlaneAtInfinityGivenK.java
EstimatePlaneAtInfinityGivenK.computeRotation
static void computeRotation(DMatrix3 t , DMatrix3x3 R ) { for (int i = 1; i >= 0; i--) { double a = t.get(i,0); double b = t.get(i+1,0); // compute the rotator such that [a,b] = [||X||,0] double r = Math.sqrt(a*a + b*b); double q11 = a/r; double q21 = b/r; // apply rotator to t and R t.set(i...
java
static void computeRotation(DMatrix3 t , DMatrix3x3 R ) { for (int i = 1; i >= 0; i--) { double a = t.get(i,0); double b = t.get(i+1,0); // compute the rotator such that [a,b] = [||X||,0] double r = Math.sqrt(a*a + b*b); double q11 = a/r; double q21 = b/r; // apply rotator to t and R t.set(i...
[ "static", "void", "computeRotation", "(", "DMatrix3", "t", ",", "DMatrix3x3", "R", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "double", "a", "=", "t", ".", "get", "(", "i", ",", "0", ")", ";", ...
Computes rotators which rotate t into [|t|,0,0] @param t Input the vector, Output vector after rotator has been applied
[ "Computes", "rotators", "which", "rotate", "t", "into", "[", "|t|", "0", "0", "]" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/EstimatePlaneAtInfinityGivenK.java#L123-L146
fuinorg/srcgen4javassist
src/main/java/org/fuin/srcgen4javassist/SgUtils.java
SgUtils.createTypeSignature
public static String createTypeSignature(final String methodName, final Class<?>[] paramTypes) { final StringBuffer sb = new StringBuffer(); sb.append(methodName); sb.append("("); for (int i = 0; i < paramTypes.length; i++) { if (i > 0) { sb.append(", ")...
java
public static String createTypeSignature(final String methodName, final Class<?>[] paramTypes) { final StringBuffer sb = new StringBuffer(); sb.append(methodName); sb.append("("); for (int i = 0; i < paramTypes.length; i++) { if (i > 0) { sb.append(", ")...
[ "public", "static", "String", "createTypeSignature", "(", "final", "String", "methodName", ",", "final", "Class", "<", "?", ">", "[", "]", "paramTypes", ")", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append"...
Returns the "type" signature of the method. @param methodName Name of the method. @param paramTypes Argument types. @return Method name and argument types (like "methodXY(String, int, boolean)").
[ "Returns", "the", "type", "signature", "of", "the", "method", "." ]
train
https://github.com/fuinorg/srcgen4javassist/blob/355828113cfce3cdd3d69ba242c5bdfc7d899f2f/src/main/java/org/fuin/srcgen4javassist/SgUtils.java#L547-L559
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/utils/thresholds/ReturnValueBuilder.java
ReturnValueBuilder.forPlugin
public static ReturnValueBuilder forPlugin(final String name, final ThresholdsEvaluator thr) { if (thr != null) { return new ReturnValueBuilder(name, thr); } return new ReturnValueBuilder(name, new ThresholdsEvaluatorBuilder().create()); }
java
public static ReturnValueBuilder forPlugin(final String name, final ThresholdsEvaluator thr) { if (thr != null) { return new ReturnValueBuilder(name, thr); } return new ReturnValueBuilder(name, new ThresholdsEvaluatorBuilder().create()); }
[ "public", "static", "ReturnValueBuilder", "forPlugin", "(", "final", "String", "name", ",", "final", "ThresholdsEvaluator", "thr", ")", "{", "if", "(", "thr", "!=", "null", ")", "{", "return", "new", "ReturnValueBuilder", "(", "name", ",", "thr", ")", ";", ...
Constructs the object with the given threshold evaluator. @param name The name of the plugin that is creating this result @param thr The threshold evaluator. @return the newly created instance.
[ "Constructs", "the", "object", "with", "the", "given", "threshold", "evaluator", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/thresholds/ReturnValueBuilder.java#L97-L102
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/CheckArg.java
CheckArg.containsKey
public static void containsKey( Map<?, ?> argument, Object key, String name ) { isNotNull(argument, name); if (!argument.containsKey(key)) { throw new IllegalArgumentException(CommonI18n.argumentDidNotContainKey.text(nam...
java
public static void containsKey( Map<?, ?> argument, Object key, String name ) { isNotNull(argument, name); if (!argument.containsKey(key)) { throw new IllegalArgumentException(CommonI18n.argumentDidNotContainKey.text(nam...
[ "public", "static", "void", "containsKey", "(", "Map", "<", "?", ",", "?", ">", "argument", ",", "Object", "key", ",", "String", "name", ")", "{", "isNotNull", "(", "argument", ",", "name", ")", ";", "if", "(", "!", "argument", ".", "containsKey", "(...
Check that the map contains the key @param argument Map to check @param key Key to check for, may be null @param name The name of the argument @throws IllegalArgumentException If map is null or doesn't contain key
[ "Check", "that", "the", "map", "contains", "the", "key" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/CheckArg.java#L668-L675
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java
ExecutionChain.runOnGLThread
public <T, U> ExecutionChain runOnGLThread(Task<T, U> task) { runOnThread(ExecutionChain.Context.Type.GL, task); return this; }
java
public <T, U> ExecutionChain runOnGLThread(Task<T, U> task) { runOnThread(ExecutionChain.Context.Type.GL, task); return this; }
[ "public", "<", "T", ",", "U", ">", "ExecutionChain", "runOnGLThread", "(", "Task", "<", "T", ",", "U", ">", "task", ")", "{", "runOnThread", "(", "ExecutionChain", ".", "Context", ".", "Type", ".", "GL", ",", "task", ")", ";", "return", "this", ";", ...
Add a {@link Task} to be run on the {@link GVRContext#runOnGlThread(Runnable) OpenGL thread}. It will be run after all Tasks added prior to this call. @param task {@code Task} to run @return Reference to the {@code ExecutionChain}. @throws IllegalStateException if the chain of execution has already been {@link #execut...
[ "Add", "a", "{", "@link", "Task", "}", "to", "be", "run", "on", "the", "{", "@link", "GVRContext#runOnGlThread", "(", "Runnable", ")", "OpenGL", "thread", "}", ".", "It", "will", "be", "run", "after", "all", "Tasks", "added", "prior", "to", "this", "ca...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java#L285-L288
aws/aws-sdk-java
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/TagStreamRequest.java
TagStreamRequest.withTags
public TagStreamRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public TagStreamRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "TagStreamRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional). </p> @param tags A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional). @return Returns a reference to this object so that method calls can be chained t...
[ "<p", ">", "A", "list", "of", "tags", "to", "associate", "with", "the", "specified", "stream", ".", "Each", "tag", "is", "a", "key", "-", "value", "pair", "(", "the", "value", "is", "optional", ")", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/TagStreamRequest.java#L165-L168
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/CompareUtil.java
CompareUtil.mapContainsKeys
public static boolean mapContainsKeys(Map<?, ?> _map, Object... _keys) { if (_map == null) { return false; } else if (_keys == null) { return true; } for (Object key : _keys) { if (key != null && !_map.containsKey(key)) { return false; ...
java
public static boolean mapContainsKeys(Map<?, ?> _map, Object... _keys) { if (_map == null) { return false; } else if (_keys == null) { return true; } for (Object key : _keys) { if (key != null && !_map.containsKey(key)) { return false; ...
[ "public", "static", "boolean", "mapContainsKeys", "(", "Map", "<", "?", ",", "?", ">", "_map", ",", "Object", "...", "_keys", ")", "{", "if", "(", "_map", "==", "null", ")", "{", "return", "false", ";", "}", "else", "if", "(", "_keys", "==", "null"...
Checks whether a map contains all of the specified keys. @param _map map @param _keys one or more keys @return true if all keys found in map, false otherwise
[ "Checks", "whether", "a", "map", "contains", "all", "of", "the", "specified", "keys", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompareUtil.java#L114-L126
galan/verjson
src/main/java/de/galan/verjson/util/Transformations.java
Transformations.createArray
public static ArrayNode createArray(boolean fallbackToEmptyArray, JsonNode... nodes) { ArrayNode array = null; for (JsonNode element: nodes) { if (element != null) { if (array == null) { array = new ArrayNode(JsonNodeFactory.instance); } array.add(element); } } if ((array == null) && fall...
java
public static ArrayNode createArray(boolean fallbackToEmptyArray, JsonNode... nodes) { ArrayNode array = null; for (JsonNode element: nodes) { if (element != null) { if (array == null) { array = new ArrayNode(JsonNodeFactory.instance); } array.add(element); } } if ((array == null) && fall...
[ "public", "static", "ArrayNode", "createArray", "(", "boolean", "fallbackToEmptyArray", ",", "JsonNode", "...", "nodes", ")", "{", "ArrayNode", "array", "=", "null", ";", "for", "(", "JsonNode", "element", ":", "nodes", ")", "{", "if", "(", "element", "!=", ...
Creates an ArrayNode from the given nodes. Returns an empty ArrayNode if no elements are provided and fallbackToEmptyArray is true, null if false.
[ "Creates", "an", "ArrayNode", "from", "the", "given", "nodes", ".", "Returns", "an", "empty", "ArrayNode", "if", "no", "elements", "are", "provided", "and", "fallbackToEmptyArray", "is", "true", "null", "if", "false", "." ]
train
https://github.com/galan/verjson/blob/4db610fb5198fde913114ed628234f957e1c19d5/src/main/java/de/galan/verjson/util/Transformations.java#L50-L64
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWL2DatatypeImpl_CustomFieldSerializer.java
OWL2DatatypeImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWL2DatatypeImpl instance) throws SerializationException { serialize(streamWriter, instance); }
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWL2DatatypeImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWL2DatatypeImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWL2DatatypeImpl_CustomFieldSerializer.java#L67-L70
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLMetadataCache.java
CQLMetadataCache.columnValueIsBinary
public boolean columnValueIsBinary(String namespace, String storeName) { Boolean cachedValue = getCachedValueIsBinary(namespace, storeName); if(cachedValue != null) return cachedValue.booleanValue(); String cqlKeyspace = CQLService.storeToCQLName(namespace); String tableName = C...
java
public boolean columnValueIsBinary(String namespace, String storeName) { Boolean cachedValue = getCachedValueIsBinary(namespace, storeName); if(cachedValue != null) return cachedValue.booleanValue(); String cqlKeyspace = CQLService.storeToCQLName(namespace); String tableName = C...
[ "public", "boolean", "columnValueIsBinary", "(", "String", "namespace", ",", "String", "storeName", ")", "{", "Boolean", "cachedValue", "=", "getCachedValueIsBinary", "(", "namespace", ",", "storeName", ")", ";", "if", "(", "cachedValue", "!=", "null", ")", "ret...
Return true if column values for the given namespace/store name are binary. @param namespace Namespace (Keyspace) name. @param storeName Store (ColumnFamily) name. @return True if the given table's column values are binary.
[ "Return", "true", "if", "column", "values", "for", "the", "given", "namespace", "/", "store", "name", "are", "binary", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLMetadataCache.java#L45-L58
thelinmichael/spotify-web-api-java
src/main/java/com/wrapper/spotify/SpotifyApi.java
SpotifyApi.removeTracksFromPlaylist
@Deprecated public RemoveTracksFromPlaylistRequest.Builder removeTracksFromPlaylist( String user_id, String playlist_id, JsonArray tracks) { return new RemoveTracksFromPlaylistRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .user_id(user_id) ...
java
@Deprecated public RemoveTracksFromPlaylistRequest.Builder removeTracksFromPlaylist( String user_id, String playlist_id, JsonArray tracks) { return new RemoveTracksFromPlaylistRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .user_id(user_id) ...
[ "@", "Deprecated", "public", "RemoveTracksFromPlaylistRequest", ".", "Builder", "removeTracksFromPlaylist", "(", "String", "user_id", ",", "String", "playlist_id", ",", "JsonArray", "tracks", ")", "{", "return", "new", "RemoveTracksFromPlaylistRequest", ".", "Builder", ...
Delete tracks from a playlist @deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/) @param user_id The owners username. @param playlist_id The playlists ID. @param tracks URIs of the tracks...
[ "Delete", "tracks", "from", "a", "playlist" ]
train
https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L1292-L1300
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCCallableStatement.java
JDBCCallableStatement.getBlob
public synchronized Blob getBlob(int parameterIndex) throws SQLException { Object o = getObject(parameterIndex); if (o == null) { return null; } if (o instanceof BlobDataID) { return new JDBCBlobClient(session, (BlobDataID) o); } throw Util.sql...
java
public synchronized Blob getBlob(int parameterIndex) throws SQLException { Object o = getObject(parameterIndex); if (o == null) { return null; } if (o instanceof BlobDataID) { return new JDBCBlobClient(session, (BlobDataID) o); } throw Util.sql...
[ "public", "synchronized", "Blob", "getBlob", "(", "int", "parameterIndex", ")", "throws", "SQLException", "{", "Object", "o", "=", "getObject", "(", "parameterIndex", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "if", "("...
<!-- start generic documentation --> Retrieves the value of the designated JDBC <code>BLOB</code> parameter as a {@link java.sql.Blob} object in the Java programming language. <!-- end generic documentation --> <!-- start release-specific documentation --> <div class="ReleaseSpecificDocumentation"> <h3>HSQLDB-Specif...
[ "<!", "--", "start", "generic", "documentation", "--", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCCallableStatement.java#L1125-L1138
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.startsWith
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) { return new StartsWith(prefix, offset); }
java
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) { return new StartsWith(prefix, offset); }
[ "public", "static", "final", "Function", "<", "String", ",", "Boolean", ">", "startsWith", "(", "final", "String", "prefix", ",", "final", "int", "offset", ")", "{", "return", "new", "StartsWith", "(", "prefix", ",", "offset", ")", ";", "}" ]
<p> It checks whether the input substring after the given offset starts with the given prefix or not. </p> @param prefix the prefix to be search after the specified offset @param offset where to begin looking for the prefix @return
[ "<p", ">", "It", "checks", "whether", "the", "input", "substring", "after", "the", "given", "offset", "starts", "with", "the", "given", "prefix", "or", "not", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L4297-L4299
samskivert/samskivert
src/main/java/com/samskivert/swing/EnablingAdapter.java
EnablingAdapter.getPropChangeEnabler
public static PropertyChangeListener getPropChangeEnabler ( String property, JComponent target, boolean invert) { return new PropertyChangeEnabler(property, target, invert); }
java
public static PropertyChangeListener getPropChangeEnabler ( String property, JComponent target, boolean invert) { return new PropertyChangeEnabler(property, target, invert); }
[ "public", "static", "PropertyChangeListener", "getPropChangeEnabler", "(", "String", "property", ",", "JComponent", "target", ",", "boolean", "invert", ")", "{", "return", "new", "PropertyChangeEnabler", "(", "property", ",", "target", ",", "invert", ")", ";", "}"...
Creates and returns an enabler that listens for changes in the specified property (which must be a {@link Boolean} valued property) and updates the target's enabled state accordingly.
[ "Creates", "and", "returns", "an", "enabler", "that", "listens", "for", "changes", "in", "the", "specified", "property", "(", "which", "must", "be", "a", "{" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/EnablingAdapter.java#L26-L30
datacleaner/DataCleaner
engine/utils/src/main/java/org/datacleaner/util/StringUtils.java
StringUtils.replaceAll
public static String replaceAll(String str, final String searchToken, final String replacement) { if (str == null) { return str; } str = str.replace(searchToken, replacement); return str; }
java
public static String replaceAll(String str, final String searchToken, final String replacement) { if (str == null) { return str; } str = str.replace(searchToken, replacement); return str; }
[ "public", "static", "String", "replaceAll", "(", "String", "str", ",", "final", "String", "searchToken", ",", "final", "String", "replacement", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "str", ";", "}", "str", "=", "str", ".", "repl...
Utility method that will do replacement multiple times until no more occurrences are left. Note that this is NOT the same as {@link String#replaceAll(String, String)} which will only do one run-through of the string, and it will use regexes instead of exact searching. @param str @param searchToken @param replacement ...
[ "Utility", "method", "that", "will", "do", "replacement", "multiple", "times", "until", "no", "more", "occurrences", "are", "left", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/utils/src/main/java/org/datacleaner/util/StringUtils.java#L158-L164
lessthanoptimal/ddogleg
src/org/ddogleg/optimization/FactoryOptimization.java
FactoryOptimization.doglegSchur
public static UnconstrainedLeastSquaresSchur<DMatrixRMaj> doglegSchur(boolean robust, @Nullable ConfigTrustRegion config ) { if( config == null ) config = new ConfigTrustRegion(); HessianSchurComplement_DDRM hessian; if( robust ) { LinearSolverDense<DMatrixRMaj> solverA = LinearSolverFactory_DDRM.pseudoIn...
java
public static UnconstrainedLeastSquaresSchur<DMatrixRMaj> doglegSchur(boolean robust, @Nullable ConfigTrustRegion config ) { if( config == null ) config = new ConfigTrustRegion(); HessianSchurComplement_DDRM hessian; if( robust ) { LinearSolverDense<DMatrixRMaj> solverA = LinearSolverFactory_DDRM.pseudoIn...
[ "public", "static", "UnconstrainedLeastSquaresSchur", "<", "DMatrixRMaj", ">", "doglegSchur", "(", "boolean", "robust", ",", "@", "Nullable", "ConfigTrustRegion", "config", ")", "{", "if", "(", "config", "==", "null", ")", "config", "=", "new", "ConfigTrustRegion"...
Creates a sparse Schur Complement trust region optimization using dogleg steps. @see UnconLeastSqTrustRegionSchur_F64 @param config Trust region configuration @return The new optimization routine
[ "Creates", "a", "sparse", "Schur", "Complement", "trust", "region", "optimization", "using", "dogleg", "steps", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/optimization/FactoryOptimization.java#L54-L72
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsInner.java
ServerAzureADAdministratorsInner.beginCreateOrUpdate
public ServerAzureADAdministratorInner beginCreateOrUpdate(String resourceGroupName, String serverName, ServerAzureADAdministratorInner properties) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().single().body(); }
java
public ServerAzureADAdministratorInner beginCreateOrUpdate(String resourceGroupName, String serverName, ServerAzureADAdministratorInner properties) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().single().body(); }
[ "public", "ServerAzureADAdministratorInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ServerAzureADAdministratorInner", "properties", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ...
Creates a new Server Active Directory Administrator or updates an existing server Active Directory Administrator. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @p...
[ "Creates", "a", "new", "Server", "Active", "Directory", "Administrator", "or", "updates", "an", "existing", "server", "Active", "Directory", "Administrator", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsInner.java#L175-L177
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java
MediaDescriptorField.createAudioFormat
private RTPFormat createAudioFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to sample...
java
private RTPFormat createAudioFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to sample...
[ "private", "RTPFormat", "createAudioFormat", "(", "int", "payload", ",", "Text", "description", ")", "{", "Iterator", "<", "Text", ">", "it", "=", "description", ".", "split", "(", "'", "'", ")", ".", "iterator", "(", ")", ";", "//encoding name", "Text", ...
Creates or updates audio format using payload number and text format description. @param payload the payload number of the format. @param description text description of the format @return format object
[ "Creates", "or", "updates", "audio", "format", "using", "payload", "number", "and", "text", "format", "description", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java#L421-L454
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.java
ProfileSummaryBuilder.buildClassSummary
public void buildClassSummary(XMLNode node, Content packageSummaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String...
java
public void buildClassSummary(XMLNode node, Content packageSummaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String...
[ "public", "void", "buildClassSummary", "(", "XMLNode", "node", ",", "Content", "packageSummaryContentTree", ")", "{", "String", "classTableSummary", "=", "configuration", ".", "getText", "(", "\"doclet.Member_Table_Summary\"", ",", "configuration", ".", "getText", "(", ...
Build the summary for the classes in the package. @param node the XML element that specifies which components to document @param packageSummaryContentTree the tree to which the class summary will be added
[ "Build", "the", "summary", "for", "the", "classes", "in", "the", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.java#L210-L226
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java
HashinatorSnapshotData.restoreFromBuffer
public InstanceId restoreFromBuffer(ByteBuffer buf) throws IOException { buf.rewind(); // Assumes config data is the last field. int dataSize = buf.remaining() - OFFSET_DATA; if (dataSize <= 0) { throw new IOException("Hashinator snapshot data is too small.")...
java
public InstanceId restoreFromBuffer(ByteBuffer buf) throws IOException { buf.rewind(); // Assumes config data is the last field. int dataSize = buf.remaining() - OFFSET_DATA; if (dataSize <= 0) { throw new IOException("Hashinator snapshot data is too small.")...
[ "public", "InstanceId", "restoreFromBuffer", "(", "ByteBuffer", "buf", ")", "throws", "IOException", "{", "buf", ".", "rewind", "(", ")", ";", "// Assumes config data is the last field.", "int", "dataSize", "=", "buf", ".", "remaining", "(", ")", "-", "OFFSET_DATA...
Restore and check hashinator config data. @param buf input buffer @return instance ID read from buffer @throws I/O exception on failure
[ "Restore", "and", "check", "hashinator", "config", "data", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java#L110-L141
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java
AbstractHBCIJob.fillJobResult
public void fillJobResult(HBCIMsgStatus status, int offset) { try { executed = true; // nachsehen, welche antwortsegmente ueberhaupt // zu diesem task gehoeren // res-num --> segmentheader (wird für sortierung der // antwort-segmente benötigt) ...
java
public void fillJobResult(HBCIMsgStatus status, int offset) { try { executed = true; // nachsehen, welche antwortsegmente ueberhaupt // zu diesem task gehoeren // res-num --> segmentheader (wird für sortierung der // antwort-segmente benötigt) ...
[ "public", "void", "fillJobResult", "(", "HBCIMsgStatus", "status", ",", "int", "offset", ")", "{", "try", "{", "executed", "=", "true", ";", "// nachsehen, welche antwortsegmente ueberhaupt", "// zu diesem task gehoeren", "// res-num --> segmentheader (wird für sortierung der",...
/* füllt das Objekt mit den Rückgabedaten. Dazu wird zuerst eine Liste aller Segmente erstellt, die Rückgabedaten für diesen Task enthalten. Anschließend werden die HBCI-Rückgabewerte (RetSegs) im outStore gespeichert. Danach werden die GV-spezifischen Daten im outStore abgelegt
[ "/", "*", "füllt", "das", "Objekt", "mit", "den", "Rückgabedaten", ".", "Dazu", "wird", "zuerst", "eine", "Liste", "aller", "Segmente", "erstellt", "die", "Rückgabedaten", "für", "diesen", "Task", "enthalten", ".", "Anschließend", "werden", "die", "HBCI", "-",...
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java#L698-L745
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/StringUtilities.java
StringUtilities.streamToScanner
@SuppressWarnings("resource") public static Scanner streamToScanner( InputStream stream, String delimiter ) { java.util.Scanner s = new java.util.Scanner(stream).useDelimiter(delimiter); return s; }
java
@SuppressWarnings("resource") public static Scanner streamToScanner( InputStream stream, String delimiter ) { java.util.Scanner s = new java.util.Scanner(stream).useDelimiter(delimiter); return s; }
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "public", "static", "Scanner", "streamToScanner", "(", "InputStream", "stream", ",", "String", "delimiter", ")", "{", "java", ".", "util", ".", "Scanner", "s", "=", "new", "java", ".", "util", ".", "Scanner"...
Get scanner from input stream. <b>Note: the scanner needs to be closed after use.</b> @param stream the stream to read. @param delimiter the delimiter to use. @return the scanner.
[ "Get", "scanner", "from", "input", "stream", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/StringUtilities.java#L141-L145
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java
AbstractOptionsForSelect.withRowAsyncListener
public T withRowAsyncListener(Function<Row, Row> rowAsyncListener) { getOptions().setRowAsyncListeners(Optional.of(asList(rowAsyncListener))); return getThis(); }
java
public T withRowAsyncListener(Function<Row, Row> rowAsyncListener) { getOptions().setRowAsyncListeners(Optional.of(asList(rowAsyncListener))); return getThis(); }
[ "public", "T", "withRowAsyncListener", "(", "Function", "<", "Row", ",", "Row", ">", "rowAsyncListener", ")", "{", "getOptions", "(", ")", ".", "setRowAsyncListeners", "(", "Optional", ".", "of", "(", "asList", "(", "rowAsyncListener", ")", ")", ")", ";", ...
Add the given async listener on the {@link com.datastax.driver.core.Row} object. Example of usage: <pre class="code"><code class="java"> .withRowAsyncListener(row -> { //Do something with the row object here }) </code></pre> Remark: <strong>You can inspect and read values from the row object</strong>
[ "Add", "the", "given", "async", "listener", "on", "the", "{", "@link", "com", ".", "datastax", ".", "driver", ".", "core", ".", "Row", "}", "object", ".", "Example", "of", "usage", ":", "<pre", "class", "=", "code", ">", "<code", "class", "=", "java"...
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java#L236-L239
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/universal/UniversalIdIntMessage.java
UniversalIdIntMessage.newInstance
public static UniversalIdIntMessage newInstance(Long id, byte[] content) { UniversalIdIntMessage msg = newInstance(content); msg.setId(id); return msg; }
java
public static UniversalIdIntMessage newInstance(Long id, byte[] content) { UniversalIdIntMessage msg = newInstance(content); msg.setId(id); return msg; }
[ "public", "static", "UniversalIdIntMessage", "newInstance", "(", "Long", "id", ",", "byte", "[", "]", "content", ")", "{", "UniversalIdIntMessage", "msg", "=", "newInstance", "(", "content", ")", ";", "msg", ".", "setId", "(", "id", ")", ";", "return", "ms...
Create a new {@link UniversalIdIntMessage} object with specified id and content. @param id @param content @return
[ "Create", "a", "new", "{", "@link", "UniversalIdIntMessage", "}", "object", "with", "specified", "id", "and", "content", "." ]
train
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/universal/UniversalIdIntMessage.java#L76-L80
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2LocalFlowController.java
DefaultHttp2LocalFlowController.windowUpdateRatio
public void windowUpdateRatio(Http2Stream stream, float ratio) throws Http2Exception { assert ctx != null && ctx.executor().inEventLoop(); checkValidRatio(ratio); FlowState state = state(stream); state.windowUpdateRatio(ratio); state.writeWindowUpdateIfNeeded(); }
java
public void windowUpdateRatio(Http2Stream stream, float ratio) throws Http2Exception { assert ctx != null && ctx.executor().inEventLoop(); checkValidRatio(ratio); FlowState state = state(stream); state.windowUpdateRatio(ratio); state.writeWindowUpdateIfNeeded(); }
[ "public", "void", "windowUpdateRatio", "(", "Http2Stream", "stream", ",", "float", "ratio", ")", "throws", "Http2Exception", "{", "assert", "ctx", "!=", "null", "&&", "ctx", ".", "executor", "(", ")", ".", "inEventLoop", "(", ")", ";", "checkValidRatio", "("...
The window update ratio is used to determine when a window update must be sent. If the ratio of bytes processed since the last update has meet or exceeded this ratio then a window update will be sent. This window update ratio will only be applied to {@code streamId}. <p> Note it is the responsibly of the caller to ensu...
[ "The", "window", "update", "ratio", "is", "used", "to", "determine", "when", "a", "window", "update", "must", "be", "sent", ".", "If", "the", "ratio", "of", "bytes", "processed", "since", "the", "last", "update", "has", "meet", "or", "exceeded", "this", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2LocalFlowController.java#L242-L248
lucee/Lucee
core/src/main/java/lucee/transformer/util/SourceCode.java
SourceCode.subCFMLString
public SourceCode subCFMLString(int start, int count) { return new SourceCode(String.valueOf(text, start, count), writeLog, dialect); }
java
public SourceCode subCFMLString(int start, int count) { return new SourceCode(String.valueOf(text, start, count), writeLog, dialect); }
[ "public", "SourceCode", "subCFMLString", "(", "int", "start", ",", "int", "count", ")", "{", "return", "new", "SourceCode", "(", "String", ".", "valueOf", "(", "text", ",", "start", ",", "count", ")", ",", "writeLog", ",", "dialect", ")", ";", "}" ]
return a subset of the current SourceCode @param start start position of the new subset. @param count length of the new subset. @return subset of the SourceCode as new SourcCode
[ "return", "a", "subset", "of", "the", "current", "SourceCode" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/util/SourceCode.java#L687-L690
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/rng/distribution/impl/SaddlePointExpansion.java
SaddlePointExpansion.logBinomialProbability
public static double logBinomialProbability(int x, int n, double p, double q) { double ret; if (x == 0) { if (p < 0.1) { ret = -getDeviancePart(n, n * q) - n * p; } else { ret = n * FastMath.log(q); } } else if (x == n) { ...
java
public static double logBinomialProbability(int x, int n, double p, double q) { double ret; if (x == 0) { if (p < 0.1) { ret = -getDeviancePart(n, n * q) - n * p; } else { ret = n * FastMath.log(q); } } else if (x == n) { ...
[ "public", "static", "double", "logBinomialProbability", "(", "int", "x", ",", "int", "n", ",", "double", "p", ",", "double", "q", ")", "{", "double", "ret", ";", "if", "(", "x", "==", "0", ")", "{", "if", "(", "p", "<", "0.1", ")", "{", "ret", ...
Compute the logarithm of the PMF for a binomial distribution using the saddle point expansion. @param x the value at which the probability is evaluated. @param n the number of trials. @param p the probability of success. @param q the probability of failure (1 - p). @return log(p(x)).
[ "Compute", "the", "logarithm", "of", "the", "PMF", "for", "a", "binomial", "distribution", "using", "the", "saddle", "point", "expansion", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/rng/distribution/impl/SaddlePointExpansion.java#L178-L199
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/JavaScriptUtils.java
JavaScriptUtils.getJavaScriptForRedirect
public String getJavaScriptForRedirect(String reqUrlCookieName, String redirectUrl) throws Exception { return getJavaScriptForRedirect(reqUrlCookieName, redirectUrl, null); }
java
public String getJavaScriptForRedirect(String reqUrlCookieName, String redirectUrl) throws Exception { return getJavaScriptForRedirect(reqUrlCookieName, redirectUrl, null); }
[ "public", "String", "getJavaScriptForRedirect", "(", "String", "reqUrlCookieName", ",", "String", "redirectUrl", ")", "throws", "Exception", "{", "return", "getJavaScriptForRedirect", "(", "reqUrlCookieName", ",", "redirectUrl", ",", "null", ")", ";", "}" ]
Creates a JavaScript HTML block that: <ol> <li>Creates a cookie with the specified name whose value is the browser's current location <li>Redirects the browser to the specified URL </ol>
[ "Creates", "a", "JavaScript", "HTML", "block", "that", ":", "<ol", ">", "<li", ">", "Creates", "a", "cookie", "with", "the", "specified", "name", "whose", "value", "is", "the", "browser", "s", "current", "location", "<li", ">", "Redirects", "the", "browser...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/JavaScriptUtils.java#L110-L112
adamfisk/littleshoot-util
src/main/java/org/littleshoot/util/NumberUtils.java
NumberUtils.isBigger
public static boolean isBigger(final BigInteger big1, final BigInteger big2) { final int compared = big1.compareTo(big2); if (compared > 0) { return true; } return false; }
java
public static boolean isBigger(final BigInteger big1, final BigInteger big2) { final int compared = big1.compareTo(big2); if (compared > 0) { return true; } return false; }
[ "public", "static", "boolean", "isBigger", "(", "final", "BigInteger", "big1", ",", "final", "BigInteger", "big2", ")", "{", "final", "int", "compared", "=", "big1", ".", "compareTo", "(", "big2", ")", ";", "if", "(", "compared", ">", "0", ")", "{", "r...
Returns whether the first {@link BigInteger} is bigger than the second. @param big1 The first {@link BigInteger} to compare. @param big2 The second {@link BigInteger} to compare. @return <code>true</code> if the first {@link BigInteger} is bigger than the second, otherwise <code>false</code>.
[ "Returns", "whether", "the", "first", "{", "@link", "BigInteger", "}", "is", "bigger", "than", "the", "second", "." ]
train
https://github.com/adamfisk/littleshoot-util/blob/3c0dc4955116b3382d6b0575d2f164b7508a4f73/src/main/java/org/littleshoot/util/NumberUtils.java#L24-L32
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/http/SimpleHttpClientFactoryBean.java
SimpleHttpClientFactoryBean.buildRequestExecutorService
private FutureRequestExecutionService buildRequestExecutorService(final CloseableHttpClient httpClient) { if (this.executorService == null) { this.executorService = new ThreadPoolExecutor(this.threadsNumber, this.threadsNumber, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(this.queueSize)); ...
java
private FutureRequestExecutionService buildRequestExecutorService(final CloseableHttpClient httpClient) { if (this.executorService == null) { this.executorService = new ThreadPoolExecutor(this.threadsNumber, this.threadsNumber, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(this.queueSize)); ...
[ "private", "FutureRequestExecutionService", "buildRequestExecutorService", "(", "final", "CloseableHttpClient", "httpClient", ")", "{", "if", "(", "this", ".", "executorService", "==", "null", ")", "{", "this", ".", "executorService", "=", "new", "ThreadPoolExecutor", ...
Build a {@link FutureRequestExecutionService} from the current properties and a HTTP client. @param httpClient the provided HTTP client @return the built request executor service
[ "Build", "a", "{", "@link", "FutureRequestExecutionService", "}", "from", "the", "current", "properties", "and", "a", "HTTP", "client", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/http/SimpleHttpClientFactoryBean.java#L255-L260
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java
HashGeneratorMaker.atomic
public AtomHashGenerator atomic() { if (depth < 0) throw new IllegalArgumentException("no depth specified, use .depth(int)"); List<AtomEncoder> encoders = new ArrayList<AtomEncoder>(); // set is ordered for (AtomEncoder encoder : encoderSet) { encoders.add(encoder); ...
java
public AtomHashGenerator atomic() { if (depth < 0) throw new IllegalArgumentException("no depth specified, use .depth(int)"); List<AtomEncoder> encoders = new ArrayList<AtomEncoder>(); // set is ordered for (AtomEncoder encoder : encoderSet) { encoders.add(encoder); ...
[ "public", "AtomHashGenerator", "atomic", "(", ")", "{", "if", "(", "depth", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"no depth specified, use .depth(int)\"", ")", ";", "List", "<", "AtomEncoder", ">", "encoders", "=", "new", "ArrayList", ...
Given the current configuration create an {@link AtomHashGenerator}. @return instance of the generator @throws IllegalArgumentException no depth or encoders were configured
[ "Given", "the", "current", "configuration", "create", "an", "{", "@link", "AtomHashGenerator", "}", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java#L317-L349
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java
TaskOperations.createTasks
public void createTasks(String jobId, List<TaskAddParameter> taskList) throws RuntimeException, InterruptedException { createTasks(jobId, taskList, null); }
java
public void createTasks(String jobId, List<TaskAddParameter> taskList) throws RuntimeException, InterruptedException { createTasks(jobId, taskList, null); }
[ "public", "void", "createTasks", "(", "String", "jobId", ",", "List", "<", "TaskAddParameter", ">", "taskList", ")", "throws", "RuntimeException", ",", "InterruptedException", "{", "createTasks", "(", "jobId", ",", "taskList", ",", "null", ")", ";", "}" ]
Adds multiple tasks to a job. @param jobId The ID of the job to which to add the task. @param taskList A list of {@link TaskAddParameter tasks} to add. @throws RuntimeException Exception thrown when an error response is received from the Batch service or any network exception. @throws InterruptedException Exception th...
[ "Adds", "multiple", "tasks", "to", "a", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java#L139-L142
ThreeTen/threetenbp
src/main/java/org/threeten/bp/Period.java
Period.plusDays
public Period plusDays(long daysToAdd) { if (daysToAdd == 0) { return this; } return create(years, months, Jdk8Methods.safeToInt(Jdk8Methods.safeAdd(days, daysToAdd))); }
java
public Period plusDays(long daysToAdd) { if (daysToAdd == 0) { return this; } return create(years, months, Jdk8Methods.safeToInt(Jdk8Methods.safeAdd(days, daysToAdd))); }
[ "public", "Period", "plusDays", "(", "long", "daysToAdd", ")", "{", "if", "(", "daysToAdd", "==", "0", ")", "{", "return", "this", ";", "}", "return", "create", "(", "years", ",", "months", ",", "Jdk8Methods", ".", "safeToInt", "(", "Jdk8Methods", ".", ...
Returns a copy of this period with the specified days added. <p> This adds the amount to the days unit in a copy of this period. The years and months units are unaffected. For example, "1 year, 6 months and 3 days" plus 2 days returns "1 year, 6 months and 5 days". <p> This instance is immutable and unaffected by this ...
[ "Returns", "a", "copy", "of", "this", "period", "with", "the", "specified", "days", "added", ".", "<p", ">", "This", "adds", "the", "amount", "to", "the", "days", "unit", "in", "a", "copy", "of", "this", "period", ".", "The", "years", "and", "months", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/Period.java#L609-L614
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cs/cspolicy_binding.java
cspolicy_binding.get
public static cspolicy_binding get(nitro_service service, String policyname) throws Exception{ cspolicy_binding obj = new cspolicy_binding(); obj.set_policyname(policyname); cspolicy_binding response = (cspolicy_binding) obj.get_resource(service); return response; }
java
public static cspolicy_binding get(nitro_service service, String policyname) throws Exception{ cspolicy_binding obj = new cspolicy_binding(); obj.set_policyname(policyname); cspolicy_binding response = (cspolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "cspolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "policyname", ")", "throws", "Exception", "{", "cspolicy_binding", "obj", "=", "new", "cspolicy_binding", "(", ")", ";", "obj", ".", "set_policyname", "(", "policyname",...
Use this API to fetch cspolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "cspolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cs/cspolicy_binding.java#L125-L130
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.searchArtifact
public final synchronized ExtendedArtifact searchArtifact(File file) { final String filename = removePathPrefix(getBaseDirectory(), file); getLog().debug("Retreiving module for " + filename); //$NON-NLS-1$ File theFile = file; File pomDirectory = null; while (theFile != null && pomDirectory == null) { if...
java
public final synchronized ExtendedArtifact searchArtifact(File file) { final String filename = removePathPrefix(getBaseDirectory(), file); getLog().debug("Retreiving module for " + filename); //$NON-NLS-1$ File theFile = file; File pomDirectory = null; while (theFile != null && pomDirectory == null) { if...
[ "public", "final", "synchronized", "ExtendedArtifact", "searchArtifact", "(", "File", "file", ")", "{", "final", "String", "filename", "=", "removePathPrefix", "(", "getBaseDirectory", "(", ")", ",", "file", ")", ";", "getLog", "(", ")", ".", "debug", "(", "...
Search and reply the maven artifact which is corresponding to the given file. @param file is the file for which the maven artifact should be retreived. @return the maven artifact or <code>null</code> if none.
[ "Search", "and", "reply", "the", "maven", "artifact", "which", "is", "corresponding", "to", "the", "given", "file", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L535-L569
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.beginSetVpnclientIpsecParameters
public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecPara...
java
public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecPara...
[ "public", "VpnClientIPsecParametersInner", "beginSetVpnclientIpsecParameters", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "VpnClientIPsecParametersInner", "vpnclientIpsecParams", ")", "{", "return", "beginSetVpnclientIpsecParametersWithServiceR...
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @par...
[ "The", "Set", "VpnclientIpsecParameters", "operation", "sets", "the", "vpnclient", "ipsec", "policy", "for", "P2S", "client", "of", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "through", "Network", "resource", "provider", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2734-L2736
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
LayoutVersion.initMap
private static void initMap() { // Go through all the enum constants and build a map of // LayoutVersion <-> EnumSet of all supported features in that LayoutVersion for (Feature f : Feature.values()) { EnumSet<Feature> ancestorSet = map.get(f.ancestorLV); if (ancestorSet == null) { ances...
java
private static void initMap() { // Go through all the enum constants and build a map of // LayoutVersion <-> EnumSet of all supported features in that LayoutVersion for (Feature f : Feature.values()) { EnumSet<Feature> ancestorSet = map.get(f.ancestorLV); if (ancestorSet == null) { ances...
[ "private", "static", "void", "initMap", "(", ")", "{", "// Go through all the enum constants and build a map of", "// LayoutVersion <-> EnumSet of all supported features in that LayoutVersion", "for", "(", "Feature", "f", ":", "Feature", ".", "values", "(", ")", ")", "{", "...
Initialize the map of a layout version and EnumSet of {@link Feature}s supported.
[ "Initialize", "the", "map", "of", "a", "layout", "version", "and", "EnumSet", "of", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/protocol/LayoutVersion.java#L130-L148
ThreeTen/threetenbp
src/main/java/org/threeten/bp/zone/TzdbZoneRulesCompiler.java
TzdbZoneRulesCompiler.parseMonthDayTime
private void parseMonthDayTime(StringTokenizer st, TZDBMonthDayTime mdt) { mdt.month = parseMonth(st.nextToken()); if (st.hasMoreTokens()) { String dayRule = st.nextToken(); if (dayRule.startsWith("last")) { mdt.dayOfMonth = -1; mdt.dayOfWeek = par...
java
private void parseMonthDayTime(StringTokenizer st, TZDBMonthDayTime mdt) { mdt.month = parseMonth(st.nextToken()); if (st.hasMoreTokens()) { String dayRule = st.nextToken(); if (dayRule.startsWith("last")) { mdt.dayOfMonth = -1; mdt.dayOfWeek = par...
[ "private", "void", "parseMonthDayTime", "(", "StringTokenizer", "st", ",", "TZDBMonthDayTime", "mdt", ")", "{", "mdt", ".", "month", "=", "parseMonth", "(", "st", ".", "nextToken", "(", ")", ")", ";", "if", "(", "st", ".", "hasMoreTokens", "(", ")", ")",...
Parses a Rule line. @param st the tokenizer, not null @param mdt the object to parse into, not null
[ "Parses", "a", "Rule", "line", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/zone/TzdbZoneRulesCompiler.java#L766-L798
citrusframework/citrus
modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/embedded/EmbeddedKafkaServer.java
EmbeddedKafkaServer.createServerFactory
protected ServerCnxnFactory createServerFactory() { try { ServerCnxnFactory serverFactory = new NIOServerCnxnFactory(); serverFactory.configure(new InetSocketAddress(zookeeperPort), 5000); return serverFactory; } catch (IOException e) { throw new CitrusRun...
java
protected ServerCnxnFactory createServerFactory() { try { ServerCnxnFactory serverFactory = new NIOServerCnxnFactory(); serverFactory.configure(new InetSocketAddress(zookeeperPort), 5000); return serverFactory; } catch (IOException e) { throw new CitrusRun...
[ "protected", "ServerCnxnFactory", "createServerFactory", "(", ")", "{", "try", "{", "ServerCnxnFactory", "serverFactory", "=", "new", "NIOServerCnxnFactory", "(", ")", ";", "serverFactory", ".", "configure", "(", "new", "InetSocketAddress", "(", "zookeeperPort", ")", ...
Create server factory for embedded Zookeeper server instance. @return
[ "Create", "server", "factory", "for", "embedded", "Zookeeper", "server", "instance", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/embedded/EmbeddedKafkaServer.java#L205-L213
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.cookieExists
public void cookieExists(double seconds, String expectedCookieName) { double end = System.currentTimeMillis() + (seconds * 1000); while (!app.is().cookiePresent(expectedCookieName) && System.currentTimeMillis() < end) ; double timeTook = Math.min((seconds * 1000) - (end - System.currentTimeMilli...
java
public void cookieExists(double seconds, String expectedCookieName) { double end = System.currentTimeMillis() + (seconds * 1000); while (!app.is().cookiePresent(expectedCookieName) && System.currentTimeMillis() < end) ; double timeTook = Math.min((seconds * 1000) - (end - System.currentTimeMilli...
[ "public", "void", "cookieExists", "(", "double", "seconds", ",", "String", "expectedCookieName", ")", "{", "double", "end", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "(", "seconds", "*", "1000", ")", ";", "while", "(", "!", "app", ".", "is"...
Waits up to the provided wait time for a cookie exists in the application with the provided cookieName. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param expectedCookieName the name of the cookie @param seconds the number of seconds to wait
[ "Waits", "up", "to", "the", "provided", "wait", "time", "for", "a", "cookie", "exists", "in", "the", "application", "with", "the", "provided", "cookieName", ".", "This", "information", "will", "be", "logged", "and", "recorded", "with", "a", "screenshot", "fo...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L694-L699
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/sites/CmsSiteDetailDialog.java
CmsSiteDetailDialog.createSitemapContentFolder
private CmsResource createSitemapContentFolder(CmsObject cms, CmsResource subSitemapFolder) throws CmsException, CmsLoaderException { CmsResource configFile = null; String sitePath = cms.getSitePath(subSitemapFolder); String folderName = CmsStringUtil.joinPaths(sitePath, CmsADEManager.CONTE...
java
private CmsResource createSitemapContentFolder(CmsObject cms, CmsResource subSitemapFolder) throws CmsException, CmsLoaderException { CmsResource configFile = null; String sitePath = cms.getSitePath(subSitemapFolder); String folderName = CmsStringUtil.joinPaths(sitePath, CmsADEManager.CONTE...
[ "private", "CmsResource", "createSitemapContentFolder", "(", "CmsObject", "cms", ",", "CmsResource", "subSitemapFolder", ")", "throws", "CmsException", ",", "CmsLoaderException", "{", "CmsResource", "configFile", "=", "null", ";", "String", "sitePath", "=", "cms", "."...
Helper method for creating the .content folder of a sub-sitemap.<p> @param cms the current CMS context @param subSitemapFolder the sub-sitemap folder in which the .content folder should be created @return the created folder @throws CmsException if something goes wrong @throws CmsLoaderException if something goes wro...
[ "Helper", "method", "for", "creating", "the", ".", "content", "folder", "of", "a", "sub", "-", "sitemap", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/sites/CmsSiteDetailDialog.java#L729-L758
Samsung/GearVRf
GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java
GVREmitter.setParticleVolume
public void setParticleVolume(final float width, final float height, final float depth) { final GVRTransform thisTransform = this.getTransform(); if (null != mGVRContext) { mGVRContext.runOnGlThread(new Runnable() { @Override public void run() {Vector3f ce...
java
public void setParticleVolume(final float width, final float height, final float depth) { final GVRTransform thisTransform = this.getTransform(); if (null != mGVRContext) { mGVRContext.runOnGlThread(new Runnable() { @Override public void run() {Vector3f ce...
[ "public", "void", "setParticleVolume", "(", "final", "float", "width", ",", "final", "float", "height", ",", "final", "float", "depth", ")", "{", "final", "GVRTransform", "thisTransform", "=", "this", ".", "getTransform", "(", ")", ";", "if", "(", "null", ...
Create a bouding volume for the particle system centered at its position with the specified width, height and depth. This is important to do because the parent scene object might fall outside the viewing frustum and cause the entire system to be culled. This function creates 8 particles (mesh vertices) with very large ...
[ "Create", "a", "bouding", "volume", "for", "the", "particle", "system", "centered", "at", "its", "position", "with", "the", "specified", "width", "height", "and", "depth", ".", "This", "is", "important", "to", "do", "because", "the", "parent", "scene", "obje...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java#L205-L237
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendText
public DateTimeFormatterBuilder appendText(TemporalField field, Map<Long, String> textLookup) { Jdk8Methods.requireNonNull(field, "field"); Jdk8Methods.requireNonNull(textLookup, "textLookup"); Map<Long, String> copy = new LinkedHashMap<Long, String>(textLookup); Map<TextStyle, Map<Long,...
java
public DateTimeFormatterBuilder appendText(TemporalField field, Map<Long, String> textLookup) { Jdk8Methods.requireNonNull(field, "field"); Jdk8Methods.requireNonNull(textLookup, "textLookup"); Map<Long, String> copy = new LinkedHashMap<Long, String>(textLookup); Map<TextStyle, Map<Long,...
[ "public", "DateTimeFormatterBuilder", "appendText", "(", "TemporalField", "field", ",", "Map", "<", "Long", ",", "String", ">", "textLookup", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "field", ",", "\"field\"", ")", ";", "Jdk8Methods", ".", "requireNo...
Appends the text of a date-time field to the formatter using the specified map to supply the text. <p> The standard text outputting methods use the localized text in the JDK. This method allows that text to be specified directly. The supplied map is not validated by the builder to ensure that printing or parsing is pos...
[ "Appends", "the", "text", "of", "a", "date", "-", "time", "field", "to", "the", "formatter", "using", "the", "specified", "map", "to", "supply", "the", "text", ".", "<p", ">", "The", "standard", "text", "outputting", "methods", "use", "the", "localized", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L721-L739
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.orNotLikePattern
public ZealotKhala orNotLikePattern(String field, String pattern) { return this.doLikePattern(ZealotConst.OR_PREFIX, field, pattern, true, false); }
java
public ZealotKhala orNotLikePattern(String field, String pattern) { return this.doLikePattern(ZealotConst.OR_PREFIX, field, pattern, true, false); }
[ "public", "ZealotKhala", "orNotLikePattern", "(", "String", "field", ",", "String", "pattern", ")", "{", "return", "this", ".", "doLikePattern", "(", "ZealotConst", ".", "OR_PREFIX", ",", "field", ",", "pattern", ",", "true", ",", "false", ")", ";", "}" ]
根据指定的模式字符串生成带" OR "前缀的" NOT LIKE "模糊查询的SQL片段. <p>示例:传入 {"b.title", "Java%"} 两个参数,生成的SQL片段为:" OR b.title NOT LIKE 'Java%' "</p> @param field 数据库字段 @param pattern 模式字符串 @return ZealotKhala实例
[ "根据指定的模式字符串生成带", "OR", "前缀的", "NOT", "LIKE", "模糊查询的SQL片段", ".", "<p", ">", "示例:传入", "{", "b", ".", "title", "Java%", "}", "两个参数,生成的SQL片段为:", "OR", "b", ".", "title", "NOT", "LIKE", "Java%", "<", "/", "p", ">" ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L1170-L1172
atteo/classindex
classindex/src/main/java/org/atteo/classindex/ClassIndex.java
ClassIndex.getAnnotatedNames
public static Iterable<String> getAnnotatedNames(Class<? extends Annotation> annotation) { return getAnnotatedNames(annotation, Thread.currentThread().getContextClassLoader()); }
java
public static Iterable<String> getAnnotatedNames(Class<? extends Annotation> annotation) { return getAnnotatedNames(annotation, Thread.currentThread().getContextClassLoader()); }
[ "public", "static", "Iterable", "<", "String", ">", "getAnnotatedNames", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "return", "getAnnotatedNames", "(", "annotation", ",", "Thread", ".", "currentThread", "(", ")", ".", "getCon...
Retrieves names of classes annotated by given annotation. <p/> <p> The annotation must be annotated with {@link IndexAnnotated} for annotated classes to be indexed at compile-time by {@link org.atteo.classindex.processor.ClassIndexProcessor}. </p> <p> Please note there is no verification if the class really exists. It ...
[ "Retrieves", "names", "of", "classes", "annotated", "by", "given", "annotation", ".", "<p", "/", ">", "<p", ">", "The", "annotation", "must", "be", "annotated", "with", "{" ]
train
https://github.com/atteo/classindex/blob/ad76c6bd8b4e84c594d94e48f466a095ffe2306a/classindex/src/main/java/org/atteo/classindex/ClassIndex.java#L285-L287
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/GenericInfoUtils.java
GenericInfoUtils.create
public static GenericsInfo create(final GenericsContext context, final Type type, final Class<?> asType, final Class<?>... ignoreClasses) { // root generics are required only to properly solve type ...
java
public static GenericsInfo create(final GenericsContext context, final Type type, final Class<?> asType, final Class<?>... ignoreClasses) { // root generics are required only to properly solve type ...
[ "public", "static", "GenericsInfo", "create", "(", "final", "GenericsContext", "context", ",", "final", "Type", "type", ",", "final", "Class", "<", "?", ">", "asType", ",", "final", "Class", "<", "?", ">", "...", "ignoreClasses", ")", "{", "// root generics ...
Type analysis in context of analyzed type with child class as target type. Case: we have interface (or base type) with generic in class (as field or return type), but we need to analyze actual instance type (from value). This method will analyze type from new root (where generics are unknown), but will add known middle...
[ "Type", "analysis", "in", "context", "of", "analyzed", "type", "with", "child", "class", "as", "target", "type", ".", "Case", ":", "we", "have", "interface", "(", "or", "base", "type", ")", "with", "generic", "in", "class", "(", "as", "field", "or", "r...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/GenericInfoUtils.java#L101-L142
datastax/java-driver
core/src/main/java/com/datastax/oss/driver/internal/core/util/concurrent/CompletableFutures.java
CompletableFutures.getFailed
public static Throwable getFailed(CompletionStage<?> stage) { CompletableFuture<?> future = stage.toCompletableFuture(); Preconditions.checkArgument(future.isCompletedExceptionally()); try { future.get(); throw new AssertionError("future should be failed"); } catch (InterruptedException e) {...
java
public static Throwable getFailed(CompletionStage<?> stage) { CompletableFuture<?> future = stage.toCompletableFuture(); Preconditions.checkArgument(future.isCompletedExceptionally()); try { future.get(); throw new AssertionError("future should be failed"); } catch (InterruptedException e) {...
[ "public", "static", "Throwable", "getFailed", "(", "CompletionStage", "<", "?", ">", "stage", ")", "{", "CompletableFuture", "<", "?", ">", "future", "=", "stage", ".", "toCompletableFuture", "(", ")", ";", "Preconditions", ".", "checkArgument", "(", "future",...
Get the error now, when we know for sure that the future is failed.
[ "Get", "the", "error", "now", "when", "we", "know", "for", "sure", "that", "the", "future", "is", "failed", "." ]
train
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/core/src/main/java/com/datastax/oss/driver/internal/core/util/concurrent/CompletableFutures.java#L89-L100
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java
JQLChecker.extractColumnsToInsertOrUpdate
public Set<String> extractColumnsToInsertOrUpdate(final JQLContext jqlContext, String jqlValue, final Finder<SQLProperty> entity) { final Set<String> result = new LinkedHashSet<String>(); final One<Boolean> selectionOn = new One<Boolean>(null); final One<Boolean> insertOn = new One<Boolean>(null); // Column_n...
java
public Set<String> extractColumnsToInsertOrUpdate(final JQLContext jqlContext, String jqlValue, final Finder<SQLProperty> entity) { final Set<String> result = new LinkedHashSet<String>(); final One<Boolean> selectionOn = new One<Boolean>(null); final One<Boolean> insertOn = new One<Boolean>(null); // Column_n...
[ "public", "Set", "<", "String", ">", "extractColumnsToInsertOrUpdate", "(", "final", "JQLContext", "jqlContext", ",", "String", "jqlValue", ",", "final", "Finder", "<", "SQLProperty", ">", "entity", ")", "{", "final", "Set", "<", "String", ">", "result", "=", ...
Extract columns to insert or update. @param jqlContext the jql context @param jqlValue the jql value @param entity the entity @return the sets the
[ "Extract", "columns", "to", "insert", "or", "update", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java#L330-L380
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/GetSMSAttributesResult.java
GetSMSAttributesResult.withAttributes
public GetSMSAttributesResult withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
java
public GetSMSAttributesResult withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "GetSMSAttributesResult", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> The SMS attribute names and their values. </p> @param attributes The SMS attribute names and their values. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "SMS", "attribute", "names", "and", "their", "values", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/GetSMSAttributesResult.java#L74-L77
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java
MeasureFormat.formatMeasurePerUnit
public StringBuilder formatMeasurePerUnit( Measure measure, MeasureUnit perUnit, StringBuilder appendTo, FieldPosition pos) { MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( measure.getUnit(), perUnit); if (resolvedUnit != null) ...
java
public StringBuilder formatMeasurePerUnit( Measure measure, MeasureUnit perUnit, StringBuilder appendTo, FieldPosition pos) { MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( measure.getUnit(), perUnit); if (resolvedUnit != null) ...
[ "public", "StringBuilder", "formatMeasurePerUnit", "(", "Measure", "measure", ",", "MeasureUnit", "perUnit", ",", "StringBuilder", "appendTo", ",", "FieldPosition", "pos", ")", "{", "MeasureUnit", "resolvedUnit", "=", "MeasureUnit", ".", "resolveUnitPerUnit", "(", "me...
Formats a single measure per unit. An example of such a formatted string is "3.5 meters per second." @param measure the measure object. In above example, 3.5 meters. @param perUnit the per unit. In above example, it is MeasureUnit.SECOND @param appendTo formatted string appended here. @param pos The field posi...
[ "Formats", "a", "single", "measure", "per", "unit", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L480-L502
keenlabs/KeenClient-Java
query/src/main/java/io/keen/client/java/KeenQueryClient.java
KeenQueryClient.countUnique
public long countUnique(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.COUNT_UNIQUE) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) .withTimeframe(...
java
public long countUnique(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.COUNT_UNIQUE) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) .withTimeframe(...
[ "public", "long", "countUnique", "(", "String", "eventCollection", ",", "String", "targetProperty", ",", "Timeframe", "timeframe", ")", "throws", "IOException", "{", "Query", "queryParams", "=", "new", "Query", ".", "Builder", "(", "QueryType", ".", "COUNT_UNIQUE"...
Count Unique query with only the required arguments. Query API info here: https://keen.io/docs/api/#count-unique @param eventCollection The name of the event collection you are analyzing. @param targetProperty The name of the property you are analyzing. @param timeframe The {@link RelativeTimeframe} or {@l...
[ "Count", "Unique", "query", "with", "only", "the", "required", "arguments", ".", "Query", "API", "info", "here", ":", "https", ":", "//", "keen", ".", "io", "/", "docs", "/", "api", "/", "#count", "-", "unique" ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/query/src/main/java/io/keen/client/java/KeenQueryClient.java#L95-L103