repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.partitioningTo
public <C extends Collection<T>> Map<Boolean, C> partitioningTo(Predicate<? super T> predicate, Supplier<C> collectionFactory) { """ Returns a {@code Map<Boolean, C>} which contains two partitions of the input elements according to a {@code Predicate}. <p> This is a <a href="package-summary.html#S...
java
public <C extends Collection<T>> Map<Boolean, C> partitioningTo(Predicate<? super T> predicate, Supplier<C> collectionFactory) { return collect(Collectors.partitioningBy(predicate, Collectors.toCollection(collectionFactory))); }
[ "public", "<", "C", "extends", "Collection", "<", "T", ">", ">", "Map", "<", "Boolean", ",", "C", ">", "partitioningTo", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ",", "Supplier", "<", "C", ">", "collectionFactory", ")", "{", "return"...
Returns a {@code Map<Boolean, C>} which contains two partitions of the input elements according to a {@code Predicate}. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> There are no guarantees on the type, mutability, serializability, or thread-safety of the {@code Map} returned. @p...
[ "Returns", "a", "{", "@code", "Map<Boolean", "C", ">", "}", "which", "contains", "two", "partitions", "of", "the", "input", "elements", "according", "to", "a", "{", "@code", "Predicate", "}", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L730-L733
samskivert/samskivert
src/main/java/com/samskivert/util/ArrayUtil.java
ArrayUtil.indexOf
public static int indexOf (int[] values, int value) { """ Looks for an element that is equal to the supplied value and returns its index in the array. @return the index of the first matching value if one was found, 1 otherwise. """ int count = (values == null) ? 0 : values.length; for (int i...
java
public static int indexOf (int[] values, int value) { int count = (values == null) ? 0 : values.length; for (int ii = 0; ii < count; ii++) { if (values[ii] == value) { return ii; } } return -1; }
[ "public", "static", "int", "indexOf", "(", "int", "[", "]", "values", ",", "int", "value", ")", "{", "int", "count", "=", "(", "values", "==", "null", ")", "?", "0", ":", "values", ".", "length", ";", "for", "(", "int", "ii", "=", "0", ";", "ii...
Looks for an element that is equal to the supplied value and returns its index in the array. @return the index of the first matching value if one was found, 1 otherwise.
[ "Looks", "for", "an", "element", "that", "is", "equal", "to", "the", "supplied", "value", "and", "returns", "its", "index", "in", "the", "array", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ArrayUtil.java#L65-L74
kristofa/wicket-tagcloud
src/main/java/com/github/kristofa/wickettagcloud/TagRenderDataModel.java
TagRenderDataModel.buildTagRenderDataList
private List<TagRenderData> buildTagRenderDataList() { """ Builds a List of {@link TagRenderData} based on the Collection of {@link TagCloudTag tags} provided by the input model. It will calculate the font size for each of the tags, respecting the min/max font sizes, and wrap each provided {@link TagCloudTag tag...
java
private List<TagRenderData> buildTagRenderDataList() { final List<TagRenderData> tagRenderData = new ArrayList<TagRenderData>(); final Collection<TagCloudTag> tags = tagCollectionModel.getObject(); int minWeight = Integer.MAX_VALUE; int maxWeight = Integer.MIN_VALUE; for (final...
[ "private", "List", "<", "TagRenderData", ">", "buildTagRenderDataList", "(", ")", "{", "final", "List", "<", "TagRenderData", ">", "tagRenderData", "=", "new", "ArrayList", "<", "TagRenderData", ">", "(", ")", ";", "final", "Collection", "<", "TagCloudTag", ">...
Builds a List of {@link TagRenderData} based on the Collection of {@link TagCloudTag tags} provided by the input model. It will calculate the font size for each of the tags, respecting the min/max font sizes, and wrap each provided {@link TagCloudTag tags} in a {@link TagRenderData} object. @return List of {@link TagR...
[ "Builds", "a", "List", "of", "{", "@link", "TagRenderData", "}", "based", "on", "the", "Collection", "of", "{", "@link", "TagCloudTag", "tags", "}", "provided", "by", "the", "input", "model", ".", "It", "will", "calculate", "the", "font", "size", "for", ...
train
https://github.com/kristofa/wicket-tagcloud/blob/9c0b5d09e7781597da26d465853db4cfdc7650a5/src/main/java/com/github/kristofa/wickettagcloud/TagRenderDataModel.java#L74-L106
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.splitFile
public static void splitFile(File file, long[] splitPoints, String storageFolder) throws IOException { """ 拆分文件 @param file 文件 @param splitPoints 拆分点数组(函数将根据拆分点来分割文件) @param storageFolder 保存路径 @throws IOException 异常 """ splitPoints = ArrayUtils.concatArrays(new long[]{0}, splitPoints, new long[...
java
public static void splitFile(File file, long[] splitPoints, String storageFolder) throws IOException { splitPoints = ArrayUtils.concatArrays(new long[]{0}, splitPoints, new long[]{file.length()}); String[] fileName = file.getName().split("\\.", 2); storageFolder += ValueConsts.SEPARATOR; ...
[ "public", "static", "void", "splitFile", "(", "File", "file", ",", "long", "[", "]", "splitPoints", ",", "String", "storageFolder", ")", "throws", "IOException", "{", "splitPoints", "=", "ArrayUtils", ".", "concatArrays", "(", "new", "long", "[", "]", "{", ...
拆分文件 @param file 文件 @param splitPoints 拆分点数组(函数将根据拆分点来分割文件) @param storageFolder 保存路径 @throws IOException 异常
[ "拆分文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L566-L585
att/AAF
authz/authz-cass/src/main/java/com/att/dao/aaf/cached/CachedUserRoleDAO.java
CachedUserRoleDAO.readByUser
public Result<List<Data>> readByUser(AuthzTrans trans, final String user) { """ Special Case. User Roles by User are very likely to be called many times in a Transaction, to validate "May User do..." Pull result, and make accessible by the Trans, which is always keyed by User. @param trans @param user @return...
java
public Result<List<Data>> readByUser(AuthzTrans trans, final String user) { DAOGetter getter = new DAOGetter(trans,dao()) { public Result<List<Data>> call() { // If the call is for THIS user, and it exists, get from TRANS, add to TRANS if not. if(user!=null && user.equals(trans.user())) { Result<List<...
[ "public", "Result", "<", "List", "<", "Data", ">", ">", "readByUser", "(", "AuthzTrans", "trans", ",", "final", "String", "user", ")", "{", "DAOGetter", "getter", "=", "new", "DAOGetter", "(", "trans", ",", "dao", "(", ")", ")", "{", "public", "Result"...
Special Case. User Roles by User are very likely to be called many times in a Transaction, to validate "May User do..." Pull result, and make accessible by the Trans, which is always keyed by User. @param trans @param user @return
[ "Special", "Case", ".", "User", "Roles", "by", "User", "are", "very", "likely", "to", "be", "called", "many", "times", "in", "a", "Transaction", "to", "validate", "May", "User", "do", "...", "Pull", "result", "and", "make", "accessible", "by", "the", "Tr...
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/authz/authz-cass/src/main/java/com/att/dao/aaf/cached/CachedUserRoleDAO.java#L34-L54
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/ScannerParamFilter.java
ScannerParamFilter.isToExclude
public boolean isToExclude(HttpMessage msg, NameValuePair param) { """ Check if the parameter should be excluded by the scanner @param msg the message that is currently under scanning @param param the Value/Name param object that is currently under scanning @return true if the parameter should be excluded "...
java
public boolean isToExclude(HttpMessage msg, NameValuePair param) { return ((paramType == NameValuePair.TYPE_UNDEFINED) || (param.getType() == paramType)) && ((urlPattern == null) || urlPattern.matcher(msg.getRequestHeader().getURI().toString().toUpperCase(Locale.ROOT)).matches()) && ...
[ "public", "boolean", "isToExclude", "(", "HttpMessage", "msg", ",", "NameValuePair", "param", ")", "{", "return", "(", "(", "paramType", "==", "NameValuePair", ".", "TYPE_UNDEFINED", ")", "||", "(", "param", ".", "getType", "(", ")", "==", "paramType", ")", ...
Check if the parameter should be excluded by the scanner @param msg the message that is currently under scanning @param param the Value/Name param object that is currently under scanning @return true if the parameter should be excluded
[ "Check", "if", "the", "parameter", "should", "be", "excluded", "by", "the", "scanner" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/ScannerParamFilter.java#L131-L135
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java
CachingXmlDataStore.createCachingXmlDataStore
@Nonnull public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final URL dataUrl, @Nonnull final URL versionUrl, @Nonnull final Charset charset, @Nonnull final DataStore fallback) { """ Constructs a new instance of {@code CachingXmlDataStore} with the given argumen...
java
@Nonnull public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final URL dataUrl, @Nonnull final URL versionUrl, @Nonnull final Charset charset, @Nonnull final DataStore fallback) { Check.notNull(cacheFile, "cacheFile"); Check.notNull(charset, "charset"); Check.no...
[ "@", "Nonnull", "public", "static", "CachingXmlDataStore", "createCachingXmlDataStore", "(", "@", "Nonnull", "final", "File", "cacheFile", ",", "@", "Nonnull", "final", "URL", "dataUrl", ",", "@", "Nonnull", "final", "URL", "versionUrl", ",", "@", "Nonnull", "fi...
Constructs a new instance of {@code CachingXmlDataStore} with the given arguments. The given {@code cacheFile} can be empty or filled with previously cached data in XML format. The file must be writable otherwise an exception will be thrown. @param cacheFile file with cached <em>UAS data</em> in XML format or empty fi...
[ "Constructs", "a", "new", "instance", "of", "{", "@code", "CachingXmlDataStore", "}", "with", "the", "given", "arguments", ".", "The", "given", "{", "@code", "cacheFile", "}", "can", "be", "empty", "or", "filled", "with", "previously", "cached", "data", "in"...
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java#L173-L185
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.factorial
public static long factorial(long start, long end) { """ 计算阶乘 <p> n! = n * (n-1) * ... * end </p> @param start 阶乘起始 @param end 阶乘结束 @return 结果 @since 4.1.0 """ if (start < end) { return 0L; } if (start == end) { return 1L; } return start * factorial(start - 1, end); }
java
public static long factorial(long start, long end) { if (start < end) { return 0L; } if (start == end) { return 1L; } return start * factorial(start - 1, end); }
[ "public", "static", "long", "factorial", "(", "long", "start", ",", "long", "end", ")", "{", "if", "(", "start", "<", "end", ")", "{", "return", "0L", ";", "}", "if", "(", "start", "==", "end", ")", "{", "return", "1L", ";", "}", "return", "start...
计算阶乘 <p> n! = n * (n-1) * ... * end </p> @param start 阶乘起始 @param end 阶乘结束 @return 结果 @since 4.1.0
[ "计算阶乘", "<p", ">", "n!", "=", "n", "*", "(", "n", "-", "1", ")", "*", "...", "*", "end", "<", "/", "p", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1384-L1392
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/EvaluationUtils.java
EvaluationUtils.fBeta
public static double fBeta(double beta, double precision, double recall) { """ Calculate the F-beta value from precision and recall @param beta Beta value to use @param precision Precision @param recall Recall @return F-beta value """ if (precision == 0.0 || recall == 0.0) ret...
java
public static double fBeta(double beta, double precision, double recall) { if (precision == 0.0 || recall == 0.0) return 0; double numerator = (1 + beta * beta) * precision * recall; double denominator = beta * beta * precision + recall; return numerator / denominator; ...
[ "public", "static", "double", "fBeta", "(", "double", "beta", ",", "double", "precision", ",", "double", "recall", ")", "{", "if", "(", "precision", "==", "0.0", "||", "recall", "==", "0.0", ")", "return", "0", ";", "double", "numerator", "=", "(", "1"...
Calculate the F-beta value from precision and recall @param beta Beta value to use @param precision Precision @param recall Recall @return F-beta value
[ "Calculate", "the", "F", "-", "beta", "value", "from", "precision", "and", "recall" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/EvaluationUtils.java#L123-L131
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getCacheBustedUrl
public static String getCacheBustedUrl(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { """ Return the cache busted url associated to the url passed in parameter, if the resource is not found, null will b returned. @param url the url path to...
java
public static String getCacheBustedUrl(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { String checksum = getChecksum(url, rsReader, jawrConfig); String result = JawrConstant.CACHE_BUSTER_PREFIX; boolean generatedBinaryResource = jawrConfig.get...
[ "public", "static", "String", "getCacheBustedUrl", "(", "String", "url", ",", "ResourceReaderHandler", "rsReader", ",", "JawrConfig", "jawrConfig", ")", "throws", "IOException", ",", "ResourceNotFoundException", "{", "String", "checksum", "=", "getChecksum", "(", "url...
Return the cache busted url associated to the url passed in parameter, if the resource is not found, null will b returned. @param url the url path to the resource file @param rsReader the resource reader handler @param jawrConfig the jawrConfig @return the cache busted url @throws IOException if an IO exception occurs...
[ "Return", "the", "cache", "busted", "url", "associated", "to", "the", "url", "passed", "in", "parameter", "if", "the", "resource", "is", "not", "found", "null", "will", "b", "returned", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L105-L126
samskivert/samskivert
src/main/java/com/samskivert/swing/util/SwingUtil.java
SwingUtil.createImageCursor
public static Cursor createImageCursor (Image img, Point hotspot) { """ Create a custom cursor out of the specified image, with the specified hotspot. """ Toolkit tk = Toolkit.getDefaultToolkit(); // for now, just report the cursor restrictions, then blindly create int w = img.getWidth...
java
public static Cursor createImageCursor (Image img, Point hotspot) { Toolkit tk = Toolkit.getDefaultToolkit(); // for now, just report the cursor restrictions, then blindly create int w = img.getWidth(null); int h = img.getHeight(null); Dimension d = tk.getBestCursorSize(w, h...
[ "public", "static", "Cursor", "createImageCursor", "(", "Image", "img", ",", "Point", "hotspot", ")", "{", "Toolkit", "tk", "=", "Toolkit", ".", "getDefaultToolkit", "(", ")", ";", "// for now, just report the cursor restrictions, then blindly create", "int", "w", "="...
Create a custom cursor out of the specified image, with the specified hotspot.
[ "Create", "a", "custom", "cursor", "out", "of", "the", "specified", "image", "with", "the", "specified", "hotspot", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/SwingUtil.java#L508-L549
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/collapser/CollapsedRequestSubject.java
CollapsedRequestSubject.setExceptionIfResponseNotReceived
public Exception setExceptionIfResponseNotReceived(Exception e, String exceptionMessage) { """ Set an ISE if a response is not yet received otherwise skip it @param e A pre-generated exception. If this is null an ISE will be created and returned @param exceptionMessage The message for the ISE """ ...
java
public Exception setExceptionIfResponseNotReceived(Exception e, String exceptionMessage) { Exception exception = e; if (!valueSet.get() && !isTerminated()) { if (e == null) { exception = new IllegalStateException(exceptionMessage); } setExceptionIfRes...
[ "public", "Exception", "setExceptionIfResponseNotReceived", "(", "Exception", "e", ",", "String", "exceptionMessage", ")", "{", "Exception", "exception", "=", "e", ";", "if", "(", "!", "valueSet", ".", "get", "(", ")", "&&", "!", "isTerminated", "(", ")", ")...
Set an ISE if a response is not yet received otherwise skip it @param e A pre-generated exception. If this is null an ISE will be created and returned @param exceptionMessage The message for the ISE
[ "Set", "an", "ISE", "if", "a", "response", "is", "not", "yet", "received", "otherwise", "skip", "it" ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/collapser/CollapsedRequestSubject.java#L149-L160
deeplearning4j/deeplearning4j
nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java
TensorflowConversion.loadGraph
public TF_Graph loadGraph(String filePath, TF_Status status) throws IOException { """ Get an initialized {@link TF_Graph} based on the passed in file (the file must be a binary protobuf/pb file) The graph will be modified to be associated with the device associated with this current thread. Depending on the...
java
public TF_Graph loadGraph(String filePath, TF_Status status) throws IOException { byte[] bytes = Files.readAllBytes(Paths.get(filePath)); return loadGraph(bytes, status); }
[ "public", "TF_Graph", "loadGraph", "(", "String", "filePath", ",", "TF_Status", "status", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "Files", ".", "readAllBytes", "(", "Paths", ".", "get", "(", "filePath", ")", ")", ";", "return", ...
Get an initialized {@link TF_Graph} based on the passed in file (the file must be a binary protobuf/pb file) The graph will be modified to be associated with the device associated with this current thread. Depending on the active {@link Nd4j#getBackend()} the device will either be the gpu pinned to the current thread ...
[ "Get", "an", "initialized", "{", "@link", "TF_Graph", "}", "based", "on", "the", "passed", "in", "file", "(", "the", "file", "must", "be", "a", "binary", "protobuf", "/", "pb", "file", ")", "The", "graph", "will", "be", "modified", "to", "be", "associa...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java#L284-L287
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java
DebugUtil.printDebug
public static void printDebug(final Enumeration pEnumeration, final String pMethodName, final PrintStream pPrintStream) { """ Invokes a given method of every element in a {@code java.util.Enumeration} and prints the results to a {@code java.io.PrintStream}. The method to be invoked must have no formal parameters....
java
public static void printDebug(final Enumeration pEnumeration, final String pMethodName, final PrintStream pPrintStream) { if (pPrintStream == null) { System.err.println(PRINTSTREAM_IS_NULL_ERROR_MESSAGE); return; } if (pEnumeration == null) { pPrintStream.println(ENUMERATION_IS_NUL...
[ "public", "static", "void", "printDebug", "(", "final", "Enumeration", "pEnumeration", ",", "final", "String", "pMethodName", ",", "final", "PrintStream", "pPrintStream", ")", "{", "if", "(", "pPrintStream", "==", "null", ")", "{", "System", ".", "err", ".", ...
Invokes a given method of every element in a {@code java.util.Enumeration} and prints the results to a {@code java.io.PrintStream}. The method to be invoked must have no formal parameters. <p> If an exception is throwed during the method invocation, the element's {@code toString()} method is called. For bulk data types...
[ "Invokes", "a", "given", "method", "of", "every", "element", "in", "a", "{" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L425-L438
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java
EntityCapsManager.verifyDiscoverInfoVersion
public static boolean verifyDiscoverInfoVersion(String ver, String hash, DiscoverInfo info) { """ Verify DiscoverInfo and Caps Node as defined in XEP-0115 5.4 Processing Method. @see <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0115 5.4 Processing Method</a> @param ver @param hash @par...
java
public static boolean verifyDiscoverInfoVersion(String ver, String hash, DiscoverInfo info) { // step 3.3 check for duplicate identities if (info.containsDuplicateIdentities()) return false; // step 3.4 check for duplicate features if (info.containsDuplicateFeatures()) ...
[ "public", "static", "boolean", "verifyDiscoverInfoVersion", "(", "String", "ver", ",", "String", "hash", ",", "DiscoverInfo", "info", ")", "{", "// step 3.3 check for duplicate identities", "if", "(", "info", ".", "containsDuplicateIdentities", "(", ")", ")", "return"...
Verify DiscoverInfo and Caps Node as defined in XEP-0115 5.4 Processing Method. @see <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0115 5.4 Processing Method</a> @param ver @param hash @param info @return true if it's valid and should be cache, false if not
[ "Verify", "DiscoverInfo", "and", "Caps", "Node", "as", "defined", "in", "XEP", "-", "0115", "5", ".", "4", "Processing", "Method", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java#L584-L603
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4AddressSection.java
IPv4AddressSection.bitwiseOrNetwork
public IPv4AddressSection bitwiseOrNetwork(IPv4AddressSection mask, int networkPrefixLength) throws IncompatibleAddressException, SizeMismatchException { """ Does the bitwise disjunction with this address section. Useful when subnetting. Similar to {@link #maskNetwork(IPv4AddressSection, int)} which does the bit...
java
public IPv4AddressSection bitwiseOrNetwork(IPv4AddressSection mask, int networkPrefixLength) throws IncompatibleAddressException, SizeMismatchException { checkMaskSectionCount(mask); if(getNetwork().getPrefixConfiguration().allPrefixedAddressesAreSubnets()) { return getOredSegments( this, networkPrefix...
[ "public", "IPv4AddressSection", "bitwiseOrNetwork", "(", "IPv4AddressSection", "mask", ",", "int", "networkPrefixLength", ")", "throws", "IncompatibleAddressException", ",", "SizeMismatchException", "{", "checkMaskSectionCount", "(", "mask", ")", ";", "if", "(", "getNetwo...
Does the bitwise disjunction with this address section. Useful when subnetting. Similar to {@link #maskNetwork(IPv4AddressSection, int)} which does the bitwise conjunction. <p> Any existing prefix length is dropped for the new prefix length and the disjunction is applied up to the end the new prefix length. @param m...
[ "Does", "the", "bitwise", "disjunction", "with", "this", "address", "section", ".", "Useful", "when", "subnetting", ".", "Similar", "to", "{", "@link", "#maskNetwork", "(", "IPv4AddressSection", "int", ")", "}", "which", "does", "the", "bitwise", "conjunction", ...
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4AddressSection.java#L1356-L1380
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkReturn
private Environment checkReturn(Stmt.Return stmt, Environment environment, EnclosingScope scope) throws IOException { """ Type check a <code>return</code> statement. If a return expression is given, then we must check that this is well-formed and is a subtype of the enclosing function or method's declared ret...
java
private Environment checkReturn(Stmt.Return stmt, Environment environment, EnclosingScope scope) throws IOException { // Determine the set of return types for the enclosing function or // method. This then allows us to check the given operands are // appropriate subtypes. Decl.FunctionOrMethod fm = scope.get...
[ "private", "Environment", "checkReturn", "(", "Stmt", ".", "Return", "stmt", ",", "Environment", "environment", ",", "EnclosingScope", "scope", ")", "throws", "IOException", "{", "// Determine the set of return types for the enclosing function or", "// method. This then allows ...
Type check a <code>return</code> statement. If a return expression is given, then we must check that this is well-formed and is a subtype of the enclosing function or method's declared return type. The environment after a return statement is "bottom" because that represents an unreachable program point. @param stmt St...
[ "Type", "check", "a", "<code", ">", "return<", "/", "code", ">", "statement", ".", "If", "a", "return", "expression", "is", "given", "then", "we", "must", "check", "that", "this", "is", "well", "-", "formed", "and", "is", "a", "subtype", "of", "the", ...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L607-L620
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/env/DependencyTree.java
DependencyTree.add
public void add(T parent, T child) { """ A transient dependencies linked ot a parent (origin) @param parent """ final Set<T> children = depTree.computeIfAbsent(parent, p -> new LinkedHashSet<>()); if (!child.equals(parent)) { children.add(child); } }
java
public void add(T parent, T child) { final Set<T> children = depTree.computeIfAbsent(parent, p -> new LinkedHashSet<>()); if (!child.equals(parent)) { children.add(child); } }
[ "public", "void", "add", "(", "T", "parent", ",", "T", "child", ")", "{", "final", "Set", "<", "T", ">", "children", "=", "depTree", ".", "computeIfAbsent", "(", "parent", ",", "p", "->", "new", "LinkedHashSet", "<>", "(", ")", ")", ";", "if", "(",...
A transient dependencies linked ot a parent (origin) @param parent
[ "A", "transient", "dependencies", "linked", "ot", "a", "parent", "(", "origin", ")" ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/env/DependencyTree.java#L41-L46
alkacon/opencms-core
src/org/opencms/ui/components/codemirror/CmsCodeMirror.java
CmsCodeMirror.registerSearchReplace
public void registerSearchReplace(Button search, Button replace) { """ Registers the given buttons as the search and replace buttons.<p> @param search the search button @param replace the replace button """ if (getState().m_enableSearchReplace) { throw new RuntimeException("Search/repl...
java
public void registerSearchReplace(Button search, Button replace) { if (getState().m_enableSearchReplace) { throw new RuntimeException("Search/replace already registered."); } search.setId(HTML_ID_PREFIX + m_componentId + "-search"); replace.setId(HTML_ID_PREFIX + m_component...
[ "public", "void", "registerSearchReplace", "(", "Button", "search", ",", "Button", "replace", ")", "{", "if", "(", "getState", "(", ")", ".", "m_enableSearchReplace", ")", "{", "throw", "new", "RuntimeException", "(", "\"Search/replace already registered.\"", ")", ...
Registers the given buttons as the search and replace buttons.<p> @param search the search button @param replace the replace button
[ "Registers", "the", "given", "buttons", "as", "the", "search", "and", "replace", "buttons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/codemirror/CmsCodeMirror.java#L547-L556
openengsb/openengsb
components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/driver/AbstractTypeMap.java
AbstractTypeMap.put
protected DataType put(Class<?> clazz, int type, String name) { """ Create a new DataType instance for the given type and name, and place it in the map with the given Class as key. @param clazz the key @param type the type of {@code java.sql.Types} @param name the name of the type corresponding to the used db...
java
protected DataType put(Class<?> clazz, int type, String name) { DataType dataType = new DataType(type, name); map.put(clazz, dataType); return dataType; }
[ "protected", "DataType", "put", "(", "Class", "<", "?", ">", "clazz", ",", "int", "type", ",", "String", "name", ")", "{", "DataType", "dataType", "=", "new", "DataType", "(", "type", ",", "name", ")", ";", "map", ".", "put", "(", "clazz", ",", "da...
Create a new DataType instance for the given type and name, and place it in the map with the given Class as key. @param clazz the key @param type the type of {@code java.sql.Types} @param name the name of the type corresponding to the used dbms @return the DataType created
[ "Create", "a", "new", "DataType", "instance", "for", "the", "given", "type", "and", "name", "and", "place", "it", "in", "the", "map", "with", "the", "given", "Class", "as", "key", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/driver/AbstractTypeMap.java#L51-L55
alkacon/opencms-core
src/org/opencms/jsp/search/controller/CmsSearchControllerFacetField.java
CmsSearchControllerFacetField.appendFacetOption
protected void appendFacetOption(StringBuffer query, final String name, final String value) { """ Appends the query part for the facet to the query string. @param query The current query string. @param name The name of the facet parameter, e.g. "limit", "order", .... @param value The value to set for the parame...
java
protected void appendFacetOption(StringBuffer query, final String name, final String value) { query.append(" facet.").append(name).append("=").append(value); }
[ "protected", "void", "appendFacetOption", "(", "StringBuffer", "query", ",", "final", "String", "name", ",", "final", "String", "value", ")", "{", "query", ".", "append", "(", "\" facet.\"", ")", ".", "append", "(", "name", ")", ".", "append", "(", "\"=\""...
Appends the query part for the facet to the query string. @param query The current query string. @param name The name of the facet parameter, e.g. "limit", "order", .... @param value The value to set for the parameter specified by name.
[ "Appends", "the", "query", "part", "for", "the", "facet", "to", "the", "query", "string", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/controller/CmsSearchControllerFacetField.java#L204-L207
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLFacetRestrictionImpl_CustomFieldSerializer.java
OWLFacetRestrictionImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLFacetRestrictionImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLFacetRestrictionImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLFacetRestrictionImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLFacetRestrictionImpl_CustomFieldSerializer.java#L72-L75
grpc/grpc-java
examples/src/main/java/io/grpc/examples/authentication/AuthClient.java
AuthClient.main
public static void main(String[] args) throws Exception { """ Greet server. If provided, the first element of {@code args} is the name to use in the greeting. """ AuthClient client = new AuthClient("localhost", 50051); try { /* Access a service running on the local machine on port 50051 */ ...
java
public static void main(String[] args) throws Exception { AuthClient client = new AuthClient("localhost", 50051); try { /* Access a service running on the local machine on port 50051 */ String user = "world"; if (args.length > 0) { user = args[0]; /* Use the arg as the name to greet i...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "AuthClient", "client", "=", "new", "AuthClient", "(", "\"localhost\"", ",", "50051", ")", ";", "try", "{", "/* Access a service running on the local machine on p...
Greet server. If provided, the first element of {@code args} is the name to use in the greeting.
[ "Greet", "server", ".", "If", "provided", "the", "first", "element", "of", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/examples/src/main/java/io/grpc/examples/authentication/AuthClient.java#L92-L108
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/easy/EasyPredictModelWrapper.java
EasyPredictModelWrapper.predictRegression
public RegressionModelPrediction predictRegression(RowData data, double offset) throws PredictException { """ Make a prediction on a new data point using a Regression model. @param data A new data point. @param offset Prediction offset @return The prediction. @throws PredictException """ double[] pre...
java
public RegressionModelPrediction predictRegression(RowData data, double offset) throws PredictException { double[] preds = preamble(ModelCategory.Regression, data, offset); RegressionModelPrediction p = new RegressionModelPrediction(); if (enableLeafAssignment) { // only get leaf node assignment if enabled...
[ "public", "RegressionModelPrediction", "predictRegression", "(", "RowData", "data", ",", "double", "offset", ")", "throws", "PredictException", "{", "double", "[", "]", "preds", "=", "preamble", "(", "ModelCategory", ".", "Regression", ",", "data", ",", "offset", ...
Make a prediction on a new data point using a Regression model. @param data A new data point. @param offset Prediction offset @return The prediction. @throws PredictException
[ "Make", "a", "prediction", "on", "a", "new", "data", "point", "using", "a", "Regression", "model", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/easy/EasyPredictModelWrapper.java#L731-L752
jmeetsma/Iglu-Http
src/main/java/org/ijsberg/iglu/util/http/ServletSupport.java
ServletSupport.writeClassPathResource
public static void writeClassPathResource(HttpServletResponse response, String path, String contentType) throws IOException { """ Obtains binary resource from classpath and writes it to http response. @param response @param path file name of the resource to write to http servlet response @param contentType ...
java
public static void writeClassPathResource(HttpServletResponse response, String path, String contentType) throws IOException { if (path.startsWith("/")) { path = path.substring(1); } // System.out.println(new LogEntry("trying to retrieve " + path + " from classloader"); InputStream input = ServletS...
[ "public", "static", "void", "writeClassPathResource", "(", "HttpServletResponse", "response", ",", "String", "path", ",", "String", "contentType", ")", "throws", "IOException", "{", "if", "(", "path", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "path", "="...
Obtains binary resource from classpath and writes it to http response. @param response @param path file name of the resource to write to http servlet response @param contentType
[ "Obtains", "binary", "resource", "from", "classpath", "and", "writes", "it", "to", "http", "response", "." ]
train
https://github.com/jmeetsma/Iglu-Http/blob/5b5ed3b417285dc79b7aa013bf2340bb5ba1ffbe/src/main/java/org/ijsberg/iglu/util/http/ServletSupport.java#L656-L682
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/GroupOf.java
GroupOf.setOffset
@Override public C setOffset(final double x, final double y) { """ Sets this group's offset, at the given x and y coordinates. @param x @param y @return Group this Group """ getAttributes().setOffset(x, y); return cast(); }
java
@Override public C setOffset(final double x, final double y) { getAttributes().setOffset(x, y); return cast(); }
[ "@", "Override", "public", "C", "setOffset", "(", "final", "double", "x", ",", "final", "double", "y", ")", "{", "getAttributes", "(", ")", ".", "setOffset", "(", "x", ",", "y", ")", ";", "return", "cast", "(", ")", ";", "}" ]
Sets this group's offset, at the given x and y coordinates. @param x @param y @return Group this Group
[ "Sets", "this", "group", "s", "offset", "at", "the", "given", "x", "and", "y", "coordinates", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/GroupOf.java#L544-L550
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java
AuditUtils.valueChanged
public static boolean valueChanged(String before, String after) { """ Returns true only if the value changed. @param before the value before change @param after the value after change @return true if value changed, else false """ if ((before == null && after == null) || after == null) { ...
java
public static boolean valueChanged(String before, String after) { if ((before == null && after == null) || after == null) { return false; } if (before == null) { return true; } return !before.trim().equals(after.trim()); }
[ "public", "static", "boolean", "valueChanged", "(", "String", "before", ",", "String", "after", ")", "{", "if", "(", "(", "before", "==", "null", "&&", "after", "==", "null", ")", "||", "after", "==", "null", ")", "{", "return", "false", ";", "}", "i...
Returns true only if the value changed. @param before the value before change @param after the value after change @return true if value changed, else false
[ "Returns", "true", "only", "if", "the", "value", "changed", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java#L67-L77
craftercms/commons
utilities/src/main/java/org/craftercms/commons/rest/HttpMessageConvertingResponseWriter.java
HttpMessageConvertingResponseWriter.getMostSpecificMediaType
protected MediaType getMostSpecificMediaType(MediaType acceptType, MediaType produceType) { """ Return the more specific of the acceptable and the producible media types with the q-value of the former. """ produceType = produceType.copyQualityValue(acceptType); return MediaType.SPECIFICITY_COM...
java
protected MediaType getMostSpecificMediaType(MediaType acceptType, MediaType produceType) { produceType = produceType.copyQualityValue(acceptType); return MediaType.SPECIFICITY_COMPARATOR.compare(acceptType, produceType) <= 0 ? acceptType : produceType; }
[ "protected", "MediaType", "getMostSpecificMediaType", "(", "MediaType", "acceptType", ",", "MediaType", "produceType", ")", "{", "produceType", "=", "produceType", ".", "copyQualityValue", "(", "acceptType", ")", ";", "return", "MediaType", ".", "SPECIFICITY_COMPARATOR"...
Return the more specific of the acceptable and the producible media types with the q-value of the former.
[ "Return", "the", "more", "specific", "of", "the", "acceptable", "and", "the", "producible", "media", "types", "with", "the", "q", "-", "value", "of", "the", "former", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/rest/HttpMessageConvertingResponseWriter.java#L150-L154
apache/flink
flink-examples/flink-examples-batch/src/main/java/org/apache/flink/examples/java/relational/util/WebLogDataGenerator.java
WebLogDataGenerator.genVisits
private static void genVisits(int noVisits, int noDocs, String path) { """ Generates the files for the visits relation. The visits entries apply the following format:<br /> <code>IP Address | URL | Date (YYYY-MM-DD) | Misc. Data (e.g. User-Agent) |\n</code> @param noVisits Number of entries for the visits re...
java
private static void genVisits(int noVisits, int noDocs, String path) { Random rand = new Random(Calendar.getInstance().getTimeInMillis()); try (BufferedWriter fw = new BufferedWriter(new FileWriter(path))) { for (int i = 0; i < noVisits; i++) { int year = 2000 + rand.nextInt(10); // yearFilter 3 int m...
[ "private", "static", "void", "genVisits", "(", "int", "noVisits", ",", "int", "noDocs", ",", "String", "path", ")", "{", "Random", "rand", "=", "new", "Random", "(", "Calendar", ".", "getInstance", "(", ")", ".", "getTimeInMillis", "(", ")", ")", ";", ...
Generates the files for the visits relation. The visits entries apply the following format:<br /> <code>IP Address | URL | Date (YYYY-MM-DD) | Misc. Data (e.g. User-Agent) |\n</code> @param noVisits Number of entries for the visits relation @param noDocs Number of entries in the documents relation @param path Output p...
[ "Generates", "the", "files", "for", "the", "visits", "relation", ".", "The", "visits", "entries", "apply", "the", "following", "format", ":", "<br", "/", ">", "<code", ">", "IP", "Address", "|", "URL", "|", "Date", "(", "YYYY", "-", "MM", "-", "DD", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-examples/flink-examples-batch/src/main/java/org/apache/flink/examples/java/relational/util/WebLogDataGenerator.java#L168-L195
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java
DiscordApiImpl.getKnownCustomEmojiOrCreateCustomEmoji
public CustomEmoji getKnownCustomEmojiOrCreateCustomEmoji(long id, String name, boolean animated) { """ Gets a known custom emoji or creates a new (unknown) custom emoji object. @param id The id of the emoji. @param name The name of the emoji. @param animated Whether the emoji is animated or not. @return The...
java
public CustomEmoji getKnownCustomEmojiOrCreateCustomEmoji(long id, String name, boolean animated) { CustomEmoji emoji = customEmojis.get(id); return emoji == null ? new CustomEmojiImpl(this, id, name, animated) : emoji; }
[ "public", "CustomEmoji", "getKnownCustomEmojiOrCreateCustomEmoji", "(", "long", "id", ",", "String", "name", ",", "boolean", "animated", ")", "{", "CustomEmoji", "emoji", "=", "customEmojis", ".", "get", "(", "id", ")", ";", "return", "emoji", "==", "null", "?...
Gets a known custom emoji or creates a new (unknown) custom emoji object. @param id The id of the emoji. @param name The name of the emoji. @param animated Whether the emoji is animated or not. @return The emoji for the given json object.
[ "Gets", "a", "known", "custom", "emoji", "or", "creates", "a", "new", "(", "unknown", ")", "custom", "emoji", "object", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java#L838-L841
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WColumnLayout.java
WColumnLayout.setRightColumn
public void setRightColumn(final String heading, final WComponent content) { """ Sets the right column content. @param heading the column heading text. @param content the content. """ setRightColumn(new WHeading(WHeading.MINOR, heading), content); }
java
public void setRightColumn(final String heading, final WComponent content) { setRightColumn(new WHeading(WHeading.MINOR, heading), content); }
[ "public", "void", "setRightColumn", "(", "final", "String", "heading", ",", "final", "WComponent", "content", ")", "{", "setRightColumn", "(", "new", "WHeading", "(", "WHeading", ".", "MINOR", ",", "heading", ")", ",", "content", ")", ";", "}" ]
Sets the right column content. @param heading the column heading text. @param content the content.
[ "Sets", "the", "right", "column", "content", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WColumnLayout.java#L111-L113
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/util/ReflectionUtils.java
ReflectionUtils.getFieldValue
public static Object getFieldValue(final Object object, final Field field) throws IllegalAccessException { """ Get the value (accessible or not accessible) of a field of a target object. @param object instance to get the field of @param field field to get the value of @return the value of the field @throws ...
java
public static Object getFieldValue(final Object object, final Field field) throws IllegalAccessException { boolean access = field.isAccessible(); field.setAccessible(true); Object value = field.get(object); field.setAccessible(access); return value; }
[ "public", "static", "Object", "getFieldValue", "(", "final", "Object", "object", ",", "final", "Field", "field", ")", "throws", "IllegalAccessException", "{", "boolean", "access", "=", "field", ".", "isAccessible", "(", ")", ";", "field", ".", "setAccessible", ...
Get the value (accessible or not accessible) of a field of a target object. @param object instance to get the field of @param field field to get the value of @return the value of the field @throws IllegalAccessException if field can not be accessed
[ "Get", "the", "value", "(", "accessible", "or", "not", "accessible", ")", "of", "a", "field", "of", "a", "target", "object", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/util/ReflectionUtils.java#L145-L151
alkacon/opencms-core
src/org/opencms/relations/CmsCategoryService.java
CmsCategoryService.readCategoryResources
public List<CmsResource> readCategoryResources( CmsObject cms, String categoryPath, boolean recursive, String referencePath) throws CmsException { """ Reads the resources for a category identified by the given category path.<p> @param cms the current cms context @param categ...
java
public List<CmsResource> readCategoryResources( CmsObject cms, String categoryPath, boolean recursive, String referencePath) throws CmsException { return readCategoryResources(cms, categoryPath, recursive, referencePath, CmsResourceFilter.DEFAULT); }
[ "public", "List", "<", "CmsResource", ">", "readCategoryResources", "(", "CmsObject", "cms", ",", "String", "categoryPath", ",", "boolean", "recursive", ",", "String", "referencePath", ")", "throws", "CmsException", "{", "return", "readCategoryResources", "(", "cms"...
Reads the resources for a category identified by the given category path.<p> @param cms the current cms context @param categoryPath the path of the category to read the resources for @param recursive <code>true</code> if including sub-categories @param referencePath the reference path to find all the category reposito...
[ "Reads", "the", "resources", "for", "a", "category", "identified", "by", "the", "given", "category", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L583-L591
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.clearSynonyms
public JSONObject clearSynonyms(boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException { """ Delete all synonym set @param forwardToReplicas Forward the operation to the replica indices @param requestOptions Options to pass to this request """ return client.postRequest("/1...
java
public JSONObject clearSynonyms(boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException { return client.postRequest("/1/indexes/" + encodedIndexName + "/synonyms/clear?forwardToReplicas=" + forwardToReplicas, "", true, false, requestOptions); }
[ "public", "JSONObject", "clearSynonyms", "(", "boolean", "forwardToReplicas", ",", "RequestOptions", "requestOptions", ")", "throws", "AlgoliaException", "{", "return", "client", ".", "postRequest", "(", "\"/1/indexes/\"", "+", "encodedIndexName", "+", "\"/synonyms/clear?...
Delete all synonym set @param forwardToReplicas Forward the operation to the replica indices @param requestOptions Options to pass to this request
[ "Delete", "all", "synonym", "set" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L1544-L1546
Jasig/uPortal
uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java
UrlStringBuilder.addParameters
public UrlStringBuilder addParameters(String namespace, Map<String, List<String>> parameters) { """ Adds the contents of the specified Map as the parameters, the values of the Map are List<String> @param namespace String to prepend to each parameter name in the Map @param parameters Map of parameters to set ...
java
public UrlStringBuilder addParameters(String namespace, Map<String, List<String>> parameters) { for (final String name : parameters.keySet()) { Validate.notNull(name, "parameter map cannot contain any null keys"); } for (final Map.Entry<String, List<String>> newParamEntry : paramete...
[ "public", "UrlStringBuilder", "addParameters", "(", "String", "namespace", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "parameters", ")", "{", "for", "(", "final", "String", "name", ":", "parameters", ".", "keySet", "(", ")", ")", "{...
Adds the contents of the specified Map as the parameters, the values of the Map are List<String> @param namespace String to prepend to each parameter name in the Map @param parameters Map of parameters to set @return this
[ "Adds", "the", "contents", "of", "the", "specified", "Map", "as", "the", "parameters", "the", "values", "of", "the", "Map", "are", "List<String", ">" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L202-L214
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java
ClassPath.newInstance
public static <T> T newInstance(String className, Object... initargs) throws SetupException { """ Create a new instance of a given object @param className the class the create @param initargs the initial constructor arguments @param <T> the class type @return the create instance @throws SetupException when...
java
public static <T> T newInstance(String className, Object... initargs) throws SetupException { return newInstance(toClass(className),initargs); }
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "String", "className", ",", "Object", "...", "initargs", ")", "throws", "SetupException", "{", "return", "newInstance", "(", "toClass", "(", "className", ")", ",", "initargs", ")", ";", "}" ]
Create a new instance of a given object @param className the class the create @param initargs the initial constructor arguments @param <T> the class type @return the create instance @throws SetupException when an initialize issue occurs
[ "Create", "a", "new", "instance", "of", "a", "given", "object" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java#L181-L185
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.getValue
public static double getValue( GridCoverage2D raster, double easting, double northing ) { """ Simple method to get a value from a single band raster. <p>Note that this method does always return a value. If invalid, a novalue is returned.</p> @param raster @param easting @param northing @return """ ...
java
public static double getValue( GridCoverage2D raster, double easting, double northing ) { double[] values = null; try { values = raster.evaluate(new Point2D.Double(easting, northing), (double[]) null); } catch (Exception e) { return doubleNovalue; } return...
[ "public", "static", "double", "getValue", "(", "GridCoverage2D", "raster", ",", "double", "easting", ",", "double", "northing", ")", "{", "double", "[", "]", "values", "=", "null", ";", "try", "{", "values", "=", "raster", ".", "evaluate", "(", "new", "P...
Simple method to get a value from a single band raster. <p>Note that this method does always return a value. If invalid, a novalue is returned.</p> @param raster @param easting @param northing @return
[ "Simple", "method", "to", "get", "a", "value", "from", "a", "single", "band", "raster", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L1536-L1544
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java
SparkUtils.listPaths
public static JavaRDD<String> listPaths(JavaSparkContext sc, String path) throws IOException { """ List of the files in the given directory (path), as a {@code JavaRDD<String>} @param sc Spark context @param path Path to list files in @return Paths in the directory @throws IOException If error...
java
public static JavaRDD<String> listPaths(JavaSparkContext sc, String path) throws IOException { return listPaths(sc, path, false); }
[ "public", "static", "JavaRDD", "<", "String", ">", "listPaths", "(", "JavaSparkContext", "sc", ",", "String", "path", ")", "throws", "IOException", "{", "return", "listPaths", "(", "sc", ",", "path", ",", "false", ")", ";", "}" ]
List of the files in the given directory (path), as a {@code JavaRDD<String>} @param sc Spark context @param path Path to list files in @return Paths in the directory @throws IOException If error occurs getting directory contents
[ "List", "of", "the", "files", "in", "the", "given", "directory", "(", "path", ")", "as", "a", "{", "@code", "JavaRDD<String", ">", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java#L527-L529
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindDeadLocalStores.java
FindDeadLocalStores.suppressWarningsIfOneLiveStoreOnLine
private void suppressWarningsIfOneLiveStoreOnLine(BugAccumulator accumulator, BitSet liveStoreSourceLineSet) { """ If feature is enabled, suppress warnings where there is at least one live store on the line where the warning would be reported. @param accumulator BugAccumulator containing warnings for method ...
java
private void suppressWarningsIfOneLiveStoreOnLine(BugAccumulator accumulator, BitSet liveStoreSourceLineSet) { if (!SUPPRESS_IF_AT_LEAST_ONE_LIVE_STORE_ON_LINE) { return; } // Eliminate any accumulated warnings for instructions // that (due to inlining) *can* be live stores....
[ "private", "void", "suppressWarningsIfOneLiveStoreOnLine", "(", "BugAccumulator", "accumulator", ",", "BitSet", "liveStoreSourceLineSet", ")", "{", "if", "(", "!", "SUPPRESS_IF_AT_LEAST_ONE_LIVE_STORE_ON_LINE", ")", "{", "return", ";", "}", "// Eliminate any accumulated warni...
If feature is enabled, suppress warnings where there is at least one live store on the line where the warning would be reported. @param accumulator BugAccumulator containing warnings for method @param liveStoreSourceLineSet bitset of lines where at least one live store was seen
[ "If", "feature", "is", "enabled", "suppress", "warnings", "where", "there", "is", "at", "least", "one", "live", "store", "on", "the", "line", "where", "the", "warning", "would", "be", "reported", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindDeadLocalStores.java#L624-L642
alkacon/opencms-core
src/org/opencms/util/CmsDataTypeUtil.java
CmsDataTypeUtil.dataDeserialize
public static Object dataDeserialize(byte[] data, String type) throws IOException, ClassNotFoundException { """ Returns the deserialized (if needed) object.<p> @param data the data to deserialize @param type the data type @return the deserialized object @throws IOException if the inputstream fails @thro...
java
public static Object dataDeserialize(byte[] data, String type) throws IOException, ClassNotFoundException { // check the type of the stored data Class<?> clazz = Class.forName(type); if (isParseable(clazz)) { // this is parseable data return parse(new String(data), claz...
[ "public", "static", "Object", "dataDeserialize", "(", "byte", "[", "]", "data", ",", "String", "type", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "// check the type of the stored data", "Class", "<", "?", ">", "clazz", "=", "Class", ".", "...
Returns the deserialized (if needed) object.<p> @param data the data to deserialize @param type the data type @return the deserialized object @throws IOException if the inputstream fails @throws ClassNotFoundException if the serialized object fails
[ "Returns", "the", "deserialized", "(", "if", "needed", ")", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsDataTypeUtil.java#L70-L84
apache/groovy
src/main/groovy/groovy/lang/MetaClassImpl.java
MetaClassImpl.setAttribute
public void setAttribute(Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass) { """ <p>Sets an attribute on the given receiver for the specified arguments. The sender is the class that is setting the attribute from the object. The MetaClass will attempt to est...
java
public void setAttribute(Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass) { checkInitalised(); boolean isStatic = theClass != Class.class && object instanceof Class; if (isStatic && object != theClass) { MetaClass mc = regist...
[ "public", "void", "setAttribute", "(", "Class", "sender", ",", "Object", "object", ",", "String", "attribute", ",", "Object", "newValue", ",", "boolean", "useSuper", ",", "boolean", "fromInsideClass", ")", "{", "checkInitalised", "(", ")", ";", "boolean", "isS...
<p>Sets an attribute on the given receiver for the specified arguments. The sender is the class that is setting the attribute from the object. The MetaClass will attempt to establish the method to invoke based on the name and arguments provided. <p>The isCallToSuper and fromInsideClass help the Groovy runtime perform ...
[ "<p", ">", "Sets", "an", "attribute", "on", "the", "given", "receiver", "for", "the", "specified", "arguments", ".", "The", "sender", "is", "the", "class", "that", "is", "setting", "the", "attribute", "from", "the", "object", ".", "The", "MetaClass", "will...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/MetaClassImpl.java#L2953-L2977
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
TypeAnnotationPosition.typeParameter
public static TypeAnnotationPosition typeParameter(final List<TypePathEntry> location, final int parameter_index) { """ Create a {@code TypeAnnotationPosition} for a type parameter. @param location The type path. @param parameter_index The index of the type parameter. """ ...
java
public static TypeAnnotationPosition typeParameter(final List<TypePathEntry> location, final int parameter_index) { return typeParameter(location, null, parameter_index, -1); }
[ "public", "static", "TypeAnnotationPosition", "typeParameter", "(", "final", "List", "<", "TypePathEntry", ">", "location", ",", "final", "int", "parameter_index", ")", "{", "return", "typeParameter", "(", "location", ",", "null", ",", "parameter_index", ",", "-",...
Create a {@code TypeAnnotationPosition} for a type parameter. @param location The type path. @param parameter_index The index of the type parameter.
[ "Create", "a", "{", "@code", "TypeAnnotationPosition", "}", "for", "a", "type", "parameter", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java#L975-L979
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/HeapAlphaSketch.java
HeapAlphaSketch.heapifyInstance
static HeapAlphaSketch heapifyInstance(final Memory srcMem, final long seed) { """ Heapify a sketch from a Memory object containing sketch data. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources/dictionary.html#see...
java
static HeapAlphaSketch heapifyInstance(final Memory srcMem, final long seed) { final int preambleLongs = extractPreLongs(srcMem); //byte 0 final int lgNomLongs = extractLgNomLongs(srcMem); //byte 3 final int lgArrLongs = extractLgArrLongs(srcMem); //byte 4 checkAlphaF...
[ "static", "HeapAlphaSketch", "heapifyInstance", "(", "final", "Memory", "srcMem", ",", "final", "long", "seed", ")", "{", "final", "int", "preambleLongs", "=", "extractPreLongs", "(", "srcMem", ")", ";", "//byte 0", "final", "int", "lgNomLongs", "=", "extractLgN...
Heapify a sketch from a Memory object containing sketch data. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources/dictionary.html#seed">See seed</a> @return instance of this sketch
[ "Heapify", "a", "sketch", "from", "a", "Memory", "object", "containing", "sketch", "data", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/HeapAlphaSketch.java#L108-L139
relayrides/pushy
pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java
BaseHttp2ServerBuilder.setServerCredentials
public BaseHttp2ServerBuilder setServerCredentials(final X509Certificate[] certificates, final PrivateKey privateKey, final String privateKeyPassword) { """ <p>Sets the credentials for the server under construction.</p> @param certificates a certificate chain including the server's own certificate @param priva...
java
public BaseHttp2ServerBuilder setServerCredentials(final X509Certificate[] certificates, final PrivateKey privateKey, final String privateKeyPassword) { this.certificateChain = certificates; this.privateKey = privateKey; this.certificateChainPemFile = null; this.privateKeyPkcs8File = nu...
[ "public", "BaseHttp2ServerBuilder", "setServerCredentials", "(", "final", "X509Certificate", "[", "]", "certificates", ",", "final", "PrivateKey", "privateKey", ",", "final", "String", "privateKeyPassword", ")", "{", "this", ".", "certificateChain", "=", "certificates",...
<p>Sets the credentials for the server under construction.</p> @param certificates a certificate chain including the server's own certificate @param privateKey the private key for the server's certificate @param privateKeyPassword the password for the given private key, or {@code null} if the key is not password-prote...
[ "<p", ">", "Sets", "the", "credentials", "for", "the", "server", "under", "construction", ".", "<", "/", "p", ">" ]
train
https://github.com/relayrides/pushy/blob/1f6f9a0e07d785c815d74c2320a8d87c80231d36/pushy/src/main/java/com/turo/pushy/apns/server/BaseHttp2ServerBuilder.java#L139-L152
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java
DataFrameJoiner.leftOuter
public Table leftOuter(Table table2, String col2Name) { """ Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double column, the join is performed afte...
java
public Table leftOuter(Table table2, String col2Name) { return leftOuter(table2, false, col2Name); }
[ "public", "Table", "leftOuter", "(", "Table", "table2", ",", "String", "col2Name", ")", "{", "return", "leftOuter", "(", "table2", ",", "false", ",", "col2Name", ")", ";", "}" ]
Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers. @return The resulting table
[ "Joins", "the", "joiner", "to", "the", "table2", "using", "the", "given", "column", "for", "the", "second", "table", "and", "returns", "the", "resulting", "table" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java#L526-L528
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.getPool
public CloudPool getPool(String poolId) throws BatchErrorException, IOException { """ Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @return A {@link CloudPool} containing information about the specified Azure Batch pool. @throws BatchErrorException Exception thrown when an ...
java
public CloudPool getPool(String poolId) throws BatchErrorException, IOException { return getPool(poolId, null, null); }
[ "public", "CloudPool", "getPool", "(", "String", "poolId", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "getPool", "(", "poolId", ",", "null", ",", "null", ")", ";", "}" ]
Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @return A {@link CloudPool} containing information about the specified Azure Batch pool. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there...
[ "Gets", "the", "specified", "{", "@link", "CloudPool", "}", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L168-L170
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/business/oauth/AuthRequestHelper.java
AuthRequestHelper.validateAuthorizationRequest
public static boolean validateAuthorizationRequest(AuthRequestDto authRequestDto, OAuthApplicationDto oAuthApplicationDto) throws OAuthException { """ Validates Authorization Request @param authRequestDto Given Application DTO properties @param oAuthApplicationDto Expected Application DTO properties @r...
java
public static boolean validateAuthorizationRequest(AuthRequestDto authRequestDto, OAuthApplicationDto oAuthApplicationDto) throws OAuthException { if (StringUtils.isNotBlank(oAuthApplicationDto.getClientId()) && oAuthApplicationDto.getClientId().equals(authRequestDto.getClientId())) { try { ...
[ "public", "static", "boolean", "validateAuthorizationRequest", "(", "AuthRequestDto", "authRequestDto", ",", "OAuthApplicationDto", "oAuthApplicationDto", ")", "throws", "OAuthException", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "oAuthApplicationDto", ".", "...
Validates Authorization Request @param authRequestDto Given Application DTO properties @param oAuthApplicationDto Expected Application DTO properties @return Boolean or Exception based on Validation @throws OAuthException Exception related to OAuth
[ "Validates", "Authorization", "Request" ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/business/oauth/AuthRequestHelper.java#L69-L87
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java
GVRMaterial.setTextureAtlasInfo
public void setTextureAtlasInfo(String key, GVRAtlasInformation atlasInformation) { """ Set the light map information(offset and scale) at UV space to map the light map texture to the mesh. @param key Prefix name of the uniform at light map shader: ([key]_texture, [key]_offset and [key]_scale. @param atlasI...
java
public void setTextureAtlasInfo(String key, GVRAtlasInformation atlasInformation) { setTextureAtlasInfo(key, atlasInformation.getOffset(), atlasInformation.getScale()); }
[ "public", "void", "setTextureAtlasInfo", "(", "String", "key", ",", "GVRAtlasInformation", "atlasInformation", ")", "{", "setTextureAtlasInfo", "(", "key", ",", "atlasInformation", ".", "getOffset", "(", ")", ",", "atlasInformation", ".", "getScale", "(", ")", ")"...
Set the light map information(offset and scale) at UV space to map the light map texture to the mesh. @param key Prefix name of the uniform at light map shader: ([key]_texture, [key]_offset and [key]_scale. @param atlasInformation Atlas information object with the offset and scale at UV space necessary to map the ligh...
[ "Set", "the", "light", "map", "information", "(", "offset", "and", "scale", ")", "at", "UV", "space", "to", "map", "the", "light", "map", "texture", "to", "the", "mesh", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java#L262-L264
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/Schematic.java
Schematic.getDb
public static <T extends SchematicDb> T getDb(InputStream configInputStream) throws ParsingException, RuntimeException { """ Returns a DB with reads the given input stream as a configuration document {@code Document}. This document is expected to contain a {@link Schematic#TYPE_FIELD type field} to indicate the t...
java
public static <T extends SchematicDb> T getDb(InputStream configInputStream) throws ParsingException, RuntimeException { Document document = Json.read(configInputStream).withVariablesReplacedWithSystemProperties(); return getDb(document, Schematic.class.getClassLoader()); }
[ "public", "static", "<", "T", "extends", "SchematicDb", ">", "T", "getDb", "(", "InputStream", "configInputStream", ")", "throws", "ParsingException", ",", "RuntimeException", "{", "Document", "document", "=", "Json", ".", "read", "(", "configInputStream", ")", ...
Returns a DB with reads the given input stream as a configuration document {@code Document}. This document is expected to contain a {@link Schematic#TYPE_FIELD type field} to indicate the type of DB. @see #getDb(Document, ClassLoader) @throws ParsingException if the given input stream is not a valid JSON document
[ "Returns", "a", "DB", "with", "reads", "the", "given", "input", "stream", "as", "a", "configuration", "document", "{", "@code", "Document", "}", ".", "This", "document", "is", "expected", "to", "contain", "a", "{", "@link", "Schematic#TYPE_FIELD", "type", "f...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/Schematic.java#L41-L44
tommyettinger/RegExodus
src/main/java/regexodus/Matcher.java
Matcher.setTarget
public void setTarget(char[] text, int start, int len, boolean shared) { """ To be used with much care. Supplies a text to search in/match with, as a part of a char array, as above, but also allows to permit to use the array as internal buffer for subsequent inputs. That is, if we call it with <code>shared=false...
java
public void setTarget(char[] text, int start, int len, boolean shared) { cache = null; data = text; offset = start; end = start + len; this.shared = shared; init(); }
[ "public", "void", "setTarget", "(", "char", "[", "]", "text", ",", "int", "start", ",", "int", "len", ",", "boolean", "shared", ")", "{", "cache", "=", "null", ";", "data", "=", "text", ";", "offset", "=", "start", ";", "end", "=", "start", "+", ...
To be used with much care. Supplies a text to search in/match with, as a part of a char array, as above, but also allows to permit to use the array as internal buffer for subsequent inputs. That is, if we call it with <code>shared=false</code>:<pre> myMatcher.setTarget(myCharArray,x,y,<b>false</b>); //we declare that a...
[ "To", "be", "used", "with", "much", "care", ".", "Supplies", "a", "text", "to", "search", "in", "/", "match", "with", "as", "a", "part", "of", "a", "char", "array", "as", "above", "but", "also", "allows", "to", "permit", "to", "use", "the", "array", ...
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/Matcher.java#L313-L320
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/StateSet.java
StateSet.checkCircularity
private void checkCircularity(State state, Obligation obligation, int basicBlockId) throws ObligationAcquiredOrReleasedInLoopException { """ Bail out of the analysis is an obligation is acquired or released in a loop. @param state a State to which an obligation is being added or removed @param ob...
java
private void checkCircularity(State state, Obligation obligation, int basicBlockId) throws ObligationAcquiredOrReleasedInLoopException { if (state.getPath().hasComponent(basicBlockId)) { throw new ObligationAcquiredOrReleasedInLoopException(obligation); } }
[ "private", "void", "checkCircularity", "(", "State", "state", ",", "Obligation", "obligation", ",", "int", "basicBlockId", ")", "throws", "ObligationAcquiredOrReleasedInLoopException", "{", "if", "(", "state", ".", "getPath", "(", ")", ".", "hasComponent", "(", "b...
Bail out of the analysis is an obligation is acquired or released in a loop. @param state a State to which an obligation is being added or removed @param obligation the Obligation being added or removed @param basicBlockId the id of the BasicBlock adding or removing the obligation
[ "Bail", "out", "of", "the", "analysis", "is", "an", "obligation", "is", "acquired", "or", "released", "in", "a", "loop", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/StateSet.java#L242-L247
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java
HttpHeaders.fromHttpHeaders
public final void fromHttpHeaders(HttpHeaders headers) { """ Puts all headers of the {@link HttpHeaders} object into this {@link HttpHeaders} object. @param headers {@link HttpHeaders} from where the headers are taken @since 1.10 """ try { ParseHeaderState state = new ParseHeaderState(this, null)...
java
public final void fromHttpHeaders(HttpHeaders headers) { try { ParseHeaderState state = new ParseHeaderState(this, null); serializeHeaders( headers, null, null, null, new HeaderParsingFakeLevelHttpRequest(this, state)); state.finish(); } catch (IOException ex) { // Should never...
[ "public", "final", "void", "fromHttpHeaders", "(", "HttpHeaders", "headers", ")", "{", "try", "{", "ParseHeaderState", "state", "=", "new", "ParseHeaderState", "(", "this", ",", "null", ")", ";", "serializeHeaders", "(", "headers", ",", "null", ",", "null", ...
Puts all headers of the {@link HttpHeaders} object into this {@link HttpHeaders} object. @param headers {@link HttpHeaders} from where the headers are taken @since 1.10
[ "Puts", "all", "headers", "of", "the", "{", "@link", "HttpHeaders", "}", "object", "into", "this", "{", "@link", "HttpHeaders", "}", "object", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java#L1055-L1065
Netflix/spectator
spectator-reg-servo/src/main/java/com/netflix/spectator/servo/ServoRegistry.java
ServoRegistry.toMonitorConfig
MonitorConfig toMonitorConfig(Id id, Tag stat) { """ Converts a spectator id into a MonitorConfig that can be used by servo. """ MonitorConfig.Builder builder = new MonitorConfig.Builder(id.name()); if (stat != null) { builder.withTag(stat.key(), stat.value()); } for (Tag t : id.tags()) {...
java
MonitorConfig toMonitorConfig(Id id, Tag stat) { MonitorConfig.Builder builder = new MonitorConfig.Builder(id.name()); if (stat != null) { builder.withTag(stat.key(), stat.value()); } for (Tag t : id.tags()) { builder.withTag(t.key(), t.value()); } return builder.build(); }
[ "MonitorConfig", "toMonitorConfig", "(", "Id", "id", ",", "Tag", "stat", ")", "{", "MonitorConfig", ".", "Builder", "builder", "=", "new", "MonitorConfig", ".", "Builder", "(", "id", ".", "name", "(", ")", ")", ";", "if", "(", "stat", "!=", "null", ")"...
Converts a spectator id into a MonitorConfig that can be used by servo.
[ "Converts", "a", "spectator", "id", "into", "a", "MonitorConfig", "that", "can", "be", "used", "by", "servo", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-reg-servo/src/main/java/com/netflix/spectator/servo/ServoRegistry.java#L95-L104
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRActivity.java
LRActivity.addObject
public boolean addObject(String objectType, String id, String content) { """ Add an object to this activity @param objectType The type of object (required) @param id Id of the object @param content String describing the content of the object @return True if added, false if not """ Map<String, Obj...
java
public boolean addObject(String objectType, String id, String content) { Map<String, Object> container = new HashMap<String, Object>(); if (objectType != null) { container.put("objectType", objectType); } if (id != null) { container.pu...
[ "public", "boolean", "addObject", "(", "String", "objectType", ",", "String", "id", ",", "String", "content", ")", "{", "Map", "<", "String", ",", "Object", ">", "container", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "if"...
Add an object to this activity @param objectType The type of object (required) @param id Id of the object @param content String describing the content of the object @return True if added, false if not
[ "Add", "an", "object", "to", "this", "activity" ]
train
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L375-L393
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.isAssignableTo
public static void isAssignableTo(Class<?> from, Class<?> to, String message, Object... arguments) { """ Asserts that the {@link Class 'from' class type} is assignable to the {@link Class 'to' class type}. The assertion holds if and only if the {@link Class 'from' class type} is the same as or a subclass of th...
java
public static void isAssignableTo(Class<?> from, Class<?> to, String message, Object... arguments) { isAssignableTo(from, to, new ClassCastException(format(message, arguments))); }
[ "public", "static", "void", "isAssignableTo", "(", "Class", "<", "?", ">", "from", ",", "Class", "<", "?", ">", "to", ",", "String", "message", ",", "Object", "...", "arguments", ")", "{", "isAssignableTo", "(", "from", ",", "to", ",", "new", "ClassCas...
Asserts that the {@link Class 'from' class type} is assignable to the {@link Class 'to' class type}. The assertion holds if and only if the {@link Class 'from' class type} is the same as or a subclass of the {@link Class 'to' class type}. @param from {@link Class class type} being evaluated for assignment compatibili...
[ "Asserts", "that", "the", "{", "@link", "Class", "from", "class", "type", "}", "is", "assignable", "to", "the", "{", "@link", "Class", "to", "class", "type", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L543-L545
bramp/ffmpeg-cli-wrapper
src/main/java/net/bramp/ffmpeg/builder/FFmpegBuilder.java
FFmpegBuilder.addOutput
public FFmpegOutputBuilder addOutput(URI uri) { """ Adds new output file. @param uri output file uri typically a stream @return A new {@link FFmpegOutputBuilder} """ FFmpegOutputBuilder output = new FFmpegOutputBuilder(this, uri); outputs.add(output); return output; }
java
public FFmpegOutputBuilder addOutput(URI uri) { FFmpegOutputBuilder output = new FFmpegOutputBuilder(this, uri); outputs.add(output); return output; }
[ "public", "FFmpegOutputBuilder", "addOutput", "(", "URI", "uri", ")", "{", "FFmpegOutputBuilder", "output", "=", "new", "FFmpegOutputBuilder", "(", "this", ",", "uri", ")", ";", "outputs", ".", "add", "(", "output", ")", ";", "return", "output", ";", "}" ]
Adds new output file. @param uri output file uri typically a stream @return A new {@link FFmpegOutputBuilder}
[ "Adds", "new", "output", "file", "." ]
train
https://github.com/bramp/ffmpeg-cli-wrapper/blob/3819b155edf9132acc75bb6af66dcef1b98c64b2/src/main/java/net/bramp/ffmpeg/builder/FFmpegBuilder.java#L238-L242
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForView
public View waitForView(int id, int index, int timeout) { """ Waits for a certain view. @param view the id of the view to wait for @param index the index of the {@link View}. {@code 0} if only one is available @param timeout the timeout in milliseconds @return the specified View """ if(timeout == 0){ ...
java
public View waitForView(int id, int index, int timeout){ if(timeout == 0){ timeout = Timeout.getSmallTimeout(); } return waitForView(id, index, timeout, false); }
[ "public", "View", "waitForView", "(", "int", "id", ",", "int", "index", ",", "int", "timeout", ")", "{", "if", "(", "timeout", "==", "0", ")", "{", "timeout", "=", "Timeout", ".", "getSmallTimeout", "(", ")", ";", "}", "return", "waitForView", "(", "...
Waits for a certain view. @param view the id of the view to wait for @param index the index of the {@link View}. {@code 0} if only one is available @param timeout the timeout in milliseconds @return the specified View
[ "Waits", "for", "a", "certain", "view", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L383-L388
dita-ot/dita-ot
src/main/java/org/dita/dost/util/URLUtils.java
URLUtils.setPath
public static URI setPath(final URI orig, final String path) { """ Create new URI with a given path. @param orig URI to set path on @param path new path, {@code null} for no path @return new URI instance with given path """ try { return new URI(orig.getScheme(), orig.getUserInfo(), ori...
java
public static URI setPath(final URI orig, final String path) { try { return new URI(orig.getScheme(), orig.getUserInfo(), orig.getHost(), orig.getPort(), path, orig.getQuery(), orig.getFragment()); } catch (final URISyntaxException e) { throw new RuntimeException(e.getMessage(), ...
[ "public", "static", "URI", "setPath", "(", "final", "URI", "orig", ",", "final", "String", "path", ")", "{", "try", "{", "return", "new", "URI", "(", "orig", ".", "getScheme", "(", ")", ",", "orig", ".", "getUserInfo", "(", ")", ",", "orig", ".", "...
Create new URI with a given path. @param orig URI to set path on @param path new path, {@code null} for no path @return new URI instance with given path
[ "Create", "new", "URI", "with", "a", "given", "path", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/URLUtils.java#L570-L576
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.betweenMs
public static long betweenMs(Date beginDate, Date endDate) { """ 判断两个日期相差的毫秒数 @param beginDate 起始日期 @param endDate 结束日期 @return 日期差 @since 3.0.1 """ return new DateBetween(beginDate, endDate).between(DateUnit.MS); }
java
public static long betweenMs(Date beginDate, Date endDate) { return new DateBetween(beginDate, endDate).between(DateUnit.MS); }
[ "public", "static", "long", "betweenMs", "(", "Date", "beginDate", ",", "Date", "endDate", ")", "{", "return", "new", "DateBetween", "(", "beginDate", ",", "endDate", ")", ".", "between", "(", "DateUnit", ".", "MS", ")", ";", "}" ]
判断两个日期相差的毫秒数 @param beginDate 起始日期 @param endDate 结束日期 @return 日期差 @since 3.0.1
[ "判断两个日期相差的毫秒数" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1254-L1256
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java
ProjectableSQLQuery.addJoinFlag
@Override @SuppressWarnings("unchecked") public Q addJoinFlag(String flag, JoinFlag.Position position) { """ Add the given String literal as a join flag to the last added join @param flag join flag @param position position @return the current object """ queryMixin.addJoinFlag(new JoinFlag(...
java
@Override @SuppressWarnings("unchecked") public Q addJoinFlag(String flag, JoinFlag.Position position) { queryMixin.addJoinFlag(new JoinFlag(flag, position)); return (Q) this; }
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Q", "addJoinFlag", "(", "String", "flag", ",", "JoinFlag", ".", "Position", "position", ")", "{", "queryMixin", ".", "addJoinFlag", "(", "new", "JoinFlag", "(", "flag", ",", "pos...
Add the given String literal as a join flag to the last added join @param flag join flag @param position position @return the current object
[ "Add", "the", "given", "String", "literal", "as", "a", "join", "flag", "to", "the", "last", "added", "join" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java#L95-L100
alkacon/opencms-core
src/org/opencms/json/JSONML.java
JSONML.stringify
private static void stringify(JSONArray ja, StringBuffer b) throws JSONException { """ Reverse the JSONML transformation, making an XML text from a JSONArray.<p> @param ja a JSONArray @param b a string buffer in which to build the text @throws JSONException if something goes wrong """ int i; ...
java
private static void stringify(JSONArray ja, StringBuffer b) throws JSONException { int i; JSONObject jo; String k; Iterator<String> keys; int len; Object o; Object v; // Emit <tagName> b.append('<'); b.append(ja.get(0)); o = ja.o...
[ "private", "static", "void", "stringify", "(", "JSONArray", "ja", ",", "StringBuffer", "b", ")", "throws", "JSONException", "{", "int", "i", ";", "JSONObject", "jo", ";", "String", "k", ";", "Iterator", "<", "String", ">", "keys", ";", "int", "len", ";",...
Reverse the JSONML transformation, making an XML text from a JSONArray.<p> @param ja a JSONArray @param b a string buffer in which to build the text @throws JSONException if something goes wrong
[ "Reverse", "the", "JSONML", "transformation", "making", "an", "XML", "text", "from", "a", "JSONArray", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/json/JSONML.java#L288-L341
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.skipTypeVars
public Type skipTypeVars(Type site, boolean capture) { """ Recursively skip type-variables until a class/array type is found; capture conversion is then (optionally) applied to the resulting type. This is useful for i.e. computing a site that is suitable for a method lookup. """ while (site.hasTag(TY...
java
public Type skipTypeVars(Type site, boolean capture) { while (site.hasTag(TYPEVAR)) { site = site.getUpperBound(); } return capture ? capture(site) : site; }
[ "public", "Type", "skipTypeVars", "(", "Type", "site", ",", "boolean", "capture", ")", "{", "while", "(", "site", ".", "hasTag", "(", "TYPEVAR", ")", ")", "{", "site", "=", "site", ".", "getUpperBound", "(", ")", ";", "}", "return", "capture", "?", "...
Recursively skip type-variables until a class/array type is found; capture conversion is then (optionally) applied to the resulting type. This is useful for i.e. computing a site that is suitable for a method lookup.
[ "Recursively", "skip", "type", "-", "variables", "until", "a", "class", "/", "array", "type", "is", "found", ";", "capture", "conversion", "is", "then", "(", "optionally", ")", "applied", "to", "the", "resulting", "type", ".", "This", "is", "useful", "for"...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L184-L189
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/suite/CompactionSuiteBase.java
CompactionSuiteBase.getCompactionCompleteActions
public List<CompactionCompleteAction<FileSystemDataset>> getCompactionCompleteActions() { """ Some post actions are required after compaction job (map-reduce) is finished. @return A list of {@link CompactionCompleteAction}s which needs to be executed after map-reduce is done. """ ArrayList<CompactionC...
java
public List<CompactionCompleteAction<FileSystemDataset>> getCompactionCompleteActions() { ArrayList<CompactionCompleteAction<FileSystemDataset>> array = new ArrayList<>(); array.add(new CompactionCompleteFileOperationAction(state, configurator)); array.add(new CompactionHiveRegistrationAction(state)); a...
[ "public", "List", "<", "CompactionCompleteAction", "<", "FileSystemDataset", ">", ">", "getCompactionCompleteActions", "(", ")", "{", "ArrayList", "<", "CompactionCompleteAction", "<", "FileSystemDataset", ">>", "array", "=", "new", "ArrayList", "<>", "(", ")", ";",...
Some post actions are required after compaction job (map-reduce) is finished. @return A list of {@link CompactionCompleteAction}s which needs to be executed after map-reduce is done.
[ "Some", "post", "actions", "are", "required", "after", "compaction", "job", "(", "map", "-", "reduce", ")", "is", "finished", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/suite/CompactionSuiteBase.java#L117-L123
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.xpathFindImpl
protected Node xpathFindImpl(String xpath, NamespaceContext nsContext) throws XPathExpressionException { """ Find the first element in the builder's DOM matching the given XPath expression, where the expression may include namespaces if a {@link NamespaceContext} is provided. @param xpath An XPath ex...
java
protected Node xpathFindImpl(String xpath, NamespaceContext nsContext) throws XPathExpressionException { Node foundNode = (Node) this.xpathQuery(xpath, XPathConstants.NODE, nsContext); if (foundNode == null || foundNode.getNodeType() != Node.ELEMENT_NODE) { throw new XPathExpressionException...
[ "protected", "Node", "xpathFindImpl", "(", "String", "xpath", ",", "NamespaceContext", "nsContext", ")", "throws", "XPathExpressionException", "{", "Node", "foundNode", "=", "(", "Node", ")", "this", ".", "xpathQuery", "(", "xpath", ",", "XPathConstants", ".", "...
Find the first element in the builder's DOM matching the given XPath expression, where the expression may include namespaces if a {@link NamespaceContext} is provided. @param xpath An XPath expression that *must* resolve to an existing Element within the document object model. @param nsContext a mapping of prefixes to...
[ "Find", "the", "first", "element", "in", "the", "builder", "s", "DOM", "matching", "the", "given", "XPath", "expression", "where", "the", "expression", "may", "include", "namespaces", "if", "a", "{", "@link", "NamespaceContext", "}", "is", "provided", "." ]
train
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L500-L510
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/PaxDate.java
PaxDate.ofYearDay
static PaxDate ofYearDay(int prolepticYear, int dayOfYear) { """ Obtains a {@code PaxDate} representing a date in the Pax calendar system from the proleptic-year and day-of-year fields. <p> This returns a {@code PaxDate} with the specified fields. The day must be valid for the year, otherwise an exception will...
java
static PaxDate ofYearDay(int prolepticYear, int dayOfYear) { YEAR.checkValidValue(prolepticYear); PaxChronology.DAY_OF_YEAR_RANGE.checkValidValue(dayOfYear, DAY_OF_YEAR); boolean leap = PaxChronology.INSTANCE.isLeapYear(prolepticYear); if (dayOfYear > DAYS_IN_YEAR && !leap) { ...
[ "static", "PaxDate", "ofYearDay", "(", "int", "prolepticYear", ",", "int", "dayOfYear", ")", "{", "YEAR", ".", "checkValidValue", "(", "prolepticYear", ")", ";", "PaxChronology", ".", "DAY_OF_YEAR_RANGE", ".", "checkValidValue", "(", "dayOfYear", ",", "DAY_OF_YEAR...
Obtains a {@code PaxDate} representing a date in the Pax calendar system from the proleptic-year and day-of-year fields. <p> This returns a {@code PaxDate} with the specified fields. The day must be valid for the year, otherwise an exception will be thrown. @param prolepticYear the Pax proleptic-year @param dayOfYear...
[ "Obtains", "a", "{", "@code", "PaxDate", "}", "representing", "a", "date", "in", "the", "Pax", "calendar", "system", "from", "the", "proleptic", "-", "year", "and", "day", "-", "of", "-", "year", "fields", ".", "<p", ">", "This", "returns", "a", "{", ...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/PaxDate.java#L248-L272
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.createNotificationChannelGroup
@SuppressWarnings("unused") public static void createNotificationChannelGroup(final Context context, final String groupId, final CharSequence groupName) { """ Launches an asynchronous task to create the notification channel group from CleverTap <p/> Use this method when implementing your own FCM/GCM handling...
java
@SuppressWarnings("unused") public static void createNotificationChannelGroup(final Context context, final String groupId, final CharSequence groupName) { final CleverTapAPI instance = getDefaultInstanceOrFirstOther(context); if (instance == null) { Logger.v("No CleverTap Instance found ...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "void", "createNotificationChannelGroup", "(", "final", "Context", "context", ",", "final", "String", "groupId", ",", "final", "CharSequence", "groupName", ")", "{", "final", "CleverTapAPI", "insta...
Launches an asynchronous task to create the notification channel group from CleverTap <p/> Use this method when implementing your own FCM/GCM handling mechanism. Refer to the SDK documentation for usage scenarios and examples. @param context A reference to an Android context @param groupId A String for setting the id ...
[ "Launches", "an", "asynchronous", "task", "to", "create", "the", "notification", "channel", "group", "from", "CleverTap", "<p", "/", ">", "Use", "this", "method", "when", "implementing", "your", "own", "FCM", "/", "GCM", "handling", "mechanism", ".", "Refer", ...
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L5774-L5799
molgenis/molgenis
molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/controller/MappingServiceController.java
MappingServiceController.scheduleMappingJob
@PostMapping(value = "/map", produces = TEXT_PLAIN_VALUE) public ResponseEntity<String> scheduleMappingJob( @RequestParam String mappingProjectId, @RequestParam String targetEntityTypeId, @RequestParam(required = false) String label, @RequestParam(required = false, name = "package") String raw...
java
@PostMapping(value = "/map", produces = TEXT_PLAIN_VALUE) public ResponseEntity<String> scheduleMappingJob( @RequestParam String mappingProjectId, @RequestParam String targetEntityTypeId, @RequestParam(required = false) String label, @RequestParam(required = false, name = "package") String raw...
[ "@", "PostMapping", "(", "value", "=", "\"/map\"", ",", "produces", "=", "TEXT_PLAIN_VALUE", ")", "public", "ResponseEntity", "<", "String", ">", "scheduleMappingJob", "(", "@", "RequestParam", "String", "mappingProjectId", ",", "@", "RequestParam", "String", "tar...
Schedules a {@link MappingJobExecution}. @param mappingProjectId ID of the mapping project @param targetEntityTypeId ID of the target entity to create or update @param label label of the target entity to create @param rawPackageId ID of the package to put the newly created entity in @return the href of the created Map...
[ "Schedules", "a", "{", "@link", "MappingJobExecution", "}", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/controller/MappingServiceController.java#L599-L636
forge/core
resources/impl/src/main/java/org/jboss/forge/addon/resource/monitor/FileWatcher.java
FileWatcher.registerAll
private void registerAll(Path start, final ResourceMonitorImpl monitorImpl) throws IOException { """ Register the given directory, and all its sub-directories, with the WatchService. """ // register directory and sub-directories Files.walkFileTree(start, new SimpleFileVisitor<Path>() { ...
java
private void registerAll(Path start, final ResourceMonitorImpl monitorImpl) throws IOException { // register directory and sub-directories Files.walkFileTree(start, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes att...
[ "private", "void", "registerAll", "(", "Path", "start", ",", "final", "ResourceMonitorImpl", "monitorImpl", ")", "throws", "IOException", "{", "// register directory and sub-directories", "Files", ".", "walkFileTree", "(", "start", ",", "new", "SimpleFileVisitor", "<", ...
Register the given directory, and all its sub-directories, with the WatchService.
[ "Register", "the", "given", "directory", "and", "all", "its", "sub", "-", "directories", "with", "the", "WatchService", "." ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/resources/impl/src/main/java/org/jboss/forge/addon/resource/monitor/FileWatcher.java#L119-L132
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java
XmlReader.readShort
public short readShort(short defaultValue, String attribute) { """ Read a short. @param defaultValue The value returned if attribute not found. @param attribute The integer name (must not be <code>null</code>). @return The short value. @throws LionEngineException If invalid argument. """ return S...
java
public short readShort(short defaultValue, String attribute) { return Short.parseShort(getValue(String.valueOf(defaultValue), attribute)); }
[ "public", "short", "readShort", "(", "short", "defaultValue", ",", "String", "attribute", ")", "{", "return", "Short", ".", "parseShort", "(", "getValue", "(", "String", ".", "valueOf", "(", "defaultValue", ")", ",", "attribute", ")", ")", ";", "}" ]
Read a short. @param defaultValue The value returned if attribute not found. @param attribute The integer name (must not be <code>null</code>). @return The short value. @throws LionEngineException If invalid argument.
[ "Read", "a", "short", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java#L185-L188
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.getStatuses
public TaskStatusesEnvelope getStatuses(String tid, Integer count, Integer offset, String status, String dids) throws ApiException { """ Returns the details and status of a task id and the individual statuses of each device id in the list. Returns the details and status of a task id and the individual statuses of...
java
public TaskStatusesEnvelope getStatuses(String tid, Integer count, Integer offset, String status, String dids) throws ApiException { ApiResponse<TaskStatusesEnvelope> resp = getStatusesWithHttpInfo(tid, count, offset, status, dids); return resp.getData(); }
[ "public", "TaskStatusesEnvelope", "getStatuses", "(", "String", "tid", ",", "Integer", "count", ",", "Integer", "offset", ",", "String", "status", ",", "String", "dids", ")", "throws", "ApiException", "{", "ApiResponse", "<", "TaskStatusesEnvelope", ">", "resp", ...
Returns the details and status of a task id and the individual statuses of each device id in the list. Returns the details and status of a task id and the individual statuses of each device id in the list. @param tid Task ID. (required) @param count Max results count. (optional) @param offset Result starting offset. (o...
[ "Returns", "the", "details", "and", "status", "of", "a", "task", "id", "and", "the", "individual", "statuses", "of", "each", "device", "id", "in", "the", "list", ".", "Returns", "the", "details", "and", "status", "of", "a", "task", "id", "and", "the", ...
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L893-L896
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java
RunbookDraftsInner.get
public RunbookDraftInner get(String resourceGroupName, String automationAccountName, String runbookName) { """ Retrieve the runbook draft identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName Th...
java
public RunbookDraftInner get(String resourceGroupName, String automationAccountName, String runbookName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).toBlocking().single().body(); }
[ "public", "RunbookDraftInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "runbookName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "runbookName", "...
Retrieve the runbook draft identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName The runbook name. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException...
[ "Retrieve", "the", "runbook", "draft", "identified", "by", "runbook", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java#L373-L375
wcm-io-caravan/caravan-hal
resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java
HalResource.setEmbedded
public HalResource setEmbedded(String relation, HalResource resource) { """ Embed resource for the given relation. Overwrites existing one. @param relation Embedded resource relation @param resource Resource to embed @return HAL resource """ if (resource == null) { return this; } return ad...
java
public HalResource setEmbedded(String relation, HalResource resource) { if (resource == null) { return this; } return addResources(HalResourceType.EMBEDDED, relation, false, new HalResource[] { resource }); }
[ "public", "HalResource", "setEmbedded", "(", "String", "relation", ",", "HalResource", "resource", ")", "{", "if", "(", "resource", "==", "null", ")", "{", "return", "this", ";", "}", "return", "addResources", "(", "HalResourceType", ".", "EMBEDDED", ",", "r...
Embed resource for the given relation. Overwrites existing one. @param relation Embedded resource relation @param resource Resource to embed @return HAL resource
[ "Embed", "resource", "for", "the", "given", "relation", ".", "Overwrites", "existing", "one", "." ]
train
https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java#L337-L344
marvinlabs/android-intents
library/src/main/java/com/marvinlabs/intents/PhoneIntents.java
PhoneIntents.newSmsIntent
public static Intent newSmsIntent(Context context, String body, String[] phoneNumbers) { """ Creates an intent that will allow to send an SMS to a phone number @param body The text to send @param phoneNumbers The phone numbers to send the SMS to (or null if you don't want to specify it) @return the in...
java
public static Intent newSmsIntent(Context context, String body, String[] phoneNumbers) { Uri smsUri; if (phoneNumbers == null || phoneNumbers.length==0) { smsUri = Uri.parse("smsto:"); } else { smsUri = Uri.parse("smsto:" + Uri.encode(TextUtils.join(",", phoneNumbers))); ...
[ "public", "static", "Intent", "newSmsIntent", "(", "Context", "context", ",", "String", "body", ",", "String", "[", "]", "phoneNumbers", ")", "{", "Uri", "smsUri", ";", "if", "(", "phoneNumbers", "==", "null", "||", "phoneNumbers", ".", "length", "==", "0"...
Creates an intent that will allow to send an SMS to a phone number @param body The text to send @param phoneNumbers The phone numbers to send the SMS to (or null if you don't want to specify it) @return the intent
[ "Creates", "an", "intent", "that", "will", "allow", "to", "send", "an", "SMS", "to", "a", "phone", "number" ]
train
https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/PhoneIntents.java#L94-L115
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.restoreStorageAccountAsync
public ServiceFuture<StorageBundle> restoreStorageAccountAsync(String vaultBaseUrl, byte[] storageBundleBackup, final ServiceCallback<StorageBundle> serviceCallback) { """ Restores a backed up storage account to a vault. Restores a backed up storage account to a vault. This operation requires the storage/restore ...
java
public ServiceFuture<StorageBundle> restoreStorageAccountAsync(String vaultBaseUrl, byte[] storageBundleBackup, final ServiceCallback<StorageBundle> serviceCallback) { return ServiceFuture.fromResponse(restoreStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageBundleBackup), serviceCallback); }
[ "public", "ServiceFuture", "<", "StorageBundle", ">", "restoreStorageAccountAsync", "(", "String", "vaultBaseUrl", ",", "byte", "[", "]", "storageBundleBackup", ",", "final", "ServiceCallback", "<", "StorageBundle", ">", "serviceCallback", ")", "{", "return", "Service...
Restores a backed up storage account to a vault. Restores a backed up storage account to a vault. This operation requires the storage/restore permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageBundleBackup The backup blob associated with a storage account. @param...
[ "Restores", "a", "backed", "up", "storage", "account", "to", "a", "vault", ".", "Restores", "a", "backed", "up", "storage", "account", "to", "a", "vault", ".", "This", "operation", "requires", "the", "storage", "/", "restore", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L9622-L9624
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java
Base64.encodeFromFile
public static String encodeFromFile(String filename) throws java.io.IOException { """ Convenience method for reading a binary file and base64-encoding it. <p> As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false...
java
public static String encodeFromFile(String filename) throws java.io.IOException { String encodedData = null; Base64.InputStream bis = null; try { // Set up some useful variables Path file = Paths.get(filename); byte[] buffer = new byte[Math.max((int) (Files.s...
[ "public", "static", "String", "encodeFromFile", "(", "String", "filename", ")", "throws", "java", ".", "io", ".", "IOException", "{", "String", "encodedData", "=", "null", ";", "Base64", ".", "InputStream", "bis", "=", "null", ";", "try", "{", "// Set up som...
Convenience method for reading a binary file and base64-encoding it. <p> As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it. </p> @param filename Filename for r...
[ "Convenience", "method", "for", "reading", "a", "binary", "file", "and", "base64", "-", "encoding", "it", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java#L1411-L1447
lucee/Lucee
core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java
ValidateCreditCard.buildRanges
private static void buildRanges() { """ build table of which ranges of credit card number belong to which vendor """ // careful, no lead zeros allowed // low high len vendor mod-10? ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DI...
java
private static void buildRanges() { // careful, no lead zeros allowed // low high len vendor mod-10? ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DINERS, true), new LCR(36000000000000L, 36999999999999L, 14, DINERS, true), new LCR(380000...
[ "private", "static", "void", "buildRanges", "(", ")", "{", "// careful, no lead zeros allowed", "// low high len vendor mod-10?", "ranges", "=", "new", "LCR", "[", "]", "{", "new", "LCR", "(", "4000000000000L", ",", "4999999999999L", ",", "13", ",", "VISA", ",", ...
build table of which ranges of credit card number belong to which vendor
[ "build", "table", "of", "which", "ranges", "of", "credit", "card", "number", "belong", "to", "which", "vendor" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L112-L123
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/FunctionsInner.java
FunctionsInner.getAsync
public Observable<FunctionInner> getAsync(String resourceGroupName, String jobName, String functionName) { """ Gets details about the specified function. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the porta...
java
public Observable<FunctionInner> getAsync(String resourceGroupName, String jobName, String functionName) { return getWithServiceResponseAsync(resourceGroupName, jobName, functionName).map(new Func1<ServiceResponseWithHeaders<FunctionInner, FunctionsGetHeaders>, FunctionInner>() { @Override ...
[ "public", "Observable", "<", "FunctionInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "String", "functionName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "jobName", ",", "functionName"...
Gets details about the specified function. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param jobName The name of the streaming job. @param functionName The name of the function. @throws IllegalArgument...
[ "Gets", "details", "about", "the", "specified", "function", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/FunctionsInner.java#L646-L653
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.getElement
public Element getElement(NodeList list, String key, String value) { """ return XML Element matching name @param list source node list @param key key to compare @param value value to compare @return matching XML Element """ int len = list.getLength(); for (int i = 0; i < len; i++) { Node n = list....
java
public Element getElement(NodeList list, String key, String value) { int len = list.getLength(); for (int i = 0; i < len; i++) { Node n = list.item(i); if (n instanceof Element) { Element el = (Element) n; if (el.getAttribute(key).equalsIgnoreCase(value)) return el; } } return null; }
[ "public", "Element", "getElement", "(", "NodeList", "list", ",", "String", "key", ",", "String", "value", ")", "{", "int", "len", "=", "list", ".", "getLength", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "++"...
return XML Element matching name @param list source node list @param key key to compare @param value value to compare @return matching XML Element
[ "return", "XML", "Element", "matching", "name" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L88-L98
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.untypedDependencyObjectify
public static Collection<List<String>> untypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { """ Returns a collection of untyped word-word dependencies for the tree. """ return dependencyObjectify(t, hf, collinizer, new UntypedDependencyTyper(hf)); }
java
public static Collection<List<String>> untypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new UntypedDependencyTyper(hf)); }
[ "public", "static", "Collection", "<", "List", "<", "String", ">", ">", "untypedDependencyObjectify", "(", "Tree", "t", ",", "HeadFinder", "hf", ",", "TreeTransformer", "collinizer", ")", "{", "return", "dependencyObjectify", "(", "t", ",", "hf", ",", "collini...
Returns a collection of untyped word-word dependencies for the tree.
[ "Returns", "a", "collection", "of", "untyped", "word", "-", "word", "dependencies", "for", "the", "tree", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L344-L346
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/JpaClusterLockDao.java
JpaClusterLockDao.executeIgnoreRollback
protected <T> T executeIgnoreRollback(TransactionCallback<T> action, T rollbackValue) { """ Utility for using TransactionTemplate when we know that a rollback might happen and just want to ignore it """ try { // Try to create the mutex in a new TX return this.newTransactionTemp...
java
protected <T> T executeIgnoreRollback(TransactionCallback<T> action, T rollbackValue) { try { // Try to create the mutex in a new TX return this.newTransactionTemplate.execute(action); } catch (TransactionSystemException e) { if (e.getCause() instanceof RollbackExcept...
[ "protected", "<", "T", ">", "T", "executeIgnoreRollback", "(", "TransactionCallback", "<", "T", ">", "action", ",", "T", "rollbackValue", ")", "{", "try", "{", "// Try to create the mutex in a new TX", "return", "this", ".", "newTransactionTemplate", ".", "execute",...
Utility for using TransactionTemplate when we know that a rollback might happen and just want to ignore it
[ "Utility", "for", "using", "TransactionTemplate", "when", "we", "know", "that", "a", "rollback", "might", "happen", "and", "just", "want", "to", "ignore", "it" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/JpaClusterLockDao.java#L335-L348
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java
ClassPathUtils.scanClassPath
public static Set<String> scanClassPath(final String classPath, final Set<String> excludeJarSet, final Set<String> excludePrefixes, final Set<String> includePrefixes) { """ Scan the classpath string provided, and collect a set of package paths found in jars and classes on the path. On the resulting path set, firs...
java
public static Set<String> scanClassPath(final String classPath, final Set<String> excludeJarSet, final Set<String> excludePrefixes, final Set<String> includePrefixes) { final Set<String> pathSet = new HashSet<String>(); // Defer to JDKPaths to do the actual classpath scanning. __JDKPaths.process...
[ "public", "static", "Set", "<", "String", ">", "scanClassPath", "(", "final", "String", "classPath", ",", "final", "Set", "<", "String", ">", "excludeJarSet", ",", "final", "Set", "<", "String", ">", "excludePrefixes", ",", "final", "Set", "<", "String", "...
Scan the classpath string provided, and collect a set of package paths found in jars and classes on the path. On the resulting path set, first exclude those that match any exclude prefixes, and then include those that match a set of include prefixes. @param classPath the classpath string @param excludeJarSet a set of ...
[ "Scan", "the", "classpath", "string", "provided", "and", "collect", "a", "set", "of", "package", "paths", "found", "in", "jars", "and", "classes", "on", "the", "path", ".", "On", "the", "resulting", "path", "set", "first", "exclude", "those", "that", "matc...
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java#L199-L205
cerner/beadledom
client/resteasy-client/src/main/java/com/cerner/beadledom/client/resteasy/BeadledomResteasyClientBuilder.java
BeadledomResteasyClientBuilder.keyStore
@Override public ClientBuilder keyStore(final KeyStore keyStore, final String password) { """ Sets the default SSL key store to be used if a {@link ClientHttpEngine} isn't specified via {@link #setHttpEngine(ClientHttpEngine)}. <p>If a {@link ClientHttpEngine} is specified via {@link #setHttpEngine(ClientHtt...
java
@Override public ClientBuilder keyStore(final KeyStore keyStore, final String password) { this.clientKeyStore = keyStore; this.clientPrivateKeyPassword = password; return this; }
[ "@", "Override", "public", "ClientBuilder", "keyStore", "(", "final", "KeyStore", "keyStore", ",", "final", "String", "password", ")", "{", "this", ".", "clientKeyStore", "=", "keyStore", ";", "this", ".", "clientPrivateKeyPassword", "=", "password", ";", "retur...
Sets the default SSL key store to be used if a {@link ClientHttpEngine} isn't specified via {@link #setHttpEngine(ClientHttpEngine)}. <p>If a {@link ClientHttpEngine} is specified via {@link #setHttpEngine(ClientHttpEngine)}, then this property will be ignored. <p>{@inheritDoc} @return this builder
[ "Sets", "the", "default", "SSL", "key", "store", "to", "be", "used", "if", "a", "{", "@link", "ClientHttpEngine", "}", "isn", "t", "specified", "via", "{", "@link", "#setHttpEngine", "(", "ClientHttpEngine", ")", "}", "." ]
train
https://github.com/cerner/beadledom/blob/75435bced5187d5455b46518fadf85c93cf32014/client/resteasy-client/src/main/java/com/cerner/beadledom/client/resteasy/BeadledomResteasyClientBuilder.java#L428-L433
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/request/RequestConfig.java
RequestConfig.with
public RequestConfig with(Heroku.RequestKey key, Map<Heroku.RequestKey, Either> value) { """ Sets a {@link com.heroku.api.Heroku.RequestKey} parameter. @param key Heroku request key @param value value of the property @return A new {@link RequestConfig} """ RequestConfig newConfig = copy(); n...
java
public RequestConfig with(Heroku.RequestKey key, Map<Heroku.RequestKey, Either> value) { RequestConfig newConfig = copy(); newConfig.config.put(key, new Either(value)); return newConfig; }
[ "public", "RequestConfig", "with", "(", "Heroku", ".", "RequestKey", "key", ",", "Map", "<", "Heroku", ".", "RequestKey", ",", "Either", ">", "value", ")", "{", "RequestConfig", "newConfig", "=", "copy", "(", ")", ";", "newConfig", ".", "config", ".", "p...
Sets a {@link com.heroku.api.Heroku.RequestKey} parameter. @param key Heroku request key @param value value of the property @return A new {@link RequestConfig}
[ "Sets", "a", "{" ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/request/RequestConfig.java#L54-L58
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GitLabApiClient.java
GitLabApiClient.setupIgnoreCertificateErrors
private boolean setupIgnoreCertificateErrors() { """ Sets up Jersey client to ignore certificate errors. @return true if successful at setting up to ignore certificate errors, otherwise returns false. """ // Create a TrustManager that trusts all certificates TrustManager[] trustAllCerts = n...
java
private boolean setupIgnoreCertificateErrors() { // Create a TrustManager that trusts all certificates TrustManager[] trustAllCerts = new TrustManager[] { new X509ExtendedTrustManager() { @Override public X509Certificate[] getAcceptedIssuers() { return null; ...
[ "private", "boolean", "setupIgnoreCertificateErrors", "(", ")", "{", "// Create a TrustManager that trusts all certificates", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustManager", "[", "]", "{", "new", "X509ExtendedTrustManager", "(", ")", "{", "@", "Ov...
Sets up Jersey client to ignore certificate errors. @return true if successful at setting up to ignore certificate errors, otherwise returns false.
[ "Sets", "up", "Jersey", "client", "to", "ignore", "certificate", "errors", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L808-L861
kaazing/gateway
resource.address/tcp/src/main/java/org/kaazing/gateway/resource/address/tcp/TcpResourceAddressFactorySpi.java
TcpResourceAddressFactorySpi.throwPreferedIPv4StackIPv6AddressError
private void throwPreferedIPv4StackIPv6AddressError(String location, List<TcpResourceAddress> tcpAddresses) { """ Throw error on specific circumstances: - no addresses available for binding - when PreferedIPv4 flag is true and the host IP is IPV6 @param location @param tcpAddresses """ try { ...
java
private void throwPreferedIPv4StackIPv6AddressError(String location, List<TcpResourceAddress> tcpAddresses) { try { InetAddress address = InetAddress.getByName(URIUtils.getHost(location)); boolean preferIPv4Stack = Boolean.parseBoolean(System.getProperty(JAVA_NET_PREFER_IPV4_STACK)); ...
[ "private", "void", "throwPreferedIPv4StackIPv6AddressError", "(", "String", "location", ",", "List", "<", "TcpResourceAddress", ">", "tcpAddresses", ")", "{", "try", "{", "InetAddress", "address", "=", "InetAddress", ".", "getByName", "(", "URIUtils", ".", "getHost"...
Throw error on specific circumstances: - no addresses available for binding - when PreferedIPv4 flag is true and the host IP is IPV6 @param location @param tcpAddresses
[ "Throw", "error", "on", "specific", "circumstances", ":", "-", "no", "addresses", "available", "for", "binding", "-", "when", "PreferedIPv4", "flag", "is", "true", "and", "the", "host", "IP", "is", "IPV6" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/tcp/src/main/java/org/kaazing/gateway/resource/address/tcp/TcpResourceAddressFactorySpi.java#L288-L299
alkacon/opencms-core
src/org/opencms/search/galleries/CmsGallerySearch.java
CmsGallerySearch.searchByPath
public CmsGallerySearchResult searchByPath(String path, Locale locale) throws CmsException { """ Searches by structure id.<p> @param path the resource path @param locale the locale for which the search result should be returned @return the search result @throws CmsException if something goes wrong ""...
java
public CmsGallerySearchResult searchByPath(String path, Locale locale) throws CmsException { I_CmsSearchDocument sDoc = m_index.getDocument(CmsSearchField.FIELD_PATH, path); CmsGallerySearchResult result = null; if ((sDoc != null) && (sDoc.getDocument() != null)) { result = new CmsG...
[ "public", "CmsGallerySearchResult", "searchByPath", "(", "String", "path", ",", "Locale", "locale", ")", "throws", "CmsException", "{", "I_CmsSearchDocument", "sDoc", "=", "m_index", ".", "getDocument", "(", "CmsSearchField", ".", "FIELD_PATH", ",", "path", ")", "...
Searches by structure id.<p> @param path the resource path @param locale the locale for which the search result should be returned @return the search result @throws CmsException if something goes wrong
[ "Searches", "by", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/galleries/CmsGallerySearch.java#L196-L207
dickschoeller/gedbrowser
gedbrowser-datamodel/src/main/java/org/schoellerfamily/gedbrowser/datamodel/util/FamilyBuilderImpl.java
FamilyBuilderImpl.addChildToFamily
public Child addChildToFamily(final Family family, final Person person) { """ Add a person as a child in a family. @param person the person @param family the family @return the Child object """ if (family == null || person == null) { return new Child(); } final FamC fam...
java
public Child addChildToFamily(final Family family, final Person person) { if (family == null || person == null) { return new Child(); } final FamC famC = new FamC(person, "FAMC", new ObjectId(family.getString())); final Child child = new Child(family, "Child",...
[ "public", "Child", "addChildToFamily", "(", "final", "Family", "family", ",", "final", "Person", "person", ")", "{", "if", "(", "family", "==", "null", "||", "person", "==", "null", ")", "{", "return", "new", "Child", "(", ")", ";", "}", "final", "FamC...
Add a person as a child in a family. @param person the person @param family the family @return the Child object
[ "Add", "a", "person", "as", "a", "child", "in", "a", "family", "." ]
train
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowser-datamodel/src/main/java/org/schoellerfamily/gedbrowser/datamodel/util/FamilyBuilderImpl.java#L141-L152
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java
LollipopDrawablesCompat.createFromResourceStream
public static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts) { """ Create a drawable from an inputstream, using the given resources and value to determine density information. """ return Drawable.createFromResourceStream(r...
java
public static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts) { return Drawable.createFromResourceStream(res, value, is, srcName, opts); }
[ "public", "static", "Drawable", "createFromResourceStream", "(", "Resources", "res", ",", "TypedValue", "value", ",", "InputStream", "is", ",", "String", "srcName", ",", "BitmapFactory", ".", "Options", "opts", ")", "{", "return", "Drawable", ".", "createFromResou...
Create a drawable from an inputstream, using the given resources and value to determine density information.
[ "Create", "a", "drawable", "from", "an", "inputstream", "using", "the", "given", "resources", "and", "value", "to", "determine", "density", "information", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java#L89-L91
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java
PatternsImpl.getIntentPatterns
public List<PatternRuleInfo> getIntentPatterns(UUID appId, String versionId, UUID intentId, GetIntentPatternsOptionalParameter getIntentPatternsOptionalParameter) { """ Returns patterns to be retrieved for the specific intent. @param appId The application ID. @param versionId The version ID. @param intentId T...
java
public List<PatternRuleInfo> getIntentPatterns(UUID appId, String versionId, UUID intentId, GetIntentPatternsOptionalParameter getIntentPatternsOptionalParameter) { return getIntentPatternsWithServiceResponseAsync(appId, versionId, intentId, getIntentPatternsOptionalParameter).toBlocking().single().body(); ...
[ "public", "List", "<", "PatternRuleInfo", ">", "getIntentPatterns", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "intentId", ",", "GetIntentPatternsOptionalParameter", "getIntentPatternsOptionalParameter", ")", "{", "return", "getIntentPatternsWithServiceR...
Returns patterns to be retrieved for the specific intent. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier ID. @param getIntentPatternsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentExcept...
[ "Returns", "patterns", "to", "be", "retrieved", "for", "the", "specific", "intent", "." ]
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/PatternsImpl.java#L852-L854
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.getRegexEntityInfosAsync
public Observable<List<RegexEntityExtractor>> getRegexEntityInfosAsync(UUID appId, String versionId, GetRegexEntityInfosOptionalParameter getRegexEntityInfosOptionalParameter) { """ Gets information about the regex entity models. @param appId The application ID. @param versionId The version ID. @param getRege...
java
public Observable<List<RegexEntityExtractor>> getRegexEntityInfosAsync(UUID appId, String versionId, GetRegexEntityInfosOptionalParameter getRegexEntityInfosOptionalParameter) { return getRegexEntityInfosWithServiceResponseAsync(appId, versionId, getRegexEntityInfosOptionalParameter).map(new Func1<ServiceRespon...
[ "public", "Observable", "<", "List", "<", "RegexEntityExtractor", ">", ">", "getRegexEntityInfosAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "GetRegexEntityInfosOptionalParameter", "getRegexEntityInfosOptionalParameter", ")", "{", "return", "getRegexEntity...
Gets information about the regex entity models. @param appId The application ID. @param versionId The version ID. @param getRegexEntityInfosOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @retu...
[ "Gets", "information", "about", "the", "regex", "entity", "models", "." ]
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#L7147-L7154
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
CqlRecordReader.next
public boolean next(Long key, Row value) throws IOException { """ and ColumnFamilyRecordReader don't support them, it should be fine for now. """ if (nextKeyValue()) { ((WrappedRow)value).setRow(getCurrentValue()); return true; } return false; }
java
public boolean next(Long key, Row value) throws IOException { if (nextKeyValue()) { ((WrappedRow)value).setRow(getCurrentValue()); return true; } return false; }
[ "public", "boolean", "next", "(", "Long", "key", ",", "Row", "value", ")", "throws", "IOException", "{", "if", "(", "nextKeyValue", "(", ")", ")", "{", "(", "(", "WrappedRow", ")", "value", ")", ".", "setRow", "(", "getCurrentValue", "(", ")", ")", "...
and ColumnFamilyRecordReader don't support them, it should be fine for now.
[ "and", "ColumnFamilyRecordReader", "don", "t", "support", "them", "it", "should", "be", "fine", "for", "now", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java#L210-L218
sebastiangraf/treetank
coremodules/core/src/main/java/org/treetank/access/Storage.java
Storage.bootstrap
private static void bootstrap(final Storage pStorage, final ResourceConfiguration pResourceConf) throws TTException { """ Boostraping a resource within this storage. @param pStorage storage where the new resource should be created in. @param pResourceConf related {@link ResourceConfiguration} for the...
java
private static void bootstrap(final Storage pStorage, final ResourceConfiguration pResourceConf) throws TTException { final IBackend storage = pResourceConf.mBackend; storage.initialize(); final IBackendWriter writer = storage.getWriter(); final UberBucket uberBucket = new Uber...
[ "private", "static", "void", "bootstrap", "(", "final", "Storage", "pStorage", ",", "final", "ResourceConfiguration", "pResourceConf", ")", "throws", "TTException", "{", "final", "IBackend", "storage", "=", "pResourceConf", ".", "mBackend", ";", "storage", ".", "i...
Boostraping a resource within this storage. @param pStorage storage where the new resource should be created in. @param pResourceConf related {@link ResourceConfiguration} for the new resource @throws TTException
[ "Boostraping", "a", "resource", "within", "this", "storage", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/core/src/main/java/org/treetank/access/Storage.java#L338-L400
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java
Apptentive.isApptentivePushNotification
public static boolean isApptentivePushNotification(Map<String, String> data) { """ Determines whether push payload data came from an Apptentive push notification. @param data The push payload data obtained through FCM's RemoteMessage.getData(), when using FCM @return True if the push came from, and should be h...
java
public static boolean isApptentivePushNotification(Map<String, String> data) { try { if (!ApptentiveInternal.checkRegistered()) { return false; } return ApptentiveInternal.getApptentivePushNotificationData(data) != null; } catch (Exception e) { ApptentiveLog.e(PUSH, e, "Exception while checking for ...
[ "public", "static", "boolean", "isApptentivePushNotification", "(", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "try", "{", "if", "(", "!", "ApptentiveInternal", ".", "checkRegistered", "(", ")", ")", "{", "return", "false", ";", "}", "retu...
Determines whether push payload data came from an Apptentive push notification. @param data The push payload data obtained through FCM's RemoteMessage.getData(), when using FCM @return True if the push came from, and should be handled by Apptentive.
[ "Determines", "whether", "push", "payload", "data", "came", "from", "an", "Apptentive", "push", "notification", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java#L535-L546
zaproxy/zaproxy
src/org/zaproxy/zap/utils/ApiUtils.java
ApiUtils.getContextByParamId
public static Context getContextByParamId(JSONObject params, String contextIdParamName) throws ApiException { """ Gets the {@link Context} whose id is provided as a parameter with the given name. Throws an exception accordingly if not found or valid. @param params the params @param contextIdParamName the c...
java
public static Context getContextByParamId(JSONObject params, String contextIdParamName) throws ApiException { int contextId = getIntParam(params, contextIdParamName); Context context = Model.getSingleton().getSession().getContext(contextId); if (context == null) { throw new ApiException(Type.CONTEXT_NOT_FOU...
[ "public", "static", "Context", "getContextByParamId", "(", "JSONObject", "params", ",", "String", "contextIdParamName", ")", "throws", "ApiException", "{", "int", "contextId", "=", "getIntParam", "(", "params", ",", "contextIdParamName", ")", ";", "Context", "contex...
Gets the {@link Context} whose id is provided as a parameter with the given name. Throws an exception accordingly if not found or valid. @param params the params @param contextIdParamName the context id param name @return the context @throws ApiException the api exception
[ "Gets", "the", "{", "@link", "Context", "}", "whose", "id", "is", "provided", "as", "a", "parameter", "with", "the", "given", "name", ".", "Throws", "an", "exception", "accordingly", "if", "not", "found", "or", "valid", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/ApiUtils.java#L149-L157
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.acceptSessionFromConnectionStringBuilder
public static IMessageSession acceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId) throws InterruptedException, ServiceBusException { """ Accept a {@link IMessageSession} in default {@link ReceiveMode#PEEKLOCK} mode from service bus connection string build...
java
public static IMessageSession acceptSessionFromConnectionStringBuilder(ConnectionStringBuilder amqpConnectionStringBuilder, String sessionId) throws InterruptedException, ServiceBusException { return acceptSessionFromConnectionStringBuilder(amqpConnectionStringBuilder, sessionId, DEFAULTRECEIVEMODE); }
[ "public", "static", "IMessageSession", "acceptSessionFromConnectionStringBuilder", "(", "ConnectionStringBuilder", "amqpConnectionStringBuilder", ",", "String", "sessionId", ")", "throws", "InterruptedException", ",", "ServiceBusException", "{", "return", "acceptSessionFromConnecti...
Accept a {@link IMessageSession} in default {@link ReceiveMode#PEEKLOCK} mode from service bus connection string builder with specified session id. Session Id can be null, if null, service will return the first available session. @param amqpConnectionStringBuilder the connection string builder @param sessionId ...
[ "Accept", "a", "{", "@link", "IMessageSession", "}", "in", "default", "{", "@link", "ReceiveMode#PEEKLOCK", "}", "mode", "from", "service", "bus", "connection", "string", "builder", "with", "specified", "session", "id", ".", "Session", "Id", "can", "be", "null...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L512-L514
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Code128.java
Code128.combineSubsetBlocks
private int combineSubsetBlocks(Mode[] mode_type, int[] mode_length, int index_point) { """ Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point. """ /* bring together same type blocks */ if (index_point > 1) { f...
java
private int combineSubsetBlocks(Mode[] mode_type, int[] mode_length, int index_point) { /* bring together same type blocks */ if (index_point > 1) { for (int i = 1; i < index_point; i++) { if (mode_type[i - 1] == mode_type[i]) { /* bring together */ ...
[ "private", "int", "combineSubsetBlocks", "(", "Mode", "[", "]", "mode_type", ",", "int", "[", "]", "mode_length", ",", "int", "index_point", ")", "{", "/* bring together same type blocks */", "if", "(", "index_point", ">", "1", ")", "{", "for", "(", "int", "...
Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point.
[ "Modifies", "the", "specified", "mode", "and", "length", "arrays", "to", "combine", "adjacent", "modes", "of", "the", "same", "type", "returning", "the", "updated", "index", "point", "." ]
train
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Code128.java#L818-L836
f2prateek/dart
dart/src/main/java/dart/Dart.java
Dart.bindNavigationModel
public static void bindNavigationModel(Object target, Fragment source) { """ Inject fields annotated with {@link BindExtra} in the specified {@code target} using the {@code source} {@link android.app.Fragment}. @param target Target class for field binding. @param source Activity on which IDs will be looked up...
java
public static void bindNavigationModel(Object target, Fragment source) { bindNavigationModel(target, source, Finder.FRAGMENT); }
[ "public", "static", "void", "bindNavigationModel", "(", "Object", "target", ",", "Fragment", "source", ")", "{", "bindNavigationModel", "(", "target", ",", "source", ",", "Finder", ".", "FRAGMENT", ")", ";", "}" ]
Inject fields annotated with {@link BindExtra} in the specified {@code target} using the {@code source} {@link android.app.Fragment}. @param target Target class for field binding. @param source Activity on which IDs will be looked up. @throws Dart.UnableToInjectException if binding could not be performed. @see android...
[ "Inject", "fields", "annotated", "with", "{", "@link", "BindExtra", "}", "in", "the", "specified", "{", "@code", "target", "}", "using", "the", "{", "@code", "source", "}", "{", "@link", "android", ".", "app", ".", "Fragment", "}", "." ]
train
https://github.com/f2prateek/dart/blob/7163b1b148e5141817975ae7dad99d58a8589aeb/dart/src/main/java/dart/Dart.java#L105-L107
bit3/jsass
src/main/java/io/bit3/jsass/Compiler.java
Compiler.compileString
public Output compileString(String string, URI inputPath, URI outputPath, Options options) throws CompilationException { """ Compile string. @param string The input string. @param inputPath The input path. @param outputPath The output path. @param options The compile options. @return The compi...
java
public Output compileString(String string, URI inputPath, URI outputPath, Options options) throws CompilationException { StringContext context = new StringContext(string, inputPath, outputPath, options); return compile(context); }
[ "public", "Output", "compileString", "(", "String", "string", ",", "URI", "inputPath", ",", "URI", "outputPath", ",", "Options", "options", ")", "throws", "CompilationException", "{", "StringContext", "context", "=", "new", "StringContext", "(", "string", ",", "...
Compile string. @param string The input string. @param inputPath The input path. @param outputPath The output path. @param options The compile options. @return The compilation output. @throws CompilationException If the compilation failed.
[ "Compile", "string", "." ]
train
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/Compiler.java#L60-L65
aol/cyclops
cyclops/src/main/java/cyclops/companion/Functions.java
Functions.filterInts
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> filterInts(IntPredicate b) { """ /* Fluent filter operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.filterInts; ReactiveSeq.ofInts(1,2,3) .to(filterInts(i->i>2)); //[3] } </pre> ...
java
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> filterInts(IntPredicate b){ return a->a.ints(i->i,s->s.filter(b)); }
[ "public", "static", "Function", "<", "?", "super", "ReactiveSeq", "<", "Integer", ">", ",", "?", "extends", "ReactiveSeq", "<", "Integer", ">", ">", "filterInts", "(", "IntPredicate", "b", ")", "{", "return", "a", "->", "a", ".", "ints", "(", "i", "->"...
/* Fluent filter operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.filterInts; ReactiveSeq.ofInts(1,2,3) .to(filterInts(i->i>2)); //[3] } </pre>
[ "/", "*", "Fluent", "filter", "operation", "using", "primitive", "types", "e", ".", "g", ".", "<pre", ">", "{", "@code", "import", "static", "cyclops", ".", "ReactiveSeq", ".", "filterInts", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L278-L281
logic-ng/LogicNG
src/main/java/org/logicng/solvers/SATSolver.java
SATSolver.addWithRelaxation
public void addWithRelaxation(final Variable relaxationVar, final Proposition proposition) { """ Adds a proposition to the solver. The formulas of the proposition are first converted to CNF. @param relaxationVar the relaxation variable @param proposition the proposition """ for (final Formula form...
java
public void addWithRelaxation(final Variable relaxationVar, final Proposition proposition) { for (final Formula formula : proposition.formulas()) { this.addWithRelaxation(relaxationVar, formula); } }
[ "public", "void", "addWithRelaxation", "(", "final", "Variable", "relaxationVar", ",", "final", "Proposition", "proposition", ")", "{", "for", "(", "final", "Formula", "formula", ":", "proposition", ".", "formulas", "(", ")", ")", "{", "this", ".", "addWithRel...
Adds a proposition to the solver. The formulas of the proposition are first converted to CNF. @param relaxationVar the relaxation variable @param proposition the proposition
[ "Adds", "a", "proposition", "to", "the", "solver", ".", "The", "formulas", "of", "the", "proposition", "are", "first", "converted", "to", "CNF", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/SATSolver.java#L143-L145