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
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java
PropsCodeGen.writeConfigProps
void writeConfigProps(Definition def, Writer out, int indent) throws IOException { """ Output Configuration Properties @param def definition @param out Writer @param indent space number @throws IOException ioException """ if (getConfigProps(def) == null) return; for (int i = 0...
java
void writeConfigProps(Definition def, Writer out, int indent) throws IOException { if (getConfigProps(def) == null) return; for (int i = 0; i < getConfigProps(def).size(); i++) { String name = getConfigProps(def).get(i).getName(); String upcaseName = upcaseFirst(name); ...
[ "void", "writeConfigProps", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "if", "(", "getConfigProps", "(", "def", ")", "==", "null", ")", "return", ";", "for", "(", "int", "i", "=", "0", ";", ...
Output Configuration Properties @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "Configuration", "Properties" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java#L81-L125
edwardcapriolo/teknek-core
src/main/java/io/teknek/driver/DriverFactory.java
DriverFactory.buildOperator
public static Operator buildOperator(OperatorDesc operatorDesc, MetricRegistry metricRegistry, String planPath, FeedPartition feedPartition) { """ OperatorDesc can describe local reasources, URL, loaded resources and dynamic resources like groovy code. This method instantiates an Operator based on the OperatorDes...
java
public static Operator buildOperator(OperatorDesc operatorDesc, MetricRegistry metricRegistry, String planPath, FeedPartition feedPartition) { Operator operator = null; NitFactory nitFactory = new NitFactory(); NitDesc nitDesc = nitDescFromDynamic(operatorDesc); try { if (nitDesc.getSpec() == NitD...
[ "public", "static", "Operator", "buildOperator", "(", "OperatorDesc", "operatorDesc", ",", "MetricRegistry", "metricRegistry", ",", "String", "planPath", ",", "FeedPartition", "feedPartition", ")", "{", "Operator", "operator", "=", "null", ";", "NitFactory", "nitFacto...
OperatorDesc can describe local reasources, URL, loaded resources and dynamic resources like groovy code. This method instantiates an Operator based on the OperatorDesc. @param operatorDesc @return
[ "OperatorDesc", "can", "describe", "local", "reasources", "URL", "loaded", "resources", "and", "dynamic", "resources", "like", "groovy", "code", ".", "This", "method", "instantiates", "an", "Operator", "based", "on", "the", "OperatorDesc", "." ]
train
https://github.com/edwardcapriolo/teknek-core/blob/4fa972d11044dee2954c0cc5e1b53b18fba319b9/src/main/java/io/teknek/driver/DriverFactory.java#L127-L153
threerings/narya
core/src/main/java/com/threerings/admin/server/persist/ConfigRecord.java
ConfigRecord.getKey
public static Key<ConfigRecord> getKey (String node, String object, String field) { """ Create and return a primary {@link Key} to identify a {@link ConfigRecord} with the supplied key values. """ return newKey(_R, node, object, field); }
java
public static Key<ConfigRecord> getKey (String node, String object, String field) { return newKey(_R, node, object, field); }
[ "public", "static", "Key", "<", "ConfigRecord", ">", "getKey", "(", "String", "node", ",", "String", "object", ",", "String", "field", ")", "{", "return", "newKey", "(", "_R", ",", "node", ",", "object", ",", "field", ")", ";", "}" ]
Create and return a primary {@link Key} to identify a {@link ConfigRecord} with the supplied key values.
[ "Create", "and", "return", "a", "primary", "{" ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/server/persist/ConfigRecord.java#L84-L87
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCreateCategoryMenuEntry.java
CmsCreateCategoryMenuEntry.createBasicStringProperty
public static CmsXmlContentProperty createBasicStringProperty(String name, String niceName) { """ Creates a property configuration for a simple named string field.<p> @param name the name of the field @param niceName the display name of the field @return the property configuration """ CmsXmlCon...
java
public static CmsXmlContentProperty createBasicStringProperty(String name, String niceName) { CmsXmlContentProperty prop = new CmsXmlContentProperty(name, //name "string", // type "string", // widget "", // widgetconfig null, //regex null, //ruletype ...
[ "public", "static", "CmsXmlContentProperty", "createBasicStringProperty", "(", "String", "name", ",", "String", "niceName", ")", "{", "CmsXmlContentProperty", "prop", "=", "new", "CmsXmlContentProperty", "(", "name", ",", "//name", "\"string\"", ",", "// type", "\"str...
Creates a property configuration for a simple named string field.<p> @param name the name of the field @param niceName the display name of the field @return the property configuration
[ "Creates", "a", "property", "configuration", "for", "a", "simple", "named", "string", "field", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCreateCategoryMenuEntry.java#L160-L175
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.summarizeForManagementGroup
public SummarizeResultsInner summarizeForManagementGroup(String managementGroupName, QueryOptions queryOptions) { """ Summarizes policy states for the resources under the management group. @param managementGroupName Management group name. @param queryOptions Additional parameters for the operation @throws Ill...
java
public SummarizeResultsInner summarizeForManagementGroup(String managementGroupName, QueryOptions queryOptions) { return summarizeForManagementGroupWithServiceResponseAsync(managementGroupName, queryOptions).toBlocking().single().body(); }
[ "public", "SummarizeResultsInner", "summarizeForManagementGroup", "(", "String", "managementGroupName", ",", "QueryOptions", "queryOptions", ")", "{", "return", "summarizeForManagementGroupWithServiceResponseAsync", "(", "managementGroupName", ",", "queryOptions", ")", ".", "to...
Summarizes policy states for the resources under the management group. @param managementGroupName Management group name. @param queryOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @throws QueryFailureException thrown if the request is rejected ...
[ "Summarizes", "policy", "states", "for", "the", "resources", "under", "the", "management", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L417-L419
algolia/instantsearch-android
core/src/main/java/com/algolia/instantsearch/core/model/NumericRefinement.java
NumericRefinement.getOperatorCode
public static int getOperatorCode(String operatorName) { """ Gets the {@link NumericRefinement#OPERATOR_GT operator} matching the given short name. @param operatorName the short name of an operator. @return the integer representation of this operator. @throws IllegalStateException if operatorName is not a kno...
java
public static int getOperatorCode(String operatorName) { switch (operatorName) { case "lt": return OPERATOR_LT; case "le": return OPERATOR_LE; case "eq": return OPERATOR_EQ; case "ne": return OPERATOR...
[ "public", "static", "int", "getOperatorCode", "(", "String", "operatorName", ")", "{", "switch", "(", "operatorName", ")", "{", "case", "\"lt\"", ":", "return", "OPERATOR_LT", ";", "case", "\"le\"", ":", "return", "OPERATOR_LE", ";", "case", "\"eq\"", ":", "...
Gets the {@link NumericRefinement#OPERATOR_GT operator} matching the given short name. @param operatorName the short name of an operator. @return the integer representation of this operator. @throws IllegalStateException if operatorName is not a known operator name.
[ "Gets", "the", "{", "@link", "NumericRefinement#OPERATOR_GT", "operator", "}", "matching", "the", "given", "short", "name", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/model/NumericRefinement.java#L56-L73
google/error-prone
check_api/src/main/java/com/google/errorprone/util/FindIdentifiers.java
FindIdentifiers.createFindIdentifiersScanner
private static final TreeScanner<Void, Void> createFindIdentifiersScanner( ImmutableSet.Builder<Symbol> builder, @Nullable Tree stoppingPoint) { """ Finds all identifiers in a tree. Takes an optional stop point as its argument: the depth-first walk will stop if this node is encountered. """ return n...
java
private static final TreeScanner<Void, Void> createFindIdentifiersScanner( ImmutableSet.Builder<Symbol> builder, @Nullable Tree stoppingPoint) { return new TreeScanner<Void, Void>() { @Override public Void scan(Tree tree, Void unused) { return Objects.equals(stoppingPoint, tree) ? null : s...
[ "private", "static", "final", "TreeScanner", "<", "Void", ",", "Void", ">", "createFindIdentifiersScanner", "(", "ImmutableSet", ".", "Builder", "<", "Symbol", ">", "builder", ",", "@", "Nullable", "Tree", "stoppingPoint", ")", "{", "return", "new", "TreeScanner...
Finds all identifiers in a tree. Takes an optional stop point as its argument: the depth-first walk will stop if this node is encountered.
[ "Finds", "all", "identifiers", "in", "a", "tree", ".", "Takes", "an", "optional", "stop", "point", "as", "its", "argument", ":", "the", "depth", "-", "first", "walk", "will", "stop", "if", "this", "node", "is", "encountered", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/FindIdentifiers.java#L304-L336
rhuss/jolokia
client/java/src/main/java/org/jolokia/client/request/J4pReadResponse.java
J4pReadResponse.getValue
public <V> V getValue(ObjectName pObjectName,String pAttribute) { """ Get the value for a certain MBean and a given attribute. This method is especially useful if the request leading to this response was done for multiple MBeans (i.e. a read for an MBean pattern) and multiple attributes. However, this method can...
java
public <V> V getValue(ObjectName pObjectName,String pAttribute) { ObjectName requestMBean = getRequest().getObjectName(); if (requestMBean.isPattern()) { JSONObject mAttributes = getAttributesForObjectNameWithPatternRequest(pObjectName); if (!mAttributes.containsKey(pAttribute)) ...
[ "public", "<", "V", ">", "V", "getValue", "(", "ObjectName", "pObjectName", ",", "String", "pAttribute", ")", "{", "ObjectName", "requestMBean", "=", "getRequest", "(", ")", ".", "getObjectName", "(", ")", ";", "if", "(", "requestMBean", ".", "isPattern", ...
Get the value for a certain MBean and a given attribute. This method is especially useful if the request leading to this response was done for multiple MBeans (i.e. a read for an MBean pattern) and multiple attributes. However, this method can be used for a request for single MBeans and single attributes as well, but t...
[ "Get", "the", "value", "for", "a", "certain", "MBean", "and", "a", "given", "attribute", ".", "This", "method", "is", "especially", "useful", "if", "the", "request", "leading", "to", "this", "response", "was", "done", "for", "multiple", "MBeans", "(", "i",...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/client/java/src/main/java/org/jolokia/client/request/J4pReadResponse.java#L140-L152
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/CmsCategoryField.java
CmsCategoryField.buildTreeItem
private CmsTreeItem buildTreeItem( CmsCategoryTreeEntry category, Collection<String> selectedCategories, boolean inactive) { """ Builds a tree item for the given category.<p> @param category the category @param selectedCategories the selected categories @param inactive true if the v...
java
private CmsTreeItem buildTreeItem( CmsCategoryTreeEntry category, Collection<String> selectedCategories, boolean inactive) { CmsDataValue categoryTreeItem = new CmsDataValue( 500, 4, CmsCategoryBean.SMALL_ICON_CLASSES, category.ge...
[ "private", "CmsTreeItem", "buildTreeItem", "(", "CmsCategoryTreeEntry", "category", ",", "Collection", "<", "String", ">", "selectedCategories", ",", "boolean", "inactive", ")", "{", "CmsDataValue", "categoryTreeItem", "=", "new", "CmsDataValue", "(", "500", ",", "4...
Builds a tree item for the given category.<p> @param category the category @param selectedCategories the selected categories @param inactive true if the value should be displayed inactive @return the tree item widget
[ "Builds", "a", "tree", "item", "for", "the", "given", "category", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/CmsCategoryField.java#L476-L509
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.withWriter
public static <T> T withWriter(Path self, String charset, @ClosureParams(value = SimpleType.class, options = "java.io.Writer") Closure<T> closure) throws IOException { """ Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. ...
java
public static <T> T withWriter(Path self, String charset, @ClosureParams(value = SimpleType.class, options = "java.io.Writer") Closure<T> closure) throws IOException { return withWriter(self, charset, false, closure); }
[ "public", "static", "<", "T", ">", "T", "withWriter", "(", "Path", "self", ",", "String", "charset", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.Writer\"", ")", "Closure", "<", "T", ">", "clos...
Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. The writer will use the given charset encoding, but will not write a BOM. @param self a Path @param charset the charset used @param closure a closure @return the value return...
[ "Creates", "a", "new", "BufferedWriter", "for", "this", "file", "passes", "it", "to", "the", "closure", "and", "ensures", "the", "stream", "is", "flushed", "and", "closed", "after", "the", "closure", "returns", ".", "The", "writer", "will", "use", "the", "...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1649-L1651
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerHybrid.java
MultiNormalizerHybrid.minMaxScaleInput
public MultiNormalizerHybrid minMaxScaleInput(int input, double rangeFrom, double rangeTo) { """ Apply min-max scaling to a specific input, overriding the global input strategy if any @param input the index of the input @param rangeFrom lower bound of the target range @param rangeTo upper bound of the t...
java
public MultiNormalizerHybrid minMaxScaleInput(int input, double rangeFrom, double rangeTo) { perInputStrategies.put(input, new MinMaxStrategy(rangeFrom, rangeTo)); return this; }
[ "public", "MultiNormalizerHybrid", "minMaxScaleInput", "(", "int", "input", ",", "double", "rangeFrom", ",", "double", "rangeTo", ")", "{", "perInputStrategies", ".", "put", "(", "input", ",", "new", "MinMaxStrategy", "(", "rangeFrom", ",", "rangeTo", ")", ")", ...
Apply min-max scaling to a specific input, overriding the global input strategy if any @param input the index of the input @param rangeFrom lower bound of the target range @param rangeTo upper bound of the target range @return the normalizer
[ "Apply", "min", "-", "max", "scaling", "to", "a", "specific", "input", "overriding", "the", "global", "input", "strategy", "if", "any" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerHybrid.java#L121-L124
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java
Util.generateCacheFileFullPath
public static String generateCacheFileFullPath(Uri fileOriginalUri, File cacheDir, long createdTime) { """ /* Generate cached file name use md5 from file originalPath and created time """ String source = fileOriginalUri.toString() + Long.toString(createdTime); String fileName = md5(source); File cacheFi...
java
public static String generateCacheFileFullPath(Uri fileOriginalUri, File cacheDir, long createdTime) { String source = fileOriginalUri.toString() + Long.toString(createdTime); String fileName = md5(source); File cacheFile = new File(cacheDir, fileName); return cacheFile.getPath(); }
[ "public", "static", "String", "generateCacheFileFullPath", "(", "Uri", "fileOriginalUri", ",", "File", "cacheDir", ",", "long", "createdTime", ")", "{", "String", "source", "=", "fileOriginalUri", ".", "toString", "(", ")", "+", "Long", ".", "toString", "(", "...
/* Generate cached file name use md5 from file originalPath and created time
[ "/", "*", "Generate", "cached", "file", "name", "use", "md5", "from", "file", "originalPath", "and", "created", "time" ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L599-L604
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.task_contactChange_id_refuse_POST
public void task_contactChange_id_refuse_POST(Long id, String token) throws IOException { """ Refuse this change request REST: POST /me/task/contactChange/{id}/refuse @param token [required] The token you received by email for this request @param id [required] """ String qPath = "/me/task/contactChange/...
java
public void task_contactChange_id_refuse_POST(Long id, String token) throws IOException { String qPath = "/me/task/contactChange/{id}/refuse"; StringBuilder sb = path(qPath, id); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "token", token); exec(qPath, "POST", sb.toString(), o); }
[ "public", "void", "task_contactChange_id_refuse_POST", "(", "Long", "id", ",", "String", "token", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/task/contactChange/{id}/refuse\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "id", ...
Refuse this change request REST: POST /me/task/contactChange/{id}/refuse @param token [required] The token you received by email for this request @param id [required]
[ "Refuse", "this", "change", "request" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2477-L2483
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.updatePostGuid
public boolean updatePostGuid(long postId, final String guid) throws SQLException { """ Updates the guid for a post. @param postId The post to update. @param guid The new guid. @return Was the post modified? @throws SQLException on database error or missing post id. """ Connection conn = null; ...
java
public boolean updatePostGuid(long postId, final String guid) throws SQLException { Connection conn = null; PreparedStatement stmt = null; Timer.Context ctx = metrics.updatePostTimer.time(); try { conn = connectionSupplier.getConnection(); stmt = conn.prepareStatement(updatePos...
[ "public", "boolean", "updatePostGuid", "(", "long", "postId", ",", "final", "String", "guid", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "Timer", ".", "Context", "ctx", "=", "met...
Updates the guid for a post. @param postId The post to update. @param guid The new guid. @return Was the post modified? @throws SQLException on database error or missing post id.
[ "Updates", "the", "guid", "for", "a", "post", "." ]
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L1600-L1614
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringCropper.java
StringCropper.getRightOf
public String getRightOf(String srcStr, int charCount) { """ Returns the number of characters specified from right @param srcStr @param charCount @return """ String retVal = ""; if (isNotBlank(srcStr)) { int length = srcStr.length(); if (charCount < leng...
java
public String getRightOf(String srcStr, int charCount) { String retVal = ""; if (isNotBlank(srcStr)) { int length = srcStr.length(); if (charCount < length) { retVal = srcStr.substring(length - charCount, length); } else { ...
[ "public", "String", "getRightOf", "(", "String", "srcStr", ",", "int", "charCount", ")", "{", "String", "retVal", "=", "\"\"", ";", "if", "(", "isNotBlank", "(", "srcStr", ")", ")", "{", "int", "length", "=", "srcStr", ".", "length", "(", ")", ";", "...
Returns the number of characters specified from right @param srcStr @param charCount @return
[ "Returns", "the", "number", "of", "characters", "specified", "from", "right" ]
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringCropper.java#L467-L485
alkacon/opencms-core
src/org/opencms/configuration/CmsParameterConfiguration.java
CmsParameterConfiguration.getInteger
public int getInteger(String key, int defaultValue) { """ Returns the integer associated with the given parameter, or the default value in case there is no integer value for this parameter.<p> @param key the parameter to look up the value for @param defaultValue the default value @return the integer associ...
java
public int getInteger(String key, int defaultValue) { Object value = m_configurationObjects.get(key); if (value instanceof Integer) { return ((Integer)value).intValue(); } else if (value instanceof String) { Integer i = new Integer((String)value); ...
[ "public", "int", "getInteger", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "Object", "value", "=", "m_configurationObjects", ".", "get", "(", "key", ")", ";", "if", "(", "value", "instanceof", "Integer", ")", "{", "return", "(", "(", "Int...
Returns the integer associated with the given parameter, or the default value in case there is no integer value for this parameter.<p> @param key the parameter to look up the value for @param defaultValue the default value @return the integer associated with the given parameter, or the default value in case there is ...
[ "Returns", "the", "integer", "associated", "with", "the", "given", "parameter", "or", "the", "default", "value", "in", "case", "there", "is", "no", "integer", "value", "for", "this", "parameter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsParameterConfiguration.java#L548-L563
caelum/vraptor4
vraptor-core/src/main/java/br/com/caelum/vraptor/observer/upload/CommonsUploadMultipartObserver.java
CommonsUploadMultipartObserver.reportSizeLimitExceeded
protected void reportSizeLimitExceeded(final SizeLimitExceededException e, Validator validator) { """ This method is called when the {@link SizeLimitExceededException} was thrown. """ validator.add(new I18nMessage("upload", "file.limit.exceeded", e.getActualSize(), e.getPermittedSize())); logger.warn("The ...
java
protected void reportSizeLimitExceeded(final SizeLimitExceededException e, Validator validator) { validator.add(new I18nMessage("upload", "file.limit.exceeded", e.getActualSize(), e.getPermittedSize())); logger.warn("The file size limit was exceeded. Actual {} permitted {}", e.getActualSize(), e.getPermittedSize())...
[ "protected", "void", "reportSizeLimitExceeded", "(", "final", "SizeLimitExceededException", "e", ",", "Validator", "validator", ")", "{", "validator", ".", "add", "(", "new", "I18nMessage", "(", "\"upload\"", ",", "\"file.limit.exceeded\"", ",", "e", ".", "getActual...
This method is called when the {@link SizeLimitExceededException} was thrown.
[ "This", "method", "is", "called", "when", "the", "{" ]
train
https://github.com/caelum/vraptor4/blob/593ce9ad60f9d38c360881b2132417c56b8cc093/vraptor-core/src/main/java/br/com/caelum/vraptor/observer/upload/CommonsUploadMultipartObserver.java#L122-L125
classgraph/classgraph
src/main/java/io/github/classgraph/ClassInfoList.java
ClassInfoList.generateGraphVizDotFile
public String generateGraphVizDotFile(final float sizeX, final float sizeY) { """ Generate a .dot file which can be fed into GraphViz for layout and visualization of the class graph. <p> Methods, fields and annotations are shown if enabled, via {@link ClassGraph#enableMethodInfo()}, {@link ClassGraph#enableFi...
java
public String generateGraphVizDotFile(final float sizeX, final float sizeY) { return generateGraphVizDotFile(sizeX, sizeY, /* showFields = */ true, /* showFieldTypeDependencyEdges = */ true, /* showMethods = */ true, /* showMethodTypeDependencyEdges = */ true, /* showAnnotations ...
[ "public", "String", "generateGraphVizDotFile", "(", "final", "float", "sizeX", ",", "final", "float", "sizeY", ")", "{", "return", "generateGraphVizDotFile", "(", "sizeX", ",", "sizeY", ",", "/* showFields = */", "true", ",", "/* showFieldTypeDependencyEdges = */", "t...
Generate a .dot file which can be fed into GraphViz for layout and visualization of the class graph. <p> Methods, fields and annotations are shown if enabled, via {@link ClassGraph#enableMethodInfo()}, {@link ClassGraph#enableFieldInfo()} and {@link ClassGraph#enableAnnotationInfo()}. <p> Only public classes, methods...
[ "Generate", "a", ".", "dot", "file", "which", "can", "be", "fed", "into", "GraphViz", "for", "layout", "and", "visualization", "of", "the", "class", "graph", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfoList.java#L732-L736
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JBaseMenuScreen.java
JBaseMenuScreen.handleAction
public boolean handleAction(String strAction, Component source, int iOptions) { """ Do some applet-wide action. For example, submit or reset. Here are how actions are handled: When a BasePanel receives a command it calls it's doAction method. If the doAction doesn't handle the action, it is passed to the paren...
java
public boolean handleAction(String strAction, Component source, int iOptions) { BaseApplet applet = this.getBaseApplet(); Object oldCursor = null; if (applet != null) oldCursor = applet.setStatus(Cursor.WAIT_CURSOR, applet, null); boolean bFlag = super.handleAction(strAction...
[ "public", "boolean", "handleAction", "(", "String", "strAction", ",", "Component", "source", ",", "int", "iOptions", ")", "{", "BaseApplet", "applet", "=", "this", ".", "getBaseApplet", "(", ")", ";", "Object", "oldCursor", "=", "null", ";", "if", "(", "ap...
Do some applet-wide action. For example, submit or reset. Here are how actions are handled: When a BasePanel receives a command it calls it's doAction method. If the doAction doesn't handle the action, it is passed to the parent's doAction method, until it hits the (this) applet method. This applet method tries to pass...
[ "Do", "some", "applet", "-", "wide", "action", ".", "For", "example", "submit", "or", "reset", ".", "Here", "are", "how", "actions", "are", "handled", ":", "When", "a", "BasePanel", "receives", "a", "command", "it", "calls", "it", "s", "doAction", "metho...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JBaseMenuScreen.java#L291-L301
structurizr/java
structurizr-core/src/com/structurizr/documentation/Documentation.java
Documentation.addDecision
public Decision addDecision(SoftwareSystem softwareSystem, String id, Date date, String title, DecisionStatus status, Format format, String content) { """ Adds a new decision to this workspace. @param softwareSystem the SoftwareSystem to associate the decision with @param id the ID of the dec...
java
public Decision addDecision(SoftwareSystem softwareSystem, String id, Date date, String title, DecisionStatus status, Format format, String content) { checkIdIsSpecified(id); checkTitleIsSpecified(title); checkContentIsSpecified(content); checkDecisionStatusIsSpecified(status); c...
[ "public", "Decision", "addDecision", "(", "SoftwareSystem", "softwareSystem", ",", "String", "id", ",", "Date", "date", ",", "String", "title", ",", "DecisionStatus", "status", ",", "Format", "format", ",", "String", "content", ")", "{", "checkIdIsSpecified", "(...
Adds a new decision to this workspace. @param softwareSystem the SoftwareSystem to associate the decision with @param id the ID of the decision @param date the date of the decision @param title the title of the decision @param status the status of the decision @par...
[ "Adds", "a", "new", "decision", "to", "this", "workspace", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/Documentation.java#L147-L159
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java
N1qlQueryExecutor.executePrepared
protected Observable<AsyncN1qlQueryResult> executePrepared(final N1qlQuery query, PreparedPayload payload, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { """ Issues a proper N1QL EXECUTE, detecting if parameters must be added to it. """ PreparedN1qlQuery preparedQuery; if (query i...
java
protected Observable<AsyncN1qlQueryResult> executePrepared(final N1qlQuery query, PreparedPayload payload, CouchbaseEnvironment env, long timeout, TimeUnit timeUnit) { PreparedN1qlQuery preparedQuery; if (query instanceof ParameterizedN1qlQuery) { ParameterizedN1qlQuery pq = (ParameterizedN1...
[ "protected", "Observable", "<", "AsyncN1qlQueryResult", ">", "executePrepared", "(", "final", "N1qlQuery", "query", ",", "PreparedPayload", "payload", ",", "CouchbaseEnvironment", "env", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "PreparedN1qlQuery...
Issues a proper N1QL EXECUTE, detecting if parameters must be added to it.
[ "Issues", "a", "proper", "N1QL", "EXECUTE", "detecting", "if", "parameters", "must", "be", "added", "to", "it", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/core/N1qlQueryExecutor.java#L410-L425
apereo/cas
support/cas-server-support-saml-googleapps-core/src/main/java/org/apereo/cas/support/saml/authentication/principal/GoogleAccountsServiceResponseBuilder.java
GoogleAccountsServiceResponseBuilder.createGoogleAppsPublicKey
protected void createGoogleAppsPublicKey() throws Exception { """ Create the public key. @throws Exception if key creation ran into an error """ if (!isValidConfiguration()) { LOGGER.debug("Google Apps public key bean will not be created, because it's not configured"); return...
java
protected void createGoogleAppsPublicKey() throws Exception { if (!isValidConfiguration()) { LOGGER.debug("Google Apps public key bean will not be created, because it's not configured"); return; } val bean = new PublicKeyFactoryBean(); if (this.publicKeyLocation....
[ "protected", "void", "createGoogleAppsPublicKey", "(", ")", "throws", "Exception", "{", "if", "(", "!", "isValidConfiguration", "(", ")", ")", "{", "LOGGER", ".", "debug", "(", "\"Google Apps public key bean will not be created, because it's not configured\"", ")", ";", ...
Create the public key. @throws Exception if key creation ran into an error
[ "Create", "the", "public", "key", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-googleapps-core/src/main/java/org/apereo/cas/support/saml/authentication/principal/GoogleAccountsServiceResponseBuilder.java#L172-L193
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/api/Table.java
Table.insertColumn
public Table insertColumn(int index, Column<?> column) { """ Adds the given column to this table at the given position in the column list @param index Zero-based index into the column list @param column Column to be added """ validateColumn(column); columnList.add(index, column); r...
java
public Table insertColumn(int index, Column<?> column) { validateColumn(column); columnList.add(index, column); return this; }
[ "public", "Table", "insertColumn", "(", "int", "index", ",", "Column", "<", "?", ">", "column", ")", "{", "validateColumn", "(", "column", ")", ";", "columnList", ".", "add", "(", "index", ",", "column", ")", ";", "return", "this", ";", "}" ]
Adds the given column to this table at the given position in the column list @param index Zero-based index into the column list @param column Column to be added
[ "Adds", "the", "given", "column", "to", "this", "table", "at", "the", "given", "position", "in", "the", "column", "list" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/api/Table.java#L245-L249
landawn/AbacusUtil
src/com/landawn/abacus/util/f.java
f.flattOp
public static <T, E extends Exception> void flattOp(final T[][] a, Try.Consumer<T[], E> op) throws E { """ flatten -> execute {@code op} -> set values back. <pre> <code> f.flattOp(a, t -> N.sort(t)); </code> </pre> @param a @param op @throws E """ if (N.isNullOrEmpty(a)) { retur...
java
public static <T, E extends Exception> void flattOp(final T[][] a, Try.Consumer<T[], E> op) throws E { if (N.isNullOrEmpty(a)) { return; } final T[] tmp = flattenn(a); op.accept(tmp); int idx = 0; for (T[] e : a) { if (N.notNullOrEm...
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "void", "flattOp", "(", "final", "T", "[", "]", "[", "]", "a", ",", "Try", ".", "Consumer", "<", "T", "[", "]", ",", "E", ">", "op", ")", "throws", "E", "{", "if", "(", "N",...
flatten -> execute {@code op} -> set values back. <pre> <code> f.flattOp(a, t -> N.sort(t)); </code> </pre> @param a @param op @throws E
[ "flatten", "-", ">", "execute", "{", "@code", "op", "}", "-", ">", "set", "values", "back", ".", "<pre", ">", "<code", ">", "f", ".", "flattOp", "(", "a", "t", "-", ">", "N", ".", "sort", "(", "t", "))", ";", "<", "/", "code", ">", "<", "/"...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/f.java#L210-L227
sockeqwe/sqlbrite-dao
dao/src/main/java/com/hannesdorfmann/sqlbrite/dao/Dao.java
Dao.rawQueryOnManyTables
protected QueryBuilder rawQueryOnManyTables(@Nullable final Iterable<String> tables, @NonNull final String sql) { """ Creates a raw query and enables auto updates for the given tables @param tables The affected table. updates get triggered if the observed tables changes. Use {@code null} or {@link #rawQ...
java
protected QueryBuilder rawQueryOnManyTables(@Nullable final Iterable<String> tables, @NonNull final String sql) { return new QueryBuilder(tables, sql); }
[ "protected", "QueryBuilder", "rawQueryOnManyTables", "(", "@", "Nullable", "final", "Iterable", "<", "String", ">", "tables", ",", "@", "NonNull", "final", "String", "sql", ")", "{", "return", "new", "QueryBuilder", "(", "tables", ",", "sql", ")", ";", "}" ]
Creates a raw query and enables auto updates for the given tables @param tables The affected table. updates get triggered if the observed tables changes. Use {@code null} or {@link #rawQuery(String)} if you don't want to register for automatic updates @param sql The sql query statement @return Observable of this query
[ "Creates", "a", "raw", "query", "and", "enables", "auto", "updates", "for", "the", "given", "tables" ]
train
https://github.com/sockeqwe/sqlbrite-dao/blob/8d02b76f00bd2f8997a58d33146b98b2eec35452/dao/src/main/java/com/hannesdorfmann/sqlbrite/dao/Dao.java#L169-L172
wkgcass/Style
src/main/java/net/cassite/style/aggregation/MapFuncSup.java
MapFuncSup.forEach
public <R> R forEach(RFunc2<R, K, V> func) { """ define a function to deal with each entry in the map @param func a function takes in each entry from map and returns 'last loop value' @return return 'last loop value'.<br> check <a href="https://github.com/wkgcass/Style/">tutorial</a> for more info about 'l...
java
public <R> R forEach(RFunc2<R, K, V> func) { return forEach(Style.$(func)); }
[ "public", "<", "R", ">", "R", "forEach", "(", "RFunc2", "<", "R", ",", "K", ",", "V", ">", "func", ")", "{", "return", "forEach", "(", "Style", ".", "$", "(", "func", ")", ")", ";", "}" ]
define a function to deal with each entry in the map @param func a function takes in each entry from map and returns 'last loop value' @return return 'last loop value'.<br> check <a href="https://github.com/wkgcass/Style/">tutorial</a> for more info about 'last loop value'
[ "define", "a", "function", "to", "deal", "with", "each", "entry", "in", "the", "map" ]
train
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/aggregation/MapFuncSup.java#L67-L69
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.convertNormToPixel
public static Point2D_F32 convertNormToPixel(CameraModel param , float x , float y , Point2D_F32 pixel ) { """ <p> Convenient function for converting from normalized image coordinates to the original image pixel coordinate. If speed is a concern then {@link PinholeNtoP_F64} should be used instead. </p> @para...
java
public static Point2D_F32 convertNormToPixel(CameraModel param , float x , float y , Point2D_F32 pixel ) { return ImplPerspectiveOps_F32.convertNormToPixel(param, x, y, pixel); }
[ "public", "static", "Point2D_F32", "convertNormToPixel", "(", "CameraModel", "param", ",", "float", "x", ",", "float", "y", ",", "Point2D_F32", "pixel", ")", "{", "return", "ImplPerspectiveOps_F32", ".", "convertNormToPixel", "(", "param", ",", "x", ",", "y", ...
<p> Convenient function for converting from normalized image coordinates to the original image pixel coordinate. If speed is a concern then {@link PinholeNtoP_F64} should be used instead. </p> @param param Intrinsic camera parameters @param x X-coordinate of normalized. @param y Y-coordinate of normalized. @param pixe...
[ "<p", ">", "Convenient", "function", "for", "converting", "from", "normalized", "image", "coordinates", "to", "the", "original", "image", "pixel", "coordinate", ".", "If", "speed", "is", "a", "concern", "then", "{", "@link", "PinholeNtoP_F64", "}", "should", "...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L393-L395
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BitSieve.java
BitSieve.sieveSingle
private void sieveSingle(int limit, int start, int step) { """ Sieve a single set of multiples out of the sieve. Begin to remove multiples of the specified step starting at the specified start index, up to the specified limit. """ while(start < limit) { set(start); start += st...
java
private void sieveSingle(int limit, int start, int step) { while(start < limit) { set(start); start += step; } }
[ "private", "void", "sieveSingle", "(", "int", "limit", ",", "int", "start", ",", "int", "step", ")", "{", "while", "(", "start", "<", "limit", ")", "{", "set", "(", "start", ")", ";", "start", "+=", "step", ";", "}", "}" ]
Sieve a single set of multiples out of the sieve. Begin to remove multiples of the specified step starting at the specified start index, up to the specified limit.
[ "Sieve", "a", "single", "set", "of", "multiples", "out", "of", "the", "sieve", ".", "Begin", "to", "remove", "multiples", "of", "the", "specified", "step", "starting", "at", "the", "specified", "start", "index", "up", "to", "the", "specified", "limit", "."...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BitSieve.java#L184-L189
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueAuthHandler.java
KeyValueAuthHandler.handleAuthResponse
private void handleAuthResponse(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { """ Handles an incoming SASL AUTH response and - if needed - dispatches the SASL STEPs. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if something g...
java
private void handleAuthResponse(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { if (saslClient.isComplete()) { checkIsAuthed(msg); return; } byte[] response = new byte[msg.content().readableBytes()]; msg.content().readBytes(response)...
[ "private", "void", "handleAuthResponse", "(", "ChannelHandlerContext", "ctx", ",", "FullBinaryMemcacheResponse", "msg", ")", "throws", "Exception", "{", "if", "(", "saslClient", ".", "isComplete", "(", ")", ")", "{", "checkIsAuthed", "(", "msg", ")", ";", "retur...
Handles an incoming SASL AUTH response and - if needed - dispatches the SASL STEPs. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if something goes wrong during negotiation.
[ "Handles", "an", "incoming", "SASL", "AUTH", "response", "and", "-", "if", "needed", "-", "dispatches", "the", "SASL", "STEPs", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueAuthHandler.java#L236-L284
vkostyukov/la4j
src/main/java/org/la4j/matrix/dense/Basic1DMatrix.java
Basic1DMatrix.randomSymmetric
public static Basic1DMatrix randomSymmetric(int size, Random random) { """ Creates a random symmetric {@link Basic1DMatrix} of the given {@code size}. """ double[] array = new double[size * size]; for (int i = 0; i < size; i++) { for (int j = i; j < size; j++) { dou...
java
public static Basic1DMatrix randomSymmetric(int size, Random random) { double[] array = new double[size * size]; for (int i = 0; i < size; i++) { for (int j = i; j < size; j++) { double value = random.nextDouble(); array[i * size + j] = value; ...
[ "public", "static", "Basic1DMatrix", "randomSymmetric", "(", "int", "size", ",", "Random", "random", ")", "{", "double", "[", "]", "array", "=", "new", "double", "[", "size", "*", "size", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "...
Creates a random symmetric {@link Basic1DMatrix} of the given {@code size}.
[ "Creates", "a", "random", "symmetric", "{" ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/matrix/dense/Basic1DMatrix.java#L120-L132
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java
PublicIPPrefixesInner.updateTagsAsync
public Observable<PublicIPPrefixInner> updateTagsAsync(String resourceGroupName, String publicIpPrefixName) { """ Updates public IP prefix tags. @param resourceGroupName The name of the resource group. @param publicIpPrefixName The name of the public IP prefix. @throws IllegalArgumentException thrown if param...
java
public Observable<PublicIPPrefixInner> updateTagsAsync(String resourceGroupName, String publicIpPrefixName) { return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1<ServiceResponse<PublicIPPrefixInner>, PublicIPPrefixInner>() { @Override public Pub...
[ "public", "Observable", "<", "PublicIPPrefixInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "publicIpPrefixName", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "publicIpPrefixName", ")", ".", "m...
Updates public IP prefix tags. @param resourceGroupName The name of the resource group. @param publicIpPrefixName The name of the public IP prefix. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "public", "IP", "prefix", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java#L636-L643
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/logic/Expression.java
Expression.findEndOfSubExpression
public static int findEndOfSubExpression(String expression, int start) { """ Finds the position of the end bracket ')' matching a start bracket '('. @param expression @param start position of the start bracket @return position of the matching end bracket or 0 if it can not be located """ int count = 0...
java
public static int findEndOfSubExpression(String expression, int start) { int count = 0; for (int i = start; i < expression.length(); i++) { switch (expression.charAt(i)) { case '(': { count++; break; } case ')': { count--; if (count == 0) { return i; } break; }...
[ "public", "static", "int", "findEndOfSubExpression", "(", "String", "expression", ",", "int", "start", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "expression", ".", "length", "(", ")", ";", "i", "++"...
Finds the position of the end bracket ')' matching a start bracket '('. @param expression @param start position of the start bracket @return position of the matching end bracket or 0 if it can not be located
[ "Finds", "the", "position", "of", "the", "end", "bracket", ")", "matching", "a", "start", "bracket", "(", "." ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/logic/Expression.java#L290-L308
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java
IntegrationResponse.withResponseTemplates
public IntegrationResponse withResponseTemplates(java.util.Map<String, String> responseTemplates) { """ <p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a t...
java
public IntegrationResponse withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "IntegrationResponse", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value. </p> @param responseTemplates The collection of response templates for the integration r...
[ "<p", ">", "The", "collection", "of", "response", "templates", "for", "the", "integration", "response", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", ".", "Response", "templates", "are", "represented", "as", "a",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java#L455-L458
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitVersion
@Override public R visitVersion(VersionTree 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 """ return scan(node.getBody(), p); }
java
@Override public R visitVersion(VersionTree node, P p) { return scan(node.getBody(), p); }
[ "@", "Override", "public", "R", "visitVersion", "(", "VersionTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getBody", "(", ")", ",", "p", ")", ";", "}" ]
{@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#L523-L526
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createHierarchicalEntityRole
public UUID createHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, CreateHierarchicalEntityRoleOptionalParameter createHierarchicalEntityRoleOptionalParameter) { """ Create an entity role for an entity in the application. @param appId The application ID. @param versionId The version ID. @p...
java
public UUID createHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, CreateHierarchicalEntityRoleOptionalParameter createHierarchicalEntityRoleOptionalParameter) { return createHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, createHierarchicalEntityRoleOptionalParam...
[ "public", "UUID", "createHierarchicalEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "CreateHierarchicalEntityRoleOptionalParameter", "createHierarchicalEntityRoleOptionalParameter", ")", "{", "return", "createHierarchicalEntityRoleWi...
Create an entity role for an entity in the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param createHierarchicalEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws...
[ "Create", "an", "entity", "role", "for", "an", "entity", "in", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L9432-L9434
DDTH/ddth-kafka
src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java
KafkaHelper.buildKafkaProducerProps
public static Properties buildKafkaProducerProps(ProducerType type, String bootstrapServers) { """ Builds default producer's properties. @param type @param bootstrapServers @return @since 1.3.2 """ return buildKafkaProducerProps(type, bootstrapServers, null); }
java
public static Properties buildKafkaProducerProps(ProducerType type, String bootstrapServers) { return buildKafkaProducerProps(type, bootstrapServers, null); }
[ "public", "static", "Properties", "buildKafkaProducerProps", "(", "ProducerType", "type", ",", "String", "bootstrapServers", ")", "{", "return", "buildKafkaProducerProps", "(", "type", ",", "bootstrapServers", ",", "null", ")", ";", "}" ]
Builds default producer's properties. @param type @param bootstrapServers @return @since 1.3.2
[ "Builds", "default", "producer", "s", "properties", "." ]
train
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java#L176-L178
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.email_domain_new_duration_GET
public OvhOrder email_domain_new_duration_GET(String duration, String domain, OvhOfferEnum offer) throws IOException { """ Get prices and contracts information REST: GET /order/email/domain/new/{duration} @param domain [required] Domain name which will be linked to this mx account @param offer [required] Offe...
java
public OvhOrder email_domain_new_duration_GET(String duration, String domain, OvhOfferEnum offer) throws IOException { String qPath = "/order/email/domain/new/{duration}"; StringBuilder sb = path(qPath, duration); query(sb, "domain", domain); query(sb, "offer", offer); String resp = exec(qPath, "GET", sb.toSt...
[ "public", "OvhOrder", "email_domain_new_duration_GET", "(", "String", "duration", ",", "String", "domain", ",", "OvhOfferEnum", "offer", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/email/domain/new/{duration}\"", ";", "StringBuilder", "sb", "=",...
Get prices and contracts information REST: GET /order/email/domain/new/{duration} @param domain [required] Domain name which will be linked to this mx account @param offer [required] Offer for your new mx account @param duration [required] Duration @deprecated
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L4107-L4114
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/GenericDataSource.java
GenericDataSource.getConnection
public Connection getConnection() throws SQLException { """ Will always return a GenericConnection. <p> @see javax.sql.DataSource#getConnection() """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "getConnection : " + ivPuId); Connection result = n...
java
public Connection getConnection() throws SQLException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "getConnection : " + ivPuId); Connection result = new GenericConnection(ivPuId, ivDataSourceName); if (TraceComponent.isAnyTracingEnabled() && t...
[ "public", "Connection", "getConnection", "(", ")", "throws", "SQLException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", "tc", ",", "\"getConnection : \"", ...
Will always return a GenericConnection. <p> @see javax.sql.DataSource#getConnection()
[ "Will", "always", "return", "a", "GenericConnection", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/GenericDataSource.java#L107-L119
igniterealtime/Smack
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
XMPPTCPConnection.addStanzaIdAcknowledgedListener
@SuppressWarnings("FutureReturnValueIgnored") public StanzaListener addStanzaIdAcknowledgedListener(final String id, StanzaListener listener) throws StreamManagementNotEnabledException { """ Add a new Stanza ID acknowledged listener for the given ID. <p> The listener will be invoked if the stanza with the gi...
java
@SuppressWarnings("FutureReturnValueIgnored") public StanzaListener addStanzaIdAcknowledgedListener(final String id, StanzaListener listener) throws StreamManagementNotEnabledException { // Prevent users from adding callbacks that will never get removed if (!smWasEnabledAtLeastOnce) { th...
[ "@", "SuppressWarnings", "(", "\"FutureReturnValueIgnored\"", ")", "public", "StanzaListener", "addStanzaIdAcknowledgedListener", "(", "final", "String", "id", ",", "StanzaListener", "listener", ")", "throws", "StreamManagementNotEnabledException", "{", "// Prevent users from a...
Add a new Stanza ID acknowledged listener for the given ID. <p> The listener will be invoked if the stanza with the given ID was acknowledged by the server. It will automatically be removed after the listener was run. </p> @param id the stanza ID. @param listener the listener to invoke. @return the previous listener f...
[ "Add", "a", "new", "Stanza", "ID", "acknowledged", "listener", "for", "the", "given", "ID", ".", "<p", ">", "The", "listener", "will", "be", "invoked", "if", "the", "stanza", "with", "the", "given", "ID", "was", "acknowledged", "by", "the", "server", "."...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java#L1653-L1668
apollographql/apollo-android
apollo-runtime/src/main/java/com/apollographql/apollo/cache/normalized/ApolloStoreOperation.java
ApolloStoreOperation.enqueue
public void enqueue(@Nullable final Callback<T> callback) { """ Schedules operation to be executed in dispatcher @param callback to be notified about operation result """ checkIfExecuted(); this.callback.set(callback); dispatcher.execute(new Runnable() { @Override public void run() { ...
java
public void enqueue(@Nullable final Callback<T> callback) { checkIfExecuted(); this.callback.set(callback); dispatcher.execute(new Runnable() { @Override public void run() { T result; try { result = perform(); } catch (Exception e) { notifyFailure(new Apollo...
[ "public", "void", "enqueue", "(", "@", "Nullable", "final", "Callback", "<", "T", ">", "callback", ")", "{", "checkIfExecuted", "(", ")", ";", "this", ".", "callback", ".", "set", "(", "callback", ")", ";", "dispatcher", ".", "execute", "(", "new", "Ru...
Schedules operation to be executed in dispatcher @param callback to be notified about operation result
[ "Schedules", "operation", "to", "be", "executed", "in", "dispatcher" ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-runtime/src/main/java/com/apollographql/apollo/cache/normalized/ApolloStoreOperation.java#L69-L85
infinispan/infinispan
lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/configuration/impl/ConfigurationParseHelper.java
ConfigurationParseHelper.getIntValue
public static Integer getIntValue(Properties cfg, String key) { """ Retrieves a configuration property and parses it as an Integer if it exists, or returns null if the property is not set (undefined). @param cfg configuration Properties @param key the property key @return the Integer or null @throws SearchE...
java
public static Integer getIntValue(Properties cfg, String key) { String propValue = cfg.getProperty(key); if (propValue == null) { return null; } if (StringHelper.isEmpty(propValue.trim())) { throw log.configurationPropertyCantBeEmpty(key); } else { return parseIn...
[ "public", "static", "Integer", "getIntValue", "(", "Properties", "cfg", ",", "String", "key", ")", "{", "String", "propValue", "=", "cfg", ".", "getProperty", "(", "key", ")", ";", "if", "(", "propValue", "==", "null", ")", "{", "return", "null", ";", ...
Retrieves a configuration property and parses it as an Integer if it exists, or returns null if the property is not set (undefined). @param cfg configuration Properties @param key the property key @return the Integer or null @throws SearchException both for empty (non-null) values and for Strings not containing a vali...
[ "Retrieves", "a", "configuration", "property", "and", "parses", "it", "as", "an", "Integer", "if", "it", "exists", "or", "returns", "null", "if", "the", "property", "is", "not", "set", "(", "undefined", ")", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/configuration/impl/ConfigurationParseHelper.java#L35-L45
KyoriPowered/lunar
src/main/java/net/kyori/lunar/graph/MoreGraphs.java
MoreGraphs.topologicalSort
public static <T> @NonNull List<T> topologicalSort(final @NonNull Graph<T> graph) { """ Sorts a directed acyclic graph into a list. <p>The particular order of elements without prerequisites is not guaranteed.</p> @param graph the graph to be sorted @param <T> the node type @return the sorted list @throws ...
java
public static <T> @NonNull List<T> topologicalSort(final @NonNull Graph<T> graph) { return topologicalSort(graph, SortType.random()); }
[ "public", "static", "<", "T", ">", "@", "NonNull", "List", "<", "T", ">", "topologicalSort", "(", "final", "@", "NonNull", "Graph", "<", "T", ">", "graph", ")", "{", "return", "topologicalSort", "(", "graph", ",", "SortType", ".", "random", "(", ")", ...
Sorts a directed acyclic graph into a list. <p>The particular order of elements without prerequisites is not guaranteed.</p> @param graph the graph to be sorted @param <T> the node type @return the sorted list @throws CyclePresentException if the graph has cycles @throws IllegalArgumentException if the graph is not d...
[ "Sorts", "a", "directed", "acyclic", "graph", "into", "a", "list", "." ]
train
https://github.com/KyoriPowered/lunar/blob/6856747d9034a2fe0c8d0a8a0150986797732b5c/src/main/java/net/kyori/lunar/graph/MoreGraphs.java#L56-L58
jmrozanec/cron-utils
src/main/java/com/cronutils/mapper/CronMapper.java
CronMapper.returnAlwaysExpression
@VisibleForTesting static Function<CronField, CronField> returnAlwaysExpression(final CronFieldName name) { """ Creates a Function that returns an Always instance. @param name - Cron field name @return new CronField -> CronField instance, never null """ return field -> new CronField(name, alway...
java
@VisibleForTesting static Function<CronField, CronField> returnAlwaysExpression(final CronFieldName name) { return field -> new CronField(name, always(), FieldConstraintsBuilder.instance().forField(name).createConstraintsInstance()); }
[ "@", "VisibleForTesting", "static", "Function", "<", "CronField", ",", "CronField", ">", "returnAlwaysExpression", "(", "final", "CronFieldName", "name", ")", "{", "return", "field", "->", "new", "CronField", "(", "name", ",", "always", "(", ")", ",", "FieldCo...
Creates a Function that returns an Always instance. @param name - Cron field name @return new CronField -> CronField instance, never null
[ "Creates", "a", "Function", "that", "returns", "an", "Always", "instance", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/mapper/CronMapper.java#L240-L243
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriQueryParam
public static void escapeUriQueryParam(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>char[]</tt> input using <tt>UTF-8</tt...
java
public static void escapeUriQueryParam(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapeUriQueryParam(text, offset, len, writer, DEFAULT_ENCODING); }
[ "public", "static", "void", "escapeUriQueryParam", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeUriQueryParam", "(", "text", ","...
<p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>char[]</tt> input using <tt>UTF-8</tt> as encoding. </p> <p> The following are the only allowed chars in an URI query parameter (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></li> <li><tt>- . _ ~</tt></li> <li><tt>!...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", "using", "<tt", ">", "UTF", "-"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L1338-L1341
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/PairCounter.java
PairCounter.getCount
public int getCount(T x, T y) { """ Returns the number of times the specified pair of objects has been seen by this counter. """ // REMINDER: check for indexing? return counts.get(getIndex(x, y)); }
java
public int getCount(T x, T y) { // REMINDER: check for indexing? return counts.get(getIndex(x, y)); }
[ "public", "int", "getCount", "(", "T", "x", ",", "T", "y", ")", "{", "// REMINDER: check for indexing?", "return", "counts", ".", "get", "(", "getIndex", "(", "x", ",", "y", ")", ")", ";", "}" ]
Returns the number of times the specified pair of objects has been seen by this counter.
[ "Returns", "the", "number", "of", "times", "the", "specified", "pair", "of", "objects", "has", "been", "seen", "by", "this", "counter", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/PairCounter.java#L227-L230
borball/weixin-sdk
weixin-qydev/src/main/java/com/riversoft/weixin/qy/media/Materials.java
Materials.addMpNewsImage
public String addMpNewsImage(InputStream inputStream, String fileName) { """ 图文消息的content里面如果有图片,该图片需要使用本方法上传,图片仅支持jpg/png格式,大小必须在2MB以下,每天最多200张 @param inputStream 图片流 @param fileName 文件名 @return 图片的url, 可以在图文消息的content里面使用 """ String url = WxEndpoint.get("url.mpnews.image.upload"); S...
java
public String addMpNewsImage(InputStream inputStream, String fileName) { String url = WxEndpoint.get("url.mpnews.image.upload"); String response = wxClient.post(url, inputStream, fileName); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.conta...
[ "public", "String", "addMpNewsImage", "(", "InputStream", "inputStream", ",", "String", "fileName", ")", "{", "String", "url", "=", "WxEndpoint", ".", "get", "(", "\"url.mpnews.image.upload\"", ")", ";", "String", "response", "=", "wxClient", ".", "post", "(", ...
图文消息的content里面如果有图片,该图片需要使用本方法上传,图片仅支持jpg/png格式,大小必须在2MB以下,每天最多200张 @param inputStream 图片流 @param fileName 文件名 @return 图片的url, 可以在图文消息的content里面使用
[ "图文消息的content里面如果有图片,该图片需要使用本方法上传,图片仅支持jpg", "/", "png格式,大小必须在2MB以下,每天最多200张" ]
train
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-qydev/src/main/java/com/riversoft/weixin/qy/media/Materials.java#L126-L137
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.appendWithSeparators
public StrBuilder appendWithSeparators(final Object[] array, final String separator) { """ Appends an array placing separators between each value, but not before the first or after the last. Appending a null array will have no effect. Each object is appended using {@link #append(Object)}. @param array the a...
java
public StrBuilder appendWithSeparators(final Object[] array, final String separator) { if (array != null && array.length > 0) { final String sep = Objects.toString(separator, ""); append(array[0]); for (int i = 1; i < array.length; i++) { append(sep); ...
[ "public", "StrBuilder", "appendWithSeparators", "(", "final", "Object", "[", "]", "array", ",", "final", "String", "separator", ")", "{", "if", "(", "array", "!=", "null", "&&", "array", ".", "length", ">", "0", ")", "{", "final", "String", "sep", "=", ...
Appends an array placing separators between each value, but not before the first or after the last. Appending a null array will have no effect. Each object is appended using {@link #append(Object)}. @param array the array to append @param separator the separator to use, null means no separator @return this, to enabl...
[ "Appends", "an", "array", "placing", "separators", "between", "each", "value", "but", "not", "before", "the", "first", "or", "after", "the", "last", ".", "Appending", "a", "null", "array", "will", "have", "no", "effect", ".", "Each", "object", "is", "appen...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1251-L1261
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.lessThan
public static boolean lessThan(Time small, Time big) { """ 第一个值是否小于第二个值 @param small 第一个值 @param big 第二个值 @return {@link Boolean} @since 1.1.0 """ return compare(small, big, CompareWay.LT); }
java
public static boolean lessThan(Time small, Time big) { return compare(small, big, CompareWay.LT); }
[ "public", "static", "boolean", "lessThan", "(", "Time", "small", ",", "Time", "big", ")", "{", "return", "compare", "(", "small", ",", "big", ",", "CompareWay", ".", "LT", ")", ";", "}" ]
第一个值是否小于第二个值 @param small 第一个值 @param big 第二个值 @return {@link Boolean} @since 1.1.0
[ "第一个值是否小于第二个值" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L146-L148
grpc/grpc-java
api/src/main/java/io/grpc/ServerInterceptors.java
ServerInterceptors.interceptForward
public static ServerServiceDefinition interceptForward(ServerServiceDefinition serviceDef, ServerInterceptor... interceptors) { """ Create a new {@code ServerServiceDefinition} whose {@link ServerCallHandler}s will call {@code interceptors} before calling t...
java
public static ServerServiceDefinition interceptForward(ServerServiceDefinition serviceDef, ServerInterceptor... interceptors) { return interceptForward(serviceDef, Arrays.asList(interceptors)); }
[ "public", "static", "ServerServiceDefinition", "interceptForward", "(", "ServerServiceDefinition", "serviceDef", ",", "ServerInterceptor", "...", "interceptors", ")", "{", "return", "interceptForward", "(", "serviceDef", ",", "Arrays", ".", "asList", "(", "interceptors", ...
Create a new {@code ServerServiceDefinition} whose {@link ServerCallHandler}s will call {@code interceptors} before calling the pre-existing {@code ServerCallHandler}. The first interceptor will have its {@link ServerInterceptor#interceptCall} called first. @param serviceDef the service definition for which to inter...
[ "Create", "a", "new", "{", "@code", "ServerServiceDefinition", "}", "whose", "{", "@link", "ServerCallHandler", "}", "s", "will", "call", "{", "@code", "interceptors", "}", "before", "calling", "the", "pre", "-", "existing", "{", "@code", "ServerCallHandler", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/ServerInterceptors.java#L43-L46
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/ProcessorDef.java
ProcessorDef.getDebug
public boolean getDebug(final ProcessorDef[] defaultProviders, final int index) { """ Gets boolean indicating debug build @param defaultProviders array of ProcessorDef's in descending priority @param index index to first element in array that should be considered @return if true, built targets for debugging...
java
public boolean getDebug(final ProcessorDef[] defaultProviders, final int index) { if (isReference()) { return ((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef")).getDebug(defaultProviders, index); } if (this.debug != null) { return this.debug.booleanValue(); } else { if ...
[ "public", "boolean", "getDebug", "(", "final", "ProcessorDef", "[", "]", "defaultProviders", ",", "final", "int", "index", ")", "{", "if", "(", "isReference", "(", ")", ")", "{", "return", "(", "(", "ProcessorDef", ")", "getCheckedRef", "(", "ProcessorDef", ...
Gets boolean indicating debug build @param defaultProviders array of ProcessorDef's in descending priority @param index index to first element in array that should be considered @return if true, built targets for debugging
[ "Gets", "boolean", "indicating", "debug", "build" ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/ProcessorDef.java#L271-L283
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.getLong6
public static final long getLong6(byte[] data, int offset) { """ This method reads a six byte long from the input array. @param data the input array @param offset offset of integer data in the array @return integer value """ long result = 0; int i = offset; for (int shiftBy = 0; shiftBy ...
java
public static final long getLong6(byte[] data, int offset) { long result = 0; int i = offset; for (int shiftBy = 0; shiftBy < 48; shiftBy += 8) { result |= ((long) (data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "public", "static", "final", "long", "getLong6", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "long", "result", "=", "0", ";", "int", "i", "=", "offset", ";", "for", "(", "int", "shiftBy", "=", "0", ";", "shiftBy", "<", "48", ";...
This method reads a six byte long from the input array. @param data the input array @param offset offset of integer data in the array @return integer value
[ "This", "method", "reads", "a", "six", "byte", "long", "from", "the", "input", "array", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L237-L247
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java
DateFormatSymbols.setMonths
public void setMonths(String[] newMonths, int context, int width) { """ Sets month strings. For example: "January", "February", etc. @param newMonths the new month strings. @param context The formatting context, FORMAT or STANDALONE. @param width The width of the month string, either WIDE, ABBREVIATED,...
java
public void setMonths(String[] newMonths, int context, int width) { switch (context) { case FORMAT : switch(width) { case WIDE : months = duplicate(newMonths); break; case ABBREVIATED : shortMo...
[ "public", "void", "setMonths", "(", "String", "[", "]", "newMonths", ",", "int", "context", ",", "int", "width", ")", "{", "switch", "(", "context", ")", "{", "case", "FORMAT", ":", "switch", "(", "width", ")", "{", "case", "WIDE", ":", "months", "="...
Sets month strings. For example: "January", "February", etc. @param newMonths the new month strings. @param context The formatting context, FORMAT or STANDALONE. @param width The width of the month string, either WIDE, ABBREVIATED, or NARROW.
[ "Sets", "month", "strings", ".", "For", "example", ":", "January", "February", "etc", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L824-L857
roboconf/roboconf-platform
core/roboconf-target-jclouds/src/main/java/net/roboconf/target/jclouds/internal/JCloudsHandler.java
JCloudsHandler.jcloudContext
ComputeService jcloudContext( Map<String,String> targetProperties ) throws TargetException { """ Creates a JCloud context. @param targetProperties the target properties @return a non-null object @throws TargetException if the target properties are invalid """ validate( targetProperties ); ComputeServic...
java
ComputeService jcloudContext( Map<String,String> targetProperties ) throws TargetException { validate( targetProperties ); ComputeServiceContext context = ContextBuilder .newBuilder( targetProperties.get( PROVIDER_ID )) .endpoint( targetProperties.get( ENDPOINT )) .credentials( targetProperties.get( ID...
[ "ComputeService", "jcloudContext", "(", "Map", "<", "String", ",", "String", ">", "targetProperties", ")", "throws", "TargetException", "{", "validate", "(", "targetProperties", ")", ";", "ComputeServiceContext", "context", "=", "ContextBuilder", ".", "newBuilder", ...
Creates a JCloud context. @param targetProperties the target properties @return a non-null object @throws TargetException if the target properties are invalid
[ "Creates", "a", "JCloud", "context", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-jclouds/src/main/java/net/roboconf/target/jclouds/internal/JCloudsHandler.java#L233-L243
molgenis/molgenis
molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
DataExplorerController.getModules
@GetMapping("/modules") @ResponseBody public ModulesConfigResponse getModules(@RequestParam("entity") String entityTypeId) { """ Returns modules configuration for this entity based on current user permissions. """ EntityType entityType = dataService.getEntityType(entityTypeId); List<Module> modules...
java
@GetMapping("/modules") @ResponseBody public ModulesConfigResponse getModules(@RequestParam("entity") String entityTypeId) { EntityType entityType = dataService.getEntityType(entityTypeId); List<Module> modules = dataExplorerService.getModules(entityType); ModulesConfigResponse modulesConfigResponse = ...
[ "@", "GetMapping", "(", "\"/modules\"", ")", "@", "ResponseBody", "public", "ModulesConfigResponse", "getModules", "(", "@", "RequestParam", "(", "\"entity\"", ")", "String", "entityTypeId", ")", "{", "EntityType", "entityType", "=", "dataService", ".", "getEntityTy...
Returns modules configuration for this entity based on current user permissions.
[ "Returns", "modules", "configuration", "for", "this", "entity", "based", "on", "current", "user", "permissions", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java#L238-L274
lastaflute/lasta-thymeleaf
src/main/java/org/lastaflute/thymeleaf/expression/ClassificationExpressionObject.java
ClassificationExpressionObject.codeOf
public Classification codeOf(String classificationName, String code) { """ Get classification by code. @param classificationName The name of classification. (NotNull) @param code The code of classification to find. (NotNull) @return The found instance of classification for the code. (NotNull: if not found, thro...
java
public Classification codeOf(String classificationName, String code) { assertArgumentNotNull("elementName", classificationName); assertArgumentNotNull("code", code); return findClassificationMeta(classificationName, () -> { return "codeOf('" + classificationName + "', '" + code + "')...
[ "public", "Classification", "codeOf", "(", "String", "classificationName", ",", "String", "code", ")", "{", "assertArgumentNotNull", "(", "\"elementName\"", ",", "classificationName", ")", ";", "assertArgumentNotNull", "(", "\"code\"", ",", "code", ")", ";", "return...
Get classification by code. @param classificationName The name of classification. (NotNull) @param code The code of classification to find. (NotNull) @return The found instance of classification for the code. (NotNull: if not found, throws exception)
[ "Get", "classification", "by", "code", "." ]
train
https://github.com/lastaflute/lasta-thymeleaf/blob/d340a6e7eeddfcc9177052958c383fecd4a7fefa/src/main/java/org/lastaflute/thymeleaf/expression/ClassificationExpressionObject.java#L211-L217
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/management/JmxRegistration.java
JmxRegistration.unregisterMXBean
public static void unregisterMXBean(CacheProxy<?, ?> cache, MBeanType type) { """ Unregisters the JMX management bean for the cache. @param cache the cache to unregister @param type the mxbean type """ ObjectName objectName = getObjectName(cache, type); unregister(objectName); }
java
public static void unregisterMXBean(CacheProxy<?, ?> cache, MBeanType type) { ObjectName objectName = getObjectName(cache, type); unregister(objectName); }
[ "public", "static", "void", "unregisterMXBean", "(", "CacheProxy", "<", "?", ",", "?", ">", "cache", ",", "MBeanType", "type", ")", "{", "ObjectName", "objectName", "=", "getObjectName", "(", "cache", ",", "type", ")", ";", "unregister", "(", "objectName", ...
Unregisters the JMX management bean for the cache. @param cache the cache to unregister @param type the mxbean type
[ "Unregisters", "the", "JMX", "management", "bean", "for", "the", "cache", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/management/JmxRegistration.java#L60-L63
mangstadt/biweekly
src/main/java/biweekly/component/ICalComponent.java
ICalComponent.addExperimentalProperty
public RawProperty addExperimentalProperty(String name, ICalDataType dataType, String value) { """ Adds an experimental property to this component. @param name the property name (e.g. "X-ALT-DESC") @param dataType the property's data type or null if unknown @param value the property value @return the property ...
java
public RawProperty addExperimentalProperty(String name, ICalDataType dataType, String value) { RawProperty raw = new RawProperty(name, dataType, value); addProperty(raw); return raw; }
[ "public", "RawProperty", "addExperimentalProperty", "(", "String", "name", ",", "ICalDataType", "dataType", ",", "String", "value", ")", "{", "RawProperty", "raw", "=", "new", "RawProperty", "(", "name", ",", "dataType", ",", "value", ")", ";", "addProperty", ...
Adds an experimental property to this component. @param name the property name (e.g. "X-ALT-DESC") @param dataType the property's data type or null if unknown @param value the property value @return the property object that was created
[ "Adds", "an", "experimental", "property", "to", "this", "component", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/ICalComponent.java#L241-L245
aeshell/aesh
aesh/src/main/java/org/aesh/io/scanner/AnnotationDetector.java
AnnotationDetector.detect
public void detect(final File... filesOrDirectories) throws IOException { """ Scan all Java ClassFile ({@code *.class}) files available in the specified files and/or directories. <p> In Java, the <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"> Class path</a> contains direct...
java
public void detect(final File... filesOrDirectories) throws IOException { if (DEBUG) { print("detectFilesOrDirectories: %s", (Object)filesOrDirectories); } detect(new ClassFileIterator(filesOrDirectories, null)); }
[ "public", "void", "detect", "(", "final", "File", "...", "filesOrDirectories", ")", "throws", "IOException", "{", "if", "(", "DEBUG", ")", "{", "print", "(", "\"detectFilesOrDirectories: %s\"", ",", "(", "Object", ")", "filesOrDirectories", ")", ";", "}", "det...
Scan all Java ClassFile ({@code *.class}) files available in the specified files and/or directories. <p> In Java, the <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"> Class path</a> contains directories (top level directory as package root) and/or jar files (including zip files). <p> ...
[ "Scan", "all", "Java", "ClassFile", "(", "{", "@code", "*", ".", "class", "}", ")", "files", "available", "in", "the", "specified", "files", "and", "/", "or", "directories", ".", "<p", ">", "In", "Java", "the", "<a", "href", "=", "http", ":", "//", ...
train
https://github.com/aeshell/aesh/blob/fd7d38d333c5dbf116a9778523a4d1df61f027a3/aesh/src/main/java/org/aesh/io/scanner/AnnotationDetector.java#L298-L303
apereo/cas
support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java
AbstractServiceValidateController.generateErrorView
private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request, final WebApplicationService service) { """ Generate error view. @param code the code @param args the args @param request the request @return the model and view """ val modelAndVi...
java
private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request, final WebApplicationService service) { val modelAndView = serviceValidateConfigurationContext.getValidationViewFactory().getModelAndView(request, false, service, getClass()); val convertedDes...
[ "private", "ModelAndView", "generateErrorView", "(", "final", "String", "code", ",", "final", "Object", "[", "]", "args", ",", "final", "HttpServletRequest", "request", ",", "final", "WebApplicationService", "service", ")", "{", "val", "modelAndView", "=", "servic...
Generate error view. @param code the code @param args the args @param request the request @return the model and view
[ "Generate", "error", "view", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L275-L281
liyiorg/weixin-popular
src/main/java/weixin/popular/util/XMLConverUtil.java
XMLConverUtil.convertToObject
public static <T> T convertToObject(Class<T> clazz, InputStream inputStream, Charset charset) { """ XML to Object @param <T> T @param clazz clazz @param inputStream inputStream @param charset charset @return T """ return convertToObject(clazz, new InputStreamReader(inputStream, charset)); }
java
public static <T> T convertToObject(Class<T> clazz, InputStream inputStream, Charset charset) { return convertToObject(clazz, new InputStreamReader(inputStream, charset)); }
[ "public", "static", "<", "T", ">", "T", "convertToObject", "(", "Class", "<", "T", ">", "clazz", ",", "InputStream", "inputStream", ",", "Charset", "charset", ")", "{", "return", "convertToObject", "(", "clazz", ",", "new", "InputStreamReader", "(", "inputSt...
XML to Object @param <T> T @param clazz clazz @param inputStream inputStream @param charset charset @return T
[ "XML", "to", "Object" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/util/XMLConverUtil.java#L94-L96
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.MAIN
public static HtmlTree MAIN(HtmlStyle styleClass, Content body) { """ Generates a MAIN tag with role attribute, style attribute and some content. @param styleClass style of the MAIN tag @param body content of the MAIN tag @return an HtmlTree object for the MAIN tag """ HtmlTree htmltree = HtmlTree...
java
public static HtmlTree MAIN(HtmlStyle styleClass, Content body) { HtmlTree htmltree = HtmlTree.MAIN(body); if (styleClass != null) { htmltree.addStyle(styleClass); } return htmltree; }
[ "public", "static", "HtmlTree", "MAIN", "(", "HtmlStyle", "styleClass", ",", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "HtmlTree", ".", "MAIN", "(", "body", ")", ";", "if", "(", "styleClass", "!=", "null", ")", "{", "htmltree", ".", "addS...
Generates a MAIN tag with role attribute, style attribute and some content. @param styleClass style of the MAIN tag @param body content of the MAIN tag @return an HtmlTree object for the MAIN tag
[ "Generates", "a", "MAIN", "tag", "with", "role", "attribute", "style", "attribute", "and", "some", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L560-L566
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.evaluateFileInputWithServiceResponseAsync
public Observable<ServiceResponse<Evaluate>> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter) { """ Returns probabilities of the image containing racy or adult content. @param imageStream The image file. @param evaluateFileInpu...
java
public Observable<ServiceResponse<Evaluate>> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and...
[ "public", "Observable", "<", "ServiceResponse", "<", "Evaluate", ">", ">", "evaluateFileInputWithServiceResponseAsync", "(", "byte", "[", "]", "imageStream", ",", "EvaluateFileInputOptionalParameter", "evaluateFileInputOptionalParameter", ")", "{", "if", "(", "this", ".",...
Returns probabilities of the image containing racy or adult content. @param imageStream The image file. @param evaluateFileInputOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the obser...
[ "Returns", "probabilities", "of", "the", "image", "containing", "racy", "or", "adult", "content", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1468-L1478
jenkinsci/jenkins
cli/src/main/java/hudson/cli/CLI.java
CLI.loadKey
public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException { """ Loads RSA/DSA private key in a PEM format into {@link KeyPair}. """ return PrivateKeyProvider.loadKey(pemString, passwd); }
java
public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException { return PrivateKeyProvider.loadKey(pemString, passwd); }
[ "public", "static", "KeyPair", "loadKey", "(", "String", "pemString", ",", "String", "passwd", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "return", "PrivateKeyProvider", ".", "loadKey", "(", "pemString", ",", "passwd", ")", ";", "}" ]
Loads RSA/DSA private key in a PEM format into {@link KeyPair}.
[ "Loads", "RSA", "/", "DSA", "private", "key", "in", "a", "PEM", "format", "into", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/cli/src/main/java/hudson/cli/CLI.java#L390-L392
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.declareTypeForExactScope
public boolean declareTypeForExactScope(StaticScope scope, String name, JSType type) { """ Records declared global type names. This makes resolution faster and more robust in the common case. @param name The name of the type to be recorded. @param type The actual type being associated with the name. @return ...
java
public boolean declareTypeForExactScope(StaticScope scope, String name, JSType type) { checkState(!name.isEmpty()); if (getTypeForScopeInternal(scope, name) != null) { return false; } registerForScope(scope, type, name); return true; }
[ "public", "boolean", "declareTypeForExactScope", "(", "StaticScope", "scope", ",", "String", "name", ",", "JSType", "type", ")", "{", "checkState", "(", "!", "name", ".", "isEmpty", "(", ")", ")", ";", "if", "(", "getTypeForScopeInternal", "(", "scope", ",",...
Records declared global type names. This makes resolution faster and more robust in the common case. @param name The name of the type to be recorded. @param type The actual type being associated with the name. @return True if this name is not already defined, false otherwise.
[ "Records", "declared", "global", "type", "names", ".", "This", "makes", "resolution", "faster", "and", "more", "robust", "in", "the", "common", "case", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1157-L1165
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/HistoricTaskInstanceManager.java
HistoricTaskInstanceManager.deleteHistoricTaskInstancesByProcessInstanceIds
public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { """ Deletes all data related with tasks, which belongs to specified process instance ids. @param processInstanceIds @param deleteVariableInstances when true, will also delete variable i...
java
public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { CommandContext commandContext = Context.getCommandContext(); if (deleteVariableInstances) { getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByTaskProcessIns...
[ "public", "void", "deleteHistoricTaskInstancesByProcessInstanceIds", "(", "List", "<", "String", ">", "processInstanceIds", ",", "boolean", "deleteVariableInstances", ")", "{", "CommandContext", "commandContext", "=", "Context", ".", "getCommandContext", "(", ")", ";", ...
Deletes all data related with tasks, which belongs to specified process instance ids. @param processInstanceIds @param deleteVariableInstances when true, will also delete variable instances. Can be false when variable instances were deleted separately.
[ "Deletes", "all", "data", "related", "with", "tasks", "which", "belongs", "to", "specified", "process", "instance", "ids", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/HistoricTaskInstanceManager.java#L54-L76
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/grid/GridList.java
GridList.addElement
public void addElement(int iTargetPosition, Object bookmark) { """ Add this record's unique info to this recordset (If it falls into this list). @param iTargetPosition The position to add the element at. @param bookmark The bookmark to add. """ if (iTargetPosition >= m_iRecordListMax) thi...
java
public void addElement(int iTargetPosition, Object bookmark) { if (iTargetPosition >= m_iRecordListMax) this.growAccessList(iTargetPosition); if (iTargetPosition >= m_iRecordListEnd) m_iRecordListEnd = iTargetPosition + 1; // New logical end if (!this.validRecordInd...
[ "public", "void", "addElement", "(", "int", "iTargetPosition", ",", "Object", "bookmark", ")", "{", "if", "(", "iTargetPosition", ">=", "m_iRecordListMax", ")", "this", ".", "growAccessList", "(", "iTargetPosition", ")", ";", "if", "(", "iTargetPosition", ">=", ...
Add this record's unique info to this recordset (If it falls into this list). @param iTargetPosition The position to add the element at. @param bookmark The bookmark to add.
[ "Add", "this", "record", "s", "unique", "info", "to", "this", "recordset", "(", "If", "it", "falls", "into", "this", "list", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/grid/GridList.java#L49-L60
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksInner.java
ServerCommunicationLinksInner.beginCreateOrUpdateAsync
public Observable<ServerCommunicationLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String communicationLinkName, String partnerServer) { """ Creates a server communication link. @param resourceGroupName The name of the resource group that contains the resource. You can obtain ...
java
public Observable<ServerCommunicationLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String communicationLinkName, String partnerServer) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, communicationLinkName, partnerServer).map(new Func1<Servic...
[ "public", "Observable", "<", "ServerCommunicationLinkInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "communicationLinkName", ",", "String", "partnerServer", ")", "{", "return", "beginCreateOrUpdateWit...
Creates a server communication link. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param communicationLinkName The name of the server communication link. @param ...
[ "Creates", "a", "server", "communication", "link", "." ]
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/ServerCommunicationLinksInner.java#L391-L398
googleapis/google-http-java-client
google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java
XmlNamespaceDictionary.serialize
public void serialize(XmlSerializer serializer, String elementName, Object element) throws IOException { """ Shows a debug string representation of an element data object of key/value pairs. @param element element data object ({@link GenericXml}, {@link Map}, or any object with public fields) @param ele...
java
public void serialize(XmlSerializer serializer, String elementName, Object element) throws IOException { serialize(serializer, elementName, element, true); }
[ "public", "void", "serialize", "(", "XmlSerializer", "serializer", ",", "String", "elementName", ",", "Object", "element", ")", "throws", "IOException", "{", "serialize", "(", "serializer", ",", "elementName", ",", "element", ",", "true", ")", ";", "}" ]
Shows a debug string representation of an element data object of key/value pairs. @param element element data object ({@link GenericXml}, {@link Map}, or any object with public fields) @param elementName XML element local name prefixed by its namespace alias @throws IOException I/O exception
[ "Shows", "a", "debug", "string", "representation", "of", "an", "element", "data", "object", "of", "key", "/", "value", "pairs", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java#L198-L201
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnCommitOffer
public boolean txnCommitOffer(long itemId, Data data, boolean backup) { """ Sets the data of a reserved item and commits the change so it can be visible outside a transaction. The commit means that the item is offered to the queue if {@code backup} is false or saved into a backup map if {@code backup} is {@code...
java
public boolean txnCommitOffer(long itemId, Data data, boolean backup) { QueueItem item = txMap.remove(itemId); if (item == null && !backup) { throw new TransactionException("No reserve: " + itemId); } else if (item == null) { item = new QueueItem(this, itemId, data); ...
[ "public", "boolean", "txnCommitOffer", "(", "long", "itemId", ",", "Data", "data", ",", "boolean", "backup", ")", "{", "QueueItem", "item", "=", "txMap", ".", "remove", "(", "itemId", ")", ";", "if", "(", "item", "==", "null", "&&", "!", "backup", ")",...
Sets the data of a reserved item and commits the change so it can be visible outside a transaction. The commit means that the item is offered to the queue if {@code backup} is false or saved into a backup map if {@code backup} is {@code true}. This is because a node can hold backups for queues on other nodes. Cancels t...
[ "Sets", "the", "data", "of", "a", "reserved", "item", "and", "commits", "the", "change", "so", "it", "can", "be", "visible", "outside", "a", "transaction", ".", "The", "commit", "means", "that", "the", "item", "is", "offered", "to", "the", "queue", "if",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L350-L372
apereo/cas
core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java
BaseSingleLogoutServiceMessageHandler.sendSingleLogoutMessage
protected boolean sendSingleLogoutMessage(final SingleLogoutRequest request, final SingleLogoutMessage logoutMessage) { """ Send single logout message. @param request the request @param logoutMessage the logout request @return true if the message was successfully sent. """ val logoutService ...
java
protected boolean sendSingleLogoutMessage(final SingleLogoutRequest request, final SingleLogoutMessage logoutMessage) { val logoutService = request.getService(); LOGGER.trace("Preparing logout request for [{}] to [{}]", logoutService.getId(), request.getLogoutUrl()); val msg = getLogoutHttpMessa...
[ "protected", "boolean", "sendSingleLogoutMessage", "(", "final", "SingleLogoutRequest", "request", ",", "final", "SingleLogoutMessage", "logoutMessage", ")", "{", "val", "logoutService", "=", "request", ".", "getService", "(", ")", ";", "LOGGER", ".", "trace", "(", ...
Send single logout message. @param request the request @param logoutMessage the logout request @return true if the message was successfully sent.
[ "Send", "single", "logout", "message", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java#L175-L183
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Workitem.java
Workitem.createEffort
public Effort createEffort(double value, Member member, DateTime date, Map<String, Object> attributes) { """ Log an effort record against this workitem with the current day and time and given member and value. @param member The subject of the Effort. @param value if the Effort. @param date of the Effort reco...
java
public Effort createEffort(double value, Member member, DateTime date, Map<String, Object> attributes) { return getInstance().create().effort(value, this, member, date, attributes); }
[ "public", "Effort", "createEffort", "(", "double", "value", ",", "Member", "member", ",", "DateTime", "date", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "effort"...
Log an effort record against this workitem with the current day and time and given member and value. @param member The subject of the Effort. @param value if the Effort. @param date of the Effort record. @param attributes additional attributes for the Effort record. @return created Effort record. @throws IllegalStateE...
[ "Log", "an", "effort", "record", "against", "this", "workitem", "with", "the", "current", "day", "and", "time", "and", "given", "member", "and", "value", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Workitem.java#L185-L187
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java
JobAgentsInner.createOrUpdateAsync
public Observable<JobAgentInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { """ Creates or updates a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Reso...
java
public Observable<JobAgentInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, parameters).map(new Func1<ServiceResponse<JobAgentInner>, JobAgentInner>()...
[ "public", "Observable", "<", "JobAgentInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "JobAgentInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(",...
Creates or updates a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent to be created or updated. @param param...
[ "Creates", "or", "updates", "a", "job", "agent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java#L362-L369
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/TimeFinder.java
TimeFinder.getTimeFor
public long getTimeFor(int player) { """ Get the best guess we have for the current track position on the specified player. @param player the player number whose position is desired @return the milliseconds into the track that we believe playback has reached, or -1 if we don't know @throws IllegalStateExc...
java
public long getTimeFor(int player) { TrackPositionUpdate update = positions.get(player); if (update != null) { return interpolateTimeSinceUpdate(update, System.nanoTime()); } return -1; // We don't know. }
[ "public", "long", "getTimeFor", "(", "int", "player", ")", "{", "TrackPositionUpdate", "update", "=", "positions", ".", "get", "(", "player", ")", ";", "if", "(", "update", "!=", "null", ")", "{", "return", "interpolateTimeSinceUpdate", "(", "update", ",", ...
Get the best guess we have for the current track position on the specified player. @param player the player number whose position is desired @return the milliseconds into the track that we believe playback has reached, or -1 if we don't know @throws IllegalStateException if the TimeFinder is not running
[ "Get", "the", "best", "guess", "we", "have", "for", "the", "current", "track", "position", "on", "the", "specified", "player", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/TimeFinder.java#L252-L258
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/CopyDataHandler.java
CopyDataHandler.init
public void init(BaseField field, BaseField fldDest, Object objValue, Converter convCheckMark) { """ Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param fldDest The destination field. @param stringValue The string to set the destination field to. @param c...
java
public void init(BaseField field, BaseField fldDest, Object objValue, Converter convCheckMark) { super.init(field, fldDest, convCheckMark, null); m_bClearIfThisNull = false; // Must be for this to work this.setRespondsToMode(DBConstants.READ_MOVE, false); // Usually, you only want to move ...
[ "public", "void", "init", "(", "BaseField", "field", ",", "BaseField", "fldDest", ",", "Object", "objValue", ",", "Converter", "convCheckMark", ")", "{", "super", ".", "init", "(", "field", ",", "fldDest", ",", "convCheckMark", ",", "null", ")", ";", "m_bC...
Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param fldDest The destination field. @param stringValue The string to set the destination field to. @param convconvCheckMark If this evaluates to false, don't do the move.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/CopyDataHandler.java#L56-L63
lastaflute/lastaflute
src/main/java/org/lastaflute/web/LastaAction.java
LastaAction.forwardWith
protected HtmlResponse forwardWith(Class<?> actionType, UrlChain moreUrl_or_params) { """ Forward to the action with the more URL parts and the the parameters on GET. <pre> <span style="color: #3F7E5E">// e.g. /member/edit/3/ *same as forwardById()</span> return forwardWith(MemberEditAction.class, <span style="...
java
protected HtmlResponse forwardWith(Class<?> actionType, UrlChain moreUrl_or_params) { assertArgumentNotNull("actionType", actionType); assertArgumentNotNull("moreUrl_or_params", moreUrl_or_params); return doForward(actionType, moreUrl_or_params); }
[ "protected", "HtmlResponse", "forwardWith", "(", "Class", "<", "?", ">", "actionType", ",", "UrlChain", "moreUrl_or_params", ")", "{", "assertArgumentNotNull", "(", "\"actionType\"", ",", "actionType", ")", ";", "assertArgumentNotNull", "(", "\"moreUrl_or_params\"", "...
Forward to the action with the more URL parts and the the parameters on GET. <pre> <span style="color: #3F7E5E">// e.g. /member/edit/3/ *same as forwardById()</span> return forwardWith(MemberEditAction.class, <span style="color: #FD4747">moreUrl</span>(memberId)); <span style="color: #3F7E5E">// e.g. /member/edit/?mem...
[ "Forward", "to", "the", "action", "with", "the", "more", "URL", "parts", "and", "the", "the", "parameters", "on", "GET", ".", "<pre", ">", "<span", "style", "=", "color", ":", "#3F7E5E", ">", "//", "e", ".", "g", ".", "/", "member", "/", "edit", "/...
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/LastaAction.java#L463-L467
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.wrapIfMissing
public static String wrapIfMissing(final String str, final char wrapWith) { """ <p> Wraps a string with a char if that char is missing from the start or end of the given string. </p> <pre> StringUtils.wrap(null, *) = null StringUtils.wrap("", *) = "" StringUtils.wrap("ab", '\0') = "ab" ...
java
public static String wrapIfMissing(final String str, final char wrapWith) { if (isEmpty(str) || wrapWith == CharUtils.NUL) { return str; } final StringBuilder builder = new StringBuilder(str.length() + 2); if (str.charAt(0) != wrapWith) { builder.append(wrapWith);...
[ "public", "static", "String", "wrapIfMissing", "(", "final", "String", "str", ",", "final", "char", "wrapWith", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "wrapWith", "==", "CharUtils", ".", "NUL", ")", "{", "return", "str", ";", "}", "fina...
<p> Wraps a string with a char if that char is missing from the start or end of the given string. </p> <pre> StringUtils.wrap(null, *) = null StringUtils.wrap("", *) = "" StringUtils.wrap("ab", '\0') = "ab" StringUtils.wrap("ab", 'x') = "xabx" StringUtils.wrap("ab", '\'') = "'ab'" StringUt...
[ "<p", ">", "Wraps", "a", "string", "with", "a", "char", "if", "that", "char", "is", "missing", "from", "the", "start", "or", "end", "of", "the", "given", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L9089-L9102
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_http_farm_farmId_server_serverId_PUT
public void serviceName_http_farm_farmId_server_serverId_PUT(String serviceName, Long farmId, Long serverId, OvhBackendHTTPServer body) throws IOException { """ Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId}/server/{serverId} @param body [required] New object propertie...
java
public void serviceName_http_farm_farmId_server_serverId_PUT(String serviceName, Long farmId, Long serverId, OvhBackendHTTPServer body) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/http/farm/{farmId}/server/{serverId}"; StringBuilder sb = path(qPath, serviceName, farmId, serverId); exec(qPa...
[ "public", "void", "serviceName_http_farm_farmId_server_serverId_PUT", "(", "String", "serviceName", ",", "Long", "farmId", ",", "Long", "serverId", ",", "OvhBackendHTTPServer", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{service...
Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId}/server/{serverId} @param body [required] New object properties @param serviceName [required] The internal name of your IP load balancing @param farmId [required] Id of your farm @param serverId [required] Id of your server
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L422-L426
hayribakici/infiniteviewpager
infiniteviewpager/src/com/thehayro/view/InfinitePagerAdapter.java
InfinitePagerAdapter.movePageContents
void movePageContents(final int from, final int to) { """ Package internal. Moves contents from page index {@code from} to page index {@code to}. @param from page index to move contents from. @param to page index to move contents to. """ final PageModel<T> fromModel = mPageModels[from]; final...
java
void movePageContents(final int from, final int to) { final PageModel<T> fromModel = mPageModels[from]; final PageModel<T> toModel = mPageModels[to]; if (fromModel == null || toModel == null) { Log.w(Constants.LOG_TAG, "fillPage no model found " + fromModel + " " + toModel); ...
[ "void", "movePageContents", "(", "final", "int", "from", ",", "final", "int", "to", ")", "{", "final", "PageModel", "<", "T", ">", "fromModel", "=", "mPageModels", "[", "from", "]", ";", "final", "PageModel", "<", "T", ">", "toModel", "=", "mPageModels",...
Package internal. Moves contents from page index {@code from} to page index {@code to}. @param from page index to move contents from. @param to page index to move contents to.
[ "Package", "internal", ".", "Moves", "contents", "from", "page", "index", "{" ]
train
https://github.com/hayribakici/infiniteviewpager/blob/cb3ca2a3833bbb3aeef02b9693787987b970bb89/infiniteviewpager/src/com/thehayro/view/InfinitePagerAdapter.java#L137-L165
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/ArrayUtils.java
ArrayUtils.compareArrays
public static <T extends Comparable<T>> int compareArrays(T[] first, T[] second) { """ Provides a consistent ordering over arrays. First compares by the first element. If that element is equal, the next element is considered, and so on. This is the array version of {@link edu.stanford.nlp.util.CollectionUtils#c...
java
public static <T extends Comparable<T>> int compareArrays(T[] first, T[] second) { List<T> firstAsList = Arrays.asList(first); List<T> secondAsList = Arrays.asList(second); return CollectionUtils.compareLists(firstAsList, secondAsList); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "int", "compareArrays", "(", "T", "[", "]", "first", ",", "T", "[", "]", "second", ")", "{", "List", "<", "T", ">", "firstAsList", "=", "Arrays", ".", "asList", "(", "first"...
Provides a consistent ordering over arrays. First compares by the first element. If that element is equal, the next element is considered, and so on. This is the array version of {@link edu.stanford.nlp.util.CollectionUtils#compareLists} and uses the same logic when the arrays are of different lengths.
[ "Provides", "a", "consistent", "ordering", "over", "arrays", ".", "First", "compares", "by", "the", "first", "element", ".", "If", "that", "element", "is", "equal", "the", "next", "element", "is", "considered", "and", "so", "on", ".", "This", "is", "the", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/ArrayUtils.java#L825-L829
JM-Lab/utils-java8
src/main/java/kr/jm/utils/datastructure/JMMap.java
JMMap.newFilteredChangedKeyValueMap
public static <K, V, NK, NV> Map<NK, NV> newFilteredChangedKeyValueMap( Map<K, V> map, Predicate<? super Entry<K, V>> filter, Function<K, NK> changingKeyFunction, Function<V, NV> changingValueFunction) { """ New filtered changed key value map map. @param <K> ...
java
public static <K, V, NK, NV> Map<NK, NV> newFilteredChangedKeyValueMap( Map<K, V> map, Predicate<? super Entry<K, V>> filter, Function<K, NK> changingKeyFunction, Function<V, NV> changingValueFunction) { return getEntryStreamWithFilter(map, filter).collect(toMap( ...
[ "public", "static", "<", "K", ",", "V", ",", "NK", ",", "NV", ">", "Map", "<", "NK", ",", "NV", ">", "newFilteredChangedKeyValueMap", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "Predicate", "<", "?", "super", "Entry", "<", "K", ",", "V", ...
New filtered changed key value map map. @param <K> the type parameter @param <V> the type parameter @param <NK> the type parameter @param <NV> the type parameter @param map the map @param filter the filter @param cha...
[ "New", "filtered", "changed", "key", "value", "map", "map", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/datastructure/JMMap.java#L326-L333
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTile
public BufferedImage drawTile(int x, int y, int zoom) { """ Draw a tile image from the x, y, and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return tile image, or null """ BufferedImage image; if (isIndexQuery()) { image = drawTileQueryIndex(x, y, zoom); } e...
java
public BufferedImage drawTile(int x, int y, int zoom) { BufferedImage image; if (isIndexQuery()) { image = drawTileQueryIndex(x, y, zoom); } else { image = drawTileQueryAll(x, y, zoom); } return image; }
[ "public", "BufferedImage", "drawTile", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "BufferedImage", "image", ";", "if", "(", "isIndexQuery", "(", ")", ")", "{", "image", "=", "drawTileQueryIndex", "(", "x", ",", "y", ",", "zoom", ...
Draw a tile image from the x, y, and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return tile image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L925-L933
davetcc/tcMenu
tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/AbstractCodeCreator.java
AbstractCodeCreator.addExportVariableIfPresent
protected void addExportVariableIfPresent(String variable, String typeName) { """ Adds a variable for export only when a property is present @param variable the variable name (and also the expected property value) @param typeName the type name """ String expVar = findPropertyValue(variable).getLatest...
java
protected void addExportVariableIfPresent(String variable, String typeName) { String expVar = findPropertyValue(variable).getLatestValue(); if(expVar != null && !expVar.isEmpty()) { addVariable(new CodeVariableBuilder().exportOnly().variableType(typeName).variableName(expVar)); } ...
[ "protected", "void", "addExportVariableIfPresent", "(", "String", "variable", ",", "String", "typeName", ")", "{", "String", "expVar", "=", "findPropertyValue", "(", "variable", ")", ".", "getLatestValue", "(", ")", ";", "if", "(", "expVar", "!=", "null", "&&"...
Adds a variable for export only when a property is present @param variable the variable name (and also the expected property value) @param typeName the type name
[ "Adds", "a", "variable", "for", "export", "only", "when", "a", "property", "is", "present" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/AbstractCodeCreator.java#L92-L97
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbSeasons.java
TmdbSeasons.getSeasonAccountState
public MediaState getSeasonAccountState(int tvID, String sessionID) throws MovieDbException { """ This method lets users get the status of whether or not the TV episodes of a season have been rated. A valid session id is required. @param tvID @param sessionID @return @throws MovieDbException """ ...
java
public MediaState getSeasonAccountState(int tvID, String sessionID) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, tvID); parameters.add(Param.SESSION_ID, sessionID); URL url = new ApiUrl(apiKey, MethodBase.SEASON).subMethod(MethodSu...
[ "public", "MediaState", "getSeasonAccountState", "(", "int", "tvID", ",", "String", "sessionID", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID...
This method lets users get the status of whether or not the TV episodes of a season have been rated. A valid session id is required. @param tvID @param sessionID @return @throws MovieDbException
[ "This", "method", "lets", "users", "get", "the", "status", "of", "whether", "or", "not", "the", "TV", "episodes", "of", "a", "season", "have", "been", "rated", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbSeasons.java#L111-L124
voldemort/voldemort
src/java/voldemort/tools/admin/command/AdminCommandDebug.java
AdminCommandDebug.executeHelp
public static void executeHelp(String[] args, PrintStream stream) throws Exception { """ Parses command-line input and prints help menu. @throws Exception """ String subCmd = (args.length > 0) ? args[0] : ""; if(subCmd.equals("query-keys")) { SubCommandDebugQueryKeys.printHelp(st...
java
public static void executeHelp(String[] args, PrintStream stream) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; if(subCmd.equals("query-keys")) { SubCommandDebugQueryKeys.printHelp(stream); } else if(subCmd.equals("route")) { SubCommandDebugRoute.pr...
[ "public", "static", "void", "executeHelp", "(", "String", "[", "]", "args", ",", "PrintStream", "stream", ")", "throws", "Exception", "{", "String", "subCmd", "=", "(", "args", ".", "length", ">", "0", ")", "?", "args", "[", "0", "]", ":", "\"\"", ";...
Parses command-line input and prints help menu. @throws Exception
[ "Parses", "command", "-", "line", "input", "and", "prints", "help", "menu", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/command/AdminCommandDebug.java#L118-L127
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java
ListManagementTermsImpl.deleteTerm
public String deleteTerm(String listId, String term, String language) { """ Deletes a term from the list with list Id equal to the list Id passed. @param listId List Id of the image list. @param term Term to be deleted @param language Language of the terms. @throws IllegalArgumentException thrown if paramete...
java
public String deleteTerm(String listId, String term, String language) { return deleteTermWithServiceResponseAsync(listId, term, language).toBlocking().single().body(); }
[ "public", "String", "deleteTerm", "(", "String", "listId", ",", "String", "term", ",", "String", "language", ")", "{", "return", "deleteTermWithServiceResponseAsync", "(", "listId", ",", "term", ",", "language", ")", ".", "toBlocking", "(", ")", ".", "single",...
Deletes a term from the list with list Id equal to the list Id passed. @param listId List Id of the image list. @param term Term to be deleted @param language Language of the terms. @throws IllegalArgumentException thrown if parameters fail the validation @throws APIErrorException thrown if the request is rejected by ...
[ "Deletes", "a", "term", "from", "the", "list", "with", "list", "Id", "equal", "to", "the", "list", "Id", "passed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java#L180-L182
gresrun/jesque
src/main/java/net/greghaines/jesque/utils/JesqueUtils.java
JesqueUtils.createKey
public static String createKey(final String namespace, final String... parts) { """ Builds a namespaced Redis key with the given arguments. @param namespace the namespace to use @param parts the key parts to be joined @return an assembled String key """ return createKey(namespace, Arrays.asList(...
java
public static String createKey(final String namespace, final String... parts) { return createKey(namespace, Arrays.asList(parts)); }
[ "public", "static", "String", "createKey", "(", "final", "String", "namespace", ",", "final", "String", "...", "parts", ")", "{", "return", "createKey", "(", "namespace", ",", "Arrays", ".", "asList", "(", "parts", ")", ")", ";", "}" ]
Builds a namespaced Redis key with the given arguments. @param namespace the namespace to use @param parts the key parts to be joined @return an assembled String key
[ "Builds", "a", "namespaced", "Redis", "key", "with", "the", "given", "arguments", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/utils/JesqueUtils.java#L94-L96
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriendGroups
public List<FriendGroup> getFriendGroups() { """ Get a list of all your FriendGroups. @return A List of all your FriendGroups """ final ArrayList<FriendGroup> groups = new ArrayList<>(); for (final RosterGroup g : connection.getRoster().getGroups()) { groups.add(new FriendGroup(this, connection, g));...
java
public List<FriendGroup> getFriendGroups() { final ArrayList<FriendGroup> groups = new ArrayList<>(); for (final RosterGroup g : connection.getRoster().getGroups()) { groups.add(new FriendGroup(this, connection, g)); } return groups; }
[ "public", "List", "<", "FriendGroup", ">", "getFriendGroups", "(", ")", "{", "final", "ArrayList", "<", "FriendGroup", ">", "groups", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "RosterGroup", "g", ":", "connection", ".", "getRoster"...
Get a list of all your FriendGroups. @return A List of all your FriendGroups
[ "Get", "a", "list", "of", "all", "your", "FriendGroups", "." ]
train
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L506-L512
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/util/Util.java
Util.calculateHMAC
public static byte[] calculateHMAC(byte[] message, byte[] keyBytes, String algorithm) throws NoSuchAlgorithmException, InvalidKeyException { """ Calculates the RFC 2104 compatible HMAC for the given message, key, and algorithm. @param message message for which the MAC is to be calculated. @param keyBytes key...
java
public static byte[] calculateHMAC(byte[] message, byte[] keyBytes, String algorithm) throws NoSuchAlgorithmException, InvalidKeyException { if (keyBytes == null) { throw new IllegalArgumentException("Invalid HMAC key: null"); } String hmacAlgorithmName = "Hmac" + algorithm.toUpperCa...
[ "public", "static", "byte", "[", "]", "calculateHMAC", "(", "byte", "[", "]", "message", ",", "byte", "[", "]", "keyBytes", ",", "String", "algorithm", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", "{", "if", "(", "keyBytes", "==", "...
Calculates the RFC 2104 compatible HMAC for the given message, key, and algorithm. @param message message for which the MAC is to be calculated. @param keyBytes key for calculation. @param algorithm algorithm to be used (MD5, SHA1, SHA256). @return HMAC as byte array. @throws NoSuchAlgorithmException if invalid algo...
[ "Calculates", "the", "RFC", "2104", "compatible", "HMAC", "for", "the", "given", "message", "key", "and", "algorithm", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/util/Util.java#L545-L555
dottydingo/tracelog
src/main/java/com/dottydingo/service/tracelog/logback/TraceTurboFilter.java
TraceTurboFilter.decide
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { """ Checks to see if the current event should be logged based on if a relevant trace is active (or it would be logged anyway) @param marker the marker @param logger the logger @param le...
java
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { if(level.isGreaterOrEqual(logger.getEffectiveLevel())) return FilterReply.NEUTRAL; if(traceManager.inTrace(logger.getName())) return FilterReply.ACCEPT; return FilterReply.NEUTRA...
[ "@", "Override", "public", "FilterReply", "decide", "(", "Marker", "marker", ",", "Logger", "logger", ",", "Level", "level", ",", "String", "format", ",", "Object", "[", "]", "params", ",", "Throwable", "t", ")", "{", "if", "(", "level", ".", "isGreaterO...
Checks to see if the current event should be logged based on if a relevant trace is active (or it would be logged anyway) @param marker the marker @param logger the logger @param level the level @param format the format @param params the parameters @param t the throwable @return "ACCEPT if a relevant trace is active, "...
[ "Checks", "to", "see", "if", "the", "current", "event", "should", "be", "logged", "based", "on", "if", "a", "relevant", "trace", "is", "active", "(", "or", "it", "would", "be", "logged", "anyway", ")" ]
train
https://github.com/dottydingo/tracelog/blob/e856d3593f2aad5465a89d50f79d2fc6c4169cb1/src/main/java/com/dottydingo/service/tracelog/logback/TraceTurboFilter.java#L51-L61
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getRolesAssignedToPrivilegesBatch
public OneLoginResponse<Long> getRolesAssignedToPrivilegesBatch(String id, int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Get a batch of roles assigned to privilege. @param id Id of the privilege @param batchSize Size of the Batch @param afte...
java
public OneLoginResponse<Long> getRolesAssignedToPrivilegesBatch(String id, int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { ExtractionContext context = extractResourceBatch((Object)id, batchSize, afterCursor, Constants.GET_ROLES_ASSIGNED_TO_PRIVILEGE_URL);...
[ "public", "OneLoginResponse", "<", "Long", ">", "getRolesAssignedToPrivilegesBatch", "(", "String", "id", ",", "int", "batchSize", ",", "String", "afterCursor", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "Extract...
Get a batch of roles assigned to privilege. @param id Id of the privilege @param batchSize Size of the Batch @param afterCursor Reference to continue collecting items of next page @return OneLoginResponse of User (Batch) @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnec...
[ "Get", "a", "batch", "of", "roles", "assigned", "to", "privilege", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L3529-L3535
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedGeneratorIdentity.java
SynchronizedGeneratorIdentity.basedOn
public static SynchronizedGeneratorIdentity basedOn(String quorum, String znode, Supplier<Duration> claimDurationSupplier) throws IOException { """ Create a new {@link SynchronizedGeneratorId...
java
public static SynchronizedGeneratorIdentity basedOn(String quorum, String znode, Supplier<Duration> claimDurationSupplier) throws IOException { ZooKeeperConnection zooKeeperConnection = ne...
[ "public", "static", "SynchronizedGeneratorIdentity", "basedOn", "(", "String", "quorum", ",", "String", "znode", ",", "Supplier", "<", "Duration", ">", "claimDurationSupplier", ")", "throws", "IOException", "{", "ZooKeeperConnection", "zooKeeperConnection", "=", "new", ...
Create a new {@link SynchronizedGeneratorIdentity} instance. @param quorum Addresses of the ZooKeeper quorum (comma-separated). @param znode Root znode of the ZooKeeper resource-pool. @param claimDurationSupplier Provides the amount of time a claim to a generator-ID should be held. By us...
[ "Create", "a", "new", "{", "@link", "SynchronizedGeneratorIdentity", "}", "instance", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedGeneratorIdentity.java#L64-L72
osmdroid/osmdroid
OpenStreetMapViewer/src/main/java/org/osmdroid/StarterMapActivity.java
StarterMapActivity.onKeyUp
@Override public boolean onKeyUp (int keyCode, KeyEvent event) { """ small example of keyboard events on the mapview page up = zoom out page down = zoom in @param keyCode @param event @return """ MapView mMapView = getMapView(); if (mMapView==null) return super.onKeyUp(key...
java
@Override public boolean onKeyUp (int keyCode, KeyEvent event){ MapView mMapView = getMapView(); if (mMapView==null) return super.onKeyUp(keyCode,event); switch (keyCode) { case KeyEvent.KEYCODE_PAGE_DOWN: mMapView.getController().zoomIn(); ...
[ "@", "Override", "public", "boolean", "onKeyUp", "(", "int", "keyCode", ",", "KeyEvent", "event", ")", "{", "MapView", "mMapView", "=", "getMapView", "(", ")", ";", "if", "(", "mMapView", "==", "null", ")", "return", "super", ".", "onKeyUp", "(", "keyCod...
small example of keyboard events on the mapview page up = zoom out page down = zoom in @param keyCode @param event @return
[ "small", "example", "of", "keyboard", "events", "on", "the", "mapview", "page", "up", "=", "zoom", "out", "page", "down", "=", "zoom", "in" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/OpenStreetMapViewer/src/main/java/org/osmdroid/StarterMapActivity.java#L82-L97
jbossas/jboss-invocation
src/main/java/org/jboss/invocation/proxy/MethodIdentifier.java
MethodIdentifier.getIdentifier
public static MethodIdentifier getIdentifier(final Class<?> returnType, final String name, final Class<?>... parameterTypes) { """ Construct a new instance using class objects for the parameter types. @param returnType the method return type @param name the method name @param parameterTypes the method paramet...
java
public static MethodIdentifier getIdentifier(final Class<?> returnType, final String name, final Class<?>... parameterTypes) { return new MethodIdentifier(returnType.getName(), name, namesOf(parameterTypes)); }
[ "public", "static", "MethodIdentifier", "getIdentifier", "(", "final", "Class", "<", "?", ">", "returnType", ",", "final", "String", "name", ",", "final", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "return", "new", "MethodIdentifier", "(", "r...
Construct a new instance using class objects for the parameter types. @param returnType the method return type @param name the method name @param parameterTypes the method parameter types @return the identifier
[ "Construct", "a", "new", "instance", "using", "class", "objects", "for", "the", "parameter", "types", "." ]
train
https://github.com/jbossas/jboss-invocation/blob/f72586a554264cbc78fcdad9fdd3e84b833249c9/src/main/java/org/jboss/invocation/proxy/MethodIdentifier.java#L219-L221
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.booleanTemplate
public static BooleanTemplate booleanTemplate(Template template, List<?> args) { """ Create a new Template expression @param template template @param args template parameters @return template expression """ return new BooleanTemplate(template, ImmutableList.copyOf(args)); }
java
public static BooleanTemplate booleanTemplate(Template template, List<?> args) { return new BooleanTemplate(template, ImmutableList.copyOf(args)); }
[ "public", "static", "BooleanTemplate", "booleanTemplate", "(", "Template", "template", ",", "List", "<", "?", ">", "args", ")", "{", "return", "new", "BooleanTemplate", "(", "template", ",", "ImmutableList", ".", "copyOf", "(", "args", ")", ")", ";", "}" ]
Create a new Template expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1021-L1023
payneteasy/superfly
superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java
CommonsHttpInvokerRequestExecutor.validateResponse
protected void validateResponse(HttpInvokerClientConfiguration config, PostMethod postMethod) throws IOException { """ Validate the given response as contained in the PostMethod object, throwing an exception if it does not correspond to a successful HTTP response. <p>Default implementation rejects an...
java
protected void validateResponse(HttpInvokerClientConfiguration config, PostMethod postMethod) throws IOException { if (postMethod.getStatusCode() >= 300) { throw new HttpException( "Did not receive successful HTTP response: status code = " + postMethod.getStatusCode(...
[ "protected", "void", "validateResponse", "(", "HttpInvokerClientConfiguration", "config", ",", "PostMethod", "postMethod", ")", "throws", "IOException", "{", "if", "(", "postMethod", ".", "getStatusCode", "(", ")", ">=", "300", ")", "{", "throw", "new", "HttpExcep...
Validate the given response as contained in the PostMethod object, throwing an exception if it does not correspond to a successful HTTP response. <p>Default implementation rejects any HTTP status code beyond 2xx, to avoid parsing the response body and trying to deserialize from a corrupted stream. @param config the HTT...
[ "Validate", "the", "given", "response", "as", "contained", "in", "the", "PostMethod", "object", "throwing", "an", "exception", "if", "it", "does", "not", "correspond", "to", "a", "successful", "HTTP", "response", ".", "<p", ">", "Default", "implementation", "r...
train
https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java#L205-L213
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/merge/policy/CacheMergePolicyProvider.java
CacheMergePolicyProvider.getMergePolicy
public Object getMergePolicy(String className) { """ Returns an instance of a merge policy by its classname. <p> First tries to resolve the classname as {@link SplitBrainMergePolicy}, then as {@link com.hazelcast.cache.CacheMergePolicy}. <p> If no merge policy matches an {@link InvalidConfigurationException} ...
java
public Object getMergePolicy(String className) { if (className == null) { throw new InvalidConfigurationException("Class name is mandatory!"); } try { return policyProvider.getMergePolicy(className); } catch (InvalidConfigurationException e) { return g...
[ "public", "Object", "getMergePolicy", "(", "String", "className", ")", "{", "if", "(", "className", "==", "null", ")", "{", "throw", "new", "InvalidConfigurationException", "(", "\"Class name is mandatory!\"", ")", ";", "}", "try", "{", "return", "policyProvider",...
Returns an instance of a merge policy by its classname. <p> First tries to resolve the classname as {@link SplitBrainMergePolicy}, then as {@link com.hazelcast.cache.CacheMergePolicy}. <p> If no merge policy matches an {@link InvalidConfigurationException} is thrown. @param className the classname of the given merge p...
[ "Returns", "an", "instance", "of", "a", "merge", "policy", "by", "its", "classname", ".", "<p", ">", "First", "tries", "to", "resolve", "the", "classname", "as", "{", "@link", "SplitBrainMergePolicy", "}", "then", "as", "{", "@link", "com", ".", "hazelcast...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/merge/policy/CacheMergePolicyProvider.java#L84-L93
dihedron/dihedron-commons
src/main/java/org/dihedron/core/zip/ZipArchive.java
ZipArchive.addFile
public void addFile(String zipEntry, byte[] data) throws IOException { """ Adds a file to the ZIP archive, given its content as an array of bytes. @param zipEntry name of the entry in the archive. @param data data bytes to be stored as file contents in the archive. """ stream.putNextEntry(new ZipEntry(...
java
public void addFile(String zipEntry, byte[] data) throws IOException { stream.putNextEntry(new ZipEntry(zipEntry)); stream.write(data); }
[ "public", "void", "addFile", "(", "String", "zipEntry", ",", "byte", "[", "]", "data", ")", "throws", "IOException", "{", "stream", ".", "putNextEntry", "(", "new", "ZipEntry", "(", "zipEntry", ")", ")", ";", "stream", ".", "write", "(", "data", ")", "...
Adds a file to the ZIP archive, given its content as an array of bytes. @param zipEntry name of the entry in the archive. @param data data bytes to be stored as file contents in the archive.
[ "Adds", "a", "file", "to", "the", "ZIP", "archive", "given", "its", "content", "as", "an", "array", "of", "bytes", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/zip/ZipArchive.java#L119-L122
eclipse/hawkbit
hawkbit-security-core/src/main/java/org/eclipse/hawkbit/util/IpUtil.java
IpUtil.getClientIpFromRequest
public static URI getClientIpFromRequest(final HttpServletRequest request, final String forwardHeader) { """ Retrieves the string based IP address from a given {@link HttpServletRequest} by either the {@link HttpHeaders#X_FORWARDED_FOR} or by the {@link HttpServletRequest#getRemoteAddr()} methods. @param req...
java
public static URI getClientIpFromRequest(final HttpServletRequest request, final String forwardHeader) { return getClientIpFromRequest(request, forwardHeader, true); }
[ "public", "static", "URI", "getClientIpFromRequest", "(", "final", "HttpServletRequest", "request", ",", "final", "String", "forwardHeader", ")", "{", "return", "getClientIpFromRequest", "(", "request", ",", "forwardHeader", ",", "true", ")", ";", "}" ]
Retrieves the string based IP address from a given {@link HttpServletRequest} by either the {@link HttpHeaders#X_FORWARDED_FOR} or by the {@link HttpServletRequest#getRemoteAddr()} methods. @param request the {@link HttpServletRequest} to determine the IP address where this request has been sent from @param forwardHea...
[ "Retrieves", "the", "string", "based", "IP", "address", "from", "a", "given", "{", "@link", "HttpServletRequest", "}", "by", "either", "the", "{", "@link", "HttpHeaders#X_FORWARDED_FOR", "}", "or", "by", "the", "{", "@link", "HttpServletRequest#getRemoteAddr", "()...
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/util/IpUtil.java#L78-L80
killbill/killbill
profiles/killbill/src/main/java/org/apache/shiro/guice/web/ShiroWebModuleWith435.java
ShiroWebModuleWith435.addFilterChain
@SuppressWarnings( { """ Adds a filter chain to the shiro configuration. <p/> NOTE: If the provided key is for a subclass of {@link org.apache.shiro.web.filter.PathMatchingFilter}, it will be registered with a proper provider. @param pattern @param keys """"UnusedDeclaration"}) protected final void ...
java
@SuppressWarnings({"UnusedDeclaration"}) protected final void addFilterChain(String pattern, Key<? extends Filter>... keys) { filterChains.put(pattern, keys); }
[ "@", "SuppressWarnings", "(", "{", "\"UnusedDeclaration\"", "}", ")", "protected", "final", "void", "addFilterChain", "(", "String", "pattern", ",", "Key", "<", "?", "extends", "Filter", ">", "...", "keys", ")", "{", "filterChains", ".", "put", "(", "pattern...
Adds a filter chain to the shiro configuration. <p/> NOTE: If the provided key is for a subclass of {@link org.apache.shiro.web.filter.PathMatchingFilter}, it will be registered with a proper provider. @param pattern @param keys
[ "Adds", "a", "filter", "chain", "to", "the", "shiro", "configuration", ".", "<p", "/", ">", "NOTE", ":", "If", "the", "provided", "key", "is", "for", "a", "subclass", "of", "{", "@link", "org", ".", "apache", ".", "shiro", ".", "web", ".", "filter", ...
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/profiles/killbill/src/main/java/org/apache/shiro/guice/web/ShiroWebModuleWith435.java#L220-L223
aalmiray/Json-lib
src/main/java/net/sf/json/xml/XMLSerializer.java
XMLSerializer.addNamespace
public void addNamespace( String prefix, String uri, String elementName ) { """ Adds a namespace declaration to an element.<br> If the elementName param is null or blank, the namespace declaration will be added to the root element. @param prefix namespace prefix @param uri namespace uri @param elementName n...
java
public void addNamespace( String prefix, String uri, String elementName ) { if( StringUtils.isBlank( uri ) ){ return; } if( prefix == null ){ prefix = ""; } if( StringUtils.isBlank( elementName ) ){ rootNamespace.put( prefix.trim(), uri.trim() ); }else{ ...
[ "public", "void", "addNamespace", "(", "String", "prefix", ",", "String", "uri", ",", "String", "elementName", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "uri", ")", ")", "{", "return", ";", "}", "if", "(", "prefix", "==", "null", ")", ...
Adds a namespace declaration to an element.<br> If the elementName param is null or blank, the namespace declaration will be added to the root element. @param prefix namespace prefix @param uri namespace uri @param elementName name of target element
[ "Adds", "a", "namespace", "declaration", "to", "an", "element", ".", "<br", ">", "If", "the", "elementName", "param", "is", "null", "or", "blank", "the", "namespace", "declaration", "will", "be", "added", "to", "the", "root", "element", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/xml/XMLSerializer.java#L214-L231