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/ui/components/extensions/CmsGwtDialogExtension.java
CmsGwtDialogExtension.getPublishData
protected CmsPublishData getPublishData(CmsProject project, List<CmsResource> directPublishResources) { """ Gets the publish data for the given resources.<p> @param directPublishResources the resources to publish @param project the project for which to open the dialog @return the publish data for the resour...
java
protected CmsPublishData getPublishData(CmsProject project, List<CmsResource> directPublishResources) { CmsPublishService publishService = new CmsPublishService(); CmsObject cms = A_CmsUI.getCmsObject(); publishService.setCms(cms); List<String> pathList = new ArrayList<String>(); ...
[ "protected", "CmsPublishData", "getPublishData", "(", "CmsProject", "project", ",", "List", "<", "CmsResource", ">", "directPublishResources", ")", "{", "CmsPublishService", "publishService", "=", "new", "CmsPublishService", "(", ")", ";", "CmsObject", "cms", "=", "...
Gets the publish data for the given resources.<p> @param directPublishResources the resources to publish @param project the project for which to open the dialog @return the publish data for the resources
[ "Gets", "the", "publish", "data", "for", "the", "given", "resources", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsGwtDialogExtension.java#L283-L308
lkwg82/enforcer-rules
src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
EnforcerRuleUtils.getModelsRecursively
public List<Model> getModelsRecursively ( String groupId, String artifactId, String version, File pom ) throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException { """ This method loops through all the parents, getting each pom model and then its parent. @param ...
java
public List<Model> getModelsRecursively ( String groupId, String artifactId, String version, File pom ) throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException { List<Model> models = null; Model model = getPomModel( groupId, artifactId, version, pom...
[ "public", "List", "<", "Model", ">", "getModelsRecursively", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "File", "pom", ")", "throws", "ArtifactResolutionException", ",", "ArtifactNotFoundException", ",", "IOException", ",",...
This method loops through all the parents, getting each pom model and then its parent. @param groupId the group id @param artifactId the artifact id @param version the version @param pom the pom @return the models recursively @throws ArtifactResolutionException the artifact resolution exception @throws ArtifactNotFo...
[ "This", "method", "loops", "through", "all", "the", "parents", "getting", "each", "pom", "model", "and", "then", "its", "parent", "." ]
train
https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L237-L273
apache/incubator-gobblin
gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStore.java
SimpleHadoopFilesystemConfigStore.getOwnConfig
@Override public Config getOwnConfig(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { """ Retrieves the {@link Config} for the given {@link ConfigKeyPath} by reading the {@link #MAIN_CONF_FILE_NAME} associated with the dataset specified by the given {@link ConfigKeyPath}. If the {@...
java
@Override public Config getOwnConfig(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { Preconditions.checkNotNull(configKey, "configKey cannot be null!"); Preconditions.checkArgument(!Strings.isNullOrEmpty(version), "version cannot be null or empty!"); Path datasetDir = getDa...
[ "@", "Override", "public", "Config", "getOwnConfig", "(", "ConfigKeyPath", "configKey", ",", "String", "version", ")", "throws", "VersionDoesNotExistException", "{", "Preconditions", ".", "checkNotNull", "(", "configKey", ",", "\"configKey cannot be null!\"", ")", ";", ...
Retrieves the {@link Config} for the given {@link ConfigKeyPath} by reading the {@link #MAIN_CONF_FILE_NAME} associated with the dataset specified by the given {@link ConfigKeyPath}. If the {@link Path} described by the {@link ConfigKeyPath} does not exist then an empty {@link Config} is returned. @param configKey ...
[ "Retrieves", "the", "{", "@link", "Config", "}", "for", "the", "given", "{", "@link", "ConfigKeyPath", "}", "by", "reading", "the", "{", "@link", "#MAIN_CONF_FILE_NAME", "}", "associated", "with", "the", "dataset", "specified", "by", "the", "given", "{", "@l...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStore.java#L345-L368
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.addFriendByName
public boolean addFriendByName(String name, FriendGroup friendGroup) { """ Sends an friend request to an other user. An Riot API key is required for this. @param name The name of the Friend you want to add (case insensitive) @param friendGroup The FriendGroup you want to put this user in. @return True if s...
java
public boolean addFriendByName(String name, FriendGroup friendGroup) { if (getRiotApi() != null) { try { final StringBuilder buf = new StringBuilder(); buf.append("sum"); buf.append(getRiotApi().getSummonerId(name)); buf.append("@pvp.net"); addFriendById(buf.toString(), name, friendGroup); ...
[ "public", "boolean", "addFriendByName", "(", "String", "name", ",", "FriendGroup", "friendGroup", ")", "{", "if", "(", "getRiotApi", "(", ")", "!=", "null", ")", "{", "try", "{", "final", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", ...
Sends an friend request to an other user. An Riot API key is required for this. @param name The name of the Friend you want to add (case insensitive) @param friendGroup The FriendGroup you want to put this user in. @return True if succesful otherwise false.
[ "Sends", "an", "friend", "request", "to", "an", "other", "user", ".", "An", "Riot", "API", "key", "is", "required", "for", "this", "." ]
train
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L266-L281
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java
ConfigurationLoader.getConfiguration
public static CollectorConfiguration getConfiguration(String type) { """ This method returns the collector configuration. @param type The type, or null if default (jvm) @return The collection configuration """ return loadConfig(PropertyUtil.getProperty(HAWKULAR_APM_CONFIG, DEFAULT_URI), type); ...
java
public static CollectorConfiguration getConfiguration(String type) { return loadConfig(PropertyUtil.getProperty(HAWKULAR_APM_CONFIG, DEFAULT_URI), type); }
[ "public", "static", "CollectorConfiguration", "getConfiguration", "(", "String", "type", ")", "{", "return", "loadConfig", "(", "PropertyUtil", ".", "getProperty", "(", "HAWKULAR_APM_CONFIG", ",", "DEFAULT_URI", ")", ",", "type", ")", ";", "}" ]
This method returns the collector configuration. @param type The type, or null if default (jvm) @return The collection configuration
[ "This", "method", "returns", "the", "collector", "configuration", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java#L66-L68
google/closure-compiler
src/com/google/javascript/jscomp/LateEs6ToEs3Converter.java
LateEs6ToEs3Converter.visitMemberFunctionDefInObjectLit
private void visitMemberFunctionDefInObjectLit(Node n, Node parent) { """ Converts a member definition in an object literal to an ES3 key/value pair. Member definitions in classes are handled in {@link Es6RewriteClass}. """ String name = n.getString(); Node nameNode = n.getFirstFirstChild(); Node ...
java
private void visitMemberFunctionDefInObjectLit(Node n, Node parent) { String name = n.getString(); Node nameNode = n.getFirstFirstChild(); Node stringKey = withType(IR.stringKey(name, n.getFirstChild().detach()), n.getJSType()); stringKey.setJSDocInfo(n.getJSDocInfo()); parent.replaceChild(n, string...
[ "private", "void", "visitMemberFunctionDefInObjectLit", "(", "Node", "n", ",", "Node", "parent", ")", "{", "String", "name", "=", "n", ".", "getString", "(", ")", ";", "Node", "nameNode", "=", "n", ".", "getFirstFirstChild", "(", ")", ";", "Node", "stringK...
Converts a member definition in an object literal to an ES3 key/value pair. Member definitions in classes are handled in {@link Es6RewriteClass}.
[ "Converts", "a", "member", "definition", "in", "an", "object", "literal", "to", "an", "ES3", "key", "/", "value", "pair", ".", "Member", "definitions", "in", "classes", "are", "handled", "in", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/LateEs6ToEs3Converter.java#L133-L141
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/TcpConnector.java
TcpConnector.onOpenConnection
@Handler public void onOpenConnection(OpenTcpConnection event) { """ Opens a connection to the end point specified in the event. @param event the event """ try { SocketChannel socketChannel = SocketChannel.open(event.address()); channels.add(new TcpChannelImpl(socketChann...
java
@Handler public void onOpenConnection(OpenTcpConnection event) { try { SocketChannel socketChannel = SocketChannel.open(event.address()); channels.add(new TcpChannelImpl(socketChannel)); } catch (ConnectException e) { fire(new ConnectError(event, "Connection refus...
[ "@", "Handler", "public", "void", "onOpenConnection", "(", "OpenTcpConnection", "event", ")", "{", "try", "{", "SocketChannel", "socketChannel", "=", "SocketChannel", ".", "open", "(", "event", ".", "address", "(", ")", ")", ";", "channels", ".", "add", "(",...
Opens a connection to the end point specified in the event. @param event the event
[ "Opens", "a", "connection", "to", "the", "end", "point", "specified", "in", "the", "event", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/TcpConnector.java#L85-L95
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java
WriteFileExtensions.write2FileWithBuffer
public static void write2FileWithBuffer(final String inputFile, final String outputFile) throws FileNotFoundException, IOException { """ The Method write2FileWithBuffer() copy the content from one file to another. It use a buffer as the name says. @param inputFile The Path to the File and name from the file...
java
public static void write2FileWithBuffer(final String inputFile, final String outputFile) throws FileNotFoundException, IOException { try (InputStream inputStream = StreamExtensions.getInputStream(new File(inputFile)); OutputStream outputStream = StreamExtensions.getOutputStream(new File(outputFile));) { Wr...
[ "public", "static", "void", "write2FileWithBuffer", "(", "final", "String", "inputFile", ",", "final", "String", "outputFile", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "try", "(", "InputStream", "inputStream", "=", "StreamExtensions", ".", "g...
The Method write2FileWithBuffer() copy the content from one file to another. It use a buffer as the name says. @param inputFile The Path to the File and name from the file from where we read. @param outputFile The Path to the File and name from the file from where we want to write. @throws FileNotFoundException is thr...
[ "The", "Method", "write2FileWithBuffer", "()", "copy", "the", "content", "from", "one", "file", "to", "another", ".", "It", "use", "a", "buffer", "as", "the", "name", "says", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java#L160-L168
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.handleScriptException
private void handleScriptException(ScriptWrapper script, Writer writer, Exception exception) { """ Handles exceptions thrown by scripts. <p> The given {@code exception} (if of type {@code ScriptException} the cause will be used instead) will be written to the given {@code writer} and the given {@code script} wi...
java
private void handleScriptException(ScriptWrapper script, Writer writer, Exception exception) { Exception cause = exception; if (cause instanceof ScriptException && cause.getCause() instanceof Exception) { // Dereference one level cause = (Exception) cause.getCause(); } try { writer.append(cause....
[ "private", "void", "handleScriptException", "(", "ScriptWrapper", "script", ",", "Writer", "writer", ",", "Exception", "exception", ")", "{", "Exception", "cause", "=", "exception", ";", "if", "(", "cause", "instanceof", "ScriptException", "&&", "cause", ".", "g...
Handles exceptions thrown by scripts. <p> The given {@code exception} (if of type {@code ScriptException} the cause will be used instead) will be written to the given {@code writer} and the given {@code script} will be disabled and flagged that has an error. @param script the script that resulted in an exception, must...
[ "Handles", "exceptions", "thrown", "by", "scripts", ".", "<p", ">", "The", "given", "{", "@code", "exception", "}", "(", "if", "of", "type", "{", "@code", "ScriptException", "}", "the", "cause", "will", "be", "used", "instead", ")", "will", "be", "writte...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1363-L1376
infinispan/infinispan
atomic-factory/src/main/java/org/infinispan/atomic/AtomicObjectFactory.java
AtomicObjectFactory.disposeInstanceOf
public void disposeInstanceOf(Class<?> clazz, Object key, boolean keepPersistent) throws InvalidCacheUsageException { """ Remove the object stored at <i>key</i>from the local state. If flag <i>keepPersistent</i> is set, a persistent copy of the current state of the object is also stored in the cache. ...
java
public void disposeInstanceOf(Class<?> clazz, Object key, boolean keepPersistent) throws InvalidCacheUsageException { ContainerSignature signature = new ContainerSignature(clazz,key); if (log.isDebugEnabled()) log.debugf("Disposing %s",signature.toString()); Container container; synchr...
[ "public", "void", "disposeInstanceOf", "(", "Class", "<", "?", ">", "clazz", ",", "Object", "key", ",", "boolean", "keepPersistent", ")", "throws", "InvalidCacheUsageException", "{", "ContainerSignature", "signature", "=", "new", "ContainerSignature", "(", "clazz", ...
Remove the object stored at <i>key</i>from the local state. If flag <i>keepPersistent</i> is set, a persistent copy of the current state of the object is also stored in the cache. @param clazz a class object @param key the key to use in order to store the object. @param keepPersistent indicates that a persistent copy ...
[ "Remove", "the", "object", "stored", "at", "<i", ">", "key<", "/", "i", ">", "from", "the", "local", "state", ".", "If", "flag", "<i", ">", "keepPersistent<", "/", "i", ">", "is", "set", "a", "persistent", "copy", "of", "the", "current", "state", "of...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/atomic-factory/src/main/java/org/infinispan/atomic/AtomicObjectFactory.java#L246-L268
ozimov/cirneco
hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/throwable/ExpectedException.java
ExpectedException.exceptionWithMessage
public static Matcher<Throwable> exceptionWithMessage(Class<? extends Throwable> type, String expectedMessage) { """ Creates a matcher for a {@link Throwable} that matches when the provided {@code Throwable} instance is the same or a subtype of the given class and has the same message in the error message or the ...
java
public static Matcher<Throwable> exceptionWithMessage(Class<? extends Throwable> type, String expectedMessage) { return new ExpectedException(type, expectedMessage); }
[ "public", "static", "Matcher", "<", "Throwable", ">", "exceptionWithMessage", "(", "Class", "<", "?", "extends", "Throwable", ">", "type", ",", "String", "expectedMessage", ")", "{", "return", "new", "ExpectedException", "(", "type", ",", "expectedMessage", ")",...
Creates a matcher for a {@link Throwable} that matches when the provided {@code Throwable} instance is the same or a subtype of the given class and has the same message in the error message or the message is contained in the error message
[ "Creates", "a", "matcher", "for", "a", "{" ]
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/throwable/ExpectedException.java#L40-L42
pkiraly/metadata-qa-api
src/main/java/de/gwdg/metadataqa/api/abbreviation/AbbreviationManager.java
AbbreviationManager.getPath
private Path getPath(String fileName) throws IOException, URISyntaxException { """ A get a java.nio.file.Path object from a file name. @param fileName The file name @return The Path object @throws IOException @throws URISyntaxException """ Path path; URL url = getClass().getClassLoader().getR...
java
private Path getPath(String fileName) throws IOException, URISyntaxException { Path path; URL url = getClass().getClassLoader().getResource(fileName); if (url == null) { throw new IOException(String.format("File %s is not existing", fileName)); } URI uri = url.toURI(); Map<String, St...
[ "private", "Path", "getPath", "(", "String", "fileName", ")", "throws", "IOException", ",", "URISyntaxException", "{", "Path", "path", ";", "URL", "url", "=", "getClass", "(", ")", ".", "getClassLoader", "(", ")", ".", "getResource", "(", "fileName", ")", ...
A get a java.nio.file.Path object from a file name. @param fileName The file name @return The Path object @throws IOException @throws URISyntaxException
[ "A", "get", "a", "java", ".", "nio", ".", "file", ".", "Path", "object", "from", "a", "file", "name", "." ]
train
https://github.com/pkiraly/metadata-qa-api/blob/622a69e7c1628ccf64047070817ecfaa68f15b1d/src/main/java/de/gwdg/metadataqa/api/abbreviation/AbbreviationManager.java#L155-L174
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java
DefaultInstalledExtensionRepository.addInstalledExtension
private void addInstalledExtension(DefaultInstalledExtension installedExtension, String namespace) { """ Register a newly installed extension in backward dependencies map. @param installedExtension the installed extension to register @param namespace the namespace """ addCachedExtension(installedEx...
java
private void addInstalledExtension(DefaultInstalledExtension installedExtension, String namespace) { addCachedExtension(installedExtension); boolean isValid = installedExtension.isValid(namespace); // Register the extension in the installed extensions for the provided namespace add...
[ "private", "void", "addInstalledExtension", "(", "DefaultInstalledExtension", "installedExtension", ",", "String", "namespace", ")", "{", "addCachedExtension", "(", "installedExtension", ")", ";", "boolean", "isValid", "=", "installedExtension", ".", "isValid", "(", "na...
Register a newly installed extension in backward dependencies map. @param installedExtension the installed extension to register @param namespace the namespace
[ "Register", "a", "newly", "installed", "extension", "in", "backward", "dependencies", "map", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java#L551-L569
liyiorg/weixin-popular
src/main/java/weixin/popular/api/WxaAPI.java
WxaAPI.modify_domain
public static ModifyDomainResult modify_domain(String access_token,ModifyDomain modifyDomain) { """ 修改服务器地址 @since 2.8.9 @param access_token access_token @param modifyDomain modifyDomain @return result """ String json = JsonUtil.toJSONString(modifyDomain); HttpUriRequest httpUriRequest = RequestBuild...
java
public static ModifyDomainResult modify_domain(String access_token,ModifyDomain modifyDomain){ String json = JsonUtil.toJSONString(modifyDomain); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/wxa/modify_domain") .addParameter(PARAM_ACCESS_TOKEN, A...
[ "public", "static", "ModifyDomainResult", "modify_domain", "(", "String", "access_token", ",", "ModifyDomain", "modifyDomain", ")", "{", "String", "json", "=", "JsonUtil", ".", "toJSONString", "(", "modifyDomain", ")", ";", "HttpUriRequest", "httpUriRequest", "=", "...
修改服务器地址 @since 2.8.9 @param access_token access_token @param modifyDomain modifyDomain @return result
[ "修改服务器地址" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/WxaAPI.java#L64-L73
OpenLiberty/open-liberty
dev/com.ibm.ws.transaction.cdi/src/com/ibm/tx/jta/cdi/interceptors/Required.java
Required.required
@AroundInvoke public Object required(final InvocationContext context) throws Exception { """ <p>If called outside a transaction context, the interceptor must begin a new JTA transaction, the managed bean method execution must then continue inside this transaction context, and the transaction must be complete...
java
@AroundInvoke public Object required(final InvocationContext context) throws Exception { return runUnderUOWManagingEnablement(UOWSynchronizationRegistry.UOW_TYPE_GLOBAL_TRANSACTION, true, context, "REQUIRED"); }
[ "@", "AroundInvoke", "public", "Object", "required", "(", "final", "InvocationContext", "context", ")", "throws", "Exception", "{", "return", "runUnderUOWManagingEnablement", "(", "UOWSynchronizationRegistry", ".", "UOW_TYPE_GLOBAL_TRANSACTION", ",", "true", ",", "context...
<p>If called outside a transaction context, the interceptor must begin a new JTA transaction, the managed bean method execution must then continue inside this transaction context, and the transaction must be completed by the interceptor.</p> <p>If called inside a transaction context, the managed bean method execution m...
[ "<p", ">", "If", "called", "outside", "a", "transaction", "context", "the", "interceptor", "must", "begin", "a", "new", "JTA", "transaction", "the", "managed", "bean", "method", "execution", "must", "then", "continue", "inside", "this", "transaction", "context",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transaction.cdi/src/com/ibm/tx/jta/cdi/interceptors/Required.java#L37-L42
hector-client/hector
object-mapper/src/main/java/me/prettyprint/hom/HectorObjectMapper.java
HectorObjectMapper.getObject
public <T, I> T getObject(Keyspace keyspace, String colFamName, I pkObj) { """ Retrieve columns from cassandra keyspace and column family, instantiate a new object of required type, and then map them to the object's properties. @param <T> @param keyspace @param colFamName @param pkObj @return """ ...
java
public <T, I> T getObject(Keyspace keyspace, String colFamName, I pkObj) { if (null == pkObj) { throw new IllegalArgumentException("object ID cannot be null or empty"); } CFMappingDef<T> cfMapDef = cacheMgr.getCfMapDef(colFamName, true); byte[] colFamKey = generateColumnFamilyKeyFromPkObj(cfMapD...
[ "public", "<", "T", ",", "I", ">", "T", "getObject", "(", "Keyspace", "keyspace", ",", "String", "colFamName", ",", "I", "pkObj", ")", "{", "if", "(", "null", "==", "pkObj", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"object ID cannot be ...
Retrieve columns from cassandra keyspace and column family, instantiate a new object of required type, and then map them to the object's properties. @param <T> @param keyspace @param colFamName @param pkObj @return
[ "Retrieve", "columns", "from", "cassandra", "keyspace", "and", "column", "family", "instantiate", "a", "new", "object", "of", "required", "type", "and", "then", "map", "them", "to", "the", "object", "s", "properties", "." ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/object-mapper/src/main/java/me/prettyprint/hom/HectorObjectMapper.java#L79-L107
abel533/EasyXls
src/main/java/com/github/abel533/easyxls/EasyXls.java
EasyXls.list2Xls
public static boolean list2Xls(ExcelConfig config, List<?> list, String filePath, String fileName) throws Exception { """ 导出list对象到excel @param config 配置 @param list 导出的list @param filePath 保存xls路径 @param fileName 保存xls文件名 @return 处理结果,true成功,false失败 @throws Exception """ return XlsUtil.l...
java
public static boolean list2Xls(ExcelConfig config, List<?> list, String filePath, String fileName) throws Exception { return XlsUtil.list2Xls(config, list, filePath, fileName); }
[ "public", "static", "boolean", "list2Xls", "(", "ExcelConfig", "config", ",", "List", "<", "?", ">", "list", ",", "String", "filePath", ",", "String", "fileName", ")", "throws", "Exception", "{", "return", "XlsUtil", ".", "list2Xls", "(", "config", ",", "l...
导出list对象到excel @param config 配置 @param list 导出的list @param filePath 保存xls路径 @param fileName 保存xls文件名 @return 处理结果,true成功,false失败 @throws Exception
[ "导出list对象到excel" ]
train
https://github.com/abel533/EasyXls/blob/f73be23745c2180d7c0b8f0a510e72e61cc37d5d/src/main/java/com/github/abel533/easyxls/EasyXls.java#L96-L98
apache/incubator-gobblin
gobblin-config-management/gobblin-config-client/src/main/java/org/apache/gobblin/config/client/ConfigClient.java
ConfigClient.getConfig
public Config getConfig(URI configKeyUri) throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException { """ Get the resolved {@link Config} based on the input URI. @param configKeyUri - The URI for the configuration key. There are two types of URI: 1. URI...
java
public Config getConfig(URI configKeyUri) throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException { return getConfig(configKeyUri, Optional.<Config>absent()); }
[ "public", "Config", "getConfig", "(", "URI", "configKeyUri", ")", "throws", "ConfigStoreFactoryDoesNotExistsException", ",", "ConfigStoreCreationException", ",", "VersionDoesNotExistException", "{", "return", "getConfig", "(", "configKeyUri", ",", "Optional", ".", "<", "C...
Get the resolved {@link Config} based on the input URI. @param configKeyUri - The URI for the configuration key. There are two types of URI: 1. URI missing authority and configuration store root , for example "etl-hdfs:///datasets/a1/a2". It will get the configuration based on the default {@link ConfigStore} in etl-h...
[ "Get", "the", "resolved", "{", "@link", "Config", "}", "based", "on", "the", "input", "URI", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-client/src/main/java/org/apache/gobblin/config/client/ConfigClient.java#L118-L121
grails/grails-core
grails-web-common/src/main/groovy/org/grails/web/util/WebUtils.java
WebUtils.toQueryString
@SuppressWarnings("rawtypes") public static String toQueryString(Map params, String encoding) throws UnsupportedEncodingException { """ Converts the given params into a query string started with ? @param params The params @param encoding The encoding to use @return The query string @throws UnsupportedEncod...
java
@SuppressWarnings("rawtypes") public static String toQueryString(Map params, String encoding) throws UnsupportedEncodingException { if (encoding == null) encoding = "UTF-8"; StringBuilder queryString = new StringBuilder("?"); for (Iterator i = params.entrySet().iterator(); i.hasNext();) { ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "String", "toQueryString", "(", "Map", "params", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "encoding", "==", "null", ")", "encoding", "=", "\"U...
Converts the given params into a query string started with ? @param params The params @param encoding The encoding to use @return The query string @throws UnsupportedEncodingException If the given encoding is not supported
[ "Converts", "the", "given", "params", "into", "a", "query", "string", "started", "with", "?" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/util/WebUtils.java#L332-L344
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_ownLogs_id_userLogs_login_DELETE
public String serviceName_ownLogs_id_userLogs_login_DELETE(String serviceName, Long id, String login) throws IOException { """ Delete the userLogs REST: DELETE /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login} @param serviceName [required] The internal name of your hosting @param id [required] Id of th...
java
public String serviceName_ownLogs_id_userLogs_login_DELETE(String serviceName, Long id, String login) throws IOException { String qPath = "/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}"; StringBuilder sb = path(qPath, serviceName, id, login); String resp = exec(qPath, "DELETE", sb.toString(), null); ...
[ "public", "String", "serviceName_ownLogs_id_userLogs_login_DELETE", "(", "String", "serviceName", ",", "Long", "id", ",", "String", "login", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}\"", ";", "Stri...
Delete the userLogs REST: DELETE /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login} @param serviceName [required] The internal name of your hosting @param id [required] Id of the object @param login [required] The userLogs login used to connect to logs.ovh.net
[ "Delete", "the", "userLogs" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1034-L1039
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.addDeserializer
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { """ Adds a new deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" ...
java
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); Contract.requireArgNotNull("deserial...
[ "public", "final", "void", "addDeserializer", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "final", "String", "contentType", ",", "@", "NotNull", "final", "Deserializer", "deserializer", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"t...
Adds a new deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type). @param deserializer Deserializer.
[ "Adds", "a", "new", "deserializer", "to", "the", "registry", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L78-L88
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java
MarkdownParser.computeHeaderId
public static String computeHeaderId(String headerNumber, String headerText) { """ Create the id of a section header. <p>The ID format follows the ReadCarpet standards. @param headerNumber the number of the header, or {@code null}. @param headerText the section header text. @return the identifier. """ ...
java
public static String computeHeaderId(String headerNumber, String headerText) { final String fullText = Strings.emptyIfNull(headerNumber) + " " + Strings.emptyIfNull(headerText); //$NON-NLS-1$ return computeHeaderId(fullText); }
[ "public", "static", "String", "computeHeaderId", "(", "String", "headerNumber", ",", "String", "headerText", ")", "{", "final", "String", "fullText", "=", "Strings", ".", "emptyIfNull", "(", "headerNumber", ")", "+", "\" \"", "+", "Strings", ".", "emptyIfNull", ...
Create the id of a section header. <p>The ID format follows the ReadCarpet standards. @param headerNumber the number of the header, or {@code null}. @param headerText the section header text. @return the identifier.
[ "Create", "the", "id", "of", "a", "section", "header", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java#L878-L881
Netflix/astyanax
astyanax-recipes/src/main/java/com/netflix/astyanax/recipes/locks/OneStepDistributedRowLock.java
OneStepDistributedRowLock.fillReleaseMutation
public void fillReleaseMutation(MutationBatch m, boolean excludeCurrentLock) { """ Fill a mutation that will release the locks. This may be used from a separate recipe to release multiple locks. @param m """ // Add the deletes to the end of the mutation ColumnListMutation<C> row = m.withRow...
java
public void fillReleaseMutation(MutationBatch m, boolean excludeCurrentLock) { // Add the deletes to the end of the mutation ColumnListMutation<C> row = m.withRow(columnFamily, key); for (C c : locksToDelete) { row.deleteColumn(c); } if (!excludeCurrentLock && lockCol...
[ "public", "void", "fillReleaseMutation", "(", "MutationBatch", "m", ",", "boolean", "excludeCurrentLock", ")", "{", "// Add the deletes to the end of the mutation", "ColumnListMutation", "<", "C", ">", "row", "=", "m", ".", "withRow", "(", "columnFamily", ",", "key", ...
Fill a mutation that will release the locks. This may be used from a separate recipe to release multiple locks. @param m
[ "Fill", "a", "mutation", "that", "will", "release", "the", "locks", ".", "This", "may", "be", "used", "from", "a", "separate", "recipe", "to", "release", "multiple", "locks", "." ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-recipes/src/main/java/com/netflix/astyanax/recipes/locks/OneStepDistributedRowLock.java#L441-L451
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.saveVar
public static InsnList saveVar(Variable variable) { """ Pops the stack in to the the local variable table. You may run in to problems if the item on top of the stack isn't of the same type as the variable it's being put in to. @param variable variable within the local variable table to save to @return instructi...
java
public static InsnList saveVar(Variable variable) { Validate.notNull(variable); InsnList ret = new InsnList(); switch (variable.getType().getSort()) { case Type.BOOLEAN: case Type.BYTE: case Type.CHAR: case Type.SHORT: case Type.INT: ...
[ "public", "static", "InsnList", "saveVar", "(", "Variable", "variable", ")", "{", "Validate", ".", "notNull", "(", "variable", ")", ";", "InsnList", "ret", "=", "new", "InsnList", "(", ")", ";", "switch", "(", "variable", ".", "getType", "(", ")", ".", ...
Pops the stack in to the the local variable table. You may run in to problems if the item on top of the stack isn't of the same type as the variable it's being put in to. @param variable variable within the local variable table to save to @return instructions to pop an item off the top of the stack and save it to {@cod...
[ "Pops", "the", "stack", "in", "to", "the", "the", "local", "variable", "table", ".", "You", "may", "run", "in", "to", "problems", "if", "the", "item", "on", "top", "of", "the", "stack", "isn", "t", "of", "the", "same", "type", "as", "the", "variable"...
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L431-L462
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DocumentVersionInfo.java
DocumentVersionInfo.getVersionedFilter
static BsonDocument getVersionedFilter( @Nonnull final BsonValue documentId, @Nullable final BsonValue version ) { """ Returns a query filter for the given document _id and version. The version is allowed to be null. The query will match only if there is either no version on the document in the data...
java
static BsonDocument getVersionedFilter( @Nonnull final BsonValue documentId, @Nullable final BsonValue version ) { final BsonDocument filter = new BsonDocument("_id", documentId); if (version == null) { filter.put(DOCUMENT_VERSION_FIELD, new BsonDocument("$exists", BsonBoolean.FALSE)); }...
[ "static", "BsonDocument", "getVersionedFilter", "(", "@", "Nonnull", "final", "BsonValue", "documentId", ",", "@", "Nullable", "final", "BsonValue", "version", ")", "{", "final", "BsonDocument", "filter", "=", "new", "BsonDocument", "(", "\"_id\"", ",", "documentI...
Returns a query filter for the given document _id and version. The version is allowed to be null. The query will match only if there is either no version on the document in the database in question if we have no reference of the version or if the version matches the database's version. @param documentId the _id of the...
[ "Returns", "a", "query", "filter", "for", "the", "given", "document", "_id", "and", "version", ".", "The", "version", "is", "allowed", "to", "be", "null", ".", "The", "query", "will", "match", "only", "if", "there", "is", "either", "no", "version", "on",...
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DocumentVersionInfo.java#L242-L253
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createLinearRing
public LinearRing createLinearRing(Coordinate[] coordinates) { """ Create a new {@link LinearRing}, given an array of coordinates. @param coordinates An array of {@link Coordinate} objects. This function checks if the array is closed, and does so itself if needed. @return Returns a {@link LinearRing} object....
java
public LinearRing createLinearRing(Coordinate[] coordinates) { if (coordinates == null || coordinates.length == 0) { return new LinearRing(srid, precision); } boolean isClosed = true; if (coordinates.length == 1 || !coordinates[0].equals(coordinates[coordinates.length - 1])) { isClosed = false; } Coo...
[ "public", "LinearRing", "createLinearRing", "(", "Coordinate", "[", "]", "coordinates", ")", "{", "if", "(", "coordinates", "==", "null", "||", "coordinates", ".", "length", "==", "0", ")", "{", "return", "new", "LinearRing", "(", "srid", ",", "precision", ...
Create a new {@link LinearRing}, given an array of coordinates. @param coordinates An array of {@link Coordinate} objects. This function checks if the array is closed, and does so itself if needed. @return Returns a {@link LinearRing} object.
[ "Create", "a", "new", "{", "@link", "LinearRing", "}", "given", "an", "array", "of", "coordinates", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L127-L149
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload/FineUploaderBasic.java
FineUploaderBasic.addParams
@Nonnull public FineUploaderBasic addParams (@Nullable final Map <String, String> aParams) { """ These parameters are sent with the request to the endpoint specified in the action option. @param aParams New parameters to be added. @return this """ m_aRequestParams.addAll (aParams); return this;...
java
@Nonnull public FineUploaderBasic addParams (@Nullable final Map <String, String> aParams) { m_aRequestParams.addAll (aParams); return this; }
[ "@", "Nonnull", "public", "FineUploaderBasic", "addParams", "(", "@", "Nullable", "final", "Map", "<", "String", ",", "String", ">", "aParams", ")", "{", "m_aRequestParams", ".", "addAll", "(", "aParams", ")", ";", "return", "this", ";", "}" ]
These parameters are sent with the request to the endpoint specified in the action option. @param aParams New parameters to be added. @return this
[ "These", "parameters", "are", "sent", "with", "the", "request", "to", "the", "endpoint", "specified", "in", "the", "action", "option", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload/FineUploaderBasic.java#L182-L187
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java
SftpSubsystemChannel.postReadRequest
public UnsignedInteger32 postReadRequest(byte[] handle, long offset, int len) throws SftpStatusException, SshException { """ Post a read request to the server and return the request id; this is used to optimize file downloads. In normal operation the files are transfered by using a synchronous set of requests...
java
public UnsignedInteger32 postReadRequest(byte[] handle, long offset, int len) throws SftpStatusException, SshException { try { UnsignedInteger32 requestId = nextRequestId(); Packet msg = createPacket(); msg.write(SSH_FXP_READ); msg.writeInt(requestId.longValue()); msg.writeBinaryString(handle); m...
[ "public", "UnsignedInteger32", "postReadRequest", "(", "byte", "[", "]", "handle", ",", "long", "offset", ",", "int", "len", ")", "throws", "SftpStatusException", ",", "SshException", "{", "try", "{", "UnsignedInteger32", "requestId", "=", "nextRequestId", "(", ...
Post a read request to the server and return the request id; this is used to optimize file downloads. In normal operation the files are transfered by using a synchronous set of requests, however this slows the download as the client has to wait for the servers response before sending another request. @param handle @pa...
[ "Post", "a", "read", "request", "to", "the", "server", "and", "return", "the", "request", "id", ";", "this", "is", "used", "to", "optimize", "file", "downloads", ".", "In", "normal", "operation", "the", "files", "are", "transfered", "by", "using", "a", "...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java#L1081-L1101
upwork/java-upwork
src/com/Upwork/api/Routers/Reports/Time.java
Time.getByCompany
public JSONObject getByCompany(String company, HashMap<String, String> params) throws JSONException { """ Generating Company Wide Reports @param company Company ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return _getByType(company, null, ...
java
public JSONObject getByCompany(String company, HashMap<String, String> params) throws JSONException { return _getByType(company, null, null, params, false); }
[ "public", "JSONObject", "getByCompany", "(", "String", "company", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "_getByType", "(", "company", ",", "null", ",", "null", ",", "params", ",", "false",...
Generating Company Wide Reports @param company Company ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Generating", "Company", "Wide", "Reports" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Time.java#L118-L120
code4everything/util
src/main/java/com/zhazhapan/util/NetUtils.java
NetUtils.clearCookie
public static boolean clearCookie(Cookie[] cookies, HttpServletResponse response) { """ 清除所有Cookie @param cookies {@link Cookie} @param response {@link HttpServletResponse} @return {@link Boolean} @since 1.0.8 """ if (Checker.isNotEmpty(cookies)) { for (Cookie cookie : cookies) { ...
java
public static boolean clearCookie(Cookie[] cookies, HttpServletResponse response) { if (Checker.isNotEmpty(cookies)) { for (Cookie cookie : cookies) { removeCookie(cookie, response); } return true; } return false; }
[ "public", "static", "boolean", "clearCookie", "(", "Cookie", "[", "]", "cookies", ",", "HttpServletResponse", "response", ")", "{", "if", "(", "Checker", ".", "isNotEmpty", "(", "cookies", ")", ")", "{", "for", "(", "Cookie", "cookie", ":", "cookies", ")",...
清除所有Cookie @param cookies {@link Cookie} @param response {@link HttpServletResponse} @return {@link Boolean} @since 1.0.8
[ "清除所有Cookie" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/NetUtils.java#L497-L505
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.jasper.el/src/org/apache/el/util/ReflectionUtil.java
ReflectionUtil.isCoercibleFrom
private static boolean isCoercibleFrom(EvaluationContext ctx, Object src, Class<?> target) { """ /* This class duplicates code in javax.el.Util. When making changes keep the code in sync. """ // TODO: This isn't pretty but it works. Significant refactoring would // be required to avoid ...
java
private static boolean isCoercibleFrom(EvaluationContext ctx, Object src, Class<?> target) { // TODO: This isn't pretty but it works. Significant refactoring would // be required to avoid the exception. try { ELSupport.coerceToType(ctx, src, target); } catch (ELExceptio...
[ "private", "static", "boolean", "isCoercibleFrom", "(", "EvaluationContext", "ctx", ",", "Object", "src", ",", "Class", "<", "?", ">", "target", ")", "{", "// TODO: This isn't pretty but it works. Significant refactoring would", "// be required to avoid the exception.", ...
/* This class duplicates code in javax.el.Util. When making changes keep the code in sync.
[ "/", "*", "This", "class", "duplicates", "code", "in", "javax", ".", "el", ".", "Util", ".", "When", "making", "changes", "keep", "the", "code", "in", "sync", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.jasper.el/src/org/apache/el/util/ReflectionUtil.java#L401-L410
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfPRow.java
PdfPRow.setExtraHeight
public void setExtraHeight(int cell, float height) { """ Sets an extra height for a cell. @param cell the index of the cell that needs an extra height @param height the extra height @since 2.1.6 """ if (cell < 0 || cell >= cells.length) return; extraHeights[cell] = height; }
java
public void setExtraHeight(int cell, float height) { if (cell < 0 || cell >= cells.length) return; extraHeights[cell] = height; }
[ "public", "void", "setExtraHeight", "(", "int", "cell", ",", "float", "height", ")", "{", "if", "(", "cell", "<", "0", "||", "cell", ">=", "cells", ".", "length", ")", "return", ";", "extraHeights", "[", "cell", "]", "=", "height", ";", "}" ]
Sets an extra height for a cell. @param cell the index of the cell that needs an extra height @param height the extra height @since 2.1.6
[ "Sets", "an", "extra", "height", "for", "a", "cell", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfPRow.java#L169-L173
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseTypeDeclaration
public Decl.Type parseTypeDeclaration(Tuple<Modifier> modifiers) { """ Parse a type declaration in a Whiley source file, which has the form: <pre> "type" Identifier "is" TypePattern ("where" Expr)* </pre> Here, the type pattern specifies a type which may additionally be adorned with variable names. The "w...
java
public Decl.Type parseTypeDeclaration(Tuple<Modifier> modifiers) { int start = index; EnclosingScope scope = new EnclosingScope(); // match(Identifier); // type // Parse type name Identifier name = parseIdentifier(); // Parse templare variables Tuple<Template.Variable> template = parseOptionalTemplate(s...
[ "public", "Decl", ".", "Type", "parseTypeDeclaration", "(", "Tuple", "<", "Modifier", ">", "modifiers", ")", "{", "int", "start", "=", "index", ";", "EnclosingScope", "scope", "=", "new", "EnclosingScope", "(", ")", ";", "//", "match", "(", "Identifier", "...
Parse a type declaration in a Whiley source file, which has the form: <pre> "type" Identifier "is" TypePattern ("where" Expr)* </pre> Here, the type pattern specifies a type which may additionally be adorned with variable names. The "where" clause is optional and is often referred to as the type's "constraint". Varia...
[ "Parse", "a", "type", "declaration", "in", "a", "Whiley", "source", "file", "which", "has", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L466-L483
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.createArtifact
public final Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) { """ Create an artifact from the given values. @param groupId group id. @param artifactId artifact id. @param version version number. @param scope artifact scope. @param type artifact type. @...
java
public final Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) { VersionRange versionRange = null; if (version != null) { versionRange = VersionRange.createFromVersion(version); } String desiredScope = scope; if (Artifact.SCOPE_TEST.equals(desiredScope))...
[ "public", "final", "Artifact", "createArtifact", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "String", "scope", ",", "String", "type", ")", "{", "VersionRange", "versionRange", "=", "null", ";", "if", "(", "version", ...
Create an artifact from the given values. @param groupId group id. @param artifactId artifact id. @param version version number. @param scope artifact scope. @param type artifact type. @return the artifact
[ "Create", "an", "artifact", "from", "the", "given", "values", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L987-L1013
samskivert/samskivert
src/main/java/com/samskivert/util/ArrayUtil.java
ArrayUtil.append
public static <T extends Object> T[] append (T[] values, T value) { """ Creates a new array one larger than the supplied array and with the specified value inserted into the last slot. The type of the values array will be preserved. """ return insert(values, value, values.length); }
java
public static <T extends Object> T[] append (T[] values, T value) { return insert(values, value, values.length); }
[ "public", "static", "<", "T", "extends", "Object", ">", "T", "[", "]", "append", "(", "T", "[", "]", "values", ",", "T", "value", ")", "{", "return", "insert", "(", "values", ",", "value", ",", "values", ".", "length", ")", ";", "}" ]
Creates a new array one larger than the supplied array and with the specified value inserted into the last slot. The type of the values array will be preserved.
[ "Creates", "a", "new", "array", "one", "larger", "than", "the", "supplied", "array", "and", "with", "the", "specified", "value", "inserted", "into", "the", "last", "slot", ".", "The", "type", "of", "the", "values", "array", "will", "be", "preserved", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ArrayUtil.java#L847-L850
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java
CommerceNotificationAttachmentPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the commerce notification attachments where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CommerceNotificationAttachment commerceNotificationAttachmen...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceNotificationAttachment commerceNotificationAttachment : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceNotificationAttachment); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommerceNotificationAttachment", "commerceNotificationAttachment", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".",...
Removes all the commerce notification attachments where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "notification", "attachments", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java#L1433-L1439
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.unescapeXml
public static void unescapeXml(final String text, final Writer writer) throws IOException { """ <p> Perform an XML <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations ...
java
public static void unescapeXml(final String text, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (text == null) { return; } if (text.indexOf('&') < 0...
[ "public", "static", "void", "unescapeXml", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writer' can...
<p> Perform an XML <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> XML 1.0/1.1 unescape of CERs, decimal and hexadecimal references. </p> <p> This ...
[ "<p", ">", "Perform", "an", "XML", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", "p", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L2348-L2366
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.findMidnormalPoint
private static Point findMidnormalPoint(Point center, Point a, Point b, Rect area, int radius) { """ find the middle point of two intersect points in circle,only one point will be correct @param center @param a @param b @param area @param radius @return """ if (a.y == b.y) { //top ...
java
private static Point findMidnormalPoint(Point center, Point a, Point b, Rect area, int radius) { if (a.y == b.y) { //top if (a.y < center.y) { return new Point((a.x + b.x) / 2, center.y + radius); } //bottom return new Point((a.x + b.x)...
[ "private", "static", "Point", "findMidnormalPoint", "(", "Point", "center", ",", "Point", "a", ",", "Point", "b", ",", "Rect", "area", ",", "int", "radius", ")", "{", "if", "(", "a", ".", "y", "==", "b", ".", "y", ")", "{", "//top", "if", "(", "a...
find the middle point of two intersect points in circle,only one point will be correct @param center @param a @param b @param area @param radius @return
[ "find", "the", "middle", "point", "of", "two", "intersect", "points", "in", "circle", "only", "one", "point", "will", "be", "correct" ]
train
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L164-L194
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/server/mvc/RepresentationModelProcessorInvoker.java
RepresentationModelProcessorInvoker.invokeProcessorsFor
private Object invokeProcessorsFor(Object value, ResolvableType type) { """ Invokes all registered {@link RepresentationModelProcessor}s registered for the given {@link ResolvableType}. @param value the object to process @param type @return """ Object currentValue = value; // Process actual value ...
java
private Object invokeProcessorsFor(Object value, ResolvableType type) { Object currentValue = value; // Process actual value for (RepresentationModelProcessorInvoker.ProcessorWrapper wrapper : this.processors) { if (wrapper.supports(type, currentValue)) { currentValue = wrapper.invokeProcessor(currentVal...
[ "private", "Object", "invokeProcessorsFor", "(", "Object", "value", ",", "ResolvableType", "type", ")", "{", "Object", "currentValue", "=", "value", ";", "// Process actual value", "for", "(", "RepresentationModelProcessorInvoker", ".", "ProcessorWrapper", "wrapper", ":...
Invokes all registered {@link RepresentationModelProcessor}s registered for the given {@link ResolvableType}. @param value the object to process @param type @return
[ "Invokes", "all", "registered", "{", "@link", "RepresentationModelProcessor", "}", "s", "registered", "for", "the", "given", "{", "@link", "ResolvableType", "}", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/server/mvc/RepresentationModelProcessorInvoker.java#L152-L164
haifengl/smile
plot/src/main/java/smile/plot/Graphics.java
Graphics.drawTextBaseRatio
public void drawTextBaseRatio(String label, double horizontalReference, double verticalReference, double rotation, double[] coord) { """ Draw a string with given reference point and rotation angle. (0.5, 0.5) is center, (0, 0) is lower left, (1, 0) is upper left, etc. The angle of rotation is in radians. The log...
java
public void drawTextBaseRatio(String label, double horizontalReference, double verticalReference, double rotation, double[] coord) { int[] sc = projection.screenProjectionBaseRatio(coord); int x = sc[0]; int y = sc[1]; AffineTransform transform = g2d.getTransform(); // Corner o...
[ "public", "void", "drawTextBaseRatio", "(", "String", "label", ",", "double", "horizontalReference", ",", "double", "verticalReference", ",", "double", "rotation", ",", "double", "[", "]", "coord", ")", "{", "int", "[", "]", "sc", "=", "projection", ".", "sc...
Draw a string with given reference point and rotation angle. (0.5, 0.5) is center, (0, 0) is lower left, (1, 0) is upper left, etc. The angle of rotation is in radians. The logical are proportional to the base coordinates.
[ "Draw", "a", "string", "with", "given", "reference", "point", "and", "rotation", "angle", ".", "(", "0", ".", "5", "0", ".", "5", ")", "is", "center", "(", "0", "0", ")", "is", "lower", "left", "(", "1", "0", ")", "is", "upper", "left", "etc", ...
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/plot/src/main/java/smile/plot/Graphics.java#L274-L297
fcrepo3/fcrepo
fcrepo-common/src/main/java/org/fcrepo/common/policy/XacmlName.java
XacmlName.looselyMatches
public boolean looselyMatches(String in, boolean tryFirstLocalNameChar) { """ Does the given string loosely match this name? Either: 1) It matches localName (case insensitive) 2) It matches uri (case sensitive) if (firstLocalNameChar == true): 3) It is one character long, and that character matches the first ch...
java
public boolean looselyMatches(String in, boolean tryFirstLocalNameChar) { if (in == null || in.length() == 0) { return false; } if (in.equalsIgnoreCase(localName)) { return true; } if (in.equals(uri)) { return true; } if (tryFir...
[ "public", "boolean", "looselyMatches", "(", "String", "in", ",", "boolean", "tryFirstLocalNameChar", ")", "{", "if", "(", "in", "==", "null", "||", "in", ".", "length", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "if", "(", "in", ".",...
Does the given string loosely match this name? Either: 1) It matches localName (case insensitive) 2) It matches uri (case sensitive) if (firstLocalNameChar == true): 3) It is one character long, and that character matches the first character of localName (case insensitive)
[ "Does", "the", "given", "string", "loosely", "match", "this", "name?", "Either", ":", "1", ")", "It", "matches", "localName", "(", "case", "insensitive", ")", "2", ")", "It", "matches", "uri", "(", "case", "sensitive", ")", "if", "(", "firstLocalNameChar",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/common/policy/XacmlName.java#L66-L83
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsMessageWidget.java
CmsMessageWidget.setIcon
public void setIcon(FontOpenCms icon, String color) { """ Sets the icon CSS class.<p> @param icon the icon @param color the icon color """ if (icon != null) { m_iconCell.setInnerHTML(icon.getHtml(32, color)); } else { m_iconCell.setInnerHTML(""); } }
java
public void setIcon(FontOpenCms icon, String color) { if (icon != null) { m_iconCell.setInnerHTML(icon.getHtml(32, color)); } else { m_iconCell.setInnerHTML(""); } }
[ "public", "void", "setIcon", "(", "FontOpenCms", "icon", ",", "String", "color", ")", "{", "if", "(", "icon", "!=", "null", ")", "{", "m_iconCell", ".", "setInnerHTML", "(", "icon", ".", "getHtml", "(", "32", ",", "color", ")", ")", ";", "}", "else",...
Sets the icon CSS class.<p> @param icon the icon @param color the icon color
[ "Sets", "the", "icon", "CSS", "class", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsMessageWidget.java#L76-L83
b3log/latke
latke-core/src/main/java/org/json/JSONArray.java
JSONArray.optNumber
public Number optNumber(int index, Number defaultValue) { """ Get an optional {@link Number} value associated with a key, or the default if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number ({@link BigDecimal}). This method would b...
java
public Number optNumber(int index, Number defaultValue) { Object val = this.opt(index); if (JSONObject.NULL.equals(val)) { return defaultValue; } if (val instanceof Number){ return (Number) val; } if (val instanceof String) { t...
[ "public", "Number", "optNumber", "(", "int", "index", ",", "Number", "defaultValue", ")", "{", "Object", "val", "=", "this", ".", "opt", "(", "index", ")", ";", "if", "(", "JSONObject", ".", "NULL", ".", "equals", "(", "val", ")", ")", "{", "return",...
Get an optional {@link Number} value associated with a key, or the default if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number ({@link BigDecimal}). This method would be used in cases where type coercion of the number value is unwanted. ...
[ "Get", "an", "optional", "{", "@link", "Number", "}", "value", "associated", "with", "a", "key", "or", "the", "default", "if", "there", "is", "no", "such", "key", "or", "if", "the", "value", "is", "not", "a", "number", ".", "If", "the", "value", "is"...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONArray.java#L818-L835
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getWithLeading
@Nonnull public static String getWithLeading (@Nullable final String sSrc, @Nonnegative final int nMinLen, final char cFront) { """ Get a string that is filled at the beginning with the passed character until the minimum length is reached. If the input string is empty, the result is a string with the provided ...
java
@Nonnull public static String getWithLeading (@Nullable final String sSrc, @Nonnegative final int nMinLen, final char cFront) { return _getWithLeadingOrTrailing (sSrc, nMinLen, cFront, true); }
[ "@", "Nonnull", "public", "static", "String", "getWithLeading", "(", "@", "Nullable", "final", "String", "sSrc", ",", "@", "Nonnegative", "final", "int", "nMinLen", ",", "final", "char", "cFront", ")", "{", "return", "_getWithLeadingOrTrailing", "(", "sSrc", "...
Get a string that is filled at the beginning with the passed character until the minimum length is reached. If the input string is empty, the result is a string with the provided len only consisting of the passed characters. If the input String is longer than the provided length, it is returned unchanged. @param sSrc ...
[ "Get", "a", "string", "that", "is", "filled", "at", "the", "beginning", "with", "the", "passed", "character", "until", "the", "minimum", "length", "is", "reached", ".", "If", "the", "input", "string", "is", "empty", "the", "result", "is", "a", "string", ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L500-L504
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java
ColumnList.getAlias
public String getAlias(SchemaTableTree stt, String column) { """ get an alias if the column is already in the list @param stt @param column @return """ return getAlias(stt.getSchemaTable(), column, stt.getStepDepth()); }
java
public String getAlias(SchemaTableTree stt, String column) { return getAlias(stt.getSchemaTable(), column, stt.getStepDepth()); }
[ "public", "String", "getAlias", "(", "SchemaTableTree", "stt", ",", "String", "column", ")", "{", "return", "getAlias", "(", "stt", ".", "getSchemaTable", "(", ")", ",", "column", ",", "stt", ".", "getStepDepth", "(", ")", ")", ";", "}" ]
get an alias if the column is already in the list @param stt @param column @return
[ "get", "an", "alias", "if", "the", "column", "is", "already", "in", "the", "list" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java#L165-L167
apache/groovy
subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
DateUtilExtensions.copyWith
public static Date copyWith(Date self, Map<Object, Integer> updates) { """ Support creating a new Date having similar properties to an existing Date (which remains unaltered) but with some fields updated according to a Map of changes. <p> Example usage: <pre> import static java.util.Calendar.YEAR def today ...
java
public static Date copyWith(Date self, Map<Object, Integer> updates) { Calendar cal = Calendar.getInstance(); cal.setTime(self); set(cal, updates); return cal.getTime(); }
[ "public", "static", "Date", "copyWith", "(", "Date", "self", ",", "Map", "<", "Object", ",", "Integer", ">", "updates", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "self", ")", ";", "se...
Support creating a new Date having similar properties to an existing Date (which remains unaltered) but with some fields updated according to a Map of changes. <p> Example usage: <pre> import static java.util.Calendar.YEAR def today = new Date() def nextYear = today[YEAR] + 1 def oneYearFromNow = today.copyWith(year: n...
[ "Support", "creating", "a", "new", "Date", "having", "similar", "properties", "to", "an", "existing", "Date", "(", "which", "remains", "unaltered", ")", "but", "with", "some", "fields", "updated", "according", "to", "a", "Map", "of", "changes", ".", "<p", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java#L280-L285
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectMatch
public void expectMatch(String name, String anotherName) { """ Validates to fields to (case-insensitive) match @param name The field to check @param anotherName The field to check against """ expectMatch(name, anotherName, messages.get(Validation.MATCH_KEY.name(), name, anotherName)); }
java
public void expectMatch(String name, String anotherName) { expectMatch(name, anotherName, messages.get(Validation.MATCH_KEY.name(), name, anotherName)); }
[ "public", "void", "expectMatch", "(", "String", "name", ",", "String", "anotherName", ")", "{", "expectMatch", "(", "name", ",", "anotherName", ",", "messages", ".", "get", "(", "Validation", ".", "MATCH_KEY", ".", "name", "(", ")", ",", "name", ",", "an...
Validates to fields to (case-insensitive) match @param name The field to check @param anotherName The field to check against
[ "Validates", "to", "fields", "to", "(", "case", "-", "insensitive", ")", "match" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L197-L199
BBN-E/bue-common-open
gnuplot-util/src/main/java/com/bbn/runjobs/GraphRunJobsDependencies.java
GraphRunJobsDependencies.findExecutableOnSystemPath
private static Optional<File> findExecutableOnSystemPath(final String executableName) { """ warning: this will fail if the user has an escape path separator in a path """ for (final String pathPath : Splitter.on(File.pathSeparator).split(System.getenv("PATH"))) { final File probeFile = new File(pathP...
java
private static Optional<File> findExecutableOnSystemPath(final String executableName) { for (final String pathPath : Splitter.on(File.pathSeparator).split(System.getenv("PATH"))) { final File probeFile = new File(pathPath, executableName); if (probeFile.isFile() && java.nio.file.Files.isExecutable(probe...
[ "private", "static", "Optional", "<", "File", ">", "findExecutableOnSystemPath", "(", "final", "String", "executableName", ")", "{", "for", "(", "final", "String", "pathPath", ":", "Splitter", ".", "on", "(", "File", ".", "pathSeparator", ")", ".", "split", ...
warning: this will fail if the user has an escape path separator in a path
[ "warning", ":", "this", "will", "fail", "if", "the", "user", "has", "an", "escape", "path", "separator", "in", "a", "path" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/gnuplot-util/src/main/java/com/bbn/runjobs/GraphRunJobsDependencies.java#L85-L93
samskivert/samskivert
src/main/java/com/samskivert/util/Collections.java
Collections.getSortedIterator
public static <T extends Comparable<? super T>> Iterator<T> getSortedIterator (Iterable<T> coll) { """ Get an Iterator over the supplied Collection that returns the elements in their natural order. """ return getSortedIterator(coll.iterator(), new Comparator<T>() { public int compare (T o1...
java
public static <T extends Comparable<? super T>> Iterator<T> getSortedIterator (Iterable<T> coll) { return getSortedIterator(coll.iterator(), new Comparator<T>() { public int compare (T o1, T o2) { if (o1 == o2) { // catches null == null return 0; ...
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "Iterator", "<", "T", ">", "getSortedIterator", "(", "Iterable", "<", "T", ">", "coll", ")", "{", "return", "getSortedIterator", "(", "coll", ".", "iterator", "(", ...
Get an Iterator over the supplied Collection that returns the elements in their natural order.
[ "Get", "an", "Iterator", "over", "the", "supplied", "Collection", "that", "returns", "the", "elements", "in", "their", "natural", "order", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Collections.java#L36-L50
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.addElementToNextFreeSlot
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) { """ Add an expression element into the next free child slot @param element an element to be added, must not be null """ if (element == null) { throw new PreprocessorException("[Expression]Element is null", this.s...
java
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) { if (element == null) { throw new PreprocessorException("[Expression]Element is null", this.sourceString, this.includeStack, null); } if (childElements.length == 0) { throw new PreprocessorException("[Expressio...
[ "private", "void", "addElementToNextFreeSlot", "(", "@", "Nonnull", "final", "ExpressionTreeElement", "element", ")", "{", "if", "(", "element", "==", "null", ")", "{", "throw", "new", "PreprocessorException", "(", "\"[Expression]Element is null\"", ",", "this", "."...
Add an expression element into the next free child slot @param element an element to be added, must not be null
[ "Add", "an", "expression", "element", "into", "the", "next", "free", "child", "slot" ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L347-L360
alkacon/opencms-core
src/org/opencms/search/fields/CmsSearchFieldConfiguration.java
CmsSearchFieldConfiguration.getLocaleExtendedName
public static final String getLocaleExtendedName(String lookup, String locale) { """ Returns the locale extended name for the given lookup String.<p> @param lookup the lookup String @param locale the locale @return the locale extended name for the given lookup String """ StringBuffer result = n...
java
public static final String getLocaleExtendedName(String lookup, String locale) { StringBuffer result = new StringBuffer(32); result.append(lookup); result.append('_'); result.append(locale); return result.toString(); }
[ "public", "static", "final", "String", "getLocaleExtendedName", "(", "String", "lookup", ",", "String", "locale", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "32", ")", ";", "result", ".", "append", "(", "lookup", ")", ";", "result",...
Returns the locale extended name for the given lookup String.<p> @param lookup the lookup String @param locale the locale @return the locale extended name for the given lookup String
[ "Returns", "the", "locale", "extended", "name", "for", "the", "given", "lookup", "String", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/fields/CmsSearchFieldConfiguration.java#L111-L118
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java
MutablePropertySources.addAtIndex
private void addAtIndex(int index, PropertySource<?> propertySource) { """ Add the given property source at a particular index in the list. """ removeIfPresent(propertySource); this.propertySourceList.add(index, propertySource); }
java
private void addAtIndex(int index, PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(index, propertySource); }
[ "private", "void", "addAtIndex", "(", "int", "index", ",", "PropertySource", "<", "?", ">", "propertySource", ")", "{", "removeIfPresent", "(", "propertySource", ")", ";", "this", ".", "propertySourceList", ".", "add", "(", "index", ",", "propertySource", ")",...
Add the given property source at a particular index in the list.
[ "Add", "the", "given", "property", "source", "at", "a", "particular", "index", "in", "the", "list", "." ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java#L202-L205
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_domain_domainName_GET
public OvhDomain service_domain_domainName_GET(String service, String domainName) throws IOException { """ Get this object properties REST: GET /email/pro/{service}/domain/{domainName} @param service [required] The internal name of your pro organization @param domainName [required] Domain name API beta ...
java
public OvhDomain service_domain_domainName_GET(String service, String domainName) throws IOException { String qPath = "/email/pro/{service}/domain/{domainName}"; StringBuilder sb = path(qPath, service, domainName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhDomain.class); ...
[ "public", "OvhDomain", "service_domain_domainName_GET", "(", "String", "service", ",", "String", "domainName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/pro/{service}/domain/{domainName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath...
Get this object properties REST: GET /email/pro/{service}/domain/{domainName} @param service [required] The internal name of your pro organization @param domainName [required] Domain name API beta
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L857-L862
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlWriter.java
HtmlWriter.getBody
public HtmlTree getBody(boolean includeScript, String title) { """ Returns an HtmlTree for the BODY tag. @param includeScript set true if printing windowtitle script @param title title for the window @return an HtmlTree for the BODY tag """ HtmlTree body = new HtmlTree(HtmlTag.BODY); // S...
java
public HtmlTree getBody(boolean includeScript, String title) { HtmlTree body = new HtmlTree(HtmlTag.BODY); // Set window title string which is later printed this.winTitle = title; // Don't print windowtitle script for overview-frame, allclasses-frame // and package-frame ...
[ "public", "HtmlTree", "getBody", "(", "boolean", "includeScript", ",", "String", "title", ")", "{", "HtmlTree", "body", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "BODY", ")", ";", "// Set window title string which is later printed", "this", ".", "winTitle", "="...
Returns an HtmlTree for the BODY tag. @param includeScript set true if printing windowtitle script @param title title for the window @return an HtmlTree for the BODY tag
[ "Returns", "an", "HtmlTree", "for", "the", "BODY", "tag", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlWriter.java#L312-L326
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
MethodUtils.invokeMethod
public static Object invokeMethod(final Object object, final String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { """ <p>Invokes a named method without parameters.</p> <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Cl...
java
public static Object invokeMethod(final Object object, final String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeMethod(object, methodName, ArrayUtils.EMPTY_OBJECT_ARRAY, null); }
[ "public", "static", "Object", "invokeMethod", "(", "final", "Object", "object", ",", "final", "String", "methodName", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "return", "invokeMethod", "(", "object", ...
<p>Invokes a named method without parameters.</p> <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> <p>This is a convenient wrapper for {@link #invokeMethod(Object object,String methodName, Object[] args, Class[] parameterTypes)}. </p> @param object invok...
[ "<p", ">", "Invokes", "a", "named", "method", "without", "parameters", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L96-L99
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/WidgetFactory.java
WidgetFactory.createWidgetFromModel
@SuppressWarnings("WeakerAccess") public static Widget createWidgetFromModel(final GVRContext gvrContext, final String modelFile, Class<? extends Widget> widgetClass) throws InstantiationException, IOException { """ Create a {@link Widget} of the specified {@code widgetClass} to wrap th...
java
@SuppressWarnings("WeakerAccess") public static Widget createWidgetFromModel(final GVRContext gvrContext, final String modelFile, Class<? extends Widget> widgetClass) throws InstantiationException, IOException { GVRSceneObject rootNode = loadModel(gvrContext, modelFile); retu...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "static", "Widget", "createWidgetFromModel", "(", "final", "GVRContext", "gvrContext", ",", "final", "String", "modelFile", ",", "Class", "<", "?", "extends", "Widget", ">", "widgetClass", ")", "thro...
Create a {@link Widget} of the specified {@code widgetClass} to wrap the root {@link GVRSceneObject} of the scene graph loaded from a file. @param gvrContext The {@link GVRContext} to load the model into. @param modelFile The asset file to load the model from. @param widgetClass The {@linkplain Class} of the {@code Wi...
[ "Create", "a", "{", "@link", "Widget", "}", "of", "the", "specified", "{", "@code", "widgetClass", "}", "to", "wrap", "the", "root", "{", "@link", "GVRSceneObject", "}", "of", "the", "scene", "graph", "loaded", "from", "a", "file", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/WidgetFactory.java#L178-L184
mozilla/rhino
toolsrc/org/mozilla/javascript/tools/debugger/Main.java
Main.mainEmbedded
public static Main mainEmbedded(ContextFactory factory, Scriptable scope, String title) { """ Entry point for embedded applications. This method attaches to the given {@link ContextFactory} with the given scope. No I/O redirection is perfo...
java
public static Main mainEmbedded(ContextFactory factory, Scriptable scope, String title) { return mainEmbeddedImpl(factory, scope, title); }
[ "public", "static", "Main", "mainEmbedded", "(", "ContextFactory", "factory", ",", "Scriptable", "scope", ",", "String", "title", ")", "{", "return", "mainEmbeddedImpl", "(", "factory", ",", "scope", ",", "title", ")", ";", "}" ]
Entry point for embedded applications. This method attaches to the given {@link ContextFactory} with the given scope. No I/O redirection is performed as with {@link #main(String[])}.
[ "Entry", "point", "for", "embedded", "applications", ".", "This", "method", "attaches", "to", "the", "given", "{" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/toolsrc/org/mozilla/javascript/tools/debugger/Main.java#L251-L255
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_resiliationFollowUp_GET
public OvhResiliationFollowUpDetail packName_resiliationFollowUp_GET(String packName) throws IOException { """ Get information about the ongoing resiliation REST: GET /pack/xdsl/{packName}/resiliationFollowUp @param packName [required] The internal name of your pack """ String qPath = "/pack/xdsl/{packNa...
java
public OvhResiliationFollowUpDetail packName_resiliationFollowUp_GET(String packName) throws IOException { String qPath = "/pack/xdsl/{packName}/resiliationFollowUp"; StringBuilder sb = path(qPath, packName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhResiliationFollowUpDet...
[ "public", "OvhResiliationFollowUpDetail", "packName_resiliationFollowUp_GET", "(", "String", "packName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}/resiliationFollowUp\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Get information about the ongoing resiliation REST: GET /pack/xdsl/{packName}/resiliationFollowUp @param packName [required] The internal name of your pack
[ "Get", "information", "about", "the", "ongoing", "resiliation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L72-L77
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.priorAllocation
public static SlotProfile priorAllocation(ResourceProfile resourceProfile, Collection<AllocationID> priorAllocations) { """ Returns a slot profile for the given resource profile and the prior allocations. @param resourceProfile specifying the slot requirements @param priorAllocations specifying the prior alloc...
java
public static SlotProfile priorAllocation(ResourceProfile resourceProfile, Collection<AllocationID> priorAllocations) { return new SlotProfile(resourceProfile, Collections.emptyList(), priorAllocations); }
[ "public", "static", "SlotProfile", "priorAllocation", "(", "ResourceProfile", "resourceProfile", ",", "Collection", "<", "AllocationID", ">", "priorAllocations", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "Collections", ".", "emptyList", "(...
Returns a slot profile for the given resource profile and the prior allocations. @param resourceProfile specifying the slot requirements @param priorAllocations specifying the prior allocations @return Slot profile with the given resource profile and prior allocations
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "and", "the", "prior", "allocations", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L143-L145
exoplatform/jcr
exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/JCRCommandHelper.java
JCRCommandHelper.createResourceFile
public static Node createResourceFile(Node parentNode, String relPath, Object data, String mimeType) throws Exception { """ creates nt:file node and fills it with incoming data @param parentNode @param relPath @param data @param mimeType @return @throws Exception """ Node file = parentNode...
java
public static Node createResourceFile(Node parentNode, String relPath, Object data, String mimeType) throws Exception { Node file = parentNode.addNode(relPath, "nt:file"); Node contentNode = file.addNode("jcr:content", "nt:resource"); if (data instanceof InputStream) contentNode.se...
[ "public", "static", "Node", "createResourceFile", "(", "Node", "parentNode", ",", "String", "relPath", ",", "Object", "data", ",", "String", "mimeType", ")", "throws", "Exception", "{", "Node", "file", "=", "parentNode", ".", "addNode", "(", "relPath", ",", ...
creates nt:file node and fills it with incoming data @param parentNode @param relPath @param data @param mimeType @return @throws Exception
[ "creates", "nt", ":", "file", "node", "and", "fills", "it", "with", "incoming", "data" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/JCRCommandHelper.java#L49-L69
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/TranscoderService.java
TranscoderService.encodeNum
public static int encodeNum( final long num, final byte[] data, final int beginIndex, final int maxBytes ) { """ Convert a number to bytes (with length of maxBytes) and write bytes into the provided byte[] data starting at the specified beginIndex. @param num the number to encode @param data the byte array ...
java
public static int encodeNum( final long num, final byte[] data, final int beginIndex, final int maxBytes ) { for ( int i = 0; i < maxBytes; i++ ) { final int pos = maxBytes - i - 1; // the position of the byte in the number final int idx = beginIndex + pos; // the index in the data array...
[ "public", "static", "int", "encodeNum", "(", "final", "long", "num", ",", "final", "byte", "[", "]", "data", ",", "final", "int", "beginIndex", ",", "final", "int", "maxBytes", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "maxBytes", ...
Convert a number to bytes (with length of maxBytes) and write bytes into the provided byte[] data starting at the specified beginIndex. @param num the number to encode @param data the byte array into that the number is encoded @param beginIndex the beginning index of data where to start encoding, inclusive. @param max...
[ "Convert", "a", "number", "to", "bytes", "(", "with", "length", "of", "maxBytes", ")", "and", "write", "bytes", "into", "the", "provided", "byte", "[]", "data", "starting", "at", "the", "specified", "beginIndex", "." ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/TranscoderService.java#L500-L507
haraldk/TwelveMonkeys
imageio/imageio-clippath/src/main/java/com/twelvemonkeys/imageio/path/Paths.java
Paths.readClipped
public static BufferedImage readClipped(final ImageInputStream stream) throws IOException { """ Reads the clipping path from the given input stream, if any, and applies it to the first image in the stream. If no path was found, the image is returned without any clipping. Supports PSD, JPEG and TIFF as container...
java
public static BufferedImage readClipped(final ImageInputStream stream) throws IOException { Shape clip = readPath(stream); stream.seek(0); BufferedImage image = ImageIO.read(stream); if (clip == null) { return image; } return applyClippingPath(clip, image);...
[ "public", "static", "BufferedImage", "readClipped", "(", "final", "ImageInputStream", "stream", ")", "throws", "IOException", "{", "Shape", "clip", "=", "readPath", "(", "stream", ")", ";", "stream", ".", "seek", "(", "0", ")", ";", "BufferedImage", "image", ...
Reads the clipping path from the given input stream, if any, and applies it to the first image in the stream. If no path was found, the image is returned without any clipping. Supports PSD, JPEG and TIFF as container formats for Photoshop resources. @param stream the stream to read from, not {@code null} @return the c...
[ "Reads", "the", "clipping", "path", "from", "the", "given", "input", "stream", "if", "any", "and", "applies", "it", "to", "the", "first", "image", "in", "the", "stream", ".", "If", "no", "path", "was", "found", "the", "image", "is", "returned", "without"...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-clippath/src/main/java/com/twelvemonkeys/imageio/path/Paths.java#L244-L255
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/lang/Utils.java
Utils.equalsAnyIgnoreCase
public static boolean equalsAnyIgnoreCase(final String str, final String[] list) { """ 大文字・小文字を無視して、何れかの文字と等しいか。 <pre> Utils.equalsAnyIgnoreCase("abc", null) = false Utils.equalsAnyIgnoreCase("abc", new String[]{}) = false Utils.equalsAnyIgnoreCase(null, new String[]{"abc"}) = false Utils.equalsAnyIgnoreCase(...
java
public static boolean equalsAnyIgnoreCase(final String str, final String[] list) { if(str == null) { return false; } if(list == null || list.length == 0) { return false; } for(String item : list) { if(str.e...
[ "public", "static", "boolean", "equalsAnyIgnoreCase", "(", "final", "String", "str", ",", "final", "String", "[", "]", "list", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "list", "==", "null", "||", "li...
大文字・小文字を無視して、何れかの文字と等しいか。 <pre> Utils.equalsAnyIgnoreCase("abc", null) = false Utils.equalsAnyIgnoreCase("abc", new String[]{}) = false Utils.equalsAnyIgnoreCase(null, new String[]{"abc"}) = false Utils.equalsAnyIgnoreCase("", new String[]{""}) = true </pre> @param str @param list @return
[ "大文字・小文字を無視して、何れかの文字と等しいか。", "<pre", ">", "Utils", ".", "equalsAnyIgnoreCase", "(", "abc", "null", ")", "=", "false", "Utils", ".", "equalsAnyIgnoreCase", "(", "abc", "new", "String", "[]", "{}", ")", "=", "false", "Utils", ".", "equalsAnyIgnoreCase", "(", "nu...
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/lang/Utils.java#L212-L230
SonarSource/sonarqube
sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java
CharsetValidation.tryDecode
public boolean tryDecode(byte[] bytes, @Nullable Charset charset) { """ Tries to use the given charset to decode the byte array. @return true if decoding succeeded, false if there was a decoding error. """ if (charset == null) { return false; } CharsetDecoder decoder = charset.newDecoder() ...
java
public boolean tryDecode(byte[] bytes, @Nullable Charset charset) { if (charset == null) { return false; } CharsetDecoder decoder = charset.newDecoder() .onMalformedInput(CodingErrorAction.REPORT) .onUnmappableCharacter(CodingErrorAction.REPORT); try { decoder.decode(ByteBuffer....
[ "public", "boolean", "tryDecode", "(", "byte", "[", "]", "bytes", ",", "@", "Nullable", "Charset", "charset", ")", "{", "if", "(", "charset", "==", "null", ")", "{", "return", "false", ";", "}", "CharsetDecoder", "decoder", "=", "charset", ".", "newDecod...
Tries to use the given charset to decode the byte array. @return true if decoding succeeded, false if there was a decoding error.
[ "Tries", "to", "use", "the", "given", "charset", "to", "decode", "the", "byte", "array", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java#L248-L262
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java
AbstractLIBORCovarianceModel.getCovariance
public RandomVariableInterface getCovariance(double time, int component1, int component2, RandomVariableInterface[] realizationAtTimeIndex) { """ Returns the instantaneous covariance calculated from factor loadings. @param time The time <i>t</i> at which covariance is requested. @param component1 Index of comp...
java
public RandomVariableInterface getCovariance(double time, int component1, int component2, RandomVariableInterface[] realizationAtTimeIndex) { int timeIndex = timeDiscretization.getTimeIndex(time); if(timeIndex < 0) { timeIndex = Math.abs(timeIndex)-2; } return getCovariance(timeIndex, component1, component2...
[ "public", "RandomVariableInterface", "getCovariance", "(", "double", "time", ",", "int", "component1", ",", "int", "component2", ",", "RandomVariableInterface", "[", "]", "realizationAtTimeIndex", ")", "{", "int", "timeIndex", "=", "timeDiscretization", ".", "getTimeI...
Returns the instantaneous covariance calculated from factor loadings. @param time The time <i>t</i> at which covariance is requested. @param component1 Index of component <i>i</i>. @param component2 Index of component <i>j</i>. @param realizationAtTimeIndex The realization of the stochastic process. @return The insta...
[ "Returns", "the", "instantaneous", "covariance", "calculated", "from", "factor", "loadings", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java#L127-L134
b3dgs/lionengine
lionengine-audio-sc68/src/main/java/com/b3dgs/lionengine/audio/sc68/Sc68Format.java
Sc68Format.loadLibrary
private static Sc68Binding loadLibrary() { """ Load the library. @return The library binding. @throws LionEngineException If error on loading. """ try { Verbose.info("Load library: ", LIBRARY_NAME); final Sc68Binding binding = Native.loadLibrary(LIBRARY_NAME, Sc6...
java
private static Sc68Binding loadLibrary() { try { Verbose.info("Load library: ", LIBRARY_NAME); final Sc68Binding binding = Native.loadLibrary(LIBRARY_NAME, Sc68Binding.class); Verbose.info("Library ", LIBRARY_NAME, " loaded"); return binding; ...
[ "private", "static", "Sc68Binding", "loadLibrary", "(", ")", "{", "try", "{", "Verbose", ".", "info", "(", "\"Load library: \"", ",", "LIBRARY_NAME", ")", ";", "final", "Sc68Binding", "binding", "=", "Native", ".", "loadLibrary", "(", "LIBRARY_NAME", ",", "Sc6...
Load the library. @return The library binding. @throws LionEngineException If error on loading.
[ "Load", "the", "library", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-audio-sc68/src/main/java/com/b3dgs/lionengine/audio/sc68/Sc68Format.java#L77-L90
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java
MapTileCollisionComputer.computeCollision
private CollisionResult computeCollision(CollisionCategory category, double ox, double oy, double x, double y) { """ Compute the collision from current location. @param category The collision category. @param ox The current horizontal location. @param oy The current vertical location. @param x The current ho...
java
private CollisionResult computeCollision(CollisionCategory category, double ox, double oy, double x, double y) { final Tile tile = map.getTileAt(getPositionToSide(ox, x), getPositionToSide(oy, y)); if (tile != null) { final TileCollision tileCollision = tile.getFeature(TileC...
[ "private", "CollisionResult", "computeCollision", "(", "CollisionCategory", "category", ",", "double", "ox", ",", "double", "oy", ",", "double", "x", ",", "double", "y", ")", "{", "final", "Tile", "tile", "=", "map", ".", "getTileAt", "(", "getPositionToSide",...
Compute the collision from current location. @param category The collision category. @param ox The current horizontal location. @param oy The current vertical location. @param x The current horizontal location. @param y The current vertical location. @return The computed collision result, <code>null</code> if none.
[ "Compute", "the", "collision", "from", "current", "location", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java#L271-L289
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.loadScript
public ScriptWrapper loadScript(ScriptWrapper script, Charset charset) throws IOException { """ Loads the script from the file, using the given charset. @param script the ScriptWrapper to be loaded (read script from file). @param charset the charset to use when reading the script from the file. @return the {@...
java
public ScriptWrapper loadScript(ScriptWrapper script, Charset charset) throws IOException { if (script == null) { throw new IllegalArgumentException("Parameter script must not be null."); } if (charset == null) { throw new IllegalArgumentException("Parameter charset must not be null."); } script....
[ "public", "ScriptWrapper", "loadScript", "(", "ScriptWrapper", "script", ",", "Charset", "charset", ")", "throws", "IOException", "{", "if", "(", "script", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter script must not be null.\"...
Loads the script from the file, using the given charset. @param script the ScriptWrapper to be loaded (read script from file). @param charset the charset to use when reading the script from the file. @return the {@code ScriptWrapper} with the actual script read from the file. @throws IOException if an error occurred w...
[ "Loads", "the", "script", "from", "the", "file", "using", "the", "given", "charset", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1155-L1170
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayMath.java
NDArrayMath.vectorsPerSlice
public static long vectorsPerSlice(INDArray arr, int... rank) { """ The number of vectors in each slice of an ndarray. @param arr the array to get the number of vectors per slice for @param rank the dimensions to get the number of vectors per slice for @return the number of vectors per slice """ ...
java
public static long vectorsPerSlice(INDArray arr, int... rank) { if (arr.rank() > 2) { return arr.size(-2) * arr.size(-1); } return arr.size(-1); }
[ "public", "static", "long", "vectorsPerSlice", "(", "INDArray", "arr", ",", "int", "...", "rank", ")", "{", "if", "(", "arr", ".", "rank", "(", ")", ">", "2", ")", "{", "return", "arr", ".", "size", "(", "-", "2", ")", "*", "arr", ".", "size", ...
The number of vectors in each slice of an ndarray. @param arr the array to get the number of vectors per slice for @param rank the dimensions to get the number of vectors per slice for @return the number of vectors per slice
[ "The", "number", "of", "vectors", "in", "each", "slice", "of", "an", "ndarray", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayMath.java#L144-L151
jenkinsci/github-plugin
src/main/java/org/jenkinsci/plugins/github/status/sources/misc/BetterThanOrEqualBuildResult.java
BetterThanOrEqualBuildResult.betterThanOrEqualTo
public static BetterThanOrEqualBuildResult betterThanOrEqualTo(Result result, GHCommitState state, String msg) { """ Convenient way to reuse logic of checking for the build status @param result to check against @param state state to set @param msg message to set. Can contain env vars @return new instan...
java
public static BetterThanOrEqualBuildResult betterThanOrEqualTo(Result result, GHCommitState state, String msg) { BetterThanOrEqualBuildResult conditional = new BetterThanOrEqualBuildResult(); conditional.setResult(result.toString()); conditional.setState(state.name()); conditional.setMes...
[ "public", "static", "BetterThanOrEqualBuildResult", "betterThanOrEqualTo", "(", "Result", "result", ",", "GHCommitState", "state", ",", "String", "msg", ")", "{", "BetterThanOrEqualBuildResult", "conditional", "=", "new", "BetterThanOrEqualBuildResult", "(", ")", ";", "...
Convenient way to reuse logic of checking for the build status @param result to check against @param state state to set @param msg message to set. Can contain env vars @return new instance of this conditional result
[ "Convenient", "way", "to", "reuse", "logic", "of", "checking", "for", "the", "build", "status" ]
train
https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/org/jenkinsci/plugins/github/status/sources/misc/BetterThanOrEqualBuildResult.java#L61-L67
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalBuilder.java
CrystalBuilder.expandNcsOps
public static void expandNcsOps(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) { """ Apply the NCS operators in the given Structure adding new chains as needed. All chains are (re)assigned ids of the form: original_chain_id+ncs_operator_index+{@value #NCS_CHAINID_SUFFIX_...
java
public static void expandNcsOps(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) { PDBCrystallographicInfo xtalInfo = structure.getCrystallographicInfo(); if (xtalInfo ==null) return; if (xtalInfo.getNcsOperators()==null || xtalInfo.getNcsOperators().length==0) return;...
[ "public", "static", "void", "expandNcsOps", "(", "Structure", "structure", ",", "Map", "<", "String", ",", "String", ">", "chainOrigNames", ",", "Map", "<", "String", ",", "Matrix4d", ">", "chainNcsOps", ")", "{", "PDBCrystallographicInfo", "xtalInfo", "=", "s...
Apply the NCS operators in the given Structure adding new chains as needed. All chains are (re)assigned ids of the form: original_chain_id+ncs_operator_index+{@value #NCS_CHAINID_SUFFIX_CHAR}. @param structure the structure to expand @param chainOrigNames new chain names mapped to the original chain names @param chainN...
[ "Apply", "the", "NCS", "operators", "in", "the", "given", "Structure", "adding", "new", "chains", "as", "needed", ".", "All", "chains", "are", "(", "re", ")", "assigned", "ids", "of", "the", "form", ":", "original_chain_id", "+", "ncs_operator_index", "+", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalBuilder.java#L569-L611
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/thirdparty/DateUtils.java
DateUtils.rollYears
public static java.sql.Date rollYears(java.util.Date startDate, int years) { """ Roll the years forward or backward. @param startDate - The start date @param years - Negative to rollbackwards. """ return rollDate(startDate, Calendar.YEAR, years); }
java
public static java.sql.Date rollYears(java.util.Date startDate, int years) { return rollDate(startDate, Calendar.YEAR, years); }
[ "public", "static", "java", ".", "sql", ".", "Date", "rollYears", "(", "java", ".", "util", ".", "Date", "startDate", ",", "int", "years", ")", "{", "return", "rollDate", "(", "startDate", ",", "Calendar", ".", "YEAR", ",", "years", ")", ";", "}" ]
Roll the years forward or backward. @param startDate - The start date @param years - Negative to rollbackwards.
[ "Roll", "the", "years", "forward", "or", "backward", "." ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/thirdparty/DateUtils.java#L182-L184
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/helper/BaseAdsServiceClientFactoryHelper.java
BaseAdsServiceClientFactoryHelper.createServiceDescriptor
@Override public D createServiceDescriptor(Class<?> interfaceClass, String version) { """ Creates an {@link AdsServiceDescriptor} for a specified service. @param interfaceClass the ads service that we want a descriptor for @param version the version of the service @return a descriptor of the requested servi...
java
@Override public D createServiceDescriptor(Class<?> interfaceClass, String version) { return adsServiceDescriptorFactory.create(interfaceClass, version); }
[ "@", "Override", "public", "D", "createServiceDescriptor", "(", "Class", "<", "?", ">", "interfaceClass", ",", "String", "version", ")", "{", "return", "adsServiceDescriptorFactory", ".", "create", "(", "interfaceClass", ",", "version", ")", ";", "}" ]
Creates an {@link AdsServiceDescriptor} for a specified service. @param interfaceClass the ads service that we want a descriptor for @param version the version of the service @return a descriptor of the requested service
[ "Creates", "an", "{", "@link", "AdsServiceDescriptor", "}", "for", "a", "specified", "service", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/helper/BaseAdsServiceClientFactoryHelper.java#L96-L99
puniverse/capsule
capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java
Jar.addEntry
public Jar addEntry(String path, InputStream is) throws IOException { """ Adds an entry to this JAR. @param path the entry's path within the JAR @param is the entry's content @return {@code this} """ beginWriting(); addEntry(jos, path, is); return this; }
java
public Jar addEntry(String path, InputStream is) throws IOException { beginWriting(); addEntry(jos, path, is); return this; }
[ "public", "Jar", "addEntry", "(", "String", "path", ",", "InputStream", "is", ")", "throws", "IOException", "{", "beginWriting", "(", ")", ";", "addEntry", "(", "jos", ",", "path", ",", "is", ")", ";", "return", "this", ";", "}" ]
Adds an entry to this JAR. @param path the entry's path within the JAR @param is the entry's content @return {@code this}
[ "Adds", "an", "entry", "to", "this", "JAR", "." ]
train
https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L295-L299
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/codec/HexUtils.java
HexUtils.bytesToHex
public static final String bytesToHex(byte[] bs, int off, int length) { """ Converts a byte array into a string of lower case hex chars. @param bs A byte array @param off The index of the first byte to read @param length The number of bytes to read. @return the string of hex chars. """ if ...
java
public static final String bytesToHex(byte[] bs, int off, int length) { if (bs.length <= off || bs.length < off + length) throw new IllegalArgumentException(); StringBuilder sb = new StringBuilder(length * 2); bytesToHexAppend(bs, off, length, sb); return sb.toString(); }
[ "public", "static", "final", "String", "bytesToHex", "(", "byte", "[", "]", "bs", ",", "int", "off", ",", "int", "length", ")", "{", "if", "(", "bs", ".", "length", "<=", "off", "||", "bs", ".", "length", "<", "off", "+", "length", ")", "throw", ...
Converts a byte array into a string of lower case hex chars. @param bs A byte array @param off The index of the first byte to read @param length The number of bytes to read. @return the string of hex chars.
[ "Converts", "a", "byte", "array", "into", "a", "string", "of", "lower", "case", "hex", "chars", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/codec/HexUtils.java#L19-L25
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringGrabber.java
StringGrabber.insertRepeat
public StringGrabber insertRepeat(String str, int repeatCount) { """ Append a string to be repeated into head @see StringGrabber#insertRepeat(String); @param str @param repeatCount @return """ for (int i = 0; i < repeatCount; i++) { insertIntoHead(str); } return StringGrabber.this; }
java
public StringGrabber insertRepeat(String str, int repeatCount) { for (int i = 0; i < repeatCount; i++) { insertIntoHead(str); } return StringGrabber.this; }
[ "public", "StringGrabber", "insertRepeat", "(", "String", "str", ",", "int", "repeatCount", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "repeatCount", ";", "i", "++", ")", "{", "insertIntoHead", "(", "str", ")", ";", "}", "return", "St...
Append a string to be repeated into head @see StringGrabber#insertRepeat(String); @param str @param repeatCount @return
[ "Append", "a", "string", "to", "be", "repeated", "into", "head" ]
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringGrabber.java#L586-L591
Dynatrace/OneAgent-SDK-for-Java
samples/webrequest/src/main/java/com/dynatrace/oneagent/sdk/samples/webrequest/FakedWebserver.java
FakedWebserver.serve
private void serve(HttpRequest request, HttpResponse response) { """ faked http request handling. shows usage of OneAgent SDK's incoming webrequest API """ String url = request.getUri(); System.out.println("[Server] serve " + url); IncomingWebRequestTracer incomingWebrequestTracer = oneAgentSDK.traceInco...
java
private void serve(HttpRequest request, HttpResponse response) { String url = request.getUri(); System.out.println("[Server] serve " + url); IncomingWebRequestTracer incomingWebrequestTracer = oneAgentSDK.traceIncomingWebRequest(webAppInfo, url, request.getMethod()); // add request header, parameter and remote...
[ "private", "void", "serve", "(", "HttpRequest", "request", ",", "HttpResponse", "response", ")", "{", "String", "url", "=", "request", ".", "getUri", "(", ")", ";", "System", ".", "out", ".", "println", "(", "\"[Server] serve \"", "+", "url", ")", ";", "...
faked http request handling. shows usage of OneAgent SDK's incoming webrequest API
[ "faked", "http", "request", "handling", ".", "shows", "usage", "of", "OneAgent", "SDK", "s", "incoming", "webrequest", "API" ]
train
https://github.com/Dynatrace/OneAgent-SDK-for-Java/blob/a554cd971179faf8e598dd93df342a603d39e734/samples/webrequest/src/main/java/com/dynatrace/oneagent/sdk/samples/webrequest/FakedWebserver.java#L110-L141
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/api/Utils.java
Utils.computeIfAbsent
public static <K, V> V computeIfAbsent(ConcurrentMap<K, V> map, K k, Function<K, V> f) { """ This method should be used instead of the {@link ConcurrentMap#computeIfAbsent(Object, Function)} call to minimize thread contention. This method does not require locking for the common case where the key exists, but po...
java
public static <K, V> V computeIfAbsent(ConcurrentMap<K, V> map, K k, Function<K, V> f) { V v = map.get(k); if (v == null) { V tmp = f.apply(k); v = map.putIfAbsent(k, tmp); if (v == null) { v = tmp; } } return v; }
[ "public", "static", "<", "K", ",", "V", ">", "V", "computeIfAbsent", "(", "ConcurrentMap", "<", "K", ",", "V", ">", "map", ",", "K", "k", ",", "Function", "<", "K", ",", "V", ">", "f", ")", "{", "V", "v", "=", "map", ".", "get", "(", "k", "...
This method should be used instead of the {@link ConcurrentMap#computeIfAbsent(Object, Function)} call to minimize thread contention. This method does not require locking for the common case where the key exists, but potentially performs additional computation when absent.
[ "This", "method", "should", "be", "used", "instead", "of", "the", "{" ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/api/Utils.java#L278-L288
beangle/beangle3
commons/model/src/main/java/org/beangle/commons/entity/util/HierarchyEntityUtils.java
HierarchyEntityUtils.sort
public static <T extends HierarchyEntity<T, ?>> Map<T, String> sort(List<T> datas) { """ 按照上下关系排序 @param datas a {@link java.util.List} object. @param <T> a T object. @return a {@link java.util.Map} object. """ return sort(datas, null); }
java
public static <T extends HierarchyEntity<T, ?>> Map<T, String> sort(List<T> datas) { return sort(datas, null); }
[ "public", "static", "<", "T", "extends", "HierarchyEntity", "<", "T", ",", "?", ">", ">", "Map", "<", "T", ",", "String", ">", "sort", "(", "List", "<", "T", ">", "datas", ")", "{", "return", "sort", "(", "datas", ",", "null", ")", ";", "}" ]
按照上下关系排序 @param datas a {@link java.util.List} object. @param <T> a T object. @return a {@link java.util.Map} object.
[ "按照上下关系排序" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/entity/util/HierarchyEntityUtils.java#L78-L80
jfinal/jfinal
src/main/java/com/jfinal/core/Controller.java
Controller.setAttr
public Controller setAttr(String name, Object value) { """ Stores an attribute in this request @param name a String specifying the name of the attribute @param value the Object to be stored """ request.setAttribute(name, value); return this; }
java
public Controller setAttr(String name, Object value) { request.setAttribute(name, value); return this; }
[ "public", "Controller", "setAttr", "(", "String", "name", ",", "Object", "value", ")", "{", "request", ".", "setAttribute", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Stores an attribute in this request @param name a String specifying the name of the attribute @param value the Object to be stored
[ "Stores", "an", "attribute", "in", "this", "request" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/core/Controller.java#L132-L135
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.productAddUrl
public JSONObject productAddUrl(String url, HashMap<String, String> options) { """ 商品检索—入库接口 **该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。****注:重复添加完全相同的图片会返回错误。** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不...
java
public JSONObject productAddUrl(String url, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("url", url); if (options != null) { request.addBody(options); } request.setUri(ImageSearchCons...
[ "public", "JSONObject", "productAddUrl", "(", "String", "url", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", "....
商品检索—入库接口 **该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。****注:重复添加完全相同的图片会返回错误。** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 @param options - 可选参数对象,key: ...
[ "商品检索—入库接口", "**", "该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。", "****", "注:重复添加完全相同的图片会返回错误。", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L744-L755
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/spring/BaseXmlParser.java
BaseXmlParser.fromXml
protected Object fromXml(String xml, String tagName) throws Exception { """ Parses an xml extension from an xml string. @param xml XML containing the extension. @param tagName The top level tag name. @return Result of the parsed extension. @throws Exception Unspecified exception. """ Document doc...
java
protected Object fromXml(String xml, String tagName) throws Exception { Document document = XMLUtil.parseXMLFromString(xml); NodeList nodeList = document.getElementsByTagName(tagName); if (nodeList == null || nodeList.getLength() != 1) { throw new DOMException(DOMException.N...
[ "protected", "Object", "fromXml", "(", "String", "xml", ",", "String", "tagName", ")", "throws", "Exception", "{", "Document", "document", "=", "XMLUtil", ".", "parseXMLFromString", "(", "xml", ")", ";", "NodeList", "nodeList", "=", "document", ".", "getElemen...
Parses an xml extension from an xml string. @param xml XML containing the extension. @param tagName The top level tag name. @return Result of the parsed extension. @throws Exception Unspecified exception.
[ "Parses", "an", "xml", "extension", "from", "an", "xml", "string", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/spring/BaseXmlParser.java#L124-L141
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/authentication/AuthenticationApi.java
AuthenticationApi.getUserInfoOpenid
public OpenIdUserInfo getUserInfoOpenid(String authorization) throws AuthenticationApiException { """ Get OpenID user information by access token Get information about a user by their OAuth 2 access token. @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/...
java
public OpenIdUserInfo getUserInfoOpenid(String authorization) throws AuthenticationApiException { try { return authenticationApi.getInfo(authorization); } catch (ApiException e) { throw new AuthenticationApiException("Error getting openid userinfo", e); } }
[ "public", "OpenIdUserInfo", "getUserInfoOpenid", "(", "String", "authorization", ")", "throws", "AuthenticationApiException", "{", "try", "{", "return", "authenticationApi", ".", "getInfo", "(", "authorization", ")", ";", "}", "catch", "(", "ApiException", "e", ")",...
Get OpenID user information by access token Get information about a user by their OAuth 2 access token. @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Authorization: bearer a4b5da75-a5...
[ "Get", "OpenID", "user", "information", "by", "access", "token", "Get", "information", "about", "a", "user", "by", "their", "OAuth", "2", "access", "token", "." ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/authentication/AuthenticationApi.java#L119-L125
b3dgs/lionengine
lionengine-network/src/main/java/com/b3dgs/lionengine/network/NetworkModel.java
NetworkModel.decodeMessage
protected void decodeMessage(byte type, byte from, byte dest, DataInputStream buffer) throws IOException { """ Decode a message from its type. @param type The message type. @param from The client id source. @param dest The client id destination (-1 if all). @param buffer The data. @throws IOException Error ...
java
protected void decodeMessage(byte type, byte from, byte dest, DataInputStream buffer) throws IOException { final NetworkMessage message = decoder.getNetworkMessageFromType(type); if (message != null) { final int skip = 3; if (buffer.skipBytes(skip) == skip) ...
[ "protected", "void", "decodeMessage", "(", "byte", "type", ",", "byte", "from", ",", "byte", "dest", ",", "DataInputStream", "buffer", ")", "throws", "IOException", "{", "final", "NetworkMessage", "message", "=", "decoder", ".", "getNetworkMessageFromType", "(", ...
Decode a message from its type. @param type The message type. @param from The client id source. @param dest The client id destination (-1 if all). @param buffer The data. @throws IOException Error on reading.
[ "Decode", "a", "message", "from", "its", "type", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/NetworkModel.java#L66-L78
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java
NettyChannelBuilder.withOption
public <T> NettyChannelBuilder withOption(ChannelOption<T> option, T value) { """ Specifies a channel option. As the underlying channel as well as network implementation may ignore this value applications should consider it a hint. """ channelOptions.put(option, value); return this; }
java
public <T> NettyChannelBuilder withOption(ChannelOption<T> option, T value) { channelOptions.put(option, value); return this; }
[ "public", "<", "T", ">", "NettyChannelBuilder", "withOption", "(", "ChannelOption", "<", "T", ">", "option", ",", "T", "value", ")", "{", "channelOptions", ".", "put", "(", "option", ",", "value", ")", ";", "return", "this", ";", "}" ]
Specifies a channel option. As the underlying channel as well as network implementation may ignore this value applications should consider it a hint.
[ "Specifies", "a", "channel", "option", ".", "As", "the", "underlying", "channel", "as", "well", "as", "network", "implementation", "may", "ignore", "this", "value", "applications", "should", "consider", "it", "a", "hint", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java#L191-L194
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.toObject
public static Scriptable toObject(Object value, Scriptable scope) { """ Convert the value to an JavaScript object value. <p> Note that a scope must be provided to look up the constructors for Number, Boolean, and String. <p> See ECMA 9.9. <p> Additionally, arbitrary Java objects and classes will be wrapped...
java
public static Scriptable toObject(Object value, Scriptable scope) { return ScriptRuntime.toObject(scope, value); }
[ "public", "static", "Scriptable", "toObject", "(", "Object", "value", ",", "Scriptable", "scope", ")", "{", "return", "ScriptRuntime", ".", "toObject", "(", "scope", ",", "value", ")", ";", "}" ]
Convert the value to an JavaScript object value. <p> Note that a scope must be provided to look up the constructors for Number, Boolean, and String. <p> See ECMA 9.9. <p> Additionally, arbitrary Java objects and classes will be wrapped in a Scriptable object with its Java fields and methods reflected as JavaScript prop...
[ "Convert", "the", "value", "to", "an", "JavaScript", "object", "value", ".", "<p", ">", "Note", "that", "a", "scope", "must", "be", "provided", "to", "look", "up", "the", "constructors", "for", "Number", "Boolean", "and", "String", ".", "<p", ">", "See",...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L1805-L1808
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/random/MathRandom.java
MathRandom.getLong
public long getLong(final long min, final long max) { """ Returns a random integer number in the range of [min, max]. @param min minimum value for generated number @param max maximum value for generated number """ return min(min, max) + getLong(abs(max - min)); }
java
public long getLong(final long min, final long max) { return min(min, max) + getLong(abs(max - min)); }
[ "public", "long", "getLong", "(", "final", "long", "min", ",", "final", "long", "max", ")", "{", "return", "min", "(", "min", ",", "max", ")", "+", "getLong", "(", "abs", "(", "max", "-", "min", ")", ")", ";", "}" ]
Returns a random integer number in the range of [min, max]. @param min minimum value for generated number @param max maximum value for generated number
[ "Returns", "a", "random", "integer", "number", "in", "the", "range", "of", "[", "min", "max", "]", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/random/MathRandom.java#L141-L143
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/serializer/HttpResponseBodyDecoder.java
HttpResponseBodyDecoder.deserializeBody
private static Object deserializeBody(String value, Type resultType, Type wireType, SerializerAdapter serializer, SerializerEncoding encoding) throws IOException { """ Deserialize the given string value representing content of a REST API response. If the {@link ReturnValueWireType} is of type {@link Page}, then...
java
private static Object deserializeBody(String value, Type resultType, Type wireType, SerializerAdapter serializer, SerializerEncoding encoding) throws IOException { if (wireType == null) { return serializer.deserialize(value, resultType, encoding); } else if (TypeUtil.isTypeOrSubTypeOf(wireTy...
[ "private", "static", "Object", "deserializeBody", "(", "String", "value", ",", "Type", "resultType", ",", "Type", "wireType", ",", "SerializerAdapter", "serializer", ",", "SerializerEncoding", "encoding", ")", "throws", "IOException", "{", "if", "(", "wireType", "...
Deserialize the given string value representing content of a REST API response. If the {@link ReturnValueWireType} is of type {@link Page}, then the returned object will be an instance of that {@param wireType}. Otherwise, the returned object is converted back to its {@param resultType}. @param value the string value...
[ "Deserialize", "the", "given", "string", "value", "representing", "content", "of", "a", "REST", "API", "response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/serializer/HttpResponseBodyDecoder.java#L161-L172
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-graph/src/main/java/org/deeplearning4j/graph/data/GraphLoader.java
GraphLoader.loadUndirectedGraphEdgeListFile
public static Graph<String, String> loadUndirectedGraphEdgeListFile(String path, int numVertices, String delim) throws IOException { """ Simple method for loading an undirected graph, where the graph is represented by a edge list with one edge per line with a delimiter in between<br> This met...
java
public static Graph<String, String> loadUndirectedGraphEdgeListFile(String path, int numVertices, String delim) throws IOException { return loadUndirectedGraphEdgeListFile(path, numVertices, delim, true); }
[ "public", "static", "Graph", "<", "String", ",", "String", ">", "loadUndirectedGraphEdgeListFile", "(", "String", "path", ",", "int", "numVertices", ",", "String", "delim", ")", "throws", "IOException", "{", "return", "loadUndirectedGraphEdgeListFile", "(", "path", ...
Simple method for loading an undirected graph, where the graph is represented by a edge list with one edge per line with a delimiter in between<br> This method assumes that all lines in the file are of the form {@code i<delim>j} where i and j are integers in range 0 to numVertices inclusive, and "<delim>" is the user-p...
[ "Simple", "method", "for", "loading", "an", "undirected", "graph", "where", "the", "graph", "is", "represented", "by", "a", "edge", "list", "with", "one", "edge", "per", "line", "with", "a", "delimiter", "in", "between<br", ">", "This", "method", "assumes", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-graph/src/main/java/org/deeplearning4j/graph/data/GraphLoader.java#L50-L53
kiegroup/droolsjbpm-integration
kie-server-parent/kie-server-common/src/main/java/org/kie/server/common/rest/Base64Util.java
Base64Util.encodeBytes
public static String encodeBytes( byte[] source, int off, int len ) { """ Encodes a byte array into Base64 notation. @param source The data to convert @param off Offset in array where conversion should begin @param len Length of data to convert @return The Base64-encoded data as a String @throws NullPointer...
java
public static String encodeBytes( byte[] source, int off, int len ) { byte[] encoded = encodeBytesToBytes(source, off, len); try { return new String(encoded, PREFERRED_ENCODING); } catch( UnsupportedEncodingException uee ) { return new String(encoded); } }
[ "public", "static", "String", "encodeBytes", "(", "byte", "[", "]", "source", ",", "int", "off", ",", "int", "len", ")", "{", "byte", "[", "]", "encoded", "=", "encodeBytesToBytes", "(", "source", ",", "off", ",", "len", ")", ";", "try", "{", "return...
Encodes a byte array into Base64 notation. @param source The data to convert @param off Offset in array where conversion should begin @param len Length of data to convert @return The Base64-encoded data as a String @throws NullPointerException if source array is null @throws IllegalArgumentException if source array, o...
[ "Encodes", "a", "byte", "array", "into", "Base64", "notation", "." ]
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-server-parent/kie-server-common/src/main/java/org/kie/server/common/rest/Base64Util.java#L149-L156
infinispan/infinispan
core/src/main/java/org/infinispan/remoting/transport/AbstractRequest.java
AbstractRequest.setTimeout
public void setTimeout(ScheduledExecutorService timeoutExecutor, long timeout, TimeUnit unit) { """ Schedule a timeout task on the given executor, and complete the request with a {@link org.infinispan.util.concurrent.TimeoutException} when the task runs. If a timeout task was already registered with this requ...
java
public void setTimeout(ScheduledExecutorService timeoutExecutor, long timeout, TimeUnit unit) { cancelTimeoutTask(); ScheduledFuture<Void> timeoutFuture = timeoutExecutor.schedule(this, timeout, unit); setTimeoutFuture(timeoutFuture); }
[ "public", "void", "setTimeout", "(", "ScheduledExecutorService", "timeoutExecutor", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "cancelTimeoutTask", "(", ")", ";", "ScheduledFuture", "<", "Void", ">", "timeoutFuture", "=", "timeoutExecutor", ".", "s...
Schedule a timeout task on the given executor, and complete the request with a {@link org.infinispan.util.concurrent.TimeoutException} when the task runs. If a timeout task was already registered with this request, it is cancelled.
[ "Schedule", "a", "timeout", "task", "on", "the", "given", "executor", "and", "complete", "the", "request", "with", "a", "{", "@link", "org", ".", "infinispan", ".", "util", ".", "concurrent", ".", "TimeoutException", "}", "when", "the", "task", "runs", "."...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/remoting/transport/AbstractRequest.java#L52-L56
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.updateTag
public Tag updateTag(UUID projectId, UUID tagId, Tag updatedTag) { """ Update a tag. @param projectId The project id @param tagId The id of the target tag @param updatedTag The updated tag model @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the re...
java
public Tag updateTag(UUID projectId, UUID tagId, Tag updatedTag) { return updateTagWithServiceResponseAsync(projectId, tagId, updatedTag).toBlocking().single().body(); }
[ "public", "Tag", "updateTag", "(", "UUID", "projectId", ",", "UUID", "tagId", ",", "Tag", "updatedTag", ")", "{", "return", "updateTagWithServiceResponseAsync", "(", "projectId", ",", "tagId", ",", "updatedTag", ")", ".", "toBlocking", "(", ")", ".", "single",...
Update a tag. @param projectId The project id @param tagId The id of the target tag @param updatedTag The updated tag model @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exc...
[ "Update", "a", "tag", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L603-L605
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.readAll
public <P extends ParaObject> List<P> readAll(List<String> keys) { """ Retrieves multiple objects from the data store. @param <P> the type of object @param keys a list of object ids @return a list of objects """ if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } final int size ...
java
public <P extends ParaObject> List<P> readAll(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } final int size = this.chunkSize; return IntStream.range(0, getNumChunks(keys, size)) .mapToObj(i -> (List<String>) partitionList(keys, i, size)) .map(chunk -> { ...
[ "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "readAll", "(", "List", "<", "String", ">", "keys", ")", "{", "if", "(", "keys", "==", "null", "||", "keys", ".", "isEmpty", "(", ")", ")", "{", "return", "Collections", ".", ...
Retrieves multiple objects from the data store. @param <P> the type of object @param keys a list of object ids @return a list of objects
[ "Retrieves", "multiple", "objects", "from", "the", "data", "store", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L576-L592
lucee/Lucee
core/src/main/java/lucee/runtime/db/QoQ.java
QoQ.executeExp
private Object executeExp(PageContext pc, SQL sql, Query qr, Expression exp, int row) throws PageException { """ Executes a ZEXp @param sql @param qr Query Result @param exp expression to execute @param row current row of resultset @return result @throws PageException """ // print.e("name:"+exp.getCla...
java
private Object executeExp(PageContext pc, SQL sql, Query qr, Expression exp, int row) throws PageException { // print.e("name:"+exp.getClass().getName()); if (exp instanceof Value) return ((Value) exp).getValue();// executeConstant(sql,qr, (Value)exp, row); if (exp instanceof Column) return executeColumn(sql, qr, (C...
[ "private", "Object", "executeExp", "(", "PageContext", "pc", ",", "SQL", "sql", ",", "Query", "qr", ",", "Expression", "exp", ",", "int", "row", ")", "throws", "PageException", "{", "// print.e(\"name:\"+exp.getClass().getName());", "if", "(", "exp", "instanceof",...
Executes a ZEXp @param sql @param qr Query Result @param exp expression to execute @param row current row of resultset @return result @throws PageException
[ "Executes", "a", "ZEXp" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/db/QoQ.java#L307-L314
mbenson/therian
core/src/main/java/therian/util/Positions.java
Positions.readOnly
public static <T> Position.Readable<T> readOnly(final T value) { """ Get a read-only position of value {@code value} (type of {@code value#getClass()}. @param value not {@code null} @return Position.Readable """ return readOnly(Validate.notNull(value, "value").getClass(), value); }
java
public static <T> Position.Readable<T> readOnly(final T value) { return readOnly(Validate.notNull(value, "value").getClass(), value); }
[ "public", "static", "<", "T", ">", "Position", ".", "Readable", "<", "T", ">", "readOnly", "(", "final", "T", "value", ")", "{", "return", "readOnly", "(", "Validate", ".", "notNull", "(", "value", ",", "\"value\"", ")", ".", "getClass", "(", ")", ",...
Get a read-only position of value {@code value} (type of {@code value#getClass()}. @param value not {@code null} @return Position.Readable
[ "Get", "a", "read", "-", "only", "position", "of", "value", "{", "@code", "value", "}", "(", "type", "of", "{", "@code", "value#getClass", "()", "}", "." ]
train
https://github.com/mbenson/therian/blob/0653505f73e2a6f5b0abc394ea6d83af03408254/core/src/main/java/therian/util/Positions.java#L167-L169
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubDataPropertyOfAxiomImpl_CustomFieldSerializer.java
OWLSubDataPropertyOfAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSubDataPropertyOfAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.goog...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSubDataPropertyOfAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLSubDataPropertyOfAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubDataPropertyOfAxiomImpl_CustomFieldSerializer.java#L75-L78
SeleniumHQ/selenium
java/server/src/org/openqa/grid/internal/ExternalSessionKey.java
ExternalSessionKey.fromResponseBody
public static ExternalSessionKey fromResponseBody(String responseBody) throws NewSessionException { """ extract the external key from the server response for a selenium1 new session request. @param responseBody the response from the server @return the ExternalKey if it was present in the server's response. @thr...
java
public static ExternalSessionKey fromResponseBody(String responseBody) throws NewSessionException { if (responseBody != null && responseBody.startsWith("OK,")) { return new ExternalSessionKey(responseBody.replace("OK,", "")); } throw new NewSessionException("The server returned an error : "+responseBo...
[ "public", "static", "ExternalSessionKey", "fromResponseBody", "(", "String", "responseBody", ")", "throws", "NewSessionException", "{", "if", "(", "responseBody", "!=", "null", "&&", "responseBody", ".", "startsWith", "(", "\"OK,\"", ")", ")", "{", "return", "new"...
extract the external key from the server response for a selenium1 new session request. @param responseBody the response from the server @return the ExternalKey if it was present in the server's response. @throws NewSessionException in case the server didn't send back a success result.
[ "extract", "the", "external", "key", "from", "the", "server", "response", "for", "a", "selenium1", "new", "session", "request", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/internal/ExternalSessionKey.java#L130-L135
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_move_POST
public OvhIpTask ip_move_POST(String ip, String nexthop, String to) throws IOException { """ Move this IP to another service REST: POST /ip/{ip}/move @param nexthop [required] Nexthop of destination service @param to [required] Service destination @param ip [required] """ String qPath = "/ip/{ip}/move"...
java
public OvhIpTask ip_move_POST(String ip, String nexthop, String to) throws IOException { String qPath = "/ip/{ip}/move"; StringBuilder sb = path(qPath, ip); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "nexthop", nexthop); addBody(o, "to", to); String resp = exec(qPath, "POST", sb.to...
[ "public", "OvhIpTask", "ip_move_POST", "(", "String", "ip", ",", "String", "nexthop", ",", "String", "to", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/move\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "ip", ")", ...
Move this IP to another service REST: POST /ip/{ip}/move @param nexthop [required] Nexthop of destination service @param to [required] Service destination @param ip [required]
[ "Move", "this", "IP", "to", "another", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L505-L513
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java
TypeHandlerUtils.convertArray
public static Object convertArray(Connection conn, Object[] array) throws SQLException { """ Converts array of Object into sql.Array @param conn connection for which sql.Array object would be created @param array array of objects @return sql.Array from array of Object @throws SQLException """ Ob...
java
public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; }
[ "public", "static", "Object", "convertArray", "(", "Connection", "conn", ",", "Object", "[", "]", "array", ")", "throws", "SQLException", "{", "Object", "result", "=", "null", ";", "result", "=", "createArrayOf", "(", "conn", ",", "convertJavaClassToSqlType", ...
Converts array of Object into sql.Array @param conn connection for which sql.Array object would be created @param array array of objects @return sql.Array from array of Object @throws SQLException
[ "Converts", "array", "of", "Object", "into", "sql", ".", "Array" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L51-L57
liyiorg/weixin-popular
src/main/java/weixin/popular/api/WxopenAPI.java
WxopenAPI.templateAdd
public static TemplateAddResult templateAdd(String access_token,String id,List<Integer> keyword_id_list) { """ 组合模板并添加至帐号下的个人模板库 @since 2.8.18 @param access_token access_token @param id 模板标题id,可通过接口获取,也可登录小程序后台查看获取 @param keyword_id_list 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如[3,5,4]或[4,5,3]),最多支持10个关键词组合 @return res...
java
public static TemplateAddResult templateAdd(String access_token,String id,List<Integer> keyword_id_list){ String json = String.format("{\"id\":\"%s\",\"keyword_id_list\":%s}", id,JsonUtil.toJSONString(keyword_id_list)); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri...
[ "public", "static", "TemplateAddResult", "templateAdd", "(", "String", "access_token", ",", "String", "id", ",", "List", "<", "Integer", ">", "keyword_id_list", ")", "{", "String", "json", "=", "String", ".", "format", "(", "\"{\\\"id\\\":\\\"%s\\\",\\\"keyword_id_l...
组合模板并添加至帐号下的个人模板库 @since 2.8.18 @param access_token access_token @param id 模板标题id,可通过接口获取,也可登录小程序后台查看获取 @param keyword_id_list 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如[3,5,4]或[4,5,3]),最多支持10个关键词组合 @return result
[ "组合模板并添加至帐号下的个人模板库" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/WxopenAPI.java#L123-L132