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
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(String message, String expectedStr, JSONObject actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONObject provided matches the expected string. If it isn't it throws an {@link AssertionError}. @param message Error message to be displayed...
java
public static void assertEquals(String message, String expectedStr, JSONObject actual, JSONCompareMode compareMode) throws JSONException { Object expected = JSONParser.parseJSON(expectedStr); if (expected instanceof JSONObject) { assertEquals(message, (JSONObject)expected, actual, co...
[ "public", "static", "void", "assertEquals", "(", "String", "message", ",", "String", "expectedStr", ",", "JSONObject", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "Object", "expected", "=", "JSONParser", ".", "parseJSON", ...
Asserts that the JSONObject provided matches the expected string. If it isn't it throws an {@link AssertionError}. @param message Error message to be displayed in case of assertion failure @param expectedStr Expected JSON string @param actual JSONObject to compare @param compareMode Specifies which comparison mode to...
[ "Asserts", "that", "the", "JSONObject", "provided", "matches", "the", "expected", "string", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L141-L150
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setSQLXML
@Override public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { """ Method setSQLXML. @param parameterIndex @param xmlObject @throws SQLException @see java.sql.PreparedStatement#setSQLXML(int, SQLXML) """ internalStmt.setSQLXML(parameterIndex, xmlObject); }
java
@Override public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { internalStmt.setSQLXML(parameterIndex, xmlObject); }
[ "@", "Override", "public", "void", "setSQLXML", "(", "int", "parameterIndex", ",", "SQLXML", "xmlObject", ")", "throws", "SQLException", "{", "internalStmt", ".", "setSQLXML", "(", "parameterIndex", ",", "xmlObject", ")", ";", "}" ]
Method setSQLXML. @param parameterIndex @param xmlObject @throws SQLException @see java.sql.PreparedStatement#setSQLXML(int, SQLXML)
[ "Method", "setSQLXML", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L965-L968
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java
CloudSnippets.runQueryPermanentTable
public void runQueryPermanentTable(String destinationDataset, String destinationTable) throws InterruptedException { """ Example of running a query and saving the results to a table. """ // [START bigquery_query_destination_table] // BigQuery bigquery = BigQueryOptions.getDefaultInstance().getSer...
java
public void runQueryPermanentTable(String destinationDataset, String destinationTable) throws InterruptedException { // [START bigquery_query_destination_table] // BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService(); // String destinationDataset = 'my_destination_dataset'; // Str...
[ "public", "void", "runQueryPermanentTable", "(", "String", "destinationDataset", ",", "String", "destinationTable", ")", "throws", "InterruptedException", "{", "// [START bigquery_query_destination_table]", "// BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();", "/...
Example of running a query and saving the results to a table.
[ "Example", "of", "running", "a", "query", "and", "saving", "the", "results", "to", "a", "table", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java#L69-L91
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.insertData
@Given("^I insert in keyspace '(.+?)' and table '(.+?)' with:$") public void insertData(String keyspace, String table, DataTable datatable) { """ Insert Data @param table Cassandra table @param datatable datatable used for parsing elements @param keyspace Cassandra keyspace """ try { ...
java
@Given("^I insert in keyspace '(.+?)' and table '(.+?)' with:$") public void insertData(String keyspace, String table, DataTable datatable) { try { commonspec.getCassandraClient().useKeyspace(keyspace); int attrLength = datatable.getPickleRows().get(0).getCells().size(); ...
[ "@", "Given", "(", "\"^I insert in keyspace '(.+?)' and table '(.+?)' with:$\"", ")", "public", "void", "insertData", "(", "String", "keyspace", ",", "String", "table", ",", "DataTable", "datatable", ")", "{", "try", "{", "commonspec", ".", "getCassandraClient", "(", ...
Insert Data @param table Cassandra table @param datatable datatable used for parsing elements @param keyspace Cassandra keyspace
[ "Insert", "Data" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L193-L212
google/closure-compiler
src/com/google/javascript/jscomp/FunctionArgumentInjector.java
FunctionArgumentInjector.inject
static Node inject( AbstractCompiler compiler, Node node, Node parent, Map<String, Node> replacements) { """ With the map provided, replace the names with expression trees. @param node The root node of the tree within which to perform the substitutions. @param parent The parent root node. @param replace...
java
static Node inject( AbstractCompiler compiler, Node node, Node parent, Map<String, Node> replacements) { return inject(compiler, node, parent, replacements, /* replaceThis */ true); }
[ "static", "Node", "inject", "(", "AbstractCompiler", "compiler", ",", "Node", "node", ",", "Node", "parent", ",", "Map", "<", "String", ",", "Node", ">", "replacements", ")", "{", "return", "inject", "(", "compiler", ",", "node", ",", "parent", ",", "rep...
With the map provided, replace the names with expression trees. @param node The root node of the tree within which to perform the substitutions. @param parent The parent root node. @param replacements The map of names to template node trees with which to replace the name Nodes. @return The root node or its replacement...
[ "With", "the", "map", "provided", "replace", "the", "names", "with", "expression", "trees", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FunctionArgumentInjector.java#L65-L68
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
BinaryRowProtocol.getInternalBigInteger
public BigInteger getInternalBigInteger(ColumnInformation columnInfo) throws SQLException { """ Get BigInteger from raw binary format. @param columnInfo column information @return BigInteger value @throws SQLException if column type doesn't permit conversion or value is not in BigInteger range """ if...
java
public BigInteger getInternalBigInteger(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return null; } switch (columnInfo.getColumnType()) { case BIT: return BigInteger.valueOf((long) buf[pos]); case TINYINT: return BigInteger.valueOf((long) ...
[ "public", "BigInteger", "getInternalBigInteger", "(", "ColumnInformation", "columnInfo", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "null", ";", "}", "switch", "(", "columnInfo", ".", "getColumnType", "(", ")...
Get BigInteger from raw binary format. @param columnInfo column information @return BigInteger value @throws SQLException if column type doesn't permit conversion or value is not in BigInteger range
[ "Get", "BigInteger", "from", "raw", "binary", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java#L1305-L1356
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.checkExistence
public boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { """ Checks whether a resource exists. @param resourceGroupName The name of the resource group containing the resource to check. The ...
java
public boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { return checkExistenceWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resour...
[ "public", "boolean", "checkExistence", "(", "String", "resourceGroupName", ",", "String", "resourceProviderNamespace", ",", "String", "parentResourcePath", ",", "String", "resourceType", ",", "String", "resourceName", ",", "String", "apiVersion", ")", "{", "return", "...
Checks whether a resource exists. @param resourceGroupName The name of the resource group containing the resource to check. The name is case insensitive. @param resourceProviderNamespace The resource provider of the resource to check. @param parentResourcePath The parent resource identity. @param resourceType The reso...
[ "Checks", "whether", "a", "resource", "exists", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L976-L978
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ObjectField.java
ObjectField.getSQLFromField
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { """ Move the physical binary data to this SQL parameter row. This method uses the setBinaryStrem statement method. @param statement The SQL prepare statement. @param iType the type of SQL statement. @par...
java
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) statement.setNull(iParamColumn, Types.BLOB); else { Object data = this.getData(); ByteArrayOutputStream ostream = new ByteArrayOu...
[ "public", "void", "getSQLFromField", "(", "PreparedStatement", "statement", ",", "int", "iType", ",", "int", "iParamColumn", ")", "throws", "SQLException", "{", "if", "(", "this", ".", "isNull", "(", ")", ")", "statement", ".", "setNull", "(", "iParamColumn", ...
Move the physical binary data to this SQL parameter row. This method uses the setBinaryStrem statement method. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to set the data. @exception SQLException From SQL calls.
[ "Move", "the", "physical", "binary", "data", "to", "this", "SQL", "parameter", "row", ".", "This", "method", "uses", "the", "setBinaryStrem", "statement", "method", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ObjectField.java#L191-L217
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java
MethodHandle.ofSpecial
public static MethodHandle ofSpecial(Method method, Class<?> type) { """ Creates a method handle representation of the given method for an explicit special method invocation of an otherwise virtual method. @param method The method ro represent. @param type The type on which the method is to be invoked on as ...
java
public static MethodHandle ofSpecial(Method method, Class<?> type) { return ofSpecial(new MethodDescription.ForLoadedMethod(method), TypeDescription.ForLoadedType.of(type)); }
[ "public", "static", "MethodHandle", "ofSpecial", "(", "Method", "method", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "ofSpecial", "(", "new", "MethodDescription", ".", "ForLoadedMethod", "(", "method", ")", ",", "TypeDescription", ".", "ForLoaded...
Creates a method handle representation of the given method for an explicit special method invocation of an otherwise virtual method. @param method The method ro represent. @param type The type on which the method is to be invoked on as a special method invocation. @return A method handle representing the given metho...
[ "Creates", "a", "method", "handle", "representation", "of", "the", "given", "method", "for", "an", "explicit", "special", "method", "invocation", "of", "an", "otherwise", "virtual", "method", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L560-L562
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/api/TokenService.java
TokenService.deleteToken
@Delete("/tokens/ { """ DELETE /tokens/{appId} <p>Deletes a token of the specified ID then returns it. """appId}") public CompletableFuture<Token> deleteToken(ServiceRequestContext ctx, @Param("appId") String appId, ...
java
@Delete("/tokens/{appId}") public CompletableFuture<Token> deleteToken(ServiceRequestContext ctx, @Param("appId") String appId, Author author, User loginUser) { return getTokenOrRespondForbidden(ctx, appId, login...
[ "@", "Delete", "(", "\"/tokens/{appId}\"", ")", "public", "CompletableFuture", "<", "Token", ">", "deleteToken", "(", "ServiceRequestContext", "ctx", ",", "@", "Param", "(", "\"appId\"", ")", "String", "appId", ",", "Author", "author", ",", "User", "loginUser", ...
DELETE /tokens/{appId} <p>Deletes a token of the specified ID then returns it.
[ "DELETE", "/", "tokens", "/", "{", "appId", "}" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/TokenService.java#L126-L133
matthewhorridge/owlapi-gwt
owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/util/OWLAPIPreconditions.java
OWLAPIPreconditions.verifyNotNull
@Nonnull public static <T> T verifyNotNull(T object, @Nonnull String message) { """ Check that the argument is not null; if the argument is null, throw an IllegalStateException. This method is meant to be used to verify conditions on member variables rather than input parameters. @param object reference ...
java
@Nonnull public static <T> T verifyNotNull(T object, @Nonnull String message) { if (object == null) { throw new IllegalStateException(message); } return object; }
[ "@", "Nonnull", "public", "static", "<", "T", ">", "T", "verifyNotNull", "(", "T", "object", ",", "@", "Nonnull", "String", "message", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "message", ")", ...
Check that the argument is not null; if the argument is null, throw an IllegalStateException. This method is meant to be used to verify conditions on member variables rather than input parameters. @param object reference to check @param message message to use for the error @param <T> reference type @return the input r...
[ "Check", "that", "the", "argument", "is", "not", "null", ";", "if", "the", "argument", "is", "null", "throw", "an", "IllegalStateException", ".", "This", "method", "is", "meant", "to", "be", "used", "to", "verify", "conditions", "on", "member", "variables", ...
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/util/OWLAPIPreconditions.java#L58-L64
alkacon/opencms-core
src/org/opencms/widgets/A_CmsWidget.java
A_CmsWidget.getJsHelpMouseHandler
protected String getJsHelpMouseHandler(I_CmsWidgetDialog widgetDialog, String key, String value) { """ Returns the HTML for the JavaScript mouse handlers that show / hide the help text.<p> This is required since the handler differs between the "Dialog" and the "Administration" mode.<p> @param widgetDialog th...
java
protected String getJsHelpMouseHandler(I_CmsWidgetDialog widgetDialog, String key, String value) { String jsShow; String jsHide; String keyHide; if (widgetDialog.useNewStyle()) { // Administration style jsShow = "sMH"; jsHide = "hMH"; keyH...
[ "protected", "String", "getJsHelpMouseHandler", "(", "I_CmsWidgetDialog", "widgetDialog", ",", "String", "key", ",", "String", "value", ")", "{", "String", "jsShow", ";", "String", "jsHide", ";", "String", "keyHide", ";", "if", "(", "widgetDialog", ".", "useNewS...
Returns the HTML for the JavaScript mouse handlers that show / hide the help text.<p> This is required since the handler differs between the "Dialog" and the "Administration" mode.<p> @param widgetDialog the dialog where the widget is displayed on @param key the key for the help bubble @param value the localized help...
[ "Returns", "the", "HTML", "for", "the", "JavaScript", "mouse", "handlers", "that", "show", "/", "hide", "the", "help", "text", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/A_CmsWidget.java#L452-L484
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newMappingException
public static MappingException newMappingException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link MappingException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwabl...
java
public static MappingException newMappingException(Throwable cause, String message, Object... args) { return new MappingException(format(message, args), cause); }
[ "public", "static", "MappingException", "newMappingException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "MappingException", "(", "format", "(", "message", ",", "args", ")", ",", "cause", ")",...
Constructs and initializes a new {@link MappingException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link MappingException} was thrown. @param message {@link String} describing the...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "MappingException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object"...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L197-L199
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyDirectories
public static void copyDirectories(String[] directories, String[] destinationDirectories) throws IOException { """ 批量复制文件夹 @param directories 文件夹路径数组 @param destinationDirectories 目标文件夹路径数组,与文件夹一一对应 @throws IOException 异常 """ copyDirectories(getFiles(directories), getFiles(destinationDirectories...
java
public static void copyDirectories(String[] directories, String[] destinationDirectories) throws IOException { copyDirectories(getFiles(directories), getFiles(destinationDirectories)); }
[ "public", "static", "void", "copyDirectories", "(", "String", "[", "]", "directories", ",", "String", "[", "]", "destinationDirectories", ")", "throws", "IOException", "{", "copyDirectories", "(", "getFiles", "(", "directories", ")", ",", "getFiles", "(", "desti...
批量复制文件夹 @param directories 文件夹路径数组 @param destinationDirectories 目标文件夹路径数组,与文件夹一一对应 @throws IOException 异常
[ "批量复制文件夹" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L409-L411
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java
PrepareRequestInterceptor.addEntityID
private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) { """ adding the entity id in the URI, which is required for READ operation @param requestParameters @param uri """ if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) { uri...
java
private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) { if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) { uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID)); } }
[ "private", "void", "addEntityID", "(", "Map", "<", "String", ",", "String", ">", "requestParameters", ",", "StringBuilder", "uri", ")", "{", "if", "(", "StringUtils", ".", "hasText", "(", "requestParameters", ".", "get", "(", "RequestElements", ".", "REQ_PARAM...
adding the entity id in the URI, which is required for READ operation @param requestParameters @param uri
[ "adding", "the", "entity", "id", "in", "the", "URI", "which", "is", "required", "for", "READ", "operation" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L337-L341
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java
EnumHelper.getFromIDOrNull
@Nullable public static <KEYTYPE, ENUMTYPE extends Enum <ENUMTYPE> & IHasID <KEYTYPE>> ENUMTYPE getFromIDOrNull (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final KEYTYPE aID) { """ Get the enum value w...
java
@Nullable public static <KEYTYPE, ENUMTYPE extends Enum <ENUMTYPE> & IHasID <KEYTYPE>> ENUMTYPE getFromIDOrNull (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final KEYTYPE aID) { return getFromIDOrDefau...
[ "@", "Nullable", "public", "static", "<", "KEYTYPE", ",", "ENUMTYPE", "extends", "Enum", "<", "ENUMTYPE", ">", "&", "IHasID", "<", "KEYTYPE", ">", ">", "ENUMTYPE", "getFromIDOrNull", "(", "@", "Nonnull", "final", "Class", "<", "ENUMTYPE", ">", "aClass", ",...
Get the enum value with the passed ID @param <KEYTYPE> The ID type @param <ENUMTYPE> The enum type @param aClass The enum class @param aID The ID to search @return <code>null</code> if no enum item with the given ID is present.
[ "Get", "the", "enum", "value", "with", "the", "passed", "ID" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java#L101-L106
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitDocComment
@Override public R visitDocComment(DocCommentTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getFirstSentence(), p); r = scanAndReduc...
java
@Override public R visitDocComment(DocCommentTree node, P p) { R r = scan(node.getFirstSentence(), p); r = scanAndReduce(node.getBody(), p, r); r = scanAndReduce(node.getBlockTags(), p, r); return r; }
[ "@", "Override", "public", "R", "visitDocComment", "(", "DocCommentTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getFirstSentence", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getBod...
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L181-L187
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/FastaFormat.java
FastaFormat.generateElementsOfPeptide
protected static PolymerListElements generateElementsOfPeptide(String sequence, HELMEntity entity) throws FastaFormatException, ChemistryException { """ method to fill a peptide polymer with its elements (MonomerNotationUnits) @param sequence peptide sequence @param entity HELMEntity @return PolymerList...
java
protected static PolymerListElements generateElementsOfPeptide(String sequence, HELMEntity entity) throws FastaFormatException, ChemistryException { initMapAminoAcid(); sequence = cleanup(sequence); try { PolymerListElements elements = new PolymerListElements(entity); List<String> aaList = AminoAci...
[ "protected", "static", "PolymerListElements", "generateElementsOfPeptide", "(", "String", "sequence", ",", "HELMEntity", "entity", ")", "throws", "FastaFormatException", ",", "ChemistryException", "{", "initMapAminoAcid", "(", ")", ";", "sequence", "=", "cleanup", "(", ...
method to fill a peptide polymer with its elements (MonomerNotationUnits) @param sequence peptide sequence @param entity HELMEntity @return PolymerListElements @throws FastaFormatException if the input sequence is not correct @throws ChemistryException if chemistry engine can not be initialized
[ "method", "to", "fill", "a", "peptide", "polymer", "with", "its", "elements", "(", "MonomerNotationUnits", ")" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/FastaFormat.java#L301-L323
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/UnsavedRevision.java
UnsavedRevision.addAttachment
@InterfaceAudience.Private protected void addAttachment(Attachment attachment, String name) { """ Creates or updates an attachment. The attachment data will be written to the database when the revision is saved. @param attachment A newly-created Attachment (not yet associated with any revision) @param nam...
java
@InterfaceAudience.Private protected void addAttachment(Attachment attachment, String name) { Map<String, Object> attachments = (Map<String, Object>) properties.get("_attachments"); if (attachments == null) { attachments = new HashMap<String, Object>(); } attachments.put(...
[ "@", "InterfaceAudience", ".", "Private", "protected", "void", "addAttachment", "(", "Attachment", "attachment", ",", "String", "name", ")", "{", "Map", "<", "String", ",", "Object", ">", "attachments", "=", "(", "Map", "<", "String", ",", "Object", ">", "...
Creates or updates an attachment. The attachment data will be written to the database when the revision is saved. @param attachment A newly-created Attachment (not yet associated with any revision) @param name The attachment name.
[ "Creates", "or", "updates", "an", "attachment", ".", "The", "attachment", "data", "will", "be", "written", "to", "the", "database", "when", "the", "revision", "is", "saved", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/UnsavedRevision.java#L237-L248
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java
Normalization.normalizeSequence
public static JavaRDD<List<List<Writable>>> normalizeSequence(Schema schema, JavaRDD<List<List<Writable>>> data, double min, double max) { """ Normalize each column of a sequence, based on min/max @param schema Schema of the data @param data Data to normalize @param min New minimum va...
java
public static JavaRDD<List<List<Writable>>> normalizeSequence(Schema schema, JavaRDD<List<List<Writable>>> data, double min, double max) { return normalizeSequence(schema, data, min, max, null); }
[ "public", "static", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "normalizeSequence", "(", "Schema", "schema", ",", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "data", ",", "double", "min", ",", "double"...
Normalize each column of a sequence, based on min/max @param schema Schema of the data @param data Data to normalize @param min New minimum value @param max New maximum value @return Normalized data
[ "Normalize", "each", "column", "of", "a", "sequence", "based", "on", "min", "/", "max" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java#L366-L369
tvesalainen/util
util/src/main/java/org/vesalainen/text/CamelCase.java
CamelCase.delimitedLower
public static final String delimitedLower(String text, String delim) { """ Return camel-case if delim = '-' @param text @param delim @return """ return stream(text).map((String s)->{return s.toLowerCase();}).collect(Collectors.joining(delim)); }
java
public static final String delimitedLower(String text, String delim) { return stream(text).map((String s)->{return s.toLowerCase();}).collect(Collectors.joining(delim)); }
[ "public", "static", "final", "String", "delimitedLower", "(", "String", "text", ",", "String", "delim", ")", "{", "return", "stream", "(", "text", ")", ".", "map", "(", "(", "String", "s", ")", "->", "{", "return", "s", ".", "toLowerCase", "(", ")", ...
Return camel-case if delim = '-' @param text @param delim @return
[ "Return", "camel", "-", "case", "if", "delim", "=", "-" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/text/CamelCase.java#L69-L72
m-m-m/util
nls/src/main/java/net/sf/mmm/util/nls/base/NlsFormatterMap.java
NlsFormatterMap.registerFormatter
public NlsFormatter<?> registerFormatter(NlsFormatterPlugin<?> formatter) { """ This method registers the given {@code formatBuilder}. @param formatter is the {@link NlsFormatterPlugin} to register. @return the {@link NlsFormatter} that was registered for the given {@link NlsFormatterPlugin#getType() type} an...
java
public NlsFormatter<?> registerFormatter(NlsFormatterPlugin<?> formatter) { return registerFormatter(formatter, formatter.getType(), formatter.getStyle()); }
[ "public", "NlsFormatter", "<", "?", ">", "registerFormatter", "(", "NlsFormatterPlugin", "<", "?", ">", "formatter", ")", "{", "return", "registerFormatter", "(", "formatter", ",", "formatter", ".", "getType", "(", ")", ",", "formatter", ".", "getStyle", "(", ...
This method registers the given {@code formatBuilder}. @param formatter is the {@link NlsFormatterPlugin} to register. @return the {@link NlsFormatter} that was registered for the given {@link NlsFormatterPlugin#getType() type} and {@link NlsFormatterPlugin#getStyle() style} and is now replaced by the given {@code for...
[ "This", "method", "registers", "the", "given", "{", "@code", "formatBuilder", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/nls/src/main/java/net/sf/mmm/util/nls/base/NlsFormatterMap.java#L48-L51
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optSize
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Size optSize(@Nullable Bundle bundle, @Nullable String key, @Nullable Size fallback) { """ Returns a optional {@link android.util.Size} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.Size}. T...
java
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Size optSize(@Nullable Bundle bundle, @Nullable String key, @Nullable Size fallback) { if (bundle == null) { return fallback; } return bundle.getSize(key); }
[ "@", "Nullable", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "public", "static", "Size", "optSize", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ",", "@", "Nullable", "Size", "fallback", "...
Returns a optional {@link android.util.Size} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.Size}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will return ...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L886-L893
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java
StringFunctions.ltrim
public static Expression ltrim(Expression expression, String characters) { """ Returned expression results in the string with all leading chars removed (any char in the characters string). """ return x("LTRIM(" + expression.toString() + ", \"" + characters + "\")"); }
java
public static Expression ltrim(Expression expression, String characters) { return x("LTRIM(" + expression.toString() + ", \"" + characters + "\")"); }
[ "public", "static", "Expression", "ltrim", "(", "Expression", "expression", ",", "String", "characters", ")", "{", "return", "x", "(", "\"LTRIM(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \\\"\"", "+", "characters", "+", "\"\\\")\"", ")", ";...
Returned expression results in the string with all leading chars removed (any char in the characters string).
[ "Returned", "expression", "results", "in", "the", "string", "with", "all", "leading", "chars", "removed", "(", "any", "char", "in", "the", "characters", "string", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java#L130-L132
alkacon/opencms-core
src/org/opencms/ui/components/fileselect/CmsResourceSelectDialog.java
CmsResourceSelectDialog.createTree
protected CmsResourceTreeTable createTree(CmsObject cms, CmsResource root) { """ Creates the resource tree for the given root.<p> @param cms the CMS context @param root the root resource @return the resource tree """ return new CmsResourceTreeTable(cms, root, m_filter); }
java
protected CmsResourceTreeTable createTree(CmsObject cms, CmsResource root) { return new CmsResourceTreeTable(cms, root, m_filter); }
[ "protected", "CmsResourceTreeTable", "createTree", "(", "CmsObject", "cms", ",", "CmsResource", "root", ")", "{", "return", "new", "CmsResourceTreeTable", "(", "cms", ",", "root", ",", "m_filter", ")", ";", "}" ]
Creates the resource tree for the given root.<p> @param cms the CMS context @param root the root resource @return the resource tree
[ "Creates", "the", "resource", "tree", "for", "the", "given", "root", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/fileselect/CmsResourceSelectDialog.java#L360-L363
twilio/twilio-java
src/main/java/com/twilio/base/Page.java
Page.getPreviousPageUrl
public String getPreviousPageUrl(String domain, String region) { """ Generate previous page url for a list result. @param domain domain to use @param region region to use @return the previous page url """ if (previousPageUrl != null) { return previousPageUrl; } return ...
java
public String getPreviousPageUrl(String domain, String region) { if (previousPageUrl != null) { return previousPageUrl; } return urlFromUri(domain, region, previousPageUri); }
[ "public", "String", "getPreviousPageUrl", "(", "String", "domain", ",", "String", "region", ")", "{", "if", "(", "previousPageUrl", "!=", "null", ")", "{", "return", "previousPageUrl", ";", "}", "return", "urlFromUri", "(", "domain", ",", "region", ",", "pre...
Generate previous page url for a list result. @param domain domain to use @param region region to use @return the previous page url
[ "Generate", "previous", "page", "url", "for", "a", "list", "result", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/base/Page.java#L83-L89
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java
RunbookDraftsInner.undoEdit
public RunbookDraftUndoEditResultInner undoEdit(String resourceGroupName, String automationAccountName, String runbookName) { """ Undo draft edit to last known published state identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the auto...
java
public RunbookDraftUndoEditResultInner undoEdit(String resourceGroupName, String automationAccountName, String runbookName) { return undoEditWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).toBlocking().single().body(); }
[ "public", "RunbookDraftUndoEditResultInner", "undoEdit", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "runbookName", ")", "{", "return", "undoEditWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", "...
Undo draft edit to last known published state identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName The runbook name. @throws IllegalArgumentException thrown if parameters fail the validation @throws Err...
[ "Undo", "draft", "edit", "to", "last", "known", "published", "state", "identified", "by", "runbook", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java#L627-L629
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.loadScript
public ScriptWrapper loadScript(ScriptWrapper script) throws IOException { """ Loads the script from the file, using {@link #DEFAULT_CHARSET}. <p> If the file contains invalid byte sequences (for {@code DEFAULT_CHARSET}) it will be loaded again using the {@link Charset#defaultCharset() (JVM) default charset}, t...
java
public ScriptWrapper loadScript(ScriptWrapper script) throws IOException { try { return loadScript(script, DEFAULT_CHARSET); } catch (MalformedInputException e) { if (Charset.defaultCharset() == DEFAULT_CHARSET) { // No point trying the (JVM) default charset if it's the same... throw e; } ...
[ "public", "ScriptWrapper", "loadScript", "(", "ScriptWrapper", "script", ")", "throws", "IOException", "{", "try", "{", "return", "loadScript", "(", "script", ",", "DEFAULT_CHARSET", ")", ";", "}", "catch", "(", "MalformedInputException", "e", ")", "{", "if", ...
Loads the script from the file, using {@link #DEFAULT_CHARSET}. <p> If the file contains invalid byte sequences (for {@code DEFAULT_CHARSET}) it will be loaded again using the {@link Charset#defaultCharset() (JVM) default charset}, to load scripts saved with older ZAP versions (which relied on default charset). @param...
[ "Loads", "the", "script", "from", "the", "file", "using", "{", "@link", "#DEFAULT_CHARSET", "}", ".", "<p", ">", "If", "the", "file", "contains", "invalid", "byte", "sequences", "(", "for", "{", "@code", "DEFAULT_CHARSET", "}", ")", "it", "will", "be", "...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1125-L1142
hsiafan/apk-parser
src/main/java/net/dongliu/apk/parser/utils/ParseUtils.java
ParseUtils.readString
public static String readString(ByteBuffer buffer, boolean utf8) { """ read string from input buffer. if get EOF before read enough data, throw IOException. """ if (utf8) { // The lengths are encoded in the same way as for the 16-bit format // but using 8-bit rather than 16-bit...
java
public static String readString(ByteBuffer buffer, boolean utf8) { if (utf8) { // The lengths are encoded in the same way as for the 16-bit format // but using 8-bit rather than 16-bit integers. int strLen = readLen(buffer); int bytesLen = readLen(buffer); ...
[ "public", "static", "String", "readString", "(", "ByteBuffer", "buffer", ",", "boolean", "utf8", ")", "{", "if", "(", "utf8", ")", "{", "// The lengths are encoded in the same way as for the 16-bit format", "// but using 8-bit rather than 16-bit integers.", "int", "strLen", ...
read string from input buffer. if get EOF before read enough data, throw IOException.
[ "read", "string", "from", "input", "buffer", ".", "if", "get", "EOF", "before", "read", "enough", "data", "throw", "IOException", "." ]
train
https://github.com/hsiafan/apk-parser/blob/8993ddd52017b37b8f2e784ae0a15417d9ede932/src/main/java/net/dongliu/apk/parser/utils/ParseUtils.java#L24-L43
jamesagnew/hapi-fhir
hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java
ResourceIndexedSearchParams.extractCompositeStringUniquesValueChains
public static Set<String> extractCompositeStringUniquesValueChains(String theResourceType, List<List<String>> thePartsChoices) { """ This method is used to create a set of all possible combinations of parameters across a set of search parameters. An example of why this is needed: <p> L...
java
public static Set<String> extractCompositeStringUniquesValueChains(String theResourceType, List<List<String>> thePartsChoices) { for (List<String> next : thePartsChoices) { next.removeIf(StringUtils::isBlank); if (next.isEmpty()) { return Collections.emptySet(); } } if (the...
[ "public", "static", "Set", "<", "String", ">", "extractCompositeStringUniquesValueChains", "(", "String", "theResourceType", ",", "List", "<", "List", "<", "String", ">", ">", "thePartsChoices", ")", "{", "for", "(", "List", "<", "String", ">", "next", ":", ...
This method is used to create a set of all possible combinations of parameters across a set of search parameters. An example of why this is needed: <p> Let's say we have a unique index on (Patient:gender AND Patient:name). Then we pass in <code>SMITH, John</code> with a gender of <code>male</code>. </p> <p> In this cas...
[ "This", "method", "is", "used", "to", "create", "a", "set", "of", "all", "possible", "combinations", "of", "parameters", "across", "a", "set", "of", "search", "parameters", ".", "An", "example", "of", "why", "this", "is", "needed", ":", "<p", ">", "Let",...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/ResourceIndexedSearchParams.java#L152-L182
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/metrics/HystrixMetricsPublisherFactory.java
HystrixMetricsPublisherFactory.createOrRetrievePublisherForCommand
public static HystrixMetricsPublisherCommand createOrRetrievePublisherForCommand(HystrixCommandKey commandKey, HystrixCommandGroupKey commandOwner, HystrixCommandMetrics metrics, HystrixCircuitBreaker circuitBreaker, HystrixCommandProperties properties) { """ Get an instance of {@link HystrixMetricsPublisherComman...
java
public static HystrixMetricsPublisherCommand createOrRetrievePublisherForCommand(HystrixCommandKey commandKey, HystrixCommandGroupKey commandOwner, HystrixCommandMetrics metrics, HystrixCircuitBreaker circuitBreaker, HystrixCommandProperties properties) { return SINGLETON.getPublisherForCommand(commandKey, comm...
[ "public", "static", "HystrixMetricsPublisherCommand", "createOrRetrievePublisherForCommand", "(", "HystrixCommandKey", "commandKey", ",", "HystrixCommandGroupKey", "commandOwner", ",", "HystrixCommandMetrics", "metrics", ",", "HystrixCircuitBreaker", "circuitBreaker", ",", "Hystrix...
Get an instance of {@link HystrixMetricsPublisherCommand} with the given factory {@link HystrixMetricsPublisher} implementation for each {@link HystrixCommand} instance. @param commandKey Pass-thru to {@link HystrixMetricsPublisher#getMetricsPublisherForCommand} implementation @param commandOwner Pass-thru to {@link H...
[ "Get", "an", "instance", "of", "{", "@link", "HystrixMetricsPublisherCommand", "}", "with", "the", "given", "factory", "{", "@link", "HystrixMetricsPublisher", "}", "implementation", "for", "each", "{", "@link", "HystrixCommand", "}", "instance", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/metrics/HystrixMetricsPublisherFactory.java#L82-L84
andriusvelykis/reflow-maven-skin
reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java
HtmlTool.reorderToTop
public String reorderToTop(String content, String selector, int amount) { """ Reorders elements in HTML content so that selected elements are found at the top of the content. Can be limited to a certain amount, e.g. to bring just the first of selected elements to the top. @param content HTML content to reord...
java
public String reorderToTop(String content, String selector, int amount) { return reorderToTop(content, selector, amount, null); }
[ "public", "String", "reorderToTop", "(", "String", "content", ",", "String", "selector", ",", "int", "amount", ")", "{", "return", "reorderToTop", "(", "content", ",", "selector", ",", "amount", ",", "null", ")", ";", "}" ]
Reorders elements in HTML content so that selected elements are found at the top of the content. Can be limited to a certain amount, e.g. to bring just the first of selected elements to the top. @param content HTML content to reorder @param selector CSS selector for elements to bring to top of the content @param amoun...
[ "Reorders", "elements", "in", "HTML", "content", "so", "that", "selected", "elements", "are", "found", "at", "the", "top", "of", "the", "content", ".", "Can", "be", "limited", "to", "a", "certain", "amount", "e", ".", "g", ".", "to", "bring", "just", "...
train
https://github.com/andriusvelykis/reflow-maven-skin/blob/01170ae1426a1adfe7cc9c199e77aaa2ecb37ef2/reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java#L357-L359
jkrasnay/sqlbuilder
src/main/java/ca/krasnay/sqlbuilder/InsertBuilder.java
InsertBuilder.set
public InsertBuilder set(String column, String value) { """ Inserts a column name, value pair into the SQL. @param column Name of the table column. @param value Value to substitute in. InsertBuilder does *no* interpretation of this. If you want a string constant inserted, you must provide the single quotes...
java
public InsertBuilder set(String column, String value) { columns.add(column); values.add(value); return this; }
[ "public", "InsertBuilder", "set", "(", "String", "column", ",", "String", "value", ")", "{", "columns", ".", "add", "(", "column", ")", ";", "values", ".", "add", "(", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a column name, value pair into the SQL. @param column Name of the table column. @param value Value to substitute in. InsertBuilder does *no* interpretation of this. If you want a string constant inserted, you must provide the single quotes and escape the internal quotes. It is more common to use a question mar...
[ "Inserts", "a", "column", "name", "value", "pair", "into", "the", "SQL", "." ]
train
https://github.com/jkrasnay/sqlbuilder/blob/8e6acedc51cfad0527263376af51e1ef052f7147/src/main/java/ca/krasnay/sqlbuilder/InsertBuilder.java#L44-L48
cdk/cdk
app/depict/src/main/java/org/openscience/cdk/depict/Depiction.java
Depiction.writeTo
public final void writeTo(String fmt, String path) throws IOException { """ Write the depiction to the provided file path. @param fmt format @param path output destination path @throws IOException depiction could not be written, low level IO problem @see #listFormats() """ writeTo(fmt, new File(...
java
public final void writeTo(String fmt, String path) throws IOException { writeTo(fmt, new File(replaceTildeWithHomeDir(ensureSuffix(path, fmt)))); }
[ "public", "final", "void", "writeTo", "(", "String", "fmt", ",", "String", "path", ")", "throws", "IOException", "{", "writeTo", "(", "fmt", ",", "new", "File", "(", "replaceTildeWithHomeDir", "(", "ensureSuffix", "(", "path", ",", "fmt", ")", ")", ")", ...
Write the depiction to the provided file path. @param fmt format @param path output destination path @throws IOException depiction could not be written, low level IO problem @see #listFormats()
[ "Write", "the", "depiction", "to", "the", "provided", "file", "path", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/Depiction.java#L280-L282
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterJoinManager.java
ClusterJoinManager.sendMasterQuestion
public boolean sendMasterQuestion(Address toAddress) { """ Send a {@link WhoisMasterOp} to designated address. @param toAddress the address to which the operation will be sent. @return {@code true} if the operation was sent, otherwise {@code false}. """ checkNotNull(toAddress, "No endpoint is speci...
java
public boolean sendMasterQuestion(Address toAddress) { checkNotNull(toAddress, "No endpoint is specified!"); BuildInfo buildInfo = node.getBuildInfo(); Address thisAddress = node.getThisAddress(); JoinMessage joinMessage = new JoinMessage(Packet.VERSION, buildInfo.getBuildNumber(), node...
[ "public", "boolean", "sendMasterQuestion", "(", "Address", "toAddress", ")", "{", "checkNotNull", "(", "toAddress", ",", "\"No endpoint is specified!\"", ")", ";", "BuildInfo", "buildInfo", "=", "node", ".", "getBuildInfo", "(", ")", ";", "Address", "thisAddress", ...
Send a {@link WhoisMasterOp} to designated address. @param toAddress the address to which the operation will be sent. @return {@code true} if the operation was sent, otherwise {@code false}.
[ "Send", "a", "{", "@link", "WhoisMasterOp", "}", "to", "designated", "address", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterJoinManager.java#L554-L562
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java
BingImagesImpl.detailsAsync
public ServiceFuture<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter, final ServiceCallback<ImageInsights> serviceCallback) { """ The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This secti...
java
public ServiceFuture<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter, final ServiceCallback<ImageInsights> serviceCallback) { return ServiceFuture.fromResponse(detailsWithServiceResponseAsync(query, detailsOptionalParameter), serviceCallback); }
[ "public", "ServiceFuture", "<", "ImageInsights", ">", "detailsAsync", "(", "String", "query", ",", "DetailsOptionalParameter", "detailsOptionalParameter", ",", "final", "ServiceCallback", "<", "ImageInsights", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ...
The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This section provides technical details about the query parameters and headers that you use to request insights of images and the JSON response objects that contain them. For examples that ...
[ "The", "Image", "Detail", "Search", "API", "lets", "you", "search", "on", "Bing", "and", "get", "back", "insights", "about", "an", "image", "such", "as", "webpages", "that", "include", "the", "image", ".", "This", "section", "provides", "technical", "details...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java#L490-L492
amaembo/streamex
src/main/java/one/util/streamex/EntryStream.java
EntryStream.toCustomMap
public <M extends Map<K, V>> M toCustomMap(Supplier<M> mapSupplier) { """ Returns a {@link Map} containing the elements of this stream. The {@code Map} is created by a provided supplier function. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. @param <M> the type of the resu...
java
public <M extends Map<K, V>> M toCustomMap(Supplier<M> mapSupplier) { M map = mapSupplier.get(); if (isParallel() && !(map instanceof ConcurrentMap)) { return collect(mapSupplier, (m, t) -> addToMap(m, t.getKey(), Objects.requireNonNull(t.getValue())), (m1, m2) -> m2....
[ "public", "<", "M", "extends", "Map", "<", "K", ",", "V", ">", ">", "M", "toCustomMap", "(", "Supplier", "<", "M", ">", "mapSupplier", ")", "{", "M", "map", "=", "mapSupplier", ".", "get", "(", ")", ";", "if", "(", "isParallel", "(", ")", "&&", ...
Returns a {@link Map} containing the elements of this stream. The {@code Map} is created by a provided supplier function. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. @param <M> the type of the resulting map @param mapSupplier a function which returns a new, empty {@code Map} into wh...
[ "Returns", "a", "{", "@link", "Map", "}", "containing", "the", "elements", "of", "this", "stream", ".", "The", "{", "@code", "Map", "}", "is", "created", "by", "a", "provided", "supplier", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/EntryStream.java#L1237-L1245
snowtide/lucene-pdf
src/java/com/snowtide/pdf/lucene/LucenePDFConfiguration.java
LucenePDFConfiguration.setMetadataSettings
public void setMetadataSettings (boolean store, boolean index, boolean token) { """ Sets Field attributes that will be used when creating Field objects for the document attributes found in a PDF document. These attributes correspond to the <code>store</code>, <code>index</code>, and <code>token</code> parameter...
java
public void setMetadataSettings (boolean store, boolean index, boolean token) { indexMetadata = index; storeMetadata = store; tokenizeMetadata = token; }
[ "public", "void", "setMetadataSettings", "(", "boolean", "store", ",", "boolean", "index", ",", "boolean", "token", ")", "{", "indexMetadata", "=", "index", ";", "storeMetadata", "=", "store", ";", "tokenizeMetadata", "=", "token", ";", "}" ]
Sets Field attributes that will be used when creating Field objects for the document attributes found in a PDF document. These attributes correspond to the <code>store</code>, <code>index</code>, and <code>token</code> parameters of the {@link org.apache.lucene.document.Field} constructor before Lucene v4.x and the sa...
[ "Sets", "Field", "attributes", "that", "will", "be", "used", "when", "creating", "Field", "objects", "for", "the", "document", "attributes", "found", "in", "a", "PDF", "document", ".", "These", "attributes", "correspond", "to", "the", "<code", ">", "store<", ...
train
https://github.com/snowtide/lucene-pdf/blob/1d97a877912bcfb354d3e8bff8275c92397db133/src/java/com/snowtide/pdf/lucene/LucenePDFConfiguration.java#L136-L140
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTaskExtendedAttributes
private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx) { """ This method processes any extended attributes associated with a task. @param xml MSPDI task instance @param mpx MPX task instance """ for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute()) { ...
java
private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx) { for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; TaskField mpxFieldID = MPPTaskField.getInstance(xmlFieldID); ...
[ "private", "void", "readTaskExtendedAttributes", "(", "Project", ".", "Tasks", ".", "Task", "xml", ",", "Task", "mpx", ")", "{", "for", "(", "Project", ".", "Tasks", ".", "Task", ".", "ExtendedAttribute", "attrib", ":", "xml", ".", "getExtendedAttribute", "(...
This method processes any extended attributes associated with a task. @param xml MSPDI task instance @param mpx MPX task instance
[ "This", "method", "processes", "any", "extended", "attributes", "associated", "with", "a", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1444-L1453
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.isWithinBounds
public boolean isWithinBounds(int x, int y, int zoom) { """ Is the tile within the zoom and bounding box bounds @param x x coordinate @param y y coordinate @param zoom zoom value @return true if within bounds """ return isWithinZoom(zoom) && isWithinBoundingBox(x, y, zoom); }
java
public boolean isWithinBounds(int x, int y, int zoom) { return isWithinZoom(zoom) && isWithinBoundingBox(x, y, zoom); }
[ "public", "boolean", "isWithinBounds", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "return", "isWithinZoom", "(", "zoom", ")", "&&", "isWithinBoundingBox", "(", "x", ",", "y", ",", "zoom", ")", ";", "}" ]
Is the tile within the zoom and bounding box bounds @param x x coordinate @param y y coordinate @param zoom zoom value @return true if within bounds
[ "Is", "the", "tile", "within", "the", "zoom", "and", "bounding", "box", "bounds" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L191-L193
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/inf/BeliefPropagation.java
BeliefPropagation.calcProductAtVar
private void calcProductAtVar(int v, VarTensor prod, int excl1, int excl2) { """ Computes the product of all messages being sent to a node, optionally excluding messages sent from another node or two. Upon completion, prod will be multiplied by the product of all incoming messages to node, except for the mess...
java
private void calcProductAtVar(int v, VarTensor prod, int excl1, int excl2) { for (int nb=0; nb<bg.numNbsT1(v); nb++) { if (nb == excl1 || nb == excl2) { // Don't include messages to these neighbors. continue; } // Get message from neighbor to t...
[ "private", "void", "calcProductAtVar", "(", "int", "v", ",", "VarTensor", "prod", ",", "int", "excl1", ",", "int", "excl2", ")", "{", "for", "(", "int", "nb", "=", "0", ";", "nb", "<", "bg", ".", "numNbsT1", "(", "v", ")", ";", "nb", "++", ")", ...
Computes the product of all messages being sent to a node, optionally excluding messages sent from another node or two. Upon completion, prod will be multiplied by the product of all incoming messages to node, except for the message from exclNode1 / exclNode2 if specified. @param node The node to which all the messag...
[ "Computes", "the", "product", "of", "all", "messages", "being", "sent", "to", "a", "node", "optionally", "excluding", "messages", "sent", "from", "another", "node", "or", "two", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/inf/BeliefPropagation.java#L886-L897
apache/incubator-druid
processing/src/main/java/org/apache/druid/segment/filter/Filters.java
Filters.matchPredicateNoUnion
public static Iterable<ImmutableBitmap> matchPredicateNoUnion( final String dimension, final BitmapIndexSelector selector, final Predicate<String> predicate ) { """ Return an iterable of bitmaps for all values matching a particular predicate. Unioning these bitmaps yields the same result that ...
java
public static Iterable<ImmutableBitmap> matchPredicateNoUnion( final String dimension, final BitmapIndexSelector selector, final Predicate<String> predicate ) { Preconditions.checkNotNull(dimension, "dimension"); Preconditions.checkNotNull(selector, "selector"); Preconditions.checkNotN...
[ "public", "static", "Iterable", "<", "ImmutableBitmap", ">", "matchPredicateNoUnion", "(", "final", "String", "dimension", ",", "final", "BitmapIndexSelector", "selector", ",", "final", "Predicate", "<", "String", ">", "predicate", ")", "{", "Preconditions", ".", ...
Return an iterable of bitmaps for all values matching a particular predicate. Unioning these bitmaps yields the same result that {@link #matchPredicate(String, BitmapIndexSelector, BitmapResultFactory, Predicate)} would have returned. @param dimension dimension to look at @param selector bitmap selector @param predic...
[ "Return", "an", "iterable", "of", "bitmaps", "for", "all", "values", "matching", "a", "particular", "predicate", ".", "Unioning", "these", "bitmaps", "yields", "the", "same", "result", "that", "{", "@link", "#matchPredicate", "(", "String", "BitmapIndexSelector", ...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/filter/Filters.java#L263-L286
google/truth
core/src/main/java/com/google/common/truth/IterableSubject.java
IterableSubject.containsAtLeastElementsIn
@CanIgnoreReturnValue public final Ordered containsAtLeastElementsIn(Iterable<?> expectedIterable) { """ Checks that the actual iterable contains at least all of the expected elements or fails. If an element appears more than once in the expected elements then it must appear at least that number of times in th...
java
@CanIgnoreReturnValue public final Ordered containsAtLeastElementsIn(Iterable<?> expectedIterable) { List<?> actual = Lists.newLinkedList(actual()); final Collection<?> expected = iterableToCollection(expectedIterable); List<Object> missing = newArrayList(); List<Object> actualNotInOrder = newArrayLi...
[ "@", "CanIgnoreReturnValue", "public", "final", "Ordered", "containsAtLeastElementsIn", "(", "Iterable", "<", "?", ">", "expectedIterable", ")", "{", "List", "<", "?", ">", "actual", "=", "Lists", ".", "newLinkedList", "(", "actual", "(", ")", ")", ";", "fin...
Checks that the actual iterable contains at least all of the expected elements or fails. If an element appears more than once in the expected elements then it must appear at least that number of times in the actual elements. <p>To also test that the contents appear in the given order, make a call to {@code inOrder()} ...
[ "Checks", "that", "the", "actual", "iterable", "contains", "at", "least", "all", "of", "the", "expected", "elements", "or", "fails", ".", "If", "an", "element", "appears", "more", "than", "once", "in", "the", "expected", "elements", "then", "it", "must", "...
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/IterableSubject.java#L299-L347
michael-rapp/AndroidPreferenceActivity
example/src/main/java/de/mrapp/android/preference/activity/example/MainActivity.java
MainActivity.createDynamicPreferenceButtonListener
private OnClickListener createDynamicPreferenceButtonListener() { """ Creates and returns a listener, which allows to show a {@link PreferenceActivity}, whose headers can be added or removed dynamically at runtime. @return The listener, which has been created, as an instance of the type {@link OnClickListener...
java
private OnClickListener createDynamicPreferenceButtonListener() { return new OnClickListener() { @Override public void onClick(final View v) { Intent intent = new Intent(MainActivity.this, DynamicSettingsActivity.class); startActivity(intent); ...
[ "private", "OnClickListener", "createDynamicPreferenceButtonListener", "(", ")", "{", "return", "new", "OnClickListener", "(", ")", "{", "@", "Override", "public", "void", "onClick", "(", "final", "View", "v", ")", "{", "Intent", "intent", "=", "new", "Intent", ...
Creates and returns a listener, which allows to show a {@link PreferenceActivity}, whose headers can be added or removed dynamically at runtime. @return The listener, which has been created, as an instance of the type {@link OnClickListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "show", "a", "{", "@link", "PreferenceActivity", "}", "whose", "headers", "can", "be", "added", "or", "removed", "dynamically", "at", "runtime", "." ]
train
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/example/src/main/java/de/mrapp/android/preference/activity/example/MainActivity.java#L127-L137
mikepenz/Android-Iconics
library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java
IconicsDrawable.updateTintFilter
private void updateTintFilter() { """ Ensures the tint filter is consistent with the current tint color and mode. """ if (mTint == null) { mTintFilter = null; return; } // setMode, setColor of PorterDuffColorFilter are not public method in SDK v7. (Thanks @Googl...
java
private void updateTintFilter() { if (mTint == null) { mTintFilter = null; return; } // setMode, setColor of PorterDuffColorFilter are not public method in SDK v7. (Thanks @Google still not accessible in API v24) // Therefore we create a new one all the time here....
[ "private", "void", "updateTintFilter", "(", ")", "{", "if", "(", "mTint", "==", "null", ")", "{", "mTintFilter", "=", "null", ";", "return", ";", "}", "// setMode, setColor of PorterDuffColorFilter are not public method in SDK v7. (Thanks @Google still not accessible in API v...
Ensures the tint filter is consistent with the current tint color and mode.
[ "Ensures", "the", "tint", "filter", "is", "consistent", "with", "the", "current", "tint", "color", "and", "mode", "." ]
train
https://github.com/mikepenz/Android-Iconics/blob/0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8/library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java#L1477-L1486
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findByG_U_O
@Override public List<CommerceOrder> findByG_U_O(long groupId, long userId, int orderStatus, int start, int end) { """ Returns a range of all the commerce orders where groupId = &#63; and userId = &#63; and orderStatus = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code...
java
@Override public List<CommerceOrder> findByG_U_O(long groupId, long userId, int orderStatus, int start, int end) { return findByG_U_O(groupId, userId, orderStatus, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findByG_U_O", "(", "long", "groupId", ",", "long", "userId", ",", "int", "orderStatus", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_U_O", "(", "groupId", ",", "userId",...
Returns a range of all the commerce orders where groupId = &#63; and userId = &#63; and orderStatus = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "orders", "where", "groupId", "=", "&#63", ";", "and", "userId", "=", "&#63", ";", "and", "orderStatus", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L4127-L4131
Erudika/para
para-server/src/main/java/com/erudika/para/utils/HttpUtils.java
HttpUtils.setRawCookie
public static void setRawCookie(String name, String value, HttpServletRequest req, HttpServletResponse res, boolean httpOnly, int maxAge) { """ Sets a cookie. @param name the name @param value the value @param req HTTP request @param res HTTP response @param httpOnly HTTP only flag @param maxAge max age ...
java
public static void setRawCookie(String name, String value, HttpServletRequest req, HttpServletResponse res, boolean httpOnly, int maxAge) { if (StringUtils.isBlank(name) || value == null || req == null || res == null) { return; } Cookie cookie = new Cookie(name, value); cookie.setHttpOnly(httpOnly); coo...
[ "public", "static", "void", "setRawCookie", "(", "String", "name", ",", "String", "value", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "boolean", "httpOnly", ",", "int", "maxAge", ")", "{", "if", "(", "StringUtils", ".", "isBlank"...
Sets a cookie. @param name the name @param value the value @param req HTTP request @param res HTTP response @param httpOnly HTTP only flag @param maxAge max age
[ "Sets", "a", "cookie", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/utils/HttpUtils.java#L104-L115
google/closure-compiler
src/com/google/javascript/jscomp/FunctionInjector.java
FunctionInjector.inlineReturnValue
private Node inlineReturnValue(Reference ref, Node fnNode) { """ Inline a function that fulfills the requirements of canInlineReferenceDirectly into the call site, replacing only the CALL node. """ Node callNode = ref.callNode; Node block = fnNode.getLastChild(); Node callParentNode = callNode.ge...
java
private Node inlineReturnValue(Reference ref, Node fnNode) { Node callNode = ref.callNode; Node block = fnNode.getLastChild(); Node callParentNode = callNode.getParent(); // NOTE: As the normalize pass guarantees globals aren't being // shadowed and an expression can't introduce new names, there is...
[ "private", "Node", "inlineReturnValue", "(", "Reference", "ref", ",", "Node", "fnNode", ")", "{", "Node", "callNode", "=", "ref", ".", "callNode", ";", "Node", "block", "=", "fnNode", ".", "getLastChild", "(", ")", ";", "Node", "callParentNode", "=", "call...
Inline a function that fulfills the requirements of canInlineReferenceDirectly into the call site, replacing only the CALL node.
[ "Inline", "a", "function", "that", "fulfills", "the", "requirements", "of", "canInlineReferenceDirectly", "into", "the", "call", "site", "replacing", "only", "the", "CALL", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FunctionInjector.java#L328-L368
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java
ZoomableGraphicsContext.drawImage
public void drawImage(Image img, double x, double y, double width, double height) { """ Draws an image into the given destination rectangle of the canvas. The Image is scaled to fit into the destination rectangle. A {@code null} image value or an image still in progress will be ignored. <p>This method will be...
java
public void drawImage(Image img, double x, double y, double width, double height) { this.gc.drawImage(img, doc2fxX(x), doc2fxY(y), doc2fxSize(width), doc2fxSize(height)); }
[ "public", "void", "drawImage", "(", "Image", "img", ",", "double", "x", ",", "double", "y", ",", "double", "width", ",", "double", "height", ")", "{", "this", ".", "gc", ".", "drawImage", "(", "img", ",", "doc2fxX", "(", "x", ")", ",", "doc2fxY", "...
Draws an image into the given destination rectangle of the canvas. The Image is scaled to fit into the destination rectangle. A {@code null} image value or an image still in progress will be ignored. <p>This method will be affected by any of the global common attributes as specified in the Rendering Attributes Table o...
[ "Draws", "an", "image", "into", "the", "given", "destination", "rectangle", "of", "the", "canvas", ".", "The", "Image", "is", "scaled", "to", "fit", "into", "the", "destination", "rectangle", ".", "A", "{", "@code", "null", "}", "image", "value", "or", "...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java#L1679-L1683
geomajas/geomajas-project-server
api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java
AssociationValue.setAttributes
@Deprecated @SuppressWarnings( { """ Set the attributes for the associated object. @param attributes attributes for associated objects @deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations """ "rawtypes", "unchecked" }) public void setAttributes(Map<String, Prim...
java
@Deprecated @SuppressWarnings({ "rawtypes", "unchecked" }) public void setAttributes(Map<String, PrimitiveAttribute<?>> attributes) { if (!isPrimitiveOnly()) { throw new UnsupportedOperationException("Primitive API not supported for nested association values"); } this.attributes = (Map) attributes; }
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "void", "setAttributes", "(", "Map", "<", "String", ",", "PrimitiveAttribute", "<", "?", ">", ">", "attributes", ")", "{", "if", "(", "!", "isPr...
Set the attributes for the associated object. @param attributes attributes for associated objects @deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations
[ "Set", "the", "attributes", "for", "the", "associated", "object", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java#L147-L154
VoltDB/voltdb
src/frontend/org/voltdb/iv2/InitiatorMailbox.java
InitiatorMailbox.updateReplicas
public synchronized long[] updateReplicas(List<Long> replicas, Map<Integer, Long> partitionMasters) { """ Change the replica set configuration (during or after promotion) """ return updateReplicasInternal(replicas, partitionMasters, null); }
java
public synchronized long[] updateReplicas(List<Long> replicas, Map<Integer, Long> partitionMasters) { return updateReplicasInternal(replicas, partitionMasters, null); }
[ "public", "synchronized", "long", "[", "]", "updateReplicas", "(", "List", "<", "Long", ">", "replicas", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionMasters", ")", "{", "return", "updateReplicasInternal", "(", "replicas", ",", "partitionMasters", "...
Change the replica set configuration (during or after promotion)
[ "Change", "the", "replica", "set", "configuration", "(", "during", "or", "after", "promotion", ")" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/InitiatorMailbox.java#L251-L253
aerogear/aerogear-unifiedpush-server
push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/FCMPushNotificationSender.java
FCMPushNotificationSender.sendPushMessage
@Override public void sendPushMessage(Variant variant, Collection<String> tokens, UnifiedPushMessage pushMessage, String pushMessageInformationId, NotificationSenderCallback callback) { """ Sends FCM notifications ({@link UnifiedPushMessage}) to all devices, that are represented by the {@link List} of tokens ...
java
@Override public void sendPushMessage(Variant variant, Collection<String> tokens, UnifiedPushMessage pushMessage, String pushMessageInformationId, NotificationSenderCallback callback) { // no need to send empty list if (tokens.isEmpty()) { return; } final List<String> p...
[ "@", "Override", "public", "void", "sendPushMessage", "(", "Variant", "variant", ",", "Collection", "<", "String", ">", "tokens", ",", "UnifiedPushMessage", "pushMessage", ",", "String", "pushMessageInformationId", ",", "NotificationSenderCallback", "callback", ")", "...
Sends FCM notifications ({@link UnifiedPushMessage}) to all devices, that are represented by the {@link List} of tokens for the given {@link AndroidVariant}.
[ "Sends", "FCM", "notifications", "(", "{" ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/FCMPushNotificationSender.java#L72-L137
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/update/RetireJSDataSource.java
RetireJSDataSource.initializeRetireJsRepo
private void initializeRetireJsRepo(Settings settings, URL repoUrl) throws UpdateException { """ Initializes the local RetireJS repository @param settings a reference to the dependency-check settings @param repoUrl the URL to the RetireJS repo to use @throws UpdateException thrown if there is an exception dur...
java
private void initializeRetireJsRepo(Settings settings, URL repoUrl) throws UpdateException { try { final File dataDir = settings.getDataDirectory(); final File tmpDir = settings.getTempDirectory(); boolean useProxy = false; if (null != settings.getString(Settings....
[ "private", "void", "initializeRetireJsRepo", "(", "Settings", "settings", ",", "URL", "repoUrl", ")", "throws", "UpdateException", "{", "try", "{", "final", "File", "dataDir", "=", "settings", ".", "getDataDirectory", "(", ")", ";", "final", "File", "tmpDir", ...
Initializes the local RetireJS repository @param settings a reference to the dependency-check settings @param repoUrl the URL to the RetireJS repo to use @throws UpdateException thrown if there is an exception during initialization
[ "Initializes", "the", "local", "RetireJS", "repository" ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/update/RetireJSDataSource.java#L147-L176
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileGrid
public static TileGrid getTileGrid(BoundingBox webMercatorBoundingBox, int zoom) { """ Get the tile grid that includes the entire tile bounding box @param webMercatorBoundingBox web mercator bounding box @param zoom zoom level @return tile grid """ int tilesPerSide = tilesPerSide(zoom); double t...
java
public static TileGrid getTileGrid(BoundingBox webMercatorBoundingBox, int zoom) { int tilesPerSide = tilesPerSide(zoom); double tileSize = tileSize(tilesPerSide); int minX = (int) ((webMercatorBoundingBox.getMinLongitude() + ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) / tileSize); double tempMaxX =...
[ "public", "static", "TileGrid", "getTileGrid", "(", "BoundingBox", "webMercatorBoundingBox", ",", "int", "zoom", ")", "{", "int", "tilesPerSide", "=", "tilesPerSide", "(", "zoom", ")", ";", "double", "tileSize", "=", "tileSize", "(", "tilesPerSide", ")", ";", ...
Get the tile grid that includes the entire tile bounding box @param webMercatorBoundingBox web mercator bounding box @param zoom zoom level @return tile grid
[ "Get", "the", "tile", "grid", "that", "includes", "the", "entire", "tile", "bounding", "box" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L594-L615
CycloneDX/cyclonedx-core-java
src/main/java/org/cyclonedx/BomGenerator10.java
BomGenerator10.generate
public Document generate() throws ParserConfigurationException { """ Creates a CycloneDX BoM from a set of Components. @return an XML Document representing a CycloneDX BoM @since 1.1.0 """ final DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); docFactory.setNamespaceA...
java
public Document generate() throws ParserConfigurationException { final DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); docFactory.setNamespaceAware(true); final DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); this.doc = docBuilder.newDocument(); ...
[ "public", "Document", "generate", "(", ")", "throws", "ParserConfigurationException", "{", "final", "DocumentBuilderFactory", "docFactory", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "docFactory", ".", "setNamespaceAware", "(", "true", ")", ";",...
Creates a CycloneDX BoM from a set of Components. @return an XML Document representing a CycloneDX BoM @since 1.1.0
[ "Creates", "a", "CycloneDX", "BoM", "from", "a", "set", "of", "Components", "." ]
train
https://github.com/CycloneDX/cyclonedx-core-java/blob/45f8f55a7f308f41280b834f179b48ea852b8c20/src/main/java/org/cyclonedx/BomGenerator10.java#L63-L78
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.setLocation
public void setLocation(String filename, int line) throws IOException { """ Sets the source filename and line. @param filename the filename of the source file. @param line the line of the source file. """ if (_lineMap != null && filename != null && line >= 0) { _lineMap.add(filename, line, _des...
java
public void setLocation(String filename, int line) throws IOException { if (_lineMap != null && filename != null && line >= 0) { _lineMap.add(filename, line, _destLine, _isPreferLast); } }
[ "public", "void", "setLocation", "(", "String", "filename", ",", "int", "line", ")", "throws", "IOException", "{", "if", "(", "_lineMap", "!=", "null", "&&", "filename", "!=", "null", "&&", "line", ">=", "0", ")", "{", "_lineMap", ".", "add", "(", "fil...
Sets the source filename and line. @param filename the filename of the source file. @param line the line of the source file.
[ "Sets", "the", "source", "filename", "and", "line", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L114-L119
tvesalainen/lpg
src/main/java/org/vesalainen/parser/util/Input.java
Input.getInstance
public static <T> InputReader getInstance(T input, int size, Set<ParserFeature> features) throws IOException { """ Returns InputReader for input @param <T> @param input Any supported input type @param size Ring-buffer size @param features Needed features @return @throws IOException """ return get...
java
public static <T> InputReader getInstance(T input, int size, Set<ParserFeature> features) throws IOException { return getInstance(input, size, UTF_8, features); }
[ "public", "static", "<", "T", ">", "InputReader", "getInstance", "(", "T", "input", ",", "int", "size", ",", "Set", "<", "ParserFeature", ">", "features", ")", "throws", "IOException", "{", "return", "getInstance", "(", "input", ",", "size", ",", "UTF_8", ...
Returns InputReader for input @param <T> @param input Any supported input type @param size Ring-buffer size @param features Needed features @return @throws IOException
[ "Returns", "InputReader", "for", "input" ]
train
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L217-L220
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/EventHandler.java
EventHandler.triggerBasicEvent
void triggerBasicEvent(Event.EventType type, String message, boolean flushBuffer) { """ Triggers a new BaseEvent of type @type with message @message and flushes the eventBuffer if full or @flushBuffer is true @param type event type @param message tr...
java
void triggerBasicEvent(Event.EventType type, String message, boolean flushBuffer) { Event triggeredEvent = new BasicEvent(type, message); pushEvent(triggeredEvent, flushBuffer); }
[ "void", "triggerBasicEvent", "(", "Event", ".", "EventType", "type", ",", "String", "message", ",", "boolean", "flushBuffer", ")", "{", "Event", "triggeredEvent", "=", "new", "BasicEvent", "(", "type", ",", "message", ")", ";", "pushEvent", "(", "triggeredEven...
Triggers a new BaseEvent of type @type with message @message and flushes the eventBuffer if full or @flushBuffer is true @param type event type @param message trigger message @param flushBuffer true if push the event to flush buffer
[ "Triggers", "a", "new", "BaseEvent", "of", "type", "@type", "with", "message", "@message", "and", "flushes", "the", "eventBuffer", "if", "full", "or", "@flushBuffer", "is", "true" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/EventHandler.java#L264-L271
Azure/azure-sdk-for-java
applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java
MetricsImpl.getMultipleAsync
public Observable<List<MetricsResultsItem>> getMultipleAsync(String appId, List<MetricsPostBodySchema> body) { """ Retrieve metric data. Gets metric values for multiple metrics. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param body The b...
java
public Observable<List<MetricsResultsItem>> getMultipleAsync(String appId, List<MetricsPostBodySchema> body) { return getMultipleWithServiceResponseAsync(appId, body).map(new Func1<ServiceResponse<List<MetricsResultsItem>>, List<MetricsResultsItem>>() { @Override public List<MetricsResul...
[ "public", "Observable", "<", "List", "<", "MetricsResultsItem", ">", ">", "getMultipleAsync", "(", "String", "appId", ",", "List", "<", "MetricsPostBodySchema", ">", "body", ")", "{", "return", "getMultipleWithServiceResponseAsync", "(", "appId", ",", "body", ")",...
Retrieve metric data. Gets metric values for multiple metrics. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param body The batched metrics query. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to th...
[ "Retrieve", "metric", "data", ".", "Gets", "metric", "values", "for", "multiple", "metrics", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java#L319-L326
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java
InstanceClient.detachDiskInstance
@BetaApi public final Operation detachDiskInstance(ProjectZoneInstanceName instance, String deviceName) { """ Detaches a disk from an instance. <p>Sample code: <pre><code> try (InstanceClient instanceClient = InstanceClient.create()) { ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJE...
java
@BetaApi public final Operation detachDiskInstance(ProjectZoneInstanceName instance, String deviceName) { DetachDiskInstanceHttpRequest request = DetachDiskInstanceHttpRequest.newBuilder() .setInstance(instance == null ? null : instance.toString()) .setDeviceName(deviceName) ...
[ "@", "BetaApi", "public", "final", "Operation", "detachDiskInstance", "(", "ProjectZoneInstanceName", "instance", ",", "String", "deviceName", ")", "{", "DetachDiskInstanceHttpRequest", "request", "=", "DetachDiskInstanceHttpRequest", ".", "newBuilder", "(", ")", ".", "...
Detaches a disk from an instance. <p>Sample code: <pre><code> try (InstanceClient instanceClient = InstanceClient.create()) { ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); String deviceName = ""; Operation response = instanceClient.detachDiskInstance(instance, dev...
[ "Detaches", "a", "disk", "from", "an", "instance", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java#L795-L804
treelogic-swe/aws-mock
example/java/simple/RunInstancesExample.java
RunInstancesExample.runInstances
public static List<Instance> runInstances(final String imageId, final int runCount) { """ Run some new ec2 instances. @param imageId AMI for running new instances from @param runCount count of instances to run @return a list of started instances """ // pass any credentials as aws-mock does not a...
java
public static List<Instance> runInstances(final String imageId, final int runCount) { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); ...
[ "public", "static", "List", "<", "Instance", ">", "runInstances", "(", "final", "String", "imageId", ",", "final", "int", "runCount", ")", "{", "// pass any credentials as aws-mock does not authenticate them at all", "AWSCredentials", "credentials", "=", "new", "BasicAWSC...
Run some new ec2 instances. @param imageId AMI for running new instances from @param runCount count of instances to run @return a list of started instances
[ "Run", "some", "new", "ec2", "instances", "." ]
train
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/example/java/simple/RunInstancesExample.java#L35-L56
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java
JobOperations.listJobs
public PagedList<CloudJob> listJobs() throws BatchErrorException, IOException { """ Lists the {@link CloudJob jobs} in the Batch account. @return A list of {@link CloudJob} objects. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exce...
java
public PagedList<CloudJob> listJobs() throws BatchErrorException, IOException { return listJobs(null, (Iterable<BatchClientBehavior>) null); }
[ "public", "PagedList", "<", "CloudJob", ">", "listJobs", "(", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "listJobs", "(", "null", ",", "(", "Iterable", "<", "BatchClientBehavior", ">", ")", "null", ")", ";", "}" ]
Lists the {@link CloudJob jobs} in the Batch account. @return A list of {@link CloudJob} objects. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received...
[ "Lists", "the", "{", "@link", "CloudJob", "jobs", "}", "in", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java#L158-L160
io7m/jproperties
com.io7m.jproperties.core/src/main/java/com/io7m/jproperties/JProperties.java
JProperties.getBooleanOptional
public static boolean getBooleanOptional( final Properties properties, final String key, final boolean other) throws JPropertyIncorrectType { """ <p> Returns the boolean value associated with {@code key} in the properties referenced by {@code properties} if it exists, otherwise returns {@code...
java
public static boolean getBooleanOptional( final Properties properties, final String key, final boolean other) throws JPropertyIncorrectType { Objects.requireNonNull(properties, "Properties"); Objects.requireNonNull(key, "Key"); final String text = properties.getProperty(key); if (...
[ "public", "static", "boolean", "getBooleanOptional", "(", "final", "Properties", "properties", ",", "final", "String", "key", ",", "final", "boolean", "other", ")", "throws", "JPropertyIncorrectType", "{", "Objects", ".", "requireNonNull", "(", "properties", ",", ...
<p> Returns the boolean value associated with {@code key} in the properties referenced by {@code properties} if it exists, otherwise returns {@code other}. </p> <p> A boolean value is syntactically the strings "true" or "false", case insensitive. </p> @param other The default value @param properties The loaded pr...
[ "<p", ">", "Returns", "the", "boolean", "value", "associated", "with", "{", "@code", "key", "}", "in", "the", "properties", "referenced", "by", "{", "@code", "properties", "}", "if", "it", "exists", "otherwise", "returns", "{", "@code", "other", "}", ".", ...
train
https://github.com/io7m/jproperties/blob/b188b8fd87b3b078f1e2b564a9ed5996db0becfd/com.io7m.jproperties.core/src/main/java/com/io7m/jproperties/JProperties.java#L231-L246
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java
ColorYuv.rgbToYuv
public static <T extends ImageGray<T>> void rgbToYuv(Planar<T> rgb , Planar<T> yuv) { """ Convert a 3-channel {@link Planar} image from RGB into YUV. If integer then YCbCr and not YUV. NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param yuv (Output) YUV encod...
java
public static <T extends ImageGray<T>> void rgbToYuv(Planar<T> rgb , Planar<T> yuv) { yuv.reshape(rgb.width,rgb.height,3); if( rgb.getBandType() == GrayF32.class ) { if (BoofConcurrency.USE_CONCURRENT) { ImplColorYuv_MT.rgbToYuv_F32((Planar<GrayF32>) rgb, (Planar<GrayF32>) yuv); } else { ImplColorY...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "void", "rgbToYuv", "(", "Planar", "<", "T", ">", "rgb", ",", "Planar", "<", "T", ">", "yuv", ")", "{", "yuv", ".", "reshape", "(", "rgb", ".", "width", ",", "rgb", ".", ...
Convert a 3-channel {@link Planar} image from RGB into YUV. If integer then YCbCr and not YUV. NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param yuv (Output) YUV encoded image
[ "Convert", "a", "3", "-", "channel", "{", "@link", "Planar", "}", "image", "from", "RGB", "into", "YUV", ".", "If", "integer", "then", "YCbCr", "and", "not", "YUV", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L176-L189
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(Component component, String title, Format format, String content) { """ Adds a section relating to a {@link Component}. @param component the {@link Component} the documentation content relates to @param title the section title @param format the {@link Format} o...
java
public Section addSection(Component component, String title, Format format, String content) { return add(component, title, format, content); }
[ "public", "Section", "addSection", "(", "Component", "component", ",", "String", "title", ",", "Format", "format", ",", "String", "content", ")", "{", "return", "add", "(", "component", ",", "title", ",", "format", ",", "content", ")", ";", "}" ]
Adds a section relating to a {@link Component}. @param component the {@link Component} the documentation content relates to @param title the section title @param format the {@link Format} of the documentation content @param content a String containing the documentation content @return ...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "Component", "}", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L139-L141
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/ShareLinkManager.java
ShareLinkManager.addLinkToClipBoard
@SuppressWarnings("deprecation") @SuppressLint("NewApi") private void addLinkToClipBoard(String url, String label) { """ Adds a given link to the clip board. @param url A {@link String} to add to the clip board @param label A {@link String} label for the adding link """ int sdk = android....
java
@SuppressWarnings("deprecation") @SuppressLint("NewApi") private void addLinkToClipBoard(String url, String label) { int sdk = android.os.Build.VERSION.SDK_INT; if (sdk < android.os.Build.VERSION_CODES.HONEYCOMB) { android.text.ClipboardManager clipboard = (android.text.ClipboardMana...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "@", "SuppressLint", "(", "\"NewApi\"", ")", "private", "void", "addLinkToClipBoard", "(", "String", "url", ",", "String", "label", ")", "{", "int", "sdk", "=", "android", ".", "os", ".", "Build", ".", ...
Adds a given link to the clip board. @param url A {@link String} to add to the clip board @param label A {@link String} label for the adding link
[ "Adds", "a", "given", "link", "to", "the", "clip", "board", "." ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/ShareLinkManager.java#L345-L358
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_seeOffers_GET
public ArrayList<OvhPackOffer> serviceName_seeOffers_GET(String serviceName, OvhCountryEnum countryCurrencyPrice, net.minidev.ovh.api.sms.OvhCountryEnum countryDestination, OvhPackQuantityEnum quantity) throws IOException { """ Describe SMS offers available. REST: GET /sms/{serviceName}/seeOffers @param countr...
java
public ArrayList<OvhPackOffer> serviceName_seeOffers_GET(String serviceName, OvhCountryEnum countryCurrencyPrice, net.minidev.ovh.api.sms.OvhCountryEnum countryDestination, OvhPackQuantityEnum quantity) throws IOException { String qPath = "/sms/{serviceName}/seeOffers"; StringBuilder sb = path(qPath, serviceName); ...
[ "public", "ArrayList", "<", "OvhPackOffer", ">", "serviceName_seeOffers_GET", "(", "String", "serviceName", ",", "OvhCountryEnum", "countryCurrencyPrice", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "sms", ".", "OvhCountryEnum", "countryDestination", ",...
Describe SMS offers available. REST: GET /sms/{serviceName}/seeOffers @param countryCurrencyPrice [required] Filter to have the currency country prices @param countryDestination [required] Filter to have the country destination @param quantity [required] Sms pack offer quantity @param serviceName [required] The intern...
[ "Describe", "SMS", "offers", "available", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L1457-L1465
openengsb/openengsb
components/services/src/main/java/org/openengsb/core/services/xlink/XLinkUtils.java
XLinkUtils.getClassOfOpenEngSBModel
public static Class getClassOfOpenEngSBModel(String clazz, String version, OsgiUtilsService serviceFinder) throws ClassNotFoundException { """ Returns the Classobject to a given clazzString and a given version. Throws a ClassNotFoundException if the Class/Version pair is not found. ""...
java
public static Class getClassOfOpenEngSBModel(String clazz, String version, OsgiUtilsService serviceFinder) throws ClassNotFoundException { ModelRegistry registry = serviceFinder.getService(ModelRegistry.class); ModelDescription modelDescription = new ModelDescription(clazz, vers...
[ "public", "static", "Class", "getClassOfOpenEngSBModel", "(", "String", "clazz", ",", "String", "version", ",", "OsgiUtilsService", "serviceFinder", ")", "throws", "ClassNotFoundException", "{", "ModelRegistry", "registry", "=", "serviceFinder", ".", "getService", "(", ...
Returns the Classobject to a given clazzString and a given version. Throws a ClassNotFoundException if the Class/Version pair is not found.
[ "Returns", "the", "Classobject", "to", "a", "given", "clazzString", "and", "a", "given", "version", ".", "Throws", "a", "ClassNotFoundException", "if", "the", "Class", "/", "Version", "pair", "is", "not", "found", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/services/src/main/java/org/openengsb/core/services/xlink/XLinkUtils.java#L152-L159
forge/javaee-descriptors
impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/validationMapping11/ValidationMappingDescriptorImpl.java
ValidationMappingDescriptorImpl.addNamespace
public ValidationMappingDescriptor addNamespace(String name, String value) { """ Adds a new namespace @return the current instance of <code>ValidationMappingDescriptor</code> """ model.attribute(name, value); return this; }
java
public ValidationMappingDescriptor addNamespace(String name, String value) { model.attribute(name, value); return this; }
[ "public", "ValidationMappingDescriptor", "addNamespace", "(", "String", "name", ",", "String", "value", ")", "{", "model", ".", "attribute", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a new namespace @return the current instance of <code>ValidationMappingDescriptor</code>
[ "Adds", "a", "new", "namespace" ]
train
https://github.com/forge/javaee-descriptors/blob/cb914330a1a0b04bfc1d0f199bd9cde3bbf0b3ed/impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/validationMapping11/ValidationMappingDescriptorImpl.java#L84-L88
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/MDWMessageProducer.java
MDWMessageProducer.broadcastMessageToTopic
public void broadcastMessageToTopic(String dest, String requestMessage) { """ Broadcast a message to a specific topic @param dest @param requestMessage """ jmsTopicTemplate.setDeliveryPersistent(true); jmsTopicTemplate.send(dest, new MDWMessageCreator(requestMessage)); }
java
public void broadcastMessageToTopic(String dest, String requestMessage) { jmsTopicTemplate.setDeliveryPersistent(true); jmsTopicTemplate.send(dest, new MDWMessageCreator(requestMessage)); }
[ "public", "void", "broadcastMessageToTopic", "(", "String", "dest", ",", "String", "requestMessage", ")", "{", "jmsTopicTemplate", ".", "setDeliveryPersistent", "(", "true", ")", ";", "jmsTopicTemplate", ".", "send", "(", "dest", ",", "new", "MDWMessageCreator", "...
Broadcast a message to a specific topic @param dest @param requestMessage
[ "Broadcast", "a", "message", "to", "a", "specific", "topic" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/MDWMessageProducer.java#L85-L89
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/barcode/BarcodeUtils.java
BarcodeUtils.parseActivityResult
public static BarcodeIntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) { """ <p> Call this from your {@link Activity}'s {@link Activity#onActivityResult(int, int, Intent)} method. </p> @param requestCode @param resultCode @param intent @return null if the event handled here w...
java
public static BarcodeIntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK) { String contents = intent.getStringExtra(SCAN_RESULT); String formatName = intent.getStringExtra(SCAN_RESULT_FORMAT); return new Barcod...
[ "public", "static", "BarcodeIntentResult", "parseActivityResult", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "intent", ")", "{", "if", "(", "requestCode", "==", "REQUEST_CODE", "&&", "resultCode", "==", "Activity", ".", "RESULT_OK", ")", ...
<p> Call this from your {@link Activity}'s {@link Activity#onActivityResult(int, int, Intent)} method. </p> @param requestCode @param resultCode @param intent @return null if the event handled here was not related to this class, or else an {@link BarcodeIntentResult} containing the result of the scan. If the user canc...
[ "<p", ">", "Call", "this", "from", "your", "{", "@link", "Activity", "}", "s", "{", "@link", "Activity#onActivityResult", "(", "int", "int", "Intent", ")", "}", "method", ".", "<", "/", "p", ">" ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/barcode/BarcodeUtils.java#L57-L64
scireum/s3ninja
src/main/java/ninja/S3Dispatcher.java
S3Dispatcher.putObject
private void putObject(WebContext ctx, Bucket bucket, String id, InputStreamHandler inputStream) throws IOException { """ Handles PUT /bucket/id @param ctx the context describing the current request @param bucket the bucket containing the object to upload @param id name of the object to upl...
java
private void putObject(WebContext ctx, Bucket bucket, String id, InputStreamHandler inputStream) throws IOException { StoredObject object = bucket.getObject(id); if (inputStream == null) { signalObjectError(ctx, HttpResponseStatus.BAD_REQUEST, "No content posted"); re...
[ "private", "void", "putObject", "(", "WebContext", "ctx", ",", "Bucket", "bucket", ",", "String", "id", ",", "InputStreamHandler", "inputStream", ")", "throws", "IOException", "{", "StoredObject", "object", "=", "bucket", ".", "getObject", "(", "id", ")", ";",...
Handles PUT /bucket/id @param ctx the context describing the current request @param bucket the bucket containing the object to upload @param id name of the object to upload
[ "Handles", "PUT", "/", "bucket", "/", "id" ]
train
https://github.com/scireum/s3ninja/blob/445eec55c91780267a7f987818b3fedecae009c5/src/main/java/ninja/S3Dispatcher.java#L492-L530
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java
AsmInvokeDistributeFactory.buildMethod
private static void buildMethod(ClassWriter cw, String className, Class<?> parentClass) { """ 构建{@link InvokeDistribute#invoke(String, String, String, Object[]) invoke}方法 @param cw ClassWriter @param className 生成的类名 @param parentClass 父类 """ /* Build method */ MethodVisitor mv = cw.visitMeth...
java
private static void buildMethod(ClassWriter cw, String className, Class<?> parentClass) { /* Build method */ MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, // public method DISTRIBUTE_METHOD_NAME, // name DISTRIBUTE_METHOD_DESC, // descriptor null, // signature (null m...
[ "private", "static", "void", "buildMethod", "(", "ClassWriter", "cw", ",", "String", "className", ",", "Class", "<", "?", ">", "parentClass", ")", "{", "/* Build method */", "MethodVisitor", "mv", "=", "cw", ".", "visitMethod", "(", "ACC_PUBLIC", ",", "// publ...
构建{@link InvokeDistribute#invoke(String, String, String, Object[]) invoke}方法 @param cw ClassWriter @param className 生成的类名 @param parentClass 父类
[ "构建", "{" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java#L160-L227
belaban/JGroups
src/org/jgroups/protocols/pbcast/Merger.java
Merger.handleMergeRequest
public void handleMergeRequest(Address sender, MergeId merge_id, Collection<? extends Address> mbrs) { """ Get the view and digest and send back both (MergeData) in the form of a MERGE_RSP to the sender. If a merge is already in progress, send back a MergeData with the merge_rejected field set to true. @param se...
java
public void handleMergeRequest(Address sender, MergeId merge_id, Collection<? extends Address> mbrs) { try { _handleMergeRequest(sender, merge_id, mbrs); } catch(Throwable t) { log.error("%s: failure handling the merge request: %s", gms.local_addr, t.getMessage()); ...
[ "public", "void", "handleMergeRequest", "(", "Address", "sender", ",", "MergeId", "merge_id", ",", "Collection", "<", "?", "extends", "Address", ">", "mbrs", ")", "{", "try", "{", "_handleMergeRequest", "(", "sender", ",", "merge_id", ",", "mbrs", ")", ";", ...
Get the view and digest and send back both (MergeData) in the form of a MERGE_RSP to the sender. If a merge is already in progress, send back a MergeData with the merge_rejected field set to true. @param sender The address of the merge leader @param merge_id The merge ID @param mbrs The set of members from which we exp...
[ "Get", "the", "view", "and", "digest", "and", "send", "back", "both", "(", "MergeData", ")", "in", "the", "form", "of", "a", "MERGE_RSP", "to", "the", "sender", ".", "If", "a", "merge", "is", "already", "in", "progress", "send", "back", "a", "MergeData...
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/protocols/pbcast/Merger.java#L111-L120
tumblr/jumblr
src/main/java/com/tumblr/jumblr/request/RequestBuilder.java
RequestBuilder.postXAuth
public Token postXAuth(final String email, final String password) { """ Posts an XAuth request. A new method is needed because the response from the server is not a standard Tumblr JSON response. @param email the user's login email. @param password the user's password. @return the login token. """ ...
java
public Token postXAuth(final String email, final String password) { OAuthRequest request = constructXAuthPost(email, password); setToken("", ""); // Empty token is required for Scribe to execute XAuth. sign(request); return clearXAuth(request.send()); }
[ "public", "Token", "postXAuth", "(", "final", "String", "email", ",", "final", "String", "password", ")", "{", "OAuthRequest", "request", "=", "constructXAuthPost", "(", "email", ",", "password", ")", ";", "setToken", "(", "\"\"", ",", "\"\"", ")", ";", "/...
Posts an XAuth request. A new method is needed because the response from the server is not a standard Tumblr JSON response. @param email the user's login email. @param password the user's password. @return the login token.
[ "Posts", "an", "XAuth", "request", ".", "A", "new", "method", "is", "needed", "because", "the", "response", "from", "the", "server", "is", "not", "a", "standard", "Tumblr", "JSON", "response", "." ]
train
https://github.com/tumblr/jumblr/blob/373629fd545defb016e227ea758f092507fbd624/src/main/java/com/tumblr/jumblr/request/RequestBuilder.java#L74-L79
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/index/IndexManager.java
IndexManager.fetchRelation
public final Map<String, Object> fetchRelation(Class<?> clazz, String query) { """ Searches on the index. Note: Query must be in Indexer's understandable format @param query the query @return the list """ // TODO: need to return list. return search(clazz, query, Constants.INVALID, Constan...
java
public final Map<String, Object> fetchRelation(Class<?> clazz, String query) { // TODO: need to return list. return search(clazz, query, Constants.INVALID, Constants.INVALID, true); }
[ "public", "final", "Map", "<", "String", ",", "Object", ">", "fetchRelation", "(", "Class", "<", "?", ">", "clazz", ",", "String", "query", ")", "{", "// TODO: need to return list.", "return", "search", "(", "clazz", ",", "query", ",", "Constants", ".", "I...
Searches on the index. Note: Query must be in Indexer's understandable format @param query the query @return the list
[ "Searches", "on", "the", "index", ".", "Note", ":", "Query", "must", "be", "in", "Indexer", "s", "understandable", "format" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/index/IndexManager.java#L327-L331
lightbend/config
config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java
ConfigDocumentFactory.parseFile
public static ConfigDocument parseFile(File file, ConfigParseOptions options) { """ Parses a file into a ConfigDocument instance. @param file the file to parse @param options parse options to control how the file is interpreted @return the parsed configuration @throws com.typesafe.config.ConfigException on...
java
public static ConfigDocument parseFile(File file, ConfigParseOptions options) { return Parseable.newFile(file, options).parseConfigDocument(); }
[ "public", "static", "ConfigDocument", "parseFile", "(", "File", "file", ",", "ConfigParseOptions", "options", ")", "{", "return", "Parseable", ".", "newFile", "(", "file", ",", "options", ")", ".", "parseConfigDocument", "(", ")", ";", "}" ]
Parses a file into a ConfigDocument instance. @param file the file to parse @param options parse options to control how the file is interpreted @return the parsed configuration @throws com.typesafe.config.ConfigException on IO or parse errors
[ "Parses", "a", "file", "into", "a", "ConfigDocument", "instance", "." ]
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L54-L56
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java
HBaseSchemaManager.getTableDescriptor
private HTableDescriptor getTableDescriptor(Class<?> clazz, EntityType<?> entityType, String tableName) { """ Gets the table descriptor. @param clazz the clazz @param entityType the entity type @param tableName the table name @return the table descriptor """ try { AbstractM...
java
private HTableDescriptor getTableDescriptor(Class<?> clazz, EntityType<?> entityType, String tableName) { try { AbstractManagedType<?> ent = (AbstractManagedType<?>) entityType; HTableDescriptor tableDescriptor = null; String hTableName = HBaseUtils.getHTableName(...
[ "private", "HTableDescriptor", "getTableDescriptor", "(", "Class", "<", "?", ">", "clazz", ",", "EntityType", "<", "?", ">", "entityType", ",", "String", "tableName", ")", "{", "try", "{", "AbstractManagedType", "<", "?", ">", "ent", "=", "(", "AbstractManag...
Gets the table descriptor. @param clazz the clazz @param entityType the entity type @param tableName the table name @return the table descriptor
[ "Gets", "the", "table", "descriptor", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java#L300-L331
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreRow.java
UserCoreRow.copyValue
protected Object copyValue(TColumn column, Object value) { """ Copy the value of the data type @param column table column @param value value @return copy value """ Object copyValue = value; switch (column.getDataType()) { case BLOB: if (value instanceof byte[]) { byte[] bytes = (byte[]) ...
java
protected Object copyValue(TColumn column, Object value) { Object copyValue = value; switch (column.getDataType()) { case BLOB: if (value instanceof byte[]) { byte[] bytes = (byte[]) value; copyValue = Arrays.copyOf(bytes, bytes.length); } else { throw new GeoPackageException( "Unsuppor...
[ "protected", "Object", "copyValue", "(", "TColumn", "column", ",", "Object", "value", ")", "{", "Object", "copyValue", "=", "value", ";", "switch", "(", "column", ".", "getDataType", "(", ")", ")", "{", "case", "BLOB", ":", "if", "(", "value", "instanceo...
Copy the value of the data type @param column table column @param value value @return copy value
[ "Copy", "the", "value", "of", "the", "data", "type" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreRow.java#L98-L131
aeshell/aesh-readline
readline/src/main/java/org/aesh/readline/cursor/CursorLocator.java
CursorLocator.locate
public CursorLocation locate(int index, int width) { """ The core logic of the locator. Map a command index onto an absolute COL/ROW cursor location. @param index The commnd index. @param width The terminal width. @return """ // Upper lines location has been lost. if (isLocationInvalidate...
java
public CursorLocation locate(int index, int width) { // Upper lines location has been lost. if (isLocationInvalidated()) { return null; } int cumulated = 0; List<Integer> allLines = new ArrayList<>(); allLines.addAll(linesSize); allLines.add(buffer.le...
[ "public", "CursorLocation", "locate", "(", "int", "index", ",", "int", "width", ")", "{", "// Upper lines location has been lost.", "if", "(", "isLocationInvalidated", "(", ")", ")", "{", "return", "null", ";", "}", "int", "cumulated", "=", "0", ";", "List", ...
The core logic of the locator. Map a command index onto an absolute COL/ROW cursor location. @param index The commnd index. @param width The terminal width. @return
[ "The", "core", "logic", "of", "the", "locator", ".", "Map", "a", "command", "index", "onto", "an", "absolute", "COL", "/", "ROW", "cursor", "location", "." ]
train
https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/cursor/CursorLocator.java#L63-L100
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java
PainterExtensions.getCompoundPainter
@SuppressWarnings("rawtypes") public static CompoundPainter getCompoundPainter(final Color matte, final Color gloss, final GlossPainter.GlossPosition position, final double angle, final Color pinstripe) { """ Gets a CompoundPainter object. @param matte the matte color @param gloss the gloss color @para...
java
@SuppressWarnings("rawtypes") public static CompoundPainter getCompoundPainter(final Color matte, final Color gloss, final GlossPainter.GlossPosition position, final double angle, final Color pinstripe) { final MattePainter mp = new MattePainter(matte); final GlossPainter gp = new GlossPainter(gloss, posit...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "CompoundPainter", "getCompoundPainter", "(", "final", "Color", "matte", ",", "final", "Color", "gloss", ",", "final", "GlossPainter", ".", "GlossPosition", "position", ",", "final", "double", ...
Gets a CompoundPainter object. @param matte the matte color @param gloss the gloss color @param position the position @param angle the angle @param pinstripe the pinstripe painter @return the CompoundPainter object.
[ "Gets", "a", "CompoundPainter", "object", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java#L56-L66
ysc/word
src/main/java/org/apdplat/word/analysis/JaroDistanceTextSimilarity.java
JaroDistanceTextSimilarity.getCharacterConjunction
private String getCharacterConjunction(String text1, String text2, int windowLength) { """ 获取两段文本的共有字符即字符交集 @param text1 文本1 @param text2 文本2 @param windowLength 字符交集窗口大小 @return 字符交集 """ StringBuilder conjunction = new StringBuilder(); StringBuilder target = new StringBuilder(text2); ...
java
private String getCharacterConjunction(String text1, String text2, int windowLength) { StringBuilder conjunction = new StringBuilder(); StringBuilder target = new StringBuilder(text2); int len1 = text1.length(); for (int i = 0; i < len1; i++) { char source = text1.charAt(i); ...
[ "private", "String", "getCharacterConjunction", "(", "String", "text1", ",", "String", "text2", ",", "int", "windowLength", ")", "{", "StringBuilder", "conjunction", "=", "new", "StringBuilder", "(", ")", ";", "StringBuilder", "target", "=", "new", "StringBuilder"...
获取两段文本的共有字符即字符交集 @param text1 文本1 @param text2 文本2 @param windowLength 字符交集窗口大小 @return 字符交集
[ "获取两段文本的共有字符即字符交集" ]
train
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/analysis/JaroDistanceTextSimilarity.java#L106-L124
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java
Jdt2Ecore.getJvmConstructor
public JvmConstructor getJvmConstructor(IMethod constructor, XtendTypeDeclaration context) throws JavaModelException { """ Create the JvmConstructor for the given JDT constructor. @param constructor the JDT constructor. @param context the context of the constructor. @return the JvmConstructor @throws Java...
java
public JvmConstructor getJvmConstructor(IMethod constructor, XtendTypeDeclaration context) throws JavaModelException { if (constructor.isConstructor()) { final JvmType type = this.typeReferences.findDeclaredType( constructor.getDeclaringType().getFullyQualifiedName(), context); if (type instanceof ...
[ "public", "JvmConstructor", "getJvmConstructor", "(", "IMethod", "constructor", ",", "XtendTypeDeclaration", "context", ")", "throws", "JavaModelException", "{", "if", "(", "constructor", ".", "isConstructor", "(", ")", ")", "{", "final", "JvmType", "type", "=", "...
Create the JvmConstructor for the given JDT constructor. @param constructor the JDT constructor. @param context the context of the constructor. @return the JvmConstructor @throws JavaModelException if the Java model is invalid.
[ "Create", "the", "JvmConstructor", "for", "the", "given", "JDT", "constructor", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java#L365-L387
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/HighTideShell.java
HighTideShell.showConfig
private int showConfig(String cmd, String argv[], int startindex) throws IOException { """ Apply operation specified by 'cmd' on all parameters starting from argv[startindex]. """ int exitCode = 0; PolicyInfo[] all = hightidenode.getAllPolicies(); for (int i = 0; i < all.length; i++) { Syste...
java
private int showConfig(String cmd, String argv[], int startindex) throws IOException { int exitCode = 0; PolicyInfo[] all = hightidenode.getAllPolicies(); for (int i = 0; i < all.length; i++) { System.out.println(all[i]); } return exitCode; }
[ "private", "int", "showConfig", "(", "String", "cmd", ",", "String", "argv", "[", "]", ",", "int", "startindex", ")", "throws", "IOException", "{", "int", "exitCode", "=", "0", ";", "PolicyInfo", "[", "]", "all", "=", "hightidenode", ".", "getAllPolicies",...
Apply operation specified by 'cmd' on all parameters starting from argv[startindex].
[ "Apply", "operation", "specified", "by", "cmd", "on", "all", "parameters", "starting", "from", "argv", "[", "startindex", "]", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/HighTideShell.java#L241-L248
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.beginCreateImportOperationAsync
public Observable<ImportExportResponseInner> beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { """ Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. @param resourc...
java
public Observable<ImportExportResponseInner> beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { return beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<Ser...
[ "public", "Observable", "<", "ImportExportResponseInner", ">", "beginCreateImportOperationAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "ImportExtensionRequest", "parameters", ")", "{", "return", "beginCreateImp...
Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. @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. @p...
[ "Creates", "an", "import", "operation", "that", "imports", "a", "bacpac", "into", "an", "existing", "database", ".", "The", "existing", "database", "must", "be", "empty", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L2024-L2031
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualHubsInner.java
VirtualHubsInner.beginUpdateTagsAsync
public Observable<VirtualHubInner> beginUpdateTagsAsync(String resourceGroupName, String virtualHubName, Map<String, String> tags) { """ Updates VirtualHub tags. @param resourceGroupName The resource group name of the VirtualHub. @param virtualHubName The name of the VirtualHub. @param tags Resource tags. @t...
java
public Observable<VirtualHubInner> beginUpdateTagsAsync(String resourceGroupName, String virtualHubName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags).map(new Func1<ServiceResponse<VirtualHubInner>, VirtualHubInner>() { @Override ...
[ "public", "Observable", "<", "VirtualHubInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualHubName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(",...
Updates VirtualHub tags. @param resourceGroupName The resource group name of the VirtualHub. @param virtualHubName The name of the VirtualHub. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualHubInner object
[ "Updates", "VirtualHub", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualHubsInner.java#L629-L636
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/types/StringValue.java
StringValue.setValue
public void setValue(char[] chars, int offset, int len) { """ Sets the value of the StringValue to a substring of the given value. @param chars The new string value (as a character array). @param offset The position to start the substring. @param len The length of the substring. """ Validate.notNull(cha...
java
public void setValue(char[] chars, int offset, int len) { Validate.notNull(chars); if (offset < 0 || len < 0 || offset > chars.length - len) { throw new IndexOutOfBoundsException(); } ensureSize(len); System.arraycopy(chars, offset, this.value, 0, len); this.len = len; this.hashCode = 0; }
[ "public", "void", "setValue", "(", "char", "[", "]", "chars", ",", "int", "offset", ",", "int", "len", ")", "{", "Validate", ".", "notNull", "(", "chars", ")", ";", "if", "(", "offset", "<", "0", "||", "len", "<", "0", "||", "offset", ">", "chars...
Sets the value of the StringValue to a substring of the given value. @param chars The new string value (as a character array). @param offset The position to start the substring. @param len The length of the substring.
[ "Sets", "the", "value", "of", "the", "StringValue", "to", "a", "substring", "of", "the", "given", "value", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/types/StringValue.java#L216-L226
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Assert.java
Assert.notEmpty
public static void notEmpty(Collection collection, String message) { """ Assert that a collection has elements; that is, it must not be <code>null</code> and must have at least one element. <pre class="code">Assert.notEmpty(collection, "Collection must have elements");</pre> @param collection the collection to ...
java
public static void notEmpty(Collection collection, String message) { if (Collections.isEmpty(collection)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "notEmpty", "(", "Collection", "collection", ",", "String", "message", ")", "{", "if", "(", "Collections", ".", "isEmpty", "(", "collection", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}"...
Assert that a collection has elements; that is, it must not be <code>null</code> and must have at least one element. <pre class="code">Assert.notEmpty(collection, "Collection must have elements");</pre> @param collection the collection to check @param message the exception message to use if the assertion fails @throws ...
[ "Assert", "that", "a", "collection", "has", "elements", ";", "that", "is", "it", "must", "not", "be", "<code", ">", "null<", "/", "code", ">", "and", "must", "have", "at", "least", "one", "element", ".", "<pre", "class", "=", "code", ">", "Assert", "...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Assert.java#L242-L246
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/libs/modules/GridNode.java
GridNode.getSurroundingNodes
public List<GridNode> getSurroundingNodes() { """ Gets all surrounding {@link GridNode nodes}, starting from the most eastern. Note that the list contains all 8 directions, but some might be null, if outside a boundary @return the nodes surrounding the current node. """ List<GridNode> nodes = new...
java
public List<GridNode> getSurroundingNodes() { List<GridNode> nodes = new ArrayList<GridNode>(); Direction[] orderedDirs = Direction.getOrderedDirs(); for( int i = 0; i < orderedDirs.length; i++ ) { Direction direction = orderedDirs[i]; int newCol = col + direction.col; ...
[ "public", "List", "<", "GridNode", ">", "getSurroundingNodes", "(", ")", "{", "List", "<", "GridNode", ">", "nodes", "=", "new", "ArrayList", "<", "GridNode", ">", "(", ")", ";", "Direction", "[", "]", "orderedDirs", "=", "Direction", ".", "getOrderedDirs"...
Gets all surrounding {@link GridNode nodes}, starting from the most eastern. Note that the list contains all 8 directions, but some might be null, if outside a boundary @return the nodes surrounding the current node.
[ "Gets", "all", "surrounding", "{", "@link", "GridNode", "nodes", "}", "starting", "from", "the", "most", "eastern", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/libs/modules/GridNode.java#L383-L402
cchantep/acolyte
jdbc-driver/src/main/java/acolyte/jdbc/Connection.java
Connection.prepareStatement
public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability) throws SQLException { ...
java
public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability) throws SQLException { ...
[ "public", "PreparedStatement", "prepareStatement", "(", "final", "String", "sql", ",", "final", "int", "resultSetType", ",", "final", "int", "resultSetConcurrency", ",", "final", "int", "resultSetHoldability", ")", "throws", "SQLException", "{", "if", "(", "resultSe...
{@inheritDoc} @throws java.sql.SQLFeatureNotSupportedException if |resultSetHoldability| is not ResultSet.CLOSE_CURSORS_AT_COMMIT
[ "{" ]
train
https://github.com/cchantep/acolyte/blob/a383dff20fadc08ec9306f2f1f24b2a7e0047449/jdbc-driver/src/main/java/acolyte/jdbc/Connection.java#L504-L515
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.listPools
public PagedList<CloudPool> listPools(DetailLevel detailLevel) throws BatchErrorException, IOException { """ Lists the {@link CloudPool pools} in the Batch account. @param detailLevel A {@link DetailLevel} used for filtering the list and for controlling which properties are retrieved from the service. @retur...
java
public PagedList<CloudPool> listPools(DetailLevel detailLevel) throws BatchErrorException, IOException { return listPools(detailLevel, null); }
[ "public", "PagedList", "<", "CloudPool", ">", "listPools", "(", "DetailLevel", "detailLevel", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "listPools", "(", "detailLevel", ",", "null", ")", ";", "}" ]
Lists the {@link CloudPool pools} in the Batch account. @param detailLevel A {@link DetailLevel} used for filtering the list and for controlling which properties are retrieved from the service. @return A list of {@link CloudPool} objects. @throws BatchErrorException Exception thrown when an error response is received ...
[ "Lists", "the", "{", "@link", "CloudPool", "pools", "}", "in", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L120-L122
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java
FrameworkProjectConfig.createDirectProjectPropertyLookup
private static PropertyLookup createDirectProjectPropertyLookup( IFilesystemFramework filesystemFramework, String projectName ) { """ Create PropertyLookup for a project from the framework basedir @param filesystemFramework the filesystem """ PropertyLookup lookup; ...
java
private static PropertyLookup createDirectProjectPropertyLookup( IFilesystemFramework filesystemFramework, String projectName ) { PropertyLookup lookup; final Properties ownProps = new Properties(); ownProps.setProperty("project.name", projectName); File ...
[ "private", "static", "PropertyLookup", "createDirectProjectPropertyLookup", "(", "IFilesystemFramework", "filesystemFramework", ",", "String", "projectName", ")", "{", "PropertyLookup", "lookup", ";", "final", "Properties", "ownProps", "=", "new", "Properties", "(", ")", ...
Create PropertyLookup for a project from the framework basedir @param filesystemFramework the filesystem
[ "Create", "PropertyLookup", "for", "a", "project", "from", "the", "framework", "basedir" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java#L283-L301
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.nlerpIterative
public Quaternionf nlerpIterative(Quaternionfc q, float alpha, float dotThreshold) { """ Compute linear (non-spherical) interpolations of <code>this</code> and the given quaternion <code>q</code> iteratively and store the result in <code>this</code>. <p> This method performs a series of small-step nlerp interpo...
java
public Quaternionf nlerpIterative(Quaternionfc q, float alpha, float dotThreshold) { return nlerpIterative(q, alpha, dotThreshold, this); }
[ "public", "Quaternionf", "nlerpIterative", "(", "Quaternionfc", "q", ",", "float", "alpha", ",", "float", "dotThreshold", ")", "{", "return", "nlerpIterative", "(", "q", ",", "alpha", ",", "dotThreshold", ",", "this", ")", ";", "}" ]
Compute linear (non-spherical) interpolations of <code>this</code> and the given quaternion <code>q</code> iteratively and store the result in <code>this</code>. <p> This method performs a series of small-step nlerp interpolations to avoid doing a costly spherical linear interpolation, like {@link #slerp(Quaternionfc, ...
[ "Compute", "linear", "(", "non", "-", "spherical", ")", "interpolations", "of", "<code", ">", "this<", "/", "code", ">", "and", "the", "given", "quaternion", "<code", ">", "q<", "/", "code", ">", "iteratively", "and", "store", "the", "result", "in", "<co...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L2032-L2034
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java
CommerceSubscriptionEntryPersistenceImpl.findAll
@Override public List<CommerceSubscriptionEntry> findAll() { """ Returns all the commerce subscription entries. @return the commerce subscription entries """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceSubscriptionEntry> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceSubscriptionEntry", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce subscription entries. @return the commerce subscription entries
[ "Returns", "all", "the", "commerce", "subscription", "entries", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java#L4125-L4128
alkacon/opencms-core
src/org/opencms/workplace/CmsDialog.java
CmsDialog.pageHtml
public String pageHtml(int segment, String helpUrl, String title) { """ Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.<p> This overloads the default method of the parent class.<p> @param segment the HTML segment (START / END) @param helpUrl the...
java
public String pageHtml(int segment, String helpUrl, String title) { if (segment == HTML_START) { String stylesheet = null; if (isPopup() && !useNewStyle()) { stylesheet = "popup.css"; } StringBuffer result = new StringBuffer(pageHtmlStyle(segment,...
[ "public", "String", "pageHtml", "(", "int", "segment", ",", "String", "helpUrl", ",", "String", "title", ")", "{", "if", "(", "segment", "==", "HTML_START", ")", "{", "String", "stylesheet", "=", "null", ";", "if", "(", "isPopup", "(", ")", "&&", "!", ...
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.<p> This overloads the default method of the parent class.<p> @param segment the HTML segment (START / END) @param helpUrl the url for the online help to include on the page @param title the title for the page...
[ "Builds", "the", "start", "html", "of", "the", "page", "including", "setting", "of", "DOCTYPE", "and", "inserting", "a", "header", "with", "the", "content", "-", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsDialog.java#L1476-L1510
Frostman/dropbox4j
src/main/java/ru/frostman/dropbox/api/DropboxClient.java
DropboxClient.getAccountInfo
public AccountInfo getAccountInfo() { """ Returns information about current user's account. @return info about user's account @see AccountInfo """ OAuthRequest request = new OAuthRequest(Verb.GET, INFO_URL); service.signRequest(accessToken, request); String content = check(request...
java
public AccountInfo getAccountInfo() { OAuthRequest request = new OAuthRequest(Verb.GET, INFO_URL); service.signRequest(accessToken, request); String content = check(request.send()).getBody(); return Json.parse(content, AccountInfo.class); }
[ "public", "AccountInfo", "getAccountInfo", "(", ")", "{", "OAuthRequest", "request", "=", "new", "OAuthRequest", "(", "Verb", ".", "GET", ",", "INFO_URL", ")", ";", "service", ".", "signRequest", "(", "accessToken", ",", "request", ")", ";", "String", "conte...
Returns information about current user's account. @return info about user's account @see AccountInfo
[ "Returns", "information", "about", "current", "user", "s", "account", "." ]
train
https://github.com/Frostman/dropbox4j/blob/774c817e5bf294d0139ecb5ac81399be50ada5e0/src/main/java/ru/frostman/dropbox/api/DropboxClient.java#L85-L91
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/topicAccess/TopicAccessManager.java
TopicAccessManager.checkAccessTopicFromJsTopicControls
boolean checkAccessTopicFromJsTopicControls(UserContext ctx, String topic) throws IllegalAccessException { """ Check if specific access control is allowed @param ctx @param topic @return true if at least one specific topicAccessControl exist @throws IllegalAccessException """ logger.debug("Looking for ac...
java
boolean checkAccessTopicFromJsTopicControls(UserContext ctx, String topic) throws IllegalAccessException { logger.debug("Looking for accessController for topic '{}' from JsTopicControls annotation", topic); Instance<JsTopicAccessController> select = topicAccessController.select(new JsTopicCtrlsAnnotationLiteral());...
[ "boolean", "checkAccessTopicFromJsTopicControls", "(", "UserContext", "ctx", ",", "String", "topic", ")", "throws", "IllegalAccessException", "{", "logger", ".", "debug", "(", "\"Looking for accessController for topic '{}' from JsTopicControls annotation\"", ",", "topic", ")", ...
Check if specific access control is allowed @param ctx @param topic @return true if at least one specific topicAccessControl exist @throws IllegalAccessException
[ "Check", "if", "specific", "access", "control", "is", "allowed" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/topicAccess/TopicAccessManager.java#L93-L100
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/countup/MaterialCountUp.java
MaterialCountUp.setValue
public void setValue(Double value, boolean fireEvents, boolean autoStart) { """ Provide a better control whether you want to automatically start the counting of the new value. By Default it will start counting with the given value. """ super.setValue(value, fireEvents); setEndValue(value); ...
java
public void setValue(Double value, boolean fireEvents, boolean autoStart) { super.setValue(value, fireEvents); setEndValue(value); if (autoStart) { start(); } }
[ "public", "void", "setValue", "(", "Double", "value", ",", "boolean", "fireEvents", ",", "boolean", "autoStart", ")", "{", "super", ".", "setValue", "(", "value", ",", "fireEvents", ")", ";", "setEndValue", "(", "value", ")", ";", "if", "(", "autoStart", ...
Provide a better control whether you want to automatically start the counting of the new value. By Default it will start counting with the given value.
[ "Provide", "a", "better", "control", "whether", "you", "want", "to", "automatically", "start", "the", "counting", "of", "the", "new", "value", ".", "By", "Default", "it", "will", "start", "counting", "with", "the", "given", "value", "." ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/countup/MaterialCountUp.java#L136-L143
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.getField
public static Field getField(Class<?> type, String fieldName) { """ Convenience method to get a field from a class type. <p> The method will first try to look for a declared field in the same class. If the field is not declared in this class it will look for the field in the super class. This will continue thr...
java
public static Field getField(Class<?> type, String fieldName) { return WhiteboxImpl.getField(type, fieldName); }
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ")", "{", "return", "WhiteboxImpl", ".", "getField", "(", "type", ",", "fieldName", ")", ";", "}" ]
Convenience method to get a field from a class type. <p> The method will first try to look for a declared field in the same class. If the field is not declared in this class it will look for the field in the super class. This will continue throughout the whole class hierarchy. If the field is not found an {@link Illega...
[ "Convenience", "method", "to", "get", "a", "field", "from", "a", "class", "type", ".", "<p", ">", "The", "method", "will", "first", "try", "to", "look", "for", "a", "declared", "field", "in", "the", "same", "class", ".", "If", "the", "field", "is", "...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L53-L55
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.removeLegacySubscriptionOnParent
public static void removeLegacySubscriptionOnParent(ExecutionEntity execution, EventSubscriptionEntity eventSubscription) { """ <p>Required for migrating active sequential MI receive tasks. These activities were formerly not scope, but are now. This has the following implications: <p>Before migration: <ul><li...
java
public static void removeLegacySubscriptionOnParent(ExecutionEntity execution, EventSubscriptionEntity eventSubscription) { ActivityImpl activity = execution.getActivity(); if (activity == null) { return; } ActivityBehavior behavior = activity.getActivityBehavior(); ActivityBehavior parentBeh...
[ "public", "static", "void", "removeLegacySubscriptionOnParent", "(", "ExecutionEntity", "execution", ",", "EventSubscriptionEntity", "eventSubscription", ")", "{", "ActivityImpl", "activity", "=", "execution", ".", "getActivity", "(", ")", ";", "if", "(", "activity", ...
<p>Required for migrating active sequential MI receive tasks. These activities were formerly not scope, but are now. This has the following implications: <p>Before migration: <ul><li> the event subscription is attached to the miBody scope execution</ul> <p>After migration: <ul><li> a new subscription is created for e...
[ "<p", ">", "Required", "for", "migrating", "active", "sequential", "MI", "receive", "tasks", ".", "These", "activities", "were", "formerly", "not", "scope", "but", "are", "now", ".", "This", "has", "the", "following", "implications", ":" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L424-L445