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 |
|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java | PoolsImpl.resizeAsync | public Observable<Void> resizeAsync(String poolId, PoolResizeParameter poolResizeParameter) {
"""
Changes the number of compute nodes that are assigned to a pool.
You can only resize a pool when its allocation state is steady. If the pool is already resizing, the request fails with status code 409. When you resiz... | java | public Observable<Void> resizeAsync(String poolId, PoolResizeParameter poolResizeParameter) {
return resizeWithServiceResponseAsync(poolId, poolResizeParameter).map(new Func1<ServiceResponseWithHeaders<Void, PoolResizeHeaders>, Void>() {
@Override
public Void call(ServiceResponseWithHead... | [
"public",
"Observable",
"<",
"Void",
">",
"resizeAsync",
"(",
"String",
"poolId",
",",
"PoolResizeParameter",
"poolResizeParameter",
")",
"{",
"return",
"resizeWithServiceResponseAsync",
"(",
"poolId",
",",
"poolResizeParameter",
")",
".",
"map",
"(",
"new",
"Func1"... | Changes the number of compute nodes that are assigned to a pool.
You can only resize a pool when its allocation state is steady. If the pool is already resizing, the request fails with status code 409. When you resize a pool, the pool's allocation state changes from steady to resizing. You cannot resize pools which are... | [
"Changes",
"the",
"number",
"of",
"compute",
"nodes",
"that",
"are",
"assigned",
"to",
"a",
"pool",
".",
"You",
"can",
"only",
"resize",
"a",
"pool",
"when",
"its",
"allocation",
"state",
"is",
"steady",
".",
"If",
"the",
"pool",
"is",
"already",
"resizi... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L2748-L2755 |
carewebframework/carewebframework-core | org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java | ElementPlugin.registerProperty | public void registerProperty(Object instance, String propertyName, boolean override) {
"""
Registers a named property to the container. Using this, a plugin can expose a property for
serialization and deserialization.
@param instance The object instance holding the property accessors. If null, any existing
re... | java | public void registerProperty(Object instance, String propertyName, boolean override) {
if (registeredProperties == null) {
registeredProperties = new HashMap<>();
}
if (instance == null) {
registeredProperties.remove(propertyName);
} else {
Object old... | [
"public",
"void",
"registerProperty",
"(",
"Object",
"instance",
",",
"String",
"propertyName",
",",
"boolean",
"override",
")",
"{",
"if",
"(",
"registeredProperties",
"==",
"null",
")",
"{",
"registeredProperties",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",... | Registers a named property to the container. Using this, a plugin can expose a property for
serialization and deserialization.
@param instance The object instance holding the property accessors. If null, any existing
registration will be removed.
@param propertyName Name of property to register.
@param override If the... | [
"Registers",
"a",
"named",
"property",
"to",
"the",
"container",
".",
"Using",
"this",
"a",
"plugin",
"can",
"expose",
"a",
"property",
"for",
"serialization",
"and",
"deserialization",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java#L768-L794 |
interedition/collatex | collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java | SuffixArrays.createWithLCP | public static SuffixData createWithLCP(int[] input, int start, int length) {
"""
Create a suffix array and an LCP array for a given input sequence of symbols.
"""
final ISuffixArrayBuilder builder = new DensePositiveDecorator(
new ExtraTrailingCellsDecorator(defaultAlgorithm(), 3));
... | java | public static SuffixData createWithLCP(int[] input, int start, int length) {
final ISuffixArrayBuilder builder = new DensePositiveDecorator(
new ExtraTrailingCellsDecorator(defaultAlgorithm(), 3));
return createWithLCP(input, start, length, builder);
} | [
"public",
"static",
"SuffixData",
"createWithLCP",
"(",
"int",
"[",
"]",
"input",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"final",
"ISuffixArrayBuilder",
"builder",
"=",
"new",
"DensePositiveDecorator",
"(",
"new",
"ExtraTrailingCellsDecorator",
"(",
... | Create a suffix array and an LCP array for a given input sequence of symbols. | [
"Create",
"a",
"suffix",
"array",
"and",
"an",
"LCP",
"array",
"for",
"a",
"given",
"input",
"sequence",
"of",
"symbols",
"."
] | train | https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java#L84-L88 |
pawelprazak/java-extended | guava/src/main/java/com/bluecatcode/common/security/KeyProvider.java | KeyProvider.getPrivateKey | public PrivateKey getPrivateKey(String alias, String password) {
"""
Gets a asymmetric encryption private key from the key store
@param alias key alias
@param password key password
@return the private key
"""
Key key = getKey(alias, password);
if (key instanceof PrivateKey) {
ret... | java | public PrivateKey getPrivateKey(String alias, String password) {
Key key = getKey(alias, password);
if (key instanceof PrivateKey) {
return (PrivateKey) key;
} else {
throw new IllegalStateException(format("Key with alias '%s' was not a private key, but was: %s",
... | [
"public",
"PrivateKey",
"getPrivateKey",
"(",
"String",
"alias",
",",
"String",
"password",
")",
"{",
"Key",
"key",
"=",
"getKey",
"(",
"alias",
",",
"password",
")",
";",
"if",
"(",
"key",
"instanceof",
"PrivateKey",
")",
"{",
"return",
"(",
"PrivateKey",... | Gets a asymmetric encryption private key from the key store
@param alias key alias
@param password key password
@return the private key | [
"Gets",
"a",
"asymmetric",
"encryption",
"private",
"key",
"from",
"the",
"key",
"store"
] | train | https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/security/KeyProvider.java#L55-L63 |
elki-project/elki | elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTree.java | MkCoPTree.adjustApproximatedKNNDistances | private void adjustApproximatedKNNDistances(MkCoPEntry entry, Map<DBID, KNNList> knnLists) {
"""
Adjusts the knn distance in the subtree of the specified root entry.
@param entry the root entry of the current subtree
@param knnLists a map of knn lists for each leaf entry
"""
MkCoPTreeNode<O> node = get... | java | private void adjustApproximatedKNNDistances(MkCoPEntry entry, Map<DBID, KNNList> knnLists) {
MkCoPTreeNode<O> node = getNode(entry);
if(node.isLeaf()) {
for(int i = 0; i < node.getNumEntries(); i++) {
MkCoPLeafEntry leafEntry = (MkCoPLeafEntry) node.getEntry(i);
approximateKnnDistances(le... | [
"private",
"void",
"adjustApproximatedKNNDistances",
"(",
"MkCoPEntry",
"entry",
",",
"Map",
"<",
"DBID",
",",
"KNNList",
">",
"knnLists",
")",
"{",
"MkCoPTreeNode",
"<",
"O",
">",
"node",
"=",
"getNode",
"(",
"entry",
")",
";",
"if",
"(",
"node",
".",
"... | Adjusts the knn distance in the subtree of the specified root entry.
@param entry the root entry of the current subtree
@param knnLists a map of knn lists for each leaf entry | [
"Adjusts",
"the",
"knn",
"distance",
"in",
"the",
"subtree",
"of",
"the",
"specified",
"root",
"entry",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTree.java#L300-L318 |
haraldk/TwelveMonkeys | common/common-lang/src/main/java/com/twelvemonkeys/util/convert/TimeConverter.java | TimeConverter.toObject | public Object toObject(String pString, Class pType, String pFormat)
throws ConversionException {
"""
Converts the string to a time, using the given format for parsing.
@param pString the string to convert.
@param pType the type to convert to. PropertyConverter
implementations may choose to ignore th... | java | public Object toObject(String pString, Class pType, String pFormat)
throws ConversionException {
if (StringUtil.isEmpty(pString))
return null;
TimeFormat format;
try {
if (pFormat == null) {
// Use system default format
... | [
"public",
"Object",
"toObject",
"(",
"String",
"pString",
",",
"Class",
"pType",
",",
"String",
"pFormat",
")",
"throws",
"ConversionException",
"{",
"if",
"(",
"StringUtil",
".",
"isEmpty",
"(",
"pString",
")",
")",
"return",
"null",
";",
"TimeFormat",
"for... | Converts the string to a time, using the given format for parsing.
@param pString the string to convert.
@param pType the type to convert to. PropertyConverter
implementations may choose to ignore this parameter.
@param pFormat the format used for parsing. PropertyConverter
implementations may choose to ignore this pa... | [
"Converts",
"the",
"string",
"to",
"a",
"time",
"using",
"the",
"given",
"format",
"for",
"parsing",
"."
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/util/convert/TimeConverter.java#L71-L94 |
lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setHeaderMargin | public void setHeaderMargin(int l, int t, int r, int b) {
"""
Set the margin of the header.
@param l
@param t
@param r
@param b
"""
mHeader.setMargin(l, t, r, b);
} | java | public void setHeaderMargin(int l, int t, int r, int b) {
mHeader.setMargin(l, t, r, b);
} | [
"public",
"void",
"setHeaderMargin",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mHeader",
".",
"setMargin",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the margin of the header.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"margin",
"of",
"the",
"header",
"."
] | train | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L556-L558 |
sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/MultipleAddressParticipantRepository.java | MultipleAddressParticipantRepository.unregisterParticipant | public ADDRESST unregisterParticipant(ADDRESST address, EventListener entity) {
"""
Remove a participant from this repository.
@param address address of a participant to remove from this repository.
@param entity participant to unmap to the given address.
@return a.
"""
synchronized (mutex()) {
remov... | java | public ADDRESST unregisterParticipant(ADDRESST address, EventListener entity) {
synchronized (mutex()) {
removeListener(address);
this.participants.remove(entity.getID(), address);
}
return address;
} | [
"public",
"ADDRESST",
"unregisterParticipant",
"(",
"ADDRESST",
"address",
",",
"EventListener",
"entity",
")",
"{",
"synchronized",
"(",
"mutex",
"(",
")",
")",
"{",
"removeListener",
"(",
"address",
")",
";",
"this",
".",
"participants",
".",
"remove",
"(",
... | Remove a participant from this repository.
@param address address of a participant to remove from this repository.
@param entity participant to unmap to the given address.
@return a. | [
"Remove",
"a",
"participant",
"from",
"this",
"repository",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/MultipleAddressParticipantRepository.java#L101-L107 |
facebookarchive/hadoop-20 | src/mapred/org/apache/hadoop/mapred/join/CompositeRecordReader.java | CompositeRecordReader.accept | @SuppressWarnings("unchecked") // No values from static EMPTY class
public void accept(CompositeRecordReader.JoinCollector jc, K key)
throws IOException {
"""
If key provided matches that of this Composite, give JoinCollector
iterator over values it may emit.
"""
if (hasNext() && 0 == cmp.compare(... | java | @SuppressWarnings("unchecked") // No values from static EMPTY class
public void accept(CompositeRecordReader.JoinCollector jc, K key)
throws IOException {
if (hasNext() && 0 == cmp.compare(key, key())) {
fillJoinCollector(createKey());
jc.add(id, getDelegate());
return;
}
jc.add(id... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// No values from static EMPTY class",
"public",
"void",
"accept",
"(",
"CompositeRecordReader",
".",
"JoinCollector",
"jc",
",",
"K",
"key",
")",
"throws",
"IOException",
"{",
"if",
"(",
"hasNext",
"(",
")",
"&... | If key provided matches that of this Composite, give JoinCollector
iterator over values it may emit. | [
"If",
"key",
"provided",
"matches",
"that",
"of",
"this",
"Composite",
"give",
"JoinCollector",
"iterator",
"over",
"values",
"it",
"may",
"emit",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/join/CompositeRecordReader.java#L361-L370 |
DV8FromTheWorld/JDA | src/main/java/net/dv8tion/jda/core/requests/restaction/PermissionOverrideAction.java | PermissionOverrideAction.setPermissions | @CheckReturnValue
public PermissionOverrideAction setPermissions(Collection<Permission> grantPermissions, Collection<Permission> denyPermissions) {
"""
Combination of {@link #setAllow(java.util.Collection)} and {@link #setDeny(java.util.Collection)}
<br>If a passed collection is {@code null} it resets the rep... | java | @CheckReturnValue
public PermissionOverrideAction setPermissions(Collection<Permission> grantPermissions, Collection<Permission> denyPermissions)
{
setAllow(grantPermissions);
setDeny(denyPermissions);
return this;
} | [
"@",
"CheckReturnValue",
"public",
"PermissionOverrideAction",
"setPermissions",
"(",
"Collection",
"<",
"Permission",
">",
"grantPermissions",
",",
"Collection",
"<",
"Permission",
">",
"denyPermissions",
")",
"{",
"setAllow",
"(",
"grantPermissions",
")",
";",
"setD... | Combination of {@link #setAllow(java.util.Collection)} and {@link #setDeny(java.util.Collection)}
<br>If a passed collection is {@code null} it resets the represented value to {@code 0} - no permission specifics.
<p>Example: {@code setPermissions(EnumSet.of(Permission.MESSAGE_READ), EnumSet.of(Permission.MESSAGE_WRITE... | [
"Combination",
"of",
"{",
"@link",
"#setAllow",
"(",
"java",
".",
"util",
".",
"Collection",
")",
"}",
"and",
"{",
"@link",
"#setDeny",
"(",
"java",
".",
"util",
".",
"Collection",
")",
"}",
"<br",
">",
"If",
"a",
"passed",
"collection",
"is",
"{",
"... | train | https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/PermissionOverrideAction.java#L430-L436 |
fabric8io/docker-maven-plugin | src/main/java/io/fabric8/maven/docker/service/ArchiveService.java | ArchiveService.createDockerBuildArchive | public File createDockerBuildArchive(ImageConfiguration imageConfig, MojoParameters params, ArchiverCustomizer customizer)
throws MojoExecutionException {
"""
Create the tar file container the source for building an image. This tar can be used directly for
uploading to a Docker daemon for creating the... | java | public File createDockerBuildArchive(ImageConfiguration imageConfig, MojoParameters params, ArchiverCustomizer customizer)
throws MojoExecutionException {
File ret = createArchive(imageConfig.getName(), imageConfig.getBuildConfiguration(), params, log, customizer);
log.info("%s: Created dock... | [
"public",
"File",
"createDockerBuildArchive",
"(",
"ImageConfiguration",
"imageConfig",
",",
"MojoParameters",
"params",
",",
"ArchiverCustomizer",
"customizer",
")",
"throws",
"MojoExecutionException",
"{",
"File",
"ret",
"=",
"createArchive",
"(",
"imageConfig",
".",
... | Create the tar file container the source for building an image. This tar can be used directly for
uploading to a Docker daemon for creating the image
@param imageConfig the image configuration
@param params mojo params for the project
@param customizer final customizer to be applied to the tar before being generated
@... | [
"Create",
"the",
"tar",
"file",
"container",
"the",
"source",
"for",
"building",
"an",
"image",
".",
"This",
"tar",
"can",
"be",
"used",
"directly",
"for",
"uploading",
"to",
"a",
"Docker",
"daemon",
"for",
"creating",
"the",
"image"
] | train | https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/service/ArchiveService.java#L73-L78 |
crawljax/crawljax | core/src/main/java/com/crawljax/util/XPathHelper.java | XPathHelper.evaluateXpathExpression | public static NodeList evaluateXpathExpression(String domStr, String xpathExpr)
throws XPathExpressionException, IOException {
"""
Returns the list of nodes which match the expression xpathExpr in the String domStr.
@return the list of nodes which match the query
@throws XPathExpressionException
@throws IO... | java | public static NodeList evaluateXpathExpression(String domStr, String xpathExpr)
throws XPathExpressionException, IOException {
Document dom = DomUtils.asDocument(domStr);
return evaluateXpathExpression(dom, xpathExpr);
} | [
"public",
"static",
"NodeList",
"evaluateXpathExpression",
"(",
"String",
"domStr",
",",
"String",
"xpathExpr",
")",
"throws",
"XPathExpressionException",
",",
"IOException",
"{",
"Document",
"dom",
"=",
"DomUtils",
".",
"asDocument",
"(",
"domStr",
")",
";",
"ret... | Returns the list of nodes which match the expression xpathExpr in the String domStr.
@return the list of nodes which match the query
@throws XPathExpressionException
@throws IOException | [
"Returns",
"the",
"list",
"of",
"nodes",
"which",
"match",
"the",
"expression",
"xpathExpr",
"in",
"the",
"String",
"domStr",
"."
] | train | https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L112-L116 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java | CPOptionPersistenceImpl.fetchByUUID_G | @Override
public CPOption fetchByUUID_G(String uuid, long groupId) {
"""
Returns the cp option where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching cp option, or <code>null</c... | java | @Override
public CPOption fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | [
"@",
"Override",
"public",
"CPOption",
"fetchByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"{",
"return",
"fetchByUUID_G",
"(",
"uuid",
",",
"groupId",
",",
"true",
")",
";",
"}"
] | Returns the cp option where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching cp option, or <code>null</code> if a matching cp option could not be found | [
"Returns",
"the",
"cp",
"option",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
"the",
"finder",
"cache",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java#L694-L697 |
erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java | AbstractConnection.sendLink | protected void sendLink(final OtpErlangPid from, final OtpErlangPid dest)
throws IOException {
"""
Create a link between the local node and the specified process on the
remote node. If the link is still active when the remote process
terminates, an exit signal will be sent to this connection. Use
{@... | java | protected void sendLink(final OtpErlangPid from, final OtpErlangPid dest)
throws IOException {
if (!connected) {
throw new IOException("Not connected");
}
@SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// prea... | [
"protected",
"void",
"sendLink",
"(",
"final",
"OtpErlangPid",
"from",
",",
"final",
"OtpErlangPid",
"dest",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"connected",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Not connected\"",
")",
";",
"}",
"@"... | Create a link between the local node and the specified process on the
remote node. If the link is still active when the remote process
terminates, an exit signal will be sent to this connection. Use
{@link #sendUnlink unlink()} to remove the link.
@param dest
the Erlang PID of the remote process.
@exception java.io.I... | [
"Create",
"a",
"link",
"between",
"the",
"local",
"node",
"and",
"the",
"specified",
"process",
"on",
"the",
"remote",
"node",
".",
"If",
"the",
"link",
"is",
"still",
"active",
"when",
"the",
"remote",
"process",
"terminates",
"an",
"exit",
"signal",
"wil... | train | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java#L385-L408 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/ProcessDefinitionManager.java | ProcessDefinitionManager.deleteProcessDefinition | public void deleteProcessDefinition(ProcessDefinition processDefinition, String processDefinitionId, boolean cascadeToHistory, boolean cascadeToInstances, boolean skipCustomListeners, boolean skipIoMappings) {
"""
Deletes the given process definition from the database and cache.
If cascadeToHistory and cascadeToI... | java | public void deleteProcessDefinition(ProcessDefinition processDefinition, String processDefinitionId, boolean cascadeToHistory, boolean cascadeToInstances, boolean skipCustomListeners, boolean skipIoMappings) {
if (cascadeToHistory) {
cascadeDeleteHistoryForProcessDefinition(processDefinitionId);
if (ca... | [
"public",
"void",
"deleteProcessDefinition",
"(",
"ProcessDefinition",
"processDefinition",
",",
"String",
"processDefinitionId",
",",
"boolean",
"cascadeToHistory",
",",
"boolean",
"cascadeToInstances",
",",
"boolean",
"skipCustomListeners",
",",
"boolean",
"skipIoMappings",... | Deletes the given process definition from the database and cache.
If cascadeToHistory and cascadeToInstances is set to true it deletes
the history and the process instances.
*Note*: If more than one process definition, from one deployment, is deleted in
a single transaction and the cascadeToHistory and cascadeToInstan... | [
"Deletes",
"the",
"given",
"process",
"definition",
"from",
"the",
"database",
"and",
"cache",
".",
"If",
"cascadeToHistory",
"and",
"cascadeToInstances",
"is",
"set",
"to",
"true",
"it",
"deletes",
"the",
"history",
"and",
"the",
"process",
"instances",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/ProcessDefinitionManager.java#L335-L370 |
jenkinsci/jenkins | core/src/main/java/hudson/Launcher.java | Launcher.decorateByPrefix | @Nonnull
public final Launcher decorateByPrefix(final String... prefix) {
"""
Returns a decorated {@link Launcher} that puts the given set of arguments as a prefix to any commands
that it invokes.
@param prefix Prefixes to be appended
@since 1.299
"""
final Launcher outer = this;
retur... | java | @Nonnull
public final Launcher decorateByPrefix(final String... prefix) {
final Launcher outer = this;
return new Launcher(outer) {
@Override
public boolean isUnix() {
return outer.isUnix();
}
@Override
public Proc launch(... | [
"@",
"Nonnull",
"public",
"final",
"Launcher",
"decorateByPrefix",
"(",
"final",
"String",
"...",
"prefix",
")",
"{",
"final",
"Launcher",
"outer",
"=",
"this",
";",
"return",
"new",
"Launcher",
"(",
"outer",
")",
"{",
"@",
"Override",
"public",
"boolean",
... | Returns a decorated {@link Launcher} that puts the given set of arguments as a prefix to any commands
that it invokes.
@param prefix Prefixes to be appended
@since 1.299 | [
"Returns",
"a",
"decorated",
"{",
"@link",
"Launcher",
"}",
"that",
"puts",
"the",
"given",
"set",
"of",
"arguments",
"as",
"a",
"prefix",
"to",
"any",
"commands",
"that",
"it",
"invokes",
"."
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Launcher.java#L819-L861 |
voldemort/voldemort | src/java/voldemort/utils/RebalanceUtils.java | RebalanceUtils.validateClusterNodeCounts | public static void validateClusterNodeCounts(final Cluster lhs, final Cluster rhs) {
"""
Confirms that both clusters have the same number of nodes by comparing
set of node Ids between clusters.
@param lhs
@param rhs
"""
if(!lhs.getNodeIds().equals(rhs.getNodeIds())) {
throw new Voldemo... | java | public static void validateClusterNodeCounts(final Cluster lhs, final Cluster rhs) {
if(!lhs.getNodeIds().equals(rhs.getNodeIds())) {
throw new VoldemortException("Node ids are not the same [ lhs cluster node ids ("
+ lhs.getNodeIds()
... | [
"public",
"static",
"void",
"validateClusterNodeCounts",
"(",
"final",
"Cluster",
"lhs",
",",
"final",
"Cluster",
"rhs",
")",
"{",
"if",
"(",
"!",
"lhs",
".",
"getNodeIds",
"(",
")",
".",
"equals",
"(",
"rhs",
".",
"getNodeIds",
"(",
")",
")",
")",
"{"... | Confirms that both clusters have the same number of nodes by comparing
set of node Ids between clusters.
@param lhs
@param rhs | [
"Confirms",
"that",
"both",
"clusters",
"have",
"the",
"same",
"number",
"of",
"nodes",
"by",
"comparing",
"set",
"of",
"node",
"Ids",
"between",
"clusters",
"."
] | train | https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L221-L228 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java | DevicesInner.beginDownloadUpdatesAsync | public Observable<Void> beginDownloadUpdatesAsync(String deviceName, String resourceGroupName) {
"""
Downloads the updates on a data box edge/gateway device.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the vali... | java | public Observable<Void> beginDownloadUpdatesAsync(String deviceName, String resourceGroupName) {
return beginDownloadUpdatesWithServiceResponseAsync(deviceName, resourceGroupName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
... | [
"public",
"Observable",
"<",
"Void",
">",
"beginDownloadUpdatesAsync",
"(",
"String",
"deviceName",
",",
"String",
"resourceGroupName",
")",
"{",
"return",
"beginDownloadUpdatesWithServiceResponseAsync",
"(",
"deviceName",
",",
"resourceGroupName",
")",
".",
"map",
"(",... | Downloads the updates on a data box edge/gateway device.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the {@link ServiceResponse} object if successful. | [
"Downloads",
"the",
"updates",
"on",
"a",
"data",
"box",
"edge",
"/",
"gateway",
"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/DevicesInner.java#L1295-L1302 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp-java8/src/main/java/org/deeplearning4j/spark/models/paragraphvectors/SparkParagraphVectors.java | SparkParagraphVectors.fitMultipleFiles | public void fitMultipleFiles(JavaPairRDD<String, String> documentsRdd) {
"""
This method builds ParagraphVectors model, expecting JavaPairRDD with key as label, and value as document-in-a-string.
@param documentsRdd
"""
/*
All we want here, is to transform JavaPairRDD into JavaRDD<Sequen... | java | public void fitMultipleFiles(JavaPairRDD<String, String> documentsRdd) {
/*
All we want here, is to transform JavaPairRDD into JavaRDD<Sequence<VocabWord>>
*/
validateConfiguration();
broadcastEnvironment(new JavaSparkContext(documentsRdd.context()));
JavaRDD<Seque... | [
"public",
"void",
"fitMultipleFiles",
"(",
"JavaPairRDD",
"<",
"String",
",",
"String",
">",
"documentsRdd",
")",
"{",
"/*\n All we want here, is to transform JavaPairRDD into JavaRDD<Sequence<VocabWord>>\n */",
"validateConfiguration",
"(",
")",
";",
"broadcas... | This method builds ParagraphVectors model, expecting JavaPairRDD with key as label, and value as document-in-a-string.
@param documentsRdd | [
"This",
"method",
"builds",
"ParagraphVectors",
"model",
"expecting",
"JavaPairRDD",
"with",
"key",
"as",
"label",
"and",
"value",
"as",
"document",
"-",
"in",
"-",
"a",
"-",
"string",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp-java8/src/main/java/org/deeplearning4j/spark/models/paragraphvectors/SparkParagraphVectors.java#L60-L72 |
line/centraldogma | server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java | CentralDogma.forConfig | public static CentralDogma forConfig(File configFile) throws IOException {
"""
Creates a new instance from the given configuration file.
@throws IOException if failed to load the configuration from the specified file
"""
requireNonNull(configFile, "configFile");
return new CentralDogma(Jacks... | java | public static CentralDogma forConfig(File configFile) throws IOException {
requireNonNull(configFile, "configFile");
return new CentralDogma(Jackson.readValue(configFile, CentralDogmaConfig.class));
} | [
"public",
"static",
"CentralDogma",
"forConfig",
"(",
"File",
"configFile",
")",
"throws",
"IOException",
"{",
"requireNonNull",
"(",
"configFile",
",",
"\"configFile\"",
")",
";",
"return",
"new",
"CentralDogma",
"(",
"Jackson",
".",
"readValue",
"(",
"configFile... | Creates a new instance from the given configuration file.
@throws IOException if failed to load the configuration from the specified file | [
"Creates",
"a",
"new",
"instance",
"from",
"the",
"given",
"configuration",
"file",
"."
] | train | https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java#L179-L182 |
js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getProperty | public <T> T getProperty(String name, Class<T> type, T defaultValue) {
"""
Get configuration object property converter to requested type or default value if there is no property with given
name.
@param name property name.
@param type type to convert property value to,
@param defaultValue default value, possi... | java | public <T> T getProperty(String name, Class<T> type, T defaultValue)
{
Params.notNullOrEmpty(name, "Property name");
Params.notNull(type, "Property type");
String value = getProperty(name);
if(value != null) {
return converter.asObject(value, type);
}
return defaultValue;
} | [
"public",
"<",
"T",
">",
"T",
"getProperty",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
",",
"T",
"defaultValue",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Property name\"",
")",
";",
"Params",
".",
"notNull",
"("... | Get configuration object property converter to requested type or default value if there is no property with given
name.
@param name property name.
@param type type to convert property value to,
@param defaultValue default value, possible null or empty.
@param <T> value type.
@return newly created value object or defau... | [
"Get",
"configuration",
"object",
"property",
"converter",
"to",
"requested",
"type",
"or",
"default",
"value",
"if",
"there",
"is",
"no",
"property",
"with",
"given",
"name",
"."
] | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L427-L436 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLConnection.java | URLConnection.skipForward | static private long skipForward(InputStream is, long toSkip)
throws IOException {
"""
Skips through the specified number of bytes from the stream
until either EOF is reached, or the specified
number of bytes have been skipped
"""
long eachSkip = 0;
long skipped = 0;
... | java | static private long skipForward(InputStream is, long toSkip)
throws IOException {
long eachSkip = 0;
long skipped = 0;
while (skipped != toSkip) {
eachSkip = is.skip(toSkip - skipped);
// check if EOF is reached
if (eachSkip <= 0) {
... | [
"static",
"private",
"long",
"skipForward",
"(",
"InputStream",
"is",
",",
"long",
"toSkip",
")",
"throws",
"IOException",
"{",
"long",
"eachSkip",
"=",
"0",
";",
"long",
"skipped",
"=",
"0",
";",
"while",
"(",
"skipped",
"!=",
"toSkip",
")",
"{",
"eachS... | Skips through the specified number of bytes from the stream
until either EOF is reached, or the specified
number of bytes have been skipped | [
"Skips",
"through",
"the",
"specified",
"number",
"of",
"bytes",
"from",
"the",
"stream",
"until",
"either",
"EOF",
"is",
"reached",
"or",
"the",
"specified",
"number",
"of",
"bytes",
"have",
"been",
"skipped"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLConnection.java#L1759-L1779 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java | LabeledChunkIdentifier.isEndOfChunk | public static boolean isEndOfChunk(LabelTagType prev, LabelTagType cur) {
"""
Returns whether a chunk ended between the previous and current token
@param prev - the label/tag/type of the previous token
@param cur - the label/tag/type of the current token
@return true if the previous token was the last token of ... | java | public static boolean isEndOfChunk(LabelTagType prev, LabelTagType cur)
{
if (prev == null) return false;
return isEndOfChunk(prev.tag, prev.type, cur.tag, cur.type);
} | [
"public",
"static",
"boolean",
"isEndOfChunk",
"(",
"LabelTagType",
"prev",
",",
"LabelTagType",
"cur",
")",
"{",
"if",
"(",
"prev",
"==",
"null",
")",
"return",
"false",
";",
"return",
"isEndOfChunk",
"(",
"prev",
".",
"tag",
",",
"prev",
".",
"type",
"... | Returns whether a chunk ended between the previous and current token
@param prev - the label/tag/type of the previous token
@param cur - the label/tag/type of the current token
@return true if the previous token was the last token of a chunk | [
"Returns",
"whether",
"a",
"chunk",
"ended",
"between",
"the",
"previous",
"and",
"current",
"token"
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java#L155-L159 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java | DdosProtectionPlansInner.beginDelete | public void beginDelete(String resourceGroupName, String ddosProtectionPlanName) {
"""
Deletes the specified DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection plan.
@throws IllegalArgumentException thrown if parameters ... | java | public void beginDelete(String resourceGroupName, String ddosProtectionPlanName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body();
} | [
"public",
"void",
"beginDelete",
"(",
"String",
"resourceGroupName",
",",
"String",
"ddosProtectionPlanName",
")",
"{",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"ddosProtectionPlanName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
... | Deletes the specified DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection plan.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws R... | [
"Deletes",
"the",
"specified",
"DDoS",
"protection",
"plan",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L180-L182 |
js-lib-com/commons | src/main/java/js/util/FilteredStrings.java | FilteredStrings.addAll | public void addAll(String prefix, String[] strings) {
"""
Add strings accepted by this filter pattern but prefixed with given string. Strings argument can come from
{@link File#list()} and can be null in which case this method does nothing. This method accept a prefix argument; it is
inserted at every string sta... | java | public void addAll(String prefix, String[] strings) {
if (strings == null) {
return;
}
for (String string : strings) {
if (filter.accept(string)) {
list.add(prefix + string);
}
}
} | [
"public",
"void",
"addAll",
"(",
"String",
"prefix",
",",
"String",
"[",
"]",
"strings",
")",
"{",
"if",
"(",
"strings",
"==",
"null",
")",
"{",
"return",
";",
"}",
"for",
"(",
"String",
"string",
":",
"strings",
")",
"{",
"if",
"(",
"filter",
".",... | Add strings accepted by this filter pattern but prefixed with given string. Strings argument can come from
{@link File#list()} and can be null in which case this method does nothing. This method accept a prefix argument; it is
inserted at every string start before actually adding to strings list.
<pre>
File directory ... | [
"Add",
"strings",
"accepted",
"by",
"this",
"filter",
"pattern",
"but",
"prefixed",
"with",
"given",
"string",
".",
"Strings",
"argument",
"can",
"come",
"from",
"{",
"@link",
"File#list",
"()",
"}",
"and",
"can",
"be",
"null",
"in",
"which",
"case",
"this... | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/FilteredStrings.java#L79-L88 |
js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.removeTrailing | public static String removeTrailing(String string, char c) {
"""
Remove trailing character, if exists.
@param string source string,
@param c trailing character to eliminate.
@return source string guaranteed to not end in requested character.
"""
if(string == null) {
return null;
}
fi... | java | public static String removeTrailing(String string, char c)
{
if(string == null) {
return null;
}
final int lastCharIndex = string.length() - 1;
return string.charAt(lastCharIndex) == c ? string.substring(0, lastCharIndex) : string;
} | [
"public",
"static",
"String",
"removeTrailing",
"(",
"String",
"string",
",",
"char",
"c",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"lastCharIndex",
"=",
"string",
".",
"length",
"(",
")",
"-",
... | Remove trailing character, if exists.
@param string source string,
@param c trailing character to eliminate.
@return source string guaranteed to not end in requested character. | [
"Remove",
"trailing",
"character",
"if",
"exists",
"."
] | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1328-L1335 |
aws/aws-sdk-java | aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResult.java | GetIntegrationResult.withRequestTemplates | public GetIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) {
"""
<p>
Represents a map of Velocity templates that are applied on the request payload based on the value of the
Content-Type header sent by the client. The content type value is the key in this map, and the templa... | java | public GetIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) {
setRequestTemplates(requestTemplates);
return this;
} | [
"public",
"GetIntegrationResult",
"withRequestTemplates",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"requestTemplates",
")",
"{",
"setRequestTemplates",
"(",
"requestTemplates",
")",
";",
"return",
"this",
";",
"}"
] | <p>
Represents a map of Velocity templates that are applied on the request payload based on the value of the
Content-Type header sent by the client. The content type value is the key in this map, and the template (as a
String) is the value.
</p>
@param requestTemplates
Represents a map of Velocity templates that are a... | [
"<p",
">",
"Represents",
"a",
"map",
"of",
"Velocity",
"templates",
"that",
"are",
"applied",
"on",
"the",
"request",
"payload",
"based",
"on",
"the",
"value",
"of",
"the",
"Content",
"-",
"Type",
"header",
"sent",
"by",
"the",
"client",
".",
"The",
"con... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResult.java#L1219-L1222 |
marvinlabs/android-intents | library/src/main/java/com/marvinlabs/intents/PhoneIntents.java | PhoneIntents.newPickContactIntent | @SuppressWarnings("deprecation")
public static Intent newPickContactIntent(String scope) {
"""
Pick contact from phone book
<p/>
Examples:
<p/>
<code><pre>
// Select only from users with emails
IntentUtils.pickContact(ContactsContract.CommonDataKinds.Email.CONTENT_TYPE);
<p/>
// Select only from users ... | java | @SuppressWarnings("deprecation")
public static Intent newPickContactIntent(String scope) {
Intent intent;
if (isContacts2ApiSupported()) {
intent = new Intent(Intent.ACTION_PICK, Uri.parse("content://com.android.contacts/contacts"));
} else {
intent = new Intent(Inten... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"static",
"Intent",
"newPickContactIntent",
"(",
"String",
"scope",
")",
"{",
"Intent",
"intent",
";",
"if",
"(",
"isContacts2ApiSupported",
"(",
")",
")",
"{",
"intent",
"=",
"new",
"Intent",
"("... | Pick contact from phone book
<p/>
Examples:
<p/>
<code><pre>
// Select only from users with emails
IntentUtils.pickContact(ContactsContract.CommonDataKinds.Email.CONTENT_TYPE);
<p/>
// Select only from users with phone numbers on pre Eclair devices
IntentUtils.pickContact(Contacts.Phones.CONTENT_TYPE);
<p/>
// Select o... | [
"Pick",
"contact",
"from",
"phone",
"book",
"<p",
"/",
">",
"Examples",
":",
"<p",
"/",
">",
"<code",
">",
"<pre",
">",
"//",
"Select",
"only",
"from",
"users",
"with",
"emails",
"IntentUtils",
".",
"pickContact",
"(",
"ContactsContract",
".",
"CommonDataK... | train | https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/PhoneIntents.java#L178-L192 |
micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ClassUtils.java | ClassUtils.isPresent | public static boolean isPresent(String name, @Nullable ClassLoader classLoader) {
"""
Check whether the given class is present in the given classloader.
@param name The name of the class
@param classLoader The classloader. If null will fallback to attempt the thread context loader, otherwise the system ... | java | public static boolean isPresent(String name, @Nullable ClassLoader classLoader) {
return forName(name, classLoader).isPresent();
} | [
"public",
"static",
"boolean",
"isPresent",
"(",
"String",
"name",
",",
"@",
"Nullable",
"ClassLoader",
"classLoader",
")",
"{",
"return",
"forName",
"(",
"name",
",",
"classLoader",
")",
".",
"isPresent",
"(",
")",
";",
"}"
] | Check whether the given class is present in the given classloader.
@param name The name of the class
@param classLoader The classloader. If null will fallback to attempt the thread context loader, otherwise the system loader
@return True if it is | [
"Check",
"whether",
"the",
"given",
"class",
"is",
"present",
"in",
"the",
"given",
"classloader",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ClassUtils.java#L212-L214 |
wisdom-framework/wisdom | core/wisdom-api/src/main/java/org/wisdom/api/router/AbstractRouter.java | AbstractRouter.getReverseRouteFor | @Override
public String getReverseRouteFor(Class<? extends Controller> clazz, String method) {
"""
Gets the url of the route handled by the specified action method. The action does not takes parameters. This
implementation delegates to {@link #getReverseRouteFor(java.lang.Class, String, java.util.Map)}.
@p... | java | @Override
public String getReverseRouteFor(Class<? extends Controller> clazz, String method) {
return getReverseRouteFor(clazz, method, null);
} | [
"@",
"Override",
"public",
"String",
"getReverseRouteFor",
"(",
"Class",
"<",
"?",
"extends",
"Controller",
">",
"clazz",
",",
"String",
"method",
")",
"{",
"return",
"getReverseRouteFor",
"(",
"clazz",
",",
"method",
",",
"null",
")",
";",
"}"
] | Gets the url of the route handled by the specified action method. The action does not takes parameters. This
implementation delegates to {@link #getReverseRouteFor(java.lang.Class, String, java.util.Map)}.
@param clazz the controller class
@param method the controller method
@return the url, {@literal null} if the ac... | [
"Gets",
"the",
"url",
"of",
"the",
"route",
"handled",
"by",
"the",
"specified",
"action",
"method",
".",
"The",
"action",
"does",
"not",
"takes",
"parameters",
".",
"This",
"implementation",
"delegates",
"to",
"{",
"@link",
"#getReverseRouteFor",
"(",
"java",... | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-api/src/main/java/org/wisdom/api/router/AbstractRouter.java#L128-L131 |
soi-toolkit/soi-toolkit-mule | commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java | RestClient.doHttpSendRequest | public MuleMessage doHttpSendRequest(String url, String method, String payload, String contentType) {
"""
Perform a HTTP call sending information to the server using POST or PUT
@param url
@param method, e.g. "POST" or "PUT"
@param payload
@param contentType
@return
@throws MuleException
"""
Ma... | java | public MuleMessage doHttpSendRequest(String url, String method, String payload, String contentType) {
Map<String, String> properties = new HashMap<String, String>();
properties.put("http.method", method);
properties.put("Content-Type", contentType);
MuleMessage response = send(url, payload,... | [
"public",
"MuleMessage",
"doHttpSendRequest",
"(",
"String",
"url",
",",
"String",
"method",
",",
"String",
"payload",
",",
"String",
"contentType",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
"=",
"new",
"HashMap",
"<",
"String",
",",
... | Perform a HTTP call sending information to the server using POST or PUT
@param url
@param method, e.g. "POST" or "PUT"
@param payload
@param contentType
@return
@throws MuleException | [
"Perform",
"a",
"HTTP",
"call",
"sending",
"information",
"to",
"the",
"server",
"using",
"POST",
"or",
"PUT"
] | train | https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java#L159-L168 |
joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/PEPUtility.java | PEPUtility.getFinishDate | public static final Date getFinishDate(byte[] data, int offset) {
"""
Retrieve a finish date.
@param data byte array
@param offset offset into byte array
@return finish date
"""
Date result;
long days = getShort(data, offset);
if (days == 0x8000)
{
result = null;
}
... | java | public static final Date getFinishDate(byte[] data, int offset)
{
Date result;
long days = getShort(data, offset);
if (days == 0x8000)
{
result = null;
}
else
{
result = DateHelper.getDateFromLong(EPOCH + ((days - 1) * DateHelper.MS_PER_DAY));
}
... | [
"public",
"static",
"final",
"Date",
"getFinishDate",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
")",
"{",
"Date",
"result",
";",
"long",
"days",
"=",
"getShort",
"(",
"data",
",",
"offset",
")",
";",
"if",
"(",
"days",
"==",
"0x8000",
")",... | Retrieve a finish date.
@param data byte array
@param offset offset into byte array
@return finish date | [
"Retrieve",
"a",
"finish",
"date",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/PEPUtility.java#L144-L159 |
Azure/azure-sdk-for-java | hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java | ConfigurationsInner.listAsync | public Observable<ClusterConfigurationsInner> listAsync(String resourceGroupName, String clusterName) {
"""
Gets all configuration information for an HDI cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgumentException thrown if par... | java | public Observable<ClusterConfigurationsInner> listAsync(String resourceGroupName, String clusterName) {
return listWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1<ServiceResponse<ClusterConfigurationsInner>, ClusterConfigurationsInner>() {
@Override
public ClusterC... | [
"public",
"Observable",
"<",
"ClusterConfigurationsInner",
">",
"listAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"clusterName",
")",
".",
"map",
"(",
"new"... | Gets all configuration information for an HDI cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the ClusterConfigurationsInner object | [
"Gets",
"all",
"configuration",
"information",
"for",
"an",
"HDI",
"cluster",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java#L111-L118 |
JOML-CI/JOML | src/org/joml/Vector4f.java | Vector4f.fma | public Vector4f fma(Vector4fc a, Vector4fc b) {
"""
Add the component-wise multiplication of <code>a * b</code> to this vector.
@param a
the first multiplicand
@param b
the second multiplicand
@return a vector holding the result
"""
return fma(a, b, thisOrNew());
} | java | public Vector4f fma(Vector4fc a, Vector4fc b) {
return fma(a, b, thisOrNew());
} | [
"public",
"Vector4f",
"fma",
"(",
"Vector4fc",
"a",
",",
"Vector4fc",
"b",
")",
"{",
"return",
"fma",
"(",
"a",
",",
"b",
",",
"thisOrNew",
"(",
")",
")",
";",
"}"
] | Add the component-wise multiplication of <code>a * b</code> to this vector.
@param a
the first multiplicand
@param b
the second multiplicand
@return a vector holding the result | [
"Add",
"the",
"component",
"-",
"wise",
"multiplication",
"of",
"<code",
">",
"a",
"*",
"b<",
"/",
"code",
">",
"to",
"this",
"vector",
"."
] | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector4f.java#L700-L702 |
petergeneric/stdlib | service-manager/host-agent/src/main/java/com/peterphi/servicemanager/hostagent/webapp/service/NginxService.java | NginxService.reconfigure | public void reconfigure(final String config) {
"""
Rewrite the nginx site configuration and reload
@param config
the nginx site configuration
"""
try
{
final File tempFile = File.createTempFile("nginx", ".conf");
try
{
FileHelper.write(tempFile, config);
final Execed process = Exec.ro... | java | public void reconfigure(final String config)
{
try
{
final File tempFile = File.createTempFile("nginx", ".conf");
try
{
FileHelper.write(tempFile, config);
final Execed process = Exec.rootUtility(new File(binPath, "nginx-reconfigure").getAbsolutePath(),
... | [
"public",
"void",
"reconfigure",
"(",
"final",
"String",
"config",
")",
"{",
"try",
"{",
"final",
"File",
"tempFile",
"=",
"File",
".",
"createTempFile",
"(",
"\"nginx\"",
",",
"\".conf\"",
")",
";",
"try",
"{",
"FileHelper",
".",
"write",
"(",
"tempFile",... | Rewrite the nginx site configuration and reload
@param config
the nginx site configuration | [
"Rewrite",
"the",
"nginx",
"site",
"configuration",
"and",
"reload"
] | train | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/service-manager/host-agent/src/main/java/com/peterphi/servicemanager/hostagent/webapp/service/NginxService.java#L45-L70 |
naver/android-utilset | UtilSet/src/com/navercorp/utilset/ui/ScreenUtils.java | ScreenUtils.setScreenOffTimeout | public static void setScreenOffTimeout(Context context, int millis) {
"""
@param context
@param millis Time for screen to turn off. Setting this value to -1 will prohibit screen from turning off
"""
Settings.System.putInt(context.getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, millis);
} | java | public static void setScreenOffTimeout(Context context, int millis) {
Settings.System.putInt(context.getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, millis);
} | [
"public",
"static",
"void",
"setScreenOffTimeout",
"(",
"Context",
"context",
",",
"int",
"millis",
")",
"{",
"Settings",
".",
"System",
".",
"putInt",
"(",
"context",
".",
"getContentResolver",
"(",
")",
",",
"Settings",
".",
"System",
".",
"SCREEN_OFF_TIMEOU... | @param context
@param millis Time for screen to turn off. Setting this value to -1 will prohibit screen from turning off | [
"@param",
"context",
"@param",
"millis",
"Time",
"for",
"screen",
"to",
"turn",
"off",
".",
"Setting",
"this",
"value",
"to",
"-",
"1",
"will",
"prohibit",
"screen",
"from",
"turning",
"off"
] | train | https://github.com/naver/android-utilset/blob/4af5f821466bc5bec4ea221ca6d87e0ac9b87e0b/UtilSet/src/com/navercorp/utilset/ui/ScreenUtils.java#L30-L32 |
netty/netty | handler/src/main/java/io/netty/handler/ssl/SslContext.java | SslContext.buildKeyStore | static KeyStore buildKeyStore(X509Certificate[] certChain, PrivateKey key, char[] keyPasswordChars)
throws KeyStoreException, NoSuchAlgorithmException,
CertificateException, IOException {
"""
Generates a new {@link KeyStore}.
@param certChain a X.509 certificate chain
@param key ... | java | static KeyStore buildKeyStore(X509Certificate[] certChain, PrivateKey key, char[] keyPasswordChars)
throws KeyStoreException, NoSuchAlgorithmException,
CertificateException, IOException {
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(null, null);
... | [
"static",
"KeyStore",
"buildKeyStore",
"(",
"X509Certificate",
"[",
"]",
"certChain",
",",
"PrivateKey",
"key",
",",
"char",
"[",
"]",
"keyPasswordChars",
")",
"throws",
"KeyStoreException",
",",
"NoSuchAlgorithmException",
",",
"CertificateException",
",",
"IOExcepti... | Generates a new {@link KeyStore}.
@param certChain a X.509 certificate chain
@param key a PKCS#8 private key
@param keyPasswordChars the password of the {@code keyFile}.
{@code null} if it's not password-protected.
@return generated {@link KeyStore}. | [
"Generates",
"a",
"new",
"{",
"@link",
"KeyStore",
"}",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L1035-L1042 |
Azure/azure-sdk-for-java | sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java | SyncGroupsInner.listLogsAsync | public Observable<Page<SyncGroupLogPropertiesInner>> listLogsAsync(final String resourceGroupName, final String serverName, final String databaseName, final String syncGroupName, final String startTime, final String endTime, final String type, final String continuationToken) {
"""
Gets a collection of sync group l... | java | public Observable<Page<SyncGroupLogPropertiesInner>> listLogsAsync(final String resourceGroupName, final String serverName, final String databaseName, final String syncGroupName, final String startTime, final String endTime, final String type, final String continuationToken) {
return listLogsWithServiceResponse... | [
"public",
"Observable",
"<",
"Page",
"<",
"SyncGroupLogPropertiesInner",
">",
">",
"listLogsAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"serverName",
",",
"final",
"String",
"databaseName",
",",
"final",
"String",
"syncGroupName",
",... | Gets a collection of sync group logs.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param databaseName The name of the database on which the sync group is hosted... | [
"Gets",
"a",
"collection",
"of",
"sync",
"group",
"logs",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L804-L812 |
sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java | Jdt2Ecore.isSubClassOf | public boolean isSubClassOf(TypeFinder typeFinder, String subClass, String superClass) throws JavaModelException {
"""
Replies if the given type is a subclass of the second type.
<p>The type finder could be obtained with {@link #toTypeFinder(IJavaProject)}.
@param typeFinder the type finder to be used for fi... | java | public boolean isSubClassOf(TypeFinder typeFinder, String subClass, String superClass) throws JavaModelException {
final SuperTypeIterator typeIterator = new SuperTypeIterator(typeFinder, false, subClass);
while (typeIterator.hasNext()) {
final IType type = typeIterator.next();
if (Objects.equals(type.getFull... | [
"public",
"boolean",
"isSubClassOf",
"(",
"TypeFinder",
"typeFinder",
",",
"String",
"subClass",
",",
"String",
"superClass",
")",
"throws",
"JavaModelException",
"{",
"final",
"SuperTypeIterator",
"typeIterator",
"=",
"new",
"SuperTypeIterator",
"(",
"typeFinder",
",... | Replies if the given type is a subclass of the second type.
<p>The type finder could be obtained with {@link #toTypeFinder(IJavaProject)}.
@param typeFinder the type finder to be used for finding the type definitions.
@param subClass the name of the sub class.
@param superClass the name of the expected super class.
@... | [
"Replies",
"if",
"the",
"given",
"type",
"is",
"a",
"subclass",
"of",
"the",
"second",
"type",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java#L594-L603 |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.processActivityCodes | private void processActivityCodes(APIBusinessObjects apibo, ProjectType project) {
"""
Process activity code data.
@param apibo global activity code data
@param project project-specific activity code data
"""
ActivityCodeContainer container = m_projectFile.getActivityCodes();
Map<Integer, Activ... | java | private void processActivityCodes(APIBusinessObjects apibo, ProjectType project)
{
ActivityCodeContainer container = m_projectFile.getActivityCodes();
Map<Integer, ActivityCode> map = new HashMap<Integer, ActivityCode>();
List<ActivityCodeTypeType> types = new ArrayList<ActivityCodeTypeType>();
... | [
"private",
"void",
"processActivityCodes",
"(",
"APIBusinessObjects",
"apibo",
",",
"ProjectType",
"project",
")",
"{",
"ActivityCodeContainer",
"container",
"=",
"m_projectFile",
".",
"getActivityCodes",
"(",
")",
";",
"Map",
"<",
"Integer",
",",
"ActivityCode",
">... | Process activity code data.
@param apibo global activity code data
@param project project-specific activity code data | [
"Process",
"activity",
"code",
"data",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L378-L407 |
jayantk/jklol | src/com/jayantkrish/jklol/ccg/SyntacticCategory.java | SyntacticCategory.assignAllFeatures | public SyntacticCategory assignAllFeatures(String value) {
"""
Assigns value to all unfilled feature variables.
@param value
@return
"""
Set<Integer> featureVars = Sets.newHashSet();
getAllFeatureVariables(featureVars);
Map<Integer, String> valueMap = Maps.newHashMap();
for (Integer var : ... | java | public SyntacticCategory assignAllFeatures(String value) {
Set<Integer> featureVars = Sets.newHashSet();
getAllFeatureVariables(featureVars);
Map<Integer, String> valueMap = Maps.newHashMap();
for (Integer var : featureVars) {
valueMap.put(var, value);
}
return assignFeatures(valueMap, Co... | [
"public",
"SyntacticCategory",
"assignAllFeatures",
"(",
"String",
"value",
")",
"{",
"Set",
"<",
"Integer",
">",
"featureVars",
"=",
"Sets",
".",
"newHashSet",
"(",
")",
";",
"getAllFeatureVariables",
"(",
"featureVars",
")",
";",
"Map",
"<",
"Integer",
",",
... | Assigns value to all unfilled feature variables.
@param value
@return | [
"Assigns",
"value",
"to",
"all",
"unfilled",
"feature",
"variables",
"."
] | train | https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/SyntacticCategory.java#L299-L308 |
EsotericSoftware/reflectasm | src/com/esotericsoftware/reflectasm/MethodAccess.java | MethodAccess.getIndex | public int getIndex (String methodName, Class... paramTypes) {
"""
Returns the index of the first method with the specified name and param types.
"""
for (int i = 0, n = methodNames.length; i < n; i++)
if (methodNames[i].equals(methodName) && Arrays.equals(paramTypes, parameterTypes[i])) return i;
th... | java | public int getIndex (String methodName, Class... paramTypes) {
for (int i = 0, n = methodNames.length; i < n; i++)
if (methodNames[i].equals(methodName) && Arrays.equals(paramTypes, parameterTypes[i])) return i;
throw new IllegalArgumentException("Unable to find non-private method: " + methodName + " " + Arra... | [
"public",
"int",
"getIndex",
"(",
"String",
"methodName",
",",
"Class",
"...",
"paramTypes",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"methodNames",
".",
"length",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"if",
"(",
"methodNames",... | Returns the index of the first method with the specified name and param types. | [
"Returns",
"the",
"index",
"of",
"the",
"first",
"method",
"with",
"the",
"specified",
"name",
"and",
"param",
"types",
"."
] | train | https://github.com/EsotericSoftware/reflectasm/blob/c86a421c5bec16fd82a22a39b85910568d3c7bf4/src/com/esotericsoftware/reflectasm/MethodAccess.java#L55-L59 |
udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/FieldSet.java | FieldSet.computeFieldSize | public static int computeFieldSize(final FieldDescriptorLite<?> descriptor,
final Object value) {
"""
Compute the number of bytes needed to encode a particular field.
"""
WireFormat.FieldType type = descriptor.getLiteType();
int number = descriptor.getNumber();
... | java | public static int computeFieldSize(final FieldDescriptorLite<?> descriptor,
final Object value) {
WireFormat.FieldType type = descriptor.getLiteType();
int number = descriptor.getNumber();
if (descriptor.isRepeated()) {
if (descriptor.isPacked()) {
int data... | [
"public",
"static",
"int",
"computeFieldSize",
"(",
"final",
"FieldDescriptorLite",
"<",
"?",
">",
"descriptor",
",",
"final",
"Object",
"value",
")",
"{",
"WireFormat",
".",
"FieldType",
"type",
"=",
"descriptor",
".",
"getLiteType",
"(",
")",
";",
"int",
"... | Compute the number of bytes needed to encode a particular field. | [
"Compute",
"the",
"number",
"of",
"bytes",
"needed",
"to",
"encode",
"a",
"particular",
"field",
"."
] | train | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/FieldSet.java#L837-L860 |
mapsforge/mapsforge | mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java | AwtUtil.getMinimumCacheSize | public static int getMinimumCacheSize(int tileSize, double overdrawFactor) {
"""
Compute the minimum cache size for a view, using the size of the screen.
<p>
Combine with <code>FrameBufferController.setUseSquareFrameBuffer(false);</code>
@param tileSize the tile size
@param overdrawFactor the overdraw ... | java | public static int getMinimumCacheSize(int tileSize, double overdrawFactor) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
return (int) Math.max(4, Math.round((2 + screenSize.getWidth() * overdrawFactor / tileSize)
* (2 + screenSize.getHeight() * overdrawFactor / ti... | [
"public",
"static",
"int",
"getMinimumCacheSize",
"(",
"int",
"tileSize",
",",
"double",
"overdrawFactor",
")",
"{",
"Dimension",
"screenSize",
"=",
"Toolkit",
".",
"getDefaultToolkit",
"(",
")",
".",
"getScreenSize",
"(",
")",
";",
"return",
"(",
"int",
")",
... | Compute the minimum cache size for a view, using the size of the screen.
<p>
Combine with <code>FrameBufferController.setUseSquareFrameBuffer(false);</code>
@param tileSize the tile size
@param overdrawFactor the overdraw factor applied to the map view
@return the minimum cache size for the view | [
"Compute",
"the",
"minimum",
"cache",
"size",
"for",
"a",
"view",
"using",
"the",
"size",
"of",
"the",
"screen",
".",
"<p",
">",
"Combine",
"with",
"<code",
">",
"FrameBufferController",
".",
"setUseSquareFrameBuffer",
"(",
"false",
")",
";",
"<",
"/",
"co... | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java#L56-L60 |
alkacon/opencms-core | src/org/opencms/flex/CmsFlexController.java | CmsFlexController.push | public void push(CmsFlexRequest req, CmsFlexResponse res) {
"""
Adds another flex request/response pair to the stack.<p>
@param req the request to add
@param res the response to add
"""
m_flexRequestList.add(req);
m_flexResponseList.add(res);
m_flexContextInfoList.add(new CmsFlexRe... | java | public void push(CmsFlexRequest req, CmsFlexResponse res) {
m_flexRequestList.add(req);
m_flexResponseList.add(res);
m_flexContextInfoList.add(new CmsFlexRequestContextInfo());
updateRequestContextInfo();
} | [
"public",
"void",
"push",
"(",
"CmsFlexRequest",
"req",
",",
"CmsFlexResponse",
"res",
")",
"{",
"m_flexRequestList",
".",
"add",
"(",
"req",
")",
";",
"m_flexResponseList",
".",
"add",
"(",
"res",
")",
";",
"m_flexContextInfoList",
".",
"add",
"(",
"new",
... | Adds another flex request/response pair to the stack.<p>
@param req the request to add
@param res the response to add | [
"Adds",
"another",
"flex",
"request",
"/",
"response",
"pair",
"to",
"the",
"stack",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexController.java#L617-L623 |
intellimate/Izou | src/main/java/org/intellimate/izou/security/FilePermissionModule.java | FilePermissionModule.checkPermission | @Override
public void checkPermission(Permission permission, AddOnModel addon) throws IzouPermissionException {
"""
Checks if the given addOn is allowed to access the requested service and registers them if not yet registered.
@param permission the Permission to check
@param addon the identifiable to ... | java | @Override
public void checkPermission(Permission permission, AddOnModel addon) throws IzouPermissionException {
String canonicalName = permission.getName().intern().toLowerCase();
String canonicalAction = permission.getActions().intern().toLowerCase();
if (canonicalName.contains("all files... | [
"@",
"Override",
"public",
"void",
"checkPermission",
"(",
"Permission",
"permission",
",",
"AddOnModel",
"addon",
")",
"throws",
"IzouPermissionException",
"{",
"String",
"canonicalName",
"=",
"permission",
".",
"getName",
"(",
")",
".",
"intern",
"(",
")",
"."... | Checks if the given addOn is allowed to access the requested service and registers them if not yet registered.
@param permission the Permission to check
@param addon the identifiable to check
@throws IzouPermissionException thrown if the addOn is not allowed to access its requested service | [
"Checks",
"if",
"the",
"given",
"addOn",
"is",
"allowed",
"to",
"access",
"the",
"requested",
"service",
"and",
"registers",
"them",
"if",
"not",
"yet",
"registered",
"."
] | train | https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/security/FilePermissionModule.java#L76-L88 |
ModeShape/modeshape | modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java | JcrTools.printQuery | public QueryResult printQuery( Session session,
String jcrSql2 ) throws RepositoryException {
"""
Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results.
@param session the session
@param jcrSql2 the JCR-SQL2 query
@return the results
@throws... | java | public QueryResult printQuery( Session session,
String jcrSql2 ) throws RepositoryException {
return printQuery(session, jcrSql2, Query.JCR_SQL2, -1, null);
} | [
"public",
"QueryResult",
"printQuery",
"(",
"Session",
"session",
",",
"String",
"jcrSql2",
")",
"throws",
"RepositoryException",
"{",
"return",
"printQuery",
"(",
"session",
",",
"jcrSql2",
",",
"Query",
".",
"JCR_SQL2",
",",
"-",
"1",
",",
"null",
")",
";"... | Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results.
@param session the session
@param jcrSql2 the JCR-SQL2 query
@return the results
@throws RepositoryException | [
"Execute",
"the",
"supplied",
"JCR",
"-",
"SQL2",
"query",
"and",
"if",
"printing",
"is",
"enabled",
"print",
"out",
"the",
"results",
"."
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java#L627-L630 |
ironjacamar/ironjacamar | core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java | Context.removeConnectionListener | void removeConnectionListener(ConnectionManager cm, ConnectionListener cl) {
"""
Remove a connection listener
@param cm The connection manager
@param cl The connection listener
"""
if (cmToCl != null && cmToCl.get(cm) != null)
{
cmToCl.get(cm).remove(cl);
clToC.remove(cl);
... | java | void removeConnectionListener(ConnectionManager cm, ConnectionListener cl)
{
if (cmToCl != null && cmToCl.get(cm) != null)
{
cmToCl.get(cm).remove(cl);
clToC.remove(cl);
}
} | [
"void",
"removeConnectionListener",
"(",
"ConnectionManager",
"cm",
",",
"ConnectionListener",
"cl",
")",
"{",
"if",
"(",
"cmToCl",
"!=",
"null",
"&&",
"cmToCl",
".",
"get",
"(",
"cm",
")",
"!=",
"null",
")",
"{",
"cmToCl",
".",
"get",
"(",
"cm",
")",
... | Remove a connection listener
@param cm The connection manager
@param cl The connection listener | [
"Remove",
"a",
"connection",
"listener"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java#L178-L185 |
carewebframework/carewebframework-core | org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/core/BaseMojo.java | BaseMojo.throwMojoException | public void throwMojoException(String msg, Throwable e) throws MojoExecutionException {
"""
If "failOnError" is enabled, throws a MojoExecutionException. Otherwise, logs the exception
and resumes execution.
@param msg The exception message.
@param e The original exceptions.
@throws MojoExecutionException Thr... | java | public void throwMojoException(String msg, Throwable e) throws MojoExecutionException {
if (failOnError) {
throw new MojoExecutionException(msg, e);
} else {
getLog().error(msg, e);
}
} | [
"public",
"void",
"throwMojoException",
"(",
"String",
"msg",
",",
"Throwable",
"e",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"failOnError",
")",
"{",
"throw",
"new",
"MojoExecutionException",
"(",
"msg",
",",
"e",
")",
";",
"}",
"else",
"{",... | If "failOnError" is enabled, throws a MojoExecutionException. Otherwise, logs the exception
and resumes execution.
@param msg The exception message.
@param e The original exceptions.
@throws MojoExecutionException Thrown exception. | [
"If",
"failOnError",
"is",
"enabled",
"throws",
"a",
"MojoExecutionException",
".",
"Otherwise",
"logs",
"the",
"exception",
"and",
"resumes",
"execution",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/core/BaseMojo.java#L256-L262 |
google/error-prone-javac | src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java | EnumConstantBuilder.buildDeprecationInfo | public void buildDeprecationInfo(XMLNode node, Content enumConstantsTree) {
"""
Build the deprecation information.
@param node the XML element that specifies which components to document
@param enumConstantsTree the content tree to which the documentation will be added
"""
writer.addDeprecated(
... | java | public void buildDeprecationInfo(XMLNode node, Content enumConstantsTree) {
writer.addDeprecated(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex),
enumConstantsTree);
} | [
"public",
"void",
"buildDeprecationInfo",
"(",
"XMLNode",
"node",
",",
"Content",
"enumConstantsTree",
")",
"{",
"writer",
".",
"addDeprecated",
"(",
"(",
"FieldDoc",
")",
"enumConstants",
".",
"get",
"(",
"currentEnumConstantsIndex",
")",
",",
"enumConstantsTree",
... | Build the deprecation information.
@param node the XML element that specifies which components to document
@param enumConstantsTree the content tree to which the documentation will be added | [
"Build",
"the",
"deprecation",
"information",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java#L190-L194 |
windup/windup | reporting/api/src/main/java/org/jboss/windup/reporting/service/TechnologyTagService.java | TechnologyTagService.addTagToFileModel | public TechnologyTagModel addTagToFileModel(FileModel fileModel, String tagName, TechnologyTagLevel level) {
"""
Adds the provided tag to the provided {@link FileModel}. If a {@link TechnologyTagModel} cannot be found with the provided name, then one will
be created.
"""
Traversable<Vertex, Vertex> q ... | java | public TechnologyTagModel addTagToFileModel(FileModel fileModel, String tagName, TechnologyTagLevel level)
{
Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class)
.traverse(g -> g.has(TechnologyTagModel.NAME, tagName));
TechnologyTagModel technology... | [
"public",
"TechnologyTagModel",
"addTagToFileModel",
"(",
"FileModel",
"fileModel",
",",
"String",
"tagName",
",",
"TechnologyTagLevel",
"level",
")",
"{",
"Traversable",
"<",
"Vertex",
",",
"Vertex",
">",
"q",
"=",
"getGraphContext",
"(",
")",
".",
"getQuery",
... | Adds the provided tag to the provided {@link FileModel}. If a {@link TechnologyTagModel} cannot be found with the provided name, then one will
be created. | [
"Adds",
"the",
"provided",
"tag",
"to",
"the",
"provided",
"{"
] | train | https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/TechnologyTagService.java#L44-L60 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.invokeMethod | public static Object invokeMethod(Object object, String method, Object arguments) {
"""
Provide a dynamic method invocation method which can be overloaded in
classes to implement dynamic proxies easily.
@param object any Object
@param method the name of the method to call
@param arguments the arguments... | java | public static Object invokeMethod(Object object, String method, Object arguments) {
return InvokerHelper.invokeMethod(object, method, arguments);
} | [
"public",
"static",
"Object",
"invokeMethod",
"(",
"Object",
"object",
",",
"String",
"method",
",",
"Object",
"arguments",
")",
"{",
"return",
"InvokerHelper",
".",
"invokeMethod",
"(",
"object",
",",
"method",
",",
"arguments",
")",
";",
"}"
] | Provide a dynamic method invocation method which can be overloaded in
classes to implement dynamic proxies easily.
@param object any Object
@param method the name of the method to call
@param arguments the arguments to use
@return the result of the method call
@since 1.0 | [
"Provide",
"a",
"dynamic",
"method",
"invocation",
"method",
"which",
"can",
"be",
"overloaded",
"in",
"classes",
"to",
"implement",
"dynamic",
"proxies",
"easily",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L1088-L1090 |
Impetus/Kundera | src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java | CouchDBSchemaManager.createViewForSelectAll | private void createViewForSelectAll(TableInfo tableInfo, Map<String, MapReduce> views) {
"""
Creates the view for select all.
@param tableInfo
the table info
@param views
the views
"""
MapReduce mapr = new MapReduce();
mapr.setMap("function(doc){if(doc." + tableInfo.getIdColumnName() + ")... | java | private void createViewForSelectAll(TableInfo tableInfo, Map<String, MapReduce> views)
{
MapReduce mapr = new MapReduce();
mapr.setMap("function(doc){if(doc." + tableInfo.getIdColumnName() + "){emit(null, doc);}}");
views.put("all", mapr);
} | [
"private",
"void",
"createViewForSelectAll",
"(",
"TableInfo",
"tableInfo",
",",
"Map",
"<",
"String",
",",
"MapReduce",
">",
"views",
")",
"{",
"MapReduce",
"mapr",
"=",
"new",
"MapReduce",
"(",
")",
";",
"mapr",
".",
"setMap",
"(",
"\"function(doc){if(doc.\"... | Creates the view for select all.
@param tableInfo
the table info
@param views
the views | [
"Creates",
"the",
"view",
"for",
"select",
"all",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java#L658-L663 |
junit-team/junit4 | src/main/java/org/junit/runners/model/FrameworkMethod.java | FrameworkMethod.validatePublicVoidNoArg | public void validatePublicVoidNoArg(boolean isStatic, List<Throwable> errors) {
"""
Adds to {@code errors} if this method:
<ul>
<li>is not public, or
<li>takes parameters, or
<li>returns something other than void, or
<li>is static (given {@code isStatic is false}), or
<li>is not static (given {@code isStatic... | java | public void validatePublicVoidNoArg(boolean isStatic, List<Throwable> errors) {
validatePublicVoid(isStatic, errors);
if (method.getParameterTypes().length != 0) {
errors.add(new Exception("Method " + method.getName() + " should have no parameters"));
}
} | [
"public",
"void",
"validatePublicVoidNoArg",
"(",
"boolean",
"isStatic",
",",
"List",
"<",
"Throwable",
">",
"errors",
")",
"{",
"validatePublicVoid",
"(",
"isStatic",
",",
"errors",
")",
";",
"if",
"(",
"method",
".",
"getParameterTypes",
"(",
")",
".",
"le... | Adds to {@code errors} if this method:
<ul>
<li>is not public, or
<li>takes parameters, or
<li>returns something other than void, or
<li>is static (given {@code isStatic is false}), or
<li>is not static (given {@code isStatic is true}).
</ul> | [
"Adds",
"to",
"{"
] | train | https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/runners/model/FrameworkMethod.java#L82-L87 |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java | DefaultInstalledExtensionRepository.applyInstallExtension | private void applyInstallExtension(DefaultInstalledExtension installedExtension, String namespace,
boolean dependency, Map<String, Object> properties, Map<String, ExtensionDependency> managedDependencies)
throws InstallException {
"""
Install provided extension.
@param localExtension the extensi... | java | private void applyInstallExtension(DefaultInstalledExtension installedExtension, String namespace,
boolean dependency, Map<String, Object> properties, Map<String, ExtensionDependency> managedDependencies)
throws InstallException
{
// INSTALLED
installedExtension.setInstalled(true, na... | [
"private",
"void",
"applyInstallExtension",
"(",
"DefaultInstalledExtension",
"installedExtension",
",",
"String",
"namespace",
",",
"boolean",
"dependency",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"Map",
"<",
"String",
",",
"ExtensionDepen... | Install provided extension.
@param localExtension the extension to install
@param namespace the namespace
@param dependency indicate if the extension is stored as a dependency of another one
@param properties the custom properties to set on the installed extension for the specified namespace
@param managedDependencies... | [
"Install",
"provided",
"extension",
"."
] | train | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository.java#L476-L505 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/websphere/servlet/filter/ChainedResponse.java | ChainedResponse.setAutoTransferringHeader | @SuppressWarnings("unchecked")
public void setAutoTransferringHeader(String name, String value) {
"""
Set a header that should be automatically transferred to all requests
in a chain. These headers will be backed up in a request attribute that
will automatically read and transferred by all ChainedResponses.... | java | @SuppressWarnings("unchecked")
public void setAutoTransferringHeader(String name, String value)
{
Hashtable headers = getAutoTransferringHeaders();
headers.put(name, value);
// setHeader(name, value);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"setAutoTransferringHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"Hashtable",
"headers",
"=",
"getAutoTransferringHeaders",
"(",
")",
";",
"headers",
".",
"put",
"(",
"nam... | Set a header that should be automatically transferred to all requests
in a chain. These headers will be backed up in a request attribute that
will automatically read and transferred by all ChainedResponses. This method
is useful for transparently transferring the original headers sent by the client
without forcing se... | [
"Set",
"a",
"header",
"that",
"should",
"be",
"automatically",
"transferred",
"to",
"all",
"requests",
"in",
"a",
"chain",
".",
"These",
"headers",
"will",
"be",
"backed",
"up",
"in",
"a",
"request",
"attribute",
"that",
"will",
"automatically",
"read",
"and... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/websphere/servlet/filter/ChainedResponse.java#L123-L129 |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ExtendedPropertyUrl.java | ExtendedPropertyUrl.deleteExtendedPropertyUrl | public static MozuUrl deleteExtendedPropertyUrl(String key, String orderId, String updateMode, String version) {
"""
Get Resource Url for DeleteExtendedProperty
@param key The extended property key.
@param orderId Unique identifier of the order.
@param updateMode Specifies whether to update the original order, ... | java | public static MozuUrl deleteExtendedPropertyUrl(String key, String orderId, String updateMode, String version)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/extendedproperties/{key}?updatemode={updateMode}&version={version}");
formatter.formatUrl("key", key);
formatter.formatUrl... | [
"public",
"static",
"MozuUrl",
"deleteExtendedPropertyUrl",
"(",
"String",
"key",
",",
"String",
"orderId",
",",
"String",
"updateMode",
",",
"String",
"version",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}... | Get Resource Url for DeleteExtendedProperty
@param key The extended property key.
@param orderId Unique identifier of the order.
@param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode ena... | [
"Get",
"Resource",
"Url",
"for",
"DeleteExtendedProperty"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ExtendedPropertyUrl.java#L96-L104 |
orbisgis/h2gis | h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java | TableUtilities.copyFields | public static void copyFields(Connection connection, SimpleResultSet rs, TableLocation tableLocation) throws SQLException {
"""
Copy fields from table into a {@link org.h2.tools.SimpleResultSet}
@param connection Active connection
@param rs Result set that will receive columns
@param tableLocation Import colu... | java | public static void copyFields(Connection connection, SimpleResultSet rs, TableLocation tableLocation) throws SQLException {
DatabaseMetaData meta = connection.getMetaData();
ResultSet columnsRs = meta.getColumns(tableLocation.getCatalog(null), tableLocation.getSchema(null),
tableLocation... | [
"public",
"static",
"void",
"copyFields",
"(",
"Connection",
"connection",
",",
"SimpleResultSet",
"rs",
",",
"TableLocation",
"tableLocation",
")",
"throws",
"SQLException",
"{",
"DatabaseMetaData",
"meta",
"=",
"connection",
".",
"getMetaData",
"(",
")",
";",
"R... | Copy fields from table into a {@link org.h2.tools.SimpleResultSet}
@param connection Active connection
@param rs Result set that will receive columns
@param tableLocation Import columns from this table
@throws SQLException Error | [
"Copy",
"fields",
"from",
"table",
"into",
"a",
"{",
"@link",
"org",
".",
"h2",
".",
"tools",
".",
"SimpleResultSet",
"}"
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableUtilities.java#L53-L78 |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java | HashtableOnDisk.getHtindex | long getHtindex(int index, int tableid) {
"""
************************************************************************
Retrieve the object pointer from the table. If we are in the process of
doubling, this method finds the correct table to update (since there are
two tables active during the doubling process).
... | java | long getHtindex(int index, int tableid) {
if (tableid == header.currentTableId()) {
return htindex[index];
} else {
return new_htindex[index];
}
} | [
"long",
"getHtindex",
"(",
"int",
"index",
",",
"int",
"tableid",
")",
"{",
"if",
"(",
"tableid",
"==",
"header",
".",
"currentTableId",
"(",
")",
")",
"{",
"return",
"htindex",
"[",
"index",
"]",
";",
"}",
"else",
"{",
"return",
"new_htindex",
"[",
... | ************************************************************************
Retrieve the object pointer from the table. If we are in the process of
doubling, this method finds the correct table to update (since there are
two tables active during the doubling process).
******************************************************... | [
"************************************************************************",
"Retrieve",
"the",
"object",
"pointer",
"from",
"the",
"table",
".",
"If",
"we",
"are",
"in",
"the",
"process",
"of",
"doubling",
"this",
"method",
"finds",
"the",
"correct",
"table",
"to",
"u... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java#L1447-L1453 |
apache/spark | common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java | ExternalShuffleBlockResolver.registerExecutor | public void registerExecutor(
String appId,
String execId,
ExecutorShuffleInfo executorInfo) {
"""
Registers a new Executor with all the configuration we need to find its shuffle files.
"""
AppExecId fullId = new AppExecId(appId, execId);
logger.info("Registered executor {} with {}", ... | java | public void registerExecutor(
String appId,
String execId,
ExecutorShuffleInfo executorInfo) {
AppExecId fullId = new AppExecId(appId, execId);
logger.info("Registered executor {} with {}", fullId, executorInfo);
if (!knownManagers.contains(executorInfo.shuffleManager)) {
throw new U... | [
"public",
"void",
"registerExecutor",
"(",
"String",
"appId",
",",
"String",
"execId",
",",
"ExecutorShuffleInfo",
"executorInfo",
")",
"{",
"AppExecId",
"fullId",
"=",
"new",
"AppExecId",
"(",
"appId",
",",
"execId",
")",
";",
"logger",
".",
"info",
"(",
"\... | Registers a new Executor with all the configuration we need to find its shuffle files. | [
"Registers",
"a",
"new",
"Executor",
"with",
"all",
"the",
"configuration",
"we",
"need",
"to",
"find",
"its",
"shuffle",
"files",
"."
] | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java#L142-L162 |
jeremylong/DependencyCheck | core/src/main/java/org/owasp/dependencycheck/utils/H2DBLock.java | H2DBLock.readLockFile | private String readLockFile() {
"""
Reads the first line from the lock file and returns the results as a
string.
@return the first line from the lock file; or null if the contents could
not be read
"""
String msg = null;
try (RandomAccessFile f = new RandomAccessFile(lockFile, "rw")) {
... | java | private String readLockFile() {
String msg = null;
try (RandomAccessFile f = new RandomAccessFile(lockFile, "rw")) {
msg = f.readLine();
} catch (IOException ex) {
LOGGER.debug(String.format("Error reading lock file: %s", lockFile), ex);
}
return msg;
... | [
"private",
"String",
"readLockFile",
"(",
")",
"{",
"String",
"msg",
"=",
"null",
";",
"try",
"(",
"RandomAccessFile",
"f",
"=",
"new",
"RandomAccessFile",
"(",
"lockFile",
",",
"\"rw\"",
")",
")",
"{",
"msg",
"=",
"f",
".",
"readLine",
"(",
")",
";",
... | Reads the first line from the lock file and returns the results as a
string.
@return the first line from the lock file; or null if the contents could
not be read | [
"Reads",
"the",
"first",
"line",
"from",
"the",
"lock",
"file",
"and",
"returns",
"the",
"results",
"as",
"a",
"string",
"."
] | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/utils/H2DBLock.java#L231-L239 |
m-m-m/util | pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java | AbstractPojoPathNavigator.convertList | @SuppressWarnings( {
"""
This method converts the given {@code arrayOrCollection} to a {@link List} as necessary.
@param currentPath is the current {@link CachingPojoPath} that lead to {@code arrayOrCollection}.
@param context is the {@link PojoPathContext context} for this operation.
@param state is the {@li... | java | @SuppressWarnings({ "unchecked", "rawtypes" })
protected Object convertList(CachingPojoPath currentPath, PojoPathContext context, PojoPathState state, Object arrayOrCollection) {
Object arrayOrList = arrayOrCollection;
if (arrayOrCollection instanceof Collection) {
if (!(arrayOrCollection instanceof Li... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"protected",
"Object",
"convertList",
"(",
"CachingPojoPath",
"currentPath",
",",
"PojoPathContext",
"context",
",",
"PojoPathState",
"state",
",",
"Object",
"arrayOrCollection",
")",
... | This method converts the given {@code arrayOrCollection} to a {@link List} as necessary.
@param currentPath is the current {@link CachingPojoPath} that lead to {@code arrayOrCollection}.
@param context is the {@link PojoPathContext context} for this operation.
@param state is the {@link #createState(Object, String, Po... | [
"This",
"method",
"converts",
"the",
"given",
"{",
"@code",
"arrayOrCollection",
"}",
"to",
"a",
"{",
"@link",
"List",
"}",
"as",
"necessary",
"."
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java#L846-L869 |
apache/flink | flink-core/src/main/java/org/apache/flink/util/AbstractID.java | AbstractID.longToByteArray | private static void longToByteArray(long l, byte[] ba, int offset) {
"""
Converts a long to a byte array.
@param l the long variable to be converted
@param ba the byte array to store the result the of the conversion
@param offset offset indicating at what position inside the byte array the result of the conve... | java | private static void longToByteArray(long l, byte[] ba, int offset) {
for (int i = 0; i < SIZE_OF_LONG; ++i) {
final int shift = i << 3; // i * 8
ba[offset + SIZE_OF_LONG - 1 - i] = (byte) ((l & (0xffL << shift)) >>> shift);
}
} | [
"private",
"static",
"void",
"longToByteArray",
"(",
"long",
"l",
",",
"byte",
"[",
"]",
"ba",
",",
"int",
"offset",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"SIZE_OF_LONG",
";",
"++",
"i",
")",
"{",
"final",
"int",
"shift",
"="... | Converts a long to a byte array.
@param l the long variable to be converted
@param ba the byte array to store the result the of the conversion
@param offset offset indicating at what position inside the byte array the result of the conversion shall be stored | [
"Converts",
"a",
"long",
"to",
"a",
"byte",
"array",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L210-L215 |
tvesalainen/bcc | src/main/java/org/vesalainen/bcc/ClassFile.java | ClassFile.getFieldIndex | int getFieldIndex(TypeElement declaringClass, String name, TypeMirror type) {
"""
Returns the constant map index to field
@param declaringClass
@param name
@param type
@return
"""
return getFieldIndex(declaringClass, name, Descriptor.getFieldDesriptor(type));
} | java | int getFieldIndex(TypeElement declaringClass, String name, TypeMirror type)
{
return getFieldIndex(declaringClass, name, Descriptor.getFieldDesriptor(type));
} | [
"int",
"getFieldIndex",
"(",
"TypeElement",
"declaringClass",
",",
"String",
"name",
",",
"TypeMirror",
"type",
")",
"{",
"return",
"getFieldIndex",
"(",
"declaringClass",
",",
"name",
",",
"Descriptor",
".",
"getFieldDesriptor",
"(",
"type",
")",
")",
";",
"}... | Returns the constant map index to field
@param declaringClass
@param name
@param type
@return | [
"Returns",
"the",
"constant",
"map",
"index",
"to",
"field"
] | train | https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/ClassFile.java#L213-L216 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java | TenantServiceClient.createTenant | public final Tenant createTenant(ProjectName parent, Tenant tenant) {
"""
Creates a new tenant entity.
<p>Sample code:
<pre><code>
try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Tenant tenant = Tenant.newBuilder().build();
... | java | public final Tenant createTenant(ProjectName parent, Tenant tenant) {
CreateTenantRequest request =
CreateTenantRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setTenant(tenant)
.build();
return createTenant(request);
} | [
"public",
"final",
"Tenant",
"createTenant",
"(",
"ProjectName",
"parent",
",",
"Tenant",
"tenant",
")",
"{",
"CreateTenantRequest",
"request",
"=",
"CreateTenantRequest",
".",
"newBuilder",
"(",
")",
".",
"setParent",
"(",
"parent",
"==",
"null",
"?",
"null",
... | Creates a new tenant entity.
<p>Sample code:
<pre><code>
try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Tenant tenant = Tenant.newBuilder().build();
Tenant response = tenantServiceClient.createTenant(parent, tenant);
}
</code></pre>
@p... | [
"Creates",
"a",
"new",
"tenant",
"entity",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java#L179-L187 |
raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.takesGenericArgument | public static <T extends MethodDescription> ElementMatcher.Junction<T> takesGenericArgument(int index, Type type) {
"""
Matches {@link MethodDescription}s that define a given generic type as a parameter at the given index.
@param index The index of the parameter.
@param type The generic type the matched metho... | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> takesGenericArgument(int index, Type type) {
return takesGenericArgument(index, TypeDefinition.Sort.describe(type));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"takesGenericArgument",
"(",
"int",
"index",
",",
"Type",
"type",
")",
"{",
"return",
"takesGenericArgument",
"(",
"index",
",",
"TypeDefinition"... | Matches {@link MethodDescription}s that define a given generic type as a parameter at the given index.
@param index The index of the parameter.
@param type The generic type the matched method is expected to define as a parameter type.
@param <T> The type of the matched object.
@return An element matcher that matche... | [
"Matches",
"{",
"@link",
"MethodDescription",
"}",
"s",
"that",
"define",
"a",
"given",
"generic",
"type",
"as",
"a",
"parameter",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1158-L1160 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.buildExpression | private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext)
throws XPathExpressionException {
"""
Construct a xPath expression instance with given expression string and namespace context.
If namespace context is not specified a default context is built from the X... | java | private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext)
throws XPathExpressionException {
XPath xpath = createXPathFactory().newXPath();
if (nsContext != null) {
xpath.setNamespaceContext(nsContext);
}
return xp... | [
"private",
"static",
"XPathExpression",
"buildExpression",
"(",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"throws",
"XPathExpressionException",
"{",
"XPath",
"xpath",
"=",
"createXPathFactory",
"(",
")",
".",
"newXPath",
"(",
")",
";",
... | Construct a xPath expression instance with given expression string and namespace context.
If namespace context is not specified a default context is built from the XML node
that is evaluated against.
@param xPathExpression
@param nsContext
@return
@throws XPathExpressionException | [
"Construct",
"a",
"xPath",
"expression",
"instance",
"with",
"given",
"expression",
"string",
"and",
"namespace",
"context",
".",
"If",
"namespace",
"context",
"is",
"not",
"specified",
"a",
"default",
"context",
"is",
"built",
"from",
"the",
"XML",
"node",
"t... | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L269-L278 |
aws/aws-sdk-java | aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/model/GetAccountSummaryResult.java | GetAccountSummaryResult.withSummaryMap | public GetAccountSummaryResult withSummaryMap(java.util.Map<String, Integer> summaryMap) {
"""
<p>
A set of key–value pairs containing information about IAM entity usage and IAM quotas.
</p>
@param summaryMap
A set of key–value pairs containing information about IAM entity usage and IAM quotas.
@return Retu... | java | public GetAccountSummaryResult withSummaryMap(java.util.Map<String, Integer> summaryMap) {
setSummaryMap(summaryMap);
return this;
} | [
"public",
"GetAccountSummaryResult",
"withSummaryMap",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"Integer",
">",
"summaryMap",
")",
"{",
"setSummaryMap",
"(",
"summaryMap",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A set of key–value pairs containing information about IAM entity usage and IAM quotas.
</p>
@param summaryMap
A set of key–value pairs containing information about IAM entity usage and IAM quotas.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"A",
"set",
"of",
"key–value",
"pairs",
"containing",
"information",
"about",
"IAM",
"entity",
"usage",
"and",
"IAM",
"quotas",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/model/GetAccountSummaryResult.java#L74-L77 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfContentByte.java | PdfContentByte.addImage | public void addImage(Image image, boolean inlineImage) throws DocumentException {
"""
Adds an <CODE>Image</CODE> to the page. The <CODE>Image</CODE> must have
absolute positioning. The image can be placed inline.
@param image the <CODE>Image</CODE> object
@param inlineImage <CODE>true</CODE> to place this image... | java | public void addImage(Image image, boolean inlineImage) throws DocumentException {
if (!image.hasAbsoluteY())
throw new DocumentException("The image must have absolute positioning.");
float matrix[] = image.matrix();
matrix[Image.CX] = image.getAbsoluteX() - matrix[Image.CX];
... | [
"public",
"void",
"addImage",
"(",
"Image",
"image",
",",
"boolean",
"inlineImage",
")",
"throws",
"DocumentException",
"{",
"if",
"(",
"!",
"image",
".",
"hasAbsoluteY",
"(",
")",
")",
"throw",
"new",
"DocumentException",
"(",
"\"The image must have absolute posi... | Adds an <CODE>Image</CODE> to the page. The <CODE>Image</CODE> must have
absolute positioning. The image can be placed inline.
@param image the <CODE>Image</CODE> object
@param inlineImage <CODE>true</CODE> to place this image inline, <CODE>false</CODE> otherwise
@throws DocumentException if the <CODE>Image</CODE> does... | [
"Adds",
"an",
"<CODE",
">",
"Image<",
"/",
"CODE",
">",
"to",
"the",
"page",
".",
"The",
"<CODE",
">",
"Image<",
"/",
"CODE",
">",
"must",
"have",
"absolute",
"positioning",
".",
"The",
"image",
"can",
"be",
"placed",
"inline",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1111-L1118 |
alkacon/opencms-core | src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java | CmsSitemapController.commitChange | protected void commitChange(final CmsSitemapChange change, final Command callback) {
"""
Adds a change to the queue.<p>
@param change the change to commit
@param callback the callback to execute after the change has been applied
"""
if (change != null) {
// save the sitemap
... | java | protected void commitChange(final CmsSitemapChange change, final Command callback) {
if (change != null) {
// save the sitemap
CmsRpcAction<CmsSitemapChange> saveAction = new CmsRpcAction<CmsSitemapChange>() {
/**
* @see org.opencms.gwt.client.rpc.CmsRpc... | [
"protected",
"void",
"commitChange",
"(",
"final",
"CmsSitemapChange",
"change",
",",
"final",
"Command",
"callback",
")",
"{",
"if",
"(",
"change",
"!=",
"null",
")",
"{",
"// save the sitemap",
"CmsRpcAction",
"<",
"CmsSitemapChange",
">",
"saveAction",
"=",
"... | Adds a change to the queue.<p>
@param change the change to commit
@param callback the callback to execute after the change has been applied | [
"Adds",
"a",
"change",
"to",
"the",
"queue",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L2147-L2180 |
ehcache/ehcache3 | impl/src/main/java/org/ehcache/impl/config/executor/PooledExecutionServiceConfiguration.java | PooledExecutionServiceConfiguration.addPool | public void addPool(String alias, int minSize, int maxSize) {
"""
Adds a new pool with the provided minimum and maximum.
@param alias the pool alias
@param minSize the minimum size
@param maxSize the maximum size
@throws NullPointerException if alias is null
@throws IllegalArgumentException if another poo... | java | public void addPool(String alias, int minSize, int maxSize) {
if (alias == null) {
throw new NullPointerException("Pool alias cannot be null");
}
if (poolConfigurations.containsKey(alias)) {
throw new IllegalArgumentException("A pool with the alias '" + alias + "' is already configured");
} ... | [
"public",
"void",
"addPool",
"(",
"String",
"alias",
",",
"int",
"minSize",
",",
"int",
"maxSize",
")",
"{",
"if",
"(",
"alias",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Pool alias cannot be null\"",
")",
";",
"}",
"if",
"(",... | Adds a new pool with the provided minimum and maximum.
@param alias the pool alias
@param minSize the minimum size
@param maxSize the maximum size
@throws NullPointerException if alias is null
@throws IllegalArgumentException if another pool with the same alias was configured already | [
"Adds",
"a",
"new",
"pool",
"with",
"the",
"provided",
"minimum",
"and",
"maximum",
"."
] | train | https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/config/executor/PooledExecutionServiceConfiguration.java#L82-L91 |
ehcache/ehcache3 | transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java | BitronixXAResourceRegistry.registerXAResource | @Override
public void registerXAResource(String uniqueName, XAResource xaResource) {
"""
Register an XAResource of a cache with BTM. The first time a XAResource is registered a new
EhCacheXAResourceProducer is created to hold it.
@param uniqueName the uniqueName of this XAResourceProducer, usually the cache's ... | java | @Override
public void registerXAResource(String uniqueName, XAResource xaResource) {
Ehcache3XAResourceProducer xaResourceProducer = producers.get(uniqueName);
if (xaResourceProducer == null) {
xaResourceProducer = new Ehcache3XAResourceProducer();
xaResourceProducer.setUniqueName(uniqueName);
... | [
"@",
"Override",
"public",
"void",
"registerXAResource",
"(",
"String",
"uniqueName",
",",
"XAResource",
"xaResource",
")",
"{",
"Ehcache3XAResourceProducer",
"xaResourceProducer",
"=",
"producers",
".",
"get",
"(",
"uniqueName",
")",
";",
"if",
"(",
"xaResourceProd... | Register an XAResource of a cache with BTM. The first time a XAResource is registered a new
EhCacheXAResourceProducer is created to hold it.
@param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name
@param xaResource the XAResource to be registered | [
"Register",
"an",
"XAResource",
"of",
"a",
"cache",
"with",
"BTM",
".",
"The",
"first",
"time",
"a",
"XAResource",
"is",
"registered",
"a",
"new",
"EhCacheXAResourceProducer",
"is",
"created",
"to",
"hold",
"it",
"."
] | train | https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java#L40-L59 |
ujmp/universal-java-matrix-package | ujmp-core/src/main/java/org/ujmp/core/util/MathUtil.java | MathUtil.nextInteger | public static final int nextInteger(int min, int max) {
"""
Returns a random value in the desired interval
@param min
minimum value (inclusive)
@param max
maximum value (exclusive)
@return a random value
"""
return min == max ? min : min + getRandom().nextInt(max - min);
} | java | public static final int nextInteger(int min, int max) {
return min == max ? min : min + getRandom().nextInt(max - min);
} | [
"public",
"static",
"final",
"int",
"nextInteger",
"(",
"int",
"min",
",",
"int",
"max",
")",
"{",
"return",
"min",
"==",
"max",
"?",
"min",
":",
"min",
"+",
"getRandom",
"(",
")",
".",
"nextInt",
"(",
"max",
"-",
"min",
")",
";",
"}"
] | Returns a random value in the desired interval
@param min
minimum value (inclusive)
@param max
maximum value (exclusive)
@return a random value | [
"Returns",
"a",
"random",
"value",
"in",
"the",
"desired",
"interval"
] | train | https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/util/MathUtil.java#L303-L305 |
payneteasy/superfly | superfly-web/src/main/java/com/payneteasy/superfly/web/wicket/component/label/DateLabels.java | DateLabels.forDate | public static DateLabel forDate(String id, Date date) {
"""
Creates a label which displays date only (year, month, day).
@param id component id
@param date date to display
@return date label
"""
return DateLabel.forDatePattern(id, new Model<Date>(date), DATE_PATTERN);
} | java | public static DateLabel forDate(String id, Date date) {
return DateLabel.forDatePattern(id, new Model<Date>(date), DATE_PATTERN);
} | [
"public",
"static",
"DateLabel",
"forDate",
"(",
"String",
"id",
",",
"Date",
"date",
")",
"{",
"return",
"DateLabel",
".",
"forDatePattern",
"(",
"id",
",",
"new",
"Model",
"<",
"Date",
">",
"(",
"date",
")",
",",
"DATE_PATTERN",
")",
";",
"}"
] | Creates a label which displays date only (year, month, day).
@param id component id
@param date date to display
@return date label | [
"Creates",
"a",
"label",
"which",
"displays",
"date",
"only",
"(",
"year",
"month",
"day",
")",
"."
] | train | https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-web/src/main/java/com/payneteasy/superfly/web/wicket/component/label/DateLabels.java#L26-L28 |
google/truth | core/src/main/java/com/google/common/truth/Platform.java | Platform.containsMatch | static boolean containsMatch(String actual, String regex) {
"""
Determines if the given subject contains a match for the given regex.
"""
return Pattern.compile(regex).matcher(actual).find();
} | java | static boolean containsMatch(String actual, String regex) {
return Pattern.compile(regex).matcher(actual).find();
} | [
"static",
"boolean",
"containsMatch",
"(",
"String",
"actual",
",",
"String",
"regex",
")",
"{",
"return",
"Pattern",
".",
"compile",
"(",
"regex",
")",
".",
"matcher",
"(",
"actual",
")",
".",
"find",
"(",
")",
";",
"}"
] | Determines if the given subject contains a match for the given regex. | [
"Determines",
"if",
"the",
"given",
"subject",
"contains",
"a",
"match",
"for",
"the",
"given",
"regex",
"."
] | train | https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/Platform.java#L50-L52 |
Azure/azure-sdk-for-java | applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java | ProactiveDetectionConfigurationsInner.updateAsync | public Observable<ApplicationInsightsComponentProactiveDetectionConfigurationInner> updateAsync(String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) {
"""
Update the ProactiveDetection configuration for... | java | public Observable<ApplicationInsightsComponentProactiveDetectionConfigurationInner> updateAsync(String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) {
return updateWithServiceResponseAsync(resourceGr... | [
"public",
"Observable",
"<",
"ApplicationInsightsComponentProactiveDetectionConfigurationInner",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
",",
"String",
"configurationId",
",",
"ApplicationInsightsComponentProactiveDetectionConfigurationI... | Update the ProactiveDetection configuration for this configuration id.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the Application Insights component resource.
@param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights compo... | [
"Update",
"the",
"ProactiveDetection",
"configuration",
"for",
"this",
"configuration",
"id",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java#L292-L299 |
samskivert/samskivert | src/main/java/com/samskivert/util/PropertiesUtil.java | PropertiesUtil.loadAndGet | public static String loadAndGet (String loaderPath, String key) {
"""
Like {@link #loadAndGet(File,String)} but obtains the properties data via the classloader.
@return the value of the key in question or null if no such key exists or an error occurred
loading the properties file.
"""
try {
... | java | public static String loadAndGet (String loaderPath, String key)
{
try {
Properties props = ConfigUtil.loadProperties(loaderPath);
return props.getProperty(key);
} catch (IOException ioe) {
return null;
}
} | [
"public",
"static",
"String",
"loadAndGet",
"(",
"String",
"loaderPath",
",",
"String",
"key",
")",
"{",
"try",
"{",
"Properties",
"props",
"=",
"ConfigUtil",
".",
"loadProperties",
"(",
"loaderPath",
")",
";",
"return",
"props",
".",
"getProperty",
"(",
"ke... | Like {@link #loadAndGet(File,String)} but obtains the properties data via the classloader.
@return the value of the key in question or null if no such key exists or an error occurred
loading the properties file. | [
"Like",
"{",
"@link",
"#loadAndGet",
"(",
"File",
"String",
")",
"}",
"but",
"obtains",
"the",
"properties",
"data",
"via",
"the",
"classloader",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PropertiesUtil.java#L197-L205 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java | NetworkInterfaceIPConfigurationsInner.getAsync | public Observable<NetworkInterfaceIPConfigurationInner> getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) {
"""
Gets the specified network interface ip configuration.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the n... | java | public Observable<NetworkInterfaceIPConfigurationInner> getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) {
return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, ipConfigurationName).map(new Func1<ServiceResponse<NetworkInterfaceIPConfigurationInne... | [
"public",
"Observable",
"<",
"NetworkInterfaceIPConfigurationInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkInterfaceName",
",",
"String",
"ipConfigurationName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
... | Gets the specified network interface ip configuration.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@param ipConfigurationName The name of the ip configuration name.
@throws IllegalArgumentException thrown if parameters fail the validation
@ret... | [
"Gets",
"the",
"specified",
"network",
"interface",
"ip",
"configuration",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java#L233-L240 |
TheHortonMachine/hortonmachine | hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/NetworkCalibration.java | NetworkCalibration.calculateDelays | private void calculateDelays( int k, double[] cDelays, double[][] net ) {
"""
Calcola il ritardo della tubazione k.
@param k indice della tubazione.
@param cDelays matrice dei ritardi.
@param net matrice che contiene la sottorete.
"""
double t;
int ind, r = 1;
for( int j = 0; j <... | java | private void calculateDelays( int k, double[] cDelays, double[][] net )
{
double t;
int ind, r = 1;
for( int j = 0; j < net.length; ++j ) {
t = 0;
r = 1;
ind = (int) net[j][0];
/*
* Area k is not included in delays
*... | [
"private",
"void",
"calculateDelays",
"(",
"int",
"k",
",",
"double",
"[",
"]",
"cDelays",
",",
"double",
"[",
"]",
"[",
"]",
"net",
")",
"{",
"double",
"t",
";",
"int",
"ind",
",",
"r",
"=",
"1",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"... | Calcola il ritardo della tubazione k.
@param k indice della tubazione.
@param cDelays matrice dei ritardi.
@param net matrice che contiene la sottorete. | [
"Calcola",
"il",
"ritardo",
"della",
"tubazione",
"k",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/NetworkCalibration.java#L465-L491 |
tvesalainen/util | util/src/main/java/org/vesalainen/util/OrderedList.java | OrderedList.headIterator | public Iterator<T> headIterator(T key, boolean inclusive) {
"""
Returns iterator from start to key
@param key
@param inclusive
@return
"""
int point = point(key, !inclusive);
return subList(0, point).iterator();
} | java | public Iterator<T> headIterator(T key, boolean inclusive)
{
int point = point(key, !inclusive);
return subList(0, point).iterator();
} | [
"public",
"Iterator",
"<",
"T",
">",
"headIterator",
"(",
"T",
"key",
",",
"boolean",
"inclusive",
")",
"{",
"int",
"point",
"=",
"point",
"(",
"key",
",",
"!",
"inclusive",
")",
";",
"return",
"subList",
"(",
"0",
",",
"point",
")",
".",
"iterator",... | Returns iterator from start to key
@param key
@param inclusive
@return | [
"Returns",
"iterator",
"from",
"start",
"to",
"key"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/OrderedList.java#L125-L129 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java | SparseCpuLevel1.saxpyi | @Override
protected void saxpyi(long N, double alpha, INDArray X, DataBuffer pointers, INDArray Y) {
"""
Adds a scalar multiple of float compressed sparse vector to a full-storage vector.
@param N The number of elements in vector X
@param alpha
@param X a sparse vector
@param pointers A DataBuffer that s... | java | @Override
protected void saxpyi(long N, double alpha, INDArray X, DataBuffer pointers, INDArray Y) {
cblas_saxpyi((int) N, (float) alpha, (FloatPointer) X.data().addressPointer(), (IntPointer) pointers.addressPointer(),
(FloatPointer) Y.data().addressPointer());
} | [
"@",
"Override",
"protected",
"void",
"saxpyi",
"(",
"long",
"N",
",",
"double",
"alpha",
",",
"INDArray",
"X",
",",
"DataBuffer",
"pointers",
",",
"INDArray",
"Y",
")",
"{",
"cblas_saxpyi",
"(",
"(",
"int",
")",
"N",
",",
"(",
"float",
")",
"alpha",
... | Adds a scalar multiple of float compressed sparse vector to a full-storage vector.
@param N The number of elements in vector X
@param alpha
@param X a sparse vector
@param pointers A DataBuffer that specifies the indices for the elements of x.
@param Y a dense vector | [
"Adds",
"a",
"scalar",
"multiple",
"of",
"float",
"compressed",
"sparse",
"vector",
"to",
"a",
"full",
"-",
"storage",
"vector",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java#L211-L215 |
aws/aws-sdk-java | aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java | PutIntegrationResponseResult.withResponseTemplates | public PutIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) {
"""
<p>
Specifies the templates used to transform the integration response body. Response templates are represented as a
key/value map, with a content-type as the key and a template as the value.
</p>
... | java | public PutIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) {
setResponseTemplates(responseTemplates);
return this;
} | [
"public",
"PutIntegrationResponseResult",
"withResponseTemplates",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"responseTemplates",
")",
"{",
"setResponseTemplates",
"(",
"responseTemplates",
")",
";",
"return",
"this",
";",
"}"
] | <p>
Specifies the templates used to transform the integration response body. Response templates are represented as a
key/value map, with a content-type as the key and a template as the value.
</p>
@param responseTemplates
Specifies the templates used to transform the integration response body. Response templates are
r... | [
"<p",
">",
"Specifies",
"the",
"templates",
"used",
"to",
"transform",
"the",
"integration",
"response",
"body",
".",
"Response",
"templates",
"are",
"represented",
"as",
"a",
"key",
"/",
"value",
"map",
"with",
"a",
"content",
"-",
"type",
"as",
"the",
"k... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java#L351-L354 |
querydsl/querydsl | querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java | PathBuilder.get | @SuppressWarnings("unchecked")
public <A extends Enum<A>> EnumPath<A> get(EnumPath<A> path) {
"""
Create a new Enum path
@param <A>
@param path existing path
@return property path
"""
EnumPath<A> newPath = getEnum(toString(path), (Class<A>) path.getType());
return addMetadataOf(newPath... | java | @SuppressWarnings("unchecked")
public <A extends Enum<A>> EnumPath<A> get(EnumPath<A> path) {
EnumPath<A> newPath = getEnum(toString(path), (Class<A>) path.getType());
return addMetadataOf(newPath, path);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"A",
"extends",
"Enum",
"<",
"A",
">",
">",
"EnumPath",
"<",
"A",
">",
"get",
"(",
"EnumPath",
"<",
"A",
">",
"path",
")",
"{",
"EnumPath",
"<",
"A",
">",
"newPath",
"=",
"getEnum",
... | Create a new Enum path
@param <A>
@param path existing path
@return property path | [
"Create",
"a",
"new",
"Enum",
"path"
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L327-L331 |
lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.pixelToPlane | public boolean pixelToPlane( double pixelX , double pixelY , Point2D_F64 plane ) {
"""
Given a pixel, find the point on the plane. Be sure computeInverse was set to true in
{@link #setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)}
@param pixelX (input) Pixel in the image, x-axis
@param pixelY (inpu... | java | public boolean pixelToPlane( double pixelX , double pixelY , Point2D_F64 plane ) {
// computer normalized image coordinates
pixelToNorm.compute(pixelX,pixelY,norm);
// Ray pointing from camera center through pixel to ground in ground reference frame
pointing.set(norm.x,norm.y,1);
GeometryMath_F64.mult(camera... | [
"public",
"boolean",
"pixelToPlane",
"(",
"double",
"pixelX",
",",
"double",
"pixelY",
",",
"Point2D_F64",
"plane",
")",
"{",
"// computer normalized image coordinates",
"pixelToNorm",
".",
"compute",
"(",
"pixelX",
",",
"pixelY",
",",
"norm",
")",
";",
"// Ray po... | Given a pixel, find the point on the plane. Be sure computeInverse was set to true in
{@link #setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)}
@param pixelX (input) Pixel in the image, x-axis
@param pixelY (input) Pixel in the image, y-axis
@param plane (output) Point on the plane.
@return true if a point ... | [
"Given",
"a",
"pixel",
"find",
"the",
"point",
"on",
"the",
"plane",
".",
"Be",
"sure",
"computeInverse",
"was",
"set",
"to",
"true",
"in",
"{",
"@link",
"#setPlaneToCamera",
"(",
"georegression",
".",
"struct",
".",
"se",
".",
"Se3_F64",
"boolean",
")",
... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L155-L177 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.mergeCertificate | public CertificateBundle mergeCertificate(String vaultBaseUrl, String certificateName, List<byte[]> x509Certificates, CertificateAttributes certificateAttributes, Map<String, String> tags) {
"""
Merges a certificate or a certificate chain with a key pair existing on the server.
The MergeCertificate operation perf... | java | public CertificateBundle mergeCertificate(String vaultBaseUrl, String certificateName, List<byte[]> x509Certificates, CertificateAttributes certificateAttributes, Map<String, String> tags) {
return mergeCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, x509Certificates, certificateAttributes, t... | [
"public",
"CertificateBundle",
"mergeCertificate",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"List",
"<",
"byte",
"[",
"]",
">",
"x509Certificates",
",",
"CertificateAttributes",
"certificateAttributes",
",",
"Map",
"<",
"String",
",",
"S... | Merges a certificate or a certificate chain with a key pair existing on the server.
The MergeCertificate operation performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission.
@param vaultBaseUrl The vault nam... | [
"Merges",
"a",
"certificate",
"or",
"a",
"certificate",
"chain",
"with",
"a",
"key",
"pair",
"existing",
"on",
"the",
"server",
".",
"The",
"MergeCertificate",
"operation",
"performs",
"the",
"merging",
"of",
"a",
"certificate",
"or",
"certificate",
"chain",
"... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8008-L8010 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java | JawrBinaryResourceRequestHandler.getRealFilePath | private String getRealFilePath(String fileName, BundleHashcodeType bundleHashcodeType) {
"""
Removes the cache buster
@param fileName
the file name
@return the file name without the cache buster.
"""
String realFilePath = fileName;
if (bundleHashcodeType.equals(BundleHashcodeType.INVALID_HASHCODE)) {... | java | private String getRealFilePath(String fileName, BundleHashcodeType bundleHashcodeType) {
String realFilePath = fileName;
if (bundleHashcodeType.equals(BundleHashcodeType.INVALID_HASHCODE)) {
int idx = realFilePath.indexOf(JawrConstant.URL_SEPARATOR, 1);
if (idx != -1) {
realFilePath = realFilePath.substr... | [
"private",
"String",
"getRealFilePath",
"(",
"String",
"fileName",
",",
"BundleHashcodeType",
"bundleHashcodeType",
")",
"{",
"String",
"realFilePath",
"=",
"fileName",
";",
"if",
"(",
"bundleHashcodeType",
".",
"equals",
"(",
"BundleHashcodeType",
".",
"INVALID_HASHC... | Removes the cache buster
@param fileName
the file name
@return the file name without the cache buster. | [
"Removes",
"the",
"cache",
"buster"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L612-L626 |
derari/cthul | xml/src/main/java/org/cthul/resolve/ResolvingException.java | ResolvingException.throwIf | public <T1 extends Throwable, T2 extends Throwable>
RuntimeException throwIf(Class<T1> t1, Class<T2> t2)
throws T1, T2 {
"""
Throws the {@linkplain #getResolvingCause() cause} if it is one of the
specified types, otherwise returns a
{@linkplain #asRuntimeException() runtime ex... | java | public <T1 extends Throwable, T2 extends Throwable>
RuntimeException throwIf(Class<T1> t1, Class<T2> t2)
throws T1, T2 {
return throwIf(t1, t2, NULL_EX, NULL_EX);
} | [
"public",
"<",
"T1",
"extends",
"Throwable",
",",
"T2",
"extends",
"Throwable",
">",
"RuntimeException",
"throwIf",
"(",
"Class",
"<",
"T1",
">",
"t1",
",",
"Class",
"<",
"T2",
">",
"t2",
")",
"throws",
"T1",
",",
"T2",
"{",
"return",
"throwIf",
"(",
... | Throws the {@linkplain #getResolvingCause() cause} if it is one of the
specified types, otherwise returns a
{@linkplain #asRuntimeException() runtime exception}.
@param <T1>
@param <T2>
@param t1
@param t2
@return runtime exception
@throws T1
@throws T2 | [
"Throws",
"the",
"{"
] | train | https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/ResolvingException.java#L245-L249 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/XPath.java | XPath.fixupVariables | public void fixupVariables(java.util.Vector vars, int globalsSize) {
"""
This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
@param vars List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corre... | java | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
m_mainExp.fixupVariables(vars, globalsSize);
} | [
"public",
"void",
"fixupVariables",
"(",
"java",
".",
"util",
".",
"Vector",
"vars",
",",
"int",
"globalsSize",
")",
"{",
"m_mainExp",
".",
"fixupVariables",
"(",
"vars",
",",
"globalsSize",
")",
";",
"}"
] | This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
@param vars List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector f... | [
"This",
"function",
"is",
"used",
"to",
"fixup",
"variables",
"from",
"QNames",
"to",
"stack",
"frame",
"indexes",
"at",
"stylesheet",
"build",
"time",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/XPath.java#L86-L89 |
apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java | ScriptingUtils.executeGroovyScript | @SneakyThrows
public static <T> T executeGroovyScript(final GroovyObject groovyObject,
final String methodName,
final Object[] args,
final Class<T> clazz,
... | java | @SneakyThrows
public static <T> T executeGroovyScript(final GroovyObject groovyObject,
final String methodName,
final Object[] args,
final Class<T> clazz,
... | [
"@",
"SneakyThrows",
"public",
"static",
"<",
"T",
">",
"T",
"executeGroovyScript",
"(",
"final",
"GroovyObject",
"groovyObject",
",",
"final",
"String",
"methodName",
",",
"final",
"Object",
"[",
"]",
"args",
",",
"final",
"Class",
"<",
"T",
">",
"clazz",
... | Execute groovy script t.
@param <T> the type parameter
@param groovyObject the groovy object
@param methodName the method name
@param args the args
@param clazz the clazz
@param failOnError the fail on error
@return the t | [
"Execute",
"groovy",
"script",
"t",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java#L240-L267 |
threerings/narya | core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java | ChatDirector.addAuxiliarySource | public void addAuxiliarySource (DObject source, String localtype) {
"""
Adds an additional object via which chat messages may arrive. The chat director assumes the
caller will be managing the subscription to this object and will remain subscribed to it for
as long as it remains in effect as an auxiliary chat sou... | java | public void addAuxiliarySource (DObject source, String localtype)
{
source.addListener(this);
_auxes.put(source.getOid(), localtype);
} | [
"public",
"void",
"addAuxiliarySource",
"(",
"DObject",
"source",
",",
"String",
"localtype",
")",
"{",
"source",
".",
"addListener",
"(",
"this",
")",
";",
"_auxes",
".",
"put",
"(",
"source",
".",
"getOid",
"(",
")",
",",
"localtype",
")",
";",
"}"
] | Adds an additional object via which chat messages may arrive. The chat director assumes the
caller will be managing the subscription to this object and will remain subscribed to it for
as long as it remains in effect as an auxiliary chat source.
@param localtype a type to be associated with all chat messages that arri... | [
"Adds",
"an",
"additional",
"object",
"via",
"which",
"chat",
"messages",
"may",
"arrive",
".",
"The",
"chat",
"director",
"assumes",
"the",
"caller",
"will",
"be",
"managing",
"the",
"subscription",
"to",
"this",
"object",
"and",
"will",
"remain",
"subscribed... | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L585-L589 |
Alluxio/alluxio | core/common/src/main/java/alluxio/grpc/GrpcManagedChannelPool.java | GrpcManagedChannelPool.releaseManagedChannel | public void releaseManagedChannel(ChannelKey channelKey, long shutdownTimeoutMs) {
"""
Decreases the ref-count of the {@link ManagedChannel} for the given address.
It shuts down and releases the {@link ManagedChannel} if reference count reaches zero.
@param channelKey host address
@param shutdownTimeoutMs s... | java | public void releaseManagedChannel(ChannelKey channelKey, long shutdownTimeoutMs) {
boolean shutdownManagedChannel;
try (LockResource lockShared = new LockResource(mLock.readLock())) {
Verify.verify(mChannels.containsKey(channelKey));
ManagedChannelReference channelRef = mChannels.get(channelKey);
... | [
"public",
"void",
"releaseManagedChannel",
"(",
"ChannelKey",
"channelKey",
",",
"long",
"shutdownTimeoutMs",
")",
"{",
"boolean",
"shutdownManagedChannel",
";",
"try",
"(",
"LockResource",
"lockShared",
"=",
"new",
"LockResource",
"(",
"mLock",
".",
"readLock",
"("... | Decreases the ref-count of the {@link ManagedChannel} for the given address.
It shuts down and releases the {@link ManagedChannel} if reference count reaches zero.
@param channelKey host address
@param shutdownTimeoutMs shutdown timeout in milliseconds | [
"Decreases",
"the",
"ref",
"-",
"count",
"of",
"the",
"{",
"@link",
"ManagedChannel",
"}",
"for",
"the",
"given",
"address",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/grpc/GrpcManagedChannelPool.java#L192-L212 |
hawkular/hawkular-inventory | hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java | Related.asTargetWith | public static Related asTargetWith(CanonicalPath entityPath, String relationship) {
"""
Specifies a filter for entities that are targets of a relationship with the specified entity.
@param entityPath the entity that is the source of the relationship
@param relationship the name of the relationship
@return a n... | java | public static Related asTargetWith(CanonicalPath entityPath, String relationship) {
return new Related(entityPath, relationship, EntityRole.TARGET);
} | [
"public",
"static",
"Related",
"asTargetWith",
"(",
"CanonicalPath",
"entityPath",
",",
"String",
"relationship",
")",
"{",
"return",
"new",
"Related",
"(",
"entityPath",
",",
"relationship",
",",
"EntityRole",
".",
"TARGET",
")",
";",
"}"
] | Specifies a filter for entities that are targets of a relationship with the specified entity.
@param entityPath the entity that is the source of the relationship
@param relationship the name of the relationship
@return a new "related" filter instance | [
"Specifies",
"a",
"filter",
"for",
"entities",
"that",
"are",
"targets",
"of",
"a",
"relationship",
"with",
"the",
"specified",
"entity",
"."
] | train | https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java#L100-L102 |
antopen/alipay-sdk-java | src/main/java/com/alipay/api/internal/util/XmlUtils.java | XmlUtils.appendElement | public static void appendElement(Element parent, Element child) {
"""
Appends another element as a child element.
@param parent the parent element
@param child the child element to append
"""
Node tmp = parent.getOwnerDocument().importNode(child, true);
parent.appendChild(tmp);
} | java | public static void appendElement(Element parent, Element child) {
Node tmp = parent.getOwnerDocument().importNode(child, true);
parent.appendChild(tmp);
} | [
"public",
"static",
"void",
"appendElement",
"(",
"Element",
"parent",
",",
"Element",
"child",
")",
"{",
"Node",
"tmp",
"=",
"parent",
".",
"getOwnerDocument",
"(",
")",
".",
"importNode",
"(",
"child",
",",
"true",
")",
";",
"parent",
".",
"appendChild",... | Appends another element as a child element.
@param parent the parent element
@param child the child element to append | [
"Appends",
"another",
"element",
"as",
"a",
"child",
"element",
"."
] | train | https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L376-L379 |
amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java | ActiveMQQueueJmxStats.addCounts | public ActiveMQQueueJmxStats addCounts(ActiveMQQueueJmxStats other, String resultBrokerName) {
"""
Return a new queue stats structure with the total of the stats from this structure and the one given. Returning
a new structure keeps all three structures unchanged, in the manner of immutability, to make it easier... | java | public ActiveMQQueueJmxStats addCounts(ActiveMQQueueJmxStats other, String resultBrokerName) {
ActiveMQQueueJmxStats result = new ActiveMQQueueJmxStats(resultBrokerName, this.queueName);
result.setCursorPercentUsage(this.getCursorPercentUsage());
result.setDequeueCount(this.getDequeueCount() + o... | [
"public",
"ActiveMQQueueJmxStats",
"addCounts",
"(",
"ActiveMQQueueJmxStats",
"other",
",",
"String",
"resultBrokerName",
")",
"{",
"ActiveMQQueueJmxStats",
"result",
"=",
"new",
"ActiveMQQueueJmxStats",
"(",
"resultBrokerName",
",",
"this",
".",
"queueName",
")",
";",
... | Return a new queue stats structure with the total of the stats from this structure and the one given. Returning
a new structure keeps all three structures unchanged, in the manner of immutability, to make it easier to have
safe usage under concurrency. Note that non-count values are copied out from this instance; tho... | [
"Return",
"a",
"new",
"queue",
"stats",
"structure",
"with",
"the",
"total",
"of",
"the",
"stats",
"from",
"this",
"structure",
"and",
"the",
"one",
"given",
".",
"Returning",
"a",
"new",
"structure",
"keeps",
"all",
"three",
"structures",
"unchanged",
"in",... | train | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java#L146-L158 |
litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/ProxyIdpAuthnContextServiceImpl.java | ProxyIdpAuthnContextServiceImpl.isSupported | protected boolean isSupported(ProfileRequestContext<?, ?> context, String uri, List<String> assuranceURIs) {
"""
A Proxy-IdP may communicate with an IdP that uses different URI declarations for the same type of authentication
methods, e.g., the Swedish eID framework and eIDAS has different URI:s for the same type... | java | protected boolean isSupported(ProfileRequestContext<?, ?> context, String uri, List<String> assuranceURIs) {
return assuranceURIs.contains(uri);
} | [
"protected",
"boolean",
"isSupported",
"(",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"context",
",",
"String",
"uri",
",",
"List",
"<",
"String",
">",
"assuranceURIs",
")",
"{",
"return",
"assuranceURIs",
".",
"contains",
"(",
"uri",
")",
";",
"}"... | A Proxy-IdP may communicate with an IdP that uses different URI declarations for the same type of authentication
methods, e.g., the Swedish eID framework and eIDAS has different URI:s for the same type of authentication. This
method will enable tranformation of URI:s and provide the possibility to match URI:s from diff... | [
"A",
"Proxy",
"-",
"IdP",
"may",
"communicate",
"with",
"an",
"IdP",
"that",
"uses",
"different",
"URI",
"declarations",
"for",
"the",
"same",
"type",
"of",
"authentication",
"methods",
"e",
".",
"g",
".",
"the",
"Swedish",
"eID",
"framework",
"and",
"eIDA... | train | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/ProxyIdpAuthnContextServiceImpl.java#L130-L132 |
Alluxio/alluxio | core/base/src/main/java/alluxio/AlluxioURI.java | AlluxioURI.hasWindowsDrive | public static boolean hasWindowsDrive(String path, boolean slashed) {
"""
Checks if the path is a windows path. This should be platform independent.
@param path the path to check
@param slashed if the path starts with a slash
@return true if it is a windows path, false otherwise
"""
int start = slashe... | java | public static boolean hasWindowsDrive(String path, boolean slashed) {
int start = slashed ? 1 : 0;
return path.length() >= start + 2
&& (!slashed || path.charAt(0) == '/')
&& path.charAt(start + 1) == ':'
&& ((path.charAt(start) >= 'A' && path.charAt(start) <= 'Z') || (path.charAt(start)... | [
"public",
"static",
"boolean",
"hasWindowsDrive",
"(",
"String",
"path",
",",
"boolean",
"slashed",
")",
"{",
"int",
"start",
"=",
"slashed",
"?",
"1",
":",
"0",
";",
"return",
"path",
".",
"length",
"(",
")",
">=",
"start",
"+",
"2",
"&&",
"(",
"!",... | Checks if the path is a windows path. This should be platform independent.
@param path the path to check
@param slashed if the path starts with a slash
@return true if it is a windows path, false otherwise | [
"Checks",
"if",
"the",
"path",
"is",
"a",
"windows",
"path",
".",
"This",
"should",
"be",
"platform",
"independent",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/base/src/main/java/alluxio/AlluxioURI.java#L335-L342 |
rimerosolutions/ant-git-tasks | src/main/java/com/rimerosolutions/ant/git/GitSettings.java | GitSettings.setIdentity | public void setIdentity(String name, String email) {
"""
Sets the name and email for the Git commands user
@param name The Git user's name
@param email The Git user's email
"""
if (GitTaskUtils.isNullOrBlankString(name) || GitTaskUtils.isNullOrBlankString(email)) {
t... | java | public void setIdentity(String name, String email) {
if (GitTaskUtils.isNullOrBlankString(name) || GitTaskUtils.isNullOrBlankString(email)) {
throw new IllegalArgumentException("Both the username and password must be provided.");
}
identity = new ... | [
"public",
"void",
"setIdentity",
"(",
"String",
"name",
",",
"String",
"email",
")",
"{",
"if",
"(",
"GitTaskUtils",
".",
"isNullOrBlankString",
"(",
"name",
")",
"||",
"GitTaskUtils",
".",
"isNullOrBlankString",
"(",
"email",
")",
")",
"{",
"throw",
"new",
... | Sets the name and email for the Git commands user
@param name The Git user's name
@param email The Git user's email | [
"Sets",
"the",
"name",
"and",
"email",
"for",
"the",
"Git",
"commands",
"user"
] | train | https://github.com/rimerosolutions/ant-git-tasks/blob/bfb32fe68afe6b9dcfd0a5194497d748ef3e8a6f/src/main/java/com/rimerosolutions/ant/git/GitSettings.java#L52-L58 |
trellis-ldp/trellis | components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraints.java | LdpConstraints.violatesCardinality | private static boolean violatesCardinality(final Graph graph, final IRI model) {
"""
Verify that the cardinality of the `propertiesWithUriRange` properties. Keep any whose cardinality is > 1
"""
final boolean isIndirect = LDP.IndirectContainer.equals(model);
return isIndirect && (!graph.contain... | java | private static boolean violatesCardinality(final Graph graph, final IRI model) {
final boolean isIndirect = LDP.IndirectContainer.equals(model);
return isIndirect && (!graph.contains(null, LDP.insertedContentRelation, null) || !hasMembershipProps(graph))
|| !isIndirect && LDP.Dir... | [
"private",
"static",
"boolean",
"violatesCardinality",
"(",
"final",
"Graph",
"graph",
",",
"final",
"IRI",
"model",
")",
"{",
"final",
"boolean",
"isIndirect",
"=",
"LDP",
".",
"IndirectContainer",
".",
"equals",
"(",
"model",
")",
";",
"return",
"isIndirect"... | Verify that the cardinality of the `propertiesWithUriRange` properties. Keep any whose cardinality is > 1 | [
"Verify",
"that",
"the",
"cardinality",
"of",
"the",
"propertiesWithUriRange",
"properties",
".",
"Keep",
"any",
"whose",
"cardinality",
"is",
">",
"1"
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraints.java#L139-L144 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_ipCanBeMovedTo_GET | public void serviceName_ipCanBeMovedTo_GET(String serviceName, String ip) throws IOException {
"""
Check if given IP can be moved to this server
REST: GET /dedicated/server/{serviceName}/ipCanBeMovedTo
@param ip [required] The ip to move to this server
@param serviceName [required] The internal name of your d... | java | public void serviceName_ipCanBeMovedTo_GET(String serviceName, String ip) throws IOException {
String qPath = "/dedicated/server/{serviceName}/ipCanBeMovedTo";
StringBuilder sb = path(qPath, serviceName);
query(sb, "ip", ip);
exec(qPath, "GET", sb.toString(), null);
} | [
"public",
"void",
"serviceName_ipCanBeMovedTo_GET",
"(",
"String",
"serviceName",
",",
"String",
"ip",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/ipCanBeMovedTo\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",... | Check if given IP can be moved to this server
REST: GET /dedicated/server/{serviceName}/ipCanBeMovedTo
@param ip [required] The ip to move to this server
@param serviceName [required] The internal name of your dedicated server | [
"Check",
"if",
"given",
"IP",
"can",
"be",
"moved",
"to",
"this",
"server"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1920-L1925 |
GenesysPureEngage/provisioning-client-java | src/main/java/com/genesys/internal/provisioning/api/OptionsApi.java | OptionsApi.optionsPostAsync | public com.squareup.okhttp.Call optionsPostAsync(OptionsPost body, final ApiCallback<OptionsPostResponseStatusSuccess> callback) throws ApiException {
"""
Replace old options with new. (asynchronously)
The POST operation will replace CloudCluster/Options with new values
@param body Body Data (required)
@param c... | java | public com.squareup.okhttp.Call optionsPostAsync(OptionsPost body, final ApiCallback<OptionsPostResponseStatusSuccess> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (... | [
"public",
"com",
".",
"squareup",
".",
"okhttp",
".",
"Call",
"optionsPostAsync",
"(",
"OptionsPost",
"body",
",",
"final",
"ApiCallback",
"<",
"OptionsPostResponseStatusSuccess",
">",
"callback",
")",
"throws",
"ApiException",
"{",
"ProgressResponseBody",
".",
"Pro... | Replace old options with new. (asynchronously)
The POST operation will replace CloudCluster/Options with new values
@param body Body Data (required)
@param callback The callback to be executed when the API call finishes
@return The request call
@throws ApiException If fail to process the API call, e.g. serializing the ... | [
"Replace",
"old",
"options",
"with",
"new",
".",
"(",
"asynchronously",
")",
"The",
"POST",
"operation",
"will",
"replace",
"CloudCluster",
"/",
"Options",
"with",
"new",
"values"
] | train | https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/OptionsApi.java#L285-L310 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.