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
alkacon/opencms-core
src/org/opencms/ade/containerpage/CmsContainerpageService.java
CmsContainerpageService.isEditSmallElements
private boolean isEditSmallElements(HttpServletRequest request, CmsObject cms) { """ Checks if small elements in a container page should be initially editable.<p> @param request the current request @param cms the current CMS context @return true if small elements should be initially editable """ ...
java
private boolean isEditSmallElements(HttpServletRequest request, CmsObject cms) { CmsUser user = cms.getRequestContext().getCurrentUser(); String editSmallElementsStr = (String)(user.getAdditionalInfo().get(ADDINFO_EDIT_SMALL_ELEMENTS)); if (editSmallElementsStr == null) { return tru...
[ "private", "boolean", "isEditSmallElements", "(", "HttpServletRequest", "request", ",", "CmsObject", "cms", ")", "{", "CmsUser", "user", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentUser", "(", ")", ";", "String", "editSmallElementsStr", "=", ...
Checks if small elements in a container page should be initially editable.<p> @param request the current request @param cms the current CMS context @return true if small elements should be initially editable
[ "Checks", "if", "small", "elements", "in", "a", "container", "page", "should", "be", "initially", "editable", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsContainerpageService.java#L2739-L2748
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.isSameInstant
public static boolean isSameInstant(final Calendar cal1, final Calendar cal2) { """ <p>Checks if two calendar objects represent the same instant in time.</p> <p>This method compares the long millisecond time of the two objects.</p> @param cal1 the first calendar, not altered, not null @param cal2 the seco...
java
public static boolean isSameInstant(final Calendar cal1, final Calendar cal2) { if (cal1 == null || cal2 == null) { throw new IllegalArgumentException("The date must not be null"); } return cal1.getTime().getTime() == cal2.getTime().getTime(); }
[ "public", "static", "boolean", "isSameInstant", "(", "final", "Calendar", "cal1", ",", "final", "Calendar", "cal2", ")", "{", "if", "(", "cal1", "==", "null", "||", "cal2", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The date ...
<p>Checks if two calendar objects represent the same instant in time.</p> <p>This method compares the long millisecond time of the two objects.</p> @param cal1 the first calendar, not altered, not null @param cal2 the second calendar, not altered, not null @return true if they represent the same millisecond instant...
[ "<p", ">", "Checks", "if", "two", "calendar", "objects", "represent", "the", "same", "instant", "in", "time", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L231-L236
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/http/HttpPipelineCallContext.java
HttpPipelineCallContext.setData
public void setData(String key, Object value) { """ Stores a key-value data in the context. @param key the key @param value the value """ this.data = this.data.addData(key, value); }
java
public void setData(String key, Object value) { this.data = this.data.addData(key, value); }
[ "public", "void", "setData", "(", "String", "key", ",", "Object", "value", ")", "{", "this", ".", "data", "=", "this", ".", "data", ".", "addData", "(", "key", ",", "value", ")", ";", "}" ]
Stores a key-value data in the context. @param key the key @param value the value
[ "Stores", "a", "key", "-", "value", "data", "in", "the", "context", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/http/HttpPipelineCallContext.java#L57-L59
johnkil/Android-AppMsg
library/src/com/devspark/appmsg/AppMsg.java
AppMsg.makeText
private static AppMsg makeText(Activity context, CharSequence text, Style style, View view, boolean floating) { """ Make a {@link AppMsg} with a custom view. It can be used to create non-floating notifications if floating is false. @param context The context to use. Usually your {@link android.app.Activity} o...
java
private static AppMsg makeText(Activity context, CharSequence text, Style style, View view, boolean floating) { return makeText(context, text, style, view, floating, 0); }
[ "private", "static", "AppMsg", "makeText", "(", "Activity", "context", ",", "CharSequence", "text", ",", "Style", "style", ",", "View", "view", ",", "boolean", "floating", ")", "{", "return", "makeText", "(", "context", ",", "text", ",", "style", ",", "vie...
Make a {@link AppMsg} with a custom view. It can be used to create non-floating notifications if floating is false. @param context The context to use. Usually your {@link android.app.Activity} object. @param view View to be used. @param text The text to show. Can be formatted text. @param style The style with ...
[ "Make", "a", "{", "@link", "AppMsg", "}", "with", "a", "custom", "view", ".", "It", "can", "be", "used", "to", "create", "non", "-", "floating", "notifications", "if", "floating", "is", "false", "." ]
train
https://github.com/johnkil/Android-AppMsg/blob/e7fdd7870530a24e6d825278ee0863be0521e8b8/library/src/com/devspark/appmsg/AppMsg.java#L292-L294
Jasig/uPortal
uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java
JaxbPortalDataHandlerService.importDataArchive
private void importDataArchive( final Resource resource, final ArchiveInputStream resourceStream, BatchImportOptions options) { """ Extracts the archive resource and then runs the batch-import process on it. """ final File tempDir = Files.createTempDir(); tr...
java
private void importDataArchive( final Resource resource, final ArchiveInputStream resourceStream, BatchImportOptions options) { final File tempDir = Files.createTempDir(); try { ArchiveEntry archiveEntry; while ((archiveEntry = resourceStream....
[ "private", "void", "importDataArchive", "(", "final", "Resource", "resource", ",", "final", "ArchiveInputStream", "resourceStream", ",", "BatchImportOptions", "options", ")", "{", "final", "File", "tempDir", "=", "Files", ".", "createTempDir", "(", ")", ";", "try"...
Extracts the archive resource and then runs the batch-import process on it.
[ "Extracts", "the", "archive", "resource", "and", "then", "runs", "the", "batch", "-", "import", "process", "on", "it", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/JaxbPortalDataHandlerService.java#L490-L520
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildClassConstantSummary
public void buildClassConstantSummary(XMLNode node, Content summariesTree) throws DocletException { """ Build the summary for the current class. @param node the XML element that specifies which components to document @param summariesTree the tree to which the class constant summary will be added @...
java
public void buildClassConstantSummary(XMLNode node, Content summariesTree) throws DocletException { SortedSet<TypeElement> classes = !currentPackage.isUnnamed() ? utils.getAllClasses(currentPackage) : configuration.typeElementCatalog.allUnnamedClasses(); Conte...
[ "public", "void", "buildClassConstantSummary", "(", "XMLNode", "node", ",", "Content", "summariesTree", ")", "throws", "DocletException", "{", "SortedSet", "<", "TypeElement", ">", "classes", "=", "!", "currentPackage", ".", "isUnnamed", "(", ")", "?", "utils", ...
Build the summary for the current class. @param node the XML element that specifies which components to document @param summariesTree the tree to which the class constant summary will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "summary", "for", "the", "current", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java#L221-L237
mapsforge/mapsforge
mapsforge-poi-writer/src/main/java/org/mapsforge/poi/writer/logging/LoggerWrapper.java
LoggerWrapper.getLogger
public static LoggerWrapper getLogger(String name, ProgressManager pm) { """ Returns or creates a logger that forwards messages to a {@link ProgressManager}. If the logger does not yet have any progress manager assigned, the given one will be used. @param name The logger's unique name. By default the calling c...
java
public static LoggerWrapper getLogger(String name, ProgressManager pm) { LoggerWrapper ret = getLogger(name); if (ret.getProgressManager() == null || ret.getProgressManager() == LoggerWrapper.defaultProgressManager) { ret.setProgressManager(pm); } return ret...
[ "public", "static", "LoggerWrapper", "getLogger", "(", "String", "name", ",", "ProgressManager", "pm", ")", "{", "LoggerWrapper", "ret", "=", "getLogger", "(", "name", ")", ";", "if", "(", "ret", ".", "getProgressManager", "(", ")", "==", "null", "||", "re...
Returns or creates a logger that forwards messages to a {@link ProgressManager}. If the logger does not yet have any progress manager assigned, the given one will be used. @param name The logger's unique name. By default the calling class' name is used. @param pm The logger's progress manager. This value is only use...
[ "Returns", "or", "creates", "a", "logger", "that", "forwards", "messages", "to", "a", "{", "@link", "ProgressManager", "}", ".", "If", "the", "logger", "does", "not", "yet", "have", "any", "progress", "manager", "assigned", "the", "given", "one", "will", "...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-poi-writer/src/main/java/org/mapsforge/poi/writer/logging/LoggerWrapper.java#L68-L77
tumblr/jumblr
src/main/java/com/tumblr/jumblr/JumblrClient.java
JumblrClient.postReblog
public Post postReblog(String blogName, Long postId, String reblogKey, Map<String, ?> options) { """ Reblog a given post @param blogName the name of the blog to post to @param postId the id of the post @param reblogKey the reblog_key of the post @param options Additional options (or null) @return The created ...
java
public Post postReblog(String blogName, Long postId, String reblogKey, Map<String, ?> options) { if (options == null) { options = new HashMap<String, String>(); } Map<String, Object> soptions = JumblrClient.safeOptionMap(options); soptions.put("id", postId.toString()); ...
[ "public", "Post", "postReblog", "(", "String", "blogName", ",", "Long", "postId", ",", "String", "reblogKey", ",", "Map", "<", "String", ",", "?", ">", "options", ")", "{", "if", "(", "options", "==", "null", ")", "{", "options", "=", "new", "HashMap",...
Reblog a given post @param blogName the name of the blog to post to @param postId the id of the post @param reblogKey the reblog_key of the post @param options Additional options (or null) @return The created reblog Post or null
[ "Reblog", "a", "given", "post" ]
train
https://github.com/tumblr/jumblr/blob/373629fd545defb016e227ea758f092507fbd624/src/main/java/com/tumblr/jumblr/JumblrClient.java#L342-L351
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/JdbcMetadataUtils.java
JdbcMetadataUtils.findPlatformFor
public String findPlatformFor(String jdbcSubProtocol, String jdbcDriver) { """ Derives the OJB platform to use for a database that is connected via a url using the specified subprotocol, and where the specified jdbc driver is used. @param jdbcSubProtocol The JDBC subprotocol used to connect to the database @p...
java
public String findPlatformFor(String jdbcSubProtocol, String jdbcDriver) { String platform = (String)jdbcSubProtocolToPlatform.get(jdbcSubProtocol); if (platform == null) { platform = (String)jdbcDriverToPlatform.get(jdbcDriver); } return platform; }
[ "public", "String", "findPlatformFor", "(", "String", "jdbcSubProtocol", ",", "String", "jdbcDriver", ")", "{", "String", "platform", "=", "(", "String", ")", "jdbcSubProtocolToPlatform", ".", "get", "(", "jdbcSubProtocol", ")", ";", "if", "(", "platform", "==",...
Derives the OJB platform to use for a database that is connected via a url using the specified subprotocol, and where the specified jdbc driver is used. @param jdbcSubProtocol The JDBC subprotocol used to connect to the database @param jdbcDriver The JDBC driver used to connect to the database @return The platfor...
[ "Derives", "the", "OJB", "platform", "to", "use", "for", "a", "database", "that", "is", "connected", "via", "a", "url", "using", "the", "specified", "subprotocol", "and", "where", "the", "specified", "jdbc", "driver", "is", "used", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/JdbcMetadataUtils.java#L391-L400
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.verifyCredentials
public Map<String, Object> verifyCredentials(SocialLoginConfig config, String accessToken, @Sensitive String accessTokenSecret) { """ Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS} endpoint in order to obtain a value to use for the user subject. @param config @param accessToken @pa...
java
public Map<String, Object> verifyCredentials(SocialLoginConfig config, String accessToken, @Sensitive String accessTokenSecret) { String endpointUrl = config.getUserApi(); try { SocialUtil.validateEndpointWithQuery(endpointUrl); } catch (SocialLoginException e) { return ...
[ "public", "Map", "<", "String", ",", "Object", ">", "verifyCredentials", "(", "SocialLoginConfig", "config", ",", "String", "accessToken", ",", "@", "Sensitive", "String", "accessTokenSecret", ")", "{", "String", "endpointUrl", "=", "config", ".", "getUserApi", ...
Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS} endpoint in order to obtain a value to use for the user subject. @param config @param accessToken @param accessTokenSecret @return
[ "Invokes", "the", "{", "@value", "TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS", "}", "endpoint", "in", "order", "to", "obtain", "a", "value", "to", "use", "for", "the", "user", "subject", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L973-L992
qiniu/java-sdk
src/main/java/com/qiniu/storage/UploadManager.java
UploadManager.put
public Response put(File file, String key, String token) throws QiniuException { """ 上传文件 @param file 上传的文件对象 @param key 上传文件保存的文件名 @param token 上传凭证 """ return put(file, key, token, null, null, false); }
java
public Response put(File file, String key, String token) throws QiniuException { return put(file, key, token, null, null, false); }
[ "public", "Response", "put", "(", "File", "file", ",", "String", "key", ",", "String", "token", ")", "throws", "QiniuException", "{", "return", "put", "(", "file", ",", "key", ",", "token", ",", "null", ",", "null", ",", "false", ")", ";", "}" ]
上传文件 @param file 上传的文件对象 @param key 上传文件保存的文件名 @param token 上传凭证
[ "上传文件" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/UploadManager.java#L185-L187
Waikato/moa
moa/src/main/java/moa/classifiers/lazy/neighboursearch/KDTree.java
KDTree.clipToInsideHrect
protected boolean clipToInsideHrect(KDTreeNode node, Instance x) { """ Finds the closest point in the hyper rectangle to a given point. Change the given point to this closest point by clipping of at all the dimensions to be clipped of. If the point is inside the rectangle it stays unchanged. The return value is...
java
protected boolean clipToInsideHrect(KDTreeNode node, Instance x) { boolean inside = true; for (int i = 0; i < m_Instances.numAttributes(); i++) { // TODO treat nominals differently!?? if (x.value(i) < node.m_NodeRanges[i][MIN]) { x.setValue(i, node.m_NodeRanges[i][MIN]); inside = fa...
[ "protected", "boolean", "clipToInsideHrect", "(", "KDTreeNode", "node", ",", "Instance", "x", ")", "{", "boolean", "inside", "=", "true", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m_Instances", ".", "numAttributes", "(", ")", ";", "i", "++...
Finds the closest point in the hyper rectangle to a given point. Change the given point to this closest point by clipping of at all the dimensions to be clipped of. If the point is inside the rectangle it stays unchanged. The return value is true if the point was not changed, so the the return value is true if the poin...
[ "Finds", "the", "closest", "point", "in", "the", "hyper", "rectangle", "to", "a", "given", "point", ".", "Change", "the", "given", "point", "to", "this", "closest", "point", "by", "clipping", "of", "at", "all", "the", "dimensions", "to", "be", "clipped", ...
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/lazy/neighboursearch/KDTree.java#L842-L856
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/insert/MinimumEnlargementInsert.java
MinimumEnlargementInsert.choosePath
private IndexTreePath<E> choosePath(AbstractMTree<?, N, E, ?> tree, E object, IndexTreePath<E> subtree) { """ Chooses the best path of the specified subtree for insertion of the given object. @param tree the tree to insert into @param object the entry to search @param subtree the subtree to be tested for ins...
java
private IndexTreePath<E> choosePath(AbstractMTree<?, N, E, ?> tree, E object, IndexTreePath<E> subtree) { N node = tree.getNode(subtree.getEntry()); // leaf if(node.isLeaf()) { return subtree; } // Initialize from first: int bestIdx = 0; E bestEntry = node.getEntry(0); double bes...
[ "private", "IndexTreePath", "<", "E", ">", "choosePath", "(", "AbstractMTree", "<", "?", ",", "N", ",", "E", ",", "?", ">", "tree", ",", "E", "object", ",", "IndexTreePath", "<", "E", ">", "subtree", ")", "{", "N", "node", "=", "tree", ".", "getNod...
Chooses the best path of the specified subtree for insertion of the given object. @param tree the tree to insert into @param object the entry to search @param subtree the subtree to be tested for insertion @return the path of the appropriate subtree to insert the given object
[ "Chooses", "the", "best", "path", "of", "the", "specified", "subtree", "for", "insertion", "of", "the", "given", "object", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/insert/MinimumEnlargementInsert.java#L61-L86
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java
Matrix.constructWithCopy
public static Matrix constructWithCopy(double[][] A) { """ Construct a matrix from a copy of a 2-D array. @param A Two-dimensional array of doubles. @throws IllegalArgumentException All rows must have the same length """ int m = A.length; int n = A[0].length; Matrix X = new Matrix(m...
java
public static Matrix constructWithCopy(double[][] A) { int m = A.length; int n = A[0].length; Matrix X = new Matrix(m, n); double[][] C = X.getArray(); for (int i = 0; i < m; i++) { if (A[i].length != n) { throw new IllegalArgum...
[ "public", "static", "Matrix", "constructWithCopy", "(", "double", "[", "]", "[", "]", "A", ")", "{", "int", "m", "=", "A", ".", "length", ";", "int", "n", "=", "A", "[", "0", "]", ".", "length", ";", "Matrix", "X", "=", "new", "Matrix", "(", "m...
Construct a matrix from a copy of a 2-D array. @param A Two-dimensional array of doubles. @throws IllegalArgumentException All rows must have the same length
[ "Construct", "a", "matrix", "from", "a", "copy", "of", "a", "2", "-", "D", "array", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L199-L218
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/git/GitService.java
GitService.initializeConfigDirectory
public static GitService initializeConfigDirectory(String uri, String branch, String root, String warName, HistoryManager historyManager, ConfigManager configManager) throws Exception { """ Initializes war configuration directory for a Cadmium war. @param uri The remote Git repository ssh URI. @param branch The ...
java
public static GitService initializeConfigDirectory(String uri, String branch, String root, String warName, HistoryManager historyManager, ConfigManager configManager) throws Exception { initializeBaseDirectoryStructure(root, warName); String warDir = FileSystemManager.getChildDirectoryIfExists(root, warName); ...
[ "public", "static", "GitService", "initializeConfigDirectory", "(", "String", "uri", ",", "String", "branch", ",", "String", "root", ",", "String", "warName", ",", "HistoryManager", "historyManager", ",", "ConfigManager", "configManager", ")", "throws", "Exception", ...
Initializes war configuration directory for a Cadmium war. @param uri The remote Git repository ssh URI. @param branch The remote branch to checkout. @param root The shared root. @param warName The name of the war file. @param historyManager The history manager to log the initialization event. @return A GitService obje...
[ "Initializes", "war", "configuration", "directory", "for", "a", "Cadmium", "war", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/git/GitService.java#L175-L225
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.setDateHeader
@Deprecated public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) { """ @deprecated Use {@link #set(CharSequence, Iterable)} instead. @see #setDateHeader(HttpMessage, CharSequence, Iterable) """ message.headers().set(name, values); }
java
@Deprecated public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) { message.headers().set(name, values); }
[ "@", "Deprecated", "public", "static", "void", "setDateHeader", "(", "HttpMessage", "message", ",", "String", "name", ",", "Iterable", "<", "Date", ">", "values", ")", "{", "message", ".", "headers", "(", ")", ".", "set", "(", "name", ",", "values", ")",...
@deprecated Use {@link #set(CharSequence, Iterable)} instead. @see #setDateHeader(HttpMessage, CharSequence, Iterable)
[ "@deprecated", "Use", "{", "@link", "#set", "(", "CharSequence", "Iterable", ")", "}", "instead", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L914-L917
riversun/d6
src/main/java/org/riversun/d6/core/D6Crud.java
D6Crud.setObject
private void setObject(int parameterIndex, PreparedStatement preparedStmt, Object value) throws SQLException { """ Set object to the preparedStatement @param parameterIndex @param preparedStmt @param value @throws SQLException """ preparedStmt.setObject(parameterIndex, value); }
java
private void setObject(int parameterIndex, PreparedStatement preparedStmt, Object value) throws SQLException { preparedStmt.setObject(parameterIndex, value); }
[ "private", "void", "setObject", "(", "int", "parameterIndex", ",", "PreparedStatement", "preparedStmt", ",", "Object", "value", ")", "throws", "SQLException", "{", "preparedStmt", ".", "setObject", "(", "parameterIndex", ",", "value", ")", ";", "}" ]
Set object to the preparedStatement @param parameterIndex @param preparedStmt @param value @throws SQLException
[ "Set", "object", "to", "the", "preparedStatement" ]
train
https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/core/D6Crud.java#L1004-L1007
lonnyj/liquibase-spatial
src/main/java/liquibase/ext/spatial/preconditions/SpatialIndexExistsPrecondition.java
SpatialIndexExistsPrecondition.getExample
public DatabaseObject getExample(final Database database, final String tableName) { """ Creates an example of the database object for which to check. @param database the database instance. @param tableName the table name of the index. @return the database object example. """ final Schema schema = ...
java
public DatabaseObject getExample(final Database database, final String tableName) { final Schema schema = new Schema(getCatalogName(), getSchemaName()); final DatabaseObject example; // For GeoDB, the index is another table. if (database instanceof DerbyDatabase || database instanceof H2Databas...
[ "public", "DatabaseObject", "getExample", "(", "final", "Database", "database", ",", "final", "String", "tableName", ")", "{", "final", "Schema", "schema", "=", "new", "Schema", "(", "getCatalogName", "(", ")", ",", "getSchemaName", "(", ")", ")", ";", "fina...
Creates an example of the database object for which to check. @param database the database instance. @param tableName the table name of the index. @return the database object example.
[ "Creates", "an", "example", "of", "the", "database", "object", "for", "which", "to", "check", "." ]
train
https://github.com/lonnyj/liquibase-spatial/blob/36ae41b0d3d08bb00a22c856e51ffeed08891c0e/src/main/java/liquibase/ext/spatial/preconditions/SpatialIndexExistsPrecondition.java#L161-L174
super-csv/super-csv
super-csv/src/main/java/org/supercsv/cellprocessor/HashMapper.java
HashMapper.checkPreconditions
private static void checkPreconditions(final Map<Object, Object> mapping) { """ Checks the preconditions for creating a new HashMapper processor. @param mapping the Map @throws NullPointerException if mapping is null @throws IllegalArgumentException if mapping is empty """ if( mapping == null ) { ...
java
private static void checkPreconditions(final Map<Object, Object> mapping) { if( mapping == null ) { throw new NullPointerException("mapping should not be null"); } else if( mapping.isEmpty() ) { throw new IllegalArgumentException("mapping should not be empty"); } }
[ "private", "static", "void", "checkPreconditions", "(", "final", "Map", "<", "Object", ",", "Object", ">", "mapping", ")", "{", "if", "(", "mapping", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"mapping should not be null\"", ")", ";...
Checks the preconditions for creating a new HashMapper processor. @param mapping the Map @throws NullPointerException if mapping is null @throws IllegalArgumentException if mapping is empty
[ "Checks", "the", "preconditions", "for", "creating", "a", "new", "HashMapper", "processor", "." ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/HashMapper.java#L134-L140
aws/aws-sdk-java
aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/JobRun.java
JobRun.withArguments
public JobRun withArguments(java.util.Map<String, String> arguments) { """ <p> The job arguments associated with this run. For this job run, they replace the default arguments set in the job definition itself. </p> <p> You can specify arguments here that your own job-execution script consumes, as well as argu...
java
public JobRun withArguments(java.util.Map<String, String> arguments) { setArguments(arguments); return this; }
[ "public", "JobRun", "withArguments", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "arguments", ")", "{", "setArguments", "(", "arguments", ")", ";", "return", "this", ";", "}" ]
<p> The job arguments associated with this run. For this job run, they replace the default arguments set in the job definition itself. </p> <p> You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes. </p> <p> For information about how to specify an...
[ "<p", ">", "The", "job", "arguments", "associated", "with", "this", "run", ".", "For", "this", "job", "run", "they", "replace", "the", "default", "arguments", "set", "in", "the", "job", "definition", "itself", ".", "<", "/", "p", ">", "<p", ">", "You",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/JobRun.java#L732-L735
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/RouteProcessorThreadListener.java
RouteProcessorThreadListener.onCheckFasterRoute
@Override public void onCheckFasterRoute(Location location, RouteProgress routeProgress, boolean checkFasterRoute) { """ RouteListener from the {@link RouteProcessorBackgroundThread} - if fired with checkFasterRoute set to true, a new {@link DirectionsRoute} should be fetched with {@link RouteFetcher}. @para...
java
@Override public void onCheckFasterRoute(Location location, RouteProgress routeProgress, boolean checkFasterRoute) { if (checkFasterRoute) { routeFetcher.findRouteFromRouteProgress(location, routeProgress); } }
[ "@", "Override", "public", "void", "onCheckFasterRoute", "(", "Location", "location", ",", "RouteProgress", "routeProgress", ",", "boolean", "checkFasterRoute", ")", "{", "if", "(", "checkFasterRoute", ")", "{", "routeFetcher", ".", "findRouteFromRouteProgress", "(", ...
RouteListener from the {@link RouteProcessorBackgroundThread} - if fired with checkFasterRoute set to true, a new {@link DirectionsRoute} should be fetched with {@link RouteFetcher}. @param location to create a new origin @param routeProgress for various {@link com.mapbox.api.directions.v5.models.LegStep} d...
[ "RouteListener", "from", "the", "{", "@link", "RouteProcessorBackgroundThread", "}", "-", "if", "fired", "with", "checkFasterRoute", "set", "to", "true", "a", "new", "{", "@link", "DirectionsRoute", "}", "should", "be", "fetched", "with", "{", "@link", "RouteFet...
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/RouteProcessorThreadListener.java#L69-L74
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/provisioning/OperationsApi.java
OperationsApi.getUsedSkillsAsync
public void getUsedSkillsAsync(AsyncCallback callback) throws ProvisioningApiException { """ Get used skills. Get all [CfgSkill](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgSkill) that are linked to existing [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/Cfg...
java
public void getUsedSkillsAsync(AsyncCallback callback) throws ProvisioningApiException { String aioId = UUID.randomUUID().toString(); asyncCallbacks.put(aioId, callback); try { ApiAsyncSuccessResponse resp = operationsApi.getUsedSkillsAsync(aioId); if (!resp.getStatus().getCode().equals(1)) { ...
[ "public", "void", "getUsedSkillsAsync", "(", "AsyncCallback", "callback", ")", "throws", "ProvisioningApiException", "{", "String", "aioId", "=", "UUID", ".", "randomUUID", "(", ")", ".", "toString", "(", ")", ";", "asyncCallbacks", ".", "put", "(", "aioId", "...
Get used skills. Get all [CfgSkill](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgSkill) that are linked to existing [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) objects. @param callback The callback function called when the skills are returned asynchro...
[ "Get", "used", "skills", ".", "Get", "all", "[", "CfgSkill", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", "/", "Documentation", "/", "PSDK", "/", "latest", "/", "ConfigLayerRef", "/", "CfgSkill", ")", "that", "are", "linked", "to",...
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/OperationsApi.java#L31-L44
qos-ch/slf4j
slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java
SimpleLogger.formatAndLog
private void formatAndLog(int level, String format, Object arg1, Object arg2) { """ For formatted messages, first substitute arguments and then log. @param level @param format @param arg1 @param arg2 """ if (!isLevelEnabled(level)) { return; } FormattingTuple tp = Mess...
java
private void formatAndLog(int level, String format, Object arg1, Object arg2) { if (!isLevelEnabled(level)) { return; } FormattingTuple tp = MessageFormatter.format(format, arg1, arg2); log(level, tp.getMessage(), tp.getThrowable()); }
[ "private", "void", "formatAndLog", "(", "int", "level", ",", "String", "format", ",", "Object", "arg1", ",", "Object", "arg2", ")", "{", "if", "(", "!", "isLevelEnabled", "(", "level", ")", ")", "{", "return", ";", "}", "FormattingTuple", "tp", "=", "M...
For formatted messages, first substitute arguments and then log. @param level @param format @param arg1 @param arg2
[ "For", "formatted", "messages", "first", "substitute", "arguments", "and", "then", "log", "." ]
train
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java#L350-L356
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterators.java
CloseableIterators.groupBy
public static <T> CloseableIterator<List<T>> groupBy(final CloseableIterator<? extends T> iterator, final Function<? super T, ?> groupingFunction) { """ Divides a closeableiterator into unmodifiable sublists of equivalent elements. The iterator groups elements in consecutive order, forming a new partition when th...
java
public static <T> CloseableIterator<List<T>> groupBy(final CloseableIterator<? extends T> iterator, final Function<? super T, ?> groupingFunction) { return wrap(Iterators2.groupBy(iterator, groupingFunction), iterator); }
[ "public", "static", "<", "T", ">", "CloseableIterator", "<", "List", "<", "T", ">", ">", "groupBy", "(", "final", "CloseableIterator", "<", "?", "extends", "T", ">", "iterator", ",", "final", "Function", "<", "?", "super", "T", ",", "?", ">", "grouping...
Divides a closeableiterator into unmodifiable sublists of equivalent elements. The iterator groups elements in consecutive order, forming a new partition when the value from the provided function changes. For example, grouping the iterator {@code [1, 3, 2, 4, 5]} with a function grouping even and odd numbers yields {@c...
[ "Divides", "a", "closeableiterator", "into", "unmodifiable", "sublists", "of", "equivalent", "elements", ".", "The", "iterator", "groups", "elements", "in", "consecutive", "order", "forming", "a", "new", "partition", "when", "the", "value", "from", "the", "provide...
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterators.java#L104-L106
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java
SimpleDateFormat.matchString
private int matchString(String text, int start, int field, String[] data, CalendarBuilder calb) { """ Private code-size reduction function used by subParse. @param text the time text being parsed. @param start where to start parsing. @param field the date field being parsed. @param data the string array to par...
java
private int matchString(String text, int start, int field, String[] data, CalendarBuilder calb) { int i = 0; int count = data.length; if (field == Calendar.DAY_OF_WEEK) i = 1; // There may be multiple strings in the data[] array which begin with // the same prefix (e.g., Ce...
[ "private", "int", "matchString", "(", "String", "text", ",", "int", "start", ",", "int", "field", ",", "String", "[", "]", "data", ",", "CalendarBuilder", "calb", ")", "{", "int", "i", "=", "0", ";", "int", "count", "=", "data", ".", "length", ";", ...
Private code-size reduction function used by subParse. @param text the time text being parsed. @param start where to start parsing. @param field the date field being parsed. @param data the string array to parsed. @return the new start position if matching succeeded; a negative number indicating matching failure, other...
[ "Private", "code", "-", "size", "reduction", "function", "used", "by", "subParse", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java#L1581-L1620
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.getDeltaC
public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor) throws DbxException { """ Same as {@link #getDeltaC(Collector, String, boolean)} with {@code includeMediaInfo} set to {@code false}. """ return getDeltaC(collector, cursor, false); ...
java
public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor) throws DbxException { return getDeltaC(collector, cursor, false); }
[ "public", "<", "C", ">", "DbxDeltaC", "<", "C", ">", "getDeltaC", "(", "Collector", "<", "DbxDeltaC", ".", "Entry", "<", "DbxEntry", ">", ",", "C", ">", "collector", ",", "/*@Nullable*/", "String", "cursor", ")", "throws", "DbxException", "{", "return", ...
Same as {@link #getDeltaC(Collector, String, boolean)} with {@code includeMediaInfo} set to {@code false}.
[ "Same", "as", "{" ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1508-L1512
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java
PersistentExecutorImpl.notificationCreated
@Override public void notificationCreated(RuntimeUpdateManager updateManager, RuntimeUpdateNotification notification) { """ This method is driven for various RuntimeUpdateNotification's. When we receive a notification we will bump our count of active configuration updates in progress. A non-zero count value ...
java
@Override public void notificationCreated(RuntimeUpdateManager updateManager, RuntimeUpdateNotification notification) { class MyCompletionListener implements CompletionListener<Boolean> { String notificationName; public MyCompletionListener(String name) { notificati...
[ "@", "Override", "public", "void", "notificationCreated", "(", "RuntimeUpdateManager", "updateManager", ",", "RuntimeUpdateNotification", "notification", ")", "{", "class", "MyCompletionListener", "implements", "CompletionListener", "<", "Boolean", ">", "{", "String", "no...
This method is driven for various RuntimeUpdateNotification's. When we receive a notification we will bump our count of active configuration updates in progress. A non-zero count value signifies configuration update(s) are in progress. We monitor the completion of the Futures related to the notifications. When we are ...
[ "This", "method", "is", "driven", "for", "various", "RuntimeUpdateNotification", "s", ".", "When", "we", "receive", "a", "notification", "we", "will", "bump", "our", "count", "of", "active", "configuration", "updates", "in", "progress", ".", "A", "non", "-", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java#L1975-L2014
wisdom-framework/wisdom
framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java
ThymeleafTemplateCollector.addTemplate
public ThymeLeafTemplateImplementation addTemplate(Bundle bundle, URL templateURL) { """ Adds a template form the given url. @param bundle the bundle containing the template, use system bundle for external templates. @param templateURL the url @return the added template. IF the given url is already used by an...
java
public ThymeLeafTemplateImplementation addTemplate(Bundle bundle, URL templateURL) { ThymeLeafTemplateImplementation template = getTemplateByURL(templateURL); if (template != null) { // Already existing. return template; } synchronized (this) { // need...
[ "public", "ThymeLeafTemplateImplementation", "addTemplate", "(", "Bundle", "bundle", ",", "URL", "templateURL", ")", "{", "ThymeLeafTemplateImplementation", "template", "=", "getTemplateByURL", "(", "templateURL", ")", ";", "if", "(", "template", "!=", "null", ")", ...
Adds a template form the given url. @param bundle the bundle containing the template, use system bundle for external templates. @param templateURL the url @return the added template. IF the given url is already used by another template, return this other template.
[ "Adds", "a", "template", "form", "the", "given", "url", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L189-L205
samskivert/pythagoras
src/main/java/pythagoras/d/Transforms.java
Transforms.multiply
public static <T extends Transform> T multiply ( AffineTransform a, double m00, double m01, double m10, double m11, double tx, double ty, T into) { """ Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code into} may refer to the same instance as {@code a}. @return {@co...
java
public static <T extends Transform> T multiply ( AffineTransform a, double m00, double m01, double m10, double m11, double tx, double ty, T into) { return multiply(a.m00, a.m01, a.m10, a.m11, a.tx, a.ty, m00, m01, m10, m11, tx, ty, into); }
[ "public", "static", "<", "T", "extends", "Transform", ">", "T", "multiply", "(", "AffineTransform", "a", ",", "double", "m00", ",", "double", "m01", ",", "double", "m10", ",", "double", "m11", ",", "double", "tx", ",", "double", "ty", ",", "T", "into",...
Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code into} may refer to the same instance as {@code a}. @return {@code into} for chaining.
[ "Multiplies", "the", "supplied", "two", "affine", "transforms", "storing", "the", "result", "in", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Transforms.java#L44-L47
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java
ManagementClientAsync.createSubscriptionAsync
public CompletableFuture<SubscriptionDescription> createSubscriptionAsync(String topicPath, String subscriptionName) { """ Creates a new subscription for a given topic in the service namespace with the given name. See {@link SubscriptionDescription} for default values of subscription properties. @param topicPath...
java
public CompletableFuture<SubscriptionDescription> createSubscriptionAsync(String topicPath, String subscriptionName) { return this.createSubscriptionAsync(new SubscriptionDescription(topicPath, subscriptionName)); }
[ "public", "CompletableFuture", "<", "SubscriptionDescription", ">", "createSubscriptionAsync", "(", "String", "topicPath", ",", "String", "subscriptionName", ")", "{", "return", "this", ".", "createSubscriptionAsync", "(", "new", "SubscriptionDescription", "(", "topicPath...
Creates a new subscription for a given topic in the service namespace with the given name. See {@link SubscriptionDescription} for default values of subscription properties. @param topicPath - The name of the topic relative to the service namespace base address. @param subscriptionName - The name of the subscription. @...
[ "Creates", "a", "new", "subscription", "for", "a", "given", "topic", "in", "the", "service", "namespace", "with", "the", "given", "name", ".", "See", "{" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java#L629-L631
PSDev/LicensesDialog
licensesdialog/src/main/java/de/psdev/licensesdialog/LicenseResolver.java
LicenseResolver.read
public static License read(final String license) { """ Get a license by name @param license license name @return License @throws java.lang.IllegalStateException when unknown license is requested """ final String trimmedLicense = license.trim(); if (sLicenses.containsKey(trimmedLicense)) { ...
java
public static License read(final String license) { final String trimmedLicense = license.trim(); if (sLicenses.containsKey(trimmedLicense)) { return sLicenses.get(trimmedLicense); } else { throw new IllegalStateException(String.format("no such license available: %s, did y...
[ "public", "static", "License", "read", "(", "final", "String", "license", ")", "{", "final", "String", "trimmedLicense", "=", "license", ".", "trim", "(", ")", ";", "if", "(", "sLicenses", ".", "containsKey", "(", "trimmedLicense", ")", ")", "{", "return",...
Get a license by name @param license license name @return License @throws java.lang.IllegalStateException when unknown license is requested
[ "Get", "a", "license", "by", "name" ]
train
https://github.com/PSDev/LicensesDialog/blob/c09b669cbf8f70bf5509da4b0b57910a1f5dcba8/licensesdialog/src/main/java/de/psdev/licensesdialog/LicenseResolver.java#L83-L90
xwiki/xwiki-rendering
xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java
WikiScannerUtil.extractSubstring
public static String extractSubstring( String str, String open, String close, char escape) { """ Extracts and returns a substring of the given string starting from the given open sequence and finishing by the specified close sequence. This method unescapes all symbols prefixed by ...
java
public static String extractSubstring( String str, String open, String close, char escape) { return extractSubstring(str, open, close, escape, true); }
[ "public", "static", "String", "extractSubstring", "(", "String", "str", ",", "String", "open", ",", "String", "close", ",", "char", "escape", ")", "{", "return", "extractSubstring", "(", "str", ",", "open", ",", "close", ",", "escape", ",", "true", ")", ...
Extracts and returns a substring of the given string starting from the given open sequence and finishing by the specified close sequence. This method unescapes all symbols prefixed by the given escape symbol. @param str from this string the substring framed by the specified open and close sequence will be returned @pa...
[ "Extracts", "and", "returns", "a", "substring", "of", "the", "given", "string", "starting", "from", "the", "given", "open", "sequence", "and", "finishing", "by", "the", "specified", "close", "sequence", ".", "This", "method", "unescapes", "all", "symbols", "pr...
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L69-L76
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/Similarity.java
Similarity.kendallsTau
public static double kendallsTau(double[] a, double[] b) { """ Computes <a href="http://en.wikipedia.org/wiki/Kendall%27s_tau">Kendall's tau</a> of the values in the two arrays. This method uses tau-b, which is suitable for arrays with duplicate values. @throws IllegalArgumentException when the length of the...
java
public static double kendallsTau(double[] a, double[] b) { return kendallsTau(Vectors.asVector(a), Vectors.asVector(b)); }
[ "public", "static", "double", "kendallsTau", "(", "double", "[", "]", "a", ",", "double", "[", "]", "b", ")", "{", "return", "kendallsTau", "(", "Vectors", ".", "asVector", "(", "a", ")", ",", "Vectors", ".", "asVector", "(", "b", ")", ")", ";", "}...
Computes <a href="http://en.wikipedia.org/wiki/Kendall%27s_tau">Kendall's tau</a> of the values in the two arrays. This method uses tau-b, which is suitable for arrays with duplicate values. @throws IllegalArgumentException when the length of the two arrays are not the same.
[ "Computes", "<a", "href", "=", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Kendall%27s_tau", ">", "Kendall", "s", "tau<", "/", "a", ">", "of", "the", "values", "in", "the", "two", "arrays", ".", "This", "method", "uses",...
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/Similarity.java#L2031-L2033
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getSeasonExternalID
public ExternalID getSeasonExternalID(int tvID, int seasonNumber, String language) throws MovieDbException { """ Get the external ids that we have stored for a TV season by season number. @param tvID tvID @param seasonNumber seasonNumber @param language language @return @throws MovieDbException exception ...
java
public ExternalID getSeasonExternalID(int tvID, int seasonNumber, String language) throws MovieDbException { return tmdbSeasons.getSeasonExternalID(tvID, seasonNumber, language); }
[ "public", "ExternalID", "getSeasonExternalID", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "String", "language", ")", "throws", "MovieDbException", "{", "return", "tmdbSeasons", ".", "getSeasonExternalID", "(", "tvID", ",", "seasonNumber", ",", "language", ...
Get the external ids that we have stored for a TV season by season number. @param tvID tvID @param seasonNumber seasonNumber @param language language @return @throws MovieDbException exception
[ "Get", "the", "external", "ids", "that", "we", "have", "stored", "for", "a", "TV", "season", "by", "season", "number", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1726-L1728
VoltDB/voltdb
src/frontend/org/voltdb/importer/AbstractImporter.java
AbstractImporter.callProcedure
public boolean callProcedure(Invocation invocation, ProcedureCallback callback) { """ This should be used importer implementations to execute a stored procedure. @param invocation Invocation object with procedure name and parameter information @param callback the callback that will receive procedure invocation...
java
public boolean callProcedure(Invocation invocation, ProcedureCallback callback) { try { boolean result = m_importServerAdapter.callProcedure(this, m_backPressurePredicate, ...
[ "public", "boolean", "callProcedure", "(", "Invocation", "invocation", ",", "ProcedureCallback", "callback", ")", "{", "try", "{", "boolean", "result", "=", "m_importServerAdapter", ".", "callProcedure", "(", "this", ",", "m_backPressurePredicate", ",", "callback", ...
This should be used importer implementations to execute a stored procedure. @param invocation Invocation object with procedure name and parameter information @param callback the callback that will receive procedure invocation status @return returns true if the procedure execution went through successfully; false other...
[ "This", "should", "be", "used", "importer", "implementations", "to", "execute", "a", "stored", "procedure", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L108-L121
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java
PublicKeyExtensions.toPemFile
public static void toPemFile(final @NonNull PublicKey publicKey, final @NonNull File file) throws IOException { """ Write the given {@link PublicKey} into the given {@link File}. @param publicKey the public key @param file the file to write in @throws IOException Signals that an I/O exception has occurr...
java
public static void toPemFile(final @NonNull PublicKey publicKey, final @NonNull File file) throws IOException { PublicKeyWriter.writeInPemFormat(publicKey, file); }
[ "public", "static", "void", "toPemFile", "(", "final", "@", "NonNull", "PublicKey", "publicKey", ",", "final", "@", "NonNull", "File", "file", ")", "throws", "IOException", "{", "PublicKeyWriter", ".", "writeInPemFormat", "(", "publicKey", ",", "file", ")", ";...
Write the given {@link PublicKey} into the given {@link File}. @param publicKey the public key @param file the file to write in @throws IOException Signals that an I/O exception has occurred.
[ "Write", "the", "given", "{", "@link", "PublicKey", "}", "into", "the", "given", "{", "@link", "File", "}", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java#L153-L156
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.isPointNearMultiLatLng
public static boolean isPointNearMultiLatLng(LatLng point, MultiLatLng multiLatLng, double tolerance) { """ Is the point near any points in the multi lat lng @param point point @param multiLatLng multi lat lng @param tolerance distance tolerance @return true if near """ boolean near = fal...
java
public static boolean isPointNearMultiLatLng(LatLng point, MultiLatLng multiLatLng, double tolerance) { boolean near = false; for (LatLng multiPoint : multiLatLng.getLatLngs()) { near = isPointNearPoint(point, multiPoint, tolerance); if (near) { break; ...
[ "public", "static", "boolean", "isPointNearMultiLatLng", "(", "LatLng", "point", ",", "MultiLatLng", "multiLatLng", ",", "double", "tolerance", ")", "{", "boolean", "near", "=", "false", ";", "for", "(", "LatLng", "multiPoint", ":", "multiLatLng", ".", "getLatLn...
Is the point near any points in the multi lat lng @param point point @param multiLatLng multi lat lng @param tolerance distance tolerance @return true if near
[ "Is", "the", "point", "near", "any", "points", "in", "the", "multi", "lat", "lng" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L305-L314
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/AnnotationRef.java
AnnotationRef.annotationArrayFieldWriter
private static <T extends Annotation> FieldWriter annotationArrayFieldWriter( final String name, final AnnotationRef<T> ref) { """ Writes an annotation array valued field to the annotation visitor. """ return new FieldWriter() { @Override public void write(AnnotationVisitor visitor, Objec...
java
private static <T extends Annotation> FieldWriter annotationArrayFieldWriter( final String name, final AnnotationRef<T> ref) { return new FieldWriter() { @Override public void write(AnnotationVisitor visitor, Object value) { int len = Array.getLength(value); AnnotationVisitor array...
[ "private", "static", "<", "T", "extends", "Annotation", ">", "FieldWriter", "annotationArrayFieldWriter", "(", "final", "String", "name", ",", "final", "AnnotationRef", "<", "T", ">", "ref", ")", "{", "return", "new", "FieldWriter", "(", ")", "{", "@", "Over...
Writes an annotation array valued field to the annotation visitor.
[ "Writes", "an", "annotation", "array", "valued", "field", "to", "the", "annotation", "visitor", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/AnnotationRef.java#L170-L185
Azure/azure-sdk-for-java
authorization/resource-manager/v2018_09_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_09_01_preview/implementation/RoleDefinitionsInner.java
RoleDefinitionsInner.deleteAsync
public Observable<RoleDefinitionInner> deleteAsync(String scope, String roleDefinitionId) { """ Deletes a role definition. @param scope The scope of the role definition. @param roleDefinitionId The ID of the role definition to delete. @throws IllegalArgumentException thrown if parameters fail the validation ...
java
public Observable<RoleDefinitionInner> deleteAsync(String scope, String roleDefinitionId) { return deleteWithServiceResponseAsync(scope, roleDefinitionId).map(new Func1<ServiceResponse<RoleDefinitionInner>, RoleDefinitionInner>() { @Override public RoleDefinitionInner call(ServiceRespons...
[ "public", "Observable", "<", "RoleDefinitionInner", ">", "deleteAsync", "(", "String", "scope", ",", "String", "roleDefinitionId", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "scope", ",", "roleDefinitionId", ")", ".", "map", "(", "new", "Func1", "<...
Deletes a role definition. @param scope The scope of the role definition. @param roleDefinitionId The ID of the role definition to delete. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RoleDefinitionInner object
[ "Deletes", "a", "role", "definition", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2018_09_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_09_01_preview/implementation/RoleDefinitionsInner.java#L126-L133
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Page.java
Page.getCompiledPage
private EngProcessedPage getCompiledPage() throws WikiApiException { """ Returns CompiledPage produced by the SWEBLE parser using the SimpleWikiConfiguration. @return the parsed page @throws WikiApiException Thrown if errors occurred. """ EngProcessedPage cp; try{ WtEngineImpl engine = new WtEngineI...
java
private EngProcessedPage getCompiledPage() throws WikiApiException { EngProcessedPage cp; try{ WtEngineImpl engine = new WtEngineImpl(this.wiki.getWikConfig()); PageTitle pageTitle = PageTitle.make(this.wiki.getWikConfig(), this.getTitle().toString()); PageId pageId = new PageId(pageTitle, -1); // Co...
[ "private", "EngProcessedPage", "getCompiledPage", "(", ")", "throws", "WikiApiException", "{", "EngProcessedPage", "cp", ";", "try", "{", "WtEngineImpl", "engine", "=", "new", "WtEngineImpl", "(", "this", ".", "wiki", ".", "getWikConfig", "(", ")", ")", ";", "...
Returns CompiledPage produced by the SWEBLE parser using the SimpleWikiConfiguration. @return the parsed page @throws WikiApiException Thrown if errors occurred.
[ "Returns", "CompiledPage", "produced", "by", "the", "SWEBLE", "parser", "using", "the", "SimpleWikiConfiguration", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Page.java#L608-L623
xqbase/util
util/src/main/java/com/xqbase/util/Bytes.java
Bytes.setShort
public static void setShort(int n, byte[] b, int off, boolean littleEndian) { """ Store a <b>short</b> number into a byte array in a given byte order """ if (littleEndian) { b[off] = (byte) n; b[off + 1] = (byte) (n >>> 8); } else { b[off] = (byte) (n >>> 8); b[off + 1] = (byte) n; } ...
java
public static void setShort(int n, byte[] b, int off, boolean littleEndian) { if (littleEndian) { b[off] = (byte) n; b[off + 1] = (byte) (n >>> 8); } else { b[off] = (byte) (n >>> 8); b[off + 1] = (byte) n; } }
[ "public", "static", "void", "setShort", "(", "int", "n", ",", "byte", "[", "]", "b", ",", "int", "off", ",", "boolean", "littleEndian", ")", "{", "if", "(", "littleEndian", ")", "{", "b", "[", "off", "]", "=", "(", "byte", ")", "n", ";", "b", "...
Store a <b>short</b> number into a byte array in a given byte order
[ "Store", "a", "<b", ">", "short<", "/", "b", ">", "number", "into", "a", "byte", "array", "in", "a", "given", "byte", "order" ]
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util/src/main/java/com/xqbase/util/Bytes.java#L108-L116
hawkular/hawkular-commons
hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/ConnectionContextFactory.java
ConnectionContextFactory.createConsumerConnectionContext
public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint, String messageSelector) throws JMSException { """ Creates a new consumer connection context, reusing any existing connection that might have already been created. The destination of the connection's session will be tha...
java
public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint, String messageSelector) throws JMSException { ConsumerConnectionContext context = new ConsumerConnectionContext(); createOrReuseConnection(context, true); createSession(context); createDestina...
[ "public", "ConsumerConnectionContext", "createConsumerConnectionContext", "(", "Endpoint", "endpoint", ",", "String", "messageSelector", ")", "throws", "JMSException", "{", "ConsumerConnectionContext", "context", "=", "new", "ConsumerConnectionContext", "(", ")", ";", "crea...
Creates a new consumer connection context, reusing any existing connection that might have already been created. The destination of the connection's session will be that of the given endpoint. The consumer will filter messages based on the given message selector expression (which may be null in which case the consumer ...
[ "Creates", "a", "new", "consumer", "connection", "context", "reusing", "any", "existing", "connection", "that", "might", "have", "already", "been", "created", ".", "The", "destination", "of", "the", "connection", "s", "session", "will", "be", "that", "of", "th...
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/ConnectionContextFactory.java#L124-L132
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Parameters.java
Parameters.setDate
@NonNull public Parameters setDate(@NonNull String name, Date value) { """ Set a date value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The date value. @return Th...
java
@NonNull public Parameters setDate(@NonNull String name, Date value) { return setValue(name, value); }
[ "@", "NonNull", "public", "Parameters", "setDate", "(", "@", "NonNull", "String", "name", ",", "Date", "value", ")", "{", "return", "setValue", "(", "name", ",", "value", ")", ";", "}" ]
Set a date value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The date value. @return The self object.
[ "Set", "a", "date", "value", "to", "the", "query", "parameter", "referenced", "by", "the", "given", "name", ".", "A", "query", "parameter", "is", "defined", "by", "using", "the", "Expression", "s", "parameter", "(", "String", "name", ")", "function", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Parameters.java#L170-L173
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java
BaseNDArrayFactory.valueArrayOf
@Override public INDArray valueArrayOf(int[] shape, double value) { """ Creates an ndarray with the specified value as the only value in the ndarray @param shape the shape of the ndarray @param value the value to assign @return the created ndarray """ INDArray ret = Nd4j.createUninitialized(...
java
@Override public INDArray valueArrayOf(int[] shape, double value) { INDArray ret = Nd4j.createUninitialized(shape, Nd4j.order()); ret.assign(value); return ret; }
[ "@", "Override", "public", "INDArray", "valueArrayOf", "(", "int", "[", "]", "shape", ",", "double", "value", ")", "{", "INDArray", "ret", "=", "Nd4j", ".", "createUninitialized", "(", "shape", ",", "Nd4j", ".", "order", "(", ")", ")", ";", "ret", ".",...
Creates an ndarray with the specified value as the only value in the ndarray @param shape the shape of the ndarray @param value the value to assign @return the created ndarray
[ "Creates", "an", "ndarray", "with", "the", "specified", "value", "as", "the", "only", "value", "in", "the", "ndarray" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java#L796-L801
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java
CQLTranslator.appendMap
private boolean appendMap(StringBuilder builder, Object value) { """ Appends a object of type {@link java.util.List} @param builder the builder @param value the value @return true, if successful """ boolean isPresent = false; if (value instanceof Map) { Map map = ((Ma...
java
private boolean appendMap(StringBuilder builder, Object value) { boolean isPresent = false; if (value instanceof Map) { Map map = ((Map) value); isPresent = true; builder.append(Constants.OPEN_CURLY_BRACKET); for (Object mapKey : map.keySet()) ...
[ "private", "boolean", "appendMap", "(", "StringBuilder", "builder", ",", "Object", "value", ")", "{", "boolean", "isPresent", "=", "false", ";", "if", "(", "value", "instanceof", "Map", ")", "{", "Map", "map", "=", "(", "(", "Map", ")", "value", ")", "...
Appends a object of type {@link java.util.List} @param builder the builder @param value the value @return true, if successful
[ "Appends", "a", "object", "of", "type", "{", "@link", "java", ".", "util", ".", "List", "}" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L1210-L1240
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.rightShift
public static Period rightShift(YearMonth self, YearMonth other) { """ Returns a {@link java.time.Period} of time between the first day of this year/month (inclusive) and the given {@link java.time.YearMonth} (exclusive). @param self a YearMonth @param other another YearMonth @return a Period @since 2.5.0 ...
java
public static Period rightShift(YearMonth self, YearMonth other) { return Period.between(self.atDay(1), other.atDay(1)); }
[ "public", "static", "Period", "rightShift", "(", "YearMonth", "self", ",", "YearMonth", "other", ")", "{", "return", "Period", ".", "between", "(", "self", ".", "atDay", "(", "1", ")", ",", "other", ".", "atDay", "(", "1", ")", ")", ";", "}" ]
Returns a {@link java.time.Period} of time between the first day of this year/month (inclusive) and the given {@link java.time.YearMonth} (exclusive). @param self a YearMonth @param other another YearMonth @return a Period @since 2.5.0
[ "Returns", "a", "{", "@link", "java", ".", "time", ".", "Period", "}", "of", "time", "between", "the", "first", "day", "of", "this", "year", "/", "month", "(", "inclusive", ")", "and", "the", "given", "{", "@link", "java", ".", "time", ".", "YearMont...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1603-L1605
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java
DateFormat.getDateTimeInstance
public final static DateFormat getDateTimeInstance() { """ Gets the date/time formatter with the default formatting style for the default locale. @return a date/time formatter. """ return get(DEFAULT, DEFAULT, 3, Locale.getDefault(Locale.Category.FORMAT)); }
java
public final static DateFormat getDateTimeInstance() { return get(DEFAULT, DEFAULT, 3, Locale.getDefault(Locale.Category.FORMAT)); }
[ "public", "final", "static", "DateFormat", "getDateTimeInstance", "(", ")", "{", "return", "get", "(", "DEFAULT", ",", "DEFAULT", ",", "3", ",", "Locale", ".", "getDefault", "(", "Locale", ".", "Category", ".", "FORMAT", ")", ")", ";", "}" ]
Gets the date/time formatter with the default formatting style for the default locale. @return a date/time formatter.
[ "Gets", "the", "date", "/", "time", "formatter", "with", "the", "default", "formatting", "style", "for", "the", "default", "locale", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java#L518-L521
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java
Math.multiplyExact
public static long multiplyExact(long x, long y) { """ Returns the product of the arguments, throwing an exception if the result overflows a {@code long}. @param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows a long @since 1.8 """ ...
java
public static long multiplyExact(long x, long y) { long r = x * y; long ax = Math.abs(x); long ay = Math.abs(y); if (((ax | ay) >>> 31 != 0)) { // Some bits greater than 2^31 that might cause overflow // Check the result using the divide operator // an...
[ "public", "static", "long", "multiplyExact", "(", "long", "x", ",", "long", "y", ")", "{", "long", "r", "=", "x", "*", "y", ";", "long", "ax", "=", "Math", ".", "abs", "(", "x", ")", ";", "long", "ay", "=", "Math", ".", "abs", "(", "y", ")", ...
Returns the product of the arguments, throwing an exception if the result overflows a {@code long}. @param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows a long @since 1.8
[ "Returns", "the", "product", "of", "the", "arguments", "throwing", "an", "exception", "if", "the", "result", "overflows", "a", "{", "@code", "long", "}", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L887-L901
sbt-compiler-maven-plugin/sbt-compiler-maven-plugin
sbt-compiler-maven-plugin/src/main/java/com/google/code/sbt/compiler/plugin/SBTAddScalaSourcesMojo.java
SBTAddScalaSourcesMojo.execute
@Override public void execute() { """ Adds default Scala sources locations to Maven project. <ul> <li>{@code src/main/scala} is added to project's compile source roots</li> <li>{@code src/test/scala} is added to project's test compile source roots</li> </ul> """ if ( "pom".equals( project.get...
java
@Override public void execute() { if ( "pom".equals( project.getPackaging() ) ) { return; } File baseDir = project.getBasedir(); File mainScalaPath = new File( baseDir, "src/main/scala" ); if ( mainScalaPath.isDirectory() ) { Stri...
[ "@", "Override", "public", "void", "execute", "(", ")", "{", "if", "(", "\"pom\"", ".", "equals", "(", "project", ".", "getPackaging", "(", ")", ")", ")", "{", "return", ";", "}", "File", "baseDir", "=", "project", ".", "getBasedir", "(", ")", ";", ...
Adds default Scala sources locations to Maven project. <ul> <li>{@code src/main/scala} is added to project's compile source roots</li> <li>{@code src/test/scala} is added to project's test compile source roots</li> </ul>
[ "Adds", "default", "Scala", "sources", "locations", "to", "Maven", "project", "." ]
train
https://github.com/sbt-compiler-maven-plugin/sbt-compiler-maven-plugin/blob/cf8b8766956841c13f388eb311d214644dba9137/sbt-compiler-maven-plugin/src/main/java/com/google/code/sbt/compiler/plugin/SBTAddScalaSourcesMojo.java#L59-L90
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.update
public LabAccountInner update(String resourceGroupName, String labAccountName, LabAccountFragment labAccount) { """ Modify properties of lab accounts. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab account. @throw...
java
public LabAccountInner update(String resourceGroupName, String labAccountName, LabAccountFragment labAccount) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labAccount).toBlocking().single().body(); }
[ "public", "LabAccountInner", "update", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "LabAccountFragment", "labAccount", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "labAccount", "...
Modify properties of lab accounts. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab account. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected b...
[ "Modify", "properties", "of", "lab", "accounts", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L1025-L1027
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/AuditorFactory.java
AuditorFactory.getAuditor
public static IHEAuditor getAuditor(String className, boolean useGlobalConfig, boolean useGlobalContext) { """ Get an auditor instance for the specified auditor class name. Auditor will use a standalone configuration or context if a non-global configuration / context is requested. If a standalone configuration...
java
public static IHEAuditor getAuditor(String className, boolean useGlobalConfig, boolean useGlobalContext) { Class<? extends IHEAuditor> clazz = AuditorFactory.getAuditorClassForClassName(className); return getAuditor(clazz,useGlobalConfig, useGlobalContext); }
[ "public", "static", "IHEAuditor", "getAuditor", "(", "String", "className", ",", "boolean", "useGlobalConfig", ",", "boolean", "useGlobalContext", ")", "{", "Class", "<", "?", "extends", "IHEAuditor", ">", "clazz", "=", "AuditorFactory", ".", "getAuditorClassForClas...
Get an auditor instance for the specified auditor class name. Auditor will use a standalone configuration or context if a non-global configuration / context is requested. If a standalone configuration is requested, the existing global configuration is cloned and used as the base configuration. @param className Class...
[ "Get", "an", "auditor", "instance", "for", "the", "specified", "auditor", "class", "name", ".", "Auditor", "will", "use", "a", "standalone", "configuration", "or", "context", "if", "a", "non", "-", "global", "configuration", "/", "context", "is", "requested", ...
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/AuditorFactory.java#L139-L143
tzaeschke/zoodb
src/org/zoodb/internal/server/index/FreeSpaceManager.java
FreeSpaceManager.initBackingIndexLoad
public void initBackingIndexLoad(IOResourceProvider file, int pageId, int pageCount) { """ Constructor for creating new index. @param file The file @param pageId The page ID of the root page @param pageCount Current number of pages """ if (idx != null) { throw new IllegalStateException(); } //8 byt...
java
public void initBackingIndexLoad(IOResourceProvider file, int pageId, int pageCount) { if (idx != null) { throw new IllegalStateException(); } //8 byte page, 1 byte flag idx = new PagedUniqueLongLong(PAGE_TYPE.FREE_INDEX, file, pageId, 4, 8); lastPage.set(pageCount-1); iter = idx.iterator(1, Long.MAX_VA...
[ "public", "void", "initBackingIndexLoad", "(", "IOResourceProvider", "file", ",", "int", "pageId", ",", "int", "pageCount", ")", "{", "if", "(", "idx", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "//8 byte page, 1 byte ...
Constructor for creating new index. @param file The file @param pageId The page ID of the root page @param pageCount Current number of pages
[ "Constructor", "for", "creating", "new", "index", "." ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/server/index/FreeSpaceManager.java#L103-L111
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTCPCryptoContext.java
SRTCPCryptoContext.processPacketAESCM
public void processPacketAESCM(RawPacket pkt, int index) { """ Perform Counter Mode AES encryption / decryption @param pkt the RTP packet to be encrypted / decrypted """ long ssrc = pkt.getRTCPSSRC(); /* Compute the CM IV (refer to chapter 4.1.1 in RFC 3711): * * k_s XX...
java
public void processPacketAESCM(RawPacket pkt, int index) { long ssrc = pkt.getRTCPSSRC(); /* Compute the CM IV (refer to chapter 4.1.1 in RFC 3711): * * k_s XX XX XX XX XX XX XX XX XX XX XX XX XX XX * SSRC XX XX XX XX * index ...
[ "public", "void", "processPacketAESCM", "(", "RawPacket", "pkt", ",", "int", "index", ")", "{", "long", "ssrc", "=", "pkt", ".", "getRTCPSSRC", "(", ")", ";", "/* Compute the CM IV (refer to chapter 4.1.1 in RFC 3711):\r\n *\r\n * k_s XX XX XX XX XX XX XX XX X...
Perform Counter Mode AES encryption / decryption @param pkt the RTP packet to be encrypted / decrypted
[ "Perform", "Counter", "Mode", "AES", "encryption", "/", "decryption" ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTCPCryptoContext.java#L372-L409
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java
SlingApi.postConfigApacheFelixJettyBasedHttpServiceAsync
public com.squareup.okhttp.Call postConfigApacheFelixJettyBasedHttpServiceAsync(String runmode, Boolean orgApacheFelixHttpsNio, String orgApacheFelixHttpsNioTypeHint, String orgApacheFelixHttpsKeystore, String orgApacheFelixHttpsKeystoreTypeHint, String orgApacheFelixHttpsKeystorePassword, String orgApacheFelixHttpsKey...
java
public com.squareup.okhttp.Call postConfigApacheFelixJettyBasedHttpServiceAsync(String runmode, Boolean orgApacheFelixHttpsNio, String orgApacheFelixHttpsNioTypeHint, String orgApacheFelixHttpsKeystore, String orgApacheFelixHttpsKeystoreTypeHint, String orgApacheFelixHttpsKeystorePassword, String orgApacheFelixHttpsKey...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postConfigApacheFelixJettyBasedHttpServiceAsync", "(", "String", "runmode", ",", "Boolean", "orgApacheFelixHttpsNio", ",", "String", "orgApacheFelixHttpsNioTypeHint", ",", "String", "orgApacheFelixHttpsKeystore", ...
(asynchronously) @param runmode (required) @param orgApacheFelixHttpsNio (optional) @param orgApacheFelixHttpsNioTypeHint (optional) @param orgApacheFelixHttpsKeystore (optional) @param orgApacheFelixHttpsKeystoreTypeHint (optional) @param orgApacheFelixHttpsKeystorePassword (optional) @param orgApacheFelixHttps...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L3112-L3136
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/transport/BaseTransport.java
BaseTransport.addParam
public void addParam(String strParam, boolean bValue) { """ Add this method param to the param list. @param strParam The param name. @param strValue The param value. """ this.addParam(strParam, bValue ? Constants.TRUE : Constants.FALSE); }
java
public void addParam(String strParam, boolean bValue) { this.addParam(strParam, bValue ? Constants.TRUE : Constants.FALSE); }
[ "public", "void", "addParam", "(", "String", "strParam", ",", "boolean", "bValue", ")", "{", "this", ".", "addParam", "(", "strParam", ",", "bValue", "?", "Constants", ".", "TRUE", ":", "Constants", ".", "FALSE", ")", ";", "}" ]
Add this method param to the param list. @param strParam The param name. @param strValue The param value.
[ "Add", "this", "method", "param", "to", "the", "param", "list", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/transport/BaseTransport.java#L101-L104
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LocalNameRangeQuery.java
LocalNameRangeQuery.getUpperTerm
private static Term getUpperTerm(String upperName) { """ Creates a {@link Term} for the upper bound local name. @param upperName the upper bound local name. @return a {@link Term} for the upper bound local name. """ String text; if (upperName == null) { text = "\uFFFF"; ...
java
private static Term getUpperTerm(String upperName) { String text; if (upperName == null) { text = "\uFFFF"; } else { text = upperName; } return new Term(FieldNames.LOCAL_NAME, text); }
[ "private", "static", "Term", "getUpperTerm", "(", "String", "upperName", ")", "{", "String", "text", ";", "if", "(", "upperName", "==", "null", ")", "{", "text", "=", "\"\\uFFFF\"", ";", "}", "else", "{", "text", "=", "upperName", ";", "}", "return", "...
Creates a {@link Term} for the upper bound local name. @param upperName the upper bound local name. @return a {@link Term} for the upper bound local name.
[ "Creates", "a", "{", "@link", "Term", "}", "for", "the", "upper", "bound", "local", "name", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LocalNameRangeQuery.java#L68-L76
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/bigqueryjobs/BigQueryLoadFileSetJob.java
BigQueryLoadFileSetJob.triggerBigQueryLoadJob
private BigQueryLoadJobReference triggerBigQueryLoadJob() { """ Triggers a bigquery load {@link Job} request and returns the job Id for the same. """ Job job = createJob(); // Set up Bigquery Insert try { Insert insert = BigQueryLoadGoogleCloudStorageFilesJob.getBigquery().jobs().in...
java
private BigQueryLoadJobReference triggerBigQueryLoadJob() { Job job = createJob(); // Set up Bigquery Insert try { Insert insert = BigQueryLoadGoogleCloudStorageFilesJob.getBigquery().jobs().insert(projectId, job); Job executedJob = insert.execute(); log.info("Triggered the bigQu...
[ "private", "BigQueryLoadJobReference", "triggerBigQueryLoadJob", "(", ")", "{", "Job", "job", "=", "createJob", "(", ")", ";", "// Set up Bigquery Insert", "try", "{", "Insert", "insert", "=", "BigQueryLoadGoogleCloudStorageFilesJob", ".", "getBigquery", "(", ")", "."...
Triggers a bigquery load {@link Job} request and returns the job Id for the same.
[ "Triggers", "a", "bigquery", "load", "{" ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/bigqueryjobs/BigQueryLoadFileSetJob.java#L54-L67
google/closure-templates
java/src/com/google/template/soy/sharedpasses/render/RenderVisitor.java
RenderVisitor.createHelperInstance
protected RenderVisitor createHelperInstance(Appendable outputBuf, SoyRecord data) { """ Creates a helper instance for rendering a subtemplate. @param outputBuf The Appendable to append the output to. @param data The template data. @return The newly created RenderVisitor instance. """ return new Rende...
java
protected RenderVisitor createHelperInstance(Appendable outputBuf, SoyRecord data) { return new RenderVisitor( evalVisitorFactory, outputBuf, basicTemplates, deltemplates, data, ijData, activeDelPackageSelector, msgBundle, xidRenamingMap, ...
[ "protected", "RenderVisitor", "createHelperInstance", "(", "Appendable", "outputBuf", ",", "SoyRecord", "data", ")", "{", "return", "new", "RenderVisitor", "(", "evalVisitorFactory", ",", "outputBuf", ",", "basicTemplates", ",", "deltemplates", ",", "data", ",", "ij...
Creates a helper instance for rendering a subtemplate. @param outputBuf The Appendable to append the output to. @param data The template data. @return The newly created RenderVisitor instance.
[ "Creates", "a", "helper", "instance", "for", "rendering", "a", "subtemplate", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/sharedpasses/render/RenderVisitor.java#L239-L253
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/config/DefaultSortStrategy.java
DefaultSortStrategy.nextDirection
public SortDirection nextDirection(SortDirection direction) { """ <p> Given a sort direction, get the next sort direction. This implements a simple sort machine that cycles through the sort directions in the following order: <pre> SortDirection.NONE > SortDirection.ASCENDING > SortDirection.DESCENDING > repea...
java
public SortDirection nextDirection(SortDirection direction) { if(direction == SortDirection.NONE) return SortDirection.ASCENDING; else if(direction == SortDirection.ASCENDING) return SortDirection.DESCENDING; else if(direction == SortDirection.DESCENDING) retu...
[ "public", "SortDirection", "nextDirection", "(", "SortDirection", "direction", ")", "{", "if", "(", "direction", "==", "SortDirection", ".", "NONE", ")", "return", "SortDirection", ".", "ASCENDING", ";", "else", "if", "(", "direction", "==", "SortDirection", "."...
<p> Given a sort direction, get the next sort direction. This implements a simple sort machine that cycles through the sort directions in the following order: <pre> SortDirection.NONE > SortDirection.ASCENDING > SortDirection.DESCENDING > repeat </pre> </p> @param direction the current {@link SortDirection} @return th...
[ "<p", ">", "Given", "a", "sort", "direction", "get", "the", "next", "sort", "direction", ".", "This", "implements", "a", "simple", "sort", "machine", "that", "cycles", "through", "the", "sort", "directions", "in", "the", "following", "order", ":", "<pre", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/config/DefaultSortStrategy.java#L60-L68
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java
Structs.newStruct
static Struct newStruct(Map<String, ?> map) { """ Creates a new {@link Struct} object given the content of the provided {@code map} parameter. <p>Notice that all numbers (int, long, float and double) are serialized as double values. Enums are serialized as strings. """ Map<String, Value> valueMap = Map...
java
static Struct newStruct(Map<String, ?> map) { Map<String, Value> valueMap = Maps.transformValues(checkNotNull(map), OBJECT_TO_VALUE); return Struct.newBuilder().putAllFields(valueMap).build(); }
[ "static", "Struct", "newStruct", "(", "Map", "<", "String", ",", "?", ">", "map", ")", "{", "Map", "<", "String", ",", "Value", ">", "valueMap", "=", "Maps", ".", "transformValues", "(", "checkNotNull", "(", "map", ")", ",", "OBJECT_TO_VALUE", ")", ";"...
Creates a new {@link Struct} object given the content of the provided {@code map} parameter. <p>Notice that all numbers (int, long, float and double) are serialized as double values. Enums are serialized as strings.
[ "Creates", "a", "new", "{", "@link", "Struct", "}", "object", "given", "the", "content", "of", "the", "provided", "{", "@code", "map", "}", "parameter", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Structs.java#L118-L121
playn/playn
core/src/playn/core/Surface.java
Surface.drawLine
public Surface drawLine (XY a, XY b, float width) { """ Fills a line between the specified coordinates, of the specified display unit width. """ return drawLine(a.x(), a.y(), b.x(), b.y(), width); }
java
public Surface drawLine (XY a, XY b, float width) { return drawLine(a.x(), a.y(), b.x(), b.y(), width); }
[ "public", "Surface", "drawLine", "(", "XY", "a", ",", "XY", "b", ",", "float", "width", ")", "{", "return", "drawLine", "(", "a", ".", "x", "(", ")", ",", "a", ".", "y", "(", ")", ",", "b", ".", "x", "(", ")", ",", "b", ".", "y", "(", ")"...
Fills a line between the specified coordinates, of the specified display unit width.
[ "Fills", "a", "line", "between", "the", "specified", "coordinates", "of", "the", "specified", "display", "unit", "width", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Surface.java#L346-L348
aws/aws-sdk-java
aws-java-sdk-resourcegroups/src/main/java/com/amazonaws/services/resourcegroups/model/CreateGroupResult.java
CreateGroupResult.withTags
public CreateGroupResult withTags(java.util.Map<String, String> tags) { """ <p> The tags associated with the group. </p> @param tags The tags associated with the group. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this...
java
public CreateGroupResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateGroupResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags associated with the group. </p> @param tags The tags associated with the group. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "associated", "with", "the", "group", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-resourcegroups/src/main/java/com/amazonaws/services/resourcegroups/model/CreateGroupResult.java#L160-L163
google/error-prone-javac
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
Main.processOldJdk
boolean processOldJdk(String jdkHome, Collection<String> classNames) throws IOException { """ Processes named class files from rt.jar of a JDK version 7 or 8. If classNames is empty, processes all classes. @param jdkHome the path to the "home" of the JDK to process @param classNames the names of classes to pr...
java
boolean processOldJdk(String jdkHome, Collection<String> classNames) throws IOException { String RTJAR = jdkHome + "/jre/lib/rt.jar"; String CSJAR = jdkHome + "/jre/lib/charsets.jar"; bootClassPath.add(0, new File(RTJAR)); bootClassPath.add(1, new File(CSJAR)); options.add("-sou...
[ "boolean", "processOldJdk", "(", "String", "jdkHome", ",", "Collection", "<", "String", ">", "classNames", ")", "throws", "IOException", "{", "String", "RTJAR", "=", "jdkHome", "+", "\"/jre/lib/rt.jar\"", ";", "String", "CSJAR", "=", "jdkHome", "+", "\"/jre/lib/...
Processes named class files from rt.jar of a JDK version 7 or 8. If classNames is empty, processes all classes. @param jdkHome the path to the "home" of the JDK to process @param classNames the names of classes to process @return true for success, false for failure @throws IOException if an I/O error occurs
[ "Processes", "named", "class", "files", "from", "rt", ".", "jar", "of", "a", "JDK", "version", "7", "or", "8", ".", "If", "classNames", "is", "empty", "processes", "all", "classes", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java#L300-L314
jparsec/jparsec
jparsec-examples/src/main/java/org/jparsec/examples/common/Strings.java
Strings.prependEach
public static String prependEach(String delim, Iterable<?> objects) { """ Prepends {@code delim} before each object of {@code objects}. """ StringBuilder builder = new StringBuilder(); for (Object obj : objects) { builder.append(delim); builder.append(obj); } return builder.toString...
java
public static String prependEach(String delim, Iterable<?> objects) { StringBuilder builder = new StringBuilder(); for (Object obj : objects) { builder.append(delim); builder.append(obj); } return builder.toString(); }
[ "public", "static", "String", "prependEach", "(", "String", "delim", ",", "Iterable", "<", "?", ">", "objects", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Object", "obj", ":", "objects", ")", "{", "buil...
Prepends {@code delim} before each object of {@code objects}.
[ "Prepends", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec-examples/src/main/java/org/jparsec/examples/common/Strings.java#L28-L35
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/regex/RegExHelper.java
RegExHelper.getAsIdentifier
@Nullable public static String getAsIdentifier (@Nullable final String s, final char cReplacement) { """ Convert an identifier to a programming language identifier by replacing all non-word characters with an underscore. @param s The string to convert. May be <code>null</code> or empty. @param cReplacement...
java
@Nullable public static String getAsIdentifier (@Nullable final String s, final char cReplacement) { if (StringHelper.hasNoText (s)) return s; String sReplacement; if (cReplacement == '$' || cReplacement == '\\') { // These 2 chars must be quoted, otherwise an // StringIndexOutOfB...
[ "@", "Nullable", "public", "static", "String", "getAsIdentifier", "(", "@", "Nullable", "final", "String", "s", ",", "final", "char", "cReplacement", ")", "{", "if", "(", "StringHelper", ".", "hasNoText", "(", "s", ")", ")", "return", "s", ";", "String", ...
Convert an identifier to a programming language identifier by replacing all non-word characters with an underscore. @param s The string to convert. May be <code>null</code> or empty. @param cReplacement The replacement character to be used for all non-identifier characters @return The converted string or <code>null</c...
[ "Convert", "an", "identifier", "to", "a", "programming", "language", "identifier", "by", "replacing", "all", "non", "-", "word", "characters", "with", "an", "underscore", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/regex/RegExHelper.java#L279-L302
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java
GraphPath.removeUntilLast
public boolean removeUntilLast(ST obj, PT pt) { """ Remove the path's elements before the specified one which is starting at the specified point. The specified element will be removed. <p>This function removes until the <i>last occurence</i> of the given object. @param obj is the segment to remove @para...
java
public boolean removeUntilLast(ST obj, PT pt) { return removeUntil(lastIndexOf(obj, pt), true); }
[ "public", "boolean", "removeUntilLast", "(", "ST", "obj", ",", "PT", "pt", ")", "{", "return", "removeUntil", "(", "lastIndexOf", "(", "obj", ",", "pt", ")", ",", "true", ")", ";", "}" ]
Remove the path's elements before the specified one which is starting at the specified point. The specified element will be removed. <p>This function removes until the <i>last occurence</i> of the given object. @param obj is the segment to remove @param pt is the point on which the segment was connected as its first ...
[ "Remove", "the", "path", "s", "elements", "before", "the", "specified", "one", "which", "is", "starting", "at", "the", "specified", "point", ".", "The", "specified", "element", "will", "be", "removed", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java#L709-L711
prestodb/presto
presto-main/src/main/java/com/facebook/presto/metadata/StaticFunctionNamespace.java
StaticFunctionNamespace.isMoreSpecificThan
private boolean isMoreSpecificThan(ApplicableFunction left, ApplicableFunction right) { """ One method is more specific than another if invocation handled by the first method could be passed on to the other one """ List<TypeSignatureProvider> resolvedTypes = fromTypeSignatures(left.getBoundSignature()....
java
private boolean isMoreSpecificThan(ApplicableFunction left, ApplicableFunction right) { List<TypeSignatureProvider> resolvedTypes = fromTypeSignatures(left.getBoundSignature().getArgumentTypes()); Optional<BoundVariables> boundVariables = new SignatureBinder(typeManager, right.getDeclaredSignature()...
[ "private", "boolean", "isMoreSpecificThan", "(", "ApplicableFunction", "left", ",", "ApplicableFunction", "right", ")", "{", "List", "<", "TypeSignatureProvider", ">", "resolvedTypes", "=", "fromTypeSignatures", "(", "left", ".", "getBoundSignature", "(", ")", ".", ...
One method is more specific than another if invocation handled by the first method could be passed on to the other one
[ "One", "method", "is", "more", "specific", "than", "another", "if", "invocation", "handled", "by", "the", "first", "method", "could", "be", "passed", "on", "to", "the", "other", "one" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/metadata/StaticFunctionNamespace.java#L1178-L1184
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/CommandGroup.java
CommandGroup.createButtonStack
public JComponent createButtonStack(final ColumnSpec columnSpec, final RowSpec rowSpec) { """ Create a button stack with buttons for all the commands. @param columnSpec Custom columnSpec for the stack, can be <code>null</code>. @param rowSpec Custom rowspec for each row containing a button can be <code>null<...
java
public JComponent createButtonStack(final ColumnSpec columnSpec, final RowSpec rowSpec) { return createButtonStack(columnSpec, rowSpec, null); }
[ "public", "JComponent", "createButtonStack", "(", "final", "ColumnSpec", "columnSpec", ",", "final", "RowSpec", "rowSpec", ")", "{", "return", "createButtonStack", "(", "columnSpec", ",", "rowSpec", ",", "null", ")", ";", "}" ]
Create a button stack with buttons for all the commands. @param columnSpec Custom columnSpec for the stack, can be <code>null</code>. @param rowSpec Custom rowspec for each row containing a button can be <code>null</code>. @return never null
[ "Create", "a", "button", "stack", "with", "buttons", "for", "all", "the", "commands", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/CommandGroup.java#L521-L523
google/closure-compiler
src/com/google/javascript/jscomp/Es6RewriteModules.java
Es6RewriteModules.maybeAddAliasToSymbolTable
private void maybeAddAliasToSymbolTable(Node n, String module) { """ Add alias nodes to the symbol table as they going to be removed by rewriter. Example aliases: <pre> import * as foo from './foo'; import {doBar} from './bar'; console.log(doBar); </pre> @param n Alias node. In the example above alias ...
java
private void maybeAddAliasToSymbolTable(Node n, String module) { if (preprocessorSymbolTable == null) { return; } n.putBooleanProp(Node.MODULE_ALIAS, true); // Alias can be used in js types. Types have node type STRING and not NAME so we have to // use their name as string. String nodeName...
[ "private", "void", "maybeAddAliasToSymbolTable", "(", "Node", "n", ",", "String", "module", ")", "{", "if", "(", "preprocessorSymbolTable", "==", "null", ")", "{", "return", ";", "}", "n", ".", "putBooleanProp", "(", "Node", ".", "MODULE_ALIAS", ",", "true",...
Add alias nodes to the symbol table as they going to be removed by rewriter. Example aliases: <pre> import * as foo from './foo'; import {doBar} from './bar'; console.log(doBar); </pre> @param n Alias node. In the example above alias nodes are foo, doBar, and doBar. @param module Name of the module currently being p...
[ "Add", "alias", "nodes", "to", "the", "symbol", "table", "as", "they", "going", "to", "be", "removed", "by", "rewriter", ".", "Example", "aliases", ":" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6RewriteModules.java#L953-L968
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/Convolution1DUtils.java
Convolution1DUtils.validateCnn1DKernelStridePadding
public static void validateCnn1DKernelStridePadding(int kernel, int stride, int padding) { """ Perform validation on the CNN layer kernel/stride/padding. Expect int, with values > 0 for kernel size and stride, and values >= 0 for padding. @param kernel Kernel size to check @param stride Stride to check @p...
java
public static void validateCnn1DKernelStridePadding(int kernel, int stride, int padding) { if (kernel <= 0) { throw new IllegalStateException("Invalid kernel size: value must be positive (> 0). Got: " + kernel); } if (stride <= 0) { throw new IllegalStateException("Inval...
[ "public", "static", "void", "validateCnn1DKernelStridePadding", "(", "int", "kernel", ",", "int", "stride", ",", "int", "padding", ")", "{", "if", "(", "kernel", "<=", "0", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Invalid kernel size: value must ...
Perform validation on the CNN layer kernel/stride/padding. Expect int, with values > 0 for kernel size and stride, and values >= 0 for padding. @param kernel Kernel size to check @param stride Stride to check @param padding Padding to check
[ "Perform", "validation", "on", "the", "CNN", "layer", "kernel", "/", "stride", "/", "padding", ".", "Expect", "int", "with", "values", ">", "0", "for", "kernel", "size", "and", "stride", "and", "values", ">", "=", "0", "for", "padding", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/Convolution1DUtils.java#L230-L242
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.writeAttribute
public void writeAttribute(String namespaceURI, String localName, String value) throws Exception { """ Write attribute. @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception """ this.attribute(namespaceURI, localName, value.toString...
java
public void writeAttribute(String namespaceURI, String localName, String value) throws Exception { this.attribute(namespaceURI, localName, value.toString()); }
[ "public", "void", "writeAttribute", "(", "String", "namespaceURI", ",", "String", "localName", ",", "String", "value", ")", "throws", "Exception", "{", "this", ".", "attribute", "(", "namespaceURI", ",", "localName", ",", "value", ".", "toString", "(", ")", ...
Write attribute. @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception
[ "Write", "attribute", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L1694-L1696
rimerosolutions/ant-git-tasks
src/main/java/com/rimerosolutions/ant/git/GitTaskUtils.java
GitTaskUtils.validateRemoteRefUpdates
public static void validateRemoteRefUpdates(String errorPrefix, Collection<RemoteRefUpdate> refUpdates) { """ Check references updates for any errors @param errorPrefix The error prefix for any error message @param refUpdates A collection of remote references updates """ for (RemoteRefUpdat...
java
public static void validateRemoteRefUpdates(String errorPrefix, Collection<RemoteRefUpdate> refUpdates) { for (RemoteRefUpdate refUpdate : refUpdates) { RemoteRefUpdate.Status status = refUpdate.getStatus(); if (status == RemoteRefUpdate.Status.REJECTED_N...
[ "public", "static", "void", "validateRemoteRefUpdates", "(", "String", "errorPrefix", ",", "Collection", "<", "RemoteRefUpdate", ">", "refUpdates", ")", "{", "for", "(", "RemoteRefUpdate", "refUpdate", ":", "refUpdates", ")", "{", "RemoteRefUpdate", ".", "Status", ...
Check references updates for any errors @param errorPrefix The error prefix for any error message @param refUpdates A collection of remote references updates
[ "Check", "references", "updates", "for", "any", "errors" ]
train
https://github.com/rimerosolutions/ant-git-tasks/blob/bfb32fe68afe6b9dcfd0a5194497d748ef3e8a6f/src/main/java/com/rimerosolutions/ant/git/GitTaskUtils.java#L111-L124
tzaeschke/zoodb
src/org/zoodb/internal/query/TypeConverterTools.java
TypeConverterTools.checkAssignability
public static void checkAssignability(Class<?> c1, Class<?> c2) { """ This assumes that comparability implies assignability or convertability... @param c1 type #1 @param c2 type #2 """ COMPARISON_TYPE ct1 = COMPARISON_TYPE.fromClass(c1); COMPARISON_TYPE ct2 = COMPARISON_TYPE.fromClass(c2); try { COM...
java
public static void checkAssignability(Class<?> c1, Class<?> c2) { COMPARISON_TYPE ct1 = COMPARISON_TYPE.fromClass(c1); COMPARISON_TYPE ct2 = COMPARISON_TYPE.fromClass(c2); try { COMPARISON_TYPE.fromOperands(ct1, ct2); } catch (Exception e) { throw DBLogger.newUser("Cannot assign " + c2 + " to " + c1, e); ...
[ "public", "static", "void", "checkAssignability", "(", "Class", "<", "?", ">", "c1", ",", "Class", "<", "?", ">", "c2", ")", "{", "COMPARISON_TYPE", "ct1", "=", "COMPARISON_TYPE", ".", "fromClass", "(", "c1", ")", ";", "COMPARISON_TYPE", "ct2", "=", "COM...
This assumes that comparability implies assignability or convertability... @param c1 type #1 @param c2 type #2
[ "This", "assumes", "that", "comparability", "implies", "assignability", "or", "convertability", "..." ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/query/TypeConverterTools.java#L183-L191
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java
CmsJspContentAccessValueWrapper.createWrapper
public static CmsJspContentAccessValueWrapper createWrapper( CmsObject cms, I_CmsXmlContentValue value, I_CmsXmlDocument content, String valueName, Locale locale) { """ Factory method to create a new XML content value wrapper.<p> In case either parameter is <code>null</co...
java
public static CmsJspContentAccessValueWrapper createWrapper( CmsObject cms, I_CmsXmlContentValue value, I_CmsXmlDocument content, String valueName, Locale locale) { if ((value != null) && (cms != null)) { return new CmsJspContentAccessValueWrapper(cms, value)...
[ "public", "static", "CmsJspContentAccessValueWrapper", "createWrapper", "(", "CmsObject", "cms", ",", "I_CmsXmlContentValue", "value", ",", "I_CmsXmlDocument", "content", ",", "String", "valueName", ",", "Locale", "locale", ")", "{", "if", "(", "(", "value", "!=", ...
Factory method to create a new XML content value wrapper.<p> In case either parameter is <code>null</code>, the {@link #NULL_VALUE_WRAPPER} is returned.<p> @param cms the current users OpenCms context @param value the value to warp @param content the content document, required to set the null value info @param valueN...
[ "Factory", "method", "to", "create", "a", "new", "XML", "content", "value", "wrapper", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java#L419-L437
riversun/d6
src/main/java/org/riversun/d6/core/D6Crud.java
D6Crud.execSelectTable
public <T extends D6Model> T[] execSelectTable(String preparedSql, Object[] searchKeys, Class<T> modelClazz) { """ Execute select statement for the single table. <br> <br> -About SQL<br> You can use prepared SQL.<br> <br> In addition,you can also use non-wildcard ('?') SQL (=raw SQL).In this case searchKeys ...
java
public <T extends D6Model> T[] execSelectTable(String preparedSql, Object[] searchKeys, Class<T> modelClazz) { @SuppressWarnings("unchecked") final Map<Class<?>, List<Object>> result = execSelectTableWithJoin(preparedSql, searchKeys, modelClazz); final List<Object> rowList = result.get(modelClazz); r...
[ "public", "<", "T", "extends", "D6Model", ">", "T", "[", "]", "execSelectTable", "(", "String", "preparedSql", ",", "Object", "[", "]", "searchKeys", ",", "Class", "<", "T", ">", "modelClazz", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", ...
Execute select statement for the single table. <br> <br> -About SQL<br> You can use prepared SQL.<br> <br> In addition,you can also use non-wildcard ('?') SQL (=raw SQL).In this case searchKeys must be null or empty array(size 0 array).<br> When you use a wildcard('?'), you must not include the "'"(=>single quotes) to ...
[ "Execute", "select", "statement", "for", "the", "single", "table", ".", "<br", ">", "<br", ">", "-", "About", "SQL<br", ">", "You", "can", "use", "prepared", "SQL", ".", "<br", ">", "<br", ">", "In", "addition", "you", "can", "also", "use", "non", "-...
train
https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/core/D6Crud.java#L806-L814
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.scoreExamplesMultiDataSet
public <K> JavaPairRDD<K, Double> scoreExamplesMultiDataSet(JavaPairRDD<K, MultiDataSet> data, boolean includeRegularizationTerms) { """ Score the examples individually, using the default batch size {@link #DEFAULT_EVAL_SCORE_BATCH_SIZE}. Unlike {@link #calculateScore(JavaRDD, boolean)}, this ...
java
public <K> JavaPairRDD<K, Double> scoreExamplesMultiDataSet(JavaPairRDD<K, MultiDataSet> data, boolean includeRegularizationTerms) { return scoreExamplesMultiDataSet(data, includeRegularizationTerms, DEFAULT_EVAL_SCORE_BATCH_SIZE); }
[ "public", "<", "K", ">", "JavaPairRDD", "<", "K", ",", "Double", ">", "scoreExamplesMultiDataSet", "(", "JavaPairRDD", "<", "K", ",", "MultiDataSet", ">", "data", ",", "boolean", "includeRegularizationTerms", ")", "{", "return", "scoreExamplesMultiDataSet", "(", ...
Score the examples individually, using the default batch size {@link #DEFAULT_EVAL_SCORE_BATCH_SIZE}. Unlike {@link #calculateScore(JavaRDD, boolean)}, this method returns a score for each example separately<br> Note: The provided JavaPairRDD has a key that is associated with each example and returned score.<br> <b>Not...
[ "Score", "the", "examples", "individually", "using", "the", "default", "batch", "size", "{", "@link", "#DEFAULT_EVAL_SCORE_BATCH_SIZE", "}", ".", "Unlike", "{", "@link", "#calculateScore", "(", "JavaRDD", "boolean", ")", "}", "this", "method", "returns", "a", "s...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L501-L504
openbase/jul
extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/IdentifiableMessage.java
IdentifiableMessage.setMessage
public IdentifiableMessage<KEY, M, MB> setMessage(final M message) throws CouldNotPerformException { """ Updates the message of this instance. @param message the new message. @return the updated message is returned. @throws CouldNotPerformException in thrown in case something went wrong during message pro...
java
public IdentifiableMessage<KEY, M, MB> setMessage(final M message) throws CouldNotPerformException { return setMessage(message, this); }
[ "public", "IdentifiableMessage", "<", "KEY", ",", "M", ",", "MB", ">", "setMessage", "(", "final", "M", "message", ")", "throws", "CouldNotPerformException", "{", "return", "setMessage", "(", "message", ",", "this", ")", ";", "}" ]
Updates the message of this instance. @param message the new message. @return the updated message is returned. @throws CouldNotPerformException in thrown in case something went wrong during message processing. @deprecated since v2.0 and will be removed in v3.0. Please please use setMessage(final M message, final Ob...
[ "Updates", "the", "message", "of", "this", "instance", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/IdentifiableMessage.java#L271-L273
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java
PaymentSession.getPayment
@Nullable public Protos.Payment getPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws IOException, PaymentProtocolException.InvalidNetwork { """ Generates a Payment message based on the information in the PaymentRequest. Provide transactions built by the wa...
java
@Nullable public Protos.Payment getPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws IOException, PaymentProtocolException.InvalidNetwork { if (paymentDetails.hasPaymentUrl()) { for (Transaction tx : txns) if (!tx.getParams()....
[ "@", "Nullable", "public", "Protos", ".", "Payment", "getPayment", "(", "List", "<", "Transaction", ">", "txns", ",", "@", "Nullable", "Address", "refundAddr", ",", "@", "Nullable", "String", "memo", ")", "throws", "IOException", ",", "PaymentProtocolException",...
Generates a Payment message based on the information in the PaymentRequest. Provide transactions built by the wallet. If the PaymentRequest did not specify a payment_url, returns null. @param txns list of transactions to be included with the Payment message. @param refundAddr will be used by the merchant to send money ...
[ "Generates", "a", "Payment", "message", "based", "on", "the", "information", "in", "the", "PaymentRequest", ".", "Provide", "transactions", "built", "by", "the", "wallet", ".", "If", "the", "PaymentRequest", "did", "not", "specify", "a", "payment_url", "returns"...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java#L343-L354
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.biConsumer
public static <T, U> BiConsumer<T, U> biConsumer(CheckedBiConsumer<T, U> consumer, Consumer<Throwable> handler) { """ Wrap a {@link CheckedBiConsumer} in a {@link BiConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> map.forEach(Unchecked.biConsumer( (k, v) -> { if (k == null || ...
java
public static <T, U> BiConsumer<T, U> biConsumer(CheckedBiConsumer<T, U> consumer, Consumer<Throwable> handler) { return (t, u) -> { try { consumer.accept(t, u); } catch (Throwable e) { handler.accept(e); throw new IllegalState...
[ "public", "static", "<", "T", ",", "U", ">", "BiConsumer", "<", "T", ",", "U", ">", "biConsumer", "(", "CheckedBiConsumer", "<", "T", ",", "U", ">", "consumer", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "(", "t", ",", "...
Wrap a {@link CheckedBiConsumer} in a {@link BiConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> map.forEach(Unchecked.biConsumer( (k, v) -> { if (k == null || v == null) throw new Exception("No nulls allowed in map"); }, e -> { throw new IllegalStateException(e); } )); </pre></code>
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L230-L241
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodExecutionException.java
MethodExecutionException.checkExec
public static void checkExec(final boolean condition, final String message, final Object... args) { """ Shortcut to check and throw execution exception. @param condition condition to validate @param message fail message @param args fail message arguments """ if (!condition) { th...
java
public static void checkExec(final boolean condition, final String message, final Object... args) { if (!condition) { throw new MethodExecutionException(String.format(message, args)); } }
[ "public", "static", "void", "checkExec", "(", "final", "boolean", "condition", ",", "final", "String", "message", ",", "final", "Object", "...", "args", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "MethodExecutionException", "(", "String...
Shortcut to check and throw execution exception. @param condition condition to validate @param message fail message @param args fail message arguments
[ "Shortcut", "to", "check", "and", "throw", "execution", "exception", "." ]
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodExecutionException.java#L28-L32
threerings/nenya
core/src/main/java/com/threerings/media/animation/AnimationSequencer.java
AnimationSequencer.startAnimation
protected void startAnimation (Animation anim, long tickStamp) { """ Called when the time comes to start an animation. Derived classes may override this method and pass the animation on to their animation manager and do whatever else they need to do with operating animations. The default implementation simply ad...
java
protected void startAnimation (Animation anim, long tickStamp) { // account for any view scrolling that happened before this animation // was actually added to the view if (_vdx != 0 || _vdy != 0) { anim.viewLocationDidChange(_vdx, _vdy); } _animmgr.registerAnima...
[ "protected", "void", "startAnimation", "(", "Animation", "anim", ",", "long", "tickStamp", ")", "{", "// account for any view scrolling that happened before this animation", "// was actually added to the view", "if", "(", "_vdx", "!=", "0", "||", "_vdy", "!=", "0", ")", ...
Called when the time comes to start an animation. Derived classes may override this method and pass the animation on to their animation manager and do whatever else they need to do with operating animations. The default implementation simply adds them to the media panel supplied when we were constructed. @param anim t...
[ "Called", "when", "the", "time", "comes", "to", "start", "an", "animation", ".", "Derived", "classes", "may", "override", "this", "method", "and", "pass", "the", "animation", "on", "to", "their", "animation", "manager", "and", "do", "whatever", "else", "they...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/animation/AnimationSequencer.java#L189-L198
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.allocate
public void allocate(long size) throws IOException, ServerException { """ Reserve sufficient storage to accommodate the new file to be transferred. @param size the amount of space to reserve @exception ServerException if an error occured. """ Command cmd = new Command("ALLO", String.valueOf(si...
java
public void allocate(long size) throws IOException, ServerException { Command cmd = new Command("ALLO", String.valueOf(size)); Reply reply = null; try { reply = controlChannel.execute(cmd); } catch (UnexpectedReplyCodeException urce) { throw ServerException.embedU...
[ "public", "void", "allocate", "(", "long", "size", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "\"ALLO\"", ",", "String", ".", "valueOf", "(", "size", ")", ")", ";", "Reply", "reply", "=", "nul...
Reserve sufficient storage to accommodate the new file to be transferred. @param size the amount of space to reserve @exception ServerException if an error occured.
[ "Reserve", "sufficient", "storage", "to", "accommodate", "the", "new", "file", "to", "be", "transferred", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1544-L1554
alkacon/opencms-core
src/org/opencms/importexport/CmsImportExportManager.java
CmsImportExportManager.exportData
public void exportData(CmsObject cms, I_CmsImportExportHandler handler, I_CmsReport report) throws CmsConfigurationException, CmsImportExportException, CmsRoleViolationException { """ Checks if the current user has permissions to export Cms data of a specified export handler, and if so, triggers the handler t...
java
public void exportData(CmsObject cms, I_CmsImportExportHandler handler, I_CmsReport report) throws CmsConfigurationException, CmsImportExportException, CmsRoleViolationException { OpenCms.getRoleManager().checkRole(cms, CmsRole.DATABASE_MANAGER); handler.exportData(cms, report); }
[ "public", "void", "exportData", "(", "CmsObject", "cms", ",", "I_CmsImportExportHandler", "handler", ",", "I_CmsReport", "report", ")", "throws", "CmsConfigurationException", ",", "CmsImportExportException", ",", "CmsRoleViolationException", "{", "OpenCms", ".", "getRoleM...
Checks if the current user has permissions to export Cms data of a specified export handler, and if so, triggers the handler to write the export.<p> @param cms the cms context @param handler handler containing the export data @param report the output report @throws CmsRoleViolationException if the current user is not...
[ "Checks", "if", "the", "current", "user", "has", "permissions", "to", "export", "Cms", "data", "of", "a", "specified", "export", "handler", "and", "if", "so", "triggers", "the", "handler", "to", "write", "the", "export", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportExportManager.java#L660-L665
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/util/Contracts.java
Contracts.assertNotEmpty
public static void assertNotEmpty(final String pstring, final String pmessage) { """ check if a string is not empty. @param pstring string to check @param pmessage error message to throw if test fails """ if (pstring == null || pstring.length() == 0) { throw new IllegalArgumentException(pmessage)...
java
public static void assertNotEmpty(final String pstring, final String pmessage) { if (pstring == null || pstring.length() == 0) { throw new IllegalArgumentException(pmessage); } }
[ "public", "static", "void", "assertNotEmpty", "(", "final", "String", "pstring", ",", "final", "String", "pmessage", ")", "{", "if", "(", "pstring", "==", "null", "||", "pstring", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgu...
check if a string is not empty. @param pstring string to check @param pmessage error message to throw if test fails
[ "check", "if", "a", "string", "is", "not", "empty", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/util/Contracts.java#L77-L81
pravega/pravega
segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/SegmentStatsRecorderImpl.java
SegmentStatsRecorderImpl.recordAppend
@Override public void recordAppend(String streamSegmentName, long dataLength, int numOfEvents, Duration elapsed) { """ Updates segment specific aggregates. Then if two minutes have elapsed between last report of aggregates for this segment, send a new update to the monitor. This update to the monitor is pro...
java
@Override public void recordAppend(String streamSegmentName, long dataLength, int numOfEvents, Duration elapsed) { getWriteStreamSegment().reportSuccessEvent(elapsed); DynamicLogger dl = getDynamicLogger(); dl.incCounterValue(globalMetricName(SEGMENT_WRITE_BYTES), dataLength); dl.inc...
[ "@", "Override", "public", "void", "recordAppend", "(", "String", "streamSegmentName", ",", "long", "dataLength", ",", "int", "numOfEvents", ",", "Duration", "elapsed", ")", "{", "getWriteStreamSegment", "(", ")", ".", "reportSuccessEvent", "(", "elapsed", ")", ...
Updates segment specific aggregates. Then if two minutes have elapsed between last report of aggregates for this segment, send a new update to the monitor. This update to the monitor is processed by monitor asynchronously. @param streamSegmentName stream segment name @param dataLength length of data that was wr...
[ "Updates", "segment", "specific", "aggregates", ".", "Then", "if", "two", "minutes", "have", "elapsed", "between", "last", "report", "of", "aggregates", "for", "this", "segment", "send", "a", "new", "update", "to", "the", "monitor", ".", "This", "update", "t...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/SegmentStatsRecorderImpl.java#L191-L215
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsDynamicFunctionBean.java
CmsDynamicFunctionBean.getFormatForContainer
public Format getFormatForContainer(CmsObject cms, String type, int width) { """ Finds the correct format for a given container type and width.<p> @param cms the current CMS context @param type the container type @param width the container width @return the format for the given container type and width ...
java
public Format getFormatForContainer(CmsObject cms, String type, int width) { IdentityHashMap<CmsFormatterBean, Format> formatsByFormatter = new IdentityHashMap<CmsFormatterBean, Format>(); // relate formatters to formats so we can pick the corresponding format after a formatter has been selected ...
[ "public", "Format", "getFormatForContainer", "(", "CmsObject", "cms", ",", "String", "type", ",", "int", "width", ")", "{", "IdentityHashMap", "<", "CmsFormatterBean", ",", "Format", ">", "formatsByFormatter", "=", "new", "IdentityHashMap", "<", "CmsFormatterBean", ...
Finds the correct format for a given container type and width.<p> @param cms the current CMS context @param type the container type @param width the container width @return the format for the given container type and width
[ "Finds", "the", "correct", "format", "for", "a", "given", "container", "type", "and", "width", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsDynamicFunctionBean.java#L228-L247
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.restartWebApps
public void restartWebApps(String resourceGroupName, String name) { """ Restart all apps in an App Service plan. Restart all apps in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @throws IllegalArgumentExcepti...
java
public void restartWebApps(String resourceGroupName, String name) { restartWebAppsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "void", "restartWebApps", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "restartWebAppsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(",...
Restart all apps in an App Service plan. Restart all apps in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the r...
[ "Restart", "all", "apps", "in", "an", "App", "Service", "plan", ".", "Restart", "all", "apps", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L2195-L2197
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.setChromeOptions
private void setChromeOptions(final DesiredCapabilities capabilities, ChromeOptions chromeOptions) { """ Sets the target browser binary path in chromeOptions if it exists in configuration. @param capabilities The global DesiredCapabilities """ // Set custom downloaded file path. When you check c...
java
private void setChromeOptions(final DesiredCapabilities capabilities, ChromeOptions chromeOptions) { // Set custom downloaded file path. When you check content of downloaded file by robot. final HashMap<String, Object> chromePrefs = new HashMap<>(); chromePrefs.put("download.default_directo...
[ "private", "void", "setChromeOptions", "(", "final", "DesiredCapabilities", "capabilities", ",", "ChromeOptions", "chromeOptions", ")", "{", "// Set custom downloaded file path. When you check content of downloaded file by robot.\r", "final", "HashMap", "<", "String", ",", "Objec...
Sets the target browser binary path in chromeOptions if it exists in configuration. @param capabilities The global DesiredCapabilities
[ "Sets", "the", "target", "browser", "binary", "path", "in", "chromeOptions", "if", "it", "exists", "in", "configuration", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L184-L198
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java
ErrorUtils.printErrorMessage
public static String printErrorMessage(String format, String errorMessage, int errorIndex, InputBuffer inputBuffer) { """ Prints an error message showing a location in the given InputBuffer. @param format the format string, must include three placeholders for a s...
java
public static String printErrorMessage(String format, String errorMessage, int errorIndex, InputBuffer inputBuffer) { checkArgNotNull(inputBuffer, "inputBuffer"); return printErrorMessage(format, errorMessage, errorIndex, errorIndex + 1, inputBuffer); }
[ "public", "static", "String", "printErrorMessage", "(", "String", "format", ",", "String", "errorMessage", ",", "int", "errorIndex", ",", "InputBuffer", "inputBuffer", ")", "{", "checkArgNotNull", "(", "inputBuffer", ",", "\"inputBuffer\"", ")", ";", "return", "pr...
Prints an error message showing a location in the given InputBuffer. @param format the format string, must include three placeholders for a string (the error message) and two integers (the error line / column respectively) @param errorMessage the error message @param errorIndex the error location as an index i...
[ "Prints", "an", "error", "message", "showing", "a", "location", "in", "the", "given", "InputBuffer", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java#L132-L136
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTaskBaselines
private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat) { """ Reads baseline values for the current task. @param xmlTask MSPDI task instance @param mpxjTask MPXJ task instance @param durationFormat duration format to use """ for (Project.Tasks.Task.Baseline...
java
private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat) { for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(baseline.getCo...
[ "private", "void", "readTaskBaselines", "(", "Project", ".", "Tasks", ".", "Task", "xmlTask", ",", "Task", "mpxjTask", ",", "TimeUnit", "durationFormat", ")", "{", "for", "(", "Project", ".", "Tasks", ".", "Task", ".", "Baseline", "baseline", ":", "xmlTask",...
Reads baseline values for the current task. @param xmlTask MSPDI task instance @param mpxjTask MPXJ task instance @param durationFormat duration format to use
[ "Reads", "baseline", "values", "for", "the", "current", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1407-L1436
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/jaxp13/Jaxp13XpathEngine.java
Jaxp13XpathEngine.getMatchingNodes
public NodeList getMatchingNodes(String select, Document document) throws XpathException { """ Execute the specified xpath syntax <code>select</code> expression on the specified document and return the list of nodes (could have length zero) that match @param select @param document @return list of matc...
java
public NodeList getMatchingNodes(String select, Document document) throws XpathException { try { return new NodeListForIterable(engine .selectNodes(select, new DOMSource(document)) ...
[ "public", "NodeList", "getMatchingNodes", "(", "String", "select", ",", "Document", "document", ")", "throws", "XpathException", "{", "try", "{", "return", "new", "NodeListForIterable", "(", "engine", ".", "selectNodes", "(", "select", ",", "new", "DOMSource", "...
Execute the specified xpath syntax <code>select</code> expression on the specified document and return the list of nodes (could have length zero) that match @param select @param document @return list of matching nodes
[ "Execute", "the", "specified", "xpath", "syntax", "<code", ">", "select<", "/", "code", ">", "expression", "on", "the", "specified", "document", "and", "return", "the", "list", "of", "nodes", "(", "could", "have", "length", "zero", ")", "that", "match" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/jaxp13/Jaxp13XpathEngine.java#L91-L101
mgormley/optimize
src/main/java/edu/jhu/hlt/util/stats/Multinomials.java
Multinomials.assertLogNormalized
public static void assertLogNormalized(double[] logProps, double delta) { """ Asserts that the parameters are log-normalized within some delta. """ double logPropSum = Vectors.logSum(logProps); assert(Utilities.equals(0.0, logPropSum, delta)); }
java
public static void assertLogNormalized(double[] logProps, double delta) { double logPropSum = Vectors.logSum(logProps); assert(Utilities.equals(0.0, logPropSum, delta)); }
[ "public", "static", "void", "assertLogNormalized", "(", "double", "[", "]", "logProps", ",", "double", "delta", ")", "{", "double", "logPropSum", "=", "Vectors", ".", "logSum", "(", "logProps", ")", ";", "assert", "(", "Utilities", ".", "equals", "(", "0.0...
Asserts that the parameters are log-normalized within some delta.
[ "Asserts", "that", "the", "parameters", "are", "log", "-", "normalized", "within", "some", "delta", "." ]
train
https://github.com/mgormley/optimize/blob/3d1b93260b99febb8a5ecd9e8543c223e151a8d3/src/main/java/edu/jhu/hlt/util/stats/Multinomials.java#L59-L62
pravega/pravega
common/src/main/java/io/pravega/common/LoggerHelpers.java
LoggerHelpers.traceEnterWithContext
public static long traceEnterWithContext(Logger log, String context, String method, Object... args) { """ Traces the fact that a method entry has occurred. @param log The Logger to log to. @param context Identifying context for the operation. For example, this can be used to differentiate between differen...
java
public static long traceEnterWithContext(Logger log, String context, String method, Object... args) { if (!log.isTraceEnabled()) { return 0; } long time = CURRENT_TIME.get(); log.trace("ENTER {}::{}@{} {}.", context, method, time, args); return time; }
[ "public", "static", "long", "traceEnterWithContext", "(", "Logger", "log", ",", "String", "context", ",", "String", "method", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "return", "0", ";", ...
Traces the fact that a method entry has occurred. @param log The Logger to log to. @param context Identifying context for the operation. For example, this can be used to differentiate between different instances of the same object. @param method The name of the method. @param args The arguments to the method. ...
[ "Traces", "the", "fact", "that", "a", "method", "entry", "has", "occurred", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/LoggerHelpers.java#L62-L70
HadoopGenomics/Hadoop-BAM
src/main/java/org/seqdoop/hadoop_bam/BAMInputFormat.java
BAMInputFormat.addProbabilisticSplits
private int addProbabilisticSplits( List<InputSplit> splits, int i, List<InputSplit> newSplits, Configuration cfg) throws IOException { """ file repeatedly and checking addIndexedSplits for an index repeatedly. """ final Path path = ((FileSplit)splits.get(i)).getPath(); try (final SeekableStr...
java
private int addProbabilisticSplits( List<InputSplit> splits, int i, List<InputSplit> newSplits, Configuration cfg) throws IOException { final Path path = ((FileSplit)splits.get(i)).getPath(); try (final SeekableStream sin = WrapSeekable.openPath(path.getFileSystem(cfg), path)) { final BA...
[ "private", "int", "addProbabilisticSplits", "(", "List", "<", "InputSplit", ">", "splits", ",", "int", "i", ",", "List", "<", "InputSplit", ">", "newSplits", ",", "Configuration", "cfg", ")", "throws", "IOException", "{", "final", "Path", "path", "=", "(", ...
file repeatedly and checking addIndexedSplits for an index repeatedly.
[ "file", "repeatedly", "and", "checking", "addIndexedSplits", "for", "an", "index", "repeatedly", "." ]
train
https://github.com/HadoopGenomics/Hadoop-BAM/blob/9f974cf635a8d72f69604021cc3d5f3469d38d2f/src/main/java/org/seqdoop/hadoop_bam/BAMInputFormat.java#L481-L540
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/interfaces/LoopbackAddressInterfaceCriteria.java
LoopbackAddressInterfaceCriteria.isAcceptable
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { """ {@inheritDoc} @return <code>{@link #getAddress()}()</code> if {@link NetworkInterface#isLoopback()} is true, null otherwise. """ try { if( networkInterfa...
java
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { try { if( networkInterface.isLoopback() ) { return getAddress(); } } catch (UnknownHostException e) { // One time only lo...
[ "@", "Override", "protected", "InetAddress", "isAcceptable", "(", "NetworkInterface", "networkInterface", ",", "InetAddress", "address", ")", "throws", "SocketException", "{", "try", "{", "if", "(", "networkInterface", ".", "isLoopback", "(", ")", ")", "{", "retur...
{@inheritDoc} @return <code>{@link #getAddress()}()</code> if {@link NetworkInterface#isLoopback()} is true, null otherwise.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/interfaces/LoopbackAddressInterfaceCriteria.java#L83-L98
ulisesbocchio/spring-boot-security-saml
spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java
KeystoreFactory.addKeyToKeystore
@SneakyThrows public void addKeyToKeystore(KeyStore keyStore, X509Certificate cert, RSAPrivateKey privateKey, String alias, String password) { """ Based on a public certificate, private key, alias and password, this method will load the certificate and private key as an entry into the keystore, and it will se...
java
@SneakyThrows public void addKeyToKeystore(KeyStore keyStore, X509Certificate cert, RSAPrivateKey privateKey, String alias, String password) { KeyStore.PasswordProtection pass = new KeyStore.PasswordProtection(password.toCharArray()); Certificate[] certificateChain = {cert}; keyStore.setEntr...
[ "@", "SneakyThrows", "public", "void", "addKeyToKeystore", "(", "KeyStore", "keyStore", ",", "X509Certificate", "cert", ",", "RSAPrivateKey", "privateKey", ",", "String", "alias", ",", "String", "password", ")", "{", "KeyStore", ".", "PasswordProtection", "pass", ...
Based on a public certificate, private key, alias and password, this method will load the certificate and private key as an entry into the keystore, and it will set the provided alias and password to the keystore entry. @param keyStore @param cert @param privateKey @param alias @param password
[ "Based", "on", "a", "public", "certificate", "private", "key", "alias", "and", "password", "this", "method", "will", "load", "the", "certificate", "and", "private", "key", "as", "an", "entry", "into", "the", "keystore", "and", "it", "will", "set", "the", "...
train
https://github.com/ulisesbocchio/spring-boot-security-saml/blob/63596fe9b4b5504053392b9ee9a925b9a77644d4/spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java#L65-L70
stephenc/java-iso-tools
loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java
AbstractBlockFileSystem.readData
protected final synchronized int readData(final long startPos, final byte[] buffer, final int offset, final int len) throws IOException { """ Read file data, starting at the specified position. @return the number of bytes read into the buffer """ s...
java
protected final synchronized int readData(final long startPos, final byte[] buffer, final int offset, final int len) throws IOException { seek(startPos); return read(buffer, offset, len); }
[ "protected", "final", "synchronized", "int", "readData", "(", "final", "long", "startPos", ",", "final", "byte", "[", "]", "buffer", ",", "final", "int", "offset", ",", "final", "int", "len", ")", "throws", "IOException", "{", "seek", "(", "startPos", ")",...
Read file data, starting at the specified position. @return the number of bytes read into the buffer
[ "Read", "file", "data", "starting", "at", "the", "specified", "position", "." ]
train
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java#L108-L113
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java
CmsMessageBundleEditorOptions.initAddKeyInput
private void initAddKeyInput() { """ Initializes the input field for new keys {@link #m_addKeyInput}. """ //the input field for the key m_addKeyInput = new TextField(); m_addKeyInput.setWidth("100%"); m_addKeyInput.setInputPrompt(m_messages.key(Messages.GUI_INPUT_PROMPT_ADD_KEY...
java
private void initAddKeyInput() { //the input field for the key m_addKeyInput = new TextField(); m_addKeyInput.setWidth("100%"); m_addKeyInput.setInputPrompt(m_messages.key(Messages.GUI_INPUT_PROMPT_ADD_KEY_0)); final ShortcutListener shortCutListener = new ShortcutListener("Add ...
[ "private", "void", "initAddKeyInput", "(", ")", "{", "//the input field for the key", "m_addKeyInput", "=", "new", "TextField", "(", ")", ";", "m_addKeyInput", ".", "setWidth", "(", "\"100%\"", ")", ";", "m_addKeyInput", ".", "setInputPrompt", "(", "m_messages", "...
Initializes the input field for new keys {@link #m_addKeyInput}.
[ "Initializes", "the", "input", "field", "for", "new", "keys", "{" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorOptions.java#L292-L331
aggregateknowledge/java-hll
src/main/java/net/agkn/hll/HLL.java
HLL.initializeStorage
private void initializeStorage(final HLLType type) { """ Initializes storage for the specified {@link HLLType} and changes the instance's {@link #type}. @param type the {@link HLLType} to initialize storage for. This cannot be <code>null</code> and must be an instantiable type. (For instance, it cannot be {@...
java
private void initializeStorage(final HLLType type) { this.type = type; switch(type) { case EMPTY: // nothing to be done break; case EXPLICIT: this.explicitStorage = new LongOpenHashSet(); break; case SPAR...
[ "private", "void", "initializeStorage", "(", "final", "HLLType", "type", ")", "{", "this", ".", "type", "=", "type", ";", "switch", "(", "type", ")", "{", "case", "EMPTY", ":", "// nothing to be done", "break", ";", "case", "EXPLICIT", ":", "this", ".", ...
Initializes storage for the specified {@link HLLType} and changes the instance's {@link #type}. @param type the {@link HLLType} to initialize storage for. This cannot be <code>null</code> and must be an instantiable type. (For instance, it cannot be {@link HLLType#UNDEFINED}.)
[ "Initializes", "storage", "for", "the", "specified", "{", "@link", "HLLType", "}", "and", "changes", "the", "instance", "s", "{", "@link", "#type", "}", "." ]
train
https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/HLL.java#L484-L502
mijecu25/dsa
src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java
LinearSearch.searchLast
public static int searchLast(byte[] byteArray, byte value, int occurrence) { """ Search for the value in the byte array and return the index of the first occurrence from the end of the array. @param byteArray array that we are searching in. @param value value that is being searched in the array. @param occur...
java
public static int searchLast(byte[] byteArray, byte value, int occurrence) { if(occurrence <= 0 || occurrence > byteArray.length) { throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than " + "the array length: " + occurrence); } ...
[ "public", "static", "int", "searchLast", "(", "byte", "[", "]", "byteArray", ",", "byte", "value", ",", "int", "occurrence", ")", "{", "if", "(", "occurrence", "<=", "0", "||", "occurrence", ">", "byteArray", ".", "length", ")", "{", "throw", "new", "I...
Search for the value in the byte array and return the index of the first occurrence from the end of the array. @param byteArray array that we are searching in. @param value value that is being searched in the array. @param occurrence number of times we have seen the value before returning the index. @return the index...
[ "Search", "for", "the", "value", "in", "the", "byte", "array", "and", "return", "the", "index", "of", "the", "first", "occurrence", "from", "the", "end", "of", "the", "array", "." ]
train
https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L1590-L1609