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
Red5/red5-io
src/main/java/org/red5/io/amf/Input.java
Input.readKeyValues
protected void readKeyValues(Map<String, Object> result) { """ Read key - value pairs into Map object @param result Map to put resulting pair to """ while (hasMoreProperties()) { String name = readPropertyName(); log.debug("property: {}", name); Object property = Deserializer.deserialize(this, O...
java
protected void readKeyValues(Map<String, Object> result) { while (hasMoreProperties()) { String name = readPropertyName(); log.debug("property: {}", name); Object property = Deserializer.deserialize(this, Object.class); log.debug("val: {}", property); result.put(name, property); if (hasMorePropertie...
[ "protected", "void", "readKeyValues", "(", "Map", "<", "String", ",", "Object", ">", "result", ")", "{", "while", "(", "hasMoreProperties", "(", ")", ")", "{", "String", "name", "=", "readPropertyName", "(", ")", ";", "log", ".", "debug", "(", "\"propert...
Read key - value pairs into Map object @param result Map to put resulting pair to
[ "Read", "key", "-", "value", "pairs", "into", "Map", "object" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/amf/Input.java#L340-L353
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/support/PropertyChangeSupportUtils.java
PropertyChangeSupportUtils.addPropertyChangeListener
public static void addPropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener) { """ Adds a named property change listener to the given JavaBean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the <a href="http://jav...
java
public static void addPropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener) { Assert.notNull(propertyName, "The property name must not be null."); Assert.notNull(listener, "The listener must not be null."); if (bean instanceof PropertyChangePublisher) { ...
[ "public", "static", "void", "addPropertyChangeListener", "(", "Object", "bean", ",", "String", "propertyName", ",", "PropertyChangeListener", "listener", ")", "{", "Assert", ".", "notNull", "(", "propertyName", ",", "\"The property name must not be null.\"", ")", ";", ...
Adds a named property change listener to the given JavaBean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the <a href="http://java.sun.com/products/javabeans/docs/spec.html">Java Bean Specification</a>. The bean class must provide the method: <pre> public...
[ "Adds", "a", "named", "property", "change", "listener", "to", "the", "given", "JavaBean", ".", "The", "bean", "must", "provide", "the", "optional", "support", "for", "listening", "on", "named", "properties", "as", "described", "in", "section", "7", ".", "4",...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/support/PropertyChangeSupportUtils.java#L77-L102
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.exportObjects2Excel
public void exportObjects2Excel(List<?> data, List<String> header, OutputStream os) throws IOException { """ 无模板、无注解的数据(形如{@code List[?]}、{@code List[List[?]]}、{@code List[Object[]]})导出 @param data 待导出数据 @param header 设置表头信息 @param os 生成的Excel待输出数据流 @throws IOException 异常 @author Crab2Died...
java
public void exportObjects2Excel(List<?> data, List<String> header, OutputStream os) throws IOException { try (Workbook workbook = exportExcelBySimpleHandler(data, header, null, true)) { workbook.write(os); } }
[ "public", "void", "exportObjects2Excel", "(", "List", "<", "?", ">", "data", ",", "List", "<", "String", ">", "header", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "try", "(", "Workbook", "workbook", "=", "exportExcelBySimpleHandler", "(", ...
无模板、无注解的数据(形如{@code List[?]}、{@code List[List[?]]}、{@code List[Object[]]})导出 @param data 待导出数据 @param header 设置表头信息 @param os 生成的Excel待输出数据流 @throws IOException 异常 @author Crab2Died
[ "无模板、无注解的数据", "(", "形如", "{", "@code", "List", "[", "?", "]", "}", "、", "{", "@code", "List", "[", "List", "[", "?", "]]", "}", "、", "{", "@code", "List", "[", "Object", "[]", "]", "}", ")", "导出" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L1323-L1329
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyChildChanged
@UiThread public void notifyChildChanged(int parentPosition, int childPosition) { """ Notify any registered observers that the parent at {@code parentPosition} has a child located at {@code childPosition} that has changed. <p> This is an item change event, not a structural change event. It indicates that an...
java
@UiThread public void notifyChildChanged(int parentPosition, int childPosition) { P parent = mParentList.get(parentPosition); int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition); parentWrapper.s...
[ "@", "UiThread", "public", "void", "notifyChildChanged", "(", "int", "parentPosition", ",", "int", "childPosition", ")", "{", "P", "parent", "=", "mParentList", ".", "get", "(", "parentPosition", ")", ";", "int", "flatParentPosition", "=", "getFlatParentPosition",...
Notify any registered observers that the parent at {@code parentPosition} has a child located at {@code childPosition} that has changed. <p> This is an item change event, not a structural change event. It indicates that any reflection of the data at {@code childPosition} is out of date and should be updated. The parent...
[ "Notify", "any", "registered", "observers", "that", "the", "parent", "at", "{", "@code", "parentPosition", "}", "has", "a", "child", "located", "at", "{", "@code", "childPosition", "}", "that", "has", "changed", ".", "<p", ">", "This", "is", "an", "item", ...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1241-L1253
Terradue/jcatalogue-client
apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java
Proxy.setType
public Proxy setType( String type ) { """ Sets the type of the proxy. @param type The type of the proxy, e.g. "http", may be {@code null}. @return The new proxy, never {@code null}. """ if ( this.type.equals( type ) || ( type == null && this.type.length() <= 0 ) ) { return this;...
java
public Proxy setType( String type ) { if ( this.type.equals( type ) || ( type == null && this.type.length() <= 0 ) ) { return this; } return new Proxy( type, host, port, auth ); }
[ "public", "Proxy", "setType", "(", "String", "type", ")", "{", "if", "(", "this", ".", "type", ".", "equals", "(", "type", ")", "||", "(", "type", "==", "null", "&&", "this", ".", "type", ".", "length", "(", ")", "<=", "0", ")", ")", "{", "retu...
Sets the type of the proxy. @param type The type of the proxy, e.g. "http", may be {@code null}. @return The new proxy, never {@code null}.
[ "Sets", "the", "type", "of", "the", "proxy", "." ]
train
https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java#L79-L86
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/MapServiceContextImpl.java
MapServiceContextImpl.removeAllRecordStoresOfAllMaps
protected void removeAllRecordStoresOfAllMaps(boolean onShutdown, boolean onRecordStoreDestroy) { """ Removes all record stores from all partitions. Calls {@link #removeRecordStoresFromPartitionMatchingWith} internally and @param onShutdown {@code true} if this method is called during map service s...
java
protected void removeAllRecordStoresOfAllMaps(boolean onShutdown, boolean onRecordStoreDestroy) { for (PartitionContainer partitionContainer : partitionContainers) { if (partitionContainer != null) { removeRecordStoresFromPartitionMatchingWith(allRecordStores(), ...
[ "protected", "void", "removeAllRecordStoresOfAllMaps", "(", "boolean", "onShutdown", ",", "boolean", "onRecordStoreDestroy", ")", "{", "for", "(", "PartitionContainer", "partitionContainer", ":", "partitionContainers", ")", "{", "if", "(", "partitionContainer", "!=", "n...
Removes all record stores from all partitions. Calls {@link #removeRecordStoresFromPartitionMatchingWith} internally and @param onShutdown {@code true} if this method is called during map service shutdown, otherwise set {@code false} @param onRecordStoreDestroy {@code true} if this method is called during t...
[ "Removes", "all", "record", "stores", "from", "all", "partitions", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapServiceContextImpl.java#L314-L321
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.multiply
public BigDecimal multiply(BigDecimal multiplicand, MathContext mc) { """ Returns a {@code BigDecimal} whose value is <tt>(this &times; multiplicand)</tt>, with rounding according to the context settings. @param multiplicand value to be multiplied by this {@code BigDecimal}. @param mc the context to use. @...
java
public BigDecimal multiply(BigDecimal multiplicand, MathContext mc) { if (mc.precision == 0) return multiply(multiplicand); int productScale = checkScale((long) scale + multiplicand.scale); if (this.intCompact != INFLATED) { if ((multiplicand.intCompact != INFLATED)) { ...
[ "public", "BigDecimal", "multiply", "(", "BigDecimal", "multiplicand", ",", "MathContext", "mc", ")", "{", "if", "(", "mc", ".", "precision", "==", "0", ")", "return", "multiply", "(", "multiplicand", ")", ";", "int", "productScale", "=", "checkScale", "(", ...
Returns a {@code BigDecimal} whose value is <tt>(this &times; multiplicand)</tt>, with rounding according to the context settings. @param multiplicand value to be multiplied by this {@code BigDecimal}. @param mc the context to use. @return {@code this * multiplicand}, rounded as necessary. @throws ArithmeticExceptio...
[ "Returns", "a", "{", "@code", "BigDecimal", "}", "whose", "value", "is", "<tt", ">", "(", "this", "&times", ";", "multiplicand", ")", "<", "/", "tt", ">", "with", "rounding", "according", "to", "the", "context", "settings", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L1511-L1528
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java
DMatrixUtils.roundToClosest
public static BigDecimal roundToClosest(double value, double steps) { """ Returns the closest rounded value of the given value for the given steps. @param value The original value to be rounded. @param steps The steps. @return The closest rounded value of the given value for the given steps. """ f...
java
public static BigDecimal roundToClosest(double value, double steps) { final BigDecimal down = DMatrixUtils.roundDownTo(value, steps); final BigDecimal up = DMatrixUtils.roundUpTo(value, steps); final BigDecimal orig = new BigDecimal(String.valueOf(value)); if (orig.subtract(down).abs().c...
[ "public", "static", "BigDecimal", "roundToClosest", "(", "double", "value", ",", "double", "steps", ")", "{", "final", "BigDecimal", "down", "=", "DMatrixUtils", ".", "roundDownTo", "(", "value", ",", "steps", ")", ";", "final", "BigDecimal", "up", "=", "DMa...
Returns the closest rounded value of the given value for the given steps. @param value The original value to be rounded. @param steps The steps. @return The closest rounded value of the given value for the given steps.
[ "Returns", "the", "closest", "rounded", "value", "of", "the", "given", "value", "for", "the", "given", "steps", "." ]
train
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java#L347-L355
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbReviews.java
TmdbReviews.getReview
public Review getReview(String reviewId) throws MovieDbException { """ Get the full details of a review by ID. @param reviewId @return @throws MovieDbException """ TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, reviewId); URL url = new ApiUrl(apiKey, Me...
java
public Review getReview(String reviewId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, reviewId); URL url = new ApiUrl(apiKey, MethodBase.REVIEW).buildUrl(parameters); String webpage = httpTools.getRequest(url); try { ...
[ "public", "Review", "getReview", "(", "String", "reviewId", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID", ",", "reviewId", ")", ";", "UR...
Get the full details of a review by ID. @param reviewId @return @throws MovieDbException
[ "Get", "the", "full", "details", "of", "a", "review", "by", "ID", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbReviews.java#L58-L70
spring-projects/spring-flex
spring-flex-core/src/main/java/org/springframework/flex/config/xml/RemotingDestinationExporterBeanDefinitionFactory.java
RemotingDestinationExporterBeanDefinitionFactory.parseInternal
protected BeanDefinitionHolder parseInternal(Element element, ParserContext parserContext, String exportedBeanReference) { """ The main parsing algorithm for the <code>remoting-destination</code> tag. @param element the element being parsed @param parserContext the current parser context @param exportedBeanRe...
java
protected BeanDefinitionHolder parseInternal(Element element, ParserContext parserContext, String exportedBeanReference) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(REMOTING_DESTINATION_EXPORTER_CLASS_NAME); builder.getRawBeanDefinition().setRole(BeanDefinition.ROLE_INF...
[ "protected", "BeanDefinitionHolder", "parseInternal", "(", "Element", "element", ",", "ParserContext", "parserContext", ",", "String", "exportedBeanReference", ")", "{", "BeanDefinitionBuilder", "builder", "=", "BeanDefinitionBuilder", ".", "genericBeanDefinition", "(", "RE...
The main parsing algorithm for the <code>remoting-destination</code> tag. @param element the element being parsed @param parserContext the current parser context @param exportedBeanReference reference to the bean being exported as a remoting destination @return a bean definition holder for the {@link RemotingDestinati...
[ "The", "main", "parsing", "algorithm", "for", "the", "<code", ">", "remoting", "-", "destination<", "/", "code", ">", "tag", "." ]
train
https://github.com/spring-projects/spring-flex/blob/85f2bff300d74e2d77d565f97a09d12d18e19adc/spring-flex-core/src/main/java/org/springframework/flex/config/xml/RemotingDestinationExporterBeanDefinitionFactory.java#L68-L91
alkacon/opencms-core
src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java
CmsNewResourceTypeDialog.adjustSchema
private void adjustSchema(String schemaPath, String newElementString) { """ Adjustes schema.<p> @param schemaPath path to schema resource @param newElementString new Element name """ newElementString = newElementString.substring(0, 1).toUpperCase() + newElementString.substring(1); try { ...
java
private void adjustSchema(String schemaPath, String newElementString) { newElementString = newElementString.substring(0, 1).toUpperCase() + newElementString.substring(1); try { CmsFile file = m_cms.readFile(schemaPath); CmsMacroResolver macroResolver = new CmsMacroResolver(); ...
[ "private", "void", "adjustSchema", "(", "String", "schemaPath", ",", "String", "newElementString", ")", "{", "newElementString", "=", "newElementString", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", ")", "+", "newElementString", ".", "su...
Adjustes schema.<p> @param schemaPath path to schema resource @param newElementString new Element name
[ "Adjustes", "schema", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java#L677-L721
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.subscribeOn
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable<T> subscribeOn(@NonNull Scheduler scheduler) { """ Asynchronously subscribes Subscribers to this Publisher on the specified {@link Scheduler}. <p> If there is a {@lin...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable<T> subscribeOn(@NonNull Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return subscribeOn(scheduler, !(this instanceof F...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "PASS_THROUGH", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "final", "Flowable", "<", "T", ">", "subscribeOn", "(", "@", "NonNull", "Schedul...
Asynchronously subscribes Subscribers to this Publisher on the specified {@link Scheduler}. <p> If there is a {@link #create(FlowableOnSubscribe, BackpressureStrategy)} type source up in the chain, it is recommended to use {@code subscribeOn(scheduler, false)} instead to avoid same-pool deadlock because requests may pi...
[ "Asynchronously", "subscribes", "Subscribers", "to", "this", "Publisher", "on", "the", "specified", "{", "@link", "Scheduler", "}", ".", "<p", ">", "If", "there", "is", "a", "{", "@link", "#create", "(", "FlowableOnSubscribe", "BackpressureStrategy", ")", "}", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L14565-L14571
lightbend/config
config/src/main/java/com/typesafe/config/ConfigFactory.java
ConfigFactory.parseURL
public static Config parseURL(URL url, ConfigParseOptions options) { """ Parses a URL into a Config instance. Does not call {@link Config#resolve} or merge the parsed stream with any other configuration; this method parses a single stream and does nothing else. It does process "include" statements in the parse...
java
public static Config parseURL(URL url, ConfigParseOptions options) { return Parseable.newURL(url, options).parse().toConfig(); }
[ "public", "static", "Config", "parseURL", "(", "URL", "url", ",", "ConfigParseOptions", "options", ")", "{", "return", "Parseable", ".", "newURL", "(", "url", ",", "options", ")", ".", "parse", "(", ")", ".", "toConfig", "(", ")", ";", "}" ]
Parses a URL into a Config instance. Does not call {@link Config#resolve} or merge the parsed stream with any other configuration; this method parses a single stream and does nothing else. It does process "include" statements in the parsed stream, and may end up doing other IO due to those statements. @param url the u...
[ "Parses", "a", "URL", "into", "a", "Config", "instance", ".", "Does", "not", "call", "{", "@link", "Config#resolve", "}", "or", "merge", "the", "parsed", "stream", "with", "any", "other", "configuration", ";", "this", "method", "parses", "a", "single", "st...
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigFactory.java#L705-L707
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/math/ProbabilityUtils.java
ProbabilityUtils.cleanProbability
public static double cleanProbability(double prob, double epsilon, boolean allowOne) { """ Cleans up input which should be probabilities. Occasionally due to numerical stability issues you get input which should be a probability but could actually be very slightly less than 0 or more than 1.0. This function wil...
java
public static double cleanProbability(double prob, double epsilon, boolean allowOne) { if (prob < -epsilon || prob > (1.0 + epsilon)) { throw new InvalidProbabilityException(prob); } if (prob < epsilon) { prob = epsilon; } else { final double limit = allowOne ? 1.0 : (1.0 - epsilon); ...
[ "public", "static", "double", "cleanProbability", "(", "double", "prob", ",", "double", "epsilon", ",", "boolean", "allowOne", ")", "{", "if", "(", "prob", "<", "-", "epsilon", "||", "prob", ">", "(", "1.0", "+", "epsilon", ")", ")", "{", "throw", "new...
Cleans up input which should be probabilities. Occasionally due to numerical stability issues you get input which should be a probability but could actually be very slightly less than 0 or more than 1.0. This function will take values within epsilon of being good probabilities and fix them. If the prob is within epsil...
[ "Cleans", "up", "input", "which", "should", "be", "probabilities", ".", "Occasionally", "due", "to", "numerical", "stability", "issues", "you", "get", "input", "which", "should", "be", "a", "probability", "but", "could", "actually", "be", "very", "slightly", "...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/math/ProbabilityUtils.java#L35-L50
app55/app55-java
src/support/java/com/googlecode/openbeans/PersistenceDelegate.java
PersistenceDelegate.writeObject
public void writeObject(Object oldInstance, Encoder out) { """ Writes a bean object to the given encoder. First it is checked whether the simulating new object can be mutated to the old instance. If yes, it is initialized to produce a series of expressions and statements that can be used to restore the old instan...
java
public void writeObject(Object oldInstance, Encoder out) { Object newInstance = out.get(oldInstance); Class<?> clazz = oldInstance.getClass(); if (mutatesTo(oldInstance, newInstance)) { initialize(clazz, oldInstance, newInstance, out); } else { out.remove(oldInstance); out.writeExpression(instan...
[ "public", "void", "writeObject", "(", "Object", "oldInstance", ",", "Encoder", "out", ")", "{", "Object", "newInstance", "=", "out", ".", "get", "(", "oldInstance", ")", ";", "Class", "<", "?", ">", "clazz", "=", "oldInstance", ".", "getClass", "(", ")",...
Writes a bean object to the given encoder. First it is checked whether the simulating new object can be mutated to the old instance. If yes, it is initialized to produce a series of expressions and statements that can be used to restore the old instance. Otherwise, remove the new object in the simulating new environmen...
[ "Writes", "a", "bean", "object", "to", "the", "given", "encoder", ".", "First", "it", "is", "checked", "whether", "the", "simulating", "new", "object", "can", "be", "mutated", "to", "the", "old", "instance", ".", "If", "yes", "it", "is", "initialized", "...
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/PersistenceDelegate.java#L99-L117
phoenixnap/springmvc-raml-plugin
src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/NamingHelper.java
NamingHelper.getAllResourcesNames
public static String getAllResourcesNames(String url, boolean singularize) { """ Attempts to infer the name of a resource from a resources's full URL. @param url The URL of the raml resource being parsed @param singularize Indicates if the resource name should be singularized or not @return name of a resour...
java
public static String getAllResourcesNames(String url, boolean singularize) { StringBuilder stringBuilder = new StringBuilder(); if (StringUtils.hasText(url)) { String[] resources = SLASH.split(url); int lengthCounter = 0; for (int i = resources.length - 1; i >= Config.getResourceTopLevelInClassNames() + 1...
[ "public", "static", "String", "getAllResourcesNames", "(", "String", "url", ",", "boolean", "singularize", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "StringUtils", ".", "hasText", "(", "url", ")", ")", ...
Attempts to infer the name of a resource from a resources's full URL. @param url The URL of the raml resource being parsed @param singularize Indicates if the resource name should be singularized or not @return name of a resource
[ "Attempts", "to", "infer", "the", "name", "of", "a", "resource", "from", "a", "resources", "s", "full", "URL", "." ]
train
https://github.com/phoenixnap/springmvc-raml-plugin/blob/6387072317cd771eb7d6f30943f556ac20dd3c84/src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/NamingHelper.java#L261-L284
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.assignRoleToUser
public Boolean assignRoleToUser(long id, List<Long> roleIds) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Assigns Role to User @param id Id of the user to be modified @param roleIds Set to an array of one or more role IDs. @return true if success @throws OAuthSystemExcep...
java
public Boolean assignRoleToUser(long id, List<Long> roleIds) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient(); OAuthClient oAuthClient = new OAuthClient(httpClient); URIBuilder ur...
[ "public", "Boolean", "assignRoleToUser", "(", "long", "id", ",", "List", "<", "Long", ">", "roleIds", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";",...
Assigns Role to User @param id Id of the user to be modified @param roleIds Set to an array of one or more role IDs. @return true if success @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating the Onelogin...
[ "Assigns", "Role", "to", "User" ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L1075-L1105
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java
DataSynchronizer.updateMany
UpdateResult updateMany(final MongoNamespace namespace, final Bson filter, final Bson update) { """ Update all documents in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @para...
java
UpdateResult updateMany(final MongoNamespace namespace, final Bson filter, final Bson update) { return updateMany(namespace, filter, update, new UpdateOptions()); }
[ "UpdateResult", "updateMany", "(", "final", "MongoNamespace", "namespace", ",", "final", "Bson", "filter", ",", "final", "Bson", "update", ")", "{", "return", "updateMany", "(", "namespace", ",", "filter", ",", "update", ",", "new", "UpdateOptions", "(", ")", ...
Update all documents in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @param update a document describing the update, which may not be null. The update to apply must include only update operators. @return the result of the update many ...
[ "Update", "all", "documents", "in", "the", "collection", "according", "to", "the", "specified", "arguments", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java#L2455-L2459
nohana/Amalgam
amalgam/src/main/java/com/amalgam/view/MotionEventUtils.java
MotionEventUtils.getHorizontalMotionDirection
public static MotionDirection getHorizontalMotionDirection(MotionEvent e1, MotionEvent e2, float threshold) { """ Calculate the horizontal move motion direction. @param e1 start point of the motion. @param e2 end point of the motion. @param threshold threshold to detect the motion. @return the motion direction...
java
public static MotionDirection getHorizontalMotionDirection(MotionEvent e1, MotionEvent e2, float threshold) { float delta = getHorizontalMotionRawDelta(e1, e2); return getHorizontalMotionDirection(delta, threshold); }
[ "public", "static", "MotionDirection", "getHorizontalMotionDirection", "(", "MotionEvent", "e1", ",", "MotionEvent", "e2", ",", "float", "threshold", ")", "{", "float", "delta", "=", "getHorizontalMotionRawDelta", "(", "e1", ",", "e2", ")", ";", "return", "getHori...
Calculate the horizontal move motion direction. @param e1 start point of the motion. @param e2 end point of the motion. @param threshold threshold to detect the motion. @return the motion direction for the horizontal axis.
[ "Calculate", "the", "horizontal", "move", "motion", "direction", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/view/MotionEventUtils.java#L52-L55
stephanenicolas/robospice
robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java
SpiceManager.putInCache
public <U, T extends U> void putInCache(final Class<U> clazz, final Object requestCacheKey, final T data, RequestListener<U> listener) { """ Adds some data to the cache, asynchronously. @param clazz a super class or the class of data. @param requestCacheKey the request cache key that data will be stored in. @...
java
public <U, T extends U> void putInCache(final Class<U> clazz, final Object requestCacheKey, final T data, RequestListener<U> listener) { @SuppressWarnings({ "unchecked", "rawtypes" }) final SpiceRequest<U> spiceRequest = new SpiceRequest(clazz) { @Override public U loadDataFromNe...
[ "public", "<", "U", ",", "T", "extends", "U", ">", "void", "putInCache", "(", "final", "Class", "<", "U", ">", "clazz", ",", "final", "Object", "requestCacheKey", ",", "final", "T", "data", ",", "RequestListener", "<", "U", ">", "listener", ")", "{", ...
Adds some data to the cache, asynchronously. @param clazz a super class or the class of data. @param requestCacheKey the request cache key that data will be stored in. @param data the data to store. Maybe null if supported by underlying ObjectPersister. @param listener a listener that will be notified of this request's...
[ "Adds", "some", "data", "to", "the", "cache", "asynchronously", "." ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java#L537-L548
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java
GVRPose.setLocalMatrix
public void setLocalMatrix(int boneindex, Matrix4f mtx) { """ Set the local matrix for this bone (relative to parent bone). <p> All bones in the skeleton start out at the origin oriented along the bone axis (usually 0,0,1). The pose orients and positions each bone in the skeleton with respect to this initial st...
java
public void setLocalMatrix(int boneindex, Matrix4f mtx) { Bone bone = mBones[boneindex]; int parentid = mSkeleton.getParentBoneIndex(boneindex); bone.LocalMatrix.set(mtx); bone.Changed = Bone.LOCAL_ROT; if (parentid < 0) { bone.WorldMatrix.set(bone.L...
[ "public", "void", "setLocalMatrix", "(", "int", "boneindex", ",", "Matrix4f", "mtx", ")", "{", "Bone", "bone", "=", "mBones", "[", "boneindex", "]", ";", "int", "parentid", "=", "mSkeleton", ".", "getParentBoneIndex", "(", "boneindex", ")", ";", "bone", "....
Set the local matrix for this bone (relative to parent bone). <p> All bones in the skeleton start out at the origin oriented along the bone axis (usually 0,0,1). The pose orients and positions each bone in the skeleton with respect to this initial state. The local bone matrix expresses the orientation and position of t...
[ "Set", "the", "local", "matrix", "for", "this", "bone", "(", "relative", "to", "parent", "bone", ")", ".", "<p", ">", "All", "bones", "in", "the", "skeleton", "start", "out", "at", "the", "origin", "oriented", "along", "the", "bone", "axis", "(", "usua...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java#L513-L536
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java
AttributeRenderer.renderSelectionLink
public void renderSelectionLink(AnchorTag.State state, TreeElement elem) { """ This method will render the values assocated with the selection link. @param state @param elem """ ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_SELECTION_LINK]; assert(al != null); if (al.size...
java
public void renderSelectionLink(AnchorTag.State state, TreeElement elem) { ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_SELECTION_LINK]; assert(al != null); if (al.size() == 0) return; int cnt = al.size(); for (int i = 0; i < cnt; i++) { ...
[ "public", "void", "renderSelectionLink", "(", "AnchorTag", ".", "State", "state", ",", "TreeElement", "elem", ")", "{", "ArrayList", "al", "=", "_lists", "[", "TreeHtmlAttributeInfo", ".", "HTML_LOCATION_SELECTION_LINK", "]", ";", "assert", "(", "al", "!=", "nul...
This method will render the values assocated with the selection link. @param state @param elem
[ "This", "method", "will", "render", "the", "values", "assocated", "with", "the", "selection", "link", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java#L188-L201
sarl/sarl
main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java
AbstractSREMojo.createSREConfiguration
protected Xpp3Dom createSREConfiguration() throws MojoExecutionException, MojoFailureException { """ Create the configuration of the SRE with the maven archive format. @return the created manifest. @throws MojoExecutionException if the mojo fails. @throws MojoFailureException if the generation fails. """ ...
java
protected Xpp3Dom createSREConfiguration() throws MojoExecutionException, MojoFailureException { final Xpp3Dom xmlConfiguration = new Xpp3Dom("configuration"); //$NON-NLS-1$ final Xpp3Dom xmlArchive = new Xpp3Dom("archive"); //$NON-NLS-1$ xmlConfiguration.addChild(xmlArchive); final String mainClass = getMainC...
[ "protected", "Xpp3Dom", "createSREConfiguration", "(", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "final", "Xpp3Dom", "xmlConfiguration", "=", "new", "Xpp3Dom", "(", "\"configuration\"", ")", ";", "//$NON-NLS-1$", "final", "Xpp3Dom", "xml...
Create the configuration of the SRE with the maven archive format. @return the created manifest. @throws MojoExecutionException if the mojo fails. @throws MojoFailureException if the generation fails.
[ "Create", "the", "configuration", "of", "the", "SRE", "with", "the", "maven", "archive", "format", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java#L375-L426
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java
SDMath.confusionMatrix
public SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, Integer numClasses) { """ Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of which are represented as integer values.<br> For example, if labels = [0, 1, 1], predicted =...
java
public SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, Integer numClasses) { validateInteger("confusionMatrix", "labels", labels); validateInteger("confusionMatrix", "prediction", pred); SDVariable result = f().confusionMatrix(labels, pred, numClasses); return...
[ "public", "SDVariable", "confusionMatrix", "(", "String", "name", ",", "SDVariable", "labels", ",", "SDVariable", "pred", ",", "Integer", "numClasses", ")", "{", "validateInteger", "(", "\"confusionMatrix\"", ",", "\"labels\"", ",", "labels", ")", ";", "validateIn...
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of which are represented as integer values.<br> For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is:<br> [1, 0, 0, 0]<br> [0, 1, 1, 0]<br> [0, 0, 0, 0]<br> [0, 0, 0, 0]<br>...
[ "Compute", "the", "2d", "confusion", "matrix", "of", "size", "[", "numClasses", "numClasses", "]", "from", "a", "pair", "of", "labels", "and", "predictions", "both", "of", "which", "are", "represented", "as", "integer", "values", ".", "<br", ">", "For", "e...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java#L522-L527
apache/groovy
src/main/java/org/codehaus/groovy/runtime/typehandling/NumberMath.java
NumberMath.leftShift
public static Number leftShift(Number left, Number right) { """ For this operation, consider the operands independently. Throw an exception if the right operand (shift distance) is not an integral type. For the left operand (shift value) also require an integral type, but do NOT promote from Integer to Long. ...
java
public static Number leftShift(Number left, Number right) { if (isFloatingPoint(right) || isBigDecimal(right)) { throw new UnsupportedOperationException("Shift distance must be an integral type, but " + right + " (" + right.getClass().getName() + ") was supplied"); } return getMath(l...
[ "public", "static", "Number", "leftShift", "(", "Number", "left", ",", "Number", "right", ")", "{", "if", "(", "isFloatingPoint", "(", "right", ")", "||", "isBigDecimal", "(", "right", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"S...
For this operation, consider the operands independently. Throw an exception if the right operand (shift distance) is not an integral type. For the left operand (shift value) also require an integral type, but do NOT promote from Integer to Long. This is consistent with Java, and makes sense for the shift operators.
[ "For", "this", "operation", "consider", "the", "operands", "independently", ".", "Throw", "an", "exception", "if", "the", "right", "operand", "(", "shift", "distance", ")", "is", "not", "an", "integral", "type", ".", "For", "the", "left", "operand", "(", "...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/typehandling/NumberMath.java#L97-L102
Axway/Grapes
commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java
DataModelFactory.createDelivery
public static Delivery createDelivery(final String commercialName, final String commercialVersion, final String releaseDate, final List<String> dependencies) { """ Generates a PromotionDetails regarding the parameters. @param commercialName String @param commercialVersion String @param releaseDate String @pa...
java
public static Delivery createDelivery(final String commercialName, final String commercialVersion, final String releaseDate, final List<String> dependencies) { final Delivery delivery = new Delivery(); delivery.setCommercialName(commercialName); delivery.setCommercialVersion(commercialVersion); delivery.setRel...
[ "public", "static", "Delivery", "createDelivery", "(", "final", "String", "commercialName", ",", "final", "String", "commercialVersion", ",", "final", "String", "releaseDate", ",", "final", "List", "<", "String", ">", "dependencies", ")", "{", "final", "Delivery",...
Generates a PromotionDetails regarding the parameters. @param commercialName String @param commercialVersion String @param releaseDate String @param dependencies List<String> @return Delivery
[ "Generates", "a", "PromotionDetails", "regarding", "the", "parameters", "." ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java#L204-L213
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java
ContinuousDistributions.chisquareInverseCdf
public static double chisquareInverseCdf(double p, int df) { """ Returns the x score of a specific pvalue and degrees of freedom for Chisquare. It We just do a bisectionsearch for a value within CHI_EPSILON, relying on the monotonicity of chisquareCdf(). Ported from Javascript code posted at http://www.fourmilab....
java
public static double chisquareInverseCdf(double p, int df) { final double CHI_EPSILON = 0.000001; /* Accuracy of critchi approximation */ final double CHI_MAX = 99999.0; /* Maximum chi-square value */ double minchisq = 0.0; double maxchisq = CHI_MAX; if (p <= 0.0) { ...
[ "public", "static", "double", "chisquareInverseCdf", "(", "double", "p", ",", "int", "df", ")", "{", "final", "double", "CHI_EPSILON", "=", "0.000001", ";", "/* Accuracy of critchi approximation */", "final", "double", "CHI_MAX", "=", "99999.0", ";", "/* Maximum chi...
Returns the x score of a specific pvalue and degrees of freedom for Chisquare. It We just do a bisectionsearch for a value within CHI_EPSILON, relying on the monotonicity of chisquareCdf(). Ported from Javascript code posted at http://www.fourmilab.ch/rpkp/experiments/analysis/chiCalc.js @param p @param df @return
[ "Returns", "the", "x", "score", "of", "a", "specific", "pvalue", "and", "degrees", "of", "freedom", "for", "Chisquare", ".", "It", "We", "just", "do", "a", "bisectionsearch", "for", "a", "value", "within", "CHI_EPSILON", "relying", "on", "the", "monotonicity...
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java#L485-L510
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java
BloomFilter.optimalNumOfHashFunctions
static int optimalNumOfHashFunctions(long expectEntries, long bitSize) { """ compute the optimal hash function number with given input entries and bits size, which would make the false positive probability lowest. @param expectEntries @param bitSize @return hash function number """ return Math.max(1, (...
java
static int optimalNumOfHashFunctions(long expectEntries, long bitSize) { return Math.max(1, (int) Math.round((double) bitSize / expectEntries * Math.log(2))); }
[ "static", "int", "optimalNumOfHashFunctions", "(", "long", "expectEntries", ",", "long", "bitSize", ")", "{", "return", "Math", ".", "max", "(", "1", ",", "(", "int", ")", "Math", ".", "round", "(", "(", "double", ")", "bitSize", "/", "expectEntries", "*...
compute the optimal hash function number with given input entries and bits size, which would make the false positive probability lowest. @param expectEntries @param bitSize @return hash function number
[ "compute", "the", "optimal", "hash", "function", "number", "with", "given", "input", "entries", "and", "bits", "size", "which", "would", "make", "the", "false", "positive", "probability", "lowest", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java#L97-L99
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.div
public static double div(float v1, float v2, int scale) { """ 提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度,后面的四舍五入 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @return 两个参数的商 """ return div(v1, v2, scale, RoundingMode.HALF_UP); }
java
public static double div(float v1, float v2, int scale) { return div(v1, v2, scale, RoundingMode.HALF_UP); }
[ "public", "static", "double", "div", "(", "float", "v1", ",", "float", "v2", ",", "int", "scale", ")", "{", "return", "div", "(", "v1", ",", "v2", ",", "scale", ",", "RoundingMode", ".", "HALF_UP", ")", ";", "}" ]
提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度,后面的四舍五入 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @return 两个参数的商
[ "提供", "(", "相对", ")", "精确的除法运算", "当发生除不尽的情况时", "由scale指定精确度", "后面的四舍五入" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L562-L564
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_abbreviatedNumber_abbreviatedNumber_GET
public OvhAbbreviatedNumberGroup billingAccount_abbreviatedNumber_abbreviatedNumber_GET(String billingAccount, Long abbreviatedNumber) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber} @param billingAccount [required] The name of you...
java
public OvhAbbreviatedNumberGroup billingAccount_abbreviatedNumber_abbreviatedNumber_GET(String billingAccount, Long abbreviatedNumber) throws IOException { String qPath = "/telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}"; StringBuilder sb = path(qPath, billingAccount, abbreviatedNumber); String ...
[ "public", "OvhAbbreviatedNumberGroup", "billingAccount_abbreviatedNumber_abbreviatedNumber_GET", "(", "String", "billingAccount", ",", "Long", "abbreviatedNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/abbreviatedNumber/{abbreviated...
Get this object properties REST: GET /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber} @param billingAccount [required] The name of your billingAccount @param abbreviatedNumber [required] The abbreviated number which must start with "7" and must have a length of 3 or 4 digits
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L4545-L4550
OpenLiberty/open-liberty
dev/com.ibm.ws.security.audit.reader/src/com/ibm/ws/security/audit/reader/tasks/AuditReaderTask.java
AuditReaderTask.auditReader
private String auditReader(PrintStream stderr, Map<String, String> props) throws Exception { """ Decrypt and/or unsign the audit log. Capture any Exceptions and print the stack trace. @param auditLogLocation @param outputLocation @param password @return String @throws Exception """ try { ...
java
private String auditReader(PrintStream stderr, Map<String, String> props) throws Exception { try { return AuditLogReader.getReport(props.get("auditFileLocation"), props.get("outputFileLocation"), props.get("encrypted"), ...
[ "private", "String", "auditReader", "(", "PrintStream", "stderr", ",", "Map", "<", "String", ",", "String", ">", "props", ")", "throws", "Exception", "{", "try", "{", "return", "AuditLogReader", ".", "getReport", "(", "props", ".", "get", "(", "\"auditFileLo...
Decrypt and/or unsign the audit log. Capture any Exceptions and print the stack trace. @param auditLogLocation @param outputLocation @param password @return String @throws Exception
[ "Decrypt", "and", "/", "or", "unsign", "the", "audit", "log", ".", "Capture", "any", "Exceptions", "and", "print", "the", "stack", "trace", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.audit.reader/src/com/ibm/ws/security/audit/reader/tasks/AuditReaderTask.java#L109-L125
actframework/actframework
src/main/java/act/handler/builtin/ResourceGetter.java
ResourceGetter.verifyBase
private FastRequestHandler verifyBase(URL baseUrl, String baseSupplied) { """ /* If base is valid then return null otherwise return delegate request handler """ if (null == baseUrl) { if ("META-INF/resources/webjars".equalsIgnoreCase(baseSupplied)) { // webjars not provide...
java
private FastRequestHandler verifyBase(URL baseUrl, String baseSupplied) { if (null == baseUrl) { if ("META-INF/resources/webjars".equalsIgnoreCase(baseSupplied)) { // webjars not provided, just ignore it. } else { logger.warn("URL base not exists: " + base...
[ "private", "FastRequestHandler", "verifyBase", "(", "URL", "baseUrl", ",", "String", "baseSupplied", ")", "{", "if", "(", "null", "==", "baseUrl", ")", "{", "if", "(", "\"META-INF/resources/webjars\"", ".", "equalsIgnoreCase", "(", "baseSupplied", ")", ")", "{",...
/* If base is valid then return null otherwise return delegate request handler
[ "/", "*", "If", "base", "is", "valid", "then", "return", "null", "otherwise", "return", "delegate", "request", "handler" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/handler/builtin/ResourceGetter.java#L414-L424
recruit-mp/android-RMP-Appirater
library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java
RmpAppirater.setAppThisVersionCodeLaunchCount
public static void setAppThisVersionCodeLaunchCount(Context context, long appThisVersionCodeLaunchCount) { """ Modify internal value. <p/> If you use this method, you might need to have a good understanding of this class code. @param context Context @param appThisVersionCodeLaunchCount ...
java
public static void setAppThisVersionCodeLaunchCount(Context context, long appThisVersionCodeLaunchCount) { SharedPreferences prefs = getSharedPreferences(context); SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putLong(PREF_KEY_APP_LAUNCH_COUNT, appThisVersionCodeLaunchCount);...
[ "public", "static", "void", "setAppThisVersionCodeLaunchCount", "(", "Context", "context", ",", "long", "appThisVersionCodeLaunchCount", ")", "{", "SharedPreferences", "prefs", "=", "getSharedPreferences", "(", "context", ")", ";", "SharedPreferences", ".", "Editor", "p...
Modify internal value. <p/> If you use this method, you might need to have a good understanding of this class code. @param context Context @param appThisVersionCodeLaunchCount Launch count of This application current version.
[ "Modify", "internal", "value", ".", "<p", "/", ">", "If", "you", "use", "this", "method", "you", "might", "need", "to", "have", "a", "good", "understanding", "of", "this", "class", "code", "." ]
train
https://github.com/recruit-mp/android-RMP-Appirater/blob/14fcdf110dfb97120303f39aab1de9393e84b90a/library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java#L324-L331
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/activities/TypedVector.java
TypedVector.lastIndexOf
@Override public int lastIndexOf(Object o, int index) { """ Returns the index of the last occurrence of the specified element in this vector, searching backwards from index, or returns -1 if the element is not found. @param o the object to look for. @param index the index at which the element lookup shou...
java
@Override public int lastIndexOf(Object o, int index) { int idx = getRealIndex(index); return super.lastIndexOf(o, idx); }
[ "@", "Override", "public", "int", "lastIndexOf", "(", "Object", "o", ",", "int", "index", ")", "{", "int", "idx", "=", "getRealIndex", "(", "index", ")", ";", "return", "super", ".", "lastIndexOf", "(", "o", ",", "idx", ")", ";", "}" ]
Returns the index of the last occurrence of the specified element in this vector, searching backwards from index, or returns -1 if the element is not found. @param o the object to look for. @param index the index at which the element lookup should start; it can be a positive number, or a negative number that is smalle...
[ "Returns", "the", "index", "of", "the", "last", "occurrence", "of", "the", "specified", "element", "in", "this", "vector", "searching", "backwards", "from", "index", "or", "returns", "-", "1", "if", "the", "element", "is", "not", "found", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/activities/TypedVector.java#L186-L190
UrielCh/ovh-java-sdk
ovh-java-sdk-secret/src/main/java/net/minidev/ovh/api/ApiOvhSecret.java
ApiOvhSecret.retrieve_POST
public OvhSecret retrieve_POST(String id) throws IOException { """ Retrieve a secret sent by email REST: POST /secret/retrieve @param id [required] The secret ID """ String qPath = "/secret/retrieve"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(...
java
public OvhSecret retrieve_POST(String id) throws IOException { String qPath = "/secret/retrieve"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "id", id); String resp = execN(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhSecret.class); }
[ "public", "OvhSecret", "retrieve_POST", "(", "String", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/secret/retrieve\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "HashMap", "<", "String", ",", "Object", ">", "o"...
Retrieve a secret sent by email REST: POST /secret/retrieve @param id [required] The secret ID
[ "Retrieve", "a", "secret", "sent", "by", "email" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-secret/src/main/java/net/minidev/ovh/api/ApiOvhSecret.java#L25-L32
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Log.java
Log.logLong
public static void logLong(String TAG, String longString) { """ Log long string using verbose tag @param TAG The tag. @param longString The long string. """ InputStream is = new ByteArrayInputStream( longString.getBytes() ); @SuppressWarnings("resource") Scanner scan = new Scanner(i...
java
public static void logLong(String TAG, String longString) { InputStream is = new ByteArrayInputStream( longString.getBytes() ); @SuppressWarnings("resource") Scanner scan = new Scanner(is); while (scan.hasNextLine()) { Log.v(TAG, scan.nextLine()); } }
[ "public", "static", "void", "logLong", "(", "String", "TAG", ",", "String", "longString", ")", "{", "InputStream", "is", "=", "new", "ByteArrayInputStream", "(", "longString", ".", "getBytes", "(", ")", ")", ";", "@", "SuppressWarnings", "(", "\"resource\"", ...
Log long string using verbose tag @param TAG The tag. @param longString The long string.
[ "Log", "long", "string", "using", "verbose", "tag" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Log.java#L116-L123
xwiki/xwiki-commons
xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/AbstractVerifyMojo.java
AbstractVerifyMojo.guessDefaultLanguage
protected String guessDefaultLanguage(File file, Collection<File> xwikiXmlFiles) { """ Guess the {@code &lt;defaultLanguage&gt;} value to use for the passed file using the following algorithm: <ul> <li>If the page name matches one of the regexes defined by the user as content pages then check that the default l...
java
protected String guessDefaultLanguage(File file, Collection<File> xwikiXmlFiles) { String fileName = file.getName(); // Note that we need to check for content pages before technical pages because some pages are both content // pages (Translation pages for example) and technical pages. ...
[ "protected", "String", "guessDefaultLanguage", "(", "File", "file", ",", "Collection", "<", "File", ">", "xwikiXmlFiles", ")", "{", "String", "fileName", "=", "file", ".", "getName", "(", ")", ";", "// Note that we need to check for content pages before technical pages ...
Guess the {@code &lt;defaultLanguage&gt;} value to use for the passed file using the following algorithm: <ul> <li>If the page name matches one of the regexes defined by the user as content pages then check that the default language is {@link #defaultLanguage}.</li> <li>If the page name matches one of the regexes defin...
[ "Guess", "the", "{" ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/AbstractVerifyMojo.java#L251-L292
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/util/Args.java
Args.checkNull
public static void checkNull(Object value, String message, Object... args) { """ Validates that an argument is null. @param value The value to check. @param message An exception message. @param args Exception message arguments. """ if (value != null) { throw new IllegalArgumentException(String.f...
java
public static void checkNull(Object value, String message, Object... args) { if (value != null) { throw new IllegalArgumentException(String.format(message, args)); } }
[ "public", "static", "void", "checkNull", "(", "Object", "value", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", ...
Validates that an argument is null. @param value The value to check. @param message An exception message. @param args Exception message arguments.
[ "Validates", "that", "an", "argument", "is", "null", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Args.java#L46-L50
roboconf/roboconf-platform
core/roboconf-messaging-http/src/main/java/net/roboconf/messaging/http/internal/clients/HttpDmClient.java
HttpDmClient.processReceivedMessage
public void processReceivedMessage( Message message, Session session ) throws IOException { """ Processes a message received from a web socket (i.e. sent by agents). @param message a message @throws IOException """ this.logger.fine( "The DM's HTTP client is about to process a message (" + message + ") rece...
java
public void processReceivedMessage( Message message, Session session ) throws IOException { this.logger.fine( "The DM's HTTP client is about to process a message (" + message + ") received through a web socket." ); // HttpMessage if( message instanceof HttpMessage ) { HttpMessage httpMsg = (HttpMessage) messa...
[ "public", "void", "processReceivedMessage", "(", "Message", "message", ",", "Session", "session", ")", "throws", "IOException", "{", "this", ".", "logger", ".", "fine", "(", "\"The DM's HTTP client is about to process a message (\"", "+", "message", "+", "\") received t...
Processes a message received from a web socket (i.e. sent by agents). @param message a message @throws IOException
[ "Processes", "a", "message", "received", "from", "a", "web", "socket", "(", "i", ".", "e", ".", "sent", "by", "agents", ")", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-http/src/main/java/net/roboconf/messaging/http/internal/clients/HttpDmClient.java#L155-L182
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.java
NTLMUtilities.printTargetInformationBlockFromType2Message
public static void printTargetInformationBlockFromType2Message( byte[] msg, Integer msgFlags, PrintWriter out) throws UnsupportedEncodingException { """ Prints to the {@link PrintWriter} the target information block extracted from the type 2 message. @param msg the type 2 message @para...
java
public static void printTargetInformationBlockFromType2Message( byte[] msg, Integer msgFlags, PrintWriter out) throws UnsupportedEncodingException { int flags = msgFlags == null ? extractFlagsFromType2Message(msg) : msgFlags; byte[] infoBlock = extractTargetInfoF...
[ "public", "static", "void", "printTargetInformationBlockFromType2Message", "(", "byte", "[", "]", "msg", ",", "Integer", "msgFlags", ",", "PrintWriter", "out", ")", "throws", "UnsupportedEncodingException", "{", "int", "flags", "=", "msgFlags", "==", "null", "?", ...
Prints to the {@link PrintWriter} the target information block extracted from the type 2 message. @param msg the type 2 message @param msgFlags the flags if null then flags are extracted from the type 2 message @param out the output target for the information @throws UnsupportedEncodingException if unable to use the n...
[ "Prints", "to", "the", "{", "@link", "PrintWriter", "}", "the", "target", "information", "block", "extracted", "from", "the", "type", "2", "message", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.java#L354-L401
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateTime.java
DateTime.toCalendar
public Calendar toCalendar(TimeZone zone) { """ 转换为Calendar @param zone 时区 {@link TimeZone} @return {@link Calendar} """ return toCalendar(zone, Locale.getDefault(Locale.Category.FORMAT)); }
java
public Calendar toCalendar(TimeZone zone) { return toCalendar(zone, Locale.getDefault(Locale.Category.FORMAT)); }
[ "public", "Calendar", "toCalendar", "(", "TimeZone", "zone", ")", "{", "return", "toCalendar", "(", "zone", ",", "Locale", ".", "getDefault", "(", "Locale", ".", "Category", ".", "FORMAT", ")", ")", ";", "}" ]
转换为Calendar @param zone 时区 {@link TimeZone} @return {@link Calendar}
[ "转换为Calendar" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateTime.java#L530-L532
cloudendpoints/endpoints-management-java
endpoints-control/src/main/java/com/google/api/control/model/ReportRequestInfo.java
ReportRequestInfo.asReportRequest
public ReportRequest asReportRequest(ReportingRule rules, Clock clock) { """ Make a {@code LogEntry} from the instance. @param rules ReportingRules @param clock Clock @return the corresponding {@code ReportRequest} """ Preconditions.checkState(!Strings.isNullOrEmpty(getServiceName()), "a servi...
java
public ReportRequest asReportRequest(ReportingRule rules, Clock clock) { Preconditions.checkState(!Strings.isNullOrEmpty(getServiceName()), "a service name must be set"); // Populate metrics and labels if they can be associated with a method/operation Operation.Builder o = asOperation(clock).toBuil...
[ "public", "ReportRequest", "asReportRequest", "(", "ReportingRule", "rules", ",", "Clock", "clock", ")", "{", "Preconditions", ".", "checkState", "(", "!", "Strings", ".", "isNullOrEmpty", "(", "getServiceName", "(", ")", ")", ",", "\"a service name must be set\"", ...
Make a {@code LogEntry} from the instance. @param rules ReportingRules @param clock Clock @return the corresponding {@code ReportRequest}
[ "Make", "a", "{", "@code", "LogEntry", "}", "from", "the", "instance", "." ]
train
https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/model/ReportRequestInfo.java#L136-L168
apache/incubator-atlas
intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
AtlasEntityType.addRelationshipAttributeType
void addRelationshipAttributeType(String attributeName, AtlasRelationshipType relationshipType) { """ this method should be called from AtlasRelationshipType.resolveReferencesPhase2() """ List<AtlasRelationshipType> relationshipTypes = relationshipAttributesType.get(attributeName); if (relatio...
java
void addRelationshipAttributeType(String attributeName, AtlasRelationshipType relationshipType) { List<AtlasRelationshipType> relationshipTypes = relationshipAttributesType.get(attributeName); if (relationshipTypes == null) { relationshipTypes = new ArrayList<>(); relationshipAt...
[ "void", "addRelationshipAttributeType", "(", "String", "attributeName", ",", "AtlasRelationshipType", "relationshipType", ")", "{", "List", "<", "AtlasRelationshipType", ">", "relationshipTypes", "=", "relationshipAttributesType", ".", "get", "(", "attributeName", ")", ";...
this method should be called from AtlasRelationshipType.resolveReferencesPhase2()
[ "this", "method", "should", "be", "called", "from", "AtlasRelationshipType", ".", "resolveReferencesPhase2", "()" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java#L203-L212
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java
FileUtil.addFolderToZip
public static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException { """ Adds folder to the archive. @param path path to the folder @param srcFolder folder name @param zip zip archive @throws IOException """ File folder = new File(srcFolder); if (fold...
java
public static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException { File folder = new File(srcFolder); if (folder.list().length == 0) { addFileToZip(path, srcFolder, zip, true); } else { for (String fileName : folder.list()) { ...
[ "public", "static", "void", "addFolderToZip", "(", "String", "path", ",", "String", "srcFolder", ",", "ZipOutputStream", "zip", ")", "throws", "IOException", "{", "File", "folder", "=", "new", "File", "(", "srcFolder", ")", ";", "if", "(", "folder", ".", "...
Adds folder to the archive. @param path path to the folder @param srcFolder folder name @param zip zip archive @throws IOException
[ "Adds", "folder", "to", "the", "archive", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java#L266-L279
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java
OSMParser.createOSMDatabaseModel
private void createOSMDatabaseModel(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { """ Create the OMS data model to store the content of the file @param connection @param isH2 @param requestedTable @param osmTableName @throws SQLException ""...
java
private void createOSMDatabaseModel(Connection connection, boolean isH2, TableLocation requestedTable, String osmTableName) throws SQLException { String tagTableName = TableUtilities.caseIdentifier(requestedTable, osmTableName + OSMTablesFactory.TAG, isH2); tagPreparedStmt = OSMTablesFactory.createTagT...
[ "private", "void", "createOSMDatabaseModel", "(", "Connection", "connection", ",", "boolean", "isH2", ",", "TableLocation", "requestedTable", ",", "String", "osmTableName", ")", "throws", "SQLException", "{", "String", "tagTableName", "=", "TableUtilities", ".", "case...
Create the OMS data model to store the content of the file @param connection @param isH2 @param requestedTable @param osmTableName @throws SQLException
[ "Create", "the", "OMS", "data", "model", "to", "store", "the", "content", "of", "the", "file" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMParser.java#L235-L258
knowm/XChange
xchange-ripple/src/main/java/org/knowm/xchange/ripple/service/RippleMarketDataService.java
RippleMarketDataService.getOrderBook
@Override public OrderBook getOrderBook(final CurrencyPair currencyPair, final Object... args) throws IOException { """ If the base currency is not XRP then the returned orders' additional data map contains a value for {@link RippleExchange.DATA_BASE_COUNTERPARTY}, similarly if the counter currency is not...
java
@Override public OrderBook getOrderBook(final CurrencyPair currencyPair, final Object... args) throws IOException { if ((args != null && args.length > 0) && (args[0] instanceof RippleMarketDataParams)) { final RippleMarketDataParams params = (RippleMarketDataParams) args[0]; final RippleOrderBoo...
[ "@", "Override", "public", "OrderBook", "getOrderBook", "(", "final", "CurrencyPair", "currencyPair", ",", "final", "Object", "...", "args", ")", "throws", "IOException", "{", "if", "(", "(", "args", "!=", "null", "&&", "args", ".", "length", ">", "0", ")"...
If the base currency is not XRP then the returned orders' additional data map contains a value for {@link RippleExchange.DATA_BASE_COUNTERPARTY}, similarly if the counter currency is not XRP then {@link RippleExchange.DATA_COUNTER_COUNTERPARTY} is populated. @param currencyPair the base/counter currency pair @param ar...
[ "If", "the", "base", "currency", "is", "not", "XRP", "then", "the", "returned", "orders", "additional", "data", "map", "contains", "a", "value", "for", "{", "@link", "RippleExchange", ".", "DATA_BASE_COUNTERPARTY", "}", "similarly", "if", "the", "counter", "cu...
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-ripple/src/main/java/org/knowm/xchange/ripple/service/RippleMarketDataService.java#L29-L39
Bernardo-MG/maven-site-fixer
src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java
Html5UpdateTool.updateTableHeads
public final void updateTableHeads(final Element root) { """ Corrects table headers by adding a {@code <thead>} section where missing. <p> This serves to fix an error with tables created by Doxia, which will add the header rows into the {@code <tbody>} element, instead on a {@code <thead>} element. @param r...
java
public final void updateTableHeads(final Element root) { final Iterable<Element> tableHeadRows; // Heads to fix Element table; // HTML table Element thead; // Table's head for wrapping checkNotNull(root, "Received a null pointer as root element"); // Table rows with <th> tags...
[ "public", "final", "void", "updateTableHeads", "(", "final", "Element", "root", ")", "{", "final", "Iterable", "<", "Element", ">", "tableHeadRows", ";", "// Heads to fix", "Element", "table", ";", "// HTML table", "Element", "thead", ";", "// Table's head for wrapp...
Corrects table headers by adding a {@code <thead>} section where missing. <p> This serves to fix an error with tables created by Doxia, which will add the header rows into the {@code <tbody>} element, instead on a {@code <thead>} element. @param root root element with tables to fix
[ "Corrects", "table", "headers", "by", "adding", "a", "{", "@code", "<thead", ">", "}", "section", "where", "missing", ".", "<p", ">", "This", "serves", "to", "fix", "an", "error", "with", "tables", "created", "by", "Doxia", "which", "will", "add", "the",...
train
https://github.com/Bernardo-MG/maven-site-fixer/blob/e064472faa7edb0fca11647a22d90ad72089baa3/src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java#L125-L148
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WField.java
WField.setMandatory
@Deprecated public void setMandatory(final boolean mandatory, final String errorMessage) { """ Sets whether this field is mandatory. <p> The mandatory flag will only be set if the field is a {@link Input} component or {@link WFieldSet}. </p> @param mandatory true for mandatory, false for optional @param er...
java
@Deprecated public void setMandatory(final boolean mandatory, final String errorMessage) { WComponent labelField = findComponentForLabel(field); if (labelField instanceof Mandatable) { ((Input) labelField).setMandatory(mandatory, errorMessage); } else if (labelField instanceof WFieldSet) { ((WFieldSet) la...
[ "@", "Deprecated", "public", "void", "setMandatory", "(", "final", "boolean", "mandatory", ",", "final", "String", "errorMessage", ")", "{", "WComponent", "labelField", "=", "findComponentForLabel", "(", "field", ")", ";", "if", "(", "labelField", "instanceof", ...
Sets whether this field is mandatory. <p> The mandatory flag will only be set if the field is a {@link Input} component or {@link WFieldSet}. </p> @param mandatory true for mandatory, false for optional @param errorMessage the error message to display on validation error. @deprecated set mandatory directly on the requ...
[ "Sets", "whether", "this", "field", "is", "mandatory", ".", "<p", ">", "The", "mandatory", "flag", "will", "only", "be", "set", "if", "the", "field", "is", "a", "{", "@link", "Input", "}", "component", "or", "{", "@link", "WFieldSet", "}", ".", "<", ...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WField.java#L193-L202
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.getProperty
public static String getProperty(HashMap<String, String> props, String name, String defaultValue) { """ Liefert den Wert des Properties oder den Default-Wert. Der Default-Wert wird nicht nur bei NULL verwendet sondern auch bei Leerstring. @param props die Properties. @param name der Name des Pr...
java
public static String getProperty(HashMap<String, String> props, String name, String defaultValue) { String value = props.get(name); return value != null && value.length() > 0 ? value : defaultValue; }
[ "public", "static", "String", "getProperty", "(", "HashMap", "<", "String", ",", "String", ">", "props", ",", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "props", ".", "get", "(", "name", ")", ";", "return", "value"...
Liefert den Wert des Properties oder den Default-Wert. Der Default-Wert wird nicht nur bei NULL verwendet sondern auch bei Leerstring. @param props die Properties. @param name der Name des Properties. @param defaultValue der Default-Wert. @return der Wert.
[ "Liefert", "den", "Wert", "des", "Properties", "oder", "den", "Default", "-", "Wert", ".", "Der", "Default", "-", "Wert", "wird", "nicht", "nur", "bei", "NULL", "verwendet", "sondern", "auch", "bei", "Leerstring", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L187-L190
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateLicenses
private void generateLicenses(final Metadata m, final Element e) { """ Generation of license tags. @param m source @param e element to attach new element to """ for (final License license : m.getLicenses()) { final Element licenseElement = new Element("license", NS); addNotN...
java
private void generateLicenses(final Metadata m, final Element e) { for (final License license : m.getLicenses()) { final Element licenseElement = new Element("license", NS); addNotNullAttribute(licenseElement, "type", license.getType()); addNotNullAttribute(licenseElement, "h...
[ "private", "void", "generateLicenses", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "License", "license", ":", "m", ".", "getLicenses", "(", ")", ")", "{", "final", "Element", "licenseElement", "=", "new", "...
Generation of license tags. @param m source @param e element to attach new element to
[ "Generation", "of", "license", "tags", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L449-L461
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java
HttpSupport.getFile
protected org.javalite.activeweb.FileItem getFile(String fieldName, List<FormItem> formItems) { """ Convenience method to get file content from <code>multipart/form-data</code> request. If more than one files with the same name are submitted, only one is returned. @param fieldName name of form field from the ...
java
protected org.javalite.activeweb.FileItem getFile(String fieldName, List<FormItem> formItems){ for (FormItem formItem : formItems) { if(formItem instanceof org.javalite.activeweb.FileItem && formItem.getFieldName().equals(fieldName)){ return (org.javalite.activeweb.FileItem)formItem;...
[ "protected", "org", ".", "javalite", ".", "activeweb", ".", "FileItem", "getFile", "(", "String", "fieldName", ",", "List", "<", "FormItem", ">", "formItems", ")", "{", "for", "(", "FormItem", "formItem", ":", "formItems", ")", "{", "if", "(", "formItem", ...
Convenience method to get file content from <code>multipart/form-data</code> request. If more than one files with the same name are submitted, only one is returned. @param fieldName name of form field from the <code>multipart/form-data</code> request corresponding to the uploaded file. @param formItems form items ret...
[ "Convenience", "method", "to", "get", "file", "content", "from", "<code", ">", "multipart", "/", "form", "-", "data<", "/", "code", ">", "request", ".", "If", "more", "than", "one", "files", "with", "the", "same", "name", "are", "submitted", "only", "one...
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java#L554-L561
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java
FlinkKafkaProducerBase.invoke
@Override public void invoke(IN next, Context context) throws Exception { """ Called when new data arrives to the sink, and forwards it to Kafka. @param next The incoming data """ // propagate asynchronous errors checkErroneous(); byte[] serializedKey = schema.serializeKey(next); byte[] serialize...
java
@Override public void invoke(IN next, Context context) throws Exception { // propagate asynchronous errors checkErroneous(); byte[] serializedKey = schema.serializeKey(next); byte[] serializedValue = schema.serializeValue(next); String targetTopic = schema.getTargetTopic(next); if (targetTopic == null) { ...
[ "@", "Override", "public", "void", "invoke", "(", "IN", "next", ",", "Context", "context", ")", "throws", "Exception", "{", "// propagate asynchronous errors", "checkErroneous", "(", ")", ";", "byte", "[", "]", "serializedKey", "=", "schema", ".", "serializeKey"...
Called when new data arrives to the sink, and forwards it to Kafka. @param next The incoming data
[ "Called", "when", "new", "data", "arrives", "to", "the", "sink", "and", "forwards", "it", "to", "Kafka", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java#L280-L314
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.invokeMethod
public static synchronized <T> T invokeMethod(Object instance, String methodToExecute, Object... arguments) throws Exception { """ Invoke a private or inner class method. This might be useful to test private methods. """ return WhiteboxImpl.invokeMethod(instance, methodToExecute, arguments); }
java
public static synchronized <T> T invokeMethod(Object instance, String methodToExecute, Object... arguments) throws Exception { return WhiteboxImpl.invokeMethod(instance, methodToExecute, arguments); }
[ "public", "static", "synchronized", "<", "T", ">", "T", "invokeMethod", "(", "Object", "instance", ",", "String", "methodToExecute", ",", "Object", "...", "arguments", ")", "throws", "Exception", "{", "return", "WhiteboxImpl", ".", "invokeMethod", "(", "instance...
Invoke a private or inner class method. This might be useful to test private methods.
[ "Invoke", "a", "private", "or", "inner", "class", "method", ".", "This", "might", "be", "useful", "to", "test", "private", "methods", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L399-L402
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeUploadPhotoRequestAsync
@Deprecated public static RequestAsyncTask executeUploadPhotoRequestAsync(Session session, Bitmap image, Callback callback) { """ Starts a new Request configured to upload a photo to the user's default photo album. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to ca...
java
@Deprecated public static RequestAsyncTask executeUploadPhotoRequestAsync(Session session, Bitmap image, Callback callback) { return newUploadPhotoRequest(session, image, callback).executeAsync(); }
[ "@", "Deprecated", "public", "static", "RequestAsyncTask", "executeUploadPhotoRequestAsync", "(", "Session", "session", ",", "Bitmap", "image", ",", "Callback", "callback", ")", "{", "return", "newUploadPhotoRequest", "(", "session", ",", "image", ",", "callback", "...
Starts a new Request configured to upload a photo to the user's default photo album. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Request.newUploadPhotoRequest(...).executeAsync(); @param session the Session to use, or null; if non-null, the session must be in an opene...
[ "Starts", "a", "new", "Request", "configured", "to", "upload", "a", "photo", "to", "the", "user", "s", "default", "photo", "album", ".", "<p", "/", ">", "This", "should", "only", "be", "called", "from", "the", "UI", "thread", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1153-L1156
rjeschke/txtmark
src/main/java/com/github/rjeschke/txtmark/Emitter.java
Emitter.emitMarkedLines
private void emitMarkedLines(final StringBuilder out, final Line lines) { """ Writes a set of markdown lines into the StringBuilder. @param out The StringBuilder to write to. @param lines The lines to write. """ final StringBuilder in = new StringBuilder(); Line line = lines; whil...
java
private void emitMarkedLines(final StringBuilder out, final Line lines) { final StringBuilder in = new StringBuilder(); Line line = lines; while (line != null) { if (!line.isEmpty) { in.append(line.value.substring(line.leading, line.value.lengt...
[ "private", "void", "emitMarkedLines", "(", "final", "StringBuilder", "out", ",", "final", "Line", "lines", ")", "{", "final", "StringBuilder", "in", "=", "new", "StringBuilder", "(", ")", ";", "Line", "line", "=", "lines", ";", "while", "(", "line", "!=", ...
Writes a set of markdown lines into the StringBuilder. @param out The StringBuilder to write to. @param lines The lines to write.
[ "Writes", "a", "set", "of", "markdown", "lines", "into", "the", "StringBuilder", "." ]
train
https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Emitter.java#L903-L925
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
Settings.getFloat
@CheckForNull public Float getFloat(String key) { """ Effective value as {@code Float}. @return the value as {@code Float}. If the property does not have value nor default value, then {@code null} is returned. @throws NumberFormatException if value is not empty and is not a parsable number """ String v...
java
@CheckForNull public Float getFloat(String key) { String value = getString(key); if (StringUtils.isNotEmpty(value)) { try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new IllegalStateException(String.format("The property '%s' is not a float value", key))...
[ "@", "CheckForNull", "public", "Float", "getFloat", "(", "String", "key", ")", "{", "String", "value", "=", "getString", "(", "key", ")", ";", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "value", ")", ")", "{", "try", "{", "return", "Float", ".",...
Effective value as {@code Float}. @return the value as {@code Float}. If the property does not have value nor default value, then {@code null} is returned. @throws NumberFormatException if value is not empty and is not a parsable number
[ "Effective", "value", "as", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java#L231-L242
alkacon/opencms-core
src/org/opencms/ui/components/CmsUserDataFormLayout.java
CmsUserDataFormLayout.buildField
private TextField buildField(String label, CmsAccountInfo info) { """ Builds the text field for the given property.<p> @param label the field label @param info the property name @return the field """ TextField field = (TextField)m_binder.buildAndBind(label, info); field.setConverter(new...
java
private TextField buildField(String label, CmsAccountInfo info) { TextField field = (TextField)m_binder.buildAndBind(label, info); field.setConverter(new CmsNullToEmptyConverter()); field.setWidth("100%"); boolean editable = (m_editLevel == EditLevel.all) || (info.isEditable...
[ "private", "TextField", "buildField", "(", "String", "label", ",", "CmsAccountInfo", "info", ")", "{", "TextField", "field", "=", "(", "TextField", ")", "m_binder", ".", "buildAndBind", "(", "label", ",", "info", ")", ";", "field", ".", "setConverter", "(", ...
Builds the text field for the given property.<p> @param label the field label @param info the property name @return the field
[ "Builds", "the", "text", "field", "for", "the", "given", "property", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsUserDataFormLayout.java#L254-L267
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
BloatedAssignmentScope.findScopeBlock
@Nullable private ScopeBlock findScopeBlock(ScopeBlock sb, int pc) { """ returns the scope block in which this register was assigned, by traversing the scope block tree @param sb the scope block to start searching in @param pc the current program counter @return the scope block or null if not found ...
java
@Nullable private ScopeBlock findScopeBlock(ScopeBlock sb, int pc) { if ((pc <= sb.getStart()) || (pc >= sb.getFinish())) { return null; } List<ScopeBlock> children = sb.getChildren(); if (children != null) { for (ScopeBlock child : children) { ...
[ "@", "Nullable", "private", "ScopeBlock", "findScopeBlock", "(", "ScopeBlock", "sb", ",", "int", "pc", ")", "{", "if", "(", "(", "pc", "<=", "sb", ".", "getStart", "(", ")", ")", "||", "(", "pc", ">=", "sb", ".", "getFinish", "(", ")", ")", ")", ...
returns the scope block in which this register was assigned, by traversing the scope block tree @param sb the scope block to start searching in @param pc the current program counter @return the scope block or null if not found
[ "returns", "the", "scope", "block", "in", "which", "this", "register", "was", "assigned", "by", "traversing", "the", "scope", "block", "tree" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java#L628-L645
wcm-io/wcm-io-wcm
ui/granite/src/main/java/io/wcm/wcm/ui/granite/resource/GraniteUiSyntheticResource.java
GraniteUiSyntheticResource.wrapMerge
public static Resource wrapMerge(@NotNull Resource resource, @NotNull ValueMap valueMap) { """ Wrap a real resource and create a synthetic resource out of it. Merges the given properties with the existing properties of the resource. @param resource Real resource @param valueMap Properties to be merged with the ...
java
public static Resource wrapMerge(@NotNull Resource resource, @NotNull ValueMap valueMap) { Map<String, Object> mergedProperties = new HashMap<>(); mergedProperties.putAll(resource.getValueMap()); mergedProperties.putAll(valueMap); return wrap(resource, new ValueMapDecorator(mergedProperties), resource.g...
[ "public", "static", "Resource", "wrapMerge", "(", "@", "NotNull", "Resource", "resource", ",", "@", "NotNull", "ValueMap", "valueMap", ")", "{", "Map", "<", "String", ",", "Object", ">", "mergedProperties", "=", "new", "HashMap", "<>", "(", ")", ";", "merg...
Wrap a real resource and create a synthetic resource out of it. Merges the given properties with the existing properties of the resource. @param resource Real resource @param valueMap Properties to be merged with the real properties @return Resource
[ "Wrap", "a", "real", "resource", "and", "create", "a", "synthetic", "resource", "out", "of", "it", ".", "Merges", "the", "given", "properties", "with", "the", "existing", "properties", "of", "the", "resource", "." ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/granite/src/main/java/io/wcm/wcm/ui/granite/resource/GraniteUiSyntheticResource.java#L177-L182
wcm-io/wcm-io-tooling
commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/util/HttpClientUtil.java
HttpClientUtil.applyRequestConfig
public static void applyRequestConfig(HttpRequestBase httpRequest, PackageFile packageFile, PackageManagerProperties props) { """ Apply timeout configurations that are defined specific for this package file. @param httpRequest Http request @param packageFile Package file @param props Package manager properties ...
java
public static void applyRequestConfig(HttpRequestBase httpRequest, PackageFile packageFile, PackageManagerProperties props) { Integer httpSocketTimeoutSec = packageFile.getHttpSocketTimeoutSec(); if (httpSocketTimeoutSec == null) { return; } // apply specific timeout settings configured for this ...
[ "public", "static", "void", "applyRequestConfig", "(", "HttpRequestBase", "httpRequest", ",", "PackageFile", "packageFile", ",", "PackageManagerProperties", "props", ")", "{", "Integer", "httpSocketTimeoutSec", "=", "packageFile", ".", "getHttpSocketTimeoutSec", "(", ")",...
Apply timeout configurations that are defined specific for this package file. @param httpRequest Http request @param packageFile Package file @param props Package manager properties
[ "Apply", "timeout", "configurations", "that", "are", "defined", "specific", "for", "this", "package", "file", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/util/HttpClientUtil.java#L56-L67
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/run/Executor.java
Executor.executeOne
public static Object executeOne(String correlationId, Object component, Parameters args) throws ApplicationException { """ Executes specific component. To be executed components must implement IExecutable interface. If they don't the call to this method has no effect. @param correlationId (optional) tran...
java
public static Object executeOne(String correlationId, Object component, Parameters args) throws ApplicationException { if (component instanceof IExecutable) return ((IExecutable) component).execute(correlationId, args); else return null; }
[ "public", "static", "Object", "executeOne", "(", "String", "correlationId", ",", "Object", "component", ",", "Parameters", "args", ")", "throws", "ApplicationException", "{", "if", "(", "component", "instanceof", "IExecutable", ")", "return", "(", "(", "IExecutabl...
Executes specific component. To be executed components must implement IExecutable interface. If they don't the call to this method has no effect. @param correlationId (optional) transaction id to trace execution through call chain. @param component the component that is to be executed. @param args execut...
[ "Executes", "specific", "component", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/run/Executor.java#L29-L36
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java
TagLibFactory.startElement
@Override public void startElement(String uri, String name, String qName, Attributes attributes) { """ Geerbte Methode von org.xml.sax.ContentHandler, wird bei durchparsen des XML, beim Auftreten eines Start-Tag aufgerufen. @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) ...
java
@Override public void startElement(String uri, String name, String qName, Attributes attributes) { inside = qName; this.attributes = attributes; if (qName.equals("tag")) startTag(); else if (qName.equals("attribute")) startAtt(); else if (qName.equals("script")) startScript(); }
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "name", ",", "String", "qName", ",", "Attributes", "attributes", ")", "{", "inside", "=", "qName", ";", "this", ".", "attributes", "=", "attributes", ";", "if", "(", ...
Geerbte Methode von org.xml.sax.ContentHandler, wird bei durchparsen des XML, beim Auftreten eines Start-Tag aufgerufen. @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
[ "Geerbte", "Methode", "von", "org", ".", "xml", ".", "sax", ".", "ContentHandler", "wird", "bei", "durchparsen", "des", "XML", "beim", "Auftreten", "eines", "Start", "-", "Tag", "aufgerufen", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java#L192-L201
pravega/pravega
common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java
BTreeIndex.processParentPage
private void processParentPage(PageWrapper parentPage, PageModificationContext context) { """ Processes the parent BTreePage after modifying one of its child pages. This involves removing Pointers to deleted child pages, updating pointers to existing pages and inserting pointers for new pages (results of splits)....
java
private void processParentPage(PageWrapper parentPage, PageModificationContext context) { if (context.getDeletedPageKey() != null) { // We have a deleted page. Remove its pointer from the parent. parentPage.getPage().update(Collections.singletonList(PageEntry.noValue(context.getDeletedPa...
[ "private", "void", "processParentPage", "(", "PageWrapper", "parentPage", ",", "PageModificationContext", "context", ")", "{", "if", "(", "context", ".", "getDeletedPageKey", "(", ")", "!=", "null", ")", "{", "// We have a deleted page. Remove its pointer from the parent....
Processes the parent BTreePage after modifying one of its child pages. This involves removing Pointers to deleted child pages, updating pointers to existing pages and inserting pointers for new pages (results of splits). @param parentPage The parent page. @param context Processing Context.
[ "Processes", "the", "parent", "BTreePage", "after", "modifying", "one", "of", "its", "child", "pages", ".", "This", "involves", "removing", "Pointers", "to", "deleted", "child", "pages", "updating", "pointers", "to", "existing", "pages", "and", "inserting", "poi...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java#L563-L575
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java
MetadataService.addToken
public CompletableFuture<Revision> addToken(Author author, String projectName, String appId, ProjectRole role) { """ Adds a {@link Token} of the specified {@code appId} to the specified {@code projectName}. """ requireNonNull(author, "author"); re...
java
public CompletableFuture<Revision> addToken(Author author, String projectName, String appId, ProjectRole role) { requireNonNull(author, "author"); requireNonNull(projectName, "projectName"); requireNonNull(appId, "appId"); requireNonNull(ro...
[ "public", "CompletableFuture", "<", "Revision", ">", "addToken", "(", "Author", "author", ",", "String", "projectName", ",", "String", "appId", ",", "ProjectRole", "role", ")", "{", "requireNonNull", "(", "author", ",", "\"author\"", ")", ";", "requireNonNull", ...
Adds a {@link Token} of the specified {@code appId} to the specified {@code projectName}.
[ "Adds", "a", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java#L334-L356
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/DTDSubsetImpl.java
DTDSubsetImpl.combineMaps
private static <K,V> void combineMaps(Map<K,V> m1, Map<K,V> m2) { """ <p> Note: The first Map argument WILL be modified; second one not. Caller needs to ensure this is acceptable. """ for (Map.Entry<K,V> me : m2.entrySet()) { K key = me.getKey(); /* Int. subset has precedence, bu...
java
private static <K,V> void combineMaps(Map<K,V> m1, Map<K,V> m2) { for (Map.Entry<K,V> me : m2.entrySet()) { K key = me.getKey(); /* Int. subset has precedence, but let's guess most of * the time there are no collisions: */ V old = m1.put(key, me.get...
[ "private", "static", "<", "K", ",", "V", ">", "void", "combineMaps", "(", "Map", "<", "K", ",", "V", ">", "m1", ",", "Map", "<", "K", ",", "V", ">", "m2", ")", "{", "for", "(", "Map", ".", "Entry", "<", "K", ",", "V", ">", "me", ":", "m2"...
<p> Note: The first Map argument WILL be modified; second one not. Caller needs to ensure this is acceptable.
[ "<p", ">", "Note", ":", "The", "first", "Map", "argument", "WILL", "be", "modified", ";", "second", "one", "not", ".", "Caller", "needs", "to", "ensure", "this", "is", "acceptable", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/DTDSubsetImpl.java#L451-L464
OpenLiberty/open-liberty
dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/AuthFilterConfig.java
AuthFilterConfig.getElementProperties
private Properties getElementProperties(Map<String, Object> configProps, String elementName, String... attrKeys) { """ Get properties from the given element and/or it's subElements. Ignore system generated props, add the user props to the given Properties object @param configProps props from the config @param...
java
private Properties getElementProperties(Map<String, Object> configProps, String elementName, String... attrKeys) { Properties properties = new Properties(); for (String attrKey : attrKeys) { String value = (String) configProps.get(attrKey); if (value != null && value.length() > 0...
[ "private", "Properties", "getElementProperties", "(", "Map", "<", "String", ",", "Object", ">", "configProps", ",", "String", "elementName", ",", "String", "...", "attrKeys", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "for",...
Get properties from the given element and/or it's subElements. Ignore system generated props, add the user props to the given Properties object @param configProps props from the config @param elementName the element being processed
[ "Get", "properties", "from", "the", "given", "element", "and", "/", "or", "it", "s", "subElements", ".", "Ignore", "system", "generated", "props", "add", "the", "user", "props", "to", "the", "given", "Properties", "object" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/AuthFilterConfig.java#L133-L152
opentok/Opentok-Java-SDK
src/main/java/com/opentok/OpenTok.java
OpenTok.startArchive
public Archive startArchive(String sessionId, ArchiveProperties properties) throws OpenTokException { """ Starts archiving an OpenTok session. This version of the <code>startArchive()</code> method lets you disable audio or video recording. <p> Clients must be actively connected to the OpenTok session for you t...
java
public Archive startArchive(String sessionId, ArchiveProperties properties) throws OpenTokException { if (sessionId == null || sessionId == "") { throw new InvalidArgumentException("Session not valid"); } Boolean hasResolution = properties != null && properties.resolution() != null ...
[ "public", "Archive", "startArchive", "(", "String", "sessionId", ",", "ArchiveProperties", "properties", ")", "throws", "OpenTokException", "{", "if", "(", "sessionId", "==", "null", "||", "sessionId", "==", "\"\"", ")", "{", "throw", "new", "InvalidArgumentExcept...
Starts archiving an OpenTok session. This version of the <code>startArchive()</code> method lets you disable audio or video recording. <p> Clients must be actively connected to the OpenTok session for you to successfully start recording an archive. <p> You can only record one archive at a time for a given session. You ...
[ "Starts", "archiving", "an", "OpenTok", "session", ".", "This", "version", "of", "the", "<code", ">", "startArchive", "()", "<", "/", "code", ">", "method", "lets", "you", "disable", "audio", "or", "video", "recording", ".", "<p", ">", "Clients", "must", ...
train
https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/OpenTok.java#L436-L451
RestComm/media-core
resource/media-player/src/main/java/org/restcomm/media/core/resource/player/audio/tts/TtsTrackImpl.java
TtsTrackImpl.readPacket
private int readPacket(byte[] packet, int offset, int psize) throws IOException { """ Reads packet from currently opened stream. @param packet the packet to read @param offset the offset from which new data will be inserted @return the number of actualy read bytes. @throws java.io.IOException ...
java
private int readPacket(byte[] packet, int offset, int psize) throws IOException { int length = 0; try { while (length < psize) { int len = stream.read(packet, offset + length, psize - length); if (len == -1) { return length; ...
[ "private", "int", "readPacket", "(", "byte", "[", "]", "packet", ",", "int", "offset", ",", "int", "psize", ")", "throws", "IOException", "{", "int", "length", "=", "0", ";", "try", "{", "while", "(", "length", "<", "psize", ")", "{", "int", "len", ...
Reads packet from currently opened stream. @param packet the packet to read @param offset the offset from which new data will be inserted @return the number of actualy read bytes. @throws java.io.IOException
[ "Reads", "packet", "from", "currently", "opened", "stream", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/resource/media-player/src/main/java/org/restcomm/media/core/resource/player/audio/tts/TtsTrackImpl.java#L159-L175
aws/aws-sdk-java
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/InitiateAuthResult.java
InitiateAuthResult.withChallengeParameters
public InitiateAuthResult withChallengeParameters(java.util.Map<String, String> challengeParameters) { """ <p> The challenge parameters. These are returned to you in the <code>InitiateAuth</code> response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to t...
java
public InitiateAuthResult withChallengeParameters(java.util.Map<String, String> challengeParameters) { setChallengeParameters(challengeParameters); return this; }
[ "public", "InitiateAuthResult", "withChallengeParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "challengeParameters", ")", "{", "setChallengeParameters", "(", "challengeParameters", ")", ";", "return", "this", ";", "}" ]
<p> The challenge parameters. These are returned to you in the <code>InitiateAuth</code> response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call ( <code>RespondToAuthChallenge</code>). </p> <p> All challenges require <code>USERNAME</code> and <co...
[ "<p", ">", "The", "challenge", "parameters", ".", "These", "are", "returned", "to", "you", "in", "the", "<code", ">", "InitiateAuth<", "/", "code", ">", "response", "if", "you", "need", "to", "pass", "another", "challenge", ".", "The", "responses", "in", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/InitiateAuthResult.java#L709-L712
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
StreamingJobGraphGenerator.setChaining
private void setChaining(Map<Integer, byte[]> hashes, List<Map<Integer, byte[]>> legacyHashes, Map<Integer, List<Tuple2<byte[], byte[]>>> chainedOperatorHashes) { """ Sets up task chains from the source {@link StreamNode} instances. <p>This will recursively create all {@link JobVertex} instances. """ for ...
java
private void setChaining(Map<Integer, byte[]> hashes, List<Map<Integer, byte[]>> legacyHashes, Map<Integer, List<Tuple2<byte[], byte[]>>> chainedOperatorHashes) { for (Integer sourceNodeId : streamGraph.getSourceIDs()) { createChain(sourceNodeId, sourceNodeId, hashes, legacyHashes, 0, chainedOperatorHashes); } ...
[ "private", "void", "setChaining", "(", "Map", "<", "Integer", ",", "byte", "[", "]", ">", "hashes", ",", "List", "<", "Map", "<", "Integer", ",", "byte", "[", "]", ">", ">", "legacyHashes", ",", "Map", "<", "Integer", ",", "List", "<", "Tuple2", "<...
Sets up task chains from the source {@link StreamNode} instances. <p>This will recursively create all {@link JobVertex} instances.
[ "Sets", "up", "task", "chains", "from", "the", "source", "{", "@link", "StreamNode", "}", "instances", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java#L201-L205
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java
DNSUtil.resolveXMPPServerDomain
public static List<HostAddress> resolveXMPPServerDomain(DnsName domain, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { """ Returns a list of HostAddresses under which the specified XMPP server can be reached at for server-to-server communication. A DNS lookup for a SRV record in the form "_xmpp-serve...
java
public static List<HostAddress> resolveXMPPServerDomain(DnsName domain, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { return resolveDomain(domain, DomainType.server, failedAddresses, dnssecMode); }
[ "public", "static", "List", "<", "HostAddress", ">", "resolveXMPPServerDomain", "(", "DnsName", "domain", ",", "List", "<", "HostAddress", ">", "failedAddresses", ",", "DnssecMode", "dnssecMode", ")", "{", "return", "resolveDomain", "(", "domain", ",", "DomainType...
Returns a list of HostAddresses under which the specified XMPP server can be reached at for server-to-server communication. A DNS lookup for a SRV record in the form "_xmpp-server._tcp.example.com" is attempted, according to section 3.2.1 of RFC 6120. If that lookup fails , it's assumed that the XMPP server lives at th...
[ "Returns", "a", "list", "of", "HostAddresses", "under", "which", "the", "specified", "XMPP", "server", "can", "be", "reached", "at", "for", "server", "-", "to", "-", "server", "communication", ".", "A", "DNS", "lookup", "for", "a", "SRV", "record", "in", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java#L133-L135
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java
PredictionsImpl.predictImageUrlWithNoStoreAsync
public Observable<ImagePrediction> predictImageUrlWithNoStoreAsync(UUID projectId, PredictImageUrlWithNoStoreOptionalParameter predictImageUrlWithNoStoreOptionalParameter) { """ Predict an image url without saving the result. @param projectId The project id @param predictImageUrlWithNoStoreOptionalParameter th...
java
public Observable<ImagePrediction> predictImageUrlWithNoStoreAsync(UUID projectId, PredictImageUrlWithNoStoreOptionalParameter predictImageUrlWithNoStoreOptionalParameter) { return predictImageUrlWithNoStoreWithServiceResponseAsync(projectId, predictImageUrlWithNoStoreOptionalParameter).map(new Func1<ServiceRes...
[ "public", "Observable", "<", "ImagePrediction", ">", "predictImageUrlWithNoStoreAsync", "(", "UUID", "projectId", ",", "PredictImageUrlWithNoStoreOptionalParameter", "predictImageUrlWithNoStoreOptionalParameter", ")", "{", "return", "predictImageUrlWithNoStoreWithServiceResponseAsync",...
Predict an image url without saving the result. @param projectId The project id @param predictImageUrlWithNoStoreOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Im...
[ "Predict", "an", "image", "url", "without", "saving", "the", "result", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java#L300-L307
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java
ShardConsumer.adjustRunLoopFrequency
protected long adjustRunLoopFrequency(long processingStartTimeNanos, long processingEndTimeNanos) throws InterruptedException { """ Adjusts loop timing to match target frequency if specified. @param processingStartTimeNanos The start time of the run loop "work" @param processingEndTimeNanos The end time of the...
java
protected long adjustRunLoopFrequency(long processingStartTimeNanos, long processingEndTimeNanos) throws InterruptedException { long endTimeNanos = processingEndTimeNanos; if (fetchIntervalMillis != 0) { long processingTimeNanos = processingEndTimeNanos - processingStartTimeNanos; long sleepTimeMillis = fet...
[ "protected", "long", "adjustRunLoopFrequency", "(", "long", "processingStartTimeNanos", ",", "long", "processingEndTimeNanos", ")", "throws", "InterruptedException", "{", "long", "endTimeNanos", "=", "processingEndTimeNanos", ";", "if", "(", "fetchIntervalMillis", "!=", "...
Adjusts loop timing to match target frequency if specified. @param processingStartTimeNanos The start time of the run loop "work" @param processingEndTimeNanos The end time of the run loop "work" @return The System.nanoTime() after the sleep (if any) @throws InterruptedException
[ "Adjusts", "loop", "timing", "to", "match", "target", "frequency", "if", "specified", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java#L285-L298
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java
WorkspaceUtils.assertOpenActiveAndCurrent
public static void assertOpenActiveAndCurrent(@NonNull String ws, @NonNull String errorMsg) throws ND4JWorkspaceException { """ Assert that the specified workspace is open, active, and is the current workspace @param ws Name of the workspace to assert open/active/current @param errorMsg Message to includ...
java
public static void assertOpenActiveAndCurrent(@NonNull String ws, @NonNull String errorMsg) throws ND4JWorkspaceException { if (!Nd4j.getWorkspaceManager().checkIfWorkspaceExistsAndActive(ws)) { throw new ND4JWorkspaceException(errorMsg + " - workspace is not open and active"); } Mem...
[ "public", "static", "void", "assertOpenActiveAndCurrent", "(", "@", "NonNull", "String", "ws", ",", "@", "NonNull", "String", "errorMsg", ")", "throws", "ND4JWorkspaceException", "{", "if", "(", "!", "Nd4j", ".", "getWorkspaceManager", "(", ")", ".", "checkIfWor...
Assert that the specified workspace is open, active, and is the current workspace @param ws Name of the workspace to assert open/active/current @param errorMsg Message to include in the exception, if required
[ "Assert", "that", "the", "specified", "workspace", "is", "open", "active", "and", "is", "the", "current", "workspace" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java#L92-L101
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.createOrUpdateAsync
public Observable<ApplicationGatewayInner> createOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { """ Creates or updates the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name...
java
public Observable<ApplicationGatewayInner> createOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).map(new Func1<ServiceResponse<ApplicationGatewayInner...
[ "public", "Observable", "<", "ApplicationGatewayInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ",", "ApplicationGatewayInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Creates or updates the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @param parameters Parameters supplied to the create or update application gateway operation. @throws IllegalArgumentException thrown if param...
[ "Creates", "or", "updates", "the", "specified", "application", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L433-L440
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
TargetPoolClient.insertTargetPool
@BetaApi public final Operation insertTargetPool(String region, TargetPool targetPoolResource) { """ Creates a target pool in the specified project and region using the data included in the request. <p>Sample code: <pre><code> try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) { Project...
java
@BetaApi public final Operation insertTargetPool(String region, TargetPool targetPoolResource) { InsertTargetPoolHttpRequest request = InsertTargetPoolHttpRequest.newBuilder() .setRegion(region) .setTargetPoolResource(targetPoolResource) .build(); return insertTarg...
[ "@", "BetaApi", "public", "final", "Operation", "insertTargetPool", "(", "String", "region", ",", "TargetPool", "targetPoolResource", ")", "{", "InsertTargetPoolHttpRequest", "request", "=", "InsertTargetPoolHttpRequest", ".", "newBuilder", "(", ")", ".", "setRegion", ...
Creates a target pool in the specified project and region using the data included in the request. <p>Sample code: <pre><code> try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); TargetPool targetPoolResource = TargetPool.newBu...
[ "Creates", "a", "target", "pool", "in", "the", "specified", "project", "and", "region", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java#L890-L899
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.readResource
public CmsResource readResource(CmsUUID structureID, CmsResourceFilter filter) throws CmsException { """ Reads a resource from the VFS, using the specified resource filter.<p> A resource may be of type <code>{@link CmsFile}</code> or <code>{@link CmsFolder}</code>. In case of a file, the resource will not co...
java
public CmsResource readResource(CmsUUID structureID, CmsResourceFilter filter) throws CmsException { return m_securityManager.readResource(m_context, structureID, filter); }
[ "public", "CmsResource", "readResource", "(", "CmsUUID", "structureID", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "return", "m_securityManager", ".", "readResource", "(", "m_context", ",", "structureID", ",", "filter", ")", ";", "}" ]
Reads a resource from the VFS, using the specified resource filter.<p> A resource may be of type <code>{@link CmsFile}</code> or <code>{@link CmsFolder}</code>. In case of a file, the resource will not contain the binary file content. Since reading the binary content is a cost-expensive database operation, it's recomm...
[ "Reads", "a", "resource", "from", "the", "VFS", "using", "the", "specified", "resource", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L3113-L3116
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.appendHandler
protected static void appendHandler(LogRecordHandler parent, LogRecordHandler child) { """ Append a Handler to a portion of the handler tree @param parent The parent to add the child to @param child The Handler to add. """ RecordHandlerTree p = handlers.find(parent); if(p != null){ p.addChil...
java
protected static void appendHandler(LogRecordHandler parent, LogRecordHandler child){ RecordHandlerTree p = handlers.find(parent); if(p != null){ p.addChild(child); } else { throw new IllegalArgumentException("No such parent handler: " + parent); } }
[ "protected", "static", "void", "appendHandler", "(", "LogRecordHandler", "parent", ",", "LogRecordHandler", "child", ")", "{", "RecordHandlerTree", "p", "=", "handlers", ".", "find", "(", "parent", ")", ";", "if", "(", "p", "!=", "null", ")", "{", "p", "."...
Append a Handler to a portion of the handler tree @param parent The parent to add the child to @param child The Handler to add.
[ "Append", "a", "Handler", "to", "a", "portion", "of", "the", "handler", "tree" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L313-L320
alkacon/opencms-core
src/org/opencms/staticexport/CmsLinkManager.java
CmsLinkManager.getServerLink
public String getServerLink(CmsObject cms, String resourceName) { """ Returns the link for the given resource in the current project, with full server prefix.<p> Like <code>http://site.enterprise.com:8080/index.html</code>.<p> In case the resource name is a full root path, the site from the root path will be...
java
public String getServerLink(CmsObject cms, String resourceName) { return getServerLink(cms, resourceName, false); }
[ "public", "String", "getServerLink", "(", "CmsObject", "cms", ",", "String", "resourceName", ")", "{", "return", "getServerLink", "(", "cms", ",", "resourceName", ",", "false", ")", ";", "}" ]
Returns the link for the given resource in the current project, with full server prefix.<p> Like <code>http://site.enterprise.com:8080/index.html</code>.<p> In case the resource name is a full root path, the site from the root path will be used. Otherwise the resource is assumed to be in the current site set be the O...
[ "Returns", "the", "link", "for", "the", "given", "resource", "in", "the", "current", "project", "with", "full", "server", "prefix", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L561-L564
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java
SchemeUtils.dropIndex
@SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public static void dropIndex(final ODatabaseObject db, final String indexName) { """ Drops named index. Safe to call even if index not exist. @param db database object @param indexName index name @see com.orientechnologies.orient.core.in...
java
@SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public static void dropIndex(final ODatabaseObject db, final String indexName) { // Separated to overcome findbugs false positive "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" for dropIndex method. db.getMetadata().getIndexManager().dropIndex(...
[ "@", "SuppressFBWarnings", "(", "\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\"", ")", "public", "static", "void", "dropIndex", "(", "final", "ODatabaseObject", "db", ",", "final", "String", "indexName", ")", "{", "// Separated to overcome findbugs false positive \"RV_RETURN_VALUE_...
Drops named index. Safe to call even if index not exist. @param db database object @param indexName index name @see com.orientechnologies.orient.core.index.OIndexManagerProxy#dropIndex(java.lang.String)
[ "Drops", "named", "index", ".", "Safe", "to", "call", "even", "if", "index", "not", "exist", "." ]
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java#L93-L97
Coveros/selenified
src/main/java/com/coveros/selenified/Selenified.java
Selenified.getServiceUserCredential
private static String getServiceUserCredential(String clazz, ITestContext context) { """ Obtains the web services username provided for the current test suite being executed. Anything passed in from the command line will first be taken, to override any other values. Next, values being set in the classes will be ...
java
private static String getServiceUserCredential(String clazz, ITestContext context) { if (System.getenv("SERVICES_USER") != null) { return System.getenv("SERVICES_USER"); } if (context.getAttribute(clazz + SERVICES_USER) != null) { return (String) context.getAttribute(claz...
[ "private", "static", "String", "getServiceUserCredential", "(", "String", "clazz", ",", "ITestContext", "context", ")", "{", "if", "(", "System", ".", "getenv", "(", "\"SERVICES_USER\"", ")", "!=", "null", ")", "{", "return", "System", ".", "getenv", "(", "\...
Obtains the web services username provided for the current test suite being executed. Anything passed in from the command line will first be taken, to override any other values. Next, values being set in the classes will be checked for. If neither of these are set, an empty string will be returned @param clazz - the...
[ "Obtains", "the", "web", "services", "username", "provided", "for", "the", "current", "test", "suite", "being", "executed", ".", "Anything", "passed", "in", "from", "the", "command", "line", "will", "first", "be", "taken", "to", "override", "any", "other", "...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Selenified.java#L244-L253
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java
JobOperations.enableJob
public void enableJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Enables the specified job, allowing new tasks to run. @param jobId The ID of the job. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are ap...
java
public void enableJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobEnableOptions options = new JobEnableOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehavior...
[ "public", "void", "enableJob", "(", "String", "jobId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "JobEnableOptions", "options", "=", "new", "JobEnableOptions", "(", ")", ";...
Enables the specified job, allowing new tasks to run. @param jobId The ID of the job. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @...
[ "Enables", "the", "specified", "job", "allowing", "new", "tasks", "to", "run", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java#L410-L416
bwkimmel/java-util
src/main/java/ca/eandb/util/ClassUtil.java
ClassUtil.getClassDigest
public static void getClassDigest(Class<?> cl, MessageDigest digest) { """ Computes a digest from a class' bytecode. @param cl The <code>Class</code> for which to compute the digest. @param digest The <code>MessageDigest</code> to update. """ DigestOutputStream out = new DigestOutputStream(NullOutputStre...
java
public static void getClassDigest(Class<?> cl, MessageDigest digest) { DigestOutputStream out = new DigestOutputStream(NullOutputStream.getInstance(), digest); try { writeClassToStream(cl, out); } catch (IOException e) { e.printStackTrace(); throw new UnexpectedException(e); } }
[ "public", "static", "void", "getClassDigest", "(", "Class", "<", "?", ">", "cl", ",", "MessageDigest", "digest", ")", "{", "DigestOutputStream", "out", "=", "new", "DigestOutputStream", "(", "NullOutputStream", ".", "getInstance", "(", ")", ",", "digest", ")",...
Computes a digest from a class' bytecode. @param cl The <code>Class</code> for which to compute the digest. @param digest The <code>MessageDigest</code> to update.
[ "Computes", "a", "digest", "from", "a", "class", "bytecode", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/ClassUtil.java#L100-L108
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/SiRNANotation.java
SiRNANotation.getSirnaNotation
public static HELM2Notation getSirnaNotation(String senseSeq, String antiSenseSeq, String rnaDesignType) throws NotationException, FastaFormatException, HELM2HandledException, RNAUtilsException, org.helm.notation2.exception.NotationException, ChemistryException, CTKException, NucleotideLoadingException { ...
java
public static HELM2Notation getSirnaNotation(String senseSeq, String antiSenseSeq, String rnaDesignType) throws NotationException, FastaFormatException, HELM2HandledException, RNAUtilsException, org.helm.notation2.exception.NotationException, ChemistryException, CTKException, NucleotideLoadingException { ...
[ "public", "static", "HELM2Notation", "getSirnaNotation", "(", "String", "senseSeq", ",", "String", "antiSenseSeq", ",", "String", "rnaDesignType", ")", "throws", "NotationException", ",", "FastaFormatException", ",", "HELM2HandledException", ",", "RNAUtilsException", ",",...
this method converts nucleotide sequences into HELM notation based on design pattern @param senseSeq 5-3 nucleotide sequence @param antiSenseSeq 3-5 nucleotide sequence @param rnaDesignType given design pattern @return HELM2Notation for siRNA @throws NotationException if notation is not valid @throws FastaFormatExcept...
[ "this", "method", "converts", "nucleotide", "sequences", "into", "HELM", "notation", "based", "on", "design", "pattern" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/SiRNANotation.java#L115-L136
rythmengine/rythmengine
src/main/java/org/rythmengine/toString/ToStringOption.java
ToStringOption.valueOf
public static ToStringOption valueOf(String s) { """ Construct a <code>ToStringOption</code> instance out from a string. The format of the String should be the same as the format output of {@link #toString()} method @param s @return an option instance corresponding to the string specified """ Pat...
java
public static ToStringOption valueOf(String s) { Pattern p = Pattern.compile("\\{appendStatic *\\: *(true|false) *; *appendTransient *\\: *(true|false) *; *upToClass *: *(.*)\\}"); Matcher m = p.matcher(s); if (!m.matches()) throw new IllegalArgumentException("Unknown ToStringOption: " + s); ...
[ "public", "static", "ToStringOption", "valueOf", "(", "String", "s", ")", "{", "Pattern", "p", "=", "Pattern", ".", "compile", "(", "\"\\\\{appendStatic *\\\\: *(true|false) *; *appendTransient *\\\\: *(true|false) *; *upToClass *: *(.*)\\\\}\"", ")", ";", "Matcher", "m", "...
Construct a <code>ToStringOption</code> instance out from a string. The format of the String should be the same as the format output of {@link #toString()} method @param s @return an option instance corresponding to the string specified
[ "Construct", "a", "<code", ">", "ToStringOption<", "/", "code", ">", "instance", "out", "from", "a", "string", ".", "The", "format", "of", "the", "String", "should", "be", "the", "same", "as", "the", "format", "output", "of", "{", "@link", "#toString", "...
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/toString/ToStringOption.java#L174-L189
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/SelectListUtil.java
SelectListUtil.isOptionCodeMatch
private static boolean isOptionCodeMatch(final Object option, final Object data) { """ If the option is an instance of {@link Option}, check if the data value matches the Code value of the option. @param option the option to test for a match @param data the test data value @return true if the option and code ...
java
private static boolean isOptionCodeMatch(final Object option, final Object data) { // If the option is an instance of Option, check if the data value is the "CODE" value on the option if (option instanceof Option) { String optionCode = ((Option) option).getCode(); String matchAsString = String.valueOf(data); ...
[ "private", "static", "boolean", "isOptionCodeMatch", "(", "final", "Object", "option", ",", "final", "Object", "data", ")", "{", "// If the option is an instance of Option, check if the data value is the \"CODE\" value on the option", "if", "(", "option", "instanceof", "Option"...
If the option is an instance of {@link Option}, check if the data value matches the Code value of the option. @param option the option to test for a match @param data the test data value @return true if the option and code are a match
[ "If", "the", "option", "is", "an", "instance", "of", "{", "@link", "Option", "}", "check", "if", "the", "data", "value", "matches", "the", "Code", "value", "of", "the", "option", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/SelectListUtil.java#L191-L200
apollographql/apollo-android
apollo-api/src/main/java/com/apollographql/apollo/api/ResponseField.java
ResponseField.forObject
public static ResponseField forObject(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { """ Factory method for creating a Field instance representing a custom {@link Type#OBJECT}. @param responseName alias for the result of a field @para...
java
public static ResponseField forObject(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.OBJECT, responseName, fieldName, arguments, optional, conditions); }
[ "public", "static", "ResponseField", "forObject", "(", "String", "responseName", ",", "String", "fieldName", ",", "Map", "<", "String", ",", "Object", ">", "arguments", ",", "boolean", "optional", ",", "List", "<", "Condition", ">", "conditions", ")", "{", "...
Factory method for creating a Field instance representing a custom {@link Type#OBJECT}. @param responseName alias for the result of a field @param fieldName name of the field in the GraphQL operation @param arguments arguments to be passed along with the field @param optional whether the arguments passed alo...
[ "Factory", "method", "for", "creating", "a", "Field", "instance", "representing", "a", "custom", "{", "@link", "Type#OBJECT", "}", "." ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-api/src/main/java/com/apollographql/apollo/api/ResponseField.java#L130-L133
LMAX-Exchange/disruptor
src/main/java/com/lmax/disruptor/SequenceGroup.java
SequenceGroup.addWhileRunning
public void addWhileRunning(Cursored cursored, Sequence sequence) { """ Adds a sequence to the sequence group after threads have started to publish to the Disruptor. It will set the sequences to cursor value of the ringBuffer just after adding them. This should prevent any nasty rewind/wrapping effects. @pa...
java
public void addWhileRunning(Cursored cursored, Sequence sequence) { SequenceGroups.addSequences(this, SEQUENCE_UPDATER, cursored, sequence); }
[ "public", "void", "addWhileRunning", "(", "Cursored", "cursored", ",", "Sequence", "sequence", ")", "{", "SequenceGroups", ".", "addSequences", "(", "this", ",", "SEQUENCE_UPDATER", ",", "cursored", ",", "sequence", ")", ";", "}" ]
Adds a sequence to the sequence group after threads have started to publish to the Disruptor. It will set the sequences to cursor value of the ringBuffer just after adding them. This should prevent any nasty rewind/wrapping effects. @param cursored The data structure that the owner of this sequence group will be pul...
[ "Adds", "a", "sequence", "to", "the", "sequence", "group", "after", "threads", "have", "started", "to", "publish", "to", "the", "Disruptor", ".", "It", "will", "set", "the", "sequences", "to", "cursor", "value", "of", "the", "ringBuffer", "just", "after", ...
train
https://github.com/LMAX-Exchange/disruptor/blob/4266d00c5250190313446fdd7c8aa7a4edb5c818/src/main/java/com/lmax/disruptor/SequenceGroup.java#L121-L124
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/HttpUtil.java
HttpUtil.initHttpClient
public static CloseableHttpClient initHttpClient(boolean insecureMode, File ocspCacheFile) { """ Accessor for the HTTP client singleton. @param insecureMode skip OCSP revocation check if true. @param ocspCacheFile OCSP response cache file name. if null, the default file will be used. @return HttpClient obje...
java
public static CloseableHttpClient initHttpClient(boolean insecureMode, File ocspCacheFile) { if (httpClient == null) { synchronized (HttpUtil.class) { if (httpClient == null) { httpClient = buildHttpClient( insecureMode, ocspCacheFile, ...
[ "public", "static", "CloseableHttpClient", "initHttpClient", "(", "boolean", "insecureMode", ",", "File", "ocspCacheFile", ")", "{", "if", "(", "httpClient", "==", "null", ")", "{", "synchronized", "(", "HttpUtil", ".", "class", ")", "{", "if", "(", "httpClien...
Accessor for the HTTP client singleton. @param insecureMode skip OCSP revocation check if true. @param ocspCacheFile OCSP response cache file name. if null, the default file will be used. @return HttpClient object shared across all connections
[ "Accessor", "for", "the", "HTTP", "client", "singleton", "." ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/HttpUtil.java#L201-L217
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/util/ZlibInflater.java
ZlibInflater.zlibUncompressBuffer
public static ByteArrayHolder zlibUncompressBuffer(byte[] compressed, Integer uncompressedLen) throws IOException, DataFormatException, FileParsingException { """ Convenience method for {@link #zlibUncompressBuffer(byte[], int, Integer)}. Inflates zLib compressed byte[]. @param compressed zLib comp...
java
public static ByteArrayHolder zlibUncompressBuffer(byte[] compressed, Integer uncompressedLen) throws IOException, DataFormatException, FileParsingException { return zlibUncompressBuffer(compressed, compressed.length, uncompressedLen); }
[ "public", "static", "ByteArrayHolder", "zlibUncompressBuffer", "(", "byte", "[", "]", "compressed", ",", "Integer", "uncompressedLen", ")", "throws", "IOException", ",", "DataFormatException", ",", "FileParsingException", "{", "return", "zlibUncompressBuffer", "(", "com...
Convenience method for {@link #zlibUncompressBuffer(byte[], int, Integer)}. Inflates zLib compressed byte[]. @param compressed zLib compressed bytes @param uncompressedLen length of data in bytes when uncompressed. Optional. @return inflated byte array, which is borrowed from pool ({@link #getPool() }). You MUST retur...
[ "Convenience", "method", "for", "{", "@link", "#zlibUncompressBuffer", "(", "byte", "[]", "int", "Integer", ")", "}", ".", "Inflates", "zLib", "compressed", "byte", "[]", "." ]
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/ZlibInflater.java#L58-L62
alkacon/opencms-core
src/org/opencms/search/documents/CmsDocumentMsOfficeOLE2.java
CmsDocumentMsOfficeOLE2.extractContent
public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsIndexException, CmsException { """ Returns the raw text content of a given vfs resource containing MS Word data.<p> @see org.opencms.search.documents.I_CmsSearchExtractor#extractContent(CmsObje...
java
public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsIndexException, CmsException { logContentExtraction(resource, index); CmsFile file = readFile(cms, resource); try { return CmsExtractorMsOfficeOLE2.getExtractor().e...
[ "public", "I_CmsExtractionResult", "extractContent", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "I_CmsSearchIndex", "index", ")", "throws", "CmsIndexException", ",", "CmsException", "{", "logContentExtraction", "(", "resource", ",", "index", ")", ";...
Returns the raw text content of a given vfs resource containing MS Word data.<p> @see org.opencms.search.documents.I_CmsSearchExtractor#extractContent(CmsObject, CmsResource, I_CmsSearchIndex)
[ "Returns", "the", "raw", "text", "content", "of", "a", "given", "vfs", "resource", "containing", "MS", "Word", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/documents/CmsDocumentMsOfficeOLE2.java#L66-L78
mikepenz/MaterialDrawer
app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomUrlBasePrimaryDrawerItem.java
CustomUrlBasePrimaryDrawerItem.bindViewHelper
protected void bindViewHelper(CustomBaseViewHolder viewHolder) { """ a helper method to have the logic for all secondaryDrawerItems only once @param viewHolder """ Context ctx = viewHolder.itemView.getContext(); //set the identifier from the drawerItem here. It can be used to run tests ...
java
protected void bindViewHelper(CustomBaseViewHolder viewHolder) { Context ctx = viewHolder.itemView.getContext(); //set the identifier from the drawerItem here. It can be used to run tests viewHolder.itemView.setId(hashCode()); //set the item selected if it is viewHolder.itemVie...
[ "protected", "void", "bindViewHelper", "(", "CustomBaseViewHolder", "viewHolder", ")", "{", "Context", "ctx", "=", "viewHolder", ".", "itemView", ".", "getContext", "(", ")", ";", "//set the identifier from the drawerItem here. It can be used to run tests", "viewHolder", "....
a helper method to have the logic for all secondaryDrawerItems only once @param viewHolder
[ "a", "helper", "method", "to", "have", "the", "logic", "for", "all", "secondaryDrawerItems", "only", "once" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomUrlBasePrimaryDrawerItem.java#L70-L111
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/xml/assembly/GrokHandler.java
GrokHandler.startElement
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { """ Handles the start element event. @param uri the uri of the element being processed @param localName the local name of the element being processed @param qName the qName of the el...
java
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentText = new StringBuilder(); }
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "attributes", ")", "throws", "SAXException", "{", "currentText", "=", "new", "StringBuilder", "(", ")", ";", "}" ]
Handles the start element event. @param uri the uri of the element being processed @param localName the local name of the element being processed @param qName the qName of the element being processed @param attributes the attributes of the element being processed @throws SAXException thrown if there is an exception pr...
[ "Handles", "the", "start", "element", "event", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/xml/assembly/GrokHandler.java#L104-L107
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.fireEvent
private void fireEvent(int type, Object data) { """ Notify all event listeners that a particular event has occurred.<p> The event will be given to all registered <code>{@link I_CmsEventListener}</code>s.<p> @param type the type of the event @param data a data object that contains data used by the event list...
java
private void fireEvent(int type, Object data) { OpenCms.fireCmsEvent(type, Collections.singletonMap("data", data)); }
[ "private", "void", "fireEvent", "(", "int", "type", ",", "Object", "data", ")", "{", "OpenCms", ".", "fireCmsEvent", "(", "type", ",", "Collections", ".", "singletonMap", "(", "\"data\"", ",", "data", ")", ")", ";", "}" ]
Notify all event listeners that a particular event has occurred.<p> The event will be given to all registered <code>{@link I_CmsEventListener}</code>s.<p> @param type the type of the event @param data a data object that contains data used by the event listeners @see OpenCms#addCmsEventListener(I_CmsEventListener) @s...
[ "Notify", "all", "event", "listeners", "that", "a", "particular", "event", "has", "occurred", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L4258-L4261
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java
BaseLuceneStorage.buildQuery
protected Query buildQuery(String spaceId, String key) { """ Build query to match entry's space-id and key. @param spaceId @param key @return """ BooleanQuery.Builder builder = new BooleanQuery.Builder(); if (!StringUtils.isBlank(spaceId)) { builder.add(new TermQuery(new Term(F...
java
protected Query buildQuery(String spaceId, String key) { BooleanQuery.Builder builder = new BooleanQuery.Builder(); if (!StringUtils.isBlank(spaceId)) { builder.add(new TermQuery(new Term(FIELD_SPACE_ID, spaceId.trim())), Occur.MUST); } if (!StringUtils.isBlank(key)) { ...
[ "protected", "Query", "buildQuery", "(", "String", "spaceId", ",", "String", "key", ")", "{", "BooleanQuery", ".", "Builder", "builder", "=", "new", "BooleanQuery", ".", "Builder", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isBlank", "(", "spaceId...
Build query to match entry's space-id and key. @param spaceId @param key @return
[ "Build", "query", "to", "match", "entry", "s", "space", "-", "id", "and", "key", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java#L232-L241
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_storage_GET
public ArrayList<OvhContainer> project_serviceName_storage_GET(String serviceName) throws IOException { """ Get storage containers REST: GET /cloud/project/{serviceName}/storage @param serviceName [required] Service name """ String qPath = "/cloud/project/{serviceName}/storage"; StringBuilder sb = path...
java
public ArrayList<OvhContainer> project_serviceName_storage_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/storage"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t5); }
[ "public", "ArrayList", "<", "OvhContainer", ">", "project_serviceName_storage_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/storage\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath"...
Get storage containers REST: GET /cloud/project/{serviceName}/storage @param serviceName [required] Service name
[ "Get", "storage", "containers" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L552-L557
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_usbKey_duration_POST
public OvhOrder dedicated_server_serviceName_usbKey_duration_POST(String serviceName, String duration, OvhUsbKeyCapacityEnum capacity) throws IOException { """ Create order REST: POST /order/dedicated/server/{serviceName}/usbKey/{duration} @param capacity [required] Capacity in gigabytes @param serviceName [r...
java
public OvhOrder dedicated_server_serviceName_usbKey_duration_POST(String serviceName, String duration, OvhUsbKeyCapacityEnum capacity) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/usbKey/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = ne...
[ "public", "OvhOrder", "dedicated_server_serviceName_usbKey_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhUsbKeyCapacityEnum", "capacity", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName}/usbK...
Create order REST: POST /order/dedicated/server/{serviceName}/usbKey/{duration} @param capacity [required] Capacity in gigabytes @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2687-L2694
alkacon/opencms-core
src/org/opencms/ui/components/extensions/CmsPropertyDialogExtension.java
CmsPropertyDialogExtension.editProperties
public void editProperties(CmsUUID structureId, List<CmsUUID> allIds, boolean editName) { """ Open property editor for the resource with the given structure id.<p> @param structureId the structure id of a resource @param allIds structure ids of resources for the prev/next navigation @param editName controls w...
java
public void editProperties(CmsUUID structureId, List<CmsUUID> allIds, boolean editName) { m_position = allIds.indexOf(structureId); m_ids = allIds; m_updatedIds.add(structureId); boolean online = A_CmsUI.getCmsObject().getRequestContext().getCurrentProject().isOnlineProject(); ...
[ "public", "void", "editProperties", "(", "CmsUUID", "structureId", ",", "List", "<", "CmsUUID", ">", "allIds", ",", "boolean", "editName", ")", "{", "m_position", "=", "allIds", ".", "indexOf", "(", "structureId", ")", ";", "m_ids", "=", "allIds", ";", "m_...
Open property editor for the resource with the given structure id.<p> @param structureId the structure id of a resource @param allIds structure ids of resources for the prev/next navigation @param editName controls whether the file name should be editable
[ "Open", "property", "editor", "for", "the", "resource", "with", "the", "given", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsPropertyDialogExtension.java#L107-L118
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbClob.java
MariaDbClob.setCharacterStream
public Writer setCharacterStream(long pos) throws SQLException { """ Set character stream. @param pos position @return writer @throws SQLException if position is invalid """ int bytePosition = utf8Position((int) pos - 1); OutputStream stream = setBinaryStream(bytePosition + 1); return new Outp...
java
public Writer setCharacterStream(long pos) throws SQLException { int bytePosition = utf8Position((int) pos - 1); OutputStream stream = setBinaryStream(bytePosition + 1); return new OutputStreamWriter(stream, StandardCharsets.UTF_8); }
[ "public", "Writer", "setCharacterStream", "(", "long", "pos", ")", "throws", "SQLException", "{", "int", "bytePosition", "=", "utf8Position", "(", "(", "int", ")", "pos", "-", "1", ")", ";", "OutputStream", "stream", "=", "setBinaryStream", "(", "bytePosition"...
Set character stream. @param pos position @return writer @throws SQLException if position is invalid
[ "Set", "character", "stream", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbClob.java#L169-L173
selenide/selenide
statics/src/main/java/com/codeborne/selenide/Screenshots.java
Screenshots.takeScreenShotAsImage
public static BufferedImage takeScreenShotAsImage(WebElement iframe, WebElement element) { """ Take screenshot of WebElement/SelenideElement in iframe for partially visible WebElement/Selenide horizontal scroll bar will be present @return buffered image """ return screenshots.takeScreenshotAsImage(driver...
java
public static BufferedImage takeScreenShotAsImage(WebElement iframe, WebElement element) { return screenshots.takeScreenshotAsImage(driver(), iframe, element); }
[ "public", "static", "BufferedImage", "takeScreenShotAsImage", "(", "WebElement", "iframe", ",", "WebElement", "element", ")", "{", "return", "screenshots", ".", "takeScreenshotAsImage", "(", "driver", "(", ")", ",", "iframe", ",", "element", ")", ";", "}" ]
Take screenshot of WebElement/SelenideElement in iframe for partially visible WebElement/Selenide horizontal scroll bar will be present @return buffered image
[ "Take", "screenshot", "of", "WebElement", "/", "SelenideElement", "in", "iframe", "for", "partially", "visible", "WebElement", "/", "Selenide", "horizontal", "scroll", "bar", "will", "be", "present" ]
train
https://github.com/selenide/selenide/blob/b867baf171942cf07725d83a985237428569883f/statics/src/main/java/com/codeborne/selenide/Screenshots.java#L58-L60