repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
Coveros/selenified
src/main/java/com/coveros/selenified/element/Element.java
Element.isScrolledTo
private void isScrolledTo(String action, String expected) { WebElement webElement = getWebElement(); long elementPosition = webElement.getLocation().getY(); JavascriptExecutor js = (JavascriptExecutor) driver; int scrollHeight = ((Number) js.executeScript("return document.documentElement...
java
private void isScrolledTo(String action, String expected) { WebElement webElement = getWebElement(); long elementPosition = webElement.getLocation().getY(); JavascriptExecutor js = (JavascriptExecutor) driver; int scrollHeight = ((Number) js.executeScript("return document.documentElement...
[ "private", "void", "isScrolledTo", "(", "String", "action", ",", "String", "expected", ")", "{", "WebElement", "webElement", "=", "getWebElement", "(", ")", ";", "long", "elementPosition", "=", "webElement", ".", "getLocation", "(", ")", ".", "getY", "(", ")...
Determines if the element scrolled towards is now currently displayed on the screen @param action - what is the action occurring @param expected - what is the expected outcome of said action
[ "Determines", "if", "the", "element", "scrolled", "towards", "is", "now", "currently", "displayed", "on", "the", "screen" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L1112-L1124
Waikato/moa
moa/src/main/java/weka/core/MOAUtils.java
MOAUtils.fromCommandLine
public static MOAObject fromCommandLine(Class requiredType, String commandline) { MOAObject result; String[] tmpOptions; String classname; try { tmpOptions = Utils.splitOptions(commandline); classname = tmpOptions[0]; tmpOptions[0] = ""; try { result = (MOAObject) Cl...
java
public static MOAObject fromCommandLine(Class requiredType, String commandline) { MOAObject result; String[] tmpOptions; String classname; try { tmpOptions = Utils.splitOptions(commandline); classname = tmpOptions[0]; tmpOptions[0] = ""; try { result = (MOAObject) Cl...
[ "public", "static", "MOAObject", "fromCommandLine", "(", "Class", "requiredType", ",", "String", "commandline", ")", "{", "MOAObject", "result", ";", "String", "[", "]", "tmpOptions", ";", "String", "classname", ";", "try", "{", "tmpOptions", "=", "Utils", "."...
Turns a commandline into an object (classname + optional options). @param requiredType the required class @param commandline the commandline to turn into an object @return the generated oblect
[ "Turns", "a", "commandline", "into", "an", "object", "(", "classname", "+", "optional", "options", ")", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/weka/core/MOAUtils.java#L54-L81
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java
MasterWorkerInfo.updateCapacityBytes
public void updateCapacityBytes(Map<String, Long> capacityBytesOnTiers) { mCapacityBytes = 0; mTotalBytesOnTiers = capacityBytesOnTiers; for (long t : mTotalBytesOnTiers.values()) { mCapacityBytes += t; } }
java
public void updateCapacityBytes(Map<String, Long> capacityBytesOnTiers) { mCapacityBytes = 0; mTotalBytesOnTiers = capacityBytesOnTiers; for (long t : mTotalBytesOnTiers.values()) { mCapacityBytes += t; } }
[ "public", "void", "updateCapacityBytes", "(", "Map", "<", "String", ",", "Long", ">", "capacityBytesOnTiers", ")", "{", "mCapacityBytes", "=", "0", ";", "mTotalBytesOnTiers", "=", "capacityBytesOnTiers", ";", "for", "(", "long", "t", ":", "mTotalBytesOnTiers", "...
Sets the capacity of the worker in bytes. @param capacityBytesOnTiers used bytes on each storage tier
[ "Sets", "the", "capacity", "of", "the", "worker", "in", "bytes", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java#L412-L418
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/factory/DecompositionFactory_DDRM.java
DecompositionFactory_DDRM.decomposeSafe
public static <T extends DMatrix> boolean decomposeSafe(DecompositionInterface<T> decomp, T M ) { if( decomp.inputModified() ) { return decomp.decompose(M.<T>copy()); } else { return decomp.decompose(M); } }
java
public static <T extends DMatrix> boolean decomposeSafe(DecompositionInterface<T> decomp, T M ) { if( decomp.inputModified() ) { return decomp.decompose(M.<T>copy()); } else { return decomp.decompose(M); } }
[ "public", "static", "<", "T", "extends", "DMatrix", ">", "boolean", "decomposeSafe", "(", "DecompositionInterface", "<", "T", ">", "decomp", ",", "T", "M", ")", "{", "if", "(", "decomp", ".", "inputModified", "(", ")", ")", "{", "return", "decomp", ".", ...
A simple convinience function that decomposes the matrix but automatically checks the input ti make sure is not being modified. @param decomp Decomposition which is being wrapped @param M THe matrix being decomposed. @param <T> Matrix type. @return If the decomposition was successful or not.
[ "A", "simple", "convinience", "function", "that", "decomposes", "the", "matrix", "but", "automatically", "checks", "the", "input", "ti", "make", "sure", "is", "not", "being", "modified", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/factory/DecompositionFactory_DDRM.java#L331-L337
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java
PoliciesCache.fromDir
public static PoliciesCache fromDir(File rootDir, final Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getDirProvider(rootDir),forcedContext); }
java
public static PoliciesCache fromDir(File rootDir, final Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getDirProvider(rootDir),forcedContext); }
[ "public", "static", "PoliciesCache", "fromDir", "(", "File", "rootDir", ",", "final", "Set", "<", "Attribute", ">", "forcedContext", ")", "{", "return", "fromSourceProvider", "(", "YamlProvider", ".", "getDirProvider", "(", "rootDir", ")", ",", "forcedContext", ...
Create a cache from a directory source @param rootDir base director @return cache
[ "Create", "a", "cache", "from", "a", "directory", "source" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java#L197-L199
outbrain/ob1k
ob1k-concurrent/src/main/java/com/outbrain/ob1k/concurrent/ComposableFutures.java
ComposableFutures.submit
public static <T> ComposableFuture<T> submit(final Callable<T> task) { return submit(false, task); }
java
public static <T> ComposableFuture<T> submit(final Callable<T> task) { return submit(false, task); }
[ "public", "static", "<", "T", ">", "ComposableFuture", "<", "T", ">", "submit", "(", "final", "Callable", "<", "T", ">", "task", ")", "{", "return", "submit", "(", "false", ",", "task", ")", ";", "}" ]
sends a callable task to the default thread pool and returns a ComposableFuture that represent the result. @param task the task to run. @param <T> the future type @return a future representing the result.
[ "sends", "a", "callable", "task", "to", "the", "default", "thread", "pool", "and", "returns", "a", "ComposableFuture", "that", "represent", "the", "result", "." ]
train
https://github.com/outbrain/ob1k/blob/9e43ab39230c5787065053da0f766d822d0fe4e7/ob1k-concurrent/src/main/java/com/outbrain/ob1k/concurrent/ComposableFutures.java#L415-L417
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/layer/vector/GetFeaturesEachStep.java
GetFeaturesEachStep.findStyleFilter
private StyleFilter findStyleFilter(Object feature, List<StyleFilter> styles) { for (StyleFilter styleFilter : styles) { if (styleFilter.getFilter().evaluate(feature)) { return styleFilter; } } return new StyleFilterImpl(); }
java
private StyleFilter findStyleFilter(Object feature, List<StyleFilter> styles) { for (StyleFilter styleFilter : styles) { if (styleFilter.getFilter().evaluate(feature)) { return styleFilter; } } return new StyleFilterImpl(); }
[ "private", "StyleFilter", "findStyleFilter", "(", "Object", "feature", ",", "List", "<", "StyleFilter", ">", "styles", ")", "{", "for", "(", "StyleFilter", "styleFilter", ":", "styles", ")", "{", "if", "(", "styleFilter", ".", "getFilter", "(", ")", ".", "...
Find the style filter that must be applied to this feature. @param feature feature to find the style for @param styles style filters to select from @return a style filter
[ "Find", "the", "style", "filter", "that", "must", "be", "applied", "to", "this", "feature", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/layer/vector/GetFeaturesEachStep.java#L228-L235
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java
ContainerBase.addNestedJarFileResource
private T addNestedJarFileResource(final File resource, final ArchivePath target, final ArchivePath base) throws IllegalArgumentException { final Iterable<ClassLoader> classLoaders = ((Configurable) this.getArchive()).getConfiguration() .getClassLoaders(); for (final ClassLoader cla...
java
private T addNestedJarFileResource(final File resource, final ArchivePath target, final ArchivePath base) throws IllegalArgumentException { final Iterable<ClassLoader> classLoaders = ((Configurable) this.getArchive()).getConfiguration() .getClassLoaders(); for (final ClassLoader cla...
[ "private", "T", "addNestedJarFileResource", "(", "final", "File", "resource", ",", "final", "ArchivePath", "target", ",", "final", "ArchivePath", "base", ")", "throws", "IllegalArgumentException", "{", "final", "Iterable", "<", "ClassLoader", ">", "classLoaders", "=...
Adds the specified {@link File} resource (a nested JAR File form) to the current archive, returning the archive itself @param resource @param target @return @throws IllegalArgumentException
[ "Adds", "the", "specified", "{", "@link", "File", "}", "resource", "(", "a", "nested", "JAR", "File", "form", ")", "to", "the", "current", "archive", "returning", "the", "archive", "itself" ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java#L799-L812
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMinValue
public void setMinValue(final double MIN_VALUE) { // check min-max values if (Double.compare(MIN_VALUE, maxValue) == 0) { throw new IllegalArgumentException("Min value cannot be equal to max value"); } if (Double.compare(MIN_VALUE, maxValue) > 0) { minValue = max...
java
public void setMinValue(final double MIN_VALUE) { // check min-max values if (Double.compare(MIN_VALUE, maxValue) == 0) { throw new IllegalArgumentException("Min value cannot be equal to max value"); } if (Double.compare(MIN_VALUE, maxValue) > 0) { minValue = max...
[ "public", "void", "setMinValue", "(", "final", "double", "MIN_VALUE", ")", "{", "// check min-max values", "if", "(", "Double", ".", "compare", "(", "MIN_VALUE", ",", "maxValue", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Min...
Sets the minium value that will be used for the calculation of the nice minimum value for the scale. @param MIN_VALUE
[ "Sets", "the", "minium", "value", "that", "will", "be", "used", "for", "the", "calculation", "of", "the", "nice", "minimum", "value", "for", "the", "scale", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L355-L371
knowm/XChange
xchange-bitso/src/main/java/org/knowm/xchange/bitso/BitsoAdapters.java
BitsoAdapters.adaptTrades
public static Trades adaptTrades(BitsoTransaction[] transactions, CurrencyPair currencyPair) { List<Trade> trades = new ArrayList<>(); long lastTradeId = 0; for (BitsoTransaction tx : transactions) { Order.OrderType type; switch (tx.getSide()) { case "buy": type = Order.OrderT...
java
public static Trades adaptTrades(BitsoTransaction[] transactions, CurrencyPair currencyPair) { List<Trade> trades = new ArrayList<>(); long lastTradeId = 0; for (BitsoTransaction tx : transactions) { Order.OrderType type; switch (tx.getSide()) { case "buy": type = Order.OrderT...
[ "public", "static", "Trades", "adaptTrades", "(", "BitsoTransaction", "[", "]", "transactions", ",", "CurrencyPair", "currencyPair", ")", "{", "List", "<", "Trade", ">", "trades", "=", "new", "ArrayList", "<>", "(", ")", ";", "long", "lastTradeId", "=", "0",...
Adapts a Transaction[] to a Trades Object @param transactions The Bitso transactions @param currencyPair (e.g. BTC/MXN) @return The XChange Trades
[ "Adapts", "a", "Transaction", "[]", "to", "a", "Trades", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-bitso/src/main/java/org/knowm/xchange/bitso/BitsoAdapters.java#L105-L136
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.customMethod
public static void customMethod(String methodType,String methodName, Class<?> clazz){ String completeName = clazz.getCanonicalName(); String packageName = clazz.getPackage().getName(); String className = completeName.substring(packageName.length()+1); throw new MalformedBeanException(MSG.INSTANCE.message(cu...
java
public static void customMethod(String methodType,String methodName, Class<?> clazz){ String completeName = clazz.getCanonicalName(); String packageName = clazz.getPackage().getName(); String className = completeName.substring(packageName.length()+1); throw new MalformedBeanException(MSG.INSTANCE.message(cu...
[ "public", "static", "void", "customMethod", "(", "String", "methodType", ",", "String", "methodName", ",", "Class", "<", "?", ">", "clazz", ")", "{", "String", "completeName", "=", "clazz", ".", "getCanonicalName", "(", ")", ";", "String", "packageName", "="...
Thrown when the bean doesn't respect the javabean conventions. @param methodType method type @param methodName name of the method doesn't exist @param clazz class when this method isn't present
[ "Thrown", "when", "the", "bean", "doesn", "t", "respect", "the", "javabean", "conventions", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L423-L428
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/TimecodeBuilder.java
TimecodeBuilder.compensateForDropFrame
static long compensateForDropFrame(final long framenumber, final double framerate) { //Code by David Heidelberger, adapted from Andrew Duncan //Number of frames to drop on the minute marks is the nearest integer to 6% of the framerate final long dropFrames = Math.round(framerate * .066666); final long frames...
java
static long compensateForDropFrame(final long framenumber, final double framerate) { //Code by David Heidelberger, adapted from Andrew Duncan //Number of frames to drop on the minute marks is the nearest integer to 6% of the framerate final long dropFrames = Math.round(framerate * .066666); final long frames...
[ "static", "long", "compensateForDropFrame", "(", "final", "long", "framenumber", ",", "final", "double", "framerate", ")", "{", "//Code by David Heidelberger, adapted from Andrew Duncan", "//Number of frames to drop on the minute marks is the nearest integer to 6% of the framerate", "f...
@param framenumber @param framerate should be 29.97, 59.94, or 23.976, otherwise the calculations will be off. @return a frame number that lets us use non-dropframe computations to extract time components
[ "@param", "framenumber", "@param", "framerate", "should", "be", "29", ".", "97", "59", ".", "94", "or", "23", ".", "976", "otherwise", "the", "calculations", "will", "be", "off", "." ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/TimecodeBuilder.java#L375-L393
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_externalContact_externalEmailAddress_GET
public OvhExternalContact service_externalContact_externalEmailAddress_GET(String service, String externalEmailAddress) throws IOException { String qPath = "/email/pro/{service}/externalContact/{externalEmailAddress}"; StringBuilder sb = path(qPath, service, externalEmailAddress); String resp = exec(qPath, "GET",...
java
public OvhExternalContact service_externalContact_externalEmailAddress_GET(String service, String externalEmailAddress) throws IOException { String qPath = "/email/pro/{service}/externalContact/{externalEmailAddress}"; StringBuilder sb = path(qPath, service, externalEmailAddress); String resp = exec(qPath, "GET",...
[ "public", "OvhExternalContact", "service_externalContact_externalEmailAddress_GET", "(", "String", "service", ",", "String", "externalEmailAddress", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/pro/{service}/externalContact/{externalEmailAddress}\"", ";", ...
Get this object properties REST: GET /email/pro/{service}/externalContact/{externalEmailAddress} @param service [required] The internal name of your pro organization @param externalEmailAddress [required] Contact email API beta
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L76-L81
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
TimestampUtils.toLocalDateTimeBin
public LocalDateTime toLocalDateTimeBin(TimeZone tz, byte[] bytes) throws PSQLException { ParsedBinaryTimestamp parsedTimestamp = this.toParsedTimestampBin(tz, bytes, true); if (parsedTimestamp.infinity == Infinity.POSITIVE) { return LocalDateTime.MAX; } else if (parsedTimestamp.infinity == Infinity....
java
public LocalDateTime toLocalDateTimeBin(TimeZone tz, byte[] bytes) throws PSQLException { ParsedBinaryTimestamp parsedTimestamp = this.toParsedTimestampBin(tz, bytes, true); if (parsedTimestamp.infinity == Infinity.POSITIVE) { return LocalDateTime.MAX; } else if (parsedTimestamp.infinity == Infinity....
[ "public", "LocalDateTime", "toLocalDateTimeBin", "(", "TimeZone", "tz", ",", "byte", "[", "]", "bytes", ")", "throws", "PSQLException", "{", "ParsedBinaryTimestamp", "parsedTimestamp", "=", "this", ".", "toParsedTimestampBin", "(", "tz", ",", "bytes", ",", "true",...
Returns the local date time object matching the given bytes with {@link Oid#TIMESTAMP} or {@link Oid#TIMESTAMPTZ}. @param tz time zone to use @param bytes The binary encoded local date time value. @return The parsed local date time object. @throws PSQLException If binary format could not be parsed.
[ "Returns", "the", "local", "date", "time", "object", "matching", "the", "given", "bytes", "with", "{", "@link", "Oid#TIMESTAMP", "}", "or", "{", "@link", "Oid#TIMESTAMPTZ", "}", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java#L1133-L1143
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/RemoveLeadingOperation.java
RemoveLeadingOperation.performRemoveLeading
private String performRemoveLeading(String source, Integer length, Matcher matcher) { if (length != null && length != 0) { matcher.region(0, length); } if (matcher.find()) { String matched = matcher.group(); return source.substring(matched.length()); }...
java
private String performRemoveLeading(String source, Integer length, Matcher matcher) { if (length != null && length != 0) { matcher.region(0, length); } if (matcher.find()) { String matched = matcher.group(); return source.substring(matched.length()); }...
[ "private", "String", "performRemoveLeading", "(", "String", "source", ",", "Integer", "length", ",", "Matcher", "matcher", ")", "{", "if", "(", "length", "!=", "null", "&&", "length", "!=", "0", ")", "{", "matcher", ".", "region", "(", "0", ",", "length"...
Perform the remove leading operation. Returns the original string if the matcher does not match with the string
[ "Perform", "the", "remove", "leading", "operation", ".", "Returns", "the", "original", "string", "if", "the", "matcher", "does", "not", "match", "with", "the", "string" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/RemoveLeadingOperation.java#L75-L84
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java
AdHocCommandManager.respondError
private static IQ respondError(AdHocCommandData response, StanzaError.Builder error) { response.setType(IQ.Type.error); response.setError(error); return response; }
java
private static IQ respondError(AdHocCommandData response, StanzaError.Builder error) { response.setType(IQ.Type.error); response.setError(error); return response; }
[ "private", "static", "IQ", "respondError", "(", "AdHocCommandData", "response", ",", "StanzaError", ".", "Builder", "error", ")", "{", "response", ".", "setType", "(", "IQ", ".", "Type", ".", "error", ")", ";", "response", ".", "setError", "(", "error", ")...
Responds an error with an specific error. @param response the response to send. @param error the error to send. @throws NotConnectedException
[ "Responds", "an", "error", "with", "an", "specific", "error", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java#L594-L598
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setLocalName
public void setLocalName (int index, String localName) { if (index >= 0 && index < length) { data[index*5+1] = localName; } else { badIndex(index); } }
java
public void setLocalName (int index, String localName) { if (index >= 0 && index < length) { data[index*5+1] = localName; } else { badIndex(index); } }
[ "public", "void", "setLocalName", "(", "int", "index", ",", "String", "localName", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "1", "]", "=", "localName", ";", "}", "else", ...
Set the local name of a specific attribute. @param index The index of the attribute (zero-based). @param localName The attribute's local name, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "local", "name", "of", "a", "specific", "attribute", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L486-L493
sitoolkit/sit-wt-all
sit-wt-runtime/src/main/java/io/sitoolkit/wt/domain/evidence/LogRecord.java
LogRecord.create
public static LogRecord create(SitLogger logger, ElementPosition position, TestStep testStep, MessagePattern pattern, Object... params) { Object[] newParams = new Object[] { testStep.getItemName(), testStep.getLocator() }; newParams = ArrayUtils.addAll(newParams, params); ret...
java
public static LogRecord create(SitLogger logger, ElementPosition position, TestStep testStep, MessagePattern pattern, Object... params) { Object[] newParams = new Object[] { testStep.getItemName(), testStep.getLocator() }; newParams = ArrayUtils.addAll(newParams, params); ret...
[ "public", "static", "LogRecord", "create", "(", "SitLogger", "logger", ",", "ElementPosition", "position", ",", "TestStep", "testStep", ",", "MessagePattern", "pattern", ",", "Object", "...", "params", ")", "{", "Object", "[", "]", "newParams", "=", "new", "Ob...
次のメッセージを持つ操作ログオブジェクトを作成します。 @param logger ロガー @param position 要素位置 @param testStep テストステップ @param pattern メッセージパターン @param params メッセージパラメーター @return 操作ログ
[ "次のメッセージを持つ操作ログオブジェクトを作成します。" ]
train
https://github.com/sitoolkit/sit-wt-all/blob/efabde27aa731a5602d2041e137721a22f4fd27a/sit-wt-runtime/src/main/java/io/sitoolkit/wt/domain/evidence/LogRecord.java#L102-L109
dyu/protostuff-1.0.x
protostuff-model-json/src/main/java/com/dyuproject/protostuff/json/ReflectionJSON.java
ReflectionJSON.getField
protected Field getField(String name, Model<Field> model) throws IOException { return model.getProperty(name); }
java
protected Field getField(String name, Model<Field> model) throws IOException { return model.getProperty(name); }
[ "protected", "Field", "getField", "(", "String", "name", ",", "Model", "<", "Field", ">", "model", ")", "throws", "IOException", "{", "return", "model", ".", "getProperty", "(", "name", ")", ";", "}" ]
/* public <T extends MessageLite, B extends Builder> LiteConvertor getConvertor(Class<?> messageType) { return _convertors.get(messageType.getName()); }
[ "/", "*", "public", "<T", "extends", "MessageLite", "B", "extends", "Builder", ">", "LiteConvertor", "getConvertor", "(", "Class<?", ">", "messageType", ")", "{", "return", "_convertors", ".", "get", "(", "messageType", ".", "getName", "()", ")", ";", "}" ]
train
https://github.com/dyu/protostuff-1.0.x/blob/d7c964ec20da3fe44699d86ee95c2677ddffde96/protostuff-model-json/src/main/java/com/dyuproject/protostuff/json/ReflectionJSON.java#L141-L144
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/TableCellBox.java
TableCellBox.applyVerticalAlign
public void applyVerticalAlign(int origHeight, int newHeight, int baseline) { int yofs = 0; CSSProperty.VerticalAlign valign = style.getProperty("vertical-align"); if (valign == null) valign = CSSProperty.VerticalAlign.MIDDLE; switch (valign) { case TOP: yofs = 0;...
java
public void applyVerticalAlign(int origHeight, int newHeight, int baseline) { int yofs = 0; CSSProperty.VerticalAlign valign = style.getProperty("vertical-align"); if (valign == null) valign = CSSProperty.VerticalAlign.MIDDLE; switch (valign) { case TOP: yofs = 0;...
[ "public", "void", "applyVerticalAlign", "(", "int", "origHeight", ",", "int", "newHeight", ",", "int", "baseline", ")", "{", "int", "yofs", "=", "0", ";", "CSSProperty", ".", "VerticalAlign", "valign", "=", "style", ".", "getProperty", "(", "\"vertical-align\"...
Applies the vertical alignment after the row height is computed. Moves all child boxes according to the vertical-align value of the cell and the difference between the original height (after the cell layout) and the new (required by the row) height. @param origHeight the original cell height obtained from the content l...
[ "Applies", "the", "vertical", "alignment", "after", "the", "row", "height", "is", "computed", ".", "Moves", "all", "child", "boxes", "according", "to", "the", "vertical", "-", "align", "value", "of", "the", "cell", "and", "the", "difference", "between", "the...
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/TableCellBox.java#L220-L239
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
OtpOutputStream.write_port
public void write_port(final String node, final int id, final int creation) { write1(OtpExternal.portTag); write_atom(node); write4BE(id & 0xfffffff); // 28 bits write1(creation & 0x3); // 2 bits }
java
public void write_port(final String node, final int id, final int creation) { write1(OtpExternal.portTag); write_atom(node); write4BE(id & 0xfffffff); // 28 bits write1(creation & 0x3); // 2 bits }
[ "public", "void", "write_port", "(", "final", "String", "node", ",", "final", "int", "id", ",", "final", "int", "creation", ")", "{", "write1", "(", "OtpExternal", ".", "portTag", ")", ";", "write_atom", "(", "node", ")", ";", "write4BE", "(", "id", "&...
Write an Erlang port to the stream. @param node the nodename. @param id an arbitrary number. Only the low order 28 bits will be used. @param creation another arbitrary number. Only the low order 2 bits will be used.
[ "Write", "an", "Erlang", "port", "to", "the", "stream", "." ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L760-L765
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/json/JsonObject.java
JsonObject.getLong
public long getLong(String name, long defaultValue) { JsonValue value = get(name); return value != null ? value.asLong() : defaultValue; }
java
public long getLong(String name, long defaultValue) { JsonValue value = get(name); return value != null ? value.asLong() : defaultValue; }
[ "public", "long", "getLong", "(", "String", "name", ",", "long", "defaultValue", ")", "{", "JsonValue", "value", "=", "get", "(", "name", ")", ";", "return", "value", "!=", "null", "?", "value", ".", "asLong", "(", ")", ":", "defaultValue", ";", "}" ]
Returns the <code>long</code> value of the member with the specified name in this object. If this object does not contain a member with this name, the given default value is returned. If this object contains multiple members with the given name, the last one will be picked. If this member's value does not represent a J...
[ "Returns", "the", "<code", ">", "long<", "/", "code", ">", "value", "of", "the", "member", "with", "the", "specified", "name", "in", "this", "object", ".", "If", "this", "object", "does", "not", "contain", "a", "member", "with", "this", "name", "the", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/json/JsonObject.java#L600-L603
JodaOrg/joda-time
src/main/java/org/joda/time/field/BaseDateTimeField.java
BaseDateTimeField.convertText
protected int convertText(String text, Locale locale) { try { return Integer.parseInt(text); } catch (NumberFormatException ex) { throw new IllegalFieldValueException(getType(), text); } }
java
protected int convertText(String text, Locale locale) { try { return Integer.parseInt(text); } catch (NumberFormatException ex) { throw new IllegalFieldValueException(getType(), text); } }
[ "protected", "int", "convertText", "(", "String", "text", ",", "Locale", "locale", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "text", ")", ";", "}", "catch", "(", "NumberFormatException", "ex", ")", "{", "throw", "new", "IllegalFieldV...
Convert the specified text and locale into a value. @param text the text to convert @param locale the locale to convert using @return the value extracted from the text @throws IllegalArgumentException if the text is invalid
[ "Convert", "the", "specified", "text", "and", "locale", "into", "a", "value", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/field/BaseDateTimeField.java#L666-L672
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getCustomEntityRoleAsync
public Observable<EntityRole> getCustomEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { return getCustomEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).map(new Func1<ServiceResponse<EntityRole>, EntityRole>() { @Override public EntityRole...
java
public Observable<EntityRole> getCustomEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { return getCustomEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).map(new Func1<ServiceResponse<EntityRole>, EntityRole>() { @Override public EntityRole...
[ "public", "Observable", "<", "EntityRole", ">", "getCustomEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ")", "{", "return", "getCustomEntityRoleWithServiceResponseAsync", "(", "appId", ",", "versi...
Get one entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity ID. @param roleId entity role ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the EntityRole object
[ "Get", "one", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13592-L13599
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/JavaSerializationTranscoder.java
JavaSerializationTranscoder.deserializeAttributes
@Override public ConcurrentMap<String, Object> deserializeAttributes(final byte[] in ) { ByteArrayInputStream bis = null; ObjectInputStream ois = null; try { bis = new ByteArrayInputStream( in ); ois = createObjectInputStream( bis ); final ConcurrentMap<S...
java
@Override public ConcurrentMap<String, Object> deserializeAttributes(final byte[] in ) { ByteArrayInputStream bis = null; ObjectInputStream ois = null; try { bis = new ByteArrayInputStream( in ); ois = createObjectInputStream( bis ); final ConcurrentMap<S...
[ "@", "Override", "public", "ConcurrentMap", "<", "String", ",", "Object", ">", "deserializeAttributes", "(", "final", "byte", "[", "]", "in", ")", "{", "ByteArrayInputStream", "bis", "=", "null", ";", "ObjectInputStream", "ois", "=", "null", ";", "try", "{",...
Get the object represented by the given serialized bytes. @param in the bytes to deserialize @return the resulting object
[ "Get", "the", "object", "represented", "by", "the", "given", "serialized", "bytes", "." ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/JavaSerializationTranscoder.java#L161-L194
stratosphere/stratosphere
stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java
VertexCentricIteration.registerAggregator
public void registerAggregator(String name, Class<? extends Aggregator<?>> aggregator) { this.aggregators.put(name, aggregator); }
java
public void registerAggregator(String name, Class<? extends Aggregator<?>> aggregator) { this.aggregators.put(name, aggregator); }
[ "public", "void", "registerAggregator", "(", "String", "name", ",", "Class", "<", "?", "extends", "Aggregator", "<", "?", ">", ">", "aggregator", ")", "{", "this", ".", "aggregators", ".", "put", "(", "name", ",", "aggregator", ")", ";", "}" ]
Registers a new aggregator. Aggregators registered here are available during the execution of the vertex updates via {@link VertexUpdateFunction#getIterationAggregator(String)} and {@link VertexUpdateFunction#getPreviousIterationAggregate(String)}. @param name The name of the aggregator, used to retrieve it and its ag...
[ "Registers", "a", "new", "aggregator", ".", "Aggregators", "registered", "here", "are", "available", "during", "the", "execution", "of", "the", "vertex", "updates", "via", "{", "@link", "VertexUpdateFunction#getIterationAggregator", "(", "String", ")", "}", "and", ...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java#L170-L172
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONCompare.java
JSONCompare.compareJSON
public static JSONCompareResult compareJSON(String expectedStr, String actualStr, JSONComparator comparator) throws JSONException { Object expected = JSONParser.parseJSON(expectedStr); Object actual = JSONParser.parseJSON(actualStr); if ((expected instanceof JSONObject) && (actual in...
java
public static JSONCompareResult compareJSON(String expectedStr, String actualStr, JSONComparator comparator) throws JSONException { Object expected = JSONParser.parseJSON(expectedStr); Object actual = JSONParser.parseJSON(actualStr); if ((expected instanceof JSONObject) && (actual in...
[ "public", "static", "JSONCompareResult", "compareJSON", "(", "String", "expectedStr", ",", "String", "actualStr", ",", "JSONComparator", "comparator", ")", "throws", "JSONException", "{", "Object", "expected", "=", "JSONParser", ".", "parseJSON", "(", "expectedStr", ...
Compares JSON string provided to the expected JSON string using provided comparator, and returns the results of the comparison. @param expectedStr Expected JSON string @param actualStr JSON string to compare @param comparator Comparator to use @return result of the comparison @throws JSONException JSON parsing error @t...
[ "Compares", "JSON", "string", "provided", "to", "the", "expected", "JSON", "string", "using", "provided", "comparator", "and", "returns", "the", "results", "of", "the", "comparison", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONCompare.java#L47-L66
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.createSnapshot
public CreateSnapshotResponse createSnapshot(String volumeId, String snapshotName, String desc) { return this.createSnapshot(new CreateSnapshotRequest() .withVolumeId(volumeId).withSnapshotName(snapshotName).withDesc(desc)); }
java
public CreateSnapshotResponse createSnapshot(String volumeId, String snapshotName, String desc) { return this.createSnapshot(new CreateSnapshotRequest() .withVolumeId(volumeId).withSnapshotName(snapshotName).withDesc(desc)); }
[ "public", "CreateSnapshotResponse", "createSnapshot", "(", "String", "volumeId", ",", "String", "snapshotName", ",", "String", "desc", ")", "{", "return", "this", ".", "createSnapshot", "(", "new", "CreateSnapshotRequest", "(", ")", ".", "withVolumeId", "(", "volu...
Creating snapshot from specified volume. You can create snapshot from system volume and CDS volume. While creating snapshot from system volume,the instance must be Running or Stopped, otherwise,it's will get <code>409</code> errorCode. While creating snapshot from CDS volume,,the volume must be InUs or Available, othe...
[ "Creating", "snapshot", "from", "specified", "volume", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1386-L1389
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java
ServicesInner.checkNameAvailability
public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); }
java
public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); }
[ "public", "NameAvailabilityResponseInner", "checkNameAvailability", "(", "String", "location", ",", "NameAvailabilityRequest", "parameters", ")", "{", "return", "checkNameAvailabilityWithServiceResponseAsync", "(", "location", ",", "parameters", ")", ".", "toBlocking", "(", ...
Check name validity and availability. This method checks whether a proposed top-level resource name is valid and available. @param location The Azure region of the operation @param parameters Requested name to validate @throws IllegalArgumentException thrown if parameters fail the validation @throws ApiErrorException ...
[ "Check", "name", "validity", "and", "availability", ".", "This", "method", "checks", "whether", "a", "proposed", "top", "-", "level", "resource", "name", "is", "valid", "and", "available", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L1812-L1814
amlinv/amq-monitor
amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsCollection.java
QueueStatisticsCollection.updateRates
protected void updateRates (QueueStatMeasurements rateMeasurements, long dequeueCountDelta, long enqueueCountDelta) { double oldDequeueRateOneMinute = rateMeasurements.messageRates.getOneMinuteAverageDequeueRate(); double oldDequeueRateOneHour = rateMeasurements.messageRates.getOneHourAverageDequeueRate...
java
protected void updateRates (QueueStatMeasurements rateMeasurements, long dequeueCountDelta, long enqueueCountDelta) { double oldDequeueRateOneMinute = rateMeasurements.messageRates.getOneMinuteAverageDequeueRate(); double oldDequeueRateOneHour = rateMeasurements.messageRates.getOneHourAverageDequeueRate...
[ "protected", "void", "updateRates", "(", "QueueStatMeasurements", "rateMeasurements", ",", "long", "dequeueCountDelta", ",", "long", "enqueueCountDelta", ")", "{", "double", "oldDequeueRateOneMinute", "=", "rateMeasurements", ".", "messageRates", ".", "getOneMinuteAverageDe...
Update message rates given the change in dequeue and enqueue counts for one broker queue. @param rateMeasurements measurements for one broker queue. @param dequeueCountDelta change in the dequeue count since the last measurement for the same broker queue. @param enqueueCountDelta change in the enqueue count since the ...
[ "Update", "message", "rates", "given", "the", "change", "in", "dequeue", "and", "enqueue", "counts", "for", "one", "broker", "queue", "." ]
train
https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsCollection.java#L158-L208
qiniu/android-sdk
library/src/main/java/com/qiniu/android/storage/UploadManager.java
UploadManager.syncPut
public ResponseInfo syncPut(File file, String key, String token, UploadOptions options) { final UpToken decodedToken = UpToken.parse(token); ResponseInfo info = areInvalidArg(key, null, file, token, decodedToken); if (info != null) { return info; } return FormUploader...
java
public ResponseInfo syncPut(File file, String key, String token, UploadOptions options) { final UpToken decodedToken = UpToken.parse(token); ResponseInfo info = areInvalidArg(key, null, file, token, decodedToken); if (info != null) { return info; } return FormUploader...
[ "public", "ResponseInfo", "syncPut", "(", "File", "file", ",", "String", "key", ",", "String", "token", ",", "UploadOptions", "options", ")", "{", "final", "UpToken", "decodedToken", "=", "UpToken", ".", "parse", "(", "token", ")", ";", "ResponseInfo", "info...
同步上传文件。使用 form 表单方式上传,建议只在文件较小情况下使用此方式,如 file.size() < 1024 * 1024。 @param file 上传的文件对象 @param key 上传数据保存的文件名 @param token 上传凭证 @param options 上传数据的可选参数 @return 响应信息 ResponseInfo#response 响应体,序列化后 json 格式
[ "同步上传文件。使用", "form", "表单方式上传,建议只在文件较小情况下使用此方式,如", "file", ".", "size", "()", "<", "1024", "*", "1024。" ]
train
https://github.com/qiniu/android-sdk/blob/dbd2a01fb3bff7a5e75e8934bbf81713124d8466/library/src/main/java/com/qiniu/android/storage/UploadManager.java#L219-L226
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPChannel.java
TCPChannel.setup
public ChannelTermination setup(ChannelData runtimeConfig, TCPChannelConfiguration tcpConfig, TCPChannelFactory factory) throws ChannelException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "setup"); } this.channelFactory = factory; this.c...
java
public ChannelTermination setup(ChannelData runtimeConfig, TCPChannelConfiguration tcpConfig, TCPChannelFactory factory) throws ChannelException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "setup"); } this.channelFactory = factory; this.c...
[ "public", "ChannelTermination", "setup", "(", "ChannelData", "runtimeConfig", ",", "TCPChannelConfiguration", "tcpConfig", ",", "TCPChannelFactory", "factory", ")", "throws", "ChannelException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&...
Initialize this channel. @param runtimeConfig @param tcpConfig @param factory @return ChannelTermination @throws ChannelException
[ "Initialize", "this", "channel", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPChannel.java#L124-L156
kiegroup/drools
drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java
KnowledgeBaseImpl.populateGlobalsMap
private void populateGlobalsMap(Map<String, String> globs) throws ClassNotFoundException { this.globals = new HashMap<String, Class<?>>(); for (Map.Entry<String, String> entry : globs.entrySet()) { addGlobal( entry.getKey(), this.rootClassLoader.loadClass( entry.getVal...
java
private void populateGlobalsMap(Map<String, String> globs) throws ClassNotFoundException { this.globals = new HashMap<String, Class<?>>(); for (Map.Entry<String, String> entry : globs.entrySet()) { addGlobal( entry.getKey(), this.rootClassLoader.loadClass( entry.getVal...
[ "private", "void", "populateGlobalsMap", "(", "Map", "<", "String", ",", "String", ">", "globs", ")", "throws", "ClassNotFoundException", "{", "this", ".", "globals", "=", "new", "HashMap", "<", "String", ",", "Class", "<", "?", ">", ">", "(", ")", ";", ...
globals class types must be re-wired after serialization @throws ClassNotFoundException
[ "globals", "class", "types", "must", "be", "re", "-", "wired", "after", "serialization" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java#L588-L594
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginSetFlowLogConfiguration
public FlowLogInformationInner beginSetFlowLogConfiguration(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { return beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
java
public FlowLogInformationInner beginSetFlowLogConfiguration(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { return beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
[ "public", "FlowLogInformationInner", "beginSetFlowLogConfiguration", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "FlowLogInformationInner", "parameters", ")", "{", "return", "beginSetFlowLogConfigurationWithServiceResponseAsync", "(", "resourceGrou...
Configures flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the configuration of flow log. @throws IllegalArgumentException thrown if parameters fail th...
[ "Configures", "flow", "log", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1877-L1879
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/BeanContext.java
BeanContext.getBeanMap
public BeanMap getBeanMap(Object bean, boolean failOnNulls) throws BeanContextException { BeanPropertyAccessor accessor = BeanPropertyAccessor.forClass(bean.getClass()); return new BeanMap(bean, accessor, failOnNulls); }
java
public BeanMap getBeanMap(Object bean, boolean failOnNulls) throws BeanContextException { BeanPropertyAccessor accessor = BeanPropertyAccessor.forClass(bean.getClass()); return new BeanMap(bean, accessor, failOnNulls); }
[ "public", "BeanMap", "getBeanMap", "(", "Object", "bean", ",", "boolean", "failOnNulls", ")", "throws", "BeanContextException", "{", "BeanPropertyAccessor", "accessor", "=", "BeanPropertyAccessor", ".", "forClass", "(", "bean", ".", "getClass", "(", ")", ")", ";",...
Get an object wrapping the given bean that allows dynamic property lookups. The <code>failOnNulls</code> parameter may be used to cause an exception to be thrown when portions of the composite graph are <code>null</code>. <code>bean = getBeanMap(bean); bean['name']</code> @param bean The bean to wrap and return @par...
[ "Get", "an", "object", "wrapping", "the", "given", "bean", "that", "allows", "dynamic", "property", "lookups", ".", "The", "<code", ">", "failOnNulls<", "/", "code", ">", "parameter", "may", "be", "used", "to", "cause", "an", "exception", "to", "be", "thro...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/BeanContext.java#L88-L94
lucee/Lucee
core/src/main/java/lucee/commons/io/compress/CompressUtil.java
CompressUtil.compressTar
public static void compressTar(Resource[] sources, Resource target, int mode) throws IOException { compressTar(sources, IOUtil.toBufferedOutputStream(target.getOutputStream()), mode); }
java
public static void compressTar(Resource[] sources, Resource target, int mode) throws IOException { compressTar(sources, IOUtil.toBufferedOutputStream(target.getOutputStream()), mode); }
[ "public", "static", "void", "compressTar", "(", "Resource", "[", "]", "sources", ",", "Resource", "target", ",", "int", "mode", ")", "throws", "IOException", "{", "compressTar", "(", "sources", ",", "IOUtil", ".", "toBufferedOutputStream", "(", "target", ".", ...
compress a source file/directory to a tar file @param sources @param target @param mode @throws IOException
[ "compress", "a", "source", "file", "/", "directory", "to", "a", "tar", "file" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/compress/CompressUtil.java#L543-L545
attoparser/attoparser
src/main/java/org/attoparser/dom/StructureTextsRepository.java
StructureTextsRepository.getStructureName
static String getStructureName(final char[] buffer, final int offset, final int len) { final int index = TextUtil.binarySearch(true, ALL_STANDARD_NAMES, buffer, offset, len); if (index < 0) { return new String(buffer, offset, len); } return ALL_STANDARD_NAMES[index]; }
java
static String getStructureName(final char[] buffer, final int offset, final int len) { final int index = TextUtil.binarySearch(true, ALL_STANDARD_NAMES, buffer, offset, len); if (index < 0) { return new String(buffer, offset, len); } return ALL_STANDARD_NAMES[index]; }
[ "static", "String", "getStructureName", "(", "final", "char", "[", "]", "buffer", ",", "final", "int", "offset", ",", "final", "int", "len", ")", "{", "final", "int", "index", "=", "TextUtil", ".", "binarySearch", "(", "true", ",", "ALL_STANDARD_NAMES", ",...
This method will try to avoid creating new strings for each structure name (element/attribute)
[ "This", "method", "will", "try", "to", "avoid", "creating", "new", "strings", "for", "each", "structure", "name", "(", "element", "/", "attribute", ")" ]
train
https://github.com/attoparser/attoparser/blob/d2e8c1d822e290b0ce0242aff6e56ebdb9ca74b0/src/main/java/org/attoparser/dom/StructureTextsRepository.java#L139-L148
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.createPermissionProfile
public PermissionProfile createPermissionProfile(String accountId, PermissionProfile permissionProfile) throws ApiException { return createPermissionProfile(accountId, permissionProfile, null); }
java
public PermissionProfile createPermissionProfile(String accountId, PermissionProfile permissionProfile) throws ApiException { return createPermissionProfile(accountId, permissionProfile, null); }
[ "public", "PermissionProfile", "createPermissionProfile", "(", "String", "accountId", ",", "PermissionProfile", "permissionProfile", ")", "throws", "ApiException", "{", "return", "createPermissionProfile", "(", "accountId", ",", "permissionProfile", ",", "null", ")", ";",...
Creates a new permission profile in the specified account. @param accountId The external account number (int) or account ID Guid. (required) @param permissionProfile (optional) @return PermissionProfile
[ "Creates", "a", "new", "permission", "profile", "in", "the", "specified", "account", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L274-L276
seam/faces
impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java
BeanManagerUtils.getContextualInstanceStrict
@SuppressWarnings("unchecked") public static <T> T getContextualInstanceStrict(final BeanManager manager, final Class<T> type) { T result = null; Bean<T> bean = resolveStrict(manager, type); if (bean != null) { CreationalContext<T> context = manager.createCreationalContext(bean);...
java
@SuppressWarnings("unchecked") public static <T> T getContextualInstanceStrict(final BeanManager manager, final Class<T> type) { T result = null; Bean<T> bean = resolveStrict(manager, type); if (bean != null) { CreationalContext<T> context = manager.createCreationalContext(bean);...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getContextualInstanceStrict", "(", "final", "BeanManager", "manager", ",", "final", "Class", "<", "T", ">", "type", ")", "{", "T", "result", "=", "null", ";", "Bea...
Get a CDI managed instance matching exactly the given type. That's why BeanManager#resolve isn't used. <p/> <b>NOTE:</b> Using this method should be avoided at all costs. <b>NOTE:</b> Using this method should be avoided at all costs. @param manager The bean manager with which to perform the lookup. @param type The ...
[ "Get", "a", "CDI", "managed", "instance", "matching", "exactly", "the", "given", "type", ".", "That", "s", "why", "BeanManager#resolve", "isn", "t", "used", ".", "<p", "/", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "Using", "this", "method", "...
train
https://github.com/seam/faces/blob/2fdedbc7070318c2c58bfffb8a26f1ea1d0ee1e3/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java#L134-L145
alkacon/opencms-core
src/org/opencms/workplace/editors/CmsEditorSelector.java
CmsEditorSelector.showErrorDialog
private static void showErrorDialog(CmsJspActionElement jsp, Throwable t) { CmsDialog wp = new CmsDialog(jsp); wp.setParamMessage(Messages.get().getBundle(wp.getLocale()).key(Messages.ERR_NO_EDITOR_FOUND_0)); wp.fillParamValues(jsp.getRequest()); try { wp.includeErrorpage(wp...
java
private static void showErrorDialog(CmsJspActionElement jsp, Throwable t) { CmsDialog wp = new CmsDialog(jsp); wp.setParamMessage(Messages.get().getBundle(wp.getLocale()).key(Messages.ERR_NO_EDITOR_FOUND_0)); wp.fillParamValues(jsp.getRequest()); try { wp.includeErrorpage(wp...
[ "private", "static", "void", "showErrorDialog", "(", "CmsJspActionElement", "jsp", ",", "Throwable", "t", ")", "{", "CmsDialog", "wp", "=", "new", "CmsDialog", "(", "jsp", ")", ";", "wp", ".", "setParamMessage", "(", "Messages", ".", "get", "(", ")", ".", ...
Shows the error dialog when no valid editor is found and returns null for the editor URI.<p> @param jsp the instantiated CmsJspActionElement @param t a throwable object, can be null
[ "Shows", "the", "error", "dialog", "when", "no", "valid", "editor", "is", "found", "and", "returns", "null", "for", "the", "editor", "URI", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsEditorSelector.java#L85-L99
belaban/JGroups
src/org/jgroups/util/Bits.java
Bits.writeString
public static void writeString(String s, DataOutput out) throws IOException { if(s != null) { out.write(1); out.writeUTF(s); } else out.write(0); }
java
public static void writeString(String s, DataOutput out) throws IOException { if(s != null) { out.write(1); out.writeUTF(s); } else out.write(0); }
[ "public", "static", "void", "writeString", "(", "String", "s", ",", "DataOutput", "out", ")", "throws", "IOException", "{", "if", "(", "s", "!=", "null", ")", "{", "out", ".", "write", "(", "1", ")", ";", "out", ".", "writeUTF", "(", "s", ")", ";",...
Writes a string to buf. The length of the string is written first, followed by the chars (as single-byte values). Multi-byte values are truncated: only the lower byte of each multi-byte char is written, similar to {@link DataOutput#writeChars(String)}. @param s the string @param out the output stream
[ "Writes", "a", "string", "to", "buf", ".", "The", "length", "of", "the", "string", "is", "written", "first", "followed", "by", "the", "chars", "(", "as", "single", "-", "byte", "values", ")", ".", "Multi", "-", "byte", "values", "are", "truncated", ":"...
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/Bits.java#L616-L623
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontFileReader.java
FontFileReader.readTTFString
public final String readTTFString() throws IOException { int i = current; while (file[i++] != 0) { if (i > fsize) { throw new java.io.EOFException("Reached EOF, file size=" + fsize); } } byte[] tmp = ...
java
public final String readTTFString() throws IOException { int i = current; while (file[i++] != 0) { if (i > fsize) { throw new java.io.EOFException("Reached EOF, file size=" + fsize); } } byte[] tmp = ...
[ "public", "final", "String", "readTTFString", "(", ")", "throws", "IOException", "{", "int", "i", "=", "current", ";", "while", "(", "file", "[", "i", "++", "]", "!=", "0", ")", "{", "if", "(", "i", ">", "fsize", ")", "{", "throw", "new", "java", ...
Read a NUL terminated ISO-8859-1 string. @return A String @throws IOException If EOF is reached
[ "Read", "a", "NUL", "terminated", "ISO", "-", "8859", "-", "1", "string", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontFileReader.java#L302-L314
facebookarchive/hadoop-20
src/core/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
MetricsRecordImpl.setTag
public void setTag(String tagName, short tagValue) { tagTable.put(tagName, Short.valueOf(tagValue)); }
java
public void setTag(String tagName, short tagValue) { tagTable.put(tagName, Short.valueOf(tagValue)); }
[ "public", "void", "setTag", "(", "String", "tagName", ",", "short", "tagValue", ")", "{", "tagTable", ".", "put", "(", "tagName", ",", "Short", ".", "valueOf", "(", "tagValue", ")", ")", ";", "}" ]
Sets the named tag to the specified value. @param tagName name of the tag @param tagValue new value of the tag @throws MetricsException if the tagName conflicts with the configuration
[ "Sets", "the", "named", "tag", "to", "the", "specified", "value", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java#L101-L103
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java
ProjectNodeSupport.listPluginConfigurations
public List<ExtPluginConfiguration> listPluginConfigurations(final String keyprefix, final String serviceName) { return listPluginConfigurations(keyprefix, serviceName, true); }
java
public List<ExtPluginConfiguration> listPluginConfigurations(final String keyprefix, final String serviceName) { return listPluginConfigurations(keyprefix, serviceName, true); }
[ "public", "List", "<", "ExtPluginConfiguration", ">", "listPluginConfigurations", "(", "final", "String", "keyprefix", ",", "final", "String", "serviceName", ")", "{", "return", "listPluginConfigurations", "(", "keyprefix", ",", "serviceName", ",", "true", ")", ";",...
Return a list of resource model configuration @param serviceName @param keyprefix prefix for properties @return List of Maps, each map containing "type": String, "props":Properties
[ "Return", "a", "list", "of", "resource", "model", "configuration" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java#L683-L686
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.filemonitor/src/com/ibm/ws/kernel/filemonitor/internal/MonitorHolder.java
MonitorHolder.processFileRefresh
void processFileRefresh(boolean doFilterPaths, String listenerFilter) { externalScan(null, null, null, doFilterPaths, listenerFilter); }
java
void processFileRefresh(boolean doFilterPaths, String listenerFilter) { externalScan(null, null, null, doFilterPaths, listenerFilter); }
[ "void", "processFileRefresh", "(", "boolean", "doFilterPaths", ",", "String", "listenerFilter", ")", "{", "externalScan", "(", "null", ",", "null", ",", "null", ",", "doFilterPaths", ",", "listenerFilter", ")", ";", "}" ]
Processes file refresh operations for specific listeners. @param doFilterPaths The filter indicator. If true, input paths are filtered against pending file events. If false, all pending file events are processed. @param listenerFilter The filter string that allows only those listeners with a matching id to be called t...
[ "Processes", "file", "refresh", "operations", "for", "specific", "listeners", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.filemonitor/src/com/ibm/ws/kernel/filemonitor/internal/MonitorHolder.java#L1142-L1144
apache/groovy
src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java
EncodingGroovyMethods.encodeBase64
public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), chunked); }
java
public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), chunked); }
[ "public", "static", "Writable", "encodeBase64", "(", "Byte", "[", "]", "data", ",", "final", "boolean", "chunked", ")", "{", "return", "encodeBase64", "(", "DefaultTypeTransformation", ".", "convertToByteArray", "(", "data", ")", ",", "chunked", ")", ";", "}" ...
Produce a Writable object which writes the Base64 encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 encoding and chunking see <code>RFC 4648</code>. @param data Byte array to be encoded @param chunked whether or not the Base64 encoded data sho...
[ "Produce", "a", "Writable", "object", "which", "writes", "the", "Base64", "encoding", "of", "the", "byte", "array", ".", "Calling", "toString", "()", "on", "the", "result", "returns", "the", "encoding", "as", "a", "String", ".", "For", "more", "information",...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java#L60-L62
MenoData/Time4J
base/src/main/java/net/time4j/range/DateInterval.java
DateInterval.until
public static DateInterval until(PlainDate end) { Boundary<PlainDate> past = Boundary.infinitePast(); return new DateInterval(past, Boundary.of(CLOSED, end)); }
java
public static DateInterval until(PlainDate end) { Boundary<PlainDate> past = Boundary.infinitePast(); return new DateInterval(past, Boundary.of(CLOSED, end)); }
[ "public", "static", "DateInterval", "until", "(", "PlainDate", "end", ")", "{", "Boundary", "<", "PlainDate", ">", "past", "=", "Boundary", ".", "infinitePast", "(", ")", ";", "return", "new", "DateInterval", "(", "past", ",", "Boundary", ".", "of", "(", ...
/*[deutsch] <p>Erzeugt ein unbegrenztes Intervall bis zum angegebenen Endedatum. </p> @param end date of upper boundary (inclusive) @return new date interval @since 2.0
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "ein", "unbegrenztes", "Intervall", "bis", "zum", "angegebenen", "Endedatum", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/DateInterval.java#L284-L289
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ParameterUtil.java
ParameterUtil.requireFloatParameter
public static float requireFloatParameter ( HttpServletRequest req, String name, String invalidDataMessage) throws DataValidationException { return parseFloatParameter(getParameter(req, name, false), invalidDataMessage); }
java
public static float requireFloatParameter ( HttpServletRequest req, String name, String invalidDataMessage) throws DataValidationException { return parseFloatParameter(getParameter(req, name, false), invalidDataMessage); }
[ "public", "static", "float", "requireFloatParameter", "(", "HttpServletRequest", "req", ",", "String", "name", ",", "String", "invalidDataMessage", ")", "throws", "DataValidationException", "{", "return", "parseFloatParameter", "(", "getParameter", "(", "req", ",", "n...
Fetches the supplied parameter from the request and converts it to a float. If the parameter does not exist or is not a well-formed float, a data validation exception is thrown with the supplied message.
[ "Fetches", "the", "supplied", "parameter", "from", "the", "request", "and", "converts", "it", "to", "a", "float", ".", "If", "the", "parameter", "does", "not", "exist", "or", "is", "not", "a", "well", "-", "formed", "float", "a", "data", "validation", "e...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L74-L79
scaleset/scaleset-geo
src/main/java/com/scaleset/geo/math/GoogleMapsTileMath.java
GoogleMapsTileMath.metersToTilePixelsTransform
public AffineTransform metersToTilePixelsTransform(int tx, int ty, int zoomLevel) { AffineTransform result = new AffineTransform(); double scale = 1.0 / resolution(zoomLevel); int nTiles = 2 << (zoomLevel - 1); int px = tx * -256; int py = (nTiles - ty) * -256; // flip y ...
java
public AffineTransform metersToTilePixelsTransform(int tx, int ty, int zoomLevel) { AffineTransform result = new AffineTransform(); double scale = 1.0 / resolution(zoomLevel); int nTiles = 2 << (zoomLevel - 1); int px = tx * -256; int py = (nTiles - ty) * -256; // flip y ...
[ "public", "AffineTransform", "metersToTilePixelsTransform", "(", "int", "tx", ",", "int", "ty", ",", "int", "zoomLevel", ")", "{", "AffineTransform", "result", "=", "new", "AffineTransform", "(", ")", ";", "double", "scale", "=", "1.0", "/", "resolution", "(",...
Create a transform that converts meters to tile-relative pixels @param tx The x coordinate of the tile @param ty The y coordinate of the tile @param zoomLevel the zoom level @return AffineTransform with meters to pixels transformation
[ "Create", "a", "transform", "that", "converts", "meters", "to", "tile", "-", "relative", "pixels" ]
train
https://github.com/scaleset/scaleset-geo/blob/5cff2349668037dc287928a6c1a1f67c76d96b02/src/main/java/com/scaleset/geo/math/GoogleMapsTileMath.java#L216-L228
lviggiano/owner
owner-java8-extras/src/main/java/org/aeonbits/owner/converters/DurationConverter.java
DurationConverter.parseDuration
private static Duration parseDuration(String input) { String[] parts = ConverterUtil.splitNumericAndChar(input); String numberString = parts[0]; String originalUnitString = parts[1]; String unitString = originalUnitString; if (numberString.length() == 0) { throw new ...
java
private static Duration parseDuration(String input) { String[] parts = ConverterUtil.splitNumericAndChar(input); String numberString = parts[0]; String originalUnitString = parts[1]; String unitString = originalUnitString; if (numberString.length() == 0) { throw new ...
[ "private", "static", "Duration", "parseDuration", "(", "String", "input", ")", "{", "String", "[", "]", "parts", "=", "ConverterUtil", ".", "splitNumericAndChar", "(", "input", ")", ";", "String", "numberString", "=", "parts", "[", "0", "]", ";", "String", ...
Parses a duration string. If no units are specified in the string, it is assumed to be in milliseconds. This implementation was blatantly stolen/adapted from the typesafe-config project: https://github.com/typesafehub/config/blob/v1.3.0/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java#L551-L624 @param ...
[ "Parses", "a", "duration", "string", ".", "If", "no", "units", "are", "specified", "in", "the", "string", "it", "is", "assumed", "to", "be", "in", "milliseconds", "." ]
train
https://github.com/lviggiano/owner/blob/1223ecfbe3c275b3b7c5ec13e9238c9bb888754f/owner-java8-extras/src/main/java/org/aeonbits/owner/converters/DurationConverter.java#L74-L130
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/handlers/WindowsFilenameTabCompleter.java
WindowsFilenameTabCompleter.completeCandidates
@Override void completeCandidates(CommandContext ctx, String buffer, int cursor, List<String> candidates) { if (candidates.isEmpty()) { if (buffer.startsWith("\"") && buffer.length() >= 2) { // Quotes are added back by super class. buffer = buffer.substring(1); ...
java
@Override void completeCandidates(CommandContext ctx, String buffer, int cursor, List<String> candidates) { if (candidates.isEmpty()) { if (buffer.startsWith("\"") && buffer.length() >= 2) { // Quotes are added back by super class. buffer = buffer.substring(1); ...
[ "@", "Override", "void", "completeCandidates", "(", "CommandContext", "ctx", ",", "String", "buffer", ",", "int", "cursor", ",", "List", "<", "String", ">", "candidates", ")", "{", "if", "(", "candidates", ".", "isEmpty", "(", ")", ")", "{", "if", "(", ...
The only supported syntax at command execution is fully quoted, e.g.: "c:\Program Files\..." or not quoted at all. Completion supports only these 2 syntaxes.
[ "The", "only", "supported", "syntax", "at", "command", "execution", "is", "fully", "quoted", "e", ".", "g", ".", ":", "c", ":", "\\", "Program", "Files", "\\", "...", "or", "not", "quoted", "at", "all", ".", "Completion", "supports", "only", "these", "...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/handlers/WindowsFilenameTabCompleter.java#L44-L55
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/actions/AntRunAction.java
AntRunAction.loadBuildPropertyFile
private void loadBuildPropertyFile(Project project, TestContext context) { if (StringUtils.hasText(propertyFilePath)) { String propertyFileResource = context.replaceDynamicContentInString(propertyFilePath); log.info("Reading build property file: " + propertyFileResource); Pro...
java
private void loadBuildPropertyFile(Project project, TestContext context) { if (StringUtils.hasText(propertyFilePath)) { String propertyFileResource = context.replaceDynamicContentInString(propertyFilePath); log.info("Reading build property file: " + propertyFileResource); Pro...
[ "private", "void", "loadBuildPropertyFile", "(", "Project", "project", ",", "TestContext", "context", ")", "{", "if", "(", "StringUtils", ".", "hasText", "(", "propertyFilePath", ")", ")", "{", "String", "propertyFileResource", "=", "context", ".", "replaceDynamic...
Loads build properties from file resource and adds them to ANT project. @param project @param context
[ "Loads", "build", "properties", "from", "file", "resource", "and", "adds", "them", "to", "ANT", "project", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/actions/AntRunAction.java#L149-L169
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/domain/controller/plan/AbstractServerGroupRolloutTask.java
AbstractServerGroupRolloutTask.recordPreparedOperation
protected void recordPreparedOperation(final ServerIdentity identity, final TransactionalProtocolClient.PreparedOperation<ServerTaskExecutor.ServerOperation> prepared) { final ModelNode preparedResult = prepared.getPreparedResult(); // Hmm do the server results need to get translated as well as the host...
java
protected void recordPreparedOperation(final ServerIdentity identity, final TransactionalProtocolClient.PreparedOperation<ServerTaskExecutor.ServerOperation> prepared) { final ModelNode preparedResult = prepared.getPreparedResult(); // Hmm do the server results need to get translated as well as the host...
[ "protected", "void", "recordPreparedOperation", "(", "final", "ServerIdentity", "identity", ",", "final", "TransactionalProtocolClient", ".", "PreparedOperation", "<", "ServerTaskExecutor", ".", "ServerOperation", ">", "prepared", ")", "{", "final", "ModelNode", "prepared...
Record a prepared operation. @param identity the server identity @param prepared the prepared operation
[ "Record", "a", "prepared", "operation", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/AbstractServerGroupRolloutTask.java#L97-L103
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Timing.java
Timing.report
public long report(String str, PrintStream stream) { long elapsed = this.report(); stream.println(str + " Time elapsed: " + (elapsed) + " ms"); return elapsed; }
java
public long report(String str, PrintStream stream) { long elapsed = this.report(); stream.println(str + " Time elapsed: " + (elapsed) + " ms"); return elapsed; }
[ "public", "long", "report", "(", "String", "str", ",", "PrintStream", "stream", ")", "{", "long", "elapsed", "=", "this", ".", "report", "(", ")", ";", "stream", ".", "println", "(", "str", "+", "\" Time elapsed: \"", "+", "(", "elapsed", ")", "+", "\"...
Print elapsed time (without stopping timer). @param str Additional prefix string to be printed @param stream PrintStream on which to write output @return Number of milliseconds elapsed
[ "Print", "elapsed", "time", "(", "without", "stopping", "timer", ")", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Timing.java#L66-L70
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java
OverrideHelper.getResolvedFeatures
public ResolvedFeatures getResolvedFeatures(JvmTypeReference contextType) { ITypeReferenceOwner owner = new StandardTypeReferenceOwner(services, contextType.eResource().getResourceSet()); return getResolvedFeatures(owner.toLightweightTypeReference(contextType)); }
java
public ResolvedFeatures getResolvedFeatures(JvmTypeReference contextType) { ITypeReferenceOwner owner = new StandardTypeReferenceOwner(services, contextType.eResource().getResourceSet()); return getResolvedFeatures(owner.toLightweightTypeReference(contextType)); }
[ "public", "ResolvedFeatures", "getResolvedFeatures", "(", "JvmTypeReference", "contextType", ")", "{", "ITypeReferenceOwner", "owner", "=", "new", "StandardTypeReferenceOwner", "(", "services", ",", "contextType", ".", "eResource", "(", ")", ".", "getResourceSet", "(", ...
Returns the resolved features that are defined in the given <code>context type</code> and its supertypes. Considers private methods of super types, too. @param contextType the context type. Has to be contained in a resource. @return the resolved features.
[ "Returns", "the", "resolved", "features", "that", "are", "defined", "in", "the", "given", "<code", ">", "context", "type<", "/", "code", ">", "and", "its", "supertypes", ".", "Considers", "private", "methods", "of", "super", "types", "too", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java#L211-L214
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/RendererRequestUtils.java
RendererRequestUtils.setRequestDebuggable
public static void setRequestDebuggable(HttpServletRequest req, JawrConfig jawrConfig) { // make sure we have set an overrideKey // make sure the overrideKey exists in the request // lastly, make sure the keys match if (jawrConfig.getDebugOverrideKey().length() > 0 && null != req.getParameter(JawrConstant....
java
public static void setRequestDebuggable(HttpServletRequest req, JawrConfig jawrConfig) { // make sure we have set an overrideKey // make sure the overrideKey exists in the request // lastly, make sure the keys match if (jawrConfig.getDebugOverrideKey().length() > 0 && null != req.getParameter(JawrConstant....
[ "public", "static", "void", "setRequestDebuggable", "(", "HttpServletRequest", "req", ",", "JawrConfig", "jawrConfig", ")", "{", "// make sure we have set an overrideKey", "// make sure the overrideKey exists in the request", "// lastly, make sure the keys match", "if", "(", "jawrC...
Determines whether to override the debug settings. Sets the debugOverride status on ThreadLocalJawrContext @param req the request @param jawrConfig the jawr config
[ "Determines", "whether", "to", "override", "the", "debug", "settings", ".", "Sets", "the", "debugOverride", "status", "on", "ThreadLocalJawrContext" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/RendererRequestUtils.java#L257-L274
optimatika/ojAlgo-finance
src/main/java/org/ojalgo/finance/FinanceUtils.java
FinanceUtils.toGrowthRateFromAnnualReturn
public static double toGrowthRateFromAnnualReturn(double annualReturn, CalendarDateUnit growthRateUnit) { double tmpAnnualGrowthRate = PrimitiveMath.LOG1P.invoke(annualReturn); double tmpYearsPerGrowthRateUnit = CalendarDateUnit.YEAR.convert(growthRateUnit); return tmpAnnualGrowthRate * tmpYears...
java
public static double toGrowthRateFromAnnualReturn(double annualReturn, CalendarDateUnit growthRateUnit) { double tmpAnnualGrowthRate = PrimitiveMath.LOG1P.invoke(annualReturn); double tmpYearsPerGrowthRateUnit = CalendarDateUnit.YEAR.convert(growthRateUnit); return tmpAnnualGrowthRate * tmpYears...
[ "public", "static", "double", "toGrowthRateFromAnnualReturn", "(", "double", "annualReturn", ",", "CalendarDateUnit", "growthRateUnit", ")", "{", "double", "tmpAnnualGrowthRate", "=", "PrimitiveMath", ".", "LOG1P", ".", "invoke", "(", "annualReturn", ")", ";", "double...
GrowthRate = ln(1.0 + InterestRate) / GrowthRateUnitsPerYear @param annualReturn Annualised return (percentage per year) @param growthRateUnit A growth rate unit @return A growth rate per unit (day, week, month, year...)
[ "GrowthRate", "=", "ln", "(", "1", ".", "0", "+", "InterestRate", ")", "/", "GrowthRateUnitsPerYear" ]
train
https://github.com/optimatika/ojAlgo-finance/blob/c8d3f7e1894d4263b7334bca3f4c060e466f8b15/src/main/java/org/ojalgo/finance/FinanceUtils.java#L457-L461
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/QuickSelect.java
QuickSelect.select
public static double select(final double[] arr, int lo, int hi, final int pivot) { while (hi > lo) { final int j = partition(arr, lo, hi); if (j == pivot) { return arr[pivot]; } if (j > pivot) { hi = j - 1; } else { lo = j + 1; } } return arr...
java
public static double select(final double[] arr, int lo, int hi, final int pivot) { while (hi > lo) { final int j = partition(arr, lo, hi); if (j == pivot) { return arr[pivot]; } if (j > pivot) { hi = j - 1; } else { lo = j + 1; } } return arr...
[ "public", "static", "double", "select", "(", "final", "double", "[", "]", "arr", ",", "int", "lo", ",", "int", "hi", ",", "final", "int", "pivot", ")", "{", "while", "(", "hi", ">", "lo", ")", "{", "final", "int", "j", "=", "partition", "(", "arr...
Gets the 0-based kth order statistic from the array. Warning! This changes the ordering of elements in the given array! @param arr The array to be re-arranged. @param lo The lowest 0-based index to be considered. @param hi The highest 0-based index to be considered. @param pivot The 0-based smallest value to pivot on....
[ "Gets", "the", "0", "-", "based", "kth", "order", "statistic", "from", "the", "array", ".", "Warning!", "This", "changes", "the", "ordering", "of", "elements", "in", "the", "given", "array!" ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/QuickSelect.java#L136-L150
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getOtherBondAtom
public IAtom getOtherBondAtom(IAtom atom, IBond bond) { if (!bond.contains(atom)) return null; if (bond.getBegin().equals(atom)) return bond.getEnd(); else return bond.getBegin(); }
java
public IAtom getOtherBondAtom(IAtom atom, IBond bond) { if (!bond.contains(atom)) return null; if (bond.getBegin().equals(atom)) return bond.getEnd(); else return bond.getBegin(); }
[ "public", "IAtom", "getOtherBondAtom", "(", "IAtom", "atom", ",", "IBond", "bond", ")", "{", "if", "(", "!", "bond", ".", "contains", "(", "atom", ")", ")", "return", "null", ";", "if", "(", "bond", ".", "getBegin", "(", ")", ".", "equals", "(", "a...
Returns the other atom of the bond. Expects bond to have only two atoms. Returns null if the given atom is not part of the given bond. @param atom the atom we already have @param bond the bond @return the other atom of the bond
[ "Returns", "the", "other", "atom", "of", "the", "bond", ".", "Expects", "bond", "to", "have", "only", "two", "atoms", ".", "Returns", "null", "if", "the", "given", "atom", "is", "not", "part", "of", "the", "given", "bond", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2176-L2182
alkacon/opencms-core
src/org/opencms/db/oracle/CmsUserDriver.java
CmsUserDriver.getOutputStreamFromBlob
public static OutputStream getOutputStreamFromBlob(ResultSet res, String name) throws SQLException { Blob blob = res.getBlob(name); blob.truncate(0); return blob.setBinaryStream(0L); }
java
public static OutputStream getOutputStreamFromBlob(ResultSet res, String name) throws SQLException { Blob blob = res.getBlob(name); blob.truncate(0); return blob.setBinaryStream(0L); }
[ "public", "static", "OutputStream", "getOutputStreamFromBlob", "(", "ResultSet", "res", ",", "String", "name", ")", "throws", "SQLException", "{", "Blob", "blob", "=", "res", ".", "getBlob", "(", "name", ")", ";", "blob", ".", "truncate", "(", "0", ")", ";...
Generates an Output stream that writes to a blob, also truncating the existing blob if required.<p> Apparently Oracle requires some non-standard handling here.<p> @param res the result set where the blob is located in @param name the name of the database column where the blob is located @return an Output stream from ...
[ "Generates", "an", "Output", "stream", "that", "writes", "to", "a", "blob", "also", "truncating", "the", "existing", "blob", "if", "required", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/oracle/CmsUserDriver.java#L71-L76
belaban/JGroups
src/org/jgroups/View.java
View.sameMembers
public static boolean sameMembers(View v1, View v2) { if(v1 == v2) return true; if(v1.size() != v2.size()) return false; Address[][] diff=diff(v1, v2); return diff[0].length == 0 && diff[1].length == 0; }
java
public static boolean sameMembers(View v1, View v2) { if(v1 == v2) return true; if(v1.size() != v2.size()) return false; Address[][] diff=diff(v1, v2); return diff[0].length == 0 && diff[1].length == 0; }
[ "public", "static", "boolean", "sameMembers", "(", "View", "v1", ",", "View", "v2", ")", "{", "if", "(", "v1", "==", "v2", ")", "return", "true", ";", "if", "(", "v1", ".", "size", "(", ")", "!=", "v2", ".", "size", "(", ")", ")", "return", "fa...
Checks if two views have the same members regardless of order. E.g. {A,B,C} and {B,A,C} returns true
[ "Checks", "if", "two", "views", "have", "the", "same", "members", "regardless", "of", "order", ".", "E", ".", "g", ".", "{", "A", "B", "C", "}", "and", "{", "B", "A", "C", "}", "returns", "true" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/View.java#L300-L307
JM-Lab/utils-java8
src/main/java/kr/jm/utils/JMProgressiveManager.java
JMProgressiveManager.registerPercentChangeListener
public JMProgressiveManager<T, R> registerPercentChangeListener( Consumer<Number> percentChangeListener) { return registerListener(progressivePercent, percentChangeListener); }
java
public JMProgressiveManager<T, R> registerPercentChangeListener( Consumer<Number> percentChangeListener) { return registerListener(progressivePercent, percentChangeListener); }
[ "public", "JMProgressiveManager", "<", "T", ",", "R", ">", "registerPercentChangeListener", "(", "Consumer", "<", "Number", ">", "percentChangeListener", ")", "{", "return", "registerListener", "(", "progressivePercent", ",", "percentChangeListener", ")", ";", "}" ]
Register percent change listener jm progressive manager. @param percentChangeListener the percent change listener @return the jm progressive manager
[ "Register", "percent", "change", "listener", "jm", "progressive", "manager", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/JMProgressiveManager.java#L276-L279
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipCall.java
SipCall.initiateOutgoingMessage
public boolean initiateOutgoingMessage(String toUri, String viaNonProxyRoute) { return initiateOutgoingMessage(null, toUri, viaNonProxyRoute, null, null, null); }
java
public boolean initiateOutgoingMessage(String toUri, String viaNonProxyRoute) { return initiateOutgoingMessage(null, toUri, viaNonProxyRoute, null, null, null); }
[ "public", "boolean", "initiateOutgoingMessage", "(", "String", "toUri", ",", "String", "viaNonProxyRoute", ")", "{", "return", "initiateOutgoingMessage", "(", "null", ",", "toUri", ",", "viaNonProxyRoute", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
This basic method is used to initiate an outgoing MESSAGE. <p> This method returns when the request message has been sent out. Your calling program must subsequently call the waitOutgoingMessageResponse() method (one or more times) to get the result(s). <p> If a DIALOG exists the method will use it to send the MESSAG...
[ "This", "basic", "method", "is", "used", "to", "initiate", "an", "outgoing", "MESSAGE", "." ]
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipCall.java#L746-L748
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java
KeyValueHandler.handleNoopRequest
private static BinaryMemcacheRequest handleNoopRequest(final ChannelHandlerContext ctx, final NoopRequest msg) { BinaryMemcacheRequest request = new DefaultBinaryMemcacheRequest(); request.setOpcode(OP_NOOP); return request; }
java
private static BinaryMemcacheRequest handleNoopRequest(final ChannelHandlerContext ctx, final NoopRequest msg) { BinaryMemcacheRequest request = new DefaultBinaryMemcacheRequest(); request.setOpcode(OP_NOOP); return request; }
[ "private", "static", "BinaryMemcacheRequest", "handleNoopRequest", "(", "final", "ChannelHandlerContext", "ctx", ",", "final", "NoopRequest", "msg", ")", "{", "BinaryMemcacheRequest", "request", "=", "new", "DefaultBinaryMemcacheRequest", "(", ")", ";", "request", ".", ...
Encodes a {@link NoopRequest} into its lower level representation. @param ctx the {@link ChannelHandlerContext} to use for allocation and others. @param msg the incoming message. @return a ready {@link BinaryMemcacheRequest}.
[ "Encodes", "a", "{", "@link", "NoopRequest", "}", "into", "its", "lower", "level", "representation", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java#L471-L475
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.stopResizeAsync
public Observable<Void> stopResizeAsync(String poolId) { return stopResizeWithServiceResponseAsync(poolId).map(new Func1<ServiceResponseWithHeaders<Void, PoolStopResizeHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, PoolStopResizeHeaders> response) { ...
java
public Observable<Void> stopResizeAsync(String poolId) { return stopResizeWithServiceResponseAsync(poolId).map(new Func1<ServiceResponseWithHeaders<Void, PoolStopResizeHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, PoolStopResizeHeaders> response) { ...
[ "public", "Observable", "<", "Void", ">", "stopResizeAsync", "(", "String", "poolId", ")", "{", "return", "stopResizeWithServiceResponseAsync", "(", "poolId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponseWithHeaders", "<", "Void", ",", "PoolStopResiz...
Stops an ongoing resize operation on the pool. This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. ...
[ "Stops", "an", "ongoing", "resize", "operation", "on", "the", "pool", ".", "This", "does", "not", "restore", "the", "pool", "to", "its", "previous", "state", "before", "the", "resize", "operation", ":", "it", "only", "stops", "any", "further", "changes", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L2990-L2997
icode/ameba
src/main/java/ameba/container/server/Connector.java
Connector.createDefault
public static Connector createDefault(Map<String, String> properties) { Connector.Builder builder = Connector.Builder.create() .rawProperties(properties) .secureEnabled(Boolean.parseBoolean(properties.get("ssl.enabled"))) .sslProtocol(properties.get("ssl.protocol"...
java
public static Connector createDefault(Map<String, String> properties) { Connector.Builder builder = Connector.Builder.create() .rawProperties(properties) .secureEnabled(Boolean.parseBoolean(properties.get("ssl.enabled"))) .sslProtocol(properties.get("ssl.protocol"...
[ "public", "static", "Connector", "createDefault", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "Connector", ".", "Builder", "builder", "=", "Connector", ".", "Builder", ".", "create", "(", ")", ".", "rawProperties", "(", "properties...
<p>createDefault.</p> @param properties a {@link java.util.Map} object. @return a {@link ameba.container.server.Connector} object.
[ "<p", ">", "createDefault", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/container/server/Connector.java#L73-L113
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java
CoverageDataTiffImage.getPixel
public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
java
public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
[ "public", "float", "getPixel", "(", "int", "x", ",", "int", "y", ")", "{", "float", "pixel", "=", "-", "1", ";", "if", "(", "rasters", "==", "null", ")", "{", "readPixels", "(", ")", ";", "}", "if", "(", "rasters", "!=", "null", ")", "{", "pixe...
Get the pixel at the coordinate @param x x coordinate @param y y coordinate @return pixel value
[ "Get", "the", "pixel", "at", "the", "coordinate" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java#L147-L158
icode/ameba
src/main/java/ameba/mvc/template/internal/ResolvingViewableContext.java
ResolvingViewableContext.resolveAbsoluteViewable
@SuppressWarnings("unchecked") private ResolvedViewable resolveAbsoluteViewable(final Viewable viewable, Class<?> resourceClass, final MediaType mediaType, final TemplateProcessor templateProcessor) { f...
java
@SuppressWarnings("unchecked") private ResolvedViewable resolveAbsoluteViewable(final Viewable viewable, Class<?> resourceClass, final MediaType mediaType, final TemplateProcessor templateProcessor) { f...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "ResolvedViewable", "resolveAbsoluteViewable", "(", "final", "Viewable", "viewable", ",", "Class", "<", "?", ">", "resourceClass", ",", "final", "MediaType", "mediaType", ",", "final", "TemplateProcessor",...
Resolve given {@link Viewable viewable} with absolute template name using {@link MediaType media type} and {@link TemplateProcessor template processor}. @param viewable viewable to be resolved. @param mediaType media type of te output. @param resourceClass resource class. @param templateProcessor ...
[ "Resolve", "given", "{", "@link", "Viewable", "viewable", "}", "with", "absolute", "template", "name", "using", "{", "@link", "MediaType", "media", "type", "}", "and", "{", "@link", "TemplateProcessor", "template", "processor", "}", "." ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/mvc/template/internal/ResolvingViewableContext.java#L62-L73
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/Toposort.java
Toposort.checkAreDescendentsOf
public static <T> void checkAreDescendentsOf(Set<T> inputSet, T root, Deps<T> deps) { // Check that all modules in the input set are descendents of the output module. HashSet<T> visited = new HashSet<T>(); dfs(root, visited, deps); if (!visited.containsAll(inputSet)) { throw ...
java
public static <T> void checkAreDescendentsOf(Set<T> inputSet, T root, Deps<T> deps) { // Check that all modules in the input set are descendents of the output module. HashSet<T> visited = new HashSet<T>(); dfs(root, visited, deps); if (!visited.containsAll(inputSet)) { throw ...
[ "public", "static", "<", "T", ">", "void", "checkAreDescendentsOf", "(", "Set", "<", "T", ">", "inputSet", ",", "T", "root", ",", "Deps", "<", "T", ">", "deps", ")", "{", "// Check that all modules in the input set are descendents of the output module.", "HashSet", ...
Checks that the given inputSet consists of only descendents of the root.
[ "Checks", "that", "the", "given", "inputSet", "consists", "of", "only", "descendents", "of", "the", "root", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/Toposort.java#L115-L122
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/util/ByteConverter.java
ByteConverter.int8
public static void int8(byte[] target, int idx, long value) { target[idx + 0] = (byte) (value >>> 56); target[idx + 1] = (byte) (value >>> 48); target[idx + 2] = (byte) (value >>> 40); target[idx + 3] = (byte) (value >>> 32); target[idx + 4] = (byte) (value >>> 24); target[idx + 5] = (byte) (val...
java
public static void int8(byte[] target, int idx, long value) { target[idx + 0] = (byte) (value >>> 56); target[idx + 1] = (byte) (value >>> 48); target[idx + 2] = (byte) (value >>> 40); target[idx + 3] = (byte) (value >>> 32); target[idx + 4] = (byte) (value >>> 24); target[idx + 5] = (byte) (val...
[ "public", "static", "void", "int8", "(", "byte", "[", "]", "target", ",", "int", "idx", ",", "long", "value", ")", "{", "target", "[", "idx", "+", "0", "]", "=", "(", "byte", ")", "(", "value", ">>>", "56", ")", ";", "target", "[", "idx", "+", ...
Encodes a long value to the byte array. @param target The byte array to encode to. @param idx The starting index in the byte array. @param value The value to encode.
[ "Encodes", "a", "long", "value", "to", "the", "byte", "array", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/util/ByteConverter.java#L106-L115
networknt/light-4j
resource/src/main/java/com/networknt/resource/ResourceHelpers.java
ResourceHelpers.addProvidersToPathHandler
public static void addProvidersToPathHandler(PathResourceProvider[] pathResourceProviders, PathHandler pathHandler) { if (pathResourceProviders != null && pathResourceProviders.length > 0) { for (PathResourceProvider pathResourceProvider : pathResourceProviders) { if (pathResourcePro...
java
public static void addProvidersToPathHandler(PathResourceProvider[] pathResourceProviders, PathHandler pathHandler) { if (pathResourceProviders != null && pathResourceProviders.length > 0) { for (PathResourceProvider pathResourceProvider : pathResourceProviders) { if (pathResourcePro...
[ "public", "static", "void", "addProvidersToPathHandler", "(", "PathResourceProvider", "[", "]", "pathResourceProviders", ",", "PathHandler", "pathHandler", ")", "{", "if", "(", "pathResourceProviders", "!=", "null", "&&", "pathResourceProviders", ".", "length", ">", "...
Helper to add given PathResourceProviders to a PathHandler. @param pathResourceProviders List of instances of classes implementing PathResourceProvider. @param pathHandler The handler that will have these handlers added to it.
[ "Helper", "to", "add", "given", "PathResourceProviders", "to", "a", "PathHandler", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/resource/src/main/java/com/networknt/resource/ResourceHelpers.java#L38-L48
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/MultiVertexGeometryImpl.java
MultiVertexGeometryImpl.setAttributeStreamRef
public void setAttributeStreamRef(int semantics, AttributeStreamBase stream) { // int test1 = VertexDescription.getPersistence(semantics); // int test2 = stream.getPersistence(); if ((stream != null) && VertexDescription.getPersistence(semantics) != stream .getPersistence())// input stream has wrong pe...
java
public void setAttributeStreamRef(int semantics, AttributeStreamBase stream) { // int test1 = VertexDescription.getPersistence(semantics); // int test2 = stream.getPersistence(); if ((stream != null) && VertexDescription.getPersistence(semantics) != stream .getPersistence())// input stream has wrong pe...
[ "public", "void", "setAttributeStreamRef", "(", "int", "semantics", ",", "AttributeStreamBase", "stream", ")", "{", "// int test1 = VertexDescription.getPersistence(semantics);", "// int test2 = stream.getPersistence();", "if", "(", "(", "stream", "!=", "null", ")", "&&", "...
Sets a reference to the given AttributeStream of the Geometry. Once the buffer has been obtained, the vertices of the Geometry can be manipulated directly. The AttributeStream parameters are not checked for the size. <br> If the attribute is missing, it will be added. <br> Note, that this method does not change the ver...
[ "Sets", "a", "reference", "to", "the", "given", "AttributeStream", "of", "the", "Geometry", ".", "Once", "the", "buffer", "has", "been", "obtained", "the", "vertices", "of", "the", "Geometry", "can", "be", "manipulated", "directly", ".", "The", "AttributeStrea...
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiVertexGeometryImpl.java#L404-L423
CenturyLinkCloud/mdw
mdw-hub/src/com/centurylink/mdw/hub/servlet/SoapServlet.java
SoapServlet.createSoapFaultResponse
protected String createSoapFaultResponse(String code, String message) throws SOAPException, TransformerException { return createSoapFaultResponse(SOAPConstants.SOAP_1_1_PROTOCOL, code, message); }
java
protected String createSoapFaultResponse(String code, String message) throws SOAPException, TransformerException { return createSoapFaultResponse(SOAPConstants.SOAP_1_1_PROTOCOL, code, message); }
[ "protected", "String", "createSoapFaultResponse", "(", "String", "code", ",", "String", "message", ")", "throws", "SOAPException", ",", "TransformerException", "{", "return", "createSoapFaultResponse", "(", "SOAPConstants", ".", "SOAP_1_1_PROTOCOL", ",", "code", ",", ...
Original API (Defaults to using MessageFactory.newInstance(), i.e. SOAP 1.1) @param code @param message @return Soap fault as string @throws SOAPException @throws TransformerException
[ "Original", "API", "(", "Defaults", "to", "using", "MessageFactory", ".", "newInstance", "()", "i", ".", "e", ".", "SOAP", "1", ".", "1", ")" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-hub/src/com/centurylink/mdw/hub/servlet/SoapServlet.java#L391-L394
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java
MarkdownParser.setOutlineDepthRange
public void setOutlineDepthRange(IntegerRange level) { if (level == null) { this.outlineDepthRange = new IntegerRange(DEFAULT_OUTLINE_TOP_LEVEL, DEFAULT_OUTLINE_TOP_LEVEL); } else { this.outlineDepthRange = level; } }
java
public void setOutlineDepthRange(IntegerRange level) { if (level == null) { this.outlineDepthRange = new IntegerRange(DEFAULT_OUTLINE_TOP_LEVEL, DEFAULT_OUTLINE_TOP_LEVEL); } else { this.outlineDepthRange = level; } }
[ "public", "void", "setOutlineDepthRange", "(", "IntegerRange", "level", ")", "{", "if", "(", "level", "==", "null", ")", "{", "this", ".", "outlineDepthRange", "=", "new", "IntegerRange", "(", "DEFAULT_OUTLINE_TOP_LEVEL", ",", "DEFAULT_OUTLINE_TOP_LEVEL", ")", ";"...
Change the level at which the titles may appear in the outline. @param level the level, at least 1.
[ "Change", "the", "level", "at", "which", "the", "titles", "may", "appear", "in", "the", "outline", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java#L420-L426
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
ConfigurationAbstractImpl.getClass
public Class getClass(String key, Class defaultValue, Class assignable) { return getClass(key, defaultValue, new Class[]{assignable}); }
java
public Class getClass(String key, Class defaultValue, Class assignable) { return getClass(key, defaultValue, new Class[]{assignable}); }
[ "public", "Class", "getClass", "(", "String", "key", ",", "Class", "defaultValue", ",", "Class", "assignable", ")", "{", "return", "getClass", "(", "key", ",", "defaultValue", ",", "new", "Class", "[", "]", "{", "assignable", "}", ")", ";", "}" ]
Returns the class specified by the value for the specified key. If no value for this key is found in the configuration, no class of this name can be found or the specified class is not assignable <code>assignable defaultValue</code> is returned. @param key the key @param defaultValue the default Value @param assignabl...
[ "Returns", "the", "class", "specified", "by", "the", "value", "for", "the", "specified", "key", ".", "If", "no", "value", "for", "this", "key", "is", "found", "in", "the", "configuration", "no", "class", "of", "this", "name", "can", "be", "found", "or", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java#L386-L389
jblas-project/jblas
src/main/java/org/jblas/util/SanityChecks.java
SanityChecks.checkVectorAddition
public static void checkVectorAddition() { DoubleMatrix x = new DoubleMatrix(3, 1, 1.0, 2.0, 3.0); DoubleMatrix y = new DoubleMatrix(3, 1, 4.0, 5.0, 6.0); DoubleMatrix z = new DoubleMatrix(3, 1, 5.0, 7.0, 9.0); check("checking vector addition", x.add(y).equals(z)); }
java
public static void checkVectorAddition() { DoubleMatrix x = new DoubleMatrix(3, 1, 1.0, 2.0, 3.0); DoubleMatrix y = new DoubleMatrix(3, 1, 4.0, 5.0, 6.0); DoubleMatrix z = new DoubleMatrix(3, 1, 5.0, 7.0, 9.0); check("checking vector addition", x.add(y).equals(z)); }
[ "public", "static", "void", "checkVectorAddition", "(", ")", "{", "DoubleMatrix", "x", "=", "new", "DoubleMatrix", "(", "3", ",", "1", ",", "1.0", ",", "2.0", ",", "3.0", ")", ";", "DoubleMatrix", "y", "=", "new", "DoubleMatrix", "(", "3", ",", "1", ...
Check whether vector addition works. This is pure Java code and should work.
[ "Check", "whether", "vector", "addition", "works", ".", "This", "is", "pure", "Java", "code", "and", "should", "work", "." ]
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/util/SanityChecks.java#L64-L70
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
WidgetsUtils.replaceOrAppend
private static void replaceOrAppend(Element oldElement, Element newElement) { assert oldElement != null && newElement != null; if (matchesTags(oldElement, appendingTags)) { GQuery.$(oldElement).html("").append(newElement); } else { GQuery.$(oldElement).replaceWith(newElement); // copy cl...
java
private static void replaceOrAppend(Element oldElement, Element newElement) { assert oldElement != null && newElement != null; if (matchesTags(oldElement, appendingTags)) { GQuery.$(oldElement).html("").append(newElement); } else { GQuery.$(oldElement).replaceWith(newElement); // copy cl...
[ "private", "static", "void", "replaceOrAppend", "(", "Element", "oldElement", ",", "Element", "newElement", ")", "{", "assert", "oldElement", "!=", "null", "&&", "newElement", "!=", "null", ";", "if", "(", "matchesTags", "(", "oldElement", ",", "appendingTags", ...
If the <code>oldElement</code> is a td, th, li tags, the new element will replaced its content. In other cases, the <code>oldElement</code> will be replaced by the <code>newElement</code> and the old element classes will be copied to the new element.
[ "If", "the", "<code", ">", "oldElement<", "/", "code", ">", "is", "a", "td", "th", "li", "tags", "the", "new", "element", "will", "replaced", "its", "content", ".", "In", "other", "cases", "the", "<code", ">", "oldElement<", "/", "code", ">", "will", ...
train
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java#L128-L146
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/walk/AssignabilityTypesVisitor.java
AssignabilityTypesVisitor.checkLowerBounds
private boolean checkLowerBounds(final Type one, final Type two) { final boolean res; // ? super Object is impossible here due to types cleanup in tree walker if (notLowerBounded(one)) { // walker will check compatibility, and compatible type is always assignable to lower bounded wil...
java
private boolean checkLowerBounds(final Type one, final Type two) { final boolean res; // ? super Object is impossible here due to types cleanup in tree walker if (notLowerBounded(one)) { // walker will check compatibility, and compatible type is always assignable to lower bounded wil...
[ "private", "boolean", "checkLowerBounds", "(", "final", "Type", "one", ",", "final", "Type", "two", ")", "{", "final", "boolean", "res", ";", "// ? super Object is impossible here due to types cleanup in tree walker", "if", "(", "notLowerBounded", "(", "one", ")", ")"...
Check lower bounded wildcard cases. Method is not called if upper bounds are not assignable. <p> When left is not lower bound - compatibility will be checked by type walker and when compatible always assignable. For example, String compatible (and assignable) with ? super String and Integer is not compatible with ? sup...
[ "Check", "lower", "bounded", "wildcard", "cases", ".", "Method", "is", "not", "called", "if", "upper", "bounds", "are", "not", "assignable", ".", "<p", ">", "When", "left", "is", "not", "lower", "bound", "-", "compatibility", "will", "be", "checked", "by",...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/walk/AssignabilityTypesVisitor.java#L75-L94
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java
InvocationManager.buildInvocation
public I buildInvocation(Object protocolKey, I invocation) throws ConfigException { Objects.requireNonNull(invocation); invocation = buildInvocation(invocation); // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; ...
java
public I buildInvocation(Object protocolKey, I invocation) throws ConfigException { Objects.requireNonNull(invocation); invocation = buildInvocation(invocation); // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; ...
[ "public", "I", "buildInvocation", "(", "Object", "protocolKey", ",", "I", "invocation", ")", "throws", "ConfigException", "{", "Objects", ".", "requireNonNull", "(", "invocation", ")", ";", "invocation", "=", "buildInvocation", "(", "invocation", ")", ";", "// X...
Builds the invocation, saving its value keyed by the protocol key. @param protocolKey protocol-specific key to save the invocation in @param invocation the invocation to build.
[ "Builds", "the", "invocation", "saving", "its", "value", "keyed", "by", "the", "protocol", "key", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L157-L182
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.dumpClass
public static void dumpClass(String file, byte[] bytes) { File f = new File(file); try { FileOutputStream fos = new FileOutputStream(f); fos.write(bytes); fos.flush(); fos.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }
java
public static void dumpClass(String file, byte[] bytes) { File f = new File(file); try { FileOutputStream fos = new FileOutputStream(f); fos.write(bytes); fos.flush(); fos.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }
[ "public", "static", "void", "dumpClass", "(", "String", "file", ",", "byte", "[", "]", "bytes", ")", "{", "File", "f", "=", "new", "File", "(", "file", ")", ";", "try", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "f", ")", ";...
Dump some bytes into the specified file. @param file full filename for where to dump the stuff (e.g. c:/temp/Foo.class) @param bytes the bytes to write to the file
[ "Dump", "some", "bytes", "into", "the", "specified", "file", "." ]
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1200-L1211
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java
SSLTransportParameters.setTrustStore
public void setTrustStore(String trustStore, String trustPass) { setTrustStore(trustStore, trustPass, null, null); }
java
public void setTrustStore(String trustStore, String trustPass) { setTrustStore(trustStore, trustPass, null, null); }
[ "public", "void", "setTrustStore", "(", "String", "trustStore", ",", "String", "trustPass", ")", "{", "setTrustStore", "(", "trustStore", ",", "trustPass", ",", "null", ",", "null", ")", ";", "}" ]
Set the truststore and password @param trustStore Location of the Truststore on disk @param trustPass Truststore password
[ "Set", "the", "truststore", "and", "password" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java#L254-L256
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.updateEntity
private void updateEntity(String type, String id, XContentBuilder source) throws StorageException { try { String doc = source.string(); /* JestResult response = */esClient.execute(new Index.Builder(doc) .setParameter(Parameters.OP_TYPE, "index").index(getIndexName())....
java
private void updateEntity(String type, String id, XContentBuilder source) throws StorageException { try { String doc = source.string(); /* JestResult response = */esClient.execute(new Index.Builder(doc) .setParameter(Parameters.OP_TYPE, "index").index(getIndexName())....
[ "private", "void", "updateEntity", "(", "String", "type", ",", "String", "id", ",", "XContentBuilder", "source", ")", "throws", "StorageException", "{", "try", "{", "String", "doc", "=", "source", ".", "string", "(", ")", ";", "/* JestResult response = */", "e...
Updates a single entity. @param type @param id @param source @throws StorageException
[ "Updates", "a", "single", "entity", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2081-L2089
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getImploded
@Nonnull public static String getImploded (@Nonnull final String sSep, @Nullable final Iterable <?> aElements) { return getImplodedMapped (sSep, aElements, String::valueOf); }
java
@Nonnull public static String getImploded (@Nonnull final String sSep, @Nullable final Iterable <?> aElements) { return getImplodedMapped (sSep, aElements, String::valueOf); }
[ "@", "Nonnull", "public", "static", "String", "getImploded", "(", "@", "Nonnull", "final", "String", "sSep", ",", "@", "Nullable", "final", "Iterable", "<", "?", ">", "aElements", ")", "{", "return", "getImplodedMapped", "(", "sSep", ",", "aElements", ",", ...
Get a concatenated String from all elements of the passed container, separated by the specified separator string. Even <code>null</code> elements are added. @param sSep The separator to use. May not be <code>null</code>. @param aElements The container to convert. May be <code>null</code> or empty. @return The concaten...
[ "Get", "a", "concatenated", "String", "from", "all", "elements", "of", "the", "passed", "container", "separated", "by", "the", "specified", "separator", "string", ".", "Even", "<code", ">", "null<", "/", "code", ">", "elements", "are", "added", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L929-L933
lagom/lagom
service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/RequestHeader.java
RequestHeader.withUri
public RequestHeader withUri(URI uri) { return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, principal, headers, lowercaseHeaders); }
java
public RequestHeader withUri(URI uri) { return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, principal, headers, lowercaseHeaders); }
[ "public", "RequestHeader", "withUri", "(", "URI", "uri", ")", "{", "return", "new", "RequestHeader", "(", "method", ",", "uri", ",", "protocol", ",", "acceptedResponseProtocols", ",", "principal", ",", "headers", ",", "lowercaseHeaders", ")", ";", "}" ]
Return a copy of this request header with the given uri set. @param uri The uri to set. @return A copy of this request header.
[ "Return", "a", "copy", "of", "this", "request", "header", "with", "the", "given", "uri", "set", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/RequestHeader.java#L102-L104
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/compiler/Compiler.java
Compiler.compileSource0
private Class<?> compileSource0(String className, String sourceCode) throws Exception { List<MemorySourceJavaFileObject> compUnits = new ArrayList<MemorySourceJavaFileObject>(1); compUnits.add(new MemorySourceJavaFileObject(className + ".java", sourceCode)); DiagnosticCollector<JavaFileObject> d...
java
private Class<?> compileSource0(String className, String sourceCode) throws Exception { List<MemorySourceJavaFileObject> compUnits = new ArrayList<MemorySourceJavaFileObject>(1); compUnits.add(new MemorySourceJavaFileObject(className + ".java", sourceCode)); DiagnosticCollector<JavaFileObject> d...
[ "private", "Class", "<", "?", ">", "compileSource0", "(", "String", "className", ",", "String", "sourceCode", ")", "throws", "Exception", "{", "List", "<", "MemorySourceJavaFileObject", ">", "compUnits", "=", "new", "ArrayList", "<", "MemorySourceJavaFileObject", ...
Compiles multiple sources file and loads the classes. @param sourceFiles the source files to compile. @param parentLoader the parent class loader to use when loading classes. @return a map of compiled classes. This maps class names to Class objects. @throws Exception
[ "Compiles", "multiple", "sources", "file", "and", "loads", "the", "classes", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/compiler/Compiler.java#L100-L115
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.parseDateStrictly
@GwtIncompatible("incompatible method") public static Date parseDateStrictly(final String str, final String... parsePatterns) throws ParseException { return parseDateStrictly(str, null, parsePatterns); }
java
@GwtIncompatible("incompatible method") public static Date parseDateStrictly(final String str, final String... parsePatterns) throws ParseException { return parseDateStrictly(str, null, parsePatterns); }
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "Date", "parseDateStrictly", "(", "final", "String", "str", ",", "final", "String", "...", "parsePatterns", ")", "throws", "ParseException", "{", "return", "parseDateStrictly", "(", "st...
<p>Parses a string representing a date by trying a variety of different parsers.</p> <p>The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string. If no parse patterns match, a ParseException is thrown.</p> The parser parses strictly - it does not allow...
[ "<p", ">", "Parses", "a", "string", "representing", "a", "date", "by", "trying", "a", "variety", "of", "different", "parsers", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L325-L328
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/ExtractorUtils.java
ExtractorUtils.getVcsUrl
public static String getVcsUrl(Map<String, String> env) { String url = env.get("SVN_URL"); if (StringUtils.isBlank(url)) { url = publicGitUrl(env.get("GIT_URL")); } if (StringUtils.isBlank(url)) { url = env.get("P4PORT"); } return url; }
java
public static String getVcsUrl(Map<String, String> env) { String url = env.get("SVN_URL"); if (StringUtils.isBlank(url)) { url = publicGitUrl(env.get("GIT_URL")); } if (StringUtils.isBlank(url)) { url = env.get("P4PORT"); } return url; }
[ "public", "static", "String", "getVcsUrl", "(", "Map", "<", "String", ",", "String", ">", "env", ")", "{", "String", "url", "=", "env", ".", "get", "(", "\"SVN_URL\"", ")", ";", "if", "(", "StringUtils", ".", "isBlank", "(", "url", ")", ")", "{", "...
Get the VCS url from the Jenkins build environment. The search will one of "SVN_REVISION", "GIT_COMMIT", "P4_CHANGELIST" in the environment. @param env Th Jenkins build environment. @return The vcs url for supported VCS
[ "Get", "the", "VCS", "url", "from", "the", "Jenkins", "build", "environment", ".", "The", "search", "will", "one", "of", "SVN_REVISION", "GIT_COMMIT", "P4_CHANGELIST", "in", "the", "environment", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L99-L108
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/request/mapper/HighScoreRequestMapper.java
HighScoreRequestMapper.newComparator
protected Comparator<RequestMapperBean> newComparator() { return new Comparator<RequestMapperBean>() { @Override public int compare(final RequestMapperBean o1, final RequestMapperBean o2) { return o1.getCompatibilityScore() - o2.getCompatibilityScore(); } }; }
java
protected Comparator<RequestMapperBean> newComparator() { return new Comparator<RequestMapperBean>() { @Override public int compare(final RequestMapperBean o1, final RequestMapperBean o2) { return o1.getCompatibilityScore() - o2.getCompatibilityScore(); } }; }
[ "protected", "Comparator", "<", "RequestMapperBean", ">", "newComparator", "(", ")", "{", "return", "new", "Comparator", "<", "RequestMapperBean", ">", "(", ")", "{", "@", "Override", "public", "int", "compare", "(", "final", "RequestMapperBean", "o1", ",", "f...
Factory method for creating a new Comparator for sort the compatibility score. This method is invoked in the method initializeRequestMappers and can be overridden so users can provide their own version of a Comparator. @return the new Comparator.
[ "Factory", "method", "for", "creating", "a", "new", "Comparator", "for", "sort", "the", "compatibility", "score", ".", "This", "method", "is", "invoked", "in", "the", "method", "initializeRequestMappers", "and", "can", "be", "overridden", "so", "users", "can", ...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/request/mapper/HighScoreRequestMapper.java#L168-L178
languagetool-org/languagetool
languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
GermanSpellerRule.getWordAfterEnumerationOrNull
@Nullable private String getWordAfterEnumerationOrNull(List<String> words, int idx) { for (int i = idx; i < words.size(); i++) { String word = words.get(i); if (!(word.endsWith("-") || StringUtils.equalsAny(word, ",", "und", "oder", "sowie") || word.trim().isEmpty())) { return word; } ...
java
@Nullable private String getWordAfterEnumerationOrNull(List<String> words, int idx) { for (int i = idx; i < words.size(); i++) { String word = words.get(i); if (!(word.endsWith("-") || StringUtils.equalsAny(word, ",", "und", "oder", "sowie") || word.trim().isEmpty())) { return word; } ...
[ "@", "Nullable", "private", "String", "getWordAfterEnumerationOrNull", "(", "List", "<", "String", ">", "words", ",", "int", "idx", ")", "{", "for", "(", "int", "i", "=", "idx", ";", "i", "<", "words", ".", "size", "(", ")", ";", "i", "++", ")", "{...
for "Stil- und Grammatikprüfung", get "Grammatikprüfung" when at position of "Stil-"
[ "for", "Stil", "-", "und", "Grammatikprüfung", "get", "Grammatikprüfung", "when", "at", "position", "of", "Stil", "-" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java#L1245-L1254
alkacon/opencms-core
src/org/opencms/xml/page/CmsXmlPage.java
CmsXmlPage.addValue
public void addValue(String name, Locale locale) throws CmsIllegalArgumentException { if (name.indexOf('[') >= 0) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_XML_PAGE_CONTAINS_INDEX_1, name)); } if (hasValue(name, locale)) { ...
java
public void addValue(String name, Locale locale) throws CmsIllegalArgumentException { if (name.indexOf('[') >= 0) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_XML_PAGE_CONTAINS_INDEX_1, name)); } if (hasValue(name, locale)) { ...
[ "public", "void", "addValue", "(", "String", "name", ",", "Locale", "locale", ")", "throws", "CmsIllegalArgumentException", "{", "if", "(", "name", ".", "indexOf", "(", "'", "'", ")", ">=", "0", ")", "{", "throw", "new", "CmsIllegalArgumentException", "(", ...
Adds a new, empty value with the given name and locale to this XML document.<p> @param name the name of the value @param locale the locale of the value @throws CmsIllegalArgumentException if the name contains an index ("[&lt;number&gt;]") or the value for the given locale already exists in the xmlpage.
[ "Adds", "a", "new", "empty", "value", "with", "the", "given", "name", "and", "locale", "to", "this", "XML", "document", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/page/CmsXmlPage.java#L183-L229
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java
OverpassFilterQuery.boundingBox
public OverpassFilterQuery boundingBox(double southernLat, double westernLon, double northernLat, double easternLon) { builder.boundingBox(southernLat, westernLon, northernLat, easternLon); return this; }
java
public OverpassFilterQuery boundingBox(double southernLat, double westernLon, double northernLat, double easternLon) { builder.boundingBox(southernLat, westernLon, northernLat, easternLon); return this; }
[ "public", "OverpassFilterQuery", "boundingBox", "(", "double", "southernLat", ",", "double", "westernLon", ",", "double", "northernLat", ",", "double", "easternLon", ")", "{", "builder", ".", "boundingBox", "(", "southernLat", ",", "westernLon", ",", "northernLat", ...
Adds a <i>(southernLat,westernLon,northernLat,easternLon)</i> bounding box filter to the current query. @param southernLat the southern latitude @param westernLon the western longitude @param northernLat the northern latitude @param easternLon the eastern longitude @return the current query object
[ "Adds", "a", "<i", ">", "(", "southernLat", "westernLon", "northernLat", "easternLon", ")", "<", "/", "i", ">", "bounding", "box", "filter", "to", "the", "current", "query", "." ]
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java#L221-L225
xebia/Xebium
src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java
SeleniumDriverFixture.doOn
public boolean doOn(final String command, final String target) { LOG.info("Performing | " + command + " | " + target + " |"); return executeDoCommand(command, new String[] { unalias(target) }); }
java
public boolean doOn(final String command, final String target) { LOG.info("Performing | " + command + " | " + target + " |"); return executeDoCommand(command, new String[] { unalias(target) }); }
[ "public", "boolean", "doOn", "(", "final", "String", "command", ",", "final", "String", "target", ")", "{", "LOG", ".", "info", "(", "\"Performing | \"", "+", "command", "+", "\" | \"", "+", "target", "+", "\" |\"", ")", ";", "return", "executeDoCommand", ...
<p><code> | ensure | do | <i>open</i> | on | <i>/</i> | </code></p> @param command @param target @return
[ "<p", ">", "<code", ">", "|", "ensure", "|", "do", "|", "<i", ">", "open<", "/", "i", ">", "|", "on", "|", "<i", ">", "/", "<", "/", "i", ">", "|", "<", "/", "code", ">", "<", "/", "p", ">" ]
train
https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L355-L358
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java
SessionAffinityManager.getInUseSessionVersion
@Override public int getInUseSessionVersion(ServletRequest req, SessionAffinityContext sac) { int version = sac.getResponseSessionVersion(); if (version == -1) { // not set, use request version version = sac.getRequestedSessionVersion(); } return version; }
java
@Override public int getInUseSessionVersion(ServletRequest req, SessionAffinityContext sac) { int version = sac.getResponseSessionVersion(); if (version == -1) { // not set, use request version version = sac.getRequestedSessionVersion(); } return version; }
[ "@", "Override", "public", "int", "getInUseSessionVersion", "(", "ServletRequest", "req", ",", "SessionAffinityContext", "sac", ")", "{", "int", "version", "=", "sac", ".", "getResponseSessionVersion", "(", ")", ";", "if", "(", "version", "==", "-", "1", ")", ...
/* Method to get the appropriate version to use for a new session. May be the response session id if the request has been dispatched adn the response version is already set
[ "/", "*", "Method", "to", "get", "the", "appropriate", "version", "to", "use", "for", "a", "new", "session", ".", "May", "be", "the", "response", "session", "id", "if", "the", "request", "has", "been", "dispatched", "adn", "the", "response", "version", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java#L488-L495
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.saveReport
public static void saveReport(Report report, OutputStream out) { XStream xstream = XStreamFactory.createXStream(); xstream.toXML(report, out); }
java
public static void saveReport(Report report, OutputStream out) { XStream xstream = XStreamFactory.createXStream(); xstream.toXML(report, out); }
[ "public", "static", "void", "saveReport", "(", "Report", "report", ",", "OutputStream", "out", ")", "{", "XStream", "xstream", "=", "XStreamFactory", ".", "createXStream", "(", ")", ";", "xstream", ".", "toXML", "(", "report", ",", "out", ")", ";", "}" ]
Write a report object to an output stream @param report report object @param out output stream
[ "Write", "a", "report", "object", "to", "an", "output", "stream" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L198-L201
weld/core
impl/src/main/java/org/jboss/weld/util/bytecode/ClassFileUtils.java
ClassFileUtils.toClass
public static Class<?> toClass(ClassFile ct, ClassLoader loader, ProtectionDomain domain) { try { byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args; if (domain == null) { method = defineClass1; args = new Ob...
java
public static Class<?> toClass(ClassFile ct, ClassLoader loader, ProtectionDomain domain) { try { byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args; if (domain == null) { method = defineClass1; args = new Ob...
[ "public", "static", "Class", "<", "?", ">", "toClass", "(", "ClassFile", "ct", ",", "ClassLoader", "loader", ",", "ProtectionDomain", "domain", ")", "{", "try", "{", "byte", "[", "]", "b", "=", "ct", ".", "toBytecode", "(", ")", ";", "java", ".", "la...
Converts the class to a <code>java.lang.Class</code> object. Once this method is called, further modifications are not allowed any more. <p/> <p/> The class file represented by the given <code>CtClass</code> is loaded by the given class loader to construct a <code>java.lang.Class</code> object. Since a private method o...
[ "Converts", "the", "class", "to", "a", "<code", ">", "java", ".", "lang", ".", "Class<", "/", "code", ">", "object", ".", "Once", "this", "method", "is", "called", "further", "modifications", "are", "not", "allowed", "any", "more", ".", "<p", "/", ">",...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/bytecode/ClassFileUtils.java#L121-L142
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Radar.java
Radar.updatePoi
public void updatePoi(final String BLIP_NAME, final Point2D LOCATION) { if (pois.keySet().contains(BLIP_NAME)) { pois.get(BLIP_NAME).setLocation(LOCATION); checkForBlips(); } }
java
public void updatePoi(final String BLIP_NAME, final Point2D LOCATION) { if (pois.keySet().contains(BLIP_NAME)) { pois.get(BLIP_NAME).setLocation(LOCATION); checkForBlips(); } }
[ "public", "void", "updatePoi", "(", "final", "String", "BLIP_NAME", ",", "final", "Point2D", "LOCATION", ")", "{", "if", "(", "pois", ".", "keySet", "(", ")", ".", "contains", "(", "BLIP_NAME", ")", ")", "{", "pois", ".", "get", "(", "BLIP_NAME", ")", ...
Updates the position of the given poi by it's name (BLIP_NAME) on the radar screen. This could be useful to visualize moving points. Keep in mind that only the poi's are visible as blips that are in the range of the radar. @param BLIP_NAME @param LOCATION
[ "Updates", "the", "position", "of", "the", "given", "poi", "by", "it", "s", "name", "(", "BLIP_NAME", ")", "on", "the", "radar", "screen", ".", "This", "could", "be", "useful", "to", "visualize", "moving", "points", ".", "Keep", "in", "mind", "that", "...
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Radar.java#L303-L308
apereo/cas
support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/PasswordManagementWebflowUtils.java
PasswordManagementWebflowUtils.putPasswordResetUsername
public static void putPasswordResetUsername(final RequestContext requestContext, final String username) { val flowScope = requestContext.getFlowScope(); flowScope.put("username", username); }
java
public static void putPasswordResetUsername(final RequestContext requestContext, final String username) { val flowScope = requestContext.getFlowScope(); flowScope.put("username", username); }
[ "public", "static", "void", "putPasswordResetUsername", "(", "final", "RequestContext", "requestContext", ",", "final", "String", "username", ")", "{", "val", "flowScope", "=", "requestContext", ".", "getFlowScope", "(", ")", ";", "flowScope", ".", "put", "(", "...
Put password reset username. @param requestContext the request context @param username the username
[ "Put", "password", "reset", "username", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/PasswordManagementWebflowUtils.java#L90-L93
SonarOpenCommunity/sonar-cxx
cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java
CxxReportSensor.getContextStringProperty
public static String getContextStringProperty(SensorContext context, String name, String def) { String s = context.config().get(name).orElse(null); if (s == null || s.isEmpty()) { return def; } return s; }
java
public static String getContextStringProperty(SensorContext context, String name, String def) { String s = context.config().get(name).orElse(null); if (s == null || s.isEmpty()) { return def; } return s; }
[ "public", "static", "String", "getContextStringProperty", "(", "SensorContext", "context", ",", "String", "name", ",", "String", "def", ")", "{", "String", "s", "=", "context", ".", "config", "(", ")", ".", "get", "(", "name", ")", ".", "orElse", "(", "n...
Get string property from configuration. If the string is not set or empty, return the default value. @param context sensor context @param name Name of the property @param def Default value @return Value of the property if set and not empty, else default value.
[ "Get", "string", "property", "from", "configuration", ".", "If", "the", "string", "is", "not", "set", "or", "empty", "return", "the", "default", "value", "." ]
train
https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxReportSensor.java#L71-L77
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java
BibliographyFileReader.readBibliographyFile
public ItemDataProvider readBibliographyFile(File bibfile) throws FileNotFoundException, IOException { //open buffered input stream to bibliography file if (!bibfile.exists()) { throw new FileNotFoundException("Bibliography file `" + bibfile.getName() + "' does not exist"); } try (BufferedInputStrea...
java
public ItemDataProvider readBibliographyFile(File bibfile) throws FileNotFoundException, IOException { //open buffered input stream to bibliography file if (!bibfile.exists()) { throw new FileNotFoundException("Bibliography file `" + bibfile.getName() + "' does not exist"); } try (BufferedInputStrea...
[ "public", "ItemDataProvider", "readBibliographyFile", "(", "File", "bibfile", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "//open buffered input stream to bibliography file", "if", "(", "!", "bibfile", ".", "exists", "(", ")", ")", "{", "throw", "...
Reads all items from an input bibliography file and returns a provider serving these items @param bibfile the input file @return the provider @throws FileNotFoundException if the input file was not found @throws IOException if the input file could not be read
[ "Reads", "all", "items", "from", "an", "input", "bibliography", "file", "and", "returns", "a", "provider", "serving", "these", "items" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java#L103-L114
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/transform/ObjectBindTransform.java
ObjectBindTransform.generateParseOnXml
@Override public void generateParseOnXml(BindTypeContext context, MethodSpec.Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) { // TODO QUA // TypeName typeName = resolveTypeName(property.getParent(), // property.getPropertyType().getTypeName()); TypeName ty...
java
@Override public void generateParseOnXml(BindTypeContext context, MethodSpec.Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) { // TODO QUA // TypeName typeName = resolveTypeName(property.getParent(), // property.getPropertyType().getTypeName()); TypeName ty...
[ "@", "Override", "public", "void", "generateParseOnXml", "(", "BindTypeContext", "context", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "String", "parserName", ",", "TypeName", "beanClass", ",", "String", "beanName", ",", "BindProperty", "property", ")"...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.bind.transform.BindTransform#generateParseOnXml(com.abubusoft.kripton.processor.bind.BindTypeContext, com.squareup.javapoet.MethodSpec.Builder, java.lang.String, com.squareup.javapoet.TypeName, java.lang.String, com.abubusoft.kripton.processor.bind.model.BindPropert...
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/transform/ObjectBindTransform.java#L48-L57