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
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ClassUtils.java
ClassUtils.matchesTypeName
public static boolean matchesTypeName(Class<?> clazz, String typeName) { """ Check whether the given class matches the user-specified type name. @param clazz the class to check @param typeName the type name to match """ return (typeName != null && (typeName.equals(clazz.getName()) || typeName.equals(cl...
java
public static boolean matchesTypeName(Class<?> clazz, String typeName) { return (typeName != null && (typeName.equals(clazz.getName()) || typeName.equals(clazz.getSimpleName()) || (clazz.isArray() && typeName.equals(getQualifiedNameForArray(clazz))))); }
[ "public", "static", "boolean", "matchesTypeName", "(", "Class", "<", "?", ">", "clazz", ",", "String", "typeName", ")", "{", "return", "(", "typeName", "!=", "null", "&&", "(", "typeName", ".", "equals", "(", "clazz", ".", "getName", "(", ")", ")", "||...
Check whether the given class matches the user-specified type name. @param clazz the class to check @param typeName the type name to match
[ "Check", "whether", "the", "given", "class", "matches", "the", "user", "-", "specified", "type", "name", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ClassUtils.java#L567-L571
duracloud/duracloud
s3storageprovider/src/main/java/org/duracloud/s3task/streaminghls/BaseHlsTaskRunner.java
BaseHlsTaskRunner.setDistributionState
protected void setDistributionState(String distId, boolean enabled) { """ Enables or disables an existing distribution @param distId the ID of the distribution @param enabled true to enable, false to disable """ GetDistributionConfigResult result = cfClient.getDistributionConfig(new Ge...
java
protected void setDistributionState(String distId, boolean enabled) { GetDistributionConfigResult result = cfClient.getDistributionConfig(new GetDistributionConfigRequest(distId)); DistributionConfig distConfig = result.getDistributionConfig(); distConfig.setEnabled(enabled); ...
[ "protected", "void", "setDistributionState", "(", "String", "distId", ",", "boolean", "enabled", ")", "{", "GetDistributionConfigResult", "result", "=", "cfClient", ".", "getDistributionConfig", "(", "new", "GetDistributionConfigRequest", "(", "distId", ")", ")", ";",...
Enables or disables an existing distribution @param distId the ID of the distribution @param enabled true to enable, false to disable
[ "Enables", "or", "disables", "an", "existing", "distribution" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/s3storageprovider/src/main/java/org/duracloud/s3task/streaminghls/BaseHlsTaskRunner.java#L124-L135
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java
FourierTransform.convolve
private static void convolve(double[] x, double[] y, double[] out) { """ /* Computes the circular convolution of the given real vectors. Each vector's length must be the same. """ // if (x.length != y.length || x.length != out.length) // throw new IllegalArgumentException("Mismatched l...
java
private static void convolve(double[] x, double[] y, double[] out) { // if (x.length != y.length || x.length != out.length) // throw new IllegalArgumentException("Mismatched lengths"); int n = x.length; convolve(x, new double[n], y, new double[n], out, new double[n]); }
[ "private", "static", "void", "convolve", "(", "double", "[", "]", "x", ",", "double", "[", "]", "y", ",", "double", "[", "]", "out", ")", "{", "// if (x.length != y.length || x.length != out.length)\r", "// throw new IllegalArgumentException(\"Mismat...
/* Computes the circular convolution of the given real vectors. Each vector's length must be the same.
[ "/", "*", "Computes", "the", "circular", "convolution", "of", "the", "given", "real", "vectors", ".", "Each", "vector", "s", "length", "must", "be", "the", "same", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java#L347-L352
alkacon/opencms-core
src/org/opencms/ui/components/extensions/CmsGwtDialogExtension.java
CmsGwtDialogExtension.openPublishDailog
protected void openPublishDailog(CmsProject project, List<CmsResource> directPublishResources) { """ Opens the publish dialog for the given project.<p> @param project the project for which to open the dialog @param directPublishResources the resources for which to open the publish dialog. """ CmsP...
java
protected void openPublishDailog(CmsProject project, List<CmsResource> directPublishResources) { CmsPublishData publishData = getPublishData(project, directPublishResources); String data = getSerializedPublishData(publishData); getRpcProxy(I_CmsGwtDialogClientRpc.class).openPublishDialog(data);...
[ "protected", "void", "openPublishDailog", "(", "CmsProject", "project", ",", "List", "<", "CmsResource", ">", "directPublishResources", ")", "{", "CmsPublishData", "publishData", "=", "getPublishData", "(", "project", ",", "directPublishResources", ")", ";", "String",...
Opens the publish dialog for the given project.<p> @param project the project for which to open the dialog @param directPublishResources the resources for which to open the publish dialog.
[ "Opens", "the", "publish", "dialog", "for", "the", "given", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsGwtDialogExtension.java#L337-L342
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.readStaticField
public static Object readStaticField(final Class<?> cls, final String fieldName) throws IllegalAccessException { """ Reads the named {@code public static} {@link Field}. Superclasses will be considered. @param cls the {@link Class} to reflect, must not be {@code null} @param fieldName the field name to obtai...
java
public static Object readStaticField(final Class<?> cls, final String fieldName) throws IllegalAccessException { return readStaticField(cls, fieldName, false); }
[ "public", "static", "Object", "readStaticField", "(", "final", "Class", "<", "?", ">", "cls", ",", "final", "String", "fieldName", ")", "throws", "IllegalAccessException", "{", "return", "readStaticField", "(", "cls", ",", "fieldName", ",", "false", ")", ";", ...
Reads the named {@code public static} {@link Field}. Superclasses will be considered. @param cls the {@link Class} to reflect, must not be {@code null} @param fieldName the field name to obtain @return the value of the field @throws IllegalArgumentException if the class is {@code null}, or the field name is blank or e...
[ "Reads", "the", "named", "{", "@code", "public", "static", "}", "{", "@link", "Field", "}", ".", "Superclasses", "will", "be", "considered", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L316-L318
schallee/alib4j
core/src/main/java/net/darkmist/alib/res/PkgRes.java
PkgRes.appendResourcePathPrefixFor
protected static StringBuilder appendResourcePathPrefixFor(StringBuilder sb, String pkgName) { """ Apend a package name converted to a resource path prefix. @param sb what to append to. If this is null, a new StringBuilder is created. @param pkgName The name of the package. @return Path, starting and ending wi...
java
protected static StringBuilder appendResourcePathPrefixFor(StringBuilder sb, String pkgName) { if(pkgName == null) throw new NullPointerException("pkgName is null"); if(sb == null) sb = new StringBuilder(pkgName.length() + 2); sb.append('/'); if(pkgName.length() == 0) return sb; sb.append(pkgName.re...
[ "protected", "static", "StringBuilder", "appendResourcePathPrefixFor", "(", "StringBuilder", "sb", ",", "String", "pkgName", ")", "{", "if", "(", "pkgName", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"pkgName is null\"", ")", ";", "if", "(",...
Apend a package name converted to a resource path prefix. @param sb what to append to. If this is null, a new StringBuilder is created. @param pkgName The name of the package. @return Path, starting and ending with a slash, for resources prefixed by pkgName. @throws NullPointerException if pkgName is null.
[ "Apend", "a", "package", "name", "converted", "to", "a", "resource", "path", "prefix", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/core/src/main/java/net/darkmist/alib/res/PkgRes.java#L132-L145
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java
ElementFilter.fieldsIn
public static Set<VariableElement> fieldsIn(Set<? extends Element> elements) { """ Returns a set of fields in {@code elements}. @return a set of fields in {@code elements} @param elements the elements to filter """ return setFilter(elements, FIELD_KINDS, VariableElement.class); }
java
public static Set<VariableElement> fieldsIn(Set<? extends Element> elements) { return setFilter(elements, FIELD_KINDS, VariableElement.class); }
[ "public", "static", "Set", "<", "VariableElement", ">", "fieldsIn", "(", "Set", "<", "?", "extends", "Element", ">", "elements", ")", "{", "return", "setFilter", "(", "elements", ",", "FIELD_KINDS", ",", "VariableElement", ".", "class", ")", ";", "}" ]
Returns a set of fields in {@code elements}. @return a set of fields in {@code elements} @param elements the elements to filter
[ "Returns", "a", "set", "of", "fields", "in", "{" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java#L102-L105
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java
WebUtilities.getPath
public static String getPath(final String url, final Map<String, String> parameters) { """ Adds GET parameters to a path. @param url the existing url path @param parameters are put into the URL as get parameters. @return the complete url eg http://localhost/app?step=1 """ return getPath(url, parameters,...
java
public static String getPath(final String url, final Map<String, String> parameters) { return getPath(url, parameters, false); }
[ "public", "static", "String", "getPath", "(", "final", "String", "url", ",", "final", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "return", "getPath", "(", "url", ",", "parameters", ",", "false", ")", ";", "}" ]
Adds GET parameters to a path. @param url the existing url path @param parameters are put into the URL as get parameters. @return the complete url eg http://localhost/app?step=1
[ "Adds", "GET", "parameters", "to", "a", "path", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java#L477-L479
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentWriter.java
MetadataDocumentWriter.endDocument
public void endDocument() throws ODataRenderException { """ End the XML stream document. @throws ODataRenderException if unable to render """ try { xmlWriter.writeEndDocument(); xmlWriter.flush(); } catch (XMLStreamException e) { LOG.error("Not possible t...
java
public void endDocument() throws ODataRenderException { try { xmlWriter.writeEndDocument(); xmlWriter.flush(); } catch (XMLStreamException e) { LOG.error("Not possible to end stream XML"); throw new ODataRenderException("Not possible to end stream XML: ",...
[ "public", "void", "endDocument", "(", ")", "throws", "ODataRenderException", "{", "try", "{", "xmlWriter", ".", "writeEndDocument", "(", ")", ";", "xmlWriter", ".", "flush", "(", ")", ";", "}", "catch", "(", "XMLStreamException", "e", ")", "{", "LOG", ".",...
End the XML stream document. @throws ODataRenderException if unable to render
[ "End", "the", "XML", "stream", "document", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentWriter.java#L106-L115
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/GroupsApi.java
GroupsApi.getInfo
public GroupInfo getInfo(String groupId, String groupPathAlias, String lang) throws JinxException { """ Get information about a group. <br> This method does not require authentication. <br> @param groupId (Optional) The NSID of the group to fetch information for. One of this or the groupPathAlias is r...
java
public GroupInfo getInfo(String groupId, String groupPathAlias, String lang) throws JinxException { if (JinxUtils.isNullOrEmpty(groupId)) { JinxUtils.validateParams(groupPathAlias); } else { JinxUtils.validateParams(groupId); } Map<String, String> params = new TreeMap<>(); params.put("me...
[ "public", "GroupInfo", "getInfo", "(", "String", "groupId", ",", "String", "groupPathAlias", ",", "String", "lang", ")", "throws", "JinxException", "{", "if", "(", "JinxUtils", ".", "isNullOrEmpty", "(", "groupId", ")", ")", "{", "JinxUtils", ".", "validatePar...
Get information about a group. <br> This method does not require authentication. <br> @param groupId (Optional) The NSID of the group to fetch information for. One of this or the groupPathAlias is required. @param groupPathAlias (Optional) The path alias of the group. One of this or the groupId parameter is req...
[ "Get", "information", "about", "a", "group", ".", "<br", ">", "This", "method", "does", "not", "require", "authentication", ".", "<br", ">" ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/GroupsApi.java#L77-L94
vkostyukov/la4j
src/main/java/org/la4j/Vectors.java
Vectors.asSumFunctionAccumulator
public static VectorAccumulator asSumFunctionAccumulator(final double neutral, final VectorFunction function) { """ Creates a sum function accumulator, that calculates the sum of all elements in the vector after applying given {@code function} to each o...
java
public static VectorAccumulator asSumFunctionAccumulator(final double neutral, final VectorFunction function) { return new VectorAccumulator() { private final VectorAccumulator sumAccumulator = Vectors.asSumAccumulator(neutral); ...
[ "public", "static", "VectorAccumulator", "asSumFunctionAccumulator", "(", "final", "double", "neutral", ",", "final", "VectorFunction", "function", ")", "{", "return", "new", "VectorAccumulator", "(", ")", "{", "private", "final", "VectorAccumulator", "sumAccumulator", ...
Creates a sum function accumulator, that calculates the sum of all elements in the vector after applying given {@code function} to each of them. @param neutral the neutral value @param function the vector function @return a sum function accumulator
[ "Creates", "a", "sum", "function", "accumulator", "that", "calculates", "the", "sum", "of", "all", "elements", "in", "the", "vector", "after", "applying", "given", "{", "@code", "function", "}", "to", "each", "of", "them", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Vectors.java#L404-L419
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/LoadBalancingRxClient.java
LoadBalancingRxClient.getProperty
protected <S> S getProperty(IClientConfigKey<S> key, @Nullable IClientConfig requestConfig, S defaultValue) { """ Resolve the final property value from, 1. Request specific configuration 2. Default configuration 3. Default value @param key @param requestConfig @param defaultValue @return """ i...
java
protected <S> S getProperty(IClientConfigKey<S> key, @Nullable IClientConfig requestConfig, S defaultValue) { if (requestConfig != null && requestConfig.get(key) != null) { return requestConfig.get(key); } else { return clientConfig.get(key, defaultValue); } }
[ "protected", "<", "S", ">", "S", "getProperty", "(", "IClientConfigKey", "<", "S", ">", "key", ",", "@", "Nullable", "IClientConfig", "requestConfig", ",", "S", "defaultValue", ")", "{", "if", "(", "requestConfig", "!=", "null", "&&", "requestConfig", ".", ...
Resolve the final property value from, 1. Request specific configuration 2. Default configuration 3. Default value @param key @param requestConfig @param defaultValue @return
[ "Resolve", "the", "final", "property", "value", "from", "1", ".", "Request", "specific", "configuration", "2", ".", "Default", "configuration", "3", ".", "Default", "value" ]
train
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/LoadBalancingRxClient.java#L165-L171
google/closure-compiler
src/com/google/javascript/jscomp/parsing/parser/FeatureSet.java
FeatureSet.with
@VisibleForTesting public FeatureSet with(Feature... newFeatures) { """ Returns a feature set combining all the features from {@code this} and {@code newFeatures}. """ return new FeatureSet(union(features, ImmutableSet.copyOf(newFeatures))); }
java
@VisibleForTesting public FeatureSet with(Feature... newFeatures) { return new FeatureSet(union(features, ImmutableSet.copyOf(newFeatures))); }
[ "@", "VisibleForTesting", "public", "FeatureSet", "with", "(", "Feature", "...", "newFeatures", ")", "{", "return", "new", "FeatureSet", "(", "union", "(", "features", ",", "ImmutableSet", ".", "copyOf", "(", "newFeatures", ")", ")", ")", ";", "}" ]
Returns a feature set combining all the features from {@code this} and {@code newFeatures}.
[ "Returns", "a", "feature", "set", "combining", "all", "the", "features", "from", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/parser/FeatureSet.java#L367-L370
google/closure-compiler
src/com/google/javascript/jscomp/graph/LinkedDirectedGraph.java
LinkedDirectedGraph.connectIfNotConnectedInDirection
public void connectIfNotConnectedInDirection(N srcValue, E edgeValue, N destValue) { """ DiGraphNode look ups can be expensive for a large graph operation, prefer this method if you have the DiGraphNode available. """ LinkedDirectedGraphNode<N, E> src = createDirectedGraphNode(srcValue); LinkedDirecte...
java
public void connectIfNotConnectedInDirection(N srcValue, E edgeValue, N destValue) { LinkedDirectedGraphNode<N, E> src = createDirectedGraphNode(srcValue); LinkedDirectedGraphNode<N, E> dest = createDirectedGraphNode(destValue); if (!this.isConnectedInDirection(src, Predicates.equalTo(edgeValue), dest)) { ...
[ "public", "void", "connectIfNotConnectedInDirection", "(", "N", "srcValue", ",", "E", "edgeValue", ",", "N", "destValue", ")", "{", "LinkedDirectedGraphNode", "<", "N", ",", "E", ">", "src", "=", "createDirectedGraphNode", "(", "srcValue", ")", ";", "LinkedDirec...
DiGraphNode look ups can be expensive for a large graph operation, prefer this method if you have the DiGraphNode available.
[ "DiGraphNode", "look", "ups", "can", "be", "expensive", "for", "a", "large", "graph", "operation", "prefer", "this", "method", "if", "you", "have", "the", "DiGraphNode", "available", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/graph/LinkedDirectedGraph.java#L101-L107
denisneuling/apitrary.jar
apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/util/ProxyUtil.java
ProxyUtil.createLazyProxy
@SuppressWarnings("unchecked") public static <T> T createLazyProxy(Class<T> target, ApitraryDaoSupport apitraryDaoSupport, String id) { """ <p> createLazyProxy. </p> @param target a {@link java.lang.Class} object. @param apitraryDaoSupport a {@link com.apitrary.orm.core.ApitraryDaoSupport} object. @param...
java
@SuppressWarnings("unchecked") public static <T> T createLazyProxy(Class<T> target, ApitraryDaoSupport apitraryDaoSupport, String id) { if (id == null) { return null; } try { Enhancer e = new Enhancer(); e.setSuperclass(target); e.setCallback(new LazyLoadingInterceptor(target, apitraryDaoSupport, id)...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "createLazyProxy", "(", "Class", "<", "T", ">", "target", ",", "ApitraryDaoSupport", "apitraryDaoSupport", ",", "String", "id", ")", "{", "if", "(", "id", "==", "nu...
<p> createLazyProxy. </p> @param target a {@link java.lang.Class} object. @param apitraryDaoSupport a {@link com.apitrary.orm.core.ApitraryDaoSupport} object. @param id a {@link java.lang.String} object. @param <T> a T object. @return a T object.
[ "<p", ">", "createLazyProxy", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/apitrary.jar/blob/b7f639a1e735c60ba2b1b62851926757f5de8628/apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/util/ProxyUtil.java#L48-L61
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java
TmdbSearch.searchCollection
public ResultList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException { """ Search for collections by name. @param query @param language @param page @return @throws MovieDbException """ TmdbParameters parameters = new TmdbParameters(); parame...
java
public ResultList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.QUERY, query); parameters.add(Param.PAGE, page); parameters.add(Param.LANGUAGE, language); ...
[ "public", "ResultList", "<", "Collection", ">", "searchCollection", "(", "String", "query", ",", "Integer", "page", ",", "String", "language", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "p...
Search for collections by name. @param query @param language @param page @return @throws MovieDbException
[ "Search", "for", "collections", "by", "name", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java#L94-L103
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/HostCertificateManager.java
HostCertificateManager.replaceCACertificatesAndCRLs
public void replaceCACertificatesAndCRLs(String[] caCert, String[] caCrl) throws HostConfigFault, RuntimeFault, RemoteException { """ Replaces the trusted Certificate Authority (CA) certificates and Certification Revocation List (CRL) used by the server with the provided values. These determine whether the server...
java
public void replaceCACertificatesAndCRLs(String[] caCert, String[] caCrl) throws HostConfigFault, RuntimeFault, RemoteException { getVimService().replaceCACertificatesAndCRLs(getMOR(), caCert, caCrl); }
[ "public", "void", "replaceCACertificatesAndCRLs", "(", "String", "[", "]", "caCert", ",", "String", "[", "]", "caCrl", ")", "throws", "HostConfigFault", ",", "RuntimeFault", ",", "RemoteException", "{", "getVimService", "(", ")", ".", "replaceCACertificatesAndCRLs",...
Replaces the trusted Certificate Authority (CA) certificates and Certification Revocation List (CRL) used by the server with the provided values. These determine whether the server can verify the identity of an external entity. @param caCert List of SSL certificates, in PEM format, of all CAs that should be trusted @p...
[ "Replaces", "the", "trusted", "Certificate", "Authority", "(", "CA", ")", "certificates", "and", "Certification", "Revocation", "List", "(", "CRL", ")", "used", "by", "the", "server", "with", "the", "provided", "values", ".", "These", "determine", "whether", "...
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/HostCertificateManager.java#L112-L114
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion2.java
CmsImportVersion2.setEncoding
protected String setEncoding(String content, String encoding) { """ Sets the right encoding and returns the result.<p> @param content the filecontent @param encoding the encoding to use @return modified content """ if (content.toLowerCase().indexOf("<?xml") == -1) { return content; ...
java
protected String setEncoding(String content, String encoding) { if (content.toLowerCase().indexOf("<?xml") == -1) { return content; } else { // XML information present, replace encoding // set the encoding only if it does not exist String xmlTag = content...
[ "protected", "String", "setEncoding", "(", "String", "content", ",", "String", "encoding", ")", "{", "if", "(", "content", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "\"<?xml\"", ")", "==", "-", "1", ")", "{", "return", "content", ";", "}", "el...
Sets the right encoding and returns the result.<p> @param content the filecontent @param encoding the encoding to use @return modified content
[ "Sets", "the", "right", "encoding", "and", "returns", "the", "result", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion2.java#L362-L376
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java
DwgUtil.getRawDouble
public static Vector getRawDouble(int[] data, int offset) throws Exception { """ Read a double value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is ...
java
public static Vector getRawDouble(int[] data, int offset) throws Exception { byte[] bytes = (byte[])getBits(data, 64, offset); ByteBuffer bb = ByteBuffer.wrap(bytes); bb.order(ByteOrder.LITTLE_ENDIAN); double val = bb.getDouble(); Vector v = new Vector(); v.add(new Integer(offset+64)); v.add(new Double...
[ "public", "static", "Vector", "getRawDouble", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "byte", "[", "]", "bytes", "=", "(", "byte", "[", "]", ")", "getBits", "(", "data", ",", "64", ",", "offset", ")", ";...
Read a double value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines. @return Vector This vec...
[ "Read", "a", "double", "value", "from", "a", "group", "of", "unsigned", "bytes" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java#L282-L291
graphql-java/graphql-java
src/main/java/graphql/execution/ExecutionStrategy.java
ExecutionStrategy.resolveField
protected CompletableFuture<ExecutionResult> resolveField(ExecutionContext executionContext, ExecutionStrategyParameters parameters) { """ Called to fetch a value for a field and resolve it further in terms of the graphql query. This will call #fetchField followed by #completeField and the completed {@link Execu...
java
protected CompletableFuture<ExecutionResult> resolveField(ExecutionContext executionContext, ExecutionStrategyParameters parameters) { return resolveFieldWithInfo(executionContext, parameters).thenCompose(FieldValueInfo::getFieldValue); }
[ "protected", "CompletableFuture", "<", "ExecutionResult", ">", "resolveField", "(", "ExecutionContext", "executionContext", ",", "ExecutionStrategyParameters", "parameters", ")", "{", "return", "resolveFieldWithInfo", "(", "executionContext", ",", "parameters", ")", ".", ...
Called to fetch a value for a field and resolve it further in terms of the graphql query. This will call #fetchField followed by #completeField and the completed {@link ExecutionResult} is returned. <p> An execution strategy can iterate the fields to be executed and call this method for each one <p> Graphql fragments ...
[ "Called", "to", "fetch", "a", "value", "for", "a", "field", "and", "resolve", "it", "further", "in", "terms", "of", "the", "graphql", "query", ".", "This", "will", "call", "#fetchField", "followed", "by", "#completeField", "and", "the", "completed", "{", "...
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/ExecutionStrategy.java#L169-L171
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.addOrReplaceEntries
public static void addOrReplaceEntries(final File zip, final ZipEntrySource[] entries) { """ Changes a ZIP file: adds/replaces the given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entries to be replaced or added. """ operateInPlace(zip, new InPlaceAction() { ...
java
public static void addOrReplaceEntries(final File zip, final ZipEntrySource[] entries) { operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { addOrReplaceEntries(zip, entries, tmpFile); return true; } }); }
[ "public", "static", "void", "addOrReplaceEntries", "(", "final", "File", "zip", ",", "final", "ZipEntrySource", "[", "]", "entries", ")", "{", "operateInPlace", "(", "zip", ",", "new", "InPlaceAction", "(", ")", "{", "public", "boolean", "act", "(", "File", ...
Changes a ZIP file: adds/replaces the given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entries to be replaced or added.
[ "Changes", "a", "ZIP", "file", ":", "adds", "/", "replaces", "the", "given", "entries", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2742-L2749
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/convolution/Cnn3DLossLayer.java
Cnn3DLossLayer.computeScoreForExamples
@Override public INDArray computeScoreForExamples(double fullNetRegTerm, LayerWorkspaceMgr workspaceMgr) { """ Compute the score for each example individually, after labels and input have been set. @param fullNetRegTerm Regularization score term for the entire network (or, 0.0 to not include regularization)...
java
@Override public INDArray computeScoreForExamples(double fullNetRegTerm, LayerWorkspaceMgr workspaceMgr) { //For 3D CNN: need to sum up the score over each x/y/z location before returning if (input == null || labels == null) throw new IllegalStateException("Cannot calculate score withou...
[ "@", "Override", "public", "INDArray", "computeScoreForExamples", "(", "double", "fullNetRegTerm", ",", "LayerWorkspaceMgr", "workspaceMgr", ")", "{", "//For 3D CNN: need to sum up the score over each x/y/z location before returning", "if", "(", "input", "==", "null", "||", "...
Compute the score for each example individually, after labels and input have been set. @param fullNetRegTerm Regularization score term for the entire network (or, 0.0 to not include regularization) @return A column INDArray of shape [numExamples,1], where entry i is the score of the ith example
[ "Compute", "the", "score", "for", "each", "example", "individually", "after", "labels", "and", "input", "have", "been", "set", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/convolution/Cnn3DLossLayer.java#L245-L287
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/DisparitySparseScoreSadRect.java
DisparitySparseScoreSadRect.setImages
public void setImages( Input left , Input right ) { """ Specify inputs for left and right camera images. @param left Rectified left camera image. @param right Rectified right camera image. """ InputSanityCheck.checkSameShape(left, right); this.left = left; this.right = right; }
java
public void setImages( Input left , Input right ) { InputSanityCheck.checkSameShape(left, right); this.left = left; this.right = right; }
[ "public", "void", "setImages", "(", "Input", "left", ",", "Input", "right", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "left", ",", "right", ")", ";", "this", ".", "left", "=", "left", ";", "this", ".", "right", "=", "right", ";", "}" ]
Specify inputs for left and right camera images. @param left Rectified left camera image. @param right Rectified right camera image.
[ "Specify", "inputs", "for", "left", "and", "right", "camera", "images", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/DisparitySparseScoreSadRect.java#L72-L77
sniggle/simple-pgp
simple-pgp-java/src/main/java/me/sniggle/pgp/crypt/internal/BasePGPCommon.java
BasePGPCommon.findPrivateKey
protected PGPPrivateKey findPrivateKey(InputStream secretKey, final long keyId, String password) throws PGPException, IOException { """ read a private key and unlock it with the given password @param secretKey the secret key stream @param keyId the required key id @param password the password to unlock the...
java
protected PGPPrivateKey findPrivateKey(InputStream secretKey, final long keyId, String password) throws PGPException, IOException { LOGGER.trace("findPrivateKey(InputStream, long, String)"); LOGGER.trace("Secret Key: {}, Key ID: {}, Password: {}", secretKey == null ? "not set" : "set", keyId, password == null ?...
[ "protected", "PGPPrivateKey", "findPrivateKey", "(", "InputStream", "secretKey", ",", "final", "long", "keyId", ",", "String", "password", ")", "throws", "PGPException", ",", "IOException", "{", "LOGGER", ".", "trace", "(", "\"findPrivateKey(InputStream, long, String)\"...
read a private key and unlock it with the given password @param secretKey the secret key stream @param keyId the required key id @param password the password to unlock the private key @return the applicable private key or null if none is found @throws PGPException @throws IOException
[ "read", "a", "private", "key", "and", "unlock", "it", "with", "the", "given", "password" ]
train
https://github.com/sniggle/simple-pgp/blob/2ab83e4d370b8189f767d8e4e4c7e6020e60fbe3/simple-pgp-java/src/main/java/me/sniggle/pgp/crypt/internal/BasePGPCommon.java#L221-L230
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.clickOnWebElement
public void clickOnWebElement(By by, int match, boolean scroll) { """ Clicks a WebElement matching the specified By object. @param by the By object. Examples are: {@code By.id("id")} and {@code By.name("name")} @param match if multiple objects match, this determines which one to click @param scroll {@code tru...
java
public void clickOnWebElement(By by, int match, boolean scroll){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "clickOnWebElement("+by+", "+match+", "+scroll+")"); } clicker.clickOnWebElement(by, match, scroll, config.useJavaScriptToClickWebElements); }
[ "public", "void", "clickOnWebElement", "(", "By", "by", ",", "int", "match", ",", "boolean", "scroll", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"clickOnWebElement(\"", ...
Clicks a WebElement matching the specified By object. @param by the By object. Examples are: {@code By.id("id")} and {@code By.name("name")} @param match if multiple objects match, this determines which one to click @param scroll {@code true} if scrolling should be performed
[ "Clicks", "a", "WebElement", "matching", "the", "specified", "By", "object", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L1323-L1329
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java
VMath.mahalanobisDistance
@Reference(authors = "P. C. Mahalanobis", // title = "On the generalized distance in statistics", // booktitle = "Proceedings of the National Institute of Sciences of India. 2 (1)", // bibkey = "journals/misc/Mahalanobis36") public static double mahalanobisDistance(final double[][] B, final double[]...
java
@Reference(authors = "P. C. Mahalanobis", // title = "On the generalized distance in statistics", // booktitle = "Proceedings of the National Institute of Sciences of India. 2 (1)", // bibkey = "journals/misc/Mahalanobis36") public static double mahalanobisDistance(final double[][] B, final double[]...
[ "@", "Reference", "(", "authors", "=", "\"P. C. Mahalanobis\"", ",", "//", "title", "=", "\"On the generalized distance in statistics\"", ",", "//", "booktitle", "=", "\"Proceedings of the National Institute of Sciences of India. 2 (1)\"", ",", "//", "bibkey", "=", "\"journal...
Matrix multiplication, (a-c)<sup>T</sup> * B * (a-c) <p> Note: it may (or may not) be more efficient to materialize (a-c), then use {@code transposeTimesTimes(a_minus_c, B, a_minus_c)} instead. @param B matrix @param a First vector @param c Center vector @return Matrix product, (a-c)<sup>T</sup> * B * (a-c)
[ "Matrix", "multiplication", "(", "a", "-", "c", ")", "<sup", ">", "T<", "/", "sup", ">", "*", "B", "*", "(", "a", "-", "c", ")", "<p", ">", "Note", ":", "it", "may", "(", "or", "may", "not", ")", "be", "more", "efficient", "to", "materialize", ...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java#L1528-L1547
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/BillingApi.java
BillingApi.getPlan
public AccountBillingPlanResponse getPlan(String accountId, BillingApi.GetPlanOptions options) throws ApiException { """ Get Account Billing Plan Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card. By def...
java
public AccountBillingPlanResponse getPlan(String accountId, BillingApi.GetPlanOptions options) throws ApiException { Object localVarPostBody = "{}"; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required parameter 'accoun...
[ "public", "AccountBillingPlanResponse", "getPlan", "(", "String", "accountId", ",", "BillingApi", ".", "GetPlanOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "\"{}\"", ";", "// verify the required parameter 'accountId' is set", "...
Get Account Billing Plan Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card. By default the successor plan and credit card information is included in the response. This information can be excluded from the resp...
[ "Get", "Account", "Billing", "Plan", "Retrieves", "the", "billing", "plan", "information", "for", "the", "specified", "account", "including", "the", "current", "billing", "plan", "successor", "plans", "billing", "address", "and", "billing", "credit", "card", ".", ...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/BillingApi.java#L292-L330
jingwei/krati
krati-main/src/retention/java/krati/retention/policy/RetentionPolicyOnTime.java
RetentionPolicyOnTime.setRetention
public void setRetention(long duration, TimeUnit timeUnit) { """ Sets the retention duration period of this policy. @param duration - the retention duration @param timeUnit - the time unit as defined by {@link TimeUnit} """ this._duration = Math.max(1, duration); this._timeUnit = timeUnit; ...
java
public void setRetention(long duration, TimeUnit timeUnit) { this._duration = Math.max(1, duration); this._timeUnit = timeUnit; long millis = TimeUnit.MILLISECONDS == timeUnit ? _duration : TimeUnit.MILLISECONDS.convert(_duration, timeUnit); _timeMillis = Math.ma...
[ "public", "void", "setRetention", "(", "long", "duration", ",", "TimeUnit", "timeUnit", ")", "{", "this", ".", "_duration", "=", "Math", ".", "max", "(", "1", ",", "duration", ")", ";", "this", ".", "_timeUnit", "=", "timeUnit", ";", "long", "millis", ...
Sets the retention duration period of this policy. @param duration - the retention duration @param timeUnit - the time unit as defined by {@link TimeUnit}
[ "Sets", "the", "retention", "duration", "period", "of", "this", "policy", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/retention/java/krati/retention/policy/RetentionPolicyOnTime.java#L97-L104
bmwcarit/joynr
java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java
AbstractSubscriptionPublisher.unregisterAttributeListener
@Override public void unregisterAttributeListener(String attributeName, AttributeListener attributeListener) { """ Unregisters an attribute listener. @param attributeName the attribute name as defined in the Franca model to unsubscribe from. @param attributeListener the listener to remove. """ ...
java
@Override public void unregisterAttributeListener(String attributeName, AttributeListener attributeListener) { List<AttributeListener> listeners = attributeListeners.get(attributeName); if (listeners == null) { LOG.error("trying to unregister an attribute listener for attribute \"" + att...
[ "@", "Override", "public", "void", "unregisterAttributeListener", "(", "String", "attributeName", ",", "AttributeListener", "attributeListener", ")", "{", "List", "<", "AttributeListener", ">", "listeners", "=", "attributeListeners", ".", "get", "(", "attributeName", ...
Unregisters an attribute listener. @param attributeName the attribute name as defined in the Franca model to unsubscribe from. @param attributeListener the listener to remove.
[ "Unregisters", "an", "attribute", "listener", "." ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java#L143-L159
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java
JsApiMessageImpl.getJmsSystemPropertyMap
final JsMsgMap getJmsSystemPropertyMap() { """ Helper method used by the main Message Property methods to obtain the non-smoke-and-mirrors 'System; Property items in the form of a map. <p> The method has package level visibility as it is used by JsJmsMessageImpl and JsSdoMessageimpl. @return A JsMsgMap cont...
java
final JsMsgMap getJmsSystemPropertyMap() { if (jmsSystemPropertyMap == null) { List<String> keys = (List<String>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_NAME); List<Object> values = (List<Object>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_VALUE); jmsSystemPropertyMap...
[ "final", "JsMsgMap", "getJmsSystemPropertyMap", "(", ")", "{", "if", "(", "jmsSystemPropertyMap", "==", "null", ")", "{", "List", "<", "String", ">", "keys", "=", "(", "List", "<", "String", ">", ")", "getApi", "(", ")", ".", "getField", "(", "JsApiAcces...
Helper method used by the main Message Property methods to obtain the non-smoke-and-mirrors 'System; Property items in the form of a map. <p> The method has package level visibility as it is used by JsJmsMessageImpl and JsSdoMessageimpl. @return A JsMsgMap containing the Message Property name-value pairs.
[ "Helper", "method", "used", "by", "the", "main", "Message", "Property", "methods", "to", "obtain", "the", "non", "-", "smoke", "-", "and", "-", "mirrors", "System", ";", "Property", "items", "in", "the", "form", "of", "a", "map", ".", "<p", ">", "The",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java#L776-L783
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java
PaymentSession.createFromBitcoinUri
public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki) throws PaymentProtocolException { """ Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. uri is a BIP-72-style BitcoinURI obje...
java
public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki) throws PaymentProtocolException { return createFromBitcoinUri(uri, verifyPki, null); }
[ "public", "static", "ListenableFuture", "<", "PaymentSession", ">", "createFromBitcoinUri", "(", "final", "BitcoinURI", "uri", ",", "final", "boolean", "verifyPki", ")", "throws", "PaymentProtocolException", "{", "return", "createFromBitcoinUri", "(", "uri", ",", "ver...
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may be fetched in the r= parameter. If verifyPki is specified and the payment request object specifies a P...
[ "Returns", "a", "future", "that", "will", "be", "notified", "with", "a", "PaymentSession", "object", "after", "it", "is", "fetched", "using", "the", "provided", "uri", ".", "uri", "is", "a", "BIP", "-", "72", "-", "style", "BitcoinURI", "object", "that", ...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java#L105-L108
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java
H2GISDBFactory.createSpatialDataBase
public static Connection createSpatialDataBase(String dbName,boolean initSpatial, String h2Parameters )throws SQLException, ClassNotFoundException { """ Create a spatial database @param dbName filename @param initSpatial If true add spatial features to the database @param h2Parameters Additional h2 parameters ...
java
public static Connection createSpatialDataBase(String dbName,boolean initSpatial, String h2Parameters )throws SQLException, ClassNotFoundException { String databasePath = initDBFile(dbName, h2Parameters); org.h2.Driver.load(); // Keep a connection alive to not close the DataBase on each unit tes...
[ "public", "static", "Connection", "createSpatialDataBase", "(", "String", "dbName", ",", "boolean", "initSpatial", ",", "String", "h2Parameters", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "String", "databasePath", "=", "initDBFile", "(", "dbNa...
Create a spatial database @param dbName filename @param initSpatial If true add spatial features to the database @param h2Parameters Additional h2 parameters @return Connection @throws java.sql.SQLException @throws java.lang.ClassNotFoundException
[ "Create", "a", "spatial", "database" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISDBFactory.java#L154-L165
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.roundTo
public static BigDecimal roundTo(final BigDecimal bd, final int numberOfDecPlaces, final int finalScale) { """ returns a new BigDecimal with correct scale after being round to n dec places. @param bd value @param numberOfDecPlaces number of dec place to round to @param finalScale final scale of result (typica...
java
public static BigDecimal roundTo(final BigDecimal bd, final int numberOfDecPlaces, final int finalScale) { return setScale(setScale(bd, numberOfDecPlaces, BigDecimal.ROUND_HALF_UP), finalScale); }
[ "public", "static", "BigDecimal", "roundTo", "(", "final", "BigDecimal", "bd", ",", "final", "int", "numberOfDecPlaces", ",", "final", "int", "finalScale", ")", "{", "return", "setScale", "(", "setScale", "(", "bd", ",", "numberOfDecPlaces", ",", "BigDecimal", ...
returns a new BigDecimal with correct scale after being round to n dec places. @param bd value @param numberOfDecPlaces number of dec place to round to @param finalScale final scale of result (typically numberOfDecPlaces &lt; finalScale); @return new bd or null
[ "returns", "a", "new", "BigDecimal", "with", "correct", "scale", "after", "being", "round", "to", "n", "dec", "places", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L397-L399
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_owo_field_GET
public OvhOwo serviceName_owo_field_GET(String serviceName, net.minidev.ovh.api.domain.OvhWhoisObfuscatorFieldsEnum field) throws IOException { """ Get this object properties REST: GET /domain/{serviceName}/owo/{field} @param serviceName [required] The internal name of your domain @param field [required] Obfu...
java
public OvhOwo serviceName_owo_field_GET(String serviceName, net.minidev.ovh.api.domain.OvhWhoisObfuscatorFieldsEnum field) throws IOException { String qPath = "/domain/{serviceName}/owo/{field}"; StringBuilder sb = path(qPath, serviceName, field); String resp = exec(qPath, "GET", sb.toString(), null); return co...
[ "public", "OvhOwo", "serviceName_owo_field_GET", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "domain", ".", "OvhWhoisObfuscatorFieldsEnum", "field", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/{s...
Get this object properties REST: GET /domain/{serviceName}/owo/{field} @param serviceName [required] The internal name of your domain @param field [required] Obfuscated field
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1472-L1477
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getPvPSeasonLeaderBoardInfo
public void getPvPSeasonLeaderBoardInfo(String id, String type, World.Region region, Callback<List<PvPLeaderBoard>> callback) throws NullPointerException { """ For more info on pvp season API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/seasons">here</a><br/> Give user the access to {@link Callback#onRe...
java
public void getPvPSeasonLeaderBoardInfo(String id, String type, World.Region region, Callback<List<PvPLeaderBoard>> callback) throws NullPointerException { gw2API.getPvPSeasonLeaderBoardInfo(id, type, region.name().toLowerCase()).enqueue(callback); }
[ "public", "void", "getPvPSeasonLeaderBoardInfo", "(", "String", "id", ",", "String", "type", ",", "World", ".", "Region", "region", ",", "Callback", "<", "List", "<", "PvPLeaderBoard", ">", ">", "callback", ")", "throws", "NullPointerException", "{", "gw2API", ...
For more info on pvp season API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/seasons">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param id Season id @param type ladder/legendary/gu...
[ "For", "more", "info", "on", "pvp", "season", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "pvp", "/", "seasons", ">", "here<", "/", "a", ">", "<br", "/", ">"...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2159-L2161
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/queue/impl/JdbcQueue.java
JdbcQueue.take
@Override public IQueueMessage<ID, DATA> take() throws QueueException.EphemeralIsFull { """ {@inheritDoc} @throws QueueException.EphemeralIsFull if the ephemeral storage is full """ try { try (Connection conn = jdbcHelper.getConnection()) { if (!isEphemeralDisabled()...
java
@Override public IQueueMessage<ID, DATA> take() throws QueueException.EphemeralIsFull { try { try (Connection conn = jdbcHelper.getConnection()) { if (!isEphemeralDisabled()) { int ephemeralMaxSize = getEphemeralMaxSize(); if (ephemeralMaxS...
[ "@", "Override", "public", "IQueueMessage", "<", "ID", ",", "DATA", ">", "take", "(", ")", "throws", "QueueException", ".", "EphemeralIsFull", "{", "try", "{", "try", "(", "Connection", "conn", "=", "jdbcHelper", ".", "getConnection", "(", ")", ")", "{", ...
{@inheritDoc} @throws QueueException.EphemeralIsFull if the ephemeral storage is full
[ "{", "@inheritDoc", "}" ]
train
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/queue/impl/JdbcQueue.java#L698-L716
apache/incubator-druid
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java
ParallelIndexSupervisorTask.allocateSegment
@POST @Path("/segment/allocate") @Produces(SmileMediaTypes.APPLICATION_JACKSON_SMILE) @Consumes(SmileMediaTypes.APPLICATION_JACKSON_SMILE) public Response allocateSegment(DateTime timestamp, @Context final HttpServletRequest req) { """ Allocate a new {@link SegmentIdWithShardSpec} for a request from {@link...
java
@POST @Path("/segment/allocate") @Produces(SmileMediaTypes.APPLICATION_JACKSON_SMILE) @Consumes(SmileMediaTypes.APPLICATION_JACKSON_SMILE) public Response allocateSegment(DateTime timestamp, @Context final HttpServletRequest req) { ChatHandlers.authorizationCheck( req, Action.READ, ...
[ "@", "POST", "@", "Path", "(", "\"/segment/allocate\"", ")", "@", "Produces", "(", "SmileMediaTypes", ".", "APPLICATION_JACKSON_SMILE", ")", "@", "Consumes", "(", "SmileMediaTypes", ".", "APPLICATION_JACKSON_SMILE", ")", "public", "Response", "allocateSegment", "(", ...
Allocate a new {@link SegmentIdWithShardSpec} for a request from {@link ParallelIndexSubTask}. The returned segmentIdentifiers have different {@code partitionNum} (thereby different {@link NumberedShardSpec}) per bucket interval.
[ "Allocate", "a", "new", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java#L356-L383
landawn/AbacusUtil
src/com/landawn/abacus/util/IOUtil.java
IOUtil.doCopyFile
private static void doCopyFile(final File srcFile, final File destFile, final boolean preserveFileDate) { """ Internal copy file method. @param srcFile the validated source file, must not be {@code null} @param destFile the validated destination file, must not be {@code null} @param preserveFileDate whethe...
java
private static void doCopyFile(final File srcFile, final File destFile, final boolean preserveFileDate) { if (destFile.exists()) { throw new IllegalArgumentException("The destination file already existed: " + destFile.getAbsolutePath()); } FileInputStream fis = null; F...
[ "private", "static", "void", "doCopyFile", "(", "final", "File", "srcFile", ",", "final", "File", "destFile", ",", "final", "boolean", "preserveFileDate", ")", "{", "if", "(", "destFile", ".", "exists", "(", ")", ")", "{", "throw", "new", "IllegalArgumentExc...
Internal copy file method. @param srcFile the validated source file, must not be {@code null} @param destFile the validated destination file, must not be {@code null} @param preserveFileDate whether to preserve the file date
[ "Internal", "copy", "file", "method", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/IOUtil.java#L2882-L2923
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbStatement.java
MariaDbStatement.executeLargeUpdate
@Override public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException { """ Identical to executeLargeUpdate(String sql), with a flag that indicate that autoGeneratedKeys (primary key fields with "auto_increment") generated id's must be retrieved. <p>Those id's will be available usin...
java
@Override public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException { if (executeInternal(sql, fetchSize, autoGeneratedKeys)) { return 0; } return getLargeUpdateCount(); }
[ "@", "Override", "public", "long", "executeLargeUpdate", "(", "String", "sql", ",", "int", "autoGeneratedKeys", ")", "throws", "SQLException", "{", "if", "(", "executeInternal", "(", "sql", ",", "fetchSize", ",", "autoGeneratedKeys", ")", ")", "{", "return", "...
Identical to executeLargeUpdate(String sql), with a flag that indicate that autoGeneratedKeys (primary key fields with "auto_increment") generated id's must be retrieved. <p>Those id's will be available using getGeneratedKeys() method.</p> @param sql sql command @param autoGeneratedKeys a flag indicatin...
[ "Identical", "to", "executeLargeUpdate", "(", "String", "sql", ")", "with", "a", "flag", "that", "indicate", "that", "autoGeneratedKeys", "(", "primary", "key", "fields", "with", "auto_increment", ")", "generated", "id", "s", "must", "be", "retrieved", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbStatement.java#L639-L645
optimatika/ojAlgo-finance
src/main/java/org/ojalgo/finance/portfolio/MarkowitzModel.java
MarkowitzModel.addConstraint
public LowerUpper addConstraint(final BigDecimal lowerLimit, final BigDecimal upperLimit, final int... assetIndeces) { """ Will add a constraint on the sum of the asset weights specified by the asset indices. Either (but not both) of the limits may be null. """ return myConstraints.put(assetIndeces, n...
java
public LowerUpper addConstraint(final BigDecimal lowerLimit, final BigDecimal upperLimit, final int... assetIndeces) { return myConstraints.put(assetIndeces, new LowerUpper(lowerLimit, upperLimit)); }
[ "public", "LowerUpper", "addConstraint", "(", "final", "BigDecimal", "lowerLimit", ",", "final", "BigDecimal", "upperLimit", ",", "final", "int", "...", "assetIndeces", ")", "{", "return", "myConstraints", ".", "put", "(", "assetIndeces", ",", "new", "LowerUpper",...
Will add a constraint on the sum of the asset weights specified by the asset indices. Either (but not both) of the limits may be null.
[ "Will", "add", "a", "constraint", "on", "the", "sum", "of", "the", "asset", "weights", "specified", "by", "the", "asset", "indices", ".", "Either", "(", "but", "not", "both", ")", "of", "the", "limits", "may", "be", "null", "." ]
train
https://github.com/optimatika/ojAlgo-finance/blob/c8d3f7e1894d4263b7334bca3f4c060e466f8b15/src/main/java/org/ojalgo/finance/portfolio/MarkowitzModel.java#L121-L123
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java
CloudMe.scanFolderLevel
private void scanFolderLevel( Element element, CMFolder cmFolder ) { """ Recursive method that parses folders XML and builds CMFolder structure. @param element @param cmFolder """ NodeList nodeList = element.getChildNodes(); for ( int i = 0; i < nodeList.getLength(); i++ ) { No...
java
private void scanFolderLevel( Element element, CMFolder cmFolder ) { NodeList nodeList = element.getChildNodes(); for ( int i = 0; i < nodeList.getLength(); i++ ) { Node currentNode = nodeList.item( i ); if ( currentNode.getNodeType() != Node.ELEMENT_NODE ) { ...
[ "private", "void", "scanFolderLevel", "(", "Element", "element", ",", "CMFolder", "cmFolder", ")", "{", "NodeList", "nodeList", "=", "element", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nodeList", ".", "getLen...
Recursive method that parses folders XML and builds CMFolder structure. @param element @param cmFolder
[ "Recursive", "method", "that", "parses", "folders", "XML", "and", "builds", "CMFolder", "structure", "." ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java#L289-L312
Netflix/astyanax
astyanax-thrift/src/main/java/com/netflix/astyanax/thrift/ThriftConverter.java
ThriftConverter.getColumnParent
public static <K> ColumnParent getColumnParent(ColumnFamily<?, ?> columnFamily, ColumnPath<?> path) throws BadRequestException { """ Construct a Hector ColumnParent based on the information in the query and the type of column family being queried. @param <K> @param columnFamily @param path @retu...
java
public static <K> ColumnParent getColumnParent(ColumnFamily<?, ?> columnFamily, ColumnPath<?> path) throws BadRequestException { ColumnParent cp = new ColumnParent(); cp.setColumn_family(columnFamily.getName()); if (path != null) { Iterator<ByteBuffer> columns = path.iter...
[ "public", "static", "<", "K", ">", "ColumnParent", "getColumnParent", "(", "ColumnFamily", "<", "?", ",", "?", ">", "columnFamily", ",", "ColumnPath", "<", "?", ">", "path", ")", "throws", "BadRequestException", "{", "ColumnParent", "cp", "=", "new", "Column...
Construct a Hector ColumnParent based on the information in the query and the type of column family being queried. @param <K> @param columnFamily @param path @return @throws BadRequestException
[ "Construct", "a", "Hector", "ColumnParent", "based", "on", "the", "information", "in", "the", "query", "and", "the", "type", "of", "column", "family", "being", "queried", "." ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-thrift/src/main/java/com/netflix/astyanax/thrift/ThriftConverter.java#L68-L79
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java
AbstractWebController.buildNOKResponse
protected <T extends AbstractBase> ResponseEntity<Response<T>> buildNOKResponse(HttpStatus code, String msg, T... params) { """ Build a response object that signals a not-okay response with a given status {@code code}. @param <T> Some type extending the AbstractBase entity @param code The status code to set as...
java
protected <T extends AbstractBase> ResponseEntity<Response<T>> buildNOKResponse(HttpStatus code, String msg, T... params) { return buildResponse(code, msg, "", params); }
[ "protected", "<", "T", "extends", "AbstractBase", ">", "ResponseEntity", "<", "Response", "<", "T", ">", ">", "buildNOKResponse", "(", "HttpStatus", "code", ",", "String", "msg", ",", "T", "...", "params", ")", "{", "return", "buildResponse", "(", "code", ...
Build a response object that signals a not-okay response with a given status {@code code}. @param <T> Some type extending the AbstractBase entity @param code The status code to set as response code @param msg The error message passed to the caller @param params A set of Serializable objects that are passed to the call...
[ "Build", "a", "response", "object", "that", "signals", "a", "not", "-", "okay", "response", "with", "a", "given", "status", "{", "@code", "code", "}", "." ]
train
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L200-L202
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListUserSegmentEntryRelPersistenceImpl.java
CommercePriceListUserSegmentEntryRelPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the commerce price list user segment entry rels where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CommercePriceListUserSegmentEntryRel commercePrice...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommercePriceListUserSegmentEntryRel commercePriceListUserSegmentEntryRel : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceListUserSegmentEntryRel); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommercePriceListUserSegmentEntryRel", "commercePriceListUserSegmentEntryRel", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryU...
Removes all the commerce price list user segment entry rels where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "price", "list", "user", "segment", "entry", "rels", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListUserSegmentEntryRelPersistenceImpl.java#L1438-L1444
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Retryer.java
Retryer.timeout
public Retryer<R> timeout(final TimeLimiter timeLimiter, final long duration, final TimeUnit timeUnit) { """ Timing out after the specified time limit with {@link TimeLimiter} @param timeLimiter @param duration @param timeUnit @return """ return withTimelimiter(new AttemptTimelimit<R>() { ...
java
public Retryer<R> timeout(final TimeLimiter timeLimiter, final long duration, final TimeUnit timeUnit) { return withTimelimiter(new AttemptTimelimit<R>() { @Override public R call(Callable<R> callable) throws Exception { return checkNotNull(timeLimiter, "TimeLimiter cannot be null")...
[ "public", "Retryer", "<", "R", ">", "timeout", "(", "final", "TimeLimiter", "timeLimiter", ",", "final", "long", "duration", ",", "final", "TimeUnit", "timeUnit", ")", "{", "return", "withTimelimiter", "(", "new", "AttemptTimelimit", "<", "R", ">", "(", ")",...
Timing out after the specified time limit with {@link TimeLimiter} @param timeLimiter @param duration @param timeUnit @return
[ "Timing", "out", "after", "the", "specified", "time", "limit", "with", "{", "@link", "TimeLimiter", "}" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Retryer.java#L101-L109
bazaarvoice/emodb
common/dropwizard/src/main/java/com/bazaarvoice/emodb/common/dropwizard/discovery/DropwizardResourceRegistry.java
DropwizardResourceRegistry.addResource
@Override public void addResource(String namespace, String service, Object resource) { """ Adds a Jersey resource annotated with the {@link javax.ws.rs.Path} annotation to the Dropwizard environment and registers it with the SOA {@link com.bazaarvoice.ostrich.ServiceRegistry}. """ ServiceEndPoint ...
java
@Override public void addResource(String namespace, String service, Object resource) { ServiceEndPoint endPoint = toEndPoint(namespace, service, resource); _environment.lifecycle().manage(new ManagedRegistration(_serviceRegistry, endPoint)); _environment.jersey().register(resource); }
[ "@", "Override", "public", "void", "addResource", "(", "String", "namespace", ",", "String", "service", ",", "Object", "resource", ")", "{", "ServiceEndPoint", "endPoint", "=", "toEndPoint", "(", "namespace", ",", "service", ",", "resource", ")", ";", "_enviro...
Adds a Jersey resource annotated with the {@link javax.ws.rs.Path} annotation to the Dropwizard environment and registers it with the SOA {@link com.bazaarvoice.ostrich.ServiceRegistry}.
[ "Adds", "a", "Jersey", "resource", "annotated", "with", "the", "{" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/dropwizard/src/main/java/com/bazaarvoice/emodb/common/dropwizard/discovery/DropwizardResourceRegistry.java#L39-L44
podio/podio-java
src/main/java/com/podio/app/AppAPI.java
AppAPI.updateApp
public void updateApp(int appId, ApplicationUpdate app) { """ Updates an app. The update can contain an new configuration for the app, addition of new fields as well as updates to the configuration of existing fields. Fields not included will not be deleted. To delete a field use the "delete field" operation. ...
java
public void updateApp(int appId, ApplicationUpdate app) { getResourceFactory().getApiResource("/app/" + appId) .entity(app, MediaType.APPLICATION_JSON).put(); }
[ "public", "void", "updateApp", "(", "int", "appId", ",", "ApplicationUpdate", "app", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/app/\"", "+", "appId", ")", ".", "entity", "(", "app", ",", "MediaType", ".", "APPLICATION_JSON", "...
Updates an app. The update can contain an new configuration for the app, addition of new fields as well as updates to the configuration of existing fields. Fields not included will not be deleted. To delete a field use the "delete field" operation. When adding/updating/deleting apps and fields, it can be simpler to on...
[ "Updates", "an", "app", ".", "The", "update", "can", "contain", "an", "new", "configuration", "for", "the", "app", "addition", "of", "new", "fields", "as", "well", "as", "updates", "to", "the", "configuration", "of", "existing", "fields", ".", "Fields", "n...
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/app/AppAPI.java#L97-L100
WASdev/ci.ant
src/main/java/net/wasdev/wlp/ant/InstallFeatureTask.java
InstallFeatureTask.processCommand
private void processCommand(List<String> command) throws Exception { """ Process the command. @param command A String list containing the command to be executed. """ processBuilder.command(command); Process p = processBuilder.start(); checkReturnCode(p, processBuilder.command().toStrin...
java
private void processCommand(List<String> command) throws Exception { processBuilder.command(command); Process p = processBuilder.start(); checkReturnCode(p, processBuilder.command().toString(), ReturnCode.OK.getValue(), ReturnCode.ALREADY_EXISTS.getValue()); if (!acceptLicense) { ...
[ "private", "void", "processCommand", "(", "List", "<", "String", ">", "command", ")", "throws", "Exception", "{", "processBuilder", ".", "command", "(", "command", ")", ";", "Process", "p", "=", "processBuilder", ".", "start", "(", ")", ";", "checkReturnCode...
Process the command. @param command A String list containing the command to be executed.
[ "Process", "the", "command", "." ]
train
https://github.com/WASdev/ci.ant/blob/13edd5c9111b98e12f74c0be83f9180285e6e40c/src/main/java/net/wasdev/wlp/ant/InstallFeatureTask.java#L112-L119
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDODeserializer.java
AtomDODeserializer.getDatastreamId
private String getDatastreamId(DigitalObject obj, Entry entry) { """ Parses the id to determine a datastreamId. @param id @return """ String entryId = entry.getId().toString(); // matches info:fedora/pid/dsid/timestamp Pattern pattern = Pattern.compile("^" + Constant...
java
private String getDatastreamId(DigitalObject obj, Entry entry) { String entryId = entry.getId().toString(); // matches info:fedora/pid/dsid/timestamp Pattern pattern = Pattern.compile("^" + Constants.FEDORA.uri + ".+?/([^/]+)/?.*"); Matcher matcher = pattern.matcher(entry...
[ "private", "String", "getDatastreamId", "(", "DigitalObject", "obj", ",", "Entry", "entry", ")", "{", "String", "entryId", "=", "entry", ".", "getId", "(", ")", ".", "toString", "(", ")", ";", "// matches info:fedora/pid/dsid/timestamp", "Pattern", "pattern", "=...
Parses the id to determine a datastreamId. @param id @return
[ "Parses", "the", "id", "to", "determine", "a", "datastreamId", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDODeserializer.java#L390-L402
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java
PixelMath.boundImage
public static void boundImage( GrayF32 img , float min , float max ) { """ Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value. """ ImplPixelMath.boundImage(img,min,max); }
java
public static void boundImage( GrayF32 img , float min , float max ) { ImplPixelMath.boundImage(img,min,max); }
[ "public", "static", "void", "boundImage", "(", "GrayF32", "img", ",", "float", "min", ",", "float", "max", ")", "{", "ImplPixelMath", ".", "boundImage", "(", "img", ",", "min", ",", "max", ")", ";", "}" ]
Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value.
[ "Bounds", "image", "pixels", "to", "be", "between", "these", "two", "values" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java#L4484-L4486
m-m-m/util
date/src/main/java/net/sf/mmm/util/date/base/Iso8601UtilImpl.java
Iso8601UtilImpl.parseTimezone
private TimeZone parseTimezone(CharSequenceScanner scanner) { """ This method parses the timezone from the given {@code parser}. @param scanner is the parser pointing to the timezone or at the end of the string @return the parsed timezone or {@code null} if parser already at the end of the string. """ ...
java
private TimeZone parseTimezone(CharSequenceScanner scanner) { int pos = scanner.getCurrentIndex(); Integer offset = parseTimezoneOffset(scanner); // has offset? if (offset != null) { int offsetMs = offset.intValue(); String tzName = "GMT"; if (offsetMs != 0) { if (offsetMs < 0...
[ "private", "TimeZone", "parseTimezone", "(", "CharSequenceScanner", "scanner", ")", "{", "int", "pos", "=", "scanner", ".", "getCurrentIndex", "(", ")", ";", "Integer", "offset", "=", "parseTimezoneOffset", "(", "scanner", ")", ";", "// has offset?", "if", "(", ...
This method parses the timezone from the given {@code parser}. @param scanner is the parser pointing to the timezone or at the end of the string @return the parsed timezone or {@code null} if parser already at the end of the string.
[ "This", "method", "parses", "the", "timezone", "from", "the", "given", "{", "@code", "parser", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/date/src/main/java/net/sf/mmm/util/date/base/Iso8601UtilImpl.java#L176-L199
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/MultipartAttachmentWriter.java
MultipartAttachmentWriter.setBody
public void setBody(Map<String, Object> body) { """ Set the JSON body (the first MIME body) for the writer. @param body The DocumentRevision to be serialised as JSON """ this.id = (String) body.get(CouchConstants._id); this.bodyBytes = JSONUtils.serializeAsBytes(body); contentLength ...
java
public void setBody(Map<String, Object> body) { this.id = (String) body.get(CouchConstants._id); this.bodyBytes = JSONUtils.serializeAsBytes(body); contentLength += bodyBytes.length; }
[ "public", "void", "setBody", "(", "Map", "<", "String", ",", "Object", ">", "body", ")", "{", "this", ".", "id", "=", "(", "String", ")", "body", ".", "get", "(", "CouchConstants", ".", "_id", ")", ";", "this", ".", "bodyBytes", "=", "JSONUtils", "...
Set the JSON body (the first MIME body) for the writer. @param body The DocumentRevision to be serialised as JSON
[ "Set", "the", "JSON", "body", "(", "the", "first", "MIME", "body", ")", "for", "the", "writer", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/MultipartAttachmentWriter.java#L143-L147
apache/spark
common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java
TransportClientFactory.createUnmanagedClient
public TransportClient createUnmanagedClient(String remoteHost, int remotePort) throws IOException, InterruptedException { """ Create a completely new {@link TransportClient} to the given remote host / port. This connection is not pooled. As with {@link #createClient(String, int)}, this method is blockin...
java
public TransportClient createUnmanagedClient(String remoteHost, int remotePort) throws IOException, InterruptedException { final InetSocketAddress address = new InetSocketAddress(remoteHost, remotePort); return createClient(address); }
[ "public", "TransportClient", "createUnmanagedClient", "(", "String", "remoteHost", ",", "int", "remotePort", ")", "throws", "IOException", ",", "InterruptedException", "{", "final", "InetSocketAddress", "address", "=", "new", "InetSocketAddress", "(", "remoteHost", ",",...
Create a completely new {@link TransportClient} to the given remote host / port. This connection is not pooled. As with {@link #createClient(String, int)}, this method is blocking.
[ "Create", "a", "completely", "new", "{", "@link", "TransportClient", "}", "to", "the", "given", "remote", "host", "/", "port", ".", "This", "connection", "is", "not", "pooled", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java#L203-L207
Axway/Grapes
utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java
GrapesClient.deleteModule
public void deleteModule(final String name, final String version, final String user, final String password) throws GrapesCommunicationException, AuthenticationException { """ Delete a module from Grapes server @param name @param version @throws GrapesCommunicationException @throws javax.naming.Authentication...
java
public void deleteModule(final String name, final String version, final String user, final String password) throws GrapesCommunicationException, AuthenticationException{ final Client client = getClient(user, password); final WebResource resource = client.resource(serverURL).path(RequestUtils.getModulePa...
[ "public", "void", "deleteModule", "(", "final", "String", "name", ",", "final", "String", "version", ",", "final", "String", "user", ",", "final", "String", "password", ")", "throws", "GrapesCommunicationException", ",", "AuthenticationException", "{", "final", "C...
Delete a module from Grapes server @param name @param version @throws GrapesCommunicationException @throws javax.naming.AuthenticationException
[ "Delete", "a", "module", "from", "Grapes", "server" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java#L201-L215
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.startGetFile
public /*@Nullable*/Downloader startGetFile(final String path, /*@Nullable*/String rev) throws DbxException { """ Retrieve a file's content and content metadata. You must call the {@link Downloader}'s {@code close()} method; use a {@code try}/{@code finally}. <pre> DbxClientV1 dbxClient = ... Db...
java
public /*@Nullable*/Downloader startGetFile(final String path, /*@Nullable*/String rev) throws DbxException { DbxPathV1.checkArgNonRoot("path", path); String apiPath = "1/files/auto" + path; /*@Nullable*/String[] params = { "rev", rev }; return startGe...
[ "public", "/*@Nullable*/", "Downloader", "startGetFile", "(", "final", "String", "path", ",", "/*@Nullable*/", "String", "rev", ")", "throws", "DbxException", "{", "DbxPathV1", ".", "checkArgNonRoot", "(", "\"path\"", ",", "path", ")", ";", "String", "apiPath", ...
Retrieve a file's content and content metadata. You must call the {@link Downloader}'s {@code close()} method; use a {@code try}/{@code finally}. <pre> DbxClientV1 dbxClient = ... DbxClientV1.Downloader downloader = dbxClient.startGetFile("/ReadMe.txt") try { printStream(downloader.body) } finally { downloader.close(...
[ "Retrieve", "a", "file", "s", "content", "and", "content", "metadata", ".", "You", "must", "call", "the", "{", "@link", "Downloader", "}", "s", "{", "@code", "close", "()", "}", "method", ";", "use", "a", "{", "@code", "try", "}", "/", "{", "@code", ...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L457-L466
att/AAF
authz/authz-certman/src/main/java/com/att/authz/cm/service/CertManAPI.java
CertManAPI.route
public void route(HttpMethods meth, String path, API api, Code code) throws Exception { """ Setup XML and JSON implementations for each supported Version type We do this by taking the Code passed in and creating clones of these with the appropriate Facades and properties to do Versions and Content switches ...
java
public void route(HttpMethods meth, String path, API api, Code code) throws Exception { String version = "1.0"; // Get Correct API Class from Mapper Class<?> respCls = facade1_0.mapper().getClass(api); if(respCls==null) throw new Exception("Unknown class associated with " + api.getClass().getName() + ' ' + api...
[ "public", "void", "route", "(", "HttpMethods", "meth", ",", "String", "path", ",", "API", "api", ",", "Code", "code", ")", "throws", "Exception", "{", "String", "version", "=", "\"1.0\"", ";", "// Get Correct API Class from Mapper", "Class", "<", "?", ">", "...
Setup XML and JSON implementations for each supported Version type We do this by taking the Code passed in and creating clones of these with the appropriate Facades and properties to do Versions and Content switches
[ "Setup", "XML", "and", "JSON", "implementations", "for", "each", "supported", "Version", "type" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/authz/authz-certman/src/main/java/com/att/authz/cm/service/CertManAPI.java#L170-L184
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createSimpleFeatureCallScope
public IScope createSimpleFeatureCallScope(EObject context, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { """ This method serves as an entry point for the content assist scoping for simple feature calls. @param context the context e.g. a for loop expression, a block or a catch clause """ ISc...
java
public IScope createSimpleFeatureCallScope(EObject context, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { IScope root = IScope.NULLSCOPE; if (context instanceof XFeatureCall) { XFeatureCall featureCall = (XFeatureCall) context; if (!featureCall.isExplicitOperationCallOrBuilderSyntax()) { r...
[ "public", "IScope", "createSimpleFeatureCallScope", "(", "EObject", "context", ",", "IFeatureScopeSession", "session", ",", "IResolvedTypes", "resolvedTypes", ")", "{", "IScope", "root", "=", "IScope", ".", "NULLSCOPE", ";", "if", "(", "context", "instanceof", "XFea...
This method serves as an entry point for the content assist scoping for simple feature calls. @param context the context e.g. a for loop expression, a block or a catch clause
[ "This", "method", "serves", "as", "an", "entry", "point", "for", "the", "content", "assist", "scoping", "for", "simple", "feature", "calls", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L104-L123
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/zk/ZkUtil.java
ZkUtil.interruptedException
public static void interruptedException(String msg, InterruptedException e) throws IOException { """ Interrupt the thread and then log and re-throw an InterruptedException as an IOException. @param msg The message to log and include when re-throwing @param e The actual exception instances @throws IOExcep...
java
public static void interruptedException(String msg, InterruptedException e) throws IOException { Thread.currentThread().interrupt(); LOG.error(msg, e); throw new IOException(msg, e); }
[ "public", "static", "void", "interruptedException", "(", "String", "msg", ",", "InterruptedException", "e", ")", "throws", "IOException", "{", "Thread", ".", "currentThread", "(", ")", ".", "interrupt", "(", ")", ";", "LOG", ".", "error", "(", "msg", ",", ...
Interrupt the thread and then log and re-throw an InterruptedException as an IOException. @param msg The message to log and include when re-throwing @param e The actual exception instances @throws IOException
[ "Interrupt", "the", "thread", "and", "then", "log", "and", "re", "-", "throw", "an", "InterruptedException", "as", "an", "IOException", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/zk/ZkUtil.java#L80-L85
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java
SeLionAsserts.verifyEquals
public static void verifyEquals(Object actual, Object expected, String msg) { """ verifyEquals method is used to assert based on actual and expected values and provide a Pass result for a same match.verifyEquals will yield a Fail result for a mismatch and continue to run the test case. @param actual - Actual ...
java
public static void verifyEquals(Object actual, Object expected, String msg) { getSoftAssertInContext().assertEquals(actual, expected, msg); }
[ "public", "static", "void", "verifyEquals", "(", "Object", "actual", ",", "Object", "expected", ",", "String", "msg", ")", "{", "getSoftAssertInContext", "(", ")", ".", "assertEquals", "(", "actual", ",", "expected", ",", "msg", ")", ";", "}" ]
verifyEquals method is used to assert based on actual and expected values and provide a Pass result for a same match.verifyEquals will yield a Fail result for a mismatch and continue to run the test case. @param actual - Actual value obtained from executing a test @param expected - Expected value for the test to pass....
[ "verifyEquals", "method", "is", "used", "to", "assert", "based", "on", "actual", "and", "expected", "values", "and", "provide", "a", "Pass", "result", "for", "a", "same", "match", ".", "verifyEquals", "will", "yield", "a", "Fail", "result", "for", "a", "mi...
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java#L257-L259
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/stats/MeasureMap.java
MeasureMap.putAttachment
public MeasureMap putAttachment(String key, AttachmentValue value) { """ Associate the contextual information of an {@code Exemplar} to this {@link MeasureMap}. Contextual information is represented as a {@code String} key and an {@link AttachmentValue}. <p>If this method is called multiple times with the same...
java
public MeasureMap putAttachment(String key, AttachmentValue value) { // Provides a default no-op implementation to avoid breaking other existing sub-classes. Utils.checkNotNull(key, "key"); Utils.checkNotNull(value, "value"); return this; }
[ "public", "MeasureMap", "putAttachment", "(", "String", "key", ",", "AttachmentValue", "value", ")", "{", "// Provides a default no-op implementation to avoid breaking other existing sub-classes.", "Utils", ".", "checkNotNull", "(", "key", ",", "\"key\"", ")", ";", "Utils",...
Associate the contextual information of an {@code Exemplar} to this {@link MeasureMap}. Contextual information is represented as a {@code String} key and an {@link AttachmentValue}. <p>If this method is called multiple times with the same key, only the last value will be kept. @param key the key of contextual informa...
[ "Associate", "the", "contextual", "information", "of", "an", "{", "@code", "Exemplar", "}", "to", "this", "{", "@link", "MeasureMap", "}", ".", "Contextual", "information", "is", "represented", "as", "a", "{", "@code", "String", "}", "key", "and", "an", "{...
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/stats/MeasureMap.java#L85-L90
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/Kickflip.java
Kickflip.setup
public static KickflipApiClient setup(Context context, String key, String secret, KickflipCallback cb) { """ Register with Kickflip, creating a new user identity per app installation. @param context the host application's {@link android.content.Context} @param key your Kickflip Client Key @param secret y...
java
public static KickflipApiClient setup(Context context, String key, String secret, KickflipCallback cb) { sContext = context; setApiCredentials(key, secret); return getApiClient(context, cb); }
[ "public", "static", "KickflipApiClient", "setup", "(", "Context", "context", ",", "String", "key", ",", "String", "secret", ",", "KickflipCallback", "cb", ")", "{", "sContext", "=", "context", ";", "setApiCredentials", "(", "key", ",", "secret", ")", ";", "r...
Register with Kickflip, creating a new user identity per app installation. @param context the host application's {@link android.content.Context} @param key your Kickflip Client Key @param secret your Kickflip Client Secret @param cb A callback to be invoked when Kickflip user credentials are available. @retu...
[ "Register", "with", "Kickflip", "creating", "a", "new", "user", "identity", "per", "app", "installation", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/Kickflip.java#L113-L117
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java
ThreadLocalRandom.internalNextDouble
final double internalNextDouble(double origin, double bound) { """ The form of nextDouble used by DoubleStream Spliterators. @param origin the least value, unless greater than bound @param bound the upper bound (exclusive), must not equal origin @return a pseudorandom value """ double r = (nextLon...
java
final double internalNextDouble(double origin, double bound) { double r = (nextLong() >>> 11) * DOUBLE_UNIT; if (origin < bound) { r = r * (bound - origin) + origin; if (r >= bound) // correct for rounding r = Double.longBitsToDouble(Double.doubleToLongBits(bound)...
[ "final", "double", "internalNextDouble", "(", "double", "origin", ",", "double", "bound", ")", "{", "double", "r", "=", "(", "nextLong", "(", ")", ">>>", "11", ")", "*", "DOUBLE_UNIT", ";", "if", "(", "origin", "<", "bound", ")", "{", "r", "=", "r", ...
The form of nextDouble used by DoubleStream Spliterators. @param origin the least value, unless greater than bound @param bound the upper bound (exclusive), must not equal origin @return a pseudorandom value
[ "The", "form", "of", "nextDouble", "used", "by", "DoubleStream", "Spliterators", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L267-L275
buschmais/jqa-java-plugin
src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/VisitorHelper.java
VisitorHelper.addWrites
void addWrites(MethodDescriptor methodDescriptor, final Integer lineNumber, FieldDescriptor fieldDescriptor) { """ Add a writes relation between a method and a field. @param methodDescriptor The method. @param lineNumber The line number. @param fieldDescriptor The field. """ WritesDescriptor wr...
java
void addWrites(MethodDescriptor methodDescriptor, final Integer lineNumber, FieldDescriptor fieldDescriptor) { WritesDescriptor writesDescriptor = scannerContext.getStore().create(methodDescriptor, WritesDescriptor.class, fieldDescriptor); writesDescriptor.setLineNumber(lineNumber); }
[ "void", "addWrites", "(", "MethodDescriptor", "methodDescriptor", ",", "final", "Integer", "lineNumber", ",", "FieldDescriptor", "fieldDescriptor", ")", "{", "WritesDescriptor", "writesDescriptor", "=", "scannerContext", ".", "getStore", "(", ")", ".", "create", "(", ...
Add a writes relation between a method and a field. @param methodDescriptor The method. @param lineNumber The line number. @param fieldDescriptor The field.
[ "Add", "a", "writes", "relation", "between", "a", "method", "and", "a", "field", "." ]
train
https://github.com/buschmais/jqa-java-plugin/blob/4c050943e9c28cf1c4a08aa962d5b5bf03c4fe54/src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/VisitorHelper.java#L166-L169
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readLines
public static List<String> readLines(File file, String charset) throws IORuntimeException { """ 从文件中读取每一行数据 @param file 文件 @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常 """ return readLines(file, charset, new ArrayList<String>()); }
java
public static List<String> readLines(File file, String charset) throws IORuntimeException { return readLines(file, charset, new ArrayList<String>()); }
[ "public", "static", "List", "<", "String", ">", "readLines", "(", "File", "file", ",", "String", "charset", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "file", ",", "charset", ",", "new", "ArrayList", "<", "String", ">", "(", ")",...
从文件中读取每一行数据 @param file 文件 @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常
[ "从文件中读取每一行数据" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2380-L2382
apache/groovy
src/main/groovy/groovy/util/FactoryBuilderSupport.java
FactoryBuilderSupport.registerFactory
public void registerFactory(String name, String groupName, Factory factory) { """ Registers a factory for a node name. @param name the name of the node @param groupName thr group to register this node in @param factory the factory to return the values """ getProxyBuilder().factories.put(nam...
java
public void registerFactory(String name, String groupName, Factory factory) { getProxyBuilder().factories.put(name, factory); getRegistrationGroup(groupName).add(name); factory.onFactoryRegistration(this, name, groupName); }
[ "public", "void", "registerFactory", "(", "String", "name", ",", "String", "groupName", ",", "Factory", "factory", ")", "{", "getProxyBuilder", "(", ")", ".", "factories", ".", "put", "(", "name", ",", "factory", ")", ";", "getRegistrationGroup", "(", "group...
Registers a factory for a node name. @param name the name of the node @param groupName thr group to register this node in @param factory the factory to return the values
[ "Registers", "a", "factory", "for", "a", "node", "name", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/FactoryBuilderSupport.java#L690-L694
apache/groovy
subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
DateUtilExtensions.plus
public static Timestamp plus(Timestamp self, int days) { """ Add number of days to this Timestamp and returns the new Timestamp object. @param self a Timestamp @param days the number of days to increase @return the new Timestamp """ Calendar calendar = Calendar.getInstance(); calendar.setT...
java
public static Timestamp plus(Timestamp self, int days) { Calendar calendar = Calendar.getInstance(); calendar.setTime(self); calendar.add(Calendar.DATE, days); Timestamp ts = new Timestamp(calendar.getTime().getTime()); ts.setNanos(self.getNanos()); return ts; }
[ "public", "static", "Timestamp", "plus", "(", "Timestamp", "self", ",", "int", "days", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "setTime", "(", "self", ")", ";", "calendar", ".", "add", "(", ...
Add number of days to this Timestamp and returns the new Timestamp object. @param self a Timestamp @param days the number of days to increase @return the new Timestamp
[ "Add", "number", "of", "days", "to", "this", "Timestamp", "and", "returns", "the", "new", "Timestamp", "object", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java#L403-L410
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/CounterGroup.java
CounterGroup.findCounter
protected Counter findCounter(String counterName, String displayName) { """ Internal to find a counter in a group. @param counterName the name of the counter @param displayName the display name of the counter @return the counter that was found or added """ Counter result = counters.get(counterName); ...
java
protected Counter findCounter(String counterName, String displayName) { Counter result = counters.get(counterName); if (result == null) { result = new Counter(counterName, displayName); counters.put(counterName, result); } return result; }
[ "protected", "Counter", "findCounter", "(", "String", "counterName", ",", "String", "displayName", ")", "{", "Counter", "result", "=", "counters", ".", "get", "(", "counterName", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", ...
Internal to find a counter in a group. @param counterName the name of the counter @param displayName the display name of the counter @return the counter that was found or added
[ "Internal", "to", "find", "a", "counter", "in", "a", "group", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/CounterGroup.java#L94-L101
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/list/Interval.java
Interval.bigIntegerProduct
private BigInteger bigIntegerProduct() { """ Returns the BigInteger result of calculating product for the range. """ return this.injectInto(BigInteger.valueOf(1L), new Function2<BigInteger, Integer, BigInteger>() { public BigInteger value(BigInteger result, Integer each) ...
java
private BigInteger bigIntegerProduct() { return this.injectInto(BigInteger.valueOf(1L), new Function2<BigInteger, Integer, BigInteger>() { public BigInteger value(BigInteger result, Integer each) { return result.multiply(BigInteger.valueOf(each.longValue())); ...
[ "private", "BigInteger", "bigIntegerProduct", "(", ")", "{", "return", "this", ".", "injectInto", "(", "BigInteger", ".", "valueOf", "(", "1L", ")", ",", "new", "Function2", "<", "BigInteger", ",", "Integer", ",", "BigInteger", ">", "(", ")", "{", "public"...
Returns the BigInteger result of calculating product for the range.
[ "Returns", "the", "BigInteger", "result", "of", "calculating", "product", "for", "the", "range", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/list/Interval.java#L363-L372
realtime-framework/RealtimeMessaging-Java
library/src/main/java/ibt/ortc/api/Ortc.java
Ortc.enablePresence
public static void enablePresence(String url, Boolean isCluster, String applicationKey, String privateKey, String channel, Boolean metadata, Proxy proxy, OnEnablePresence callback) { """ Enables presence for the specified channel with first 100 unique metadata if metadata is set to true (using proxy connect...
java
public static void enablePresence(String url, Boolean isCluster, String applicationKey, String privateKey, String channel, Boolean metadata, Proxy proxy, OnEnablePresence callback) { Presence.enablePresence(url, isCluster, applicationKey, privateKey, channel, metadata, proxy, callback); }
[ "public", "static", "void", "enablePresence", "(", "String", "url", ",", "Boolean", "isCluster", ",", "String", "applicationKey", ",", "String", "privateKey", ",", "String", "channel", ",", "Boolean", "metadata", ",", "Proxy", "proxy", ",", "OnEnablePresence", "...
Enables presence for the specified channel with first 100 unique metadata if metadata is set to true (using proxy connection). <pre> Ortc.enablePresence(&quot;http://ortc-developers.realtime.co/server/2.1/&quot;, true, &quot;APPLICATION_KEY&quot;, &quot;PRIVATE_KEY&quot;, &quot;CHANNEL&quot;, true, new Proxy(&quot;my....
[ "Enables", "presence", "for", "the", "specified", "channel", "with", "first", "100", "unique", "metadata", "if", "metadata", "is", "set", "to", "true", "(", "using", "proxy", "connection", ")", "." ]
train
https://github.com/realtime-framework/RealtimeMessaging-Java/blob/cae0dfd01567a2d9e55a0849c0c9b09ad4b2cc08/library/src/main/java/ibt/ortc/api/Ortc.java#L462-L465
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/Cursor.java
Cursor.setSensibility
public void setSensibility(double sh, double sv) { """ Set cursor sensibility (move speed). Default value should be 1.0 (close to system sensibility). @param sh The horizontal sensibility (superior or equal to 0.0). @param sv The vertical sensibility (superior or equal to 0.0). """ sensibilityHoriz...
java
public void setSensibility(double sh, double sv) { sensibilityHorizontal = Math.max(0.0, sh); sensibilityVertical = Math.max(0.0, sv); }
[ "public", "void", "setSensibility", "(", "double", "sh", ",", "double", "sv", ")", "{", "sensibilityHorizontal", "=", "Math", ".", "max", "(", "0.0", ",", "sh", ")", ";", "sensibilityVertical", "=", "Math", ".", "max", "(", "0.0", ",", "sv", ")", ";", ...
Set cursor sensibility (move speed). Default value should be 1.0 (close to system sensibility). @param sh The horizontal sensibility (superior or equal to 0.0). @param sv The vertical sensibility (superior or equal to 0.0).
[ "Set", "cursor", "sensibility", "(", "move", "speed", ")", ".", "Default", "value", "should", "be", "1", ".", "0", "(", "close", "to", "system", "sensibility", ")", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/Cursor.java#L166-L170
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AGNES.java
AGNES.initializeDistanceMatrix
protected static void initializeDistanceMatrix(MatrixParadigm mat, DistanceQuery<?> dq, Linkage linkage) { """ Initialize a distance matrix. @param mat Matrix @param dq Distance query @param linkage Linkage method """ final DBIDArrayIter ix = mat.ix, iy = mat.iy; final double[] matrix = mat.matrix...
java
protected static void initializeDistanceMatrix(MatrixParadigm mat, DistanceQuery<?> dq, Linkage linkage) { final DBIDArrayIter ix = mat.ix, iy = mat.iy; final double[] matrix = mat.matrix; final boolean issquare = dq.getDistanceFunction().isSquared(); FiniteProgress prog = LOG.isVerbose() ? new FinitePr...
[ "protected", "static", "void", "initializeDistanceMatrix", "(", "MatrixParadigm", "mat", ",", "DistanceQuery", "<", "?", ">", "dq", ",", "Linkage", "linkage", ")", "{", "final", "DBIDArrayIter", "ix", "=", "mat", ".", "ix", ",", "iy", "=", "mat", ".", "iy"...
Initialize a distance matrix. @param mat Matrix @param dq Distance query @param linkage Linkage method
[ "Initialize", "a", "distance", "matrix", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AGNES.java#L193-L214
marvinlabs/android-slideshow-widget
library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java
SlideShowView.recyclePreviousSlideView
private void recyclePreviousSlideView(int position, View view) { """ Once the previous slide has disappeared, we remove its view from our hierarchy and add it to the views that can be re-used. @param position The position of the slide to recycle @param view The view to recycle """ // Remove vi...
java
private void recyclePreviousSlideView(int position, View view) { // Remove view from our hierarchy removeView(view); // Add to recycled views int viewType = adapter.getItemViewType(position); recycledViews.put(viewType, view); view.destroyDrawingCache(); if (vie...
[ "private", "void", "recyclePreviousSlideView", "(", "int", "position", ",", "View", "view", ")", "{", "// Remove view from our hierarchy", "removeView", "(", "view", ")", ";", "// Add to recycled views", "int", "viewType", "=", "adapter", ".", "getItemViewType", "(", ...
Once the previous slide has disappeared, we remove its view from our hierarchy and add it to the views that can be re-used. @param position The position of the slide to recycle @param view The view to recycle
[ "Once", "the", "previous", "slide", "has", "disappeared", "we", "remove", "its", "view", "from", "our", "hierarchy", "and", "add", "it", "to", "the", "views", "that", "can", "be", "re", "-", "used", "." ]
train
https://github.com/marvinlabs/android-slideshow-widget/blob/0d8ddca9a8f62787d78b5eb7f184cabfee569d8d/library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java#L674-L694
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/cache/CmsFlexCacheClearDialog.java
CmsFlexCacheClearDialog.actionClearCaches
public void actionClearCaches() throws JspException { """ Sends a clear caches event.<p> @throws JspException if something goes wrong """ OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, null)); setAction(CmsDialog.ACTION_CANCEL); actionCloseDialog(); }
java
public void actionClearCaches() throws JspException { OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, null)); setAction(CmsDialog.ACTION_CANCEL); actionCloseDialog(); }
[ "public", "void", "actionClearCaches", "(", ")", "throws", "JspException", "{", "OpenCms", ".", "fireCmsEvent", "(", "new", "CmsEvent", "(", "I_CmsEventListener", ".", "EVENT_CLEAR_CACHES", ",", "null", ")", ")", ";", "setAction", "(", "CmsDialog", ".", "ACTION_...
Sends a clear caches event.<p> @throws JspException if something goes wrong
[ "Sends", "a", "clear", "caches", "event", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/cache/CmsFlexCacheClearDialog.java#L108-L114
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/config/ServiceKernel.java
ServiceKernel.redefineService
public <T extends IService, Q extends T> void redefineService(Class<? extends T> service, Q newProvider) { """ Overrides the default implemenation of the service with a different provider. Note that the current provider cannot have been accessed (all services must be consistent during runtime.) @param service...
java
public <T extends IService, Q extends T> void redefineService(Class<? extends T> service, Q newProvider) { if( _definingServices ) { throw new IllegalStateException( "Service definition in progress, so service redefinition is not allowed. Please " + "move redefini...
[ "public", "<", "T", "extends", "IService", ",", "Q", "extends", "T", ">", "void", "redefineService", "(", "Class", "<", "?", "extends", "T", ">", "service", ",", "Q", "newProvider", ")", "{", "if", "(", "_definingServices", ")", "{", "throw", "new", "I...
Overrides the default implemenation of the service with a different provider. Note that the current provider cannot have been accessed (all services must be consistent during runtime.) @param service - the service to provide @param newProvider - the new provider of this service
[ "Overrides", "the", "default", "implemenation", "of", "the", "service", "with", "a", "different", "provider", ".", "Note", "that", "the", "current", "provider", "cannot", "have", "been", "accessed", "(", "all", "services", "must", "be", "consistent", "during", ...
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/config/ServiceKernel.java#L79-L98
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolableConnection.java
PoolableConnection.prepareStatement
@Override public PoolablePreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { """ Method prepareStatement. @param sql @param autoGeneratedKeys @return PreparedStatement @throws SQLException @see java.sql.Connection#prepareStatement(String, int) """ re...
java
@Override public PoolablePreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { return prepareStatement(sql, autoGeneratedKeys, -1, -1, -1); }
[ "@", "Override", "public", "PoolablePreparedStatement", "prepareStatement", "(", "String", "sql", ",", "int", "autoGeneratedKeys", ")", "throws", "SQLException", "{", "return", "prepareStatement", "(", "sql", ",", "autoGeneratedKeys", ",", "-", "1", ",", "-", "1",...
Method prepareStatement. @param sql @param autoGeneratedKeys @return PreparedStatement @throws SQLException @see java.sql.Connection#prepareStatement(String, int)
[ "Method", "prepareStatement", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolableConnection.java#L508-L511
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/provider/CallbackHelper.java
CallbackHelper.getCallbackUri
public static String getCallbackUri(@NonNull String scheme, @NonNull String packageName, @NonNull String domain) { """ Generates the callback Uri for the given domain. @return the callback Uri. """ if (!URLUtil.isValidUrl(domain)) { Log.e(TAG, "The Domain is invalid and the Callback URI ...
java
public static String getCallbackUri(@NonNull String scheme, @NonNull String packageName, @NonNull String domain) { if (!URLUtil.isValidUrl(domain)) { Log.e(TAG, "The Domain is invalid and the Callback URI will not be set. You used: " + domain); return null; } Uri uri = U...
[ "public", "static", "String", "getCallbackUri", "(", "@", "NonNull", "String", "scheme", ",", "@", "NonNull", "String", "packageName", ",", "@", "NonNull", "String", "domain", ")", "{", "if", "(", "!", "URLUtil", ".", "isValidUrl", "(", "domain", ")", ")",...
Generates the callback Uri for the given domain. @return the callback Uri.
[ "Generates", "the", "callback", "Uri", "for", "the", "given", "domain", "." ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/provider/CallbackHelper.java#L45-L61
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/rendering/TagHtmlBase.java
TagHtmlBase.renderAttributes
protected void renderAttributes(int type, AbstractRenderAppender sb, AbstractAttributeState state, boolean doubleQuote) { """ Render all of the attributes defined in a map and return the string value. The attributes are rendered with in a name="value" style supported by XML. @param type an integer key indentify...
java
protected void renderAttributes(int type, AbstractRenderAppender sb, AbstractAttributeState state, boolean doubleQuote) { HashMap map = null; switch (type) { case AbstractHtmlState.ATTR_JAVASCRIPT: assert(state instanceof AbstractHtmlState) : "ATTR_JAVASCRIPT requires a A...
[ "protected", "void", "renderAttributes", "(", "int", "type", ",", "AbstractRenderAppender", "sb", ",", "AbstractAttributeState", "state", ",", "boolean", "doubleQuote", ")", "{", "HashMap", "map", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "Abs...
Render all of the attributes defined in a map and return the string value. The attributes are rendered with in a name="value" style supported by XML. @param type an integer key indentifying the map
[ "Render", "all", "of", "the", "attributes", "defined", "in", "a", "map", "and", "return", "the", "string", "value", ".", "The", "attributes", "are", "rendered", "with", "in", "a", "name", "=", "value", "style", "supported", "by", "XML", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/rendering/TagHtmlBase.java#L30-L44
js-lib-com/commons
src/main/java/js/lang/Config.java
Config.setProperty
public void setProperty(String name, Object value) { """ Set configuration object property. Convert <code>value</code> to string and set property. If property already exists overwrite old value. If <code>value</code> argument is null this setter does nothing. @param name property name, @param value property v...
java
public void setProperty(String name, Object value) { Params.notNullOrEmpty(name, "Property name"); if(value != null) { properties.setProperty(name, converter.asString(value)); } }
[ "public", "void", "setProperty", "(", "String", "name", ",", "Object", "value", ")", "{", "Params", ".", "notNullOrEmpty", "(", "name", ",", "\"Property name\"", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "properties", ".", "setProperty", "(", ...
Set configuration object property. Convert <code>value</code> to string and set property. If property already exists overwrite old value. If <code>value</code> argument is null this setter does nothing. @param name property name, @param value property value, null ignored. @throws IllegalArgumentException if <code>name...
[ "Set", "configuration", "object", "property", ".", "Convert", "<code", ">", "value<", "/", "code", ">", "to", "string", "and", "set", "property", ".", "If", "property", "already", "exists", "overwrite", "old", "value", ".", "If", "<code", ">", "value<", "/...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L166-L172
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_nsvpx_image.java
xen_nsvpx_image.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ xen_nsvpx_image_responses result = (xen_nsvpx_image_responses) service....
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_nsvpx_image_responses result = (xen_nsvpx_image_responses) service.get_payload_formatter().string_to_resource(xen_nsvpx_image_responses.class, response); if(result.errorcode != 0) { if (result...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_nsvpx_image_responses", "result", "=", "(", "xen_nsvpx_image_responses", ")", "service", ".", "get_payloa...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_nsvpx_image.java#L264-L281
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/IntSerializer.java
IntSerializer.writeInt32
public static void writeInt32(final int value, final byte[] buffer, int offset) { """ Writes the 32-bit int into the buffer starting with the most significant byte. """ buffer[offset++] = (byte) ((value >>> 24) & 0xFF); buffer[offset++] = (byte) ((value >>> 16) & 0xFF); buffer[offset...
java
public static void writeInt32(final int value, final byte[] buffer, int offset) { buffer[offset++] = (byte) ((value >>> 24) & 0xFF); buffer[offset++] = (byte) ((value >>> 16) & 0xFF); buffer[offset++] = (byte) ((value >>> 8) & 0xFF); buffer[offset] = (byte) ((value >>> 0) & 0xFF...
[ "public", "static", "void", "writeInt32", "(", "final", "int", "value", ",", "final", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "buffer", "[", "offset", "++", "]", "=", "(", "byte", ")", "(", "(", "value", ">>>", "24", ")", "&", ...
Writes the 32-bit int into the buffer starting with the most significant byte.
[ "Writes", "the", "32", "-", "bit", "int", "into", "the", "buffer", "starting", "with", "the", "most", "significant", "byte", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/IntSerializer.java#L59-L65
johncarl81/transfuse
transfuse-core/src/main/java/org/androidtransfuse/analysis/InjectionPointFactory.java
InjectionPointFactory.buildInjectionPoint
public MethodInjectionPoint buildInjectionPoint(ASTType rootContainingType, ASTType containingType, ASTMethod astMethod, AnalysisContext context) { """ Build a Method Injection Point from the given ASTMethod @param containingType @param astMethod required ASTMethod @param context analysis context @re...
java
public MethodInjectionPoint buildInjectionPoint(ASTType rootContainingType, ASTType containingType, ASTMethod astMethod, AnalysisContext context) { MethodInjectionPoint methodInjectionPoint = new MethodInjectionPoint(rootContainingType, containingType, astMethod); methodInjectionPoint.addThrows(astMeth...
[ "public", "MethodInjectionPoint", "buildInjectionPoint", "(", "ASTType", "rootContainingType", ",", "ASTType", "containingType", ",", "ASTMethod", "astMethod", ",", "AnalysisContext", "context", ")", "{", "MethodInjectionPoint", "methodInjectionPoint", "=", "new", "MethodIn...
Build a Method Injection Point from the given ASTMethod @param containingType @param astMethod required ASTMethod @param context analysis context @return MethodInjectionPoint
[ "Build", "a", "Method", "Injection", "Point", "from", "the", "given", "ASTMethod" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-core/src/main/java/org/androidtransfuse/analysis/InjectionPointFactory.java#L98-L116
mjeanroy/junit-runif
src/main/java/com/github/mjeanroy/junit4/runif/conditions/JavaUtils.java
JavaUtils.getSystemProperty
private static String getSystemProperty(String property) { """ Gets a System property, and throw {@link SystemPropertyReadingException} if system property cannot be read. @param property the system property name @return the system property value. @throws SystemPropertyReadingException If the property cannot ...
java
private static String getSystemProperty(String property) { try { return System.getProperty(property); } catch (SecurityException ex) { throw new SystemPropertyReadingException(ex, property); } }
[ "private", "static", "String", "getSystemProperty", "(", "String", "property", ")", "{", "try", "{", "return", "System", ".", "getProperty", "(", "property", ")", ";", "}", "catch", "(", "SecurityException", "ex", ")", "{", "throw", "new", "SystemPropertyReadi...
Gets a System property, and throw {@link SystemPropertyReadingException} if system property cannot be read. @param property the system property name @return the system property value. @throws SystemPropertyReadingException If the property cannot be read.
[ "Gets", "a", "System", "property", "and", "throw", "{", "@link", "SystemPropertyReadingException", "}", "if", "system", "property", "cannot", "be", "read", "." ]
train
https://github.com/mjeanroy/junit-runif/blob/6fcfe39196d3f51ee1a8db7316567f540063e255/src/main/java/com/github/mjeanroy/junit4/runif/conditions/JavaUtils.java#L73-L79
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/EmailApi.java
EmailApi.cancelEmail
public ApiSuccessResponse cancelEmail(String id, CancelData cancelData) throws ApiException { """ cancel the outbound email interaction Cancel the interaction specified in the id path parameter @param id id of interaction to cancel (required) @param cancelData Request parameters. (optional) @return ApiSuccessR...
java
public ApiSuccessResponse cancelEmail(String id, CancelData cancelData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = cancelEmailWithHttpInfo(id, cancelData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "cancelEmail", "(", "String", "id", ",", "CancelData", "cancelData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "cancelEmailWithHttpInfo", "(", "id", ",", "cancelData", ")", ";", ...
cancel the outbound email interaction Cancel the interaction specified in the id path parameter @param id id of interaction to cancel (required) @param cancelData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response ...
[ "cancel", "the", "outbound", "email", "interaction", "Cancel", "the", "interaction", "specified", "in", "the", "id", "path", "parameter" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/EmailApi.java#L265-L268
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyZipUtils.java
MyZipUtils.recursiveAddZip
public static void recursiveAddZip(File parent, ZipOutputStream zout, File fileSource) throws IOException { """ Recursively add files to a ZipOutputStream @param parent Parent file @param zout ZipOutputStream to append @param fileSource The file source @throws IOException I/O Error """ File[] ...
java
public static void recursiveAddZip(File parent, ZipOutputStream zout, File fileSource) throws IOException { File[] files = fileSource.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { recursiveAddZip(parent, zout, files[i]); continue; } ...
[ "public", "static", "void", "recursiveAddZip", "(", "File", "parent", ",", "ZipOutputStream", "zout", ",", "File", "fileSource", ")", "throws", "IOException", "{", "File", "[", "]", "files", "=", "fileSource", ".", "listFiles", "(", ")", ";", "for", "(", "...
Recursively add files to a ZipOutputStream @param parent Parent file @param zout ZipOutputStream to append @param fileSource The file source @throws IOException I/O Error
[ "Recursively", "add", "files", "to", "a", "ZipOutputStream" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyZipUtils.java#L136-L167
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toVoid
public static Object toVoid(Object o) throws ExpressionException { """ cast a value to void (Empty String) @param o @return void value @throws ExpressionException """ if (o == null) return null; else if (o instanceof String && o.toString().length() == 0) return null; else if (o instanceof Number && ((N...
java
public static Object toVoid(Object o) throws ExpressionException { if (o == null) return null; else if (o instanceof String && o.toString().length() == 0) return null; else if (o instanceof Number && ((Number) o).intValue() == 0) return null; else if (o instanceof Boolean && ((Boolean) o).booleanValue() == false) r...
[ "public", "static", "Object", "toVoid", "(", "Object", "o", ")", "throws", "ExpressionException", "{", "if", "(", "o", "==", "null", ")", "return", "null", ";", "else", "if", "(", "o", "instanceof", "String", "&&", "o", ".", "toString", "(", ")", ".", ...
cast a value to void (Empty String) @param o @return void value @throws ExpressionException
[ "cast", "a", "value", "to", "void", "(", "Empty", "String", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L3926-L3933
firebase/geofire-java
common/src/main/java/com/firebase/geofire/GeoQuery.java
GeoQuery.setLocation
public synchronized void setLocation(GeoLocation center, double radius) { """ Sets the center and radius (in kilometers) of this query, and triggers new events if necessary. @param center The new center @param radius The radius of the query, in kilometers. The maximum radius that is supported is about 8587km. I...
java
public synchronized void setLocation(GeoLocation center, double radius) { this.center = center; // convert radius to meters this.radius = capRadius(radius) * KILOMETER_TO_METER; if (this.hasListeners()) { this.setupQueries(); } }
[ "public", "synchronized", "void", "setLocation", "(", "GeoLocation", "center", ",", "double", "radius", ")", "{", "this", ".", "center", "=", "center", ";", "// convert radius to meters", "this", ".", "radius", "=", "capRadius", "(", "radius", ")", "*", "KILOM...
Sets the center and radius (in kilometers) of this query, and triggers new events if necessary. @param center The new center @param radius The radius of the query, in kilometers. The maximum radius that is supported is about 8587km. If a radius bigger than this is passed we'll cap it.
[ "Sets", "the", "center", "and", "radius", "(", "in", "kilometers", ")", "of", "this", "query", "and", "triggers", "new", "events", "if", "necessary", "." ]
train
https://github.com/firebase/geofire-java/blob/c46ff339060d150741a8d0d40c8e73b78edca6c3/common/src/main/java/com/firebase/geofire/GeoQuery.java#L466-L473
roboconf/roboconf-platform
core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackIaasHandler.java
OpenstackIaasHandler.validateAll
static void validateAll( Map<String,String> targetProperties, String appName, String instanceName ) throws TargetException { """ Validates the target properties, including storage ones. @param targetProperties @param appName @param instanceName @throws TargetException """ // Basic checks validate( ta...
java
static void validateAll( Map<String,String> targetProperties, String appName, String instanceName ) throws TargetException { // Basic checks validate( targetProperties ); // Storage checks Set<String> mountPoints = new HashSet<> (); Set<String> volumeNames = new HashSet<> (); for( String s : findStorageI...
[ "static", "void", "validateAll", "(", "Map", "<", "String", ",", "String", ">", "targetProperties", ",", "String", "appName", ",", "String", "instanceName", ")", "throws", "TargetException", "{", "// Basic checks", "validate", "(", "targetProperties", ")", ";", ...
Validates the target properties, including storage ones. @param targetProperties @param appName @param instanceName @throws TargetException
[ "Validates", "the", "target", "properties", "including", "storage", "ones", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackIaasHandler.java#L443-L478
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/N1qlParams.java
N1qlParams.durationToN1qlFormat
public static String durationToN1qlFormat(long duration, TimeUnit unit) { """ Helper method to convert a duration into the n1ql (golang) format. """ switch (unit) { case NANOSECONDS: return duration + "ns"; case MICROSECONDS: return duration + "us...
java
public static String durationToN1qlFormat(long duration, TimeUnit unit) { switch (unit) { case NANOSECONDS: return duration + "ns"; case MICROSECONDS: return duration + "us"; case MILLISECONDS: return duration + "ms"; ...
[ "public", "static", "String", "durationToN1qlFormat", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "switch", "(", "unit", ")", "{", "case", "NANOSECONDS", ":", "return", "duration", "+", "\"ns\"", ";", "case", "MICROSECONDS", ":", "return", "d...
Helper method to convert a duration into the n1ql (golang) format.
[ "Helper", "method", "to", "convert", "a", "duration", "into", "the", "n1ql", "(", "golang", ")", "format", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/N1qlParams.java#L164-L182
allcolor/YaHP-Converter
YaHPConverter/src/org/allcolor/yahp/converter/CJarLoaderURLStreamHandler.java
CJarLoaderURLStreamHandler.addClassPreload
public void addClassPreload(final String path, final byte array[]) { """ add a class byte representation in the preload map @param path path to the class inside the jar @param array byte representation """ try { this.preload.put(path, new SoftReference( new CGCCleaner(path, array))); } catch ...
java
public void addClassPreload(final String path, final byte array[]) { try { this.preload.put(path, new SoftReference( new CGCCleaner(path, array))); } catch (Exception ignore) { } }
[ "public", "void", "addClassPreload", "(", "final", "String", "path", ",", "final", "byte", "array", "[", "]", ")", "{", "try", "{", "this", ".", "preload", ".", "put", "(", "path", ",", "new", "SoftReference", "(", "new", "CGCCleaner", "(", "path", ","...
add a class byte representation in the preload map @param path path to the class inside the jar @param array byte representation
[ "add", "a", "class", "byte", "representation", "in", "the", "preload", "map" ]
train
https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CJarLoaderURLStreamHandler.java#L86-L92
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.deflater
private static void deflater(InputStream in, OutputStream out, int level) { """ 将普通数据流压缩成zlib到out中 @param in zlib数据流 @param out 输出 @param level 压缩级别,0~9 """ final DeflaterOutputStream ios = (out instanceof DeflaterOutputStream) ? (DeflaterOutputStream) out : new DeflaterOutputStream(out, new Deflater(l...
java
private static void deflater(InputStream in, OutputStream out, int level) { final DeflaterOutputStream ios = (out instanceof DeflaterOutputStream) ? (DeflaterOutputStream) out : new DeflaterOutputStream(out, new Deflater(level, true)); IoUtil.copy(in, ios); try { ios.finish(); } catch (IOException e) { ...
[ "private", "static", "void", "deflater", "(", "InputStream", "in", ",", "OutputStream", "out", ",", "int", "level", ")", "{", "final", "DeflaterOutputStream", "ios", "=", "(", "out", "instanceof", "DeflaterOutputStream", ")", "?", "(", "DeflaterOutputStream", ")...
将普通数据流压缩成zlib到out中 @param in zlib数据流 @param out 输出 @param level 压缩级别,0~9
[ "将普通数据流压缩成zlib到out中" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L941-L949
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java
SimpleCamera2Activity.selectCamera
protected boolean selectCamera( String id , CameraCharacteristics characteristics ) { """ By default this will select the backfacing camera. override to change the camera it selects. """ if( verbose ) Log.i(TAG,"selectCamera() default function"); Integer facing = characteristics.get(CameraCharacteristic...
java
protected boolean selectCamera( String id , CameraCharacteristics characteristics ) { if( verbose ) Log.i(TAG,"selectCamera() default function"); Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING); return facing == null || facing != CameraCharacteristics.LENS_FACING_FRONT; }
[ "protected", "boolean", "selectCamera", "(", "String", "id", ",", "CameraCharacteristics", "characteristics", ")", "{", "if", "(", "verbose", ")", "Log", ".", "i", "(", "TAG", ",", "\"selectCamera() default function\"", ")", ";", "Integer", "facing", "=", "chara...
By default this will select the backfacing camera. override to change the camera it selects.
[ "By", "default", "this", "will", "select", "the", "backfacing", "camera", ".", "override", "to", "change", "the", "camera", "it", "selects", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L320-L325
RestComm/sipunit
src/main/java/org/cafesip/sipunit/PresenceSubscriber.java
PresenceSubscriber.refreshBuddy
public boolean refreshBuddy(String eventId, long timeout) { """ This method is the same as refreshBuddy(duration, eventId, timeout) except that the SUBSCRIBE duration sent will be however much time is left on the current subscription. If time left on the subscription &lt;= 0, unsubscribe occurs (note, the buddy ...
java
public boolean refreshBuddy(String eventId, long timeout) { if (parent.getBuddyList().get(targetUri) == null) { setReturnCode(SipSession.INVALID_ARGUMENT); setErrorMessage("Buddy refresh for URI " + targetUri + " failed, not found in buddy list."); return false; } return refreshBud...
[ "public", "boolean", "refreshBuddy", "(", "String", "eventId", ",", "long", "timeout", ")", "{", "if", "(", "parent", ".", "getBuddyList", "(", ")", ".", "get", "(", "targetUri", ")", "==", "null", ")", "{", "setReturnCode", "(", "SipSession", ".", "INVA...
This method is the same as refreshBuddy(duration, eventId, timeout) except that the SUBSCRIBE duration sent will be however much time is left on the current subscription. If time left on the subscription &lt;= 0, unsubscribe occurs (note, the buddy stays in the list).
[ "This", "method", "is", "the", "same", "as", "refreshBuddy", "(", "duration", "eventId", "timeout", ")", "except", "that", "the", "SUBSCRIBE", "duration", "sent", "will", "be", "however", "much", "time", "is", "left", "on", "the", "current", "subscription", ...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/PresenceSubscriber.java#L334-L342
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.feedHandler
protected boolean feedHandler(IFacebookMethod feedMethod, CharSequence title, CharSequence body, Collection<IFeedImage> images, Integer priority) throws FacebookException, IOException { """ Helper function: assembles the parameters used by feed_publishActionOfUser and feed_publ...
java
protected boolean feedHandler(IFacebookMethod feedMethod, CharSequence title, CharSequence body, Collection<IFeedImage> images, Integer priority) throws FacebookException, IOException { ArrayList<Pair<String, CharSequence>> params = new ArrayList<Pair<String, CharSequence>>...
[ "protected", "boolean", "feedHandler", "(", "IFacebookMethod", "feedMethod", ",", "CharSequence", "title", ",", "CharSequence", "body", ",", "Collection", "<", "IFeedImage", ">", "images", ",", "Integer", "priority", ")", "throws", "FacebookException", ",", "IOExcep...
Helper function: assembles the parameters used by feed_publishActionOfUser and feed_publishStoryToUser @param feedMethod feed_publishStoryToUser / feed_publishActionOfUser @param title title of the story @param body body of the story @param images optional images to be included in he story @param priority @return wheth...
[ "Helper", "function", ":", "assembles", "the", "parameters", "used", "by", "feed_publishActionOfUser", "and", "feed_publishStoryToUser" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L234-L249
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/parser/OBaseParser.java
OBaseParser.parserRequiredWord
protected String parserRequiredWord(final boolean iUpperCase, final String iCustomMessage, String iSeparators) { """ Parses the next word. If no word is found or the parsed word is not present in the word array received as parameter then a SyntaxError exception with the custom message received as parameter is thr...
java
protected String parserRequiredWord(final boolean iUpperCase, final String iCustomMessage, String iSeparators) { if (iSeparators == null) iSeparators = " =><(),\r\n"; parserNextWord(iUpperCase, iSeparators); if (parserLastWord.length() == 0) throwSyntaxErrorException(iCustomMessage); ...
[ "protected", "String", "parserRequiredWord", "(", "final", "boolean", "iUpperCase", ",", "final", "String", "iCustomMessage", ",", "String", "iSeparators", ")", "{", "if", "(", "iSeparators", "==", "null", ")", "iSeparators", "=", "\" =><(),\\r\\n\"", ";", "parser...
Parses the next word. If no word is found or the parsed word is not present in the word array received as parameter then a SyntaxError exception with the custom message received as parameter is thrown. It returns the word parsed if any. @param iUpperCase True if must return UPPERCASE, otherwise false @param iCustomMes...
[ "Parses", "the", "next", "word", ".", "If", "no", "word", "is", "found", "or", "the", "parsed", "word", "is", "not", "present", "in", "the", "word", "array", "received", "as", "parameter", "then", "a", "SyntaxError", "exception", "with", "the", "custom", ...
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/parser/OBaseParser.java#L140-L148
rythmengine/rythmengine
src/main/java/org/rythmengine/template/TemplateBase.java
TemplateBase.__invokeTag
protected void __invokeTag(int line, String name) { """ Invoke a tag. Usually should not used directly in user template @param line @param name """ __engine.invokeTemplate(line, name, this, null, null, null); }
java
protected void __invokeTag(int line, String name) { __engine.invokeTemplate(line, name, this, null, null, null); }
[ "protected", "void", "__invokeTag", "(", "int", "line", ",", "String", "name", ")", "{", "__engine", ".", "invokeTemplate", "(", "line", ",", "name", ",", "this", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Invoke a tag. Usually should not used directly in user template @param line @param name
[ "Invoke", "a", "tag", ".", "Usually", "should", "not", "used", "directly", "in", "user", "template" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/template/TemplateBase.java#L155-L157
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TableProxy.java
TableProxy.get
public Object get(int iRowIndex, int iRowCount) throws DBException, RemoteException { """ Receive this relative record in the table. <p>Note: This is usually used only by thin clients, as thick clients have the code to fake absolute access. @param iRowIndex The row to retrieve. @param iRowCount The number of r...
java
public Object get(int iRowIndex, int iRowCount) throws DBException, RemoteException { BaseTransport transport = this.createProxyTransport(GET); transport.addParam(INDEX, iRowIndex); transport.addParam(COUNT, iRowCount); Object strReturn = transport.sendMessageAndGetReply(); O...
[ "public", "Object", "get", "(", "int", "iRowIndex", ",", "int", "iRowCount", ")", "throws", "DBException", ",", "RemoteException", "{", "BaseTransport", "transport", "=", "this", ".", "createProxyTransport", "(", "GET", ")", ";", "transport", ".", "addParam", ...
Receive this relative record in the table. <p>Note: This is usually used only by thin clients, as thick clients have the code to fake absolute access. @param iRowIndex The row to retrieve. @param iRowCount The number of rows to retrieve (Used only by CachedRemoteTable). @return The record(s) or an error code as an Inte...
[ "Receive", "this", "relative", "record", "in", "the", "table", ".", "<p", ">", "Note", ":", "This", "is", "usually", "used", "only", "by", "thin", "clients", "as", "thick", "clients", "have", "the", "code", "to", "fake", "absolute", "access", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TableProxy.java#L226-L234
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AbsPathChecker.java
AbsPathChecker.visitFunction
public boolean visitFunction(ExpressionOwner owner, Function func) { """ Visit a function. @param owner The owner of the expression, to which the expression can be reset if rewriting takes place. @param func The function reference object. @return true if the sub expressions should be traversed. """ if((f...
java
public boolean visitFunction(ExpressionOwner owner, Function func) { if((func instanceof FuncCurrent) || (func instanceof FuncExtFunction)) m_isAbs = false; return true; }
[ "public", "boolean", "visitFunction", "(", "ExpressionOwner", "owner", ",", "Function", "func", ")", "{", "if", "(", "(", "func", "instanceof", "FuncCurrent", ")", "||", "(", "func", "instanceof", "FuncExtFunction", ")", ")", "m_isAbs", "=", "false", ";", "r...
Visit a function. @param owner The owner of the expression, to which the expression can be reset if rewriting takes place. @param func The function reference object. @return true if the sub expressions should be traversed.
[ "Visit", "a", "function", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AbsPathChecker.java#L60-L66
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/viewer/empty/EmptyTileFactory.java
EmptyTileFactory.getTile
@Override public Tile getTile(int x, int y, int zoom) { """ Gets an instance of an empty tile for the given tile position and zoom on the world map. @param x The tile's x position on the world map. @param y The tile's y position on the world map. @param zoom The current zoom level. """ return ne...
java
@Override public Tile getTile(int x, int y, int zoom) { return new Tile(x, y, zoom) { @Override public synchronized boolean isLoaded() { return true; } @Override public BufferedImage getImage() {...
[ "@", "Override", "public", "Tile", "getTile", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "return", "new", "Tile", "(", "x", ",", "y", ",", "zoom", ")", "{", "@", "Override", "public", "synchronized", "boolean", "isLoaded", "(", ...
Gets an instance of an empty tile for the given tile position and zoom on the world map. @param x The tile's x position on the world map. @param y The tile's y position on the world map. @param zoom The current zoom level.
[ "Gets", "an", "instance", "of", "an", "empty", "tile", "for", "the", "given", "tile", "position", "and", "zoom", "on", "the", "world", "map", "." ]
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/viewer/empty/EmptyTileFactory.java#L67-L85
samskivert/pythagoras
src/main/java/pythagoras/d/Crossing.java
Crossing.solveQuad
public static int solveQuad (double[] eqn, double[] res) { """ Solves quadratic equation @param eqn the coefficients of the equation @param res the roots of the equation @return a number of roots """ double a = eqn[2]; double b = eqn[1]; double c = eqn[0]; int rc = 0; ...
java
public static int solveQuad (double[] eqn, double[] res) { double a = eqn[2]; double b = eqn[1]; double c = eqn[0]; int rc = 0; if (a == 0f) { if (b == 0f) { return -1; } res[rc++] = -c / b; } else { double d...
[ "public", "static", "int", "solveQuad", "(", "double", "[", "]", "eqn", ",", "double", "[", "]", "res", ")", "{", "double", "a", "=", "eqn", "[", "2", "]", ";", "double", "b", "=", "eqn", "[", "1", "]", ";", "double", "c", "=", "eqn", "[", "0...
Solves quadratic equation @param eqn the coefficients of the equation @param res the roots of the equation @return a number of roots
[ "Solves", "quadratic", "equation" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Crossing.java#L25-L49
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainInformation.java
DomainInformation.getDomainObjectTypes
public List<DomainObjectType> getDomainObjectTypes() { """ answer a list of DomainObjectTypes stored in the domain graph @return a list of DomainObjectTypes """ List<DomainObjectType> resultList = new ArrayList<DomainObjectType>(); GrNode infoNode = loadDomainInfoNode(); GrProperty prop = infoNode.ge...
java
public List<DomainObjectType> getDomainObjectTypes() { List<DomainObjectType> resultList = new ArrayList<DomainObjectType>(); GrNode infoNode = loadDomainInfoNode(); GrProperty prop = infoNode.getProperty(DomainInfoLabel2ClassProperty); if (prop != null) { @SuppressWarnings("unchecked") List<String>...
[ "public", "List", "<", "DomainObjectType", ">", "getDomainObjectTypes", "(", ")", "{", "List", "<", "DomainObjectType", ">", "resultList", "=", "new", "ArrayList", "<", "DomainObjectType", ">", "(", ")", ";", "GrNode", "infoNode", "=", "loadDomainInfoNode", "(",...
answer a list of DomainObjectTypes stored in the domain graph @return a list of DomainObjectTypes
[ "answer", "a", "list", "of", "DomainObjectTypes", "stored", "in", "the", "domain", "graph" ]
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainInformation.java#L87-L100