repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
banq/jdonframework
src/main/java/com/jdon/aop/reflection/MethodConstructor.java
MethodConstructor.createObjectMethod
public Method createObjectMethod(Object ownerClass, MethodMetaArgs methodMetaArgs) { """ create a method object by target Object @param ownerClass @param methodMetaArgs @return """ Method m = null; try { m = ownerClass.getClass().getMethod(methodMetaArgs.getMethodName(...
java
public Method createObjectMethod(Object ownerClass, MethodMetaArgs methodMetaArgs) { Method m = null; try { m = ownerClass.getClass().getMethod(methodMetaArgs.getMethodName(), methodMetaArgs.getParamTypes()); } catch (NoSu...
[ "public", "Method", "createObjectMethod", "(", "Object", "ownerClass", ",", "MethodMetaArgs", "methodMetaArgs", ")", "{", "Method", "m", "=", "null", ";", "try", "{", "m", "=", "ownerClass", ".", "getClass", "(", ")", ".", "getMethod", "(", "methodMetaArgs", ...
create a method object by target Object @param ownerClass @param methodMetaArgs @return
[ "create", "a", "method", "object", "by", "target", "Object" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodConstructor.java#L118-L131
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newApplicationException
public static ApplicationException newApplicationException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link ApplicationException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@l...
java
public static ApplicationException newApplicationException(Throwable cause, String message, Object... args) { return new ApplicationException(format(message, args), cause); }
[ "public", "static", "ApplicationException", "newApplicationException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "ApplicationException", "(", "format", "(", "message", ",", "args", ")", ",", "ca...
Constructs and initializes a new {@link ApplicationException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link ApplicationException} was thrown. @param message {@link String} descri...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "ApplicationException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Obj...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L775-L777
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.setEnum
public <T extends Enum<T>> void setEnum(String name, T value) { """ Set the value of the <code>name</code> property to the given type. This is equivalent to <code>set(&lt;name&gt;, value.toString())</code>. @param name property name @param value new value """ set(name, value.toString()); }
java
public <T extends Enum<T>> void setEnum(String name, T value) { set(name, value.toString()); }
[ "public", "<", "T", "extends", "Enum", "<", "T", ">", ">", "void", "setEnum", "(", "String", "name", ",", "T", "value", ")", "{", "set", "(", "name", ",", "value", ".", "toString", "(", ")", ")", ";", "}" ]
Set the value of the <code>name</code> property to the given type. This is equivalent to <code>set(&lt;name&gt;, value.toString())</code>. @param name property name @param value new value
[ "Set", "the", "value", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", "to", "the", "given", "type", ".", "This", "is", "equivalent", "to", "<code", ">", "set", "(", "&lt", ";", "name&gt", ";", "value", ".", "toString", "()", ")", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1572-L1574
Azure/azure-sdk-for-java
resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java
ResourceGroupsInner.patchAsync
public Observable<ResourceGroupInner> patchAsync(String resourceGroupName, ResourceGroupInner parameters) { """ Updates a resource group. Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is u...
java
public Observable<ResourceGroupInner> patchAsync(String resourceGroupName, ResourceGroupInner parameters) { return patchWithServiceResponseAsync(resourceGroupName, parameters).map(new Func1<ServiceResponse<ResourceGroupInner>, ResourceGroupInner>() { @Override public ResourceGroupInner c...
[ "public", "Observable", "<", "ResourceGroupInner", ">", "patchAsync", "(", "String", "resourceGroupName", ",", "ResourceGroupInner", "parameters", ")", "{", "return", "patchWithServiceResponseAsync", "(", "resourceGroupName", ",", "parameters", ")", ".", "map", "(", "...
Updates a resource group. Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained. @param resourceGroupName The name of the resource group to update. The nam...
[ "Updates", "a", "resource", "group", ".", "Resource", "groups", "can", "be", "updated", "through", "a", "simple", "PATCH", "operation", "to", "a", "group", "address", ".", "The", "format", "of", "the", "request", "is", "the", "same", "as", "that", "for", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java#L788-L795
alkacon/opencms-core
src/org/opencms/main/CmsSessionManager.java
CmsSessionManager.sendBroadcast
public void sendBroadcast(CmsObject cms, String message, String sessionId, boolean repeat) { """ Sends a broadcast to the specified user session.<p> @param cms the OpenCms user context of the user sending the broadcast @param message the message to broadcast @param sessionId the OpenCms session uuid target ...
java
public void sendBroadcast(CmsObject cms, String message, String sessionId, boolean repeat) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(message)) { // don't broadcast empty messages return; } // send the broadcast only to the selected session CmsSessionInfo sessio...
[ "public", "void", "sendBroadcast", "(", "CmsObject", "cms", ",", "String", "message", ",", "String", "sessionId", ",", "boolean", "repeat", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "message", ")", ")", "{", "// don't broadcast e...
Sends a broadcast to the specified user session.<p> @param cms the OpenCms user context of the user sending the broadcast @param message the message to broadcast @param sessionId the OpenCms session uuid target (receiver) of the broadcast @param repeat repeat this message
[ "Sends", "a", "broadcast", "to", "the", "specified", "user", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsSessionManager.java#L392-L406
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java
KinesisDataFetcher.updateState
protected final void updateState(int shardStateIndex, SequenceNumber lastSequenceNumber) { """ Update the shard to last processed sequence number state. This method is called by {@link ShardConsumer}s. @param shardStateIndex index of the shard to update in subscribedShardsState; this index should be the retur...
java
protected final void updateState(int shardStateIndex, SequenceNumber lastSequenceNumber) { synchronized (checkpointLock) { subscribedShardsState.get(shardStateIndex).setLastProcessedSequenceNum(lastSequenceNumber); // if a shard's state is updated to be SENTINEL_SHARD_ENDING_SEQUENCE_NUM by its consumer thread...
[ "protected", "final", "void", "updateState", "(", "int", "shardStateIndex", ",", "SequenceNumber", "lastSequenceNumber", ")", "{", "synchronized", "(", "checkpointLock", ")", "{", "subscribedShardsState", ".", "get", "(", "shardStateIndex", ")", ".", "setLastProcessed...
Update the shard to last processed sequence number state. This method is called by {@link ShardConsumer}s. @param shardStateIndex index of the shard to update in subscribedShardsState; this index should be the returned value from {@link KinesisDataFetcher#registerNewSubscribedShardState(KinesisStreamShardState)}, call...
[ "Update", "the", "shard", "to", "last", "processed", "sequence", "number", "state", ".", "This", "method", "is", "called", "by", "{", "@link", "ShardConsumer", "}", "s", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java#L641-L663
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.updateTags
public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName) { """ Updates the specified application gateway tags. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException ...
java
public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName) { return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); }
[ "public", "ApplicationGatewayInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "applicationGatewayName", ")", ".", "toBlocking", "(", ")...
Updates the specified application gateway tags. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throw...
[ "Updates", "the", "specified", "application", "gateway", "tags", "." ]
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/ApplicationGatewaysInner.java#L573-L575
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabGroupRenderer.java
WTabGroupRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WTabGroup. @param component the WTabGroup to paint. @param renderContext the RenderContext to paint to. """ WTabGroup group = (WTabGroup) component; paintChildren(group, renderCon...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTabGroup group = (WTabGroup) component; paintChildren(group, renderContext); }
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTabGroup", "group", "=", "(", "WTabGroup", ")", "component", ";", "paintChildren", "(", "group", ",", "rende...
Paints the given WTabGroup. @param component the WTabGroup to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTabGroup", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabGroupRenderer.java#L23-L27
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java
EventServiceImpl.logFailure
private void logFailure(String message, Object... args) { """ Increase the failure count and log the failure. Every {@value #WARNING_LOG_FREQUENCY} log is logged with a higher log level. @param message the log message @param args the log message arguments """ totalFailures.inc(); long ...
java
private void logFailure(String message, Object... args) { totalFailures.inc(); long total = totalFailures.get(); // it can happen that 2 threads at the same conclude that the level should be warn because of the // non atomic int/get. This is an acceptable trade of since it is unlikely ...
[ "private", "void", "logFailure", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "totalFailures", ".", "inc", "(", ")", ";", "long", "total", "=", "totalFailures", ".", "get", "(", ")", ";", "// it can happen that 2 threads at the same conclude...
Increase the failure count and log the failure. Every {@value #WARNING_LOG_FREQUENCY} log is logged with a higher log level. @param message the log message @param args the log message arguments
[ "Increase", "the", "failure", "count", "and", "log", "the", "failure", ".", "Every", "{", "@value", "#WARNING_LOG_FREQUENCY", "}", "log", "is", "logged", "with", "a", "higher", "log", "level", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java#L657-L671
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java
DevicesInner.getExtendedInformation
public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { """ Gets additional information for the specified data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException ...
java
public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { return getExtendedInformationWithServiceResponseAsync(deviceName, resourceGroupName).toBlocking().single().body(); }
[ "public", "DataBoxEdgeDeviceExtendedInfoInner", "getExtendedInformation", "(", "String", "deviceName", ",", "String", "resourceGroupName", ")", "{", "return", "getExtendedInformationWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroupName", ")", ".", "toBlocking", ...
Gets additional information for the specified data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeEx...
[ "Gets", "additional", "information", "for", "the", "specified", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L1357-L1359
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.updateTagsAsync
public Observable<VirtualNetworkGatewayInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map<String, String> tags) { """ Updates a virtual network gateway tags. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual net...
java
public Observable<VirtualNetworkGatewayInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1<ServiceResponse<VirtualNetworkGatewayInner>, VirtualNe...
[ "public", "Observable", "<", "VirtualNetworkGatewayInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAs...
Updates a virtual network gateway tags. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "a", "virtual", "network", "gateway", "tags", "." ]
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#L708-L715
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/ByteArrayUtil.java
ByteArrayUtil.putShortBE
public static void putShortBE(final byte[] array, final int offset, final short value) { """ Put the source <i>short</i> into the destination byte array starting at the given offset in big endian order. There is no bounds checking. @param array destination byte array @param offset destination offset @param va...
java
public static void putShortBE(final byte[] array, final int offset, final short value) { array[offset + 1] = (byte) (value ); array[offset ] = (byte) (value >>> 8); }
[ "public", "static", "void", "putShortBE", "(", "final", "byte", "[", "]", "array", ",", "final", "int", "offset", ",", "final", "short", "value", ")", "{", "array", "[", "offset", "+", "1", "]", "=", "(", "byte", ")", "(", "value", ")", ";", "array...
Put the source <i>short</i> into the destination byte array starting at the given offset in big endian order. There is no bounds checking. @param array destination byte array @param offset destination offset @param value source <i>short</i>
[ "Put", "the", "source", "<i", ">", "short<", "/", "i", ">", "into", "the", "destination", "byte", "array", "starting", "at", "the", "given", "offset", "in", "big", "endian", "order", ".", "There", "is", "no", "bounds", "checking", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/ByteArrayUtil.java#L52-L55
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/UIManager.java
UIManager.createRenderer
private static Renderer createRenderer(final String rendererName) { """ Attempts to create a Renderer with the given name. @param rendererName the name of the Renderer @return a Renderer of the given type, or null if the class was not found. """ if (rendererName.endsWith(".vm")) { // This is a velocit...
java
private static Renderer createRenderer(final String rendererName) { if (rendererName.endsWith(".vm")) { // This is a velocity template, so use a VelocityLayout return new VelocityRenderer(rendererName); } try { Class<?> managerClass = Class.forName(rendererName); Object manager = managerClass.newInst...
[ "private", "static", "Renderer", "createRenderer", "(", "final", "String", "rendererName", ")", "{", "if", "(", "rendererName", ".", "endsWith", "(", "\".vm\"", ")", ")", "{", "// This is a velocity template, so use a VelocityLayout", "return", "new", "VelocityRenderer"...
Attempts to create a Renderer with the given name. @param rendererName the name of the Renderer @return a Renderer of the given type, or null if the class was not found.
[ "Attempts", "to", "create", "a", "Renderer", "with", "the", "given", "name", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/UIManager.java#L288-L311
liferay/com-liferay-commerce
commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java
CPDefinitionVirtualSettingPersistenceImpl.fetchByUUID_G
@Override public CPDefinitionVirtualSetting fetchByUUID_G(String uuid, long groupId) { """ Returns the cp definition virtual setting where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return th...
java
@Override public CPDefinitionVirtualSetting fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPDefinitionVirtualSetting", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp definition virtual setting where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp definition virtual setting, or <code>null</code> if a matching cp definition virtual se...
[ "Returns", "the", "cp", "definition", "virtual", "setting", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", ...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java#L711-L714
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java
AbstractDataDictionaryParser.parseMappingDefinitions
private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) { """ Parses all mapping definitions and adds those to the bean definition builder as property value. @param builder the target bean definition builder. @param element the source element. """ HashMap<String, String>...
java
private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) { HashMap<String, String> mappings = new HashMap<String, String>(); for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) { mappings.put(matcher.getAttribute("path"), matcher.getAttr...
[ "private", "void", "parseMappingDefinitions", "(", "BeanDefinitionBuilder", "builder", ",", "Element", "element", ")", "{", "HashMap", "<", "String", ",", "String", ">", "mappings", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "fo...
Parses all mapping definitions and adds those to the bean definition builder as property value. @param builder the target bean definition builder. @param element the source element.
[ "Parses", "all", "mapping", "definitions", "and", "adds", "those", "to", "the", "bean", "definition", "builder", "as", "property", "value", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java#L67-L76
amaembo/streamex
src/main/java/one/util/streamex/DoubleStreamEx.java
DoubleStreamEx.pairMap
public DoubleStreamEx pairMap(DoubleBinaryOperator mapper) { """ Returns a stream consisting of the results of applying the given function to the every adjacent pair of elements of this stream. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. <p> The output stream ...
java
public DoubleStreamEx pairMap(DoubleBinaryOperator mapper) { return delegate(new PairSpliterator.PSOfDouble(mapper, null, spliterator(), PairSpliterator.MODE_PAIRS)); }
[ "public", "DoubleStreamEx", "pairMap", "(", "DoubleBinaryOperator", "mapper", ")", "{", "return", "delegate", "(", "new", "PairSpliterator", ".", "PSOfDouble", "(", "mapper", ",", "null", ",", "spliterator", "(", ")", ",", "PairSpliterator", ".", "MODE_PAIRS", "...
Returns a stream consisting of the results of applying the given function to the every adjacent pair of elements of this stream. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. <p> The output stream will contain one element less than this stream. If this stream contains zero o...
[ "Returns", "a", "stream", "consisting", "of", "the", "results", "of", "applying", "the", "given", "function", "to", "the", "every", "adjacent", "pair", "of", "elements", "of", "this", "stream", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/DoubleStreamEx.java#L1321-L1323
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
SystemViewImporter.parseValues
private List<ValueData> parseValues() throws RepositoryException { """ Returns the list of ValueData for current property @return @throws RepositoryException """ List<ValueData> values = new ArrayList<ValueData>(propertyInfo.getValuesSize()); List<String> stringValues = new ArrayList<String>();...
java
private List<ValueData> parseValues() throws RepositoryException { List<ValueData> values = new ArrayList<ValueData>(propertyInfo.getValuesSize()); List<String> stringValues = new ArrayList<String>(); for (int k = 0; k < propertyInfo.getValuesSize(); k++) { if (propertyInfo.getType(...
[ "private", "List", "<", "ValueData", ">", "parseValues", "(", ")", "throws", "RepositoryException", "{", "List", "<", "ValueData", ">", "values", "=", "new", "ArrayList", "<", "ValueData", ">", "(", "propertyInfo", ".", "getValuesSize", "(", ")", ")", ";", ...
Returns the list of ValueData for current property @return @throws RepositoryException
[ "Returns", "the", "list", "of", "ValueData", "for", "current", "property" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java#L655-L702
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java
SARLEclipsePlugin.createStatus
public IStatus createStatus(int severity, String message, Throwable cause) { """ Create a status. @param severity the severity level, see {@link IStatus}. @param message the message associated to the status. @param cause the cause of the problem. @return the status. """ return createStatus(severity, 0,...
java
public IStatus createStatus(int severity, String message, Throwable cause) { return createStatus(severity, 0, message, cause); }
[ "public", "IStatus", "createStatus", "(", "int", "severity", ",", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "createStatus", "(", "severity", ",", "0", ",", "message", ",", "cause", ")", ";", "}" ]
Create a status. @param severity the severity level, see {@link IStatus}. @param message the message associated to the status. @param cause the cause of the problem. @return the status.
[ "Create", "a", "status", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java#L148-L150
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.addJob
public static void addJob(String jobName, String jobClassName) throws SundialSchedulerException { """ Adds a Job to the scheduler. Replaces a matching existing Job. @param jobName @param jobClassName """ addJob(jobName, jobClassName, null, false); }
java
public static void addJob(String jobName, String jobClassName) throws SundialSchedulerException { addJob(jobName, jobClassName, null, false); }
[ "public", "static", "void", "addJob", "(", "String", "jobName", ",", "String", "jobClassName", ")", "throws", "SundialSchedulerException", "{", "addJob", "(", "jobName", ",", "jobClassName", ",", "null", ",", "false", ")", ";", "}" ]
Adds a Job to the scheduler. Replaces a matching existing Job. @param jobName @param jobClassName
[ "Adds", "a", "Job", "to", "the", "scheduler", ".", "Replaces", "a", "matching", "existing", "Job", "." ]
train
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L200-L203
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java
SSLUtils.copyBuffer
public static void copyBuffer(WsByteBuffer src, WsByteBuffer dst, int length) { """ Copy all the contents of the source buffer into the destination buffer. The contents copied from the source buffer will be from its position. The data will be copied into the destination buffer starting at its current position. ...
java
public static void copyBuffer(WsByteBuffer src, WsByteBuffer dst, int length) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "copyBuffer: length=" + length + "\r\n\tsrc: " + getBufferTraceInfo(src) + "\r\n\tdst: " +...
[ "public", "static", "void", "copyBuffer", "(", "WsByteBuffer", "src", ",", "WsByteBuffer", "dst", ",", "int", "length", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr"...
Copy all the contents of the source buffer into the destination buffer. The contents copied from the source buffer will be from its position. The data will be copied into the destination buffer starting at its current position. @param src @param dst @param length
[ "Copy", "all", "the", "contents", "of", "the", "source", "buffer", "into", "the", "destination", "buffer", ".", "The", "contents", "copied", "from", "the", "source", "buffer", "will", "be", "from", "its", "position", ".", "The", "data", "will", "be", "copi...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java#L388-L419
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java
OrderUrl.getOrderUrl
public static MozuUrl getOrderUrl(Boolean draft, Boolean includeBin, String orderId, String responseFields) { """ Get Resource Url for GetOrder @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. @param includeBin @param orderId ...
java
public static MozuUrl getOrderUrl(Boolean draft, Boolean includeBin, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}?draft={draft}&includeBin={includeBin}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.forma...
[ "public", "static", "MozuUrl", "getOrderUrl", "(", "Boolean", "draft", ",", "Boolean", "includeBin", ",", "String", "orderId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{orderId}?dr...
Get Resource Url for GetOrder @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. @param includeBin @param orderId Unique identifier of the order. @param responseFields Filtering syntax appended to an API call to increase or decrease the...
[ "Get", "Resource", "Url", "for", "GetOrder" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java#L74-L82
elki-project/elki
elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/similarityfunction/kernel/KernelMatrix.java
KernelMatrix.getSimilarity
public double getSimilarity(DBIDRef id1, DBIDRef id2) { """ Get the kernel similarity for the given objects. @param id1 First object @param id2 Second object @return Similarity. """ return kernel[idmap.getOffset(id1)][idmap.getOffset(id2)]; }
java
public double getSimilarity(DBIDRef id1, DBIDRef id2) { return kernel[idmap.getOffset(id1)][idmap.getOffset(id2)]; }
[ "public", "double", "getSimilarity", "(", "DBIDRef", "id1", ",", "DBIDRef", "id2", ")", "{", "return", "kernel", "[", "idmap", ".", "getOffset", "(", "id1", ")", "]", "[", "idmap", ".", "getOffset", "(", "id2", ")", "]", ";", "}" ]
Get the kernel similarity for the given objects. @param id1 First object @param id2 Second object @return Similarity.
[ "Get", "the", "kernel", "similarity", "for", "the", "given", "objects", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/similarityfunction/kernel/KernelMatrix.java#L272-L274
zaproxy/zaproxy
src/org/zaproxy/zap/extension/brk/BreakpointMessageHandler2.java
BreakpointMessageHandler2.isBreakpoint
public boolean isBreakpoint(Message aMessage, boolean isRequest, boolean onlyIfInScope) { """ You have to handle {@link Mode#safe} outside. @param aMessage @param isRequest @param onlyIfInScope @return True if a breakpoint for given message exists. """ if (aMessage.isForceIntercept()) { ...
java
public boolean isBreakpoint(Message aMessage, boolean isRequest, boolean onlyIfInScope) { if (aMessage.isForceIntercept()) { // The browser told us to do it Your Honour return true; } if (onlyIfInScope && ! aMessage.isInScope()) { return false;...
[ "public", "boolean", "isBreakpoint", "(", "Message", "aMessage", ",", "boolean", "isRequest", ",", "boolean", "onlyIfInScope", ")", "{", "if", "(", "aMessage", ".", "isForceIntercept", "(", ")", ")", "{", "// The browser told us to do it Your Honour\r", "return", "t...
You have to handle {@link Mode#safe} outside. @param aMessage @param isRequest @param onlyIfInScope @return True if a breakpoint for given message exists.
[ "You", "have", "to", "handle", "{", "@link", "Mode#safe", "}", "outside", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/brk/BreakpointMessageHandler2.java#L142-L164
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java
ConfigurationsInner.get
public Map<String, String> get(String resourceGroupName, String clusterName, String configurationName) { """ The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. @param resourceGroupName The nam...
java
public Map<String, String> get(String resourceGroupName, String clusterName, String configurationName) { return getWithServiceResponseAsync(resourceGroupName, clusterName, configurationName).toBlocking().single().body(); }
[ "public", "Map", "<", "String", ",", "String", ">", "get", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "configurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ",", "...
The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param configurationName The name of the cluste...
[ "The", "configuration", "object", "for", "the", "specified", "cluster", ".", "This", "API", "is", "not", "recommended", "and", "might", "be", "removed", "in", "the", "future", ".", "Please", "consider", "using", "List", "configurations", "API", "instead", "." ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java#L358-L360
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileSystem.java
FileSystem.getStatistics
public static synchronized Statistics getStatistics(String scheme, Class<? extends FileSystem> cls) { """ Get the statistics for a particular file system @param cls the class to lookup @return a statistics object """ Statistics result = statisticsTable.get(cls); if (result == null) { result ...
java
public static synchronized Statistics getStatistics(String scheme, Class<? extends FileSystem> cls) { Statistics result = statisticsTable.get(cls); if (result == null) { result = new Statistics(scheme); statisticsTable.put(cls, result); } return result; }
[ "public", "static", "synchronized", "Statistics", "getStatistics", "(", "String", "scheme", ",", "Class", "<", "?", "extends", "FileSystem", ">", "cls", ")", "{", "Statistics", "result", "=", "statisticsTable", ".", "get", "(", "cls", ")", ";", "if", "(", ...
Get the statistics for a particular file system @param cls the class to lookup @return a statistics object
[ "Get", "the", "statistics", "for", "a", "particular", "file", "system" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileSystem.java#L2429-L2437
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/i18n/dao/GeneratedDi18nDaoImpl.java
GeneratedDi18nDaoImpl.queryByLocale
public Iterable<Di18n> queryByLocale(java.lang.String locale) { """ query-by method for field locale @param locale the specified attribute @return an Iterable of Di18ns for the specified locale """ return queryByField(null, Di18nMapper.Field.LOCALE.getFieldName(), locale); }
java
public Iterable<Di18n> queryByLocale(java.lang.String locale) { return queryByField(null, Di18nMapper.Field.LOCALE.getFieldName(), locale); }
[ "public", "Iterable", "<", "Di18n", ">", "queryByLocale", "(", "java", ".", "lang", ".", "String", "locale", ")", "{", "return", "queryByField", "(", "null", ",", "Di18nMapper", ".", "Field", ".", "LOCALE", ".", "getFieldName", "(", ")", ",", "locale", "...
query-by method for field locale @param locale the specified attribute @return an Iterable of Di18ns for the specified locale
[ "query", "-", "by", "method", "for", "field", "locale" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/i18n/dao/GeneratedDi18nDaoImpl.java#L79-L81
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/common/ImplicitObjectUtil.java
ImplicitObjectUtil.loadImplicitObjects
public static void loadImplicitObjects(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, PageFlowController currentPageFlow) { """ Load the NetUI f...
java
public static void loadImplicitObjects(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, PageFlowController currentPageFlow) { // @todo: add an ...
[ "public", "static", "void", "loadImplicitObjects", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "ServletContext", "servletContext", ",", "PageFlowController", "currentPageFlow", ")", "{", "// @todo: add an interceptor chain here for putting i...
Load the NetUI framework's implicit objects into the request. @param request the request @param response the response @param servletContext the servlet context @param currentPageFlow the current page flow
[ "Load", "the", "NetUI", "framework", "s", "implicit", "objects", "into", "the", "request", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/common/ImplicitObjectUtil.java#L69-L79
Samsung/GearVRf
GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/Particles.java
Particles.makeParticleMesh
GVRSceneObject makeParticleMesh(float[] vertices, float[] velocities, float[] particleTimeStamps ) { """ Creates and returns a GVRSceneObject with the specified mesh attributes. @param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ......
java
GVRSceneObject makeParticleMesh(float[] vertices, float[] velocities, float[] particleTimeStamps ) { mParticleMesh = new GVRMesh(mGVRContext); //pass the particle positions as vertices, velocities as normals, and //spawning times as texture coordin...
[ "GVRSceneObject", "makeParticleMesh", "(", "float", "[", "]", "vertices", ",", "float", "[", "]", "velocities", ",", "float", "[", "]", "particleTimeStamps", ")", "{", "mParticleMesh", "=", "new", "GVRMesh", "(", "mGVRContext", ")", ";", "//pass the particle pos...
Creates and returns a GVRSceneObject with the specified mesh attributes. @param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...) @param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...) @param particleTimeStamps the spawning times of each vertex....
[ "Creates", "and", "returns", "a", "GVRSceneObject", "with", "the", "specified", "mesh", "attributes", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/Particles.java#L79-L123
h2oai/h2o-3
h2o-core/src/main/java/water/parser/ParserProvider.java
ParserProvider.guessSetup
public ParseSetup guessSetup(ByteVec v, byte[] bits, byte sep, int ncols, boolean singleQuotes, int checkHeader, String[] columnNames, byte[] columnTypes, String[][] domains, String[][] naStrings) { """ Returns parser setup of throws exception if input is not recognized """ throw new UnsupportedOperationEx...
java
public ParseSetup guessSetup(ByteVec v, byte[] bits, byte sep, int ncols, boolean singleQuotes, int checkHeader, String[] columnNames, byte[] columnTypes, String[][] domains, String[][] naStrings) { throw new UnsupportedOperationException("Not implemented. This method is kept only for backwards compatibility. " + ...
[ "public", "ParseSetup", "guessSetup", "(", "ByteVec", "v", ",", "byte", "[", "]", "bits", ",", "byte", "sep", ",", "int", "ncols", ",", "boolean", "singleQuotes", ",", "int", "checkHeader", ",", "String", "[", "]", "columnNames", ",", "byte", "[", "]", ...
Returns parser setup of throws exception if input is not recognized
[ "Returns", "parser", "setup", "of", "throws", "exception", "if", "input", "is", "not", "recognized" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParserProvider.java#L81-L84
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
ConfigClient.createExclusion
public final LogExclusion createExclusion(ParentName parent, LogExclusion exclusion) { """ Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. <p>Sample code: <pre><code> try (ConfigClient confi...
java
public final LogExclusion createExclusion(ParentName parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setExclusion(exclusion) .build(); return createExclusion...
[ "public", "final", "LogExclusion", "createExclusion", "(", "ParentName", "parent", ",", "LogExclusion", "exclusion", ")", "{", "CreateExclusionRequest", "request", "=", "CreateExclusionRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "nu...
Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. <p>Sample code: <pre><code> try (ConfigClient configClient = ConfigClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogExclusion exclu...
[ "Creates", "a", "new", "exclusion", "in", "a", "specified", "parent", "resource", ".", "Only", "log", "entries", "belonging", "to", "that", "resource", "can", "be", "excluded", ".", "You", "can", "have", "up", "to", "10", "exclusions", "in", "a", "resource...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java#L1114-L1122
apache/incubator-heron
heron/packing/src/java/org/apache/heron/packing/binpacking/FirstFitDecreasingPacking.java
FirstFitDecreasingPacking.repack
public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> componentChanges) { """ Get a new packing plan given an existing packing plan and component-level changes. @return new packing plan """ PackingPlanBuilder planBuilder = newPackingPlanBuilder(currentPackingPlan); // Get the...
java
public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> componentChanges) { PackingPlanBuilder planBuilder = newPackingPlanBuilder(currentPackingPlan); // Get the instances using FFD allocation try { planBuilder = getFFDAllocation(planBuilder, currentPackingPlan, componentChang...
[ "public", "PackingPlan", "repack", "(", "PackingPlan", "currentPackingPlan", ",", "Map", "<", "String", ",", "Integer", ">", "componentChanges", ")", "{", "PackingPlanBuilder", "planBuilder", "=", "newPackingPlanBuilder", "(", "currentPackingPlan", ")", ";", "// Get t...
Get a new packing plan given an existing packing plan and component-level changes. @return new packing plan
[ "Get", "a", "new", "packing", "plan", "given", "an", "existing", "packing", "plan", "and", "component", "-", "level", "changes", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/packing/src/java/org/apache/heron/packing/binpacking/FirstFitDecreasingPacking.java#L153-L164
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/caching/module/StandardCache.java
StandardCache.createCache
public static <K, V> Cache<K, V> createCache(String cacheName, int ttl, long cleanupInterval/*, Application application, Layer layer*/) { """ Retrieves a cache from the current layer or creates it. Only a root request will be able to embed the constructed cache in the application. @param cacheName cache...
java
public static <K, V> Cache<K, V> createCache(String cacheName, int ttl, long cleanupInterval/*, Application application, Layer layer*/) { StandardCache cache = new StandardCache(ttl, cleanupInterval); cache.setProperties(new Properties()); cache.start(); return cache; }
[ "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "createCache", "(", "String", "cacheName", ",", "int", "ttl", ",", "long", "cleanupInterval", "/*, Application application, Layer layer*/", ")", "{", "StandardCache", "cache", "=", ...
Retrieves a cache from the current layer or creates it. Only a root request will be able to embed the constructed cache in the application. @param cacheName cache service ID @param ttl time to live in seconds @param cleanupInterval cleanup interval in seconds @return
[ "Retrieves", "a", "cache", "from", "the", "current", "layer", "or", "creates", "it", ".", "Only", "a", "root", "request", "will", "be", "able", "to", "embed", "the", "constructed", "cache", "in", "the", "application", "." ]
train
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/caching/module/StandardCache.java#L418-L423
jbundle/jbundle
base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcTable.java
JdbcTable.setResultSet
public void setResultSet(ResultSet resultSet, int iType) { """ Set the ResultSet for this select or seek statement type. @param resultSet The resultSet to set. @return The old resultSet. """ if (this.getResultSet(iType) != null) { // If this is a new resultSet for my current statement, clos...
java
public void setResultSet(ResultSet resultSet, int iType) { if (this.getResultSet(iType) != null) { // If this is a new resultSet for my current statement, close the old resultSet. try { this.getResultSet(iType).close(); } catch (SQLException e) { ...
[ "public", "void", "setResultSet", "(", "ResultSet", "resultSet", ",", "int", "iType", ")", "{", "if", "(", "this", ".", "getResultSet", "(", "iType", ")", "!=", "null", ")", "{", "// If this is a new resultSet for my current statement, close the old resultSet.", "try"...
Set the ResultSet for this select or seek statement type. @param resultSet The resultSet to set. @return The old resultSet.
[ "Set", "the", "ResultSet", "for", "this", "select", "or", "seek", "statement", "type", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcTable.java#L472-L510
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java
IdentityPatchRunner.rollbackLast
public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException { """ Rollback the last applied patch. @param contentPolicy the content policy @param resetConfiguration w...
java
public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException { // Determine the patch id to rollback String patchId; final List<String> oneOffs = modificati...
[ "public", "PatchingResult", "rollbackLast", "(", "final", "ContentVerificationPolicy", "contentPolicy", ",", "final", "boolean", "resetConfiguration", ",", "InstallationManager", ".", "InstallationModification", "modification", ")", "throws", "PatchingException", "{", "// Det...
Rollback the last applied patch. @param contentPolicy the content policy @param resetConfiguration whether to reset the configuration @param modification the installation modification @return the patching result @throws PatchingException
[ "Rollback", "the", "last", "applied", "patch", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L284-L298
JakeWharton/ActionBarSherlock
actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java
ResourcesCompat.getResources_getInteger
public static int getResources_getInteger(Context context, int id) { """ Support implementation of {@code getResources().getInteger()} that we can use to simulate filtering based on width qualifiers on pre-3.2. @param context Context to load integers from on 3.2+ and to fetch the display metrics. @param id I...
java
public static int getResources_getInteger(Context context, int id) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { return context.getResources().getInteger(id); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); float widthDp = metrics...
[ "public", "static", "int", "getResources_getInteger", "(", "Context", "context", ",", "int", "id", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB_MR2", ")", "{", "return", "context", ".", ...
Support implementation of {@code getResources().getInteger()} that we can use to simulate filtering based on width qualifiers on pre-3.2. @param context Context to load integers from on 3.2+ and to fetch the display metrics. @param id Id of integer to load. @return Associated integer value as reflected by the current ...
[ "Support", "implementation", "of", "{", "@code", "getResources", "()", ".", "getInteger", "()", "}", "that", "we", "can", "use", "to", "simulate", "filtering", "based", "on", "width", "qualifiers", "on", "pre", "-", "3", ".", "2", "." ]
train
https://github.com/JakeWharton/ActionBarSherlock/blob/2c71339e756bcc0b1424c4525680549ba3a2dc97/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java#L80-L102
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.getCurrency
public static CurrencyUnit getCurrency(Locale locale, String... providers) { """ Access a new instance based on the {@link Locale}. Currencies are available as provided by {@link CurrencyProviderSpi} instances registered with the {@link javax.money.spi.Bootstrap}. @param locale the target {@link Locale}, t...
java
public static CurrencyUnit getCurrency(Locale locale, String... providers) { return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow( () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup.")) .getCurrency(locale, provid...
[ "public", "static", "CurrencyUnit", "getCurrency", "(", "Locale", "locale", ",", "String", "...", "providers", ")", "{", "return", "Optional", ".", "ofNullable", "(", "MONETARY_CURRENCIES_SINGLETON_SPI", "(", ")", ")", ".", "orElseThrow", "(", "(", ")", "->", ...
Access a new instance based on the {@link Locale}. Currencies are available as provided by {@link CurrencyProviderSpi} instances registered with the {@link javax.money.spi.Bootstrap}. @param locale the target {@link Locale}, typically representing an ISO country, not {@code null}. @param providers the (optional) sp...
[ "Access", "a", "new", "instance", "based", "on", "the", "{", "@link", "Locale", "}", ".", "Currencies", "are", "available", "as", "provided", "by", "{", "@link", "CurrencyProviderSpi", "}", "instances", "registered", "with", "the", "{", "@link", "javax", "."...
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L403-L407
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.doOptions
@Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) { """ Process a OPTIONS WebDAV request for the specified resource.<p> @param req the servlet request we are processing @param resp the servlet response we are creating """ resp.addHeader("DAV", "1,2"); ...
java
@Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) { resp.addHeader("DAV", "1,2"); StringBuffer methodsAllowed = determineMethodsAllowed(getRelativePath(req)); resp.addHeader(HEADER_ALLOW, methodsAllowed.toString()); resp.addHeader("MS-Author-Via"...
[ "@", "Override", "protected", "void", "doOptions", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "{", "resp", ".", "addHeader", "(", "\"DAV\"", ",", "\"1,2\"", ")", ";", "StringBuffer", "methodsAllowed", "=", "determineMethodsAllowed", ...
Process a OPTIONS WebDAV request for the specified resource.<p> @param req the servlet request we are processing @param resp the servlet response we are creating
[ "Process", "a", "OPTIONS", "WebDAV", "request", "for", "the", "specified", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L1767-L1776
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/MethodCompiler.java
MethodCompiler.newarray
public void newarray(Class<?> type, int count) throws IOException { """ Create new array <p>Stack: ..., count =&gt; ..., arrayref @param type array class eg. String[].class @param count array count @throws IOException """ newarray(Typ.getTypeFor(type), count); }
java
public void newarray(Class<?> type, int count) throws IOException { newarray(Typ.getTypeFor(type), count); }
[ "public", "void", "newarray", "(", "Class", "<", "?", ">", "type", ",", "int", "count", ")", "throws", "IOException", "{", "newarray", "(", "Typ", ".", "getTypeFor", "(", "type", ")", ",", "count", ")", ";", "}" ]
Create new array <p>Stack: ..., count =&gt; ..., arrayref @param type array class eg. String[].class @param count array count @throws IOException
[ "Create", "new", "array", "<p", ">", "Stack", ":", "...", "count", "=", "&gt", ";", "...", "arrayref" ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/MethodCompiler.java#L444-L447
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.getInt
public static Integer getInt(Map<?, ?> map, Object key) { """ 获取Map指定key的值,并转换为Integer @param map Map @param key 键 @return 值 @since 4.0.6 """ return get(map, key, Integer.class); }
java
public static Integer getInt(Map<?, ?> map, Object key) { return get(map, key, Integer.class); }
[ "public", "static", "Integer", "getInt", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Object", "key", ")", "{", "return", "get", "(", "map", ",", "key", ",", "Integer", ".", "class", ")", ";", "}" ]
获取Map指定key的值,并转换为Integer @param map Map @param key 键 @return 值 @since 4.0.6
[ "获取Map指定key的值,并转换为Integer" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L768-L770
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java
OmemoService.removeOurDevice
static void removeOurDevice(OmemoDevice userDevice, Collection<OmemoDevice> devices) { """ Remove our device from the collection of devices. @param userDevice our OmemoDevice @param devices collection of OmemoDevices """ if (devices.contains(userDevice)) { devices.remove(userDevice); ...
java
static void removeOurDevice(OmemoDevice userDevice, Collection<OmemoDevice> devices) { if (devices.contains(userDevice)) { devices.remove(userDevice); } }
[ "static", "void", "removeOurDevice", "(", "OmemoDevice", "userDevice", ",", "Collection", "<", "OmemoDevice", ">", "devices", ")", "{", "if", "(", "devices", ".", "contains", "(", "userDevice", ")", ")", "{", "devices", ".", "remove", "(", "userDevice", ")",...
Remove our device from the collection of devices. @param userDevice our OmemoDevice @param devices collection of OmemoDevices
[ "Remove", "our", "device", "from", "the", "collection", "of", "devices", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java#L977-L981
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
XMLConfigAdmin.updateCacheHandler
public void updateCacheHandler(String id, ClassDefinition cd) throws PageException { """ /* public static void updateCacheHandler(ConfigImpl config, String id, ClassDefinition cd, boolean reload) throws IOException, SAXException, PageException, BundleException { ConfigWebAdmin admin = new ConfigWebAdmin(config,...
java
public void updateCacheHandler(String id, ClassDefinition cd) throws PageException { checkWriteAccess(); _updateCacheHandler(id, cd); }
[ "public", "void", "updateCacheHandler", "(", "String", "id", ",", "ClassDefinition", "cd", ")", "throws", "PageException", "{", "checkWriteAccess", "(", ")", ";", "_updateCacheHandler", "(", "id", ",", "cd", ")", ";", "}" ]
/* public static void updateCacheHandler(ConfigImpl config, String id, ClassDefinition cd, boolean reload) throws IOException, SAXException, PageException, BundleException { ConfigWebAdmin admin = new ConfigWebAdmin(config, null); admin._updateCacheHandler(id, cd); admin._store(); if(reload)admin._reload(); }
[ "/", "*", "public", "static", "void", "updateCacheHandler", "(", "ConfigImpl", "config", "String", "id", "ClassDefinition", "cd", "boolean", "reload", ")", "throws", "IOException", "SAXException", "PageException", "BundleException", "{", "ConfigWebAdmin", "admin", "="...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L4066-L4069
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java
CommonsOJBLockManager.createIsolationLevel
public OJBLock createIsolationLevel(Object resourceId, Object isolationId, LoggerFacade logger) { """ Creates {@link org.apache.commons.transaction.locking.GenericLock} based {@link org.apache.commons.transaction.locking.MultiLevelLock2} instances dependend on the specified isolation identity object. """ ...
java
public OJBLock createIsolationLevel(Object resourceId, Object isolationId, LoggerFacade logger) { OJBLock result = null; switch(((Integer) isolationId).intValue()) { case LockManager.IL_READ_UNCOMMITTED: result = new ReadUncommittedLock(resourceId, logger); ...
[ "public", "OJBLock", "createIsolationLevel", "(", "Object", "resourceId", ",", "Object", "isolationId", ",", "LoggerFacade", "logger", ")", "{", "OJBLock", "result", "=", "null", ";", "switch", "(", "(", "(", "Integer", ")", "isolationId", ")", ".", "intValue"...
Creates {@link org.apache.commons.transaction.locking.GenericLock} based {@link org.apache.commons.transaction.locking.MultiLevelLock2} instances dependend on the specified isolation identity object.
[ "Creates", "{" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java#L193-L216
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializer.java
IntuitResponseDeserializer.getCDCQueryResponse
private CDCResponse getCDCQueryResponse(JsonNode jsonNode) throws IOException { """ Method to deserialize the CDCQueryResponse object @param jsonNode @return CDCResponse """ ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("CDCQueryResponseDeserializer", new Versi...
java
private CDCResponse getCDCQueryResponse(JsonNode jsonNode) throws IOException { ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("CDCQueryResponseDeserializer", new Version(1, 0, 0, null)); simpleModule.addDeserializer(CDCResponse.class, new CDCQueryResponseDeserializer()); ...
[ "private", "CDCResponse", "getCDCQueryResponse", "(", "JsonNode", "jsonNode", ")", "throws", "IOException", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "SimpleModule", "simpleModule", "=", "new", "SimpleModule", "(", "\"CDCQueryResponseDe...
Method to deserialize the CDCQueryResponse object @param jsonNode @return CDCResponse
[ "Method", "to", "deserialize", "the", "CDCQueryResponse", "object" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializer.java#L336-L346
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsDelete.java
CmsDelete.performSingleDeleteOperation
protected void performSingleDeleteOperation(String resource, CmsResourceDeleteMode deleteOption) throws CmsException { """ Performs the delete operation for a single VFS resource.<p> @param resource the resource VFS path @param deleteOption the delete option for sibling deletion @throws CmsException if de...
java
protected void performSingleDeleteOperation(String resource, CmsResourceDeleteMode deleteOption) throws CmsException { // lock resource if autolock is enabled checkLock(resource); // delete the resource getCms().deleteResource(resource, deleteOption); }
[ "protected", "void", "performSingleDeleteOperation", "(", "String", "resource", ",", "CmsResourceDeleteMode", "deleteOption", ")", "throws", "CmsException", "{", "// lock resource if autolock is enabled", "checkLock", "(", "resource", ")", ";", "// delete the resource", "getC...
Performs the delete operation for a single VFS resource.<p> @param resource the resource VFS path @param deleteOption the delete option for sibling deletion @throws CmsException if deleting the resource fails
[ "Performs", "the", "delete", "operation", "for", "a", "single", "VFS", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsDelete.java#L415-L422
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_virtualNumbers_number_jobs_id_GET
public OvhVirtualNumberJob serviceName_virtualNumbers_number_jobs_id_GET(String serviceName, String number, Long id) throws IOException { """ Get this object properties REST: GET /sms/{serviceName}/virtualNumbers/{number}/jobs/{id} @param serviceName [required] The internal name of your SMS offer @param numbe...
java
public OvhVirtualNumberJob serviceName_virtualNumbers_number_jobs_id_GET(String serviceName, String number, Long id) throws IOException { String qPath = "/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}"; StringBuilder sb = path(qPath, serviceName, number, id); String resp = exec(qPath, "GET", sb.toString(), ...
[ "public", "OvhVirtualNumberJob", "serviceName_virtualNumbers_number_jobs_id_GET", "(", "String", "serviceName", ",", "String", "number", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}\"", "...
Get this object properties REST: GET /sms/{serviceName}/virtualNumbers/{number}/jobs/{id} @param serviceName [required] The internal name of your SMS offer @param number [required] The virtual number @param id [required] Id of the object
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L253-L258
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/WorldToCameraToPixel.java
WorldToCameraToPixel.configure
public void configure(LensDistortionNarrowFOV distortion , Se3_F64 worldToCamera ) { """ Specifies intrinsic camera parameters and the transform from world to camera. @param distortion camera parameters @param worldToCamera transform from world to camera """ this.worldToCamera = worldToCamera; normToPi...
java
public void configure(LensDistortionNarrowFOV distortion , Se3_F64 worldToCamera ) { this.worldToCamera = worldToCamera; normToPixel = distortion.distort_F64(false,true); }
[ "public", "void", "configure", "(", "LensDistortionNarrowFOV", "distortion", ",", "Se3_F64", "worldToCamera", ")", "{", "this", ".", "worldToCamera", "=", "worldToCamera", ";", "normToPixel", "=", "distortion", ".", "distort_F64", "(", "false", ",", "true", ")", ...
Specifies intrinsic camera parameters and the transform from world to camera. @param distortion camera parameters @param worldToCamera transform from world to camera
[ "Specifies", "intrinsic", "camera", "parameters", "and", "the", "transform", "from", "world", "to", "camera", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/WorldToCameraToPixel.java#L67-L71
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getSurveyLanguageProperties
public LsSurveyLanguage getSurveyLanguageProperties(int surveyId) throws LimesurveyRCException { """ Gets language properties from a survey. @param surveyId the survey id of the survey you want the properties @return the language properties @throws LimesurveyRCException the limesurvey rc exception """ ...
java
public LsSurveyLanguage getSurveyLanguageProperties(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); List<String> localeSettings = new ArrayList<>(); localeSettings.add("surveyls_welcometext"); localeSettings.add("surveyls_endtext");...
[ "public", "LsSurveyLanguage", "getSurveyLanguageProperties", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "List", "<", "String", ">", "localeSettings...
Gets language properties from a survey. @param surveyId the survey id of the survey you want the properties @return the language properties @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "language", "properties", "from", "a", "survey", "." ]
train
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L340-L350
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java
Util.getMatchUrl
public static URL getMatchUrl(QuerySolution row, boolean operationDiscovery) { """ Obtain the match url given the query row and the kind of discovery we are carrying out @param row the result from a SPARQL query @param operationDiscovery true if we are doing operation discovery @return the URL...
java
public static URL getMatchUrl(QuerySolution row, boolean operationDiscovery) { // Check the input and return immediately if null if (row == null) { return null; } URL matchUrl; if (operationDiscovery) { matchUrl = Util.getOperationUrl(row); } els...
[ "public", "static", "URL", "getMatchUrl", "(", "QuerySolution", "row", ",", "boolean", "operationDiscovery", ")", "{", "// Check the input and return immediately if null", "if", "(", "row", "==", "null", ")", "{", "return", "null", ";", "}", "URL", "matchUrl", ";"...
Obtain the match url given the query row and the kind of discovery we are carrying out @param row the result from a SPARQL query @param operationDiscovery true if we are doing operation discovery @return the URL for the match result
[ "Obtain", "the", "match", "url", "given", "the", "query", "row", "and", "the", "kind", "of", "discovery", "we", "are", "carrying", "out" ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L592-L607
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
JsonPath.read
@SuppressWarnings( { """ Applies this JsonPath to the provided json string @param json a json string @param configuration configuration to use @param <T> expected return type @return list of objects matched by the given path """"unchecked"}) public <T> T read(String json, Configura...
java
@SuppressWarnings({"unchecked"}) public <T> T read(String json, Configuration configuration) { notEmpty(json, "json can not be null or empty"); notNull(configuration, "jsonProvider can not be null"); return read(configuration.jsonProvider().parse(json), configuration); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "<", "T", ">", "T", "read", "(", "String", "json", ",", "Configuration", "configuration", ")", "{", "notEmpty", "(", "json", ",", "\"json can not be null or empty\"", ")", ";", "notNull", ...
Applies this JsonPath to the provided json string @param json a json string @param configuration configuration to use @param <T> expected return type @return list of objects matched by the given path
[ "Applies", "this", "JsonPath", "to", "the", "provided", "json", "string" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L336-L342
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java
DetectChessboardCornersPyramid.markSeenAsFalse
void markSeenAsFalse(FastQueue<ChessboardCorner> corners0 , FastQueue<ChessboardCorner> corners1 ) { """ Finds corners in list 1 which match corners in list 0. If the feature in list 0 has already been seen then the feature in list 1 will be marked as seen. Otherwise the feature which is the most intense is mark...
java
void markSeenAsFalse(FastQueue<ChessboardCorner> corners0 , FastQueue<ChessboardCorner> corners1 ) { nn.setPoints(corners1.toList(),false); // radius of the blob in the intensity image is 2*kernelRadius int radius = detector.shiRadius *2+1; for (int i = 0; i < corners0.size; i++) { ChessboardCorner c0 = corn...
[ "void", "markSeenAsFalse", "(", "FastQueue", "<", "ChessboardCorner", ">", "corners0", ",", "FastQueue", "<", "ChessboardCorner", ">", "corners1", ")", "{", "nn", ".", "setPoints", "(", "corners1", ".", "toList", "(", ")", ",", "false", ")", ";", "// radius ...
Finds corners in list 1 which match corners in list 0. If the feature in list 0 has already been seen then the feature in list 1 will be marked as seen. Otherwise the feature which is the most intense is marked as first.
[ "Finds", "corners", "in", "list", "1", "which", "match", "corners", "in", "list", "0", ".", "If", "the", "feature", "in", "list", "0", "has", "already", "been", "seen", "then", "the", "feature", "in", "list", "1", "will", "be", "marked", "as", "seen", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java#L138-L162
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java
ICUBinary.readHeaderAndDataVersion
public static VersionInfo readHeaderAndDataVersion(ByteBuffer bytes, int dataFormat, Authenticate authenticate) throws IOException { ...
java
public static VersionInfo readHeaderAndDataVersion(ByteBuffer bytes, int dataFormat, Authenticate authenticate) throws IOException { ...
[ "public", "static", "VersionInfo", "readHeaderAndDataVersion", "(", "ByteBuffer", "bytes", ",", "int", "dataFormat", ",", "Authenticate", "authenticate", ")", "throws", "IOException", "{", "return", "getVersionInfoFromCompactInt", "(", "readHeader", "(", "bytes", ",", ...
Same as readHeader(), but returns a VersionInfo rather than a compact int.
[ "Same", "as", "readHeader", "()", "but", "returns", "a", "VersionInfo", "rather", "than", "a", "compact", "int", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java#L556-L561
mockito/mockito
src/main/java/org/mockito/ArgumentMatchers.java
ArgumentMatchers.refEq
public static <T> T refEq(T value, String... excludeFields) { """ Object argument that is reflection-equal to the given value with support for excluding selected fields from a class. <p> This matcher can be used when equals() is not implemented on compared objects. Matcher uses java reflection API to compare...
java
public static <T> T refEq(T value, String... excludeFields) { reportMatcher(new ReflectionEquals(value, excludeFields)); return null; }
[ "public", "static", "<", "T", ">", "T", "refEq", "(", "T", "value", ",", "String", "...", "excludeFields", ")", "{", "reportMatcher", "(", "new", "ReflectionEquals", "(", "value", ",", "excludeFields", ")", ")", ";", "return", "null", ";", "}" ]
Object argument that is reflection-equal to the given value with support for excluding selected fields from a class. <p> This matcher can be used when equals() is not implemented on compared objects. Matcher uses java reflection API to compare fields of wanted and actual object. </p> <p> Works similarly to <code>Equa...
[ "Object", "argument", "that", "is", "reflection", "-", "equal", "to", "the", "given", "value", "with", "support", "for", "excluding", "selected", "fields", "from", "a", "class", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/ArgumentMatchers.java#L937-L940
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.stopEnvironmentAsync
public Observable<Void> stopEnvironmentAsync(String userName, String environmentId) { """ Stops an environment by stopping all resources inside the environment This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws Ille...
java
public Observable<Void> stopEnvironmentAsync(String userName, String environmentId) { return stopEnvironmentWithServiceResponseAsync(userName, environmentId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return...
[ "public", "Observable", "<", "Void", ">", "stopEnvironmentAsync", "(", "String", "userName", ",", "String", "environmentId", ")", "{", "return", "stopEnvironmentWithServiceResponseAsync", "(", "userName", ",", "environmentId", ")", ".", "map", "(", "new", "Func1", ...
Stops an environment by stopping all resources inside the environment This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the reques...
[ "Stops", "an", "environment", "by", "stopping", "all", "resources", "inside", "the", "environment", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L1259-L1266
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addVariableExpr
public void addVariableExpr(final INodeReadTrx mTransaction, final String mVarName) { """ Adds a variable expression to the pipeline. Adds the expression that will evaluate the results the variable holds. @param mTransaction Transaction to operate with. @param mVarName name of the variable """ ...
java
public void addVariableExpr(final INodeReadTrx mTransaction, final String mVarName) { assert getPipeStack().size() >= 1; final AbsAxis bindingSeq = getPipeStack().pop().getExpr(); final AbsAxis axis = new VariableAxis(mTransaction, bindingSeq); mVarRefMap.put(mVarName, axis); ...
[ "public", "void", "addVariableExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mVarName", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "1", ";", "final", "AbsAxis", "bindingSeq", "=", "getPipeStack", ...
Adds a variable expression to the pipeline. Adds the expression that will evaluate the results the variable holds. @param mTransaction Transaction to operate with. @param mVarName name of the variable
[ "Adds", "a", "variable", "expression", "to", "the", "pipeline", ".", "Adds", "the", "expression", "that", "will", "evaluate", "the", "results", "the", "variable", "holds", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L705-L718
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java
BoxApiFolder.getMoveRequest
public BoxRequestsFolder.UpdateFolder getMoveRequest(String id, String parentId) { """ Gets a request that moves a folder to another folder @param id id of folder to move @param parentId id of parent folder to move folder into @return request to move a folder """ BoxRequestsFolder.Upd...
java
public BoxRequestsFolder.UpdateFolder getMoveRequest(String id, String parentId) { BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession) .setParentId(parentId); return request; }
[ "public", "BoxRequestsFolder", ".", "UpdateFolder", "getMoveRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsFolder", ".", "UpdateFolder", "request", "=", "new", "BoxRequestsFolder", ".", "UpdateFolder", "(", "id", ",", "getFolderInfoU...
Gets a request that moves a folder to another folder @param id id of folder to move @param parentId id of parent folder to move folder into @return request to move a folder
[ "Gets", "a", "request", "that", "moves", "a", "folder", "to", "another", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java#L157-L161
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java
ArrayUtil.writeLong
public static void writeLong(byte b[], int offset, long value) { """ Serializes a long into a byte array at a specific offset in big-endian order @param b byte array in which to write a long value. @param offset offset within byte array to start writing. @param value long to write to byte array. """ b...
java
public static void writeLong(byte b[], int offset, long value) { b[offset++] = (byte) (value >>> 56); b[offset++] = (byte) (value >>> 48); b[offset++] = (byte) (value >>> 40); b[offset++] = (byte) (value >>> 32); b[offset++] = (byte) (value >>> 24); b[offset++] = (byte) (value >>> 16); b[off...
[ "public", "static", "void", "writeLong", "(", "byte", "b", "[", "]", ",", "int", "offset", ",", "long", "value", ")", "{", "b", "[", "offset", "++", "]", "=", "(", "byte", ")", "(", "value", ">>>", "56", ")", ";", "b", "[", "offset", "++", "]",...
Serializes a long into a byte array at a specific offset in big-endian order @param b byte array in which to write a long value. @param offset offset within byte array to start writing. @param value long to write to byte array.
[ "Serializes", "a", "long", "into", "a", "byte", "array", "at", "a", "specific", "offset", "in", "big", "-", "endian", "order" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java#L68-L77
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypeReferenceBuilder.java
JvmTypeReferenceBuilder.typeRef
public JvmTypeReference typeRef(Class<?> clazz, JvmTypeReference... typeArgs) { """ Creates a new {@link JvmTypeReference} pointing to the given class and containing the given type arguments. @param clazz the class the type reference shall point to. @param typeArgs type arguments @return the newly created...
java
public JvmTypeReference typeRef(Class<?> clazz, JvmTypeReference... typeArgs) { JvmType type = references.findDeclaredType(clazz, context); if (type == null) { return createUnknownTypeReference(clazz.getName()); } return typeRef(type, typeArgs); }
[ "public", "JvmTypeReference", "typeRef", "(", "Class", "<", "?", ">", "clazz", ",", "JvmTypeReference", "...", "typeArgs", ")", "{", "JvmType", "type", "=", "references", ".", "findDeclaredType", "(", "clazz", ",", "context", ")", ";", "if", "(", "type", "...
Creates a new {@link JvmTypeReference} pointing to the given class and containing the given type arguments. @param clazz the class the type reference shall point to. @param typeArgs type arguments @return the newly created {@link JvmTypeReference}
[ "Creates", "a", "new", "{", "@link", "JvmTypeReference", "}", "pointing", "to", "the", "given", "class", "and", "containing", "the", "given", "type", "arguments", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypeReferenceBuilder.java#L64-L70
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_serviceInfos_PUT
public void domain_serviceInfos_PUT(String domain, OvhService body) throws IOException { """ Alter this object properties REST: PUT /email/domain/{domain}/serviceInfos @param body [required] New object properties @param domain [required] Name of your domain name """ String qPath = "/email/domain/{domain...
java
public void domain_serviceInfos_PUT(String domain, OvhService body) throws IOException { String qPath = "/email/domain/{domain}/serviceInfos"; StringBuilder sb = path(qPath, domain); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "domain_serviceInfos_PUT", "(", "String", "domain", ",", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "domain...
Alter this object properties REST: PUT /email/domain/{domain}/serviceInfos @param body [required] New object properties @param domain [required] Name of your domain name
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L419-L423
azkaban/azkaban
az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopProxy.java
HadoopProxy.getJVMArgument
public String getJVMArgument(Props sysProps, Props jobProps, final Logger logger) { """ Generate JVM Proxy Secure Argument @param sysProps system properties @param jobProps job properties @param logger logger handler @return proxy secure JVM argument string """ String secure = ""; if (shouldProx...
java
public String getJVMArgument(Props sysProps, Props jobProps, final Logger logger) { String secure = ""; if (shouldProxy) { logger.info("Setting up secure proxy info for child process"); secure = " -D" + HadoopSecurityManager.USER_TO_PROXY + "=" + jobProps.getString(HadoopSecurityManager.U...
[ "public", "String", "getJVMArgument", "(", "Props", "sysProps", ",", "Props", "jobProps", ",", "final", "Logger", "logger", ")", "{", "String", "secure", "=", "\"\"", ";", "if", "(", "shouldProxy", ")", "{", "logger", ".", "info", "(", "\"Setting up secure p...
Generate JVM Proxy Secure Argument @param sysProps system properties @param jobProps job properties @param logger logger handler @return proxy secure JVM argument string
[ "Generate", "JVM", "Proxy", "Secure", "Argument" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopProxy.java#L95-L113
js-lib-com/commons
src/main/java/js/util/Files.java
Files.createBufferedWriter
public static BufferedWriter createBufferedWriter(OutputStream stream) { """ Create buffered writer from bytes stream using UTF-8 charset. This library always uses UTF-8 encoding and this method does not rely on JVM default since there is no standard way to enforce it. JRE specification states that <code>file.en...
java
public static BufferedWriter createBufferedWriter(OutputStream stream) { try { return new BufferedWriter(new OutputStreamWriter(stream, "UTF-8")); } catch(UnsupportedEncodingException unused) { throw new BugError("Unsupported UTF-8 ecoding."); } }
[ "public", "static", "BufferedWriter", "createBufferedWriter", "(", "OutputStream", "stream", ")", "{", "try", "{", "return", "new", "BufferedWriter", "(", "new", "OutputStreamWriter", "(", "stream", ",", "\"UTF-8\"", ")", ")", ";", "}", "catch", "(", "Unsupporte...
Create buffered writer from bytes stream using UTF-8 charset. This library always uses UTF-8 encoding and this method does not rely on JVM default since there is no standard way to enforce it. JRE specification states that <code>file.encoding</code> is not the standard way to set default charset and to use host setting...
[ "Create", "buffered", "writer", "from", "bytes", "stream", "using", "UTF", "-", "8", "charset", ".", "This", "library", "always", "uses", "UTF", "-", "8", "encoding", "and", "this", "method", "does", "not", "rely", "on", "JVM", "default", "since", "there",...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Files.java#L102-L110
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java
UnitQuaternions.orientationMetric
public static double orientationMetric(Quat4d q1, Quat4d q2) { """ The orientation metric is obtained by comparing two unit quaternion orientations. <p> The two quaternions are compared using the formula: d(q1,q2) = arccos(|q1*q2|). The range of the metric is [0, Pi/2], where 0 means the same orientation and ...
java
public static double orientationMetric(Quat4d q1, Quat4d q2) { return Math.acos(Math.abs(dotProduct(q1, q2))); }
[ "public", "static", "double", "orientationMetric", "(", "Quat4d", "q1", ",", "Quat4d", "q2", ")", "{", "return", "Math", ".", "acos", "(", "Math", ".", "abs", "(", "dotProduct", "(", "q1", ",", "q2", ")", ")", ")", ";", "}" ]
The orientation metric is obtained by comparing two unit quaternion orientations. <p> The two quaternions are compared using the formula: d(q1,q2) = arccos(|q1*q2|). The range of the metric is [0, Pi/2], where 0 means the same orientation and Pi/2 means the opposite orientation. <p> The formula is taken from: Huynh, D....
[ "The", "orientation", "metric", "is", "obtained", "by", "comparing", "two", "unit", "quaternion", "orientations", ".", "<p", ">", "The", "two", "quaternions", "are", "compared", "using", "the", "formula", ":", "d", "(", "q1", "q2", ")", "=", "arccos", "(",...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java#L98-L100
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java
TrajectoryEnvelopeSolver.createEnvelopes
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, Trajectory ... trajectories) { """ Create a trajectory envelope for each given {@link Trajectory}. Robot IDs are assigned starting from the given integer. This method creates three envelopes for each {@link Trajectory}: the m...
java
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, Trajectory ... trajectories) { //Default footprint, 2.7 (w) x 6.6 (l) Coordinate frontLeft = new Coordinate(5.3, 1.35); Coordinate frontRight = new Coordinate(5.3, -1.35); Coordinate backRight = new Coordinate(-1.3, -1.35); ...
[ "public", "HashMap", "<", "Integer", ",", "ArrayList", "<", "TrajectoryEnvelope", ">", ">", "createEnvelopes", "(", "int", "firstRobotID", ",", "Trajectory", "...", "trajectories", ")", "{", "//Default footprint, 2.7 (w) x 6.6 (l)", "Coordinate", "frontLeft", "=", "ne...
Create a trajectory envelope for each given {@link Trajectory}. Robot IDs are assigned starting from the given integer. This method creates three envelopes for each {@link Trajectory}: the main {@link TrajectoryEnvelope} covering the path; one {@link TrajectoryEnvelope} for the starting position of the robot; and one o...
[ "Create", "a", "trajectory", "envelope", "for", "each", "given", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java#L362-L372
youseries/urule
urule-core/src/main/java/com/bstek/urule/runtime/KnowledgeSessionFactory.java
KnowledgeSessionFactory.newBatchSession
public static BatchSession newBatchSession(KnowledgePackage[] knowledgePackages,int threadSize,int batchSize) { """ 创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,第三个参数用来决定单个线程处理的任务数 @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 @param threadSize 线程池中可用的线程个数 @param batchSize 单个线程处理的任务数 @return...
java
public static BatchSession newBatchSession(KnowledgePackage[] knowledgePackages,int threadSize,int batchSize){ return new BatchSessionImpl(knowledgePackages,threadSize,batchSize); }
[ "public", "static", "BatchSession", "newBatchSession", "(", "KnowledgePackage", "[", "]", "knowledgePackages", ",", "int", "threadSize", ",", "int", "batchSize", ")", "{", "return", "new", "BatchSessionImpl", "(", "knowledgePackages", ",", "threadSize", ",", "batchS...
创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,第三个参数用来决定单个线程处理的任务数 @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 @param threadSize 线程池中可用的线程个数 @param batchSize 单个线程处理的任务数 @return 返回一个新的BatchSession对象
[ "创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,第三个参数用来决定单个线程处理的任务数" ]
train
https://github.com/youseries/urule/blob/3fa0eb4439e97aa292e744bcbd88a9faa36661d8/urule-core/src/main/java/com/bstek/urule/runtime/KnowledgeSessionFactory.java#L132-L134
hawtio/hawtio
hawtio-util/src/main/java/io/hawt/util/introspect/support/ClassScanner.java
ClassScanner.withinLimit
protected boolean withinLimit(Integer limit, Collection<?> collection) { """ Returns true if we are within the limit value for the number of results in the collection """ if (limit == null) { return true; } else { int value = limit.intValue(); return value <=...
java
protected boolean withinLimit(Integer limit, Collection<?> collection) { if (limit == null) { return true; } else { int value = limit.intValue(); return value <= 0 || value > collection.size(); } }
[ "protected", "boolean", "withinLimit", "(", "Integer", "limit", ",", "Collection", "<", "?", ">", "collection", ")", "{", "if", "(", "limit", "==", "null", ")", "{", "return", "true", ";", "}", "else", "{", "int", "value", "=", "limit", ".", "intValue"...
Returns true if we are within the limit value for the number of results in the collection
[ "Returns", "true", "if", "we", "are", "within", "the", "limit", "value", "for", "the", "number", "of", "results", "in", "the", "collection" ]
train
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/hawtio-util/src/main/java/io/hawt/util/introspect/support/ClassScanner.java#L537-L544
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.setContentView
public SwipeBack setContentView(View view, LayoutParams params) { """ Set the content to an explicit view. @param view The desired content to display. @param params Layout parameters for the view. """ switch (mDragMode) { case SwipeBack.DRAG_CONTENT: mContentContainer.removeAllViews(); mContent...
java
public SwipeBack setContentView(View view, LayoutParams params) { switch (mDragMode) { case SwipeBack.DRAG_CONTENT: mContentContainer.removeAllViews(); mContentContainer.addView(view, params); break; case SwipeBack.DRAG_WINDOW: // mActivity can be null if inflated from xml, so retrieve activity /...
[ "public", "SwipeBack", "setContentView", "(", "View", "view", ",", "LayoutParams", "params", ")", "{", "switch", "(", "mDragMode", ")", "{", "case", "SwipeBack", ".", "DRAG_CONTENT", ":", "mContentContainer", ".", "removeAllViews", "(", ")", ";", "mContentContai...
Set the content to an explicit view. @param view The desired content to display. @param params Layout parameters for the view.
[ "Set", "the", "content", "to", "an", "explicit", "view", "." ]
train
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1454-L1473
couchbase/java-dcp-client
src/main/java/com/couchbase/client/dcp/transport/netty/AuthHandler.java
AuthHandler.checkIsAuthed
private void checkIsAuthed(final ChannelHandlerContext ctx, final ResponseStatus status) { """ Check if the authentication process succeeded or failed based on the response status. """ if (status.isSuccess()) { LOGGER.debug("Successfully authenticated against node {}", ctx.channel().remoteAddress());...
java
private void checkIsAuthed(final ChannelHandlerContext ctx, final ResponseStatus status) { if (status.isSuccess()) { LOGGER.debug("Successfully authenticated against node {}", ctx.channel().remoteAddress()); ctx.pipeline().remove(this); originalPromise().setSuccess(); ctx.fireChannelActive()...
[ "private", "void", "checkIsAuthed", "(", "final", "ChannelHandlerContext", "ctx", ",", "final", "ResponseStatus", "status", ")", "{", "if", "(", "status", ".", "isSuccess", "(", ")", ")", "{", "LOGGER", ".", "debug", "(", "\"Successfully authenticated against node...
Check if the authentication process succeeded or failed based on the response status.
[ "Check", "if", "the", "authentication", "process", "succeeded", "or", "failed", "based", "on", "the", "response", "status", "." ]
train
https://github.com/couchbase/java-dcp-client/blob/75359d8c081d6c575f8087cf7c28d24ab24c6421/src/main/java/com/couchbase/client/dcp/transport/netty/AuthHandler.java#L174-L187
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/Voronoi.java
Voronoi.getOrAppendVertex
private int getOrAppendVertex(Coordinate newCoord, Quadtree ptQuad) { """ Compute unique index for the coordinate Index count from 0 to n If the new vertex is closer than distMerge with an another vertex then it will return its index. @return The index of the vertex """ Envelope queryEnv = new Envel...
java
private int getOrAppendVertex(Coordinate newCoord, Quadtree ptQuad) { Envelope queryEnv = new Envelope(newCoord); queryEnv.expandBy(epsilon); QuadTreeVisitor visitor = new QuadTreeVisitor(epsilon, newCoord); try { ptQuad.query(queryEnv, visitor); } catch (RuntimeExcep...
[ "private", "int", "getOrAppendVertex", "(", "Coordinate", "newCoord", ",", "Quadtree", "ptQuad", ")", "{", "Envelope", "queryEnv", "=", "new", "Envelope", "(", "newCoord", ")", ";", "queryEnv", ".", "expandBy", "(", "epsilon", ")", ";", "QuadTreeVisitor", "vis...
Compute unique index for the coordinate Index count from 0 to n If the new vertex is closer than distMerge with an another vertex then it will return its index. @return The index of the vertex
[ "Compute", "unique", "index", "for", "the", "coordinate", "Index", "count", "from", "0", "to", "n", "If", "the", "new", "vertex", "is", "closer", "than", "distMerge", "with", "an", "another", "vertex", "then", "it", "will", "return", "its", "index", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/Voronoi.java#L89-L107
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/Digester.java
Digester.init
public Digester init(String algorithm, Provider provider) { """ 初始化 @param algorithm 算法 @param provider 算法提供者,null表示JDK默认,可以引入Bouncy Castle等来提供更多算法支持 @return {@link Digester} @throws CryptoException Cause by IOException """ if(null == provider) { this.digest = SecureUtil.createMessageDigest(algori...
java
public Digester init(String algorithm, Provider provider) { if(null == provider) { this.digest = SecureUtil.createMessageDigest(algorithm); }else { try { this.digest = MessageDigest.getInstance(algorithm, provider); } catch (NoSuchAlgorithmException e) { throw new CryptoException(e); } ...
[ "public", "Digester", "init", "(", "String", "algorithm", ",", "Provider", "provider", ")", "{", "if", "(", "null", "==", "provider", ")", "{", "this", ".", "digest", "=", "SecureUtil", ".", "createMessageDigest", "(", "algorithm", ")", ";", "}", "else", ...
初始化 @param algorithm 算法 @param provider 算法提供者,null表示JDK默认,可以引入Bouncy Castle等来提供更多算法支持 @return {@link Digester} @throws CryptoException Cause by IOException
[ "初始化" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/Digester.java#L87-L98
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemPrefetchAsync
public static int cudaMemPrefetchAsync(Pointer devPtr, long count, int dstDevice, cudaStream_t stream) { """ Prefetches memory to the specified destination device <br> Prefetches memory to the specified destination device. devPtr is the base device pointer of the memory to be prefetched and dstDevice is the d...
java
public static int cudaMemPrefetchAsync(Pointer devPtr, long count, int dstDevice, cudaStream_t stream) { return checkResult(cudaMemPrefetchAsyncNative(devPtr, count, dstDevice, stream)); }
[ "public", "static", "int", "cudaMemPrefetchAsync", "(", "Pointer", "devPtr", ",", "long", "count", ",", "int", "dstDevice", ",", "cudaStream_t", "stream", ")", "{", "return", "checkResult", "(", "cudaMemPrefetchAsyncNative", "(", "devPtr", ",", "count", ",", "ds...
Prefetches memory to the specified destination device <br> Prefetches memory to the specified destination device. devPtr is the base device pointer of the memory to be prefetched and dstDevice is the destination device. count specifies the number of bytes to copy. stream is the stream in which the operation is enqueue...
[ "Prefetches", "memory", "to", "the", "specified", "destination", "device", "<br", ">", "Prefetches", "memory", "to", "the", "specified", "destination", "device", ".", "devPtr", "is", "the", "base", "device", "pointer", "of", "the", "memory", "to", "be", "prefe...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L8763-L8766
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java
UResourceBundle.getBundleInstance
public static UResourceBundle getBundleInstance(ULocale locale) { """ <strong>[icu]</strong> Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys. @param locale specifies the locale for which we want to open the resource. If null the bundl...
java
public static UResourceBundle getBundleInstance(ULocale locale) { if (locale==null) { locale = ULocale.getDefault(); } return getBundleInstance(ICUData.ICU_BASE_NAME, locale.getBaseName(), ICUResourceBundle.ICU_DATA_CLASS_LOADER, false); }
[ "public", "static", "UResourceBundle", "getBundleInstance", "(", "ULocale", "locale", ")", "{", "if", "(", "locale", "==", "null", ")", "{", "locale", "=", "ULocale", ".", "getDefault", "(", ")", ";", "}", "return", "getBundleInstance", "(", "ICUData", ".", ...
<strong>[icu]</strong> Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys. @param locale specifies the locale for which we want to open the resource. If null the bundle for default locale is opened. @return a resource bundle for the given locale
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Creates", "a", "UResourceBundle", "for", "the", "locale", "specified", "from", "which", "users", "can", "extract", "resources", "by", "using", "their", "corresponding", "keys", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L165-L171
jbundle/jbundle
thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java
Application.getRemoteTask
public RemoteTask getRemoteTask(Task localTaskOwner, String strUserID, boolean bCreateIfNotFound) { """ Get the connection to the server for this applet. Optionally create the server connection. @param localTaskOwner The task that will own this remote task (or application) server) [If null, get the app server]. ...
java
public RemoteTask getRemoteTask(Task localTaskOwner, String strUserID, boolean bCreateIfNotFound) { return this.getRemoteTask(localTaskOwner, strUserID, null, bCreateIfNotFound); }
[ "public", "RemoteTask", "getRemoteTask", "(", "Task", "localTaskOwner", ",", "String", "strUserID", ",", "boolean", "bCreateIfNotFound", ")", "{", "return", "this", ".", "getRemoteTask", "(", "localTaskOwner", ",", "strUserID", ",", "null", ",", "bCreateIfNotFound",...
Get the connection to the server for this applet. Optionally create the server connection. @param localTaskOwner The task that will own this remote task (or application) server) [If null, get the app server]. @param strUserID The user id (or name) to initialize the server's application to. @param bCreateIfNotFound If t...
[ "Get", "the", "connection", "to", "the", "server", "for", "this", "applet", ".", "Optionally", "create", "the", "server", "connection", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java#L382-L385
qiniu/java-sdk
src/main/java/com/qiniu/cdn/CdnManager.java
CdnManager.getCdnLogList
public CdnResult.LogListResult getCdnLogList(String[] domains, String logDate) throws QiniuException { """ 获取CDN域名访问日志的下载链接,具体下载操作请自行根据链接下载 参考文档:<a href="http://developer.qiniu.com/fusion/api/download-the-log">日志下载</a> @param domains 待获取日志下载信息的域名列表 @param logDate 待获取日志的具体日期,格式为:2017-02-18 @return 获取日志下载链接的回复...
java
public CdnResult.LogListResult getCdnLogList(String[] domains, String logDate) throws QiniuException { HashMap<String, String> req = new HashMap<>(); req.put("domains", StringUtils.join(domains, ";")); req.put("day", logDate); byte[] body = Json.encode(req).getBytes(Constants.UTF_8); ...
[ "public", "CdnResult", ".", "LogListResult", "getCdnLogList", "(", "String", "[", "]", "domains", ",", "String", "logDate", ")", "throws", "QiniuException", "{", "HashMap", "<", "String", ",", "String", ">", "req", "=", "new", "HashMap", "<>", "(", ")", ";...
获取CDN域名访问日志的下载链接,具体下载操作请自行根据链接下载 参考文档:<a href="http://developer.qiniu.com/fusion/api/download-the-log">日志下载</a> @param domains 待获取日志下载信息的域名列表 @param logDate 待获取日志的具体日期,格式为:2017-02-18 @return 获取日志下载链接的回复
[ "获取CDN域名访问日志的下载链接,具体下载操作请自行根据链接下载", "参考文档:<a", "href", "=", "http", ":", "//", "developer", ".", "qiniu", ".", "com", "/", "fusion", "/", "api", "/", "download", "-", "the", "-", "log", ">", "日志下载<", "/", "a", ">" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/cdn/CdnManager.java#L195-L205
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.isCached
public boolean isCached(String requestUrl, int maxWidth, int maxHeight) { """ Checks if the item is available in the cache. @param requestUrl The url of the remote image @param maxWidth The maximum width of the returned image. @param maxHeight The maximum height of the returned image. @return True if the item ...
java
public boolean isCached(String requestUrl, int maxWidth, int maxHeight) { return isCached(requestUrl, maxWidth, maxHeight, ScaleType.CENTER_INSIDE); }
[ "public", "boolean", "isCached", "(", "String", "requestUrl", ",", "int", "maxWidth", ",", "int", "maxHeight", ")", "{", "return", "isCached", "(", "requestUrl", ",", "maxWidth", ",", "maxHeight", ",", "ScaleType", ".", "CENTER_INSIDE", ")", ";", "}" ]
Checks if the item is available in the cache. @param requestUrl The url of the remote image @param maxWidth The maximum width of the returned image. @param maxHeight The maximum height of the returned image. @return True if the item exists in cache, false otherwise.
[ "Checks", "if", "the", "item", "is", "available", "in", "the", "cache", "." ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L209-L211
prestodb/presto
presto-spi/src/main/java/com/facebook/presto/spi/block/MapBlockBuilder.java
MapBlockBuilder.buildHashTable
static void buildHashTable(Block keyBlock, int keyOffset, int keyCount, MethodHandle keyBlockHashCode, int[] outputHashTable, int hashTableOffset, int hashTableSize) { """ This method assumes that {@code keyBlock} has no duplicated entries (in the specified range) """ for (int i = 0; i < keyCount; i++)...
java
static void buildHashTable(Block keyBlock, int keyOffset, int keyCount, MethodHandle keyBlockHashCode, int[] outputHashTable, int hashTableOffset, int hashTableSize) { for (int i = 0; i < keyCount; i++) { int hash = getHashPosition(keyBlock, keyOffset + i, keyBlockHashCode, hashTableSize); ...
[ "static", "void", "buildHashTable", "(", "Block", "keyBlock", ",", "int", "keyOffset", ",", "int", "keyCount", ",", "MethodHandle", "keyBlockHashCode", ",", "int", "[", "]", "outputHashTable", ",", "int", "hashTableOffset", ",", "int", "hashTableSize", ")", "{",...
This method assumes that {@code keyBlock} has no duplicated entries (in the specified range)
[ "This", "method", "assumes", "that", "{" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-spi/src/main/java/com/facebook/presto/spi/block/MapBlockBuilder.java#L466-L481
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.ortho2DLH
public Matrix4f ortho2DLH(float left, float right, float bottom, float top, Matrix4f dest) { """ Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(float, float, flo...
java
public Matrix4f ortho2DLH(float left, float right, float bottom, float top, Matrix4f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setOrtho2DLH(left, right, bottom, top); return ortho2DLHGeneric(left, right, bottom, top, dest); }
[ "public", "Matrix4f", "ortho2DLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "Matrix4f", "dest", ")", "{", "if", "(", "(", "properties", "&", "PROPERTY_IDENTITY", ")", "!=", "0", ")", "return", "dest",...
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(float, float, float, float, float, float, Matrix4f) orthoLH()} with <code>zNear=-1</code> and <code>zFar=+1</code>. <p> I...
[ "Apply", "an", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "to", "this", "matrix", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ">", "This", "metho...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L7901-L7905
tvesalainen/util
util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java
PosixHelp.getFileTypeLetter
public static final char getFileTypeLetter(Path path) { """ Returns '-' for regular file, 'd' for directory or 'l' for symbolic link. @param path @return """ if (Files.isRegularFile(path)) { return '-'; } if (Files.isDirectory(path)) { re...
java
public static final char getFileTypeLetter(Path path) { if (Files.isRegularFile(path)) { return '-'; } if (Files.isDirectory(path)) { return 'd'; } if (Files.isSymbolicLink(path)) { return 'l'; }...
[ "public", "static", "final", "char", "getFileTypeLetter", "(", "Path", "path", ")", "{", "if", "(", "Files", ".", "isRegularFile", "(", "path", ")", ")", "{", "return", "'", "'", ";", "}", "if", "(", "Files", ".", "isDirectory", "(", "path", ")", ")"...
Returns '-' for regular file, 'd' for directory or 'l' for symbolic link. @param path @return
[ "Returns", "-", "for", "regular", "file", "d", "for", "directory", "or", "l", "for", "symbolic", "link", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L277-L292
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/base/Preconditions.java
Preconditions.checkNotNull
@CanIgnoreReturnValue public static <T> T checkNotNull(T reference, @Nullable Object errorMessage) { """ Ensures that an object reference passed as a parameter to the calling method is not null. @param reference an object reference @param errorMessage the exception message to use if the check fails; will be ...
java
@CanIgnoreReturnValue public static <T> T checkNotNull(T reference, @Nullable Object errorMessage) { if (reference == null) { throw new NullPointerException(String.valueOf(errorMessage)); } return reference; }
[ "@", "CanIgnoreReturnValue", "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "T", "reference", ",", "@", "Nullable", "Object", "errorMessage", ")", "{", "if", "(", "reference", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(",...
Ensures that an object reference passed as a parameter to the calling method is not null. @param reference an object reference @param errorMessage the exception message to use if the check fails; will be converted to a string using {@link String#valueOf(Object)} @return the non-null reference that was validated @throw...
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "null", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/base/Preconditions.java#L784-L790
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLFacetRestrictionImpl_CustomFieldSerializer.java
OWLFacetRestrictionImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLFacetRestrictionImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLFacetRestrictionImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLFacetRestrictionImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLFacetRestrictionImpl_CustomFieldSerializer.java#L93-L96
fuinorg/srcgen4j-commons
src/main/java/org/fuin/srcgen4j/commons/Generators.java
Generators.findByName
@Nullable public final GeneratorConfig findByName(@NotEmpty final String generatorName) throws GeneratorNotFoundException { """ Returns a generator by it's name. @param generatorName Name to find. @return The generator. @throws GeneratorNotFoundException No generator with the given name was found. ...
java
@Nullable public final GeneratorConfig findByName(@NotEmpty final String generatorName) throws GeneratorNotFoundException { Contract.requireArgNotEmpty("generatorName", generatorName); final int idx = list.indexOf(new GeneratorConfig(generatorName, "dummy", "dummy")); if (idx < 0) { ...
[ "@", "Nullable", "public", "final", "GeneratorConfig", "findByName", "(", "@", "NotEmpty", "final", "String", "generatorName", ")", "throws", "GeneratorNotFoundException", "{", "Contract", ".", "requireArgNotEmpty", "(", "\"generatorName\"", ",", "generatorName", ")", ...
Returns a generator by it's name. @param generatorName Name to find. @return The generator. @throws GeneratorNotFoundException No generator with the given name was found.
[ "Returns", "a", "generator", "by", "it", "s", "name", "." ]
train
https://github.com/fuinorg/srcgen4j-commons/blob/bce26fd3167ea91fb2f3ad3fc9a1836d3d9fb14b/src/main/java/org/fuin/srcgen4j/commons/Generators.java#L142-L150
geomajas/geomajas-project-client-gwt
plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java
WizardPage.savePage
public void savePage(WizardView view, Runnable successCallback, Runnable failureCallback) { """ Save the page data. This can communicate with the server if needed. The return is handled by calling either the success or failure callback. @param view wizard view @param successCallback what to do on success @pa...
java
public void savePage(WizardView view, Runnable successCallback, Runnable failureCallback) { if (null != successCallback) { successCallback.run(); } }
[ "public", "void", "savePage", "(", "WizardView", "view", ",", "Runnable", "successCallback", ",", "Runnable", "failureCallback", ")", "{", "if", "(", "null", "!=", "successCallback", ")", "{", "successCallback", ".", "run", "(", ")", ";", "}", "}" ]
Save the page data. This can communicate with the server if needed. The return is handled by calling either the success or failure callback. @param view wizard view @param successCallback what to do on success @param failureCallback what to do on failure
[ "Save", "the", "page", "data", ".", "This", "can", "communicate", "with", "the", "server", "if", "needed", ".", "The", "return", "is", "handled", "by", "calling", "either", "the", "success", "or", "failure", "callback", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt/src/main/java/org/geomajas/widget/utility/gwt/client/wizard/WizardPage.java#L117-L121
oasp/oasp4j
modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java
RestServiceExceptionFacade.handleGenericError
protected Response handleGenericError(Throwable exception, Throwable catched) { """ Exception handling for generic exception (fallback). @param exception the exception to handle @param catched the original exception that was cached. Either same as {@code error} or a (child-) {@link Throwable#getCause() cause}...
java
protected Response handleGenericError(Throwable exception, Throwable catched) { NlsRuntimeException userError; boolean logged = false; if (exception instanceof NlsThrowable) { NlsThrowable nlsError = (NlsThrowable) exception; if (!nlsError.isTechnical()) { LOG.warn("Service failed due t...
[ "protected", "Response", "handleGenericError", "(", "Throwable", "exception", ",", "Throwable", "catched", ")", "{", "NlsRuntimeException", "userError", ";", "boolean", "logged", "=", "false", ";", "if", "(", "exception", "instanceof", "NlsThrowable", ")", "{", "N...
Exception handling for generic exception (fallback). @param exception the exception to handle @param catched the original exception that was cached. Either same as {@code error} or a (child-) {@link Throwable#getCause() cause} of it. @return the response build from the exception
[ "Exception", "handling", "for", "generic", "exception", "(", "fallback", ")", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java#L270-L288
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java
BigtableClusterUtilities.getClusterSize
@Deprecated public int getClusterSize(String clusterId, String zoneId) { """ Gets the serve node count of the cluster. @param clusterId @param zoneId @return the {@link Cluster#getServeNodes()} of the clusterId. @deprecated Use {@link #getCluster(String, String)} or {@link #getSingleCluster()} and then call...
java
@Deprecated public int getClusterSize(String clusterId, String zoneId) { Cluster cluster = getCluster(clusterId, zoneId); String message = String.format("Cluster %s/%s was not found.", clusterId, zoneId); Preconditions.checkNotNull(cluster, message); return cluster.getServeNodes(); }
[ "@", "Deprecated", "public", "int", "getClusterSize", "(", "String", "clusterId", ",", "String", "zoneId", ")", "{", "Cluster", "cluster", "=", "getCluster", "(", "clusterId", ",", "zoneId", ")", ";", "String", "message", "=", "String", ".", "format", "(", ...
Gets the serve node count of the cluster. @param clusterId @param zoneId @return the {@link Cluster#getServeNodes()} of the clusterId. @deprecated Use {@link #getCluster(String, String)} or {@link #getSingleCluster()} and then call {@link Cluster#getServeNodes()}.
[ "Gets", "the", "serve", "node", "count", "of", "the", "cluster", "." ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java#L167-L173
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendBinary
public static void sendBinary(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { """ Sends a complete binary message, invoking the callback when complete @param data The data to send @param wsChannel The web socket channel @param callback T...
java
public static void sendBinary(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(mergeBuffers(data), WebSocketFrameType.BINARY, wsChannel, callback, null, timeoutmillis); }
[ "public", "static", "void", "sendBinary", "(", "final", "ByteBuffer", "[", "]", "data", ",", "final", "WebSocketChannel", "wsChannel", ",", "final", "WebSocketCallback", "<", "Void", ">", "callback", ",", "long", "timeoutmillis", ")", "{", "sendInternal", "(", ...
Sends a complete binary message, invoking the callback when complete @param data The data to send @param wsChannel The web socket channel @param callback The callback to invoke on completion @param timeoutmillis the timeout in milliseconds
[ "Sends", "a", "complete", "binary", "message", "invoking", "the", "callback", "when", "complete" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L661-L663
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/EnvelopesApi.java
EnvelopesApi.listStatus
public EnvelopesInformation listStatus(String accountId, EnvelopeIdsRequest envelopeIdsRequest, EnvelopesApi.ListStatusOptions options) throws ApiException { """ Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. @param accountId The external account ...
java
public EnvelopesInformation listStatus(String accountId, EnvelopeIdsRequest envelopeIdsRequest, EnvelopesApi.ListStatusOptions options) throws ApiException { Object localVarPostBody = envelopeIdsRequest; // verify the required parameter 'accountId' is set if (accountId == null) { throw new Ap...
[ "public", "EnvelopesInformation", "listStatus", "(", "String", "accountId", ",", "EnvelopeIdsRequest", "envelopeIdsRequest", ",", "EnvelopesApi", ".", "ListStatusOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "envelopeIdsRequest"...
Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. @param accountId The external account number (int) or account ID Guid. (required) @param envelopeIdsRequest (optional) @param options for modifying the method behavior. @return EnvelopesInformation @throws ...
[ "Gets", "the", "envelope", "status", "for", "the", "specified", "envelopes", ".", "Retrieves", "the", "envelope", "status", "for", "the", "specified", "envelopes", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L3953-L4000
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.intArrayContains
public static boolean intArrayContains(int[] array, int numToCheck) { """ a simple contains helper method, checks if array contains a numToCheck @param array array of ints @param numToCheck value to find @return True if found, false otherwise """ for (int i = 0; i < array.length; i++) { ...
java
public static boolean intArrayContains(int[] array, int numToCheck) { for (int i = 0; i < array.length; i++) { if (array[i] == numToCheck) { return true; } } return false; }
[ "public", "static", "boolean", "intArrayContains", "(", "int", "[", "]", "array", ",", "int", "numToCheck", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", "[", "i",...
a simple contains helper method, checks if array contains a numToCheck @param array array of ints @param numToCheck value to find @return True if found, false otherwise
[ "a", "simple", "contains", "helper", "method", "checks", "if", "array", "contains", "a", "numToCheck" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L310-L317
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java
TrajectoryEnvelope.getFootprint
public static Geometry getFootprint(Polygon fp, double x, double y, double theta) { """ Returns a {@link Geometry} representing the footprint of a robot in a given pose. @param fp A polygon representing the footprint of the robot centered in (0,0) and appropriately oriented (can be obtained from a {@link Traject...
java
public static Geometry getFootprint(Polygon fp, double x, double y, double theta) { AffineTransformation at = new AffineTransformation(); at.rotate(theta); at.translate(x,y); Geometry rect = at.transform(fp); return rect; }
[ "public", "static", "Geometry", "getFootprint", "(", "Polygon", "fp", ",", "double", "x", ",", "double", "y", ",", "double", "theta", ")", "{", "AffineTransformation", "at", "=", "new", "AffineTransformation", "(", ")", ";", "at", ".", "rotate", "(", "thet...
Returns a {@link Geometry} representing the footprint of a robot in a given pose. @param fp A polygon representing the footprint of the robot centered in (0,0) and appropriately oriented (can be obtained from a {@link TrajectoryEnvelope} instance via method {@link TrajectoryEnvelope#getFootprint()}). @param x The x coo...
[ "Returns", "a", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java#L616-L622
Stratio/stratio-cassandra
src/java/org/apache/cassandra/service/RowDataResolver.java
RowDataResolver.scheduleRepairs
public static List<AsyncOneResponse> scheduleRepairs(ColumnFamily resolved, String keyspaceName, DecoratedKey key, List<ColumnFamily> versions, List<InetAddress> endpoints) { """ For each row version, compare with resolved (the superset of all row versions); if it is missing anything, send a mutation to the endpo...
java
public static List<AsyncOneResponse> scheduleRepairs(ColumnFamily resolved, String keyspaceName, DecoratedKey key, List<ColumnFamily> versions, List<InetAddress> endpoints) { List<AsyncOneResponse> results = new ArrayList<AsyncOneResponse>(versions.size()); for (int i = 0; i < versions.size(); i++)...
[ "public", "static", "List", "<", "AsyncOneResponse", ">", "scheduleRepairs", "(", "ColumnFamily", "resolved", ",", "String", "keyspaceName", ",", "DecoratedKey", "key", ",", "List", "<", "ColumnFamily", ">", "versions", ",", "List", "<", "InetAddress", ">", "end...
For each row version, compare with resolved (the superset of all row versions); if it is missing anything, send a mutation to the endpoint it come from.
[ "For", "each", "row", "version", "compare", "with", "resolved", "(", "the", "superset", "of", "all", "row", "versions", ")", ";", "if", "it", "is", "missing", "anything", "send", "a", "mutation", "to", "the", "endpoint", "it", "come", "from", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/service/RowDataResolver.java#L109-L128
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTrace.java
VoltTrace.endAsync
public static TraceEvent endAsync(String name, Object id, Object... args) { """ Creates an end async trace event. This method does not queue the event. Call {@link TraceEventBatch#add(Supplier)} to queue the event. """ return new TraceEvent(TraceEventType.ASYNC_END, name, String.valueOf(id), args); ...
java
public static TraceEvent endAsync(String name, Object id, Object... args) { return new TraceEvent(TraceEventType.ASYNC_END, name, String.valueOf(id), args); }
[ "public", "static", "TraceEvent", "endAsync", "(", "String", "name", ",", "Object", "id", ",", "Object", "...", "args", ")", "{", "return", "new", "TraceEvent", "(", "TraceEventType", ".", "ASYNC_END", ",", "name", ",", "String", ".", "valueOf", "(", "id",...
Creates an end async trace event. This method does not queue the event. Call {@link TraceEventBatch#add(Supplier)} to queue the event.
[ "Creates", "an", "end", "async", "trace", "event", ".", "This", "method", "does", "not", "queue", "the", "event", ".", "Call", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L497-L499
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/ValidationInterceptor.java
ValidationInterceptor.registerGuarded
protected ValidationListener registerGuarded(String propertyName, Guarded guarded) { """ Register a guarded object on a specific property. To keep things in sync, it also triggers a first time check. (validationResultsModel can already be populated) @param propertyName property to listen for. @param guarded ...
java
protected ValidationListener registerGuarded(String propertyName, Guarded guarded) { GuardedValidationListener guardedValidationListener = new GuardedValidationListener(propertyName, guarded); validationResults.addValidationListener(propertyName, guardedValidationListener); guardedValidationListener.validationRes...
[ "protected", "ValidationListener", "registerGuarded", "(", "String", "propertyName", ",", "Guarded", "guarded", ")", "{", "GuardedValidationListener", "guardedValidationListener", "=", "new", "GuardedValidationListener", "(", "propertyName", ",", "guarded", ")", ";", "val...
Register a guarded object on a specific property. To keep things in sync, it also triggers a first time check. (validationResultsModel can already be populated) @param propertyName property to listen for. @param guarded component that needs guarding. @return {@link ValidationListener} created during the process.
[ "Register", "a", "guarded", "object", "on", "a", "specific", "property", ".", "To", "keep", "things", "in", "sync", "it", "also", "triggers", "a", "first", "time", "check", ".", "(", "validationResultsModel", "can", "already", "be", "populated", ")" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/ValidationInterceptor.java#L74-L79
alkacon/opencms-core
src/org/opencms/staticexport/CmsStaticExportManager.java
CmsStaticExportManager.isSecureLink
public boolean isSecureLink(CmsObject cms, String vfsName, String siteRoot) { """ Returns <code>true</code> if the given VFS resource that is located under the given site root should be transported through a secure channel.<p> @param cms the current users OpenCms context @param vfsName the VFS resource name t...
java
public boolean isSecureLink(CmsObject cms, String vfsName, String siteRoot) { return isSecureLink(cms, vfsName, siteRoot, false); }
[ "public", "boolean", "isSecureLink", "(", "CmsObject", "cms", ",", "String", "vfsName", ",", "String", "siteRoot", ")", "{", "return", "isSecureLink", "(", "cms", ",", "vfsName", ",", "siteRoot", ",", "false", ")", ";", "}" ]
Returns <code>true</code> if the given VFS resource that is located under the given site root should be transported through a secure channel.<p> @param cms the current users OpenCms context @param vfsName the VFS resource name to check @param siteRoot the site root where the the VFS resource should be read @return <c...
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "given", "VFS", "resource", "that", "is", "located", "under", "the", "given", "site", "root", "should", "be", "transported", "through", "a", "secure", "channel", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsStaticExportManager.java#L2003-L2006
Netflix/eureka
eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java
Applications.shuffleAndFilterInstances
private void shuffleAndFilterInstances(Map<String, VipIndexSupport> srcMap, boolean filterUpInstances) { """ Shuffle the instances and filter for only {@link InstanceStatus#UP} if required. """ Random shuffleRandom = new Random(); for (Map.Entry<String, VipIndexSupport> entries : srcMap.entry...
java
private void shuffleAndFilterInstances(Map<String, VipIndexSupport> srcMap, boolean filterUpInstances) { Random shuffleRandom = new Random(); for (Map.Entry<String, VipIndexSupport> entries : srcMap.entrySet()) { VipIndexSupport vipIndexSupport = entries.getValue(); AbstractQueu...
[ "private", "void", "shuffleAndFilterInstances", "(", "Map", "<", "String", ",", "VipIndexSupport", ">", "srcMap", ",", "boolean", "filterUpInstances", ")", "{", "Random", "shuffleRandom", "=", "new", "Random", "(", ")", ";", "for", "(", "Map", ".", "Entry", ...
Shuffle the instances and filter for only {@link InstanceStatus#UP} if required.
[ "Shuffle", "the", "instances", "and", "filter", "for", "only", "{", "@link", "InstanceStatus#UP", "}", "if", "required", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L350-L367
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/local/LocalMessageTransport.java
LocalMessageTransport.sendMessageRequest
public BaseMessage sendMessageRequest(BaseMessage messageOut) { """ Send the message and (optionally) get the reply. @param messageOut The message to send to be processed. @return The reply message (or null if none). """ TrxMessageHeader trxMessageHeader = (TrxMessageHeader)messageOut.getMessageHeade...
java
public BaseMessage sendMessageRequest(BaseMessage messageOut) { TrxMessageHeader trxMessageHeader = (TrxMessageHeader)messageOut.getMessageHeader(); String strTrxID = (String)trxMessageHeader.get(TrxMessageHeader.LOG_TRX_ID); try { // Create a fake Incoming message with this mess...
[ "public", "BaseMessage", "sendMessageRequest", "(", "BaseMessage", "messageOut", ")", "{", "TrxMessageHeader", "trxMessageHeader", "=", "(", "TrxMessageHeader", ")", "messageOut", ".", "getMessageHeader", "(", ")", ";", "String", "strTrxID", "=", "(", "String", ")",...
Send the message and (optionally) get the reply. @param messageOut The message to send to be processed. @return The reply message (or null if none).
[ "Send", "the", "message", "and", "(", "optionally", ")", "get", "the", "reply", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/local/LocalMessageTransport.java#L95-L129
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.scrollViewToSide
public void scrollViewToSide(View view, int side, float scrollPosition, int stepCount) { """ Scrolls a View horizontally. @param view the View to scroll @param side the side to scroll; {@link #RIGHT} or {@link #LEFT} @param scrollPosition the position to scroll to, from 0 to 1 where 1 is all the way. Example ...
java
public void scrollViewToSide(View view, int side, float scrollPosition, int stepCount) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "scrollViewToSide("+view+", "+side+", "+scrollPosition+", "+stepCount+")"); } waitForView(view); sleeper.sleep(); switch (side){ case RIGHT: scroller.scro...
[ "public", "void", "scrollViewToSide", "(", "View", "view", ",", "int", "side", ",", "float", "scrollPosition", ",", "int", "stepCount", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag"...
Scrolls a View horizontally. @param view the View to scroll @param side the side to scroll; {@link #RIGHT} or {@link #LEFT} @param scrollPosition the position to scroll to, from 0 to 1 where 1 is all the way. Example is: 0.60 @param stepCount how many move steps to include in the scroll. Less steps results in a faster...
[ "Scrolls", "a", "View", "horizontally", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2356-L2367
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/coverage/CoverageSQLiteUtils.java
CoverageSQLiteUtils.calculateCoverate
public static void calculateCoverate(Path bamPath, Path sqlPath) throws IOException, AlignmentCoverageException { """ Calculate the coverage for the input BAM file. The coverage is stored in a SQLite database located in the sqlPath output directory. @param bamPath BAM file @param sqlPath Output di...
java
public static void calculateCoverate(Path bamPath, Path sqlPath) throws IOException, AlignmentCoverageException { BamManager bamManager = new BamManager(bamPath); // Check if the bam index (.bai) does not exit, then create it if (!bamPath.getParent().resolve(bamPath.getFileName().toString() + "...
[ "public", "static", "void", "calculateCoverate", "(", "Path", "bamPath", ",", "Path", "sqlPath", ")", "throws", "IOException", ",", "AlignmentCoverageException", "{", "BamManager", "bamManager", "=", "new", "BamManager", "(", "bamPath", ")", ";", "// Check if the ba...
Calculate the coverage for the input BAM file. The coverage is stored in a SQLite database located in the sqlPath output directory. @param bamPath BAM file @param sqlPath Output dir where to store the SQLite database @throws IOException IO exception
[ "Calculate", "the", "coverage", "for", "the", "input", "BAM", "file", ".", "The", "coverage", "is", "stored", "in", "a", "SQLite", "database", "located", "in", "the", "sqlPath", "output", "directory", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/coverage/CoverageSQLiteUtils.java#L36-L92
tomdcc/sham
sham-core/src/main/java/org/shamdata/text/SpewGenerator.java
SpewGenerator.nextLine
public String nextLine(Map<String,Object> extraClasses) { """ Returns a random line of text, driven by the underlying spew file and the given classes. For example, to drive a spew file but add some parameters to it, call this method with the class names as the map keys, and the Strings that you'd like substitut...
java
public String nextLine(Map<String,Object> extraClasses) { return mainClass.render(null, preprocessExtraClasses(extraClasses)); }
[ "public", "String", "nextLine", "(", "Map", "<", "String", ",", "Object", ">", "extraClasses", ")", "{", "return", "mainClass", ".", "render", "(", "null", ",", "preprocessExtraClasses", "(", "extraClasses", ")", ")", ";", "}" ]
Returns a random line of text, driven by the underlying spew file and the given classes. For example, to drive a spew file but add some parameters to it, call this method with the class names as the map keys, and the Strings that you'd like substituted as the values. @param extraClasses the extra classes to use @retur...
[ "Returns", "a", "random", "line", "of", "text", "driven", "by", "the", "underlying", "spew", "file", "and", "the", "given", "classes", ".", "For", "example", "to", "drive", "a", "spew", "file", "but", "add", "some", "parameters", "to", "it", "call", "thi...
train
https://github.com/tomdcc/sham/blob/33ede5e7130888736d6c84368e16a56e9e31e033/sham-core/src/main/java/org/shamdata/text/SpewGenerator.java#L45-L47
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleGenerator.java
TupleGenerator.getFailureTupleSet
private VarTupleSet getFailureTupleSet( RandSeq randSeq, FunctionInputDef inputDef) { """ Returns the all failure input tuples required for generated test cases. """ List<Tuple> failureTuples = new ArrayList<Tuple>(); for( VarDefIterator vars = new VarDefIterator( inputDef); vars.hasNext(); ) { ...
java
private VarTupleSet getFailureTupleSet( RandSeq randSeq, FunctionInputDef inputDef) { List<Tuple> failureTuples = new ArrayList<Tuple>(); for( VarDefIterator vars = new VarDefIterator( inputDef); vars.hasNext(); ) { VarDef var = vars.next(); for( Iterator<VarValueDef> failures = var.getFa...
[ "private", "VarTupleSet", "getFailureTupleSet", "(", "RandSeq", "randSeq", ",", "FunctionInputDef", "inputDef", ")", "{", "List", "<", "Tuple", ">", "failureTuples", "=", "new", "ArrayList", "<", "Tuple", ">", "(", ")", ";", "for", "(", "VarDefIterator", "vars...
Returns the all failure input tuples required for generated test cases.
[ "Returns", "the", "all", "failure", "input", "tuples", "required", "for", "generated", "test", "cases", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleGenerator.java#L714-L728
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/EnableOnValidHandler.java
EnableOnValidHandler.init
public void init(Record record, BaseField field, String fieldName, boolean bEnableOnValid, boolean bEnableOnNew, ScreenComponent sField) { """ Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param field Target field. @param iFieldSeq Target field. @param bEn...
java
public void init(Record record, BaseField field, String fieldName, boolean bEnableOnValid, boolean bEnableOnNew, ScreenComponent sField) { this.fieldName = fieldName; m_fldTarget = field; m_sField = sField; m_bEnableOnValid = bEnableOnValid; m_bEnableOnNew = bEnableOnNew; ...
[ "public", "void", "init", "(", "Record", "record", ",", "BaseField", "field", ",", "String", "fieldName", ",", "boolean", "bEnableOnValid", ",", "boolean", "bEnableOnNew", ",", "ScreenComponent", "sField", ")", "{", "this", ".", "fieldName", "=", "fieldName", ...
Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param field Target field. @param iFieldSeq Target field. @param bEnbleOnValid Enable/disable the fields on valid. @param bEnableOnNew Enable/disable the fields on new. @param flagField If this flag is true, do the oppos...
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/EnableOnValidHandler.java#L101-L109
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withBoolean
public Postcard withBoolean(@Nullable String key, boolean value) { """ Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a boolean @return current """ mBundle.putBo...
java
public Postcard withBoolean(@Nullable String key, boolean value) { mBundle.putBoolean(key, value); return this; }
[ "public", "Postcard", "withBoolean", "(", "@", "Nullable", "String", "key", ",", "boolean", "value", ")", "{", "mBundle", ".", "putBoolean", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a boolean @return current
[ "Inserts", "a", "Boolean", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L257-L260
DataArt/CalculationEngine
calculation-engine/engine-model/src/main/java/com/dataart/spreadsheetanalytics/engine/Functions.java
Functions.loadPoiCustomFunctions
protected static UDFFinder loadPoiCustomFunctions(Map<String, Class<? extends ICustomFunction>> fs) { """ Does create a new instance of {@link UDFFinder} based on Set of CustomFunction provided. If you extend {@link Functions} class and replace/add {@link #fs} please also replace/add {@link #poifs}. UDFFinder in...
java
protected static UDFFinder loadPoiCustomFunctions(Map<String, Class<? extends ICustomFunction>> fs) { List<String> names = new ArrayList<>(fs.size()); List<ICustomFunction> funcs = new ArrayList<>(fs.size()); for (Entry<String, Class<? extends ICustomFunction>> en : fs.entrySet()) { ...
[ "protected", "static", "UDFFinder", "loadPoiCustomFunctions", "(", "Map", "<", "String", ",", "Class", "<", "?", "extends", "ICustomFunction", ">", ">", "fs", ")", "{", "List", "<", "String", ">", "names", "=", "new", "ArrayList", "<>", "(", "fs", ".", "...
Does create a new instance of {@link UDFFinder} based on Set of CustomFunction provided. If you extend {@link Functions} class and replace/add {@link #fs} please also replace/add {@link #poifs}. UDFFinder instance is needed for some CustomFunction to do evaluation in POI.
[ "Does", "create", "a", "new", "instance", "of", "{" ]
train
https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-model/src/main/java/com/dataart/spreadsheetanalytics/engine/Functions.java#L89-L107
playn/playn
core/src/playn/core/Graphics.java
Graphics.viewportChanged
protected void viewportChanged (int pixelWidth, int pixelHeight) { """ Informs the graphics system that the main framebuffer size has changed. The supplied size should be in physical pixels. """ viewPixelWidth = pixelWidth; viewPixelHeight = pixelHeight; viewSizeM.width = scale.invScaled(pixelWidt...
java
protected void viewportChanged (int pixelWidth, int pixelHeight) { viewPixelWidth = pixelWidth; viewPixelHeight = pixelHeight; viewSizeM.width = scale.invScaled(pixelWidth); viewSizeM.height = scale.invScaled(pixelHeight); plat.log().info("viewPortChanged " + pixelWidth + "x" + pixelHeight + " / " +...
[ "protected", "void", "viewportChanged", "(", "int", "pixelWidth", ",", "int", "pixelHeight", ")", "{", "viewPixelWidth", "=", "pixelWidth", ";", "viewPixelHeight", "=", "pixelHeight", ";", "viewSizeM", ".", "width", "=", "scale", ".", "invScaled", "(", "pixelWid...
Informs the graphics system that the main framebuffer size has changed. The supplied size should be in physical pixels.
[ "Informs", "the", "graphics", "system", "that", "the", "main", "framebuffer", "size", "has", "changed", ".", "The", "supplied", "size", "should", "be", "in", "physical", "pixels", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Graphics.java#L196-L203