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
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.newWriter
public static BufferedWriter newWriter(File file, String charset, boolean append) throws IOException { """ Helper method to create a buffered writer for a file. If the given charset is "UTF-16BE" or "UTF-16LE", the requisite byte order mark is written to the stream before the writer is returned. @param file ...
java
public static BufferedWriter newWriter(File file, String charset, boolean append) throws IOException { if (append) { return new EncodingAwareBufferedWriter(new OutputStreamWriter(new FileOutputStream(file, append), charset)); } else { // first write the Byte Order Mark for Unicod...
[ "public", "static", "BufferedWriter", "newWriter", "(", "File", "file", ",", "String", "charset", ",", "boolean", "append", ")", "throws", "IOException", "{", "if", "(", "append", ")", "{", "return", "new", "EncodingAwareBufferedWriter", "(", "new", "OutputStrea...
Helper method to create a buffered writer for a file. If the given charset is "UTF-16BE" or "UTF-16LE", the requisite byte order mark is written to the stream before the writer is returned. @param file a File @param charset the name of the encoding used to write in this file @param append true if in append mode @...
[ "Helper", "method", "to", "create", "a", "buffered", "writer", "for", "a", "file", ".", "If", "the", "given", "charset", "is", "UTF", "-", "16BE", "or", "UTF", "-", "16LE", "the", "requisite", "byte", "order", "mark", "is", "written", "to", "the", "str...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1784-L1793
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getLast
public static boolean getLast (@Nullable final boolean [] aArray, final boolean aDefaultValue) { """ Get the last element of the array or the passed default if the passed array is empty. @param aArray The array who's last element is to be retrieved. May be <code>null</code> or empty. @param aDefaultValue T...
java
public static boolean getLast (@Nullable final boolean [] aArray, final boolean aDefaultValue) { final int nSize = getSize (aArray); return nSize == 0 ? aDefaultValue : aArray[nSize - 1]; }
[ "public", "static", "boolean", "getLast", "(", "@", "Nullable", "final", "boolean", "[", "]", "aArray", ",", "final", "boolean", "aDefaultValue", ")", "{", "final", "int", "nSize", "=", "getSize", "(", "aArray", ")", ";", "return", "nSize", "==", "0", "?...
Get the last element of the array or the passed default if the passed array is empty. @param aArray The array who's last element is to be retrieved. May be <code>null</code> or empty. @param aDefaultValue The default value to be returned if the array is empty @return the last element if the passed array is not empty, ...
[ "Get", "the", "last", "element", "of", "the", "array", "or", "the", "passed", "default", "if", "the", "passed", "array", "is", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L1120-L1124
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.deleteColumn
public void deleteColumn(String storeName, String rowKey, String columnName) { """ Add an update that will delete the column for the given store, row key, and column name. If a column update exists for the same store/row/column, the results are undefined when the transaction is committed. @param storeName Nam...
java
public void deleteColumn(String storeName, String rowKey, String columnName) { m_columnDeletes.add(new ColumnDelete(storeName, rowKey, columnName)); }
[ "public", "void", "deleteColumn", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "columnName", ")", "{", "m_columnDeletes", ".", "add", "(", "new", "ColumnDelete", "(", "storeName", ",", "rowKey", ",", "columnName", ")", ")", ";", "}" ]
Add an update that will delete the column for the given store, row key, and column name. If a column update exists for the same store/row/column, the results are undefined when the transaction is committed. @param storeName Name of store that owns row. @param rowKey Row key in string form. @param colName Column n...
[ "Add", "an", "update", "that", "will", "delete", "the", "column", "for", "the", "given", "store", "row", "key", "and", "column", "name", ".", "If", "a", "column", "update", "exists", "for", "the", "same", "store", "/", "row", "/", "column", "the", "res...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L243-L245
lightbend/config
config/src/main/java/com/typesafe/config/ConfigFactory.java
ConfigFactory.parseString
public static Config parseString(String s, ConfigParseOptions options) { """ Parses a string (which should be valid HOCON or JSON by default, or the syntax specified in the options otherwise). @param s string to parse @param options parse options @return the parsed configuration """ return Parsea...
java
public static Config parseString(String s, ConfigParseOptions options) { return Parseable.newString(s, options).parse().toConfig(); }
[ "public", "static", "Config", "parseString", "(", "String", "s", ",", "ConfigParseOptions", "options", ")", "{", "return", "Parseable", ".", "newString", "(", "s", ",", "options", ")", ".", "parse", "(", ")", ".", "toConfig", "(", ")", ";", "}" ]
Parses a string (which should be valid HOCON or JSON by default, or the syntax specified in the options otherwise). @param s string to parse @param options parse options @return the parsed configuration
[ "Parses", "a", "string", "(", "which", "should", "be", "valid", "HOCON", "or", "JSON", "by", "default", "or", "the", "syntax", "specified", "in", "the", "options", "otherwise", ")", "." ]
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigFactory.java#L1050-L1052
wildfly-swarm-archive/ARCHIVE-wildfly-swarm
batch-jberet/api/src/main/java/org/wildfly/swarm/batch/jberet/BatchFraction.java
BatchFraction.threadPool
public BatchFraction threadPool(final String name, final int maxThreads, final int keepAliveTime, final TimeUnit keepAliveUnits) { """ Creates a new thread-pool that can be used for batch jobs. @param name the maximum number of threads to set the pool to @param keepAliveTime the time to keep threads...
java
public BatchFraction threadPool(final String name, final int maxThreads, final int keepAliveTime, final TimeUnit keepAliveUnits) { final ThreadPool<?> threadPool = new ThreadPool<>(name); threadPool.maxThreads(maxThreads) .keepaliveTime("time", Integer.toBinaryString(keepAliveTime)) ...
[ "public", "BatchFraction", "threadPool", "(", "final", "String", "name", ",", "final", "int", "maxThreads", ",", "final", "int", "keepAliveTime", ",", "final", "TimeUnit", "keepAliveUnits", ")", "{", "final", "ThreadPool", "<", "?", ">", "threadPool", "=", "ne...
Creates a new thread-pool that can be used for batch jobs. @param name the maximum number of threads to set the pool to @param keepAliveTime the time to keep threads alive @param keepAliveUnits the time unit for the keep alive time @return this fraction
[ "Creates", "a", "new", "thread", "-", "pool", "that", "can", "be", "used", "for", "batch", "jobs", "." ]
train
https://github.com/wildfly-swarm-archive/ARCHIVE-wildfly-swarm/blob/28ef71bcfa743a7267666e0ed2919c37b356c09b/batch-jberet/api/src/main/java/org/wildfly/swarm/batch/jberet/BatchFraction.java#L179-L185
modelmapper/modelmapper
core/src/main/java/org/modelmapper/internal/PropertyInfoRegistry.java
PropertyInfoRegistry.mutatorFor
static synchronized Mutator mutatorFor(Class<?> type, String name, InheritingConfiguration configuration) { """ Returns an mutator for the {@code accessorName}, else {@code null} if none exists. Returns a Mutator instance for the given mutator method. The method must be externally validated to ensure that it acc...
java
static synchronized Mutator mutatorFor(Class<?> type, String name, InheritingConfiguration configuration) { PropertyInfoKey key = new PropertyInfoKey(type, name, configuration); if (!MUTATOR_CACHE.containsKey(key) || !FIELD_CACHE.containsKey(key)) { @SuppressWarnings("unchecked") Class<Object> u...
[ "static", "synchronized", "Mutator", "mutatorFor", "(", "Class", "<", "?", ">", "type", ",", "String", "name", ",", "InheritingConfiguration", "configuration", ")", "{", "PropertyInfoKey", "key", "=", "new", "PropertyInfoKey", "(", "type", ",", "name", ",", "c...
Returns an mutator for the {@code accessorName}, else {@code null} if none exists. Returns a Mutator instance for the given mutator method. The method must be externally validated to ensure that it accepts one argument and returns void.class.
[ "Returns", "an", "mutator", "for", "the", "{" ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/internal/PropertyInfoRegistry.java#L130-L146
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.getRoundings
public static Collection<MonetaryRounding> getRoundings(RoundingQuery roundingQuery) { """ Access multiple {@link MonetaryRounding} instances using a possibly complex query @param roundingQuery The {@link javax.money.RoundingQuery} that may contains arbitrary parameters to be evaluated. @return all {@link jav...
java
public static Collection<MonetaryRounding> getRoundings(RoundingQuery roundingQuery) { return Optional.ofNullable(monetaryRoundingsSingletonSpi()).orElseThrow( () -> new MonetaryException("No MonetaryRoundingsSpi loaded, query functionality is not available.")) .getRoundings(roun...
[ "public", "static", "Collection", "<", "MonetaryRounding", ">", "getRoundings", "(", "RoundingQuery", "roundingQuery", ")", "{", "return", "Optional", ".", "ofNullable", "(", "monetaryRoundingsSingletonSpi", "(", ")", ")", ".", "orElseThrow", "(", "(", ")", "->", ...
Access multiple {@link MonetaryRounding} instances using a possibly complex query @param roundingQuery The {@link javax.money.RoundingQuery} that may contains arbitrary parameters to be evaluated. @return all {@link javax.money.MonetaryRounding} instances matching the query, never {@code null}.
[ "Access", "multiple", "{", "@link", "MonetaryRounding", "}", "instances", "using", "a", "possibly", "complex", "query" ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L248-L252
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java
AddMetadataAction.printWarning
private void printWarning(PropertyImpl property, Exception exception) throws RepositoryException { """ Print warning message on the console @param property property that has not been read @param exception the reason for which wasn't read property @throws RepositoryException """ if (PropertyManager.i...
java
private void printWarning(PropertyImpl property, Exception exception) throws RepositoryException { if (PropertyManager.isDevelopping()) { LOG.warn("Binary value reader error, content by path " + property.getPath() + ", property id " + property.getData().getIdentifier() + " : " + exce...
[ "private", "void", "printWarning", "(", "PropertyImpl", "property", ",", "Exception", "exception", ")", "throws", "RepositoryException", "{", "if", "(", "PropertyManager", ".", "isDevelopping", "(", ")", ")", "{", "LOG", ".", "warn", "(", "\"Binary value reader er...
Print warning message on the console @param property property that has not been read @param exception the reason for which wasn't read property @throws RepositoryException
[ "Print", "warning", "message", "on", "the", "console" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java#L140-L152
michael-rapp/AndroidPreferenceActivity
example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java
AppearancePreferenceFragment.createWizardButtonBarElevationChangeListener
private OnPreferenceChangeListener createWizardButtonBarElevationChangeListener() { """ Creates and returns a listener, which allows to adapt the elevation of a wizard's button bar, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of ...
java
private OnPreferenceChangeListener createWizardButtonBarElevationChangeListener() { return new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(final Preference preference, final Object newValue) { int elevation = Integer.valueOf((String) newVal...
[ "private", "OnPreferenceChangeListener", "createWizardButtonBarElevationChangeListener", "(", ")", "{", "return", "new", "OnPreferenceChangeListener", "(", ")", "{", "@", "Override", "public", "boolean", "onPreferenceChange", "(", "final", "Preference", "preference", ",", ...
Creates and returns a listener, which allows to adapt the elevation of a wizard's button bar, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of the type {@link OnPreferenceChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "adapt", "the", "elevation", "of", "a", "wizard", "s", "button", "bar", "when", "the", "value", "of", "the", "corresponding", "preference", "has", "been", "changed", "." ]
train
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java#L148-L159
alipay/sofa-rpc
extension-impl/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/server/rest/SofaNettyJaxrsServer.java
SofaNettyJaxrsServer.setChannelOptions
public void setChannelOptions(final Map<ChannelOption, Object> channelOptions) { """ Add Netty {@link io.netty.channel.ChannelOption}s to the {@link io.netty.bootstrap.ServerBootstrap}. @param channelOptions the additional {@link io.netty.channel.ChannelOption}s. @see io.netty.bootstrap.ServerBootstrap#option(...
java
public void setChannelOptions(final Map<ChannelOption, Object> channelOptions) { this.channelOptions = channelOptions == null ? Collections.<ChannelOption, Object> emptyMap() : channelOptions; }
[ "public", "void", "setChannelOptions", "(", "final", "Map", "<", "ChannelOption", ",", "Object", ">", "channelOptions", ")", "{", "this", ".", "channelOptions", "=", "channelOptions", "==", "null", "?", "Collections", ".", "<", "ChannelOption", ",", "Object", ...
Add Netty {@link io.netty.channel.ChannelOption}s to the {@link io.netty.bootstrap.ServerBootstrap}. @param channelOptions the additional {@link io.netty.channel.ChannelOption}s. @see io.netty.bootstrap.ServerBootstrap#option(io.netty.channel.ChannelOption, Object)
[ "Add", "Netty", "{", "@link", "io", ".", "netty", ".", "channel", ".", "ChannelOption", "}", "s", "to", "the", "{", "@link", "io", ".", "netty", ".", "bootstrap", ".", "ServerBootstrap", "}", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/server/rest/SofaNettyJaxrsServer.java#L176-L178
rzwitserloot/lombok
src/core/lombok/javac/JavacNode.java
JavacNode.addWarning
public void addWarning(String message, DiagnosticPosition pos) { """ Generates a compiler warning focused on the AST node represented by this node object. """ ast.printMessage(Diagnostic.Kind.WARNING, message, null, pos, false); }
java
public void addWarning(String message, DiagnosticPosition pos) { ast.printMessage(Diagnostic.Kind.WARNING, message, null, pos, false); }
[ "public", "void", "addWarning", "(", "String", "message", ",", "DiagnosticPosition", "pos", ")", "{", "ast", ".", "printMessage", "(", "Diagnostic", ".", "Kind", ".", "WARNING", ",", "message", ",", "null", ",", "pos", ",", "false", ")", ";", "}" ]
Generates a compiler warning focused on the AST node represented by this node object.
[ "Generates", "a", "compiler", "warning", "focused", "on", "the", "AST", "node", "represented", "by", "this", "node", "object", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/JavacNode.java#L276-L278
Pi4J/pi4j
pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/base/DacGpioProviderBase.java
DacGpioProviderBase.setPercentValue
public void setPercentValue(Pin pin, Number percent) { """ Set the current value in a percentage of the available range instead of a raw value. @param pin @param percent percentage value between 0 and 100. """ // validate range if(percent.doubleValue() <= 0){ setValue(pin, getMi...
java
public void setPercentValue(Pin pin, Number percent){ // validate range if(percent.doubleValue() <= 0){ setValue(pin, getMinSupportedValue()); } else if(percent.doubleValue() >= 100){ setValue(pin, getMaxSupportedValue()); } else{ doubl...
[ "public", "void", "setPercentValue", "(", "Pin", "pin", ",", "Number", "percent", ")", "{", "// validate range", "if", "(", "percent", ".", "doubleValue", "(", ")", "<=", "0", ")", "{", "setValue", "(", "pin", ",", "getMinSupportedValue", "(", ")", ")", ...
Set the current value in a percentage of the available range instead of a raw value. @param pin @param percent percentage value between 0 and 100.
[ "Set", "the", "current", "value", "in", "a", "percentage", "of", "the", "available", "range", "instead", "of", "a", "raw", "value", "." ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/base/DacGpioProviderBase.java#L80-L92
cogroo/cogroo4
cogroo-eval/BaselineCogrooAE/src/main/java/cogroo/uima/ae/UimaMultiWordExp.java
UimaMultiWordExp.mergeTokens
private static void mergeTokens(List<Token> grouped, List<Integer> toMerge) { """ /* private static List<Token> groupTokens(List<Token> toks, List<Span> spans) { if (spans == null || spans.size() == 0) { return toks; } List<Token> grouped = new ArrayList<Token>(toks); int lastTokVisited = 0; List<Integer> t...
java
private static void mergeTokens(List<Token> grouped, List<Integer> toMerge) { if (toMerge.size() > 0) { StringBuilder sb = new StringBuilder(); int s = grouped.get(toMerge.get(0)).getSpan().getStart(); int e = grouped.get(toMerge.get(toMerge.size() - 1)).getSpan().getEnd(); for (int i = 0; i...
[ "private", "static", "void", "mergeTokens", "(", "List", "<", "Token", ">", "grouped", ",", "List", "<", "Integer", ">", "toMerge", ")", "{", "if", "(", "toMerge", ".", "size", "(", ")", ">", "0", ")", "{", "StringBuilder", "sb", "=", "new", "StringB...
/* private static List<Token> groupTokens(List<Token> toks, List<Span> spans) { if (spans == null || spans.size() == 0) { return toks; } List<Token> grouped = new ArrayList<Token>(toks); int lastTokVisited = 0; List<Integer> toMerge = new ArrayList<Integer>(); for (int i = 0; i < spans.size(); i++) { Span s = spans.ge...
[ "/", "*", "private", "static", "List<Token", ">", "groupTokens", "(", "List<Token", ">", "toks", "List<Span", ">", "spans", ")", "{", "if", "(", "spans", "==", "null", "||", "spans", ".", "size", "()", "==", "0", ")", "{", "return", "toks", ";", "}",...
train
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/BaselineCogrooAE/src/main/java/cogroo/uima/ae/UimaMultiWordExp.java#L151-L167
wwadge/bonecp
bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java
ConnectionHandle.sendInitSQL
protected static void sendInitSQL(Connection connection, String initSQL) throws SQLException { """ Sends out the SQL as defined in the config upon first init of the connection. @param connection @param initSQL @throws SQLException """ // fetch any configured setup sql. if (initSQL != null){ Statem...
java
protected static void sendInitSQL(Connection connection, String initSQL) throws SQLException{ // fetch any configured setup sql. if (initSQL != null){ Statement stmt = null; try{ stmt = connection.createStatement(); stmt.execute(initSQL); if (testSupport){ // only to aid code coverage, norm...
[ "protected", "static", "void", "sendInitSQL", "(", "Connection", "connection", ",", "String", "initSQL", ")", "throws", "SQLException", "{", "// fetch any configured setup sql.\r", "if", "(", "initSQL", "!=", "null", ")", "{", "Statement", "stmt", "=", "null", ";"...
Sends out the SQL as defined in the config upon first init of the connection. @param connection @param initSQL @throws SQLException
[ "Sends", "out", "the", "SQL", "as", "defined", "in", "the", "config", "upon", "first", "init", "of", "the", "connection", "." ]
train
https://github.com/wwadge/bonecp/blob/74bc3287025fc137ca28909f0f7693edae37a15d/bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java#L351-L367
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedSum
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { """ Objective values are multiplied by weights and summed. Weights should always be positive. @param solutionsList A list of solutions. @param weights Positive constants by which objectives are summed. ...
java
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double sum = weights[0] * solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += weights[i] * solution.getObjective(i); ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedSum", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "d...
Objective values are multiplied by weights and summed. Weights should always be positive. @param solutionsList A list of solutions. @param weights Positive constants by which objectives are summed.
[ "Objective", "values", "are", "multiplied", "by", "weights", "and", "summed", ".", "Weights", "should", "always", "be", "positive", "." ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L128-L137
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/replicator/ReplicationInternal.java
ReplicationInternal.refreshRemoteCheckpointDoc
@InterfaceAudience.Private private void refreshRemoteCheckpointDoc() { """ Variant of -fetchRemoveCheckpointDoc that's used while replication is running, to reload the checkpoint to get its current revision number, if there was an error saving it. """ Log.i(Log.TAG_SYNC, "%s: Refreshing remote che...
java
@InterfaceAudience.Private private void refreshRemoteCheckpointDoc() { Log.i(Log.TAG_SYNC, "%s: Refreshing remote checkpoint to get its _rev...", this); Future future = sendAsyncRequest("GET", "_local/" + remoteCheckpointDocID(), null, new RemoteRequestCompletion() { @Override ...
[ "@", "InterfaceAudience", ".", "Private", "private", "void", "refreshRemoteCheckpointDoc", "(", ")", "{", "Log", ".", "i", "(", "Log", ".", "TAG_SYNC", ",", "\"%s: Refreshing remote checkpoint to get its _rev...\"", ",", "this", ")", ";", "Future", "future", "=", ...
Variant of -fetchRemoveCheckpointDoc that's used while replication is running, to reload the checkpoint to get its current revision number, if there was an error saving it.
[ "Variant", "of", "-", "fetchRemoveCheckpointDoc", "that", "s", "used", "while", "replication", "is", "running", "to", "reload", "the", "checkpoint", "to", "get", "its", "current", "revision", "number", "if", "there", "was", "an", "error", "saving", "it", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/replicator/ReplicationInternal.java#L922-L943
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java
ExecArgList.fromStrings
public static ExecArgList fromStrings(List<String> strings, boolean quoted) { """ @return Create an ExecArgList from a list of strings @param strings the strings @param quoted whether they are each quoted """ return builder().args(strings, quoted).build(); }
java
public static ExecArgList fromStrings(List<String> strings, boolean quoted) { return builder().args(strings, quoted).build(); }
[ "public", "static", "ExecArgList", "fromStrings", "(", "List", "<", "String", ">", "strings", ",", "boolean", "quoted", ")", "{", "return", "builder", "(", ")", ".", "args", "(", "strings", ",", "quoted", ")", ".", "build", "(", ")", ";", "}" ]
@return Create an ExecArgList from a list of strings @param strings the strings @param quoted whether they are each quoted
[ "@return", "Create", "an", "ExecArgList", "from", "a", "list", "of", "strings" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java#L76-L78
xebia-france/xebia-servlet-extras
src/main/java/fr/xebia/servlet/filter/SecuredRemoteAddressFilter.java
SecuredRemoteAddressFilter.commaDelimitedListToPatternArray
protected static Pattern[] commaDelimitedListToPatternArray(String commaDelimitedPatterns) { """ Convert a given comma delimited list of regular expressions into an array of compiled {@link Pattern} """ String[] patterns = commaDelimitedListToStringArray(commaDelimitedPatterns); List<Pattern...
java
protected static Pattern[] commaDelimitedListToPatternArray(String commaDelimitedPatterns) { String[] patterns = commaDelimitedListToStringArray(commaDelimitedPatterns); List<Pattern> patternsList = new ArrayList<Pattern>(); for (String pattern : patterns) { try { ...
[ "protected", "static", "Pattern", "[", "]", "commaDelimitedListToPatternArray", "(", "String", "commaDelimitedPatterns", ")", "{", "String", "[", "]", "patterns", "=", "commaDelimitedListToStringArray", "(", "commaDelimitedPatterns", ")", ";", "List", "<", "Pattern", ...
Convert a given comma delimited list of regular expressions into an array of compiled {@link Pattern}
[ "Convert", "a", "given", "comma", "delimited", "list", "of", "regular", "expressions", "into", "an", "array", "of", "compiled", "{" ]
train
https://github.com/xebia-france/xebia-servlet-extras/blob/b263636fc78f8794dde57d92b835edb5e95ce379/src/main/java/fr/xebia/servlet/filter/SecuredRemoteAddressFilter.java#L123-L134
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/ui/A_CmsToolbarOptionButton.java
A_CmsToolbarOptionButton.createOptionForElement
public CmsElementOptionButton createOptionForElement(CmsContainerPageElementPanel element) { """ Creates an element options button associated with this button and assigns the click-handler.<p> If this method returns null, no option button should be shown.<p> @param element the element to create the button for ...
java
public CmsElementOptionButton createOptionForElement(CmsContainerPageElementPanel element) { if (!isOptionAvailable(element)) { return null; } CmsElementOptionButton button = new CmsElementOptionButton(this, element); button.addClickHandler(m_elementClickHandler); re...
[ "public", "CmsElementOptionButton", "createOptionForElement", "(", "CmsContainerPageElementPanel", "element", ")", "{", "if", "(", "!", "isOptionAvailable", "(", "element", ")", ")", "{", "return", "null", ";", "}", "CmsElementOptionButton", "button", "=", "new", "C...
Creates an element options button associated with this button and assigns the click-handler.<p> If this method returns null, no option button should be shown.<p> @param element the element to create the button for @return the created button
[ "Creates", "an", "element", "options", "button", "associated", "with", "this", "button", "and", "assigns", "the", "click", "-", "handler", ".", "<p", ">", "If", "this", "method", "returns", "null", "no", "option", "button", "should", "be", "shown", ".", "<...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/ui/A_CmsToolbarOptionButton.java#L79-L87
UrielCh/ovh-java-sdk
ovh-java-sdk-cdndedicated/src/main/java/net/minidev/ovh/api/ApiOvhCdndedicated.java
ApiOvhCdndedicated.serviceName_domains_domain_PUT
public void serviceName_domains_domain_PUT(String serviceName, String domain, OvhDomain body) throws IOException { """ Alter this object properties REST: PUT /cdn/dedicated/{serviceName}/domains/{domain} @param body [required] New object properties @param serviceName [required] The internal name of your CDN o...
java
public void serviceName_domains_domain_PUT(String serviceName, String domain, OvhDomain body) throws IOException { String qPath = "/cdn/dedicated/{serviceName}/domains/{domain}"; StringBuilder sb = path(qPath, serviceName, domain); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_domains_domain_PUT", "(", "String", "serviceName", ",", "String", "domain", ",", "OvhDomain", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cdn/dedicated/{serviceName}/domains/{domain}\"", ";", "StringBuilder", "sb",...
Alter this object properties REST: PUT /cdn/dedicated/{serviceName}/domains/{domain} @param body [required] New object properties @param serviceName [required] The internal name of your CDN offer @param domain [required] Domain of this object
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cdndedicated/src/main/java/net/minidev/ovh/api/ApiOvhCdndedicated.java#L369-L373
knowm/XChange
xchange-coinsuper/src/main/java/org/knowm/xchange/coinsuper/CoinsuperAdapters.java
CoinsuperAdapters.adaptOrder
public static CoinsuperGenericOrder adaptOrder(String orderId, OrderList orderList) { """ There is no method to discern market versus limit order type - so this returns a generic GenericOrder as a status @param @return """ BigDecimal averagePrice = new BigDecimal(orderList.getPriceLimit()); BigDec...
java
public static CoinsuperGenericOrder adaptOrder(String orderId, OrderList orderList) { BigDecimal averagePrice = new BigDecimal(orderList.getPriceLimit()); BigDecimal cumulativeAmount = new BigDecimal(orderList.getQuantity()); BigDecimal totalFee = new BigDecimal(orderList.getFee()); BigDecimal amount =...
[ "public", "static", "CoinsuperGenericOrder", "adaptOrder", "(", "String", "orderId", ",", "OrderList", "orderList", ")", "{", "BigDecimal", "averagePrice", "=", "new", "BigDecimal", "(", "orderList", ".", "getPriceLimit", "(", ")", ")", ";", "BigDecimal", "cumulat...
There is no method to discern market versus limit order type - so this returns a generic GenericOrder as a status @param @return
[ "There", "is", "no", "method", "to", "discern", "market", "versus", "limit", "order", "type", "-", "so", "this", "returns", "a", "generic", "GenericOrder", "as", "a", "status" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinsuper/src/main/java/org/knowm/xchange/coinsuper/CoinsuperAdapters.java#L162-L194
alkacon/opencms-core
src/org/opencms/ui/sitemap/CmsSitemapExtension.java
CmsSitemapExtension.showInfoHeader
public void showInfoHeader(String title, String description, String path, String locale, String iconClass) { """ Shows an info header in the locale-header-container element.<p> @param title the title @param description the description @param path the path @param locale the locale @param iconClass the icon c...
java
public void showInfoHeader(String title, String description, String path, String locale, String iconClass) { getRpcProxy(I_CmsSitemapClientRpc.class).showInfoHeader(title, description, path, locale, iconClass); }
[ "public", "void", "showInfoHeader", "(", "String", "title", ",", "String", "description", ",", "String", "path", ",", "String", "locale", ",", "String", "iconClass", ")", "{", "getRpcProxy", "(", "I_CmsSitemapClientRpc", ".", "class", ")", ".", "showInfoHeader",...
Shows an info header in the locale-header-container element.<p> @param title the title @param description the description @param path the path @param locale the locale @param iconClass the icon class
[ "Shows", "an", "info", "header", "in", "the", "locale", "-", "header", "-", "container", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/sitemap/CmsSitemapExtension.java#L369-L372
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java
PassthroughResourcesImpl.putRequest
public String putRequest(String endpoint, String payload, HashMap<String, Object> parameters) throws SmartsheetException { """ Issue an HTTP PUT request. @param endpoint the API endpoint @param payload a JSON payload string @param parameters optional list of resource parameters @return a JSON response strin...
java
public String putRequest(String endpoint, String payload, HashMap<String, Object> parameters) throws SmartsheetException { Util.throwIfNull(payload); return passthroughRequest(HttpMethod.PUT, endpoint, payload, parameters); }
[ "public", "String", "putRequest", "(", "String", "endpoint", ",", "String", "payload", ",", "HashMap", "<", "String", ",", "Object", ">", "parameters", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "payload", ")", ";", "return", ...
Issue an HTTP PUT request. @param endpoint the API endpoint @param payload a JSON payload string @param parameters optional list of resource parameters @return a JSON response string @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestException if there is any problem with th...
[ "Issue", "an", "HTTP", "PUT", "request", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java#L97-L100
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_bandwidth_GET
public ArrayList<String> dedicated_server_serviceName_bandwidth_GET(String serviceName, OvhBandwidthOrderEnum bandwidth, OvhBandwidthOrderTypeEnum type) throws IOException { """ Get allowed durations for 'bandwidth' option REST: GET /order/dedicated/server/{serviceName}/bandwidth @param bandwidth [required] Ba...
java
public ArrayList<String> dedicated_server_serviceName_bandwidth_GET(String serviceName, OvhBandwidthOrderEnum bandwidth, OvhBandwidthOrderTypeEnum type) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/bandwidth"; StringBuilder sb = path(qPath, serviceName); query(sb, "bandwidth", bandwi...
[ "public", "ArrayList", "<", "String", ">", "dedicated_server_serviceName_bandwidth_GET", "(", "String", "serviceName", ",", "OvhBandwidthOrderEnum", "bandwidth", ",", "OvhBandwidthOrderTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order...
Get allowed durations for 'bandwidth' option REST: GET /order/dedicated/server/{serviceName}/bandwidth @param bandwidth [required] Bandwidth to allocate @param type [required] bandwidth type @param serviceName [required] The internal name of your dedicated server
[ "Get", "allowed", "durations", "for", "bandwidth", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2537-L2544
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ExceptionUtils.java
ExceptionUtils.validateProductMatches
@SuppressWarnings("rawtypes") static String validateProductMatches(String feature, List productMatchers, File installDir, boolean installingAsset) { """ Calls validate product matches with null dependency @param feature @param productMatchers @param installDir @param installingAsset @return """ ...
java
@SuppressWarnings("rawtypes") static String validateProductMatches(String feature, List productMatchers, File installDir, boolean installingAsset) { return validateProductMatches(feature, null, productMatchers, installDir, installingAsset); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "static", "String", "validateProductMatches", "(", "String", "feature", ",", "List", "productMatchers", ",", "File", "installDir", ",", "boolean", "installingAsset", ")", "{", "return", "validateProductMatches", "(", ...
Calls validate product matches with null dependency @param feature @param productMatchers @param installDir @param installingAsset @return
[ "Calls", "validate", "product", "matches", "with", "null", "dependency" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ExceptionUtils.java#L473-L476
ontop/ontop
mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/validation/impl/MappingOntologyComplianceValidatorImpl.java
MappingOntologyComplianceValidatorImpl.validate
@Override public void validate(MappingWithProvenance mapping, Ontology ontology) throws MappingOntologyMismatchException { """ Requires the annotation, data and object properties to be clearly distinguished (disjoint sets, according to the OWL semantics) Be careful if you are using a T-box boot...
java
@Override public void validate(MappingWithProvenance mapping, Ontology ontology) throws MappingOntologyMismatchException { ImmutableMultimap<IRI, Datatype> datatypeMap = computeDataTypeMap(ontology.tbox()); for (Map.Entry<IQ, PPMappingAssertionProvenance> entry : mapping.getProvenanceM...
[ "@", "Override", "public", "void", "validate", "(", "MappingWithProvenance", "mapping", ",", "Ontology", "ontology", ")", "throws", "MappingOntologyMismatchException", "{", "ImmutableMultimap", "<", "IRI", ",", "Datatype", ">", "datatypeMap", "=", "computeDataTypeMap", ...
Requires the annotation, data and object properties to be clearly distinguished (disjoint sets, according to the OWL semantics) Be careful if you are using a T-box bootstrapped from the mapping It is NOT assumed that the declared vocabulary contains information on every RDF predicate used in the mapping.
[ "Requires", "the", "annotation", "data", "and", "object", "properties", "to", "be", "clearly", "distinguished", "(", "disjoint", "sets", "according", "to", "the", "OWL", "semantics", ")" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/validation/impl/MappingOntologyComplianceValidatorImpl.java#L67-L76
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java
ControlBean.getSuperEventSets
private void getSuperEventSets(Class eventSet, List<Class> superEventSets) { """ Finds all of the EventSets extended by the input EventSet, and adds them to the provided list. @param eventSet @param superEventSets """ Class[] superInterfaces = eventSet.getInterfaces(); if (superInterfaces !=...
java
private void getSuperEventSets(Class eventSet, List<Class> superEventSets) { Class[] superInterfaces = eventSet.getInterfaces(); if (superInterfaces != null) { for (int i=0; i < superInterfaces.length; i++) { Class superInterface = superInterfaces[i]; ...
[ "private", "void", "getSuperEventSets", "(", "Class", "eventSet", ",", "List", "<", "Class", ">", "superEventSets", ")", "{", "Class", "[", "]", "superInterfaces", "=", "eventSet", ".", "getInterfaces", "(", ")", ";", "if", "(", "superInterfaces", "!=", "nul...
Finds all of the EventSets extended by the input EventSet, and adds them to the provided list. @param eventSet @param superEventSets
[ "Finds", "all", "of", "the", "EventSets", "extended", "by", "the", "input", "EventSet", "and", "adds", "them", "to", "the", "provided", "list", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java#L524-L541
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java
B2BAccountUrl.deleteB2BAccountAttributeUrl
public static MozuUrl deleteB2BAccountAttributeUrl(Integer accountId, String attributeFQN) { """ Get Resource Url for DeleteB2BAccountAttribute @param accountId Unique identifier of the customer account. @param attributeFQN Fully qualified name for an attribute. @return String Resource Url """ UrlFormat...
java
public static MozuUrl deleteB2BAccountAttributeUrl(Integer accountId, String attributeFQN) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("attributeFQN", attributeFQN); ret...
[ "public", "static", "MozuUrl", "deleteB2BAccountAttributeUrl", "(", "Integer", "accountId", ",", "String", "attributeFQN", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}\"", ")"...
Get Resource Url for DeleteB2BAccountAttribute @param accountId Unique identifier of the customer account. @param attributeFQN Fully qualified name for an attribute. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteB2BAccountAttribute" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java#L258-L264
apptik/jus
rx-jus/src/main/java/io/apptik/comm/jus/rx/queue/RxRequestQueue.java
RxRequestQueue.markerObservable
public static Observable<MarkerEvent> markerObservable( RequestQueue queue, RequestQueue.RequestFilter filter) { """ Returns {@link Observable} of the markers coming as {@link MarkerEvent} @param queue the {@link RequestQueue} to listen to @param filter the {@link io.apptik.comm.jus.RequestQueue.R...
java
public static Observable<MarkerEvent> markerObservable( RequestQueue queue, RequestQueue.RequestFilter filter) { return Observable.create(new QRequestMarkerOnSubscribe(queue, filter)); }
[ "public", "static", "Observable", "<", "MarkerEvent", ">", "markerObservable", "(", "RequestQueue", "queue", ",", "RequestQueue", ".", "RequestFilter", "filter", ")", "{", "return", "Observable", ".", "create", "(", "new", "QRequestMarkerOnSubscribe", "(", "queue", ...
Returns {@link Observable} of the markers coming as {@link MarkerEvent} @param queue the {@link RequestQueue} to listen to @param filter the {@link io.apptik.comm.jus.RequestQueue.RequestFilter} which will filter the requests to hook to. Set null for no filtering. @return {@link Observable} of markers
[ "Returns", "{", "@link", "Observable", "}", "of", "the", "markers", "coming", "as", "{", "@link", "MarkerEvent", "}" ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/rx-jus/src/main/java/io/apptik/comm/jus/rx/queue/RxRequestQueue.java#L89-L92
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/dataobjects/Dataframe.java
Dataframe._unsafe_set
public Record _unsafe_set(Integer rId, Record r) { """ Sets the record in a particular position in the dataset, WITHOUT updating the internal meta-info and returns the previous value (null if not existed). This method is similar to set() and it allows quick updates on the dataset. Nevertheless it is not advised...
java
public Record _unsafe_set(Integer rId, Record r) { //move ahead the next id data.atomicNextAvailableRecordId.updateAndGet(x -> (x<rId)?Math.max(x+1,rId+1):x); return data.records.put(rId, r); }
[ "public", "Record", "_unsafe_set", "(", "Integer", "rId", ",", "Record", "r", ")", "{", "//move ahead the next id", "data", ".", "atomicNextAvailableRecordId", ".", "updateAndGet", "(", "x", "->", "(", "x", "<", "rId", ")", "?", "Math", ".", "max", "(", "x...
Sets the record in a particular position in the dataset, WITHOUT updating the internal meta-info and returns the previous value (null if not existed). This method is similar to set() and it allows quick updates on the dataset. Nevertheless it is not advised to use this method because unless you explicitly call the reca...
[ "Sets", "the", "record", "in", "a", "particular", "position", "in", "the", "dataset", "WITHOUT", "updating", "the", "internal", "meta", "-", "info", "and", "returns", "the", "previous", "value", "(", "null", "if", "not", "existed", ")", ".", "This", "metho...
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/dataobjects/Dataframe.java#L870-L875
liyiorg/weixin-popular
src/main/java/weixin/popular/api/SnsAPI.java
SnsAPI.connectOauth2Authorize
public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state,String component_appid) { """ 生成网页授权 URL (第三方平台开发) @param appid appid @param redirect_uri 自动URLEncoder @param snsapi_userinfo snsapi_userinfo @param state 可以为空 @param component_appid 第三方平台开发,可以为空...
java
public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state,String component_appid){ try { StringBuilder sb = new StringBuilder(); sb.append(OPEN_URI + "/connect/oauth2/authorize?") .append("appid=").append(appid) .append("&redirect_uri=").append(URLEn...
[ "public", "static", "String", "connectOauth2Authorize", "(", "String", "appid", ",", "String", "redirect_uri", ",", "boolean", "snsapi_userinfo", ",", "String", "state", ",", "String", "component_appid", ")", "{", "try", "{", "StringBuilder", "sb", "=", "new", "...
生成网页授权 URL (第三方平台开发) @param appid appid @param redirect_uri 自动URLEncoder @param snsapi_userinfo snsapi_userinfo @param state 可以为空 @param component_appid 第三方平台开发,可以为空。 服务方的appid,在申请创建公众号服务成功后,可在公众号服务详情页找到 @return url
[ "生成网页授权", "URL", "(", "第三方平台开发", ")" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SnsAPI.java#L182-L200
groupby/api-java
src/main/java/com/groupbyinc/api/Query.java
Query.addValueRefinement
public Query addValueRefinement(String navigationName, String value) { """ <code> Add a value refinement. Takes a refinement name and a value. </code> @param navigationName The name of the navigation @param value The refinement value """ return addValueRefinement(navigationName, value, false); }
java
public Query addValueRefinement(String navigationName, String value) { return addValueRefinement(navigationName, value, false); }
[ "public", "Query", "addValueRefinement", "(", "String", "navigationName", ",", "String", "value", ")", "{", "return", "addValueRefinement", "(", "navigationName", ",", "value", ",", "false", ")", ";", "}" ]
<code> Add a value refinement. Takes a refinement name and a value. </code> @param navigationName The name of the navigation @param value The refinement value
[ "<code", ">", "Add", "a", "value", "refinement", ".", "Takes", "a", "refinement", "name", "and", "a", "value", ".", "<", "/", "code", ">" ]
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/api/Query.java#L771-L773
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/AsyncTableEntryReader.java
AsyncTableEntryReader.readKey
static AsyncTableEntryReader<TableKey> readKey(long keyVersion, EntrySerializer serializer, TimeoutTimer timer) { """ Creates a new {@link AsyncTableEntryReader} that can be used to read a key. @param keyVersion The version of the {@link TableKey} that is located at this position. This will be used for constru...
java
static AsyncTableEntryReader<TableKey> readKey(long keyVersion, EntrySerializer serializer, TimeoutTimer timer) { return new KeyReader(keyVersion, serializer, timer); }
[ "static", "AsyncTableEntryReader", "<", "TableKey", ">", "readKey", "(", "long", "keyVersion", ",", "EntrySerializer", "serializer", ",", "TimeoutTimer", "timer", ")", "{", "return", "new", "KeyReader", "(", "keyVersion", ",", "serializer", ",", "timer", ")", ";...
Creates a new {@link AsyncTableEntryReader} that can be used to read a key. @param keyVersion The version of the {@link TableKey} that is located at this position. This will be used for constructing the result and has no bearing on the reading/matching logic. @param serializer The {@link EntrySerializer} to use for de...
[ "Creates", "a", "new", "{", "@link", "AsyncTableEntryReader", "}", "that", "can", "be", "used", "to", "read", "a", "key", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/AsyncTableEntryReader.java#L105-L107
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java
ConversionManager.convertCompatible
protected ConversionStatus convertCompatible(String rawString, Class<?> type) { """ Converts from String based on isAssignableFrom or instanceof @param rawString @param type @return ConversionStatus<T> whether a converter is found and the converted value """ ConversionStatus status = new Conversio...
java
protected ConversionStatus convertCompatible(String rawString, Class<?> type) { ConversionStatus status = new ConversionStatus(); for (PriorityConverter con : converters.getAll()) { Type key = con.getType(); if (key instanceof Class) { Class<?> clazz = (Class<?>) ...
[ "protected", "ConversionStatus", "convertCompatible", "(", "String", "rawString", ",", "Class", "<", "?", ">", "type", ")", "{", "ConversionStatus", "status", "=", "new", "ConversionStatus", "(", ")", ";", "for", "(", "PriorityConverter", "con", ":", "converters...
Converts from String based on isAssignableFrom or instanceof @param rawString @param type @return ConversionStatus<T> whether a converter is found and the converted value
[ "Converts", "from", "String", "based", "on", "isAssignableFrom", "or", "instanceof" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java#L213-L234
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.getDouble
public Double getDouble(String name, boolean strict) throws JsonException { """ Returns the value mapped by {@code name} if it exists and is a double or can be coerced to a double, or throws otherwise. @throws JsonException if the mapping doesn't exist or cannot be coerced to a double. """ JsonEle...
java
public Double getDouble(String name, boolean strict) throws JsonException { JsonElement el = get(name); Double res = null; if (strict && !el.isNumber()) { throw Util.typeMismatch(name, el, "double", true); } if (el.isNumber()) { res = el.asDouble(); ...
[ "public", "Double", "getDouble", "(", "String", "name", ",", "boolean", "strict", ")", "throws", "JsonException", "{", "JsonElement", "el", "=", "get", "(", "name", ")", ";", "Double", "res", "=", "null", ";", "if", "(", "strict", "&&", "!", "el", ".",...
Returns the value mapped by {@code name} if it exists and is a double or can be coerced to a double, or throws otherwise. @throws JsonException if the mapping doesn't exist or cannot be coerced to a double.
[ "Returns", "the", "value", "mapped", "by", "{", "@code", "name", "}", "if", "it", "exists", "and", "is", "a", "double", "or", "can", "be", "coerced", "to", "a", "double", "or", "throws", "otherwise", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L414-L429
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/smtp_server.java
smtp_server.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> """ smtp_server_responses result = (smtp_server_responses) service.get_payl...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { smtp_server_responses result = (smtp_server_responses) service.get_payload_formatter().string_to_resource(smtp_server_responses.class, response); if(result.errorcode != 0) { if (result.errorcode =...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "smtp_server_responses", "result", "=", "(", "smtp_server_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/smtp_server.java#L431-L448
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java
AbstractRedisStorage.releaseAcquiredTrigger
public void releaseAcquiredTrigger(OperableTrigger trigger, T jedis) throws JobPersistenceException { """ Inform the <code>JobStore</code> that the scheduler no longer plans to fire the given <code>Trigger</code>, that it had previously acquired (reserved). @param trigger the trigger to be released @param jedi...
java
public void releaseAcquiredTrigger(OperableTrigger trigger, T jedis) throws JobPersistenceException { final String triggerHashKey = redisSchema.triggerHashKey(trigger.getKey()); if(jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.ACQUIRED), triggerHashKey) != null){ if(trigger.getN...
[ "public", "void", "releaseAcquiredTrigger", "(", "OperableTrigger", "trigger", ",", "T", "jedis", ")", "throws", "JobPersistenceException", "{", "final", "String", "triggerHashKey", "=", "redisSchema", ".", "triggerHashKey", "(", "trigger", ".", "getKey", "(", ")", ...
Inform the <code>JobStore</code> that the scheduler no longer plans to fire the given <code>Trigger</code>, that it had previously acquired (reserved). @param trigger the trigger to be released @param jedis a thread-safe Redis connection
[ "Inform", "the", "<code", ">", "JobStore<", "/", "code", ">", "that", "the", "scheduler", "no", "longer", "plans", "to", "fire", "the", "given", "<code", ">", "Trigger<", "/", "code", ">", "that", "it", "had", "previously", "acquired", "(", "reserved", "...
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java#L870-L880
yatechorg/jedis-utils
src/main/java/org/yatech/jedis/collections/JedisList.java
JedisList.indexOf
public long indexOf(final String element) { """ Find the index of the first matching element in the list @param element the element value to find @return the index of the first matching element, or <code>-1</code> if none found """ return doWithJedis(new JedisCallable<Long>() { @Override ...
java
public long indexOf(final String element) { return doWithJedis(new JedisCallable<Long>() { @Override public Long call(Jedis jedis) { return doIndexOf(jedis, element); } }); }
[ "public", "long", "indexOf", "(", "final", "String", "element", ")", "{", "return", "doWithJedis", "(", "new", "JedisCallable", "<", "Long", ">", "(", ")", "{", "@", "Override", "public", "Long", "call", "(", "Jedis", "jedis", ")", "{", "return", "doInde...
Find the index of the first matching element in the list @param element the element value to find @return the index of the first matching element, or <code>-1</code> if none found
[ "Find", "the", "index", "of", "the", "first", "matching", "element", "in", "the", "list" ]
train
https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisList.java#L189-L196
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DirectCompactDoublesSketch.java
DirectCompactDoublesSketch.createFromUpdateSketch
static DirectCompactDoublesSketch createFromUpdateSketch(final UpdateDoublesSketch sketch, final WritableMemory dstMem) { """ Converts the given UpdateDoublesSketch to this compact form. @param sketch the sketch to convert @param dstMem the WritableMem...
java
static DirectCompactDoublesSketch createFromUpdateSketch(final UpdateDoublesSketch sketch, final WritableMemory dstMem) { final long memCap = dstMem.getCapacity(); final int k = sketch.getK(); final long n = sketch.getN(); checkDirectMemCapacity...
[ "static", "DirectCompactDoublesSketch", "createFromUpdateSketch", "(", "final", "UpdateDoublesSketch", "sketch", ",", "final", "WritableMemory", "dstMem", ")", "{", "final", "long", "memCap", "=", "dstMem", ".", "getCapacity", "(", ")", ";", "final", "int", "k", "...
Converts the given UpdateDoublesSketch to this compact form. @param sketch the sketch to convert @param dstMem the WritableMemory to use for the destination @return a DirectCompactDoublesSketch created from an UpdateDoublesSketch
[ "Converts", "the", "given", "UpdateDoublesSketch", "to", "this", "compact", "form", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DirectCompactDoublesSketch.java#L64-L115
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java
DefaultInstalledExtensionRepository.addInstalledExtension
private DefaultInstalledExtension addInstalledExtension(LocalExtension localExtension, String namespace, boolean valid) { """ Register a newly installed extension in backward dependencies map. @param localExtension the local extension to register @param namespace the namespace @param valid is the exte...
java
private DefaultInstalledExtension addInstalledExtension(LocalExtension localExtension, String namespace, boolean valid) { DefaultInstalledExtension installedExtension = this.extensions.get(localExtension.getId()); if (installedExtension == null) { installedExtension = new Default...
[ "private", "DefaultInstalledExtension", "addInstalledExtension", "(", "LocalExtension", "localExtension", ",", "String", "namespace", ",", "boolean", "valid", ")", "{", "DefaultInstalledExtension", "installedExtension", "=", "this", ".", "extensions", ".", "get", "(", "...
Register a newly installed extension in backward dependencies map. @param localExtension the local extension to register @param namespace the namespace @param valid is the extension valid @return the new {@link DefaultInstalledExtension}
[ "Register", "a", "newly", "installed", "extension", "in", "backward", "dependencies", "map", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java#L529-L543
grpc/grpc-java
api/src/main/java/io/grpc/CallOptions.java
CallOptions.withOption
public <T> CallOptions withOption(Key<T> key, T value) { """ Sets a custom option. Any existing value for the key is overwritten. @param key The option key @param value The option value. @since 1.13.0 """ Preconditions.checkNotNull(key, "key"); Preconditions.checkNotNull(value, "value"); Call...
java
public <T> CallOptions withOption(Key<T> key, T value) { Preconditions.checkNotNull(key, "key"); Preconditions.checkNotNull(value, "value"); CallOptions newOptions = new CallOptions(this); int existingIdx = -1; for (int i = 0; i < customOptions.length; i++) { if (key.equals(customOptions[i][0...
[ "public", "<", "T", ">", "CallOptions", "withOption", "(", "Key", "<", "T", ">", "key", ",", "T", "value", ")", "{", "Preconditions", ".", "checkNotNull", "(", "key", ",", "\"key\"", ")", ";", "Preconditions", ".", "checkNotNull", "(", "value", ",", "\...
Sets a custom option. Any existing value for the key is overwritten. @param key The option key @param value The option value. @since 1.13.0
[ "Sets", "a", "custom", "option", ".", "Any", "existing", "value", "for", "the", "key", "is", "overwritten", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/CallOptions.java#L316-L341
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/TextBox.java
TextBox.drawContent
public void drawContent(Graphics2D g) { """ Draw the text content of this box (no subboxes) @param g the graphics context to draw on """ //top left corner int x = absbounds.x; int y = absbounds.y; //Draw the string if (textEnd > textStart) { String ...
java
public void drawContent(Graphics2D g) { //top left corner int x = absbounds.x; int y = absbounds.y; //Draw the string if (textEnd > textStart) { String t = text.substring(textStart, textEnd); Shape oldclip = g.getClip(); if (clipbl...
[ "public", "void", "drawContent", "(", "Graphics2D", "g", ")", "{", "//top left corner", "int", "x", "=", "absbounds", ".", "x", ";", "int", "y", "=", "absbounds", ".", "y", ";", "//Draw the string", "if", "(", "textEnd", ">", "textStart", ")", "{", "Stri...
Draw the text content of this box (no subboxes) @param g the graphics context to draw on
[ "Draw", "the", "text", "content", "of", "this", "box", "(", "no", "subboxes", ")" ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/TextBox.java#L1041-L1063
Faylixe/googlecodejam-client
src/main/java/fr/faylixe/googlecodejam/client/Round.java
Round.fromIdentifier
public static Round fromIdentifier(final String identifier, final String cookie) throws GeneralSecurityException, IOException { """ <p>Static factory method that creates a round from the given <tt>identifier</tt>.</p> @param identifier Round id to use. @param cookie Cookie value to use for retrieving contest....
java
public static Round fromIdentifier(final String identifier, final String cookie) throws GeneralSecurityException, IOException { final StringBuilder builder = new StringBuilder(); builder .append(CODEJAM_PATH) .append(identifier) .append(ROUND_PREFIX); return fromURL(builder.toString(), cookie); }
[ "public", "static", "Round", "fromIdentifier", "(", "final", "String", "identifier", ",", "final", "String", "cookie", ")", "throws", "GeneralSecurityException", ",", "IOException", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", "...
<p>Static factory method that creates a round from the given <tt>identifier</tt>.</p> @param identifier Round id to use. @param cookie Cookie value to use for retrieving contest. @return Created round. @throws IOException If any error occurs while retrieving round information. @throws GeneralSecurityException If any e...
[ "<p", ">", "Static", "factory", "method", "that", "creates", "a", "round", "from", "the", "given", "<tt", ">", "identifier<", "/", "tt", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/Faylixe/googlecodejam-client/blob/84a5fed4e049dca48994dc3f70213976aaff4bd3/src/main/java/fr/faylixe/googlecodejam/client/Round.java#L101-L108
DataArt/CalculationEngine
calculation-engine/engine-model/src/main/java/com/dataart/spreadsheetanalytics/model/CellValue.java
CellValue.from
public static ICellValue from(Object o) { """ Creates new instance of {@link CellValue} with given argument. Supported types: null, String, Double, Boolean. """ if (o == null) { return BLANK; } else if (o instanceof String) { return new CellValue(o, String.class); } else if (o insta...
java
public static ICellValue from(Object o) { if (o == null) { return BLANK; } else if (o instanceof String) { return new CellValue(o, String.class); } else if (o instanceof Double) { return new CellValue(o, Double.class); } else if (o instanceof Integer) { return new CellValue(new Doubl...
[ "public", "static", "ICellValue", "from", "(", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "BLANK", ";", "}", "else", "if", "(", "o", "instanceof", "String", ")", "{", "return", "new", "CellValue", "(", "o", ",", "Str...
Creates new instance of {@link CellValue} with given argument. Supported types: null, String, Double, Boolean.
[ "Creates", "new", "instance", "of", "{" ]
train
https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-model/src/main/java/com/dataart/spreadsheetanalytics/model/CellValue.java#L53-L61
eyp/serfj
src/main/java/net/sf/serfj/ResponseHelper.java
ResponseHelper.renderPage
public void renderPage(String resource, String page) throws IOException { """ Renders a page from a resource. @param resource The name of the resource (bank, account, etc...). It must exists below /views directory. @param page The page can have an extension or not. If it doesn't have an extension, the fram...
java
public void renderPage(String resource, String page) throws IOException { // If page comes with an extension String path = "/" + this.viewsPath + "/"; if (resource != null) { path += resource + "/"; } if (page.indexOf('.') > 1) { this.requestedPage = path ...
[ "public", "void", "renderPage", "(", "String", "resource", ",", "String", "page", ")", "throws", "IOException", "{", "// If page comes with an extension", "String", "path", "=", "\"/\"", "+", "this", ".", "viewsPath", "+", "\"/\"", ";", "if", "(", "resource", ...
Renders a page from a resource. @param resource The name of the resource (bank, account, etc...). It must exists below /views directory. @param page The page can have an extension or not. If it doesn't have an extension, the framework first looks for page.jsp, then with .html or .htm extension. @throws IOException if ...
[ "Renders", "a", "page", "from", "a", "resource", "." ]
train
https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/ResponseHelper.java#L153-L165
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlProfileHandlerController.java
AbstractSamlProfileHandlerController.buildRedirectUrlByRequestedAuthnContext
protected String buildRedirectUrlByRequestedAuthnContext(final String initialUrl, final AuthnRequest authnRequest, final HttpServletRequest request) { """ Build redirect url by requested authn context. @param initialUrl the initial url @param authnRequest the authn request @param request the request @...
java
protected String buildRedirectUrlByRequestedAuthnContext(final String initialUrl, final AuthnRequest authnRequest, final HttpServletRequest request) { val authenticationContextClassMappings = samlProfileHandlerConfigurationContext.getCasProperties() .getAuthn().getSamlIdp().getAuthenticationContextC...
[ "protected", "String", "buildRedirectUrlByRequestedAuthnContext", "(", "final", "String", "initialUrl", ",", "final", "AuthnRequest", "authnRequest", ",", "final", "HttpServletRequest", "request", ")", "{", "val", "authenticationContextClassMappings", "=", "samlProfileHandler...
Build redirect url by requested authn context. @param initialUrl the initial url @param authnRequest the authn request @param request the request @return the redirect url
[ "Build", "redirect", "url", "by", "requested", "authn", "context", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlProfileHandlerController.java#L249-L274
pawelprazak/java-extended
guava/src/main/java/com/bluecatcode/common/contract/Checks.java
Checks.checkMatches
@Beta public static void checkMatches(String reference, Pattern pattern) { """ Performs check with the regular expression pattern. @param reference reference to check @param pattern the regular expression pattern @throws IllegalArgumentException if the {@code reference} doesn't match provided regular ex...
java
@Beta public static void checkMatches(String reference, Pattern pattern) { checkMatches(reference, pattern, "Expected %s to match '%s'", reference, pattern == null ? "null" : pattern.pattern()); }
[ "@", "Beta", "public", "static", "void", "checkMatches", "(", "String", "reference", ",", "Pattern", "pattern", ")", "{", "checkMatches", "(", "reference", ",", "pattern", ",", "\"Expected %s to match '%s'\"", ",", "reference", ",", "pattern", "==", "null", "?",...
Performs check with the regular expression pattern. @param reference reference to check @param pattern the regular expression pattern @throws IllegalArgumentException if the {@code reference} doesn't match provided regular expression @see Checks#checkMatches(String, java.util.regex.Pattern, String, Object...)
[ "Performs", "check", "with", "the", "regular", "expression", "pattern", "." ]
train
https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/contract/Checks.java#L360-L363
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/CacheRecordStore.java
CacheRecordStore.createCacheEvictionChecker
@Override protected EvictionChecker createCacheEvictionChecker(int size, MaxSizePolicy maxSizePolicy) { """ Creates an instance for checking if the maximum cache size has been reached. Supports only the {@link MaxSizePolicy#ENTRY_COUNT} policy. Throws an {@link IllegalArgumentException} if other {@code maxSiz...
java
@Override protected EvictionChecker createCacheEvictionChecker(int size, MaxSizePolicy maxSizePolicy) { if (maxSizePolicy == null) { throw new IllegalArgumentException("Max-Size policy cannot be null"); } if (maxSizePolicy != MaxSizePolicy.ENTRY_COUNT) { throw new Il...
[ "@", "Override", "protected", "EvictionChecker", "createCacheEvictionChecker", "(", "int", "size", ",", "MaxSizePolicy", "maxSizePolicy", ")", "{", "if", "(", "maxSizePolicy", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Max-Size policy ...
Creates an instance for checking if the maximum cache size has been reached. Supports only the {@link MaxSizePolicy#ENTRY_COUNT} policy. Throws an {@link IllegalArgumentException} if other {@code maxSizePolicy} is used. @param size the maximum number of entries @param maxSizePolicy the way in which the size i...
[ "Creates", "an", "instance", "for", "checking", "if", "the", "maximum", "cache", "size", "has", "been", "reached", ".", "Supports", "only", "the", "{", "@link", "MaxSizePolicy#ENTRY_COUNT", "}", "policy", ".", "Throws", "an", "{", "@link", "IllegalArgumentExcept...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheRecordStore.java#L76-L89
shrinkwrap/descriptors
api-base/src/main/java/org/jboss/shrinkwrap/descriptor/api/DescriptorInstantiator.java
DescriptorInstantiator.createFromImplModelType
static Descriptor createFromImplModelType(final Class<? extends Descriptor> implClass, String descriptorName) throws IllegalArgumentException { """ Creates a {@link Descriptor} instance from the specified implementation class name, also using the specified name @param implClass @param descriptorName @...
java
static Descriptor createFromImplModelType(final Class<? extends Descriptor> implClass, String descriptorName) throws IllegalArgumentException { // Precondition checks if (implClass == null) { throw new IllegalArgumentException("implClass must be specified"); } if (des...
[ "static", "Descriptor", "createFromImplModelType", "(", "final", "Class", "<", "?", "extends", "Descriptor", ">", "implClass", ",", "String", "descriptorName", ")", "throws", "IllegalArgumentException", "{", "// Precondition checks", "if", "(", "implClass", "==", "nul...
Creates a {@link Descriptor} instance from the specified implementation class name, also using the specified name @param implClass @param descriptorName @return @throws IllegalArgumentException If either argument is not specified
[ "Creates", "a", "{", "@link", "Descriptor", "}", "instance", "from", "the", "specified", "implementation", "class", "name", "also", "using", "the", "specified", "name" ]
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/api-base/src/main/java/org/jboss/shrinkwrap/descriptor/api/DescriptorInstantiator.java#L113-L143
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optParcelable
@Nullable public static <T extends Parcelable> T optParcelable(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional {@link android.os.Parcelable} value. In other words, returns the value mapped by key if it exists and is a {@link android.os.Parcelable}. The bundle argument is allowed to be ...
java
@Nullable public static <T extends Parcelable> T optParcelable(@Nullable Bundle bundle, @Nullable String key) { return optParcelable(bundle, key, null); }
[ "@", "Nullable", "public", "static", "<", "T", "extends", "Parcelable", ">", "T", "optParcelable", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optParcelable", "(", "bundle", ",", "key", ",", "null",...
Returns a optional {@link android.os.Parcelable} value. In other words, returns the value mapped by key if it exists and is a {@link android.os.Parcelable}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L689-L692
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/Kryo.java
Kryo.addDefaultSerializer
public void addDefaultSerializer (Class type, Class<? extends Serializer> serializerClass) { """ Instances of the specified class will use the specified serializer when {@link #register(Class)} or {@link #register(Class, int)} are called. Serializer instances are created as needed via {@link ReflectionSerializer...
java
public void addDefaultSerializer (Class type, Class<? extends Serializer> serializerClass) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializerClass == null) throw new IllegalArgumentException("serializerClass cannot be null."); insertDefaultSerializer(type, new Reflec...
[ "public", "void", "addDefaultSerializer", "(", "Class", "type", ",", "Class", "<", "?", "extends", "Serializer", ">", "serializerClass", ")", "{", "if", "(", "type", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"type cannot be null.\"", ...
Instances of the specified class will use the specified serializer when {@link #register(Class)} or {@link #register(Class, int)} are called. Serializer instances are created as needed via {@link ReflectionSerializerFactory#newSerializer(Kryo, Class, Class)}. By default, the following classes have a default serializer ...
[ "Instances", "of", "the", "specified", "class", "will", "use", "the", "specified", "serializer", "when", "{" ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/Kryo.java#L352-L356
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/read/ReaderExpressionHelper.java
ReaderExpressionHelper.writeQuotedRegularExpression
public static void writeQuotedRegularExpression(OutputStream outputStream, byte[] unquoted) throws IOException { """ Write unquoted to the OutputStream applying RE2:QuoteMeta quoting. @param outputStream a {@link java.io.OutputStream} object. @param unquoted an array of byte. @throws java.io.IOException...
java
public static void writeQuotedRegularExpression(OutputStream outputStream, byte[] unquoted) throws IOException { QuoteMetaOutputStream quoteMetaOutputStream = new QuoteMetaOutputStream(outputStream); quoteMetaOutputStream.write(unquoted); quoteMetaOutputStream.close(); }
[ "public", "static", "void", "writeQuotedRegularExpression", "(", "OutputStream", "outputStream", ",", "byte", "[", "]", "unquoted", ")", "throws", "IOException", "{", "QuoteMetaOutputStream", "quoteMetaOutputStream", "=", "new", "QuoteMetaOutputStream", "(", "outputStream...
Write unquoted to the OutputStream applying RE2:QuoteMeta quoting. @param outputStream a {@link java.io.OutputStream} object. @param unquoted an array of byte. @throws java.io.IOException if any.
[ "Write", "unquoted", "to", "the", "OutputStream", "applying", "RE2", ":", "QuoteMeta", "quoting", "." ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/read/ReaderExpressionHelper.java#L80-L85
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/css/CssImageUrlRewriter.java
CssImageUrlRewriter.getRewrittenImagePath
protected String getRewrittenImagePath(String originalCssPath, String newCssPath, String url) throws IOException { """ Returns the rewritten image path @param originalCssPath the original Css path @param newCssPath the new Css path @param url the image URL @return the rewritten image path @throws IOExcep...
java
protected String getRewrittenImagePath(String originalCssPath, String newCssPath, String url) throws IOException { String imgUrl = null; // Retrieve the current CSS file from which the CSS image is referenced boolean generatedImg = false; if (binaryRsHandler != null) { GeneratorRegistry imgRsGeneratorRegis...
[ "protected", "String", "getRewrittenImagePath", "(", "String", "originalCssPath", ",", "String", "newCssPath", ",", "String", "url", ")", "throws", "IOException", "{", "String", "imgUrl", "=", "null", ";", "// Retrieve the current CSS file from which the CSS image is refere...
Returns the rewritten image path @param originalCssPath the original Css path @param newCssPath the new Css path @param url the image URL @return the rewritten image path @throws IOException if an IOException occurs
[ "Returns", "the", "rewritten", "image", "path" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/css/CssImageUrlRewriter.java#L257-L282
arakelian/docker-junit-rule
src/main/java/com/arakelian/docker/junit/Container.java
Container.waitForPort
public final void waitForPort(final String portName, final int timeout, final TimeUnit unit) { """ Wait for the specified port to accept socket connection within a given time frame. @param portName docker port name, e.g. 9200/tcp @param timeout timeout value @param unit timeout units """ final ...
java
public final void waitForPort(final String portName, final int timeout, final TimeUnit unit) { final Binding binding = getPortBinding(portName); waitForPort(binding.getHost(), binding.getPort(), timeout, unit); }
[ "public", "final", "void", "waitForPort", "(", "final", "String", "portName", ",", "final", "int", "timeout", ",", "final", "TimeUnit", "unit", ")", "{", "final", "Binding", "binding", "=", "getPortBinding", "(", "portName", ")", ";", "waitForPort", "(", "bi...
Wait for the specified port to accept socket connection within a given time frame. @param portName docker port name, e.g. 9200/tcp @param timeout timeout value @param unit timeout units
[ "Wait", "for", "the", "specified", "port", "to", "accept", "socket", "connection", "within", "a", "given", "time", "frame", "." ]
train
https://github.com/arakelian/docker-junit-rule/blob/cc99d63896a07df398b53fd5f0f6e4777e3b23cf/src/main/java/com/arakelian/docker/junit/Container.java#L460-L463
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectHasValueImpl_CustomFieldSerializer.java
OWLObjectHasValueImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectHasValueImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.u...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectHasValueImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectHasValueImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectHasValueImpl_CustomFieldSerializer.java#L72-L75
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word/TfIdf.java
TfIdf.idf
public static <TERM> Map<TERM, Double> idf(Iterable<Iterable<TERM>> documentVocabularies) { """ 平滑处理后的一系列文档的倒排词频 @param documentVocabularies 词表 @param <TERM> 词语类型 @return 一个词语->倒排文档的Map """ return idf(documentVocabularies, true, true); }
java
public static <TERM> Map<TERM, Double> idf(Iterable<Iterable<TERM>> documentVocabularies) { return idf(documentVocabularies, true, true); }
[ "public", "static", "<", "TERM", ">", "Map", "<", "TERM", ",", "Double", ">", "idf", "(", "Iterable", "<", "Iterable", "<", "TERM", ">", ">", "documentVocabularies", ")", "{", "return", "idf", "(", "documentVocabularies", ",", "true", ",", "true", ")", ...
平滑处理后的一系列文档的倒排词频 @param documentVocabularies 词表 @param <TERM> 词语类型 @return 一个词语->倒排文档的Map
[ "平滑处理后的一系列文档的倒排词频" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word/TfIdf.java#L166-L169
phax/ph-css
ph-css/src/main/java/com/helger/css/reader/CSSReader.java
CSSReader.isValidCSS
public static boolean isValidCSS (@Nonnull @WillClose final InputStream aIS, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion) { """ Check if the passed input stream can be resembled to valid CSS content. This is a...
java
public static boolean isValidCSS (@Nonnull @WillClose final InputStream aIS, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion) { ValueEnforcer.notNull (aIS, "InputStream"); ValueEnforcer.notNull (aFallbackChars...
[ "public", "static", "boolean", "isValidCSS", "(", "@", "Nonnull", "@", "WillClose", "final", "InputStream", "aIS", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ",", "@", "Nonnull", "final", "ECSSVersion", "eVersion", ")", "{", "ValueEnforcer", "....
Check if the passed input stream can be resembled to valid CSS content. This is accomplished by fully parsing the CSS file each time the method is called. This is similar to calling {@link #readFromStream(IHasInputStream,Charset, ECSSVersion)} and checking for a non-<code>null</code> result. @param aIS The input strea...
[ "Check", "if", "the", "passed", "input", "stream", "can", "be", "resembled", "to", "valid", "CSS", "content", ".", "This", "is", "accomplished", "by", "fully", "parsing", "the", "CSS", "file", "each", "time", "the", "method", "is", "called", ".", "This", ...
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/reader/CSSReader.java#L307-L315
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/AbstractRasMethodAdapter.java
AbstractRasMethodAdapter.visitLocalVariable
@Override public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { """ Visit a local variable. We will use this to change the start label for method parameters references. """ if (index < firstNonParameterSlot) { start = methodEntr...
java
@Override public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { if (index < firstNonParameterSlot) { start = methodEntryLabel; } super.visitLocalVariable(name, desc, signature, start, end, index); }
[ "@", "Override", "public", "void", "visitLocalVariable", "(", "String", "name", ",", "String", "desc", ",", "String", "signature", ",", "Label", "start", ",", "Label", "end", ",", "int", "index", ")", "{", "if", "(", "index", "<", "firstNonParameterSlot", ...
Visit a local variable. We will use this to change the start label for method parameters references.
[ "Visit", "a", "local", "variable", ".", "We", "will", "use", "this", "to", "change", "the", "start", "label", "for", "method", "parameters", "references", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/AbstractRasMethodAdapter.java#L1062-L1068
vikingbrain/thedavidbox-client4j
src/main/java/com/vikingbrain/nmt/client/modules/impl/ModuleMetadataDatabaseImpl.java
ModuleMetadataDatabaseImpl.getDatabase
private MetadataDatabase getDatabase(String deviceUrl) throws TheDavidBoxClientException { """ Get a possible database from a device url. @param deviceUrl the device url @return the metadata database @throws TheDavidBoxClientException exception in the client """ ResponseCheckDatabase responseCheckDatabas...
java
private MetadataDatabase getDatabase(String deviceUrl) throws TheDavidBoxClientException{ ResponseCheckDatabase responseCheckDatabase = buildCheckDatabaseOperation(deviceUrl).execute(); String databasePath = responseCheckDatabase.getDatabasePath(); MetadataDatabase database = new MetadataDatabase(deviceUr...
[ "private", "MetadataDatabase", "getDatabase", "(", "String", "deviceUrl", ")", "throws", "TheDavidBoxClientException", "{", "ResponseCheckDatabase", "responseCheckDatabase", "=", "buildCheckDatabaseOperation", "(", "deviceUrl", ")", ".", "execute", "(", ")", ";", "String"...
Get a possible database from a device url. @param deviceUrl the device url @return the metadata database @throws TheDavidBoxClientException exception in the client
[ "Get", "a", "possible", "database", "from", "a", "device", "url", "." ]
train
https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/client/modules/impl/ModuleMetadataDatabaseImpl.java#L100-L106
zaproxy/zaproxy
src/org/zaproxy/zap/utils/LocaleUtils.java
LocaleUtils.getLocalDisplayName
public static String getLocalDisplayName(String locale) { """ Gets the name of the language of and for the given locale. @param locale the locale whose language name will be returned @return the name of the language """ String desc = "" + locale; if (locale != null) { String[] langArray = locale....
java
public static String getLocalDisplayName(String locale) { String desc = "" + locale; if (locale != null) { String[] langArray = locale.split("_"); Locale loc = null; if (langArray.length == 1) { loc = new Locale(langArray[0]); } else if (langArray.length == 2) { ...
[ "public", "static", "String", "getLocalDisplayName", "(", "String", "locale", ")", "{", "String", "desc", "=", "\"\"", "+", "locale", ";", "if", "(", "locale", "!=", "null", ")", "{", "String", "[", "]", "langArray", "=", "locale", ".", "split", "(", "...
Gets the name of the language of and for the given locale. @param locale the locale whose language name will be returned @return the name of the language
[ "Gets", "the", "name", "of", "the", "language", "of", "and", "for", "the", "given", "locale", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/LocaleUtils.java#L440-L457
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.removeEmpty
public static <T extends CharSequence> T[] removeEmpty(T[] array) { """ 去除{@code null}或者"" 元素 @param array 数组 @return 处理后的数组 @since 3.2.2 """ return filter(array, new Filter<T>() { @Override public boolean accept(T t) { return false == StrUtil.isEmpty(t); } }); }
java
public static <T extends CharSequence> T[] removeEmpty(T[] array) { return filter(array, new Filter<T>() { @Override public boolean accept(T t) { return false == StrUtil.isEmpty(t); } }); }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "[", "]", "removeEmpty", "(", "T", "[", "]", "array", ")", "{", "return", "filter", "(", "array", ",", "new", "Filter", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "boo...
去除{@code null}或者"" 元素 @param array 数组 @return 处理后的数组 @since 3.2.2
[ "去除", "{", "@code", "null", "}", "或者", "元素" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L798-L805
k3po/k3po
specification/socks5/src/main/java/org/kaazing/specification/socks5/internal/Functions.java
Functions.wrapMessage
@Function public static byte[] wrapMessage(GSSContext context, MessageProp prop, byte[] message) { """ Utility method to call GSSContext.wrap() on a message which will create a byte[] that can be sent to a remote peer. @param context GSSContext for which a connection has been established to the remote peer ...
java
@Function public static byte[] wrapMessage(GSSContext context, MessageProp prop, byte[] message) { try { // wrap the data and return the encrypted token byte[] initialToken = context.wrap(message, 0, message.length, prop); return getTokenWithLengthPrefix(initialToken); ...
[ "@", "Function", "public", "static", "byte", "[", "]", "wrapMessage", "(", "GSSContext", "context", ",", "MessageProp", "prop", ",", "byte", "[", "]", "message", ")", "{", "try", "{", "// wrap the data and return the encrypted token", "byte", "[", "]", "initialT...
Utility method to call GSSContext.wrap() on a message which will create a byte[] that can be sent to a remote peer. @param context GSSContext for which a connection has been established to the remote peer @param prop the MessageProp object that is used to provide Quality of Protection of the message @param message the ...
[ "Utility", "method", "to", "call", "GSSContext", ".", "wrap", "()", "on", "a", "message", "which", "will", "create", "a", "byte", "[]", "that", "can", "be", "sent", "to", "a", "remote", "peer", "." ]
train
https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/specification/socks5/src/main/java/org/kaazing/specification/socks5/internal/Functions.java#L136-L146
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/World.java
World.locateClasspathEntry
public FileNode locateClasspathEntry(Class<?> c) { """ Returns the file or directory containing the specified class. Does not search modules @param c the source class @return the physical file defining the class """ return locateEntry(c, Reflect.resourceName(c), false); }
java
public FileNode locateClasspathEntry(Class<?> c) { return locateEntry(c, Reflect.resourceName(c), false); }
[ "public", "FileNode", "locateClasspathEntry", "(", "Class", "<", "?", ">", "c", ")", "{", "return", "locateEntry", "(", "c", ",", "Reflect", ".", "resourceName", "(", "c", ")", ",", "false", ")", ";", "}" ]
Returns the file or directory containing the specified class. Does not search modules @param c the source class @return the physical file defining the class
[ "Returns", "the", "file", "or", "directory", "containing", "the", "specified", "class", ".", "Does", "not", "search", "modules" ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/World.java#L539-L541
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/linsol/qr/SolveNullSpaceQRP_DDRM.java
SolveNullSpaceQRP_DDRM.process
public boolean process(DMatrixRMaj A , int numSingularValues, DMatrixRMaj nullspace ) { """ Finds the null space of A @param A (Input) Matrix. Modified @param numSingularValues Number of singular values @param nullspace Storage for null-space @return true if successful or false if it failed """ dec...
java
public boolean process(DMatrixRMaj A , int numSingularValues, DMatrixRMaj nullspace ) { decomposition.decompose(A); if( A.numRows > A.numCols ) { Q.reshape(A.numCols,Math.min(A.numRows,A.numCols)); decomposition.getQ(Q, true); } else { Q.reshape(A.numCols, A....
[ "public", "boolean", "process", "(", "DMatrixRMaj", "A", ",", "int", "numSingularValues", ",", "DMatrixRMaj", "nullspace", ")", "{", "decomposition", ".", "decompose", "(", "A", ")", ";", "if", "(", "A", ".", "numRows", ">", "A", ".", "numCols", ")", "{"...
Finds the null space of A @param A (Input) Matrix. Modified @param numSingularValues Number of singular values @param nullspace Storage for null-space @return true if successful or false if it failed
[ "Finds", "the", "null", "space", "of", "A" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/linsol/qr/SolveNullSpaceQRP_DDRM.java#L48-L63
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/MessagingMBeanFactoryImpl.java
MessagingMBeanFactoryImpl.createQueueMBean
private Controllable createQueueMBean(Controllable c) { """ Create an instance of the required MBean and register it @param c @return """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createQueuePointMBean", new Object[] { c }); JsQueue qp = n...
java
private Controllable createQueueMBean(Controllable c) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createQueuePointMBean", new Object[] { c }); JsQueue qp = new JsQueue(_me, c); controllableMap.put(c, qp); try { Dictionary<S...
[ "private", "Controllable", "createQueueMBean", "(", "Controllable", "c", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"createQueuePointMB...
Create an instance of the required MBean and register it @param c @return
[ "Create", "an", "instance", "of", "the", "required", "MBean", "and", "register", "it" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/MessagingMBeanFactoryImpl.java#L294-L314
janus-project/guava.janusproject.io
guava/src/com/google/common/collect/MapMakerInternalMap.java
MapMakerInternalMap.getLiveValue
V getLiveValue(ReferenceEntry<K, V> entry) { """ Gets the value from an entry. Returns {@code null} if the entry is invalid, partially-collected, computing, or expired. Unlike {@link Segment#getLiveValue} this method does not attempt to clean up stale entries. """ if (entry.getKey() == null) { retu...
java
V getLiveValue(ReferenceEntry<K, V> entry) { if (entry.getKey() == null) { return null; } V value = entry.getValueReference().get(); if (value == null) { return null; } if (expires() && isExpired(entry)) { return null; } return value; }
[ "V", "getLiveValue", "(", "ReferenceEntry", "<", "K", ",", "V", ">", "entry", ")", "{", "if", "(", "entry", ".", "getKey", "(", ")", "==", "null", ")", "{", "return", "null", ";", "}", "V", "value", "=", "entry", ".", "getValueReference", "(", ")",...
Gets the value from an entry. Returns {@code null} if the entry is invalid, partially-collected, computing, or expired. Unlike {@link Segment#getLiveValue} this method does not attempt to clean up stale entries.
[ "Gets", "the", "value", "from", "an", "entry", ".", "Returns", "{" ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1895-L1908
scireum/s3ninja
src/main/java/ninja/S3Dispatcher.java
S3Dispatcher.startMultipartUpload
private void startMultipartUpload(WebContext ctx, Bucket bucket, String id) { """ Handles POST /bucket/id?uploads @param ctx the context describing the current request @param bucket the bucket containing the object to upload @param id name of the object to upload """ Response response = ctx...
java
private void startMultipartUpload(WebContext ctx, Bucket bucket, String id) { Response response = ctx.respondWith(); Map<String, String> properties = Maps.newTreeMap(); for (String name : ctx.getRequest().headers().names()) { String nameLower = name.toLowerCase(); if (na...
[ "private", "void", "startMultipartUpload", "(", "WebContext", "ctx", ",", "Bucket", "bucket", ",", "String", "id", ")", "{", "Response", "response", "=", "ctx", ".", "respondWith", "(", ")", ";", "Map", "<", "String", ",", "String", ">", "properties", "=",...
Handles POST /bucket/id?uploads @param ctx the context describing the current request @param bucket the bucket containing the object to upload @param id name of the object to upload
[ "Handles", "POST", "/", "bucket", "/", "id?uploads" ]
train
https://github.com/scireum/s3ninja/blob/445eec55c91780267a7f987818b3fedecae009c5/src/main/java/ninja/S3Dispatcher.java#L634-L659
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/AbstractSequence.java
AbstractSequence.addFeature
public void addFeature(FeatureInterface<AbstractSequence<C>, C> feature) { """ Add a feature to this sequence. The feature will be added to the collection where the order is start position and if more than one feature at the same start position then longest is added first. This helps on doing feature layout for d...
java
public void addFeature(FeatureInterface<AbstractSequence<C>, C> feature) { features.add(feature); ArrayList<FeatureInterface<AbstractSequence<C>, C>> featureList = groupedFeatures.get(feature.getType()); if (featureList == null) { featureList = new ArrayList<FeatureInterface<AbstractSequence<C>, C>>(); grou...
[ "public", "void", "addFeature", "(", "FeatureInterface", "<", "AbstractSequence", "<", "C", ">", ",", "C", ">", "feature", ")", "{", "features", ".", "add", "(", "feature", ")", ";", "ArrayList", "<", "FeatureInterface", "<", "AbstractSequence", "<", "C", ...
Add a feature to this sequence. The feature will be added to the collection where the order is start position and if more than one feature at the same start position then longest is added first. This helps on doing feature layout for displaying features in SequenceFeaturePanel @param feature
[ "Add", "a", "feature", "to", "this", "sequence", ".", "The", "feature", "will", "be", "added", "to", "the", "collection", "where", "the", "order", "is", "start", "position", "and", "if", "more", "than", "one", "feature", "at", "the", "same", "start", "po...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/AbstractSequence.java#L410-L420
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.modifyPartitions
@When("^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'") public void modifyPartitions(int numPartitions, String topic_name) throws Exception { """ Modify partitions in a Kafka topic. @param topic_name topic name @param numPartitions number of partitions """ commonspec.getKafkaU...
java
@When("^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'") public void modifyPartitions(int numPartitions, String topic_name) throws Exception { commonspec.getKafkaUtils().modifyTopicPartitioning(topic_name, numPartitions); }
[ "@", "When", "(", "\"^I increase '(.+?)' partitions in a Kafka topic named '(.+?)'\"", ")", "public", "void", "modifyPartitions", "(", "int", "numPartitions", ",", "String", "topic_name", ")", "throws", "Exception", "{", "commonspec", ".", "getKafkaUtils", "(", ")", "."...
Modify partitions in a Kafka topic. @param topic_name topic name @param numPartitions number of partitions
[ "Modify", "partitions", "in", "a", "Kafka", "topic", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L96-L99
vincentk/joptimizer
src/main/java/com/joptimizer/util/ColtUtils.java
ColtUtils.scalarMult
public static final DoubleMatrix1D scalarMult(DoubleMatrix1D v1, double c) { """ Returns v = c * v1. Useful in avoiding the need of the copy() in the colt api. """ DoubleMatrix1D ret = DoubleFactory1D.dense.make(v1.size()); for(int i=0; i<ret.size(); i++){ ret.setQuick(i, c * v1.getQuick(i)); } ...
java
public static final DoubleMatrix1D scalarMult(DoubleMatrix1D v1, double c){ DoubleMatrix1D ret = DoubleFactory1D.dense.make(v1.size()); for(int i=0; i<ret.size(); i++){ ret.setQuick(i, c * v1.getQuick(i)); } return ret; }
[ "public", "static", "final", "DoubleMatrix1D", "scalarMult", "(", "DoubleMatrix1D", "v1", ",", "double", "c", ")", "{", "DoubleMatrix1D", "ret", "=", "DoubleFactory1D", ".", "dense", ".", "make", "(", "v1", ".", "size", "(", ")", ")", ";", "for", "(", "i...
Returns v = c * v1. Useful in avoiding the need of the copy() in the colt api.
[ "Returns", "v", "=", "c", "*", "v1", ".", "Useful", "in", "avoiding", "the", "need", "of", "the", "copy", "()", "in", "the", "colt", "api", "." ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/util/ColtUtils.java#L384-L391
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java
Uris.getRawFragment
public static String getRawFragment(final URI uri, final boolean strict) { """ Returns the raw (and normalized) fragment of the given URI, or null if it is empty. @param uri the URI to extract fragment from @param strict whether or not to do strict escaping @return the fragment or null if it is undefined ...
java
public static String getRawFragment(final URI uri, final boolean strict) { return esc(strict).escapeFragment(Strings.emptyToNull(uri.getRawFragment())); }
[ "public", "static", "String", "getRawFragment", "(", "final", "URI", "uri", ",", "final", "boolean", "strict", ")", "{", "return", "esc", "(", "strict", ")", ".", "escapeFragment", "(", "Strings", ".", "emptyToNull", "(", "uri", ".", "getRawFragment", "(", ...
Returns the raw (and normalized) fragment of the given URI, or null if it is empty. @param uri the URI to extract fragment from @param strict whether or not to do strict escaping @return the fragment or null if it is undefined
[ "Returns", "the", "raw", "(", "and", "normalized", ")", "fragment", "of", "the", "given", "URI", "or", "null", "if", "it", "is", "empty", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L273-L275
airbnb/lottie-android
lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java
GradientColorParser.parse
@Override public GradientColor parse(JsonReader reader, float scale) throws IOException { """ Both the color stops and opacity stops are in the same array. There are {@link #colorPoints} colors sequentially as: [ ..., position, red, green, blue, ... ] The remainder of the array is the opacity sto...
java
@Override public GradientColor parse(JsonReader reader, float scale) throws IOException { List<Float> array = new ArrayList<>(); // The array was started by Keyframe because it thought that this may be an array of keyframes // but peek returned a number so it considered it a static array of numbers. ...
[ "@", "Override", "public", "GradientColor", "parse", "(", "JsonReader", "reader", ",", "float", "scale", ")", "throws", "IOException", "{", "List", "<", "Float", ">", "array", "=", "new", "ArrayList", "<>", "(", ")", ";", "// The array was started by Keyframe be...
Both the color stops and opacity stops are in the same array. There are {@link #colorPoints} colors sequentially as: [ ..., position, red, green, blue, ... ] The remainder of the array is the opacity stops sequentially as: [ ..., position, opacity, ... ]
[ "Both", "the", "color", "stops", "and", "opacity", "stops", "are", "in", "the", "same", "array", ".", "There", "are", "{", "@link", "#colorPoints", "}", "colors", "sequentially", "as", ":", "[", "...", "position", "red", "green", "blue", "...", "]" ]
train
https://github.com/airbnb/lottie-android/blob/126dabdc9f586c87822f85fe1128cdad439d30fa/lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java#L43-L91
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java
CirculantTracker.elementMultConjB
public static void elementMultConjB( InterleavedF64 a , InterleavedF64 b , InterleavedF64 output ) { """ Element-wise multiplication of 'a' and the complex conjugate of 'b' """ for( int y = 0; y < a.height; y++ ) { int index = a.startIndex + y*a.stride; for( int x = 0; x < a.width; x++, index += 2 ) ...
java
public static void elementMultConjB( InterleavedF64 a , InterleavedF64 b , InterleavedF64 output ) { for( int y = 0; y < a.height; y++ ) { int index = a.startIndex + y*a.stride; for( int x = 0; x < a.width; x++, index += 2 ) { double realA = a.data[index]; double imgA = a.data[index+1]; double re...
[ "public", "static", "void", "elementMultConjB", "(", "InterleavedF64", "a", ",", "InterleavedF64", "b", ",", "InterleavedF64", "output", ")", "{", "for", "(", "int", "y", "=", "0", ";", "y", "<", "a", ".", "height", ";", "y", "++", ")", "{", "int", "...
Element-wise multiplication of 'a' and the complex conjugate of 'b'
[ "Element", "-", "wise", "multiplication", "of", "a", "and", "the", "complex", "conjugate", "of", "b" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java#L504-L520
facebookarchive/hadoop-20
src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
FairScheduler.slotsUsedWithWeightToSlotRatio
private double slotsUsedWithWeightToSlotRatio(double w2sRatio, TaskType type) { """ Compute the number of slots that would be used given a weight-to-slot ratio w2sRatio. """ double slotsTaken = 0; for (JobInfo info : infos.values()) { slotsTaken += computeShare(info, w2sRatio, type); } r...
java
private double slotsUsedWithWeightToSlotRatio(double w2sRatio, TaskType type) { double slotsTaken = 0; for (JobInfo info : infos.values()) { slotsTaken += computeShare(info, w2sRatio, type); } return slotsTaken; }
[ "private", "double", "slotsUsedWithWeightToSlotRatio", "(", "double", "w2sRatio", ",", "TaskType", "type", ")", "{", "double", "slotsTaken", "=", "0", ";", "for", "(", "JobInfo", "info", ":", "infos", ".", "values", "(", ")", ")", "{", "slotsTaken", "+=", ...
Compute the number of slots that would be used given a weight-to-slot ratio w2sRatio.
[ "Compute", "the", "number", "of", "slots", "that", "would", "be", "used", "given", "a", "weight", "-", "to", "-", "slot", "ratio", "w2sRatio", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java#L1964-L1970
fcrepo4-labs/fcrepo4-client
fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java
HttpHelper.createGetMethod
public HttpGet createGetMethod(final String path, final Map<String, List<String>> params) { """ Create GET method with list of parameters @param path Resource path, relative to repository baseURL @param params Query parameters @return GET method """ return new HttpGet(repositoryURL + path + queryStr...
java
public HttpGet createGetMethod(final String path, final Map<String, List<String>> params) { return new HttpGet(repositoryURL + path + queryString(params)); }
[ "public", "HttpGet", "createGetMethod", "(", "final", "String", "path", ",", "final", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "params", ")", "{", "return", "new", "HttpGet", "(", "repositoryURL", "+", "path", "+", "queryString", "(", ...
Create GET method with list of parameters @param path Resource path, relative to repository baseURL @param params Query parameters @return GET method
[ "Create", "GET", "method", "with", "list", "of", "parameters" ]
train
https://github.com/fcrepo4-labs/fcrepo4-client/blob/21eaf27200c5b2542095f6ebb9dd8ec865b95bbd/fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java#L224-L226
resilience4j/resilience4j
resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/RateLimiterExports.java
RateLimiterExports.ofRateLimiter
public static RateLimiterExports ofRateLimiter(String prefix, RateLimiter rateLimiter) { """ Creates a new instance of {@link RateLimiterExports} with default metrics names prefix and a rate limiter as a source. @param prefix the prefix of metrics names @param rateLimiter the rate limiter """ retu...
java
public static RateLimiterExports ofRateLimiter(String prefix, RateLimiter rateLimiter) { return new RateLimiterExports(prefix, Array.of(rateLimiter)); }
[ "public", "static", "RateLimiterExports", "ofRateLimiter", "(", "String", "prefix", ",", "RateLimiter", "rateLimiter", ")", "{", "return", "new", "RateLimiterExports", "(", "prefix", ",", "Array", ".", "of", "(", "rateLimiter", ")", ")", ";", "}" ]
Creates a new instance of {@link RateLimiterExports} with default metrics names prefix and a rate limiter as a source. @param prefix the prefix of metrics names @param rateLimiter the rate limiter
[ "Creates", "a", "new", "instance", "of", "{", "@link", "RateLimiterExports", "}", "with", "default", "metrics", "names", "prefix", "and", "a", "rate", "limiter", "as", "a", "source", "." ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/RateLimiterExports.java#L128-L130
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_binding.java
appfwprofile_binding.get
public static appfwprofile_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch appfwprofile_binding resource of given name . """ appfwprofile_binding obj = new appfwprofile_binding(); obj.set_name(name); appfwprofile_binding response = (appfwprofile_binding) obj.g...
java
public static appfwprofile_binding get(nitro_service service, String name) throws Exception{ appfwprofile_binding obj = new appfwprofile_binding(); obj.set_name(name); appfwprofile_binding response = (appfwprofile_binding) obj.get_resource(service); return response; }
[ "public", "static", "appfwprofile_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwprofile_binding", "obj", "=", "new", "appfwprofile_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")"...
Use this API to fetch appfwprofile_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwprofile_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_binding.java#L290-L295
azkaban/azkaban
azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java
FileIOUtils.isDirWritable
public static boolean isDirWritable(final File dir) { """ Check if a directory is writable @param dir directory file object @return true if it is writable. false, otherwise """ File testFile = null; try { testFile = new File(dir, "_tmp"); /* * Create and delete a dummy file in or...
java
public static boolean isDirWritable(final File dir) { File testFile = null; try { testFile = new File(dir, "_tmp"); /* * Create and delete a dummy file in order to check file permissions. Maybe * there is a safer way for this check. */ testFile.createNewFile(); } catch...
[ "public", "static", "boolean", "isDirWritable", "(", "final", "File", "dir", ")", "{", "File", "testFile", "=", "null", ";", "try", "{", "testFile", "=", "new", "File", "(", "dir", ",", "\"_tmp\"", ")", ";", "/*\n * Create and delete a dummy file in order ...
Check if a directory is writable @param dir directory file object @return true if it is writable. false, otherwise
[ "Check", "if", "a", "directory", "is", "writable" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java#L61-L78
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java
IndexAVL.findFirstRow
@Override public RowIterator findFirstRow(Session session, PersistentStore store, Object[] rowdata) { """ Return the first node equal to the rowdata object. The rowdata has the same column mapping as this table. @param session session object @param store store object @...
java
@Override public RowIterator findFirstRow(Session session, PersistentStore store, Object[] rowdata) { NodeAVL node = findNode(session, store, rowdata, colIndex, colIndex.length); return getIterator(session, store, node); }
[ "@", "Override", "public", "RowIterator", "findFirstRow", "(", "Session", "session", ",", "PersistentStore", "store", ",", "Object", "[", "]", "rowdata", ")", "{", "NodeAVL", "node", "=", "findNode", "(", "session", ",", "store", ",", "rowdata", ",", "colInd...
Return the first node equal to the rowdata object. The rowdata has the same column mapping as this table. @param session session object @param store store object @param rowdata array containing table row data @return iterator
[ "Return", "the", "first", "node", "equal", "to", "the", "rowdata", "object", ".", "The", "rowdata", "has", "the", "same", "column", "mapping", "as", "this", "table", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L826-L834
aboutsip/pkts
pkts-core/src/main/java/io/pkts/frame/PcapRecordHeader.java
PcapRecordHeader.createDefaultHeader
public static PcapRecordHeader createDefaultHeader(final long timestamp) { """ Create a default record header, which you must alter later on to match whatever it is you are writing into the pcap stream. @param timestamp the timestamp in milliseconds since epoch. This is the timestamp of when the packet "arri...
java
public static PcapRecordHeader createDefaultHeader(final long timestamp) { final byte[] body = new byte[SIZE]; // time stamp seconds // body[0] = (byte) 0x00; // body[1] = (byte) 0x00; // body[2] = (byte) 0x00; // body[3] = (byte) 0x00; // Time stamp microsecond...
[ "public", "static", "PcapRecordHeader", "createDefaultHeader", "(", "final", "long", "timestamp", ")", "{", "final", "byte", "[", "]", "body", "=", "new", "byte", "[", "SIZE", "]", ";", "// time stamp seconds", "// body[0] = (byte) 0x00;", "// body[1] = (byte) 0x00;",...
Create a default record header, which you must alter later on to match whatever it is you are writing into the pcap stream. @param timestamp the timestamp in milliseconds since epoch. This is the timestamp of when the packet "arrived" @return
[ "Create", "a", "default", "record", "header", "which", "you", "must", "alter", "later", "on", "to", "match", "whatever", "it", "is", "you", "are", "writing", "into", "the", "pcap", "stream", "." ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-core/src/main/java/io/pkts/frame/PcapRecordHeader.java#L55-L87
MenoData/Time4J
base/src/main/java/net/time4j/range/DateInterval.java
DateInterval.streamDaily
public static Stream<PlainDate> streamDaily( PlainDate start, PlainDate end ) { """ /*[deutsch] <p>Erzeugt einen {@code Stream}, der &uuml;ber jedes Kalenderdatum zwischen den angegebenen Intervallgrenzen geht. </p> <p>Diese statische Methode vermeidet die Kosten der Intervallerzeugung. </...
java
public static Stream<PlainDate> streamDaily( PlainDate start, PlainDate end ) { long s = start.getDaysSinceEpochUTC(); long e = end.getDaysSinceEpochUTC(); if (s > e) { throw new IllegalArgumentException("Start after end: " + start + "/" + end); } ...
[ "public", "static", "Stream", "<", "PlainDate", ">", "streamDaily", "(", "PlainDate", "start", ",", "PlainDate", "end", ")", "{", "long", "s", "=", "start", ".", "getDaysSinceEpochUTC", "(", ")", ";", "long", "e", "=", "end", ".", "getDaysSinceEpochUTC", "...
/*[deutsch] <p>Erzeugt einen {@code Stream}, der &uuml;ber jedes Kalenderdatum zwischen den angegebenen Intervallgrenzen geht. </p> <p>Diese statische Methode vermeidet die Kosten der Intervallerzeugung. </p> @param start start boundary - inclusive @param end end boundary - inclusive @throws Illega...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "einen", "{", "@code", "Stream", "}", "der", "&uuml", ";", "ber", "jedes", "Kalenderdatum", "zwischen", "den", "angegebenen", "Intervallgrenzen", "geht", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/DateInterval.java#L840-L854
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getStrength
public int getStrength(String password) throws CredentialException { """ Returns strength of the private/public key in bits. @return strength of the key in bits. Returns -1 if unable to determine it. """ if (opensslKey == null) { return -1; } if (this.opensslKey.isEncrypt...
java
public int getStrength(String password) throws CredentialException { if (opensslKey == null) { return -1; } if (this.opensslKey.isEncrypted()) { if (password == null) { throw new CredentialException("Key encrypted, password required"); } else {...
[ "public", "int", "getStrength", "(", "String", "password", ")", "throws", "CredentialException", "{", "if", "(", "opensslKey", "==", "null", ")", "{", "return", "-", "1", ";", "}", "if", "(", "this", ".", "opensslKey", ".", "isEncrypted", "(", ")", ")", ...
Returns strength of the private/public key in bits. @return strength of the key in bits. Returns -1 if unable to determine it.
[ "Returns", "strength", "of", "the", "private", "/", "public", "key", "in", "bits", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L296-L312
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/datamovement/ProgressListener.java
ProgressListener.invokeConsumer
protected void invokeConsumer(Consumer<ProgressUpdate> consumer, ProgressUpdate progressUpdate) { """ Protected so that a subclass can override how a consumer is invoked, particularly how an exception is handled. @param consumer @param progressUpdate """ try { consumer.accept(progressUpdate); } catc...
java
protected void invokeConsumer(Consumer<ProgressUpdate> consumer, ProgressUpdate progressUpdate) { try { consumer.accept(progressUpdate); } catch (Throwable t) { logger.error("Exception thrown by a Consumer<ProgressUpdate> consumer: " + consumer + "; progressUpdate: " + progressUpdate, t); } }
[ "protected", "void", "invokeConsumer", "(", "Consumer", "<", "ProgressUpdate", ">", "consumer", ",", "ProgressUpdate", "progressUpdate", ")", "{", "try", "{", "consumer", ".", "accept", "(", "progressUpdate", ")", ";", "}", "catch", "(", "Throwable", "t", ")",...
Protected so that a subclass can override how a consumer is invoked, particularly how an exception is handled. @param consumer @param progressUpdate
[ "Protected", "so", "that", "a", "subclass", "can", "override", "how", "a", "consumer", "is", "invoked", "particularly", "how", "an", "exception", "is", "handled", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/datamovement/ProgressListener.java#L164-L170
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/types/Type.java
Type.castToType
public Object castToType(SessionInterface session, Object a, Type type) { """ Explicit casts are handled by this method. SQL standard 6.12 rules for enforcement of size, precision and scale are implemented. For CHARACTER values, it performs truncation in all cases of long strings. """ return convert...
java
public Object castToType(SessionInterface session, Object a, Type type) { return convertToType(session, a, type); }
[ "public", "Object", "castToType", "(", "SessionInterface", "session", ",", "Object", "a", ",", "Type", "type", ")", "{", "return", "convertToType", "(", "session", ",", "a", ",", "type", ")", ";", "}" ]
Explicit casts are handled by this method. SQL standard 6.12 rules for enforcement of size, precision and scale are implemented. For CHARACTER values, it performs truncation in all cases of long strings.
[ "Explicit", "casts", "are", "handled", "by", "this", "method", ".", "SQL", "standard", "6", ".", "12", "rules", "for", "enforcement", "of", "size", "precision", "and", "scale", "are", "implemented", ".", "For", "CHARACTER", "values", "it", "performs", "trunc...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/types/Type.java#L253-L255
apache/flink
flink-formats/flink-avro-confluent-registry/src/main/java/org/apache/flink/formats/avro/registry/confluent/ConfluentRegistryAvroDeserializationSchema.java
ConfluentRegistryAvroDeserializationSchema.forSpecific
public static <T extends SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific(Class<T> tClass, String url) { """ Creates {@link AvroDeserializationSchema} that produces classes that were generated from avro schema and looks up writer schema in Confluent Schema Registry. @param tClass cl...
java
public static <T extends SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific(Class<T> tClass, String url) { return forSpecific(tClass, url, DEFAULT_IDENTITY_MAP_CAPACITY); }
[ "public", "static", "<", "T", "extends", "SpecificRecord", ">", "ConfluentRegistryAvroDeserializationSchema", "<", "T", ">", "forSpecific", "(", "Class", "<", "T", ">", "tClass", ",", "String", "url", ")", "{", "return", "forSpecific", "(", "tClass", ",", "url...
Creates {@link AvroDeserializationSchema} that produces classes that were generated from avro schema and looks up writer schema in Confluent Schema Registry. @param tClass class of record to be produced @param url url of schema registry to connect @return deserialized record
[ "Creates", "{", "@link", "AvroDeserializationSchema", "}", "that", "produces", "classes", "that", "were", "generated", "from", "avro", "schema", "and", "looks", "up", "writer", "schema", "in", "Confluent", "Schema", "Registry", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro-confluent-registry/src/main/java/org/apache/flink/formats/avro/registry/confluent/ConfluentRegistryAvroDeserializationSchema.java#L95-L98
apache/spark
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java
VectorizedParquetRecordReader.initialize
@Override public void initialize(String path, List<String> columns) throws IOException, UnsupportedOperationException { """ Utility API that will read all the data in path. This circumvents the need to create Hadoop objects to use this class. `columns` can contain the list of columns to project. """ ...
java
@Override public void initialize(String path, List<String> columns) throws IOException, UnsupportedOperationException { super.initialize(path, columns); initializeInternal(); }
[ "@", "Override", "public", "void", "initialize", "(", "String", "path", ",", "List", "<", "String", ">", "columns", ")", "throws", "IOException", ",", "UnsupportedOperationException", "{", "super", ".", "initialize", "(", "path", ",", "columns", ")", ";", "i...
Utility API that will read all the data in path. This circumvents the need to create Hadoop objects to use this class. `columns` can contain the list of columns to project.
[ "Utility", "API", "that", "will", "read", "all", "the", "data", "in", "path", ".", "This", "circumvents", "the", "need", "to", "create", "Hadoop", "objects", "to", "use", "this", "class", ".", "columns", "can", "contain", "the", "list", "of", "columns", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java#L139-L144
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_requestTotalDeconsolidation_POST
public OvhTask serviceName_requestTotalDeconsolidation_POST(String serviceName, Boolean noPortability, String rio) throws IOException { """ Switch this access to total deconsolidation REST: POST /xdsl/{serviceName}/requestTotalDeconsolidation @param noPortability [required] Do not port the number @param rio [...
java
public OvhTask serviceName_requestTotalDeconsolidation_POST(String serviceName, Boolean noPortability, String rio) throws IOException { String qPath = "/xdsl/{serviceName}/requestTotalDeconsolidation"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody...
[ "public", "OvhTask", "serviceName_requestTotalDeconsolidation_POST", "(", "String", "serviceName", ",", "Boolean", "noPortability", ",", "String", "rio", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/requestTotalDeconsolidation\"", ";", "...
Switch this access to total deconsolidation REST: POST /xdsl/{serviceName}/requestTotalDeconsolidation @param noPortability [required] Do not port the number @param rio [required] A token to prove the ownership of the line number, needed to port the number @param serviceName [required] The internal name of your XDSL o...
[ "Switch", "this", "access", "to", "total", "deconsolidation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1730-L1738
ArcadiaConsulting/javapns-json-refactor
src/main/java/javapns/notification/PushNotificationManager.java
PushNotificationManager.sendNotification
public PushedNotification sendNotification(Device device, Payload payload) throws CommunicationException { """ Send a notification to a single device and close the connection. @param device the device to be notified @param payload the payload to send @return a pushed notification with details on transmission ...
java
public PushedNotification sendNotification(Device device, Payload payload) throws CommunicationException { return sendNotification(device, payload, true); }
[ "public", "PushedNotification", "sendNotification", "(", "Device", "device", ",", "Payload", "payload", ")", "throws", "CommunicationException", "{", "return", "sendNotification", "(", "device", ",", "payload", ",", "true", ")", ";", "}" ]
Send a notification to a single device and close the connection. @param device the device to be notified @param payload the payload to send @return a pushed notification with details on transmission result and error (if any) @throws CommunicationException thrown if a communication error occurs
[ "Send", "a", "notification", "to", "a", "single", "device", "and", "close", "the", "connection", "." ]
train
https://github.com/ArcadiaConsulting/javapns-json-refactor/blob/293575ceda910b9c74733d2f6b963dff5302d859/src/main/java/javapns/notification/PushNotificationManager.java#L269-L271
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java
SubItemUtil.notifyItemsChanged
public static <Item extends IItem & IExpandable> void notifyItemsChanged(final FastAdapter adapter, ExpandableExtension expandableExtension, Set<Long> identifiers, boolean restoreExpandedState) { """ notifies items (incl. sub items if they are currently extended) @param adapter the adapter @param ...
java
public static <Item extends IItem & IExpandable> void notifyItemsChanged(final FastAdapter adapter, ExpandableExtension expandableExtension, Set<Long> identifiers, boolean restoreExpandedState) { int i; IItem item; for (i = 0; i < adapter.getItemCount(); i++) { item = adapter.getItem...
[ "public", "static", "<", "Item", "extends", "IItem", "&", "IExpandable", ">", "void", "notifyItemsChanged", "(", "final", "FastAdapter", "adapter", ",", "ExpandableExtension", "expandableExtension", ",", "Set", "<", "Long", ">", "identifiers", ",", "boolean", "res...
notifies items (incl. sub items if they are currently extended) @param adapter the adapter @param identifiers set of identifiers that should be notified @param restoreExpandedState true, if expanded headers should stay expanded
[ "notifies", "items", "(", "incl", ".", "sub", "items", "if", "they", "are", "currently", "extended", ")" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java#L500-L511
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/UninterruptibleCountDownLatch.java
UninterruptibleCountDownLatch.awaitUninterruptibly
public boolean awaitUninterruptibly(final long timeout, final TimeUnit unit) { """ Behaves the same way as {@link #await(long,TimeUnit)} except it never throws InterruptedException. Thread interrupt status will be preserved if thread have been interrupted inside this method. @param timeout the maximum time to wa...
java
public boolean awaitUninterruptibly(final long timeout, final TimeUnit unit) { boolean interrupted = Thread.interrupted(); long now = System.nanoTime(); long remaining = unit.toNanos(timeout); try { while (true) { if (remaining <= 0L) return false; ...
[ "public", "boolean", "awaitUninterruptibly", "(", "final", "long", "timeout", ",", "final", "TimeUnit", "unit", ")", "{", "boolean", "interrupted", "=", "Thread", ".", "interrupted", "(", ")", ";", "long", "now", "=", "System", ".", "nanoTime", "(", ")", "...
Behaves the same way as {@link #await(long,TimeUnit)} except it never throws InterruptedException. Thread interrupt status will be preserved if thread have been interrupted inside this method. @param timeout the maximum time to wait @param unit the time unit of the {@code timeout} argument @return {@code true} if the c...
[ "Behaves", "the", "same", "way", "as", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/UninterruptibleCountDownLatch.java#L67-L84
code4everything/util
src/main/java/com/zhazhapan/util/MailSender.java
MailSender.sendMail
public static void sendMail(String to, String title, String content, String from, String key) throws Exception { """ 发送邮件,调用此方法前请先检查邮件服务器是否已经设置,如果没有设置,请先设置{@link MailSender#setHost(String)}, 如不设置将使用默认的QQ邮件服务器 @param to 收件箱 @param title 标题 @param content 内容 @param from 发件箱 @param key 密码 @throws Exception ...
java
public static void sendMail(String to, String title, String content, String from, String key) throws Exception { setFrom(from); setKey(key); sendMail(to, title, content); }
[ "public", "static", "void", "sendMail", "(", "String", "to", ",", "String", "title", ",", "String", "content", ",", "String", "from", ",", "String", "key", ")", "throws", "Exception", "{", "setFrom", "(", "from", ")", ";", "setKey", "(", "key", ")", ";...
发送邮件,调用此方法前请先检查邮件服务器是否已经设置,如果没有设置,请先设置{@link MailSender#setHost(String)}, 如不设置将使用默认的QQ邮件服务器 @param to 收件箱 @param title 标题 @param content 内容 @param from 发件箱 @param key 密码 @throws Exception 异常
[ "发送邮件,调用此方法前请先检查邮件服务器是否已经设置,如果没有设置,请先设置", "{", "@link", "MailSender#setHost", "(", "String", ")", "}", ",", "如不设置将使用默认的QQ邮件服务器" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/MailSender.java#L179-L183
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
ProfeatProperties.getDistributionPosition
public static double getDistributionPosition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group, DISTRIBUTION distribution) throws Exception { """ An adaptor method which computes and return the position with respect to the sequence where the given distribution of the grouping can be found.<br/> Exampl...
java
public static double getDistributionPosition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group, DISTRIBUTION distribution) throws Exception{ return new ProfeatPropertiesImpl().getDistributionPosition(sequence, attribute, group, distribution); }
[ "public", "static", "double", "getDistributionPosition", "(", "ProteinSequence", "sequence", ",", "ATTRIBUTE", "attribute", ",", "GROUPING", "group", ",", "DISTRIBUTION", "distribution", ")", "throws", "Exception", "{", "return", "new", "ProfeatPropertiesImpl", "(", "...
An adaptor method which computes and return the position with respect to the sequence where the given distribution of the grouping can be found.<br/> Example: "1111122222"<br/> For the above example,<br/> position of the GROUPING.GROUP1 && DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)...
[ "An", "adaptor", "method", "which", "computes", "and", "return", "the", "position", "with", "respect", "to", "the", "sequence", "where", "the", "given", "distribution", "of", "the", "grouping", "can", "be", "found", ".", "<br", "/", ">", "Example", ":", "1...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java#L139-L141
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRWorld.java
GVRWorld.startDrag
public boolean startDrag(final GVRSceneObject sceneObject, final float hitX, final float hitY, final float hitZ) { """ Start the drag operation of a scene object with a rigid body. @param sceneObject Scene object with a rigid body attached to it. @param hitX rel position in x-axis....
java
public boolean startDrag(final GVRSceneObject sceneObject, final float hitX, final float hitY, final float hitZ) { final GVRRigidBody dragMe = (GVRRigidBody)sceneObject.getComponent(GVRRigidBody.getComponentType()); if (dragMe == null || dragMe.getSimulationType() != GVRRigi...
[ "public", "boolean", "startDrag", "(", "final", "GVRSceneObject", "sceneObject", ",", "final", "float", "hitX", ",", "final", "float", "hitY", ",", "final", "float", "hitZ", ")", "{", "final", "GVRRigidBody", "dragMe", "=", "(", "GVRRigidBody", ")", "sceneObje...
Start the drag operation of a scene object with a rigid body. @param sceneObject Scene object with a rigid body attached to it. @param hitX rel position in x-axis. @param hitY rel position in y-axis. @param hitZ rel position in z-axis. @return true if success, otherwise returns false.
[ "Start", "the", "drag", "operation", "of", "a", "scene", "object", "with", "a", "rigid", "body", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRWorld.java#L190-L217
VoltDB/voltdb
src/frontend/org/voltcore/messaging/SocketJoiner.java
SocketJoiner.publishHostId
private JSONObject publishHostId( InetSocketAddress hostAddr, MessagingChannel messagingChannel, Set<String> activeVersions) throws Exception { """ Connection handshake to non-leader node, broadcast the new hostId to each node of the cluster (except the leader). @param @retur...
java
private JSONObject publishHostId( InetSocketAddress hostAddr, MessagingChannel messagingChannel, Set<String> activeVersions) throws Exception { JSONObject jsObj = new JSONObject(); jsObj.put(TYPE, ConnectionType.PUBLISH_HOSTID.name()); jsObj.put(HOST_ID, m...
[ "private", "JSONObject", "publishHostId", "(", "InetSocketAddress", "hostAddr", ",", "MessagingChannel", "messagingChannel", ",", "Set", "<", "String", ">", "activeVersions", ")", "throws", "Exception", "{", "JSONObject", "jsObj", "=", "new", "JSONObject", "(", ")",...
Connection handshake to non-leader node, broadcast the new hostId to each node of the cluster (except the leader). @param @return JSONObject response message from peer node @throws Exception
[ "Connection", "handshake", "to", "non", "-", "leader", "node", "broadcast", "the", "new", "hostId", "to", "each", "node", "of", "the", "cluster", "(", "except", "the", "leader", ")", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/SocketJoiner.java#L810-L834
alkacon/opencms-core
src/org/opencms/file/wrapper/CmsResourceWrapperModules.java
CmsResourceWrapperModules.matchParentPath
private boolean matchParentPath(String expectedParent, String path) { """ Checks if a given path is a direct descendant of another path.<p> @param expectedParent the expected parent folder @param path a path @return true if the path is a direct child of expectedParent """ String parent = CmsResou...
java
private boolean matchParentPath(String expectedParent, String path) { String parent = CmsResource.getParentFolder(path); if (parent == null) { return false; } return matchPath(expectedParent, parent); }
[ "private", "boolean", "matchParentPath", "(", "String", "expectedParent", ",", "String", "path", ")", "{", "String", "parent", "=", "CmsResource", ".", "getParentFolder", "(", "path", ")", ";", "if", "(", "parent", "==", "null", ")", "{", "return", "false", ...
Checks if a given path is a direct descendant of another path.<p> @param expectedParent the expected parent folder @param path a path @return true if the path is a direct child of expectedParent
[ "Checks", "if", "a", "given", "path", "is", "a", "direct", "descendant", "of", "another", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/wrapper/CmsResourceWrapperModules.java#L553-L560
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_OffSetCurve.java
ST_OffSetCurve.lineStringOffSetCurve
public static void lineStringOffSetCurve(ArrayList<LineString> list, LineString lineString, double offset, BufferParameters bufferParameters) { """ Compute the offset curve for a linestring @param list @param lineString @param offset @param bufferParameters """ list.add(lineString.getFactory().cr...
java
public static void lineStringOffSetCurve(ArrayList<LineString> list, LineString lineString, double offset, BufferParameters bufferParameters) { list.add(lineString.getFactory().createLineString(new OffsetCurveBuilder(lineString.getPrecisionModel(), bufferParameters).getOffsetCurve(lineString.getCoordinates(), o...
[ "public", "static", "void", "lineStringOffSetCurve", "(", "ArrayList", "<", "LineString", ">", "list", ",", "LineString", "lineString", ",", "double", "offset", ",", "BufferParameters", "bufferParameters", ")", "{", "list", ".", "add", "(", "lineString", ".", "g...
Compute the offset curve for a linestring @param list @param lineString @param offset @param bufferParameters
[ "Compute", "the", "offset", "curve", "for", "a", "linestring" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_OffSetCurve.java#L149-L151
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromCalledMethod
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) { """ Factory method to create a MethodAnnotation from a method called by the instruction the given visitor is currently visiting. @param visitor the visitor @return the MethodAnnotation representing the called method """ ...
java
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) { String className = visitor.getDottedClassConstantOperand(); String methodName = visitor.getNameConstantOperand(); String methodSig = visitor.getSigConstantOperand(); if (visitor instanceof OpcodeStackDetector &...
[ "public", "static", "MethodAnnotation", "fromCalledMethod", "(", "DismantleBytecode", "visitor", ")", "{", "String", "className", "=", "visitor", ".", "getDottedClassConstantOperand", "(", ")", ";", "String", "methodName", "=", "visitor", ".", "getNameConstantOperand", ...
Factory method to create a MethodAnnotation from a method called by the instruction the given visitor is currently visiting. @param visitor the visitor @return the MethodAnnotation representing the called method
[ "Factory", "method", "to", "create", "a", "MethodAnnotation", "from", "a", "method", "called", "by", "the", "instruction", "the", "given", "visitor", "is", "currently", "visiting", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L144-L164
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java
JMElasticsearchSearchAndCount.searchAll
public SearchResponse searchAll(String[] indices, String[] types, AggregationBuilder[] aggregationBuilders) { """ Search all search response. @param indices the indices @param types the types @param aggregationBuilders the aggregation builders @return the search response...
java
public SearchResponse searchAll(String[] indices, String[] types, AggregationBuilder[] aggregationBuilders) { return searchAll(indices, types, null, aggregationBuilders); }
[ "public", "SearchResponse", "searchAll", "(", "String", "[", "]", "indices", ",", "String", "[", "]", "types", ",", "AggregationBuilder", "[", "]", "aggregationBuilders", ")", "{", "return", "searchAll", "(", "indices", ",", "types", ",", "null", ",", "aggre...
Search all search response. @param indices the indices @param types the types @param aggregationBuilders the aggregation builders @return the search response
[ "Search", "all", "search", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java#L409-L412
opentable/otj-jaxrs
client/src/main/java/com/opentable/jaxrs/JaxRsClientFactory.java
JaxRsClientFactory.newBuilder
public synchronized ClientBuilder newBuilder(String clientName, JaxRsClientConfig jaxRsConfig, Collection<JaxRsFeatureGroup> featureGroupsIn) { """ Create a new {@link ClientBuilder} instance with the given name and groups. You own the returned client and are responsible for managing its cleanup. """ ...
java
public synchronized ClientBuilder newBuilder(String clientName, JaxRsClientConfig jaxRsConfig, Collection<JaxRsFeatureGroup> featureGroupsIn) { started = true; final List<JaxRsFeatureGroup> featureGroups = ImmutableList.<JaxRsFeatureGroup>builder() .add(PrivateFeatureGroup.WILDCARD) ...
[ "public", "synchronized", "ClientBuilder", "newBuilder", "(", "String", "clientName", ",", "JaxRsClientConfig", "jaxRsConfig", ",", "Collection", "<", "JaxRsFeatureGroup", ">", "featureGroupsIn", ")", "{", "started", "=", "true", ";", "final", "List", "<", "JaxRsFea...
Create a new {@link ClientBuilder} instance with the given name and groups. You own the returned client and are responsible for managing its cleanup.
[ "Create", "a", "new", "{" ]
train
https://github.com/opentable/otj-jaxrs/blob/384e7094fe5a56d41b2a9970bfd783fa85cbbcb8/client/src/main/java/com/opentable/jaxrs/JaxRsClientFactory.java#L180-L206
apache/incubator-heron
heron/common/src/java/org/apache/heron/common/utils/logging/LoggingHelper.java
LoggingHelper.loggerInit
public static void loggerInit(Level level, boolean isRedirectStdOutErr, String format) throws IOException { """ Init java util logging @param level the Level of message to log @param isRedirectStdOutErr whether we redirect std out&amp;err @param format the format to log """ // Set the java util ...
java
public static void loggerInit(Level level, boolean isRedirectStdOutErr, String format) throws IOException { // Set the java util logging format setLoggingFormat(format); // Configure the root logger and its handlers so that all the // derived loggers will inherit the properties Logger rootLog...
[ "public", "static", "void", "loggerInit", "(", "Level", "level", ",", "boolean", "isRedirectStdOutErr", ",", "String", "format", ")", "throws", "IOException", "{", "// Set the java util logging format", "setLoggingFormat", "(", "format", ")", ";", "// Configure the root...
Init java util logging @param level the Level of message to log @param isRedirectStdOutErr whether we redirect std out&amp;err @param format the format to log
[ "Init", "java", "util", "logging" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/common/src/java/org/apache/heron/common/utils/logging/LoggingHelper.java#L67-L119