repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
aws/aws-sdk-java
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/HyperParameterTrainingJobDefinition.java
HyperParameterTrainingJobDefinition.withStaticHyperParameters
public HyperParameterTrainingJobDefinition withStaticHyperParameters(java.util.Map<String, String> staticHyperParameters) { setStaticHyperParameters(staticHyperParameters); return this; }
java
public HyperParameterTrainingJobDefinition withStaticHyperParameters(java.util.Map<String, String> staticHyperParameters) { setStaticHyperParameters(staticHyperParameters); return this; }
[ "public", "HyperParameterTrainingJobDefinition", "withStaticHyperParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "staticHyperParameters", ")", "{", "setStaticHyperParameters", "(", "staticHyperParameters", ")", ";", "return", "this"...
<p> Specifies the values of hyperparameters that do not change for the tuning job. </p> @param staticHyperParameters Specifies the values of hyperparameters that do not change for the tuning job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Specifies", "the", "values", "of", "hyperparameters", "that", "do", "not", "change", "for", "the", "tuning", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/HyperParameterTrainingJobDefinition.java#L159-L162
jboss/jboss-common-beans
src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java
ArrayTokenizer.tokenize
public final String[] tokenize(String value) { StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; for(int index = 0; index< broken.length;index++){ broken[index] = stringTokenizer.nextToken(); ...
java
public final String[] tokenize(String value) { StringTokenizer stringTokenizer = new StringTokenizer(value, getDelimiters()); String[] broken = new String[stringTokenizer.countTokens()]; for(int index = 0; index< broken.length;index++){ broken[index] = stringTokenizer.nextToken(); ...
[ "public", "final", "String", "[", "]", "tokenize", "(", "String", "value", ")", "{", "StringTokenizer", "stringTokenizer", "=", "new", "StringTokenizer", "(", "value", ",", "getDelimiters", "(", ")", ")", ";", "String", "[", "]", "broken", "=", "new", "Str...
Implementation of this method breaks down passed string into tokens. @param value @return
[ "Implementation", "of", "this", "method", "breaks", "down", "passed", "string", "into", "tokens", "." ]
train
https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/token/ArrayTokenizer.java#L42-L49
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java
ExtensionHttpSessions.getHttpSessionTokensSetForContext
public HttpSessionTokensSet getHttpSessionTokensSetForContext(Context context){ //TODO: Proper implementation. Hack for now for (Entry<String, HttpSessionTokensSet> e : this.sessionTokens.entrySet()) { String siteName = e.getKey(); siteName = "http://" + siteName; if (context.isInContext(siteName)) ret...
java
public HttpSessionTokensSet getHttpSessionTokensSetForContext(Context context){ //TODO: Proper implementation. Hack for now for (Entry<String, HttpSessionTokensSet> e : this.sessionTokens.entrySet()) { String siteName = e.getKey(); siteName = "http://" + siteName; if (context.isInContext(siteName)) ret...
[ "public", "HttpSessionTokensSet", "getHttpSessionTokensSetForContext", "(", "Context", "context", ")", "{", "//TODO: Proper implementation. Hack for now", "for", "(", "Entry", "<", "String", ",", "HttpSessionTokensSet", ">", "e", ":", "this", ".", "sessionTokens", ".", ...
Gets the http session tokens set for the first site matching a given Context. @param context the context @return the http session tokens set for context
[ "Gets", "the", "http", "session", "tokens", "set", "for", "the", "first", "site", "matching", "a", "given", "Context", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java#L587-L596
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpResponse.java
HttpResponse.writeBody
public long writeBody(File destFile, StreamProgress streamProgress) { if (null == destFile) { throw new NullPointerException("[destFile] is null!"); } if (destFile.isDirectory()) { // 从头信息中获取文件名 String fileName = getFileNameFromDisposition(); if (StrUtil.isBlank(fileName)) { final String p...
java
public long writeBody(File destFile, StreamProgress streamProgress) { if (null == destFile) { throw new NullPointerException("[destFile] is null!"); } if (destFile.isDirectory()) { // 从头信息中获取文件名 String fileName = getFileNameFromDisposition(); if (StrUtil.isBlank(fileName)) { final String p...
[ "public", "long", "writeBody", "(", "File", "destFile", ",", "StreamProgress", "streamProgress", ")", "{", "if", "(", "null", "==", "destFile", ")", "{", "throw", "new", "NullPointerException", "(", "\"[destFile] is null!\"", ")", ";", "}", "if", "(", "destFil...
将响应内容写出到文件<br> 异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br> 写出后会关闭Http流(异步模式) @param destFile 写出到的文件 @param streamProgress 进度显示接口,通过实现此接口显示下载进度 @return 写出bytes数 @since 3.3.2
[ "将响应内容写出到文件<br", ">", "异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br", ">", "写出后会关闭Http流(异步模式)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java#L259-L279
vdurmont/semver4j
src/main/java/com/vdurmont/semver4j/Requirement.java
Requirement.caretRequirement
protected static Requirement caretRequirement(String version, Semver.SemverType type) { if (type != Semver.SemverType.NPM) { throw new SemverException("The caret requirements are only compatible with NPM."); } Semver semver = new Semver(version, type); Requirement req1 = new ...
java
protected static Requirement caretRequirement(String version, Semver.SemverType type) { if (type != Semver.SemverType.NPM) { throw new SemverException("The caret requirements are only compatible with NPM."); } Semver semver = new Semver(version, type); Requirement req1 = new ...
[ "protected", "static", "Requirement", "caretRequirement", "(", "String", "version", ",", "Semver", ".", "SemverType", "type", ")", "{", "if", "(", "type", "!=", "Semver", ".", "SemverType", ".", "NPM", ")", "{", "throw", "new", "SemverException", "(", "\"The...
Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple.
[ "Allows", "changes", "that", "do", "not", "modify", "the", "left", "-", "most", "non", "-", "zero", "digit", "in", "the", "[", "major", "minor", "patch", "]", "tuple", "." ]
train
https://github.com/vdurmont/semver4j/blob/3f0266e4985ac29e9da482e04001ed15fad6c3e2/src/main/java/com/vdurmont/semver4j/Requirement.java#L422-L448
derari/cthul
objects/src/main/java/org/cthul/objects/Boxing.java
Boxing.unboxAllAs
public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) { return (T) unboxAll(type, src, srcPos, len); }
java
public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) { return (T) unboxAll(type, src, srcPos, len); }
[ "public", "static", "<", "T", ">", "T", "unboxAllAs", "(", "Object", "src", ",", "int", "srcPos", ",", "int", "len", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "(", "T", ")", "unboxAll", "(", "type", ",", "src", ",", "srcPos", ",", ...
Transforms any array into a primitive array. @param <T> @param src source array @param srcPos start position @param len length @param type target type @return primitive array
[ "Transforms", "any", "array", "into", "a", "primitive", "array", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L216-L218
appium/java-client
src/main/java/io/appium/java_client/ScreenshotState.java
ScreenshotState.verifyNotChanged
public ScreenshotState verifyNotChanged(Duration timeout, double minScore) { return checkState((x) -> x >= minScore, timeout); }
java
public ScreenshotState verifyNotChanged(Duration timeout, double minScore) { return checkState((x) -> x >= minScore, timeout); }
[ "public", "ScreenshotState", "verifyNotChanged", "(", "Duration", "timeout", ",", "double", "minScore", ")", "{", "return", "checkState", "(", "(", "x", ")", "-", ">", "x", ">=", "minScore", ",", "timeout", ")", ";", "}" ]
Verifies whether the state of the screenshot provided by stateProvider lambda function is not changed within the given timeout. @param timeout timeout value @param minScore the value in range (0.0, 1.0) @return self instance for chaining @throws ScreenshotComparisonTimeout if the calculated score is still less than...
[ "Verifies", "whether", "the", "state", "of", "the", "screenshot", "provided", "by", "stateProvider", "lambda", "function", "is", "not", "changed", "within", "the", "given", "timeout", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/ScreenshotState.java#L201-L203
jbundle/jbundle
thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java
Application.addTask
public int addTask(Task task, Object remoteTask) { if (m_taskMain == null) { if (task != null) if (task.isMainTaskCandidate()) m_taskMain = task; } m_mapTasks.put(task, (RemoteTask)remoteTask); return m_mapTasks.size(); }
java
public int addTask(Task task, Object remoteTask) { if (m_taskMain == null) { if (task != null) if (task.isMainTaskCandidate()) m_taskMain = task; } m_mapTasks.put(task, (RemoteTask)remoteTask); return m_mapTasks.size(); }
[ "public", "int", "addTask", "(", "Task", "task", ",", "Object", "remoteTask", ")", "{", "if", "(", "m_taskMain", "==", "null", ")", "{", "if", "(", "task", "!=", "null", ")", "if", "(", "task", ".", "isMainTaskCandidate", "(", ")", ")", "m_taskMain", ...
Add this session, screen, or task that belongs to this application. @param objSession Session to remove. @return Number of remaining sessions still active.
[ "Add", "this", "session", "screen", "or", "task", "that", "belongs", "to", "this", "application", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java#L284-L294
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java
AtomDOSerializer.addAuditDatastream
private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException { if (obj.getAuditRecords().size() == 0) { return; } String dsId = PID.toURI(obj.getPid()) + "/AUDIT"; String dsvId = ...
java
private void addAuditDatastream(Feed feed, DigitalObject obj, ZipOutputStream zout, String encoding) throws ObjectIntegrityException, StreamIOException { if (obj.getAuditRecords().size() == 0) { return; } String dsId = PID.toURI(obj.getPid()) + "/AUDIT"; String dsvId = ...
[ "private", "void", "addAuditDatastream", "(", "Feed", "feed", ",", "DigitalObject", "obj", ",", "ZipOutputStream", "zout", ",", "String", "encoding", ")", "throws", "ObjectIntegrityException", ",", "StreamIOException", "{", "if", "(", "obj", ".", "getAuditRecords", ...
AUDIT datastream is rebuilt from the latest in-memory audit trail which is a separate array list in the DigitalObject class. Audit trail datastream re-created from audit records. There is only ONE version of the audit trail datastream @throws ObjectIntegrityException @throws StreamIOException
[ "AUDIT", "datastream", "is", "rebuilt", "from", "the", "latest", "in", "-", "memory", "audit", "trail", "which", "is", "a", "separate", "array", "list", "in", "the", "DigitalObject", "class", ".", "Audit", "trail", "datastream", "re", "-", "created", "from",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDOSerializer.java#L270-L321
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/adapters/ModelAdapter.java
ModelAdapter.setNewList
public ModelAdapter<Model, Item> setNewList(List<Model> items) { return setNewList(items, false); }
java
public ModelAdapter<Model, Item> setNewList(List<Model> items) { return setNewList(items, false); }
[ "public", "ModelAdapter", "<", "Model", ",", "Item", ">", "setNewList", "(", "List", "<", "Model", ">", "items", ")", "{", "return", "setNewList", "(", "items", ",", "false", ")", ";", "}" ]
sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged @param items the new items to set
[ "sets", "a", "complete", "new", "list", "of", "items", "onto", "this", "adapter", "using", "the", "new", "list", ".", "Calls", "notifyDataSetChanged" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/adapters/ModelAdapter.java#L336-L338
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/GroupWsRef.java
GroupWsRef.fromName
static GroupWsRef fromName(@Nullable String organizationKey, String name) { return new GroupWsRef(NULL_ID, organizationKey, requireNonNull(name)); }
java
static GroupWsRef fromName(@Nullable String organizationKey, String name) { return new GroupWsRef(NULL_ID, organizationKey, requireNonNull(name)); }
[ "static", "GroupWsRef", "fromName", "(", "@", "Nullable", "String", "organizationKey", ",", "String", "name", ")", "{", "return", "new", "GroupWsRef", "(", "NULL_ID", ",", "organizationKey", ",", "requireNonNull", "(", "name", ")", ")", ";", "}" ]
Creates a reference to a group by its organization and name. Virtual groups "Anyone" are supported. @param organizationKey key of organization. If {@code null}, then default organization will be used. @param name non-null name. Can refer to anyone group (case-insensitive {@code "anyone"}).
[ "Creates", "a", "reference", "to", "a", "group", "by", "its", "organization", "and", "name", ".", "Virtual", "groups", "Anyone", "are", "supported", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/GroupWsRef.java#L110-L112
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java
UResourceBundle.getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root){ return getBundleInstance(baseName, localeName, root, false); }
java
public static UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root){ return getBundleInstance(baseName, localeName, root, false); }
[ "public", "static", "UResourceBundle", "getBundleInstance", "(", "String", "baseName", ",", "String", "localeName", ",", "ClassLoader", "root", ")", "{", "return", "getBundleInstance", "(", "baseName", ",", "localeName", ",", "root", ",", "false", ")", ";", "}" ...
<strong>[icu]</strong> Creates a resource bundle using the specified base name, locale, and class root. @param baseName string containing the name of the data package. If null the default ICU package name is used. @param localeName the locale for which a resource bundle is desired @param root the class object from whi...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Creates", "a", "resource", "bundle", "using", "the", "specified", "base", "name", "locale", "and", "class", "root", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L125-L128
diffplug/durian
src/com/diffplug/common/base/FieldsAndGetters.java
FieldsAndGetters.dumpAll
public static void dumpAll(String name, Object obj) { dumpAll(name, obj, StringPrinter.systemOut()); }
java
public static void dumpAll(String name, Object obj) { dumpAll(name, obj, StringPrinter.systemOut()); }
[ "public", "static", "void", "dumpAll", "(", "String", "name", ",", "Object", "obj", ")", "{", "dumpAll", "(", "name", ",", "obj", ",", "StringPrinter", ".", "systemOut", "(", ")", ")", ";", "}" ]
Dumps all fields and getters of {@code obj} to {@code System.out}. @see #dumpIf
[ "Dumps", "all", "fields", "and", "getters", "of", "{" ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/FieldsAndGetters.java#L169-L171
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java
TextComponentPainter.paintBackgroundSolid
private void paintBackgroundSolid(Graphics2D g, JComponent c, int x, int y, int width, int height) { Color color = c.getBackground(); if (type == CommonControlState.DISABLED) { color = new Color(color.getRed(), color.getGreen(), color.getBlue(), 0x80); } Shape s = shapeGene...
java
private void paintBackgroundSolid(Graphics2D g, JComponent c, int x, int y, int width, int height) { Color color = c.getBackground(); if (type == CommonControlState.DISABLED) { color = new Color(color.getRed(), color.getGreen(), color.getBlue(), 0x80); } Shape s = shapeGene...
[ "private", "void", "paintBackgroundSolid", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ")", "{", "Color", "color", "=", "c", ".", "getBackground", "(", ")", ";", "if", "...
Paint the background of an uneditable control, e.g. a JLabel. @param g DOCUMENT ME! @param c DOCUMENT ME! @param x DOCUMENT ME! @param y DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME!
[ "Paint", "the", "background", "of", "an", "uneditable", "control", "e", ".", "g", ".", "a", "JLabel", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java#L190-L204
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP12Reader.java
MPP12Reader.processResourceEnterpriseColumns
private void processResourceEnterpriseColumns(Resource resource, byte[] metaData2) { if (metaData2 != null) { int bits = MPPUtility.getInt(metaData2, 16); resource.set(ResourceField.ENTERPRISE_FLAG1, Boolean.valueOf((bits & 0x00010) != 0)); resource.set(ResourceField.ENTERPRISE...
java
private void processResourceEnterpriseColumns(Resource resource, byte[] metaData2) { if (metaData2 != null) { int bits = MPPUtility.getInt(metaData2, 16); resource.set(ResourceField.ENTERPRISE_FLAG1, Boolean.valueOf((bits & 0x00010) != 0)); resource.set(ResourceField.ENTERPRISE...
[ "private", "void", "processResourceEnterpriseColumns", "(", "Resource", "resource", ",", "byte", "[", "]", "metaData2", ")", "{", "if", "(", "metaData2", "!=", "null", ")", "{", "int", "bits", "=", "MPPUtility", ".", "getInt", "(", "metaData2", ",", "16", ...
Extracts resource enterprise column data. @param resource resource instance @param metaData2 resource meta data
[ "Extracts", "resource", "enterprise", "column", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP12Reader.java#L1521-L1553
threerings/nenya
core/src/main/java/com/threerings/miso/util/MisoUtil.java
MisoUtil.getDirection
public static int getDirection ( MisoSceneMetrics metrics, int ax, int ay, int bx, int by) { Point afpos = new Point(), bfpos = new Point(); // convert screen coordinates to full coordinates to get both // tile coordinates and fine coordinates screenToFull(metrics, ax, ay, a...
java
public static int getDirection ( MisoSceneMetrics metrics, int ax, int ay, int bx, int by) { Point afpos = new Point(), bfpos = new Point(); // convert screen coordinates to full coordinates to get both // tile coordinates and fine coordinates screenToFull(metrics, ax, ay, a...
[ "public", "static", "int", "getDirection", "(", "MisoSceneMetrics", "metrics", ",", "int", "ax", ",", "int", "ay", ",", "int", "bx", ",", "int", "by", ")", "{", "Point", "afpos", "=", "new", "Point", "(", ")", ",", "bfpos", "=", "new", "Point", "(", ...
Given two points in screen pixel coordinates, return the compass direction that point B lies in from point A from an isometric perspective. @param ax the x-position of point A. @param ay the y-position of point A. @param bx the x-position of point B. @param by the y-position of point B. @return the direction specifie...
[ "Given", "two", "points", "in", "screen", "pixel", "coordinates", "return", "the", "compass", "direction", "that", "point", "B", "lies", "in", "from", "point", "A", "from", "an", "isometric", "perspective", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L51-L89
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateSasDefinitionAsync
public ServiceFuture<SasDefinitionBundle> updateSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName, final ServiceCallback<SasDefinitionBundle> serviceCallback) { return ServiceFuture.fromResponse(updateSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountNam...
java
public ServiceFuture<SasDefinitionBundle> updateSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName, final ServiceCallback<SasDefinitionBundle> serviceCallback) { return ServiceFuture.fromResponse(updateSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountNam...
[ "public", "ServiceFuture", "<", "SasDefinitionBundle", ">", "updateSasDefinitionAsync", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "sasDefinitionName", ",", "final", "ServiceCallback", "<", "SasDefinitionBundle", ">", "serviceCallback...
Updates the specified attributes associated with the given SAS definition. This operation requires the storage/setsas permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param sasDefinitionName The name of the SAS defi...
[ "Updates", "the", "specified", "attributes", "associated", "with", "the", "given", "SAS", "definition", ".", "This", "operation", "requires", "the", "storage", "/", "setsas", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L11506-L11508
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java
EncryptedPrivateKeyReader.readPasswordProtectedPrivateKey
public static PrivateKey readPasswordProtectedPrivateKey(final File encryptedPrivateKeyFile, final String password, final String algorithm) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException, InvalidKeyException, InvalidAlgorithmParameterException { byte[] encryptedPr...
java
public static PrivateKey readPasswordProtectedPrivateKey(final File encryptedPrivateKeyFile, final String password, final String algorithm) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException, InvalidKeyException, InvalidAlgorithmParameterException { byte[] encryptedPr...
[ "public", "static", "PrivateKey", "readPasswordProtectedPrivateKey", "(", "final", "File", "encryptedPrivateKeyFile", ",", "final", "String", "password", ",", "final", "String", "algorithm", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "NoSuchPaddin...
Reads from the given {@link File} that contains the password protected private key and returns it @param encryptedPrivateKeyFile the file that contains the password protected private key @param password the password @param algorithm the algorithm @return the {@link PrivateKey} object @throws IOException Signals that a...
[ "Reads", "from", "the", "given", "{", "@link", "File", "}", "that", "contains", "the", "password", "protected", "private", "key", "and", "returns", "it" ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java#L138-L159
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsInner.java
DatabaseAdvisorsInner.createOrUpdate
public AdvisorInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String advisorName, AutoExecuteStatus autoExecuteValue) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, advisorName, autoExecuteValue).toBlocking().single().body(); ...
java
public AdvisorInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String advisorName, AutoExecuteStatus autoExecuteValue) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, advisorName, autoExecuteValue).toBlocking().single().body(); ...
[ "public", "AdvisorInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "advisorName", ",", "AutoExecuteStatus", "autoExecuteValue", ")", "{", "return", "createOrUpdateWithServiceResponseAsyn...
Creates or updates a database advisor. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param advisorName The name of ...
[ "Creates", "or", "updates", "a", "database", "advisor", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsInner.java#L277-L279
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Tie.java
JIT_Tie.addFields
private static void addFields(ClassWriter cw, String servantDescriptor) { FieldVisitor fv; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626 // ----------------------------------------------------------------------- // private <servant class> target; ...
java
private static void addFields(ClassWriter cw, String servantDescriptor) { FieldVisitor fv; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626 // ----------------------------------------------------------------------- // private <servant class> target; ...
[ "private", "static", "void", "addFields", "(", "ClassWriter", "cw", ",", "String", "servantDescriptor", ")", "{", "FieldVisitor", "fv", ";", "final", "boolean", "isTraceOn", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "// d576626", "// ------...
Defines the static and instance variables that are the same for all Tie classes. <p> <ul> <li> private <remote class> target; <li> private ORB orb; <li> private static final String _type_ids[]; </ul> The fields are NOT initialized. <p> @param cw ASM ClassWriter to add the fields to. @param servantDescriptor fully qu...
[ "Defines", "the", "static", "and", "instance", "variables", "that", "are", "the", "same", "for", "all", "Tie", "classes", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Tie.java#L259-L291
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AlertResources.java
AlertResources.createAlert
@POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Description("Creates an alert.") public AlertDto createAlert(@Context HttpServletRequest req, AlertDto alertDto) { if (alertDto == null) { throw new WebApplicationException("Null alert object cannot be created.", Status.BAD_R...
java
@POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Description("Creates an alert.") public AlertDto createAlert(@Context HttpServletRequest req, AlertDto alertDto) { if (alertDto == null) { throw new WebApplicationException("Null alert object cannot be created.", Status.BAD_R...
[ "@", "POST", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Description", "(", "\"Creates an alert.\"", ")", "public", "AlertDto", "createAlert", "(", "@", "Context", "HttpS...
Creates a new alert. @param req The HttpServlet request object. Cannot be null. @param alertDto The alert object. Cannot be null. @return Created alert object. @throws WebApplicationException The exception with 400 status will be thrown if the alert object is null.
[ "Creates", "a", "new", "alert", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AlertResources.java#L635-L650
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java
DefaultCacheableResourceService.copyResource
private File copyResource(final File resource, final String resourceLocation) throws ResourceDownloadError { final String tmpPath = asPath(getSystemConfiguration() .getCacheDirectory().getAbsolutePath(), ResourceType.TMP_FILE.getResourceFolderName(...
java
private File copyResource(final File resource, final String resourceLocation) throws ResourceDownloadError { final String tmpPath = asPath(getSystemConfiguration() .getCacheDirectory().getAbsolutePath(), ResourceType.TMP_FILE.getResourceFolderName(...
[ "private", "File", "copyResource", "(", "final", "File", "resource", ",", "final", "String", "resourceLocation", ")", "throws", "ResourceDownloadError", "{", "final", "String", "tmpPath", "=", "asPath", "(", "getSystemConfiguration", "(", ")", ".", "getCacheDirector...
Copy the resource to the system's temporary resources. @param resource {@link File}, the resource to copy from @param resourceLocation {@link String}, the resource location @return the resource copy {@link File} ready for processing @throws ResourceDownloadError Throw if an error occurred copying the resource
[ "Copy", "the", "resource", "to", "the", "system", "s", "temporary", "resources", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java#L212-L232
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VFS.java
VFS.mountZip
public static Closeable mountZip(InputStream zipData, String zipName, VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException { boolean ok = false; try { final TempDir tempDir = tempFileProvider.createTempDir(zipName); try { final MountHandle...
java
public static Closeable mountZip(InputStream zipData, String zipName, VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException { boolean ok = false; try { final TempDir tempDir = tempFileProvider.createTempDir(zipName); try { final MountHandle...
[ "public", "static", "Closeable", "mountZip", "(", "InputStream", "zipData", ",", "String", "zipName", ",", "VirtualFile", "mountPoint", ",", "TempFileProvider", "tempFileProvider", ")", "throws", "IOException", "{", "boolean", "ok", "=", "false", ";", "try", "{", ...
Create and mount a zip file into the filesystem, returning a single handle which will unmount and close the file system when closed. @param zipData an input stream containing the zip data @param zipName the name of the archive @param mountPoint the point at which the filesystem should be mounte...
[ "Create", "and", "mount", "a", "zip", "file", "into", "the", "filesystem", "returning", "a", "single", "handle", "which", "will", "unmount", "and", "close", "the", "file", "system", "when", "closed", "." ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VFS.java#L339-L355
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
SQLOperation.getCurrentUGI
private UserGroupInformation getCurrentUGI(HiveConf opConfig) throws HiveSQLException { try { return Utils.getUGI(); } catch (Exception e) { throw new HiveSQLException("Unable to get current user", e); } }
java
private UserGroupInformation getCurrentUGI(HiveConf opConfig) throws HiveSQLException { try { return Utils.getUGI(); } catch (Exception e) { throw new HiveSQLException("Unable to get current user", e); } }
[ "private", "UserGroupInformation", "getCurrentUGI", "(", "HiveConf", "opConfig", ")", "throws", "HiveSQLException", "{", "try", "{", "return", "Utils", ".", "getUGI", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "HiveSQLExcepti...
Returns the current UGI on the stack @param opConfig @return UserGroupInformation @throws HiveSQLException
[ "Returns", "the", "current", "UGI", "on", "the", "stack" ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java#L255-L261
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/io/AbstractMappedClassFieldObserver.java
AbstractMappedClassFieldObserver.onFieldBits
protected void onFieldBits(final Object obj, final Field field, final Bin annotation, final JBBPBitNumber bitNumber, final int value) { }
java
protected void onFieldBits(final Object obj, final Field field, final Bin annotation, final JBBPBitNumber bitNumber, final int value) { }
[ "protected", "void", "onFieldBits", "(", "final", "Object", "obj", ",", "final", "Field", "field", ",", "final", "Bin", "annotation", ",", "final", "JBBPBitNumber", "bitNumber", ",", "final", "int", "value", ")", "{", "}" ]
Notification about bit field. @param obj the object instance, must not be null @param field the field, must not be null @param annotation the annotation for field, must not be null @param bitNumber number of bits for the field, must not be null @param value the value of the field
[ "Notification", "about", "bit", "field", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/io/AbstractMappedClassFieldObserver.java#L540-L542
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Attributes.java
Attributes.put
public Object put(Object name, Object value) { return map.put((Attributes.Name)name, (String)value); }
java
public Object put(Object name, Object value) { return map.put((Attributes.Name)name, (String)value); }
[ "public", "Object", "put", "(", "Object", "name", ",", "Object", "value", ")", "{", "return", "map", ".", "put", "(", "(", "Attributes", ".", "Name", ")", "name", ",", "(", "String", ")", "value", ")", ";", "}" ]
Associates the specified value with the specified attribute name (key) in this Map. If the Map previously contained a mapping for the attribute name, the old value is replaced. @param name the attribute name @param value the attribute value @return the previous value of the attribute, or null if none @exception ClassC...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "attribute", "name", "(", "key", ")", "in", "this", "Map", ".", "If", "the", "Map", "previously", "contained", "a", "mapping", "for", "the", "attribute", "name", "the", "old", "value", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Attributes.java#L148-L150
netty/netty
codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheEncoder.java
AbstractBinaryMemcacheEncoder.encodeKey
private static void encodeKey(ByteBuf buf, ByteBuf key) { if (key == null || !key.isReadable()) { return; } buf.writeBytes(key); }
java
private static void encodeKey(ByteBuf buf, ByteBuf key) { if (key == null || !key.isReadable()) { return; } buf.writeBytes(key); }
[ "private", "static", "void", "encodeKey", "(", "ByteBuf", "buf", ",", "ByteBuf", "key", ")", "{", "if", "(", "key", "==", "null", "||", "!", "key", ".", "isReadable", "(", ")", ")", "{", "return", ";", "}", "buf", ".", "writeBytes", "(", "key", ")"...
Encode the key. @param buf the {@link ByteBuf} to write into. @param key the key to encode.
[ "Encode", "the", "key", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheEncoder.java#L68-L74
tvesalainen/util
util/src/main/java/org/vesalainen/ui/AbstractView.java
AbstractView.setRect
public final void setRect(double xMin, double xMax, double yMin, double yMax) { setRect(new Rectangle2D.Double(xMin, yMin, xMax-xMin, yMax-yMin)); }
java
public final void setRect(double xMin, double xMax, double yMin, double yMax) { setRect(new Rectangle2D.Double(xMin, yMin, xMax-xMin, yMax-yMin)); }
[ "public", "final", "void", "setRect", "(", "double", "xMin", ",", "double", "xMax", ",", "double", "yMin", ",", "double", "yMax", ")", "{", "setRect", "(", "new", "Rectangle2D", ".", "Double", "(", "xMin", ",", "yMin", ",", "xMax", "-", "xMin", ",", ...
Sets the visible rectangle of translated coordinates. @param xMin @param xMax @param yMin @param yMax
[ "Sets", "the", "visible", "rectangle", "of", "translated", "coordinates", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/AbstractView.java#L169-L172
structr/structr
structr-ui/src/main/java/org/structr/websocket/command/AbstractCommand.java
AbstractCommand.getGraphObject
public GraphObject getGraphObject(final String id, final String nodeId) { if (isValidUuid(id)) { final AbstractNode node = getNode(id); if (node != null) { return node; } else { if (nodeId == null) { logger.warn("Relationship access by UUID is deprecated and not supported by Neo4j, this can...
java
public GraphObject getGraphObject(final String id, final String nodeId) { if (isValidUuid(id)) { final AbstractNode node = getNode(id); if (node != null) { return node; } else { if (nodeId == null) { logger.warn("Relationship access by UUID is deprecated and not supported by Neo4j, this can...
[ "public", "GraphObject", "getGraphObject", "(", "final", "String", "id", ",", "final", "String", "nodeId", ")", "{", "if", "(", "isValidUuid", "(", "id", ")", ")", "{", "final", "AbstractNode", "node", "=", "getNode", "(", "id", ")", ";", "if", "(", "n...
Returns the graph object with the given id. If no node with the given id is found and nodeId is not null, this method will search for a relationship in the list of relationships of the node with the given nodeId. @param id @param nodeId @return the graph object
[ "Returns", "the", "graph", "object", "with", "the", "given", "id", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/websocket/command/AbstractCommand.java#L125-L153
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.createCertificateAsync
public Observable<CertificateOperation> createCertificateAsync(String vaultBaseUrl, String certificateName) { return createCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateOperation>, CertificateOperation>() { @Override public Ce...
java
public Observable<CertificateOperation> createCertificateAsync(String vaultBaseUrl, String certificateName) { return createCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateOperation>, CertificateOperation>() { @Override public Ce...
[ "public", "Observable", "<", "CertificateOperation", ">", "createCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "createCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "ma...
Creates a new certificate. If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @throws IllegalArgumentException...
[ "Creates", "a", "new", "certificate", ".", "If", "this", "is", "the", "first", "version", "the", "certificate", "resource", "is", "created", ".", "This", "operation", "requires", "the", "certificates", "/", "create", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6515-L6522
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/RedisClusterClient.java
RedisClusterClient.connectPubSubToNodeAsync
<K, V> ConnectionFuture<StatefulRedisPubSubConnection<K, V>> connectPubSubToNodeAsync(RedisCodec<K, V> codec, String nodeId, Mono<SocketAddress> socketAddressSupplier) { assertNotNull(codec); assertNotEmpty(initialUris); LettuceAssert.notNull(socketAddressSupplier, "SocketAddressSu...
java
<K, V> ConnectionFuture<StatefulRedisPubSubConnection<K, V>> connectPubSubToNodeAsync(RedisCodec<K, V> codec, String nodeId, Mono<SocketAddress> socketAddressSupplier) { assertNotNull(codec); assertNotEmpty(initialUris); LettuceAssert.notNull(socketAddressSupplier, "SocketAddressSu...
[ "<", "K", ",", "V", ">", "ConnectionFuture", "<", "StatefulRedisPubSubConnection", "<", "K", ",", "V", ">", ">", "connectPubSubToNodeAsync", "(", "RedisCodec", "<", "K", ",", "V", ">", "codec", ",", "String", "nodeId", ",", "Mono", "<", "SocketAddress", ">...
Create a pub/sub connection to a redis socket address. @param codec Use this codec to encode/decode keys and values, must not be {@literal null} @param nodeId the nodeId @param socketAddressSupplier supplier for the socket address @param <K> Key type @param <V> Value type @return A new connection
[ "Create", "a", "pub", "/", "sub", "connection", "to", "a", "redis", "socket", "address", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/RedisClusterClient.java#L519-L549
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/util/Path.java
Path.getAbsoluteLevel
public static int getAbsoluteLevel(@NotNull String path, @NotNull ResourceResolver resourceResolver) { if (StringUtils.isEmpty(path) || StringUtils.equals(path, "/")) { return -1; } String originalPath = getOriginalPath(path, resourceResolver); return StringUtils.countMatches(originalPath, "/") - ...
java
public static int getAbsoluteLevel(@NotNull String path, @NotNull ResourceResolver resourceResolver) { if (StringUtils.isEmpty(path) || StringUtils.equals(path, "/")) { return -1; } String originalPath = getOriginalPath(path, resourceResolver); return StringUtils.countMatches(originalPath, "/") - ...
[ "public", "static", "int", "getAbsoluteLevel", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "ResourceResolver", "resourceResolver", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "path", ")", "||", "StringUtils", ".", "equals", "(", ...
Gets level from parent use same logic (but reverse) as {@link #getAbsoluteParent(Page, int, ResourceResolver)}. If the path is a version history or launch path the original path is returned. @param path Path @param resourceResolver Resource resolver @return level &gt;= 0 if path is valid, -1 if path is invalid
[ "Gets", "level", "from", "parent", "use", "same", "logic", "(", "but", "reverse", ")", "as", "{" ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/util/Path.java#L112-L118
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java
Arbitrator.arbitrationFinished
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationResult; // wait for arbitration listener to be registered if (arbitrationListenerSemaphore.tryAc...
java
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationResult; // wait for arbitration listener to be registered if (arbitrationListenerSemaphore.tryAc...
[ "protected", "void", "arbitrationFinished", "(", "ArbitrationStatus", "arbitrationStatus", ",", "ArbitrationResult", "arbitrationResult", ")", "{", "this", ".", "arbitrationStatus", "=", "arbitrationStatus", ";", "this", ".", "arbitrationResult", "=", "arbitrationResult", ...
Sets the arbitration result at the arbitrationListener if the listener is already registered
[ "Sets", "the", "arbitration", "result", "at", "the", "arbitrationListener", "if", "the", "listener", "is", "already", "registered" ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java#L153-L162
radkovo/jStyleParser
src/main/java/cz/vutbr/web/csskit/antlr4/CSSParserFactory.java
CSSParserFactory.encapsulateException
protected static CSSException encapsulateException(Throwable t, String msg) { log.error("THROWN:", t); return new CSSException(msg, t); }
java
protected static CSSException encapsulateException(Throwable t, String msg) { log.error("THROWN:", t); return new CSSException(msg, t); }
[ "protected", "static", "CSSException", "encapsulateException", "(", "Throwable", "t", ",", "String", "msg", ")", "{", "log", ".", "error", "(", "\"THROWN:\"", ",", "t", ")", ";", "return", "new", "CSSException", "(", "msg", ",", "t", ")", ";", "}" ]
Creates new CSSException which encapsulates cause @param t Cause @param msg Message @return New CSSException
[ "Creates", "new", "CSSException", "which", "encapsulates", "cause" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/csskit/antlr4/CSSParserFactory.java#L255-L258
google/closure-compiler
src/com/google/javascript/jscomp/ExpressionDecomposer.java
ExpressionDecomposer.canExposeExpression
DecompositionType canExposeExpression(Node subExpression) { Node expressionRoot = findExpressionRoot(subExpression); if (expressionRoot != null) { return isSubexpressionMovable(expressionRoot, subExpression); } return DecompositionType.UNDECOMPOSABLE; }
java
DecompositionType canExposeExpression(Node subExpression) { Node expressionRoot = findExpressionRoot(subExpression); if (expressionRoot != null) { return isSubexpressionMovable(expressionRoot, subExpression); } return DecompositionType.UNDECOMPOSABLE; }
[ "DecompositionType", "canExposeExpression", "(", "Node", "subExpression", ")", "{", "Node", "expressionRoot", "=", "findExpressionRoot", "(", "subExpression", ")", ";", "if", "(", "expressionRoot", "!=", "null", ")", "{", "return", "isSubexpressionMovable", "(", "ex...
Determines if {@code subExpression} can be moved before {@code expressionRoot} without changing the behaviour of the code, or if there is a rewriting that would make such motion possible. <p>Walks the AST from {@code subExpression} to {@code expressionRoot} and verifies that the portions of the {@code expressionRoot} ...
[ "Determines", "if", "{", "@code", "subExpression", "}", "can", "be", "moved", "before", "{", "@code", "expressionRoot", "}", "without", "changing", "the", "behaviour", "of", "the", "code", "or", "if", "there", "is", "a", "rewriting", "that", "would", "make",...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ExpressionDecomposer.java#L852-L858
fcrepo4-exts/fcrepo-camel-toolbox
fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java
AuditSparqlProcessor.serializedGraphForMessage
private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException { // serialize triples final ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream(); final Model model = createDefaultModel(); // get info from jms message hea...
java
private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException { // serialize triples final ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream(); final Model model = createDefaultModel(); // get info from jms message hea...
[ "private", "static", "String", "serializedGraphForMessage", "(", "final", "Message", "message", ",", "final", "Resource", "subject", ")", "throws", "IOException", "{", "// serialize triples", "final", "ByteArrayOutputStream", "serializedGraph", "=", "new", "ByteArrayOutpu...
Convert a Camel message to audit event description. @param message Camel message produced by an audit event @param subject RDF subject of the audit description
[ "Convert", "a", "Camel", "message", "to", "audit", "event", "description", "." ]
train
https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java#L120-L155
eclipse/xtext-core
org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java
SourceLevelURIsAdapter.setSourceLevelUrisWithoutCopy
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) { final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet); adapter.sourceLevelURIs = uris; }
java
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) { final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet); adapter.sourceLevelURIs = uris; }
[ "public", "static", "void", "setSourceLevelUrisWithoutCopy", "(", "final", "ResourceSet", "resourceSet", ",", "final", "Set", "<", "URI", ">", "uris", ")", "{", "final", "SourceLevelURIsAdapter", "adapter", "=", "SourceLevelURIsAdapter", ".", "findOrCreateAdapter", "(...
Installs the given set of URIs as the source level URIs. Does not copy the given set but uses it directly.
[ "Installs", "the", "given", "set", "of", "URIs", "as", "the", "source", "level", "URIs", ".", "Does", "not", "copy", "the", "given", "set", "but", "uses", "it", "directly", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java#L78-L81
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.checkNewWidgetsAvailable
public void checkNewWidgetsAvailable(final CmsUUID structureId, final AsyncCallback<Boolean> resultCallback) { CmsRpcAction<Boolean> action = new CmsRpcAction<Boolean>() { @Override public void execute() { start(200, false); getContainerpageService().ch...
java
public void checkNewWidgetsAvailable(final CmsUUID structureId, final AsyncCallback<Boolean> resultCallback) { CmsRpcAction<Boolean> action = new CmsRpcAction<Boolean>() { @Override public void execute() { start(200, false); getContainerpageService().ch...
[ "public", "void", "checkNewWidgetsAvailable", "(", "final", "CmsUUID", "structureId", ",", "final", "AsyncCallback", "<", "Boolean", ">", "resultCallback", ")", "{", "CmsRpcAction", "<", "Boolean", ">", "action", "=", "new", "CmsRpcAction", "<", "Boolean", ">", ...
Checks whether GWT widgets are available for all fields of a content.<p> @param structureId the structure id of the content @param resultCallback the callback for the result
[ "Checks", "whether", "GWT", "widgets", "are", "available", "for", "all", "fields", "of", "a", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L908-L930
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/methods/MethodIdentifier.java
MethodIdentifier.ofStatic
public static MethodIdentifier ofStatic(final String containingClass, final String methodName, final String returnType, final String... parameterTypes) { return of(containingClass, methodName, returnType, true, parameterTypes); }
java
public static MethodIdentifier ofStatic(final String containingClass, final String methodName, final String returnType, final String... parameterTypes) { return of(containingClass, methodName, returnType, true, parameterTypes); }
[ "public", "static", "MethodIdentifier", "ofStatic", "(", "final", "String", "containingClass", ",", "final", "String", "methodName", ",", "final", "String", "returnType", ",", "final", "String", "...", "parameterTypes", ")", "{", "return", "of", "(", "containingCl...
Creates an identifier of a static method. @param containingClass The class name @param methodName The method name @param returnType The return type @param parameterTypes The parameter types @return The method identifier
[ "Creates", "an", "identifier", "of", "a", "static", "method", "." ]
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/methods/MethodIdentifier.java#L173-L175
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.aliveToSubHealth
protected void aliveToSubHealth(ProviderInfo providerInfo, ClientTransport transport) { providerLock.lock(); try { if (aliveConnections.remove(providerInfo) != null) { subHealthConnections.put(providerInfo, transport); } } finally { providerLoc...
java
protected void aliveToSubHealth(ProviderInfo providerInfo, ClientTransport transport) { providerLock.lock(); try { if (aliveConnections.remove(providerInfo) != null) { subHealthConnections.put(providerInfo, transport); } } finally { providerLoc...
[ "protected", "void", "aliveToSubHealth", "(", "ProviderInfo", "providerInfo", ",", "ClientTransport", "transport", ")", "{", "providerLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "aliveConnections", ".", "remove", "(", "providerInfo", ")", "!=", "...
从存活丢到亚健康列表 @param providerInfo Provider @param transport 连接
[ "从存活丢到亚健康列表" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L198-L207
Bedework/bw-util
bw-util-timezones/src/main/java/org/bedework/util/timezones/DateTimeUtil.java
DateTimeUtil.fromRfcDateTime
@SuppressWarnings("unused") public static Date fromRfcDateTime(final String val) throws BadDateException { try { return fromRfcDateTime(val, Timezones.getDefaultTz()); } catch (BadDateException bde) { throw bde; } catch (Throwable t) { throw new BadDateException(); } }
java
@SuppressWarnings("unused") public static Date fromRfcDateTime(final String val) throws BadDateException { try { return fromRfcDateTime(val, Timezones.getDefaultTz()); } catch (BadDateException bde) { throw bde; } catch (Throwable t) { throw new BadDateException(); } }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "Date", "fromRfcDateTime", "(", "final", "String", "val", ")", "throws", "BadDateException", "{", "try", "{", "return", "fromRfcDateTime", "(", "val", ",", "Timezones", ".", "getDefaultTz", "("...
Get Date from "yyyy-MM-ddThh:mm:ss" @param val String "yyyy-MM-ddThh:mm:ss" @return Date @throws BadDateException on format error
[ "Get", "Date", "from", "yyyy", "-", "MM", "-", "ddThh", ":", "mm", ":", "ss" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-timezones/src/main/java/org/bedework/util/timezones/DateTimeUtil.java#L335-L344
Azure/azure-sdk-for-java
privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/RecordSetsInner.java
RecordSetsInner.listByTypeWithServiceResponseAsync
public Observable<ServiceResponse<Page<RecordSetInner>>> listByTypeWithServiceResponseAsync(final String resourceGroupName, final String privateZoneName, final RecordType recordType) { return listByTypeSinglePageAsync(resourceGroupName, privateZoneName, recordType) .concatMap(new Func1<ServiceRespon...
java
public Observable<ServiceResponse<Page<RecordSetInner>>> listByTypeWithServiceResponseAsync(final String resourceGroupName, final String privateZoneName, final RecordType recordType) { return listByTypeSinglePageAsync(resourceGroupName, privateZoneName, recordType) .concatMap(new Func1<ServiceRespon...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "RecordSetInner", ">", ">", ">", "listByTypeWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "privateZoneName", ",", "final", "RecordType", "recordType", "...
Lists the record sets of a specified type in a Private DNS zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @param recordType The type of record sets to enumerate. Possible values include: 'A', 'AAAA', 'CNAME', 'MX', 'PT...
[ "Lists", "the", "record", "sets", "of", "a", "specified", "type", "in", "a", "Private", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/RecordSetsInner.java#L902-L914
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java
ConcurrentUtils.createIfAbsent
public static <K, V> V createIfAbsent(final ConcurrentMap<K, V> map, final K key, final ConcurrentInitializer<V> init) throws ConcurrentException { if (map == null || init == null) { return null; } final V value = map.get(key); if (value == null) { re...
java
public static <K, V> V createIfAbsent(final ConcurrentMap<K, V> map, final K key, final ConcurrentInitializer<V> init) throws ConcurrentException { if (map == null || init == null) { return null; } final V value = map.get(key); if (value == null) { re...
[ "public", "static", "<", "K", ",", "V", ">", "V", "createIfAbsent", "(", "final", "ConcurrentMap", "<", "K", ",", "V", ">", "map", ",", "final", "K", "key", ",", "final", "ConcurrentInitializer", "<", "V", ">", "init", ")", "throws", "ConcurrentException...
Checks if a concurrent map contains a key and creates a corresponding value if not. This method first checks the presence of the key in the given map. If it is already contained, its value is returned. Otherwise the {@code get()} method of the passed in {@link ConcurrentInitializer} is called. With the resulting object...
[ "Checks", "if", "a", "concurrent", "map", "contains", "a", "key", "and", "creates", "a", "corresponding", "value", "if", "not", ".", "This", "method", "first", "checks", "the", "presence", "of", "the", "key", "in", "the", "given", "map", ".", "If", "it",...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java#L274-L285
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java
BaseNodeMatcher.parseFormula
protected ArrayList<ArrayList<String>> parseFormula(HashMap<IAtomicConceptOfLabel, String> hashConceptNumber, Map<String, IAtomicConceptOfLabel> acolsMap, INode node) { ArrayList<ArrayList<String>> representation = new ArrayList<ArrayList<String>>(); ...
java
protected ArrayList<ArrayList<String>> parseFormula(HashMap<IAtomicConceptOfLabel, String> hashConceptNumber, Map<String, IAtomicConceptOfLabel> acolsMap, INode node) { ArrayList<ArrayList<String>> representation = new ArrayList<ArrayList<String>>(); ...
[ "protected", "ArrayList", "<", "ArrayList", "<", "String", ">", ">", "parseFormula", "(", "HashMap", "<", "IAtomicConceptOfLabel", ",", "String", ">", "hashConceptNumber", ",", "Map", "<", "String", ",", "IAtomicConceptOfLabel", ">", "acolsMap", ",", "INode", "n...
Parses a c@node formula replacing references to acols with references to the DIMACS variables. Uses and depends on CNF representation which is "conjunction of disjunctions", that is the first level list represents conjunction of second-level lists representing disjunction clauses. @param hashConceptNumber HashMap aco...
[ "Parses", "a", "c@node", "formula", "replacing", "references", "to", "acols", "with", "references", "to", "the", "DIMACS", "variables", ".", "Uses", "and", "depends", "on", "CNF", "representation", "which", "is", "conjunction", "of", "disjunctions", "that", "is"...
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/node/BaseNodeMatcher.java#L172-L200
glyptodon/guacamole-client
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java
UserCredentials.setValue
public String setValue(Field field, String value) { return setValue(field.getName(), value); }
java
public String setValue(Field field, String value) { return setValue(field.getName(), value); }
[ "public", "String", "setValue", "(", "Field", "field", ",", "String", "value", ")", "{", "return", "setValue", "(", "field", ".", "getName", "(", ")", ",", "value", ")", ";", "}" ]
Sets the value of the given field. Any existing value for that field is replaced. @param field The field whose value should be assigned. @param value The value to assign to the given field. @return The previous value of the field, or null if the value of the field was not previously defined.
[ "Sets", "the", "value", "of", "the", "given", "field", ".", "Any", "existing", "value", "for", "that", "field", "is", "replaced", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java#L182-L184
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/ImmatureClass.java
ImmatureClass.checkIDEGeneratedParmNames
private void checkIDEGeneratedParmNames(JavaClass cls) { for (Method m : cls.getMethods()) { if (isIDEGeneratedMethodWithCode(m)) { bugReporter.reportBug( new BugInstance(this, BugType.IMC_IMMATURE_CLASS_IDE_GENERATED_PARAMETER_NAMES.name(), NORMAL_PRIORITY).addClass(cls).addMethod(cls, m)); ...
java
private void checkIDEGeneratedParmNames(JavaClass cls) { for (Method m : cls.getMethods()) { if (isIDEGeneratedMethodWithCode(m)) { bugReporter.reportBug( new BugInstance(this, BugType.IMC_IMMATURE_CLASS_IDE_GENERATED_PARAMETER_NAMES.name(), NORMAL_PRIORITY).addClass(cls).addMethod(cls, m)); ...
[ "private", "void", "checkIDEGeneratedParmNames", "(", "JavaClass", "cls", ")", "{", "for", "(", "Method", "m", ":", "cls", ".", "getMethods", "(", ")", ")", "{", "if", "(", "isIDEGeneratedMethodWithCode", "(", "m", ")", ")", "{", "bugReporter", ".", "repor...
looks for methods that have it's parameters all follow the form arg0, arg1, arg2, or parm0, parm1, parm2 etc, where the method actually has code in it @param cls the class to check
[ "looks", "for", "methods", "that", "have", "it", "s", "parameters", "all", "follow", "the", "form", "arg0", "arg1", "arg2", "or", "parm0", "parm1", "parm2", "etc", "where", "the", "method", "actually", "has", "code", "in", "it" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/ImmatureClass.java#L377-L386
VueGWT/vue-gwt
processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java
ComponentExposedTypeGenerator.processWatcher
private void processWatcher(MethodSpec.Builder createdMethodBuilder, ExecutableElement method) { Watch watch = method.getAnnotation(Watch.class); String exposedMethodName = exposeExistingJavaMethodToJs(method); String watcherTriggerMethodName = addNewMethodToProto(); MethodSpec.Builder watcherMethodBu...
java
private void processWatcher(MethodSpec.Builder createdMethodBuilder, ExecutableElement method) { Watch watch = method.getAnnotation(Watch.class); String exposedMethodName = exposeExistingJavaMethodToJs(method); String watcherTriggerMethodName = addNewMethodToProto(); MethodSpec.Builder watcherMethodBu...
[ "private", "void", "processWatcher", "(", "MethodSpec", ".", "Builder", "createdMethodBuilder", ",", "ExecutableElement", "method", ")", "{", "Watch", "watch", "=", "method", ".", "getAnnotation", "(", "Watch", ".", "class", ")", ";", "String", "exposedMethodName"...
Process a watcher from the Component Class. @param createdMethodBuilder Builder for the created hook method @param method The method we are currently processing
[ "Process", "a", "watcher", "from", "the", "Component", "Class", "." ]
train
https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L465-L494
derari/cthul
objects/src/main/java/org/cthul/objects/reflection/Signatures.java
Signatures.bestMethod
public static Method bestMethod(Method[] methods, Class<?>[] argTypes) throws AmbiguousMethodMatchException { try { return best(methods, collectSignatures(methods), collectVarArgs(methods), argTypes); } catch (AmbiguousSignatureMatchException e) { throw new AmbiguousMethodMat...
java
public static Method bestMethod(Method[] methods, Class<?>[] argTypes) throws AmbiguousMethodMatchException { try { return best(methods, collectSignatures(methods), collectVarArgs(methods), argTypes); } catch (AmbiguousSignatureMatchException e) { throw new AmbiguousMethodMat...
[ "public", "static", "Method", "bestMethod", "(", "Method", "[", "]", "methods", ",", "Class", "<", "?", ">", "[", "]", "argTypes", ")", "throws", "AmbiguousMethodMatchException", "{", "try", "{", "return", "best", "(", "methods", ",", "collectSignatures", "(...
Selects the best method for the given argument types. @param methods @param argTypes @return method @throws AmbiguousSignatureMatchException if multiple methods match equally
[ "Selects", "the", "best", "method", "for", "the", "given", "argument", "types", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/reflection/Signatures.java#L161-L167
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java
VimGenerator2.appendRegion
@SuppressWarnings("static-method") protected IStyleAppendable appendRegion(IStyleAppendable it, boolean addNewLine, String name, String start, String[] end, String... contains) { it.append("syn region "); //$NON-NLS-1$ it.append(name); it.append(" start="); //$NON-NLS-1$ it.append(regexString(start)); for (...
java
@SuppressWarnings("static-method") protected IStyleAppendable appendRegion(IStyleAppendable it, boolean addNewLine, String name, String start, String[] end, String... contains) { it.append("syn region "); //$NON-NLS-1$ it.append(name); it.append(" start="); //$NON-NLS-1$ it.append(regexString(start)); for (...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "IStyleAppendable", "appendRegion", "(", "IStyleAppendable", "it", ",", "boolean", "addNewLine", ",", "String", "name", ",", "String", "start", ",", "String", "[", "]", "end", ",", "String", "....
Append a Vim region. @param it the receiver of the generated elements. @param addNewLine indicates if a new line must be appended. @param name the name of the pattern. @param start the start pattern. @param end the end pattern. @param contains the contained elements. @return {@code it}.
[ "Append", "a", "Vim", "region", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java#L414-L434
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/provider/HdfsBasedUpdateProvider.java
HdfsBasedUpdateProvider.getUpdateTime
@Override public long getUpdateTime(Partition partition) throws UpdateNotFoundException { try { return getUpdateTime(partition.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s", partition.getCompleteName()), ...
java
@Override public long getUpdateTime(Partition partition) throws UpdateNotFoundException { try { return getUpdateTime(partition.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s", partition.getCompleteName()), ...
[ "@", "Override", "public", "long", "getUpdateTime", "(", "Partition", "partition", ")", "throws", "UpdateNotFoundException", "{", "try", "{", "return", "getUpdateTime", "(", "partition", ".", "getDataLocation", "(", ")", ")", ";", "}", "catch", "(", "IOException...
Get the update time of a {@link Partition} @return the update time if available, 0 otherwise {@inheritDoc} @see HiveUnitUpdateProvider#getUpdateTime(org.apache.hadoop.hive.ql.metadata.Partition)
[ "Get", "the", "update", "time", "of", "a", "{", "@link", "Partition", "}" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/provider/HdfsBasedUpdateProvider.java#L56-L65
Mthwate/DatLib
src/main/java/com/mthwate/datlib/math/MathUtils.java
MathUtils.gcd
public static BigInteger gcd(BigInteger a, BigInteger b) { return gcd(a, b, Calculator.BIG_INTEGER_CALCULATOR); }
java
public static BigInteger gcd(BigInteger a, BigInteger b) { return gcd(a, b, Calculator.BIG_INTEGER_CALCULATOR); }
[ "public", "static", "BigInteger", "gcd", "(", "BigInteger", "a", ",", "BigInteger", "b", ")", "{", "return", "gcd", "(", "a", ",", "b", ",", "Calculator", ".", "BIG_INTEGER_CALCULATOR", ")", ";", "}" ]
Gets the greatest common divisor of 2 numbers. @since 1.3 @param a the first BigInteger @param b the second BigInteger @return the greatest common divisor as a BigInteger
[ "Gets", "the", "greatest", "common", "divisor", "of", "2", "numbers", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/math/MathUtils.java#L47-L49
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataUnionOfImpl_CustomFieldSerializer.java
OWLDataUnionOfImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDataUnionOfImpl instance) throws SerializationException { deserialize(streamReader, instance); }
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDataUnionOfImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDataUnionOfImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataUnionOfImpl_CustomFieldSerializer.java#L89-L92
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getDiscussionPage
public Page getDiscussionPage(Page articlePage) throws WikiApiException{ String articleTitle = articlePage.getTitle().toString(); if(articleTitle.startsWith(WikiConstants.DISCUSSION_PREFIX)){ return articlePage; }else{ return new Page(this, WikiConstants.DISCUSSION_PREFIX+articleTitle); ...
java
public Page getDiscussionPage(Page articlePage) throws WikiApiException{ String articleTitle = articlePage.getTitle().toString(); if(articleTitle.startsWith(WikiConstants.DISCUSSION_PREFIX)){ return articlePage; }else{ return new Page(this, WikiConstants.DISCUSSION_PREFIX+articleTitle); ...
[ "public", "Page", "getDiscussionPage", "(", "Page", "articlePage", ")", "throws", "WikiApiException", "{", "String", "articleTitle", "=", "articlePage", ".", "getTitle", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "articleTitle", ".", "startsWith", "(...
Gets the discussion page for the given article page The provided page must not be a discussion page @param articlePage the article page for which a discussion page should be retrieved @return The discussion page object for the given article page object @throws WikiApiException If no page or redirect with this title ex...
[ "Gets", "the", "discussion", "page", "for", "the", "given", "article", "page", "The", "provided", "page", "must", "not", "be", "a", "discussion", "page" ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L303-L310
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RunnableUtils.java
RunnableUtils.runWithSleepUninterrupted
public static boolean runWithSleepUninterrupted(long milliseconds, Runnable runnable) { Assert.isTrue(milliseconds > 0, "Milliseconds [%d] must be greater than 0", milliseconds); runnable.run(); return safeSleep(milliseconds); }
java
public static boolean runWithSleepUninterrupted(long milliseconds, Runnable runnable) { Assert.isTrue(milliseconds > 0, "Milliseconds [%d] must be greater than 0", milliseconds); runnable.run(); return safeSleep(milliseconds); }
[ "public", "static", "boolean", "runWithSleepUninterrupted", "(", "long", "milliseconds", ",", "Runnable", "runnable", ")", "{", "Assert", ".", "isTrue", "(", "milliseconds", ">", "0", ",", "\"Milliseconds [%d] must be greater than 0\"", ",", "milliseconds", ")", ";", ...
Runs the given {@link Runnable} object and then causes the current, calling {@link Thread} to sleep for the given number of milliseconds. This utility method sleeps uninterrupted, resetting the interrupt bit if the current, calling {@link Thread} is interrupted during sleep. This utility method can be used to simulat...
[ "Runs", "the", "given", "{", "@link", "Runnable", "}", "object", "and", "then", "causes", "the", "current", "calling", "{", "@link", "Thread", "}", "to", "sleep", "for", "the", "given", "number", "of", "milliseconds", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RunnableUtils.java#L104-L111
roboconf/roboconf-platform
core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackIaasHandler.java
OpenstackIaasHandler.expandVolumeName
static String expandVolumeName( String nameTemplate, String appName, String instanceName ) { String name = nameTemplate.replace( TPL_VOLUME_NAME, instanceName ); name = name.replace( TPL_VOLUME_APP, appName ); name = name.replaceAll( "[\\W_-]", "-" ); return name; }
java
static String expandVolumeName( String nameTemplate, String appName, String instanceName ) { String name = nameTemplate.replace( TPL_VOLUME_NAME, instanceName ); name = name.replace( TPL_VOLUME_APP, appName ); name = name.replaceAll( "[\\W_-]", "-" ); return name; }
[ "static", "String", "expandVolumeName", "(", "String", "nameTemplate", ",", "String", "appName", ",", "String", "instanceName", ")", "{", "String", "name", "=", "nameTemplate", ".", "replace", "(", "TPL_VOLUME_NAME", ",", "instanceName", ")", ";", "name", "=", ...
Updates a volume name by replacing template variables. @param nameTemplate (not null) @param appName (not null) @param instanceName (not null) @return a non-null string
[ "Updates", "a", "volume", "name", "by", "replacing", "template", "variables", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackIaasHandler.java#L532-L539
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java
HsqlDatabaseProperties.setURLProperties
public void setURLProperties(HsqlProperties p) { if (p != null) { for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) { String propertyName = (String) e.nextElement(); Object[] row = (Object[]) meta.get(propertyName); if (row !=...
java
public void setURLProperties(HsqlProperties p) { if (p != null) { for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) { String propertyName = (String) e.nextElement(); Object[] row = (Object[]) meta.get(propertyName); if (row !=...
[ "public", "void", "setURLProperties", "(", "HsqlProperties", "p", ")", "{", "if", "(", "p", "!=", "null", ")", "{", "for", "(", "Enumeration", "e", "=", "p", ".", "propertyNames", "(", ")", ";", "e", ".", "hasMoreElements", "(", ")", ";", ")", "{", ...
overload file database properties with any passed on URL line do not store password etc
[ "overload", "file", "database", "properties", "with", "any", "passed", "on", "URL", "line", "do", "not", "store", "password", "etc" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java#L551-L568
GoogleCloudPlatform/bigdata-interop
util/src/main/java/com/google/cloud/hadoop/util/HttpTransportFactory.java
HttpTransportFactory.parseProxyAddress
@VisibleForTesting static URI parseProxyAddress(@Nullable String proxyAddress) { if (Strings.isNullOrEmpty(proxyAddress)) { return null; } String uriString = (proxyAddress.contains("//") ? "" : "//") + proxyAddress; try { URI uri = new URI(uriString); String scheme = uri.getScheme();...
java
@VisibleForTesting static URI parseProxyAddress(@Nullable String proxyAddress) { if (Strings.isNullOrEmpty(proxyAddress)) { return null; } String uriString = (proxyAddress.contains("//") ? "" : "//") + proxyAddress; try { URI uri = new URI(uriString); String scheme = uri.getScheme();...
[ "@", "VisibleForTesting", "static", "URI", "parseProxyAddress", "(", "@", "Nullable", "String", "proxyAddress", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "proxyAddress", ")", ")", "{", "return", "null", ";", "}", "String", "uriString", "=", ...
Parse an HTTP proxy from a String address. @param proxyAddress The address of the proxy of the form (https?://)HOST:PORT. @return The URI of the proxy. @throws IllegalArgumentException If the address is invalid.
[ "Parse", "an", "HTTP", "proxy", "from", "a", "String", "address", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/HttpTransportFactory.java#L208-L232
OpenLiberty/open-liberty
dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java
IFixCompareCommandTask.readAparCsvFromExtractedInstall
private Set<String> readAparCsvFromExtractedInstall(File installLocation) throws ZipException, IOException { // Extracted, means we can open up the zip containing the APAR CSV file // and get the entry for it File fixesFolder = new File(installLocation, APAR_FIX_PACK_ZIP_LOCATION); final...
java
private Set<String> readAparCsvFromExtractedInstall(File installLocation) throws ZipException, IOException { // Extracted, means we can open up the zip containing the APAR CSV file // and get the entry for it File fixesFolder = new File(installLocation, APAR_FIX_PACK_ZIP_LOCATION); final...
[ "private", "Set", "<", "String", ">", "readAparCsvFromExtractedInstall", "(", "File", "installLocation", ")", "throws", "ZipException", ",", "IOException", "{", "// Extracted, means we can open up the zip containing the APAR CSV file", "// and get the entry for it", "File", "fixe...
This will load the APAR archive within the extracted file at the <code>installLocation</code> and obtain the CSV file within it that lists the APAR ids. @param installLocation The location of the archive install file @return The contents of the CSV file or <code>null</code> if the file doesn't exist or is empty @throw...
[ "This", "will", "load", "the", "APAR", "archive", "within", "the", "extracted", "file", "at", "the", "<code", ">", "installLocation<", "/", "code", ">", "and", "obtain", "the", "CSV", "file", "within", "it", "that", "lists", "the", "APAR", "ids", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java#L683-L721
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PubSubInputHandler.java
PubSubInputHandler.sendFlushedMessage
@Override public void sendFlushedMessage(SIBUuid8 ignore, SIBUuid12 streamID) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "sendFlushedMessage", new Object[] { streamID }); // This flush should be broadcast to all down...
java
@Override public void sendFlushedMessage(SIBUuid8 ignore, SIBUuid12 streamID) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "sendFlushedMessage", new Object[] { streamID }); // This flush should be broadcast to all down...
[ "@", "Override", "public", "void", "sendFlushedMessage", "(", "SIBUuid8", "ignore", ",", "SIBUuid12", "streamID", ")", "throws", "SIResourceException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ...
/* (non-Javadoc) @see com.ibm.ws.sib.processor.impl.interfaces.DownstreamControl#sendFlushedMessage(com.ibm.ws.sib.utils.SIBUuid12) This is only called from attemptFlush() as flushQuery's are processed by the PubSubOuputHandler
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PubSubInputHandler.java#L3198-L3236
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/util/KeyUtils.java
KeyUtils.isNull
public static boolean isNull(byte[] key, int length) { if (key == null) { return true; } for (int i = 0; i < Math.min(key.length, length); i++) { if (key[i] != 0) { return false; } } return true; }
java
public static boolean isNull(byte[] key, int length) { if (key == null) { return true; } for (int i = 0; i < Math.min(key.length, length); i++) { if (key[i] != 0) { return false; } } return true; }
[ "public", "static", "boolean", "isNull", "(", "byte", "[", "]", "key", ",", "int", "length", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", "true", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "Math", ".", "min", ...
Checks if the elements of the given key up the given length are 0, or the whole array is null. @param key @param length @return true, if the key is null or all elements in the array are 0.
[ "Checks", "if", "the", "elements", "of", "the", "given", "key", "up", "the", "given", "length", "are", "0", "or", "the", "whole", "array", "is", "null", "." ]
train
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/util/KeyUtils.java#L50-L60
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.processSelectGroup
protected <T> T processSelectGroup(T obj, String groupName, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException { Session session = null; T result = null; try { session = getReadSession(); result = processSelectGroup(...
java
protected <T> T processSelectGroup(T obj, String groupName, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException { Session session = null; T result = null; try { session = getReadSession(); result = processSelectGroup(...
[ "protected", "<", "T", ">", "T", "processSelectGroup", "(", "T", "obj", ",", "String", "groupName", ",", "Collection", "<", "CpoWhere", ">", "wheres", ",", "Collection", "<", "CpoOrderBy", ">", "orderBy", ",", "Collection", "<", "CpoNativeFunction", ">", "na...
Retrieves the Object from the datasource. @param obj This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. The input object is used to specify the search criteria. @param groupName The name which identifies which RE...
[ "Retrieves", "the", "Object", "from", "the", "datasource", "." ]
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L2185-L2197
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.deleteIndex
public void deleteIndex(String indexName, String designDocId, String type) { assertNotEmpty(indexName, "indexName"); assertNotEmpty(designDocId, "designDocId"); assertNotNull(type, "type"); if (!designDocId.startsWith("_design")) { designDocId = "_design/" + designDocId; ...
java
public void deleteIndex(String indexName, String designDocId, String type) { assertNotEmpty(indexName, "indexName"); assertNotEmpty(designDocId, "designDocId"); assertNotNull(type, "type"); if (!designDocId.startsWith("_design")) { designDocId = "_design/" + designDocId; ...
[ "public", "void", "deleteIndex", "(", "String", "indexName", ",", "String", "designDocId", ",", "String", "type", ")", "{", "assertNotEmpty", "(", "indexName", ",", "\"indexName\"", ")", ";", "assertNotEmpty", "(", "designDocId", ",", "\"designDocId\"", ")", ";"...
Delete an index with the specified name and type in the given design document. @param indexName name of the index @param designDocId ID of the design doc (the _design prefix will be added if not present) @param type type of the index, valid values or "text" or "json"
[ "Delete", "an", "index", "with", "the", "specified", "name", "and", "type", "in", "the", "given", "design", "document", "." ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L604-L621
alipay/sofa-rpc
extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java
UserThreadPoolManager.registerUserThread
public static synchronized void registerUserThread(String service, UserThreadPool userThreadPool) { if (userThreadMap == null) { userThreadMap = new ConcurrentHashMap<String, UserThreadPool>(); } userThreadMap.put(service, userThreadPool); }
java
public static synchronized void registerUserThread(String service, UserThreadPool userThreadPool) { if (userThreadMap == null) { userThreadMap = new ConcurrentHashMap<String, UserThreadPool>(); } userThreadMap.put(service, userThreadPool); }
[ "public", "static", "synchronized", "void", "registerUserThread", "(", "String", "service", ",", "UserThreadPool", "userThreadPool", ")", "{", "if", "(", "userThreadMap", "==", "null", ")", "{", "userThreadMap", "=", "new", "ConcurrentHashMap", "<", "String", ",",...
给某个服务分配到独立的线程池 @param service 服务唯一名 @param userThreadPool 自定义线程池
[ "给某个服务分配到独立的线程池" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java#L51-L56
UrielCh/ovh-java-sdk
ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java
ApiOvhMsServices.serviceName_account_userPrincipalName_exchange_PUT
public void serviceName_account_userPrincipalName_exchange_PUT(String serviceName, String userPrincipalName, OvhExchangeInformation body) throws IOException { String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/exchange"; StringBuilder sb = path(qPath, serviceName, userPrincipalName); exec(qPath...
java
public void serviceName_account_userPrincipalName_exchange_PUT(String serviceName, String userPrincipalName, OvhExchangeInformation body) throws IOException { String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/exchange"; StringBuilder sb = path(qPath, serviceName, userPrincipalName); exec(qPath...
[ "public", "void", "serviceName_account_userPrincipalName_exchange_PUT", "(", "String", "serviceName", ",", "String", "userPrincipalName", ",", "OvhExchangeInformation", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/msServices/{serviceName}/account/{user...
Alter this object properties REST: PUT /msServices/{serviceName}/account/{userPrincipalName}/exchange @param body [required] New object properties @param serviceName [required] The internal name of your Active Directory organization @param userPrincipalName [required] User Principal Name API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java#L403-L407
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java
SignatureUtil.scanTypeVariableSignature
private static int scanTypeVariableSignature(String string, int start) { // need a minimum 3 chars "Tx;" if (start >= string.length() - 2) { throw new IllegalArgumentException(); } // must start in "T" char c = string.charAt(start); if (c != C_TYPE_VARIABLE) { throw new IllegalArgumentException(); }...
java
private static int scanTypeVariableSignature(String string, int start) { // need a minimum 3 chars "Tx;" if (start >= string.length() - 2) { throw new IllegalArgumentException(); } // must start in "T" char c = string.charAt(start); if (c != C_TYPE_VARIABLE) { throw new IllegalArgumentException(); }...
[ "private", "static", "int", "scanTypeVariableSignature", "(", "String", "string", ",", "int", "start", ")", "{", "// need a minimum 3 chars \"Tx;\"", "if", "(", "start", ">=", "string", ".", "length", "(", ")", "-", "2", ")", "{", "throw", "new", "IllegalArgum...
Scans the given string for a type variable signature starting at the given index and returns the index of the last character. <pre> TypeVariableSignature: <b>T</b> Identifier <b>;</b> </pre> @param string the signature string @param start the 0-based character index of the first character @return the 0-based character...
[ "Scans", "the", "given", "string", "for", "a", "type", "variable", "signature", "starting", "at", "the", "given", "index", "and", "returns", "the", "index", "of", "the", "last", "character", ".", "<pre", ">", "TypeVariableSignature", ":", "<b", ">", "T<", ...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java#L307-L324
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findByShippingAddressId
@Override public List<CommerceOrder> findByShippingAddressId(long shippingAddressId, int start, int end) { return findByShippingAddressId(shippingAddressId, start, end, null); }
java
@Override public List<CommerceOrder> findByShippingAddressId(long shippingAddressId, int start, int end) { return findByShippingAddressId(shippingAddressId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findByShippingAddressId", "(", "long", "shippingAddressId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByShippingAddressId", "(", "shippingAddressId", ",", "start", ",", "end", ...
Returns a range of all the commerce orders where shippingAddressId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in t...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "orders", "where", "shippingAddressId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L3053-L3057
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/internal/injection/registry/OSGiServiceRegistryProxyTargetLocator.java
OSGiServiceRegistryProxyTargetLocator.fetchReferences
public ServiceReference<?>[] fetchReferences() { try { LOGGER.debug("Try to locate a suitable service for objectClass = " + serviceInterface + " and filter = " + filterString); return bundleContext.getAllServiceReferences(serviceInterface, filterString); } cat...
java
public ServiceReference<?>[] fetchReferences() { try { LOGGER.debug("Try to locate a suitable service for objectClass = " + serviceInterface + " and filter = " + filterString); return bundleContext.getAllServiceReferences(serviceInterface, filterString); } cat...
[ "public", "ServiceReference", "<", "?", ">", "[", "]", "fetchReferences", "(", ")", "{", "try", "{", "LOGGER", ".", "debug", "(", "\"Try to locate a suitable service for objectClass = \"", "+", "serviceInterface", "+", "\" and filter = \"", "+", "filterString", ")", ...
<p>fetchReferences.</p> @return an array of {@link org.osgi.framework.ServiceReference} objects.
[ "<p", ">", "fetchReferences", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/injection/registry/OSGiServiceRegistryProxyTargetLocator.java#L101-L110
citiususc/hipster
hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/ScalarOperation.java
ScalarOperation.doubleMultiplicationOp
public static ScalarOperation<Double> doubleMultiplicationOp() { return new ScalarOperation<Double>(new ScalarFunction<Double>() { @Override public Double scale(Double a, double b) { return a * b; } }, 1d); }
java
public static ScalarOperation<Double> doubleMultiplicationOp() { return new ScalarOperation<Double>(new ScalarFunction<Double>() { @Override public Double scale(Double a, double b) { return a * b; } }, 1d); }
[ "public", "static", "ScalarOperation", "<", "Double", ">", "doubleMultiplicationOp", "(", ")", "{", "return", "new", "ScalarOperation", "<", "Double", ">", "(", "new", "ScalarFunction", "<", "Double", ">", "(", ")", "{", "@", "Override", "public", "Double", ...
Builds the scaling operation for Doubles, that is the multiplying operation for the factor. @return {@link ScalarOperation} for Double
[ "Builds", "the", "scaling", "operation", "for", "Doubles", "that", "is", "the", "multiplying", "operation", "for", "the", "factor", "." ]
train
https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/ScalarOperation.java#L53-L62
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/io/ColumnTypeDetector.java
ColumnTypeDetector.detectType
private ColumnType detectType(List<String> valuesList, ReadOptions options) { CopyOnWriteArrayList<AbstractColumnParser<?>> parsers = new CopyOnWriteArrayList<>(getParserList(typeArray, options)); CopyOnWriteArrayList<ColumnType> typeCandidates = new CopyOnWriteArrayList<>(typeArray); for (St...
java
private ColumnType detectType(List<String> valuesList, ReadOptions options) { CopyOnWriteArrayList<AbstractColumnParser<?>> parsers = new CopyOnWriteArrayList<>(getParserList(typeArray, options)); CopyOnWriteArrayList<ColumnType> typeCandidates = new CopyOnWriteArrayList<>(typeArray); for (St...
[ "private", "ColumnType", "detectType", "(", "List", "<", "String", ">", "valuesList", ",", "ReadOptions", "options", ")", "{", "CopyOnWriteArrayList", "<", "AbstractColumnParser", "<", "?", ">", ">", "parsers", "=", "new", "CopyOnWriteArrayList", "<>", "(", "get...
Returns a predicted ColumnType derived by analyzing the given list of undifferentiated strings read from a column in the file and applying the given Locale and options
[ "Returns", "a", "predicted", "ColumnType", "derived", "by", "analyzing", "the", "given", "list", "of", "undifferentiated", "strings", "read", "from", "a", "column", "in", "the", "file", "and", "applying", "the", "given", "Locale", "and", "options" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/io/ColumnTypeDetector.java#L161-L176
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.getTime
public static final Date getTime(byte[] data, int offset) { int time = getShort(data, offset) / 10; Calendar cal = DateHelper.popCalendar(EPOCH_DATE); cal.set(Calendar.HOUR_OF_DAY, (time / 60)); cal.set(Calendar.MINUTE, (time % 60)); cal.set(Calendar.SECOND, 0); cal.set(Calendar.M...
java
public static final Date getTime(byte[] data, int offset) { int time = getShort(data, offset) / 10; Calendar cal = DateHelper.popCalendar(EPOCH_DATE); cal.set(Calendar.HOUR_OF_DAY, (time / 60)); cal.set(Calendar.MINUTE, (time % 60)); cal.set(Calendar.SECOND, 0); cal.set(Calendar.M...
[ "public", "static", "final", "Date", "getTime", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "int", "time", "=", "getShort", "(", "data", ",", "offset", ")", "/", "10", ";", "Calendar", "cal", "=", "DateHelper", ".", "popCalendar", ...
Reads a time value. The time is represented as tenths of a minute since midnight. @param data byte array of data @param offset location of data as offset into the array @return time value
[ "Reads", "a", "time", "value", ".", "The", "time", "is", "represented", "as", "tenths", "of", "a", "minute", "since", "midnight", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L337-L347
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java
FilterQuery.addRangeFilter
public <T> void addRangeFilter(String field, T minValue, T maxValue){ if(minValue instanceof String){ if(StringUtils.isEmpty(field) || StringUtils.isEmpty((String) minValue) || StringUtils.isEmpty((String) maxValue)){ throw new IllegalArgumentException("Expected all attributes to be ...
java
public <T> void addRangeFilter(String field, T minValue, T maxValue){ if(minValue instanceof String){ if(StringUtils.isEmpty(field) || StringUtils.isEmpty((String) minValue) || StringUtils.isEmpty((String) maxValue)){ throw new IllegalArgumentException("Expected all attributes to be ...
[ "public", "<", "T", ">", "void", "addRangeFilter", "(", "String", "field", ",", "T", "minValue", ",", "T", "maxValue", ")", "{", "if", "(", "minValue", "instanceof", "String", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "field", ")", "||",...
Alternative to filter, which accepts a range of items to filter. For instance, the field might be a year, and minValue 2000 and maxValue 2009 this filter will return records between the supplied ranges (inclusive) @param field @param minValue @param maxValue
[ "Alternative", "to", "filter", "which", "accepts", "a", "range", "of", "items", "to", "filter", ".", "For", "instance", "the", "field", "might", "be", "a", "year", "and", "minValue", "2000", "and", "maxValue", "2009", "this", "filter", "will", "return", "r...
train
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java#L119-L131
javers/javers
javers-core/src/main/java/org/javers/common/properties/PropertyConfiguration.java
PropertyConfiguration.getEnumProperty
public <T extends Enum<T>> T getEnumProperty(String propertyKey, Class<T> enumType) { return PropertiesUtil.getEnumProperty(properties, propertyKey, enumType); }
java
public <T extends Enum<T>> T getEnumProperty(String propertyKey, Class<T> enumType) { return PropertiesUtil.getEnumProperty(properties, propertyKey, enumType); }
[ "public", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnumProperty", "(", "String", "propertyKey", ",", "Class", "<", "T", ">", "enumType", ")", "{", "return", "PropertiesUtil", ".", "getEnumProperty", "(", "properties", ",", "propertyKey", "...
assembles mandatory enum property from {@link #properties} bag @throws JaversException UNDEFINED_PROPERTY @throws JaversException MALFORMED_PROPERTY
[ "assembles", "mandatory", "enum", "property", "from", "{" ]
train
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/properties/PropertyConfiguration.java#L33-L35
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultQueryLogEntryCreator.java
DefaultQueryLogEntryCreator.writeResultEntry
protected void writeResultEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("Success:"); sb.append(execInfo.isSuccess() ? "True" : "False"); sb.append(", "); }
java
protected void writeResultEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("Success:"); sb.append(execInfo.isSuccess() ? "True" : "False"); sb.append(", "); }
[ "protected", "void", "writeResultEntry", "(", "StringBuilder", "sb", ",", "ExecutionInfo", "execInfo", ",", "List", "<", "QueryInfo", ">", "queryInfoList", ")", "{", "sb", ".", "append", "(", "\"Success:\"", ")", ";", "sb", ".", "append", "(", "execInfo", "....
Write query result whether successful or not. <p>default: Success: True, @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list @since 1.3.3
[ "Write", "query", "result", "whether", "successful", "or", "not", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultQueryLogEntryCreator.java#L142-L146
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.removeNode
private void removeNode(NodeId node, SharedBufferNode sharedBufferNode) throws Exception { sharedBuffer.removeEntry(node); EventId eventId = node.getEventId(); releaseEvent(eventId); for (SharedBufferEdge sharedBufferEdge : sharedBufferNode.getEdges()) { releaseNode(sharedBufferEdge.getTarget()); } }
java
private void removeNode(NodeId node, SharedBufferNode sharedBufferNode) throws Exception { sharedBuffer.removeEntry(node); EventId eventId = node.getEventId(); releaseEvent(eventId); for (SharedBufferEdge sharedBufferEdge : sharedBufferNode.getEdges()) { releaseNode(sharedBufferEdge.getTarget()); } }
[ "private", "void", "removeNode", "(", "NodeId", "node", ",", "SharedBufferNode", "sharedBufferNode", ")", "throws", "Exception", "{", "sharedBuffer", ".", "removeEntry", "(", "node", ")", ";", "EventId", "eventId", "=", "node", ".", "getEventId", "(", ")", ";"...
Removes the {@code SharedBufferNode}, when the ref is decreased to zero, and also decrease the ref of the edge on this node. @param node id of the entry @param sharedBufferNode the node body to be removed @throws Exception Thrown if the system cannot access the state.
[ "Removes", "the", "{", "@code", "SharedBufferNode", "}", "when", "the", "ref", "is", "decreased", "to", "zero", "and", "also", "decrease", "the", "ref", "of", "the", "edge", "on", "this", "node", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L256-L264
landawn/AbacusUtil
src/com/landawn/abacus/util/CharList.java
CharList.anyMatch
public <E extends Exception> boolean anyMatch(Try.CharPredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
java
public <E extends Exception> boolean anyMatch(Try.CharPredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "anyMatch", "(", "Try", ".", "CharPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "anyMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether any elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "any", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CharList.java#L976-L978
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ClassUtils.java
ClassUtils.getField
public static Field getField(Class<?> type, String fieldName) { try { return type.getDeclaredField(fieldName); } catch (NoSuchFieldException cause) { if (type.getSuperclass() != null) { return getField(type.getSuperclass(), fieldName); } throw new FieldNotFoundException(ca...
java
public static Field getField(Class<?> type, String fieldName) { try { return type.getDeclaredField(fieldName); } catch (NoSuchFieldException cause) { if (type.getSuperclass() != null) { return getField(type.getSuperclass(), fieldName); } throw new FieldNotFoundException(ca...
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ")", "{", "try", "{", "return", "type", ".", "getDeclaredField", "(", "fieldName", ")", ";", "}", "catch", "(", "NoSuchFieldException", "cause", ")", ...
Gets a Field object representing the named field on the specified class. This method will recursively search up the class hierarchy of the specified class until the Object class is reached. If the named field is found then a Field object representing the class field is returned, otherwise a NoSuchFieldException is th...
[ "Gets", "a", "Field", "object", "representing", "the", "named", "field", "on", "the", "specified", "class", ".", "This", "method", "will", "recursively", "search", "up", "the", "class", "hierarchy", "of", "the", "specified", "class", "until", "the", "Object", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ClassUtils.java#L298-L311
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java
PropertyAccessorHelper.getObject
public static Object getObject(Object from, Field field) { if (!field.isAccessible()) { field.setAccessible(true); } try { return field.get(from); } catch (IllegalArgumentException iarg) { throw new Prope...
java
public static Object getObject(Object from, Field field) { if (!field.isAccessible()) { field.setAccessible(true); } try { return field.get(from); } catch (IllegalArgumentException iarg) { throw new Prope...
[ "public", "static", "Object", "getObject", "(", "Object", "from", ",", "Field", "field", ")", "{", "if", "(", "!", "field", ".", "isAccessible", "(", ")", ")", "{", "field", ".", "setAccessible", "(", "true", ")", ";", "}", "try", "{", "return", "fie...
Gets object from field. @param from the from @param field the field @return the object @throws PropertyAccessException the property access exception
[ "Gets", "object", "from", "field", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java#L132-L150
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/MirrorTable.java
MirrorTable.copyRecord
public void copyRecord(Record recAlt, Record recMain) { recAlt.moveFields(recMain, null, true, DBConstants.READ_MOVE, false, false, true, false); }
java
public void copyRecord(Record recAlt, Record recMain) { recAlt.moveFields(recMain, null, true, DBConstants.READ_MOVE, false, false, true, false); }
[ "public", "void", "copyRecord", "(", "Record", "recAlt", ",", "Record", "recMain", ")", "{", "recAlt", ".", "moveFields", "(", "recMain", ",", "null", ",", "true", ",", "DBConstants", ".", "READ_MOVE", ",", "false", ",", "false", ",", "true", ",", "false...
Copy the fields from the (main) source to the (mirrored) destination record. This is done before any write or set. @param recAlt Destination record @param recMain Source record
[ "Copy", "the", "fields", "from", "the", "(", "main", ")", "source", "to", "the", "(", "mirrored", ")", "destination", "record", ".", "This", "is", "done", "before", "any", "write", "or", "set", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/MirrorTable.java#L362-L365
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobSchedulesInner.java
JobSchedulesInner.get
public JobScheduleInner get(String resourceGroupName, String automationAccountName, UUID jobScheduleId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, jobScheduleId).toBlocking().single().body(); }
java
public JobScheduleInner get(String resourceGroupName, String automationAccountName, UUID jobScheduleId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, jobScheduleId).toBlocking().single().body(); }
[ "public", "JobScheduleInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "jobScheduleId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "jobScheduleId", ...
Retrieve the job schedule identified by job schedule name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobScheduleId The job schedule name. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorRespon...
[ "Retrieve", "the", "job", "schedule", "identified", "by", "job", "schedule", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobSchedulesInner.java#L189-L191
citrusframework/citrus
modules/citrus-http/src/main/java/com/consol/citrus/http/servlet/CachingHttpServletRequestWrapper.java
CachingHttpServletRequestWrapper.fillParams
private void fillParams(final Map<String, String[]> params, final String queryString, Charset charset) { if (StringUtils.hasText(queryString)) { final StringTokenizer tokenizer = new StringTokenizer(queryString, "&"); while (tokenizer.hasMoreTokens()) { final String[] nam...
java
private void fillParams(final Map<String, String[]> params, final String queryString, Charset charset) { if (StringUtils.hasText(queryString)) { final StringTokenizer tokenizer = new StringTokenizer(queryString, "&"); while (tokenizer.hasMoreTokens()) { final String[] nam...
[ "private", "void", "fillParams", "(", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "params", ",", "final", "String", "queryString", ",", "Charset", "charset", ")", "{", "if", "(", "StringUtils", ".", "hasText", "(", "queryString", ")", ")...
Adds parameter name value paris extracted from given query string. @param params The parameter map to alter @param queryString The query string to extract the values from @param charset
[ "Adds", "parameter", "name", "value", "paris", "extracted", "from", "given", "query", "string", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/servlet/CachingHttpServletRequestWrapper.java#L111-L128
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionaction.java
vpnsessionaction.get
public static vpnsessionaction get(nitro_service service, String name) throws Exception{ vpnsessionaction obj = new vpnsessionaction(); obj.set_name(name); vpnsessionaction response = (vpnsessionaction) obj.get_resource(service); return response; }
java
public static vpnsessionaction get(nitro_service service, String name) throws Exception{ vpnsessionaction obj = new vpnsessionaction(); obj.set_name(name); vpnsessionaction response = (vpnsessionaction) obj.get_resource(service); return response; }
[ "public", "static", "vpnsessionaction", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnsessionaction", "obj", "=", "new", "vpnsessionaction", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch vpnsessionaction resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnsessionaction", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionaction.java#L1731-L1736
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java
RoleAssignmentsInner.createByIdAsync
public Observable<RoleAssignmentInner> createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties) { return createByIdWithServiceResponseAsync(roleAssignmentId, properties).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public Rol...
java
public Observable<RoleAssignmentInner> createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties) { return createByIdWithServiceResponseAsync(roleAssignmentId, properties).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public Rol...
[ "public", "Observable", "<", "RoleAssignmentInner", ">", "createByIdAsync", "(", "String", "roleAssignmentId", ",", "RoleAssignmentProperties", "properties", ")", "{", "return", "createByIdWithServiceResponseAsync", "(", "roleAssignmentId", ",", "properties", ")", ".", "m...
Creates a role assignment by ID. @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//provide...
[ "Creates", "a", "role", "assignment", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java#L1018-L1025
netty/netty
example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java
HttpStaticFileServerHandler.setContentTypeHeader
private static void setContentTypeHeader(HttpResponse response, File file) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath())); }
java
private static void setContentTypeHeader(HttpResponse response, File file) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath())); }
[ "private", "static", "void", "setContentTypeHeader", "(", "HttpResponse", "response", ",", "File", "file", ")", "{", "MimetypesFileTypeMap", "mimeTypesMap", "=", "new", "MimetypesFileTypeMap", "(", ")", ";", "response", ".", "headers", "(", ")", ".", "set", "(",...
Sets the content type header for the HTTP Response @param response HTTP response @param file file to extract content type
[ "Sets", "the", "content", "type", "header", "for", "the", "HTTP", "Response" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java#L415-L418
mfornos/humanize
humanize-emoji/src/main/java/humanize/emoji/Emoji.java
Emoji.findByVendorCodePoint
public static EmojiChar findByVendorCodePoint(Vendor vendor, String point) { Emoji emoji = Emoji.getInstance(); return emoji._findByVendorCodePoint(vendor, point); }
java
public static EmojiChar findByVendorCodePoint(Vendor vendor, String point) { Emoji emoji = Emoji.getInstance(); return emoji._findByVendorCodePoint(vendor, point); }
[ "public", "static", "EmojiChar", "findByVendorCodePoint", "(", "Vendor", "vendor", ",", "String", "point", ")", "{", "Emoji", "emoji", "=", "Emoji", ".", "getInstance", "(", ")", ";", "return", "emoji", ".", "_findByVendorCodePoint", "(", "vendor", ",", "point...
Finds an emoji character by vendor code point. @param vendor the vendor @param point the raw character for the code point in the vendor space @return the corresponding emoji character or null if not found
[ "Finds", "an", "emoji", "character", "by", "vendor", "code", "point", "." ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-emoji/src/main/java/humanize/emoji/Emoji.java#L147-L151
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.getInteger
public int getInteger() throws IOException { if (buffer.read() != DerValue.tag_Integer) { throw new IOException("DER input, Integer tag error"); } return buffer.getInteger(getLength(buffer)); }
java
public int getInteger() throws IOException { if (buffer.read() != DerValue.tag_Integer) { throw new IOException("DER input, Integer tag error"); } return buffer.getInteger(getLength(buffer)); }
[ "public", "int", "getInteger", "(", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "read", "(", ")", "!=", "DerValue", ".", "tag_Integer", ")", "{", "throw", "new", "IOException", "(", "\"DER input, Integer tag error\"", ")", ";", "}", "return"...
Get an integer from the input stream as an integer. @return the integer held in this DER input stream.
[ "Get", "an", "integer", "from", "the", "input", "stream", "as", "an", "integer", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L166-L171
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java
HttpUtils.parseHttpResponse
public static String parseHttpResponse(HttpURLConnection conn, boolean includeHeaders, boolean ignoreBody) throws IOException { StringBuilder buff = new StringBuilder(); if (includeHeaders) { buff.append(conn.getResponseCode()).append(' ').append(conn.getResponseMessage()).append('\n'); ...
java
public static String parseHttpResponse(HttpURLConnection conn, boolean includeHeaders, boolean ignoreBody) throws IOException { StringBuilder buff = new StringBuilder(); if (includeHeaders) { buff.append(conn.getResponseCode()).append(' ').append(conn.getResponseMessage()).append('\n'); ...
[ "public", "static", "String", "parseHttpResponse", "(", "HttpURLConnection", "conn", ",", "boolean", "includeHeaders", ",", "boolean", "ignoreBody", ")", "throws", "IOException", "{", "StringBuilder", "buff", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", ...
Parses an http request response @param conn the connection @param includeHeaders if include headers ot not @param ignoreBody if ignore body or not @return a string representing the received answer @throws IOException on any connection
[ "Parses", "an", "http", "request", "response" ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java#L163-L193
mercadopago/dx-java
src/main/java/com/mercadopago/core/MPBase.java
MPBase.processMethodBulk
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, String param1, Boolean useCache) throws MPException { HashMap<String, String> mapParams = new HashMap<String, String>(); mapParams.put("param1", param1); return processMethodBulk(clazz, methodName, mapParams, useC...
java
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, String param1, Boolean useCache) throws MPException { HashMap<String, String> mapParams = new HashMap<String, String>(); mapParams.put("param1", param1); return processMethodBulk(clazz, methodName, mapParams, useC...
[ "protected", "static", "MPResourceArray", "processMethodBulk", "(", "Class", "clazz", ",", "String", "methodName", ",", "String", "param1", ",", "Boolean", "useCache", ")", "throws", "MPException", "{", "HashMap", "<", "String", ",", "String", ">", "mapParams", ...
Process method to call the api, usually used for loadAll and search methods @param clazz a MPBase extended class @param methodName a String with the decorated method to be processed @param param1 a String with the arg passed in the call of the method @param useCache ...
[ "Process", "method", "to", "call", "the", "api", "usually", "used", "for", "loadAll", "and", "search", "methods" ]
train
https://github.com/mercadopago/dx-java/blob/9df65a6bfb4db0c1fddd7699a5b109643961b03f/src/main/java/com/mercadopago/core/MPBase.java#L220-L224
apache/incubator-zipkin
zipkin-server/src/main/java/zipkin2/server/internal/mysql/TracingZipkinMySQLStorageAutoConfiguration.java
TracingZipkinMySQLStorageAutoConfiguration.makeContextAware
static Executor makeContextAware(Executor delegate, CurrentTraceContext currentTraceContext) { class TracingCurrentRequestContextExecutor implements Executor { @Override public void execute(Runnable task) { delegate.execute(RequestContext.current().makeContextAware(currentTraceContext.wrap(task))); ...
java
static Executor makeContextAware(Executor delegate, CurrentTraceContext currentTraceContext) { class TracingCurrentRequestContextExecutor implements Executor { @Override public void execute(Runnable task) { delegate.execute(RequestContext.current().makeContextAware(currentTraceContext.wrap(task))); ...
[ "static", "Executor", "makeContextAware", "(", "Executor", "delegate", ",", "CurrentTraceContext", "currentTraceContext", ")", "{", "class", "TracingCurrentRequestContextExecutor", "implements", "Executor", "{", "@", "Override", "public", "void", "execute", "(", "Runnable...
Decorates the input such that the {@link RequestContext#current() current request context} and the and the {@link CurrentTraceContext#get() current trace context} at assembly time is made current when task is executed.
[ "Decorates", "the", "input", "such", "that", "the", "{" ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-server/src/main/java/zipkin2/server/internal/mysql/TracingZipkinMySQLStorageAutoConfiguration.java#L60-L67
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/util/StringUtil.java
StringUtil.isEquals
public static boolean isEquals( String s1, String s2) { return s1 == null ? s2 == null : s1.equals(s2); }
java
public static boolean isEquals( String s1, String s2) { return s1 == null ? s2 == null : s1.equals(s2); }
[ "public", "static", "boolean", "isEquals", "(", "String", "s1", ",", "String", "s2", ")", "{", "return", "s1", "==", "null", "?", "s2", "==", "null", ":", "s1", ".", "equals", "(", "s2", ")", ";", "}" ]
<p>isEquals.</p> @param s1 a {@link java.lang.String} object. @param s2 a {@link java.lang.String} object. @return a boolean.
[ "<p", ">", "isEquals", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/StringUtil.java#L67-L70
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.beginCreateOrUpdate
public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocki...
java
public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocki...
[ "public", "VirtualNetworkGatewayConnectionInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "VirtualNetworkGatewayConnectionInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync...
Creates or updates a virtual network gateway connection in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. @param parameters Parameters supplied to the create or update virtual network ...
[ "Creates", "or", "updates", "a", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L214-L216
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/CreateIdentityPoolResult.java
CreateIdentityPoolResult.withSupportedLoginProviders
public CreateIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { setSupportedLoginProviders(supportedLoginProviders); return this; }
java
public CreateIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { setSupportedLoginProviders(supportedLoginProviders); return this; }
[ "public", "CreateIdentityPoolResult", "withSupportedLoginProviders", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "supportedLoginProviders", ")", "{", "setSupportedLoginProviders", "(", "supportedLoginProviders", ")", ";", "return", "this", ...
<p> Optional key:value pairs mapping provider names to provider app IDs. </p> @param supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Optional", "key", ":", "value", "pairs", "mapping", "provider", "names", "to", "provider", "app", "IDs", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/CreateIdentityPoolResult.java#L252-L255
weld/core
impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java
HierarchyDiscovery.processTypeVariables
private void processTypeVariables(TypeVariable<?>[] variables, Type[] values) { for (int i = 0; i < variables.length; i++) { processTypeVariable(variables[i], values[i]); } }
java
private void processTypeVariables(TypeVariable<?>[] variables, Type[] values) { for (int i = 0; i < variables.length; i++) { processTypeVariable(variables[i], values[i]); } }
[ "private", "void", "processTypeVariables", "(", "TypeVariable", "<", "?", ">", "[", "]", "variables", ",", "Type", "[", "]", "values", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "variables", ".", "length", ";", "i", "++", ")", "{", ...
/* Processing part. Every type variable is mapped to the actual type in the resolvedTypeVariablesMap. This map is used later on for resolving types.
[ "/", "*", "Processing", "part", ".", "Every", "type", "variable", "is", "mapped", "to", "the", "actual", "type", "in", "the", "resolvedTypeVariablesMap", ".", "This", "map", "is", "used", "later", "on", "for", "resolving", "types", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java#L172-L176
craftercms/profile
security-provider/src/main/java/org/craftercms/security/servlet/filters/RequestSecurityFilter.java
RequestSecurityFilter.doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest)request; if (securityEnabled && (includeRequest(httpRequest) || !excludeRequest(httpRequest))) { doFi...
java
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest)request; if (securityEnabled && (includeRequest(httpRequest) || !excludeRequest(httpRequest))) { doFi...
[ "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "httpRequest", "=", "(", "HttpServletRequest", ")", "requ...
If {@code securityEnabled}, passes the request through the chain of {@link RequestSecurityProcessor}s, depending if the request URL matches or not the {@code urlsToInclude} or the {@code urlsToExclude}. The last processor of the chain calls the actual filter chain. @param request @param response @param chain @throws I...
[ "If", "{", "@code", "securityEnabled", "}", "passes", "the", "request", "through", "the", "chain", "of", "{", "@link", "RequestSecurityProcessor", "}", "s", "depending", "if", "the", "request", "URL", "matches", "or", "not", "the", "{", "@code", "urlsToInclude...
train
https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/servlet/filters/RequestSecurityFilter.java#L105-L114
tobykurien/Xtendroid
Xtendroid/src/asia/sonix/android/orm/AbatisService.java
AbatisService.execute
public int execute(int sqlId, Map<String, ? extends Object> bindParams) { String sql = context.getResources().getString(sqlId); return execute(sql, bindParams); }
java
public int execute(int sqlId, Map<String, ? extends Object> bindParams) { String sql = context.getResources().getString(sqlId); return execute(sql, bindParams); }
[ "public", "int", "execute", "(", "int", "sqlId", ",", "Map", "<", "String", ",", "?", "extends", "Object", ">", "bindParams", ")", "{", "String", "sql", "=", "context", ".", "getResources", "(", ")", ".", "getString", "(", "sqlId", ")", ";", "return", ...
指定したSQLIDにparameterをmappingして、実行する。 <p> mappingの時、parameterが足りない場合は0を返す。 </p> @param sqlId SQLiteDatabase object @param bindParams old version value @return int 実行によって影響をもらった行数
[ "指定したSQLIDにparameterをmappingして、実行する。" ]
train
https://github.com/tobykurien/Xtendroid/blob/758bf1d06f4cf3b64f9c10632fe9c6fb30bcebd4/Xtendroid/src/asia/sonix/android/orm/AbatisService.java#L457-L460
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/configuration/JawnConfigurations.java
JawnConfigurations.get
public <T> T get(String name, Class<T> type){ Object o = _getObject(name); return o == null ? null : type.cast(o); }
java
public <T> T get(String name, Class<T> type){ Object o = _getObject(name); return o == null ? null : type.cast(o); }
[ "public", "<", "T", ">", "T", "get", "(", "String", "name", ",", "Class", "<", "T", ">", "type", ")", "{", "Object", "o", "=", "_getObject", "(", "name", ")", ";", "return", "o", "==", "null", "?", "null", ":", "type", ".", "cast", "(", "o", ...
Retrieves object by name. Convenience generic method. @param name name of object @param type type requested. @return object by name
[ "Retrieves", "object", "by", "name", ".", "Convenience", "generic", "method", "." ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/configuration/JawnConfigurations.java#L182-L185
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/commons/SerialVersionUIDAdder.java
SerialVersionUIDAdder.visitMethod
@Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { if (computeSVUID) { if ("<clinit>".equals(name)) { hasStaticInitializer = true; } /* ...
java
@Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { if (computeSVUID) { if ("<clinit>".equals(name)) { hasStaticInitializer = true; } /* ...
[ "@", "Override", "public", "MethodVisitor", "visitMethod", "(", "final", "int", "access", ",", "final", "String", "name", ",", "final", "String", "desc", ",", "final", "String", "signature", ",", "final", "String", "[", "]", "exceptions", ")", "{", "if", "...
/* Visit the methods and get constructor and method information (step 5 and 7). Also determine if there is a class initializer (step 6).
[ "/", "*", "Visit", "the", "methods", "and", "get", "constructor", "and", "method", "information", "(", "step", "5", "and", "7", ")", ".", "Also", "determine", "if", "there", "is", "a", "class", "initializer", "(", "step", "6", ")", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/commons/SerialVersionUIDAdder.java#L225-L256
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java
DefaultFeatureForm.getValue
@Api public void getValue(String name, BooleanAttribute attribute) { attribute.setValue(toBoolean(formWidget.getValue(name))); }
java
@Api public void getValue(String name, BooleanAttribute attribute) { attribute.setValue(toBoolean(formWidget.getValue(name))); }
[ "@", "Api", "public", "void", "getValue", "(", "String", "name", ",", "BooleanAttribute", "attribute", ")", "{", "attribute", ".", "setValue", "(", "toBoolean", "(", "formWidget", ".", "getValue", "(", "name", ")", ")", ")", ";", "}" ]
Get a boolean value from the form, and place it in <code>attribute</code>. @param name attribute name @param attribute attribute to put value @since 1.11.1
[ "Get", "a", "boolean", "value", "from", "the", "form", "and", "place", "it", "in", "<code", ">", "attribute<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L647-L650
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/index/SecondaryIndex.java
SecondaryIndex.createInstance
public static SecondaryIndex createInstance(ColumnFamilyStore baseCfs, ColumnDefinition cdef) throws ConfigurationException { SecondaryIndex index; switch (cdef.getIndexType()) { case KEYS: index = new KeysIndex(); break; case COMPOSITES: ...
java
public static SecondaryIndex createInstance(ColumnFamilyStore baseCfs, ColumnDefinition cdef) throws ConfigurationException { SecondaryIndex index; switch (cdef.getIndexType()) { case KEYS: index = new KeysIndex(); break; case COMPOSITES: ...
[ "public", "static", "SecondaryIndex", "createInstance", "(", "ColumnFamilyStore", "baseCfs", ",", "ColumnDefinition", "cdef", ")", "throws", "ConfigurationException", "{", "SecondaryIndex", "index", ";", "switch", "(", "cdef", ".", "getIndexType", "(", ")", ")", "{"...
This is the primary way to create a secondary index instance for a CF column. It will validate the index_options before initializing. @param baseCfs the source of data for the Index @param cdef the meta information about this column (index_type, index_options, name, etc...) @return The secondary index instance for th...
[ "This", "is", "the", "primary", "way", "to", "create", "a", "secondary", "index", "instance", "for", "a", "CF", "column", ".", "It", "will", "validate", "the", "index_options", "before", "initializing", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/index/SecondaryIndex.java#L322-L356
VoltDB/voltdb
src/frontend/org/voltdb/utils/CatalogUtil.java
CatalogUtil.getSortedCatalogItems
public static <T extends CatalogType> void getSortedCatalogItems(CatalogMap<T> items, String sortFieldName, List<T> result) { result.addAll(getSortedCatalogItems(items, sortFieldName )); }
java
public static <T extends CatalogType> void getSortedCatalogItems(CatalogMap<T> items, String sortFieldName, List<T> result) { result.addAll(getSortedCatalogItems(items, sortFieldName )); }
[ "public", "static", "<", "T", "extends", "CatalogType", ">", "void", "getSortedCatalogItems", "(", "CatalogMap", "<", "T", ">", "items", ",", "String", "sortFieldName", ",", "List", "<", "T", ">", "result", ")", "{", "result", ".", "addAll", "(", "getSorte...
A getSortedCatalogItems variant with the result list filled in-place @param <T> The type of item to sort. @param items The set of catalog items. @param sortFieldName The name of the field to sort on. @param result An output list of catalog items, sorted on the specified field.
[ "A", "getSortedCatalogItems", "variant", "with", "the", "result", "list", "filled", "in", "-", "place" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L569-L571
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiCollaboration.java
BoxApiCollaboration.getAddRequest
public BoxRequestsShare.AddCollaboration getAddRequest(BoxCollaborationItem collaborationItem, BoxCollaboration.Role role, BoxCollaborator collaborator) { return new BoxRequestsShare.AddCollaboration(getCollaborationsUrl(), createStubItem(collaborationItem), role, collaborator, mSession); }
java
public BoxRequestsShare.AddCollaboration getAddRequest(BoxCollaborationItem collaborationItem, BoxCollaboration.Role role, BoxCollaborator collaborator) { return new BoxRequestsShare.AddCollaboration(getCollaborationsUrl(), createStubItem(collaborationItem), role, collaborator, mSession); }
[ "public", "BoxRequestsShare", ".", "AddCollaboration", "getAddRequest", "(", "BoxCollaborationItem", "collaborationItem", ",", "BoxCollaboration", ".", "Role", "role", ",", "BoxCollaborator", "collaborator", ")", "{", "return", "new", "BoxRequestsShare", ".", "AddCollabor...
A request that adds a {@link com.box.androidsdk.content.models.BoxUser user} or {@link com.box.androidsdk.content.models.BoxGroup group} as a collaborator to an item. @param collaborationItem item to be collaborated. @param role role of the collaboration @param collaborator the {@link com.box.androidsdk.content.models....
[ "A", "request", "that", "adds", "a", "{" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiCollaboration.java#L98-L101