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
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy_binding.java
tunneltrafficpolicy_binding.get
public static tunneltrafficpolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch tunneltrafficpolicy_binding resource of given name . """ tunneltrafficpolicy_binding obj = new tunneltrafficpolicy_binding(); obj.set_name(name); tunneltrafficpolicy_binding resp...
java
public static tunneltrafficpolicy_binding get(nitro_service service, String name) throws Exception{ tunneltrafficpolicy_binding obj = new tunneltrafficpolicy_binding(); obj.set_name(name); tunneltrafficpolicy_binding response = (tunneltrafficpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "tunneltrafficpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tunneltrafficpolicy_binding", "obj", "=", "new", "tunneltrafficpolicy_binding", "(", ")", ";", "obj", ".", "set_name", ...
Use this API to fetch tunneltrafficpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "tunneltrafficpolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy_binding.java#L103-L108
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.illegalCode
public static void illegalCode(Class<?> destination, Class<?> source, String path, Throwable e) { """ Thrown when there is an error in mapper generated class. @param destination destination class @param source source class @param path xml path configuration @param e exception captured """ String additio...
java
public static void illegalCode(Class<?> destination, Class<?> source, String path, Throwable e){ String additionalInformation = e.getMessage().split(",")[1]; throw new IllegalCodeException(MSG.INSTANCE.message(illegalCodePath,destination.getSimpleName(),source.getSimpleName(),path,additionalInformation)); }
[ "public", "static", "void", "illegalCode", "(", "Class", "<", "?", ">", "destination", ",", "Class", "<", "?", ">", "source", ",", "String", "path", ",", "Throwable", "e", ")", "{", "String", "additionalInformation", "=", "e", ".", "getMessage", "(", ")"...
Thrown when there is an error in mapper generated class. @param destination destination class @param source source class @param path xml path configuration @param e exception captured
[ "Thrown", "when", "there", "is", "an", "error", "in", "mapper", "generated", "class", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L590-L593
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/SubClass.java
SubClass.defineField
public void defineField(int modifier, String fieldName, Class<?> type) { """ Define a new field. @param modifier @param fieldName @param type """ defineField(modifier, fieldName, Typ.getTypeFor(type)); }
java
public void defineField(int modifier, String fieldName, Class<?> type) { defineField(modifier, fieldName, Typ.getTypeFor(type)); }
[ "public", "void", "defineField", "(", "int", "modifier", ",", "String", "fieldName", ",", "Class", "<", "?", ">", "type", ")", "{", "defineField", "(", "modifier", ",", "fieldName", ",", "Typ", ".", "getTypeFor", "(", "type", ")", ")", ";", "}" ]
Define a new field. @param modifier @param fieldName @param type
[ "Define", "a", "new", "field", "." ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/SubClass.java#L610-L613
Jasig/uPortal
uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java
UpdatePreferencesServlet.moveTab
@RequestMapping(method = RequestMethod.POST, params = "action=moveTab") public ModelAndView moveTab( HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "sourceID") String sourceId, @RequestParam String method, @RequestParam(val...
java
@RequestMapping(method = RequestMethod.POST, params = "action=moveTab") public ModelAndView moveTab( HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "sourceID") String sourceId, @RequestParam String method, @RequestParam(val...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "POST", ",", "params", "=", "\"action=moveTab\"", ")", "public", "ModelAndView", "moveTab", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "@", "RequestParam", "(", ...
Move a tab left or right. @param sourceId node ID of tab to move @param method insertBefore or appendAfter. If appendAfter, tab is added as last tab (parent of destinationId). @param destinationId insertBefore: node ID of tab to move sourceId before. insertAfter: node ID of another tab @param request @param response @...
[ "Move", "a", "tab", "left", "or", "right", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L530-L575
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java
BoxApiFile.getCopyRequest
public BoxRequestsFile.CopyFile getCopyRequest(String id, String parentId) { """ Gets a request that copies a file @param id id of the file to copy @param parentId id of the parent folder to copy the file into @return request to copy a file """ BoxRequestsFile.CopyFile request = new BoxReques...
java
public BoxRequestsFile.CopyFile getCopyRequest(String id, String parentId) { BoxRequestsFile.CopyFile request = new BoxRequestsFile.CopyFile(id, parentId, getFileCopyUrl(id), mSession); return request; }
[ "public", "BoxRequestsFile", ".", "CopyFile", "getCopyRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsFile", ".", "CopyFile", "request", "=", "new", "BoxRequestsFile", ".", "CopyFile", "(", "id", ",", "parentId", ",", "getFileCopy...
Gets a request that copies a file @param id id of the file to copy @param parentId id of the parent folder to copy the file into @return request to copy a file
[ "Gets", "a", "request", "that", "copies", "a", "file" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java#L209-L212
liyiorg/weixin-popular
src/main/java/weixin/popular/api/PayMchAPI.java
PayMchAPI.mmpaymkttransfersGethbinfo
public static GethbinfoResult mmpaymkttransfersGethbinfo(Gethbinfo gethbinfo,String key) { """ 查询红包记录 <br> 用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。 @since 2.8.5 @param gethbinfo gethbinfo @param key key @return GethbinfoResult """ Map<String,String> map = MapUtil.objectToMap( gethbinfo); String sign = Sign...
java
public static GethbinfoResult mmpaymkttransfersGethbinfo(Gethbinfo gethbinfo,String key){ Map<String,String> map = MapUtil.objectToMap( gethbinfo); String sign = SignatureUtil.generateSign(map,gethbinfo.getSign_type(),key); gethbinfo.setSign(sign); String secapiPayRefundXML = XMLConverUtil.convertToXML( gethbin...
[ "public", "static", "GethbinfoResult", "mmpaymkttransfersGethbinfo", "(", "Gethbinfo", "gethbinfo", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "MapUtil", ".", "objectToMap", "(", "gethbinfo", ")", ";", "String", "sign...
查询红包记录 <br> 用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。 @since 2.8.5 @param gethbinfo gethbinfo @param key key @return GethbinfoResult
[ "查询红包记录", "<br", ">", "用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/PayMchAPI.java#L543-L554
looly/hutool
hutool-core/src/main/java/cn/hutool/core/exceptions/ExceptionUtil.java
ExceptionUtil.isFromOrSuppressedThrowable
public static boolean isFromOrSuppressedThrowable(Throwable throwable, Class<? extends Throwable> exceptionClass) { """ 判断指定异常是否来自或者包含指定异常 @param throwable 异常 @param exceptionClass 定义的引起异常的类 @return true 来自或者包含 @since 4.3.2 """ return convertFromOrSuppressedThrowable(throwable, exceptionClass, true) !=...
java
public static boolean isFromOrSuppressedThrowable(Throwable throwable, Class<? extends Throwable> exceptionClass) { return convertFromOrSuppressedThrowable(throwable, exceptionClass, true) != null; }
[ "public", "static", "boolean", "isFromOrSuppressedThrowable", "(", "Throwable", "throwable", ",", "Class", "<", "?", "extends", "Throwable", ">", "exceptionClass", ")", "{", "return", "convertFromOrSuppressedThrowable", "(", "throwable", ",", "exceptionClass", ",", "t...
判断指定异常是否来自或者包含指定异常 @param throwable 异常 @param exceptionClass 定义的引起异常的类 @return true 来自或者包含 @since 4.3.2
[ "判断指定异常是否来自或者包含指定异常" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/exceptions/ExceptionUtil.java#L256-L258
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.expectsResponseBody
public boolean expectsResponseBody() { """ Checks whether or not the Swagger method expects the response to contain a body. @return true if Swagger method expects the response to contain a body, false otherwise """ boolean result = true; if (TypeUtil.isTypeOrSubTypeOf(returnType, Void.class...
java
public boolean expectsResponseBody() { boolean result = true; if (TypeUtil.isTypeOrSubTypeOf(returnType, Void.class)) { result = false; } else if (TypeUtil.isTypeOrSubTypeOf(returnType, Mono.class) || TypeUtil.isTypeOrSubTypeOf(returnType, Flux.class)) { final Parameteri...
[ "public", "boolean", "expectsResponseBody", "(", ")", "{", "boolean", "result", "=", "true", ";", "if", "(", "TypeUtil", ".", "isTypeOrSubTypeOf", "(", "returnType", ",", "Void", ".", "class", ")", ")", "{", "result", "=", "false", ";", "}", "else", "if"...
Checks whether or not the Swagger method expects the response to contain a body. @return true if Swagger method expects the response to contain a body, false otherwise
[ "Checks", "whether", "or", "not", "the", "Swagger", "method", "expects", "the", "response", "to", "contain", "a", "body", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L489-L507
GerdHolz/TOVAL
src/de/invation/code/toval/validate/Validate.java
Validate.notNegative
public static void notNegative(Double value, String message) { """ Checks if the given double is NOT negative. @param value The double value to validate. @param message The error message to include in the exception in case the validation fails. @throws ParameterException if the given double value is <code>null<...
java
public static void notNegative(Double value, String message) { if(!validation) return; notNull(value); notNull(message); if(value < 0) throw new ParameterException(ErrorCode.NEGATIVE, message); }
[ "public", "static", "void", "notNegative", "(", "Double", "value", ",", "String", "message", ")", "{", "if", "(", "!", "validation", ")", "return", ";", "notNull", "(", "value", ")", ";", "notNull", "(", "message", ")", ";", "if", "(", "value", "<", ...
Checks if the given double is NOT negative. @param value The double value to validate. @param message The error message to include in the exception in case the validation fails. @throws ParameterException if the given double value is <code>null</code> or smaller than 0.
[ "Checks", "if", "the", "given", "double", "is", "NOT", "negative", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/validate/Validate.java#L691-L697
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java
BaseDataJsonFieldBo.getDataAttrAsDate
public Date getDataAttrAsDate(String dPath, String dateTimeFormat) { """ Get a "data"'s sub-attribute as date. If the attribute value is a string, parse it as a {@link Date} using the specified date-time format. @param dPath @param dateTimeFormat @return """ Lock lock = lockForRead(); try...
java
public Date getDataAttrAsDate(String dPath, String dateTimeFormat) { Lock lock = lockForRead(); try { return DPathUtils.getDate(dataJson, dPath, dateTimeFormat); } finally { lock.unlock(); } }
[ "public", "Date", "getDataAttrAsDate", "(", "String", "dPath", ",", "String", "dateTimeFormat", ")", "{", "Lock", "lock", "=", "lockForRead", "(", ")", ";", "try", "{", "return", "DPathUtils", ".", "getDate", "(", "dataJson", ",", "dPath", ",", "dateTimeForm...
Get a "data"'s sub-attribute as date. If the attribute value is a string, parse it as a {@link Date} using the specified date-time format. @param dPath @param dateTimeFormat @return
[ "Get", "a", "data", "s", "sub", "-", "attribute", "as", "date", ".", "If", "the", "attribute", "value", "is", "a", "string", "parse", "it", "as", "a", "{", "@link", "Date", "}", "using", "the", "specified", "date", "-", "time", "format", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java#L170-L177
actframework/actframework
src/main/java/act/ws/WebSocketConnectionManager.java
WebSocketConnectionManager.sendJsonToTagged
public void sendJsonToTagged(Object data, String ... labels) { """ Send JSON representation of given data object to all connections tagged with all give tag labels @param data the data object @param labels the tag labels """ for (String label : labels) { sendJsonToTagged(data, label); ...
java
public void sendJsonToTagged(Object data, String ... labels) { for (String label : labels) { sendJsonToTagged(data, label); } }
[ "public", "void", "sendJsonToTagged", "(", "Object", "data", ",", "String", "...", "labels", ")", "{", "for", "(", "String", "label", ":", "labels", ")", "{", "sendJsonToTagged", "(", "data", ",", "label", ")", ";", "}", "}" ]
Send JSON representation of given data object to all connections tagged with all give tag labels @param data the data object @param labels the tag labels
[ "Send", "JSON", "representation", "of", "given", "data", "object", "to", "all", "connections", "tagged", "with", "all", "give", "tag", "labels" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/ws/WebSocketConnectionManager.java#L179-L183
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java
INFLO.computeNeighborhoods
private void computeNeighborhoods(Relation<O> relation, DataStore<SetDBIDs> knns, ModifiableDBIDs pruned, WritableDataStore<ModifiableDBIDs> rNNminuskNNs) { """ Compute the reverse kNN minus the kNN. <p> This is based on algorithm 2 (two-way search) from the INFLO paper, but unfortunately this algorithm does no...
java
private void computeNeighborhoods(Relation<O> relation, DataStore<SetDBIDs> knns, ModifiableDBIDs pruned, WritableDataStore<ModifiableDBIDs> rNNminuskNNs) { FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Finding RkNN", relation.size(), LOG) : null; for(DBIDIter iter = relation.iterDBIDs(); iter.val...
[ "private", "void", "computeNeighborhoods", "(", "Relation", "<", "O", ">", "relation", ",", "DataStore", "<", "SetDBIDs", ">", "knns", ",", "ModifiableDBIDs", "pruned", ",", "WritableDataStore", "<", "ModifiableDBIDs", ">", "rNNminuskNNs", ")", "{", "FiniteProgres...
Compute the reverse kNN minus the kNN. <p> This is based on algorithm 2 (two-way search) from the INFLO paper, but unfortunately this algorithm does not compute the RkNN correctly, but rather \( RkNN \cap kNN \), which is quite useless given that we will use the union of that with kNN later on. Therefore, we decided to...
[ "Compute", "the", "reverse", "kNN", "minus", "the", "kNN", ".", "<p", ">", "This", "is", "based", "on", "algorithm", "2", "(", "two", "-", "way", "search", ")", "from", "the", "INFLO", "paper", "but", "unfortunately", "this", "algorithm", "does", "not", ...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java#L185-L213
javamonkey/beetl2.0
beetl-core/src/main/java/org/beetl/core/om/ObjectUtil.java
ObjectUtil.invoke
private static Object invoke(Class target, Object o, String methodName, Object[] paras) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { """ Beetl 本地方法调用即调用此类,需要考虑到多态。beetl自动调用第一个匹配到的函数,而不会像java那样,调用最合适的匹配到的函数 @param o 对象实例 @param methodName 方法名 @param paras 方法参数 @return...
java
private static Object invoke(Class target, Object o, String methodName, Object[] paras) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { ObjectInfo info = getObjectInfo(target); Class[] parameterType = new Class[paras.length]; int i = 0; for (Object para : paras) ...
[ "private", "static", "Object", "invoke", "(", "Class", "target", ",", "Object", "o", ",", "String", "methodName", ",", "Object", "[", "]", "paras", ")", "throws", "IllegalAccessException", ",", "IllegalArgumentException", ",", "InvocationTargetException", "{", "Ob...
Beetl 本地方法调用即调用此类,需要考虑到多态。beetl自动调用第一个匹配到的函数,而不会像java那样,调用最合适的匹配到的函数 @param o 对象实例 @param methodName 方法名 @param paras 方法参数 @return @throws IllegalAccessException @throws IllegalArgumentException @throws InvocationTargetException
[ "Beetl", "本地方法调用即调用此类,需要考虑到多态。beetl自动调用第一个匹配到的函数,而不会像java那样,调用最合适的匹配到的函数" ]
train
https://github.com/javamonkey/beetl2.0/blob/f32f729ad238079df5aca6e38a3c3ba0a55c78d6/beetl-core/src/main/java/org/beetl/core/om/ObjectUtil.java#L492-L511
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.mapping
public static void mapping(String mappedFieldName, String mappedClassName, String targetClassName) { """ Thrown when the target class doesn't exist in classes parameter. @param mappedFieldName name of the mapped field @param mappedClassName name of the mapped field's class @param targetClassName name of the tar...
java
public static void mapping(String mappedFieldName, String mappedClassName, String targetClassName){ throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException3,mappedFieldName,mappedClassName,targetClassName)); }
[ "public", "static", "void", "mapping", "(", "String", "mappedFieldName", ",", "String", "mappedClassName", ",", "String", "targetClassName", ")", "{", "throw", "new", "MappingErrorException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "mappingErrorException3"...
Thrown when the target class doesn't exist in classes parameter. @param mappedFieldName name of the mapped field @param mappedClassName name of the mapped field's class @param targetClassName name of the target field's class
[ "Thrown", "when", "the", "target", "class", "doesn", "t", "exist", "in", "classes", "parameter", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L472-L474
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.removeChildProperty
protected PropertyData removeChildProperty(final String parentIdentifier, final String childIdentifier) { """ Remove property by id if parent properties are cached in CP. @param parentIdentifier - parent id @param childIdentifier - property id @return removed property or null if property not cached or paren...
java
protected PropertyData removeChildProperty(final String parentIdentifier, final String childIdentifier) { final List<PropertyData> childProperties = propertiesCache.get(parentIdentifier); if (childProperties != null) { synchronized (childProperties) { // [PN] 17.01.07 ...
[ "protected", "PropertyData", "removeChildProperty", "(", "final", "String", "parentIdentifier", ",", "final", "String", "childIdentifier", ")", "{", "final", "List", "<", "PropertyData", ">", "childProperties", "=", "propertiesCache", ".", "get", "(", "parentIdentifie...
Remove property by id if parent properties are cached in CP. @param parentIdentifier - parent id @param childIdentifier - property id @return removed property or null if property not cached or parent properties are not cached
[ "Remove", "property", "by", "id", "if", "parent", "properties", "are", "cached", "in", "CP", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L2065-L2088
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cql3/MultiColumnRelation.java
MultiColumnRelation.createNonInRelation
public static MultiColumnRelation createNonInRelation(List<ColumnIdentifier.Raw> entities, Operator relationType, Term.MultiColumnRaw valuesOrMarker) { """ Creates a multi-column EQ, LT, LTE, GT, or GTE relation. For example: "SELECT ... WHERE (a, b) > (0, 1)" @param entities the columns on the LHS of the relati...
java
public static MultiColumnRelation createNonInRelation(List<ColumnIdentifier.Raw> entities, Operator relationType, Term.MultiColumnRaw valuesOrMarker) { assert relationType != Operator.IN; return new MultiColumnRelation(entities, relationType, valuesOrMarker, null, null); }
[ "public", "static", "MultiColumnRelation", "createNonInRelation", "(", "List", "<", "ColumnIdentifier", ".", "Raw", ">", "entities", ",", "Operator", "relationType", ",", "Term", ".", "MultiColumnRaw", "valuesOrMarker", ")", "{", "assert", "relationType", "!=", "Ope...
Creates a multi-column EQ, LT, LTE, GT, or GTE relation. For example: "SELECT ... WHERE (a, b) > (0, 1)" @param entities the columns on the LHS of the relation @param relationType the relation operator @param valuesOrMarker a Tuples.Literal instance or a Tuples.Raw marker
[ "Creates", "a", "multi", "-", "column", "EQ", "LT", "LTE", "GT", "or", "GTE", "relation", ".", "For", "example", ":", "SELECT", "...", "WHERE", "(", "a", "b", ")", ">", "(", "0", "1", ")" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cql3/MultiColumnRelation.java#L59-L63
ben-manes/caffeine
caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java
BoundedLocalCache.expireAfterWriteOrder
@SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { """ Returns an unmodifiable snapshot map ordered in write expiration order, either ascending or descending. Beware that obtaining the mappings is <em>NOT</em> a constant-time operation....
java
@SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { Supplier<Iterator<Node<K, V>>> iteratorSupplier = () -> oldest ? writeOrderDeque().iterator() : writeOrderDeque().descendingIterator(); return fixedSnapshot(iteratorSu...
[ "@", "SuppressWarnings", "(", "\"GuardedByChecker\"", ")", "Map", "<", "K", ",", "V", ">", "expireAfterWriteOrder", "(", "int", "limit", ",", "Function", "<", "V", ",", "V", ">", "transformer", ",", "boolean", "oldest", ")", "{", "Supplier", "<", "Iterator...
Returns an unmodifiable snapshot map ordered in write expiration order, either ascending or descending. Beware that obtaining the mappings is <em>NOT</em> a constant-time operation. @param limit the maximum number of entries @param transformer a function that unwraps the value @param oldest the iteration order @return...
[ "Returns", "an", "unmodifiable", "snapshot", "map", "ordered", "in", "write", "expiration", "order", "either", "ascending", "or", "descending", ".", "Beware", "that", "obtaining", "the", "mappings", "is", "<em", ">", "NOT<", "/", "em", ">", "a", "constant", ...
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java#L2687-L2693
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/dialog/FastAdapterDialog.java
FastAdapterDialog.withNeutralButton
public FastAdapterDialog<Item> withNeutralButton(@StringRes int textRes, OnClickListener listener) { """ Set a listener to be invoked when the neutral button of the dialog is pressed. @param textRes The resource id of the text to display in the neutral button @param listener The {@link DialogInterface.OnClick...
java
public FastAdapterDialog<Item> withNeutralButton(@StringRes int textRes, OnClickListener listener) { return withButton(BUTTON_NEUTRAL, textRes, listener); }
[ "public", "FastAdapterDialog", "<", "Item", ">", "withNeutralButton", "(", "@", "StringRes", "int", "textRes", ",", "OnClickListener", "listener", ")", "{", "return", "withButton", "(", "BUTTON_NEUTRAL", ",", "textRes", ",", "listener", ")", ";", "}" ]
Set a listener to be invoked when the neutral button of the dialog is pressed. @param textRes The resource id of the text to display in the neutral button @param listener The {@link DialogInterface.OnClickListener} to use. @return This Builder object to allow for chaining of calls to set methods
[ "Set", "a", "listener", "to", "be", "invoked", "when", "the", "neutral", "button", "of", "the", "dialog", "is", "pressed", "." ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/dialog/FastAdapterDialog.java#L206-L208
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java
StringSupport.split
public static List<String> split(String input, String punctuationChars, boolean sort, boolean convertToLowerCase, boolean distinct) { """ reads all words in a text @param input @param punctuationChars characters that can not belong to words and are therefore separators @param sort whether to sort the r...
java
public static List<String> split(String input, String punctuationChars, boolean sort, boolean convertToLowerCase, boolean distinct) { return split(input, punctuationChars, "\"", sort, convertToLowerCase, distinct); }
[ "public", "static", "List", "<", "String", ">", "split", "(", "String", "input", ",", "String", "punctuationChars", ",", "boolean", "sort", ",", "boolean", "convertToLowerCase", ",", "boolean", "distinct", ")", "{", "return", "split", "(", "input", ",", "pun...
reads all words in a text @param input @param punctuationChars characters that can not belong to words and are therefore separators @param sort whether to sort the result alphabetically. (If the result is sorted, setting the distinct flag to false has no effect) @param convertToLowerCase whether to convert all ...
[ "reads", "all", "words", "in", "a", "text" ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java#L568-L570
azkaban/azkaban
az-core/src/main/java/azkaban/utils/PropsUtils.java
PropsUtils.loadPropsInDir
public static Props loadPropsInDir(final File dir, final String... suffixes) { """ Load job schedules from the given directories @param dir The directory to look in @param suffixes File suffixes to load @return The loaded set of schedules """ return loadPropsInDir(null, dir, suffixes); }
java
public static Props loadPropsInDir(final File dir, final String... suffixes) { return loadPropsInDir(null, dir, suffixes); }
[ "public", "static", "Props", "loadPropsInDir", "(", "final", "File", "dir", ",", "final", "String", "...", "suffixes", ")", "{", "return", "loadPropsInDir", "(", "null", ",", "dir", ",", "suffixes", ")", ";", "}" ]
Load job schedules from the given directories @param dir The directory to look in @param suffixes File suffixes to load @return The loaded set of schedules
[ "Load", "job", "schedules", "from", "the", "given", "directories" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-core/src/main/java/azkaban/utils/PropsUtils.java#L62-L64
JakeWharton/ActionBarSherlock
actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java
SuggestionsAdapter.setViewDrawable
private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) { """ Sets the drawable in an image view, makes sure the view is only visible if there is a drawable. """ // Set the icon even if the drawable is null, since we need to clear any // previous icon. v.setIma...
java
private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) { // Set the icon even if the drawable is null, since we need to clear any // previous icon. v.setImageDrawable(drawable); if (drawable == null) { v.setVisibility(nullVisibility); } else...
[ "private", "void", "setViewDrawable", "(", "ImageView", "v", ",", "Drawable", "drawable", ",", "int", "nullVisibility", ")", "{", "// Set the icon even if the drawable is null, since we need to clear any", "// previous icon.", "v", ".", "setImageDrawable", "(", "drawable", ...
Sets the drawable in an image view, makes sure the view is only visible if there is a drawable.
[ "Sets", "the", "drawable", "in", "an", "image", "view", "makes", "sure", "the", "view", "is", "only", "visible", "if", "there", "is", "a", "drawable", "." ]
train
https://github.com/JakeWharton/ActionBarSherlock/blob/2c71339e756bcc0b1424c4525680549ba3a2dc97/actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java#L460-L478
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSection.java
IPv6AddressSection.bitwiseOr
public IPv6AddressSection bitwiseOr(IPv6AddressSection mask, boolean retainPrefix) throws IncompatibleAddressException, SizeMismatchException { """ Does the bitwise disjunction with this address. Useful when subnetting. Similar to {@link #mask(IPv6AddressSection)} which does the bitwise conjunction. @param ma...
java
public IPv6AddressSection bitwiseOr(IPv6AddressSection mask, boolean retainPrefix) throws IncompatibleAddressException, SizeMismatchException { checkMaskSectionCount(mask); return getOredSegments( this, retainPrefix ? getPrefixLength() : null, getAddressCreator(), true, this::getSegment, i -...
[ "public", "IPv6AddressSection", "bitwiseOr", "(", "IPv6AddressSection", "mask", ",", "boolean", "retainPrefix", ")", "throws", "IncompatibleAddressException", ",", "SizeMismatchException", "{", "checkMaskSectionCount", "(", "mask", ")", ";", "return", "getOredSegments", "...
Does the bitwise disjunction with this address. Useful when subnetting. Similar to {@link #mask(IPv6AddressSection)} which does the bitwise conjunction. @param mask @param retainPrefix whether to drop the prefix @return @throws IncompatibleAddressException
[ "Does", "the", "bitwise", "disjunction", "with", "this", "address", ".", "Useful", "when", "subnetting", ".", "Similar", "to", "{", "@link", "#mask", "(", "IPv6AddressSection", ")", "}", "which", "does", "the", "bitwise", "conjunction", "." ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSection.java#L1759-L1768
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java
UserProfileHandlerImpl.preSave
private void preSave(UserProfile userProfile, boolean isNew) throws Exception { """ Notifying listeners before profile creation. @param userProfile the user profile which is used in save operation @param isNew true, if we have a deal with new profile, otherwise it is false which mean update operation is in ...
java
private void preSave(UserProfile userProfile, boolean isNew) throws Exception { for (UserProfileEventListener listener : listeners) { listener.preSave(userProfile, isNew); } }
[ "private", "void", "preSave", "(", "UserProfile", "userProfile", ",", "boolean", "isNew", ")", "throws", "Exception", "{", "for", "(", "UserProfileEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "preSave", "(", "userProfile", ",", "isNew...
Notifying listeners before profile creation. @param userProfile the user profile which is used in save operation @param isNew true, if we have a deal with new profile, otherwise it is false which mean update operation is in progress @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "before", "profile", "creation", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java#L408-L414
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.matches
public static boolean matches(Class superclassOrIntf, Class otherclass) { """ Checks whether the "otherclass" is a subclass of the given "superclassOrIntf" or whether it implements "superclassOrIntf". @param superclassOrIntf the superclass/interface to check against @param otherclass this clas...
java
public static boolean matches(Class superclassOrIntf, Class otherclass) { return isSubclass(superclassOrIntf, otherclass) || hasInterface(superclassOrIntf, otherclass); }
[ "public", "static", "boolean", "matches", "(", "Class", "superclassOrIntf", ",", "Class", "otherclass", ")", "{", "return", "isSubclass", "(", "superclassOrIntf", ",", "otherclass", ")", "||", "hasInterface", "(", "superclassOrIntf", ",", "otherclass", ")", ";", ...
Checks whether the "otherclass" is a subclass of the given "superclassOrIntf" or whether it implements "superclassOrIntf". @param superclassOrIntf the superclass/interface to check against @param otherclass this class is checked whether it is a subclass of the the superclass @return ...
[ "Checks", "whether", "the", "otherclass", "is", "a", "subclass", "of", "the", "given", "superclassOrIntf", "or", "whether", "it", "implements", "superclassOrIntf", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L703-L705
ansell/restlet-utils
src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java
RestletUtilSesameRealm.buildSparqlQueryToFindUser
protected String buildSparqlQueryToFindUser(final String userIdentifier, boolean findAllUsers) { """ Builds a SPARQL query to retrieve details of a RestletUtilUser. This method could be overridden to search for other information regarding a user. @param userIdentifier The unique identifier of the User to sear...
java
protected String buildSparqlQueryToFindUser(final String userIdentifier, boolean findAllUsers) { if(!findAllUsers && userIdentifier == null) { throw new NullPointerException("User identifier was null"); } final StringBuilder query = new StringBuilder(); ...
[ "protected", "String", "buildSparqlQueryToFindUser", "(", "final", "String", "userIdentifier", ",", "boolean", "findAllUsers", ")", "{", "if", "(", "!", "findAllUsers", "&&", "userIdentifier", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\...
Builds a SPARQL query to retrieve details of a RestletUtilUser. This method could be overridden to search for other information regarding a user. @param userIdentifier The unique identifier of the User to search for. @param findAllUsers True to find all users, and false to only find the specified user. @return A Strin...
[ "Builds", "a", "SPARQL", "query", "to", "retrieve", "details", "of", "a", "RestletUtilUser", ".", "This", "method", "could", "be", "overridden", "to", "search", "for", "other", "information", "regarding", "a", "user", "." ]
train
https://github.com/ansell/restlet-utils/blob/6c39a3e91aa8295936af1dbfccd6ba27230c40a9/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java#L630-L666
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForWebElement
public WebElement waitForWebElement(final By by, int minimumNumberOfMatches, int timeout, boolean scroll) { """ Waits for a web element. @param by the By object. Examples are By.id("id") and By.name("name") @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} mea...
java
public WebElement waitForWebElement(final By by, int minimumNumberOfMatches, int timeout, boolean scroll){ final long endTime = SystemClock.uptimeMillis() + timeout; while (true) { final boolean timedOut = SystemClock.uptimeMillis() > endTime; if (timedOut){ searcher.logMatchesFound(by.getValue()); ...
[ "public", "WebElement", "waitForWebElement", "(", "final", "By", "by", ",", "int", "minimumNumberOfMatches", ",", "int", "timeout", ",", "boolean", "scroll", ")", "{", "final", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "timeout...
Waits for a web element. @param by the By object. Examples are By.id("id") and By.name("name") @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches @param timeout the the amount of time in milliseconds to wait @param scroll {@code true} if scr...
[ "Waits", "for", "a", "web", "element", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L483-L505
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/lock/ClientLockManager.java
ClientLockManager.unlockThisRecord
public boolean unlockThisRecord(Task objSession, String strDatabaseName, String strRecordName, Object bookmark) throws DBException { """ Unlock this bookmark in this record for this session. @param strRecordName The record to unlock in. @param bookmark The bookmark to unlock (or null to unlock all for th...
java
public boolean unlockThisRecord(Task objSession, String strDatabaseName, String strRecordName, Object bookmark) throws DBException { SessionInfo sessionInfo = this.getLockSessionInfo(objSession, null); try { boolean bSuccess = this.getRemoteLockSession(sessionInfo).unlockThisReco...
[ "public", "boolean", "unlockThisRecord", "(", "Task", "objSession", ",", "String", "strDatabaseName", ",", "String", "strRecordName", ",", "Object", "bookmark", ")", "throws", "DBException", "{", "SessionInfo", "sessionInfo", "=", "this", ".", "getLockSessionInfo", ...
Unlock this bookmark in this record for this session. @param strRecordName The record to unlock in. @param bookmark The bookmark to unlock (or null to unlock all for this session). @param objSession The session that wants to unlock. @param iLockType The type of lock (wait or error lock). @return True if successful.
[ "Unlock", "this", "bookmark", "in", "this", "record", "for", "this", "session", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/lock/ClientLockManager.java#L91-L103
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java
CmsSitesWebserverThread.deleteAllWebserverConfigs
private void deleteAllWebserverConfigs(final String prefix) { """ Deletes all web server's configuration files with the given prefix.<p> @param prefix a prefix used for the webserver configuration files """ File file = new File(m_targetPath); if (file.exists() && file.isDirectory()) { ...
java
private void deleteAllWebserverConfigs(final String prefix) { File file = new File(m_targetPath); if (file.exists() && file.isDirectory()) { File[] configFiles = file.listFiles(new FilenameFilter() { /** * @see java.io.FilenameFilter#accept(java.io.File, ja...
[ "private", "void", "deleteAllWebserverConfigs", "(", "final", "String", "prefix", ")", "{", "File", "file", "=", "new", "File", "(", "m_targetPath", ")", ";", "if", "(", "file", ".", "exists", "(", ")", "&&", "file", ".", "isDirectory", "(", ")", ")", ...
Deletes all web server's configuration files with the given prefix.<p> @param prefix a prefix used for the webserver configuration files
[ "Deletes", "all", "web", "server", "s", "configuration", "files", "with", "the", "given", "prefix", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java#L260-L282
remkop/picocli
src/main/java/picocli/groovy/PicocliBaseScript.java
PicocliBaseScript.handleExecutionException
public Object handleExecutionException(CommandLine commandLine, String[] args, Exception ex) { """ If an Exception occurs during {@link #runRunnableSubcommand(List)}, or {@link #runScriptBody()} then this gets called to report the problem. The default behavior is to throw a new {@code ExecutionException} wrappin...
java
public Object handleExecutionException(CommandLine commandLine, String[] args, Exception ex) { if (ex instanceof ExecutionException) { throw (ExecutionException) ex; } throw new ExecutionException(commandLine, ex.toString(), ex); }
[ "public", "Object", "handleExecutionException", "(", "CommandLine", "commandLine", ",", "String", "[", "]", "args", ",", "Exception", "ex", ")", "{", "if", "(", "ex", "instanceof", "ExecutionException", ")", "{", "throw", "(", "ExecutionException", ")", "ex", ...
If an Exception occurs during {@link #runRunnableSubcommand(List)}, or {@link #runScriptBody()} then this gets called to report the problem. The default behavior is to throw a new {@code ExecutionException} wrapping the specified exception. @param commandLine The CommandLine instance @param args The argument array @pa...
[ "If", "an", "Exception", "occurs", "during", "{", "@link", "#runRunnableSubcommand", "(", "List", ")", "}", "or", "{", "@link", "#runScriptBody", "()", "}", "then", "this", "gets", "called", "to", "report", "the", "problem", ".", "The", "default", "behavior"...
train
https://github.com/remkop/picocli/blob/3c5384f0d12817401d1921c3013c1282e2edcab2/src/main/java/picocli/groovy/PicocliBaseScript.java#L258-L263
jenkinsci/jenkins
core/src/main/java/hudson/model/LoadStatistics.java
LoadStatistics.computeSnapshot
public LoadStatisticsSnapshot computeSnapshot() { """ Computes a self-consistent snapshot of the load statistics. Note: The original method of computing load statistics would compute the total and idle counts independently which could lead to counting errors while jobs started in between the different state co...
java
public LoadStatisticsSnapshot computeSnapshot() { if (modern) { return computeSnapshot(Jenkins.getInstance().getQueue().getBuildableItems()); } else { int t = computeTotalExecutors(); int i = computeIdleExecutors(); return new LoadStatisticsSnapshot(t, t, ...
[ "public", "LoadStatisticsSnapshot", "computeSnapshot", "(", ")", "{", "if", "(", "modern", ")", "{", "return", "computeSnapshot", "(", "Jenkins", ".", "getInstance", "(", ")", ".", "getQueue", "(", ")", ".", "getBuildableItems", "(", ")", ")", ";", "}", "e...
Computes a self-consistent snapshot of the load statistics. Note: The original method of computing load statistics would compute the total and idle counts independently which could lead to counting errors while jobs started in between the different state counting operations. By returning a {@link LoadStatisticsSnapsho...
[ "Computes", "a", "self", "-", "consistent", "snapshot", "of", "the", "load", "statistics", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/LoadStatistics.java#L333-L341
finnyb/javampd
src/main/java/org/bff/javampd/monitor/MPDErrorMonitor.java
MPDErrorMonitor.fireMPDErrorEvent
protected void fireMPDErrorEvent(String message) { """ Sends the appropriate {@link ErrorListener} to all registered {@link ErrorListener}s. @param message the event message """ ErrorEvent ee = new ErrorEvent(this, message); for (ErrorListener el : errorListeners) { el.errorEve...
java
protected void fireMPDErrorEvent(String message) { ErrorEvent ee = new ErrorEvent(this, message); for (ErrorListener el : errorListeners) { el.errorEventReceived(ee); } }
[ "protected", "void", "fireMPDErrorEvent", "(", "String", "message", ")", "{", "ErrorEvent", "ee", "=", "new", "ErrorEvent", "(", "this", ",", "message", ")", ";", "for", "(", "ErrorListener", "el", ":", "errorListeners", ")", "{", "el", ".", "errorEventRecei...
Sends the appropriate {@link ErrorListener} to all registered {@link ErrorListener}s. @param message the event message
[ "Sends", "the", "appropriate", "{", "@link", "ErrorListener", "}", "to", "all", "registered", "{", "@link", "ErrorListener", "}", "s", "." ]
train
https://github.com/finnyb/javampd/blob/186736e85fc238b4208cc9ee23373f9249376b4c/src/main/java/org/bff/javampd/monitor/MPDErrorMonitor.java#L36-L42
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java
Director.installAssets
public void installAssets(Collection<String> assetIds, RepositoryConnectionList loginInfo) throws InstallException { """ Installs the specified assets @param assetIds Collection of asset Ids @param loginInfo RepositoryConnectionList to access repository with assets @throws InstallException """ fir...
java
public void installAssets(Collection<String> assetIds, RepositoryConnectionList loginInfo) throws InstallException { fireProgressEvent(InstallProgressEvent.CHECK, 1, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_CHECKING_ASSETS")); if (assetIds == null || assetIds.isEmpty()) { throw...
[ "public", "void", "installAssets", "(", "Collection", "<", "String", ">", "assetIds", ",", "RepositoryConnectionList", "loginInfo", ")", "throws", "InstallException", "{", "fireProgressEvent", "(", "InstallProgressEvent", ".", "CHECK", ",", "1", ",", "Messages", "."...
Installs the specified assets @param assetIds Collection of asset Ids @param loginInfo RepositoryConnectionList to access repository with assets @throws InstallException
[ "Installs", "the", "specified", "assets" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L1399-L1414
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/SoyExpression.java
SoyExpression.unboxAsString
public SoyExpression unboxAsString() { """ Unboxes this to a {@link SoyExpression} with a String runtime type. <p>This method is appropriate when you know (likely via inspection of the {@link #soyType()}, or other means) that the value does have the appropriate type but you prefer to interact with it as its u...
java
public SoyExpression unboxAsString() { if (alreadyUnboxed(String.class)) { return this; } assertBoxed(String.class); Expression unboxedString; if (delegate.isNonNullable()) { unboxedString = delegate.invoke(MethodRef.SOY_VALUE_STRING_VALUE); } else { unboxedString = ...
[ "public", "SoyExpression", "unboxAsString", "(", ")", "{", "if", "(", "alreadyUnboxed", "(", "String", ".", "class", ")", ")", "{", "return", "this", ";", "}", "assertBoxed", "(", "String", ".", "class", ")", ";", "Expression", "unboxedString", ";", "if", ...
Unboxes this to a {@link SoyExpression} with a String runtime type. <p>This method is appropriate when you know (likely via inspection of the {@link #soyType()}, or other means) that the value does have the appropriate type but you prefer to interact with it as its unboxed representation. If you simply want to 'coerce...
[ "Unboxes", "this", "to", "a", "{", "@link", "SoyExpression", "}", "with", "a", "String", "runtime", "type", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/SoyExpression.java#L483-L506
timtiemens/secretshare
src/main/java/com/tiemens/secretshare/engine/SecretShare.java
SecretShare.createRandomModulusForSecret
public static BigInteger createRandomModulusForSecret(BigInteger secret) { """ NOTE: you should prefer createAppropriateModulusForSecret() over this method. @param secret as biginteger @return prime modulus big enough for secret """ Random random = new SecureRandom(); return createRandomMo...
java
public static BigInteger createRandomModulusForSecret(BigInteger secret) { Random random = new SecureRandom(); return createRandomModulusForSecret(secret, random); }
[ "public", "static", "BigInteger", "createRandomModulusForSecret", "(", "BigInteger", "secret", ")", "{", "Random", "random", "=", "new", "SecureRandom", "(", ")", ";", "return", "createRandomModulusForSecret", "(", "secret", ",", "random", ")", ";", "}" ]
NOTE: you should prefer createAppropriateModulusForSecret() over this method. @param secret as biginteger @return prime modulus big enough for secret
[ "NOTE", ":", "you", "should", "prefer", "createAppropriateModulusForSecret", "()", "over", "this", "method", "." ]
train
https://github.com/timtiemens/secretshare/blob/f5f88929af99ae0ed0df02dc802e40cdb25fceac/src/main/java/com/tiemens/secretshare/engine/SecretShare.java#L136-L141
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanO.java
BeanO.getEJBHome
@Override public EJBHome getEJBHome() { """ Return <code>EJBHome</code> instance associated with this <code>BeanO</code>. <p> """ try { EJSWrapper wrapper = home.getWrapper().getRemoteWrapper(); Object wrapperRef = container.getEJBRuntime().getRemoteReference(wrappe...
java
@Override public EJBHome getEJBHome() { try { EJSWrapper wrapper = home.getWrapper().getRemoteWrapper(); Object wrapperRef = container.getEJBRuntime().getRemoteReference(wrapper); // The EJB spec does not require us to narrow to the actual home //...
[ "@", "Override", "public", "EJBHome", "getEJBHome", "(", ")", "{", "try", "{", "EJSWrapper", "wrapper", "=", "home", ".", "getWrapper", "(", ")", ".", "getRemoteWrapper", "(", ")", ";", "Object", "wrapperRef", "=", "container", ".", "getEJBRuntime", "(", "...
Return <code>EJBHome</code> instance associated with this <code>BeanO</code>. <p>
[ "Return", "<code", ">", "EJBHome<", "/", "code", ">", "instance", "associated", "with", "this", "<code", ">", "BeanO<", "/", "code", ">", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanO.java#L724-L760
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/CmsRebuildSearchIndexDialog.java
CmsRebuildSearchIndexDialog.createDialogHtml
@Override protected String createDialogHtml(String dialog) { """ Creates the dialog HTML for all defined widgets of the named dialog (page).<p> This overwrites the method from the super class to create a layout variation for the widgets.<p> @param dialog the dialog (page) to get the HTML for @return the...
java
@Override protected String createDialogHtml(String dialog) { StringBuffer result = new StringBuffer(512); result.append(createWidgetTableStart()); // show error header once if there were validation errors result.append(createWidgetErrorHeader()); if (dialog.equals(PAGES[0]...
[ "@", "Override", "protected", "String", "createDialogHtml", "(", "String", "dialog", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "512", ")", ";", "result", ".", "append", "(", "createWidgetTableStart", "(", ")", ")", ";", "// show erro...
Creates the dialog HTML for all defined widgets of the named dialog (page).<p> This overwrites the method from the super class to create a layout variation for the widgets.<p> @param dialog the dialog (page) to get the HTML for @return the dialog HTML for all defined widgets of the named dialog (page)
[ "Creates", "the", "dialog", "HTML", "for", "all", "defined", "widgets", "of", "the", "named", "dialog", "(", "page", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsRebuildSearchIndexDialog.java#L107-L133
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java
Convolution.col2im
public static INDArray col2im(INDArray col, int sH, int sW, int ph, int pW, int kH, int kW) { """ Rearrange matrix columns into blocks @param col the column transposed image to convert @param sH stride height @param sW stride width @param ph padding height @param pW padding width @param kH height @...
java
public static INDArray col2im(INDArray col, int sH, int sW, int ph, int pW, int kH, int kW) { if (col.rank() != 6) throw new IllegalArgumentException("col2im input array must be rank 6"); INDArray output = Nd4j.create(col.dataType(), new long[]{col.size(0), col.size(1), kH, kW}); v...
[ "public", "static", "INDArray", "col2im", "(", "INDArray", "col", ",", "int", "sH", ",", "int", "sW", ",", "int", "ph", ",", "int", "pW", ",", "int", "kH", ",", "int", "kW", ")", "{", "if", "(", "col", ".", "rank", "(", ")", "!=", "6", ")", "...
Rearrange matrix columns into blocks @param col the column transposed image to convert @param sH stride height @param sW stride width @param ph padding height @param pW padding width @param kH height @param kW width @return
[ "Rearrange", "matrix", "columns", "into", "blocks" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java#L77-L102
kefirfromperm/kefirbb
src/org/kefirsf/bb/DomConfigurationFactory.java
DomConfigurationFactory.parseNamedElement
private PatternElement parseNamedElement(Node el, Map<String, Scope> scopes) { """ Parse a pattern named element. Text or Variable. @param el a DOM-element @param scopes map of scopes by name @return Text or Variable """ PatternElement namedElement; if ( nodeAttribute(e...
java
private PatternElement parseNamedElement(Node el, Map<String, Scope> scopes) { PatternElement namedElement; if ( nodeAttribute(el, TAG_VAR_ATTR_PARSE, DEFAULT_PARSE_VALUE) && !nodeHasAttribute(el, TAG_VAR_ATTR_REGEX) && !nodeHasAttribute(el...
[ "private", "PatternElement", "parseNamedElement", "(", "Node", "el", ",", "Map", "<", "String", ",", "Scope", ">", "scopes", ")", "{", "PatternElement", "namedElement", ";", "if", "(", "nodeAttribute", "(", "el", ",", "TAG_VAR_ATTR_PARSE", ",", "DEFAULT_PARSE_VA...
Parse a pattern named element. Text or Variable. @param el a DOM-element @param scopes map of scopes by name @return Text or Variable
[ "Parse", "a", "pattern", "named", "element", ".", "Text", "or", "Variable", "." ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/DomConfigurationFactory.java#L469-L481
apache/groovy
src/main/java/org/codehaus/groovy/vmplugin/v7/IndyGuardsFiltersAndSignatures.java
IndyGuardsFiltersAndSignatures.sameClass
public static boolean sameClass(Class c, Object o) { """ Guard to check if the provided Object has the same class as the provided Class. This method will return false if the Object is null. """ if (o==null) return false; return o.getClass() == c; }
java
public static boolean sameClass(Class c, Object o) { if (o==null) return false; return o.getClass() == c; }
[ "public", "static", "boolean", "sameClass", "(", "Class", "c", ",", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "return", "false", ";", "return", "o", ".", "getClass", "(", ")", "==", "c", ";", "}" ]
Guard to check if the provided Object has the same class as the provided Class. This method will return false if the Object is null.
[ "Guard", "to", "check", "if", "the", "provided", "Object", "has", "the", "same", "class", "as", "the", "provided", "Class", ".", "This", "method", "will", "return", "false", "if", "the", "Object", "is", "null", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyGuardsFiltersAndSignatures.java#L210-L213
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.queryObjectArraysSQLKey
public static List<Object[]> queryObjectArraysSQLKey(String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException { """ Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) us...
java
public static List<Object[]> queryObjectArraysSQLKey(String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException { return queryObjectArraysSQLKey(YankPoolManager.DEFAULT_POOL_NAME, sqlKey, params); }
[ "public", "static", "List", "<", "Object", "[", "]", ">", "queryObjectArraysSQLKey", "(", "String", "sqlKey", ",", "Object", "[", "]", "params", ")", "throws", "SQLStatementNotFoundException", ",", "YankSQLException", "{", "return", "queryObjectArraysSQLKey", "(", ...
Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value @param params The repl...
[ "Return", "a", "List", "of", "generic", "Object", "[]", "s", "given", "a", "SQL", "Key", "using", "an", "SQL", "statement", "matching", "the", "sqlKey", "String", "in", "a", "properties", "file", "loaded", "via", "Yank", ".", "addSQLStatements", "(", "..."...
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L628-L632
SeleniumJT/seleniumjt-core
src/main/java/com/jt/selenium/SeleniumJT.java
SeleniumJT.dragAndDropWithPause
@LogExecTime public void dragAndDropWithPause(String locator, String targetLocator, int pause) { """ /* Drags the element locator to the element targetLocator with a set pause after the event """ jtEvent.dragAndDropWithPause(locator, targetLocator, pause); }
java
@LogExecTime public void dragAndDropWithPause(String locator, String targetLocator, int pause) { jtEvent.dragAndDropWithPause(locator, targetLocator, pause); }
[ "@", "LogExecTime", "public", "void", "dragAndDropWithPause", "(", "String", "locator", ",", "String", "targetLocator", ",", "int", "pause", ")", "{", "jtEvent", ".", "dragAndDropWithPause", "(", "locator", ",", "targetLocator", ",", "pause", ")", ";", "}" ]
/* Drags the element locator to the element targetLocator with a set pause after the event
[ "/", "*", "Drags", "the", "element", "locator", "to", "the", "element", "targetLocator", "with", "a", "set", "pause", "after", "the", "event" ]
train
https://github.com/SeleniumJT/seleniumjt-core/blob/8e972f69adc4846a3f1d7b8ca9c3f8d953a2d0f3/src/main/java/com/jt/selenium/SeleniumJT.java#L718-L722
resilience4j/resilience4j
resilience4j-spring/src/main/java/io/github/resilience4j/retry/configure/RetryConfigurationProperties.java
RetryConfigurationProperties.configureRetryIntervalFunction
private void configureRetryIntervalFunction(BackendProperties properties, RetryConfig.Builder<Object> builder) { """ decide which retry delay polciy will be configured based into the configured properties @param properties the backend retry properties @param builder the retry config builder """ if (pr...
java
private void configureRetryIntervalFunction(BackendProperties properties, RetryConfig.Builder<Object> builder) { if (properties.getWaitDuration() != 0) { long waitDuration = properties.getWaitDuration(); if (properties.getEnableExponentialBackoff()) { if (properties.getExponentialBackoffMultiplier() != 0) {...
[ "private", "void", "configureRetryIntervalFunction", "(", "BackendProperties", "properties", ",", "RetryConfig", ".", "Builder", "<", "Object", ">", "builder", ")", "{", "if", "(", "properties", ".", "getWaitDuration", "(", ")", "!=", "0", ")", "{", "long", "w...
decide which retry delay polciy will be configured based into the configured properties @param properties the backend retry properties @param builder the retry config builder
[ "decide", "which", "retry", "delay", "polciy", "will", "be", "configured", "based", "into", "the", "configured", "properties" ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-spring/src/main/java/io/github/resilience4j/retry/configure/RetryConfigurationProperties.java#L136-L155
xm-online/xm-commons
xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java
PermissionCheckService.hasPermission
public boolean hasPermission(Authentication authentication, Object privilege) { """ Check permission for role and privilege key only. @param authentication the authentication @param privilege the privilege key @return true if permitted """ return checkRole(authentica...
java
public boolean hasPermission(Authentication authentication, Object privilege) { return checkRole(authentication, privilege, true) || checkPermission(authentication, null, privilege, false, true); }
[ "public", "boolean", "hasPermission", "(", "Authentication", "authentication", ",", "Object", "privilege", ")", "{", "return", "checkRole", "(", "authentication", ",", "privilege", ",", "true", ")", "||", "checkPermission", "(", "authentication", ",", "null", ",",...
Check permission for role and privilege key only. @param authentication the authentication @param privilege the privilege key @return true if permitted
[ "Check", "permission", "for", "role", "and", "privilege", "key", "only", "." ]
train
https://github.com/xm-online/xm-commons/blob/43eb2273adb96f40830d7b905ee3a767b8715caf/xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java#L55-L59
OpenTSDB/opentsdb
src/meta/TSMeta.java
TSMeta.getTSMeta
public static Deferred<TSMeta> getTSMeta(final TSDB tsdb, final String tsuid) { """ Attempts to fetch the timeseries meta data and associated UIDMeta objects from storage. <b>Note:</b> Until we have a caching layer implemented, this will make at least 4 reads to the storage system, 1 for the TSUID meta, 1 for t...
java
public static Deferred<TSMeta> getTSMeta(final TSDB tsdb, final String tsuid) { return getFromStorage(tsdb, UniqueId.stringToUid(tsuid)) .addCallbackDeferring(new LoadUIDs(tsdb, tsuid)); }
[ "public", "static", "Deferred", "<", "TSMeta", ">", "getTSMeta", "(", "final", "TSDB", "tsdb", ",", "final", "String", "tsuid", ")", "{", "return", "getFromStorage", "(", "tsdb", ",", "UniqueId", ".", "stringToUid", "(", "tsuid", ")", ")", ".", "addCallbac...
Attempts to fetch the timeseries meta data and associated UIDMeta objects from storage. <b>Note:</b> Until we have a caching layer implemented, this will make at least 4 reads to the storage system, 1 for the TSUID meta, 1 for the metric UIDMeta and 1 each for every tagk/tagv UIDMeta object. <p> See {@link #getFromStor...
[ "Attempts", "to", "fetch", "the", "timeseries", "meta", "data", "and", "associated", "UIDMeta", "objects", "from", "storage", ".", "<b", ">", "Note", ":", "<", "/", "b", ">", "Until", "we", "have", "a", "caching", "layer", "implemented", "this", "will", ...
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/meta/TSMeta.java#L389-L392
threerings/narya
core/src/main/java/com/threerings/admin/client/DSetEditor.java
DSetEditor.setAccessor
public void setAccessor (Accessor<E> accessor) { """ Sets the logic for how this editor interacts with its underlying data. """ removeAll(); _accessor = accessor; _table = new ObjectEditorTable(_entryClass, _editableFields, _accessor.getInterp(_interp), _displayFields); ...
java
public void setAccessor (Accessor<E> accessor) { removeAll(); _accessor = accessor; _table = new ObjectEditorTable(_entryClass, _editableFields, _accessor.getInterp(_interp), _displayFields); add(new JScrollPane(_table), BorderLayout.CENTER); }
[ "public", "void", "setAccessor", "(", "Accessor", "<", "E", ">", "accessor", ")", "{", "removeAll", "(", ")", ";", "_accessor", "=", "accessor", ";", "_table", "=", "new", "ObjectEditorTable", "(", "_entryClass", ",", "_editableFields", ",", "_accessor", "."...
Sets the logic for how this editor interacts with its underlying data.
[ "Sets", "the", "logic", "for", "how", "this", "editor", "interacts", "with", "its", "underlying", "data", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/client/DSetEditor.java#L147-L154
canoo/dolphin-platform
platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/commons/lang/TypeUtils.java
TypeUtils.appendAllTo
private static <T> StringBuilder appendAllTo(final StringBuilder buf, final String sep, final T... types) { """ Append {@code types} to {@code buf} with separator {@code sep}. @param buf destination @param sep separator @param types to append @return {@code buf} @since 3.2 """ Assert.require...
java
private static <T> StringBuilder appendAllTo(final StringBuilder buf, final String sep, final T... types) { Assert.requireNonNullEntries(types, "types"); Assert.requireNotEmpty(types, "types"); if (types.length > 0) { buf.append(toString(types[0])); for (int i = 1; i < ty...
[ "private", "static", "<", "T", ">", "StringBuilder", "appendAllTo", "(", "final", "StringBuilder", "buf", ",", "final", "String", "sep", ",", "final", "T", "...", "types", ")", "{", "Assert", ".", "requireNonNullEntries", "(", "types", ",", "\"types\"", ")",...
Append {@code types} to {@code buf} with separator {@code sep}. @param buf destination @param sep separator @param types to append @return {@code buf} @since 3.2
[ "Append", "{", "@code", "types", "}", "to", "{", "@code", "buf", "}", "with", "separator", "{", "@code", "sep", "}", "." ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/commons/lang/TypeUtils.java#L1401-L1411
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.onSuccess
public <TContinuationResult> Task<TContinuationResult> onSuccess( final Continuation<TResult, TContinuationResult> continuation) { """ Runs a continuation when a task completes successfully, forwarding along {@link java.lang.Exception}s or cancellation. """ return onSuccess(continuation, IMMEDIATE_E...
java
public <TContinuationResult> Task<TContinuationResult> onSuccess( final Continuation<TResult, TContinuationResult> continuation) { return onSuccess(continuation, IMMEDIATE_EXECUTOR, null); }
[ "public", "<", "TContinuationResult", ">", "Task", "<", "TContinuationResult", ">", "onSuccess", "(", "final", "Continuation", "<", "TResult", ",", "TContinuationResult", ">", "continuation", ")", "{", "return", "onSuccess", "(", "continuation", ",", "IMMEDIATE_EXEC...
Runs a continuation when a task completes successfully, forwarding along {@link java.lang.Exception}s or cancellation.
[ "Runs", "a", "continuation", "when", "a", "task", "completes", "successfully", "forwarding", "along", "{" ]
train
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L773-L776
fozziethebeat/S-Space
opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java
LatentRelationalAnalysis.countPhraseFrequencies
public static float countPhraseFrequencies(String indexDir, String A, String B) { """ Searches an index given the index directory and counts up the frequncy of the two words used in a phrase. @param indexDir a String containing the directory where the index is stored @param A a {@code String} containing the fi...
java
public static float countPhraseFrequencies(String indexDir, String A, String B) { File indexDir_f = new File(indexDir); if (!indexDir_f.exists() || !indexDir_f.isDirectory()) { System.err.println("Search failed: index directory does not exist"); } else { try { ...
[ "public", "static", "float", "countPhraseFrequencies", "(", "String", "indexDir", ",", "String", "A", ",", "String", "B", ")", "{", "File", "indexDir_f", "=", "new", "File", "(", "indexDir", ")", ";", "if", "(", "!", "indexDir_f", ".", "exists", "(", ")"...
Searches an index given the index directory and counts up the frequncy of the two words used in a phrase. @param indexDir a String containing the directory where the index is stored @param A a {@code String} containing the first word of the phrase @param B a {@code String} containing the last word of the phrase @retur...
[ "Searches", "an", "index", "given", "the", "index", "directory", "and", "counts", "up", "the", "frequncy", "of", "the", "two", "words", "used", "in", "a", "phrase", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java#L423-L437
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestApiClient.java
RestApiClient.addUserToGroup
public Response addUserToGroup(String username, String groupName) { """ Adds the user to group. @param username the username @param groupName the group name @return the response """ return restClient.post("users/" + username + "/groups/"+ groupName, null, new HashMap<String, String>()); }
java
public Response addUserToGroup(String username, String groupName) { return restClient.post("users/" + username + "/groups/"+ groupName, null, new HashMap<String, String>()); }
[ "public", "Response", "addUserToGroup", "(", "String", "username", ",", "String", "groupName", ")", "{", "return", "restClient", ".", "post", "(", "\"users/\"", "+", "username", "+", "\"/groups/\"", "+", "groupName", ",", "null", ",", "new", "HashMap", "<", ...
Adds the user to group. @param username the username @param groupName the group name @return the response
[ "Adds", "the", "user", "to", "group", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestApiClient.java#L523-L526
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/io/FileHelper.java
FileHelper.readPID
public static long readPID(File f, boolean carefulProcessing) throws IOException { """ Reads a PID (Process Id) file @param f File The process Id file (must exist!) @param carefulProcessing boolean If true, non-numeric chars are stripped from the PID before it is parsed @return String The process Id repre...
java
public static long readPID(File f, boolean carefulProcessing) throws IOException { if (f.exists()) { String pidString = cat(f); if (carefulProcessing) pidString = pidString.replaceAll("[^0-9]", ""); // Strip out anything that's not a number else pidString = pidString.replace("\n", ""); // Just re...
[ "public", "static", "long", "readPID", "(", "File", "f", ",", "boolean", "carefulProcessing", ")", "throws", "IOException", "{", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "String", "pidString", "=", "cat", "(", "f", ")", ";", "if", "(", "car...
Reads a PID (Process Id) file @param f File The process Id file (must exist!) @param carefulProcessing boolean If true, non-numeric chars are stripped from the PID before it is parsed @return String The process Id represented by the file (or -1 if the file doesn't exist) @throws IOException On filesystem-level error...
[ "Reads", "a", "PID", "(", "Process", "Id", ")", "file" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/io/FileHelper.java#L491-L511
dadoonet/spring-elasticsearch
src/main/java/fr/pilato/spring/elasticsearch/type/TypeFinder.java
TypeFinder.findTypes
public static List<String> findTypes(String index) throws IOException, URISyntaxException { """ Find all types within an index in default classpath dir @param index index name @return The list of types @throws IOException if the connection with elasticsearch is failing @throws URISyntaxException this should no...
java
public static List<String> findTypes(String index) throws IOException, URISyntaxException { return findTypes(Defaults.ConfigDir, index); }
[ "public", "static", "List", "<", "String", ">", "findTypes", "(", "String", "index", ")", "throws", "IOException", ",", "URISyntaxException", "{", "return", "findTypes", "(", "Defaults", ".", "ConfigDir", ",", "index", ")", ";", "}" ]
Find all types within an index in default classpath dir @param index index name @return The list of types @throws IOException if the connection with elasticsearch is failing @throws URISyntaxException this should not happen
[ "Find", "all", "types", "within", "an", "index", "in", "default", "classpath", "dir" ]
train
https://github.com/dadoonet/spring-elasticsearch/blob/b338223818a5bdf5d9c06c88cb98589c843fd293/src/main/java/fr/pilato/spring/elasticsearch/type/TypeFinder.java#L42-L44
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebAppSecurityCollaboratorImpl.java
WebAppSecurityCollaboratorImpl.isUserInRole
@Override public boolean isUserInRole(String role, IExtendedRequest req) { """ {@inheritDoc} If the role is null or the call is unauthenticated, return false. Otherwise, check if the authenticated subject is in the requested role. """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled(...
java
@Override public boolean isUserInRole(String role, IExtendedRequest req) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "isUserInRole role = " + role); } if (role == null) return false; Subject subject = subjectManager.getCa...
[ "@", "Override", "public", "boolean", "isUserInRole", "(", "String", "role", ",", "IExtendedRequest", "req", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "deb...
{@inheritDoc} If the role is null or the call is unauthenticated, return false. Otherwise, check if the authenticated subject is in the requested role.
[ "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebAppSecurityCollaboratorImpl.java#L472-L487
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/Configurer.java
Configurer.getInteger
public final int getInteger(String attribute, String... path) { """ Get an integer in the xml tree. @param attribute The attribute to get as integer. @param path The node path (child list) @return The integer value. @throws LionEngineException If unable to read node or not a valid integer read. """ ...
java
public final int getInteger(String attribute, String... path) { try { return Integer.parseInt(getNodeString(attribute, path)); } catch (final NumberFormatException exception) { throw new LionEngineException(exception, media); } }
[ "public", "final", "int", "getInteger", "(", "String", "attribute", ",", "String", "...", "path", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "getNodeString", "(", "attribute", ",", "path", ")", ")", ";", "}", "catch", "(", "final", ...
Get an integer in the xml tree. @param attribute The attribute to get as integer. @param path The node path (child list) @return The integer value. @throws LionEngineException If unable to read node or not a valid integer read.
[ "Get", "an", "integer", "in", "the", "xml", "tree", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/Configurer.java#L212-L222
OpenLiberty/open-liberty
dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java
ZipFileContainerUtils.locatePath
@Trivial public static int locatePath(ZipEntryData[] entryData, final String r_path) { """ Locate a path in a collection of entries. Answer the offset of the entry which has the specified path. If the path is not found, answer -1 times ( the insertion point of the path minus one ). @param entryData Th...
java
@Trivial public static int locatePath(ZipEntryData[] entryData, final String r_path) { ZipEntryData targetData = new SearchZipEntryData(r_path); // Given: // // 0 gp // 1 gp/p1 // 2 gp/p1/c1 // 3 gp/p2/c2 // // A search for "a" answers ...
[ "@", "Trivial", "public", "static", "int", "locatePath", "(", "ZipEntryData", "[", "]", "entryData", ",", "final", "String", "r_path", ")", "{", "ZipEntryData", "targetData", "=", "new", "SearchZipEntryData", "(", "r_path", ")", ";", "// Given:", "//", "// 0 g...
Locate a path in a collection of entries. Answer the offset of the entry which has the specified path. If the path is not found, answer -1 times ( the insertion point of the path minus one ). @param entryData The entries which are to be searched. @param r_path The path to fine in the entries. @return The offset to ...
[ "Locate", "a", "path", "in", "a", "collection", "of", "entries", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L608-L629
nohana/Amalgam
amalgam/src/main/java/com/amalgam/widget/ToastUtils.java
ToastUtils.showOnUiThread
public static void showOnUiThread(Context applicationContext, int stringResId, int duration, Handler handler) { """ Show toast on the UI thread. @param applicationContext the application context. @param stringResId to show. @param duration the display duration. @param handler the main handler. """ ...
java
public static void showOnUiThread(Context applicationContext, int stringResId, int duration, Handler handler) { showOnUiThread(applicationContext, applicationContext.getString(stringResId), duration, handler); }
[ "public", "static", "void", "showOnUiThread", "(", "Context", "applicationContext", ",", "int", "stringResId", ",", "int", "duration", ",", "Handler", "handler", ")", "{", "showOnUiThread", "(", "applicationContext", ",", "applicationContext", ".", "getString", "(",...
Show toast on the UI thread. @param applicationContext the application context. @param stringResId to show. @param duration the display duration. @param handler the main handler.
[ "Show", "toast", "on", "the", "UI", "thread", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/widget/ToastUtils.java#L51-L53
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/internal/stream/FutureStreamUtils.java
FutureStreamUtils.forEachEvent
public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachEvent( final Stream<T> stream, final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError, final Runnable onComplete) { """ Perform a f...
java
public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachEvent( final Stream<T> stream, final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError, final Runnable onComplete) { final Compl...
[ "public", "static", "<", "T", ",", "X", "extends", "Throwable", ">", "Tuple3", "<", "CompletableFuture", "<", "Subscription", ">", ",", "Runnable", ",", "CompletableFuture", "<", "Boolean", ">", ">", "forEachEvent", "(", "final", "Stream", "<", "T", ">", "...
Perform a forEach operation over the Stream capturing any elements and errors in the supplied consumers when the entire Stream has been processed an onComplete event will be recieved. <pre> {@code Subscription next = Streams.forEachEvents(Stream.of(()->1,()->2,()->throw new RuntimeException(),()->4) .map(Supplier::ge...
[ "Perform", "a", "forEach", "operation", "over", "the", "Stream", "capturing", "any", "elements", "and", "errors", "in", "the", "supplied", "consumers", "when", "the", "entire", "Stream", "has", "been", "processed", "an", "onComplete", "event", "will", "be", "r...
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/internal/stream/FutureStreamUtils.java#L233-L291
apache/incubator-gobblin
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinApplicationMaster.java
GobblinApplicationMaster.buildYarnContainerSecurityManager
private YarnContainerSecurityManager buildYarnContainerSecurityManager(Config config, FileSystem fs) { """ Build the {@link YarnContainerSecurityManager} for the Application Master. """ return new YarnContainerSecurityManager(config, fs, this.eventBus); }
java
private YarnContainerSecurityManager buildYarnContainerSecurityManager(Config config, FileSystem fs) { return new YarnContainerSecurityManager(config, fs, this.eventBus); }
[ "private", "YarnContainerSecurityManager", "buildYarnContainerSecurityManager", "(", "Config", "config", ",", "FileSystem", "fs", ")", "{", "return", "new", "YarnContainerSecurityManager", "(", "config", ",", "fs", ",", "this", ".", "eventBus", ")", ";", "}" ]
Build the {@link YarnContainerSecurityManager} for the Application Master.
[ "Build", "the", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinApplicationMaster.java#L106-L108
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/lucene/SearchFieldAnalyzer.java
SearchFieldAnalyzer.createComponents
@Override protected TokenStreamComponents createComponents(String fieldName) { """ Creates a the TokenStreamComponents used to analyze the stream. @param fieldName the field that this lucene analyzer will process @return the token stream filter chain """ //final Tokenizer source = new AlphaNume...
java
@Override protected TokenStreamComponents createComponents(String fieldName) { //final Tokenizer source = new AlphaNumericTokenizer(); final Tokenizer source = new WhitespaceTokenizer(); TokenStream stream = source; stream = new UrlTokenizingFilter(stream); stream = new Alph...
[ "@", "Override", "protected", "TokenStreamComponents", "createComponents", "(", "String", "fieldName", ")", "{", "//final Tokenizer source = new AlphaNumericTokenizer();", "final", "Tokenizer", "source", "=", "new", "WhitespaceTokenizer", "(", ")", ";", "TokenStream", "stre...
Creates a the TokenStreamComponents used to analyze the stream. @param fieldName the field that this lucene analyzer will process @return the token stream filter chain
[ "Creates", "a", "the", "TokenStreamComponents", "used", "to", "analyze", "the", "stream", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/lucene/SearchFieldAnalyzer.java#L77-L99
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectActualObject
void expectActualObject(Node n, JSType type, String msg) { """ Expect the type to be an object. Unlike expectObject, a type convertible to object is not acceptable. """ if (!type.isObject()) { mismatch(n, msg, type, OBJECT_TYPE); } }
java
void expectActualObject(Node n, JSType type, String msg) { if (!type.isObject()) { mismatch(n, msg, type, OBJECT_TYPE); } }
[ "void", "expectActualObject", "(", "Node", "n", ",", "JSType", "type", ",", "String", "msg", ")", "{", "if", "(", "!", "type", ".", "isObject", "(", ")", ")", "{", "mismatch", "(", "n", ",", "msg", ",", "type", ",", "OBJECT_TYPE", ")", ";", "}", ...
Expect the type to be an object. Unlike expectObject, a type convertible to object is not acceptable.
[ "Expect", "the", "type", "to", "be", "an", "object", ".", "Unlike", "expectObject", "a", "type", "convertible", "to", "object", "is", "not", "acceptable", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L261-L265
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/core/monitor/FileMonitorSource.java
FileMonitorSource.getLastLine
@Override public List<MonitorLine> getLastLine(Integer count) throws Exception { """ Return the last file line @return The line @throws Exception """ String line; final List<MonitorLine> result = new ArrayList<MonitorLine>(); BufferedReader in = null; try { i...
java
@Override public List<MonitorLine> getLastLine(Integer count) throws Exception { String line; final List<MonitorLine> result = new ArrayList<MonitorLine>(); BufferedReader in = null; try { in = new BufferedReader(new FileReader(getFilename())); int i = 0; ...
[ "@", "Override", "public", "List", "<", "MonitorLine", ">", "getLastLine", "(", "Integer", "count", ")", "throws", "Exception", "{", "String", "line", ";", "final", "List", "<", "MonitorLine", ">", "result", "=", "new", "ArrayList", "<", "MonitorLine", ">", ...
Return the last file line @return The line @throws Exception
[ "Return", "the", "last", "file", "line" ]
train
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/monitor/FileMonitorSource.java#L68-L95
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.geoEquals
public static GeoEquals geoEquals(Expression<Geometry> left, Expression<Geometry> right) { """ Creates a GeoEquals expression from the left and right expressions. @param left The left expression. @param right The right expression. @return A GeoEquals expression. """ return new GeoEquals(left, right)...
java
public static GeoEquals geoEquals(Expression<Geometry> left, Expression<Geometry> right) { return new GeoEquals(left, right); }
[ "public", "static", "GeoEquals", "geoEquals", "(", "Expression", "<", "Geometry", ">", "left", ",", "Expression", "<", "Geometry", ">", "right", ")", "{", "return", "new", "GeoEquals", "(", "left", ",", "right", ")", ";", "}" ]
Creates a GeoEquals expression from the left and right expressions. @param left The left expression. @param right The right expression. @return A GeoEquals expression.
[ "Creates", "a", "GeoEquals", "expression", "from", "the", "left", "and", "right", "expressions", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L795-L797
JodaOrg/joda-beans
src/main/java/org/joda/beans/impl/flexi/FlexiBean.java
FlexiBean.put
public Object put(String propertyName, Object newValue) { """ Sets a property in this bean to the specified value. <p> This creates a property if one does not exist. @param propertyName the property name, not empty @param newValue the new value, may be null @return the old value of the property, may be nu...
java
public Object put(String propertyName, Object newValue) { if (VALID_KEY.matcher(propertyName).matches() == false) { throw new IllegalArgumentException("Invalid key for FlexiBean: " + propertyName); } return dataWritable().put(propertyName, newValue); }
[ "public", "Object", "put", "(", "String", "propertyName", ",", "Object", "newValue", ")", "{", "if", "(", "VALID_KEY", ".", "matcher", "(", "propertyName", ")", ".", "matches", "(", ")", "==", "false", ")", "{", "throw", "new", "IllegalArgumentException", ...
Sets a property in this bean to the specified value. <p> This creates a property if one does not exist. @param propertyName the property name, not empty @param newValue the new value, may be null @return the old value of the property, may be null
[ "Sets", "a", "property", "in", "this", "bean", "to", "the", "specified", "value", ".", "<p", ">", "This", "creates", "a", "property", "if", "one", "does", "not", "exist", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/impl/flexi/FlexiBean.java#L288-L293
Kurento/kurento-module-creator
src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java
ExpressionParser.parseRangeExpression
private Expression parseRangeExpression() { """ Parses the {@literal <range-expr>} non-terminal. <pre> {@literal <range-expr> ::= <version> "-" <version> } </pre> @return the expression AST """ Expression ge = new GreaterOrEqual(parseVersion()); consumeNextToken(HYPHEN); Expression le = n...
java
private Expression parseRangeExpression() { Expression ge = new GreaterOrEqual(parseVersion()); consumeNextToken(HYPHEN); Expression le = new LessOrEqual(parseVersion()); return new And(ge, le); }
[ "private", "Expression", "parseRangeExpression", "(", ")", "{", "Expression", "ge", "=", "new", "GreaterOrEqual", "(", "parseVersion", "(", ")", ")", ";", "consumeNextToken", "(", "HYPHEN", ")", ";", "Expression", "le", "=", "new", "LessOrEqual", "(", "parseVe...
Parses the {@literal <range-expr>} non-terminal. <pre> {@literal <range-expr> ::= <version> "-" <version> } </pre> @return the expression AST
[ "Parses", "the", "{", "@literal", "<range", "-", "expr", ">", "}", "non", "-", "terminal", "." ]
train
https://github.com/Kurento/kurento-module-creator/blob/c371516c665b902b5476433496a5aefcbca86d64/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java#L325-L330
aoindustries/ao-encoding
src/main/java/com/aoindustries/encoding/TextInMysqlEncoder.java
TextInMysqlEncoder.getEscapedCharacter
private static String getEscapedCharacter(char c) throws IOException { """ Encodes a single character and returns its String representation or null if no modification is necessary. Implemented as <a href="https://dev.mysql.com/doc/en/string-literals.html#character-escape-sequences">Table 9.1 Special Character E...
java
private static String getEscapedCharacter(char c) throws IOException { switch(c) { case '\0' : return "\\0"; case '\'' : return "''"; // Not needed inside single quotes overall: case '"' : return "\\\""; case '\b' : return "\\b"; case '\n' : return null; case '\r' : return "\\r"; case '\t' : retu...
[ "private", "static", "String", "getEscapedCharacter", "(", "char", "c", ")", "throws", "IOException", "{", "switch", "(", "c", ")", "{", "case", "'", "'", ":", "return", "\"\\\\0\"", ";", "case", "'", "'", ":", "return", "\"''\"", ";", "// Not needed insid...
Encodes a single character and returns its String representation or null if no modification is necessary. Implemented as <a href="https://dev.mysql.com/doc/en/string-literals.html#character-escape-sequences">Table 9.1 Special Character Escape Sequences</a>. @see MysqlValidator#checkCharacter(char) @throws IOExcepti...
[ "Encodes", "a", "single", "character", "and", "returns", "its", "String", "representation", "or", "null", "if", "no", "modification", "is", "necessary", ".", "Implemented", "as", "<a", "href", "=", "https", ":", "//", "dev", ".", "mysql", ".", "com", "/", ...
train
https://github.com/aoindustries/ao-encoding/blob/54eeb8ff58ab7b44bb02549bbe2572625b449e4e/src/main/java/com/aoindustries/encoding/TextInMysqlEncoder.java#L46-L63
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java
CPFriendlyURLEntryPersistenceImpl.fetchByUUID_G
@Override public CPFriendlyURLEntry fetchByUUID_G(String uuid, long groupId) { """ Returns the cp friendly url entry where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp fr...
java
@Override public CPFriendlyURLEntry fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPFriendlyURLEntry", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp friendly url entry where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp friendly url entry, or <code>null</code> if a matching cp friendly url entry could not be found
[ "Returns", "the", "cp", "friendly", "url", "entry", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finde...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L706-L709
apache/reef
lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizConfigVisitor.java
GraphvizConfigVisitor.getGraphvizString
public static String getGraphvizString(final Configuration config, final boolean showImpl, final boolean showLegend) { """ Produce a Graphviz DOT string for a given TANG configuration. @param config TANG configuration object. @param showImpl If true, plot IS-A edg...
java
public static String getGraphvizString(final Configuration config, final boolean showImpl, final boolean showLegend) { final GraphvizConfigVisitor visitor = new GraphvizConfigVisitor(config, showImpl, showLegend); final Node root = config.getClassHierarchy().getNamespace...
[ "public", "static", "String", "getGraphvizString", "(", "final", "Configuration", "config", ",", "final", "boolean", "showImpl", ",", "final", "boolean", "showLegend", ")", "{", "final", "GraphvizConfigVisitor", "visitor", "=", "new", "GraphvizConfigVisitor", "(", "...
Produce a Graphviz DOT string for a given TANG configuration. @param config TANG configuration object. @param showImpl If true, plot IS-A edges for know implementations. @param showLegend If true, add legend to the plot. @return configuration graph represented as a string in Graphviz DOT format.
[ "Produce", "a", "Graphviz", "DOT", "string", "for", "a", "given", "TANG", "configuration", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizConfigVisitor.java#L105-L111
azkaban/azkaban
az-core/src/main/java/azkaban/utils/Utils.java
Utils.croak
public static void croak(final String message, final int exitCode) { """ Print the message and then exit with the given exit code @param message The message to print @param exitCode The exit code """ System.err.println(message); System.exit(exitCode); }
java
public static void croak(final String message, final int exitCode) { System.err.println(message); System.exit(exitCode); }
[ "public", "static", "void", "croak", "(", "final", "String", "message", ",", "final", "int", "exitCode", ")", "{", "System", ".", "err", ".", "println", "(", "message", ")", ";", "System", ".", "exit", "(", "exitCode", ")", ";", "}" ]
Print the message and then exit with the given exit code @param message The message to print @param exitCode The exit code
[ "Print", "the", "message", "and", "then", "exit", "with", "the", "given", "exit", "code" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-core/src/main/java/azkaban/utils/Utils.java#L120-L123
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
DurationFormatUtils.formatPeriod
public static String formatPeriod(final long startMillis, final long endMillis, final String format) { """ <p>Formats the time gap as a string, using the specified format. Padding the left hand side of numbers with zeroes is optional. @param startMillis the start of the duration @param endMillis the end of ...
java
public static String formatPeriod(final long startMillis, final long endMillis, final String format) { return formatPeriod(startMillis, endMillis, format, true, TimeZone.getDefault()); }
[ "public", "static", "String", "formatPeriod", "(", "final", "long", "startMillis", ",", "final", "long", "endMillis", ",", "final", "String", "format", ")", "{", "return", "formatPeriod", "(", "startMillis", ",", "endMillis", ",", "format", ",", "true", ",", ...
<p>Formats the time gap as a string, using the specified format. Padding the left hand side of numbers with zeroes is optional. @param startMillis the start of the duration @param endMillis the end of the duration @param format the way in which to format the duration, not null @return the formatted duration, not nu...
[ "<p", ">", "Formats", "the", "time", "gap", "as", "a", "string", "using", "the", "specified", "format", ".", "Padding", "the", "left", "hand", "side", "of", "numbers", "with", "zeroes", "is", "optional", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java#L253-L255
zandero/rest.vertx
src/main/java/com/zandero/rest/data/ClassFactory.java
ClassFactory.constructViaMethod
static <T> Pair<Boolean, T> constructViaMethod(Class<T> type, String fromValue) { """ Constructs type via static method fromString(String value) or valueOf(String value) @param type to be constructed @param fromValue value to take @param <T> class type @return Object of type or null if failed to c...
java
static <T> Pair<Boolean, T> constructViaMethod(Class<T> type, String fromValue) { // Try to usse fromString before valueOf (enums have valueOf already defined) - in case we override fromString() List<Method> methods = getMethods(type, "fromString", "valueOf"); if (methods != null && methods.size() > 0) { fo...
[ "static", "<", "T", ">", "Pair", "<", "Boolean", ",", "T", ">", "constructViaMethod", "(", "Class", "<", "T", ">", "type", ",", "String", "fromValue", ")", "{", "// Try to usse fromString before valueOf (enums have valueOf already defined) - in case we override fromString...
Constructs type via static method fromString(String value) or valueOf(String value) @param type to be constructed @param fromValue value to take @param <T> class type @return Object of type or null if failed to construct
[ "Constructs", "type", "via", "static", "method", "fromString", "(", "String", "value", ")", "or", "valueOf", "(", "String", "value", ")" ]
train
https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/data/ClassFactory.java#L543-L564
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java
TimeZoneFormat.formatOffsetISO8601Extended
public final String formatOffsetISO8601Extended(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) { """ Returns the ISO 8601 extended time zone string for the given offset. For example, "-08:00", "-08:30" and "Z" @param offset the offset from GMT(UTC) in milliseconds. @param useUtcI...
java
public final String formatOffsetISO8601Extended(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) { return formatOffsetISO8601(offset, false, useUtcIndicator, isShort, ignoreSeconds); }
[ "public", "final", "String", "formatOffsetISO8601Extended", "(", "int", "offset", ",", "boolean", "useUtcIndicator", ",", "boolean", "isShort", ",", "boolean", "ignoreSeconds", ")", "{", "return", "formatOffsetISO8601", "(", "offset", ",", "false", ",", "useUtcIndic...
Returns the ISO 8601 extended time zone string for the given offset. For example, "-08:00", "-08:30" and "Z" @param offset the offset from GMT(UTC) in milliseconds. @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0. @param isShort true if shortest form is used. @param ignoreSeconds...
[ "Returns", "the", "ISO", "8601", "extended", "time", "zone", "string", "for", "the", "given", "offset", ".", "For", "example", "-", "08", ":", "00", "-", "08", ":", "30", "and", "Z" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L736-L738
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java
PageFlowUtils.getLongLivedPageFlow
public static PageFlowController getLongLivedPageFlow( String modulePath, HttpServletRequest request ) { """ Get the long-lived page flow instance associated with the given module (directory) path. @deprecated Use {@link #getLongLivedPageFlow(String, HttpServletRequest, ServletContext)} instead. @param moduleP...
java
public static PageFlowController getLongLivedPageFlow( String modulePath, HttpServletRequest request ) { ServletContext servletContext = InternalUtils.getServletContext( request ); return getLongLivedPageFlow( modulePath, request, servletContext ); }
[ "public", "static", "PageFlowController", "getLongLivedPageFlow", "(", "String", "modulePath", ",", "HttpServletRequest", "request", ")", "{", "ServletContext", "servletContext", "=", "InternalUtils", ".", "getServletContext", "(", "request", ")", ";", "return", "getLon...
Get the long-lived page flow instance associated with the given module (directory) path. @deprecated Use {@link #getLongLivedPageFlow(String, HttpServletRequest, ServletContext)} instead. @param modulePath the webapp-relative path to the directory containing the long-lived page flow. @param request the current HttpSer...
[ "Get", "the", "long", "-", "lived", "page", "flow", "instance", "associated", "with", "the", "given", "module", "(", "directory", ")", "path", ".", "@deprecated", "Use", "{", "@link", "#getLongLivedPageFlow", "(", "String", "HttpServletRequest", "ServletContext", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L469-L473
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/unisignature/verifier/VerificationContextBuilder.java
VerificationContextBuilder.setDocumentHash
public VerificationContextBuilder setDocumentHash(DataHash documentHash, Long level) { """ Used to set the hash and local aggregation tree height. If present then this hash must equal to signature input hash. @param documentHash document hash @return instance of {@link VerificationContextBuilder} """ ...
java
public VerificationContextBuilder setDocumentHash(DataHash documentHash, Long level) { this.documentHash = documentHash; this.inputHashLevel = level; return this; }
[ "public", "VerificationContextBuilder", "setDocumentHash", "(", "DataHash", "documentHash", ",", "Long", "level", ")", "{", "this", ".", "documentHash", "=", "documentHash", ";", "this", ".", "inputHashLevel", "=", "level", ";", "return", "this", ";", "}" ]
Used to set the hash and local aggregation tree height. If present then this hash must equal to signature input hash. @param documentHash document hash @return instance of {@link VerificationContextBuilder}
[ "Used", "to", "set", "the", "hash", "and", "local", "aggregation", "tree", "height", ".", "If", "present", "then", "this", "hash", "must", "equal", "to", "signature", "input", "hash", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/unisignature/verifier/VerificationContextBuilder.java#L121-L125
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java
ProtobufIDLProxy.generateSource
public static void generateSource(Reader reader, File sourceOutputPath) throws IOException { """ Generate source. @param reader the reader @param sourceOutputPath the source output path @throws IOException Signals that an I/O exception has occurred. """ ProtoFile protoFile = ProtoSchemaParser.pars...
java
public static void generateSource(Reader reader, File sourceOutputPath) throws IOException { ProtoFile protoFile = ProtoSchemaParser.parse(DEFAULT_FILE_NAME, reader); List<CodeDependent> cds = new ArrayList<CodeDependent>(); doCreate(protoFile, true, false, null, true, sourceOutputPath, cds, new...
[ "public", "static", "void", "generateSource", "(", "Reader", "reader", ",", "File", "sourceOutputPath", ")", "throws", "IOException", "{", "ProtoFile", "protoFile", "=", "ProtoSchemaParser", ".", "parse", "(", "DEFAULT_FILE_NAME", ",", "reader", ")", ";", "List", ...
Generate source. @param reader the reader @param sourceOutputPath the source output path @throws IOException Signals that an I/O exception has occurred.
[ "Generate", "source", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java#L1442-L1446
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getEpisodeCredits
public MediaCreditList getEpisodeCredits(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException { """ Get the TV episode credits by combination of season and episode number. @param tvID tvID @param seasonNumber seasonNumber @param episodeNumber episodeNumber @return @throws MovieDbException ...
java
public MediaCreditList getEpisodeCredits(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException { return tmdbEpisodes.getEpisodeCredits(tvID, seasonNumber, episodeNumber); }
[ "public", "MediaCreditList", "getEpisodeCredits", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ")", "throws", "MovieDbException", "{", "return", "tmdbEpisodes", ".", "getEpisodeCredits", "(", "tvID", ",", "seasonNumber", ",", "episode...
Get the TV episode credits by combination of season and episode number. @param tvID tvID @param seasonNumber seasonNumber @param episodeNumber episodeNumber @return @throws MovieDbException exception
[ "Get", "the", "TV", "episode", "credits", "by", "combination", "of", "season", "and", "episode", "number", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1815-L1817
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/DaoUtils.java
DaoUtils.buildLikeValue
public static String buildLikeValue(String value, WildcardPosition wildcardPosition) { """ Returns an escaped value in parameter, with the desired wildcards. Suitable to be used in a like sql query<br /> Escapes the "/", "%" and "_" characters.<br/> You <strong>must</strong> add "ESCAPE '/'" after your like qu...
java
public static String buildLikeValue(String value, WildcardPosition wildcardPosition) { String escapedValue = escapePercentAndUnderscore(value); String wildcard = "%"; switch (wildcardPosition) { case BEFORE: escapedValue = wildcard + escapedValue; break; case AFTER: escap...
[ "public", "static", "String", "buildLikeValue", "(", "String", "value", ",", "WildcardPosition", "wildcardPosition", ")", "{", "String", "escapedValue", "=", "escapePercentAndUnderscore", "(", "value", ")", ";", "String", "wildcard", "=", "\"%\"", ";", "switch", "...
Returns an escaped value in parameter, with the desired wildcards. Suitable to be used in a like sql query<br /> Escapes the "/", "%" and "_" characters.<br/> You <strong>must</strong> add "ESCAPE '/'" after your like query. It defines '/' as the escape character.
[ "Returns", "an", "escaped", "value", "in", "parameter", "with", "the", "desired", "wildcards", ".", "Suitable", "to", "be", "used", "in", "a", "like", "sql", "query<br", "/", ">", "Escapes", "the", "/", "%", "and", "_", "characters", ".", "<br", "/", "...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/DaoUtils.java#L34-L52
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/category/CmsDataValue.java
CmsDataValue.matchesFilter
public boolean matchesFilter(String filter, int param) { """ Returns if the category matches the given filter.<p> @param filter the filter to match @param param the search value @return <code>true</code> if the gallery matches the given filter.<p> """ filter = filter.toLowerCase(); ret...
java
public boolean matchesFilter(String filter, int param) { filter = filter.toLowerCase(); return m_parameters[param].toLowerCase().contains(filter); }
[ "public", "boolean", "matchesFilter", "(", "String", "filter", ",", "int", "param", ")", "{", "filter", "=", "filter", ".", "toLowerCase", "(", ")", ";", "return", "m_parameters", "[", "param", "]", ".", "toLowerCase", "(", ")", ".", "contains", "(", "fi...
Returns if the category matches the given filter.<p> @param filter the filter to match @param param the search value @return <code>true</code> if the gallery matches the given filter.<p>
[ "Returns", "if", "the", "category", "matches", "the", "given", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/category/CmsDataValue.java#L243-L247
alkacon/opencms-core
src/org/opencms/main/CmsShell.java
CmsShell.initShell
public void initShell(I_CmsShellCommands additionalShellCommands, PrintStream out, PrintStream err) { """ Initializes the CmsShell.<p> @param additionalShellCommands optional object for additional shell commands, or null @param out stream to write the regular output messages to @param err stream to write the ...
java
public void initShell(I_CmsShellCommands additionalShellCommands, PrintStream out, PrintStream err) { // set the output streams m_out = out; m_err = err; // initialize the settings of the user m_settings = initSettings(); // initialize shell command object m_sh...
[ "public", "void", "initShell", "(", "I_CmsShellCommands", "additionalShellCommands", ",", "PrintStream", "out", ",", "PrintStream", "err", ")", "{", "// set the output streams", "m_out", "=", "out", ";", "m_err", "=", "err", ";", "// initialize the settings of the user"...
Initializes the CmsShell.<p> @param additionalShellCommands optional object for additional shell commands, or null @param out stream to write the regular output messages to @param err stream to write the error messages output to
[ "Initializes", "the", "CmsShell", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShell.java#L1037-L1070
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java
ModelUtils.erasesToAnyOf
public static boolean erasesToAnyOf(DeclaredType type, QualifiedName... possibilities) { """ Returns true if {@code type} erases to any of {@code possibilities}. """ if (type == null) { return false; } String erasedType = type.asElement().toString(); for (QualifiedName possibility : possi...
java
public static boolean erasesToAnyOf(DeclaredType type, QualifiedName... possibilities) { if (type == null) { return false; } String erasedType = type.asElement().toString(); for (QualifiedName possibility : possibilities) { if (unshadedName(possibility.toString()).equals(erasedType)) { ...
[ "public", "static", "boolean", "erasesToAnyOf", "(", "DeclaredType", "type", ",", "QualifiedName", "...", "possibilities", ")", "{", "if", "(", "type", "==", "null", ")", "{", "return", "false", ";", "}", "String", "erasedType", "=", "type", ".", "asElement"...
Returns true if {@code type} erases to any of {@code possibilities}.
[ "Returns", "true", "if", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java#L333-L344
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
FileOutputFormat.setOutputPath
public static void setOutputPath(JobConf conf, Path outputDir) { """ Set the {@link Path} of the output directory for the map-reduce job. @param conf The configuration of the job. @param outputDir the {@link Path} of the output directory for the map-reduce job. """ if (!outputDir.isAbsolute()) { ...
java
public static void setOutputPath(JobConf conf, Path outputDir) { if (!outputDir.isAbsolute()) { FileSystem.LogForCollect.info("set output path to relative path: " + outputDir + " working directory: " + conf.getWorkingDirectory()); } outputDir = new Path(conf.getWorkingDirectory(), outputDir)...
[ "public", "static", "void", "setOutputPath", "(", "JobConf", "conf", ",", "Path", "outputDir", ")", "{", "if", "(", "!", "outputDir", ".", "isAbsolute", "(", ")", ")", "{", "FileSystem", ".", "LogForCollect", ".", "info", "(", "\"set output path to relative pa...
Set the {@link Path} of the output directory for the map-reduce job. @param conf The configuration of the job. @param outputDir the {@link Path} of the output directory for the map-reduce job.
[ "Set", "the", "{", "@link", "Path", "}", "of", "the", "output", "directory", "for", "the", "map", "-", "reduce", "job", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java#L125-L132
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ManagedInstancesInner.java
ManagedInstancesInner.getByResourceGroupAsync
public Observable<ManagedInstanceInner> getByResourceGroupAsync(String resourceGroupName, String managedInstanceName) { """ Gets a managed instance. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @...
java
public Observable<ManagedInstanceInner> getByResourceGroupAsync(String resourceGroupName, String managedInstanceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, managedInstanceName).map(new Func1<ServiceResponse<ManagedInstanceInner>, ManagedInstanceInner>() { @Override ...
[ "public", "Observable", "<", "ManagedInstanceInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "managedInstanceName",...
Gets a managed instance. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @throws IllegalArgumentException thrown if parameters fail the validatio...
[ "Gets", "a", "managed", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ManagedInstancesInner.java#L372-L379
jfaster/mango
src/main/java/org/jfaster/mango/util/reflect/Types.java
Types.newParameterizedTypeWithOwner
static ParameterizedType newParameterizedTypeWithOwner( @Nullable Type ownerType, Class<?> rawType, Type... arguments) { """ Returns a type where {@code rawType} is parameterized by {@code arguments} and is owned by {@code ownerType}. """ if (ownerType == null) { return newParameterizedType(ra...
java
static ParameterizedType newParameterizedTypeWithOwner( @Nullable Type ownerType, Class<?> rawType, Type... arguments) { if (ownerType == null) { return newParameterizedType(rawType, arguments); } // ParameterizedTypeImpl constructor already checks, but we want to throw NPE before IAE if (ar...
[ "static", "ParameterizedType", "newParameterizedTypeWithOwner", "(", "@", "Nullable", "Type", "ownerType", ",", "Class", "<", "?", ">", "rawType", ",", "Type", "...", "arguments", ")", "{", "if", "(", "ownerType", "==", "null", ")", "{", "return", "newParamete...
Returns a type where {@code rawType} is parameterized by {@code arguments} and is owned by {@code ownerType}.
[ "Returns", "a", "type", "where", "{" ]
train
https://github.com/jfaster/mango/blob/4f078846f1daa2cb92424edcde5964267e390e8f/src/main/java/org/jfaster/mango/util/reflect/Types.java#L66-L79
apache/groovy
src/main/groovy/groovy/util/FactoryBuilderSupport.java
FactoryBuilderSupport.checkValueIsType
public static boolean checkValueIsType(Object value, Object name, Class type) { """ Checks type of value against builder type @param value the node's value @param name the node's name @param type a Class that may be assignable to the value's class @return true if type is assignable to the value's class, fa...
java
public static boolean checkValueIsType(Object value, Object name, Class type) { if (value != null) { if (type.isAssignableFrom(value.getClass())) { return true; } else { throw new RuntimeException("The value argument of '" + name + "' must be of type " ...
[ "public", "static", "boolean", "checkValueIsType", "(", "Object", "value", ",", "Object", "name", ",", "Class", "type", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "type", ".", "isAssignableFrom", "(", "value", ".", "getClass", "(", ...
Checks type of value against builder type @param value the node's value @param name the node's name @param type a Class that may be assignable to the value's class @return true if type is assignable to the value's class, false if value is null.
[ "Checks", "type", "of", "value", "against", "builder", "type" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/FactoryBuilderSupport.java#L104-L115
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.createTextTempFile
public FilePath createTextTempFile(final String prefix, final String suffix, final String contents) throws IOException, InterruptedException { """ Creates a temporary file in this directory and set the contents to the given text (encoded in the platform default encoding) @param prefix The prefix string to be ...
java
public FilePath createTextTempFile(final String prefix, final String suffix, final String contents) throws IOException, InterruptedException { return createTextTempFile(prefix,suffix,contents,true); }
[ "public", "FilePath", "createTextTempFile", "(", "final", "String", "prefix", ",", "final", "String", "suffix", ",", "final", "String", "contents", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "createTextTempFile", "(", "prefix", ",", ...
Creates a temporary file in this directory and set the contents to the given text (encoded in the platform default encoding) @param prefix The prefix string to be used in generating the file's name; must be at least three characters long @param suffix The suffix string to be used in generating the file's name; may be ...
[ "Creates", "a", "temporary", "file", "in", "this", "directory", "and", "set", "the", "contents", "to", "the", "given", "text", "(", "encoded", "in", "the", "platform", "default", "encoding", ")" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1412-L1414
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java
CmsFocalPointController.updateScaling
private void updateScaling() { """ Sets up the coordinate transformations between the coordinate system of the parent element of the image element and the native coordinate system of the original image. """ List<I_CmsTransform> transforms = new ArrayList<>(); CmsCroppingParamBean crop = m_cro...
java
private void updateScaling() { List<I_CmsTransform> transforms = new ArrayList<>(); CmsCroppingParamBean crop = m_croppingProvider.get(); CmsImageInfoBean info = m_imageInfoProvider.get(); double wv = m_image.getElement().getParentElement().getOffsetWidth(); double hv = m_image...
[ "private", "void", "updateScaling", "(", ")", "{", "List", "<", "I_CmsTransform", ">", "transforms", "=", "new", "ArrayList", "<>", "(", ")", ";", "CmsCroppingParamBean", "crop", "=", "m_croppingProvider", ".", "get", "(", ")", ";", "CmsImageInfoBean", "info",...
Sets up the coordinate transformations between the coordinate system of the parent element of the image element and the native coordinate system of the original image.
[ "Sets", "up", "the", "coordinate", "transformations", "between", "the", "coordinate", "system", "of", "the", "parent", "element", "of", "the", "image", "element", "and", "the", "native", "coordinate", "system", "of", "the", "original", "image", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java#L439-L479
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extrudePolygonAsGeometry
public static GeometryCollection extrudePolygonAsGeometry(Polygon polygon, double height) { """ Extrude the polygon as a collection of geometries The output geometryCollection contains the floor, the walls and the roof. @param polygon @param height @return """ GeometryFactory factory = polygon.getF...
java
public static GeometryCollection extrudePolygonAsGeometry(Polygon polygon, double height){ GeometryFactory factory = polygon.getFactory(); Geometry[] geometries = new Geometry[3]; //Extract floor //We process the exterior ring final LineString shell = getClockWise(polygo...
[ "public", "static", "GeometryCollection", "extrudePolygonAsGeometry", "(", "Polygon", "polygon", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "Geometry", "[", "]", "geometries", "=", "new", "G...
Extrude the polygon as a collection of geometries The output geometryCollection contains the floor, the walls and the roof. @param polygon @param height @return
[ "Extrude", "the", "polygon", "as", "a", "collection", "of", "geometries", "The", "output", "geometryCollection", "contains", "the", "floor", "the", "walls", "and", "the", "roof", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L49-L75
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java
TableCellStyleBuilder.borderTop
public TableCellStyleBuilder borderTop(final Length size, final Color borderColor, final BorderAttribute.Style style) { """ Add a border style for the top border of this cell. @param size the size of the line @param borderColor the color to be used in format #r...
java
public TableCellStyleBuilder borderTop(final Length size, final Color borderColor, final BorderAttribute.Style style) { final BorderAttribute bs = new BorderAttribute(size, borderColor, style); this.bordersBuilder.top(bs); return this; }
[ "public", "TableCellStyleBuilder", "borderTop", "(", "final", "Length", "size", ",", "final", "Color", "borderColor", ",", "final", "BorderAttribute", ".", "Style", "style", ")", "{", "final", "BorderAttribute", "bs", "=", "new", "BorderAttribute", "(", "size", ...
Add a border style for the top border of this cell. @param size the size of the line @param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border @param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE @return this for fl...
[ "Add", "a", "border", "style", "for", "the", "top", "border", "of", "this", "cell", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L158-L163
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
TriangleListing.runInternal
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { """ /* Implementation notes: The requirement that "K extends CopyableValue<K>" can be removed when Flink has a self-join and GenerateTriplets is implemented as such. ProjectTriangles should eventually be replaced...
java
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // u, v where u < v DataSet<Tuple2<K, K>> filteredByID = input .getEdges() .flatMap(new FilterByID<>()) .setParallelism(parallelism) .name("Filter by ID"); // u, v, (edge value, deg(u), deg(v)) DataSet<...
[ "@", "Override", "public", "DataSet", "<", "Result", "<", "K", ">", ">", "runInternal", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "input", ")", "throws", "Exception", "{", "// u, v where u < v", "DataSet", "<", "Tuple2", "<", "K", ",", "K", ...
/* Implementation notes: The requirement that "K extends CopyableValue<K>" can be removed when Flink has a self-join and GenerateTriplets is implemented as such. ProjectTriangles should eventually be replaced by ".projectFirst("*")" when projections use code generation.
[ "/", "*", "Implementation", "notes", ":" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java#L80-L127
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java
TraceNLS.getBaseResourceBundle
public static ResourceBundle getBaseResourceBundle(Class<?> aClass, String aBundleName) { """ Return the Base (English) resource bundle since we do not explicitly ship the _en bundle. @param aClass the class utilizing the resource bundle @param aBundleName the name of the resource bundle @return Resourc...
java
public static ResourceBundle getBaseResourceBundle(Class<?> aClass, String aBundleName) { ResourceBundle bundle = null; final Class<?> clazz = aClass; final String bundleName = aBundleName; // Need a special classloader trick to load the ENGLISH messages (from the base bundle). ...
[ "public", "static", "ResourceBundle", "getBaseResourceBundle", "(", "Class", "<", "?", ">", "aClass", ",", "String", "aBundleName", ")", "{", "ResourceBundle", "bundle", "=", "null", ";", "final", "Class", "<", "?", ">", "clazz", "=", "aClass", ";", "final",...
Return the Base (English) resource bundle since we do not explicitly ship the _en bundle. @param aClass the class utilizing the resource bundle @param aBundleName the name of the resource bundle @return ResourceBundle the base resource bundle
[ "Return", "the", "Base", "(", "English", ")", "resource", "bundle", "since", "we", "do", "not", "explicitly", "ship", "the", "_en", "bundle", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java#L763-L781
wisdom-framework/wisdom
extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/wisdom/ControllerModel.java
ControllerModel.from
public static JsonNode from(InstanceDescription description, Json json) { """ Creates the Json representation for an invalid controller. @param description the instance's description @param json the json service @return the json representation """ ObjectNode node = json.newObject(); ...
java
public static JsonNode from(InstanceDescription description, Json json) { ObjectNode node = json.newObject(); node.put("classname", description.getComponentDescription().getName()) .put("invalid", description.getState() == ComponentInstance.INVALID) .put("reason", extract...
[ "public", "static", "JsonNode", "from", "(", "InstanceDescription", "description", ",", "Json", "json", ")", "{", "ObjectNode", "node", "=", "json", ".", "newObject", "(", ")", ";", "node", ".", "put", "(", "\"classname\"", ",", "description", ".", "getCompo...
Creates the Json representation for an invalid controller. @param description the instance's description @param json the json service @return the json representation
[ "Creates", "the", "Json", "representation", "for", "an", "invalid", "controller", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/wisdom/ControllerModel.java#L63-L69
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java
SheetResourcesImpl.createUpdateRequest
public UpdateRequest createUpdateRequest(long sheetId, MultiRowEmail email) throws SmartsheetException { """ Creates an Update Request for the specified Row(s) within the Sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests Exceptions: - IllegalArgumentExcepti...
java
public UpdateRequest createUpdateRequest(long sheetId, MultiRowEmail email) throws SmartsheetException { return this.createResource("sheets/" + sheetId + "/updaterequests", UpdateRequest.class, email); }
[ "public", "UpdateRequest", "createUpdateRequest", "(", "long", "sheetId", ",", "MultiRowEmail", "email", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sheets/\"", "+", "sheetId", "+", "\"/updaterequests\"", ",", "UpdateReq...
Creates an Update Request for the specified Row(s) within the Sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - Authorizat...
[ "Creates", "an", "Update", "Request", "for", "the", "specified", "Row", "(", "s", ")", "within", "the", "Sheet", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L1116-L1118
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.setCornerColor
public void setCornerColor(int index, Color color) { """ Sets the color of a corner for gradation. @param index The index of a corner. @param color The color of a corner. """ if (!isGradation()) { for (int i = 0; i < 4; i++) { cornerColor[i] = new RGBColor(0.0, 0.0, 0.0)...
java
public void setCornerColor(int index, Color color) { if (!isGradation()) { for (int i = 0; i < 4; i++) { cornerColor[i] = new RGBColor(0.0, 0.0, 0.0); cornerColor[i] = this.fillColor; } setGradation(true); } cornerColor[index] =...
[ "public", "void", "setCornerColor", "(", "int", "index", ",", "Color", "color", ")", "{", "if", "(", "!", "isGradation", "(", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "cornerColor", "[", "i"...
Sets the color of a corner for gradation. @param index The index of a corner. @param color The color of a corner.
[ "Sets", "the", "color", "of", "a", "corner", "for", "gradation", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L346-L355
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_SideBuffer.java
ST_SideBuffer.singleSideBuffer
public static Geometry singleSideBuffer(Geometry geometry, double distance) { """ Compute a single side buffer with default parameters @param geometry @param distance @return """ if(geometry==null){ return null; } return computeSingleSideBuffer(geometry, distance, new Buf...
java
public static Geometry singleSideBuffer(Geometry geometry, double distance){ if(geometry==null){ return null; } return computeSingleSideBuffer(geometry, distance, new BufferParameters()); }
[ "public", "static", "Geometry", "singleSideBuffer", "(", "Geometry", "geometry", ",", "double", "distance", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "return", "computeSingleSideBuffer", "(", "geometry", ",", "distanc...
Compute a single side buffer with default parameters @param geometry @param distance @return
[ "Compute", "a", "single", "side", "buffer", "with", "default", "parameters" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_SideBuffer.java#L58-L63
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createMock
public static <T> T createMock(Class<T> type, Object... constructorArguments) { """ Creates a mock object that supports mocking of final and native methods and invokes a specific constructor based on the supplied argument values. @param <T> the type of the mock object @param type ...
java
public static <T> T createMock(Class<T> type, Object... constructorArguments) { Constructor<?> constructor = WhiteboxImpl.findUniqueConstructorOrThrowException(type, constructorArguments); ConstructorArgs constructorArgs = new ConstructorArgs(constructor, constructorArguments); return doMock(typ...
[ "public", "static", "<", "T", ">", "T", "createMock", "(", "Class", "<", "T", ">", "type", ",", "Object", "...", "constructorArguments", ")", "{", "Constructor", "<", "?", ">", "constructor", "=", "WhiteboxImpl", ".", "findUniqueConstructorOrThrowException", "...
Creates a mock object that supports mocking of final and native methods and invokes a specific constructor based on the supplied argument values. @param <T> the type of the mock object @param type the type of the mock object @param constructorArguments The constructor arguments that wi...
[ "Creates", "a", "mock", "object", "that", "supports", "mocking", "of", "final", "and", "native", "methods", "and", "invokes", "a", "specific", "constructor", "based", "on", "the", "supplied", "argument", "values", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L123-L127
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/interceptor/InterceptorContext.java
InterceptorContext.createInterceptor
protected static Interceptor createInterceptor( InterceptorConfig config, Class baseClassOrInterface ) { """ Instantiates an interceptor using the class name in the given InterceptorConfig. @param config the {@link InterceptorConfig} used to determine the {@link Interceptor} class. @param baseClassOrInterface ...
java
protected static Interceptor createInterceptor( InterceptorConfig config, Class baseClassOrInterface ) { assert Interceptor.class.isAssignableFrom( baseClassOrInterface ) : baseClassOrInterface.getName() + " cannot be assigned to " + Interceptor.class.getName(); ClassLoader ...
[ "protected", "static", "Interceptor", "createInterceptor", "(", "InterceptorConfig", "config", ",", "Class", "baseClassOrInterface", ")", "{", "assert", "Interceptor", ".", "class", ".", "isAssignableFrom", "(", "baseClassOrInterface", ")", ":", "baseClassOrInterface", ...
Instantiates an interceptor using the class name in the given InterceptorConfig. @param config the {@link InterceptorConfig} used to determine the {@link Interceptor} class. @param baseClassOrInterface the required base class or interface. May be <code>null</code>. @return an initialized Interceptor, or <code>null</c...
[ "Instantiates", "an", "interceptor", "using", "the", "class", "name", "in", "the", "given", "InterceptorConfig", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/interceptor/InterceptorContext.java#L121-L158
diffplug/durian
src/com/diffplug/common/base/FieldsAndGetters.java
FieldsAndGetters.fieldsAndGetters
public static Stream<Map.Entry<String, Object>> fieldsAndGetters(Object obj) { """ Returns a {@code Stream} of all public fields and getter methods and their values for the given object. @see #getters(Object, Predicate) """ return fieldsAndGetters(obj, Predicates.alwaysTrue()); }
java
public static Stream<Map.Entry<String, Object>> fieldsAndGetters(Object obj) { return fieldsAndGetters(obj, Predicates.alwaysTrue()); }
[ "public", "static", "Stream", "<", "Map", ".", "Entry", "<", "String", ",", "Object", ">", ">", "fieldsAndGetters", "(", "Object", "obj", ")", "{", "return", "fieldsAndGetters", "(", "obj", ",", "Predicates", ".", "alwaysTrue", "(", ")", ")", ";", "}" ]
Returns a {@code Stream} of all public fields and getter methods and their values for the given object. @see #getters(Object, Predicate)
[ "Returns", "a", "{", "@code", "Stream", "}", "of", "all", "public", "fields", "and", "getter", "methods", "and", "their", "values", "for", "the", "given", "object", "." ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/FieldsAndGetters.java#L132-L134
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java
CommonOps_DDF2.addEquals
public static void addEquals( DMatrix2x2 a , DMatrix2x2 b ) { """ <p>Performs the following operation:<br> <br> a = a + b <br> a<sub>ij</sub> = a<sub>ij</sub> + b<sub>ij</sub> <br> </p> @param a A Matrix. Modified. @param b A Matrix. Not modified. """ a.a11 += b.a11; a.a12 += b.a12; ...
java
public static void addEquals( DMatrix2x2 a , DMatrix2x2 b ) { a.a11 += b.a11; a.a12 += b.a12; a.a21 += b.a21; a.a22 += b.a22; }
[ "public", "static", "void", "addEquals", "(", "DMatrix2x2", "a", ",", "DMatrix2x2", "b", ")", "{", "a", ".", "a11", "+=", "b", ".", "a11", ";", "a", ".", "a12", "+=", "b", ".", "a12", ";", "a", ".", "a21", "+=", "b", ".", "a21", ";", "a", "."...
<p>Performs the following operation:<br> <br> a = a + b <br> a<sub>ij</sub> = a<sub>ij</sub> + b<sub>ij</sub> <br> </p> @param a A Matrix. Modified. @param b A Matrix. Not modified.
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "a", "=", "a", "+", "b", "<br", ">", "a<sub", ">", "ij<", "/", "sub", ">", "=", "a<sub", ">", "ij<", "/", "sub", ">", "+", "b<sub", ">", "ij<", "/", "sub", "...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java#L84-L89
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.deleteFriends
public ResponseWrapper deleteFriends(String username, String...users) throws APIConnectionException, APIRequestException { """ Delete friends @param username Friends you want to delete to @param users username to be delete @return No content @throws APIConnectionException connect exception @throws...
java
public ResponseWrapper deleteFriends(String username, String...users) throws APIConnectionException, APIRequestException { return _userClient.deleteFriends(username, users); }
[ "public", "ResponseWrapper", "deleteFriends", "(", "String", "username", ",", "String", "...", "users", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_userClient", ".", "deleteFriends", "(", "username", ",", "users", ")", ";", ...
Delete friends @param username Friends you want to delete to @param users username to be delete @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Delete", "friends" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L303-L306
Azure/azure-sdk-for-java
keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java
VaultsInner.getDeletedAsync
public Observable<DeletedVaultInner> getDeletedAsync(String vaultName, String location) { """ Gets the deleted Azure key vault. @param vaultName The name of the vault. @param location The location of the deleted vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the obse...
java
public Observable<DeletedVaultInner> getDeletedAsync(String vaultName, String location) { return getDeletedWithServiceResponseAsync(vaultName, location).map(new Func1<ServiceResponse<DeletedVaultInner>, DeletedVaultInner>() { @Override public DeletedVaultInner call(ServiceResponse<Delete...
[ "public", "Observable", "<", "DeletedVaultInner", ">", "getDeletedAsync", "(", "String", "vaultName", ",", "String", "location", ")", "{", "return", "getDeletedWithServiceResponseAsync", "(", "vaultName", ",", "location", ")", ".", "map", "(", "new", "Func1", "<",...
Gets the deleted Azure key vault. @param vaultName The name of the vault. @param location The location of the deleted vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DeletedVaultInner object
[ "Gets", "the", "deleted", "Azure", "key", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java#L1193-L1200
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java
ImageSaver.saveImage
public static void saveImage(Image image, File file) { """ Saves Image using {@link #saveImage(Image, File, String)}. The file format is extracted from the files name. @param image to be saved @param file to save image to @throws ImageSaverException if an IOException occured during the process, the filename d...
java
public static void saveImage(Image image, File file){ // get file ending int dotIndex = file.getName().lastIndexOf('.'); if(dotIndex >= 0){ String ending = file.getName().substring(dotIndex+1, file.getName().length()); saveImage(image, file, ending); } else { throw new ImageSaverException("could not de...
[ "public", "static", "void", "saveImage", "(", "Image", "image", ",", "File", "file", ")", "{", "// get file ending", "int", "dotIndex", "=", "file", ".", "getName", "(", ")", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "dotIndex", ">=", "0"...
Saves Image using {@link #saveImage(Image, File, String)}. The file format is extracted from the files name. @param image to be saved @param file to save image to @throws ImageSaverException if an IOException occured during the process, the filename does not contain a dot to get the filetype or no appropriate writer co...
[ "Saves", "Image", "using", "{" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java#L166-L175
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/ops/MatrixFeatures_D.java
MatrixFeatures_D.isEquals
public static boolean isEquals(DMatrix a, DMatrix b ) { """ <p> Checks to see if each element in the two matrices are equal: a<sub>ij</sub> == b<sub>ij</sub> <p> <p> NOTE: If any of the elements are NaN then false is returned. If two corresponding elements are both positive or negative infinity then they ...
java
public static boolean isEquals(DMatrix a, DMatrix b ) { if( a.getNumRows() != b.getNumRows() || a.getNumCols() != b.getNumCols() ) return false; final int numRows = a.getNumRows(); final int numCols = a.getNumCols(); for (int row = 0; row < numRows; row++) { for...
[ "public", "static", "boolean", "isEquals", "(", "DMatrix", "a", ",", "DMatrix", "b", ")", "{", "if", "(", "a", ".", "getNumRows", "(", ")", "!=", "b", ".", "getNumRows", "(", ")", "||", "a", ".", "getNumCols", "(", ")", "!=", "b", ".", "getNumCols"...
<p> Checks to see if each element in the two matrices are equal: a<sub>ij</sub> == b<sub>ij</sub> <p> <p> NOTE: If any of the elements are NaN then false is returned. If two corresponding elements are both positive or negative infinity then they are equal. </p> @param a A matrix. Not modified. @param b A matrix. Not...
[ "<p", ">", "Checks", "to", "see", "if", "each", "element", "in", "the", "two", "matrices", "are", "equal", ":", "a<sub", ">", "ij<", "/", "sub", ">", "==", "b<sub", ">", "ij<", "/", "sub", ">", "<p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/ops/MatrixFeatures_D.java#L46-L60