repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { """ Pass the call on to the underlying handler @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) """ if (m_firstTagNotEmitted) { flush(); } m_handler....
java
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.ignorableWhitespace(ch, start, length); }
[ "public", "void", "ignorableWhitespace", "(", "char", "[", "]", "ch", ",", "int", "start", ",", "int", "length", ")", "throws", "SAXException", "{", "if", "(", "m_firstTagNotEmitted", ")", "{", "flush", "(", ")", ";", "}", "m_handler", ".", "ignorableWhite...
Pass the call on to the underlying handler @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
[ "Pass", "the", "call", "on", "to", "the", "underlying", "handler" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L839-L847
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java
InetAddressPredicates.ofCidr
public static Predicate<InetAddress> ofCidr(InetAddress baseAddress, int maskBits) { """ Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} is in the range of a <a href="https://tools.ietf.org/html/rfc4632">Classless Inter-domain Routing (CIDR)</a> block. @param baseAddress...
java
public static Predicate<InetAddress> ofCidr(InetAddress baseAddress, int maskBits) { requireNonNull(baseAddress, "baseAddress"); checkArgument(maskBits >= 0, "maskBits: %s (expected: >= 0)", maskBits); return ofCidr(baseAddress, maskBits, maskBits); }
[ "public", "static", "Predicate", "<", "InetAddress", ">", "ofCidr", "(", "InetAddress", "baseAddress", ",", "int", "maskBits", ")", "{", "requireNonNull", "(", "baseAddress", ",", "\"baseAddress\"", ")", ";", "checkArgument", "(", "maskBits", ">=", "0", ",", "...
Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} is in the range of a <a href="https://tools.ietf.org/html/rfc4632">Classless Inter-domain Routing (CIDR)</a> block. @param baseAddress the base {@link InetAddress} of a CIDR notation @param maskBits the number of significant bits w...
[ "Returns", "a", "{", "@link", "Predicate", "}", "which", "returns", "{", "@code", "true", "}", "if", "the", "given", "{", "@link", "InetAddress", "}", "is", "in", "the", "range", "of", "a", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf",...
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java#L101-L105
haifengl/smile
core/src/main/java/smile/classification/NeuralNetwork.java
NeuralNetwork.setInput
private void setInput(double[] x) { """ Sets the input vector into the input layer. @param x the input vector. """ if (x.length != inputLayer.units) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, inputLayer.units)); } ...
java
private void setInput(double[] x) { if (x.length != inputLayer.units) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, inputLayer.units)); } System.arraycopy(x, 0, inputLayer.output, 0, inputLayer.units); }
[ "private", "void", "setInput", "(", "double", "[", "]", "x", ")", "{", "if", "(", "x", ".", "length", "!=", "inputLayer", ".", "units", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"Invalid input vector size: %d,...
Sets the input vector into the input layer. @param x the input vector.
[ "Sets", "the", "input", "vector", "into", "the", "input", "layer", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/classification/NeuralNetwork.java#L597-L602
Impetus/Kundera
src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/KunderaPropertyBuilder.java
KunderaPropertyBuilder.propertyNullCheck
private static void propertyNullCheck(String dbType, String host, String port, String dbName) { """ Property null check. @param dbType the db type @param host the host @param port the port @param dbName the db name """ if (dbType == null || dbType.isEmpty()) { LOGGER.erro...
java
private static void propertyNullCheck(String dbType, String host, String port, String dbName) { if (dbType == null || dbType.isEmpty()) { LOGGER.error("Property '" + EthConstants.DATABASE_TYPE + "' can't be null or empty"); throw new KunderaException("Property '" + EthConsta...
[ "private", "static", "void", "propertyNullCheck", "(", "String", "dbType", ",", "String", "host", ",", "String", "port", ",", "String", "dbName", ")", "{", "if", "(", "dbType", "==", "null", "||", "dbType", ".", "isEmpty", "(", ")", ")", "{", "LOGGER", ...
Property null check. @param dbType the db type @param host the host @param port the port @param dbName the db name
[ "Property", "null", "check", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/KunderaPropertyBuilder.java#L134-L161
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java
CommonHelper.assertNotBlank
public static void assertNotBlank(final String name, final String value, final String msg) { """ Verify that a String is not blank otherwise throw a {@link TechnicalException}. @param name name if the string @param value value of the string @param msg an expanatory message """ assertTrue(!isBlank...
java
public static void assertNotBlank(final String name, final String value, final String msg) { assertTrue(!isBlank(value), name + " cannot be blank" + (msg != null ? ": " + msg : "")); }
[ "public", "static", "void", "assertNotBlank", "(", "final", "String", "name", ",", "final", "String", "value", ",", "final", "String", "msg", ")", "{", "assertTrue", "(", "!", "isBlank", "(", "value", ")", ",", "name", "+", "\" cannot be blank\"", "+", "("...
Verify that a String is not blank otherwise throw a {@link TechnicalException}. @param name name if the string @param value value of the string @param msg an expanatory message
[ "Verify", "that", "a", "String", "is", "not", "blank", "otherwise", "throw", "a", "{", "@link", "TechnicalException", "}", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java#L123-L125
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_spare_new_POST
public OvhOrder telephony_spare_new_POST(String brand, String mondialRelayId, Long quantity, Long shippingContactId) throws IOException { """ Create order REST: POST /order/telephony/spare/new @param shippingContactId [required] Shipping contact information id from /me entry point @param brand [required] Spar...
java
public OvhOrder telephony_spare_new_POST(String brand, String mondialRelayId, Long quantity, Long shippingContactId) throws IOException { String qPath = "/order/telephony/spare/new"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "brand", brand); addBody(o...
[ "public", "OvhOrder", "telephony_spare_new_POST", "(", "String", "brand", ",", "String", "mondialRelayId", ",", "Long", "quantity", ",", "Long", "shippingContactId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/telephony/spare/new\"", ";", "Str...
Create order REST: POST /order/telephony/spare/new @param shippingContactId [required] Shipping contact information id from /me entry point @param brand [required] Spare phone brand model @param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address ...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6084-L6094
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/log/LogImpl.java
LogImpl.defaultInit
private synchronized void defaultInit() { """ Default initialization is used the first time we have to log unless a sink has been added with add(). _needInit allows us to distinguish between initial state and disabled state. """ if (!_initialized) { _initialized = true; ...
java
private synchronized void defaultInit() { if (!_initialized) { _initialized = true; String sinkClasses = System.getProperty("LOG_SINKS","org.browsermob.proxy.jetty.log.OutputStreamLogSink"); StringTokenizer sinkTokens = new StringTokenizer(sinkClasses, ";, "); ...
[ "private", "synchronized", "void", "defaultInit", "(", ")", "{", "if", "(", "!", "_initialized", ")", "{", "_initialized", "=", "true", ";", "String", "sinkClasses", "=", "System", ".", "getProperty", "(", "\"LOG_SINKS\"", ",", "\"org.browsermob.proxy.jetty.log.Ou...
Default initialization is used the first time we have to log unless a sink has been added with add(). _needInit allows us to distinguish between initial state and disabled state.
[ "Default", "initialization", "is", "used", "the", "first", "time", "we", "have", "to", "log", "unless", "a", "sink", "has", "been", "added", "with", "add", "()", ".", "_needInit", "allows", "us", "to", "distinguish", "between", "initial", "state", "and", "...
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/log/LogImpl.java#L174-L204
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word2vec/WordVectorModel.java
WordVectorModel.analogy
public List<Map.Entry<String, Float>> analogy(String A, String B, String C) { """ 返回跟 A - B + C 最相似的词语,比如 中国 - 北京 + 东京 = 日本。输入顺序按照 中国 北京 东京 @param A 做加法的词语 @param B 做减法的词语 @param C 做加法的词语 @return 与(A - B + C)语义距离最近的词语及其相似度列表 """ return analogy(A, B, C, 10); }
java
public List<Map.Entry<String, Float>> analogy(String A, String B, String C) { return analogy(A, B, C, 10); }
[ "public", "List", "<", "Map", ".", "Entry", "<", "String", ",", "Float", ">", ">", "analogy", "(", "String", "A", ",", "String", "B", ",", "String", "C", ")", "{", "return", "analogy", "(", "A", ",", "B", ",", "C", ",", "10", ")", ";", "}" ]
返回跟 A - B + C 最相似的词语,比如 中国 - 北京 + 东京 = 日本。输入顺序按照 中国 北京 东京 @param A 做加法的词语 @param B 做减法的词语 @param C 做加法的词语 @return 与(A - B + C)语义距离最近的词语及其相似度列表
[ "返回跟", "A", "-", "B", "+", "C", "最相似的词语", "比如", "中国", "-", "北京", "+", "东京", "=", "日本。输入顺序按照", "中国", "北京", "东京" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word2vec/WordVectorModel.java#L55-L58
apache/incubator-gobblin
gobblin-modules/gobblin-service-kafka/src/main/java/org/apache/gobblin/service/StreamingKafkaSpecConsumer.java
StreamingKafkaSpecConsumer.changedSpecs
@Override public Future<? extends List<Pair<SpecExecutor.Verb, Spec>>> changedSpecs() { """ This method returns job specs receive from Kafka. It will block if there are no job specs. @return list of (verb, jobspecs) pairs. """ List<Pair<SpecExecutor.Verb, Spec>> changesSpecs = new ArrayList<>(); tr...
java
@Override public Future<? extends List<Pair<SpecExecutor.Verb, Spec>>> changedSpecs() { List<Pair<SpecExecutor.Verb, Spec>> changesSpecs = new ArrayList<>(); try { Pair<SpecExecutor.Verb, Spec> specPair = _jobSpecQueue.take(); _metrics.jobSpecDeqCount.incrementAndGet(); do { changes...
[ "@", "Override", "public", "Future", "<", "?", "extends", "List", "<", "Pair", "<", "SpecExecutor", ".", "Verb", ",", "Spec", ">", ">", ">", "changedSpecs", "(", ")", "{", "List", "<", "Pair", "<", "SpecExecutor", ".", "Verb", ",", "Spec", ">", ">", ...
This method returns job specs receive from Kafka. It will block if there are no job specs. @return list of (verb, jobspecs) pairs.
[ "This", "method", "returns", "job", "specs", "receive", "from", "Kafka", ".", "It", "will", "block", "if", "there", "are", "no", "job", "specs", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-service-kafka/src/main/java/org/apache/gobblin/service/StreamingKafkaSpecConsumer.java#L108-L126
jayantk/jklol
src/com/jayantkrish/jklol/models/dynamic/VariableNamePattern.java
VariableNamePattern.fromPlate
public static VariablePattern fromPlate(String plateName, VariableNumMap plateVariables, VariableNumMap fixedVariables) { """ Gets a {@code VariableNamePattern} which matches {@code plateVariables} in each replication of {@code plateName}. {@code fixedVariables} are added to each match as well. @param p...
java
public static VariablePattern fromPlate(String plateName, VariableNumMap plateVariables, VariableNumMap fixedVariables) { List<VariableNameMatcher> matchers = Lists.newArrayList(); for (String variableName : plateVariables.getVariableNamesArray()) { matchers.add(new VariableNameMatcher(plateName + "...
[ "public", "static", "VariablePattern", "fromPlate", "(", "String", "plateName", ",", "VariableNumMap", "plateVariables", ",", "VariableNumMap", "fixedVariables", ")", "{", "List", "<", "VariableNameMatcher", ">", "matchers", "=", "Lists", ".", "newArrayList", "(", "...
Gets a {@code VariableNamePattern} which matches {@code plateVariables} in each replication of {@code plateName}. {@code fixedVariables} are added to each match as well. @param plateName @param plateVariables @param fixedVariables @return
[ "Gets", "a", "{", "@code", "VariableNamePattern", "}", "which", "matches", "{", "@code", "plateVariables", "}", "in", "each", "replication", "of", "{", "@code", "plateName", "}", ".", "{", "@code", "fixedVariables", "}", "are", "added", "to", "each", "match"...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/dynamic/VariableNamePattern.java#L93-L100
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_account_primaryEmailAddress_protocol_PUT
public void organizationName_service_exchangeService_account_primaryEmailAddress_protocol_PUT(String organizationName, String exchangeService, String primaryEmailAddress, OvhExchangeAccountProtocol body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{...
java
public void organizationName_service_exchangeService_account_primaryEmailAddress_protocol_PUT(String organizationName, String exchangeService, String primaryEmailAddress, OvhExchangeAccountProtocol body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{primary...
[ "public", "void", "organizationName_service_exchangeService_account_primaryEmailAddress_protocol_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "primaryEmailAddress", ",", "OvhExchangeAccountProtocol", "body", ")", "throws", "IOException",...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEmailAddress}/protocol @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name ...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1625-L1629
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java
CommonUtils.parseLong
public static long parseLong(String num, long defaultLong) { """ String Long turn number. @param num The number of strings. @param defaultLong The default value @return long """ if (num == null) { return defaultLong; } else { try { return Lon...
java
public static long parseLong(String num, long defaultLong) { if (num == null) { return defaultLong; } else { try { return Long.parseLong(num); } catch (Exception e) { return defaultLong; } } }
[ "public", "static", "long", "parseLong", "(", "String", "num", ",", "long", "defaultLong", ")", "{", "if", "(", "num", "==", "null", ")", "{", "return", "defaultLong", ";", "}", "else", "{", "try", "{", "return", "Long", ".", "parseLong", "(", "num", ...
String Long turn number. @param num The number of strings. @param defaultLong The default value @return long
[ "String", "Long", "turn", "number", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java#L185-L195
OpenLiberty/open-liberty
dev/com.ibm.ws.event/src/com/ibm/ws/event/internal/EventEngineImpl.java
EventEngineImpl.publishEvent
public EventImpl publishEvent(Event event, boolean async) { """ Publish the specified event to all registered handlers that have an interest in the event topic. @param event the Liberty <code>Event</code> to deliver @param async <code>true</code> if the event delivery can be done asynchronously @return Eve...
java
public EventImpl publishEvent(Event event, boolean async) { EventImpl eventImpl = (EventImpl) event; eventImpl.setReadOnly(true); EventImpl currentEvent = (EventImpl) CurrentEvent.get(); if (null != currentEvent) { eventImpl.setParent(currentEvent); } // Atte...
[ "public", "EventImpl", "publishEvent", "(", "Event", "event", ",", "boolean", "async", ")", "{", "EventImpl", "eventImpl", "=", "(", "EventImpl", ")", "event", ";", "eventImpl", ".", "setReadOnly", "(", "true", ")", ";", "EventImpl", "currentEvent", "=", "("...
Publish the specified event to all registered handlers that have an interest in the event topic. @param event the Liberty <code>Event</code> to deliver @param async <code>true</code> if the event delivery can be done asynchronously @return EventImpl
[ "Publish", "the", "specified", "event", "to", "all", "registered", "handlers", "that", "have", "an", "interest", "in", "the", "event", "topic", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.event/src/com/ibm/ws/event/internal/EventEngineImpl.java#L270-L314
apache/incubator-druid
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java
IncrementalIndex.loadDimensionIterable
public void loadDimensionIterable( Iterable<String> oldDimensionOrder, Map<String, ColumnCapabilitiesImpl> oldColumnCapabilities ) { """ Currently called to initialize IncrementalIndex dimension order during index creation Index dimension ordering could be changed to initialize from DimensionsSpec a...
java
public void loadDimensionIterable( Iterable<String> oldDimensionOrder, Map<String, ColumnCapabilitiesImpl> oldColumnCapabilities ) { synchronized (dimensionDescs) { if (!dimensionDescs.isEmpty()) { throw new ISE("Cannot load dimension order when existing order[%s] is not empty.", dimen...
[ "public", "void", "loadDimensionIterable", "(", "Iterable", "<", "String", ">", "oldDimensionOrder", ",", "Map", "<", "String", ",", "ColumnCapabilitiesImpl", ">", "oldColumnCapabilities", ")", "{", "synchronized", "(", "dimensionDescs", ")", "{", "if", "(", "!", ...
Currently called to initialize IncrementalIndex dimension order during index creation Index dimension ordering could be changed to initialize from DimensionsSpec after resolution of https://github.com/apache/incubator-druid/issues/2011
[ "Currently", "called", "to", "initialize", "IncrementalIndex", "dimension", "order", "during", "index", "creation", "Index", "dimension", "ordering", "could", "be", "changed", "to", "initialize", "from", "DimensionsSpec", "after", "resolution", "of", "https", ":", "...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java#L923-L941
cloudendpoints/endpoints-management-java
endpoints-control/src/main/java/com/google/api/control/model/PathTemplate.java
PathTemplate.validatedMatch
public ImmutableMap<String, String> validatedMatch(String path, String exceptionMessagePrefix) { """ Matches the path, returning a map from variable names to matched values. All matched values will be properly unescaped using URL encoding rules. If the path does not match the template, throws a ValidationExcepti...
java
public ImmutableMap<String, String> validatedMatch(String path, String exceptionMessagePrefix) { ImmutableMap<String, String> matchMap = match(path); if (matchMap == null) { throw new ValidationException( String.format( "%s: Parameter \"%s\" must be in the form \"%s\"", ...
[ "public", "ImmutableMap", "<", "String", ",", "String", ">", "validatedMatch", "(", "String", "path", ",", "String", "exceptionMessagePrefix", ")", "{", "ImmutableMap", "<", "String", ",", "String", ">", "matchMap", "=", "match", "(", "path", ")", ";", "if",...
Matches the path, returning a map from variable names to matched values. All matched values will be properly unescaped using URL encoding rules. If the path does not match the template, throws a ValidationException. The exceptionMessagePrefix parameter will be prepended to the ValidationException message. <p>If the pa...
[ "Matches", "the", "path", "returning", "a", "map", "from", "variable", "names", "to", "matched", "values", ".", "All", "matched", "values", "will", "be", "properly", "unescaped", "using", "URL", "encoding", "rules", ".", "If", "the", "path", "does", "not", ...
train
https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/model/PathTemplate.java#L407-L416
Terracotta-OSS/offheap-store
src/main/java/org/terracotta/offheapstore/storage/allocator/IntegerBestFitAllocator.java
IntegerBestFitAllocator.setInUseAndPreviousInUse
private void setInUseAndPreviousInUse(int p, int s) { """ /* Set cinuse and pinuse of this chunk and pinuse of next chunk """ setSizeAndPreviousInUseOfInUseChunk(p, s); head(p + s, head(p + s) | PINUSE_BIT); }
java
private void setInUseAndPreviousInUse(int p, int s) { setSizeAndPreviousInUseOfInUseChunk(p, s); head(p + s, head(p + s) | PINUSE_BIT); }
[ "private", "void", "setInUseAndPreviousInUse", "(", "int", "p", ",", "int", "s", ")", "{", "setSizeAndPreviousInUseOfInUseChunk", "(", "p", ",", "s", ")", ";", "head", "(", "p", "+", "s", ",", "head", "(", "p", "+", "s", ")", "|", "PINUSE_BIT", ")", ...
/* Set cinuse and pinuse of this chunk and pinuse of next chunk
[ "/", "*", "Set", "cinuse", "and", "pinuse", "of", "this", "chunk", "and", "pinuse", "of", "next", "chunk" ]
train
https://github.com/Terracotta-OSS/offheap-store/blob/600486cddb33c0247025c0cb69eff289eb6d7d93/src/main/java/org/terracotta/offheapstore/storage/allocator/IntegerBestFitAllocator.java#L799-L802
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/JSLocalConsumerPoint.java
JSLocalConsumerPoint.checkForMessages
@Override public void checkForMessages() { """ Spin off a thread that checks for any stored messages. This is called by a consumerKeyGroup to try to kick a group back into life after a stopped member detaches and makes the group ready again. """ if (TraceComponent.isAnyTracingEnabled() && tc.isE...
java
@Override public void checkForMessages() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkForMessages", this); try { //start a new thread to run the callback _messageProcessor.startNewThread(new AsynchThread(thi...
[ "@", "Override", "public", "void", "checkForMessages", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"checkForMessages\"", ",", "...
Spin off a thread that checks for any stored messages. This is called by a consumerKeyGroup to try to kick a group back into life after a stopped member detaches and makes the group ready again.
[ "Spin", "off", "a", "thread", "that", "checks", "for", "any", "stored", "messages", ".", "This", "is", "called", "by", "a", "consumerKeyGroup", "to", "try", "to", "kick", "a", "group", "back", "into", "life", "after", "a", "stopped", "member", "detaches", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/JSLocalConsumerPoint.java#L3645-L3672
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringCropper.java
StringCropper.tailOf
public int tailOf(String srcStr, String searchStr) { """ Returns the index within this string of finally found value in the first discovered string sequence<br> <br> Method Example,<br> tailOf("ABABsampletextABAB","AB") returns 2.<br> <br> (You know, String#indexOf returns 0.)<br> @param srcStr @param se...
java
public int tailOf(String srcStr, String searchStr) { if (isBlank(srcStr) || isBlank(searchStr)) { return -1; } int cursor = -1; boolean loop = true; boolean firstTokenAlreadyFound = false; do { int idx = srcStr.indexOf(searchStr); ...
[ "public", "int", "tailOf", "(", "String", "srcStr", ",", "String", "searchStr", ")", "{", "if", "(", "isBlank", "(", "srcStr", ")", "||", "isBlank", "(", "searchStr", ")", ")", "{", "return", "-", "1", ";", "}", "int", "cursor", "=", "-", "1", ";",...
Returns the index within this string of finally found value in the first discovered string sequence<br> <br> Method Example,<br> tailOf("ABABsampletextABAB","AB") returns 2.<br> <br> (You know, String#indexOf returns 0.)<br> @param srcStr @param searchStr @return
[ "Returns", "the", "index", "within", "this", "string", "of", "finally", "found", "value", "in", "the", "first", "discovered", "string", "sequence<br", ">", "<br", ">", "Method", "Example", "<br", ">", "tailOf", "(", "ABABsampletextABAB", "AB", ")", "returns", ...
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringCropper.java#L371-L409
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationCache.java
CmsConfigurationCache.isMacroOrFlexFormatter
protected boolean isMacroOrFlexFormatter(int type, String rootPath) { """ Checks whether the given type id matches the id of the macro formatter or flex formatter resource type.<p> Also checks if the file is located in a '/.content/.formatters' folder.<p> @param type the type id @param rootPath the root path ...
java
protected boolean isMacroOrFlexFormatter(int type, String rootPath) { boolean result = false; try { I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(type); result = (CmsFormatterConfigurationCache.TYPE_MACRO_FORMATTER.equals(resType.getTypeName()) ...
[ "protected", "boolean", "isMacroOrFlexFormatter", "(", "int", "type", ",", "String", "rootPath", ")", "{", "boolean", "result", "=", "false", ";", "try", "{", "I_CmsResourceType", "resType", "=", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceT...
Checks whether the given type id matches the id of the macro formatter or flex formatter resource type.<p> Also checks if the file is located in a '/.content/.formatters' folder.<p> @param type the type id @param rootPath the root path @return <code>true</code> in case of a macro or flex formatter
[ "Checks", "whether", "the", "given", "type", "id", "matches", "the", "id", "of", "the", "macro", "formatter", "or", "flex", "formatter", "resource", "type", ".", "<p", ">", "Also", "checks", "if", "the", "file", "is", "located", "in", "a", "/", ".", "c...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationCache.java#L416-L428
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphSetEdgeData
public static int nvgraphSetEdgeData( nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer edgeData, long setnum) { """ Update the edge set #setnum with the data in *edgeData, sets have 0-based index """ return checkResult(nvgraphSetEdgeDataNative(handle, descrG, e...
java
public static int nvgraphSetEdgeData( nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer edgeData, long setnum) { return checkResult(nvgraphSetEdgeDataNative(handle, descrG, edgeData, setnum)); }
[ "public", "static", "int", "nvgraphSetEdgeData", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "Pointer", "edgeData", ",", "long", "setnum", ")", "{", "return", "checkResult", "(", "nvgraphSetEdgeDataNative", "(", "handle", ",", "descrG", ...
Update the edge set #setnum with the data in *edgeData, sets have 0-based index
[ "Update", "the", "edge", "set", "#setnum", "with", "the", "data", "in", "*", "edgeData", "sets", "have", "0", "-", "based", "index" ]
train
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L349-L356
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java
WarUtils.addEnvContextParam
public static void addEnvContextParam(Document doc, Element root) { """ Adds a context parameter to a web.xml file to override where the shiro environment class. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the context param to. """ Element ...
java
public static void addEnvContextParam(Document doc, Element root) { Element ctxParam = doc.createElement("context-param"); Element paramName = doc.createElement("param-name"); paramName.appendChild(doc.createTextNode("shiroEnvironmentClass")); ctxParam.appendChild(paramName); Element paramValue = do...
[ "public", "static", "void", "addEnvContextParam", "(", "Document", "doc", ",", "Element", "root", ")", "{", "Element", "ctxParam", "=", "doc", ".", "createElement", "(", "\"context-param\"", ")", ";", "Element", "paramName", "=", "doc", ".", "createElement", "...
Adds a context parameter to a web.xml file to override where the shiro environment class. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the context param to.
[ "Adds", "a", "context", "parameter", "to", "a", "web", ".", "xml", "file", "to", "override", "where", "the", "shiro", "environment", "class", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java#L296-L306
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.spare_spare_serviceInfos_PUT
public void spare_spare_serviceInfos_PUT(String spare, OvhService body) throws IOException { """ Alter this object properties REST: PUT /xdsl/spare/{spare}/serviceInfos @param body [required] New object properties @param spare [required] The internal name of your spare """ String qPath = "/xdsl/spare/{s...
java
public void spare_spare_serviceInfos_PUT(String spare, OvhService body) throws IOException { String qPath = "/xdsl/spare/{spare}/serviceInfos"; StringBuilder sb = path(qPath, spare); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "spare_spare_serviceInfos_PUT", "(", "String", "spare", ",", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/spare/{spare}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "spare...
Alter this object properties REST: PUT /xdsl/spare/{spare}/serviceInfos @param body [required] New object properties @param spare [required] The internal name of your spare
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L2058-L2062
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java
BuildsInner.cancelAsync
public Observable<Void> cancelAsync(String resourceGroupName, String registryName, String buildId) { """ Cancel an existing build. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build I...
java
public Observable<Void> cancelAsync(String resourceGroupName, String registryName, String buildId) { return cancelWithServiceResponseAsync(resourceGroupName, registryName, buildId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) {...
[ "public", "Observable", "<", "Void", ">", "cancelAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildId", ")", "{", "return", "cancelWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "buildId", ...
Cancel an existing build. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the reques...
[ "Cancel", "an", "existing", "build", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java#L911-L918
Sciss/abc4j
abc/src/main/java/abc/parser/AbcGrammar.java
AbcGrammar.TexText
Rule TexText() { """ tex-text ::= *(WSP / %21-%5B / %5D-7E / tex-escape) <p>text that may contain TeX escapes """ return ZeroOrMore( FirstOf(WSP(), CharRange('!', '$'), //exclude % which is comment ? '%', CharRange('&', '['), //exclude \ which is tex escape Ch...
java
Rule TexText() { return ZeroOrMore( FirstOf(WSP(), CharRange('!', '$'), //exclude % which is comment ? '%', CharRange('&', '['), //exclude \ which is tex escape CharRange(']', '~'), LatinExtendedAndOtherAlphabet(), TexEscape()) ).label(TexText).suppressSubnod...
[ "Rule", "TexText", "(", ")", "{", "return", "ZeroOrMore", "(", "FirstOf", "(", "WSP", "(", ")", ",", "CharRange", "(", "'", "'", ",", "'", "'", ")", ",", "//exclude % which is comment ?\r", "'", "'", ",", "CharRange", "(", "'", "'", ",", "'", "'", ...
tex-text ::= *(WSP / %21-%5B / %5D-7E / tex-escape) <p>text that may contain TeX escapes
[ "tex", "-", "text", "::", "=", "*", "(", "WSP", "/", "%21", "-", "%5B", "/", "%5D", "-", "7E", "/", "tex", "-", "escape", ")", "<p", ">", "text", "that", "may", "contain", "TeX", "escapes" ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/parser/AbcGrammar.java#L2474-L2485
twilio/twilio-java
src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java
SubscribedTrackReader.previousPage
@Override public Page<SubscribedTrack> previousPage(final Page<SubscribedTrack> page, final TwilioRestClient client) { """ Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @...
java
@Override public Page<SubscribedTrack> previousPage(final Page<SubscribedTrack> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.VIDEO.toString(), ...
[ "@", "Override", "public", "Page", "<", "SubscribedTrack", ">", "previousPage", "(", "final", "Page", "<", "SubscribedTrack", ">", "page", ",", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", "."...
Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Previous Page
[ "Retrieve", "the", "previous", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java#L176-L187
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java
Calc.scale
public static Atom scale(Atom a, double s) { """ Multiply elements of a by s @param a @param s @return A new Atom with s*a """ double x = a.getX(); double y = a.getY(); double z = a.getZ(); Atom b = new AtomImpl(); b.setX(x*s); b.setY(y*s); b.setZ(z*s); return b; }
java
public static Atom scale(Atom a, double s) { double x = a.getX(); double y = a.getY(); double z = a.getZ(); Atom b = new AtomImpl(); b.setX(x*s); b.setY(y*s); b.setZ(z*s); return b; }
[ "public", "static", "Atom", "scale", "(", "Atom", "a", ",", "double", "s", ")", "{", "double", "x", "=", "a", ".", "getX", "(", ")", ";", "double", "y", "=", "a", ".", "getY", "(", ")", ";", "double", "z", "=", "a", ".", "getZ", "(", ")", "...
Multiply elements of a by s @param a @param s @return A new Atom with s*a
[ "Multiply", "elements", "of", "a", "by", "s" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java#L854-L865
google/closure-compiler
src/com/google/javascript/jscomp/CoverageInstrumentationCallback.java
CoverageInstrumentationCallback.newInstrumentationNode
private Node newInstrumentationNode(NodeTraversal traversal, Node node) { """ Creates and return a new instrumentation node. The instrumentation Node is of the form: "arrayName[lineNumber] = true;" Note 1: Node returns a 1-based line number. Note 2: Line numbers in instrumentation are made 0-based. This is done...
java
private Node newInstrumentationNode(NodeTraversal traversal, Node node) { int lineNumber = node.getLineno(); String arrayName = createArrayName(traversal); // Create instrumentation Node Node getElemNode = IR.getelem( IR.name(arrayName), IR.number(lineNumber - 1)); // Make line number ...
[ "private", "Node", "newInstrumentationNode", "(", "NodeTraversal", "traversal", ",", "Node", "node", ")", "{", "int", "lineNumber", "=", "node", ".", "getLineno", "(", ")", ";", "String", "arrayName", "=", "createArrayName", "(", "traversal", ")", ";", "// Cre...
Creates and return a new instrumentation node. The instrumentation Node is of the form: "arrayName[lineNumber] = true;" Note 1: Node returns a 1-based line number. Note 2: Line numbers in instrumentation are made 0-based. This is done to map to their bit representation in BitField. Thus, there's a one-to-one correspond...
[ "Creates", "and", "return", "a", "new", "instrumentation", "node", ".", "The", "instrumentation", "Node", "is", "of", "the", "form", ":", "arrayName", "[", "lineNumber", "]", "=", "true", ";", "Note", "1", ":", "Node", "returns", "a", "1", "-", "based", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CoverageInstrumentationCallback.java#L77-L96
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.beginCreateOrUpdateMultiRolePool
public WorkerPoolResourceInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { """ Create or update a multi-role pool. Create or update a multi-role pool. @param resourceGroupName Name of the resource group to which the resource belongs. ...
java
public WorkerPoolResourceInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().body(); }
[ "public", "WorkerPoolResourceInner", "beginCreateOrUpdateMultiRolePool", "(", "String", "resourceGroupName", ",", "String", "name", ",", "WorkerPoolResourceInner", "multiRolePoolEnvelope", ")", "{", "return", "beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync", "(", "resourc...
Create or update a multi-role pool. Create or update a multi-role pool. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param multiRolePoolEnvelope Properties of the multi-role pool. @throws IllegalArgumentException thrown if paramete...
[ "Create", "or", "update", "a", "multi", "-", "role", "pool", ".", "Create", "or", "update", "a", "multi", "-", "role", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L2354-L2356
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java
ClosestPointAlgorithm.getSnappingPoint
Coordinate getSnappingPoint(Coordinate original, double threshold) { """ Calculates a snapping point from the given coordinate. @param original The original and unsnapped coordinate. @param threshold A threshold value that needs to be beaten in order to snap. Only if the distance between the original and th...
java
Coordinate getSnappingPoint(Coordinate original, double threshold) { minimumDistance = Double.MAX_VALUE; Coordinate snappingPoint = null; double currThreshold = threshold; List<Coordinate> coordinates = getPossibleCoordinates(original); for (Coordinate coordinate : coordinates) { double distance = Mathlib...
[ "Coordinate", "getSnappingPoint", "(", "Coordinate", "original", ",", "double", "threshold", ")", "{", "minimumDistance", "=", "Double", ".", "MAX_VALUE", ";", "Coordinate", "snappingPoint", "=", "null", ";", "double", "currThreshold", "=", "threshold", ";", "List...
Calculates a snapping point from the given coordinate. @param original The original and unsnapped coordinate. @param threshold A threshold value that needs to be beaten in order to snap. Only if the distance between the original and the candidate coordinate is smaller then this threshold, can the candidate coordinate ...
[ "Calculates", "a", "snapping", "point", "from", "the", "given", "coordinate", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java#L81-L97
bazaarvoice/emodb
sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java
DefaultDataStore.resolveAnnotated
private AnnotatedContent resolveAnnotated(Record record, final ReadConsistency consistency) { """ Resolve a set of changes, returning an interface that includes info about specific change IDs. """ final Resolved resolved = resolve(record, consistency); final Table table = record.getKey().getTa...
java
private AnnotatedContent resolveAnnotated(Record record, final ReadConsistency consistency) { final Resolved resolved = resolve(record, consistency); final Table table = record.getKey().getTable(); return new AnnotatedContent() { @Override public Map<String, Object> getC...
[ "private", "AnnotatedContent", "resolveAnnotated", "(", "Record", "record", ",", "final", "ReadConsistency", "consistency", ")", "{", "final", "Resolved", "resolved", "=", "resolve", "(", "record", ",", "consistency", ")", ";", "final", "Table", "table", "=", "r...
Resolve a set of changes, returning an interface that includes info about specific change IDs.
[ "Resolve", "a", "set", "of", "changes", "returning", "an", "interface", "that", "includes", "info", "about", "specific", "change", "IDs", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java#L435-L456
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/backup_file.java
backup_file.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ backup_file_responses result = (backup_file_responses) service.get_payl...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { backup_file_responses result = (backup_file_responses) service.get_payload_formatter().string_to_resource(backup_file_responses.class, response); if(result.errorcode != 0) { if (result.errorcode =...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "backup_file_responses", "result", "=", "(", "backup_file_responses", ")", "service", ".", "get_payload_format...
<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/backup_file.java#L265-L282
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/fdt/FdtSketch.java
FdtSketch.computeLgK
static int computeLgK(final double threshold, final double rse) { """ Computes LgK given the threshold and RSE. @param threshold the fraction, between zero and 1.0, of the total stream length that defines a "Frequent" (or heavy) tuple. @param rse the maximum Relative Standard Error for the estimate of the disti...
java
static int computeLgK(final double threshold, final double rse) { final double v = Math.ceil(1.0 / (threshold * rse * rse)); final int lgK = (int) Math.ceil(Math.log(v) / Math.log(2)); if (lgK > MAX_LG_NOM_LONGS) { throw new SketchesArgumentException("Requested Sketch (LgK = " + lgK + " &gt; 2^26), " ...
[ "static", "int", "computeLgK", "(", "final", "double", "threshold", ",", "final", "double", "rse", ")", "{", "final", "double", "v", "=", "Math", ".", "ceil", "(", "1.0", "/", "(", "threshold", "*", "rse", "*", "rse", ")", ")", ";", "final", "int", ...
Computes LgK given the threshold and RSE. @param threshold the fraction, between zero and 1.0, of the total stream length that defines a "Frequent" (or heavy) tuple. @param rse the maximum Relative Standard Error for the estimate of the distinct population of a reported tuple (selected with a primary key) at the thresh...
[ "Computes", "LgK", "given", "the", "threshold", "and", "RSE", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/fdt/FdtSketch.java#L164-L172
icode/ameba
src/main/java/ameba/db/ebean/support/ModelResourceStructure.java
ModelResourceStructure.executeTx
@SuppressWarnings("unchecked") protected <O> O executeTx(final TxCallable<O> c, final TxCallable<O> errorHandler) throws Exception { """ <p>executeTx.</p> @param c a {@link ameba.db.ebean.support.ModelResourceStructure.TxCallable} object. @param errorHandler a {@link ameba.db.ebean.support.Model...
java
@SuppressWarnings("unchecked") protected <O> O executeTx(final TxCallable<O> c, final TxCallable<O> errorHandler) throws Exception { Transaction transaction = beginTransaction(); configureTransDefault(transaction); return processTransactionError(transaction, t -> { Object o = nul...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "O", ">", "O", "executeTx", "(", "final", "TxCallable", "<", "O", ">", "c", ",", "final", "TxCallable", "<", "O", ">", "errorHandler", ")", "throws", "Exception", "{", "Transaction", "tr...
<p>executeTx.</p> @param c a {@link ameba.db.ebean.support.ModelResourceStructure.TxCallable} object. @param errorHandler a {@link ameba.db.ebean.support.ModelResourceStructure.TxCallable} object. @param <O> a O object. @return a O object. @throws java.lang.Exception if any.
[ "<p", ">", "executeTx", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/support/ModelResourceStructure.java#L1157-L1174
google/closure-templates
java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java
JavaQualifiedNames.getClassName
public static String getClassName(Descriptor descriptor, ProtoFlavor flavor) { """ Gets the fully qualified name for generated classes in Java convention. Nested classes will be separated using '$' instead of '.'. """ return getClassName(classNameWithoutPackage(descriptor, flavor), descriptor.getFile(), f...
java
public static String getClassName(Descriptor descriptor, ProtoFlavor flavor) { return getClassName(classNameWithoutPackage(descriptor, flavor), descriptor.getFile(), flavor); }
[ "public", "static", "String", "getClassName", "(", "Descriptor", "descriptor", ",", "ProtoFlavor", "flavor", ")", "{", "return", "getClassName", "(", "classNameWithoutPackage", "(", "descriptor", ",", "flavor", ")", ",", "descriptor", ".", "getFile", "(", ")", "...
Gets the fully qualified name for generated classes in Java convention. Nested classes will be separated using '$' instead of '.'.
[ "Gets", "the", "fully", "qualified", "name", "for", "generated", "classes", "in", "Java", "convention", ".", "Nested", "classes", "will", "be", "separated", "using", "$", "instead", "of", ".", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java#L96-L98
haraldk/TwelveMonkeys
imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/color/KCMSSanitizerStrategy.java
KCMSSanitizerStrategy.fixProfileXYZTag
private static boolean fixProfileXYZTag(final ICC_Profile profile, final int tagSignature) { """ Fixes problematic 'XYZ ' tags in Corbis RGB profile. @return {@code true} if found and fixed, otherwise {@code false} for short-circuiting to avoid unnecessary array copying. """ byte[] data = profile.g...
java
private static boolean fixProfileXYZTag(final ICC_Profile profile, final int tagSignature) { byte[] data = profile.getData(tagSignature); // The CMM expects 0x64 65 73 63 ('XYZ ') but is 0x17 A5 05 B8..? if (data != null && intFromBigEndian(data, 0) == CORBIS_RGB_ALTERNATE_XYZ) { in...
[ "private", "static", "boolean", "fixProfileXYZTag", "(", "final", "ICC_Profile", "profile", ",", "final", "int", "tagSignature", ")", "{", "byte", "[", "]", "data", "=", "profile", ".", "getData", "(", "tagSignature", ")", ";", "// The CMM expects 0x64 65 73 63 ('...
Fixes problematic 'XYZ ' tags in Corbis RGB profile. @return {@code true} if found and fixed, otherwise {@code false} for short-circuiting to avoid unnecessary array copying.
[ "Fixes", "problematic", "XYZ", "tags", "in", "Corbis", "RGB", "profile", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/color/KCMSSanitizerStrategy.java#L81-L93
forge/core
javaee/impl/src/main/java/org/jboss/forge/addon/javaee/faces/AbstractFacesFacetImpl.java
AbstractFacesFacetImpl.buildFacesViewId
private String buildFacesViewId(final String servletMapping, final String resourcePath) { """ Build a Faces view ID for the given resource path, return null if not mapped by Faces Servlet """ for (String suffix : getFacesSuffixes()) { if (resourcePath.endsWith(suffix)) { ...
java
private String buildFacesViewId(final String servletMapping, final String resourcePath) { for (String suffix : getFacesSuffixes()) { if (resourcePath.endsWith(suffix)) { StringBuffer result = new StringBuffer(); Map<Pattern, String> patterns = new HashMap<>(); ...
[ "private", "String", "buildFacesViewId", "(", "final", "String", "servletMapping", ",", "final", "String", "resourcePath", ")", "{", "for", "(", "String", "suffix", ":", "getFacesSuffixes", "(", ")", ")", "{", "if", "(", "resourcePath", ".", "endsWith", "(", ...
Build a Faces view ID for the given resource path, return null if not mapped by Faces Servlet
[ "Build", "a", "Faces", "view", "ID", "for", "the", "given", "resource", "path", "return", "null", "if", "not", "mapped", "by", "Faces", "Servlet" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/faces/AbstractFacesFacetImpl.java#L392-L433
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContentEditorHandler.java
CmsContentEditorHandler.putString
private void putString(JSONObject obj, String key, String val) { """ Adds a String value to the JSON object.<p> @param obj the object to manipulate @param key the key @param val the value """ obj.put(key, new JSONString(val)); }
java
private void putString(JSONObject obj, String key, String val) { obj.put(key, new JSONString(val)); }
[ "private", "void", "putString", "(", "JSONObject", "obj", ",", "String", "key", ",", "String", "val", ")", "{", "obj", ".", "put", "(", "key", ",", "new", "JSONString", "(", "val", ")", ")", ";", "}" ]
Adds a String value to the JSON object.<p> @param obj the object to manipulate @param key the key @param val the value
[ "Adds", "a", "String", "value", "to", "the", "JSON", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContentEditorHandler.java#L664-L667
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.getText
public static String getText(File file, String charset) throws IOException { """ Read the content of the File using the specified encoding and return it as a String. @param file the file whose content we want to read @param charset the charset used to read the content of the file @return a String containi...
java
public static String getText(File file, String charset) throws IOException { return IOGroovyMethods.getText(newReader(file, charset)); }
[ "public", "static", "String", "getText", "(", "File", "file", ",", "String", "charset", ")", "throws", "IOException", "{", "return", "IOGroovyMethods", ".", "getText", "(", "newReader", "(", "file", ",", "charset", ")", ")", ";", "}" ]
Read the content of the File using the specified encoding and return it as a String. @param file the file whose content we want to read @param charset the charset used to read the content of the file @return a String containing the content of the file @throws IOException if an IOException occurs. @since 1.0
[ "Read", "the", "content", "of", "the", "File", "using", "the", "specified", "encoding", "and", "return", "it", "as", "a", "String", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L579-L581
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java
OrientedBox3f.setFirstAxis
@Override public void setFirstAxis(Vector3D axis, double extent) { """ Set the first axis of the box. The third axis is updated to be perpendicular to the two other axis. @param axis - the new values for the first axis. @param extent - the extent of the axis. """ setFirstAxis(axis.getX(), axis.getY(), ...
java
@Override public void setFirstAxis(Vector3D axis, double extent) { setFirstAxis(axis.getX(), axis.getY(), axis.getZ(), extent); }
[ "@", "Override", "public", "void", "setFirstAxis", "(", "Vector3D", "axis", ",", "double", "extent", ")", "{", "setFirstAxis", "(", "axis", ".", "getX", "(", ")", ",", "axis", ".", "getY", "(", ")", ",", "axis", ".", "getZ", "(", ")", ",", "extent", ...
Set the first axis of the box. The third axis is updated to be perpendicular to the two other axis. @param axis - the new values for the first axis. @param extent - the extent of the axis.
[ "Set", "the", "first", "axis", "of", "the", "box", ".", "The", "third", "axis", "is", "updated", "to", "be", "perpendicular", "to", "the", "two", "other", "axis", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java#L414-L417
openengsb/openengsb
components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java
ManipulationUtils.getPropertyGetter
private static String getPropertyGetter(CtField field, boolean failover) throws NotFoundException { """ Returns the name of the corresponding getter to a properties name and type. The failover is needed to support both getter name types for boolean properties. """ String property = field.getName(); ...
java
private static String getPropertyGetter(CtField field, boolean failover) throws NotFoundException { String property = field.getName(); if (!failover && isBooleanType(field)) { return String.format("is%s%s", Character.toUpperCase(property.charAt(0)), property.substring(1)); } else { ...
[ "private", "static", "String", "getPropertyGetter", "(", "CtField", "field", ",", "boolean", "failover", ")", "throws", "NotFoundException", "{", "String", "property", "=", "field", ".", "getName", "(", ")", ";", "if", "(", "!", "failover", "&&", "isBooleanTyp...
Returns the name of the corresponding getter to a properties name and type. The failover is needed to support both getter name types for boolean properties.
[ "Returns", "the", "name", "of", "the", "corresponding", "getter", "to", "a", "properties", "name", "and", "type", ".", "The", "failover", "is", "needed", "to", "support", "both", "getter", "name", "types", "for", "boolean", "properties", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java#L467-L474
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.buildPutMapExpression
public static MethodCallExpression buildPutMapExpression(final Expression objectExpression, final String keyName, final Expression valueExpression) { """ Build static direct call to put entry in Map @param objectExpression @param keyName @param valueExpression @return The method call expression """ ...
java
public static MethodCallExpression buildPutMapExpression(final Expression objectExpression, final String keyName, final Expression valueExpression) { return applyDefaultMethodTarget(new MethodCallExpression(objectExpression, "put", new ArgumentListExpression(new ConstantExpression(keyName), valueExpression)), M...
[ "public", "static", "MethodCallExpression", "buildPutMapExpression", "(", "final", "Expression", "objectExpression", ",", "final", "String", "keyName", ",", "final", "Expression", "valueExpression", ")", "{", "return", "applyDefaultMethodTarget", "(", "new", "MethodCallEx...
Build static direct call to put entry in Map @param objectExpression @param keyName @param valueExpression @return The method call expression
[ "Build", "static", "direct", "call", "to", "put", "entry", "in", "Map" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1351-L1353
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java
DiskClient.insertDisk
@BetaApi public final Operation insertDisk(String zone, Disk diskResource) { """ Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a di...
java
@BetaApi public final Operation insertDisk(String zone, Disk diskResource) { InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder().setZone(zone).setDiskResource(diskResource).build(); return insertDisk(request); }
[ "@", "BetaApi", "public", "final", "Operation", "insertDisk", "(", "String", "zone", ",", "Disk", "diskResource", ")", "{", "InsertDiskHttpRequest", "request", "=", "InsertDiskHttpRequest", ".", "newBuilder", "(", ")", ".", "setZone", "(", "zone", ")", ".", "s...
Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. <p>Sample code...
[ "Creates", "a", "persistent", "disk", "in", "the", "specified", "project", "using", "the", "data", "in", "the", "request", ".", "You", "can", "create", "a", "disk", "with", "a", "sourceImage", "a", "sourceSnapshot", "or", "create", "an", "empty", "500", "G...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java#L774-L780
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java
PersistentExecutorImpl.notifyOfTaskAssignment
public void notifyOfTaskAssignment(long taskId, long nextExecTime, short binaryFlags, int transactionTimeout) { """ Invoked by a controller to notify a persistent executor that a task has been assigned to it. @param taskId unique identifier for the task. @param nextExecTime next execution time for the task. @...
java
public void notifyOfTaskAssignment(long taskId, long nextExecTime, short binaryFlags, int transactionTimeout) { final boolean trace = TraceComponent.isAnyTracingEnabled(); Boolean previous = inMemoryTaskIds.put(taskId, Boolean.TRUE); if (previous == null) { InvokerTask task = new Inv...
[ "public", "void", "notifyOfTaskAssignment", "(", "long", "taskId", ",", "long", "nextExecTime", ",", "short", "binaryFlags", ",", "int", "transactionTimeout", ")", "{", "final", "boolean", "trace", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", ...
Invoked by a controller to notify a persistent executor that a task has been assigned to it. @param taskId unique identifier for the task. @param nextExecTime next execution time for the task. @param binaryFlags combination of bits for various binary values. @param transactionTimeout transaction timeout.
[ "Invoked", "by", "a", "controller", "to", "notify", "a", "persistent", "executor", "that", "a", "task", "has", "been", "assigned", "to", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java#L1214-L1227
HotelsDotCom/corc
corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java
CorcInputFormat.setSchemaTypeInfo
public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) { """ Sets the StructTypeInfo that declares the total schema of the file in the configuration """ if (schemaTypeInfo != null) { conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName()); LOG.debug("Set schema...
java
public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) { if (schemaTypeInfo != null) { conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName()); LOG.debug("Set schema typeInfo on conf: {}", schemaTypeInfo); } }
[ "public", "static", "void", "setSchemaTypeInfo", "(", "Configuration", "conf", ",", "StructTypeInfo", "schemaTypeInfo", ")", "{", "if", "(", "schemaTypeInfo", "!=", "null", ")", "{", "conf", ".", "set", "(", "SCHEMA_TYPE_INFO", ",", "schemaTypeInfo", ".", "getTy...
Sets the StructTypeInfo that declares the total schema of the file in the configuration
[ "Sets", "the", "StructTypeInfo", "that", "declares", "the", "total", "schema", "of", "the", "file", "in", "the", "configuration" ]
train
https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L133-L138
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/cdi/MPJWTExtension.java
MPJWTExtension.observesAfterBeanDiscovery
void observesAfterBeanDiscovery(@Observes final AfterBeanDiscovery event, final BeanManager beanManager) { """ Create producer methods for each ClaimValue injection site @param event - AfterBeanDiscovery @param beanManager - CDI bean manager """ log.debugf("observesAfterBeanDiscovery, %s", cl...
java
void observesAfterBeanDiscovery(@Observes final AfterBeanDiscovery event, final BeanManager beanManager) { log.debugf("observesAfterBeanDiscovery, %s", claims); installClaimValueProducerMethodsViaSyntheticBeans(event, beanManager); }
[ "void", "observesAfterBeanDiscovery", "(", "@", "Observes", "final", "AfterBeanDiscovery", "event", ",", "final", "BeanManager", "beanManager", ")", "{", "log", ".", "debugf", "(", "\"observesAfterBeanDiscovery, %s\"", ",", "claims", ")", ";", "installClaimValueProducer...
Create producer methods for each ClaimValue injection site @param event - AfterBeanDiscovery @param beanManager - CDI bean manager
[ "Create", "producer", "methods", "for", "each", "ClaimValue", "injection", "site" ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/cdi/MPJWTExtension.java#L216-L219
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java
CacheEntry.persist
public void persist(final ICacheManager mgr) throws IOException { """ Asynchronously write the layer build content to disk and set filename to the name of the cache files when done. @param mgr The cache manager @throws IOException """ if (delete) return; if (sourceMapSize == 0) { // No source ma...
java
public void persist(final ICacheManager mgr) throws IOException { if (delete) return; if (sourceMapSize == 0) { // No source map. Just stream the file mgr.createCacheFileAsync("layer.", //$NON-NLS-1$ new ByteArrayInputStream(bytes), new CreateCompletionCallback(mgr)); } else { // cache...
[ "public", "void", "persist", "(", "final", "ICacheManager", "mgr", ")", "throws", "IOException", "{", "if", "(", "delete", ")", "return", ";", "if", "(", "sourceMapSize", "==", "0", ")", "{", "// No source map. Just stream the file\r", "mgr", ".", "createCacheF...
Asynchronously write the layer build content to disk and set filename to the name of the cache files when done. @param mgr The cache manager @throws IOException
[ "Asynchronously", "write", "the", "layer", "build", "content", "to", "disk", "and", "set", "filename", "to", "the", "name", "of", "the", "cache", "files", "when", "done", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/CacheEntry.java#L232-L247
SeaCloudsEU/SeaCloudsPlatform
planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/Topology.java
Topology.replaceElementsIndexes
public void replaceElementsIndexes(TopologyElement element, int toIndex) { """ @param element @param toIndex Swaps the elements indexes. "Element" gets "toIndex" index and the previous element with index "toIndex" gets the previous index of "element" """ int targetIndex = modules.indexOf(element); ...
java
public void replaceElementsIndexes(TopologyElement element, int toIndex) { int targetIndex = modules.indexOf(element); if (log.isDebugEnabled()) { if (modules == null) { log.warn("Modules in topology points to NULL"); } if (element == null) { log.warn("Elem...
[ "public", "void", "replaceElementsIndexes", "(", "TopologyElement", "element", ",", "int", "toIndex", ")", "{", "int", "targetIndex", "=", "modules", ".", "indexOf", "(", "element", ")", ";", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "if...
@param element @param toIndex Swaps the elements indexes. "Element" gets "toIndex" index and the previous element with index "toIndex" gets the previous index of "element"
[ "@param", "element", "@param", "toIndex", "Swaps", "the", "elements", "indexes", ".", "Element", "gets", "toIndex", "index", "and", "the", "previous", "element", "with", "index", "toIndex", "gets", "the", "previous", "index", "of", "element" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/Topology.java#L118-L133
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getCertificateAsync
public Observable<CertificateBundle> getCertificateAsync(String vaultBaseUrl, String certificateName, String certificateVersion) { """ Gets information about a certificate. Gets information about a specific certificate. This operation requires the certificates/get permission. @param vaultBaseUrl The vault name...
java
public Observable<CertificateBundle> getCertificateAsync(String vaultBaseUrl, String certificateName, String certificateVersion) { return getCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certificateVersion).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundle>() { ...
[ "public", "Observable", "<", "CertificateBundle", ">", "getCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "String", "certificateVersion", ")", "{", "return", "getCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "cer...
Gets information about a certificate. Gets information about a specific certificate. This operation requires the certificates/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate in the given vault. @param certificateVersion...
[ "Gets", "information", "about", "a", "certificate", ".", "Gets", "information", "about", "a", "specific", "certificate", ".", "This", "operation", "requires", "the", "certificates", "/", "get", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7575-L7582
Sciss/abc4j
abc/src/main/java/abc/notation/Tune.java
Tune.createPart
public Part createPart(String partLabel) { """ Creates a new part in this tune if doesn't exist and returns it. @param partLabel The label defining this new tune part. @return The new part properly labeled. """ Part part; if ((part = getPart(partLabel)) != null) return part; // check should ...
java
public Part createPart(String partLabel) { Part part; if ((part = getPart(partLabel)) != null) return part; // check should be requiered to see if the label is not // empty or blank character because the blank character is // used as flag for the default part. part = new Part(this, partLab...
[ "public", "Part", "createPart", "(", "String", "partLabel", ")", "{", "Part", "part", ";", "if", "(", "(", "part", "=", "getPart", "(", "partLabel", ")", ")", "!=", "null", ")", "return", "part", ";", "// check should be requiered to see if the label is not \r",...
Creates a new part in this tune if doesn't exist and returns it. @param partLabel The label defining this new tune part. @return The new part properly labeled.
[ "Creates", "a", "new", "part", "in", "this", "tune", "if", "doesn", "t", "exist", "and", "returns", "it", "." ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/Tune.java#L310-L321
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java
ModelsEngine.go_upstream_a
public static void go_upstream_a( int[] p, RandomIter flowRandomIter, RandomIter tcaRandomIter, RandomIter lRandomIter, int[] param ) { """ Moves one pixel upstream. @param p @param flowRandomIter @param tcaRandomIter @param lRandomIter @param param """ double area = 0, lenght = 0; ...
java
public static void go_upstream_a( int[] p, RandomIter flowRandomIter, RandomIter tcaRandomIter, RandomIter lRandomIter, int[] param ) { double area = 0, lenght = 0; int[] point = new int[2]; int kk = 0, count = 0; point[0] = p[0]; point[1] = p[1]; // check ho...
[ "public", "static", "void", "go_upstream_a", "(", "int", "[", "]", "p", ",", "RandomIter", "flowRandomIter", ",", "RandomIter", "tcaRandomIter", ",", "RandomIter", "lRandomIter", ",", "int", "[", "]", "param", ")", "{", "double", "area", "=", "0", ",", "le...
Moves one pixel upstream. @param p @param flowRandomIter @param tcaRandomIter @param lRandomIter @param param
[ "Moves", "one", "pixel", "upstream", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java#L128-L168
Frostman/dropbox4j
src/main/java/ru/frostman/dropbox/api/DropboxClient.java
DropboxClient.putFile
public void putFile(File file, String path) throws IOException { """ Upload specified file to specified folder. @param file to upload @param path of target folder @throws IOException iff exception while accessing file """ OAuthRequest request = new OAuthRequest(Verb.POST, FILES_URL + encode(path...
java
public void putFile(File file, String path) throws IOException { OAuthRequest request = new OAuthRequest(Verb.POST, FILES_URL + encode(path)); Multipart.attachFile(file, request); service.signRequest(accessToken, request); checkFiles(request.send()); }
[ "public", "void", "putFile", "(", "File", "file", ",", "String", "path", ")", "throws", "IOException", "{", "OAuthRequest", "request", "=", "new", "OAuthRequest", "(", "Verb", ".", "POST", ",", "FILES_URL", "+", "encode", "(", "path", ")", ")", ";", "Mul...
Upload specified file to specified folder. @param file to upload @param path of target folder @throws IOException iff exception while accessing file
[ "Upload", "specified", "file", "to", "specified", "folder", "." ]
train
https://github.com/Frostman/dropbox4j/blob/774c817e5bf294d0139ecb5ac81399be50ada5e0/src/main/java/ru/frostman/dropbox/api/DropboxClient.java#L277-L283
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/cdi/MPJWTExtension.java
MPJWTExtension.observeBeforeBeanDiscovery
public void observeBeforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd, BeanManager beanManager) { """ Register the MPJWTProducer JsonWebToken producer bean @param bbd before discovery event @param beanManager cdi bean manager """ log.debugf("MPJWTExtension(), adding producers"); ...
java
public void observeBeforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd, BeanManager beanManager) { log.debugf("MPJWTExtension(), adding producers"); String extensionName = MPJWTExtension.class.getName(); for (Class<?> clazz : new Class<?>[] { JWTAuthContextInfoProvider.class, ...
[ "public", "void", "observeBeforeBeanDiscovery", "(", "@", "Observes", "BeforeBeanDiscovery", "bbd", ",", "BeanManager", "beanManager", ")", "{", "log", ".", "debugf", "(", "\"MPJWTExtension(), adding producers\"", ")", ";", "String", "extensionName", "=", "MPJWTExtensio...
Register the MPJWTProducer JsonWebToken producer bean @param bbd before discovery event @param beanManager cdi bean manager
[ "Register", "the", "MPJWTProducer", "JsonWebToken", "producer", "bean" ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/cdi/MPJWTExtension.java#L75-L88
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.createActionBlocker
public static String createActionBlocker(ZooKeeper zk, String node, CreateMode mode, VoltLogger hostLog, String request) { """ Create a ZK node under action blocker directory. Exclusive execution of elastic operation, rejoin or catalog update is checked. </p> Catalog update can not happen during node rejoin. <...
java
public static String createActionBlocker(ZooKeeper zk, String node, CreateMode mode, VoltLogger hostLog, String request) { //Acquire a lock before creating a blocker and validate actions. ZooKeeperLock zklock = new ZooKeeperLock(zk, VoltZK.actionLock, "lock"); String lockingMessage = null; ...
[ "public", "static", "String", "createActionBlocker", "(", "ZooKeeper", "zk", ",", "String", "node", ",", "CreateMode", "mode", ",", "VoltLogger", "hostLog", ",", "String", "request", ")", "{", "//Acquire a lock before creating a blocker and validate actions.", "ZooKeeperL...
Create a ZK node under action blocker directory. Exclusive execution of elastic operation, rejoin or catalog update is checked. </p> Catalog update can not happen during node rejoin. </p> Node rejoin can not happen during catalog update or elastic operation. </p> Elastic operation can not happen during node rejoin or c...
[ "Create", "a", "ZK", "node", "under", "action", "blocker", "directory", ".", "Exclusive", "execution", "of", "elastic", "operation", "rejoin", "or", "catalog", "update", "is", "checked", ".", "<", "/", "p", ">", "Catalog", "update", "can", "not", "happen", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L412-L428
sdl/Testy
src/main/java/com/sdl/selenium/web/XPathBuilder.java
XPathBuilder.setTemplate
@SuppressWarnings("unchecked") public <T extends XPathBuilder> T setTemplate(final String key, final String value) { """ For customize template please see here: See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#dpos @param key name template @param value template @param <T> the elem...
java
@SuppressWarnings("unchecked") public <T extends XPathBuilder> T setTemplate(final String key, final String value) { if (value == null) { templates.remove(key); } else { templates.put(key, value); } return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "XPathBuilder", ">", "T", "setTemplate", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "templates", ...
For customize template please see here: See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#dpos @param key name template @param value template @param <T> the element which calls this method @return this element
[ "For", "customize", "template", "please", "see", "here", ":", "See", "http", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "7", "/", "docs", "/", "api", "/", "java", "/", "util", "/", "Formatter", ".", "html#dpos" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/web/XPathBuilder.java#L447-L455
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/impl/EntryWrappingInterceptor.java
EntryWrappingInterceptor.shouldCommitDuringPrepare
protected boolean shouldCommitDuringPrepare(PrepareCommand command, TxInvocationContext ctx) { """ total order condition: only commits when it is remote context and the prepare has the flag 1PC set @param command the prepare command @param ctx the invocation context @return true if the modification should be ...
java
protected boolean shouldCommitDuringPrepare(PrepareCommand command, TxInvocationContext ctx) { return totalOrder ? command.isOnePhaseCommit() && (!ctx.isOriginLocal() || !command.hasModifications()) : command.isOnePhaseCommit(); }
[ "protected", "boolean", "shouldCommitDuringPrepare", "(", "PrepareCommand", "command", ",", "TxInvocationContext", "ctx", ")", "{", "return", "totalOrder", "?", "command", ".", "isOnePhaseCommit", "(", ")", "&&", "(", "!", "ctx", ".", "isOriginLocal", "(", ")", ...
total order condition: only commits when it is remote context and the prepare has the flag 1PC set @param command the prepare command @param ctx the invocation context @return true if the modification should be committed, false otherwise
[ "total", "order", "condition", ":", "only", "commits", "when", "it", "is", "remote", "context", "and", "the", "prepare", "has", "the", "flag", "1PC", "set" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/impl/EntryWrappingInterceptor.java#L847-L851
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java
Levenshtein.QGram
@SuppressWarnings("unchecked") public static <T extends Levenshtein> T QGram(String baseTarget, String compareTarget, Integer k) { """ Returns a new Q-Gram (Ukkonen) instance with compare target string and k-shingling @see QGram @param baseTarget @param compareTarget @param k @return """ return (T) n...
java
@SuppressWarnings("unchecked") public static <T extends Levenshtein> T QGram(String baseTarget, String compareTarget, Integer k) { return (T) new QGram(baseTarget, k).update(compareTarget); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "Levenshtein", ">", "T", "QGram", "(", "String", "baseTarget", ",", "String", "compareTarget", ",", "Integer", "k", ")", "{", "return", "(", "T", ")", "new", "QGra...
Returns a new Q-Gram (Ukkonen) instance with compare target string and k-shingling @see QGram @param baseTarget @param compareTarget @param k @return
[ "Returns", "a", "new", "Q", "-", "Gram", "(", "Ukkonen", ")", "instance", "with", "compare", "target", "string", "and", "k", "-", "shingling" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java#L197-L200
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.logSlowQueryBySlf4j
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, SLF4JLogLevel logLevel) { """ Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level for slf4j @return b...
java
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, SLF4JLogLevel logLevel) { return logSlowQueryBySlf4j(thresholdTime, timeUnit, logLevel, null); }
[ "public", "ProxyDataSourceBuilder", "logSlowQueryBySlf4j", "(", "long", "thresholdTime", ",", "TimeUnit", "timeUnit", ",", "SLF4JLogLevel", "logLevel", ")", "{", "return", "logSlowQueryBySlf4j", "(", "thresholdTime", ",", "timeUnit", ",", "logLevel", ",", "null", ")",...
Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level for slf4j @return builder @since 1.4.1
[ "Register", "{", "@link", "SLF4JSlowQueryListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L348-L350
grails/grails-core
grails-encoder/src/main/groovy/org/grails/encoder/CodecLookupHelper.java
CodecLookupHelper.lookupEncoder
public static Encoder lookupEncoder(GrailsApplication grailsApplication, String codecName) { """ Lookup encoder. @param grailsApplication the grailsApplication instance @param codecName the codec name @return the encoder instance """ ApplicationContext ctx = grailsApplication != null ? grailsAppli...
java
public static Encoder lookupEncoder(GrailsApplication grailsApplication, String codecName) { ApplicationContext ctx = grailsApplication != null ? grailsApplication.getMainContext() : null; if(ctx != null) { try { CodecLookup codecLookup = ctx.getBean("codecLookup", CodecLooku...
[ "public", "static", "Encoder", "lookupEncoder", "(", "GrailsApplication", "grailsApplication", ",", "String", "codecName", ")", "{", "ApplicationContext", "ctx", "=", "grailsApplication", "!=", "null", "?", "grailsApplication", ".", "getMainContext", "(", ")", ":", ...
Lookup encoder. @param grailsApplication the grailsApplication instance @param codecName the codec name @return the encoder instance
[ "Lookup", "encoder", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-encoder/src/main/groovy/org/grails/encoder/CodecLookupHelper.java#L37-L49
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
FSNamesystem.setTimes
public void setTimes(String src, long mtime, long atime) throws IOException { """ stores the modification and access time for this inode. The access time is precise upto an hour. The transaction, if needed, is written to the edits log but is not flushed. """ if ( !accessTimeTouchable && atime != -1) { ...
java
public void setTimes(String src, long mtime, long atime) throws IOException { if ( !accessTimeTouchable && atime != -1) { throw new AccessTimeException("setTimes is not allowed for accessTime"); } setTimesInternal(src, mtime, atime); getEditLog().logSync(false); }
[ "public", "void", "setTimes", "(", "String", "src", ",", "long", "mtime", ",", "long", "atime", ")", "throws", "IOException", "{", "if", "(", "!", "accessTimeTouchable", "&&", "atime", "!=", "-", "1", ")", "{", "throw", "new", "AccessTimeException", "(", ...
stores the modification and access time for this inode. The access time is precise upto an hour. The transaction, if needed, is written to the edits log but is not flushed.
[ "stores", "the", "modification", "and", "access", "time", "for", "this", "inode", ".", "The", "access", "time", "is", "precise", "upto", "an", "hour", ".", "The", "transaction", "if", "needed", "is", "written", "to", "the", "edits", "log", "but", "is", "...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L1898-L1904
scireum/s3ninja
src/main/java/ninja/Bucket.java
Bucket.getObject
public StoredObject getObject(String id) { """ Returns the child object with the given id. @param id the name of the requested child object. Must not contain .. / or \ @return the object with the given id, might not exist, but is always non null """ if (id.contains("..") || id.contains("/") || id.c...
java
public StoredObject getObject(String id) { if (id.contains("..") || id.contains("/") || id.contains("\\")) { throw Exceptions.createHandled() .withSystemErrorMessage( "Invalid object name: %s. A object name must not contain '..' '/' or ...
[ "public", "StoredObject", "getObject", "(", "String", "id", ")", "{", "if", "(", "id", ".", "contains", "(", "\"..\"", ")", "||", "id", ".", "contains", "(", "\"/\"", ")", "||", "id", ".", "contains", "(", "\"\\\\\"", ")", ")", "{", "throw", "Excepti...
Returns the child object with the given id. @param id the name of the requested child object. Must not contain .. / or \ @return the object with the given id, might not exist, but is always non null
[ "Returns", "the", "child", "object", "with", "the", "given", "id", "." ]
train
https://github.com/scireum/s3ninja/blob/445eec55c91780267a7f987818b3fedecae009c5/src/main/java/ninja/Bucket.java#L173-L182
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/corpus/processing/TermExtractionProcessor.java
TermExtractionProcessor.onComplete
protected Corpus onComplete(Corpus corpus, ProcessorContext context, Counter<String> counts) { """ On complete corpus. @param corpus the corpus @param context the context @param counts the counts @return the corpus """ return corpus; }
java
protected Corpus onComplete(Corpus corpus, ProcessorContext context, Counter<String> counts) { return corpus; }
[ "protected", "Corpus", "onComplete", "(", "Corpus", "corpus", ",", "ProcessorContext", "context", ",", "Counter", "<", "String", ">", "counts", ")", "{", "return", "corpus", ";", "}" ]
On complete corpus. @param corpus the corpus @param context the context @param counts the counts @return the corpus
[ "On", "complete", "corpus", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/corpus/processing/TermExtractionProcessor.java#L73-L75
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManager.java
PropertiesManager.setProperty
public <E extends Enum<E>> void setProperty(T property, E value) throws IllegalArgumentException { """ Set the given property using an Enum constant. This will not write the new value to the file system.<br> <br> Please note that the Enum value set here is case insensitive. See {@link #getEnumProperty(Object, ...
java
public <E extends Enum<E>> void setProperty(T property, E value) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException("Cannot set a null value, use reset instead"); } setProperty(property, value.name().toLowerCase()); }
[ "public", "<", "E", "extends", "Enum", "<", "E", ">", ">", "void", "setProperty", "(", "T", "property", ",", "E", "value", ")", "throws", "IllegalArgumentException", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException...
Set the given property using an Enum constant. This will not write the new value to the file system.<br> <br> Please note that the Enum value set here is case insensitive. See {@link #getEnumProperty(Object, Class)} for additional details. @see #saveProperty(Object, Enum) @param <E> the type of Enum value to set @par...
[ "Set", "the", "given", "property", "using", "an", "Enum", "constant", ".", "This", "will", "not", "write", "the", "new", "value", "to", "the", "file", "system", ".", "<br", ">", "<br", ">", "Please", "note", "that", "the", "Enum", "value", "set", "here...
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManager.java#L891-L899
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/websphere/exception/DistributedException.java
DistributedException.setLocalizationInfo
public void setLocalizationInfo(String resourceBundleName, String resourceKey, Object[] formatArguments) { """ Set the values to be used for finding the correct translated version of the message and formatting it. @param resourceBundleName java.lang.String - the name of the resource bundle, which is a subclass ...
java
public void setLocalizationInfo(String resourceBundleName, String resourceKey, Object[] formatArguments) { exceptionInfo.setLocalizationInfo(resourceBundleName,resourceKey,formatArguments); }
[ "public", "void", "setLocalizationInfo", "(", "String", "resourceBundleName", ",", "String", "resourceKey", ",", "Object", "[", "]", "formatArguments", ")", "{", "exceptionInfo", ".", "setLocalizationInfo", "(", "resourceBundleName", ",", "resourceKey", ",", "formatAr...
Set the values to be used for finding the correct translated version of the message and formatting it. @param resourceBundleName java.lang.String - the name of the resource bundle, which is a subclass of java.util.PropertyResourceBundle. @param resourceKey java.lang.String - the key in the resource bundle that specifie...
[ "Set", "the", "values", "to", "be", "used", "for", "finding", "the", "correct", "translated", "version", "of", "the", "message", "and", "formatting", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/websphere/exception/DistributedException.java#L350-L353
canoo/dolphin-platform
platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/commons/lang/TypeUtils.java
TypeUtils.unrollVariableAssignments
private static Type unrollVariableAssignments(TypeVariable<?> var, final Map<TypeVariable<?>, Type> typeVarAssigns) { """ Look up {@code var} in {@code typeVarAssigns} <em>transitively</em>, i.e. keep looking until the value found is <em>not</em> a type variable. @param var the type variable to look...
java
private static Type unrollVariableAssignments(TypeVariable<?> var, final Map<TypeVariable<?>, Type> typeVarAssigns) { Type result; do { result = typeVarAssigns.get(var); if (result instanceof TypeVariable<?> && !result.equals(var)) { var = (TypeVariable<?>) result...
[ "private", "static", "Type", "unrollVariableAssignments", "(", "TypeVariable", "<", "?", ">", "var", ",", "final", "Map", "<", "TypeVariable", "<", "?", ">", ",", "Type", ">", "typeVarAssigns", ")", "{", "Type", "result", ";", "do", "{", "result", "=", "...
Look up {@code var} in {@code typeVarAssigns} <em>transitively</em>, i.e. keep looking until the value found is <em>not</em> a type variable. @param var the type variable to look up @param typeVarAssigns the map used for the look up @return Type or {@code null} if some variable was not in the map @since 3.2
[ "Look", "up", "{", "@code", "var", "}", "in", "{", "@code", "typeVarAssigns", "}", "<em", ">", "transitively<", "/", "em", ">", "i", ".", "e", ".", "keep", "looking", "until", "the", "value", "found", "is", "<em", ">", "not<", "/", "em", ">", "a", ...
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/commons/lang/TypeUtils.java#L422-L433
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/NetworkEntryEvent.java
NetworkEntryEvent.addNodeActiveParticipant
public void addNodeActiveParticipant(String userId, String altUserId, String userName, String networkId) { """ Add an Active Participant to this message representing the node doing the network entry @param userId The Active Participant's User ID @param altUserId The Active Participant's Alternate UserID @par...
java
public void addNodeActiveParticipant(String userId, String altUserId, String userName, String networkId) { addActiveParticipant( userId, altUserId, userName, false, null, networkId); }
[ "public", "void", "addNodeActiveParticipant", "(", "String", "userId", ",", "String", "altUserId", ",", "String", "userName", ",", "String", "networkId", ")", "{", "addActiveParticipant", "(", "userId", ",", "altUserId", ",", "userName", ",", "false", ",", "null...
Add an Active Participant to this message representing the node doing the network entry @param userId The Active Participant's User ID @param altUserId The Active Participant's Alternate UserID @param userName The Active Participant's UserName @param networkId The Active Participant's Network Access Point ID
[ "Add", "an", "Active", "Participant", "to", "this", "message", "representing", "the", "node", "doing", "the", "network", "entry" ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/NetworkEntryEvent.java#L52-L61
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/ExceptionFactory.java
ExceptionFactory.planVersionNotFoundException
public static final PlanVersionNotFoundException planVersionNotFoundException(String planId, String version) { """ Creates an exception from an plan id and version. @param planId the plan id @param version the version id @return the exception """ return new PlanVersionNotFoundException(Messages.i18n...
java
public static final PlanVersionNotFoundException planVersionNotFoundException(String planId, String version) { return new PlanVersionNotFoundException(Messages.i18n.format("PlanVersionDoesNotExist", planId, version)); //$NON-NLS-1$ }
[ "public", "static", "final", "PlanVersionNotFoundException", "planVersionNotFoundException", "(", "String", "planId", ",", "String", "version", ")", "{", "return", "new", "PlanVersionNotFoundException", "(", "Messages", ".", "i18n", ".", "format", "(", "\"PlanVersionDoe...
Creates an exception from an plan id and version. @param planId the plan id @param version the version id @return the exception
[ "Creates", "an", "exception", "from", "an", "plan", "id", "and", "version", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/ExceptionFactory.java#L311-L313
bladecoder/blade-ink
src/main/java/com/bladecoder/ink/runtime/Story.java
Story.bindExternalFunction
public void bindExternalFunction(String funcName, ExternalFunction func) throws Exception { """ Most general form of function binding that returns an Object and takes an array of Object parameters. The only way to bind a function with more than 3 arguments. @param funcName EXTERNAL ink function name to bind ...
java
public void bindExternalFunction(String funcName, ExternalFunction func) throws Exception { ifAsyncWeCant("bind an external function"); Assert(!externals.containsKey(funcName), "Function '" + funcName + "' has already been bound."); externals.put(funcName, func); }
[ "public", "void", "bindExternalFunction", "(", "String", "funcName", ",", "ExternalFunction", "func", ")", "throws", "Exception", "{", "ifAsyncWeCant", "(", "\"bind an external function\"", ")", ";", "Assert", "(", "!", "externals", ".", "containsKey", "(", "funcNam...
Most general form of function binding that returns an Object and takes an array of Object parameters. The only way to bind a function with more than 3 arguments. @param funcName EXTERNAL ink function name to bind to. @param func The Java function to bind.
[ "Most", "general", "form", "of", "function", "binding", "that", "returns", "an", "Object", "and", "takes", "an", "array", "of", "Object", "parameters", ".", "The", "only", "way", "to", "bind", "a", "function", "with", "more", "than", "3", "arguments", "." ...
train
https://github.com/bladecoder/blade-ink/blob/930922099f7073f50f956479adaa3cbd47c70225/src/main/java/com/bladecoder/ink/runtime/Story.java#L222-L226
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Strings.java
Strings.intersectSeq
public static String intersectSeq(final String first, final String second, final String delimiter) { """ 返回一个新的逗号相隔字符串,实现其中的单词a-b的功能 @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @param delimiter a {@link java.lang.String} object. @return a {@link java.lang....
java
public static String intersectSeq(final String first, final String second, final String delimiter) { if (isEmpty(first) || isEmpty(second)) { return ""; } List<String> firstSeq = Arrays.asList(split(first, ',')); List<String> secondSeq = Arrays.asList(split(second, ',')); Collection<String> rs = Collect...
[ "public", "static", "String", "intersectSeq", "(", "final", "String", "first", ",", "final", "String", "second", ",", "final", "String", "delimiter", ")", "{", "if", "(", "isEmpty", "(", "first", ")", "||", "isEmpty", "(", "second", ")", ")", "{", "retur...
返回一个新的逗号相隔字符串,实现其中的单词a-b的功能 @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @param delimiter a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "返回一个新的逗号相隔字符串,实现其中的单词a", "-", "b的功能" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L284-L297
davidcarboni/restolino
src/main/java/com/github/davidcarboni/restolino/jetty/MainHandler.java
MainHandler.isRootRequest
boolean isRootRequest(HttpServletRequest request) { """ Determines if the given request is for the root resource (ie /). @param request The {@link HttpServletRequest} @return If {@link HttpServletRequest#getPathInfo()} is null, empty string or "/", then true. """ String path = request.getPathInfo(...
java
boolean isRootRequest(HttpServletRequest request) { String path = request.getPathInfo(); if (StringUtils.isBlank(path)) { return true; } else if (StringUtils.equals("/", path)) { return true; } return false; }
[ "boolean", "isRootRequest", "(", "HttpServletRequest", "request", ")", "{", "String", "path", "=", "request", ".", "getPathInfo", "(", ")", ";", "if", "(", "StringUtils", ".", "isBlank", "(", "path", ")", ")", "{", "return", "true", ";", "}", "else", "if...
Determines if the given request is for the root resource (ie /). @param request The {@link HttpServletRequest} @return If {@link HttpServletRequest#getPathInfo()} is null, empty string or "/", then true.
[ "Determines", "if", "the", "given", "request", "is", "for", "the", "root", "resource", "(", "ie", "/", ")", "." ]
train
https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/jetty/MainHandler.java#L153-L161
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/DbPro.java
DbPro.findByIds
public Record findByIds(String tableName, String primaryKey, Object... idValues) { """ Find record by ids. <pre> Example: Record user = Db.use().findByIds("user", "user_id", 123); Record userRole = Db.use().findByIds("user_role", "user_id, role_id", 123, 456); </pre> @param tableName the table name of the ta...
java
public Record findByIds(String tableName, String primaryKey, Object... idValues) { String[] pKeys = primaryKey.split(","); if (pKeys.length != idValues.length) throw new IllegalArgumentException("primary key number must equals id value number"); String sql = config.dialect.forDbFindById(tableName, pKey...
[ "public", "Record", "findByIds", "(", "String", "tableName", ",", "String", "primaryKey", ",", "Object", "...", "idValues", ")", "{", "String", "[", "]", "pKeys", "=", "primaryKey", ".", "split", "(", "\",\"", ")", ";", "if", "(", "pKeys", ".", "length",...
Find record by ids. <pre> Example: Record user = Db.use().findByIds("user", "user_id", 123); Record userRole = Db.use().findByIds("user_role", "user_id, role_id", 123, 456); </pre> @param tableName the table name of the table @param primaryKey the primary key of the table, composite primary key is separated by comma ch...
[ "Find", "record", "by", "ids", ".", "<pre", ">", "Example", ":", "Record", "user", "=", "Db", ".", "use", "()", ".", "findByIds", "(", "user", "user_id", "123", ")", ";", "Record", "userRole", "=", "Db", ".", "use", "()", ".", "findByIds", "(", "us...
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/DbPro.java#L395-L403
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java
StrSpliter.splitByRegex
public static List<String> splitByRegex(String str, String separatorRegex, int limit, boolean isTrim, boolean ignoreEmpty) { """ 通过正则切分字符串 @param str 字符串 @param separatorRegex 分隔符正则 @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8 """ final Pa...
java
public static List<String> splitByRegex(String str, String separatorRegex, int limit, boolean isTrim, boolean ignoreEmpty){ final Pattern pattern = PatternPool.get(separatorRegex); return split(str, pattern, limit, isTrim, ignoreEmpty); }
[ "public", "static", "List", "<", "String", ">", "splitByRegex", "(", "String", "str", ",", "String", "separatorRegex", ",", "int", "limit", ",", "boolean", "isTrim", ",", "boolean", "ignoreEmpty", ")", "{", "final", "Pattern", "pattern", "=", "PatternPool", ...
通过正则切分字符串 @param str 字符串 @param separatorRegex 分隔符正则 @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8
[ "通过正则切分字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java#L399-L402
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForAndGetView
public <T extends View> T waitForAndGetView(int index, Class<T> classToFilterBy) { """ Waits for and returns a View. @param index the index of the view @param classToFilterby the class to filter @return the specified View """ long endTime = SystemClock.uptimeMillis() + Timeout.getSmallTimeout(); while...
java
public <T extends View> T waitForAndGetView(int index, Class<T> classToFilterBy){ long endTime = SystemClock.uptimeMillis() + Timeout.getSmallTimeout(); while (SystemClock.uptimeMillis() <= endTime && !waitForView(classToFilterBy, index, true, true)); int numberOfUniqueViews = searcher.getNumberOfUniqueViews(); ...
[ "public", "<", "T", "extends", "View", ">", "T", "waitForAndGetView", "(", "int", "index", ",", "Class", "<", "T", ">", "classToFilterBy", ")", "{", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "Timeout", ".", "getSmallTimeout...
Waits for and returns a View. @param index the index of the view @param classToFilterby the class to filter @return the specified View
[ "Waits", "for", "and", "returns", "a", "View", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L645-L671
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/PTBLexer.java
PTBLexer.delimit
private static String delimit(String s, char c) { """ This quotes a character with a backslash, but doesn't do it if the character is already preceded by a backslash. """ int i = s.indexOf(c); while (i != -1) { if (i == 0 || s.charAt(i - 1) != '\\') { s = s.substring(0, i) + '\\' + s...
java
private static String delimit(String s, char c) { int i = s.indexOf(c); while (i != -1) { if (i == 0 || s.charAt(i - 1) != '\\') { s = s.substring(0, i) + '\\' + s.substring(i); i = s.indexOf(c, i + 2); } else { i = s.indexOf(c, i + 1); } } return s; ...
[ "private", "static", "String", "delimit", "(", "String", "s", ",", "char", "c", ")", "{", "int", "i", "=", "s", ".", "indexOf", "(", "c", ")", ";", "while", "(", "i", "!=", "-", "1", ")", "{", "if", "(", "i", "==", "0", "||", "s", ".", "cha...
This quotes a character with a backslash, but doesn't do it if the character is already preceded by a backslash.
[ "This", "quotes", "a", "character", "with", "a", "backslash", "but", "doesn", "t", "do", "it", "if", "the", "character", "is", "already", "preceded", "by", "a", "backslash", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/PTBLexer.java#L10592-L10603
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.setMonths
public static Date setMonths(final Date date, final int amount) { """ Sets the months field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumen...
java
public static Date setMonths(final Date date, final int amount) { return set(date, Calendar.MONTH, amount); }
[ "public", "static", "Date", "setMonths", "(", "final", "Date", "date", ",", "final", "int", "amount", ")", "{", "return", "set", "(", "date", ",", "Calendar", ".", "MONTH", ",", "amount", ")", ";", "}" ]
Sets the months field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumentException if the date is null @since 2.4
[ "Sets", "the", "months", "field", "to", "a", "date", "returning", "a", "new", "object", ".", "The", "original", "{", "@code", "Date", "}", "is", "unchanged", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L555-L557
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsInner.java
DatabaseAdvisorsInner.getAsync
public Observable<AdvisorInner> getAsync(String resourceGroupName, String serverName, String databaseName, String advisorName) { """ Returns details of a Database Advisor. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manage...
java
public Observable<AdvisorInner> getAsync(String resourceGroupName, String serverName, String databaseName, String advisorName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName, advisorName).map(new Func1<ServiceResponse<AdvisorInner>, AdvisorInner>() { @Override ...
[ "public", "Observable", "<", "AdvisorInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "advisorName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ","...
Returns details of a Database Advisor. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param advisorName The name of ...
[ "Returns", "details", "of", "a", "Database", "Advisor", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsInner.java#L205-L212
Netflix/netflix-commons
netflix-commons-util/src/main/java/com/netflix/util/HashCode.java
HashCode.equalObjects
public static boolean equalObjects(Object o1, Object o2) { """ Utility function to make it easy to compare two, possibly null, objects. @param o1 first object @param o2 second object @return true iff either both objects are null, or neither are null and they are equal. """ if (o1 == null) { ...
java
public static boolean equalObjects(Object o1, Object o2) { if (o1 == null) { return (o2 == null); } else if (o2 == null) { return false; } else { return o1.equals(o2); } }
[ "public", "static", "boolean", "equalObjects", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "if", "(", "o1", "==", "null", ")", "{", "return", "(", "o2", "==", "null", ")", ";", "}", "else", "if", "(", "o2", "==", "null", ")", "{", "return...
Utility function to make it easy to compare two, possibly null, objects. @param o1 first object @param o2 second object @return true iff either both objects are null, or neither are null and they are equal.
[ "Utility", "function", "to", "make", "it", "easy", "to", "compare", "two", "possibly", "null", "objects", "." ]
train
https://github.com/Netflix/netflix-commons/blob/7a158af76906d4a9b753e9344ce3e7abeb91dc01/netflix-commons-util/src/main/java/com/netflix/util/HashCode.java#L318-L326
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java
NvdCveUpdater.getMetaFile
protected final MetaProperties getMetaFile(String url) throws UpdateException { """ Downloads the NVD CVE Meta file properties. @param url the URL to the NVD CVE JSON file @return the meta file properties @throws UpdateException thrown if the meta file could not be downloaded """ try { ...
java
protected final MetaProperties getMetaFile(String url) throws UpdateException { try { final String metaUrl = url.substring(0, url.length() - 7) + "meta"; final URL u = new URL(metaUrl); final Downloader d = new Downloader(settings); final String content = d.fetchC...
[ "protected", "final", "MetaProperties", "getMetaFile", "(", "String", "url", ")", "throws", "UpdateException", "{", "try", "{", "final", "String", "metaUrl", "=", "url", ".", "substring", "(", "0", ",", "url", ".", "length", "(", ")", "-", "7", ")", "+",...
Downloads the NVD CVE Meta file properties. @param url the URL to the NVD CVE JSON file @return the meta file properties @throws UpdateException thrown if the meta file could not be downloaded
[ "Downloads", "the", "NVD", "CVE", "Meta", "file", "properties", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java#L350-L364
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/OcspClientBouncyCastle.java
OcspClientBouncyCastle.generateOCSPRequest
private static OCSPReq generateOCSPRequest(X509Certificate issuerCert, BigInteger serialNumber) throws OCSPException, IOException, OperatorException, CertificateEncodingException { """ Generates an OCSP request using BouncyCastle. @param issuerCert certificate of the issues @param serialNumber serial number @re...
java
private static OCSPReq generateOCSPRequest(X509Certificate issuerCert, BigInteger serialNumber) throws OCSPException, IOException, OperatorException, CertificateEncodingException { //Add provider BC Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); JcaD...
[ "private", "static", "OCSPReq", "generateOCSPRequest", "(", "X509Certificate", "issuerCert", ",", "BigInteger", "serialNumber", ")", "throws", "OCSPException", ",", "IOException", ",", "OperatorException", ",", "CertificateEncodingException", "{", "//Add provider BC\r", "Se...
Generates an OCSP request using BouncyCastle. @param issuerCert certificate of the issues @param serialNumber serial number @return an OCSP request @throws OCSPException @throws IOException
[ "Generates", "an", "OCSP", "request", "using", "BouncyCastle", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/OcspClientBouncyCastle.java#L115-L135
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java
ServiceInstanceQuery.getInQueryCriterion
public ServiceInstanceQuery getInQueryCriterion(String key, List<String> list) { """ Get a metadata value in String list QueryCriterion. Add a QueryCriterion to check ServiceInstance has metadata value in the target String list. @param key the metadata key. @param list the target String list that metadat...
java
public ServiceInstanceQuery getInQueryCriterion(String key, List<String> list){ QueryCriterion c = new InQueryCriterion(key, list); addQueryCriterion(c); return this; }
[ "public", "ServiceInstanceQuery", "getInQueryCriterion", "(", "String", "key", ",", "List", "<", "String", ">", "list", ")", "{", "QueryCriterion", "c", "=", "new", "InQueryCriterion", "(", "key", ",", "list", ")", ";", "addQueryCriterion", "(", "c", ")", ";...
Get a metadata value in String list QueryCriterion. Add a QueryCriterion to check ServiceInstance has metadata value in the target String list. @param key the metadata key. @param list the target String list that metadata value should be in. @return the ServiceInstanceQuery.
[ "Get", "a", "metadata", "value", "in", "String", "list", "QueryCriterion", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java#L152-L156
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java
ContinuousFileMonitoringFunction.shouldIgnore
private boolean shouldIgnore(Path filePath, long modificationTime) { """ Returns {@code true} if the file is NOT to be processed further. This happens if the modification time of the file is smaller than the {@link #globalModificationTime}. @param filePath the path of the file to check. @param modificationTime...
java
private boolean shouldIgnore(Path filePath, long modificationTime) { assert (Thread.holdsLock(checkpointLock)); boolean shouldIgnore = modificationTime <= globalModificationTime; if (shouldIgnore && LOG.isDebugEnabled()) { LOG.debug("Ignoring " + filePath + ", with mod time= " + modificationTime + " and gl...
[ "private", "boolean", "shouldIgnore", "(", "Path", "filePath", ",", "long", "modificationTime", ")", "{", "assert", "(", "Thread", ".", "holdsLock", "(", "checkpointLock", ")", ")", ";", "boolean", "shouldIgnore", "=", "modificationTime", "<=", "globalModification...
Returns {@code true} if the file is NOT to be processed further. This happens if the modification time of the file is smaller than the {@link #globalModificationTime}. @param filePath the path of the file to check. @param modificationTime the modification time of the file.
[ "Returns", "{" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java#L330-L338
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java
Query.endBefore
@Nonnull public Query endBefore(@Nonnull DocumentSnapshot snapshot) { """ Creates and returns a new Query that ends before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query. @param snap...
java
@Nonnull public Query endBefore(@Nonnull DocumentSnapshot snapshot) { QueryOptions newOptions = new QueryOptions(options); newOptions.fieldOrders = createImplicitOrderBy(); newOptions.endCursor = createCursor(newOptions.fieldOrders, snapshot, true); return new Query(firestore, path, newOptions); }
[ "@", "Nonnull", "public", "Query", "endBefore", "(", "@", "Nonnull", "DocumentSnapshot", "snapshot", ")", "{", "QueryOptions", "newOptions", "=", "new", "QueryOptions", "(", "options", ")", ";", "newOptions", ".", "fieldOrders", "=", "createImplicitOrderBy", "(", ...
Creates and returns a new Query that ends before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query. @param snapshot The snapshot of the document to end before. @return The created Query.
[ "Creates", "and", "returns", "a", "new", "Query", "that", "ends", "before", "the", "provided", "document", "(", "exclusive", ")", ".", "The", "end", "position", "is", "relative", "to", "the", "order", "of", "the", "query", ".", "The", "document", "must", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java#L812-L818
mikepenz/Materialize
library/src/main/java/com/mikepenz/materialize/holder/ColorHolder.java
ColorHolder.applyToOr
public static void applyToOr(ColorHolder colorHolder, TextView textView, ColorStateList colorDefault) { """ a small static helper to set the text color to a textView null save @param colorHolder @param textView @param colorDefault """ if (colorHolder != null && textView != null) { colo...
java
public static void applyToOr(ColorHolder colorHolder, TextView textView, ColorStateList colorDefault) { if (colorHolder != null && textView != null) { colorHolder.applyToOr(textView, colorDefault); } else if (textView != null) { textView.setTextColor(colorDefault); } ...
[ "public", "static", "void", "applyToOr", "(", "ColorHolder", "colorHolder", ",", "TextView", "textView", ",", "ColorStateList", "colorDefault", ")", "{", "if", "(", "colorHolder", "!=", "null", "&&", "textView", "!=", "null", ")", "{", "colorHolder", ".", "app...
a small static helper to set the text color to a textView null save @param colorHolder @param textView @param colorDefault
[ "a", "small", "static", "helper", "to", "set", "the", "text", "color", "to", "a", "textView", "null", "save" ]
train
https://github.com/mikepenz/Materialize/blob/2612c10c7570191a78d57f23620e945d61370e3d/library/src/main/java/com/mikepenz/materialize/holder/ColorHolder.java#L169-L175
facebookarchive/hadoop-20
src/contrib/capacity-scheduler/src/java/org/apache/hadoop/mapred/CapacitySchedulerConf.java
CapacitySchedulerConf.setCapacity
public void setCapacity(String queue,float capacity) { """ Sets the capacity of the given queue. @param queue name of the queue @param capacity percent of the cluster for the queue. """ rmConf.setFloat(toFullPropertyName(queue, CAPACITY_PROPERTY),capacity); }
java
public void setCapacity(String queue,float capacity) { rmConf.setFloat(toFullPropertyName(queue, CAPACITY_PROPERTY),capacity); }
[ "public", "void", "setCapacity", "(", "String", "queue", ",", "float", "capacity", ")", "{", "rmConf", ".", "setFloat", "(", "toFullPropertyName", "(", "queue", ",", "CAPACITY_PROPERTY", ")", ",", "capacity", ")", ";", "}" ]
Sets the capacity of the given queue. @param queue name of the queue @param capacity percent of the cluster for the queue.
[ "Sets", "the", "capacity", "of", "the", "given", "queue", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/capacity-scheduler/src/java/org/apache/hadoop/mapred/CapacitySchedulerConf.java#L183-L185
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java
CommonExpectations.successfullyReachedProtectedResourceWithJwtCookie
public static Expectations successfullyReachedProtectedResourceWithJwtCookie(String testAction, String protectedUrl, String username) { """ Sets expectations that will check: <ol> <li>Successfully reached the specified URL <li>Response text includes JWT cookie and principal information </ol> """ re...
java
public static Expectations successfullyReachedProtectedResourceWithJwtCookie(String testAction, String protectedUrl, String username) { return successfullyReachedProtectedResourceWithJwtCookie(testAction, protectedUrl, username, JwtFatConstants.DEFAULT_ISS_REGEX); }
[ "public", "static", "Expectations", "successfullyReachedProtectedResourceWithJwtCookie", "(", "String", "testAction", ",", "String", "protectedUrl", ",", "String", "username", ")", "{", "return", "successfullyReachedProtectedResourceWithJwtCookie", "(", "testAction", ",", "pr...
Sets expectations that will check: <ol> <li>Successfully reached the specified URL <li>Response text includes JWT cookie and principal information </ol>
[ "Sets", "expectations", "that", "will", "check", ":", "<ol", ">", "<li", ">", "Successfully", "reached", "the", "specified", "URL", "<li", ">", "Response", "text", "includes", "JWT", "cookie", "and", "principal", "information", "<", "/", "ol", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java#L31-L33
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Strings.java
Strings.startsWithIgnoreCase
public static boolean startsWithIgnoreCase(String str, String prefix) { """ Test if the given String starts with the specified prefix, ignoring upper/lower case. @param str the String to check @param prefix the prefix to look for @see java.lang.String#startsWith """ if (str == null || prefix == nul...
java
public static boolean startsWithIgnoreCase(String str, String prefix) { if (str == null || prefix == null) { return false; } if (str.startsWith(prefix)) { return true; } if (str.length() < prefix.length()) { return false; } Stri...
[ "public", "static", "boolean", "startsWithIgnoreCase", "(", "String", "str", ",", "String", "prefix", ")", "{", "if", "(", "str", "==", "null", "||", "prefix", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "str", ".", "startsWith", "(...
Test if the given String starts with the specified prefix, ignoring upper/lower case. @param str the String to check @param prefix the prefix to look for @see java.lang.String#startsWith
[ "Test", "if", "the", "given", "String", "starts", "with", "the", "specified", "prefix", "ignoring", "upper", "/", "lower", "case", "." ]
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Strings.java#L297-L310
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java
CmsAliasBulkEditHelper.importAliases
public void importAliases(HttpServletRequest request, HttpServletResponse response) throws Exception { """ Imports uploaded aliases from a request.<p> @param request the request containing the uploaded aliases @param response the response @throws Exception if something goes wrong """ FileItemFa...
java
public void importAliases(HttpServletRequest request, HttpServletResponse response) throws Exception { FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); @SuppressWarnings("unchecked") List<FileItem> items = upload.parseR...
[ "public", "void", "importAliases", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "Exception", "{", "FileItemFactory", "factory", "=", "new", "DiskFileItemFactory", "(", ")", ";", "ServletFileUpload", "upload", "=", "new",...
Imports uploaded aliases from a request.<p> @param request the request containing the uploaded aliases @param response the response @throws Exception if something goes wrong
[ "Imports", "uploaded", "aliases", "from", "a", "request", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java#L94-L120
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/meta/LockedInodePath.java
LockedInodePath.lockDescendant
public LockedInodePath lockDescendant(AlluxioURI descendantUri, LockPattern lockPattern) throws InvalidPathException { """ Locks a descendant of the current path and returns a new locked inode path. The path is traversed according to the lock pattern. Closing the new path will have no effect on the current...
java
public LockedInodePath lockDescendant(AlluxioURI descendantUri, LockPattern lockPattern) throws InvalidPathException { LockedInodePath path = new LockedInodePath(descendantUri, this, PathUtils.getPathComponents(descendantUri.getPath()), lockPattern); path.traverseOrClose(); return path; }
[ "public", "LockedInodePath", "lockDescendant", "(", "AlluxioURI", "descendantUri", ",", "LockPattern", "lockPattern", ")", "throws", "InvalidPathException", "{", "LockedInodePath", "path", "=", "new", "LockedInodePath", "(", "descendantUri", ",", "this", ",", "PathUtils...
Locks a descendant of the current path and returns a new locked inode path. The path is traversed according to the lock pattern. Closing the new path will have no effect on the current path. On failure, all locks taken by this method will be released. @param descendantUri the full descendent uri starting from the roo...
[ "Locks", "a", "descendant", "of", "the", "current", "path", "and", "returns", "a", "new", "locked", "inode", "path", ".", "The", "path", "is", "traversed", "according", "to", "the", "lock", "pattern", ".", "Closing", "the", "new", "path", "will", "have", ...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/meta/LockedInodePath.java#L360-L366
clanie/clanie-core
src/main/java/dk/clanie/collections/NumberMap.java
NumberMap.newLongMap
public static <K> NumberMap<K, Long> newLongMap() { """ Creates a NumberMap for Longs. @param <K> @return NumberMap<K> """ return new NumberMap<K, Long>() { @Override public void add(K key, Long addend) { put(key, containsKey(key) ? (get(key) + addend) : addend); } @Override public voi...
java
public static <K> NumberMap<K, Long> newLongMap() { return new NumberMap<K, Long>() { @Override public void add(K key, Long addend) { put(key, containsKey(key) ? (get(key) + addend) : addend); } @Override public void sub(K key, Long subtrahend) { put(key, (containsKey(key) ? get(key) : 0l) - su...
[ "public", "static", "<", "K", ">", "NumberMap", "<", "K", ",", "Long", ">", "newLongMap", "(", ")", "{", "return", "new", "NumberMap", "<", "K", ",", "Long", ">", "(", ")", "{", "@", "Override", "public", "void", "add", "(", "K", "key", ",", "Lon...
Creates a NumberMap for Longs. @param <K> @return NumberMap<K>
[ "Creates", "a", "NumberMap", "for", "Longs", "." ]
train
https://github.com/clanie/clanie-core/blob/ac8a655b93127f0e281b741c4d53f429be2816ad/src/main/java/dk/clanie/collections/NumberMap.java#L192-L203
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java
HCRenderer.getAsHTMLString
@Nonnull public static String getAsHTMLString (@Nonnull final IHCNode aHCNode) { """ Convert the passed HC node to an HTML string using the default conversion settings. @param aHCNode The node to be converted. May not be <code>null</code>. @return The node as XML with or without indentation. """ re...
java
@Nonnull public static String getAsHTMLString (@Nonnull final IHCNode aHCNode) { return getAsHTMLString (aHCNode, HCSettings.getConversionSettings ()); }
[ "@", "Nonnull", "public", "static", "String", "getAsHTMLString", "(", "@", "Nonnull", "final", "IHCNode", "aHCNode", ")", "{", "return", "getAsHTMLString", "(", "aHCNode", ",", "HCSettings", ".", "getConversionSettings", "(", ")", ")", ";", "}" ]
Convert the passed HC node to an HTML string using the default conversion settings. @param aHCNode The node to be converted. May not be <code>null</code>. @return The node as XML with or without indentation.
[ "Convert", "the", "passed", "HC", "node", "to", "an", "HTML", "string", "using", "the", "default", "conversion", "settings", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java#L241-L245
JDBDT/jdbdt
src/main/java/org/jdbdt/JDBDT.java
JDBDT.assertInserted
public static void assertInserted(String message, DataSet dataSet) throws DBAssertionError { """ Assert that database changed only by insertion of a given data set (error message variant). @param message Assertion error message. @param dataSet Data set. @throws DBAssertionError if the assertion fails. @see ...
java
public static void assertInserted(String message, DataSet dataSet) throws DBAssertionError { DBAssert.deltaAssertion(CallInfo.create(message), empty(dataSet.getSource()), dataSet); }
[ "public", "static", "void", "assertInserted", "(", "String", "message", ",", "DataSet", "dataSet", ")", "throws", "DBAssertionError", "{", "DBAssert", ".", "deltaAssertion", "(", "CallInfo", ".", "create", "(", "message", ")", ",", "empty", "(", "dataSet", "."...
Assert that database changed only by insertion of a given data set (error message variant). @param message Assertion error message. @param dataSet Data set. @throws DBAssertionError if the assertion fails. @see #assertUnchanged(DataSource) @see #assertDeleted(DataSet) @see #assertDelta(DataSet,DataSet)
[ "Assert", "that", "database", "changed", "only", "by", "insertion", "of", "a", "given", "data", "set", "(", "error", "message", "variant", ")", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L519-L521
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java
VmlGraphicsContext.setSize
public void setSize(int newWidth, int newHeight) { """ Apply a new size on the graphics context. @param newWidth The new newWidth in pixels for this graphics context. @param newHeight The new newHeight in pixels for this graphics context. """ this.width = newWidth; this.height = newHeight; if (hel...
java
public void setSize(int newWidth, int newHeight) { this.width = newWidth; this.height = newHeight; if (helper.getRootElement() != null) { applyElementSize(helper.getRootElement(), newWidth, newHeight, false); Dom.setStyleAttribute(helper.getRootElement(), "clip", "rect(0 " + newWidth + "px " + newHeight + ...
[ "public", "void", "setSize", "(", "int", "newWidth", ",", "int", "newHeight", ")", "{", "this", ".", "width", "=", "newWidth", ";", "this", ".", "height", "=", "newHeight", ";", "if", "(", "helper", ".", "getRootElement", "(", ")", "!=", "null", ")", ...
Apply a new size on the graphics context. @param newWidth The new newWidth in pixels for this graphics context. @param newHeight The new newHeight in pixels for this graphics context.
[ "Apply", "a", "new", "size", "on", "the", "graphics", "context", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java#L664-L674
BioPAX/Paxtools
paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java
AbstractPropertyEditor.isInstanceOfAtLeastOne
protected boolean isInstanceOfAtLeastOne(Set<Class<? extends BioPAXElement>> classes, Object value) { """ Checks if <em>value</em> is an instance of one of the classes given in a set. This method becomes useful, when the restrictions have to be checked for a set of objects. e.g. check if the value is in the rang...
java
protected boolean isInstanceOfAtLeastOne(Set<Class<? extends BioPAXElement>> classes, Object value) { boolean check = false; for (Class aClass : classes) { if (aClass.isInstance(value)) { check = true; break; } } return check; }
[ "protected", "boolean", "isInstanceOfAtLeastOne", "(", "Set", "<", "Class", "<", "?", "extends", "BioPAXElement", ">", ">", "classes", ",", "Object", "value", ")", "{", "boolean", "check", "=", "false", ";", "for", "(", "Class", "aClass", ":", "classes", "...
Checks if <em>value</em> is an instance of one of the classes given in a set. This method becomes useful, when the restrictions have to be checked for a set of objects. e.g. check if the value is in the range of the editor. @param classes a set of classes to be checked @param value value whose class will be checked @r...
[ "Checks", "if", "<em", ">", "value<", "/", "em", ">", "is", "an", "instance", "of", "one", "of", "the", "classes", "given", "in", "a", "set", ".", "This", "method", "becomes", "useful", "when", "the", "restrictions", "have", "to", "be", "checked", "for...
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java#L314-L326
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java
RolloutStatusCache.getRolloutStatus
public Map<Long, List<TotalTargetCountActionStatus>> getRolloutStatus(final List<Long> rollouts) { """ Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link Rollout}s. @param rollouts rolloutIds to retrieve cache entries for @return map of cached entries """ final Cache cache = ...
java
public Map<Long, List<TotalTargetCountActionStatus>> getRolloutStatus(final List<Long> rollouts) { final Cache cache = cacheManager.getCache(CACHE_RO_NAME); return retrieveFromCache(rollouts, cache); }
[ "public", "Map", "<", "Long", ",", "List", "<", "TotalTargetCountActionStatus", ">", ">", "getRolloutStatus", "(", "final", "List", "<", "Long", ">", "rollouts", ")", "{", "final", "Cache", "cache", "=", "cacheManager", ".", "getCache", "(", "CACHE_RO_NAME", ...
Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link Rollout}s. @param rollouts rolloutIds to retrieve cache entries for @return map of cached entries
[ "Retrieves", "cached", "list", "of", "{", "@link", "TotalTargetCountActionStatus", "}", "of", "{", "@link", "Rollout", "}", "s", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java#L75-L79
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/jmx/JmxUtil.java
JmxUtil.unregisterMBean
public static void unregisterMBean(ObjectName objectName, MBeanServer mBeanServer) throws Exception { """ Unregister the MBean located under the given {@link ObjectName} @param objectName {@link ObjectName} where the MBean is registered @param mBeanServer {@link MBeanServer} from which to unregister the MBean....
java
public static void unregisterMBean(ObjectName objectName, MBeanServer mBeanServer) throws Exception { if (mBeanServer.isRegistered(objectName)) { SecurityActions.unregisterMBean(objectName, mBeanServer); log.tracef("Unregistered %s", objectName); } }
[ "public", "static", "void", "unregisterMBean", "(", "ObjectName", "objectName", ",", "MBeanServer", "mBeanServer", ")", "throws", "Exception", "{", "if", "(", "mBeanServer", ".", "isRegistered", "(", "objectName", ")", ")", "{", "SecurityActions", ".", "unregister...
Unregister the MBean located under the given {@link ObjectName} @param objectName {@link ObjectName} where the MBean is registered @param mBeanServer {@link MBeanServer} from which to unregister the MBean. @throws Exception If unregistration could not be completed.
[ "Unregister", "the", "MBean", "located", "under", "the", "given", "{", "@link", "ObjectName", "}" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/jmx/JmxUtil.java#L80-L85
zaproxy/zaproxy
src/org/apache/commons/httpclient/URI.java
URI.prevalidate
protected boolean prevalidate(String component, BitSet disallowed) { """ Pre-validate the unescaped URI string within a specific component. @param component the component string within the component @param disallowed those characters disallowed within the component @return if true, it doesn't have the disallo...
java
protected boolean prevalidate(String component, BitSet disallowed) { // prevalidate the given component by disallowed characters if (component == null) { return false; // undefined } char[] target = component.toCharArray(); for (int i = 0; i < target.length; i++) { ...
[ "protected", "boolean", "prevalidate", "(", "String", "component", ",", "BitSet", "disallowed", ")", "{", "// prevalidate the given component by disallowed characters", "if", "(", "component", "==", "null", ")", "{", "return", "false", ";", "// undefined", "}", "char"...
Pre-validate the unescaped URI string within a specific component. @param component the component string within the component @param disallowed those characters disallowed within the component @return if true, it doesn't have the disallowed characters if false, the component is undefined or an incorrect one
[ "Pre", "-", "validate", "the", "unescaped", "URI", "string", "within", "a", "specific", "component", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/URI.java#L1808-L1820
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagEnableAde.java
CmsJspTagEnableAde.getPreviewInclude
private static String getPreviewInclude(String buttonLeft, String titleMessage) { """ Returns the preview mode include.<p> @param buttonLeft the button left parameter @param titleMessage the title attribute of the "Editor mode" button rendered by the include @return the preview mode include """ ...
java
private static String getPreviewInclude(String buttonLeft, String titleMessage) { StringBuffer buffer = new StringBuffer(); buffer.append("<style type=\"text/css\"> @import url(\"").append( CmsGwtActionElement.getFontIconCssLink()).append("\"); </style>\n"); buffer.append(String.for...
[ "private", "static", "String", "getPreviewInclude", "(", "String", "buttonLeft", ",", "String", "titleMessage", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\"<style type=\\\"text/css\\\"> @import url(\\...
Returns the preview mode include.<p> @param buttonLeft the button left parameter @param titleMessage the title attribute of the "Editor mode" button rendered by the include @return the preview mode include
[ "Returns", "the", "preview", "mode", "include", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagEnableAde.java#L241-L248
datasalt/pangool
core/src/main/java/com/datasalt/pangool/tuplemr/mapred/GroupComparator.java
GroupComparator.compare
@SuppressWarnings("rawtypes") @Override public int compare(ITuple w1, ITuple w2) { """ Never called in MapRed jobs. Just for completion and test purposes """ int schemaId1 = tupleMRConf.getSchemaIdByName(w1.getSchema().getName()); int schemaId2 = tupleMRConf.getSchemaIdByName(w2.getSchema().getName()); ...
java
@SuppressWarnings("rawtypes") @Override public int compare(ITuple w1, ITuple w2) { int schemaId1 = tupleMRConf.getSchemaIdByName(w1.getSchema().getName()); int schemaId2 = tupleMRConf.getSchemaIdByName(w2.getSchema().getName()); int[] indexes1 = serInfo.getGroupSchemaIndexTranslation(schemaId1); int[] indexe...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "@", "Override", "public", "int", "compare", "(", "ITuple", "w1", ",", "ITuple", "w2", ")", "{", "int", "schemaId1", "=", "tupleMRConf", ".", "getSchemaIdByName", "(", "w1", ".", "getSchema", "(", ")", "."...
Never called in MapRed jobs. Just for completion and test purposes
[ "Never", "called", "in", "MapRed", "jobs", ".", "Just", "for", "completion", "and", "test", "purposes" ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/tuplemr/mapred/GroupComparator.java#L45-L54
box/box-java-sdk
src/main/java/com/box/sdk/BoxTrash.java
BoxTrash.getFileInfo
public BoxFile.Info getFileInfo(String fileID, String... fields) { """ Gets information about a trashed file that's limited to a list of specified fields. @param fileID the ID of the trashed file. @param fields the fields to retrieve. @return info about the trashed file containing only the specified fi...
java
public BoxFile.Info getFileInfo(String fileID, String... fields) { String queryString = new QueryStringBuilder().appendParam("fields", fields).toString(); URL url = FILE_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, fileID); BoxAPIRequest request = new BoxAPIRequest(this.a...
[ "public", "BoxFile", ".", "Info", "getFileInfo", "(", "String", "fileID", ",", "String", "...", "fields", ")", "{", "String", "queryString", "=", "new", "QueryStringBuilder", "(", ")", ".", "appendParam", "(", "\"fields\"", ",", "fields", ")", ".", "toString...
Gets information about a trashed file that's limited to a list of specified fields. @param fileID the ID of the trashed file. @param fields the fields to retrieve. @return info about the trashed file containing only the specified fields.
[ "Gets", "information", "about", "a", "trashed", "file", "that", "s", "limited", "to", "a", "list", "of", "specified", "fields", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L173-L182
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java
VisibilityAlgorithm.addSegment
public void addSegment(Coordinate p0, Coordinate p1) { """ Add occlusion segment in isovist @param p0 segment origin @param p1 segment destination """ if (p0.distance(p1) < epsilon) { return; } addSegment(originalSegments, p0, p1); }
java
public void addSegment(Coordinate p0, Coordinate p1) { if (p0.distance(p1) < epsilon) { return; } addSegment(originalSegments, p0, p1); }
[ "public", "void", "addSegment", "(", "Coordinate", "p0", ",", "Coordinate", "p1", ")", "{", "if", "(", "p0", ".", "distance", "(", "p1", ")", "<", "epsilon", ")", "{", "return", ";", "}", "addSegment", "(", "originalSegments", ",", "p0", ",", "p1", "...
Add occlusion segment in isovist @param p0 segment origin @param p1 segment destination
[ "Add", "occlusion", "segment", "in", "isovist" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/VisibilityAlgorithm.java#L116-L121
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java
GitFlowGraphMonitor.addFlowEdge
private void addFlowEdge(DiffEntry change) { """ Add a {@link FlowEdge} to the {@link FlowGraph}. The method uses the {@link FlowEdgeFactory} instance provided by the {@link FlowGraph} to build a {@link FlowEdge} from the edge config file. @param change """ if (checkFilePath(change.getNewPath(), EDGE_FIL...
java
private void addFlowEdge(DiffEntry change) { if (checkFilePath(change.getNewPath(), EDGE_FILE_DEPTH)) { Path edgeFilePath = new Path(this.repositoryDir, change.getNewPath()); try { Config edgeConfig = loadEdgeFileWithOverrides(edgeFilePath); List<SpecExecutor> specExecutors = getSpecExec...
[ "private", "void", "addFlowEdge", "(", "DiffEntry", "change", ")", "{", "if", "(", "checkFilePath", "(", "change", ".", "getNewPath", "(", ")", ",", "EDGE_FILE_DEPTH", ")", ")", "{", "Path", "edgeFilePath", "=", "new", "Path", "(", "this", ".", "repository...
Add a {@link FlowEdge} to the {@link FlowGraph}. The method uses the {@link FlowEdgeFactory} instance provided by the {@link FlowGraph} to build a {@link FlowEdge} from the edge config file. @param change
[ "Add", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java#L218-L241