Dataset Viewer
Auto-converted to Parquet Duplicate
repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
sequencelengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
sequencelengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplFloat_CustomFieldSerializer.java
OWLLiteralImplFloat_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImplFloat instance) throws SerializationException { serialize(streamWriter, instance); }
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImplFloat instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLLiteralImplFloat", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplFloat_CustomFieldSerializer.java#L66-L69
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendBinary
public static <T> void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.BINARY, wsChannel, callback, context, -1); }
java
public static <T> void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.BINARY, wsChannel, callback, context, -1); }
[ "public", "static", "<", "T", ">", "void", "sendBinary", "(", "final", "PooledByteBuffer", "pooledData", ",", "final", "WebSocketChannel", "wsChannel", ",", "final", "WebSocketCallback", "<", "T", ">", "callback", ",", "T", "context", ")", "{", "sendInternal", ...
Sends a complete binary message, invoking the callback when complete Automatically frees the pooled byte buffer when done. @param pooledData The data to send, it will be freed when done @param wsChannel The web socket channel @param callback The callback to invoke on completion @param context The context object that w...
[ "Sends", "a", "complete", "binary", "message", "invoking", "the", "callback", "when", "complete", "Automatically", "frees", "the", "pooled", "byte", "buffer", "when", "done", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L699-L701
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/DefaultTraceCollector.java
DefaultTraceCollector.processInContent
protected void processInContent(String location, FragmentBuilder builder, int hashCode) { if (builder.isInBufferActive(hashCode)) { processIn(location, null, builder.getInData(hashCode)); } else if (log.isLoggable(Level.FINEST)) { log.finest("processInContent: location=[" + locat...
java
protected void processInContent(String location, FragmentBuilder builder, int hashCode) { if (builder.isInBufferActive(hashCode)) { processIn(location, null, builder.getInData(hashCode)); } else if (log.isLoggable(Level.FINEST)) { log.finest("processInContent: location=[" + locat...
[ "protected", "void", "processInContent", "(", "String", "location", ",", "FragmentBuilder", "builder", ",", "int", "hashCode", ")", "{", "if", "(", "builder", ".", "isInBufferActive", "(", "hashCode", ")", ")", "{", "processIn", "(", "location", ",", "null", ...
This method processes the in content if available. @param location The instrumentation location @param builder The builder @param hashCode The hash code, or -1 to ignore the hash code
[ "This", "method", "processes", "the", "in", "content", "if", "available", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/DefaultTraceCollector.java#L894-L901
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.createSection3DEffectGradient
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; if (isExpandedSectionsEnabled()) { FRACTIONS = new float[]{ 0.0f, 0.7f, 0.75f, ...
java
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; if (isExpandedSectionsEnabled()) { FRACTIONS = new float[]{ 0.0f, 0.7f, 0.75f, ...
[ "protected", "RadialGradientPaint", "createSection3DEffectGradient", "(", "final", "int", "WIDTH", ",", "final", "float", "RADIUS_FACTOR", ")", "{", "final", "float", "[", "]", "FRACTIONS", ";", "final", "Color", "[", "]", "COLORS", ";", "if", "(", "isExpandedSe...
Returns a radial gradient paint that will be used as overlay for the track or section image to achieve some kind of a 3d effect. @param WIDTH @param RADIUS_FACTOR : 0.38f for the standard radial gauge @return a radial gradient paint that will be used as overlay for the track or section image
[ "Returns", "a", "radial", "gradient", "paint", "that", "will", "be", "used", "as", "overlay", "for", "the", "track", "or", "section", "image", "to", "achieve", "some", "kind", "of", "a", "3d", "effect", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1189-L1229
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java
VirtualNetworkPeeringsInner.createOrUpdateAsync
public Observable<VirtualNetworkPeeringInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetwo...
java
public Observable<VirtualNetworkPeeringInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetwo...
[ "public", "Observable", "<", "VirtualNetworkPeeringInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "String", "virtualNetworkPeeringName", ",", "VirtualNetworkPeeringInner", "virtualNetworkPeeringParameters", ")", ...
Creates or updates a peering in the specified virtual network. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param virtualNetworkPeeringName The name of the peering. @param virtualNetworkPeeringParameters Parameters supplied to the create or update...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "virtual", "network", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java#L391-L398
grails/grails-core
grails-spring/src/main/groovy/grails/spring/BeanBuilder.java
BeanBuilder.xmlns
public void xmlns(Map<String, String> definition) { Assert.notNull(namespaceHandlerResolver, "You cannot define a Spring namespace without a [namespaceHandlerResolver] set"); if (definition.isEmpty()) { return; } for (Map.Entry<String, String> entry : definition.entrySet()) ...
java
public void xmlns(Map<String, String> definition) { Assert.notNull(namespaceHandlerResolver, "You cannot define a Spring namespace without a [namespaceHandlerResolver] set"); if (definition.isEmpty()) { return; } for (Map.Entry<String, String> entry : definition.entrySet()) ...
[ "public", "void", "xmlns", "(", "Map", "<", "String", ",", "String", ">", "definition", ")", "{", "Assert", ".", "notNull", "(", "namespaceHandlerResolver", ",", "\"You cannot define a Spring namespace without a [namespaceHandlerResolver] set\"", ")", ";", "if", "(", ...
Defines a Spring namespace definition to use. @param definition The definition
[ "Defines", "a", "Spring", "namespace", "definition", "to", "use", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-spring/src/main/groovy/grails/spring/BeanBuilder.java#L220-L241
facebook/fresco
drawee/src/main/java/com/facebook/drawee/drawable/RoundedDrawable.java
RoundedDrawable.setBorder
@Override public void setBorder(int color, float width) { if (mBorderColor != color || mBorderWidth != width) { mBorderColor = color; mBorderWidth = width; mIsPathDirty = true; invalidateSelf(); } }
java
@Override public void setBorder(int color, float width) { if (mBorderColor != color || mBorderWidth != width) { mBorderColor = color; mBorderWidth = width; mIsPathDirty = true; invalidateSelf(); } }
[ "@", "Override", "public", "void", "setBorder", "(", "int", "color", ",", "float", "width", ")", "{", "if", "(", "mBorderColor", "!=", "color", "||", "mBorderWidth", "!=", "width", ")", "{", "mBorderColor", "=", "color", ";", "mBorderWidth", "=", "width", ...
Sets the border @param color of the border @param width of the border
[ "Sets", "the", "border" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/drawable/RoundedDrawable.java#L144-L152
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java
AbstractExtractor.toStringFunction
public T toStringFunction(@NonNull SerializableFunction<HString, String> toStringFunction) { this.toStringFunction = toStringFunction; return Cast.as(this); }
java
public T toStringFunction(@NonNull SerializableFunction<HString, String> toStringFunction) { this.toStringFunction = toStringFunction; return Cast.as(this); }
[ "public", "T", "toStringFunction", "(", "@", "NonNull", "SerializableFunction", "<", "HString", ",", "String", ">", "toStringFunction", ")", "{", "this", ".", "toStringFunction", "=", "toStringFunction", ";", "return", "Cast", ".", "as", "(", "this", ")", ";",...
To string function t. @param toStringFunction the to string function @return the t
[ "To", "string", "function", "t", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java#L202-L205
republicofgavin/PauseResumeAudioRecorder
library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java
PauseResumeAudioRecorder.setAudioFile
public void setAudioFile(final String audioFilePath){ if (audioFilePath==null || audioFilePath.trim().isEmpty()){ throw new IllegalArgumentException("audioFile cannot be null, empty, blank, or directory"); } else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!...
java
public void setAudioFile(final String audioFilePath){ if (audioFilePath==null || audioFilePath.trim().isEmpty()){ throw new IllegalArgumentException("audioFile cannot be null, empty, blank, or directory"); } else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!...
[ "public", "void", "setAudioFile", "(", "final", "String", "audioFilePath", ")", "{", "if", "(", "audioFilePath", "==", "null", "||", "audioFilePath", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Setter for the audioFile. If the file does not contain a .wav suffix, it will be added. If the file has a suffix other than .wav, it will be removed. This API puts it in the prepared state. NOTE: The .wav file does not exist until the stop recording (and subsequent conversion) is completed. Where the data is stored tem...
[ "Setter", "for", "the", "audioFile", ".", "If", "the", "file", "does", "not", "contain", "a", ".", "wav", "suffix", "it", "will", "be", "added", ".", "If", "the", "file", "has", "a", "suffix", "other", "than", ".", "wav", "it", "will", "be", "removed...
train
https://github.com/republicofgavin/PauseResumeAudioRecorder/blob/938128a6266fb5bd7b60f844b5d7e56e1899d4e2/library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java#L159-L176
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java
XScreenField.printInputControl
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { out.println(" <xfm:" + strControlType + " xform=\"form1\" ref=\"" + strFieldName + "\" cols=\"" + strSize + "\" type=\"" ...
java
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { out.println(" <xfm:" + strControlType + " xform=\"form1\" ref=\"" + strFieldName + "\" cols=\"" + strSize + "\" type=\"" ...
[ "public", "void", "printInputControl", "(", "PrintWriter", "out", ",", "String", "strFieldDesc", ",", "String", "strFieldName", ",", "String", "strSize", ",", "String", "strMaxSize", ",", "String", "strValue", ",", "String", "strControlType", ",", "String", "strFi...
Display this field in XML input format. @param strFieldType The field type
[ "Display", "this", "field", "in", "XML", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java#L147-L152
liferay/com-liferay-commerce
commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java
CommerceTaxFixedRateAddressRelPersistenceImpl.findAll
@Override public List<CommerceTaxFixedRateAddressRel> findAll(int start, int end) { return findAll(start, end, null); }
java
@Override public List<CommerceTaxFixedRateAddressRel> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceTaxFixedRateAddressRel", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce tax fixed rate address rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Set...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "tax", "fixed", "rate", "address", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java#L1737-L1740
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSegment.java
IPv6AddressSegment.getSplitSegments
public <S extends AddressSegment> void getSplitSegments(S segs[], int index, AddressSegmentCreator<S> creator) { if(!isMultiple()) { int bitSizeSplit = IPv6Address.BITS_PER_SEGMENT >>> 1; Integer myPrefix = getSegmentPrefixLength(); Integer highPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 0...
java
public <S extends AddressSegment> void getSplitSegments(S segs[], int index, AddressSegmentCreator<S> creator) { if(!isMultiple()) { int bitSizeSplit = IPv6Address.BITS_PER_SEGMENT >>> 1; Integer myPrefix = getSegmentPrefixLength(); Integer highPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 0...
[ "public", "<", "S", "extends", "AddressSegment", ">", "void", "getSplitSegments", "(", "S", "segs", "[", "]", ",", "int", "index", ",", "AddressSegmentCreator", "<", "S", ">", "creator", ")", "{", "if", "(", "!", "isMultiple", "(", ")", ")", "{", "int"...
Converts this IPv6 address segment into smaller segments, copying them into the given array starting at the given index. If a segment does not fit into the array because the segment index in the array is out of bounds of the array, then it is not copied. @param segs @param index
[ "Converts", "this", "IPv6", "address", "segment", "into", "smaller", "segments", "copying", "them", "into", "the", "given", "array", "starting", "at", "the", "given", "index", "." ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSegment.java#L302-L317
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/UnsignedUtils.java
UnsignedUtils.forDigit
public static char forDigit(int digit, int radix) { if (digit >= 0 && digit < radix && radix >= Character.MIN_RADIX && radix <= MAX_RADIX) { return digits[digit]; } return '\u0000'; }
java
public static char forDigit(int digit, int radix) { if (digit >= 0 && digit < radix && radix >= Character.MIN_RADIX && radix <= MAX_RADIX) { return digits[digit]; } return '\u0000'; }
[ "public", "static", "char", "forDigit", "(", "int", "digit", ",", "int", "radix", ")", "{", "if", "(", "digit", ">=", "0", "&&", "digit", "<", "radix", "&&", "radix", ">=", "Character", ".", "MIN_RADIX", "&&", "radix", "<=", "MAX_RADIX", ")", "{", "r...
Determines the character representation for a specific digit in the specified radix. Note: If the value of radix is not a valid radix, or the value of digit is not a valid digit in the specified radix, the null character ('\u0000') is returned. @param digit @param radix @return
[ "Determines", "the", "character", "representation", "for", "a", "specific", "digit", "in", "the", "specified", "radix", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/UnsignedUtils.java#L76-L81
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java
MetadataClient.unregisterWorkflowDef
public void unregisterWorkflowDef(String name, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(name), "Workflow name cannot be blank"); Preconditions.checkNotNull(version, "Version cannot be null"); delete("metadata/workflow/{name}/{version}", name, version); }
java
public void unregisterWorkflowDef(String name, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(name), "Workflow name cannot be blank"); Preconditions.checkNotNull(version, "Version cannot be null"); delete("metadata/workflow/{name}/{version}", name, version); }
[ "public", "void", "unregisterWorkflowDef", "(", "String", "name", ",", "Integer", "version", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "name", ")", ",", "\"Workflow name cannot be blank\"", ")", ";", "Preconditions"...
Removes the workflow definition of a workflow from the conductor server. It does not remove associated workflows. Use with caution. @param name Name of the workflow to be unregistered. @param version Version of the workflow definition to be unregistered.
[ "Removes", "the", "workflow", "definition", "of", "a", "workflow", "from", "the", "conductor", "server", ".", "It", "does", "not", "remove", "associated", "workflows", ".", "Use", "with", "caution", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java#L127-L131
bazaarvoice/emodb
queue-client-common/src/main/java/com/bazaarvoice/emodb/queue/client/AbstractQueueClient.java
AbstractQueueClient.sendAll
public void sendAll(String apiKey, String queue, Collection<?> messages) { checkNotNull(queue, "queue"); checkNotNull(messages, "messages"); if (messages.isEmpty()) { return; } try { URI uri = _queueService.clone() .segment(queue, "send...
java
public void sendAll(String apiKey, String queue, Collection<?> messages) { checkNotNull(queue, "queue"); checkNotNull(messages, "messages"); if (messages.isEmpty()) { return; } try { URI uri = _queueService.clone() .segment(queue, "send...
[ "public", "void", "sendAll", "(", "String", "apiKey", ",", "String", "queue", ",", "Collection", "<", "?", ">", "messages", ")", "{", "checkNotNull", "(", "queue", ",", "\"queue\"", ")", ";", "checkNotNull", "(", "messages", ",", "\"messages\"", ")", ";", ...
Any server can handle sending messages, no need for @PartitionKey
[ "Any", "server", "can", "handle", "sending", "messages", "no", "need", "for" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/queue-client-common/src/main/java/com/bazaarvoice/emodb/queue/client/AbstractQueueClient.java#L59-L76
LearnLib/automatalib
util/src/main/java/net/automatalib/util/ts/copy/TSCopy.java
TSCopy.copy
public static <S1, I1, T1, SP, TP, S2, I2, T2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP, ? extends TP> in, int ...
java
public static <S1, I1, T1, SP, TP, S2, I2, T2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP, ? extends TP> in, int ...
[ "public", "static", "<", "S1", ",", "I1", ",", "T1", ",", "SP", ",", "TP", ",", "S2", ",", "I2", ",", "T2", ">", "Mapping", "<", "S1", ",", "S2", ">", "copy", "(", "TSTraversalMethod", "method", ",", "UniversalTransitionSystem", "<", "S1", ",", "?"...
Copies a {@link UniversalAutomaton} with possibly heterogeneous input alphabets, but compatible properties. States and transitions will not be filtered @param method the traversal method to use @param in the input transition system @param limit the traversal limit, a value less than 0 means no limit @param inputs the ...
[ "Copies", "a", "{", "@link", "UniversalAutomaton", "}", "with", "possibly", "heterogeneous", "input", "alphabets", "but", "compatible", "properties", ".", "States", "and", "transitions", "will", "not", "be", "filtered" ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/ts/copy/TSCopy.java#L415-L422
haifengl/smile
nlp/src/main/java/smile/nlp/Trie.java
Trie.put
public void put(K[] key, V value) { Node child = root.get(key[0]); if (child == null) { child = new Node(key[0]); root.put(key[0], child); } child.addChild(key, value, 1); }
java
public void put(K[] key, V value) { Node child = root.get(key[0]); if (child == null) { child = new Node(key[0]); root.put(key[0], child); } child.addChild(key, value, 1); }
[ "public", "void", "put", "(", "K", "[", "]", "key", ",", "V", "value", ")", "{", "Node", "child", "=", "root", ".", "get", "(", "key", "[", "0", "]", ")", ";", "if", "(", "child", "==", "null", ")", "{", "child", "=", "new", "Node", "(", "k...
Add a key with associated value to the trie. @param key the key. @param value the value.
[ "Add", "a", "key", "with", "associated", "value", "to", "the", "trie", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/nlp/src/main/java/smile/nlp/Trie.java#L136-L143
pravega/pravega
common/src/main/java/io/pravega/common/util/CollectionHelpers.java
CollectionHelpers.binarySearch
public static <T> int binarySearch(List<? extends T> list, Function<? super T, Integer> comparator) { return binarySearch(list, comparator, false); }
java
public static <T> int binarySearch(List<? extends T> list, Function<? super T, Integer> comparator) { return binarySearch(list, comparator, false); }
[ "public", "static", "<", "T", ">", "int", "binarySearch", "(", "List", "<", "?", "extends", "T", ">", "list", ",", "Function", "<", "?", "super", "T", ",", "Integer", ">", "comparator", ")", "{", "return", "binarySearch", "(", "list", ",", "comparator"...
Performs a binary search on the given sorted list using the given comparator. This method has undefined behavior if the list is not sorted. <p> This method is different than that in java.util.Collections in the following ways: 1. This one searches by a simple comparator, vs the ones in the Collections class which searc...
[ "Performs", "a", "binary", "search", "on", "the", "given", "sorted", "list", "using", "the", "given", "comparator", ".", "This", "method", "has", "undefined", "behavior", "if", "the", "list", "is", "not", "sorted", ".", "<p", ">", "This", "method", "is", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/CollectionHelpers.java#L44-L46
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/IntCounter.java
IntCounter.incrementCounts
public void incrementCounts(Collection<E> keys, int count) { for (E key : keys) { incrementCount(key, count); } }
java
public void incrementCounts(Collection<E> keys, int count) { for (E key : keys) { incrementCount(key, count); } }
[ "public", "void", "incrementCounts", "(", "Collection", "<", "E", ">", "keys", ",", "int", "count", ")", "{", "for", "(", "E", "key", ":", "keys", ")", "{", "incrementCount", "(", "key", ",", "count", ")", ";", "}", "}" ]
Adds the given count to the current counts for each of the given keys. If any of the keys haven't been seen before, they are assumed to have count 0, and thus this method will set their counts to the given amount. Negative increments are equivalent to calling <tt>decrementCounts</tt>. <p/> To more conveniently incremen...
[ "Adds", "the", "given", "count", "to", "the", "current", "counts", "for", "each", "of", "the", "given", "keys", ".", "If", "any", "of", "the", "keys", "haven", "t", "been", "seen", "before", "they", "are", "assumed", "to", "have", "count", "0", "and", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/IntCounter.java#L280-L284
ixa-ehu/ixa-pipe-pos
src/main/java/eus/ixa/ixa/pipe/pos/Resources.java
Resources.getBinaryDict
public final URL getBinaryDict(final String lang, final String resourcesDirectory) { return resourcesDirectory == null ? getBinaryDictFromResources(lang) : getBinaryDictFromDirectory(lang, resourcesDirectory); }
java
public final URL getBinaryDict(final String lang, final String resourcesDirectory) { return resourcesDirectory == null ? getBinaryDictFromResources(lang) : getBinaryDictFromDirectory(lang, resourcesDirectory); }
[ "public", "final", "URL", "getBinaryDict", "(", "final", "String", "lang", ",", "final", "String", "resourcesDirectory", ")", "{", "return", "resourcesDirectory", "==", "null", "?", "getBinaryDictFromResources", "(", "lang", ")", ":", "getBinaryDictFromDirectory", "...
The the dictionary for the {@code MorfologikLemmatizer}. @param lang the language @param resourcesDirectory the directory where the dictionary can be found. If {@code null}, load from package resources. @return the URL of the dictonary
[ "The", "the", "dictionary", "for", "the", "{", "@code", "MorfologikLemmatizer", "}", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-pos/blob/083c986103f95ae8063b8ddc89a2caa8047d29b9/src/main/java/eus/ixa/ixa/pipe/pos/Resources.java#L67-L71
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.retrieveCertificateActions
public List<CertificateOrderActionInner> retrieveCertificateActions(String resourceGroupName, String name) { return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
java
public List<CertificateOrderActionInner> retrieveCertificateActions(String resourceGroupName, String name) { return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "List", "<", "CertificateOrderActionInner", ">", "retrieveCertificateActions", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "retrieveCertificateActionsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "...
Retrieve the list of certificate actions. Retrieve the list of certificate actions. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail the validation @throws DefaultErrorResponseExcepti...
[ "Retrieve", "the", "list", "of", "certificate", "actions", ".", "Retrieve", "the", "list", "of", "certificate", "actions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L2234-L2236
actorapp/actor-platform
actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java
VerticalViewPager.setPageTransformer
public void setPageTransformer(boolean reverseDrawingOrder, ViewPager.PageTransformer transformer) { if (Build.VERSION.SDK_INT >= 11) { final boolean hasTransformer = transformer != null; final boolean needsPopulate = hasTransformer != (mPageTransformer != null); mPageTransfo...
java
public void setPageTransformer(boolean reverseDrawingOrder, ViewPager.PageTransformer transformer) { if (Build.VERSION.SDK_INT >= 11) { final boolean hasTransformer = transformer != null; final boolean needsPopulate = hasTransformer != (mPageTransformer != null); mPageTransfo...
[ "public", "void", "setPageTransformer", "(", "boolean", "reverseDrawingOrder", ",", "ViewPager", ".", "PageTransformer", "transformer", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "11", ")", "{", "final", "boolean", "hasTransformer", "=",...
Set a {@link ViewPager.PageTransformer} that will be called for each attached page whenever the scroll position is changed. This allows the application to apply custom property transformations to each page, overriding the default sliding look and feel. <p/> <p><em>Note:</em> Prior to Android 3.0 the property animation ...
[ "Set", "a", "{", "@link", "ViewPager", ".", "PageTransformer", "}", "that", "will", "be", "called", "for", "each", "attached", "page", "whenever", "the", "scroll", "position", "is", "changed", ".", "This", "allows", "the", "application", "to", "apply", "cust...
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java#L472-L485
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/snmp_user.java
snmp_user.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { snmp_user_responses result = (snmp_user_responses) service.get_payload_formatter().string_to_resource(snmp_user_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESS...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { snmp_user_responses result = (snmp_user_responses) service.get_payload_formatter().string_to_resource(snmp_user_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESS...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "snmp_user_responses", "result", "=", "(", "snmp_user_responses", ")", "service", ".", "get_payload_formatter"...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/snmp_user.java#L494-L511
eclipse/xtext-core
org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/AntlrCodeQualityHelper.java
AntlrCodeQualityHelper.removeDuplicateBitsets
public String removeDuplicateBitsets(String javaContent, AntlrOptions options) { if (!options.isOptimizeCodeQuality()) { return javaContent; } return removeDuplicateFields(javaContent, followsetPattern, 1, 2, "\\bFOLLOW_\\w+\\b", "FOLLOW_%d", options.getKeptBitSetsPattern(), options.getKeptBitSetName()); }
java
public String removeDuplicateBitsets(String javaContent, AntlrOptions options) { if (!options.isOptimizeCodeQuality()) { return javaContent; } return removeDuplicateFields(javaContent, followsetPattern, 1, 2, "\\bFOLLOW_\\w+\\b", "FOLLOW_%d", options.getKeptBitSetsPattern(), options.getKeptBitSetName()); }
[ "public", "String", "removeDuplicateBitsets", "(", "String", "javaContent", ",", "AntlrOptions", "options", ")", "{", "if", "(", "!", "options", ".", "isOptimizeCodeQuality", "(", ")", ")", "{", "return", "javaContent", ";", "}", "return", "removeDuplicateFields",...
Remove duplicate bitset declarations to reduce the size of the static initializer but keep the bitsets that match the given pattern with a normalized name.
[ "Remove", "duplicate", "bitset", "declarations", "to", "reduce", "the", "size", "of", "the", "static", "initializer", "but", "keep", "the", "bitsets", "that", "match", "the", "given", "pattern", "with", "a", "normalized", "name", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/AntlrCodeQualityHelper.java#L67-L73
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java
FileSystem.makeRelative
private static File makeRelative(File filenameToMakeRelative, File rootPath, boolean appendCurrentDirectorySymbol) throws IOException { if (filenameToMakeRelative == null || rootPath == null) { throw new IllegalArgumentException(); } if (!filenameToMakeRelative.isAbsolute()) { return filenameToMakeRela...
java
private static File makeRelative(File filenameToMakeRelative, File rootPath, boolean appendCurrentDirectorySymbol) throws IOException { if (filenameToMakeRelative == null || rootPath == null) { throw new IllegalArgumentException(); } if (!filenameToMakeRelative.isAbsolute()) { return filenameToMakeRela...
[ "private", "static", "File", "makeRelative", "(", "File", "filenameToMakeRelative", ",", "File", "rootPath", ",", "boolean", "appendCurrentDirectorySymbol", ")", "throws", "IOException", "{", "if", "(", "filenameToMakeRelative", "==", "null", "||", "rootPath", "==", ...
Make the given filename relative to the given root path. @param filenameToMakeRelative is the name to make relative. @param rootPath is the root path from which the relative path will be set. @param appendCurrentDirectorySymbol indicates if "./" should be append at the begining of the relative filename. @return a rela...
[ "Make", "the", "given", "filename", "relative", "to", "the", "given", "root", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L2729-L2755
stagemonitor/stagemonitor
stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java
CallStackElement.create
public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) { CallStackElement cse; if (useObjectPooling) { cse = objectPool.poll(); if (cse == null) { cse = new CallStackElement(); } } else { cse = new CallStackElement(); } cse.executionTime = startT...
java
public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) { CallStackElement cse; if (useObjectPooling) { cse = objectPool.poll(); if (cse == null) { cse = new CallStackElement(); } } else { cse = new CallStackElement(); } cse.executionTime = startT...
[ "public", "static", "CallStackElement", "create", "(", "CallStackElement", "parent", ",", "String", "signature", ",", "long", "startTimestamp", ")", "{", "CallStackElement", "cse", ";", "if", "(", "useObjectPooling", ")", "{", "cse", "=", "objectPool", ".", "pol...
This static factory method also sets the parent-child relationships. @param parent the parent @param startTimestamp the timestamp at the beginning of the method
[ "This", "static", "factory", "method", "also", "sets", "the", "parent", "-", "child", "relationships", "." ]
train
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java#L55-L73
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.patchJobSchedule
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobSchedulePatchOptions options = new JobSchedulePatchOptions(); BehaviorMana...
java
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobSchedulePatchOptions options = new JobSchedulePatchOptions(); BehaviorMana...
[ "public", "void", "patchJobSchedule", "(", "String", "jobScheduleId", ",", "Schedule", "schedule", ",", "JobSpecification", "jobSpecification", ",", "List", "<", "MetadataItem", ">", "metadata", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ...
Updates the specified job schedule. This method only replaces the properties specified with non-null values. @param jobScheduleId The ID of the job schedule. @param schedule The schedule according to which jobs will be created. If null, any existing schedule is left unchanged. @param jobSpecification The details of th...
[ "Updates", "the", "specified", "job", "schedule", ".", "This", "method", "only", "replaces", "the", "properties", "specified", "with", "non", "-", "null", "values", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L209-L219
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_bulk_POST
public ArrayList<OvhInstance> project_serviceName_instance_bulk_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkBulkParams[] networks, Long number, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPa...
java
public ArrayList<OvhInstance> project_serviceName_instance_bulk_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkBulkParams[] networks, Long number, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPa...
[ "public", "ArrayList", "<", "OvhInstance", ">", "project_serviceName_instance_bulk_POST", "(", "String", "serviceName", ",", "String", "flavorId", ",", "String", "groupId", ",", "String", "imageId", ",", "Boolean", "monthlyBilling", ",", "String", "name", ",", "OvhN...
Create multiple instances REST: POST /cloud/project/{serviceName}/instance/bulk @param flavorId [required] Instance flavor id @param groupId [required] Start instance in group @param imageId [required] Instance image id @param monthlyBilling [required] Active monthly billing @param name [required] Instance name @param...
[ "Create", "multiple", "instances" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2090-L2107
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java
FunctionLibFunction.setFunctionClass
public void setFunctionClass(String value, Identification id, Attributes attrs) { functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
java
public void setFunctionClass(String value, Identification id, Attributes attrs) { functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
[ "public", "void", "setFunctionClass", "(", "String", "value", ",", "Identification", "id", ",", "Attributes", "attrs", ")", "{", "functionCD", "=", "ClassDefinitionImpl", ".", "toClassDefinition", "(", "value", ",", "id", ",", "attrs", ")", ";", "}" ]
Setzt die Klassendefinition als Zeichenkette, welche diese Funktion implementiert. @param value Klassendefinition als Zeichenkette.
[ "Setzt", "die", "Klassendefinition", "als", "Zeichenkette", "welche", "diese", "Funktion", "implementiert", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java#L271-L274
allengeorge/libraft
libraft-agent/src/main/java/io/libraft/agent/RaftMember.java
RaftMember.compareAndSetChannel
public boolean compareAndSetChannel(@Nullable Channel oldChannel, @Nullable Channel newChannel) { return channel.compareAndSet(oldChannel, newChannel); }
java
public boolean compareAndSetChannel(@Nullable Channel oldChannel, @Nullable Channel newChannel) { return channel.compareAndSet(oldChannel, newChannel); }
[ "public", "boolean", "compareAndSetChannel", "(", "@", "Nullable", "Channel", "oldChannel", ",", "@", "Nullable", "Channel", "newChannel", ")", "{", "return", "channel", ".", "compareAndSet", "(", "oldChannel", ",", "newChannel", ")", ";", "}" ]
Set the {@link Channel} used to communicate with the Raft server to {@code newChannel} <strong>only if</strong> the current channel is {@code oldChannel}. noop otherwise. @param oldChannel expected value of the {@code Channel} @param newChannel a valid, <strong>connected</strong>d {@code Channel} to the Raft server. {...
[ "Set", "the", "{", "@link", "Channel", "}", "used", "to", "communicate", "with", "the", "Raft", "server", "to", "{", "@code", "newChannel", "}", "<strong", ">", "only", "if<", "/", "strong", ">", "the", "current", "channel", "is", "{", "@code", "oldChann...
train
https://github.com/allengeorge/libraft/blob/00d68bb5e68d4020af59df3c8a9a14380108ac89/libraft-agent/src/main/java/io/libraft/agent/RaftMember.java#L114-L116
gallandarakhneorg/afc
core/text/src/main/java/org/arakhne/afc/text/TextUtil.java
TextUtil.equalsIgnoreCaseAccents
@Pure @Inline(value = "TextUtil.removeAccents($1, $3).equalsIgnoreCase(TextUtil.removeAccents($2, $3))", imported = {TextUtil.class}) public static boolean equalsIgnoreCaseAccents(String s1, String s2, Map<Character, String> map) { return removeAccents(s1, map).equalsIgnoreCase(removeAccents(s2, map)); }
java
@Pure @Inline(value = "TextUtil.removeAccents($1, $3).equalsIgnoreCase(TextUtil.removeAccents($2, $3))", imported = {TextUtil.class}) public static boolean equalsIgnoreCaseAccents(String s1, String s2, Map<Character, String> map) { return removeAccents(s1, map).equalsIgnoreCase(removeAccents(s2, map)); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"TextUtil.removeAccents($1, $3).equalsIgnoreCase(TextUtil.removeAccents($2, $3))\"", ",", "imported", "=", "{", "TextUtil", ".", "class", "}", ")", "public", "static", "boolean", "equalsIgnoreCaseAccents", "(", "String", ...
Compares this <code>String</code> to another <code>String</code>, ignoring case and accent considerations. Two strings are considered equal ignoring case and accents if they are of the same length, and corresponding characters in the two strings are equal ignoring case and accents. <p>This method is equivalent to: <p...
[ "Compares", "this", "<code", ">", "String<", "/", "code", ">", "to", "another", "<code", ">", "String<", "/", "code", ">", "ignoring", "case", "and", "accent", "considerations", ".", "Two", "strings", "are", "considered", "equal", "ignoring", "case", "and", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1376-L1381
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/StringUtil.java
StringUtil.endsWithAny
public static boolean endsWithAny(boolean _ignoreCase, String _str, String... _args) { if (_str == null || _args == null || _args.length == 0) { return false; } String heystack = _str; if (_ignoreCase) { heystack = _str.toLowerCase(); } for (Strin...
java
public static boolean endsWithAny(boolean _ignoreCase, String _str, String... _args) { if (_str == null || _args == null || _args.length == 0) { return false; } String heystack = _str; if (_ignoreCase) { heystack = _str.toLowerCase(); } for (Strin...
[ "public", "static", "boolean", "endsWithAny", "(", "boolean", "_ignoreCase", ",", "String", "_str", ",", "String", "...", "_args", ")", "{", "if", "(", "_str", "==", "null", "||", "_args", "==", "null", "||", "_args", ".", "length", "==", "0", ")", "{"...
Checks if given string in _str ends with any of the given strings in _args. @param _ignoreCase true to ignore case, false to be case sensitive @param _str string to check @param _args patterns to find @return true if given string in _str ends with any of the given strings in _args, false if not or _str/_args is null
[ "Checks", "if", "given", "string", "in", "_str", "ends", "with", "any", "of", "the", "given", "strings", "in", "_args", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L521-L538
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/GrayFilter.java
GrayFilter.filterRGB
public int filterRGB(int pX, int pY, int pARGB) { // Get color components int r = pARGB >> 16 & 0xFF; int g = pARGB >> 8 & 0xFF; int b = pARGB & 0xFF; // ITU standard: Gray scale=(222*Red+707*Green+71*Blue)/1000 int gray = (222 * r + 707 * g + 71 * b) / 10...
java
public int filterRGB(int pX, int pY, int pARGB) { // Get color components int r = pARGB >> 16 & 0xFF; int g = pARGB >> 8 & 0xFF; int b = pARGB & 0xFF; // ITU standard: Gray scale=(222*Red+707*Green+71*Blue)/1000 int gray = (222 * r + 707 * g + 71 * b) / 10...
[ "public", "int", "filterRGB", "(", "int", "pX", ",", "int", "pY", ",", "int", "pARGB", ")", "{", "// Get color components\r", "int", "r", "=", "pARGB", ">>", "16", "&", "0xFF", ";", "int", "g", "=", "pARGB", ">>", "8", "&", "0xFF", ";", "int", "b",...
Filters one pixel using ITU color-conversion. @param pX x @param pY y @param pARGB pixel value in default color space @return the filtered pixel value in the default color space
[ "Filters", "one", "pixel", "using", "ITU", "color", "-", "conversion", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/GrayFilter.java#L112-L130
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaBindSurfaceToArray
public static int cudaBindSurfaceToArray(surfaceReference surfref, cudaArray array, cudaChannelFormatDesc desc) { return checkResult(cudaBindSurfaceToArrayNative(surfref, array, desc)); }
java
public static int cudaBindSurfaceToArray(surfaceReference surfref, cudaArray array, cudaChannelFormatDesc desc) { return checkResult(cudaBindSurfaceToArrayNative(surfref, array, desc)); }
[ "public", "static", "int", "cudaBindSurfaceToArray", "(", "surfaceReference", "surfref", ",", "cudaArray", "array", ",", "cudaChannelFormatDesc", "desc", ")", "{", "return", "checkResult", "(", "cudaBindSurfaceToArrayNative", "(", "surfref", ",", "array", ",", "desc",...
[C++ API] Binds an array to a surface <pre> template < class T, int dim > cudaError_t cudaBindSurfaceToArray ( const surface < T, dim > & surf, cudaArray_const_t array, const cudaChannelFormatDesc& desc ) [inline] </pre> <div> <p>[C++ API] Binds an array to a surface Binds the CUDA array <tt>array</tt> to the surface ...
[ "[", "C", "++", "API", "]", "Binds", "an", "array", "to", "a", "surface" ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L9477-L9480
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java
MultiLanguageTextProcessor.getBestMatch
public static String getBestMatch(final Locale locale, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { try { // resolve multiLanguageText via preferred locale. return getMultiLanguageTextByLanguage(locale.getLanguage(), multiLanguageText); } cat...
java
public static String getBestMatch(final Locale locale, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { try { // resolve multiLanguageText via preferred locale. return getMultiLanguageTextByLanguage(locale.getLanguage(), multiLanguageText); } cat...
[ "public", "static", "String", "getBestMatch", "(", "final", "Locale", "locale", ",", "final", "MultiLanguageTextOrBuilder", "multiLanguageText", ")", "throws", "NotAvailableException", "{", "try", "{", "// resolve multiLanguageText via preferred locale.", "return", "getMultiL...
Get the first multiLanguageText for a languageCode from a multiLanguageText type. This is equivalent to calling {@link #getMultiLanguageTextByLanguage(String, MultiLanguageTextOrBuilder)} but the language code is extracted from the locale by calling {@link Locale#getLanguage()}. If no multiLanguageText matches the lang...
[ "Get", "the", "first", "multiLanguageText", "for", "a", "languageCode", "from", "a", "multiLanguageText", "type", ".", "This", "is", "equivalent", "to", "calling", "{", "@link", "#getMultiLanguageTextByLanguage", "(", "String", "MultiLanguageTextOrBuilder", ")", "}", ...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java#L184-L197
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_voicemail_serviceName_directories_id_GET
public OvhVoicemailMessages billingAccount_voicemail_serviceName_directories_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); Strin...
java
public OvhVoicemailMessages billingAccount_voicemail_serviceName_directories_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); Strin...
[ "public", "OvhVoicemailMessages", "billingAccount_voicemail_serviceName_directories_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/voicemail/{se...
Get this object properties REST: GET /telephony/{billingAccount}/voicemail/{serviceName}/directories/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required] Id of the object
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7942-L7947
alipay/sofa-rpc
extension-impl/registry-zk/src/main/java/com/alipay/sofa/rpc/registry/zk/ZookeeperProviderObserver.java
ZookeeperProviderObserver.addProviderListener
public void addProviderListener(ConsumerConfig consumerConfig, ProviderInfoListener listener) { if (listener != null) { RegistryUtils.initOrAddList(providerListenerMap, consumerConfig, listener); } }
java
public void addProviderListener(ConsumerConfig consumerConfig, ProviderInfoListener listener) { if (listener != null) { RegistryUtils.initOrAddList(providerListenerMap, consumerConfig, listener); } }
[ "public", "void", "addProviderListener", "(", "ConsumerConfig", "consumerConfig", ",", "ProviderInfoListener", "listener", ")", "{", "if", "(", "listener", "!=", "null", ")", "{", "RegistryUtils", ".", "initOrAddList", "(", "providerListenerMap", ",", "consumerConfig"...
Add provider listener. @param consumerConfig the consumer config @param listener the listener
[ "Add", "provider", "listener", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-zk/src/main/java/com/alipay/sofa/rpc/registry/zk/ZookeeperProviderObserver.java#L59-L63
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/JacksonUtils.java
JacksonUtils.fromJson
public static <T> T fromJson(JsonNode json, Class<T> clazz, ClassLoader classLoader) { return SerializationUtils.fromJson(json, clazz, classLoader); }
java
public static <T> T fromJson(JsonNode json, Class<T> clazz, ClassLoader classLoader) { return SerializationUtils.fromJson(json, clazz, classLoader); }
[ "public", "static", "<", "T", ">", "T", "fromJson", "(", "JsonNode", "json", ",", "Class", "<", "T", ">", "clazz", ",", "ClassLoader", "classLoader", ")", "{", "return", "SerializationUtils", ".", "fromJson", "(", "json", ",", "clazz", ",", "classLoader", ...
Deserialize a {@link JsonNode}, with custom class loader. @param json @param clazz @return
[ "Deserialize", "a", "{", "@link", "JsonNode", "}", "with", "custom", "class", "loader", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/JacksonUtils.java#L96-L98
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonReceiver.java
PythonReceiver.collectBuffer
@SuppressWarnings({ "rawtypes", "unchecked" }) public void collectBuffer(Collector<OUT> c, int bufferSize) throws IOException { fileBuffer.position(0); while (fileBuffer.position() < bufferSize) { c.collect(deserializer.deserialize()); } }
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public void collectBuffer(Collector<OUT> c, int bufferSize) throws IOException { fileBuffer.position(0); while (fileBuffer.position() < bufferSize) { c.collect(deserializer.deserialize()); } }
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "void", "collectBuffer", "(", "Collector", "<", "OUT", ">", "c", ",", "int", "bufferSize", ")", "throws", "IOException", "{", "fileBuffer", ".", "position", "(", "0"...
Reads a buffer of the given size from the memory-mapped file, and collects all records contained. This method assumes that all values in the buffer are of the same type. This method does NOT take care of synchronization. The user must guarantee that the buffer was completely written before calling this method. @param ...
[ "Reads", "a", "buffer", "of", "the", "given", "size", "from", "the", "memory", "-", "mapped", "file", "and", "collects", "all", "records", "contained", ".", "This", "method", "assumes", "that", "all", "values", "in", "the", "buffer", "are", "of", "the", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonReceiver.java#L91-L98
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.isSubtype
public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException { return Global.getAnalysisCache().getDatabase(Subtypes2.class).isSubtype(t, possibleSupertype); }
java
public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException { return Global.getAnalysisCache().getDatabase(Subtypes2.class).isSubtype(t, possibleSupertype); }
[ "public", "static", "boolean", "isSubtype", "(", "ReferenceType", "t", ",", "ReferenceType", "possibleSupertype", ")", "throws", "ClassNotFoundException", "{", "return", "Global", ".", "getAnalysisCache", "(", ")", ".", "getDatabase", "(", "Subtypes2", ".", "class",...
Determine if one reference type is a subtype of another. @param t a reference type @param possibleSupertype the possible supertype @return true if t is a subtype of possibleSupertype, false if not
[ "Determine", "if", "one", "reference", "type", "is", "a", "subtype", "of", "another", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L109-L111
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/handlers/LogRepositoryComponent.java
LogRepositoryComponent.addRemoteProcessFile
public static String addRemoteProcessFile(String destinationType, long spTimeStamp, String spPid, String spLabel) { LogRepositoryManager destManager = getManager(destinationType) ; String subProcessFileName = null ; if (destManager instanceof LogRepositoryManagerImpl) subProcessFileName = ((LogRepositoryManage...
java
public static String addRemoteProcessFile(String destinationType, long spTimeStamp, String spPid, String spLabel) { LogRepositoryManager destManager = getManager(destinationType) ; String subProcessFileName = null ; if (destManager instanceof LogRepositoryManagerImpl) subProcessFileName = ((LogRepositoryManage...
[ "public", "static", "String", "addRemoteProcessFile", "(", "String", "destinationType", ",", "long", "spTimeStamp", ",", "String", "spPid", ",", "String", "spLabel", ")", "{", "LogRepositoryManager", "destManager", "=", "getManager", "(", "destinationType", ")", ";"...
add a remote file to the cache of files currently considered for retention on the parent. The child process uses some form of interProcessCommunication to notify receiver of file creation, and this method is driven @param destinationType Type of destination/repository @param spTimeStamp timeStamp to be associated with ...
[ "add", "a", "remote", "file", "to", "the", "cache", "of", "files", "currently", "considered", "for", "retention", "on", "the", "parent", ".", "The", "child", "process", "uses", "some", "form", "of", "interProcessCommunication", "to", "notify", "receiver", "of"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/handlers/LogRepositoryComponent.java#L104-L110
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java
MailService.findMessages
public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition, final long timeoutSeconds) { return findMessages(mailAccount, condition, timeoutSeconds, defaultSleepMillis); }
java
public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition, final long timeoutSeconds) { return findMessages(mailAccount, condition, timeoutSeconds, defaultSleepMillis); }
[ "public", "List", "<", "MailMessage", ">", "findMessages", "(", "final", "MailAccount", "mailAccount", ",", "final", "Predicate", "<", "MailMessage", ">", "condition", ",", "final", "long", "timeoutSeconds", ")", "{", "return", "findMessages", "(", "mailAccount", ...
<p> Tries to find messages for the specified mail account applying the specified {@code condition} until it times out using the specified {@code timeout} and {@link EmailConstants#MAIL_SLEEP_MILLIS}. </p> <b>Note:</b><br /> This method uses the specified mail account independently without reservation. If, however, the ...
[ "<p", ">", "Tries", "to", "find", "messages", "for", "the", "specified", "mail", "account", "applying", "the", "specified", "{", "@code", "condition", "}", "until", "it", "times", "out", "using", "the", "specified", "{", "@code", "timeout", "}", "and", "{"...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java#L346-L349
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java
CProductPersistenceImpl.removeByUUID_G
@Override public CProduct removeByUUID_G(String uuid, long groupId) throws NoSuchCProductException { CProduct cProduct = findByUUID_G(uuid, groupId); return remove(cProduct); }
java
@Override public CProduct removeByUUID_G(String uuid, long groupId) throws NoSuchCProductException { CProduct cProduct = findByUUID_G(uuid, groupId); return remove(cProduct); }
[ "@", "Override", "public", "CProduct", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCProductException", "{", "CProduct", "cProduct", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "return", "remove", "(", ...
Removes the c product where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the c product that was removed
[ "Removes", "the", "c", "product", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java#L804-L810
wcm-io/wcm-io-tooling
commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/XmlContentBuilder.java
XmlContentBuilder.buildContent
public Document buildContent(Map<String, Object> content) { Document doc = documentBuilder.newDocument(); String primaryType = StringUtils.defaultString((String)content.get(PN_PRIMARY_TYPE), NT_UNSTRUCTURED); Element jcrRoot = createJcrRoot(doc, primaryType); exportPayload(doc, jcrRoot, content); ...
java
public Document buildContent(Map<String, Object> content) { Document doc = documentBuilder.newDocument(); String primaryType = StringUtils.defaultString((String)content.get(PN_PRIMARY_TYPE), NT_UNSTRUCTURED); Element jcrRoot = createJcrRoot(doc, primaryType); exportPayload(doc, jcrRoot, content); ...
[ "public", "Document", "buildContent", "(", "Map", "<", "String", ",", "Object", ">", "content", ")", "{", "Document", "doc", "=", "documentBuilder", ".", "newDocument", "(", ")", ";", "String", "primaryType", "=", "StringUtils", ".", "defaultString", "(", "(...
Build XML for any JCR content. @param content Content with properties and nested nodes @return JCR XML
[ "Build", "XML", "for", "any", "JCR", "content", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/XmlContentBuilder.java#L119-L128
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/soap/AuthorizationHeaderHandler.java
AuthorizationHeaderHandler.setAuthorization
@SuppressWarnings("unchecked") /* See constructor comments. */ public void setAuthorization(Object soapClient, AdsSession adsSession) throws AuthenticationException { final String authorizationHeader = authorizationHeaderProvider.getAuthorizationHeader(adsSession, soapClientHandler.getEn...
java
@SuppressWarnings("unchecked") /* See constructor comments. */ public void setAuthorization(Object soapClient, AdsSession adsSession) throws AuthenticationException { final String authorizationHeader = authorizationHeaderProvider.getAuthorizationHeader(adsSession, soapClientHandler.getEn...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "/* See constructor comments. */", "public", "void", "setAuthorization", "(", "Object", "soapClient", ",", "AdsSession", "adsSession", ")", "throws", "AuthenticationException", "{", "final", "String", "authorizationHeader"...
Sets the authorization header created from the session on the soap client. @param soapClient the SOAP client to set the HTTP header on @param adsSession the session @throws AuthenticationException if the authorization header could not be created
[ "Sets", "the", "authorization", "header", "created", "from", "the", "session", "on", "the", "soap", "client", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/soap/AuthorizationHeaderHandler.java#L61-L72
pwittchen/ReactiveWiFi
library/src/main/java/com/github/pwittchen/reactivewifi/ReactiveWifi.java
ReactiveWifi.observeWifiSignalLevel
@RequiresPermission(ACCESS_WIFI_STATE) public static Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context) { return observeWifiSignalLevel(context, WifiSignalLevel.getMaxLevel()).map( new Function<Integer, WifiSignalLevel>() { @Override public WifiSignalLevel apply(Integer le...
java
@RequiresPermission(ACCESS_WIFI_STATE) public static Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context) { return observeWifiSignalLevel(context, WifiSignalLevel.getMaxLevel()).map( new Function<Integer, WifiSignalLevel>() { @Override public WifiSignalLevel apply(Integer le...
[ "@", "RequiresPermission", "(", "ACCESS_WIFI_STATE", ")", "public", "static", "Observable", "<", "WifiSignalLevel", ">", "observeWifiSignalLevel", "(", "final", "Context", "context", ")", "{", "return", "observeWifiSignalLevel", "(", "context", ",", "WifiSignalLevel", ...
Observes WiFi signal level with predefined max num levels. Returns WiFi signal level as enum with information about current level @param context Context of the activity or an application @return WifiSignalLevel as an enum
[ "Observes", "WiFi", "signal", "level", "with", "predefined", "max", "num", "levels", ".", "Returns", "WiFi", "signal", "level", "as", "enum", "with", "information", "about", "current", "level" ]
train
https://github.com/pwittchen/ReactiveWiFi/blob/eb2048663c1593b1706cfafb876542a41a223a1f/library/src/main/java/com/github/pwittchen/reactivewifi/ReactiveWifi.java#L125-L133
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.perform_operationEx
public base_resource perform_operationEx(nitro_service service, String action) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action(action); base_resource response = post_requestEx(service, option); return resp...
java
public base_resource perform_operationEx(nitro_service service, String action) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action(action); base_resource response = post_requestEx(service, option); return resp...
[ "public", "base_resource", "perform_operationEx", "(", "nitro_service", "service", ",", "String", "action", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "get_object_type", "(", ")", ".", "equals", "(", "\"l...
Use this method to perform a POST operation that returns a resource ...etc operation on netscaler resource. @param service nitro_service object. @param action action needs to be taken on resource. @return requested resource @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "POST", "operation", "that", "returns", "a", "resource", "...", "etc", "operation", "on", "netscaler", "resource", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L374-L382
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java
RendererUtils.findNestingForm
public static FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { UIComponent parent = uiComponent.getParent(); while (parent != null && (!ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) && !TRINIDAD_FORM_COMPONENT_F...
java
public static FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { UIComponent parent = uiComponent.getParent(); while (parent != null && (!ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) && !TRINIDAD_FORM_COMPONENT_F...
[ "public", "static", "FormInfo", "findNestingForm", "(", "UIComponent", "uiComponent", ",", "FacesContext", "facesContext", ")", "{", "UIComponent", "parent", "=", "uiComponent", ".", "getParent", "(", ")", ";", "while", "(", "parent", "!=", "null", "&&", "(", ...
Find the enclosing form of a component in the view-tree. All Subclasses of <code>UIForm</code> and all known form-families are searched for. Currently those are the Trinidad form family, and the (old) ADF Faces form family. <p/> There might be additional form families which have to be explicitly entered here. @param u...
[ "Find", "the", "enclosing", "form", "of", "a", "component", "in", "the", "view", "-", "tree", ".", "All", "Subclasses", "of", "<code", ">", "UIForm<", "/", "code", ">", "and", "all", "known", "form", "-", "families", "are", "searched", "for", ".", "Cur...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java#L1098-L1118
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java
SchedulerStateManagerAdaptor.setTopology
public Boolean setTopology(TopologyAPI.Topology topology, String topologyName) { return awaitResult(delegate.setTopology(topology, topologyName)); }
java
public Boolean setTopology(TopologyAPI.Topology topology, String topologyName) { return awaitResult(delegate.setTopology(topology, topologyName)); }
[ "public", "Boolean", "setTopology", "(", "TopologyAPI", ".", "Topology", "topology", ",", "String", "topologyName", ")", "{", "return", "awaitResult", "(", "delegate", ".", "setTopology", "(", "topology", ",", "topologyName", ")", ")", ";", "}" ]
Set the topology definition for the given topology @param topologyName the name of the topology @return Boolean - Success or Failure
[ "Set", "the", "topology", "definition", "for", "the", "given", "topology" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java#L118-L120
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.repairParentRelationships
public static void repairParentRelationships(Collection<ActivityInstanceImpl> values, String processInstanceId) { for (ActivityInstanceImpl activityInstance : values) { // if the determined activity instance id and the parent activity instance are equal, // just put the activity instance under the proce...
java
public static void repairParentRelationships(Collection<ActivityInstanceImpl> values, String processInstanceId) { for (ActivityInstanceImpl activityInstance : values) { // if the determined activity instance id and the parent activity instance are equal, // just put the activity instance under the proce...
[ "public", "static", "void", "repairParentRelationships", "(", "Collection", "<", "ActivityInstanceImpl", ">", "values", ",", "String", "processInstanceId", ")", "{", "for", "(", "ActivityInstanceImpl", "activityInstance", ":", "values", ")", "{", "// if the determined a...
This is relevant for {@link GetActivityInstanceCmd} where in case of legacy multi-instance execution trees, the default algorithm omits multi-instance activity instances.
[ "This", "is", "relevant", "for", "{" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L508-L516
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java
FailOverExecutionControlProvider.generate
@Override public ExecutionControl generate(ExecutionEnv env, Map<String, String> parameters) throws Throwable { Throwable thrown = null; for (int i = 0; i <= 9; ++i) { String param = parameters.get("" + i); if (param != null && !param.isEmpty()) { ...
java
@Override public ExecutionControl generate(ExecutionEnv env, Map<String, String> parameters) throws Throwable { Throwable thrown = null; for (int i = 0; i <= 9; ++i) { String param = parameters.get("" + i); if (param != null && !param.isEmpty()) { ...
[ "@", "Override", "public", "ExecutionControl", "generate", "(", "ExecutionEnv", "env", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "throws", "Throwable", "{", "Throwable", "thrown", "=", "null", ";", "for", "(", "int", "i", "=", "0", ...
Create and return a locally executing {@code ExecutionControl} instance. At least one parameter should have a spec. @param env the execution environment, provided by JShell @param parameters the modified parameter map. @return the execution engine @throws Throwable if all the given providers fail, the exception that o...
[ "Create", "and", "return", "a", "locally", "executing", "{", "@code", "ExecutionControl", "}", "instance", ".", "At", "least", "one", "parameter", "should", "have", "a", "spec", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java#L95-L131
apache/incubator-gobblin
gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/Instrumented.java
Instrumented.getMetricContext
public static MetricContext getMetricContext(State state, Class<?> klazz) { return getMetricContext(state, klazz, new ArrayList<Tag<?>>()); }
java
public static MetricContext getMetricContext(State state, Class<?> klazz) { return getMetricContext(state, klazz, new ArrayList<Tag<?>>()); }
[ "public", "static", "MetricContext", "getMetricContext", "(", "State", "state", ",", "Class", "<", "?", ">", "klazz", ")", "{", "return", "getMetricContext", "(", "state", ",", "klazz", ",", "new", "ArrayList", "<", "Tag", "<", "?", ">", ">", "(", ")", ...
Gets metric context with no additional tags. See {@link #getMetricContext(State, Class, List)}
[ "Gets", "metric", "context", "with", "no", "additional", "tags", ".", "See", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/Instrumented.java#L90-L92
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.eraseJob
public GitlabJob eraseJob(Integer projectId, Integer jobId) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabJob.URL + "/" + sanitizeId(jobId, "JobID") + "/erase"; return dispatch().to(tailUrl, GitlabJob.class); }
java
public GitlabJob eraseJob(Integer projectId, Integer jobId) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabJob.URL + "/" + sanitizeId(jobId, "JobID") + "/erase"; return dispatch().to(tailUrl, GitlabJob.class); }
[ "public", "GitlabJob", "eraseJob", "(", "Integer", "projectId", ",", "Integer", "jobId", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "sanitizeProjectId", "(", "projectId", ")", "+", "GitlabJob", ...
Erase a single job of a project (remove job artifacts and a job trace) @param projectId @param jobId @return @throws IOException on gitlab api call error
[ "Erase", "a", "single", "job", "of", "a", "project", "(", "remove", "job", "artifacts", "and", "a", "job", "trace", ")" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L1059-L1062
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkmax/MkMaxTree.java
MkMaxTree.kNNdistanceAdjustment
@Override protected void kNNdistanceAdjustment(MkMaxEntry entry, Map<DBID, KNNList> knnLists) { MkMaxTreeNode<O> node = getNode(entry); double knnDist_node = 0.; if (node.isLeaf()) { for (int i = 0; i < node.getNumEntries(); i++) { MkMaxEntry leafEntry = node.getEntry(i); leafEntry.s...
java
@Override protected void kNNdistanceAdjustment(MkMaxEntry entry, Map<DBID, KNNList> knnLists) { MkMaxTreeNode<O> node = getNode(entry); double knnDist_node = 0.; if (node.isLeaf()) { for (int i = 0; i < node.getNumEntries(); i++) { MkMaxEntry leafEntry = node.getEntry(i); leafEntry.s...
[ "@", "Override", "protected", "void", "kNNdistanceAdjustment", "(", "MkMaxEntry", "entry", ",", "Map", "<", "DBID", ",", "KNNList", ">", "knnLists", ")", "{", "MkMaxTreeNode", "<", "O", ">", "node", "=", "getNode", "(", "entry", ")", ";", "double", "knnDis...
Adjusts the knn distance in the subtree of the specified root entry.
[ "Adjusts", "the", "knn", "distance", "in", "the", "subtree", "of", "the", "specified", "root", "entry", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkmax/MkMaxTree.java#L137-L155
molgenis/molgenis
molgenis-js/src/main/java/org/molgenis/js/magma/JsMagmaScriptEvaluator.java
JsMagmaScriptEvaluator.createBindings
private Bindings createBindings(Entity entity, int depth) { Bindings bindings = new SimpleBindings(); JSObject global = (JSObject) magmaBindings.get("nashorn.global"); JSObject magmaScript = (JSObject) global.getMember(KEY_MAGMA_SCRIPT); JSObject dollarFunction = (JSObject) magmaScript.getMember(KEY_DOL...
java
private Bindings createBindings(Entity entity, int depth) { Bindings bindings = new SimpleBindings(); JSObject global = (JSObject) magmaBindings.get("nashorn.global"); JSObject magmaScript = (JSObject) global.getMember(KEY_MAGMA_SCRIPT); JSObject dollarFunction = (JSObject) magmaScript.getMember(KEY_DOL...
[ "private", "Bindings", "createBindings", "(", "Entity", "entity", ",", "int", "depth", ")", "{", "Bindings", "bindings", "=", "new", "SimpleBindings", "(", ")", ";", "JSObject", "global", "=", "(", "JSObject", ")", "magmaBindings", ".", "get", "(", "\"nashor...
Creates magmascript bindings for a given Entity. @param entity the entity to bind to the magmascript $ function @param depth maximum depth to follow references when creating the entity value map @return Bindings with $ function bound to the entity
[ "Creates", "magmascript", "bindings", "for", "a", "given", "Entity", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-js/src/main/java/org/molgenis/js/magma/JsMagmaScriptEvaluator.java#L128-L139
FXMisc/Flowless
src/main/java/org/fxmisc/flowless/CellPositioner.java
CellPositioner.placeStartFromEnd
public C placeStartFromEnd(int itemIndex, double startOffEnd) { C cell = getSizedCell(itemIndex); double y = sizeTracker.getViewportLength() + startOffEnd; relocate(cell, 0, y); cell.getNode().setVisible(true); return cell; }
java
public C placeStartFromEnd(int itemIndex, double startOffEnd) { C cell = getSizedCell(itemIndex); double y = sizeTracker.getViewportLength() + startOffEnd; relocate(cell, 0, y); cell.getNode().setVisible(true); return cell; }
[ "public", "C", "placeStartFromEnd", "(", "int", "itemIndex", ",", "double", "startOffEnd", ")", "{", "C", "cell", "=", "getSizedCell", "(", "itemIndex", ")", ";", "double", "y", "=", "sizeTracker", ".", "getViewportLength", "(", ")", "+", "startOffEnd", ";",...
Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible node in the viewport, and further offsets this value by {@code endOffStart}, so that the node's <em>bottom</em> edge appears (if negative) "above," (if 0) "at," or (if negative) "below" the viewport's "top" edge. See {@link Orie...
[ "Properly", "resizes", "the", "cell", "s", "node", "and", "sets", "its", "layoutY", "value", "so", "that", "is", "the", "last", "visible", "node", "in", "the", "viewport", "and", "further", "offsets", "this", "value", "by", "{", "@code", "endOffStart", "}"...
train
https://github.com/FXMisc/Flowless/blob/dce2269ebafed8f79203d00085af41f06f3083bc/src/main/java/org/fxmisc/flowless/CellPositioner.java#L204-L210
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chebyshev
public static double Chebyshev(double x1, double y1, double x2, double y2) { double max = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); return max; }
java
public static double Chebyshev(double x1, double y1, double x2, double y2) { double max = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); return max; }
[ "public", "static", "double", "Chebyshev", "(", "double", "x1", ",", "double", "y1", ",", "double", "x2", ",", "double", "y2", ")", "{", "double", "max", "=", "Math", ".", "max", "(", "Math", ".", "abs", "(", "x1", "-", "x2", ")", ",", "Math", "....
Gets the Chebyshev distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Chebyshev distance between x and y.
[ "Gets", "the", "Chebyshev", "distance", "between", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L198-L201
lkwg82/enforcer-rules
src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
EnforcerRuleUtils.checkIfModelMatches
protected boolean checkIfModelMatches ( String groupId, String artifactId, String version, Model model ) { // try these first. String modelGroup = model.getGroupId(); String modelArtifactId = model.getArtifactId(); String modelVersion = model.getVersion(); try { ...
java
protected boolean checkIfModelMatches ( String groupId, String artifactId, String version, Model model ) { // try these first. String modelGroup = model.getGroupId(); String modelArtifactId = model.getArtifactId(); String modelVersion = model.getVersion(); try { ...
[ "protected", "boolean", "checkIfModelMatches", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "Model", "model", ")", "{", "// try these first.", "String", "modelGroup", "=", "model", ".", "getGroupId", "(", ")", ";", "Strin...
Make sure the model is the one I'm expecting. @param groupId the group id @param artifactId the artifact id @param version the version @param model Model being checked. @return true, if check if model matches
[ "Make", "sure", "the", "model", "is", "the", "one", "I", "m", "expecting", "." ]
train
https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L285-L331
googleapis/google-cloud-java
google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java
GrafeasV1Beta1Client.createOccurrence
public final Occurrence createOccurrence(String parent, Occurrence occurrence) { CreateOccurrenceRequest request = CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); return createOccurrence(request); }
java
public final Occurrence createOccurrence(String parent, Occurrence occurrence) { CreateOccurrenceRequest request = CreateOccurrenceRequest.newBuilder().setParent(parent).setOccurrence(occurrence).build(); return createOccurrence(request); }
[ "public", "final", "Occurrence", "createOccurrence", "(", "String", "parent", ",", "Occurrence", "occurrence", ")", "{", "CreateOccurrenceRequest", "request", "=", "CreateOccurrenceRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "...
Creates a new occurrence. <p>Sample code: <pre><code> try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); Occurrence occurrence = Occurrence.newBuilder().build(); Occurrence response = grafeasV1Beta1Client.createOccurrence(parent.toString...
[ "Creates", "a", "new", "occurrence", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java#L571-L576
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/converter/filter/AvroFieldsPickConverter.java
AvroFieldsPickConverter.createSchema
private static Schema createSchema(Schema schema, String fieldsStr) { List<String> fields = SPLITTER_ON_COMMA.splitToList(fieldsStr); TrieNode root = buildTrie(fields); return createSchemaHelper(schema, root); }
java
private static Schema createSchema(Schema schema, String fieldsStr) { List<String> fields = SPLITTER_ON_COMMA.splitToList(fieldsStr); TrieNode root = buildTrie(fields); return createSchemaHelper(schema, root); }
[ "private", "static", "Schema", "createSchema", "(", "Schema", "schema", ",", "String", "fieldsStr", ")", "{", "List", "<", "String", ">", "fields", "=", "SPLITTER_ON_COMMA", ".", "splitToList", "(", "fieldsStr", ")", ";", "TrieNode", "root", "=", "buildTrie", ...
Creates Schema containing only specified fields. Traversing via either fully qualified names or input Schema is quite inefficient as it's hard to align each other. Also, as Schema's fields is immutable, all the fields need to be collected before updating field in Schema. Figuring out all required field in just input S...
[ "Creates", "Schema", "containing", "only", "specified", "fields", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/converter/filter/AvroFieldsPickConverter.java#L133-L137
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/UnitVectorProperty3dfx.java
UnitVectorProperty3dfx.set
public void set(double x, double y, double z) { assert Vector3D.isUnitVector(x, y, z) : AssertMessages.normalizedParameters(0, 1, 2); if ((x != getX() || y != getY() || z != getZ()) && !isBound()) { final Vector3dfx v = super.get(); v.set(x, y, z); fireValueChangedEvent(); } }
java
public void set(double x, double y, double z) { assert Vector3D.isUnitVector(x, y, z) : AssertMessages.normalizedParameters(0, 1, 2); if ((x != getX() || y != getY() || z != getZ()) && !isBound()) { final Vector3dfx v = super.get(); v.set(x, y, z); fireValueChangedEvent(); } }
[ "public", "void", "set", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "assert", "Vector3D", ".", "isUnitVector", "(", "x", ",", "y", ",", "z", ")", ":", "AssertMessages", ".", "normalizedParameters", "(", "0", ",", "1", ",", ...
Change the coordinates of the vector. @param x x coordinate of the vector. @param y y coordinate of the vector. @param z z coordinate of the vector.
[ "Change", "the", "coordinates", "of", "the", "vector", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/UnitVectorProperty3dfx.java#L137-L144
trustathsh/ironcommon
src/main/java/de/hshannover/f4/trust/ironcommon/properties/Properties.java
Properties.getString
public String getString(String propertyPath, String defaultValue) { Object o = getValue(propertyPath, defaultValue); if (o != null) { return o.toString(); } else { // if the defaultValue is null return (String) o; } }
java
public String getString(String propertyPath, String defaultValue) { Object o = getValue(propertyPath, defaultValue); if (o != null) { return o.toString(); } else { // if the defaultValue is null return (String) o; } }
[ "public", "String", "getString", "(", "String", "propertyPath", ",", "String", "defaultValue", ")", "{", "Object", "o", "=", "getValue", "(", "propertyPath", ",", "defaultValue", ")", ";", "if", "(", "o", "!=", "null", ")", "{", "return", "o", ".", "toSt...
Get the String-value from the property path. If the property path does not exist, the default value is returned. @param propertyPath Example: foo.bar.key @param defaultValue is returned when the propertyPath does not exist @return the value for the given propertyPath
[ "Get", "the", "String", "-", "value", "from", "the", "property", "path", ".", "If", "the", "property", "path", "does", "not", "exist", "the", "default", "value", "is", "returned", "." ]
train
https://github.com/trustathsh/ironcommon/blob/fee589a9300ab16744ca12fafae4357dd18c9fcb/src/main/java/de/hshannover/f4/trust/ironcommon/properties/Properties.java#L244-L252
JodaOrg/joda-time
src/main/java/org/joda/time/Partial.java
Partial.without
public Partial without(DateTimeFieldType fieldType) { int index = indexOf(fieldType); if (index != -1) { DateTimeFieldType[] newTypes = new DateTimeFieldType[size() - 1]; int[] newValues = new int[size() - 1]; System.arraycopy(iTypes, 0, newTypes, 0, index); ...
java
public Partial without(DateTimeFieldType fieldType) { int index = indexOf(fieldType); if (index != -1) { DateTimeFieldType[] newTypes = new DateTimeFieldType[size() - 1]; int[] newValues = new int[size() - 1]; System.arraycopy(iTypes, 0, newTypes, 0, index); ...
[ "public", "Partial", "without", "(", "DateTimeFieldType", "fieldType", ")", "{", "int", "index", "=", "indexOf", "(", "fieldType", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "DateTimeFieldType", "[", "]", "newTypes", "=", "new", "DateTimeField...
Gets a copy of this date with the specified field removed. <p> If this partial did not previously support the field, no error occurs. @param fieldType the field type to remove, may be null @return a copy of this instance with the field removed
[ "Gets", "a", "copy", "of", "this", "date", "with", "the", "specified", "field", "removed", ".", "<p", ">", "If", "this", "partial", "did", "not", "previously", "support", "the", "field", "no", "error", "occurs", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Partial.java#L515-L529
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceCountryUtil.java
CommerceCountryUtil.findByUUID_G
public static CommerceCountry findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchCountryException { return getPersistence().findByUUID_G(uuid, groupId); }
java
public static CommerceCountry findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchCountryException { return getPersistence().findByUUID_G(uuid, groupId); }
[ "public", "static", "CommerceCountry", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "exception", ".", "NoSuchCountryException", "{", "return", "getPersistence", "(", ")", ".", "findByU...
Returns the commerce country where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCountryException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce country @throws NoSuchCountryException if a matching commerce country could not be found
[ "Returns", "the", "commerce", "country", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCountryException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceCountryUtil.java#L279-L282
OpenLiberty/open-liberty
dev/com.ibm.ws.javamail/src/com/ibm/ws/javamail/internal/injection/MailSessionResourceFactoryBuilder.java
MailSessionResourceFactoryBuilder.getMailSessionID
private static final String getMailSessionID(String application, String module, String component, String jndiName) { StringBuilder sb = new StringBuilder(jndiName.length() + 80); if (application != null) { sb.append("application").append('[').append(application).append(']').append('/'); ...
java
private static final String getMailSessionID(String application, String module, String component, String jndiName) { StringBuilder sb = new StringBuilder(jndiName.length() + 80); if (application != null) { sb.append("application").append('[').append(application).append(']').append('/'); ...
[ "private", "static", "final", "String", "getMailSessionID", "(", "String", "application", ",", "String", "module", ",", "String", "component", ",", "String", "jndiName", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "jndiName", ".", "length"...
Utility method that creates a unique identifier for an application defined data source. For example, application[MyApp]/module[MyModule]/connectionFactory[java:module/env/jdbc/cf1] @param application application name if data source is in java:app, java:module, or java:comp. Otherwise null. @param module module name if...
[ "Utility", "method", "that", "creates", "a", "unique", "identifier", "for", "an", "application", "defined", "data", "source", ".", "For", "example", "application", "[", "MyApp", "]", "/", "module", "[", "MyModule", "]", "/", "connectionFactory", "[", "java", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.javamail/src/com/ibm/ws/javamail/internal/injection/MailSessionResourceFactoryBuilder.java#L159-L170
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java
FavoritesInner.getAsync
public Observable<ApplicationInsightsComponentFavoriteInner> getAsync(String resourceGroupName, String resourceName, String favoriteId) { return getWithServiceResponseAsync(resourceGroupName, resourceName, favoriteId).map(new Func1<ServiceResponse<ApplicationInsightsComponentFavoriteInner>, ApplicationInsightsC...
java
public Observable<ApplicationInsightsComponentFavoriteInner> getAsync(String resourceGroupName, String resourceName, String favoriteId) { return getWithServiceResponseAsync(resourceGroupName, resourceName, favoriteId).map(new Func1<ServiceResponse<ApplicationInsightsComponentFavoriteInner>, ApplicationInsightsC...
[ "public", "Observable", "<", "ApplicationInsightsComponentFavoriteInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "favoriteId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "re...
Get a single favorite by its FavoriteId, defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param favoriteId The Id of a specific favorite defined in the Application Insights component ...
[ "Get", "a", "single", "favorite", "by", "its", "FavoriteId", "defined", "within", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java#L311-L318
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java
GenericEncodingStrategy.getLobLocator
private void getLobLocator(CodeAssembler a, StorablePropertyInfo info) { if (!info.isLob()) { throw new IllegalArgumentException(); } a.invokeInterface(TypeDesc.forClass(RawSupport.class), "getLocator", TypeDesc.LONG, new TypeDesc[] {info.getStorageType...
java
private void getLobLocator(CodeAssembler a, StorablePropertyInfo info) { if (!info.isLob()) { throw new IllegalArgumentException(); } a.invokeInterface(TypeDesc.forClass(RawSupport.class), "getLocator", TypeDesc.LONG, new TypeDesc[] {info.getStorageType...
[ "private", "void", "getLobLocator", "(", "CodeAssembler", "a", ",", "StorablePropertyInfo", "info", ")", "{", "if", "(", "!", "info", ".", "isLob", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "a", ".", "invokeInterfa...
Generates code to get a Lob locator value from RawSupport. RawSupport instance and Lob instance must be on the stack. Result is a long locator value on the stack.
[ "Generates", "code", "to", "get", "a", "Lob", "locator", "value", "from", "RawSupport", ".", "RawSupport", "instance", "and", "Lob", "instance", "must", "be", "on", "the", "stack", ".", "Result", "is", "a", "long", "locator", "value", "on", "the", "stack",...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1795-L1801
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupHelper.java
HistoryCleanupHelper.isWithinBatchWindow
public static boolean isWithinBatchWindow(Date date, ProcessEngineConfigurationImpl configuration) { if (configuration.getBatchWindowManager().isBatchWindowConfigured(configuration)) { BatchWindow batchWindow = configuration.getBatchWindowManager().getCurrentOrNextBatchWindow(date, configuration); if (b...
java
public static boolean isWithinBatchWindow(Date date, ProcessEngineConfigurationImpl configuration) { if (configuration.getBatchWindowManager().isBatchWindowConfigured(configuration)) { BatchWindow batchWindow = configuration.getBatchWindowManager().getCurrentOrNextBatchWindow(date, configuration); if (b...
[ "public", "static", "boolean", "isWithinBatchWindow", "(", "Date", "date", ",", "ProcessEngineConfigurationImpl", "configuration", ")", "{", "if", "(", "configuration", ".", "getBatchWindowManager", "(", ")", ".", "isBatchWindowConfigured", "(", "configuration", ")", ...
Checks if given date is within a batch window. Batch window start time is checked inclusively. @param date @return
[ "Checks", "if", "given", "date", "is", "within", "a", "batch", "window", ".", "Batch", "window", "start", "time", "is", "checked", "inclusively", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupHelper.java#L45-L55
jsurfer/JsonSurfer
jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java
JsonSurfer.collectOne
public Object collectOne(InputStream inputStream, JsonPath... paths) { return collectOne(inputStream, Object.class, paths); }
java
public Object collectOne(InputStream inputStream, JsonPath... paths) { return collectOne(inputStream, Object.class, paths); }
[ "public", "Object", "collectOne", "(", "InputStream", "inputStream", ",", "JsonPath", "...", "paths", ")", "{", "return", "collectOne", "(", "inputStream", ",", "Object", ".", "class", ",", "paths", ")", ";", "}" ]
Collect the first matched value and stop parsing immediately @param inputStream json inpustream @param paths JsonPath @return Matched value
[ "Collect", "the", "first", "matched", "value", "and", "stop", "parsing", "immediately" ]
train
https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L488-L490
timehop/sticky-headers-recyclerview
library/src/main/java/com/timehop/stickyheadersrecyclerview/HeaderPositionCalculator.java
HeaderPositionCalculator.hasStickyHeader
public boolean hasStickyHeader(View itemView, int orientation, int position) { int offset, margin; mDimensionCalculator.initMargins(mTempRect1, itemView); if (orientation == LinearLayout.VERTICAL) { offset = itemView.getTop(); margin = mTempRect1.top; } else { offset = itemView.getLeft...
java
public boolean hasStickyHeader(View itemView, int orientation, int position) { int offset, margin; mDimensionCalculator.initMargins(mTempRect1, itemView); if (orientation == LinearLayout.VERTICAL) { offset = itemView.getTop(); margin = mTempRect1.top; } else { offset = itemView.getLeft...
[ "public", "boolean", "hasStickyHeader", "(", "View", "itemView", ",", "int", "orientation", ",", "int", "position", ")", "{", "int", "offset", ",", "margin", ";", "mDimensionCalculator", ".", "initMargins", "(", "mTempRect1", ",", "itemView", ")", ";", "if", ...
Determines if a view should have a sticky header. The view has a sticky header if: 1. It is the first element in the recycler view 2. It has a valid ID associated to its position @param itemView given by the RecyclerView @param orientation of the Recyclerview @param position of the list item in question @return True i...
[ "Determines", "if", "a", "view", "should", "have", "a", "sticky", "header", ".", "The", "view", "has", "a", "sticky", "header", "if", ":", "1", ".", "It", "is", "the", "first", "element", "in", "the", "recycler", "view", "2", ".", "It", "has", "a", ...
train
https://github.com/timehop/sticky-headers-recyclerview/blob/f5a9e9b8f5d96734e20439b0a41381865fa52fb7/library/src/main/java/com/timehop/stickyheadersrecyclerview/HeaderPositionCalculator.java#L50-L62
moleculer-java/moleculer-java
src/main/java/services/moleculer/ServiceBroker.java
ServiceBroker.createService
public ServiceBroker createService(String name, Service service) { if (serviceRegistry == null) { // Start service later services.put(name, service); } else { // Register and start service now eventbus.addListeners(name, service); serviceRegistry.addActions(name, service); } return this; }
java
public ServiceBroker createService(String name, Service service) { if (serviceRegistry == null) { // Start service later services.put(name, service); } else { // Register and start service now eventbus.addListeners(name, service); serviceRegistry.addActions(name, service); } return this; }
[ "public", "ServiceBroker", "createService", "(", "String", "name", ",", "Service", "service", ")", "{", "if", "(", "serviceRegistry", "==", "null", ")", "{", "// Start service later", "services", ".", "put", "(", "name", ",", "service", ")", ";", "}", "else"...
Installs a new service with the specified name (eg. "user" service) and notifies other nodes about the actions/listeners of this new service. @param name custom service name (eg. "user", "logger", "configurator", etc.) @param service the new service instance @return this ServiceBroker instance (from "method chaining")
[ "Installs", "a", "new", "service", "with", "the", "specified", "name", "(", "eg", ".", "user", "service", ")", "and", "notifies", "other", "nodes", "about", "the", "actions", "/", "listeners", "of", "this", "new", "service", "." ]
train
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/ServiceBroker.java#L612-L624
actorapp/actor-platform
actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/modules/JsFilesModule.java
JsFilesModule.getFileUrl
public String getFileUrl(long id, long accessHash) { CachedFileUrl cachedFileUrl = keyValueStorage.getValue(id); if (cachedFileUrl != null) { long urlTime = cachedFileUrl.getTimeout(); long currentTime = im.actor.runtime.Runtime.getCurrentSyncedTime(); if (urlTime <= ...
java
public String getFileUrl(long id, long accessHash) { CachedFileUrl cachedFileUrl = keyValueStorage.getValue(id); if (cachedFileUrl != null) { long urlTime = cachedFileUrl.getTimeout(); long currentTime = im.actor.runtime.Runtime.getCurrentSyncedTime(); if (urlTime <= ...
[ "public", "String", "getFileUrl", "(", "long", "id", ",", "long", "accessHash", ")", "{", "CachedFileUrl", "cachedFileUrl", "=", "keyValueStorage", ".", "getValue", "(", "id", ")", ";", "if", "(", "cachedFileUrl", "!=", "null", ")", "{", "long", "urlTime", ...
Getting URL for file if available @param id file's id @param accessHash file's accessHash @return url for a file or null if not yet available
[ "Getting", "URL", "for", "file", "if", "available" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/modules/JsFilesModule.java#L93-L112
Red5/red5-io
src/main/java/org/red5/io/amf/Output.java
Output.encodeString
protected static byte[] encodeString(String string) { Element element = getStringCache().get(string); byte[] encoded = (element == null ? null : (byte[]) element.getObjectValue()); if (encoded == null) { ByteBuffer buf = AMF.CHARSET.encode(string); encoded = new byte[buf....
java
protected static byte[] encodeString(String string) { Element element = getStringCache().get(string); byte[] encoded = (element == null ? null : (byte[]) element.getObjectValue()); if (encoded == null) { ByteBuffer buf = AMF.CHARSET.encode(string); encoded = new byte[buf....
[ "protected", "static", "byte", "[", "]", "encodeString", "(", "String", "string", ")", "{", "Element", "element", "=", "getStringCache", "(", ")", ".", "get", "(", "string", ")", ";", "byte", "[", "]", "encoded", "=", "(", "element", "==", "null", "?",...
Encode string. @param string string to encode @return encoded string
[ "Encode", "string", "." ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/amf/Output.java#L526-L536
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7