repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
aws/aws-sdk-java
aws-java-sdk-costexplorer/src/main/java/com/amazonaws/services/costexplorer/model/DimensionValuesWithAttributes.java
DimensionValuesWithAttributes.withAttributes
public DimensionValuesWithAttributes withAttributes(java.util.Map<String, String> attributes) { """ <p> The attribute that applies to a specific <code>Dimension</code>. </p> @param attributes The attribute that applies to a specific <code>Dimension</code>. @return Returns a reference to this object so that ...
java
public DimensionValuesWithAttributes withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "DimensionValuesWithAttributes", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> The attribute that applies to a specific <code>Dimension</code>. </p> @param attributes The attribute that applies to a specific <code>Dimension</code>. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "attribute", "that", "applies", "to", "a", "specific", "<code", ">", "Dimension<", "/", "code", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-costexplorer/src/main/java/com/amazonaws/services/costexplorer/model/DimensionValuesWithAttributes.java#L120-L123
grycap/coreutils
coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java
Http2Client.asyncGet
public void asyncGet(final String url, final boolean nocache, final Callback callback) { """ Retrieve information from a server via a HTTP GET request. @param url - URL target of this request @param nocache - don't accept an invalidated cached response, and don't store the server's response in any cache @param ...
java
public void asyncGet(final String url, final boolean nocache, final Callback callback) { asyncGet(url, null, nocache, callback); }
[ "public", "void", "asyncGet", "(", "final", "String", "url", ",", "final", "boolean", "nocache", ",", "final", "Callback", "callback", ")", "{", "asyncGet", "(", "url", ",", "null", ",", "nocache", ",", "callback", ")", ";", "}" ]
Retrieve information from a server via a HTTP GET request. @param url - URL target of this request @param nocache - don't accept an invalidated cached response, and don't store the server's response in any cache @param callback - is called back when the response is readable
[ "Retrieve", "information", "from", "a", "server", "via", "a", "HTTP", "GET", "request", "." ]
train
https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java#L72-L74
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Polymer.java
Polymer.addAtom
@Override public void addAtom(IAtom oAtom, IMonomer oMonomer) { """ Adds the atom oAtom to a specified Monomer. @param oAtom The atom to add @param oMonomer The monomer the atom belongs to """ if (!contains(oAtom)) { super.addAtom(oAtom); if (oMonomer != null) { // N...
java
@Override public void addAtom(IAtom oAtom, IMonomer oMonomer) { if (!contains(oAtom)) { super.addAtom(oAtom); if (oMonomer != null) { // Not sure what's better here...throw nullpointer exception? oMonomer.addAtom(oAtom); if (!monomers.containsKey(oMo...
[ "@", "Override", "public", "void", "addAtom", "(", "IAtom", "oAtom", ",", "IMonomer", "oMonomer", ")", "{", "if", "(", "!", "contains", "(", "oAtom", ")", ")", "{", "super", ".", "addAtom", "(", "oAtom", ")", ";", "if", "(", "oMonomer", "!=", "null",...
Adds the atom oAtom to a specified Monomer. @param oAtom The atom to add @param oMonomer The monomer the atom belongs to
[ "Adds", "the", "atom", "oAtom", "to", "a", "specified", "Monomer", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Polymer.java#L79-L95
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201809/shopping/ProductPartitionTreeImpl.java
ProductPartitionTreeImpl.createEmptyAdGroupTree
private static ProductPartitionTreeImpl createEmptyAdGroupTree(Long adGroupId, BiddingStrategyConfiguration biddingStrategyConfig) { """ Returns a new empty tree. @param adGroupId the ID of the ad group @param biddingStrategyConfig the bidding strategy configuration of the ad group """ Preconditi...
java
private static ProductPartitionTreeImpl createEmptyAdGroupTree(Long adGroupId, BiddingStrategyConfiguration biddingStrategyConfig) { Preconditions.checkNotNull(adGroupId, "Null ad group ID"); Preconditions.checkNotNull(biddingStrategyConfig, "Null bidding strategy configuration"); ProductPartitionNode...
[ "private", "static", "ProductPartitionTreeImpl", "createEmptyAdGroupTree", "(", "Long", "adGroupId", ",", "BiddingStrategyConfiguration", "biddingStrategyConfig", ")", "{", "Preconditions", ".", "checkNotNull", "(", "adGroupId", ",", "\"Null ad group ID\"", ")", ";", "Preco...
Returns a new empty tree. @param adGroupId the ID of the ad group @param biddingStrategyConfig the bidding strategy configuration of the ad group
[ "Returns", "a", "new", "empty", "tree", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201809/shopping/ProductPartitionTreeImpl.java#L326-L333
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/declarative/utils/DeclarativePipelineUtils.java
DeclarativePipelineUtils.getBuildInfo
public static BuildInfo getBuildInfo(FilePath ws, Run build, String customBuildName, String customBuildNumber) throws IOException, InterruptedException { """ Get build info as defined in previous rtBuildInfo{...} scope. @param ws - Step's workspace. @param build - Step's build. @par...
java
public static BuildInfo getBuildInfo(FilePath ws, Run build, String customBuildName, String customBuildNumber) throws IOException, InterruptedException { String jobBuildNumber = BuildUniqueIdentifierHelper.getBuildNumber(build); String buildInfoId = createBuildInfoId(build, customBuildName, customBuildN...
[ "public", "static", "BuildInfo", "getBuildInfo", "(", "FilePath", "ws", ",", "Run", "build", ",", "String", "customBuildName", ",", "String", "customBuildNumber", ")", "throws", "IOException", ",", "InterruptedException", "{", "String", "jobBuildNumber", "=", "Build...
Get build info as defined in previous rtBuildInfo{...} scope. @param ws - Step's workspace. @param build - Step's build. @param customBuildName - Step's custom build name if exist. @param customBuildNumber - Step's custom build number if exist. @return build info object as defined in previ...
[ "Get", "build", "info", "as", "defined", "in", "previous", "rtBuildInfo", "{", "...", "}", "scope", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/declarative/utils/DeclarativePipelineUtils.java#L115-L131
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.changeSets
public Collection<ChangeSet> changeSets(ChangeSetFilter filter) { """ Get ChangeSets filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter. """ return get(ChangeSe...
java
public Collection<ChangeSet> changeSets(ChangeSetFilter filter) { return get(ChangeSet.class, (filter != null) ? filter : new ChangeSetFilter()); }
[ "public", "Collection", "<", "ChangeSet", ">", "changeSets", "(", "ChangeSetFilter", "filter", ")", "{", "return", "get", "(", "ChangeSet", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "ChangeSetFilter", "(", ")", ")", ...
Get ChangeSets filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "ChangeSets", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L316-L318
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.sphericalVincentyFormulaDeg
public static double sphericalVincentyFormulaDeg(double lat1, double lon1, double lat2, double lon2) { """ Compute the approximate great-circle distance of two points. Uses Vincenty's Formula for the spherical case, which does not require iterations. <p> Complexity: 7 trigonometric functions, 1 sqrt. <p> R...
java
public static double sphericalVincentyFormulaDeg(double lat1, double lon1, double lat2, double lon2) { return sphericalVincentyFormulaRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2)); }
[ "public", "static", "double", "sphericalVincentyFormulaDeg", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ")", "{", "return", "sphericalVincentyFormulaRad", "(", "deg2rad", "(", "lat1", ")", ",", "deg2rad", "(", "...
Compute the approximate great-circle distance of two points. Uses Vincenty's Formula for the spherical case, which does not require iterations. <p> Complexity: 7 trigonometric functions, 1 sqrt. <p> Reference: <p> T. Vincenty<br> Direct and inverse solutions of geodesics on the ellipsoid with application of nested equ...
[ "Compute", "the", "approximate", "great", "-", "circle", "distance", "of", "two", "points", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L254-L256
alkacon/opencms-core
src/org/opencms/ade/contenteditor/CmsContentService.java
CmsContentService.synchronizeLocaleIndependentFields
protected void synchronizeLocaleIndependentFields( CmsFile file, CmsXmlContent content, Collection<String> skipPaths, Collection<CmsEntity> entities, Locale lastEdited) throws CmsXmlException { """ Synchronizes the locale independent fields.<p> @param file the content...
java
protected void synchronizeLocaleIndependentFields( CmsFile file, CmsXmlContent content, Collection<String> skipPaths, Collection<CmsEntity> entities, Locale lastEdited) throws CmsXmlException { CmsEntity lastEditedEntity = null; for (CmsEntity entity : entiti...
[ "protected", "void", "synchronizeLocaleIndependentFields", "(", "CmsFile", "file", ",", "CmsXmlContent", "content", ",", "Collection", "<", "String", ">", "skipPaths", ",", "Collection", "<", "CmsEntity", ">", "entities", ",", "Locale", "lastEdited", ")", "throws", ...
Synchronizes the locale independent fields.<p> @param file the content file @param content the XML content @param skipPaths the paths to skip during locale synchronization @param entities the edited entities @param lastEdited the last edited locale @throws CmsXmlException if something goes wrong
[ "Synchronizes", "the", "locale", "independent", "fields", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentService.java#L1201-L1221
dbracewell/mango
src/main/java/com/davidbracewell/cache/CacheSpec.java
CacheSpec.removalListener
public <T extends CacheSpec<K, V>> T removalListener(RemovalListener<K, V> listener) { """ Sets the removal listener @param <T> the type parameter @param listener The removal listener @return This cache spec """ this.removalListener = listener; return Cast.as(this); }
java
public <T extends CacheSpec<K, V>> T removalListener(RemovalListener<K, V> listener) { this.removalListener = listener; return Cast.as(this); }
[ "public", "<", "T", "extends", "CacheSpec", "<", "K", ",", "V", ">", ">", "T", "removalListener", "(", "RemovalListener", "<", "K", ",", "V", ">", "listener", ")", "{", "this", ".", "removalListener", "=", "listener", ";", "return", "Cast", ".", "as", ...
Sets the removal listener @param <T> the type parameter @param listener The removal listener @return This cache spec
[ "Sets", "the", "removal", "listener" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/cache/CacheSpec.java#L338-L341
Stratio/stratio-cassandra
src/java/org/apache/cassandra/net/MessagingService.java
MessagingService.sendRR
public int sendRR(MessageOut message, InetAddress to, IAsyncCallback cb, long timeout, boolean failureCallback) { """ Send a non-mutation message to a given endpoint. This method specifies a callback which is invoked with the actual response. @param message message to be sent. @param to endpoint to which...
java
public int sendRR(MessageOut message, InetAddress to, IAsyncCallback cb, long timeout, boolean failureCallback) { int id = addCallback(cb, message, to, timeout, failureCallback); sendOneWay(failureCallback ? message.withParameter(FAILURE_CALLBACK_PARAM, ONE_BYTE) : message, id, to); return i...
[ "public", "int", "sendRR", "(", "MessageOut", "message", ",", "InetAddress", "to", ",", "IAsyncCallback", "cb", ",", "long", "timeout", ",", "boolean", "failureCallback", ")", "{", "int", "id", "=", "addCallback", "(", "cb", ",", "message", ",", "to", ",",...
Send a non-mutation message to a given endpoint. This method specifies a callback which is invoked with the actual response. @param message message to be sent. @param to endpoint to which the message needs to be sent @param cb callback interface which is used to pass the responses or suggest that a timeout o...
[ "Send", "a", "non", "-", "mutation", "message", "to", "a", "given", "endpoint", ".", "This", "method", "specifies", "a", "callback", "which", "is", "invoked", "with", "the", "actual", "response", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/net/MessagingService.java#L617-L622
apache/spark
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
ExternalShuffleBlockResolver.getSortBasedShuffleBlockData
private ManagedBuffer getSortBasedShuffleBlockData( ExecutorShuffleInfo executor, int shuffleId, int mapId, int reduceId) { """ Sort-based shuffle data uses an index called "shuffle_ShuffleId_MapId_0.index" into a data file called "shuffle_ShuffleId_MapId_0.data". This logic is from IndexShuffleBlockResolver,...
java
private ManagedBuffer getSortBasedShuffleBlockData( ExecutorShuffleInfo executor, int shuffleId, int mapId, int reduceId) { File indexFile = getFile(executor.localDirs, executor.subDirsPerLocalDir, "shuffle_" + shuffleId + "_" + mapId + "_0.index"); try { ShuffleIndexInformation shuffleIndexInf...
[ "private", "ManagedBuffer", "getSortBasedShuffleBlockData", "(", "ExecutorShuffleInfo", "executor", ",", "int", "shuffleId", ",", "int", "mapId", ",", "int", "reduceId", ")", "{", "File", "indexFile", "=", "getFile", "(", "executor", ".", "localDirs", ",", "execut...
Sort-based shuffle data uses an index called "shuffle_ShuffleId_MapId_0.index" into a data file called "shuffle_ShuffleId_MapId_0.data". This logic is from IndexShuffleBlockResolver, and the block id format is from ShuffleDataBlockId and ShuffleIndexBlockId.
[ "Sort", "-", "based", "shuffle", "data", "uses", "an", "index", "called", "shuffle_ShuffleId_MapId_0", ".", "index", "into", "a", "data", "file", "called", "shuffle_ShuffleId_MapId_0", ".", "data", ".", "This", "logic", "is", "from", "IndexShuffleBlockResolver", "...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java#L282-L299
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.listHostingEnvironmentDetectorResponsesAsync
public Observable<Page<DetectorResponseInner>> listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name) { """ List Hosting Environment Detector Responses. List Hosting Environment Detector Responses. @param resourceGroupName Name of the resource group to which the resourc...
java
public Observable<Page<DetectorResponseInner>> listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name) { return listHostingEnvironmentDetectorResponsesWithServiceResponseAsync(resourceGroupName, name) .map(new Func1<ServiceResponse<Page<DetectorResponseInner>>...
[ "public", "Observable", "<", "Page", "<", "DetectorResponseInner", ">", ">", "listHostingEnvironmentDetectorResponsesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listHostingEnvironmentDetectorResponsesWithServiceRes...
List Hosting Environment Detector Responses. List Hosting Environment Detector Responses. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Site Name @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;Detecto...
[ "List", "Hosting", "Environment", "Detector", "Responses", ".", "List", "Hosting", "Environment", "Detector", "Responses", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L248-L256
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java
DoubleArrayTrie.set
public boolean set(String key, V value) { """ 更新某个键对应的值 @param key 键 @param value 值 @return 是否成功(失败的原因是没有这个键) """ int index = exactMatchSearch(key); if (index >= 0) { v[index] = value; return true; } return false; }
java
public boolean set(String key, V value) { int index = exactMatchSearch(key); if (index >= 0) { v[index] = value; return true; } return false; }
[ "public", "boolean", "set", "(", "String", "key", ",", "V", "value", ")", "{", "int", "index", "=", "exactMatchSearch", "(", "key", ")", ";", "if", "(", "index", ">=", "0", ")", "{", "v", "[", "index", "]", "=", "value", ";", "return", "true", ";...
更新某个键对应的值 @param key 键 @param value 值 @return 是否成功(失败的原因是没有这个键)
[ "更新某个键对应的值" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L1410-L1420
jbundle/jbundle
app/program/packages/src/main/java/org/jbundle/app/program/packages/screen/JnlpFileScreen.java
JnlpFileScreen.doCommand
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { """ Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't pr...
java
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if (JnlpFileScreen.WRITE_FILE.equals(strCommand)) { return true; // Command handled } else return super.doCommand(strCommand, sourceSField, iCommandOptions); }
[ "public", "boolean", "doCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iCommandOptions", ")", "{", "if", "(", "JnlpFileScreen", ".", "WRITE_FILE", ".", "equals", "(", "strCommand", ")", ")", "{", "return", "true", ";", ...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/packages/src/main/java/org/jbundle/app/program/packages/screen/JnlpFileScreen.java#L88-L96
Sciss/abc4j
abc/src/main/java/abc/ui/swing/JScoreComponent.java
JScoreComponent.setTune
public void setTune(Tune tune) { """ Sets the tune to be renderered. @param tune The tune to be displayed. """ m_jTune = new JTune(tune, new Point(0, 0), getTemplate()); m_jTune.setColor(getForeground()); m_selectedItems = null; m_dimension.setSize(m_jTune.getWidth(), m_jTune.get...
java
public void setTune(Tune tune){ m_jTune = new JTune(tune, new Point(0, 0), getTemplate()); m_jTune.setColor(getForeground()); m_selectedItems = null; m_dimension.setSize(m_jTune.getWidth(), m_jTune.getHeight()); setPreferredSize(m_dimension); setSize(m_dimension); m_isBufferedImag...
[ "public", "void", "setTune", "(", "Tune", "tune", ")", "{", "m_jTune", "=", "new", "JTune", "(", "tune", ",", "new", "Point", "(", "0", ",", "0", ")", ",", "getTemplate", "(", ")", ")", ";", "m_jTune", ".", "setColor", "(", "getForeground", "(", ")...
Sets the tune to be renderered. @param tune The tune to be displayed.
[ "Sets", "the", "tune", "to", "be", "renderered", "." ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/JScoreComponent.java#L251-L263
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/FileLockTable.java
FileLockTable.newSharedFileLockTable
public static FileLockTable newSharedFileLockTable(Channel channel, FileDescriptor fd) throws IOException { """ Creates and returns a file lock table for a channel that is connected to the a system-wide map of all file locks for the Java virtual machi...
java
public static FileLockTable newSharedFileLockTable(Channel channel, FileDescriptor fd) throws IOException { return new SharedFileLockTable(channel, fd); }
[ "public", "static", "FileLockTable", "newSharedFileLockTable", "(", "Channel", "channel", ",", "FileDescriptor", "fd", ")", "throws", "IOException", "{", "return", "new", "SharedFileLockTable", "(", "channel", ",", "fd", ")", ";", "}" ]
Creates and returns a file lock table for a channel that is connected to the a system-wide map of all file locks for the Java virtual machine.
[ "Creates", "and", "returns", "a", "file", "lock", "table", "for", "a", "channel", "that", "is", "connected", "to", "the", "a", "system", "-", "wide", "map", "of", "all", "file", "locks", "for", "the", "Java", "virtual", "machine", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/FileLockTable.java#L43-L48
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java
COSAPIClient.getMergedPath
private String getMergedPath(String hostName, Path p, String objectKey) { """ Merge between two paths @param hostName @param p path @param objectKey @return merged path """ if ((p.getParent() != null) && (p.getName() != null) && (p.getParent().toString().equals(hostName))) { if (objectK...
java
private String getMergedPath(String hostName, Path p, String objectKey) { if ((p.getParent() != null) && (p.getName() != null) && (p.getParent().toString().equals(hostName))) { if (objectKey.equals(p.getName())) { return p.toString(); } return hostName + objectKey; } return...
[ "private", "String", "getMergedPath", "(", "String", "hostName", ",", "Path", "p", ",", "String", "objectKey", ")", "{", "if", "(", "(", "p", ".", "getParent", "(", ")", "!=", "null", ")", "&&", "(", "p", ".", "getName", "(", ")", "!=", "null", ")"...
Merge between two paths @param hostName @param p path @param objectKey @return merged path
[ "Merge", "between", "two", "paths" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java#L1018-L1027
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_owo_GET
public ArrayList<OvhWhoisObfuscatorFieldsEnum> serviceName_owo_GET(String serviceName, OvhWhoisObfuscatorFieldsEnum field) throws IOException { """ List of whois obfuscators REST: GET /domain/{serviceName}/owo @param field [required] Filter the value of field property (=) @param serviceName [required] The int...
java
public ArrayList<OvhWhoisObfuscatorFieldsEnum> serviceName_owo_GET(String serviceName, OvhWhoisObfuscatorFieldsEnum field) throws IOException { String qPath = "/domain/{serviceName}/owo"; StringBuilder sb = path(qPath, serviceName); query(sb, "field", field); String resp = exec(qPath, "GET", sb.toString(), null...
[ "public", "ArrayList", "<", "OvhWhoisObfuscatorFieldsEnum", ">", "serviceName_owo_GET", "(", "String", "serviceName", ",", "OvhWhoisObfuscatorFieldsEnum", "field", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/{serviceName}/owo\"", ";", "StringBuilde...
List of whois obfuscators REST: GET /domain/{serviceName}/owo @param field [required] Filter the value of field property (=) @param serviceName [required] The internal name of your domain
[ "List", "of", "whois", "obfuscators" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1499-L1505
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.getVM
public static VM getVM(Model mo, int vmID) throws JSONConverterException { """ Get a VM from its identifier. The VM is already a part of the model. @param mo the associated model to browse @param vmID the node identifier @return the resulting VM @throws JSONConverterException if there is no model, or if the...
java
public static VM getVM(Model mo, int vmID) throws JSONConverterException { VM vm = new VM(vmID); if (!mo.contains(vm)) { throw new JSONConverterException("Undeclared vm '" + vmID + "'"); } return vm; }
[ "public", "static", "VM", "getVM", "(", "Model", "mo", ",", "int", "vmID", ")", "throws", "JSONConverterException", "{", "VM", "vm", "=", "new", "VM", "(", "vmID", ")", ";", "if", "(", "!", "mo", ".", "contains", "(", "vm", ")", ")", "{", "throw", ...
Get a VM from its identifier. The VM is already a part of the model. @param mo the associated model to browse @param vmID the node identifier @return the resulting VM @throws JSONConverterException if there is no model, or if the VM is unknown.
[ "Get", "a", "VM", "from", "its", "identifier", ".", "The", "VM", "is", "already", "a", "part", "of", "the", "model", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L377-L383
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.forEach
@Deprecated public static void forEach(String string, CharProcedure procedure) { """ For each character in the {@code string}, execute the {@link CharProcedure}. @deprecated since 7.0. Use {@link #forEachChar(String, CharProcedure)} instead. """ StringIterate.forEachChar(string, procedure); ...
java
@Deprecated public static void forEach(String string, CharProcedure procedure) { StringIterate.forEachChar(string, procedure); }
[ "@", "Deprecated", "public", "static", "void", "forEach", "(", "String", "string", ",", "CharProcedure", "procedure", ")", "{", "StringIterate", ".", "forEachChar", "(", "string", ",", "procedure", ")", ";", "}" ]
For each character in the {@code string}, execute the {@link CharProcedure}. @deprecated since 7.0. Use {@link #forEachChar(String, CharProcedure)} instead.
[ "For", "each", "character", "in", "the", "{", "@code", "string", "}", "execute", "the", "{", "@link", "CharProcedure", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L349-L353
Azure/azure-sdk-for-java
keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java
VaultsInner.beginPurgeDeletedAsync
public Observable<Void> beginPurgeDeletedAsync(String vaultName, String location) { """ Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @param vaultName The name of the soft-deleted vault. @param location The location of the soft-deleted vault. @throws IllegalArgumentException...
java
public Observable<Void> beginPurgeDeletedAsync(String vaultName, String location) { return beginPurgeDeletedWithServiceResponseAsync(vaultName, location).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return res...
[ "public", "Observable", "<", "Void", ">", "beginPurgeDeletedAsync", "(", "String", "vaultName", ",", "String", "location", ")", "{", "return", "beginPurgeDeletedWithServiceResponseAsync", "(", "vaultName", ",", "location", ")", ".", "map", "(", "new", "Func1", "<"...
Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @param vaultName The name of the soft-deleted vault. @param location The location of the soft-deleted vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successfu...
[ "Permanently", "deletes", "the", "specified", "vault", ".", "aka", "Purges", "the", "deleted", "Azure", "key", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java#L1346-L1353
katjahahn/PortEx
src/main/java/com/github/katjahahn/tools/visualizer/Visualizer.java
Visualizer.createImage
public BufferedImage createImage(File file) throws IOException { """ Creates a buffered image that displays the structure of the PE file. @param file the PE file to create an image from @return buffered image @throws IOException if sections can not be read """ resetAvailabilityFlags(); this.data = P...
java
public BufferedImage createImage(File file) throws IOException { resetAvailabilityFlags(); this.data = PELoader.loadPE(file); image = new BufferedImage(fileWidth, height, IMAGE_TYPE); drawSections(); Overlay overlay = new Overlay(data); if (overlay.exists()) { long overlayOffset = overlay.getOffset(); ...
[ "public", "BufferedImage", "createImage", "(", "File", "file", ")", "throws", "IOException", "{", "resetAvailabilityFlags", "(", ")", ";", "this", ".", "data", "=", "PELoader", ".", "loadPE", "(", "file", ")", ";", "image", "=", "new", "BufferedImage", "(", ...
Creates a buffered image that displays the structure of the PE file. @param file the PE file to create an image from @return buffered image @throws IOException if sections can not be read
[ "Creates", "a", "buffered", "image", "that", "displays", "the", "structure", "of", "the", "PE", "file", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/tools/visualizer/Visualizer.java#L379-L401
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/profiles/TiffEPProfile.java
TiffEPProfile.checkForbiddenTag
private void checkForbiddenTag(IfdTags metadata, String tagName, String ext) { """ Check a forbidden tag is not present. @param metadata the metadata @param tagName the tag name @param ext string extension """ int tagid = TiffTags.getTagId(tagName); if (metadata.containsTagId(tagid)) { valid...
java
private void checkForbiddenTag(IfdTags metadata, String tagName, String ext) { int tagid = TiffTags.getTagId(tagName); if (metadata.containsTagId(tagid)) { validation.addErrorLoc("Forbidden tag for TiffEP found " + tagName, ext); } }
[ "private", "void", "checkForbiddenTag", "(", "IfdTags", "metadata", ",", "String", "tagName", ",", "String", "ext", ")", "{", "int", "tagid", "=", "TiffTags", ".", "getTagId", "(", "tagName", ")", ";", "if", "(", "metadata", ".", "containsTagId", "(", "tag...
Check a forbidden tag is not present. @param metadata the metadata @param tagName the tag name @param ext string extension
[ "Check", "a", "forbidden", "tag", "is", "not", "present", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/profiles/TiffEPProfile.java#L372-L377
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/shortcuts/AbstractSarlLaunchShortcut.java
AbstractSarlLaunchShortcut.searchAndLaunch
private void searchAndLaunch(String mode, Object... scope) { """ Resolves an element type that can be launched from the given scope and launches in the specified mode. @param mode launch mode. @param scope the elements to consider for an element type that can be launched. """ final ElementDescription el...
java
private void searchAndLaunch(String mode, Object... scope) { final ElementDescription element = searchAndSelect(true, scope); if (element != null) { try { launch(element.projectName, element.elementName, mode); } catch (CoreException e) { SARLEclipsePlugin.getDefault().openError(getShell(), io.s...
[ "private", "void", "searchAndLaunch", "(", "String", "mode", ",", "Object", "...", "scope", ")", "{", "final", "ElementDescription", "element", "=", "searchAndSelect", "(", "true", ",", "scope", ")", ";", "if", "(", "element", "!=", "null", ")", "{", "try"...
Resolves an element type that can be launched from the given scope and launches in the specified mode. @param mode launch mode. @param scope the elements to consider for an element type that can be launched.
[ "Resolves", "an", "element", "type", "that", "can", "be", "launched", "from", "the", "given", "scope", "and", "launches", "in", "the", "specified", "mode", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/shortcuts/AbstractSarlLaunchShortcut.java#L219-L230
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java
TriggersInner.listByDataBoxEdgeDeviceAsync
public Observable<Page<TriggerInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { """ Lists all the triggers configured in the device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if par...
java
public Observable<Page<TriggerInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { return listByDataBoxEdgeDeviceWithServiceResponseAsync(deviceName, resourceGroupName) .map(new Func1<ServiceResponse<Page<TriggerInner>>, Page<TriggerInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "TriggerInner", ">", ">", "listByDataBoxEdgeDeviceAsync", "(", "final", "String", "deviceName", ",", "final", "String", "resourceGroupName", ")", "{", "return", "listByDataBoxEdgeDeviceWithServiceResponseAsync", "(", "deviceName",...
Lists all the triggers configured in the device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;TriggerInner&gt; object
[ "Lists", "all", "the", "triggers", "configured", "in", "the", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java#L143-L151
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java
BasicBondGenerator.generateRingElements
public IRenderingElement generateRingElements(IBond bond, IRing ring, RendererModel model) { """ Generate ring elements, such as inner-ring bonds or ring stereo elements. @param bond the ring bond to use when generating elements @param ring the ring that the bond is in @param model the renderer model @return...
java
public IRenderingElement generateRingElements(IBond bond, IRing ring, RendererModel model) { if (isSingle(bond) && isStereoBond(bond)) { return generateStereoElement(bond, model); } else if (isDouble(bond)) { ElementGroup pair = new ElementGroup(); pair.add(generateBo...
[ "public", "IRenderingElement", "generateRingElements", "(", "IBond", "bond", ",", "IRing", "ring", ",", "RendererModel", "model", ")", "{", "if", "(", "isSingle", "(", "bond", ")", "&&", "isStereoBond", "(", "bond", ")", ")", "{", "return", "generateStereoElem...
Generate ring elements, such as inner-ring bonds or ring stereo elements. @param bond the ring bond to use when generating elements @param ring the ring that the bond is in @param model the renderer model @return one or more rendering elements
[ "Generate", "ring", "elements", "such", "as", "inner", "-", "ring", "bonds", "or", "ring", "stereo", "elements", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java#L378-L389
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java
AbstractCachedGenerator.getTempFilePath
protected String getTempFilePath(GeneratorContext context, CacheMode cacheMode) { """ Returns the file path of the temporary resource @param context the generator context @param cacheMode the cache mode @return the file path of the temporary resource """ return getTempDirectory() + cacheMode + URL_SE...
java
protected String getTempFilePath(GeneratorContext context, CacheMode cacheMode) { return getTempDirectory() + cacheMode + URL_SEPARATOR + getResourceCacheKey(context.getPath(), context); }
[ "protected", "String", "getTempFilePath", "(", "GeneratorContext", "context", ",", "CacheMode", "cacheMode", ")", "{", "return", "getTempDirectory", "(", ")", "+", "cacheMode", "+", "URL_SEPARATOR", "+", "getResourceCacheKey", "(", "context", ".", "getPath", "(", ...
Returns the file path of the temporary resource @param context the generator context @param cacheMode the cache mode @return the file path of the temporary resource
[ "Returns", "the", "file", "path", "of", "the", "temporary", "resource" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java#L216-L219
kite-sdk/kite
kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java
Record.putIfAbsent
public void putIfAbsent(String key, Object value) { """ Adds the given value to the values currently associated with the given key, iff the key isn't already associated with that same value. """ if (!fields.containsEntry(key, value)) { fields.put(key, value); } }
java
public void putIfAbsent(String key, Object value) { if (!fields.containsEntry(key, value)) { fields.put(key, value); } }
[ "public", "void", "putIfAbsent", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "!", "fields", ".", "containsEntry", "(", "key", ",", "value", ")", ")", "{", "fields", ".", "put", "(", "key", ",", "value", ")", ";", "}", "}" ]
Adds the given value to the values currently associated with the given key, iff the key isn't already associated with that same value.
[ "Adds", "the", "given", "value", "to", "the", "values", "currently", "associated", "with", "the", "given", "key", "iff", "the", "key", "isn", "t", "already", "associated", "with", "that", "same", "value", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java#L102-L106
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/core/AbstractCryptor.java
AbstractCryptor.newCipher
protected C newCipher(final K key) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, UnsupportedEncodingException { """ Factory method for creating a new {@link Cipher} from the given private key. This method is invoked i...
java
protected C newCipher(final K key) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, UnsupportedEncodingException { return newCipher(key, newAlgorithm(), newSalt(), newIterationCount(), newOperationMode()); }
[ "protected", "C", "newCipher", "(", "final", "K", "key", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchPaddingException", ",", "InvalidKeyException", ",", "InvalidAlgorithmParameterException", ",", "UnsupportedEncodingException", "{", ...
Factory method for creating a new {@link Cipher} from the given private key. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link Cipher} from the given private key. @param key the key @return the new {@link Cipher} from the giv...
[ "Factory", "method", "for", "creating", "a", "new", "{", "@link", "Cipher", "}", "from", "the", "given", "private", "key", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overrid...
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/core/AbstractCryptor.java#L184-L189
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.addMinute
public final Timestamp addMinute(int amount) { """ Returns a timestamp relative to this one by the given number of minutes. <p> This method always returns a Timestamp with at least MINUTE precision. For example, adding one minute to {@code 2011T} results in {@code 2011-01-01T00:01-00:00}. To receive a Timestam...
java
public final Timestamp addMinute(int amount) { long delta = (long) amount * 60 * 1000; return addMillisForPrecision(delta, Precision.MINUTE, false); }
[ "public", "final", "Timestamp", "addMinute", "(", "int", "amount", ")", "{", "long", "delta", "=", "(", "long", ")", "amount", "*", "60", "*", "1000", ";", "return", "addMillisForPrecision", "(", "delta", ",", "Precision", ".", "MINUTE", ",", "false", ")...
Returns a timestamp relative to this one by the given number of minutes. <p> This method always returns a Timestamp with at least MINUTE precision. For example, adding one minute to {@code 2011T} results in {@code 2011-01-01T00:01-00:00}. To receive a Timestamp that always maintains the same precision as the original, ...
[ "Returns", "a", "timestamp", "relative", "to", "this", "one", "by", "the", "given", "number", "of", "minutes", ".", "<p", ">", "This", "method", "always", "returns", "a", "Timestamp", "with", "at", "least", "MINUTE", "precision", ".", "For", "example", "ad...
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L2381-L2385
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Base.java
Base.find
public static void find(String sql, RowListener listener) { """ Executes a raw query and calls instance of <code>RowListener</code> with every row found. Use this method for very large result sets. @param sql raw SQL query. @param listener client listener implementation for processing individual rows. """...
java
public static void find(String sql, RowListener listener) { new DB(DB.DEFAULT_NAME).find(sql, listener); }
[ "public", "static", "void", "find", "(", "String", "sql", ",", "RowListener", "listener", ")", "{", "new", "DB", "(", "DB", ".", "DEFAULT_NAME", ")", ".", "find", "(", "sql", ",", "listener", ")", ";", "}" ]
Executes a raw query and calls instance of <code>RowListener</code> with every row found. Use this method for very large result sets. @param sql raw SQL query. @param listener client listener implementation for processing individual rows.
[ "Executes", "a", "raw", "query", "and", "calls", "instance", "of", "<code", ">", "RowListener<", "/", "code", ">", "with", "every", "row", "found", ".", "Use", "this", "method", "for", "very", "large", "result", "sets", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Base.java#L256-L258
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateCompositeEntityRoleWithServiceResponseAsync
public Observable<ServiceResponse<OperationStatus>> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The...
java
public Observable<ServiceResponse<OperationStatus>> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { if (this.client.endpoint() == null) { throw new Il...
[ "public", "Observable", "<", "ServiceResponse", "<", "OperationStatus", ">", ">", "updateCompositeEntityRoleWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "cEntityId", ",", "UUID", "roleId", ",", "UpdateCompositeEntityRoleOptiona...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param cEntityId The composite entity extractor ID. @param roleId The entity role ID. @param updateCompositeEntityRoleOptionalParameter the object representing the optional parameters to be set before calling th...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L12505-L12524
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ConsumedCapacity.java
ConsumedCapacity.withLocalSecondaryIndexes
public ConsumedCapacity withLocalSecondaryIndexes(java.util.Map<String, Capacity> localSecondaryIndexes) { """ <p> The amount of throughput consumed on each local index affected by the operation. </p> @param localSecondaryIndexes The amount of throughput consumed on each local index affected by the operation...
java
public ConsumedCapacity withLocalSecondaryIndexes(java.util.Map<String, Capacity> localSecondaryIndexes) { setLocalSecondaryIndexes(localSecondaryIndexes); return this; }
[ "public", "ConsumedCapacity", "withLocalSecondaryIndexes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Capacity", ">", "localSecondaryIndexes", ")", "{", "setLocalSecondaryIndexes", "(", "localSecondaryIndexes", ")", ";", "return", "this", ";", "}" ]
<p> The amount of throughput consumed on each local index affected by the operation. </p> @param localSecondaryIndexes The amount of throughput consumed on each local index affected by the operation. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "amount", "of", "throughput", "consumed", "on", "each", "local", "index", "affected", "by", "the", "operation", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ConsumedCapacity.java#L313-L316
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformFinder.java
WaveformFinder.deliverWaveformPreviewUpdate
private void deliverWaveformPreviewUpdate(final int player, final WaveformPreview preview) { """ Send a waveform preview update announcement to all registered listeners. @param player the player whose waveform preview has changed @param preview the new waveform preview, if any """ final Set<Wavefor...
java
private void deliverWaveformPreviewUpdate(final int player, final WaveformPreview preview) { final Set<WaveformListener> listeners = getWaveformListeners(); if (!listeners.isEmpty()) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { ...
[ "private", "void", "deliverWaveformPreviewUpdate", "(", "final", "int", "player", ",", "final", "WaveformPreview", "preview", ")", "{", "final", "Set", "<", "WaveformListener", ">", "listeners", "=", "getWaveformListeners", "(", ")", ";", "if", "(", "!", "listen...
Send a waveform preview update announcement to all registered listeners. @param player the player whose waveform preview has changed @param preview the new waveform preview, if any
[ "Send", "a", "waveform", "preview", "update", "announcement", "to", "all", "registered", "listeners", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformFinder.java#L671-L689
GoogleCloudPlatform/appengine-pipelines
java/src/main/java/com/google/appengine/tools/pipeline/Job.java
Job.futureCall
public <T> FutureValue<T> futureCall(Job0<T> jobInstance, JobSetting... settings) { """ Invoke this method from within the {@code run} method of a <b>generator job</b> in order to specify a job node in the generated child job graph. This version of the method is for child jobs that take zero arguments. @param...
java
public <T> FutureValue<T> futureCall(Job0<T> jobInstance, JobSetting... settings) { return futureCallUnchecked(settings, jobInstance); }
[ "public", "<", "T", ">", "FutureValue", "<", "T", ">", "futureCall", "(", "Job0", "<", "T", ">", "jobInstance", ",", "JobSetting", "...", "settings", ")", "{", "return", "futureCallUnchecked", "(", "settings", ",", "jobInstance", ")", ";", "}" ]
Invoke this method from within the {@code run} method of a <b>generator job</b> in order to specify a job node in the generated child job graph. This version of the method is for child jobs that take zero arguments. @param <T> The return type of the child job being specified @param jobInstance A user-written job objec...
[ "Invoke", "this", "method", "from", "within", "the", "{", "@code", "run", "}", "method", "of", "a", "<b", ">", "generator", "job<", "/", "b", ">", "in", "order", "to", "specify", "a", "job", "node", "in", "the", "generated", "child", "job", "graph", ...
train
https://github.com/GoogleCloudPlatform/appengine-pipelines/blob/277394648dac3e8214677af898935d07399ac8e1/java/src/main/java/com/google/appengine/tools/pipeline/Job.java#L199-L201
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.queryConversationEvents
public void queryConversationEvents(@NonNull final String conversationId, @NonNull final Long from, @NonNull final Integer limit, @Nullable Callback<ComapiResult<ConversationEventsResponse>> callback) { """ Query chanel events. @param conversationId ID of a conversation to query events in it. @param from ...
java
public void queryConversationEvents(@NonNull final String conversationId, @NonNull final Long from, @NonNull final Integer limit, @Nullable Callback<ComapiResult<ConversationEventsResponse>> callback) { adapter.adapt(queryConversationEvents(conversationId, from, limit), callback); }
[ "public", "void", "queryConversationEvents", "(", "@", "NonNull", "final", "String", "conversationId", ",", "@", "NonNull", "final", "Long", "from", ",", "@", "NonNull", "final", "Integer", "limit", ",", "@", "Nullable", "Callback", "<", "ComapiResult", "<", "...
Query chanel events. @param conversationId ID of a conversation to query events in it. @param from ID of the event to start from. @param limit Limit of events to obtain in this call. @param callback Callback to deliver new session instance.
[ "Query", "chanel", "events", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L869-L871
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java
OffsetTime.withOffsetSameInstant
public OffsetTime withOffsetSameInstant(ZoneOffset offset) { """ Returns a copy of this {@code OffsetTime} with the specified offset ensuring that the result is at the same instant on an implied day. <p> This method returns an object with the specified {@code ZoneOffset} and a {@code LocalTime} adjusted by the...
java
public OffsetTime withOffsetSameInstant(ZoneOffset offset) { if (offset.equals(this.offset)) { return this; } int difference = offset.getTotalSeconds() - this.offset.getTotalSeconds(); LocalTime adjusted = time.plusSeconds(difference); return new OffsetTime(adjusted, ...
[ "public", "OffsetTime", "withOffsetSameInstant", "(", "ZoneOffset", "offset", ")", "{", "if", "(", "offset", ".", "equals", "(", "this", ".", "offset", ")", ")", "{", "return", "this", ";", "}", "int", "difference", "=", "offset", ".", "getTotalSeconds", "...
Returns a copy of this {@code OffsetTime} with the specified offset ensuring that the result is at the same instant on an implied day. <p> This method returns an object with the specified {@code ZoneOffset} and a {@code LocalTime} adjusted by the difference between the two offsets. This will result in the old and new o...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "OffsetTime", "}", "with", "the", "specified", "offset", "ensuring", "that", "the", "result", "is", "at", "the", "same", "instant", "on", "an", "implied", "day", ".", "<p", ">", "This", "method", "retur...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java#L584-L591
caligin/tinytypes
meta/src/main/java/tech/anima/tinytypes/meta/MetaTinyTypes.java
MetaTinyTypes.metaFor
public static <T> MetaTinyType<T> metaFor(Class<?> candidate) { """ Provides a type-specific Meta class for the given TinyType. @param <T> the TinyType class type @param candidate the TinyType class to obtain a Meta for @return a Meta implementation suitable for the candidate @throws IllegalArgumentException...
java
public static <T> MetaTinyType<T> metaFor(Class<?> candidate) { for (MetaTinyType meta : metas) { if (meta.isMetaOf(candidate)) { return meta; } } throw new IllegalArgumentException(String.format("not a tinytype: %s", candidate == null ? "null" : candidate...
[ "public", "static", "<", "T", ">", "MetaTinyType", "<", "T", ">", "metaFor", "(", "Class", "<", "?", ">", "candidate", ")", "{", "for", "(", "MetaTinyType", "meta", ":", "metas", ")", "{", "if", "(", "meta", ".", "isMetaOf", "(", "candidate", ")", ...
Provides a type-specific Meta class for the given TinyType. @param <T> the TinyType class type @param candidate the TinyType class to obtain a Meta for @return a Meta implementation suitable for the candidate @throws IllegalArgumentException for null or a non-TinyType
[ "Provides", "a", "type", "-", "specific", "Meta", "class", "for", "the", "given", "TinyType", "." ]
train
https://github.com/caligin/tinytypes/blob/3f79b3b35e241770a9ea0a72782210b0c2b79eb0/meta/src/main/java/tech/anima/tinytypes/meta/MetaTinyTypes.java#L25-L32
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseMacro
private void parseMacro( TokenList tokens , Sequence sequence ) { """ Parse a macro defintion. "macro NAME( var0 , var1 ) = 5+var0+var1' """ Macro macro = new Macro(); TokenList.Token t = tokens.getFirst().next; if( t.word == null ) { throw new ParseError("Expected the ...
java
private void parseMacro( TokenList tokens , Sequence sequence ) { Macro macro = new Macro(); TokenList.Token t = tokens.getFirst().next; if( t.word == null ) { throw new ParseError("Expected the macro's name after "+tokens.getFirst().word); } List<TokenList.Token> v...
[ "private", "void", "parseMacro", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "Macro", "macro", "=", "new", "Macro", "(", ")", ";", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ".", "next", ";", "if", ...
Parse a macro defintion. "macro NAME( var0 , var1 ) = 5+var0+var1'
[ "Parse", "a", "macro", "defintion", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L518-L542
Azure/azure-sdk-for-java
devspaces/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/devspaces/v2018_06_01_preview/implementation/ControllersInner.java
ControllersInner.getByResourceGroupAsync
public Observable<ControllerInner> getByResourceGroupAsync(String resourceGroupName, String name) { """ Gets an Azure Dev Spaces Controller. Gets the properties for an Azure Dev Spaces Controller. @param resourceGroupName Resource group to which the resource belongs. @param name Name of the resource. @throws...
java
public Observable<ControllerInner> getByResourceGroupAsync(String resourceGroupName, String name) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<ControllerInner>, ControllerInner>() { @Override public ControllerInner call(Servic...
[ "public", "Observable", "<", "ControllerInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map", "(", "n...
Gets an Azure Dev Spaces Controller. Gets the properties for an Azure Dev Spaces Controller. @param resourceGroupName Resource group to which the resource belongs. @param name Name of the resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ControllerInner o...
[ "Gets", "an", "Azure", "Dev", "Spaces", "Controller", ".", "Gets", "the", "properties", "for", "an", "Azure", "Dev", "Spaces", "Controller", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/devspaces/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/devspaces/v2018_06_01_preview/implementation/ControllersInner.java#L155-L162
shrinkwrap/resolver
maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/packaging/ManifestAsset.java
ManifestAsset.manifestAsString
private static String manifestAsString(Manifest manifest) { """ Conversion method from Manifest to String. @param manifest Manifest to be transformed into String @return String representation of the Manifest """ ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ma...
java
private static String manifestAsString(Manifest manifest) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { manifest.write(baos); return baos.toString("UTF-8"); } catch (IOException e) { throw new IllegalStateException("Unable to write MANIFES...
[ "private", "static", "String", "manifestAsString", "(", "Manifest", "manifest", ")", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "try", "{", "manifest", ".", "write", "(", "baos", ")", ";", "return", "baos", ".", ...
Conversion method from Manifest to String. @param manifest Manifest to be transformed into String @return String representation of the Manifest
[ "Conversion", "method", "from", "Manifest", "to", "String", "." ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/packaging/ManifestAsset.java#L48-L62
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.getByPath
public static Object getByPath(JSON json, String expression) { """ 通过表达式获取JSON中嵌套的对象<br> <ol> <li>.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值</li> <li>[]表达式,可以获取集合等对象中对应index的值</li> </ol> 表达式栗子: <pre> persion persion.name persons[3] person.friends[5].name </pre> @param json {@link JSON} @param express...
java
public static Object getByPath(JSON json, String expression) { return (null == json || StrUtil.isBlank(expression)) ? null : json.getByPath(expression); }
[ "public", "static", "Object", "getByPath", "(", "JSON", "json", ",", "String", "expression", ")", "{", "return", "(", "null", "==", "json", "||", "StrUtil", ".", "isBlank", "(", "expression", ")", ")", "?", "null", ":", "json", ".", "getByPath", "(", "...
通过表达式获取JSON中嵌套的对象<br> <ol> <li>.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值</li> <li>[]表达式,可以获取集合等对象中对应index的值</li> </ol> 表达式栗子: <pre> persion persion.name persons[3] person.friends[5].name </pre> @param json {@link JSON} @param expression 表达式 @return 对象 @see JSON#getByPath(String)
[ "通过表达式获取JSON中嵌套的对象<br", ">", "<ol", ">", "<li", ">", ".", "表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值<", "/", "li", ">", "<li", ">", "[]", "表达式,可以获取集合等对象中对应index的值<", "/", "li", ">", "<", "/", "ol", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L410-L412
hdbeukel/james-core
src/main/java/org/jamesframework/core/util/SetUtilities.java
SetUtilities.getRandomElement
public static <T> T getRandomElement(Set<? extends T> set, Random rg) { """ Select a random element from a given set (uniformly distributed). This implementation generates a random number r in [0,|set|-1] and traverses the set using an iterator, where the element obtained after r+1 applications of {@link Iterato...
java
public static <T> T getRandomElement(Set<? extends T> set, Random rg){ Iterator<? extends T> it = set.iterator(); int r = rg.nextInt(set.size()); T selected = it.next(); for(int i=0; i<r; i++){ selected = it.next(); } return selected; }
[ "public", "static", "<", "T", ">", "T", "getRandomElement", "(", "Set", "<", "?", "extends", "T", ">", "set", ",", "Random", "rg", ")", "{", "Iterator", "<", "?", "extends", "T", ">", "it", "=", "set", ".", "iterator", "(", ")", ";", "int", "r", ...
Select a random element from a given set (uniformly distributed). This implementation generates a random number r in [0,|set|-1] and traverses the set using an iterator, where the element obtained after r+1 applications of {@link Iterator#next()} is returned. In the worst case, this algorithm has linear time complexity...
[ "Select", "a", "random", "element", "from", "a", "given", "set", "(", "uniformly", "distributed", ")", ".", "This", "implementation", "generates", "a", "random", "number", "r", "in", "[", "0", "|set|", "-", "1", "]", "and", "traverses", "the", "set", "us...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/util/SetUtilities.java#L43-L51
apache/groovy
src/main/java/org/codehaus/groovy/ast/tools/ClosureUtils.java
ClosureUtils.convertClosureToSource
public static String convertClosureToSource(ReaderSource readerSource, ClosureExpression expression) throws Exception { """ Converts a ClosureExpression into the String source. @param readerSource a source @param expression a closure. Can't be null @return the source the closure was created from @throws java...
java
public static String convertClosureToSource(ReaderSource readerSource, ClosureExpression expression) throws Exception { String source = GeneralUtils.convertASTToSource(readerSource, expression); if (!source.startsWith("{")) { throw new Exception("Error converting ClosureExpression into sourc...
[ "public", "static", "String", "convertClosureToSource", "(", "ReaderSource", "readerSource", ",", "ClosureExpression", "expression", ")", "throws", "Exception", "{", "String", "source", "=", "GeneralUtils", ".", "convertASTToSource", "(", "readerSource", ",", "expressio...
Converts a ClosureExpression into the String source. @param readerSource a source @param expression a closure. Can't be null @return the source the closure was created from @throws java.lang.IllegalArgumentException when expression is null @throws java.lang.Exception when closure can't be read from source
[ "Converts", "a", "ClosureExpression", "into", "the", "String", "source", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/ast/tools/ClosureUtils.java#L40-L46
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setNCharacterStream
@Override public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { """ Method setNCharacterStream. @param parameterIndex @param value @throws SQLException @see java.sql.PreparedStatement#setNCharacterStream(int, Reader) """ internalStmt.setNCharacterStream(par...
java
@Override public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { internalStmt.setNCharacterStream(parameterIndex, value); }
[ "@", "Override", "public", "void", "setNCharacterStream", "(", "int", "parameterIndex", ",", "Reader", "value", ")", "throws", "SQLException", "{", "internalStmt", ".", "setNCharacterStream", "(", "parameterIndex", ",", "value", ")", ";", "}" ]
Method setNCharacterStream. @param parameterIndex @param value @throws SQLException @see java.sql.PreparedStatement#setNCharacterStream(int, Reader)
[ "Method", "setNCharacterStream", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L790-L793
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_billingAccount_accessories_POST
public OvhOrder telephony_billingAccount_accessories_POST(String billingAccount, String[] accessories, String mondialRelayId, Boolean retractation, Long shippingContactId) throws IOException { """ Create order REST: POST /order/telephony/{billingAccount}/accessories @param mondialRelayId [required] Use /supply...
java
public OvhOrder telephony_billingAccount_accessories_POST(String billingAccount, String[] accessories, String mondialRelayId, Boolean retractation, Long shippingContactId) throws IOException { String qPath = "/order/telephony/{billingAccount}/accessories"; StringBuilder sb = path(qPath, billingAccount); HashMap<S...
[ "public", "OvhOrder", "telephony_billingAccount_accessories_POST", "(", "String", "billingAccount", ",", "String", "[", "]", "accessories", ",", "String", "mondialRelayId", ",", "Boolean", "retractation", ",", "Long", "shippingContactId", ")", "throws", "IOException", "...
Create order REST: POST /order/telephony/{billingAccount}/accessories @param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information entry. @param shippingContactId [required] Shipping contact information id from /me entry point @param ret...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6701-L6711
adobe/htl-tck
src/main/java/io/sightly/tck/http/Client.java
Client.getStringContent
public String getStringContent(String url, int expectedStatusCode) { """ Retrieves the content available at {@code url} as a {@link String}. The server must respond with a status code equal to {@code expectedStatusCode}, otherwise this method will throw a {@link ClientException}; @param url the ...
java
public String getStringContent(String url, int expectedStatusCode) { GetMethod method = new GetMethod(url); try { int statusCode = client.executeMethod(method); if (statusCode == expectedStatusCode) { InputStream is = method.getResponseBodyAsStream(); ...
[ "public", "String", "getStringContent", "(", "String", "url", ",", "int", "expectedStatusCode", ")", "{", "GetMethod", "method", "=", "new", "GetMethod", "(", "url", ")", ";", "try", "{", "int", "statusCode", "=", "client", ".", "executeMethod", "(", "method...
Retrieves the content available at {@code url} as a {@link String}. The server must respond with a status code equal to {@code expectedStatusCode}, otherwise this method will throw a {@link ClientException}; @param url the URL from which to retrieve the content @param expectedStatusCode the expected sta...
[ "Retrieves", "the", "content", "available", "at", "{", "@code", "url", "}", "as", "a", "{", "@link", "String", "}", ".", "The", "server", "must", "respond", "with", "a", "status", "code", "equal", "to", "{", "@code", "expectedStatusCode", "}", "otherwise",...
train
https://github.com/adobe/htl-tck/blob/2043a9616083c06cefbd685798c9a2b2ac2ea98e/src/main/java/io/sightly/tck/http/Client.java#L74-L88
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSContainer.java
EJSContainer.getEJBHome
public EJBHome getEJBHome(J2EEName name) throws ContainerEJBException { """ Returns a reference to the EJBHome associated with a specified J2EEName. @param name is the J2EEName of the EJB's home object. @exception ContainerEJBException if any Throwable occurs that prevented this method from return EJBHome. ...
java
public EJBHome getEJBHome(J2EEName name) throws ContainerEJBException { try { EJSWrapperCommon wrapperCommon = getHomeWrapperCommon(name); EJSWrapper wrapper = wrapperCommon.getRemoteWrapper(); return (EJBHome) PortableRemoteObject.toStub(wrapper); // PM35068 } catch ...
[ "public", "EJBHome", "getEJBHome", "(", "J2EEName", "name", ")", "throws", "ContainerEJBException", "{", "try", "{", "EJSWrapperCommon", "wrapperCommon", "=", "getHomeWrapperCommon", "(", "name", ")", ";", "EJSWrapper", "wrapper", "=", "wrapperCommon", ".", "getRemo...
Returns a reference to the EJBHome associated with a specified J2EEName. @param name is the J2EEName of the EJB's home object. @exception ContainerEJBException if any Throwable occurs that prevented this method from return EJBHome. Use the getCause method to recover the Throwable that occured.
[ "Returns", "a", "reference", "to", "the", "EJBHome", "associated", "with", "a", "specified", "J2EEName", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSContainer.java#L4517-L4533
aeshell/aesh-readline
terminal-telnet/src/main/java/org/aesh/terminal/telnet/TelnetConnection.java
TelnetConnection.onOptionParameters
protected void onOptionParameters(byte optionCode, byte[] parameters) { """ Handle option parameters call back. The implementation will try to find a matching option via the {@code Option#values()} and invoke it's {@link Option#handleParameters(TelnetConnection, byte[])} method. This method can be subclassed t...
java
protected void onOptionParameters(byte optionCode, byte[] parameters) { for (Option option : Option.values()) { if (option.code == optionCode) { option.handleParameters(this, parameters); return; } } }
[ "protected", "void", "onOptionParameters", "(", "byte", "optionCode", ",", "byte", "[", "]", "parameters", ")", "{", "for", "(", "Option", "option", ":", "Option", ".", "values", "(", ")", ")", "{", "if", "(", "option", ".", "code", "==", "optionCode", ...
Handle option parameters call back. The implementation will try to find a matching option via the {@code Option#values()} and invoke it's {@link Option#handleParameters(TelnetConnection, byte[])} method. This method can be subclassed to handle an option. @param optionCode the option code
[ "Handle", "option", "parameters", "call", "back", ".", "The", "implementation", "will", "try", "to", "find", "a", "matching", "option", "via", "the", "{", "@code", "Option#values", "()", "}", "and", "invoke", "it", "s", "{", "@link", "Option#handleParameters",...
train
https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/terminal-telnet/src/main/java/org/aesh/terminal/telnet/TelnetConnection.java#L225-L232
threerings/nenya
core/src/main/java/com/threerings/chat/SubtitleChatOverlay.java
SubtitleChatOverlay.createHistorySubtitle
protected ChatGlyph createHistorySubtitle (int index, Graphics2D layoutGfx) { """ Creates a subtitle for display in the history panel. @param index the index of the message in the history list """ ChatMessage message = _history.get(index); int type = getType(message, true); return cr...
java
protected ChatGlyph createHistorySubtitle (int index, Graphics2D layoutGfx) { ChatMessage message = _history.get(index); int type = getType(message, true); return createSubtitle(message, type, layoutGfx, false); }
[ "protected", "ChatGlyph", "createHistorySubtitle", "(", "int", "index", ",", "Graphics2D", "layoutGfx", ")", "{", "ChatMessage", "message", "=", "_history", ".", "get", "(", "index", ")", ";", "int", "type", "=", "getType", "(", "message", ",", "true", ")", ...
Creates a subtitle for display in the history panel. @param index the index of the message in the history list
[ "Creates", "a", "subtitle", "for", "display", "in", "the", "history", "panel", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/SubtitleChatOverlay.java#L507-L512
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/AppliesToProcessor.java
AppliesToProcessor.validateEditions
public static void validateEditions(AppliesToFilterInfo info, String appliesToHeader) throws RepositoryResourceCreationException { """ Validates the list of rawEditions and throws RepositoryResourceCreationException if any of them are unknown. Clients of this class should call this method once the AppliesToFil...
java
public static void validateEditions(AppliesToFilterInfo info, String appliesToHeader) throws RepositoryResourceCreationException { if (info.getRawEditions() != null) { for (String rawEdition : info.getRawEditions()) { List<String> mappedEditions = mapRawEditionToHumanReadable(rawEdit...
[ "public", "static", "void", "validateEditions", "(", "AppliesToFilterInfo", "info", ",", "String", "appliesToHeader", ")", "throws", "RepositoryResourceCreationException", "{", "if", "(", "info", ".", "getRawEditions", "(", ")", "!=", "null", ")", "{", "for", "(",...
Validates the list of rawEditions and throws RepositoryResourceCreationException if any of them are unknown. Clients of this class should call this method once the AppliesToFilterInfo object has been created in order to check whether it is valid.
[ "Validates", "the", "list", "of", "rawEditions", "and", "throws", "RepositoryResourceCreationException", "if", "any", "of", "them", "are", "unknown", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/AppliesToProcessor.java#L245-L255
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/RPC.java
RPC.getProxy
public static <V extends VersionedProtocol> V getProxy(Class<V> protocol, InetSocketAddress addr, SocketFactory factory) throws IOException { """ Construct a client-side proxy object that implements the named protocol, talking to a server at the named address. """ @SuppressWarnings("unchecked") V prox...
java
public static <V extends VersionedProtocol> V getProxy(Class<V> protocol, InetSocketAddress addr, SocketFactory factory) throws IOException { @SuppressWarnings("unchecked") V proxy = (V) Proxy.newProxyInstance(protocol.getClassLoader(), new Class[] { protocol }, new Invoker(addr, factory)); return proxy; }
[ "public", "static", "<", "V", "extends", "VersionedProtocol", ">", "V", "getProxy", "(", "Class", "<", "V", ">", "protocol", ",", "InetSocketAddress", "addr", ",", "SocketFactory", "factory", ")", "throws", "IOException", "{", "@", "SuppressWarnings", "(", "\"...
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.
[ "Construct", "a", "client", "-", "side", "proxy", "object", "that", "implements", "the", "named", "protocol", "talking", "to", "a", "server", "at", "the", "named", "address", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/RPC.java#L315-L322
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/StringContext.java
StringContext.convertToEncoding
public String convertToEncoding(String subject, String encoding) throws UnsupportedEncodingException { """ Convert the given string to the given encoding. @param subject The value to convert @param encoding The name of the encoding/character set @return A new string in the given encoding @throws...
java
public String convertToEncoding(String subject, String encoding) throws UnsupportedEncodingException { return new String(subject.getBytes(encoding), encoding); }
[ "public", "String", "convertToEncoding", "(", "String", "subject", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "String", "(", "subject", ".", "getBytes", "(", "encoding", ")", ",", "encoding", ")", ";", "}" ]
Convert the given string to the given encoding. @param subject The value to convert @param encoding The name of the encoding/character set @return A new string in the given encoding @throws UnsupportedEncodingException if the encoding is invalid
[ "Convert", "the", "given", "string", "to", "the", "given", "encoding", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/StringContext.java#L735-L739
groovyfx-project/groovyfx
src/main/groovy/groovyx/javafx/beans/FXBindableASTTransformation.java
FXBindableASTTransformation.createFXProperty
private PropertyNode createFXProperty(PropertyNode orig) { """ Creates a new PropertyNode for the JavaFX property based on the original property. The new property will have "Property" appended to its name and its type will be one of the *Property types in JavaFX. @param orig The original property @return A n...
java
private PropertyNode createFXProperty(PropertyNode orig) { ClassNode origType = orig.getType(); ClassNode newType = PROPERTY_TYPE_MAP.get(origType); // For the ObjectProperty, we need to add the generic type to it. if (newType == null) { if (isTypeCompatible(ClassHelper.LIST...
[ "private", "PropertyNode", "createFXProperty", "(", "PropertyNode", "orig", ")", "{", "ClassNode", "origType", "=", "orig", ".", "getType", "(", ")", ";", "ClassNode", "newType", "=", "PROPERTY_TYPE_MAP", ".", "get", "(", "origType", ")", ";", "// For the Object...
Creates a new PropertyNode for the JavaFX property based on the original property. The new property will have "Property" appended to its name and its type will be one of the *Property types in JavaFX. @param orig The original property @return A new PropertyNode for the JavaFX property
[ "Creates", "a", "new", "PropertyNode", "for", "the", "JavaFX", "property", "based", "on", "the", "original", "property", ".", "The", "new", "property", "will", "have", "Property", "appended", "to", "its", "name", "and", "its", "type", "will", "be", "one", ...
train
https://github.com/groovyfx-project/groovyfx/blob/7067d76793601ce4de9c642d4c0c0e11db7907cb/src/main/groovy/groovyx/javafx/beans/FXBindableASTTransformation.java#L331-L361
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Utils.java
Utils.findShapeModelByC2jNameIfExists
public static ShapeModel findShapeModelByC2jNameIfExists(IntermediateModel intermediateModel, String shapeC2jName) { """ Search for intermediate shape model by its c2j name. @return ShapeModel or null if the shape doesn't exist (if it's primitive or container type for example) """ for (ShapeModel sh...
java
public static ShapeModel findShapeModelByC2jNameIfExists(IntermediateModel intermediateModel, String shapeC2jName) { for (ShapeModel shape : intermediateModel.getShapes().values()) { if (shape.getC2jName().equals(shapeC2jName)) { return shape; } } return n...
[ "public", "static", "ShapeModel", "findShapeModelByC2jNameIfExists", "(", "IntermediateModel", "intermediateModel", ",", "String", "shapeC2jName", ")", "{", "for", "(", "ShapeModel", "shape", ":", "intermediateModel", ".", "getShapes", "(", ")", ".", "values", "(", ...
Search for intermediate shape model by its c2j name. @return ShapeModel or null if the shape doesn't exist (if it's primitive or container type for example)
[ "Search", "for", "intermediate", "shape", "model", "by", "its", "c2j", "name", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Utils.java#L281-L288
netty/netty
codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java
ByteToMessageDecoder.fireChannelRead
static void fireChannelRead(ChannelHandlerContext ctx, CodecOutputList msgs, int numElements) { """ Get {@code numElements} out of the {@link CodecOutputList} and forward these through the pipeline. """ for (int i = 0; i < numElements; i ++) { ctx.fireChannelRead(msgs.getUnsafe(i)); ...
java
static void fireChannelRead(ChannelHandlerContext ctx, CodecOutputList msgs, int numElements) { for (int i = 0; i < numElements; i ++) { ctx.fireChannelRead(msgs.getUnsafe(i)); } }
[ "static", "void", "fireChannelRead", "(", "ChannelHandlerContext", "ctx", ",", "CodecOutputList", "msgs", ",", "int", "numElements", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numElements", ";", "i", "++", ")", "{", "ctx", ".", "fireChan...
Get {@code numElements} out of the {@link CodecOutputList} and forward these through the pipeline.
[ "Get", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java#L321-L325
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java
SerializationUtil.writeList
public static <T> void writeList(List<T> items, ObjectDataOutput out) throws IOException { """ Writes a list to an {@link ObjectDataOutput}. The list's size is written to the data output, then each object in the list is serialized. @param items list of items to be serialized @param out data output to write ...
java
public static <T> void writeList(List<T> items, ObjectDataOutput out) throws IOException { writeCollection(items, out); }
[ "public", "static", "<", "T", ">", "void", "writeList", "(", "List", "<", "T", ">", "items", ",", "ObjectDataOutput", "out", ")", "throws", "IOException", "{", "writeCollection", "(", "items", ",", "out", ")", ";", "}" ]
Writes a list to an {@link ObjectDataOutput}. The list's size is written to the data output, then each object in the list is serialized. @param items list of items to be serialized @param out data output to write to @param <T> type of items @throws NullPointerException if {@code items} or {@code out} is {@code nul...
[ "Writes", "a", "list", "to", "an", "{", "@link", "ObjectDataOutput", "}", ".", "The", "list", "s", "size", "is", "written", "to", "the", "data", "output", "then", "each", "object", "in", "the", "list", "is", "serialized", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java#L265-L267
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java
USerializedSet.getSet
public final boolean getSet(char src[], int srcStart) { """ Fill in the given serialized set object. @param src pointer to start of array @param srcStart pointer to start of serialized data (length value) @return true if the given array is valid, otherwise false """ // leave most argument checking u...
java
public final boolean getSet(char src[], int srcStart) { // leave most argument checking up to Java exceptions array=null; arrayOffset=bmpLength=length=0; length=src[srcStart++]; if ((length&0x8000) != 0) { /* there are supplementary values */ len...
[ "public", "final", "boolean", "getSet", "(", "char", "src", "[", "]", ",", "int", "srcStart", ")", "{", "// leave most argument checking up to Java exceptions", "array", "=", "null", ";", "arrayOffset", "=", "bmpLength", "=", "length", "=", "0", ";", "length", ...
Fill in the given serialized set object. @param src pointer to start of array @param srcStart pointer to start of serialized data (length value) @return true if the given array is valid, otherwise false
[ "Fill", "in", "the", "given", "serialized", "set", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java#L32-L59
VoltDB/voltdb
src/frontend/org/voltdb/compiler/DDLCompiler.java
DDLCompiler.loadAutogenExportTableSchema
void loadAutogenExportTableSchema(Database db, Database previousDBIfAny, DdlProceduresToLoad whichProcs, boolean isCurrentXDCR) throws VoltCompilerException { """ Load auto generated DR conflicts table into current schema. DR conflict table will be generated by 1) compiling the catalog if...
java
void loadAutogenExportTableSchema(Database db, Database previousDBIfAny, DdlProceduresToLoad whichProcs, boolean isCurrentXDCR) throws VoltCompilerException { Reader reader = new VoltCompilerStringReader(null, generateDDLForDRConflictsTable(db, previousDBIfAny, isCurrentXDCR)); l...
[ "void", "loadAutogenExportTableSchema", "(", "Database", "db", ",", "Database", "previousDBIfAny", ",", "DdlProceduresToLoad", "whichProcs", ",", "boolean", "isCurrentXDCR", ")", "throws", "VoltCompilerException", "{", "Reader", "reader", "=", "new", "VoltCompilerStringRe...
Load auto generated DR conflicts table into current schema. DR conflict table will be generated by 1) compiling the catalog if DR table exist and A/A DR is on, 2) liveDDL to enable DR table and turn A/A DR on 3) @UpdateApplicationCatalog to enable DR table and turn A/A DR on @param db current database @param previous...
[ "Load", "auto", "generated", "DR", "conflicts", "table", "into", "current", "schema", ".", "DR", "conflict", "table", "will", "be", "generated", "by", "1", ")", "compiling", "the", "catalog", "if", "DR", "table", "exist", "and", "A", "/", "A", "DR", "is"...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/DDLCompiler.java#L504-L509
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpConnection.java
HttpConnection.openHttp
private HttpURLConnection openHttp() throws IOException { """ 初始化http或https请求参数<br> 有些时候htts请求会出现com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理 @param hostnameVerifier 域名验证器,非https传入null @param ssf SSLSocketFactory,非https传入null @return {@link HttpURLConnectio...
java
private HttpURLConnection openHttp() throws IOException { final URLConnection conn = openConnection(); if (false == conn instanceof HttpURLConnection) { // 防止其它协议造成的转换异常 throw new HttpException("'{}' is not a http connection, make sure URL is format for http.", conn.getClass().getName()); } return...
[ "private", "HttpURLConnection", "openHttp", "(", ")", "throws", "IOException", "{", "final", "URLConnection", "conn", "=", "openConnection", "(", ")", ";", "if", "(", "false", "==", "conn", "instanceof", "HttpURLConnection", ")", "{", "// 防止其它协议造成的转换异常\r", "throw"...
初始化http或https请求参数<br> 有些时候htts请求会出现com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理 @param hostnameVerifier 域名验证器,非https传入null @param ssf SSLSocketFactory,非https传入null @return {@link HttpURLConnection},https返回{@link HttpsURLConnection}
[ "初始化http或https请求参数<br", ">", "有些时候htts请求会出现com", ".", "sun", ".", "net", ".", "ssl", ".", "internal", ".", "www", ".", "protocol", ".", "https", ".", "HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpConnection.java#L507-L515
OpenLiberty/open-liberty
dev/com.ibm.ws.jca/src/com/ibm/ws/jca/internal/WorkManagerImpl.java
WorkManagerImpl.scheduleWork
@Override public void scheduleWork( Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener) throws WorkException { """ This method puts the work on a queue that is ...
java
@Override public void scheduleWork( Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener) throws WorkException { try { beforeRunCheck(work, workLi...
[ "@", "Override", "public", "void", "scheduleWork", "(", "Work", "work", ",", "long", "startTimeout", ",", "ExecutionContext", "execContext", ",", "WorkListener", "workListener", ")", "throws", "WorkException", "{", "try", "{", "beforeRunCheck", "(", "work", ",", ...
This method puts the work on a queue that is later processed by the "scheduler" thread. This allows the method to return to the caller without having to wait for the thread to start. @pre providerId != null @param work @param startTimeout @param execContext @param workListener @throws WorkException @exception NullPoi...
[ "This", "method", "puts", "the", "work", "on", "a", "queue", "that", "is", "later", "processed", "by", "the", "scheduler", "thread", ".", "This", "allows", "the", "method", "to", "return", "to", "the", "caller", "without", "having", "to", "wait", "for", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca/src/com/ibm/ws/jca/internal/WorkManagerImpl.java#L236-L262
mojohaus/aspectj-maven-plugin
src/main/java/org/codehaus/mojo/aspectj/AjcHelper.java
AjcHelper.getWeaveSourceFiles
public static Set<String> getWeaveSourceFiles( String[] weaveDirs ) throws MojoExecutionException { """ Based on a set of weavedirs returns a set of all the files to be weaved. @return @throws MojoExecutionException """ Set<String> result = new HashSet<String>(); for ( int i = 0; i...
java
public static Set<String> getWeaveSourceFiles( String[] weaveDirs ) throws MojoExecutionException { Set<String> result = new HashSet<String>(); for ( int i = 0; i < weaveDirs.length; i++ ) { String weaveDir = weaveDirs[i]; if ( FileUtils.fileExists( weaveDir ...
[ "public", "static", "Set", "<", "String", ">", "getWeaveSourceFiles", "(", "String", "[", "]", "weaveDirs", ")", "throws", "MojoExecutionException", "{", "Set", "<", "String", ">", "result", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", ...
Based on a set of weavedirs returns a set of all the files to be weaved. @return @throws MojoExecutionException
[ "Based", "on", "a", "set", "of", "weavedirs", "returns", "a", "set", "of", "all", "the", "files", "to", "be", "weaved", "." ]
train
https://github.com/mojohaus/aspectj-maven-plugin/blob/120ee1ce08b93873931035ed98cd70e3ccceeefb/src/main/java/org/codehaus/mojo/aspectj/AjcHelper.java#L206-L227
BrunoEberhard/minimal-j
src/main/java/org/minimalj/util/IdUtils.java
IdUtils.setVersion
public static void setVersion(Object object, int version) { """ Set the value of the <code>version</code> in the given object @param object object containing a public <code>version</code> field. Must not be <code>null</code> @param version the new value. """ try { Field versionField = object.getClass(...
java
public static void setVersion(Object object, int version) { try { Field versionField = object.getClass().getField("version"); versionField.set(object, version); } catch (NoSuchFieldException | SecurityException | IllegalAccessException e) { throw new RuntimeException(e); } }
[ "public", "static", "void", "setVersion", "(", "Object", "object", ",", "int", "version", ")", "{", "try", "{", "Field", "versionField", "=", "object", ".", "getClass", "(", ")", ".", "getField", "(", "\"version\"", ")", ";", "versionField", ".", "set", ...
Set the value of the <code>version</code> in the given object @param object object containing a public <code>version</code> field. Must not be <code>null</code> @param version the new value.
[ "Set", "the", "value", "of", "the", "<code", ">", "version<", "/", "code", ">", "in", "the", "given", "object" ]
train
https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/IdUtils.java#L122-L129
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRest.java
EnforcementJobRest.getEnforcementJobByAgreementId
@GET @Path(" { """ Gets an specific enforcements given a agreementId If the enforcementJob it is not in the database, it returns 404 with empty payload <pre> GET /enforcements/{agreementId} Request: GET /enforcements HTTP/1.1 Response: {@code <?xml version="1.0" encoding="UTF-8"?> <enforce...
java
@GET @Path("{agreementId}") @Produces(MediaType.APPLICATION_XML) public Response getEnforcementJobByAgreementId(@PathParam("agreementId") String agreementId){ logger.debug("StartOf getEnforcementJobByAgreementId - REQUEST for /enforcementJobs/" + agreementId); try { EnforcementJ...
[ "@", "GET", "@", "Path", "(", "\"{agreementId}\"", ")", "@", "Produces", "(", "MediaType", ".", "APPLICATION_XML", ")", "public", "Response", "getEnforcementJobByAgreementId", "(", "@", "PathParam", "(", "\"agreementId\"", ")", "String", "agreementId", ")", "{", ...
Gets an specific enforcements given a agreementId If the enforcementJob it is not in the database, it returns 404 with empty payload <pre> GET /enforcements/{agreementId} Request: GET /enforcements HTTP/1.1 Response: {@code <?xml version="1.0" encoding="UTF-8"?> <enforcement_job> <agreement_id>agreement04</agreem...
[ "Gets", "an", "specific", "enforcements", "given", "a", "agreementId", "If", "the", "enforcementJob", "it", "is", "not", "in", "the", "database", "it", "returns", "404", "with", "empty", "payload" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRest.java#L151-L173
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java
BigIntegerExtensions.operator_multiply
@Inline(value="$1.multiply($2)") @Pure public static BigInteger operator_multiply(BigInteger a, BigInteger b) { """ The binary <code>times</code> operator. @param a a BigInteger. May not be <code>null</code>. @param b a BigInteger. May not be <code>null</code>. @return <code>a.multiply(b)</code> @throws ...
java
@Inline(value="$1.multiply($2)") @Pure public static BigInteger operator_multiply(BigInteger a, BigInteger b) { return a.multiply(b); }
[ "@", "Inline", "(", "value", "=", "\"$1.multiply($2)\"", ")", "@", "Pure", "public", "static", "BigInteger", "operator_multiply", "(", "BigInteger", "a", ",", "BigInteger", "b", ")", "{", "return", "a", ".", "multiply", "(", "b", ")", ";", "}" ]
The binary <code>times</code> operator. @param a a BigInteger. May not be <code>null</code>. @param b a BigInteger. May not be <code>null</code>. @return <code>a.multiply(b)</code> @throws NullPointerException if {@code a} or {@code b} is <code>null</code>.
[ "The", "binary", "<code", ">", "times<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java#L99-L103
iipc/webarchive-commons
src/main/java/org/archive/io/arc/ARCReader.java
ARCReader.createArchiveRecord
protected ARCRecord createArchiveRecord(InputStream is, long offset) throws IOException { """ Create new arc record. Encapsulate housekeeping that has to do w/ creating a new record. <p>Call this method at end of constructor to read in the arcfile header. Will be problems reading subsequent arc records...
java
protected ARCRecord createArchiveRecord(InputStream is, long offset) throws IOException { try { String version = super.getVersion(); ARCRecord record = new ARCRecord(is, getReaderIdentifier(), offset, isDigest(), isStrict(), isParseHttpHeaders(), ...
[ "protected", "ARCRecord", "createArchiveRecord", "(", "InputStream", "is", ",", "long", "offset", ")", "throws", "IOException", "{", "try", "{", "String", "version", "=", "super", ".", "getVersion", "(", ")", ";", "ARCRecord", "record", "=", "new", "ARCRecord"...
Create new arc record. Encapsulate housekeeping that has to do w/ creating a new record. <p>Call this method at end of constructor to read in the arcfile header. Will be problems reading subsequent arc records if you don't since arcfile header has the list of metadata fields for all records that follow. <p>When par...
[ "Create", "new", "arc", "record", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/arc/ARCReader.java#L145-L166
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java
JsHdrsImpl.getReverseRoutingPath
public final List<SIDestinationAddress> getReverseRoutingPath() { """ /* Get the contents of the ReverseRoutingPath field from the message header The List returned is a copy of the header field, so no updates to it affect the Message header itself. Javadoc description supplied by SIBusMessage interface. ...
java
public final List<SIDestinationAddress> getReverseRoutingPath() { List<String> fNames = (List<String>) getHdr2().getField(JsHdr2Access.REVERSEROUTINGPATH_DESTINATIONNAME); List<byte[]> fMEs = (List<byte[]>) getHdr2().getField(JsHdr2Access.REVERSEROUTINGPATH_MEID); byte[] fLos = (byte[]) getHdr2(...
[ "public", "final", "List", "<", "SIDestinationAddress", ">", "getReverseRoutingPath", "(", ")", "{", "List", "<", "String", ">", "fNames", "=", "(", "List", "<", "String", ">", ")", "getHdr2", "(", ")", ".", "getField", "(", "JsHdr2Access", ".", "REVERSERO...
/* Get the contents of the ReverseRoutingPath field from the message header The List returned is a copy of the header field, so no updates to it affect the Message header itself. Javadoc description supplied by SIBusMessage interface.
[ "/", "*", "Get", "the", "contents", "of", "the", "ReverseRoutingPath", "field", "from", "the", "message", "header", "The", "List", "returned", "is", "a", "copy", "of", "the", "header", "field", "so", "no", "updates", "to", "it", "affect", "the", "Message",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java#L433-L439
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/NodeSet.java
NodeSet.parseFilter
public static Map<String,Map<String, String>> parseFilter(String filter) { """ Parse textual filter and return a map of maps: [include: [key:value,...], exclude: [key:value,...]] @param filter filter string @return parsed filter """ return parseFilter(filter, true, DEFAULT_FILTER_KEY); }
java
public static Map<String,Map<String, String>> parseFilter(String filter) { return parseFilter(filter, true, DEFAULT_FILTER_KEY); }
[ "public", "static", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "parseFilter", "(", "String", "filter", ")", "{", "return", "parseFilter", "(", "filter", ",", "true", ",", "DEFAULT_FILTER_KEY", ")", ";", "}" ]
Parse textual filter and return a map of maps: [include: [key:value,...], exclude: [key:value,...]] @param filter filter string @return parsed filter
[ "Parse", "textual", "filter", "and", "return", "a", "map", "of", "maps", ":", "[", "include", ":", "[", "key", ":", "value", "...", "]", "exclude", ":", "[", "key", ":", "value", "...", "]]" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/NodeSet.java#L394-L396
aws/aws-sdk-java
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/IdentityProviderType.java
IdentityProviderType.withProviderDetails
public IdentityProviderType withProviderDetails(java.util.Map<String, String> providerDetails) { """ <p> The identity provider details, such as <code>MetadataURL</code> and <code>MetadataFile</code>. </p> @param providerDetails The identity provider details, such as <code>MetadataURL</code> and <code>Metadat...
java
public IdentityProviderType withProviderDetails(java.util.Map<String, String> providerDetails) { setProviderDetails(providerDetails); return this; }
[ "public", "IdentityProviderType", "withProviderDetails", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "providerDetails", ")", "{", "setProviderDetails", "(", "providerDetails", ")", ";", "return", "this", ";", "}" ]
<p> The identity provider details, such as <code>MetadataURL</code> and <code>MetadataFile</code>. </p> @param providerDetails The identity provider details, such as <code>MetadataURL</code> and <code>MetadataFile</code>. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "identity", "provider", "details", "such", "as", "<code", ">", "MetadataURL<", "/", "code", ">", "and", "<code", ">", "MetadataFile<", "/", "code", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/IdentityProviderType.java#L268-L271
mapbox/mapbox-java
services-geojson/src/main/java/com/mapbox/geojson/Polygon.java
Polygon.fromOuterInner
public static Polygon fromOuterInner(@NonNull LineString outer, @Nullable LineString... inner) { """ Create a new instance of this class by passing in an outer {@link LineString} and optionally one or more inner LineStrings. Each of these LineStrings should follow the linear ring rules. <p> Note that if a LineS...
java
public static Polygon fromOuterInner(@NonNull LineString outer, @Nullable LineString... inner) { isLinearRing(outer); List<List<Point>> coordinates = new ArrayList<>(); coordinates.add(outer.coordinates()); // If inner rings are set to null, return early. if (inner == null) { return new Polygo...
[ "public", "static", "Polygon", "fromOuterInner", "(", "@", "NonNull", "LineString", "outer", ",", "@", "Nullable", "LineString", "...", "inner", ")", "{", "isLinearRing", "(", "outer", ")", ";", "List", "<", "List", "<", "Point", ">", ">", "coordinates", "...
Create a new instance of this class by passing in an outer {@link LineString} and optionally one or more inner LineStrings. Each of these LineStrings should follow the linear ring rules. <p> Note that if a LineString breaks one of the linear ring rules, a {@link RuntimeException} will be thrown. @param outer a LineStr...
[ "Create", "a", "new", "instance", "of", "this", "class", "by", "passing", "in", "an", "outer", "{", "@link", "LineString", "}", "and", "optionally", "one", "or", "more", "inner", "LineStrings", ".", "Each", "of", "these", "LineStrings", "should", "follow", ...
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geojson/src/main/java/com/mapbox/geojson/Polygon.java#L152-L165
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.multRow
public static void multRow(Matrix A, int i, double c) { """ Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] * c @param A the matrix to perform he update on @param i the row to update @param c the constant to multiply each element by """ multRow(A, i, 0, A.cols(), c);...
java
public static void multRow(Matrix A, int i, double c) { multRow(A, i, 0, A.cols(), c); }
[ "public", "static", "void", "multRow", "(", "Matrix", "A", ",", "int", "i", ",", "double", "c", ")", "{", "multRow", "(", "A", ",", "i", ",", "0", ",", "A", ".", "cols", "(", ")", ",", "c", ")", ";", "}" ]
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] * c @param A the matrix to perform he update on @param i the row to update @param c the constant to multiply each element by
[ "Updates", "the", "values", "of", "row", "<tt", ">", "i<", "/", "tt", ">", "in", "the", "given", "matrix", "to", "be", "A", "[", "i", ":", "]", "=", "A", "[", "i", ":", "]", "*", "c" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L72-L75
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java
Utility.readTextFile
public static String readTextFile(Context context, String asset) { """ Read a text file from assets into a single string @param context A non-null Android Context @param asset The asset file to read @return The contents or null on error. """ try { InputStream inputStream = context.ge...
java
public static String readTextFile(Context context, String asset) { try { InputStream inputStream = context.getAssets().open(asset); return org.gearvrf.utility.TextFile.readTextFile(inputStream); } catch (FileNotFoundException f) { Log.w(TAG, "readTextFile(): asset fil...
[ "public", "static", "String", "readTextFile", "(", "Context", "context", ",", "String", "asset", ")", "{", "try", "{", "InputStream", "inputStream", "=", "context", ".", "getAssets", "(", ")", ".", "open", "(", "asset", ")", ";", "return", "org", ".", "g...
Read a text file from assets into a single string @param context A non-null Android Context @param asset The asset file to read @return The contents or null on error.
[ "Read", "a", "text", "file", "from", "assets", "into", "a", "single", "string" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L42-L53
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/AnotB.java
AnotB.aNotB
public CompactSketch aNotB(final Sketch a, final Sketch b) { """ Perform A-and-not-B set operation on the two given sketches and return the result as an ordered CompactSketch on the heap. @param a The incoming sketch for the first argument @param b The incoming sketch for the second argument @return an ordered...
java
public CompactSketch aNotB(final Sketch a, final Sketch b) { return aNotB(a, b, true, null); }
[ "public", "CompactSketch", "aNotB", "(", "final", "Sketch", "a", ",", "final", "Sketch", "b", ")", "{", "return", "aNotB", "(", "a", ",", "b", ",", "true", ",", "null", ")", ";", "}" ]
Perform A-and-not-B set operation on the two given sketches and return the result as an ordered CompactSketch on the heap. @param a The incoming sketch for the first argument @param b The incoming sketch for the second argument @return an ordered CompactSketch on the heap
[ "Perform", "A", "-", "and", "-", "not", "-", "B", "set", "operation", "on", "the", "two", "given", "sketches", "and", "return", "the", "result", "as", "an", "ordered", "CompactSketch", "on", "the", "heap", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/AnotB.java#L69-L71
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/SparseArray.java
SparseArray.removeAtRange
public void removeAtRange(int index, int size) { """ Remove a range of mappings as a batch. @param index Index to begin at @param size Number of mappings to remove """ final int end = Math.min(mSize, index + size); for (int i = index; i < end; i++) { removeAt(i); } }
java
public void removeAtRange(int index, int size) { final int end = Math.min(mSize, index + size); for (int i = index; i < end; i++) { removeAt(i); } }
[ "public", "void", "removeAtRange", "(", "int", "index", ",", "int", "size", ")", "{", "final", "int", "end", "=", "Math", ".", "min", "(", "mSize", ",", "index", "+", "size", ")", ";", "for", "(", "int", "i", "=", "index", ";", "i", "<", "end", ...
Remove a range of mappings as a batch. @param index Index to begin at @param size Number of mappings to remove
[ "Remove", "a", "range", "of", "mappings", "as", "a", "batch", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/SparseArray.java#L157-L162
jhy/jsoup
src/main/java/org/jsoup/nodes/Element.java
Element.insertChildren
public Element insertChildren(int index, Node... children) { """ Inserts the given child nodes into this element at the specified index. Current nodes will be shifted to the right. The inserted nodes will be moved from their current parent. To prevent moving, copy the nodes first. @param index 0-based index to...
java
public Element insertChildren(int index, Node... children) { Validate.notNull(children, "Children collection to be inserted must not be null."); int currentSize = childNodeSize(); if (index < 0) index += currentSize +1; // roll around Validate.isTrue(index >= 0 && index <= currentSize, "...
[ "public", "Element", "insertChildren", "(", "int", "index", ",", "Node", "...", "children", ")", "{", "Validate", ".", "notNull", "(", "children", ",", "\"Children collection to be inserted must not be null.\"", ")", ";", "int", "currentSize", "=", "childNodeSize", ...
Inserts the given child nodes into this element at the specified index. Current nodes will be shifted to the right. The inserted nodes will be moved from their current parent. To prevent moving, copy the nodes first. @param index 0-based index to insert children at. Specify {@code 0} to insert at the start, {@code -1}...
[ "Inserts", "the", "given", "child", "nodes", "into", "this", "element", "at", "the", "specified", "index", ".", "Current", "nodes", "will", "be", "shifted", "to", "the", "right", ".", "The", "inserted", "nodes", "will", "be", "moved", "from", "their", "cur...
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Element.java#L477-L485
alkacon/opencms-core
src/org/opencms/flex/CmsFlexController.java
CmsFlexController.setThrowable
public Throwable setThrowable(Throwable throwable, String resource) { """ Sets an exception (Throwable) that was caught during inclusion of sub elements.<p> If another exception is already set in this controller, then the additional exception is ignored.<p> @param throwable the exception (Throwable) to set ...
java
public Throwable setThrowable(Throwable throwable, String resource) { if (m_throwable == null) { m_throwable = throwable; m_throwableResourceUri = resource; } else { if (LOG.isDebugEnabled()) { if (resource != null) { LOG.debug( ...
[ "public", "Throwable", "setThrowable", "(", "Throwable", "throwable", ",", "String", "resource", ")", "{", "if", "(", "m_throwable", "==", "null", ")", "{", "m_throwable", "=", "throwable", ";", "m_throwableResourceUri", "=", "resource", ";", "}", "else", "{",...
Sets an exception (Throwable) that was caught during inclusion of sub elements.<p> If another exception is already set in this controller, then the additional exception is ignored.<p> @param throwable the exception (Throwable) to set @param resource the URI of the VFS resource the error occurred on (might be <code>nu...
[ "Sets", "an", "exception", "(", "Throwable", ")", "that", "was", "caught", "during", "inclusion", "of", "sub", "elements", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexController.java#L661-L677
citrusframework/citrus
modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessage.java
HttpMessage.queryParam
public HttpMessage queryParam(final String name, final String value) { """ Sets a new Http request query param. @param name The name of the request query parameter @param value The value of the request query parameter @return The altered HttpMessage """ if (!StringUtils.hasText(name)) { ...
java
public HttpMessage queryParam(final String name, final String value) { if (!StringUtils.hasText(name)) { throw new CitrusRuntimeException("Invalid query param name - must not be empty!"); } this.addQueryParam(name, value); final String queryParamString = queryParams.entrySe...
[ "public", "HttpMessage", "queryParam", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "name", ")", ")", "{", "throw", "new", "CitrusRuntimeException", "(", "\"Invalid query param n...
Sets a new Http request query param. @param name The name of the request query parameter @param value The value of the request query parameter @return The altered HttpMessage
[ "Sets", "a", "new", "Http", "request", "query", "param", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessage.java#L243-L259
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.getObject
public Object getObject(String columnLabel, Map map) throws SQLException { """ <!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as an <code>Object</code> in the Java programming language. If the value is an SQL <code>NULL...
java
public Object getObject(String columnLabel, Map map) throws SQLException { return getObject(findColumn(columnLabel), map); }
[ "public", "Object", "getObject", "(", "String", "columnLabel", ",", "Map", "map", ")", "throws", "SQLException", "{", "return", "getObject", "(", "findColumn", "(", "columnLabel", ")", ",", "map", ")", ";", "}" ]
<!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as an <code>Object</code> in the Java programming language. If the value is an SQL <code>NULL</code>, the driver returns a Java <code>null</code>. This method uses the specified <co...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "an", "<code", ">", "...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L4349-L4351
anotheria/moskito
moskito-webui/src/main/java/net/anotheria/moskito/webui/producers/action/ShowProducerAction.java
ShowProducerAction.populateGraphData
private void populateGraphData(final IDecorator decorator, final Map<String, GraphDataBean> graphData, final List<StatLineAO> allStatLines) { """ Allows to populate graph data. @param decorator {@link IDecorator} @param graphData map with graph data @param allStatLines list of {@link StatLineAO}, all st...
java
private void populateGraphData(final IDecorator decorator, final Map<String, GraphDataBean> graphData, final List<StatLineAO> allStatLines) { final int cumulatedIndex = getCumulatedIndex(allStatLines); for (int i = 0; i < allStatLines.size(); i++) { if (i == cumulatedIndex) continue; //TODO fix filterze...
[ "private", "void", "populateGraphData", "(", "final", "IDecorator", "decorator", ",", "final", "Map", "<", "String", ",", "GraphDataBean", ">", "graphData", ",", "final", "List", "<", "StatLineAO", ">", "allStatLines", ")", "{", "final", "int", "cumulatedIndex",...
Allows to populate graph data. @param decorator {@link IDecorator} @param graphData map with graph data @param allStatLines list of {@link StatLineAO}, all stats present in producer
[ "Allows", "to", "populate", "graph", "data", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-webui/src/main/java/net/anotheria/moskito/webui/producers/action/ShowProducerAction.java#L257-L279
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/FastMath.java
FastMath.copySign
public static float copySign(float magnitude, float sign) { """ Returns the first argument with the sign of the second argument. A NaN {@code sign} argument is treated as positive. @param magnitude the value to return @param sign the sign for the returned value @return the magnitude with the same sign as the...
java
public static float copySign(float magnitude, float sign){ int m = Float.floatToIntBits(magnitude); int s = Float.floatToIntBits(sign); if ((m >= 0 && s >= 0) || (m < 0 && s < 0)) { // Sign is currently OK return magnitude; } return -magnitude; // flip sign }
[ "public", "static", "float", "copySign", "(", "float", "magnitude", ",", "float", "sign", ")", "{", "int", "m", "=", "Float", ".", "floatToIntBits", "(", "magnitude", ")", ";", "int", "s", "=", "Float", ".", "floatToIntBits", "(", "sign", ")", ";", "if...
Returns the first argument with the sign of the second argument. A NaN {@code sign} argument is treated as positive. @param magnitude the value to return @param sign the sign for the returned value @return the magnitude with the same sign as the {@code sign} argument
[ "Returns", "the", "first", "argument", "with", "the", "sign", "of", "the", "second", "argument", ".", "A", "NaN", "{", "@code", "sign", "}", "argument", "is", "treated", "as", "positive", "." ]
train
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMath.java#L3689-L3696
intellimate/Izou
src/main/java/org/intellimate/izou/system/sound/SoundManager.java
SoundManager.addIzouSoundLine
public void addIzouSoundLine(AddOnModel addOnModel, IzouSoundLineBaseClass izouSoundLine) { """ adds an IzouSoundLine, will now be tracked by the SoundManager @param addOnModel the addOnModel where the IzouSoundLine belongs to @param izouSoundLine the IzouSoundLine to add """ debug("adding soundLine ...
java
public void addIzouSoundLine(AddOnModel addOnModel, IzouSoundLineBaseClass izouSoundLine) { debug("adding soundLine " + izouSoundLine + " from " + addOnModel); if (permanentAddOn != null && permanentAddOn.equals(addOnModel)) { addPermanent(izouSoundLine); } else { addNonP...
[ "public", "void", "addIzouSoundLine", "(", "AddOnModel", "addOnModel", ",", "IzouSoundLineBaseClass", "izouSoundLine", ")", "{", "debug", "(", "\"adding soundLine \"", "+", "izouSoundLine", "+", "\" from \"", "+", "addOnModel", ")", ";", "if", "(", "permanentAddOn", ...
adds an IzouSoundLine, will now be tracked by the SoundManager @param addOnModel the addOnModel where the IzouSoundLine belongs to @param izouSoundLine the IzouSoundLine to add
[ "adds", "an", "IzouSoundLine", "will", "now", "be", "tracked", "by", "the", "SoundManager" ]
train
https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/system/sound/SoundManager.java#L117-L126
samskivert/samskivert
src/main/java/com/samskivert/jdbc/BaseLiaison.java
BaseLiaison.expandDefinition
public String expandDefinition (ColumnDefinition def) { """ Create an SQL string that summarizes a column definition in that format generally accepted in table creation and column addition statements, e.g. {@code INTEGER UNIQUE NOT NULL DEFAULT 100}. """ return expandDefinition(def.type, def.nullable...
java
public String expandDefinition (ColumnDefinition def) { return expandDefinition(def.type, def.nullable, def.unique, def.defaultValue); }
[ "public", "String", "expandDefinition", "(", "ColumnDefinition", "def", ")", "{", "return", "expandDefinition", "(", "def", ".", "type", ",", "def", ".", "nullable", ",", "def", ".", "unique", ",", "def", ".", "defaultValue", ")", ";", "}" ]
Create an SQL string that summarizes a column definition in that format generally accepted in table creation and column addition statements, e.g. {@code INTEGER UNIQUE NOT NULL DEFAULT 100}.
[ "Create", "an", "SQL", "string", "that", "summarizes", "a", "column", "definition", "in", "that", "format", "generally", "accepted", "in", "table", "creation", "and", "column", "addition", "statements", "e", ".", "g", ".", "{" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/BaseLiaison.java#L313-L316
rey5137/material
material/src/main/java/com/rey/material/widget/DatePicker.java
DatePicker.setDate
public void setDate(int day, int month, int year) { """ Set the selected date of this DatePicker. @param day The day value of selected date. @param month The month value of selected date. @param year The year value of selected date. """ if(mAdapter.getYear() == year && mAdapter.getMonth() == month &...
java
public void setDate(int day, int month, int year){ if(mAdapter.getYear() == year && mAdapter.getMonth() == month && mAdapter.getDay() == day) return; mAdapter.setDate(day, month, year, false); goTo(month, year); }
[ "public", "void", "setDate", "(", "int", "day", ",", "int", "month", ",", "int", "year", ")", "{", "if", "(", "mAdapter", ".", "getYear", "(", ")", "==", "year", "&&", "mAdapter", ".", "getMonth", "(", ")", "==", "month", "&&", "mAdapter", ".", "ge...
Set the selected date of this DatePicker. @param day The day value of selected date. @param month The month value of selected date. @param year The year value of selected date.
[ "Set", "the", "selected", "date", "of", "this", "DatePicker", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/DatePicker.java#L418-L424
santhosh-tekuri/jlibs
xml/src/main/java/jlibs/xml/DefaultNamespaceContext.java
DefaultNamespaceContext.declarePrefix
public void declarePrefix(String prefix, String uri) { """ Binds specified {@code prefix} to the given {@code uri} @param prefix the prefix to be bound @param uri the uri to which specified {@code prefix} to be bound """ if(prefix.length()==0) defaultURI = uri; prefix2uriMap.put...
java
public void declarePrefix(String prefix, String uri){ if(prefix.length()==0) defaultURI = uri; prefix2uriMap.put(prefix, uri); uri2prefixMap.put(uri, prefix); }
[ "public", "void", "declarePrefix", "(", "String", "prefix", ",", "String", "uri", ")", "{", "if", "(", "prefix", ".", "length", "(", ")", "==", "0", ")", "defaultURI", "=", "uri", ";", "prefix2uriMap", ".", "put", "(", "prefix", ",", "uri", ")", ";",...
Binds specified {@code prefix} to the given {@code uri} @param prefix the prefix to be bound @param uri the uri to which specified {@code prefix} to be bound
[ "Binds", "specified", "{", "@code", "prefix", "}", "to", "the", "given", "{", "@code", "uri", "}" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/xml/src/main/java/jlibs/xml/DefaultNamespaceContext.java#L128-L133
Squarespace/cldr
compiler/src/main/java/com/squarespace/cldr/codegen/CalendarCodeGenerator.java
CalendarCodeGenerator.buildTimeZoneExemplarCities
private void buildTimeZoneExemplarCities(MethodSpec.Builder method, TimeZoneData data) { """ Mapping locale identifiers to their localized exemplar cities. """ CodeBlock.Builder code = CodeBlock.builder(); code.beginControlFlow("this.exemplarCities = new $T<$T, $T>() {", HashMap.class, String.class, St...
java
private void buildTimeZoneExemplarCities(MethodSpec.Builder method, TimeZoneData data) { CodeBlock.Builder code = CodeBlock.builder(); code.beginControlFlow("this.exemplarCities = new $T<$T, $T>() {", HashMap.class, String.class, String.class); for (TimeZoneInfo info : data.timeZoneInfo) { code.addSta...
[ "private", "void", "buildTimeZoneExemplarCities", "(", "MethodSpec", ".", "Builder", "method", ",", "TimeZoneData", "data", ")", "{", "CodeBlock", ".", "Builder", "code", "=", "CodeBlock", ".", "builder", "(", ")", ";", "code", ".", "beginControlFlow", "(", "\...
Mapping locale identifiers to their localized exemplar cities.
[ "Mapping", "locale", "identifiers", "to", "their", "localized", "exemplar", "cities", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/compiler/src/main/java/com/squarespace/cldr/codegen/CalendarCodeGenerator.java#L581-L589
phax/ph-oton
ph-oton-uicore/src/main/java/com/helger/photon/uicore/page/AbstractWebPageSimpleForm.java
AbstractWebPageSimpleForm.getObjectDisplayName
@Nullable @OverrideOnDemand protected String getObjectDisplayName (@Nonnull final WPECTYPE aWPEC, @Nonnull final DATATYPE aObject) { """ Get the display name of the passed object. @param aWPEC The current web page execution context. Never <code>null</code>. @param aObject The object to get the display na...
java
@Nullable @OverrideOnDemand protected String getObjectDisplayName (@Nonnull final WPECTYPE aWPEC, @Nonnull final DATATYPE aObject) { return null; }
[ "@", "Nullable", "@", "OverrideOnDemand", "protected", "String", "getObjectDisplayName", "(", "@", "Nonnull", "final", "WPECTYPE", "aWPEC", ",", "@", "Nonnull", "final", "DATATYPE", "aObject", ")", "{", "return", "null", ";", "}" ]
Get the display name of the passed object. @param aWPEC The current web page execution context. Never <code>null</code>. @param aObject The object to get the display name from. Never <code>null</code>. @return <code>null</code> to indicate that no display name is available
[ "Get", "the", "display", "name", "of", "the", "passed", "object", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uicore/src/main/java/com/helger/photon/uicore/page/AbstractWebPageSimpleForm.java#L105-L110
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findNode
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { """ Returns a single node from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. ...
java
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
[ "@", "Nullable", "public", "static", "Node", "findNode", "(", "@", "NotNull", "final", "Node", "rootNode", ",", "@", "NotNull", "final", "XPath", "xPath", ",", "@", "NotNull", "final", "String", "expression", ")", "{", "Contract", ".", "requireArgNotNull", "...
Returns a single node from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "a", "single", "node", "from", "a", "given", "document", "using", "xpath", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L105-L116
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMLambda.java
JMLambda.supplierIfNull
public static <R> R supplierIfNull(R target, Supplier<R> supplier) { """ Supplier if null r. @param <R> the type parameter @param target the target @param supplier the supplier @return the r """ return Optional.ofNullable(target).orElseGet(supplier); }
java
public static <R> R supplierIfNull(R target, Supplier<R> supplier) { return Optional.ofNullable(target).orElseGet(supplier); }
[ "public", "static", "<", "R", ">", "R", "supplierIfNull", "(", "R", "target", ",", "Supplier", "<", "R", ">", "supplier", ")", "{", "return", "Optional", ".", "ofNullable", "(", "target", ")", ".", "orElseGet", "(", "supplier", ")", ";", "}" ]
Supplier if null r. @param <R> the type parameter @param target the target @param supplier the supplier @return the r
[ "Supplier", "if", "null", "r", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMLambda.java#L354-L356
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseBlockNoParentheses
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { """ Parses a code block with no parentheses and no commas. After it is done there should be a single token left, which is returned. """ // search for matrix bracket operations ...
java
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { // search for matrix bracket operations if( !insideMatrixConstructor ) { parseBracketCreateMatrix(tokens, sequence); } // First create sequences from an...
[ "protected", "TokenList", ".", "Token", "parseBlockNoParentheses", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ",", "boolean", "insideMatrixConstructor", ")", "{", "// search for matrix bracket operations", "if", "(", "!", "insideMatrixConstructor", ")", "{",...
Parses a code block with no parentheses and no commas. After it is done there should be a single token left, which is returned.
[ "Parses", "a", "code", "block", "with", "no", "parentheses", "and", "no", "commas", ".", "After", "it", "is", "done", "there", "should", "be", "a", "single", "token", "left", "which", "is", "returned", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L850-L889
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/DoubleStream.java
DoubleStream.dropWhile
@NotNull public DoubleStream dropWhile(@NotNull final DoublePredicate predicate) { """ Drops elements while the predicate is true and returns the rest. <p>This is an intermediate operation. <p>Example: <pre> predicate: (a) -&gt; a &lt; 3 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [3, 4, 1, 2, 3, 4] </...
java
@NotNull public DoubleStream dropWhile(@NotNull final DoublePredicate predicate) { return new DoubleStream(params, new DoubleDropWhile(iterator, predicate)); }
[ "@", "NotNull", "public", "DoubleStream", "dropWhile", "(", "@", "NotNull", "final", "DoublePredicate", "predicate", ")", "{", "return", "new", "DoubleStream", "(", "params", ",", "new", "DoubleDropWhile", "(", "iterator", ",", "predicate", ")", ")", ";", "}" ...
Drops elements while the predicate is true and returns the rest. <p>This is an intermediate operation. <p>Example: <pre> predicate: (a) -&gt; a &lt; 3 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [3, 4, 1, 2, 3, 4] </pre> @param predicate the predicate used to drop elements @return the new {@code DoubleStream}
[ "Drops", "elements", "while", "the", "predicate", "is", "true", "and", "returns", "the", "rest", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/DoubleStream.java#L739-L742
Ordinastie/MalisisCore
src/main/java/net/malisis/core/asm/AsmUtils.java
AsmUtils.intInsnEqual
public static boolean intInsnEqual(IntInsnNode node1, IntInsnNode node2) { """ Checks if two {@link IntInsnNode} are equals. @param node1 the node1 @param node2 the node2 @return true, if successful """ if (node1.operand == -1 || node2.operand == -1) return true; return node1.operand == node2.oper...
java
public static boolean intInsnEqual(IntInsnNode node1, IntInsnNode node2) { if (node1.operand == -1 || node2.operand == -1) return true; return node1.operand == node2.operand; }
[ "public", "static", "boolean", "intInsnEqual", "(", "IntInsnNode", "node1", ",", "IntInsnNode", "node2", ")", "{", "if", "(", "node1", ".", "operand", "==", "-", "1", "||", "node2", ".", "operand", "==", "-", "1", ")", "return", "true", ";", "return", ...
Checks if two {@link IntInsnNode} are equals. @param node1 the node1 @param node2 the node2 @return true, if successful
[ "Checks", "if", "two", "{", "@link", "IntInsnNode", "}", "are", "equals", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/asm/AsmUtils.java#L261-L267
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.multAdd
public static void multAdd(ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c ) { """ <p> Performs the following operation:<br> <br> c = c + a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param a The left matrix in the multiplication operation. Not mod...
java
public static void multAdd(ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c ) { if( b.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixMatrixMult_ZDRM.multAdd_reorder(a, b, c); } else { MatrixMatrixMult_ZDRM.multAdd_small(a,b,c); } }
[ "public", "static", "void", "multAdd", "(", "ZMatrixRMaj", "a", ",", "ZMatrixRMaj", "b", ",", "ZMatrixRMaj", "c", ")", "{", "if", "(", "b", ".", "numCols", ">=", "EjmlParameters", ".", "MULT_COLUMN_SWITCH", ")", "{", "MatrixMatrixMult_ZDRM", ".", "multAdd_reor...
<p> Performs the following operation:<br> <br> c = c + a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param a The left matrix in the multiplication operation. Not modified. @param b The right matrix in the multiplication operation. Not modified. @param c Wher...
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "c", "+", "a", "*", "b<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "c<sub", ">", "ij<", "/", "sub", ">", "+", "&sum", ";", "<sub", ">", "k...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L410-L417
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/SimpleFileIO.java
SimpleFileIO.getFileAsString
@Nullable public static String getFileAsString (@Nullable final File aFile, @Nonnull final Charset aCharset) { """ Get the content of the passed file as a string using the system line separator. Note: the last line does not end with the passed line separator. @param aFile The file to read. May be <code>null...
java
@Nullable public static String getFileAsString (@Nullable final File aFile, @Nonnull final Charset aCharset) { return aFile == null ? null : StreamHelper.getAllBytesAsString (FileHelper.getInputStream (aFile), aCharset); }
[ "@", "Nullable", "public", "static", "String", "getFileAsString", "(", "@", "Nullable", "final", "File", "aFile", ",", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "return", "aFile", "==", "null", "?", "null", ":", "StreamHelper", ".", "getAllBy...
Get the content of the passed file as a string using the system line separator. Note: the last line does not end with the passed line separator. @param aFile The file to read. May be <code>null</code>. @param aCharset The character set to use. May not be <code>null</code>. @return <code>null</code> if the file does no...
[ "Get", "the", "content", "of", "the", "passed", "file", "as", "a", "string", "using", "the", "system", "line", "separator", ".", "Note", ":", "the", "last", "line", "does", "not", "end", "with", "the", "passed", "line", "separator", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/SimpleFileIO.java#L147-L151
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java
MRCompactor.addRunningHadoopJob
public static void addRunningHadoopJob(Dataset dataset, Job job) { """ Keep track of running MR jobs, so if the compaction is cancelled, the MR jobs can be killed. """ MRCompactor.RUNNING_MR_JOBS.put(dataset, job); }
java
public static void addRunningHadoopJob(Dataset dataset, Job job) { MRCompactor.RUNNING_MR_JOBS.put(dataset, job); }
[ "public", "static", "void", "addRunningHadoopJob", "(", "Dataset", "dataset", ",", "Job", "job", ")", "{", "MRCompactor", ".", "RUNNING_MR_JOBS", ".", "put", "(", "dataset", ",", "job", ")", ";", "}" ]
Keep track of running MR jobs, so if the compaction is cancelled, the MR jobs can be killed.
[ "Keep", "track", "of", "running", "MR", "jobs", "so", "if", "the", "compaction", "is", "cancelled", "the", "MR", "jobs", "can", "be", "killed", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java#L839-L841
elki-project/elki
addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java
XSplitter.removeFromMBR
private void removeFromMBR(List<Heap<DoubleIntPair>> pqUB, List<Heap<DoubleIntPair>> pqLB, int index, ModifiableHyperBoundingBox mbr) { """ Update operation for maintaining the second entry distribution. Removes the entries associated with indices <code>&le; index</code> from the dimensions' lower and upper boun...
java
private void removeFromMBR(List<Heap<DoubleIntPair>> pqUB, List<Heap<DoubleIntPair>> pqLB, int index, ModifiableHyperBoundingBox mbr) { boolean change = false; DoubleIntPair pqPair; for(int d = 0; d < mbr.getDimensionality(); d++) { // remove all relevant upper bound entries belonging to the first set...
[ "private", "void", "removeFromMBR", "(", "List", "<", "Heap", "<", "DoubleIntPair", ">", ">", "pqUB", ",", "List", "<", "Heap", "<", "DoubleIntPair", ">", ">", "pqLB", ",", "int", "index", ",", "ModifiableHyperBoundingBox", "mbr", ")", "{", "boolean", "cha...
Update operation for maintaining the second entry distribution. Removes the entries associated with indices <code>&le; index</code> from the dimensions' lower and upper bound priority queues (<code>pqLB</code> and <code>pqUB</code>). Whenever this causes a change in a dimension's lower or upper bound, <code>mbr</code> ...
[ "Update", "operation", "for", "maintaining", "the", "second", "entry", "distribution", ".", "Removes", "the", "entries", "associated", "with", "indices", "<code", ">", "&le", ";", "index<", "/", "code", ">", "from", "the", "dimensions", "lower", "and", "upper"...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L227-L254
Ekryd/sortpom
sorter/src/main/java/sortpom/util/XmlOrderedResult.java
XmlOrderedResult.textContentDiffers
public static XmlOrderedResult textContentDiffers(String name, String originalElementText, String newElementText) { """ The texts inside two elements differ. Example: when maven properties should be sorted """ return new XmlOrderedResult(false, String.format("The xml element <%s>%s</%s> should be place...
java
public static XmlOrderedResult textContentDiffers(String name, String originalElementText, String newElementText) { return new XmlOrderedResult(false, String.format("The xml element <%s>%s</%s> should be placed before <%s>%s</%s>", name, newElementText, name, name, originalElementText, name)); ...
[ "public", "static", "XmlOrderedResult", "textContentDiffers", "(", "String", "name", ",", "String", "originalElementText", ",", "String", "newElementText", ")", "{", "return", "new", "XmlOrderedResult", "(", "false", ",", "String", ".", "format", "(", "\"The xml ele...
The texts inside two elements differ. Example: when maven properties should be sorted
[ "The", "texts", "inside", "two", "elements", "differ", ".", "Example", ":", "when", "maven", "properties", "should", "be", "sorted" ]
train
https://github.com/Ekryd/sortpom/blob/27056420803ed04001e4149b04a719fbac774c5d/sorter/src/main/java/sortpom/util/XmlOrderedResult.java#L37-L40
molgenis/molgenis
molgenis-data-validation/src/main/java/org/molgenis/data/validation/meta/AttributeValidator.java
AttributeValidator.validateOrderBy
private static void validateOrderBy(Attribute attr, Sort orderBy) { """ Validate whether the attribute names defined by the orderBy attribute point to existing attributes in the referenced entity. @param attr attribute @param orderBy orderBy of attribute @throws MolgenisDataException if orderBy contains attr...
java
private static void validateOrderBy(Attribute attr, Sort orderBy) { if (orderBy != null) { EntityType refEntity = attr.getRefEntity(); if (refEntity != null) { for (Sort.Order orderClause : orderBy) { String refAttrName = orderClause.getAttr(); if (refEntity.getAttribute(refA...
[ "private", "static", "void", "validateOrderBy", "(", "Attribute", "attr", ",", "Sort", "orderBy", ")", "{", "if", "(", "orderBy", "!=", "null", ")", "{", "EntityType", "refEntity", "=", "attr", ".", "getRefEntity", "(", ")", ";", "if", "(", "refEntity", ...
Validate whether the attribute names defined by the orderBy attribute point to existing attributes in the referenced entity. @param attr attribute @param orderBy orderBy of attribute @throws MolgenisDataException if orderBy contains attribute names that do not exist in the referenced entity.
[ "Validate", "whether", "the", "attribute", "names", "defined", "by", "the", "orderBy", "attribute", "point", "to", "existing", "attributes", "in", "the", "referenced", "entity", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-validation/src/main/java/org/molgenis/data/validation/meta/AttributeValidator.java#L324-L343
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.collectReplacements
public static String collectReplacements(String orig, @ClosureParams(value=SimpleType.class, options="char") Closure<String> transform) { """ Iterate through this String a character at a time collecting either the original character or a transformed replacement String. The {@code transform} Closure should return...
java
public static String collectReplacements(String orig, @ClosureParams(value=SimpleType.class, options="char") Closure<String> transform) { if (orig == null) return orig; StringBuilder sb = null; // lazy create for edge-case efficiency for (int i = 0, len = orig.length(); i < len; i++) { ...
[ "public", "static", "String", "collectReplacements", "(", "String", "orig", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"char\"", ")", "Closure", "<", "String", ">", "transform", ")", "{", "if", "(", "or...
Iterate through this String a character at a time collecting either the original character or a transformed replacement String. The {@code transform} Closure should return {@code null} to indicate that no transformation is required for the given character. <p> <pre class="groovyTestCase"> assert "Groovy".collectReplace...
[ "Iterate", "through", "this", "String", "a", "character", "at", "a", "time", "collecting", "either", "the", "original", "character", "or", "a", "transformed", "replacement", "String", ".", "The", "{", "@code", "transform", "}", "Closure", "should", "return", "...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L655-L677
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java
LogRecordBrowser.recordsInProcess
public OnePidRecordListImpl recordsInProcess(RepositoryLogRecord after, long max, LogRecordHeaderFilter filter) { """ Returns records belonging to a process and satisfying the filter. @param after a record from another repository we need to restart iteration after. @param max the upper time limit (the youngest...
java
public OnePidRecordListImpl recordsInProcess(RepositoryLogRecord after, long max, LogRecordHeaderFilter filter) { return restartRecordsInProcess(after, max, filter==null ? new AllAcceptVerifier() : new HeadFilterVerifier(filter)); }
[ "public", "OnePidRecordListImpl", "recordsInProcess", "(", "RepositoryLogRecord", "after", ",", "long", "max", ",", "LogRecordHeaderFilter", "filter", ")", "{", "return", "restartRecordsInProcess", "(", "after", ",", "max", ",", "filter", "==", "null", "?", "new", ...
Returns records belonging to a process and satisfying the filter. @param after a record from another repository we need to restart iteration after. @param max the upper time limit (the youngest log record). @param filter criteria to filter logs records on. @return the iterable list of records.
[ "Returns", "records", "belonging", "to", "a", "process", "and", "satisfying", "the", "filter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java#L125-L127
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/internal/JavaURLContextFactory.java
JavaURLContextFactory.getObjectInstance
@Override public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception { """ Creates a JavaURLContext for resolving java: urls. It should only be called by an OSGi JNDI spec implementation. There is no support for non-null Name and Context parameters for this method in...
java
@Override public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception { // by OSGi JNDI spec Name and Context should be null // if they are not then this code is being called in // the wrong way if (n != null || c != null) return n...
[ "@", "Override", "public", "Object", "getObjectInstance", "(", "Object", "o", ",", "Name", "n", ",", "Context", "c", ",", "Hashtable", "<", "?", ",", "?", ">", "envmt", ")", "throws", "Exception", "{", "// by OSGi JNDI spec Name and Context should be null", "// ...
Creates a JavaURLContext for resolving java: urls. It should only be called by an OSGi JNDI spec implementation. There is no support for non-null Name and Context parameters for this method in accordance with the OSGi specification for JNDI. <UL> <LI>If the parameter o is null a new {@link JavaURLContext} is returned....
[ "Creates", "a", "JavaURLContext", "for", "resolving", "java", ":", "urls", ".", "It", "should", "only", "be", "called", "by", "an", "OSGi", "JNDI", "spec", "implementation", ".", "There", "is", "no", "support", "for", "non", "-", "null", "Name", "and", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/internal/JavaURLContextFactory.java#L80-L96