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
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
CoverageDataCore.pixelValueToValue
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) { """ Convert integer coverage typed pixel value to a coverage data value through scales and offsets @param griddedTile gridded tile @param pixelValue pixel value @return coverage data value """ Double value = pixelValue; ...
java
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) { Double value = pixelValue; if (griddedCoverage != null && griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) { if (griddedTile != null) { value *= griddedTile.getScale(); value += griddedTile.getOffset();...
[ "private", "Double", "pixelValueToValue", "(", "GriddedTile", "griddedTile", ",", "Double", "pixelValue", ")", "{", "Double", "value", "=", "pixelValue", ";", "if", "(", "griddedCoverage", "!=", "null", "&&", "griddedCoverage", ".", "getDataType", "(", ")", "=="...
Convert integer coverage typed pixel value to a coverage data value through scales and offsets @param griddedTile gridded tile @param pixelValue pixel value @return coverage data value
[ "Convert", "integer", "coverage", "typed", "pixel", "value", "to", "a", "coverage", "data", "value", "through", "scales", "and", "offsets" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1453-L1470
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.isAccessible
public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym) { """ Is symbol accessible as a member of given type in given environment? @param env The current environment. @param site The type of which the tested symbol is regarded as a member. @param sym The symbol. """ return ...
java
public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym) { return isAccessible(env, site, sym, false); }
[ "public", "boolean", "isAccessible", "(", "Env", "<", "AttrContext", ">", "env", ",", "Type", "site", ",", "Symbol", "sym", ")", "{", "return", "isAccessible", "(", "env", ",", "site", ",", "sym", ",", "false", ")", ";", "}" ]
Is symbol accessible as a member of given type in given environment? @param env The current environment. @param site The type of which the tested symbol is regarded as a member. @param sym The symbol.
[ "Is", "symbol", "accessible", "as", "a", "member", "of", "given", "type", "in", "given", "environment?" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L388-L390
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/KunderaMetadataManager.java
KunderaMetadataManager.getMetamodel
public static MetamodelImpl getMetamodel(final KunderaMetadata kunderaMetadata, String persistenceUnit) { """ Gets the metamodel. @param persistenceUnit the persistence unit @return the metamodel """ MetamodelImpl metamodel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata() ...
java
public static MetamodelImpl getMetamodel(final KunderaMetadata kunderaMetadata, String persistenceUnit) { MetamodelImpl metamodel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata() .getMetamodel(persistenceUnit); return metamodel; }
[ "public", "static", "MetamodelImpl", "getMetamodel", "(", "final", "KunderaMetadata", "kunderaMetadata", ",", "String", "persistenceUnit", ")", "{", "MetamodelImpl", "metamodel", "=", "(", "MetamodelImpl", ")", "kunderaMetadata", ".", "getApplicationMetadata", "(", ")",...
Gets the metamodel. @param persistenceUnit the persistence unit @return the metamodel
[ "Gets", "the", "metamodel", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/KunderaMetadataManager.java#L64-L70
aoindustries/semanticcms-core-model
src/main/java/com/semanticcms/core/model/Element.java
Element.getElementRef
public ElementRef getElementRef() throws IllegalStateException { """ Gets an ElementRef for this element. Must have a page set. If id has not yet been set, one will be generated. @throws IllegalStateException if page not set """ Page p = page; if(p == null) throw new IllegalStateException("page not ...
java
public ElementRef getElementRef() throws IllegalStateException { Page p = page; if(p == null) throw new IllegalStateException("page not set"); PageRef pageRef = p.getPageRef(); String i = getId(); if(i == null) throw new IllegalStateException("page not set so no id generated"); ElementRef er = elementRef; ...
[ "public", "ElementRef", "getElementRef", "(", ")", "throws", "IllegalStateException", "{", "Page", "p", "=", "page", ";", "if", "(", "p", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"page not set\"", ")", ";", "PageRef", "pageRef", "=", ...
Gets an ElementRef for this element. Must have a page set. If id has not yet been set, one will be generated. @throws IllegalStateException if page not set
[ "Gets", "an", "ElementRef", "for", "this", "element", ".", "Must", "have", "a", "page", "set", ".", "If", "id", "has", "not", "yet", "been", "set", "one", "will", "be", "generated", "." ]
train
https://github.com/aoindustries/semanticcms-core-model/blob/14bdbe3f3d69b2b337129c5b1afcaa9e87cb5624/src/main/java/com/semanticcms/core/model/Element.java#L274-L291
lightblue-platform/lightblue-migrator
jiff/src/main/java/jcmp/DocCompare.java
DocCompare.compareObjects
public Difference<BaseType> compareObjects(List<String> field1, ObjectType node1, List<String> field2, ObjectType node2) throws InvalidArrayIdentity, DuplicateArrayIde...
java
public Difference<BaseType> compareObjects(List<String> field1, ObjectType node1, List<String> field2, ObjectType node2) throws InvalidArrayIdentity, DuplicateArrayIde...
[ "public", "Difference", "<", "BaseType", ">", "compareObjects", "(", "List", "<", "String", ">", "field1", ",", "ObjectType", "node1", ",", "List", "<", "String", ">", "field2", ",", "ObjectType", "node2", ")", "throws", "InvalidArrayIdentity", ",", "Duplicate...
Compares two object nodes recursively and returns the differences
[ "Compares", "two", "object", "nodes", "recursively", "and", "returns", "the", "differences" ]
train
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/jiff/src/main/java/jcmp/DocCompare.java#L498-L534
alkacon/opencms-core
src/org/opencms/file/collectors/A_CmsResourceCollector.java
A_CmsResourceCollector.getCreateInFolder
protected String getCreateInFolder(CmsObject cms, CmsCollectorData data) throws CmsException { """ Returns the link to create a new XML content item in the folder pointed to by the parameter.<p> @param cms the current CmsObject @param data the collector data to use @return the link to create a new XML conte...
java
protected String getCreateInFolder(CmsObject cms, CmsCollectorData data) throws CmsException { return OpenCms.getResourceManager().getNameGenerator().getNewFileName(cms, data.getFileName(), 4); }
[ "protected", "String", "getCreateInFolder", "(", "CmsObject", "cms", ",", "CmsCollectorData", "data", ")", "throws", "CmsException", "{", "return", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getNameGenerator", "(", ")", ".", "getNewFileName", "(", "cms"...
Returns the link to create a new XML content item in the folder pointed to by the parameter.<p> @param cms the current CmsObject @param data the collector data to use @return the link to create a new XML content item in the folder @throws CmsException if something goes wrong @since 7.0.2
[ "Returns", "the", "link", "to", "create", "a", "new", "XML", "content", "item", "in", "the", "folder", "pointed", "to", "by", "the", "parameter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/collectors/A_CmsResourceCollector.java#L383-L386
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseReferenceType
private Type parseReferenceType(EnclosingScope scope) { """ Parse a reference type, which is of the form: <pre> ReferenceType ::= '&' Type | '&' Lifetime ':' Type Lifetime ::= Identifier | 'this' | '*' </pre> @return """ int start = index; match(Ampersand); // Try to parse an annotated lifetim...
java
private Type parseReferenceType(EnclosingScope scope) { int start = index; match(Ampersand); // Try to parse an annotated lifetime int backtrack = index; Identifier lifetimeIdentifier = parseOptionalLifetimeIdentifier(scope, false); if (lifetimeIdentifier != null) { // We cannot allow a newline after th...
[ "private", "Type", "parseReferenceType", "(", "EnclosingScope", "scope", ")", "{", "int", "start", "=", "index", ";", "match", "(", "Ampersand", ")", ";", "// Try to parse an annotated lifetime", "int", "backtrack", "=", "index", ";", "Identifier", "lifetimeIdentifi...
Parse a reference type, which is of the form: <pre> ReferenceType ::= '&' Type | '&' Lifetime ':' Type Lifetime ::= Identifier | 'this' | '*' </pre> @return
[ "Parse", "a", "reference", "type", "which", "is", "of", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L3693-L3718
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyHTTPUtils.java
MyHTTPUtils.getResponseHeaders
public static Map<String, List<String>> getResponseHeaders(String stringUrl) throws IOException { """ Get the response headers for URL @param stringUrl URL to use @return headers HTTP Headers @throws IOException I/O error happened """ return getResponseHeaders(stringUrl, true); }
java
public static Map<String, List<String>> getResponseHeaders(String stringUrl) throws IOException { return getResponseHeaders(stringUrl, true); }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "getResponseHeaders", "(", "String", "stringUrl", ")", "throws", "IOException", "{", "return", "getResponseHeaders", "(", "stringUrl", ",", "true", ")", ";", "}" ]
Get the response headers for URL @param stringUrl URL to use @return headers HTTP Headers @throws IOException I/O error happened
[ "Get", "the", "response", "headers", "for", "URL" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyHTTPUtils.java#L185-L187
knightliao/disconf
disconf-client/src/main/java/com/baidu/disconf/client/addons/properties/ReloadingPropertyPlaceholderConfigurer.java
ReloadingPropertyPlaceholderConfigurer.processProperties
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException { """ copy & paste, just so we can insert our own visitor. 启动时 进行配置的解析 """ BeanDefinitionVisitor visitor = new ReloadingPropertyPlaceholderConfigu...
java
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException { BeanDefinitionVisitor visitor = new ReloadingPropertyPlaceholderConfigurer.PlaceholderResolvingBeanDefinitionVisitor(props); String[] beanNames = ...
[ "protected", "void", "processProperties", "(", "ConfigurableListableBeanFactory", "beanFactoryToProcess", ",", "Properties", "props", ")", "throws", "BeansException", "{", "BeanDefinitionVisitor", "visitor", "=", "new", "ReloadingPropertyPlaceholderConfigurer", ".", "Placeholde...
copy & paste, just so we can insert our own visitor. 启动时 进行配置的解析
[ "copy", "&", "paste", "just", "so", "we", "can", "insert", "our", "own", "visitor", ".", "启动时", "进行配置的解析" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-client/src/main/java/com/baidu/disconf/client/addons/properties/ReloadingPropertyPlaceholderConfigurer.java#L367-L400
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.findJsonValueProcessor
public JsonValueProcessor findJsonValueProcessor( Class beanClass, Class propertyType, String key ) { """ Finds a JsonValueProcessor.<br> It will search the registered JsonValueProcessors in the following order: <ol> <li>beanClass, key</li> <li>beanClass, type</li> <li>key</li> <li>type</li> </ol> Returns ...
java
public JsonValueProcessor findJsonValueProcessor( Class beanClass, Class propertyType, String key ) { JsonValueProcessor jsonValueProcessor = null; jsonValueProcessor = (JsonValueProcessor) beanKeyMap.get( beanClass, key ); if( jsonValueProcessor != null ) { return jsonValueProcessor; }...
[ "public", "JsonValueProcessor", "findJsonValueProcessor", "(", "Class", "beanClass", ",", "Class", "propertyType", ",", "String", "key", ")", "{", "JsonValueProcessor", "jsonValueProcessor", "=", "null", ";", "jsonValueProcessor", "=", "(", "JsonValueProcessor", ")", ...
Finds a JsonValueProcessor.<br> It will search the registered JsonValueProcessors in the following order: <ol> <li>beanClass, key</li> <li>beanClass, type</li> <li>key</li> <li>type</li> </ol> Returns null if none is registered.<br> [Java -&gt; JSON] @param beanClass the class to which the property may belong @param p...
[ "Finds", "a", "JsonValueProcessor", ".", "<br", ">", "It", "will", "search", "the", "registered", "JsonValueProcessors", "in", "the", "following", "order", ":", "<ol", ">", "<li", ">", "beanClass", "key<", "/", "li", ">", "<li", ">", "beanClass", "type<", ...
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L359-L383
uber/AutoDispose
autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java
AutoDisposeEndConsumerHelper.setOnce
public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) { """ Atomically updates the target upstream AtomicReference from null to the non-null next Subscription, otherwise cancels next and reports a ProtocolViolationException if the AtomicReference doesn't co...
java
public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) { AutoDisposeUtil.checkNotNull(next, "next is null"); if (!upstream.compareAndSet(null, next)) { next.cancel(); if (upstream.get() != AutoSubscriptionHelper.CANCELLED) { reportDouble...
[ "public", "static", "boolean", "setOnce", "(", "AtomicReference", "<", "Subscription", ">", "upstream", ",", "Subscription", "next", ",", "Class", "<", "?", ">", "subscriber", ")", "{", "AutoDisposeUtil", ".", "checkNotNull", "(", "next", ",", "\"next is null\""...
Atomically updates the target upstream AtomicReference from null to the non-null next Subscription, otherwise cancels next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared cancelled indicator. @param upstream the target AtomicReference to update @param next the Subscription to...
[ "Atomically", "updates", "the", "target", "upstream", "AtomicReference", "from", "null", "to", "the", "non", "-", "null", "next", "Subscription", "otherwise", "cancels", "next", "and", "reports", "a", "ProtocolViolationException", "if", "the", "AtomicReference", "do...
train
https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java#L73-L83
brutusin/commons
src/main/java/org/brutusin/commons/utils/CryptoUtils.java
CryptoUtils.getHash
private static String getHash(String str, String algorithm) throws NoSuchAlgorithmException { """ Return the hezadecimal representation of the string digest given the specified algorithm. @param str @param algorithm @return @throws NoSuchAlgorithmException """ MessageDigest md = MessageDigest.g...
java
private static String getHash(String str, String algorithm) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance(algorithm); md.update(str.getBytes()); byte byteData[] = md.digest(); StringBuilder hexString = new StringBuilder(); for (int i = 0; i < b...
[ "private", "static", "String", "getHash", "(", "String", "str", ",", "String", "algorithm", ")", "throws", "NoSuchAlgorithmException", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "algorithm", ")", ";", "md", ".", "update", "(", "...
Return the hezadecimal representation of the string digest given the specified algorithm. @param str @param algorithm @return @throws NoSuchAlgorithmException
[ "Return", "the", "hezadecimal", "representation", "of", "the", "string", "digest", "given", "the", "specified", "algorithm", "." ]
train
https://github.com/brutusin/commons/blob/70685df2b2456d0bf1e6a4754d72c87bba4949df/src/main/java/org/brutusin/commons/utils/CryptoUtils.java#L67-L84
JDBDT/jdbdt
src/main/java/org/jdbdt/DBSetup.java
DBSetup.doDeleteAll
private static int doDeleteAll(CallInfo callInfo, Table table) { """ Perform a "delete-all" operation. @param callInfo Call info. @param table Table. @return Number of deleted rows. """ DB db = table.getDB(); return db.access(callInfo, () -> { String sql = DELETE_FROM_ + table.getName(); ...
java
private static int doDeleteAll(CallInfo callInfo, Table table) { DB db = table.getDB(); return db.access(callInfo, () -> { String sql = DELETE_FROM_ + table.getName(); db.logSetup(callInfo, sql); try (WrappedStatement ws = db.compile(sql)) { return ws.getStatement().executeUpdate(); ...
[ "private", "static", "int", "doDeleteAll", "(", "CallInfo", "callInfo", ",", "Table", "table", ")", "{", "DB", "db", "=", "table", ".", "getDB", "(", ")", ";", "return", "db", ".", "access", "(", "callInfo", ",", "(", ")", "->", "{", "String", "sql",...
Perform a "delete-all" operation. @param callInfo Call info. @param table Table. @return Number of deleted rows.
[ "Perform", "a", "delete", "-", "all", "operation", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/DBSetup.java#L304-L313
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getNextMidnight
public static long getNextMidnight(Time recycle, long theTime, String tz) { """ Finds and returns the next midnight after "theTime" in milliseconds UTC @param recycle - Time object to recycle, otherwise null. @param theTime - Time used for calculations (in UTC) @param tz The time zone to convert this tim...
java
public static long getNextMidnight(Time recycle, long theTime, String tz) { if (recycle == null) { recycle = new Time(); } recycle.timezone = tz; recycle.set(theTime); recycle.monthDay++; recycle.hour = 0; recycle.minute = 0; recycle.second = 0...
[ "public", "static", "long", "getNextMidnight", "(", "Time", "recycle", ",", "long", "theTime", ",", "String", "tz", ")", "{", "if", "(", "recycle", "==", "null", ")", "{", "recycle", "=", "new", "Time", "(", ")", ";", "}", "recycle", ".", "timezone", ...
Finds and returns the next midnight after "theTime" in milliseconds UTC @param recycle - Time object to recycle, otherwise null. @param theTime - Time used for calculations (in UTC) @param tz The time zone to convert this time to.
[ "Finds", "and", "returns", "the", "next", "midnight", "after", "theTime", "in", "milliseconds", "UTC" ]
train
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L488-L499
Impetus/Kundera
src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java
HibernateClient.instantiateEntity
private Object instantiateEntity(Class entityClass, Object entity) { """ Instantiate entity. @param entityClass the entity class @param entity the entity @return the object """ try { if (entity == null) { return entityClass.newInstance(); ...
java
private Object instantiateEntity(Class entityClass, Object entity) { try { if (entity == null) { return entityClass.newInstance(); } return entity; } catch (InstantiationException e) { log.error("Erro...
[ "private", "Object", "instantiateEntity", "(", "Class", "entityClass", ",", "Object", "entity", ")", "{", "try", "{", "if", "(", "entity", "==", "null", ")", "{", "return", "entityClass", ".", "newInstance", "(", ")", ";", "}", "return", "entity", ";", "...
Instantiate entity. @param entityClass the entity class @param entity the entity @return the object
[ "Instantiate", "entity", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java#L941-L960
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/face/AipFace.java
AipFace.getGroupUsers
public JSONObject getGroupUsers(String groupId, HashMap<String, String> options) { """ 获取用户列表接口 @param groupId - 用户组id(由数字、字母、下划线组成),长度限制128B @param options - 可选参数对象,key: value都为string类型 options - options列表: start 默认值0,起始序号 length 返回数量,默认值100,最大值1000 @return JSONObject """ AipRequest request = ...
java
public JSONObject getGroupUsers(String groupId, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("group_id", groupId); if (options != null) { request.addBody(options); } request.setUri(Fa...
[ "public", "JSONObject", "getGroupUsers", "(", "String", "groupId", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", ...
获取用户列表接口 @param groupId - 用户组id(由数字、字母、下划线组成),长度限制128B @param options - 可选参数对象,key: value都为string类型 options - options列表: start 默认值0,起始序号 length 返回数量,默认值100,最大值1000 @return JSONObject
[ "获取用户列表接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/face/AipFace.java#L251-L263
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.iterateCodePoints
public static void iterateCodePoints (@Nullable final String sInputString, @Nonnull final IntConsumer aConsumer) { """ Iterate all code points and pass them to the provided consumer. This implementation is approximately 20% quicker than <code>CharSequence.codePoints().forEachOrdered(c)</code> @param sInputStr...
java
public static void iterateCodePoints (@Nullable final String sInputString, @Nonnull final IntConsumer aConsumer) { ValueEnforcer.notNull (aConsumer, "Consumer"); if (sInputString != null) { final int nStringLength = sInputString.length (); int nOfs = 0; while (nOfs < nStringLength) ...
[ "public", "static", "void", "iterateCodePoints", "(", "@", "Nullable", "final", "String", "sInputString", ",", "@", "Nonnull", "final", "IntConsumer", "aConsumer", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aConsumer", ",", "\"Consumer\"", ")", ";", "if", ...
Iterate all code points and pass them to the provided consumer. This implementation is approximately 20% quicker than <code>CharSequence.codePoints().forEachOrdered(c)</code> @param sInputString Input String to use. May be <code>null</code> or empty. @param aConsumer The consumer to be used. May not be <code>null</cod...
[ "Iterate", "all", "code", "points", "and", "pass", "them", "to", "the", "provided", "consumer", ".", "This", "implementation", "is", "approximately", "20%", "quicker", "than", "<code", ">", "CharSequence", ".", "codePoints", "()", ".", "forEachOrdered", "(", "...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L5247-L5263
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ShortField.java
ShortField.doSetData
public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode) { """ Move this physical binary data to this field. @param data The physical data to move to this field (must be Short raw data class). @param bDisplayOption If true, display after setting the data. @param iMoveMode The type of move. @r...
java
public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode) { if ((vpData != null) && (!(vpData instanceof Short))) return DBConstants.ERROR_RETURN; return super.doSetData(vpData, bDisplayOption, iMoveMode); }
[ "public", "int", "doSetData", "(", "Object", "vpData", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "if", "(", "(", "vpData", "!=", "null", ")", "&&", "(", "!", "(", "vpData", "instanceof", "Short", ")", ")", ")", "return", "DBC...
Move this physical binary data to this field. @param data The physical data to move to this field (must be Short raw data class). @param bDisplayOption If true, display after setting the data. @param iMoveMode The type of move. @return an error code (0 if success).
[ "Move", "this", "physical", "binary", "data", "to", "this", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ShortField.java#L215-L220
borball/weixin-sdk
weixin-open/src/main/java/com/riversoft/weixin/open/oauth2/OpenOAuth2s.java
OpenOAuth2s.authenticationUrl
public String authenticationUrl(String redirect, String scope) { """ 生成授权链接 @param redirect 授权后重定向的回调链接地址,请使用urlencode对链接进行处理 @param scope 应用授权作用域,snsapi_base or snsapi_userinfo @return """ return authenticationUrl(redirect, scope, null); }
java
public String authenticationUrl(String redirect, String scope) { return authenticationUrl(redirect, scope, null); }
[ "public", "String", "authenticationUrl", "(", "String", "redirect", ",", "String", "scope", ")", "{", "return", "authenticationUrl", "(", "redirect", ",", "scope", ",", "null", ")", ";", "}" ]
生成授权链接 @param redirect 授权后重定向的回调链接地址,请使用urlencode对链接进行处理 @param scope 应用授权作用域,snsapi_base or snsapi_userinfo @return
[ "生成授权链接" ]
train
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-open/src/main/java/com/riversoft/weixin/open/oauth2/OpenOAuth2s.java#L53-L55
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.findFacesUrlInputAsync
public Observable<FoundFaces> findFacesUrlInputAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) { """ Returns the list of faces found. @param contentType The content type. @param imageUrl The image url. @param findFacesUrlInputOptionalPa...
java
public Observable<FoundFaces> findFacesUrlInputAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) { return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter).map(new Func1<ServiceResponse<Fou...
[ "public", "Observable", "<", "FoundFaces", ">", "findFacesUrlInputAsync", "(", "String", "contentType", ",", "BodyModelModel", "imageUrl", ",", "FindFacesUrlInputOptionalParameter", "findFacesUrlInputOptionalParameter", ")", "{", "return", "findFacesUrlInputWithServiceResponseAsy...
Returns the list of faces found. @param contentType The content type. @param imageUrl The image url. @param findFacesUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observab...
[ "Returns", "the", "list", "of", "faces", "found", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L902-L909
googleapis/google-api-java-client
google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java
AbstractGoogleClientRequest.checkRequiredParameter
protected final void checkRequiredParameter(Object value, String name) { """ Ensures that the specified required parameter is not null or {@link AbstractGoogleClient#getSuppressRequiredParameterChecks()} is true. @param value the value of the required parameter @param name the name of the required parameter ...
java
protected final void checkRequiredParameter(Object value, String name) { Preconditions.checkArgument( abstractGoogleClient.getSuppressRequiredParameterChecks() || value != null, "Required parameter %s must be specified", name); }
[ "protected", "final", "void", "checkRequiredParameter", "(", "Object", "value", ",", "String", "name", ")", "{", "Preconditions", ".", "checkArgument", "(", "abstractGoogleClient", ".", "getSuppressRequiredParameterChecks", "(", ")", "||", "value", "!=", "null", ","...
Ensures that the specified required parameter is not null or {@link AbstractGoogleClient#getSuppressRequiredParameterChecks()} is true. @param value the value of the required parameter @param name the name of the required parameter @throws IllegalArgumentException if the specified required parameter is null and {@link...
[ "Ensures", "that", "the", "specified", "required", "parameter", "is", "not", "null", "or", "{", "@link", "AbstractGoogleClient#getSuppressRequiredParameterChecks", "()", "}", "is", "true", "." ]
train
https://github.com/googleapis/google-api-java-client/blob/88decfd14fc40cae6eb6729a45c7d56a1132e450/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java#L701-L705
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/CompareFixture.java
CompareFixture.differenceBetweenAnd
public String differenceBetweenAnd(String first, String second) { """ Determines difference between two strings. @param first first string to compare. @param second second string to compare. @return HTML of difference between the two. """ Formatter whitespaceFormatter = new Formatter() { ...
java
public String differenceBetweenAnd(String first, String second) { Formatter whitespaceFormatter = new Formatter() { @Override public String format(String value) { return ensureWhitespaceVisible(value); } }; return getDifferencesHtml(first, seco...
[ "public", "String", "differenceBetweenAnd", "(", "String", "first", ",", "String", "second", ")", "{", "Formatter", "whitespaceFormatter", "=", "new", "Formatter", "(", ")", "{", "@", "Override", "public", "String", "format", "(", "String", "value", ")", "{", ...
Determines difference between two strings. @param first first string to compare. @param second second string to compare. @return HTML of difference between the two.
[ "Determines", "difference", "between", "two", "strings", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/CompareFixture.java#L21-L29
upwork/java-upwork
src/com/Upwork/api/Routers/Hr/Contracts.java
Contracts.suspendContract
public JSONObject suspendContract(String reference, HashMap<String, String> params) throws JSONException { """ Suspend Contract @param reference Contract reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.put("/hr/v2/con...
java
public JSONObject suspendContract(String reference, HashMap<String, String> params) throws JSONException { return oClient.put("/hr/v2/contracts/" + reference + "/suspend", params); }
[ "public", "JSONObject", "suspendContract", "(", "String", "reference", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "put", "(", "\"/hr/v2/contracts/\"", "+", "reference", "+", "\"/sus...
Suspend Contract @param reference Contract reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Suspend", "Contract" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Hr/Contracts.java#L54-L56
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java
TrmMessageFactoryImpl.createInboundTrmMessage
final TrmMessage createInboundTrmMessage(JsMsgObject jmo, int messageType) { """ Create an instance of the appropriate sub-class, e.g. TrmRouteData if the inbound message is actually a TRM RouteData Message, for the given JMO. A TRM Message of unknown type will be returned as a TrmMessage. @return TrmMessage ...
java
final TrmMessage createInboundTrmMessage(JsMsgObject jmo, int messageType) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())SibTr.entry(tc, "createInboundTrmMessage " + messageType ); TrmMessage trmMessage = null; /* Create an instance of the appropriate message subclass ...
[ "final", "TrmMessage", "createInboundTrmMessage", "(", "JsMsgObject", "jmo", ",", "int", "messageType", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", ...
Create an instance of the appropriate sub-class, e.g. TrmRouteData if the inbound message is actually a TRM RouteData Message, for the given JMO. A TRM Message of unknown type will be returned as a TrmMessage. @return TrmMessage A TrmMessage of the appropriate subtype
[ "Create", "an", "instance", "of", "the", "appropriate", "sub", "-", "class", "e", ".", "g", ".", "TrmRouteData", "if", "the", "inbound", "message", "is", "actually", "a", "TRM", "RouteData", "Message", "for", "the", "given", "JMO", ".", "A", "TRM", "Mess...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java#L386-L405
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/transform/ChainedTransformationTools.java
ChainedTransformationTools.nextInChainOperation
public static ResourceTransformationContext nextInChainOperation(ResourceTransformationContext context, PlaceholderResolver placeholderResolver) { """ Call when transforming a new model version delta for an operation. This will copy the {@link ResourceTransformationContext} instance, using the extra resolver to r...
java
public static ResourceTransformationContext nextInChainOperation(ResourceTransformationContext context, PlaceholderResolver placeholderResolver) { assert context instanceof ResourceTransformationContextImpl : "Wrong type of context"; ResourceTransformationContextImpl ctx = (ResourceTransformationContext...
[ "public", "static", "ResourceTransformationContext", "nextInChainOperation", "(", "ResourceTransformationContext", "context", ",", "PlaceholderResolver", "placeholderResolver", ")", "{", "assert", "context", "instanceof", "ResourceTransformationContextImpl", ":", "\"Wrong type of c...
Call when transforming a new model version delta for an operation. This will copy the {@link ResourceTransformationContext} instance, using the extra resolver to resolve the children of the placeholder resource. @param context the context to copy. It should be at a chained placeholder @param placeholderResolver the ex...
[ "Call", "when", "transforming", "a", "new", "model", "version", "delta", "for", "an", "operation", ".", "This", "will", "copy", "the", "{", "@link", "ResourceTransformationContext", "}", "instance", "using", "the", "extra", "resolver", "to", "resolve", "the", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/ChainedTransformationTools.java#L75-L81
voldemort/voldemort
src/java/voldemort/utils/ByteUtils.java
ByteUtils.readBytes
public static long readBytes(byte[] bytes, int offset, int numBytes) { """ Read the given number of bytes into a long @param bytes The byte array to read from @param offset The offset at which to begin reading @param numBytes The number of bytes to read @return The long value read """ int shift =...
java
public static long readBytes(byte[] bytes, int offset, int numBytes) { int shift = 0; long value = 0; for(int i = offset + numBytes - 1; i >= offset; i--) { value |= (bytes[i] & 0xFFL) << shift; shift += 8; } return value; }
[ "public", "static", "long", "readBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "numBytes", ")", "{", "int", "shift", "=", "0", ";", "long", "value", "=", "0", ";", "for", "(", "int", "i", "=", "offset", "+", "numBytes", ...
Read the given number of bytes into a long @param bytes The byte array to read from @param offset The offset at which to begin reading @param numBytes The number of bytes to read @return The long value read
[ "Read", "the", "given", "number", "of", "bytes", "into", "a", "long" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/ByteUtils.java#L221-L229
landawn/AbacusUtil
src/com/landawn/abacus/util/ByteList.java
ByteList.anyMatch
public <E extends Exception> boolean anyMatch(Try.BytePredicate<E> filter) throws E { """ Returns whether any elements of this List match the provided predicate. @param filter @return """ return anyMatch(0, size(), filter); }
java
public <E extends Exception> boolean anyMatch(Try.BytePredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "anyMatch", "(", "Try", ".", "BytePredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "anyMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether any elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "any", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/ByteList.java#L947-L949
seedstack/seed
core/src/main/java/org/seedstack/seed/core/internal/crypto/SSLLoader.java
SSLLoader.getSSLContext
SSLContext getSSLContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) { """ Gets an SSLContext configured and initialized. <p>If no keyStore is configured, a default keyStore will be generated. <b>The generated keyStore is not intended to be used in production !</b> It won't work o...
java
SSLContext getSSLContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) { try { SSLContext sslContext = SSLContext.getInstance(protocol); sslContext.init(keyManagers, trustManagers, null); return sslContext; } catch (NoSuchAlgorithmException...
[ "SSLContext", "getSSLContext", "(", "String", "protocol", ",", "KeyManager", "[", "]", "keyManagers", ",", "TrustManager", "[", "]", "trustManagers", ")", "{", "try", "{", "SSLContext", "sslContext", "=", "SSLContext", ".", "getInstance", "(", "protocol", ")", ...
Gets an SSLContext configured and initialized. <p>If no keyStore is configured, a default keyStore will be generated. <b>The generated keyStore is not intended to be used in production !</b> It won't work on JRE which don't include sun.* packages like the IBM JRE. </p> @return SSLContext
[ "Gets", "an", "SSLContext", "configured", "and", "initialized", "." ]
train
https://github.com/seedstack/seed/blob/d9cf33bfb2fffcdbb0976f4726e943acda90e828/core/src/main/java/org/seedstack/seed/core/internal/crypto/SSLLoader.java#L79-L90
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/SerializationUtils.java
SerializationUtils.deserializeObject
public static <T extends Serializable> T deserializeObject( byte[] bytes, Class<T> clazz ) throws IOException, ClassNotFoundException { """ Deserializes an object. @param bytes a non-null array of bytes @param clazz the class of the expected object @return the deserialized object, or null if it failed @throws...
java
public static <T extends Serializable> T deserializeObject( byte[] bytes, Class<T> clazz ) throws IOException, ClassNotFoundException { ByteArrayInputStream is = new ByteArrayInputStream( bytes ); ObjectInputStream deserializer = new ObjectInputStream( is ); return clazz.cast( deserializer.readObject()); }
[ "public", "static", "<", "T", "extends", "Serializable", ">", "T", "deserializeObject", "(", "byte", "[", "]", "bytes", ",", "Class", "<", "T", ">", "clazz", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "ByteArrayInputStream", "is", "=", ...
Deserializes an object. @param bytes a non-null array of bytes @param clazz the class of the expected object @return the deserialized object, or null if it failed @throws IOException @throws ClassNotFoundException
[ "Deserializes", "an", "object", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/SerializationUtils.java#L74-L80
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.getValue
public static double getValue( GridCoverage2D raster, int col, int row ) { """ Simple method to get a value from a single band raster. <p>Note that this method does always return a value. If invalid, a novalue is returned.</p> @param raster the single band raster. @param col the column. @param row the row....
java
public static double getValue( GridCoverage2D raster, int col, int row ) { double[] values = null; try { values = raster.evaluate(new GridCoordinates2D(col, row), (double[]) null); } catch (Exception e) { return doubleNovalue; } return values[0]; }
[ "public", "static", "double", "getValue", "(", "GridCoverage2D", "raster", ",", "int", "col", ",", "int", "row", ")", "{", "double", "[", "]", "values", "=", "null", ";", "try", "{", "values", "=", "raster", ".", "evaluate", "(", "new", "GridCoordinates2...
Simple method to get a value from a single band raster. <p>Note that this method does always return a value. If invalid, a novalue is returned.</p> @param raster the single band raster. @param col the column. @param row the row. @return the value in the [col, row] of the first band.
[ "Simple", "method", "to", "get", "a", "value", "from", "a", "single", "band", "raster", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L1516-L1524
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java
JsonUtils.fromURL
public static Object fromURL(java.net.URL url, CloseableHttpClient httpClient) throws JsonParseException, IOException { """ Parses a JSON-LD document, from the contents of the JSON resource resolved from the JsonLdUrl, to an object that can be used as input for the {@link JsonLdApi} and {@link JsonLd...
java
public static Object fromURL(java.net.URL url, CloseableHttpClient httpClient) throws JsonParseException, IOException { final String protocol = url.getProtocol(); // We can only use the Apache HTTPClient for HTTP/HTTPS, so use the // native java client for the others Closeabl...
[ "public", "static", "Object", "fromURL", "(", "java", ".", "net", ".", "URL", "url", ",", "CloseableHttpClient", "httpClient", ")", "throws", "JsonParseException", ",", "IOException", "{", "final", "String", "protocol", "=", "url", ".", "getProtocol", "(", ")"...
Parses a JSON-LD document, from the contents of the JSON resource resolved from the JsonLdUrl, to an object that can be used as input for the {@link JsonLdApi} and {@link JsonLdProcessor} methods. @param url The JsonLdUrl to resolve @param httpClient The {@link CloseableHttpClient} to use to resolve the URL. @return A...
[ "Parses", "a", "JSON", "-", "LD", "document", "from", "the", "contents", "of", "the", "JSON", "resource", "resolved", "from", "the", "JsonLdUrl", "to", "an", "object", "that", "can", "be", "used", "as", "input", "for", "the", "{", "@link", "JsonLdApi", "...
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java#L333-L372
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java
WorkbooksInner.createOrUpdate
public WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { """ Create a new workbook. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param workbookProperties Prop...
java
public WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).toBlocking().single().body(); }
[ "public", "WorkbookInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "WorkbookInner", "workbookProperties", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ",", "wor...
Create a new workbook. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param workbookProperties Properties that need to be specified to create a new workbook. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Create", "a", "new", "workbook", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java#L456-L458
wcm-io/wcm-io-wcm
parsys/src/main/java/io/wcm/wcm/parsys/componentinfo/impl/AllowedComponentsProviderImpl.java
AllowedComponentsProviderImpl.getAllowedComponents
@Override public @NotNull Set<String> getAllowedComponents(@NotNull String resourcePath, @NotNull ResourceResolver resolver) { """ Get allowed components for given resource path @param resourcePath Resource path inside content page @return Set of component paths (absolute resource types) """ PageManage...
java
@Override public @NotNull Set<String> getAllowedComponents(@NotNull String resourcePath, @NotNull ResourceResolver resolver) { PageManager pageManager = AdaptTo.notNull(resolver, PageManager.class); Page page = pageManager.getContainingPage(resourcePath); if (page == null && StringUtils.contains(resourceP...
[ "@", "Override", "public", "@", "NotNull", "Set", "<", "String", ">", "getAllowedComponents", "(", "@", "NotNull", "String", "resourcePath", ",", "@", "NotNull", "ResourceResolver", "resolver", ")", "{", "PageManager", "pageManager", "=", "AdaptTo", ".", "notNul...
Get allowed components for given resource path @param resourcePath Resource path inside content page @return Set of component paths (absolute resource types)
[ "Get", "allowed", "components", "for", "given", "resource", "path" ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/parsys/src/main/java/io/wcm/wcm/parsys/componentinfo/impl/AllowedComponentsProviderImpl.java#L59-L72
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java
MessageMgr.createInfoMessage
public static Message5WH createInfoMessage(String what, Object ... obj) { """ Creates a new information message. @param what the what part of the message (what has happened) @param obj objects to add to the message @return new information message """ return new Message5WH_Builder().addWhat(FormattingTuple...
java
public static Message5WH createInfoMessage(String what, Object ... obj){ return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.INFO).build(); }
[ "public", "static", "Message5WH", "createInfoMessage", "(", "String", "what", ",", "Object", "...", "obj", ")", "{", "return", "new", "Message5WH_Builder", "(", ")", ".", "addWhat", "(", "FormattingTupleWrapper", ".", "create", "(", "what", ",", "obj", ")", ...
Creates a new information message. @param what the what part of the message (what has happened) @param obj objects to add to the message @return new information message
[ "Creates", "a", "new", "information", "message", "." ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L102-L104
sarxos/v4l4j
src/main/java/au/edu/jcu/v4l4j/ImageFormatList.java
ImageFormatList.moveToFirst
private void moveToFirst(List<ImageFormat> v, int format) { """ This method moves the given image format <code>format</code> in the first position of the vector. @param v the vector if image format @param format the index of the format to be moved in first position """ for(ImageFormat i : v) if(i.getIn...
java
private void moveToFirst(List<ImageFormat> v, int format){ for(ImageFormat i : v) if(i.getIndex()==format){ v.remove(i); v.add(0, i); break; } }
[ "private", "void", "moveToFirst", "(", "List", "<", "ImageFormat", ">", "v", ",", "int", "format", ")", "{", "for", "(", "ImageFormat", "i", ":", "v", ")", "if", "(", "i", ".", "getIndex", "(", ")", "==", "format", ")", "{", "v", ".", "remove", "...
This method moves the given image format <code>format</code> in the first position of the vector. @param v the vector if image format @param format the index of the format to be moved in first position
[ "This", "method", "moves", "the", "given", "image", "format", "<code", ">", "format<", "/", "code", ">", "in", "the", "first", "position", "of", "the", "vector", "." ]
train
https://github.com/sarxos/v4l4j/blob/4fc0eec2c3a1a4260593f6ac03b7a8013e3804c9/src/main/java/au/edu/jcu/v4l4j/ImageFormatList.java#L177-L184
VoltDB/voltdb
src/frontend/org/voltdb/messaging/FastDeserializer.java
FastDeserializer.readString
public static String readString(ByteBuffer buffer) throws IOException { """ Read a string in the standard VoltDB way without wrapping the byte buffer[ """ final int NULL_STRING_INDICATOR = -1; final int len = buffer.getInt(); // check for null string if (len == NULL_STRING_IN...
java
public static String readString(ByteBuffer buffer) throws IOException { final int NULL_STRING_INDICATOR = -1; final int len = buffer.getInt(); // check for null string if (len == NULL_STRING_INDICATOR) return null; assert len >= 0; if (len > VoltType.MAX_VA...
[ "public", "static", "String", "readString", "(", "ByteBuffer", "buffer", ")", "throws", "IOException", "{", "final", "int", "NULL_STRING_INDICATOR", "=", "-", "1", ";", "final", "int", "len", "=", "buffer", ".", "getInt", "(", ")", ";", "// check for null stri...
Read a string in the standard VoltDB way without wrapping the byte buffer[
[ "Read", "a", "string", "in", "the", "standard", "VoltDB", "way", "without", "wrapping", "the", "byte", "buffer", "[" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L144-L172
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingFileAppender.java
RollingFileAppender.createFileOutputStream
private FileOutputStream createFileOutputStream(String newFileName, boolean append) throws FileNotFoundException { """ Creates a new FileOutputStream of a new log file, possibly creating first all the needed parent directories @param newFileName Filename of new log file to be created @param append ...
java
private FileOutputStream createFileOutputStream(String newFileName, boolean append) throws FileNotFoundException { try { // // attempt to create file // return new FileOutputStream(newFileName, append); } catch (FileNotFoundException ex) { ...
[ "private", "FileOutputStream", "createFileOutputStream", "(", "String", "newFileName", ",", "boolean", "append", ")", "throws", "FileNotFoundException", "{", "try", "{", "//", "// attempt to create file", "//", "return", "new", "FileOutputStream", "(", "newFileName", ...
Creates a new FileOutputStream of a new log file, possibly creating first all the needed parent directories @param newFileName Filename of new log file to be created @param append If file should be appended @return newly created FileOutputStream @throws FileNotFoundException if creating log file or parent directo...
[ "Creates", "a", "new", "FileOutputStream", "of", "a", "new", "log", "file", "possibly", "creating", "first", "all", "the", "needed", "parent", "directories" ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingFileAppender.java#L350-L375
datumbox/datumbox-framework
datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/AssociativeArray.java
AssociativeArray.put
public final Object put(Object key, Object value) { """ Adds a particular key-value into the internal map. It returns the previous value which was associated with that key. @param key @param value @return """ return internalData.put(key, value); }
java
public final Object put(Object key, Object value) { return internalData.put(key, value); }
[ "public", "final", "Object", "put", "(", "Object", "key", ",", "Object", "value", ")", "{", "return", "internalData", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Adds a particular key-value into the internal map. It returns the previous value which was associated with that key. @param key @param value @return
[ "Adds", "a", "particular", "key", "-", "value", "into", "the", "internal", "map", ".", "It", "returns", "the", "previous", "value", "which", "was", "associated", "with", "that", "key", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/AssociativeArray.java#L182-L184
jblas-project/jblas
src/main/java/org/jblas/Singular.java
Singular.SVDValues
public static DoubleMatrix SVDValues(ComplexDoubleMatrix A) { """ Compute the singular values of a complex matrix. @param A ComplexDoubleMatrix of dimension m * n @return A real-valued (!) min(m, n) vector of singular values. """ int m = A.rows; int n = A.columns; DoubleMatrix S = n...
java
public static DoubleMatrix SVDValues(ComplexDoubleMatrix A) { int m = A.rows; int n = A.columns; DoubleMatrix S = new DoubleMatrix(min(m, n)); double[] rwork = new double[5*min(m,n)]; int info = NativeBlas.zgesvd('N', 'N', m, n, A.dup().data, 0, m, S.data, 0, null, 0, 1, null, 0...
[ "public", "static", "DoubleMatrix", "SVDValues", "(", "ComplexDoubleMatrix", "A", ")", "{", "int", "m", "=", "A", ".", "rows", ";", "int", "n", "=", "A", ".", "columns", ";", "DoubleMatrix", "S", "=", "new", "DoubleMatrix", "(", "min", "(", "m", ",", ...
Compute the singular values of a complex matrix. @param A ComplexDoubleMatrix of dimension m * n @return A real-valued (!) min(m, n) vector of singular values.
[ "Compute", "the", "singular", "values", "of", "a", "complex", "matrix", "." ]
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/Singular.java#L140-L153
apereo/cas
api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataUnitParser.java
ConfigurationMetadataUnitParser.parseCompilationUnit
@SneakyThrows public void parseCompilationUnit(final Set<ConfigurationMetadataProperty> collectedProps, final Set<ConfigurationMetadataProperty> collectedGroups, final ConfigurationMetadataProperty p, fina...
java
@SneakyThrows public void parseCompilationUnit(final Set<ConfigurationMetadataProperty> collectedProps, final Set<ConfigurationMetadataProperty> collectedGroups, final ConfigurationMetadataProperty p, fina...
[ "@", "SneakyThrows", "public", "void", "parseCompilationUnit", "(", "final", "Set", "<", "ConfigurationMetadataProperty", ">", "collectedProps", ",", "final", "Set", "<", "ConfigurationMetadataProperty", ">", "collectedGroups", ",", "final", "ConfigurationMetadataProperty",...
Parse compilation unit. @param collectedProps the collected props @param collectedGroups the collected groups @param p the p @param typePath the type path @param typeName the type name @param indexNameWithBrackets the index name with brackets
[ "Parse", "compilation", "unit", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataUnitParser.java#L36-L60
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
MolecularFormulaManipulator.multipleExtractor
private static String multipleExtractor(String formula) { """ The starting with numeric value is used to show a quantity by which a formula is multiplied. For example: 2H2O really means that a H4O2 unit. @param formula Formula to correct @return Formula with the correction """ String recent...
java
private static String multipleExtractor(String formula) { String recentCompoundCount = "0"; String recentCompound = ""; boolean found = false; for (int f = 0; f < formula.length(); f++) { char thisChar = formula.charAt(f); if (thisChar >= '0' && thisChar <= '9') ...
[ "private", "static", "String", "multipleExtractor", "(", "String", "formula", ")", "{", "String", "recentCompoundCount", "=", "\"0\"", ";", "String", "recentCompound", "=", "\"\"", ";", "boolean", "found", "=", "false", ";", "for", "(", "int", "f", "=", "0",...
The starting with numeric value is used to show a quantity by which a formula is multiplied. For example: 2H2O really means that a H4O2 unit. @param formula Formula to correct @return Formula with the correction
[ "The", "starting", "with", "numeric", "value", "is", "used", "to", "show", "a", "quantity", "by", "which", "a", "formula", "is", "multiplied", ".", "For", "example", ":", "2H2O", "really", "means", "that", "a", "H4O2", "unit", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L1403-L1422
strator-dev/greenpepper-open
extensions-external/selenium/src/main/java/com/greenpepper/extensions/selenium/SeleniumRemoteControlFixture.java
SeleniumRemoteControlFixture.startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt
public boolean startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt(String browserName, String serverHost, int serverPort, String browserUrl) { """ <p>startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt.</p> @param browserName a {@link java.lang.String} object. @param serverHost a {@link java.lang.String} objec...
java
public boolean startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt(String browserName, String serverHost, int serverPort, String browserUrl) { selenium = new DefaultSelenium(serverHost, serverPort, "*" + browserName, browserUrl); selenium.start(); return true; }
[ "public", "boolean", "startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt", "(", "String", "browserName", ",", "String", "serverHost", ",", "int", "serverPort", ",", "String", "browserUrl", ")", "{", "selenium", "=", "new", "DefaultSelenium", "(", "serverHost", ",", "...
<p>startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt.</p> @param browserName a {@link java.lang.String} object. @param serverHost a {@link java.lang.String} object. @param serverPort a int. @param browserUrl a {@link java.lang.String} object. @return a boolean.
[ "<p", ">", "startBrowserWithSeleniumConsoleOnAtPortAndScriptsAt", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/extensions-external/selenium/src/main/java/com/greenpepper/extensions/selenium/SeleniumRemoteControlFixture.java#L60-L65
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.restoreResource
public void restoreResource(CmsRequestContext context, CmsResource resource, int version) throws CmsException, CmsSecurityException { """ Restores a resource in the current project with the given version from the historical archive.<p> @param context the current request context @param resource the resource...
java
public void restoreResource(CmsRequestContext context, CmsResource resource, int version) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkPermissions(dbc, resource, CmsPermissionSet...
[ "public", "void", "restoreResource", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ",", "int", "version", ")", "throws", "CmsException", ",", "CmsSecurityException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "("...
Restores a resource in the current project with the given version from the historical archive.<p> @param context the current request context @param resource the resource to restore from the archive @param version the version number to restore @throws CmsException if something goes wrong @throws CmsSecurityException i...
[ "Restores", "a", "resource", "in", "the", "current", "project", "with", "the", "given", "version", "from", "the", "historical", "archive", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L5840-L5859
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.update_bulk_request
protected static base_responses update_bulk_request(nitro_service service,base_resource resources[]) throws Exception { """ Use this method to perform an update operation on netscaler resources. @param service nitro_service object. @param resources Array of nitro resources to be updated. @param option options ...
java
protected static base_responses update_bulk_request(nitro_service service,base_resource resources[]) throws Exception { if (!service.isLogin()) service.login(); String id = service.get_sessionid(); Boolean warning = service.get_warning(); String onerror = service.get_onerror(); String request = service.g...
[ "protected", "static", "base_responses", "update_bulk_request", "(", "nitro_service", "service", ",", "base_resource", "resources", "[", "]", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(...
Use this method to perform an update operation on netscaler resources. @param service nitro_service object. @param resources Array of nitro resources to be updated. @param option options class object @return status of the operation performed. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "an", "update", "operation", "on", "netscaler", "resources", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L496-L507
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java
ToggleComment.getFirstCompleteLineOfRegion
private int getFirstCompleteLineOfRegion(IRegion region, IDocument document) { """ Returns the index of the first line whose start offset is in the given text range. @param region the text range in characters where to find the line @param document The document @return the first line whose start index is in th...
java
private int getFirstCompleteLineOfRegion(IRegion region, IDocument document) { try { int startLine= document.getLineOfOffset(region.getOffset()); int offset= document.getLineOffset(startLine); if (offset >= region.getOffset()) return startLine; offset= document.getLineOffset(startLine + 1); ret...
[ "private", "int", "getFirstCompleteLineOfRegion", "(", "IRegion", "region", ",", "IDocument", "document", ")", "{", "try", "{", "int", "startLine", "=", "document", ".", "getLineOfOffset", "(", "region", ".", "getOffset", "(", ")", ")", ";", "int", "offset", ...
Returns the index of the first line whose start offset is in the given text range. @param region the text range in characters where to find the line @param document The document @return the first line whose start index is in the given range, -1 if there is no such line
[ "Returns", "the", "index", "of", "the", "first", "line", "whose", "start", "offset", "is", "in", "the", "given", "text", "range", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java#L221-L240
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.listGlobalByResourceGroupForTopicType
public List<EventSubscriptionInner> listGlobalByResourceGroupForTopicType(String resourceGroupName, String topicTypeName) { """ List all global event subscriptions under a resource group for a topic type. List all global event subscriptions under a resource group for a specific topic type. @param resourceGroup...
java
public List<EventSubscriptionInner> listGlobalByResourceGroupForTopicType(String resourceGroupName, String topicTypeName) { return listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, topicTypeName).toBlocking().single().body(); }
[ "public", "List", "<", "EventSubscriptionInner", ">", "listGlobalByResourceGroupForTopicType", "(", "String", "resourceGroupName", ",", "String", "topicTypeName", ")", "{", "return", "listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
List all global event subscriptions under a resource group for a topic type. List all global event subscriptions under a resource group for a specific topic type. @param resourceGroupName The name of the resource group within the user's subscription. @param topicTypeName Name of the topic type @throws IllegalArgumentE...
[ "List", "all", "global", "event", "subscriptions", "under", "a", "resource", "group", "for", "a", "topic", "type", ".", "List", "all", "global", "event", "subscriptions", "under", "a", "resource", "group", "for", "a", "specific", "topic", "type", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L1089-L1091
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.replaceFirst
public static String replaceFirst(final CharSequence self, final CharSequence regex, final @ClosureParams(value=FromString.class, options= { """ Replaces the first occurrence of a captured group by the result of a closure call on that text. <p> For example (with some replaceAll variants thrown in for comparison ...
java
public static String replaceFirst(final CharSequence self, final CharSequence regex, final @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) { return replaceFirst(self, Pattern.compile(regex.toString()), closure); }
[ "public", "static", "String", "replaceFirst", "(", "final", "CharSequence", "self", ",", "final", "CharSequence", "regex", ",", "final", "@", "ClosureParams", "(", "value", "=", "FromString", ".", "class", ",", "options", "=", "{", "\"List<String>\"", ",", "\"...
Replaces the first occurrence of a captured group by the result of a closure call on that text. <p> For example (with some replaceAll variants thrown in for comparison purposes), <pre> assert "hellO world" == "hello world".replaceFirst("(o)") { it[0].toUpperCase() } // first match assert "hellO wOrld" == "hello world"....
[ "Replaces", "the", "first", "occurrence", "of", "a", "captured", "group", "by", "the", "result", "of", "a", "closure", "call", "on", "that", "text", ".", "<p", ">", "For", "example", "(", "with", "some", "replaceAll", "variants", "thrown", "in", "for", "...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L2653-L2655
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTServlet.java
RESTServlet.validateAndExecuteRequest
private RESTResponse validateAndExecuteRequest(HttpServletRequest request) { """ Execute the given request and return a RESTResponse or throw an appropriate error. """ Map<String, String> variableMap = new HashMap<String, String>(); String query = extractQueryParam(request, variableMap); ...
java
private RESTResponse validateAndExecuteRequest(HttpServletRequest request) { Map<String, String> variableMap = new HashMap<String, String>(); String query = extractQueryParam(request, variableMap); Tenant tenant = getTenant(variableMap); // Command matching expects an encoded URI b...
[ "private", "RESTResponse", "validateAndExecuteRequest", "(", "HttpServletRequest", "request", ")", "{", "Map", "<", "String", ",", "String", ">", "variableMap", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "String", "query", "=", ...
Execute the given request and return a RESTResponse or throw an appropriate error.
[ "Execute", "the", "given", "request", "and", "return", "a", "RESTResponse", "or", "throw", "an", "appropriate", "error", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTServlet.java#L170-L197
kiegroup/drools
drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/Providers.java
Providers.resourceProvider
public static Provider resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding) throws IOException { """ Provide a Provider from the resource found in class loader with the provided encoding.<br/> As resource is accessed through a class loader, a leading "/" is not allowed in pathToResou...
java
public static Provider resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding) throws IOException { InputStream resourceAsStream = classLoader.getResourceAsStream(pathToResource); if (resourceAsStream == null) { throw new IOException("Cannot find " + pathToResource...
[ "public", "static", "Provider", "resourceProvider", "(", "ClassLoader", "classLoader", ",", "String", "pathToResource", ",", "Charset", "encoding", ")", "throws", "IOException", "{", "InputStream", "resourceAsStream", "=", "classLoader", ".", "getResourceAsStream", "(",...
Provide a Provider from the resource found in class loader with the provided encoding.<br/> As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource
[ "Provide", "a", "Provider", "from", "the", "resource", "found", "in", "class", "loader", "with", "the", "provided", "encoding", ".", "<br", "/", ">", "As", "resource", "is", "accessed", "through", "a", "class", "loader", "a", "leading", "/", "is", "not", ...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/Providers.java#L94-L100
alibaba/jstorm
jstorm-hdfs/src/main/java/com/alibaba/jstorm/hdfs/spout/FileLock.java
FileLock.getLastEntryIfStale
public static LogEntry getLastEntryIfStale(FileSystem fs, Path lockFile, long olderThan) throws IOException { """ checks if lockFile is older than 'olderThan' UTC time by examining the modification time on file and (if necessary) the timestamp in last log entry in the file. If its stale, then returns t...
java
public static LogEntry getLastEntryIfStale(FileSystem fs, Path lockFile, long olderThan) throws IOException { long modifiedTime = fs.getFileStatus(lockFile).getModificationTime(); if( modifiedTime <= olderThan ) { // look //Impt: HDFS timestamp may not reflect recent appends, so we double check ...
[ "public", "static", "LogEntry", "getLastEntryIfStale", "(", "FileSystem", "fs", ",", "Path", "lockFile", ",", "long", "olderThan", ")", "throws", "IOException", "{", "long", "modifiedTime", "=", "fs", ".", "getFileStatus", "(", "lockFile", ")", ".", "getModifica...
checks if lockFile is older than 'olderThan' UTC time by examining the modification time on file and (if necessary) the timestamp in last log entry in the file. If its stale, then returns the last log entry, else returns null. @param fs @param lockFile @param olderThan time (millis) in UTC. @return the last entry in t...
[ "checks", "if", "lockFile", "is", "older", "than", "olderThan", "UTC", "time", "by", "examining", "the", "modification", "time", "on", "file", "and", "(", "if", "necessary", ")", "the", "timestamp", "in", "last", "log", "entry", "in", "the", "file", ".", ...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-hdfs/src/main/java/com/alibaba/jstorm/hdfs/spout/FileLock.java#L142-L162
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java
InMemoryLookupCache.incrementWordCount
@Override public synchronized void incrementWordCount(String word, int increment) { """ Increment the count for the given word by the amount increment @param word the word to increment the count for @param increment the amount to increment by """ if (word == null || word.isEmpty()) ...
java
@Override public synchronized void incrementWordCount(String word, int increment) { if (word == null || word.isEmpty()) throw new IllegalArgumentException("Word can't be empty or null"); wordFrequencies.incrementCount(word, increment); if (hasToken(word)) { VocabWord...
[ "@", "Override", "public", "synchronized", "void", "incrementWordCount", "(", "String", "word", ",", "int", "increment", ")", "{", "if", "(", "word", "==", "null", "||", "word", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", ...
Increment the count for the given word by the amount increment @param word the word to increment the count for @param increment the amount to increment by
[ "Increment", "the", "count", "for", "the", "given", "word", "by", "the", "amount", "increment" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java#L120-L131
darcy-framework/synq
src/main/java/com/redhat/synq/MultiEvent.java
MultiEvent.throwMultiEventException
private void throwMultiEventException(Event<?> eventThatThrewException) { """ Unwraps cause of throwable if the throwable is, itself, a MultiEventException. This eliminates much excessive noise that is purely implementation detail of MultiEvents from the stack trace. """ while(throwable instanceof Mu...
java
private void throwMultiEventException(Event<?> eventThatThrewException) { while(throwable instanceof MultiEventException && throwable.getCause() != null) { eventThatThrewException = ((MultiEventException) throwable).getEvent(); throwable = throwable.getCause(); } throw n...
[ "private", "void", "throwMultiEventException", "(", "Event", "<", "?", ">", "eventThatThrewException", ")", "{", "while", "(", "throwable", "instanceof", "MultiEventException", "&&", "throwable", ".", "getCause", "(", ")", "!=", "null", ")", "{", "eventThatThrewEx...
Unwraps cause of throwable if the throwable is, itself, a MultiEventException. This eliminates much excessive noise that is purely implementation detail of MultiEvents from the stack trace.
[ "Unwraps", "cause", "of", "throwable", "if", "the", "throwable", "is", "itself", "a", "MultiEventException", ".", "This", "eliminates", "much", "excessive", "noise", "that", "is", "purely", "implementation", "detail", "of", "MultiEvents", "from", "the", "stack", ...
train
https://github.com/darcy-framework/synq/blob/37f2e6966496520efd1ec506770a717823671e9b/src/main/java/com/redhat/synq/MultiEvent.java#L97-L104
lets-blade/blade
src/main/java/com/blade/kit/EncryptKit.java
EncryptKit.hmacTemplate
private static byte[] hmacTemplate(byte[] data, byte[] key, String algorithm) { """ Hmac加密模板 @param data 数据 @param key 秘钥 @param algorithm 加密算法 @return 密文字节数组 """ if (data == null || data.length == 0 || key == null || key.length == 0) return null; try { SecretKeySpe...
java
private static byte[] hmacTemplate(byte[] data, byte[] key, String algorithm) { if (data == null || data.length == 0 || key == null || key.length == 0) return null; try { SecretKeySpec secretKey = new SecretKeySpec(key, algorithm); Mac mac = Mac.getInstance(algori...
[ "private", "static", "byte", "[", "]", "hmacTemplate", "(", "byte", "[", "]", "data", ",", "byte", "[", "]", "key", ",", "String", "algorithm", ")", "{", "if", "(", "data", "==", "null", "||", "data", ".", "length", "==", "0", "||", "key", "==", ...
Hmac加密模板 @param data 数据 @param key 秘钥 @param algorithm 加密算法 @return 密文字节数组
[ "Hmac加密模板" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/EncryptKit.java#L427-L438
RestComm/media-core
stun/src/main/java/org/restcomm/media/core/stun/messages/StunMessage.java
StunMessage.performAttributeSpecificActions
private static void performAttributeSpecificActions(StunAttribute attribute, byte[] binMessage, int offset, int msgLen) throws StunException { """ Executes actions related specific attributes like asserting proper fingerprint checksum. @param attribute the <tt>StunAttribute</tt> we'd like to process. @pa...
java
private static void performAttributeSpecificActions(StunAttribute attribute, byte[] binMessage, int offset, int msgLen) throws StunException { // check finger print CRC if (attribute instanceof FingerprintAttribute) { if (!validateFingerprint((FingerprintAttribute) attribute, binMessage, offset, msgLen)) { ...
[ "private", "static", "void", "performAttributeSpecificActions", "(", "StunAttribute", "attribute", ",", "byte", "[", "]", "binMessage", ",", "int", "offset", ",", "int", "msgLen", ")", "throws", "StunException", "{", "// check finger print CRC", "if", "(", "attribut...
Executes actions related specific attributes like asserting proper fingerprint checksum. @param attribute the <tt>StunAttribute</tt> we'd like to process. @param binMessage the byte array that the message arrived with. @param offset the index where data starts in <tt>binMessage</tt>. @param msgLen the number of messag...
[ "Executes", "actions", "related", "specific", "attributes", "like", "asserting", "proper", "fingerprint", "checksum", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/stun/src/main/java/org/restcomm/media/core/stun/messages/StunMessage.java#L926-L936
windup/windup
config-xml/addon/src/main/java/org/jboss/windup/config/parser/xml/RuleHandler.java
RuleHandler.processRuleElement
public static void processRuleElement(ParserContext context, ConfigurationRuleBuilder rule, Element element) { """ Processes all of the elements within a rule and attaches this data to the passed in rule. For example, this will process all of the "when", "perform", and "otherwise" elements. """ String...
java
public static void processRuleElement(ParserContext context, ConfigurationRuleBuilder rule, Element element) { String id = $(element).attr("id"); List<Element> children = $(element).children().get(); for (Element child : children) { Object result = context.processElement...
[ "public", "static", "void", "processRuleElement", "(", "ParserContext", "context", ",", "ConfigurationRuleBuilder", "rule", ",", "Element", "element", ")", "{", "String", "id", "=", "$", "(", "element", ")", ".", "attr", "(", "\"id\"", ")", ";", "List", "<",...
Processes all of the elements within a rule and attaches this data to the passed in rule. For example, this will process all of the "when", "perform", and "otherwise" elements.
[ "Processes", "all", "of", "the", "elements", "within", "a", "rule", "and", "attaches", "this", "data", "to", "the", "passed", "in", "rule", ".", "For", "example", "this", "will", "process", "all", "of", "the", "when", "perform", "and", "otherwise", "elemen...
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config-xml/addon/src/main/java/org/jboss/windup/config/parser/xml/RuleHandler.java#L38-L71
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/transform/TransformProcess.java
TransformProcess.executeSequenceToSingle
public List<Writable> executeSequenceToSingle(List<List<Writable>> inputSequence) { """ Execute a TransformProcess that starts with a sequence record, and converts it to a single (non-sequence) record @param inputSequence Input sequence @return Record after processing (or null if filtered out) """ ...
java
public List<Writable> executeSequenceToSingle(List<List<Writable>> inputSequence){ return execute(null, inputSequence).getLeft(); }
[ "public", "List", "<", "Writable", ">", "executeSequenceToSingle", "(", "List", "<", "List", "<", "Writable", ">", ">", "inputSequence", ")", "{", "return", "execute", "(", "null", ",", "inputSequence", ")", ".", "getLeft", "(", ")", ";", "}" ]
Execute a TransformProcess that starts with a sequence record, and converts it to a single (non-sequence) record @param inputSequence Input sequence @return Record after processing (or null if filtered out)
[ "Execute", "a", "TransformProcess", "that", "starts", "with", "a", "sequence", "record", "and", "converts", "it", "to", "a", "single", "(", "non", "-", "sequence", ")", "record" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/transform/TransformProcess.java#L330-L332
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/LinkedTransferQueue.java
LinkedTransferQueue.spinsFor
private static int spinsFor(Node pred, boolean haveData) { """ Returns spin/yield value for a node with given predecessor and data mode. See above for explanation. """ if (MP && pred != null) { if (pred.isData != haveData) // phase change return FRONT_SPINS + CHAINED_S...
java
private static int spinsFor(Node pred, boolean haveData) { if (MP && pred != null) { if (pred.isData != haveData) // phase change return FRONT_SPINS + CHAINED_SPINS; if (pred.isMatched()) // probably at front return FRONT_SPINS; ...
[ "private", "static", "int", "spinsFor", "(", "Node", "pred", ",", "boolean", "haveData", ")", "{", "if", "(", "MP", "&&", "pred", "!=", "null", ")", "{", "if", "(", "pred", ".", "isData", "!=", "haveData", ")", "// phase change", "return", "FRONT_SPINS",...
Returns spin/yield value for a node with given predecessor and data mode. See above for explanation.
[ "Returns", "spin", "/", "yield", "value", "for", "a", "node", "with", "given", "predecessor", "and", "data", "mode", ".", "See", "above", "for", "explanation", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/LinkedTransferQueue.java#L715-L725
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/RelatedArticleList.java
RelatedArticleList.setRelatedArticles
public void setRelatedArticles(int i, RelatedArticle v) { """ indexed setter for relatedArticles - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array """ if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedA...
java
public void setRelatedArticles(int i, RelatedArticle v) { if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedArticles == null) jcasType.jcas.throwFeatMissing("relatedArticles", "de.julielab.jules.types.RelatedArticleList"); jcasType.jcas.checkArrayBounds(jcasType....
[ "public", "void", "setRelatedArticles", "(", "int", "i", ",", "RelatedArticle", "v", ")", "{", "if", "(", "RelatedArticleList_Type", ".", "featOkTst", "&&", "(", "(", "RelatedArticleList_Type", ")", "jcasType", ")", ".", "casFeat_relatedArticles", "==", "null", ...
indexed setter for relatedArticles - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "relatedArticles", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/RelatedArticleList.java#L116-L120
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.deleteComputeNodeUser
public void deleteComputeNodeUser(String poolId, String nodeId, String userName, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Deletes the specified user account from the specified compute node. @param poolId The ID of the pool that contains the compute node. ...
java
public void deleteComputeNodeUser(String poolId, String nodeId, String userName, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { ComputeNodeDeleteUserOptions options = new ComputeNodeDeleteUserOptions(); BehaviorManager bhMgr = new BehaviorManager(this.custom...
[ "public", "void", "deleteComputeNodeUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "ComputeNode...
Deletes the specified user account from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node where the user account will be deleted. @param userName The name of the user account to be deleted. @param additionalBehaviors A collection of {@...
[ "Deletes", "the", "specified", "user", "account", "from", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L127-L133
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.changeVnetAsync
public Observable<Page<SiteInner>> changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { """ Move an App Service Environment to a different VNET. Move an App Service Environment to a different VNET. @param resourceGroupName Name of the resource group to whic...
java
public Observable<Page<SiteInner>> changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { return changeVnetWithServiceResponseAsync(resourceGroupName, name, vnetInfo) .map(new Func1<ServiceResponse<Page<SiteInner>>, Page<SiteInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "SiteInner", ">", ">", "changeVnetAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "VirtualNetworkProfile", "vnetInfo", ")", "{", "return", "changeVnetWithServiceResponseAsync"...
Move an App Service Environment to a different VNET. Move an App Service Environment to a different VNET. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param vnetInfo Details for the new virtual network. @throws IllegalArgumentExcep...
[ "Move", "an", "App", "Service", "Environment", "to", "a", "different", "VNET", ".", "Move", "an", "App", "Service", "Environment", "to", "a", "different", "VNET", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java#L1582-L1590
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/MainScene.java
MainScene.rotateToFaceCamera
public void rotateToFaceCamera(final GVRTransform transform) { """ Apply the necessary rotation to the transform so that it is in front of the camera. @param transform The transform to modify. """ //see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion final GVRTra...
java
public void rotateToFaceCamera(final GVRTransform transform) { //see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion final GVRTransform t = getMainCameraRig().getHeadTransform(); final Quaternionf q = new Quaternionf(0, t.getRotationY(), 0, t.getRotationW()).normalize...
[ "public", "void", "rotateToFaceCamera", "(", "final", "GVRTransform", "transform", ")", "{", "//see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion", "final", "GVRTransform", "t", "=", "getMainCameraRig", "(", ")", ".", "getHeadTransform", "(", ")"...
Apply the necessary rotation to the transform so that it is in front of the camera. @param transform The transform to modify.
[ "Apply", "the", "necessary", "rotation", "to", "the", "transform", "so", "that", "it", "is", "in", "front", "of", "the", "camera", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/MainScene.java#L465-L471
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/vafile/PartialVAFile.java
PartialVAFile.calculateSelectivityCoeffs
protected static void calculateSelectivityCoeffs(List<DoubleObjPair<DAFile>> daFiles, NumberVector query, double epsilon) { """ Calculate selectivity coefficients. @param daFiles List of files to use @param query Query vector @param epsilon Epsilon radius """ final int dimensions = query.getDimensiona...
java
protected static void calculateSelectivityCoeffs(List<DoubleObjPair<DAFile>> daFiles, NumberVector query, double epsilon) { final int dimensions = query.getDimensionality(); double[] lowerVals = new double[dimensions]; double[] upperVals = new double[dimensions]; VectorApproximation queryApprox = calcu...
[ "protected", "static", "void", "calculateSelectivityCoeffs", "(", "List", "<", "DoubleObjPair", "<", "DAFile", ">", ">", "daFiles", ",", "NumberVector", "query", ",", "double", "epsilon", ")", "{", "final", "int", "dimensions", "=", "query", ".", "getDimensional...
Calculate selectivity coefficients. @param daFiles List of files to use @param query Query vector @param epsilon Epsilon radius
[ "Calculate", "selectivity", "coefficients", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/vafile/PartialVAFile.java#L264-L287
Sciss/abc4j
abc/src/main/java/abc/ui/swing/ScoreTemplate.java
ScoreTemplate.getTextFont
public Font getTextFont(byte field) { """ Returns the styled and sized font for a field. @param field one of {@link ScoreElements} constants """ FieldInfos fi = getFieldInfos(field); Vector v = new Vector(m_defaultTextFontFamilyNames.length+fi.m_fontFamilyNames.length); Collections.addAll(v, ...
java
public Font getTextFont(byte field) { FieldInfos fi = getFieldInfos(field); Vector v = new Vector(m_defaultTextFontFamilyNames.length+fi.m_fontFamilyNames.length); Collections.addAll(v, fi.m_fontFamilyNames); Collections.addAll(v, m_defaultTextFontFamilyNames); Iterator it = v.iterator(); ...
[ "public", "Font", "getTextFont", "(", "byte", "field", ")", "{", "FieldInfos", "fi", "=", "getFieldInfos", "(", "field", ")", ";", "Vector", "v", "=", "new", "Vector", "(", "m_defaultTextFontFamilyNames", ".", "length", "+", "fi", ".", "m_fontFamilyNames", "...
Returns the styled and sized font for a field. @param field one of {@link ScoreElements} constants
[ "Returns", "the", "styled", "and", "sized", "font", "for", "a", "field", "." ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreTemplate.java#L574-L602
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.getBoolean
public static boolean getBoolean(Config config, String path, boolean def) { """ Return boolean value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return boolean value at <co...
java
public static boolean getBoolean(Config config, String path, boolean def) { if (config.hasPath(path)) { return config.getBoolean(path); } return def; }
[ "public", "static", "boolean", "getBoolean", "(", "Config", "config", ",", "String", "path", ",", "boolean", "def", ")", "{", "if", "(", "config", ".", "hasPath", "(", "path", ")", ")", "{", "return", "config", ".", "getBoolean", "(", "path", ")", ";",...
Return boolean value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return boolean value at <code>path</code> if <code>config</code> has path. If not return <code>def</code>
[ "Return", "boolean", "value", "at", "<code", ">", "path<", "/", "code", ">", "if", "<code", ">", "config<", "/", "code", ">", "has", "path", ".", "If", "not", "return", "<code", ">", "def<", "/", "code", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L364-L369
davetcc/tcMenu
tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/model/CodeVariableBuilder.java
CodeVariableBuilder.paramFromPropertyWithDefault
public CodeVariableBuilder paramFromPropertyWithDefault(String property, String defVal) { """ This parameter will be based on the value of a property, if the property is empty or missing then the replacement default will be used. @param property the property to lookup @param defVal the default if the above is b...
java
public CodeVariableBuilder paramFromPropertyWithDefault(String property, String defVal) { params.add(new PropertyWithDefaultParameter(property, defVal)); return this; }
[ "public", "CodeVariableBuilder", "paramFromPropertyWithDefault", "(", "String", "property", ",", "String", "defVal", ")", "{", "params", ".", "add", "(", "new", "PropertyWithDefaultParameter", "(", "property", ",", "defVal", ")", ")", ";", "return", "this", ";", ...
This parameter will be based on the value of a property, if the property is empty or missing then the replacement default will be used. @param property the property to lookup @param defVal the default if the above is blank @return this for chaining.
[ "This", "parameter", "will", "be", "based", "on", "the", "value", "of", "a", "property", "if", "the", "property", "is", "empty", "or", "missing", "then", "the", "replacement", "default", "will", "be", "used", "." ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/model/CodeVariableBuilder.java#L116-L119
b3log/latke
latke-core/src/main/java/org/json/JSONObject.java
JSONObject.optBoolean
public boolean optBoolean(String key, boolean defaultValue) { """ Get an optional boolean associated with a key. It returns the defaultValue if there is no such key, or if it is not a Boolean or the String "true" or "false" (case insensitive). @param key A key string. @param defaultValue The default. @ret...
java
public boolean optBoolean(String key, boolean defaultValue) { Object val = this.opt(key); if (NULL.equals(val)) { return defaultValue; } if (val instanceof Boolean){ return ((Boolean) val).booleanValue(); } try { // we'll use the get an...
[ "public", "boolean", "optBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "Object", "val", "=", "this", ".", "opt", "(", "key", ")", ";", "if", "(", "NULL", ".", "equals", "(", "val", ")", ")", "{", "return", "defaultValue", ...
Get an optional boolean associated with a key. It returns the defaultValue if there is no such key, or if it is not a Boolean or the String "true" or "false" (case insensitive). @param key A key string. @param defaultValue The default. @return The truth.
[ "Get", "an", "optional", "boolean", "associated", "with", "a", "key", ".", "It", "returns", "the", "defaultValue", "if", "there", "is", "no", "such", "key", "or", "if", "it", "is", "not", "a", "Boolean", "or", "the", "String", "true", "or", "false", "(...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONObject.java#L1079-L1093
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.canSwapRows
public static boolean canSwapRows(Matrix matrix, int row1, int row2, int col1) { """ Check to see if a non-zero and a zero value in the rows leading up to this column can be swapped. This is part of the bandwidth reduction algorithm. @param matrix the matrix to check @param row1 the first row @param row2 ...
java
public static boolean canSwapRows(Matrix matrix, int row1, int row2, int col1) { boolean response = true; for (int col = 0; col < col1; ++col) { if (0 == matrix.getAsDouble(row1, col)) { if (0 != matrix.getAsDouble(row2, col)) { response = false; break; } } } return response; }
[ "public", "static", "boolean", "canSwapRows", "(", "Matrix", "matrix", ",", "int", "row1", ",", "int", "row2", ",", "int", "col1", ")", "{", "boolean", "response", "=", "true", ";", "for", "(", "int", "col", "=", "0", ";", "col", "<", "col1", ";", ...
Check to see if a non-zero and a zero value in the rows leading up to this column can be swapped. This is part of the bandwidth reduction algorithm. @param matrix the matrix to check @param row1 the first row @param row2 the second row @param col1 the column @return true if the rows can be swapped
[ "Check", "to", "see", "if", "a", "non", "-", "zero", "and", "a", "zero", "value", "in", "the", "rows", "leading", "up", "to", "this", "column", "can", "be", "swapped", ".", "This", "is", "part", "of", "the", "bandwidth", "reduction", "algorithm", "." ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L865-L876
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java
ReComputeFieldHandler.init
public void init(BaseField field, String targetFieldName, BaseField fldTarget) { """ Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param iTargetFieldSeq The target field sequence to recompute on field change. @param fldTarget The target field to recompute ...
java
public void init(BaseField field, String targetFieldName, BaseField fldTarget) { super.init(field); m_bDisableTarget = false; this.targetFieldName = targetFieldName; m_fldTarget = fldTarget; }
[ "public", "void", "init", "(", "BaseField", "field", ",", "String", "targetFieldName", ",", "BaseField", "fldTarget", ")", "{", "super", ".", "init", "(", "field", ")", ";", "m_bDisableTarget", "=", "false", ";", "this", ".", "targetFieldName", "=", "targetF...
Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param iTargetFieldSeq The target field sequence to recompute on field change. @param fldTarget The target field to recompute on field change.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java#L72-L79
jenkinsci/jenkins
cli/src/main/java/hudson/cli/Connection.java
Connection.proveIdentity
public void proveIdentity(byte[] sharedSecret, KeyPair key) throws IOException, GeneralSecurityException { """ Used in conjunction with {@link #verifyIdentity(byte[])} to prove that we actually own the private key of the given key pair. """ String algorithm = detectKeyAlgorithm(key); writeUTF(...
java
public void proveIdentity(byte[] sharedSecret, KeyPair key) throws IOException, GeneralSecurityException { String algorithm = detectKeyAlgorithm(key); writeUTF(algorithm); writeKey(key.getPublic()); Signature sig = Signature.getInstance("SHA1with"+algorithm); sig.initSign(key.ge...
[ "public", "void", "proveIdentity", "(", "byte", "[", "]", "sharedSecret", ",", "KeyPair", "key", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "String", "algorithm", "=", "detectKeyAlgorithm", "(", "key", ")", ";", "writeUTF", "(", "algorit...
Used in conjunction with {@link #verifyIdentity(byte[])} to prove that we actually own the private key of the given key pair.
[ "Used", "in", "conjunction", "with", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/cli/src/main/java/hudson/cli/Connection.java#L235-L245
soklet/soklet-guice
src/main/java/com/soklet/guice/SokletModule.java
SokletModule.provideRequestHandler
@Inject @Provides @Singleton public RequestHandler provideRequestHandler(InstanceProvider instanceProvider) { """ Provides a default {@link RequestHandler}. @param instanceProvider instance factory for objects that handle routes @return a {@link RequestHandler} """ return new DefaultRequestHandl...
java
@Inject @Provides @Singleton public RequestHandler provideRequestHandler(InstanceProvider instanceProvider) { return new DefaultRequestHandler(instanceProvider, new ValueConverterRegistry()); }
[ "@", "Inject", "@", "Provides", "@", "Singleton", "public", "RequestHandler", "provideRequestHandler", "(", "InstanceProvider", "instanceProvider", ")", "{", "return", "new", "DefaultRequestHandler", "(", "instanceProvider", ",", "new", "ValueConverterRegistry", "(", ")...
Provides a default {@link RequestHandler}. @param instanceProvider instance factory for objects that handle routes @return a {@link RequestHandler}
[ "Provides", "a", "default", "{", "@link", "RequestHandler", "}", "." ]
train
https://github.com/soklet/soklet-guice/blob/fa7618bd9b49df7a85fa1c23055cadf8af2cb35c/src/main/java/com/soklet/guice/SokletModule.java#L124-L129
Erudika/para
para-core/src/main/java/com/erudika/para/utils/Config.java
Config.getConfigParam
public static String getConfigParam(String key, String defaultValue) { """ Returns the value of a configuration parameter or its default value. {@link System#getProperty(java.lang.String)} has precedence. @param key the param key @param defaultValue the default param value @return the value of a param """ ...
java
public static String getConfigParam(String key, String defaultValue) { if (config == null) { init(null); } if (StringUtils.isBlank(key)) { return defaultValue; } String keyVar = key.replaceAll("\\.", "_"); String env = System.getenv(keyVar) == null ? System.getenv(PARA + "_" + keyVar) : System.getenv(...
[ "public", "static", "String", "getConfigParam", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "if", "(", "config", "==", "null", ")", "{", "init", "(", "null", ")", ";", "}", "if", "(", "StringUtils", ".", "isBlank", "(", "key", ")", ...
Returns the value of a configuration parameter or its default value. {@link System#getProperty(java.lang.String)} has precedence. @param key the param key @param defaultValue the default param value @return the value of a param
[ "Returns", "the", "value", "of", "a", "configuration", "parameter", "or", "its", "default", "value", ".", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/Config.java#L355-L372
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/config/Template.java
Template.getStyle
@SuppressWarnings("unchecked") @Nonnull public final java.util.Optional<Style> getStyle(final String styleName) { """ Look for a style in the named styles provided in the configuration. @param styleName the name of the style to look for. """ final String styleRef = this.styles.get(styleName)...
java
@SuppressWarnings("unchecked") @Nonnull public final java.util.Optional<Style> getStyle(final String styleName) { final String styleRef = this.styles.get(styleName); Optional<Style> style; if (styleRef != null) { style = (Optional<Style>) this.styleParser ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Nonnull", "public", "final", "java", ".", "util", ".", "Optional", "<", "Style", ">", "getStyle", "(", "final", "String", "styleName", ")", "{", "final", "String", "styleRef", "=", "this", ".", "sty...
Look for a style in the named styles provided in the configuration. @param styleName the name of the style to look for.
[ "Look", "for", "a", "style", "in", "the", "named", "styles", "provided", "in", "the", "configuration", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L257-L269
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java
WeeklyAutoScalingSchedule.withThursday
public WeeklyAutoScalingSchedule withThursday(java.util.Map<String, String> thursday) { """ <p> The schedule for Thursday. </p> @param thursday The schedule for Thursday. @return Returns a reference to this object so that method calls can be chained together. """ setThursday(thursday); r...
java
public WeeklyAutoScalingSchedule withThursday(java.util.Map<String, String> thursday) { setThursday(thursday); return this; }
[ "public", "WeeklyAutoScalingSchedule", "withThursday", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "thursday", ")", "{", "setThursday", "(", "thursday", ")", ";", "return", "this", ";", "}" ]
<p> The schedule for Thursday. </p> @param thursday The schedule for Thursday. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "schedule", "for", "Thursday", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java#L329-L332
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/sdp/SdpComparator.java
SdpComparator.negotiateAudio
public RTPFormats negotiateAudio(SessionDescription sdp, RTPFormats formats) { """ Negotiates the audio formats to be used in the call. @param sdp The session description @param formats The available formats @return The supported formats. If no formats are supported the returned list will be empty. """ ...
java
public RTPFormats negotiateAudio(SessionDescription sdp, RTPFormats formats) { this.audio.clean(); MediaDescriptorField descriptor = sdp.getAudioDescriptor(); descriptor.getFormats().intersection(formats, this.audio); return this.audio; }
[ "public", "RTPFormats", "negotiateAudio", "(", "SessionDescription", "sdp", ",", "RTPFormats", "formats", ")", "{", "this", ".", "audio", ".", "clean", "(", ")", ";", "MediaDescriptorField", "descriptor", "=", "sdp", ".", "getAudioDescriptor", "(", ")", ";", "...
Negotiates the audio formats to be used in the call. @param sdp The session description @param formats The available formats @return The supported formats. If no formats are supported the returned list will be empty.
[ "Negotiates", "the", "audio", "formats", "to", "be", "used", "in", "the", "call", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/sdp/SdpComparator.java#L70-L75
alexholmes/htuple
examples/src/main/java/org/htuple/examples/SecondarySort.java
SecondarySort.writeInput
public static void writeInput(Configuration conf, Path inputDir) throws IOException { """ Writes the contents of {@link #EXAMPLE_NAMES} into a file in the job input directory in HDFS. @param conf the Hadoop config @param inputDir the HDFS input directory where we'll write a file @throws IOException if som...
java
public static void writeInput(Configuration conf, Path inputDir) throws IOException { FileSystem fs = FileSystem.get(conf); if (fs.exists(inputDir)) { throw new IOException(String.format("Input directory '%s' exists - please remove and rerun this example", inputDir)); } Out...
[ "public", "static", "void", "writeInput", "(", "Configuration", "conf", ",", "Path", "inputDir", ")", "throws", "IOException", "{", "FileSystem", "fs", "=", "FileSystem", ".", "get", "(", "conf", ")", ";", "if", "(", "fs", ".", "exists", "(", "inputDir", ...
Writes the contents of {@link #EXAMPLE_NAMES} into a file in the job input directory in HDFS. @param conf the Hadoop config @param inputDir the HDFS input directory where we'll write a file @throws IOException if something goes wrong
[ "Writes", "the", "contents", "of", "{", "@link", "#EXAMPLE_NAMES", "}", "into", "a", "file", "in", "the", "job", "input", "directory", "in", "HDFS", "." ]
train
https://github.com/alexholmes/htuple/blob/5aba63f78a4a9bb505ad3de0a5b0b392724644c4/examples/src/main/java/org/htuple/examples/SecondarySort.java#L78-L90
alkacon/opencms-core
src/org/opencms/util/CmsFileUtil.java
CmsFileUtil.getRfsPath
public static String getRfsPath(String filename, String extension, String parameters) { """ Creates unique, valid RFS name for the given filename that contains a coded version of the given parameters, with the given file extension appended.<p> This is used to create file names for the static export, or in a v...
java
public static String getRfsPath(String filename, String extension, String parameters) { StringBuffer buf = new StringBuffer(128); buf.append(filename); buf.append('_'); int h = parameters.hashCode(); // ensure we do have a positive id value buf.append(h > 0 ? h : -h); ...
[ "public", "static", "String", "getRfsPath", "(", "String", "filename", ",", "String", "extension", ",", "String", "parameters", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", "128", ")", ";", "buf", ".", "append", "(", "filename", ")", "...
Creates unique, valid RFS name for the given filename that contains a coded version of the given parameters, with the given file extension appended.<p> This is used to create file names for the static export, or in a vfs disk cache.<p> @param filename the base file name @param extension the extension to use @param pa...
[ "Creates", "unique", "valid", "RFS", "name", "for", "the", "given", "filename", "that", "contains", "a", "coded", "version", "of", "the", "given", "parameters", "with", "the", "given", "file", "extension", "appended", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsFileUtil.java#L443-L453
spotify/apollo
apollo-api-impl/src/main/java/com/spotify/apollo/request/RequestHandlerImpl.java
RequestHandlerImpl.handleEndpointMatch
private void handleEndpointMatch(OngoingRequest request, RuleMatch<Endpoint> match) { """ Continuation for the {@link RequestRunnableFactory} @param request request being processed @param match the match that was made """ final Endpoint endpoint = match.getRule().getTarget(); final Map<String, ...
java
private void handleEndpointMatch(OngoingRequest request, RuleMatch<Endpoint> match) { final Endpoint endpoint = match.getRule().getTarget(); final Map<String, String> parsedPathArguments = match.parsedPathArguments(); final Client requestScopedClient = client.wrapRequest(request.request()); final Reques...
[ "private", "void", "handleEndpointMatch", "(", "OngoingRequest", "request", ",", "RuleMatch", "<", "Endpoint", ">", "match", ")", "{", "final", "Endpoint", "endpoint", "=", "match", ".", "getRule", "(", ")", ".", "getTarget", "(", ")", ";", "final", "Map", ...
Continuation for the {@link RequestRunnableFactory} @param request request being processed @param match the match that was made
[ "Continuation", "for", "the", "{", "@link", "RequestRunnableFactory", "}" ]
train
https://github.com/spotify/apollo/blob/3aba09840538a2aff9cdac5be42cc114dd276c70/apollo-api-impl/src/main/java/com/spotify/apollo/request/RequestHandlerImpl.java#L83-L96
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java
SwiftAPIClient.getWorkingDirectory
@Override public Path getWorkingDirectory() { """ {@inheritDoc} Swift driver doesn't require any local working directory @return path to the working directory """ // Hadoop eco system depends on working directory value // Although it's not needed by Spark, it still in use when native Hadoop use...
java
@Override public Path getWorkingDirectory() { // Hadoop eco system depends on working directory value // Although it's not needed by Spark, it still in use when native Hadoop uses Stocator // Current approach is similar to the hadoop-openstack logic that generates working folder // We should re-consid...
[ "@", "Override", "public", "Path", "getWorkingDirectory", "(", ")", "{", "// Hadoop eco system depends on working directory value", "// Although it's not needed by Spark, it still in use when native Hadoop uses Stocator", "// Current approach is similar to the hadoop-openstack logic that generat...
{@inheritDoc} Swift driver doesn't require any local working directory @return path to the working directory
[ "{", "@inheritDoc", "}" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L703-L712
graknlabs/grakn
server/src/server/kb/concept/TypeImpl.java
TypeImpl.unlinkAttribute
private T unlinkAttribute(AttributeType<?> attributeToRemove, boolean isKey) { """ Helper method to delete a AttributeType which is possible linked to this Type. The link to AttributeType is removed if <code>attributeToRemove</code> is in the candidate list <code>attributeTypes</code> @param attributeToRemove...
java
private T unlinkAttribute(AttributeType<?> attributeToRemove, boolean isKey) { Stream<AttributeType> attributeTypes = isKey ? keys() : attributes(); Schema.ImplicitType ownerSchema = isKey ? Schema.ImplicitType.KEY_OWNER : Schema.ImplicitType.HAS_OWNER; Schema.ImplicitType valueSchema = isKey ? ...
[ "private", "T", "unlinkAttribute", "(", "AttributeType", "<", "?", ">", "attributeToRemove", ",", "boolean", "isKey", ")", "{", "Stream", "<", "AttributeType", ">", "attributeTypes", "=", "isKey", "?", "keys", "(", ")", ":", "attributes", "(", ")", ";", "S...
Helper method to delete a AttributeType which is possible linked to this Type. The link to AttributeType is removed if <code>attributeToRemove</code> is in the candidate list <code>attributeTypes</code> @param attributeToRemove the AttributeType to remove @param isKey a boolean to determine whether the Att...
[ "Helper", "method", "to", "delete", "a", "AttributeType", "which", "is", "possible", "linked", "to", "this", "Type", ".", "The", "link", "to", "AttributeType", "is", "removed", "if", "<code", ">", "attributeToRemove<", "/", "code", ">", "is", "in", "the", ...
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/concept/TypeImpl.java#L301-L340
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/Row.java
Row.setTagId
public void setTagId(String tagId) throws JspException { """ Set the name of the tagId for the HTML tr tag. @param tagId the the name of the tagId for the table row. @jsptagref.attributedescription The tagId for the HTML tr tat. @jsptagref.attributesyntaxvalue <i>string_tagId</i> @netui:attribute req...
java
public void setTagId(String tagId) throws JspException { JspContext jspContext = getJspContext(); DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(jspContext); if(dataGridModel == null) throw new JspException(Bundle.getErrorString("DataGridTags_MissingDataGri...
[ "public", "void", "setTagId", "(", "String", "tagId", ")", "throws", "JspException", "{", "JspContext", "jspContext", "=", "getJspContext", "(", ")", ";", "DataGridTagModel", "dataGridModel", "=", "DataGridUtil", ".", "getDataGridTagModel", "(", "jspContext", ")", ...
Set the name of the tagId for the HTML tr tag. @param tagId the the name of the tagId for the table row. @jsptagref.attributedescription The tagId for the HTML tr tat. @jsptagref.attributesyntaxvalue <i>string_tagId</i> @netui:attribute required="false" rtexprvalue="true" description="String value. Sets the id (or nam...
[ "Set", "the", "name", "of", "the", "tagId", "for", "the", "HTML", "tr", "tag", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/Row.java#L304-L316
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfLayer.java
PdfLayer.setZoom
public void setZoom(float min, float max) { """ Specifies a range of magnifications at which the content in this optional content group is best viewed. @param min the minimum recommended magnification factors at which the group should be ON. A negative value will set the default to 0 @param max the maximum rec...
java
public void setZoom(float min, float max) { if (min <= 0 && max < 0) return; PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); if (min > 0) dic.put(PdfName.MIN_LOWER_CASE, new PdfNumber(min)); if (max >= 0) dic.put(PdfN...
[ "public", "void", "setZoom", "(", "float", "min", ",", "float", "max", ")", "{", "if", "(", "min", "<=", "0", "&&", "max", "<", "0", ")", "return", ";", "PdfDictionary", "usage", "=", "getUsage", "(", ")", ";", "PdfDictionary", "dic", "=", "new", "...
Specifies a range of magnifications at which the content in this optional content group is best viewed. @param min the minimum recommended magnification factors at which the group should be ON. A negative value will set the default to 0 @param max the maximum recommended magnification factor at which the group should b...
[ "Specifies", "a", "range", "of", "magnifications", "at", "which", "the", "content", "in", "this", "optional", "content", "group", "is", "best", "viewed", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfLayer.java#L254-L264
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMesh.java
AiMesh.getFaceVertex
public int getFaceVertex(int face, int n) { """ Returns a vertex reference from a face.<p> A face contains <code>getFaceNumIndices(face)</code> vertex references. This method returns the n'th of these. The returned index can be passed directly to the vertex oriented methods, such as <code>getPosition()</code...
java
public int getFaceVertex(int face, int n) { if (!hasFaces()) { throw new IllegalStateException("mesh has no faces"); } if (face >= m_numFaces || face < 0) { throw new IndexOutOfBoundsException("Index: " + face + ", Size: " + m_numFaces); ...
[ "public", "int", "getFaceVertex", "(", "int", "face", ",", "int", "n", ")", "{", "if", "(", "!", "hasFaces", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"mesh has no faces\"", ")", ";", "}", "if", "(", "face", ">=", "m_numFaces", ...
Returns a vertex reference from a face.<p> A face contains <code>getFaceNumIndices(face)</code> vertex references. This method returns the n'th of these. The returned index can be passed directly to the vertex oriented methods, such as <code>getPosition()</code> etc. @param face the face @param n the reference @retur...
[ "Returns", "a", "vertex", "reference", "from", "a", "face", ".", "<p", ">" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMesh.java#L684-L707
roboconf/roboconf-platform
core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java
PluginFile.readProperties
Properties readProperties( Instance instance ) throws PluginException { """ Reads the "instructions.properties" file. @param instance the instance @return a non-null properties object (potentially empty) @throws PluginException """ Properties result = null; File instanceDirectory = InstanceHelpers.find...
java
Properties readProperties( Instance instance ) throws PluginException { Properties result = null; File instanceDirectory = InstanceHelpers.findInstanceDirectoryOnAgent( instance ); File file = new File( instanceDirectory, FILE_NAME ); try { if( file.exists()) { result = Utils.readPropertiesFile( file )...
[ "Properties", "readProperties", "(", "Instance", "instance", ")", "throws", "PluginException", "{", "Properties", "result", "=", "null", ";", "File", "instanceDirectory", "=", "InstanceHelpers", ".", "findInstanceDirectoryOnAgent", "(", "instance", ")", ";", "File", ...
Reads the "instructions.properties" file. @param instance the instance @return a non-null properties object (potentially empty) @throws PluginException
[ "Reads", "the", "instructions", ".", "properties", "file", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java#L139-L159
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4Address.java
IPv4Address.toNormalizedString
public static String toNormalizedString(IPv4AddressNetwork network, SegmentValueProvider lowerValueProvider, SegmentValueProvider upperValueProvider, Integer prefixLength) { """ Creates the normalized string for an address without having to create the address objects first. @param lowerValueProvider @param upp...
java
public static String toNormalizedString(IPv4AddressNetwork network, SegmentValueProvider lowerValueProvider, SegmentValueProvider upperValueProvider, Integer prefixLength) { return toNormalizedString(network.getPrefixConfiguration(), lowerValueProvider, upperValueProvider, prefixLength, SEGMENT_COUNT, BYTES_PER_SEGME...
[ "public", "static", "String", "toNormalizedString", "(", "IPv4AddressNetwork", "network", ",", "SegmentValueProvider", "lowerValueProvider", ",", "SegmentValueProvider", "upperValueProvider", ",", "Integer", "prefixLength", ")", "{", "return", "toNormalizedString", "(", "ne...
Creates the normalized string for an address without having to create the address objects first. @param lowerValueProvider @param upperValueProvider @param prefixLength @param network use {@link #defaultIpv4Network()} if there is no custom network in use @return
[ "Creates", "the", "normalized", "string", "for", "an", "address", "without", "having", "to", "create", "the", "address", "objects", "first", "." ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4Address.java#L976-L978
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java
ContextItems.lookupItemName
private String lookupItemName(String itemName, String suffix, boolean autoAdd) { """ Performs a case-insensitive lookup of the item name + suffix in the index. @param itemName Item name @param suffix Item suffix @param autoAdd If true and item name not in index, add it. @return Item name with suffix as store...
java
private String lookupItemName(String itemName, String suffix, boolean autoAdd) { return lookupItemName(itemName + "." + suffix, autoAdd); }
[ "private", "String", "lookupItemName", "(", "String", "itemName", ",", "String", "suffix", ",", "boolean", "autoAdd", ")", "{", "return", "lookupItemName", "(", "itemName", "+", "\".\"", "+", "suffix", ",", "autoAdd", ")", ";", "}" ]
Performs a case-insensitive lookup of the item name + suffix in the index. @param itemName Item name @param suffix Item suffix @param autoAdd If true and item name not in index, add it. @return Item name with suffix as stored internally
[ "Performs", "a", "case", "-", "insensitive", "lookup", "of", "the", "item", "name", "+", "suffix", "in", "the", "index", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java#L85-L87
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsCommentImages.java
CmsCommentImages.getImageScaler
protected CmsImageScaler getImageScaler() { """ Returns the initialized image scaler object used to generate thumbnails for the dialog form.<p> @return the initialized image scaler object used to generate thumbnails for the dialog form """ if (m_imageScaler == null) { // not initialized...
java
protected CmsImageScaler getImageScaler() { if (m_imageScaler == null) { // not initialized, create image scaler with default settings m_imageScaler = new CmsImageScaler(); m_imageScaler.setWidth(THUMB_WIDTH); m_imageScaler.setHeight(THUMB_HEIGHT); m_...
[ "protected", "CmsImageScaler", "getImageScaler", "(", ")", "{", "if", "(", "m_imageScaler", "==", "null", ")", "{", "// not initialized, create image scaler with default settings", "m_imageScaler", "=", "new", "CmsImageScaler", "(", ")", ";", "m_imageScaler", ".", "setW...
Returns the initialized image scaler object used to generate thumbnails for the dialog form.<p> @return the initialized image scaler object used to generate thumbnails for the dialog form
[ "Returns", "the", "initialized", "image", "scaler", "object", "used", "to", "generate", "thumbnails", "for", "the", "dialog", "form", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsCommentImages.java#L276-L288
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java
QueryImpl.addToRelationStack
protected void addToRelationStack(Map<Object, Object> relationStack, Object entity, EntityMetadata m) { """ Adds the to relation stack. @param relationStack the relation stack @param entity the entity @param m the m """ Object obj = entity; if (entity instanceof EnhanceEntity) {...
java
protected void addToRelationStack(Map<Object, Object> relationStack, Object entity, EntityMetadata m) { Object obj = entity; if (entity instanceof EnhanceEntity) { obj = ((EnhanceEntity) entity).getEntity(); } relationStack.put(obj.getClass().getCanonicalName() + ...
[ "protected", "void", "addToRelationStack", "(", "Map", "<", "Object", ",", "Object", ">", "relationStack", ",", "Object", "entity", ",", "EntityMetadata", "m", ")", "{", "Object", "obj", "=", "entity", ";", "if", "(", "entity", "instanceof", "EnhanceEntity", ...
Adds the to relation stack. @param relationStack the relation stack @param entity the entity @param m the m
[ "Adds", "the", "to", "relation", "stack", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java#L267-L276
sahan/DroidBallet
droidballet/src/main/java/com/lonepulse/droidballet/widget/LinearMotionListView.java
LinearMotionListView.initListeners
private void initListeners() { """ <p>Initializes the {@link OnTouchListener} of this {@link ListView} which momentarily disables motion scrolling (by setting {@link #scrollDisabled} to <b>true</b>) while the user is actively interacting with the list. """ setOnTouchListener(new OnTouchListener() { ...
java
private void initListeners() { setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) scrollDisabled = true; else if (event.getAction() == MotionEvent.ACTION_UP) scrollDisabled = false; ...
[ "private", "void", "initListeners", "(", ")", "{", "setOnTouchListener", "(", "new", "OnTouchListener", "(", ")", "{", "@", "Override", "public", "boolean", "onTouch", "(", "View", "v", ",", "MotionEvent", "event", ")", "{", "if", "(", "event", ".", "getAc...
<p>Initializes the {@link OnTouchListener} of this {@link ListView} which momentarily disables motion scrolling (by setting {@link #scrollDisabled} to <b>true</b>) while the user is actively interacting with the list.
[ "<p", ">", "Initializes", "the", "{" ]
train
https://github.com/sahan/DroidBallet/blob/c6001c9e933cb2c8dbcabe1ae561678b31b10b62/droidballet/src/main/java/com/lonepulse/droidballet/widget/LinearMotionListView.java#L123-L139
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java
UsersInner.getAsync
public Observable<UserInner> getAsync(String deviceName, String name, String resourceGroupName) { """ Gets the properties of the specified user. @param deviceName The device name. @param name The user name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameter...
java
public Observable<UserInner> getAsync(String deviceName, String name, String resourceGroupName) { return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<UserInner>, UserInner>() { @Override public UserInner call(ServiceResponse<UserInner> re...
[ "public", "Observable", "<", "UserInner", ">", "getAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "resourceGroupName", ")", "."...
Gets the properties of the specified user. @param deviceName The device name. @param name The user name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the UserInner object
[ "Gets", "the", "properties", "of", "the", "specified", "user", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java#L255-L262
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addReconnectCommand
public void addReconnectCommand(String teamName, int num) { """ This is used to reconnect the player to the server. @param teamName a {@link java.lang.String} object. @param num a int. """ StringBuilder buf = new StringBuilder(); buf.append("(reconnect "); buf.append(teamName); ...
java
public void addReconnectCommand(String teamName, int num) { StringBuilder buf = new StringBuilder(); buf.append("(reconnect "); buf.append(teamName); buf.append(' '); buf.append(num); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addReconnectCommand", "(", "String", "teamName", ",", "int", "num", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(reconnect \"", ")", ";", "buf", ".", "append", "(", "teamNam...
This is used to reconnect the player to the server. @param teamName a {@link java.lang.String} object. @param num a int.
[ "This", "is", "used", "to", "reconnect", "the", "player", "to", "the", "server", "." ]
train
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L108-L116
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/ServiceLoaderHelper.java
ServiceLoaderHelper.getFirstSPIImplementation
@Nullable public static <T> T getFirstSPIImplementation (@Nonnull final Class <T> aSPIClass, @Nonnull final ClassLoader aClassLoader) { """ Uses the {@link ServiceLoader} to load all SPI implementations of the passed class and return only the first instance. @...
java
@Nullable public static <T> T getFirstSPIImplementation (@Nonnull final Class <T> aSPIClass, @Nonnull final ClassLoader aClassLoader) { return getFirstSPIImplementation (aSPIClass, aClassLoader, null); }
[ "@", "Nullable", "public", "static", "<", "T", ">", "T", "getFirstSPIImplementation", "(", "@", "Nonnull", "final", "Class", "<", "T", ">", "aSPIClass", ",", "@", "Nonnull", "final", "ClassLoader", "aClassLoader", ")", "{", "return", "getFirstSPIImplementation",...
Uses the {@link ServiceLoader} to load all SPI implementations of the passed class and return only the first instance. @param <T> The implementation type to be loaded @param aSPIClass The SPI interface class. May not be <code>null</code>. @param aClassLoader The class loader to use for the SPI loader. May not be <code...
[ "Uses", "the", "{", "@link", "ServiceLoader", "}", "to", "load", "all", "SPI", "implementations", "of", "the", "passed", "class", "and", "return", "only", "the", "first", "instance", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/ServiceLoaderHelper.java#L205-L210
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatial/rectangleAlgebra/RectangleConstraintSolver.java
RectangleConstraintSolver.extractBoundingBoxesFromSTPs
public BoundingBox extractBoundingBoxesFromSTPs(RectangularRegion rect) { """ Extracts a specific {@link BoundingBox} from the domain of a {@link RectangularRegion}. @param rect The {@link RectangularRegion} from to extract the {@link BoundingBox}. @return A specific {@link BoundingBox} from the domain of a {@li...
java
public BoundingBox extractBoundingBoxesFromSTPs(RectangularRegion rect){ Bounds xLB, xUB, yLB, yUB; xLB = new Bounds(((AllenInterval)rect.getInternalVariables()[0]).getEST(),((AllenInterval)rect.getInternalVariables()[0]).getLST()); xUB = new Bounds(((AllenInterval)rect.getInternalVariables()[0]).getEET(),((A...
[ "public", "BoundingBox", "extractBoundingBoxesFromSTPs", "(", "RectangularRegion", "rect", ")", "{", "Bounds", "xLB", ",", "xUB", ",", "yLB", ",", "yUB", ";", "xLB", "=", "new", "Bounds", "(", "(", "(", "AllenInterval", ")", "rect", ".", "getInternalVariables"...
Extracts a specific {@link BoundingBox} from the domain of a {@link RectangularRegion}. @param rect The {@link RectangularRegion} from to extract the {@link BoundingBox}. @return A specific {@link BoundingBox} from the domain of a {@link RectangularRegion}.
[ "Extracts", "a", "specific", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/rectangleAlgebra/RectangleConstraintSolver.java#L172-L179
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/util/PositionUtil.java
PositionUtil.toCellAddress
public String toCellAddress(final Table table, final int row, final int col) { """ the Excel/OO/LO address of a cell, preceeded by the table name @param row the row @param col the col @param table the table @return the Excel/OO/LO address """ return this.getPosition(row, col).toCellAddress(t...
java
public String toCellAddress(final Table table, final int row, final int col) { return this.getPosition(row, col).toCellAddress(table); }
[ "public", "String", "toCellAddress", "(", "final", "Table", "table", ",", "final", "int", "row", ",", "final", "int", "col", ")", "{", "return", "this", ".", "getPosition", "(", "row", ",", "col", ")", ".", "toCellAddress", "(", "table", ")", ";", "}" ...
the Excel/OO/LO address of a cell, preceeded by the table name @param row the row @param col the col @param table the table @return the Excel/OO/LO address
[ "the", "Excel", "/", "OO", "/", "LO", "address", "of", "a", "cell", "preceeded", "by", "the", "table", "name" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/PositionUtil.java#L247-L249
enioka/jqm
jqm-all/jqm-model/src/main/java/com/enioka/jqm/jdbc/Db.java
Db.loadProperties
public static Properties loadProperties(String[] filesToLoad) { """ Helper method to load a property file from class path. @param filesToLoad an array of paths (class path paths) designating where the files may be. All files are loaded, in the order given. Missing files are silently ignored. @return a Prop...
java
public static Properties loadProperties(String[] filesToLoad) { Properties p = new Properties(); InputStream fis = null; for (String path : filesToLoad) { try { fis = Db.class.getClassLoader().getResourceAsStream(path); if (fis ...
[ "public", "static", "Properties", "loadProperties", "(", "String", "[", "]", "filesToLoad", ")", "{", "Properties", "p", "=", "new", "Properties", "(", ")", ";", "InputStream", "fis", "=", "null", ";", "for", "(", "String", "path", ":", "filesToLoad", ")",...
Helper method to load a property file from class path. @param filesToLoad an array of paths (class path paths) designating where the files may be. All files are loaded, in the order given. Missing files are silently ignored. @return a Properties object, which may be empty but not null.
[ "Helper", "method", "to", "load", "a", "property", "file", "from", "class", "path", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-model/src/main/java/com/enioka/jqm/jdbc/Db.java#L225-L260
apache/groovy
src/main/groovy/groovy/ui/GroovyMain.java
GroovyMain.processReader
private void processReader(Script s, BufferedReader reader, PrintWriter pw) throws IOException { """ Process a script against a single input file. @param s script to execute. @param reader input file. @param pw output sink. """ String line; String lineCountName = "count"; ...
java
private void processReader(Script s, BufferedReader reader, PrintWriter pw) throws IOException { String line; String lineCountName = "count"; s.setProperty(lineCountName, BigInteger.ZERO); String autoSplitName = "split"; s.setProperty("out", pw); try { Invoke...
[ "private", "void", "processReader", "(", "Script", "s", ",", "BufferedReader", "reader", ",", "PrintWriter", "pw", ")", "throws", "IOException", "{", "String", "line", ";", "String", "lineCountName", "=", "\"count\"", ";", "s", ".", "setProperty", "(", "lineCo...
Process a script against a single input file. @param s script to execute. @param reader input file. @param pw output sink.
[ "Process", "a", "script", "against", "a", "single", "input", "file", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/ui/GroovyMain.java#L549-L584
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/EnvelopesApi.java
EnvelopesApi.listStatus
public EnvelopesInformation listStatus(String accountId, EnvelopeIdsRequest envelopeIdsRequest) throws ApiException { """ Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. @param accountId The external account number (int) or account ID Guid. (requir...
java
public EnvelopesInformation listStatus(String accountId, EnvelopeIdsRequest envelopeIdsRequest) throws ApiException { return listStatus(accountId, envelopeIdsRequest, null); }
[ "public", "EnvelopesInformation", "listStatus", "(", "String", "accountId", ",", "EnvelopeIdsRequest", "envelopeIdsRequest", ")", "throws", "ApiException", "{", "return", "listStatus", "(", "accountId", ",", "envelopeIdsRequest", ",", "null", ")", ";", "}" ]
Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. @param accountId The external account number (int) or account ID Guid. (required) @param envelopeIdsRequest (optional) @return EnvelopesInformation
[ "Gets", "the", "envelope", "status", "for", "the", "specified", "envelopes", ".", "Retrieves", "the", "envelope", "status", "for", "the", "specified", "envelopes", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L3940-L3942
jblas-project/jblas
src/main/java/org/jblas/ComplexFloat.java
ComplexFloat.muli
public ComplexFloat muli(ComplexFloat c, ComplexFloat result) { """ Multiply two complex numbers, in-place @param c other complex number @param result complex number where product is stored @return same as result """ float newR = r * c.r - i * c.i; float newI = r * c.i + i * c.r; result.r...
java
public ComplexFloat muli(ComplexFloat c, ComplexFloat result) { float newR = r * c.r - i * c.i; float newI = r * c.i + i * c.r; result.r = newR; result.i = newI; return result; }
[ "public", "ComplexFloat", "muli", "(", "ComplexFloat", "c", ",", "ComplexFloat", "result", ")", "{", "float", "newR", "=", "r", "*", "c", ".", "r", "-", "i", "*", "c", ".", "i", ";", "float", "newI", "=", "r", "*", "c", ".", "i", "+", "i", "*",...
Multiply two complex numbers, in-place @param c other complex number @param result complex number where product is stored @return same as result
[ "Multiply", "two", "complex", "numbers", "in", "-", "place" ]
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/ComplexFloat.java#L226-L232
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AlpineQueryManager.java
AlpineQueryManager.createMappedLdapGroup
public MappedLdapGroup createMappedLdapGroup(final Team team, final String dn) { """ Creates a MappedLdapGroup object. @param team The team to map @param dn the distinguished name of the LDAP group to map @return a MappedLdapGroup @since 1.4.0 """ pm.currentTransaction().begin(); final Mapp...
java
public MappedLdapGroup createMappedLdapGroup(final Team team, final String dn) { pm.currentTransaction().begin(); final MappedLdapGroup mapping = new MappedLdapGroup(); mapping.setTeam(team); mapping.setDn(dn); pm.makePersistent(mapping); pm.currentTransaction().commit();...
[ "public", "MappedLdapGroup", "createMappedLdapGroup", "(", "final", "Team", "team", ",", "final", "String", "dn", ")", "{", "pm", ".", "currentTransaction", "(", ")", ".", "begin", "(", ")", ";", "final", "MappedLdapGroup", "mapping", "=", "new", "MappedLdapGr...
Creates a MappedLdapGroup object. @param team The team to map @param dn the distinguished name of the LDAP group to map @return a MappedLdapGroup @since 1.4.0
[ "Creates", "a", "MappedLdapGroup", "object", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AlpineQueryManager.java#L641-L649
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.postEpisodeRating
public StatusCode postEpisodeRating(int tvID, int seasonNumber, int episodeNumber, int rating, String sessionID, String guestSessionID) throws MovieDbException { """ This method lets users rate a TV episode. A valid session id or guest session id is required. @param tvID @param seasonNumber @param episodeNum...
java
public StatusCode postEpisodeRating(int tvID, int seasonNumber, int episodeNumber, int rating, String sessionID, String guestSessionID) throws MovieDbException { if (rating < 0 || rating > RATING_MAX) { throw new MovieDbException(ApiExceptionType.UNKNOWN_CAUSE, "Rating out of range"); } ...
[ "public", "StatusCode", "postEpisodeRating", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ",", "int", "rating", ",", "String", "sessionID", ",", "String", "guestSessionID", ")", "throws", "MovieDbException", "{", "if", "(", "ratin...
This method lets users rate a TV episode. A valid session id or guest session id is required. @param tvID @param seasonNumber @param episodeNumber @param rating @param sessionID @param guestSessionID @return @throws MovieDbException
[ "This", "method", "lets", "users", "rate", "a", "TV", "episode", ".", "A", "valid", "session", "id", "or", "guest", "session", "id", "is", "required", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L233-L256
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.nameStartsWithIgnoreCase
public static <T extends NamedElement> ElementMatcher.Junction<T> nameStartsWithIgnoreCase(String prefix) { """ Matches a {@link NamedElement} for its name's prefix. The name's capitalization is ignored. @param prefix The expected name's prefix. @param <T> The type of the matched object. @return An elemen...
java
public static <T extends NamedElement> ElementMatcher.Junction<T> nameStartsWithIgnoreCase(String prefix) { return new NameMatcher<T>(new StringMatcher(prefix, StringMatcher.Mode.STARTS_WITH_IGNORE_CASE)); }
[ "public", "static", "<", "T", "extends", "NamedElement", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "nameStartsWithIgnoreCase", "(", "String", "prefix", ")", "{", "return", "new", "NameMatcher", "<", "T", ">", "(", "new", "StringMatcher", "(", "p...
Matches a {@link NamedElement} for its name's prefix. The name's capitalization is ignored. @param prefix The expected name's prefix. @param <T> The type of the matched object. @return An element matcher for a named element's name's prefix.
[ "Matches", "a", "{", "@link", "NamedElement", "}", "for", "its", "name", "s", "prefix", ".", "The", "name", "s", "capitalization", "is", "ignored", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L689-L691