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
js-lib-com/dom
src/main/java/js/dom/w3c/DocumentBuilderImpl.java
DocumentBuilderImpl.getDocumentBuilder
private static javax.xml.parsers.DocumentBuilder getDocumentBuilder(Schema schema, boolean useNamespace) throws ParserConfigurationException { """ Get XML document builder. @param schema XML schema, @param useNamespace flag to use name space. @return XML document builder. @throws ParserConfigurationException...
java
private static javax.xml.parsers.DocumentBuilder getDocumentBuilder(Schema schema, boolean useNamespace) throws ParserConfigurationException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setIgnoringComments(true); dbf.setIgnoringElementContentWhitespace(true); dbf.setCoalescing(tr...
[ "private", "static", "javax", ".", "xml", ".", "parsers", ".", "DocumentBuilder", "getDocumentBuilder", "(", "Schema", "schema", ",", "boolean", "useNamespace", ")", "throws", "ParserConfigurationException", "{", "DocumentBuilderFactory", "dbf", "=", "DocumentBuilderFac...
Get XML document builder. @param schema XML schema, @param useNamespace flag to use name space. @return XML document builder. @throws ParserConfigurationException if document builder factory feature set fail.
[ "Get", "XML", "document", "builder", "." ]
train
https://github.com/js-lib-com/dom/blob/8c7cd7c802977f210674dec7c2a8f61e8de05b63/src/main/java/js/dom/w3c/DocumentBuilderImpl.java#L453-L486
FXMisc/Flowless
src/main/java/org/fxmisc/flowless/CellListManager.java
CellListManager.cropTo
public void cropTo(int fromItem, int toItem) { """ Updates the list of cells to display @param fromItem the index of the first item to display @param toItem the index of the last item to display """ fromItem = Math.max(fromItem, 0); toItem = Math.min(toItem, cells.size()); cells.for...
java
public void cropTo(int fromItem, int toItem) { fromItem = Math.max(fromItem, 0); toItem = Math.min(toItem, cells.size()); cells.forget(0, fromItem); cells.forget(toItem, cells.size()); }
[ "public", "void", "cropTo", "(", "int", "fromItem", ",", "int", "toItem", ")", "{", "fromItem", "=", "Math", ".", "max", "(", "fromItem", ",", "0", ")", ";", "toItem", "=", "Math", ".", "min", "(", "toItem", ",", "cells", ".", "size", "(", ")", "...
Updates the list of cells to display @param fromItem the index of the first item to display @param toItem the index of the last item to display
[ "Updates", "the", "list", "of", "cells", "to", "display" ]
train
https://github.com/FXMisc/Flowless/blob/dce2269ebafed8f79203d00085af41f06f3083bc/src/main/java/org/fxmisc/flowless/CellListManager.java#L82-L87
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/FileUtils.java
FileUtils.toHashMap
public static Map<String, List<String>> toHashMap(final String aFilePath) throws FileNotFoundException { """ Returns a Map representation of the supplied directory's structure. The map contains the file name as the key and its path as the value. If a file with a name occurs more than once, multiple path values ar...
java
public static Map<String, List<String>> toHashMap(final String aFilePath) throws FileNotFoundException { return toHashMap(aFilePath, null, (String[]) null); }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "toHashMap", "(", "final", "String", "aFilePath", ")", "throws", "FileNotFoundException", "{", "return", "toHashMap", "(", "aFilePath", ",", "null", ",", "(", "String", "[", "]...
Returns a Map representation of the supplied directory's structure. The map contains the file name as the key and its path as the value. If a file with a name occurs more than once, multiple path values are returned for that file name key. The map that is returned is unmodifiable. @param aFilePath The directory of whi...
[ "Returns", "a", "Map", "representation", "of", "the", "supplied", "directory", "s", "structure", ".", "The", "map", "contains", "the", "file", "name", "as", "the", "key", "and", "its", "path", "as", "the", "value", ".", "If", "a", "file", "with", "a", ...
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/FileUtils.java#L183-L185
line/armeria
grpc-protocol/src/main/java/com/linecorp/armeria/common/grpc/protocol/ArmeriaMessageFramer.java
ArmeriaMessageFramer.writePayload
public ByteBufHttpData writePayload(ByteBuf message) { """ Writes out a payload message. @param message the message to be written out. Ownership is taken by {@link ArmeriaMessageFramer}. @return a {@link ByteBufHttpData} with the framed payload. Ownership is passed to caller. """ verifyNotClosed(...
java
public ByteBufHttpData writePayload(ByteBuf message) { verifyNotClosed(); final boolean compressed = messageCompression && compressor != null; final int messageLength = message.readableBytes(); try { final ByteBuf buf; if (messageLength != 0 && compressed) { ...
[ "public", "ByteBufHttpData", "writePayload", "(", "ByteBuf", "message", ")", "{", "verifyNotClosed", "(", ")", ";", "final", "boolean", "compressed", "=", "messageCompression", "&&", "compressor", "!=", "null", ";", "final", "int", "messageLength", "=", "message",...
Writes out a payload message. @param message the message to be written out. Ownership is taken by {@link ArmeriaMessageFramer}. @return a {@link ByteBufHttpData} with the framed payload. Ownership is passed to caller.
[ "Writes", "out", "a", "payload", "message", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc-protocol/src/main/java/com/linecorp/armeria/common/grpc/protocol/ArmeriaMessageFramer.java#L105-L124
aerogear/aerogear-unifiedpush-server
jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java
InstallationRegistrationEndpoint.crossOriginForInstallations
@OPTIONS public Response crossOriginForInstallations(@Context HttpHeaders headers) { """ Cross Origin for Installations @param headers "Origin" header @return "Access-Control-Allow-Origin" header for your response @responseheader Access-Control-Allow-Origin With host in your "Origin" hea...
java
@OPTIONS public Response crossOriginForInstallations(@Context HttpHeaders headers) { return appendPreflightResponseHeaders(headers, Response.ok()).build(); }
[ "@", "OPTIONS", "public", "Response", "crossOriginForInstallations", "(", "@", "Context", "HttpHeaders", "headers", ")", "{", "return", "appendPreflightResponseHeaders", "(", "headers", ",", "Response", ".", "ok", "(", ")", ")", ".", "build", "(", ")", ";", "}...
Cross Origin for Installations @param headers "Origin" header @return "Access-Control-Allow-Origin" header for your response @responseheader Access-Control-Allow-Origin With host in your "Origin" header @responseheader Access-Control-Allow-Methods POST, DELETE @responseheader Access-Control-Allow-...
[ "Cross", "Origin", "for", "Installations" ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L105-L109
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/NearCachedClientCacheProxy.java
NearCachedClientCacheProxy.tryPublishReserved
private Object tryPublishReserved(Object key, Object remoteValue, long reservationId, boolean deserialize) { """ Publishes value got from remote or deletes reserved record when remote value is {@code null}. @param key key to update in Near Cache @param remoteValue fetched value from server @param ...
java
private Object tryPublishReserved(Object key, Object remoteValue, long reservationId, boolean deserialize) { assert remoteValue != NOT_CACHED; // caching null value is not supported for ICache Near Cache if (remoteValue == null) { // needed to delete reserved record inva...
[ "private", "Object", "tryPublishReserved", "(", "Object", "key", ",", "Object", "remoteValue", ",", "long", "reservationId", ",", "boolean", "deserialize", ")", "{", "assert", "remoteValue", "!=", "NOT_CACHED", ";", "// caching null value is not supported for ICache Near ...
Publishes value got from remote or deletes reserved record when remote value is {@code null}. @param key key to update in Near Cache @param remoteValue fetched value from server @param reservationId reservation ID for this key @param deserialize deserialize returned value @return last known value for the...
[ "Publishes", "value", "got", "from", "remote", "or", "deletes", "reserved", "record", "when", "remote", "value", "is", "{", "@code", "null", "}", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/NearCachedClientCacheProxy.java#L539-L554
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java
SchemaTool.getSchemaStringsFromJar
private List<String> getSchemaStringsFromJar(String jarPath, String directoryPath) { """ Gets the list of HBase Common Avro schema strings from a directory in the Jar. It recursively searches the directory in the jar to find files that end in .avsc to locate thos strings. @param jarPath The path to the...
java
private List<String> getSchemaStringsFromJar(String jarPath, String directoryPath) { LOG.info("Getting schema strings in: " + directoryPath + ", from jar: " + jarPath); JarFile jar; try { jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8")); } catch (UnsupportedEncodingException e)...
[ "private", "List", "<", "String", ">", "getSchemaStringsFromJar", "(", "String", "jarPath", ",", "String", "directoryPath", ")", "{", "LOG", ".", "info", "(", "\"Getting schema strings in: \"", "+", "directoryPath", "+", "\", from jar: \"", "+", "jarPath", ")", ";...
Gets the list of HBase Common Avro schema strings from a directory in the Jar. It recursively searches the directory in the jar to find files that end in .avsc to locate thos strings. @param jarPath The path to the jar to search @param directoryPath The directory in the jar to find avro schema strings @return The list...
[ "Gets", "the", "list", "of", "HBase", "Common", "Avro", "schema", "strings", "from", "a", "directory", "in", "the", "Jar", ".", "It", "recursively", "searches", "the", "directory", "in", "the", "jar", "to", "find", "files", "that", "end", "in", ".", "avs...
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L497-L527
nmdp-bioinformatics/ngs
range/src/main/java/org/nmdp/ngs/range/Ranges.java
Ranges.isLessThan
public static <C extends Comparable> boolean isLessThan(final Range<C> range, final C value) { """ Return true if the specified range is strictly less than the specified value. @param <C> range endpoint type @param range range, must not be null @param value value, must not be null @return true if the specifi...
java
public static <C extends Comparable> boolean isLessThan(final Range<C> range, final C value) { checkNotNull(range); checkNotNull(value); if (!range.hasUpperBound()) { return false; } if (range.upperBoundType() == BoundType.OPEN && range.upperEndpoint().equals(value))...
[ "public", "static", "<", "C", "extends", "Comparable", ">", "boolean", "isLessThan", "(", "final", "Range", "<", "C", ">", "range", ",", "final", "C", "value", ")", "{", "checkNotNull", "(", "range", ")", ";", "checkNotNull", "(", "value", ")", ";", "i...
Return true if the specified range is strictly less than the specified value. @param <C> range endpoint type @param range range, must not be null @param value value, must not be null @return true if the specified range is strictly less than the specified value
[ "Return", "true", "if", "the", "specified", "range", "is", "strictly", "less", "than", "the", "specified", "value", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/Ranges.java#L110-L121
kiswanij/jk-util
src/main/java/com/jk/util/JKObjectUtil.java
JKObjectUtil.setPeopertyValue
public static void setPeopertyValue(final Object target, final String fieldName, Object value) { """ Sets the peoperty value. @param target the source @param fieldName the field name @param value the value """ JK.logger.trace("setPeopertyValue On class({}) on field ({}) with value ({})", target,...
java
public static void setPeopertyValue(final Object target, final String fieldName, Object value) { JK.logger.trace("setPeopertyValue On class({}) on field ({}) with value ({})", target, fieldName, value); try { if (value != null) { Field field = getFieldByName(target.getClass(), fieldName); if (field....
[ "public", "static", "void", "setPeopertyValue", "(", "final", "Object", "target", ",", "final", "String", "fieldName", ",", "Object", "value", ")", "{", "JK", ".", "logger", ".", "trace", "(", "\"setPeopertyValue On class({}) on field ({}) with value ({})\"", ",", "...
Sets the peoperty value. @param target the source @param fieldName the field name @param value the value
[ "Sets", "the", "peoperty", "value", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKObjectUtil.java#L259-L275
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/GenericSorting.java
GenericSorting.mergeSort
public static void mergeSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { """ Sorts the specified range of elements according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(a, ...
java
public static void mergeSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { /* We retain the same method signature as quickSort. Given only a comparator and swapper we do not know how to copy and move elements from/to temporary arrays. Hence, in contrast to the JDK mergesorts this is an "in-...
[ "public", "static", "void", "mergeSort", "(", "int", "fromIndex", ",", "int", "toIndex", ",", "IntComparator", "c", ",", "Swapper", "swapper", ")", "{", "/*\r\n\t\tWe retain the same method signature as quickSort.\r\n\t\tGiven only a comparator and swapper we do not know how to c...
Sorts the specified range of elements according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(a, b)</tt> must not throw an exception for any indexes <tt>a</tt> and <tt>b</tt> in the range).<p> This sor...
[ "Sorts", "the", "specified", "range", "of", "elements", "according", "to", "the", "order", "induced", "by", "the", "specified", "comparator", ".", "All", "elements", "in", "the", "range", "must", "be", "<i", ">", "mutually", "comparable<", "/", "i", ">", "...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/GenericSorting.java#L270-L300
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java
ActionUtil.addAction
public static ActionListener addAction(BaseComponent component, IAction action) { """ Adds/removes an action listener to/from a component using the default click trigger event. @param component Component to be associated with the action. @param action Action to invoke when listener event is triggered. If null,...
java
public static ActionListener addAction(BaseComponent component, IAction action) { return addAction(component, action, ClickEvent.TYPE); }
[ "public", "static", "ActionListener", "addAction", "(", "BaseComponent", "component", ",", "IAction", "action", ")", "{", "return", "addAction", "(", "component", ",", "action", ",", "ClickEvent", ".", "TYPE", ")", ";", "}" ]
Adds/removes an action listener to/from a component using the default click trigger event. @param component Component to be associated with the action. @param action Action to invoke when listener event is triggered. If null, dissociates the event listener from the component. @return The newly created action listener.
[ "Adds", "/", "removes", "an", "action", "listener", "to", "/", "from", "a", "component", "using", "the", "default", "click", "trigger", "event", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java#L84-L86
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java
SchemaRepositoryParser.registerJsonSchemaRepository
private void registerJsonSchemaRepository(Element element, ParserContext parserContext) { """ Registers a JsonSchemaRepository definition in the parser context @param element The element to be converted into a JsonSchemaRepository definition @param parserContext The parser context to add the definitions to "...
java
private void registerJsonSchemaRepository(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JsonSchemaRepository.class); addLocationsToBuilder(element, builder); parseSchemasElement(element, builder, parserContext); ...
[ "private", "void", "registerJsonSchemaRepository", "(", "Element", "element", ",", "ParserContext", "parserContext", ")", "{", "BeanDefinitionBuilder", "builder", "=", "BeanDefinitionBuilder", ".", "genericBeanDefinition", "(", "JsonSchemaRepository", ".", "class", ")", "...
Registers a JsonSchemaRepository definition in the parser context @param element The element to be converted into a JsonSchemaRepository definition @param parserContext The parser context to add the definitions to
[ "Registers", "a", "JsonSchemaRepository", "definition", "in", "the", "parser", "context" ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L69-L74
amaembo/streamex
src/main/java/one/util/streamex/MoreCollectors.java
MoreCollectors.maxAll
public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) { """ Returns a {@code Collector} which finds all the elements which are equal to each other and bigger than any other element according to the specified {@link Comparator}. The found elements are collected to {@link List}. @...
java
public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) { return maxAll(comparator, Collectors.toList()); }
[ "public", "static", "<", "T", ">", "Collector", "<", "T", ",", "?", ",", "List", "<", "T", ">", ">", "maxAll", "(", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "return", "maxAll", "(", "comparator", ",", "Collectors", ".", "t...
Returns a {@code Collector} which finds all the elements which are equal to each other and bigger than any other element according to the specified {@link Comparator}. The found elements are collected to {@link List}. @param <T> the type of the input elements @param comparator a {@code Comparator} to compare the eleme...
[ "Returns", "a", "{", "@code", "Collector", "}", "which", "finds", "all", "the", "elements", "which", "are", "equal", "to", "each", "other", "and", "bigger", "than", "any", "other", "element", "according", "to", "the", "specified", "{", "@link", "Comparator",...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/MoreCollectors.java#L381-L383
groovyfx-project/groovyfx
src/main/groovy/groovyx/javafx/beans/FXBindableASTTransformation.java
FXBindableASTTransformation.visit
@Override public void visit(ASTNode[] nodes, SourceUnit sourceUnit) { """ This ASTTransformation method is called when the compiler encounters our annotation. @param nodes An array of nodes. Index 0 is the annotation that triggered the call, index 1 is the annotated node. @param sourceUnit The Sourc...
java
@Override public void visit(ASTNode[] nodes, SourceUnit sourceUnit) { if (!(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) { throw new IllegalArgumentException("Internal error: wrong types: " + nodes[0].getClass().getName() + " / " + nodes[1].getClas...
[ "@", "Override", "public", "void", "visit", "(", "ASTNode", "[", "]", "nodes", ",", "SourceUnit", "sourceUnit", ")", "{", "if", "(", "!", "(", "nodes", "[", "0", "]", "instanceof", "AnnotationNode", ")", "||", "!", "(", "nodes", "[", "1", "]", "insta...
This ASTTransformation method is called when the compiler encounters our annotation. @param nodes An array of nodes. Index 0 is the annotation that triggered the call, index 1 is the annotated node. @param sourceUnit The SourceUnit describing the source code in which the annotation was placed.
[ "This", "ASTTransformation", "method", "is", "called", "when", "the", "compiler", "encounters", "our", "annotation", "." ]
train
https://github.com/groovyfx-project/groovyfx/blob/7067d76793601ce4de9c642d4c0c0e11db7907cb/src/main/groovy/groovyx/javafx/beans/FXBindableASTTransformation.java#L178-L199
apache/spark
launcher/src/main/java/org/apache/spark/launcher/CommandBuilderUtils.java
CommandBuilderUtils.mergeEnvPathList
static void mergeEnvPathList(Map<String, String> userEnv, String envKey, String pathList) { """ Updates the user environment, appending the given pathList to the existing value of the given environment variable (or setting it if it hasn't yet been set). """ if (!isEmpty(pathList)) { String current =...
java
static void mergeEnvPathList(Map<String, String> userEnv, String envKey, String pathList) { if (!isEmpty(pathList)) { String current = firstNonEmpty(userEnv.get(envKey), System.getenv(envKey)); userEnv.put(envKey, join(File.pathSeparator, current, pathList)); } }
[ "static", "void", "mergeEnvPathList", "(", "Map", "<", "String", ",", "String", ">", "userEnv", ",", "String", "envKey", ",", "String", "pathList", ")", "{", "if", "(", "!", "isEmpty", "(", "pathList", ")", ")", "{", "String", "current", "=", "firstNonEm...
Updates the user environment, appending the given pathList to the existing value of the given environment variable (or setting it if it hasn't yet been set).
[ "Updates", "the", "user", "environment", "appending", "the", "given", "pathList", "to", "the", "existing", "value", "of", "the", "given", "environment", "variable", "(", "or", "setting", "it", "if", "it", "hasn", "t", "yet", "been", "set", ")", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/CommandBuilderUtils.java#L114-L119
mlhartme/jasmin
src/main/java/net/oneandone/jasmin/model/Engine.java
Engine.request
public int request(String path, HttpServletResponse response, boolean gzip) throws IOException { """ Output is prepared in-memory before the response is written because a) that's the common case where output is cached. If output is to big for this, that whole caching doesn't work b) I send sent proper error page...
java
public int request(String path, HttpServletResponse response, boolean gzip) throws IOException { Content content; byte[] bytes; try { content = doRequest(path); } catch (IOException e) { Servlet.LOG.error("request failed: " + e.getMessage(), e); respo...
[ "public", "int", "request", "(", "String", "path", ",", "HttpServletResponse", "response", ",", "boolean", "gzip", ")", "throws", "IOException", "{", "Content", "content", ";", "byte", "[", "]", "bytes", ";", "try", "{", "content", "=", "doRequest", "(", "...
Output is prepared in-memory before the response is written because a) that's the common case where output is cached. If output is to big for this, that whole caching doesn't work b) I send sent proper error pages c) I can return the number of bytes actually written @return bytes written or -1 if building the module co...
[ "Output", "is", "prepared", "in", "-", "memory", "before", "the", "response", "is", "written", "because", "a", ")", "that", "s", "the", "common", "case", "where", "output", "is", "cached", ".", "If", "output", "is", "to", "big", "for", "this", "that", ...
train
https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/model/Engine.java#L88-L122
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
CertificateOperations.cancelDeleteCertificate
public void cancelDeleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException { """ Cancels a failed deletion of the specified certificate. This operation can be performed only when the certificate is in the {@link com.microsoft.azure.batch.protocol.models.CertificateS...
java
public void cancelDeleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException { cancelDeleteCertificate(thumbprintAlgorithm, thumbprint, null); }
[ "public", "void", "cancelDeleteCertificate", "(", "String", "thumbprintAlgorithm", ",", "String", "thumbprint", ")", "throws", "BatchErrorException", ",", "IOException", "{", "cancelDeleteCertificate", "(", "thumbprintAlgorithm", ",", "thumbprint", ",", "null", ")", ";"...
Cancels a failed deletion of the specified certificate. This operation can be performed only when the certificate is in the {@link com.microsoft.azure.batch.protocol.models.CertificateState#DELETE_FAILED Delete Failed} state, and restores the certificate to the {@link com.microsoft.azure.batch.protocol.models.Certifica...
[ "Cancels", "a", "failed", "deletion", "of", "the", "specified", "certificate", ".", "This", "operation", "can", "be", "performed", "only", "when", "the", "certificate", "is", "in", "the", "{", "@link", "com", ".", "microsoft", ".", "azure", ".", "batch", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java#L165-L167
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/helpers/DateHelper.java
DateHelper.getUTC
public static String getUTC(long time) { """ Gets the UTC date and time in 'yyyy-MM-dd'T'HH:mm:ss.SSS'Z'' format. @return UTC date and time. """ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); ...
java
public static String getUTC(long time) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); return sdf.format(time); }
[ "public", "static", "String", "getUTC", "(", "long", "time", ")", "{", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"", ",", "Locale", ".", "ENGLISH", ")", ";", "sdf", ".", "setTimeZone", "(", "TimeZone", ".", ...
Gets the UTC date and time in 'yyyy-MM-dd'T'HH:mm:ss.SSS'Z'' format. @return UTC date and time.
[ "Gets", "the", "UTC", "date", "and", "time", "in", "yyyy", "-", "MM", "-", "dd", "T", "HH", ":", "mm", ":", "ss", ".", "SSS", "Z", "format", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/helpers/DateHelper.java#L85-L89
phax/ph-pdf-layout
src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java
PDPageContentStreamExt.curveTo2
public void curveTo2 (final float x2, final float y2, final float x3, final float y3) throws IOException { """ Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points. @param x2 x coordi...
java
public void curveTo2 (final float x2, final float y2, final float x3, final float y3) throws IOException { if (inTextMode) { throw new IllegalStateException ("Error: curveTo2 is not allowed within a text block."); } writeOperand (x2); writeOperand (y2); writeOperand (x3); writeOperan...
[ "public", "void", "curveTo2", "(", "final", "float", "x2", ",", "final", "float", "y2", ",", "final", "float", "x3", ",", "final", "float", "y3", ")", "throws", "IOException", "{", "if", "(", "inTextMode", ")", "{", "throw", "new", "IllegalStateException",...
Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points. @param x2 x coordinate of the point 2 @param y2 y coordinate of the point 2 @param x3 x coordinate of the point 3 @param y3 y coordinate of...
[ "Append", "a", "cubic", "Bézier", "curve", "to", "the", "current", "path", ".", "The", "curve", "extends", "from", "the", "current", "point", "to", "the", "point", "(", "x3", "y3", ")", "using", "the", "current", "point", "and", "(", "x2", "y2", ")", ...
train
https://github.com/phax/ph-pdf-layout/blob/777d9f3a131cbe8f592c0de1cf554084e541bb54/src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java#L1166-L1177
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/TableJson.java
TableJson.newMoveRestart
Delta newMoveRestart(Storage src, Storage dest) { """ Start a move to an existing mirror that may or may not have once been primary. """ // If the destination used to be the initial primary for the group, it's consistent and ready to promote // but lacking the MIRROR_CONSISTENT marker attribute...
java
Delta newMoveRestart(Storage src, Storage dest) { // If the destination used to be the initial primary for the group, it's consistent and ready to promote // but lacking the MIRROR_CONSISTENT marker attribute which is the prereq for promotion. Add one. Delta consistentMarker = dest.isConsistent...
[ "Delta", "newMoveRestart", "(", "Storage", "src", ",", "Storage", "dest", ")", "{", "// If the destination used to be the initial primary for the group, it's consistent and ready to promote", "// but lacking the MIRROR_CONSISTENT marker attribute which is the prereq for promotion. Add one.", ...
Start a move to an existing mirror that may or may not have once been primary.
[ "Start", "a", "move", "to", "an", "existing", "mirror", "that", "may", "or", "may", "not", "have", "once", "been", "primary", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/TableJson.java#L268-L290
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/WaveData.java
WaveData.convertAudioBytes
private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data) { """ Convert the audio bytes into the stream @param audio_bytes The audio byts @param two_bytes_data True if we using double byte data @return The byte bufer of data """ ByteBuffer dest = ByteBuffer.allocateDirect(...
java
private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data) { ByteBuffer dest = ByteBuffer.allocateDirect(audio_bytes.length); dest.order(ByteOrder.nativeOrder()); ByteBuffer src = ByteBuffer.wrap(audio_bytes); src.order(ByteOrder.LITTLE_ENDIAN); if (two_bytes_data) { Shor...
[ "private", "static", "ByteBuffer", "convertAudioBytes", "(", "byte", "[", "]", "audio_bytes", ",", "boolean", "two_bytes_data", ")", "{", "ByteBuffer", "dest", "=", "ByteBuffer", ".", "allocateDirect", "(", "audio_bytes", ".", "length", ")", ";", "dest", ".", ...
Convert the audio bytes into the stream @param audio_bytes The audio byts @param two_bytes_data True if we using double byte data @return The byte bufer of data
[ "Convert", "the", "audio", "bytes", "into", "the", "stream" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/WaveData.java#L248-L264
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/Zips.java
Zips.process
public void process() { """ Iterates through source Zip entries removing or changing them according to set parameters. """ if (src == null && dest == null) { throw new IllegalArgumentException("Source and destination shouldn't be null together"); } File destinationFile = null; try { ...
java
public void process() { if (src == null && dest == null) { throw new IllegalArgumentException("Source and destination shouldn't be null together"); } File destinationFile = null; try { destinationFile = getDestinationFile(); ZipOutputStream out = null; ZipEntryOrInfoAdapter zipE...
[ "public", "void", "process", "(", ")", "{", "if", "(", "src", "==", "null", "&&", "dest", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Source and destination shouldn't be null together\"", ")", ";", "}", "File", "destinationFile", ...
Iterates through source Zip entries removing or changing them according to set parameters.
[ "Iterates", "through", "source", "Zip", "entries", "removing", "or", "changing", "them", "according", "to", "set", "parameters", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/Zips.java#L345-L380
integration-technology/amazon-mws-orders
src/main/java/com/amazonservices/mws/client/MwsUtl.java
MwsUtl.urlEncode
protected static String urlEncode(String value, boolean path) { """ URL encode a value. @param value @param path true if is a path and '/' should not be encoded. @return The encoded string. """ try { value = URLEncoder.encode(value, DEFAULT_ENCODING); } catch (Exception e)...
java
protected static String urlEncode(String value, boolean path) { try { value = URLEncoder.encode(value, DEFAULT_ENCODING); } catch (Exception e) { throw wrap(e); } value = replaceAll(value, plusPtn, "%20"); value = replaceAll(value, asteriskPtn, "%2A"); ...
[ "protected", "static", "String", "urlEncode", "(", "String", "value", ",", "boolean", "path", ")", "{", "try", "{", "value", "=", "URLEncoder", ".", "encode", "(", "value", ",", "DEFAULT_ENCODING", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{",...
URL encode a value. @param value @param path true if is a path and '/' should not be encoded. @return The encoded string.
[ "URL", "encode", "a", "value", "." ]
train
https://github.com/integration-technology/amazon-mws-orders/blob/042e8cd5b10588a30150222bf9c91faf4f130b3c/src/main/java/com/amazonservices/mws/client/MwsUtl.java#L282-L295
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java
Log.initWriters
private static Map<WriterKind, PrintWriter> initWriters(Context context) { """ Initialize a map of writers based on values found in the context @param context the context in which to find writers to use @return a map of writers """ PrintWriter out = context.get(outKey); PrintWriter err = cont...
java
private static Map<WriterKind, PrintWriter> initWriters(Context context) { PrintWriter out = context.get(outKey); PrintWriter err = context.get(errKey); if (out == null && err == null) { out = new PrintWriter(System.out, true); err = new PrintWriter(System.err, true); ...
[ "private", "static", "Map", "<", "WriterKind", ",", "PrintWriter", ">", "initWriters", "(", "Context", "context", ")", "{", "PrintWriter", "out", "=", "context", ".", "get", "(", "outKey", ")", ";", "PrintWriter", "err", "=", "context", ".", "get", "(", ...
Initialize a map of writers based on values found in the context @param context the context in which to find writers to use @return a map of writers
[ "Initialize", "a", "map", "of", "writers", "based", "on", "values", "found", "in", "the", "context" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java#L262-L275
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java
WaveformDetailComponent.drawCueList
private void drawCueList(Graphics g, Rectangle clipRect, CueList cueList, int axis, int maxHeight) { """ Draw the visible memory cue points or hot cues. @param g the graphics object in which we are being rendered @param clipRect the region that is being currently rendered @param cueList the cues to be drawn ...
java
private void drawCueList(Graphics g, Rectangle clipRect, CueList cueList, int axis, int maxHeight) { for (CueList.Entry entry : cueList.entries) { final int x = millisecondsToX(entry.cueTime); if ((x > clipRect.x - 4) && (x < clipRect.x + clipRect.width + 4)) { g.setColor...
[ "private", "void", "drawCueList", "(", "Graphics", "g", ",", "Rectangle", "clipRect", ",", "CueList", "cueList", ",", "int", "axis", ",", "int", "maxHeight", ")", "{", "for", "(", "CueList", ".", "Entry", "entry", ":", "cueList", ".", "entries", ")", "{"...
Draw the visible memory cue points or hot cues. @param g the graphics object in which we are being rendered @param clipRect the region that is being currently rendered @param cueList the cues to be drawn @param axis the base on which the waveform is being drawn @param maxHeight the highest waveform segment
[ "Draw", "the", "visible", "memory", "cue", "points", "or", "hot", "cues", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java#L798-L809
sstrickx/yahoofinance-api
src/main/java/yahoofinance/Stock.java
Stock.getHistory
public List<HistoricalQuote> getHistory(Calendar from, Calendar to, Interval interval) throws IOException { """ Requests the historical quotes for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value <li> interval: specified value </ul> @param from ...
java
public List<HistoricalQuote> getHistory(Calendar from, Calendar to, Interval interval) throws IOException { if(YahooFinance.HISTQUOTES2_ENABLED.equalsIgnoreCase("true")) { HistQuotes2Request hist = new HistQuotes2Request(this.symbol, from, to, interval); this.setHistory(hist.getResult())...
[ "public", "List", "<", "HistoricalQuote", ">", "getHistory", "(", "Calendar", "from", ",", "Calendar", "to", ",", "Interval", "interval", ")", "throws", "IOException", "{", "if", "(", "YahooFinance", ".", "HISTQUOTES2_ENABLED", ".", "equalsIgnoreCase", "(", "\"t...
Requests the historical quotes for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value <li> interval: specified value </ul> @param from start date of the historical data @param to end date of the historical data @param interval the interval o...
[ "Requests", "the", "historical", "quotes", "for", "this", "stock", "with", "the", "following", "characteristics", ".", "<ul", ">", "<li", ">", "from", ":", "specified", "value", "<li", ">", "to", ":", "specified", "value", "<li", ">", "interval", ":", "spe...
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/Stock.java#L324-L333
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java
JspFunctions.buildQueryParamsMapForSortExpression
public static Map buildQueryParamsMapForSortExpression(DataGridURLBuilder urlBuilder, String sortExpression) { """ <p> Utility method used to build a query parameter map which includes the list of parameters needed to change the direction of a sort related to the given sort expression. This method uses a {@link...
java
public static Map buildQueryParamsMapForSortExpression(DataGridURLBuilder urlBuilder, String sortExpression) { if(urlBuilder == null || sortExpression == null) return null; return urlBuilder.buildSortQueryParamsMap(sortExpression); }
[ "public", "static", "Map", "buildQueryParamsMapForSortExpression", "(", "DataGridURLBuilder", "urlBuilder", ",", "String", "sortExpression", ")", "{", "if", "(", "urlBuilder", "==", "null", "||", "sortExpression", "==", "null", ")", "return", "null", ";", "return", ...
<p> Utility method used to build a query parameter map which includes the list of parameters needed to change the direction of a sort related to the given sort expression. This method uses a {@link DataGridURLBuilder} instance to call its {@link DataGridURLBuilder#buildSortQueryParamsMap(String)} method from JSP EL. <...
[ "<p", ">", "Utility", "method", "used", "to", "build", "a", "query", "parameter", "map", "which", "includes", "the", "list", "of", "parameters", "needed", "to", "change", "the", "direction", "of", "a", "sort", "related", "to", "the", "given", "sort", "expr...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java#L99-L104
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/DefaultJobProgressStep.java
DefaultJobProgressStep.nextStep
public DefaultJobProgressStep nextStep(Message stepMessage, Object newStepSource) { """ Move to next child step. @param stepMessage the message associated to the step @param newStepSource who asked to create this new step @return the new step """ assertModifiable(); // Close current step ...
java
public DefaultJobProgressStep nextStep(Message stepMessage, Object newStepSource) { assertModifiable(); // Close current step and move to the end finishStep(); // Add new step return addStep(stepMessage, newStepSource); }
[ "public", "DefaultJobProgressStep", "nextStep", "(", "Message", "stepMessage", ",", "Object", "newStepSource", ")", "{", "assertModifiable", "(", ")", ";", "// Close current step and move to the end", "finishStep", "(", ")", ";", "// Add new step", "return", "addStep", ...
Move to next child step. @param stepMessage the message associated to the step @param newStepSource who asked to create this new step @return the new step
[ "Move", "to", "next", "child", "step", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/DefaultJobProgressStep.java#L239-L248
nmdp-bioinformatics/ngs
sra/src/main/java/org/nmdp/ngs/sra/SraReader.java
SraReader.readAnalysis
public static Analysis readAnalysis(final Reader reader) throws IOException { """ Read an analysis from the specified reader. @param reader reader, must not be null @return an analysis read from the specified reader @throws IOException if an I/O error occurs """ checkNotNull(reader); try {...
java
public static Analysis readAnalysis(final Reader reader) throws IOException { checkNotNull(reader); try { JAXBContext context = JAXBContext.newInstance(Analysis.class); Unmarshaller unmarshaller = context.createUnmarshaller(); SchemaFactory schemaFactory = SchemaFacto...
[ "public", "static", "Analysis", "readAnalysis", "(", "final", "Reader", "reader", ")", "throws", "IOException", "{", "checkNotNull", "(", "reader", ")", ";", "try", "{", "JAXBContext", "context", "=", "JAXBContext", ".", "newInstance", "(", "Analysis", ".", "c...
Read an analysis from the specified reader. @param reader reader, must not be null @return an analysis read from the specified reader @throws IOException if an I/O error occurs
[ "Read", "an", "analysis", "from", "the", "specified", "reader", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L73-L88
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
public static BitSet getAt(BitSet self, IntRange range) { """ Support retrieving a subset of a BitSet using a Range @param self a BitSet @param range a Range defining the desired subset @return a new BitSet that represents the requested subset @see java.util.BitSet @see groovy.lang.IntRange @since 1.5.0 ...
java
public static BitSet getAt(BitSet self, IntRange range) { RangeInfo info = subListBorders(self.length(), range); BitSet result = new BitSet(); int numberOfBits = info.to - info.from; int adjuster = 1; int offset = info.from; if (info.reverse) { adjuster = -1...
[ "public", "static", "BitSet", "getAt", "(", "BitSet", "self", ",", "IntRange", "range", ")", "{", "RangeInfo", "info", "=", "subListBorders", "(", "self", ".", "length", "(", ")", ",", "range", ")", ";", "BitSet", "result", "=", "new", "BitSet", "(", "...
Support retrieving a subset of a BitSet using a Range @param self a BitSet @param range a Range defining the desired subset @return a new BitSet that represents the requested subset @see java.util.BitSet @see groovy.lang.IntRange @since 1.5.0
[ "Support", "retrieving", "a", "subset", "of", "a", "BitSet", "using", "a", "Range" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L14058-L14076
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
RelationalJMapper.addClasses
private void addClasses(Class<?>[] classes, HashSet<Class<?>> result) { """ Adds to the result parameter all classes that aren't present in it @param classes classes to control @param result List to enrich """ if(isNull(classes) || classes.length==0) Error.globalClassesAbsent(configuredClass); ...
java
private void addClasses(Class<?>[] classes, HashSet<Class<?>> result){ if(isNull(classes) || classes.length==0) Error.globalClassesAbsent(configuredClass); for (Class<?> classe : classes) result.add(classe); }
[ "private", "void", "addClasses", "(", "Class", "<", "?", ">", "[", "]", "classes", ",", "HashSet", "<", "Class", "<", "?", ">", ">", "result", ")", "{", "if", "(", "isNull", "(", "classes", ")", "||", "classes", ".", "length", "==", "0", ")", "Er...
Adds to the result parameter all classes that aren't present in it @param classes classes to control @param result List to enrich
[ "Adds", "to", "the", "result", "parameter", "all", "classes", "that", "aren", "t", "present", "in", "it" ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java#L291-L297
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java
HBaseSchemaManager.isNamespaceAvailable
private boolean isNamespaceAvailable(String databaseName) { """ Checks if is namespace available. @param databaseName the database name @return true, if is namespace available """ try { for (NamespaceDescriptor ns : admin.listNamespaceDescriptors()) { ...
java
private boolean isNamespaceAvailable(String databaseName) { try { for (NamespaceDescriptor ns : admin.listNamespaceDescriptors()) { if (ns.getName().equals(databaseName)) { return true; } } ...
[ "private", "boolean", "isNamespaceAvailable", "(", "String", "databaseName", ")", "{", "try", "{", "for", "(", "NamespaceDescriptor", "ns", ":", "admin", ".", "listNamespaceDescriptors", "(", ")", ")", "{", "if", "(", "ns", ".", "getName", "(", ")", ".", "...
Checks if is namespace available. @param databaseName the database name @return true, if is namespace available
[ "Checks", "if", "is", "namespace", "available", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java#L428-L446
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.setDateAttribute
public void setDateAttribute(String name, Date value) { """ Set attribute value of given type. @param name attribute name @param value attribute value """ Attribute attribute = getAttributes().get(name); if (!(attribute instanceof DateAttribute)) { throw new IllegalStateException("Cannot set date va...
java
public void setDateAttribute(String name, Date value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof DateAttribute)) { throw new IllegalStateException("Cannot set date value on attribute with different type, " + attribute.getClass().getName() + " setting value " + value); } ...
[ "public", "void", "setDateAttribute", "(", "String", "name", ",", "Date", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "DateAttribute", ")", ...
Set attribute value of given type. @param name attribute name @param value attribute value
[ "Set", "attribute", "value", "of", "given", "type", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java#L245-L252
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.registerJsonValueProcessor
public void registerJsonValueProcessor( Class beanClass, String key, JsonValueProcessor jsonValueProcessor ) { """ Registers a JsonValueProcessor.<br> [Java -&gt; JSON] @param beanClass the class to use as key @param key the property name to use as key @param jsonValueProcessor the processor to register ...
java
public void registerJsonValueProcessor( Class beanClass, String key, JsonValueProcessor jsonValueProcessor ) { if( beanClass != null && key != null && jsonValueProcessor != null ) { beanKeyMap.put( beanClass, key, jsonValueProcessor ); } }
[ "public", "void", "registerJsonValueProcessor", "(", "Class", "beanClass", ",", "String", "key", ",", "JsonValueProcessor", "jsonValueProcessor", ")", "{", "if", "(", "beanClass", "!=", "null", "&&", "key", "!=", "null", "&&", "jsonValueProcessor", "!=", "null", ...
Registers a JsonValueProcessor.<br> [Java -&gt; JSON] @param beanClass the class to use as key @param key the property name to use as key @param jsonValueProcessor the processor to register
[ "Registers", "a", "JsonValueProcessor", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L840-L844
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/internal/query/Helpers.java
Helpers.withKey
public static String withKey(String key, Selector selector) { """ <P> Returns the string form of the specified key mapping to a JSON object enclosing the selector. </P> <pre> {@code Selector selector = eq("year", 2017); System.out.println(selector.toString()); // Output: "year": {"$eq" : 2017} System.out.p...
java
public static String withKey(String key, Selector selector) { return String.format("\"%s\": %s", key, enclose(selector)); }
[ "public", "static", "String", "withKey", "(", "String", "key", ",", "Selector", "selector", ")", "{", "return", "String", ".", "format", "(", "\"\\\"%s\\\": %s\"", ",", "key", ",", "enclose", "(", "selector", ")", ")", ";", "}" ]
<P> Returns the string form of the specified key mapping to a JSON object enclosing the selector. </P> <pre> {@code Selector selector = eq("year", 2017); System.out.println(selector.toString()); // Output: "year": {"$eq" : 2017} System.out.println(SelectorUtils.withKey("selector", selector)); // Output: "selector": {"y...
[ "<P", ">", "Returns", "the", "string", "form", "of", "the", "specified", "key", "mapping", "to", "a", "JSON", "object", "enclosing", "the", "selector", ".", "<", "/", "P", ">", "<pre", ">", "{", "@code", "Selector", "selector", "=", "eq", "(", "year", ...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/internal/query/Helpers.java#L144-L146
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/failover/thread/ConnectionValidator.java
ConnectionValidator.addListener
public void addListener(Listener listener, long listenerCheckMillis) { """ Add listener to validation list. @param listener listener @param listenerCheckMillis schedule time """ queue.add(listener); long newFrequency = Math.min(MINIMUM_CHECK_DELAY_MILLIS, listenerCheckMillis); //fi...
java
public void addListener(Listener listener, long listenerCheckMillis) { queue.add(listener); long newFrequency = Math.min(MINIMUM_CHECK_DELAY_MILLIS, listenerCheckMillis); //first listener if (currentScheduledFrequency.get() == -1) { if (currentScheduledFrequency.compareAndSet(-1, newFrequency)) ...
[ "public", "void", "addListener", "(", "Listener", "listener", ",", "long", "listenerCheckMillis", ")", "{", "queue", ".", "add", "(", "listener", ")", ";", "long", "newFrequency", "=", "Math", ".", "min", "(", "MINIMUM_CHECK_DELAY_MILLIS", ",", "listenerCheckMil...
Add listener to validation list. @param listener listener @param listenerCheckMillis schedule time
[ "Add", "listener", "to", "validation", "list", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/failover/thread/ConnectionValidator.java#L79-L96
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.registerJsonValueProcessor
public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) { """ Registers a JsonValueProcessor.<br> [Java -&gt; JSON] @param key the property name to use as key @param jsonValueProcessor the processor to register """ if( key != null && jsonValueProcessor != null ) {...
java
public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) { if( key != null && jsonValueProcessor != null ) { keyMap.put( key, jsonValueProcessor ); } }
[ "public", "void", "registerJsonValueProcessor", "(", "String", "key", ",", "JsonValueProcessor", "jsonValueProcessor", ")", "{", "if", "(", "key", "!=", "null", "&&", "jsonValueProcessor", "!=", "null", ")", "{", "keyMap", ".", "put", "(", "key", ",", "jsonVal...
Registers a JsonValueProcessor.<br> [Java -&gt; JSON] @param key the property name to use as key @param jsonValueProcessor the processor to register
[ "Registers", "a", "JsonValueProcessor", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L853-L857
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/MainThread.java
MainThread.runOnMainThreadDelayed
public boolean runOnMainThreadDelayed(Runnable r, long delayMillis) { """ Queues a Runnable to be run on the main thread after the time specified by {@code delayMillis} has elapsed. A pause in application execution may add an additional delay. @param r The Runnable to run on the main thread. @param delayMil...
java
public boolean runOnMainThreadDelayed(Runnable r, long delayMillis) { assert handler != null; if (!sanityCheck("runOnMainThreadDelayed " + r + " delayMillis = " + delayMillis)) { return false; } return handler.postDelayed(r, delayMillis); }
[ "public", "boolean", "runOnMainThreadDelayed", "(", "Runnable", "r", ",", "long", "delayMillis", ")", "{", "assert", "handler", "!=", "null", ";", "if", "(", "!", "sanityCheck", "(", "\"runOnMainThreadDelayed \"", "+", "r", "+", "\" delayMillis = \"", "+", "dela...
Queues a Runnable to be run on the main thread after the time specified by {@code delayMillis} has elapsed. A pause in application execution may add an additional delay. @param r The Runnable to run on the main thread. @param delayMillis The delay, in milliseconds, until the Runnable is run. @return Returns {@code tru...
[ "Queues", "a", "Runnable", "to", "be", "run", "on", "the", "main", "thread", "after", "the", "time", "specified", "by", "{", "@code", "delayMillis", "}", "has", "elapsed", ".", "A", "pause", "in", "application", "execution", "may", "add", "an", "additional...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/MainThread.java#L167-L174
jcuda/jcurand
JCurandJava/src/main/java/jcuda/jcurand/JCurand.java
JCurand.curandGenerateUniform
public static int curandGenerateUniform(curandGenerator generator, Pointer outputPtr, long num) { """ <pre> Generate uniformly distributed floats. Use generator to generate num float results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hol...
java
public static int curandGenerateUniform(curandGenerator generator, Pointer outputPtr, long num) { return checkResult(curandGenerateUniformNative(generator, outputPtr, num)); }
[ "public", "static", "int", "curandGenerateUniform", "(", "curandGenerator", "generator", ",", "Pointer", "outputPtr", ",", "long", "num", ")", "{", "return", "checkResult", "(", "curandGenerateUniformNative", "(", "generator", ",", "outputPtr", ",", "num", ")", ")...
<pre> Generate uniformly distributed floats. Use generator to generate num float results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no st...
[ "<pre", ">", "Generate", "uniformly", "distributed", "floats", "." ]
train
https://github.com/jcuda/jcurand/blob/0f463d2bb72cd93b3988f7ce148cdb6069ba4fd9/JCurandJava/src/main/java/jcuda/jcurand/JCurand.java#L594-L597
ozimov/cirneco
hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/HamcrestMatchers.java
HamcrestMatchers.containsInOrder
public static <T> Matcher<Iterable<? extends T>> containsInOrder(final Iterable<T> items) { """ Creates a matcher for {@linkplain Iterable}s that matches when a single pass over the examined {@linkplain Iterable} yields a series of items, each logically equal to the corresponding item in the specified items. For...
java
public static <T> Matcher<Iterable<? extends T>> containsInOrder(final Iterable<T> items) { return IsIterableContainingInOrder.containsInOrder(items); }
[ "public", "static", "<", "T", ">", "Matcher", "<", "Iterable", "<", "?", "extends", "T", ">", ">", "containsInOrder", "(", "final", "Iterable", "<", "T", ">", "items", ")", "{", "return", "IsIterableContainingInOrder", ".", "containsInOrder", "(", "items", ...
Creates a matcher for {@linkplain Iterable}s that matches when a single pass over the examined {@linkplain Iterable} yields a series of items, each logically equal to the corresponding item in the specified items. For a positive match, the examined iterable must be of the same length as the number of specified items. <...
[ "Creates", "a", "matcher", "for", "{", "@linkplain", "Iterable", "}", "s", "that", "matches", "when", "a", "single", "pass", "over", "the", "examined", "{", "@linkplain", "Iterable", "}", "yields", "a", "series", "of", "items", "each", "logically", "equal", ...
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/HamcrestMatchers.java#L537-L539
jbundle/jbundle
base/db/client/src/main/java/org/jbundle/base/db/client/ClientTable.java
ClientTable.fieldsToData
public void fieldsToData(Rec record) throws DBException { """ Move all the fields to the output buffer. In this implementation, create a new VectorBuffer and move the fielddata to it. @exception DBException File exception. """ try { int iFieldTypes = BaseBuffer.PHYSICAL_FIELDS; ...
java
public void fieldsToData(Rec record) throws DBException { try { int iFieldTypes = BaseBuffer.PHYSICAL_FIELDS; if (!((Record)record).isAllSelected()) iFieldTypes = BaseBuffer.DATA_FIELDS; //SELECTED_FIELDS; (Selected and physical) m_dataSource = new Vec...
[ "public", "void", "fieldsToData", "(", "Rec", "record", ")", "throws", "DBException", "{", "try", "{", "int", "iFieldTypes", "=", "BaseBuffer", ".", "PHYSICAL_FIELDS", ";", "if", "(", "!", "(", "(", "Record", ")", "record", ")", ".", "isAllSelected", "(", ...
Move all the fields to the output buffer. In this implementation, create a new VectorBuffer and move the fielddata to it. @exception DBException File exception.
[ "Move", "all", "the", "fields", "to", "the", "output", "buffer", ".", "In", "this", "implementation", "create", "a", "new", "VectorBuffer", "and", "move", "the", "fielddata", "to", "it", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientTable.java#L561-L572
RallyTools/RallyRestToolkitForJava
src/main/java/com/rallydev/rest/RallyRestApi.java
RallyRestApi.setProxy
public void setProxy(URI proxy, String userName, String password) { """ Set the authenticated proxy server to use. By default no proxy is configured. @param proxy The proxy server, e.g. {@code new URI("http://my.proxy.com:8000")} @param userName The username to be used for authentication. @param password ...
java
public void setProxy(URI proxy, String userName, String password) { client.setProxy(proxy, userName, password); }
[ "public", "void", "setProxy", "(", "URI", "proxy", ",", "String", "userName", ",", "String", "password", ")", "{", "client", ".", "setProxy", "(", "proxy", ",", "userName", ",", "password", ")", ";", "}" ]
Set the authenticated proxy server to use. By default no proxy is configured. @param proxy The proxy server, e.g. {@code new URI("http://my.proxy.com:8000")} @param userName The username to be used for authentication. @param password The password to be used for authentication.
[ "Set", "the", "authenticated", "proxy", "server", "to", "use", ".", "By", "default", "no", "proxy", "is", "configured", "." ]
train
https://github.com/RallyTools/RallyRestToolkitForJava/blob/542afa16ea44c9c64cebb0299500dcbbb50b6d7d/src/main/java/com/rallydev/rest/RallyRestApi.java#L64-L66
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java
ST_RemoveRepeatedPoints.removeDuplicateCoordinates
public static MultiLineString removeDuplicateCoordinates(MultiLineString multiLineString, double tolerance) throws SQLException { """ Removes duplicated coordinates in a MultiLineString. @param multiLineString @param tolerance to delete the coordinates @return """ ArrayList<LineString> lines = new...
java
public static MultiLineString removeDuplicateCoordinates(MultiLineString multiLineString, double tolerance) throws SQLException { ArrayList<LineString> lines = new ArrayList<LineString>(); for (int i = 0; i < multiLineString.getNumGeometries(); i++) { LineString line = (LineString) multiLine...
[ "public", "static", "MultiLineString", "removeDuplicateCoordinates", "(", "MultiLineString", "multiLineString", ",", "double", "tolerance", ")", "throws", "SQLException", "{", "ArrayList", "<", "LineString", ">", "lines", "=", "new", "ArrayList", "<", "LineString", ">...
Removes duplicated coordinates in a MultiLineString. @param multiLineString @param tolerance to delete the coordinates @return
[ "Removes", "duplicated", "coordinates", "in", "a", "MultiLineString", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java#L140-L147
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java
LinkedList.set
public E set(int index, E element) { """ Replaces the element at the specified position in this list with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws IndexOu...
java
public E set(int index, E element) { checkElementIndex(index); Node<E> x = node(index); E oldVal = x.item; x.item = element; return oldVal; }
[ "public", "E", "set", "(", "int", "index", ",", "E", "element", ")", "{", "checkElementIndex", "(", "index", ")", ";", "Node", "<", "E", ">", "x", "=", "node", "(", "index", ")", ";", "E", "oldVal", "=", "x", ".", "item", ";", "x", ".", "item",...
Replaces the element at the specified position in this list with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws IndexOutOfBoundsException {@inheritDoc}
[ "Replaces", "the", "element", "at", "the", "specified", "position", "in", "this", "list", "with", "the", "specified", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L491-L497
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/ReidSolomonCodes.java
ReidSolomonCodes.findErrorLocatorPolynomial
void findErrorLocatorPolynomial( int messageLength , GrowQueue_I32 errorLocations , GrowQueue_I8 errorLocator ) { """ Compute the error locator polynomial when given the error locations in the message. @param messageLength (Input) Length of the message @param errorLocations (Input) List of error locations in t...
java
void findErrorLocatorPolynomial( int messageLength , GrowQueue_I32 errorLocations , GrowQueue_I8 errorLocator ) { tmp1.resize(2); tmp1.data[1] = 1; errorLocator.resize(1); errorLocator.data[0] = 1; for (int i = 0; i < errorLocations.size; i++) { // Convert from positions in the message to coefficient degre...
[ "void", "findErrorLocatorPolynomial", "(", "int", "messageLength", ",", "GrowQueue_I32", "errorLocations", ",", "GrowQueue_I8", "errorLocator", ")", "{", "tmp1", ".", "resize", "(", "2", ")", ";", "tmp1", ".", "data", "[", "1", "]", "=", "1", ";", "errorLoca...
Compute the error locator polynomial when given the error locations in the message. @param messageLength (Input) Length of the message @param errorLocations (Input) List of error locations in the byte @param errorLocator (Output) Error locator polynomial. Coefficients are large to small.
[ "Compute", "the", "error", "locator", "polynomial", "when", "given", "the", "error", "locations", "in", "the", "message", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/ReidSolomonCodes.java#L186-L202
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.deletePredictionAsync
public Observable<Void> deletePredictionAsync(UUID projectId, List<String> ids) { """ Delete a set of predicted images and their associated prediction results. @param projectId The project id @param ids The prediction ids. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation...
java
public Observable<Void> deletePredictionAsync(UUID projectId, List<String> ids) { return deletePredictionWithServiceResponseAsync(projectId, ids).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.bo...
[ "public", "Observable", "<", "Void", ">", "deletePredictionAsync", "(", "UUID", "projectId", ",", "List", "<", "String", ">", "ids", ")", "{", "return", "deletePredictionWithServiceResponseAsync", "(", "projectId", ",", "ids", ")", ".", "map", "(", "new", "Fun...
Delete a set of predicted images and their associated prediction results. @param projectId The project id @param ids The prediction ids. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Delete", "a", "set", "of", "predicted", "images", "and", "their", "associated", "prediction", "results", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3111-L3118
finnyb/javampd
src/main/java/org/bff/javampd/monitor/MPDConnectionMonitor.java
MPDConnectionMonitor.fireConnectionChangeEvent
protected synchronized void fireConnectionChangeEvent(boolean isConnected) { """ Sends the appropriate {@link org.bff.javampd.server.ConnectionChangeEvent} to all registered {@link ConnectionChangeListener}s. @param isConnected the connection status """ ConnectionChangeEvent cce = new ConnectionCha...
java
protected synchronized void fireConnectionChangeEvent(boolean isConnected) { ConnectionChangeEvent cce = new ConnectionChangeEvent(this, isConnected); for (ConnectionChangeListener ccl : connectionListeners) { ccl.connectionChangeEventReceived(cce); } }
[ "protected", "synchronized", "void", "fireConnectionChangeEvent", "(", "boolean", "isConnected", ")", "{", "ConnectionChangeEvent", "cce", "=", "new", "ConnectionChangeEvent", "(", "this", ",", "isConnected", ")", ";", "for", "(", "ConnectionChangeListener", "ccl", ":...
Sends the appropriate {@link org.bff.javampd.server.ConnectionChangeEvent} to all registered {@link ConnectionChangeListener}s. @param isConnected the connection status
[ "Sends", "the", "appropriate", "{", "@link", "org", ".", "bff", ".", "javampd", ".", "server", ".", "ConnectionChangeEvent", "}", "to", "all", "registered", "{", "@link", "ConnectionChangeListener", "}", "s", "." ]
train
https://github.com/finnyb/javampd/blob/186736e85fc238b4208cc9ee23373f9249376b4c/src/main/java/org/bff/javampd/monitor/MPDConnectionMonitor.java#L48-L54
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/document/json/JsonObject.java
JsonObject.getAndDecryptString
public String getAndDecryptString(String name, String providerName) throws Exception { """ Retrieves the decrypted value from the field name and casts it to {@link String}. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase is ...
java
public String getAndDecryptString(String name, String providerName) throws Exception { return (String) getAndDecrypt(name, providerName); }
[ "public", "String", "getAndDecryptString", "(", "String", "name", ",", "String", "providerName", ")", "throws", "Exception", "{", "return", "(", "String", ")", "getAndDecrypt", "(", "name", ",", "providerName", ")", ";", "}" ]
Retrieves the decrypted value from the field name and casts it to {@link String}. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase is subject to the Couchbase Inc. Enterprise Subscription License Agreement at https://www.couchbase.com...
[ "Retrieves", "the", "decrypted", "value", "from", "the", "field", "name", "and", "casts", "it", "to", "{", "@link", "String", "}", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L380-L382
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.registerMismatch
private void registerMismatch(JSType found, JSType required, JSError error) { """ Registers a type mismatch into the universe of mismatches owned by this pass. """ TypeMismatch.registerMismatch( this.mismatches, this.implicitInterfaceUses, found, required, error); }
java
private void registerMismatch(JSType found, JSType required, JSError error) { TypeMismatch.registerMismatch( this.mismatches, this.implicitInterfaceUses, found, required, error); }
[ "private", "void", "registerMismatch", "(", "JSType", "found", ",", "JSType", "required", ",", "JSError", "error", ")", "{", "TypeMismatch", ".", "registerMismatch", "(", "this", ".", "mismatches", ",", "this", ".", "implicitInterfaceUses", ",", "found", ",", ...
Registers a type mismatch into the universe of mismatches owned by this pass.
[ "Registers", "a", "type", "mismatch", "into", "the", "universe", "of", "mismatches", "owned", "by", "this", "pass", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L1052-L1055
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.forwardRequest
public static void forwardRequest(String target, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { """ Forwards the response to the given target, which may contain parameters appended like for example <code>?a=b&amp;c=d</code>.<p> Please note: If possible, use <code>{@l...
java
public static void forwardRequest(String target, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { // clear the current parameters CmsUriSplitter uri = new CmsUriSplitter(target); Map<String, String[]> params = createParameterMap(uri.getQuery()); ...
[ "public", "static", "void", "forwardRequest", "(", "String", "target", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "IOException", ",", "ServletException", "{", "// clear the current parameters", "CmsUriSplitter", "uri", "=", "new"...
Forwards the response to the given target, which may contain parameters appended like for example <code>?a=b&amp;c=d</code>.<p> Please note: If possible, use <code>{@link #forwardRequest(String, Map, HttpServletRequest, HttpServletResponse)}</code> where the parameters are passed as a map, since the parsing of the par...
[ "Forwards", "the", "response", "to", "the", "given", "target", "which", "may", "contain", "parameters", "appended", "like", "for", "example", "<code", ">", "?a", "=", "b&amp", ";", "c", "=", "d<", "/", "code", ">", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L454-L461
ocelotds/ocelot
ocelot-processor/src/main/java/org/ocelotds/processors/visitors/AbstractDataServiceVisitor.java
AbstractDataServiceVisitor.browseAndWriteMethods
void browseAndWriteMethods(List<ExecutableElement> methodElements, String classname, Writer writer) throws IOException { """ browse valid methods and write equivalent js methods in writer @param methodElements @param classname @param writer @return @throws IOException """ Collection<String> methodPro...
java
void browseAndWriteMethods(List<ExecutableElement> methodElements, String classname, Writer writer) throws IOException { Collection<String> methodProceeds = new ArrayList<>(); boolean first = true; for (ExecutableElement methodElement : methodElements) { if (isConsiderateMethod(methodProceeds, methodElemen...
[ "void", "browseAndWriteMethods", "(", "List", "<", "ExecutableElement", ">", "methodElements", ",", "String", "classname", ",", "Writer", "writer", ")", "throws", "IOException", "{", "Collection", "<", "String", ">", "methodProceeds", "=", "new", "ArrayList", "<>"...
browse valid methods and write equivalent js methods in writer @param methodElements @param classname @param writer @return @throws IOException
[ "browse", "valid", "methods", "and", "write", "equivalent", "js", "methods", "in", "writer" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-processor/src/main/java/org/ocelotds/processors/visitors/AbstractDataServiceVisitor.java#L133-L145
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.printUsage
public void printUsage(Writer out, ResourceBundle rb) { """ Prints the list of all the non-hidden options and their usages to the screen. <p> Short for {@code printUsage(out,rb,OptionHandlerFilter.PUBLIC)} """ printUsage(out, rb, OptionHandlerFilter.PUBLIC); }
java
public void printUsage(Writer out, ResourceBundle rb) { printUsage(out, rb, OptionHandlerFilter.PUBLIC); }
[ "public", "void", "printUsage", "(", "Writer", "out", ",", "ResourceBundle", "rb", ")", "{", "printUsage", "(", "out", ",", "rb", ",", "OptionHandlerFilter", ".", "PUBLIC", ")", ";", "}" ]
Prints the list of all the non-hidden options and their usages to the screen. <p> Short for {@code printUsage(out,rb,OptionHandlerFilter.PUBLIC)}
[ "Prints", "the", "list", "of", "all", "the", "non", "-", "hidden", "options", "and", "their", "usages", "to", "the", "screen", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L272-L274
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Assert.java
Assert.hasLength
public static void hasLength(String text, String message) { """ Assert that the given String is not empty; that is, it must not be <code>null</code> and not the empty String. <pre class="code">Assert.hasLength(name, "Name must not be empty");</pre> @param text the String to check @param message the exception m...
java
public static void hasLength(String text, String message) { if (!Strings.hasLength(text)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "hasLength", "(", "String", "text", ",", "String", "message", ")", "{", "if", "(", "!", "Strings", ".", "hasLength", "(", "text", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that the given String is not empty; that is, it must not be <code>null</code> and not the empty String. <pre class="code">Assert.hasLength(name, "Name must not be empty");</pre> @param text the String to check @param message the exception message to use if the assertion fails @see Strings#hasLength
[ "Assert", "that", "the", "given", "String", "is", "not", "empty", ";", "that", "is", "it", "must", "not", "be", "<code", ">", "null<", "/", "code", ">", "and", "not", "the", "empty", "String", ".", "<pre", "class", "=", "code", ">", "Assert", ".", ...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Assert.java#L104-L108
Jasig/uPortal
uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupFormValidator.java
GroupFormValidator.validateEditDetails
public void validateEditDetails(GroupForm group, MessageContext context) { """ Validate the detail editing group view @param group @param context """ // ensure the group name is set if (StringUtils.isBlank(group.getName())) { context.addMessage( new MessageB...
java
public void validateEditDetails(GroupForm group, MessageContext context) { // ensure the group name is set if (StringUtils.isBlank(group.getName())) { context.addMessage( new MessageBuilder().error().source("name").code("please.enter.name").build()); } }
[ "public", "void", "validateEditDetails", "(", "GroupForm", "group", ",", "MessageContext", "context", ")", "{", "// ensure the group name is set", "if", "(", "StringUtils", ".", "isBlank", "(", "group", ".", "getName", "(", ")", ")", ")", "{", "context", ".", ...
Validate the detail editing group view @param group @param context
[ "Validate", "the", "detail", "editing", "group", "view" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupFormValidator.java#L30-L37
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/AbstractParser.java
AbstractParser.getString
protected String getString(final String key, final JSONObject jsonObject) { """ Check to make sure the JSONObject has the specified key and if so return the value as a string. If no key is found "" is returned. @param key name of the field to fetch from the json object @param jsonObject object from which to f...
java
protected String getString(final String key, final JSONObject jsonObject) { String value = null; if(hasKey(key, jsonObject)) { try { value = jsonObject.getString(key); } catch(JSONException e) { LOGGER.error("Could not get String from JSONObject for key: " + key, e); } ...
[ "protected", "String", "getString", "(", "final", "String", "key", ",", "final", "JSONObject", "jsonObject", ")", "{", "String", "value", "=", "null", ";", "if", "(", "hasKey", "(", "key", ",", "jsonObject", ")", ")", "{", "try", "{", "value", "=", "js...
Check to make sure the JSONObject has the specified key and if so return the value as a string. If no key is found "" is returned. @param key name of the field to fetch from the json object @param jsonObject object from which to fetch the value @return string value corresponding to the key or null if key not found
[ "Check", "to", "make", "sure", "the", "JSONObject", "has", "the", "specified", "key", "and", "if", "so", "return", "the", "value", "as", "a", "string", ".", "If", "no", "key", "is", "found", "is", "returned", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/AbstractParser.java#L208-L219
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/AbstractBaseParams.java
AbstractBaseParams.readDouble
protected double readDouble(final String doubleString, final double min, final double max) { """ Read a double string value. @param doubleString the double value @param min the minimum value allowed @param max the maximum value allowed @return the value parsed according to its range """ return ...
java
protected double readDouble(final String doubleString, final double min, final double max) { return Math.max(Math.min(Double.parseDouble(doubleString), max), min); }
[ "protected", "double", "readDouble", "(", "final", "String", "doubleString", ",", "final", "double", "min", ",", "final", "double", "max", ")", "{", "return", "Math", ".", "max", "(", "Math", ".", "min", "(", "Double", ".", "parseDouble", "(", "doubleStrin...
Read a double string value. @param doubleString the double value @param min the minimum value allowed @param max the maximum value allowed @return the value parsed according to its range
[ "Read", "a", "double", "string", "value", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/AbstractBaseParams.java#L153-L155
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.document_id_PUT
public void document_id_PUT(String id, OvhDocument body) throws IOException { """ Alter this object properties REST: PUT /me/document/{id} @param body [required] New object properties @param id [required] Document id """ String qPath = "/me/document/{id}"; StringBuilder sb = path(qPath, id); exec(qP...
java
public void document_id_PUT(String id, OvhDocument body) throws IOException { String qPath = "/me/document/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "document_id_PUT", "(", "String", "id", ",", "OvhDocument", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/document/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "id", ")", ";", "exec", "(",...
Alter this object properties REST: PUT /me/document/{id} @param body [required] New object properties @param id [required] Document id
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2559-L2563
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java
CompressionUtil.decodeBZ
public static String decodeBZ(byte[] data, String dictionary) { """ Decode bz string. @param data the data @param dictionary the dictionary @return the string """ try { byte[] dictBytes = dictionary.getBytes("UTF-8"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ...
java
public static String decodeBZ(byte[] data, String dictionary) { try { byte[] dictBytes = dictionary.getBytes("UTF-8"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); VCDiffDecoderBuilder.builder().buildSimple().decode(dictBytes, decodeBZRaw(data), buffer); return new String(buff...
[ "public", "static", "String", "decodeBZ", "(", "byte", "[", "]", "data", ",", "String", "dictionary", ")", "{", "try", "{", "byte", "[", "]", "dictBytes", "=", "dictionary", ".", "getBytes", "(", "\"UTF-8\"", ")", ";", "ByteArrayOutputStream", "buffer", "=...
Decode bz string. @param data the data @param dictionary the dictionary @return the string
[ "Decode", "bz", "string", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java#L248-L257
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java
File.createTempFile
public static File createTempFile(String prefix, String suffix, File directory) throws IOException { """ Creates an empty temporary file in the given directory using the given prefix and suffix as part of the file name. If {@code suffix} is null, {@code .tmp} is used. <p>Note that this method does ...
java
public static File createTempFile(String prefix, String suffix, File directory) throws IOException { // Force a prefix null check first if (prefix.length() < 3) { throw new IllegalArgumentException("prefix must be at least 3 characters"); } if (suffix == null) { ...
[ "public", "static", "File", "createTempFile", "(", "String", "prefix", ",", "String", "suffix", ",", "File", "directory", ")", "throws", "IOException", "{", "// Force a prefix null check first", "if", "(", "prefix", ".", "length", "(", ")", "<", "3", ")", "{",...
Creates an empty temporary file in the given directory using the given prefix and suffix as part of the file name. If {@code suffix} is null, {@code .tmp} is used. <p>Note that this method does <i>not</i> call {@link #deleteOnExit}, but see the documentation for that method before you call it manually. @param prefix ...
[ "Creates", "an", "empty", "temporary", "file", "in", "the", "given", "directory", "using", "the", "given", "prefix", "and", "suffix", "as", "part", "of", "the", "file", "name", ".", "If", "{", "@code", "suffix", "}", "is", "null", "{", "@code", ".", "t...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java#L1088-L1107
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java
CmsListItemWidget.setIcon
public void setIcon(String iconClasses, String detailIconClasses) { """ Sets the icon for this item using the given CSS classes.<p> @param iconClasses the CSS classes @param detailIconClasses the detail type icon classes if available """ m_iconPanel.setVisible(true); HTML iconWidget = new ...
java
public void setIcon(String iconClasses, String detailIconClasses) { m_iconPanel.setVisible(true); HTML iconWidget = new HTML(); m_iconPanel.setWidget(iconWidget); iconWidget.setStyleName(iconClasses + " " + m_fixedIconClasses); // render the detail icon as an overlay above the m...
[ "public", "void", "setIcon", "(", "String", "iconClasses", ",", "String", "detailIconClasses", ")", "{", "m_iconPanel", ".", "setVisible", "(", "true", ")", ";", "HTML", "iconWidget", "=", "new", "HTML", "(", ")", ";", "m_iconPanel", ".", "setWidget", "(", ...
Sets the icon for this item using the given CSS classes.<p> @param iconClasses the CSS classes @param detailIconClasses the detail type icon classes if available
[ "Sets", "the", "icon", "for", "this", "item", "using", "the", "given", "CSS", "classes", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java#L744-L759
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_bluecatvpx_image.java
xen_bluecatvpx_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_bluecatvpx_image_responses result = (xen_bluecatvpx_image_responses...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_bluecatvpx_image_responses result = (xen_bluecatvpx_image_responses) service.get_payload_formatter().string_to_resource(xen_bluecatvpx_image_responses.class, response); if(result.errorcode != 0) {...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_bluecatvpx_image_responses", "result", "=", "(", "xen_bluecatvpx_image_responses", ")", "service", ".", "...
<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_bluecatvpx_image.java#L264-L281
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.save
public static void save(CharSequence chars, File file) throws IOException { """ Create target file and copy characters into. Copy destination should be a file and this method throws access denied if attempt to write to a directory. This method creates target file if it does not already exist. If target file does...
java
public static void save(CharSequence chars, File file) throws IOException { save(chars, new FileWriter(Files.mkdirs(file))); }
[ "public", "static", "void", "save", "(", "CharSequence", "chars", ",", "File", "file", ")", "throws", "IOException", "{", "save", "(", "chars", ",", "new", "FileWriter", "(", "Files", ".", "mkdirs", "(", "file", ")", ")", ")", ";", "}" ]
Create target file and copy characters into. Copy destination should be a file and this method throws access denied if attempt to write to a directory. This method creates target file if it does not already exist. If target file does exist it will be overwritten and old content lost. If given <code>chars</code> paramet...
[ "Create", "target", "file", "and", "copy", "characters", "into", ".", "Copy", "destination", "should", "be", "a", "file", "and", "this", "method", "throws", "access", "denied", "if", "attempt", "to", "write", "to", "a", "directory", ".", "This", "method", ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1496-L1499
stephanenicolas/robospice
robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/request/notifier/SpiceServiceListenerNotifier.java
SpiceServiceListenerNotifier.notifyObserversOfRequestProcessed
public void notifyObserversOfRequestProcessed(CachedSpiceRequest<?> request, Set<RequestListener<?>> requestListeners) { """ Notify interested observers of request completion. @param request the request that has completed. @param requestListeners the listeners to notify. """ RequestProcessingContext ...
java
public void notifyObserversOfRequestProcessed(CachedSpiceRequest<?> request, Set<RequestListener<?>> requestListeners) { RequestProcessingContext requestProcessingContext = new RequestProcessingContext(); requestProcessingContext.setExecutionThread(Thread.currentThread()); requestProcessingConte...
[ "public", "void", "notifyObserversOfRequestProcessed", "(", "CachedSpiceRequest", "<", "?", ">", "request", ",", "Set", "<", "RequestListener", "<", "?", ">", ">", "requestListeners", ")", "{", "RequestProcessingContext", "requestProcessingContext", "=", "new", "Reque...
Notify interested observers of request completion. @param request the request that has completed. @param requestListeners the listeners to notify.
[ "Notify", "interested", "observers", "of", "request", "completion", "." ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/request/notifier/SpiceServiceListenerNotifier.java#L134-L139
jnr/jnr-x86asm
src/main/java/jnr/x86asm/Asm.java
Asm.mmword_ptr_abs
public static final Mem mmword_ptr_abs(long target, long disp, SEGMENT segmentPrefix) { """ Create mmword (8 bytes) pointer operand ! ! @note This constructor is provided only for convenience for mmx programming. """ return _ptr_build_abs(target, disp, segmentPrefix, SIZE_QWORD); }
java
public static final Mem mmword_ptr_abs(long target, long disp, SEGMENT segmentPrefix) { return _ptr_build_abs(target, disp, segmentPrefix, SIZE_QWORD); }
[ "public", "static", "final", "Mem", "mmword_ptr_abs", "(", "long", "target", ",", "long", "disp", ",", "SEGMENT", "segmentPrefix", ")", "{", "return", "_ptr_build_abs", "(", "target", ",", "disp", ",", "segmentPrefix", ",", "SIZE_QWORD", ")", ";", "}" ]
Create mmword (8 bytes) pointer operand ! ! @note This constructor is provided only for convenience for mmx programming.
[ "Create", "mmword", "(", "8", "bytes", ")", "pointer", "operand", "!", "!" ]
train
https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/Asm.java#L433-L435
zaproxy/zaproxy
src/org/zaproxy/zap/utils/ClassLoaderUtil.java
ClassLoaderUtil.addURL
public static void addURL(URL u) throws IOException { """ Add URL to CLASSPATH @param u URL @throws IOException IOException """ if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) { return; } URLClassLoader sysLoader = (URLClassLoader) ClassLoader.ge...
java
public static void addURL(URL u) throws IOException { if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) { return; } URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); URL[] urls = sysLoader.getURLs(); for (int i ...
[ "public", "static", "void", "addURL", "(", "URL", "u", ")", "throws", "IOException", "{", "if", "(", "!", "(", "ClassLoader", ".", "getSystemClassLoader", "(", ")", "instanceof", "URLClassLoader", ")", ")", "{", "return", ";", "}", "URLClassLoader", "sysLoad...
Add URL to CLASSPATH @param u URL @throws IOException IOException
[ "Add", "URL", "to", "CLASSPATH" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/ClassLoaderUtil.java#L51-L75
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.chain
@Override public <U> U chain(Function<? super LongStreamEx, U> mapper) { """ does not add overhead as it appears in bytecode anyways as bridge method """ return mapper.apply(this); }
java
@Override public <U> U chain(Function<? super LongStreamEx, U> mapper) { return mapper.apply(this); }
[ "@", "Override", "public", "<", "U", ">", "U", "chain", "(", "Function", "<", "?", "super", "LongStreamEx", ",", "U", ">", "mapper", ")", "{", "return", "mapper", ".", "apply", "(", "this", ")", ";", "}" ]
does not add overhead as it appears in bytecode anyways as bridge method
[ "does", "not", "add", "overhead", "as", "it", "appears", "in", "bytecode", "anyways", "as", "bridge", "method" ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L1535-L1538
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/databinding/RenderingHelper.java
RenderingHelper.addHighlight
Integer addHighlight(@NonNull View view, @NonNull String attribute, @ColorInt int colorId) { """ Enables highlighting for this view/attribute pair. @param attribute the attribute to color. @param colorId a {@link ColorInt} to associate with this attribute. @return the previous color associated with this att...
java
Integer addHighlight(@NonNull View view, @NonNull String attribute, @ColorInt int colorId) { final Pair<Integer, String> pair = new Pair<>(view.getId(), attribute); highlightedAttributes.add(pair); return attributeColors.put(pair, colorId); }
[ "Integer", "addHighlight", "(", "@", "NonNull", "View", "view", ",", "@", "NonNull", "String", "attribute", ",", "@", "ColorInt", "int", "colorId", ")", "{", "final", "Pair", "<", "Integer", ",", "String", ">", "pair", "=", "new", "Pair", "<>", "(", "v...
Enables highlighting for this view/attribute pair. @param attribute the attribute to color. @param colorId a {@link ColorInt} to associate with this attribute. @return the previous color associated with this attribute or {@code null} if there was none.
[ "Enables", "highlighting", "for", "this", "view", "/", "attribute", "pair", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/databinding/RenderingHelper.java#L108-L112
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_duplicatePortMappingConfig_POST
public void serviceName_modem_duplicatePortMappingConfig_POST(String serviceName, String accessName) throws IOException { """ Remove all the current port mapping rules and set the same config as the access given in parameters REST: POST /xdsl/{serviceName}/modem/duplicatePortMappingConfig @param accessName [re...
java
public void serviceName_modem_duplicatePortMappingConfig_POST(String serviceName, String accessName) throws IOException { String qPath = "/xdsl/{serviceName}/modem/duplicatePortMappingConfig"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "acce...
[ "public", "void", "serviceName_modem_duplicatePortMappingConfig_POST", "(", "String", "serviceName", ",", "String", "accessName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/duplicatePortMappingConfig\"", ";", "StringBuilder", "sb", ...
Remove all the current port mapping rules and set the same config as the access given in parameters REST: POST /xdsl/{serviceName}/modem/duplicatePortMappingConfig @param accessName [required] The access name with the config you want to duplicate @param serviceName [required] The internal name of your XDSL offer @depr...
[ "Remove", "all", "the", "current", "port", "mapping", "rules", "and", "set", "the", "same", "config", "as", "the", "access", "given", "in", "parameters" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L687-L693
zaproxy/zaproxy
src/org/zaproxy/zap/model/VulnerabilitiesLoader.java
VulnerabilitiesLoader.getListOfVulnerabilitiesFiles
List<String> getListOfVulnerabilitiesFiles() { """ Returns a {@code List} of resources files with {@code fileName} and {@code fileExtension} contained in the {@code directory}. @return the list of resources files contained in the {@code directory} @see LocaleUtils#createResourceFilesPattern(String, String) ...
java
List<String> getListOfVulnerabilitiesFiles() { if (!Files.exists(directory)) { logger.debug("Skipping read of vulnerabilities, the directory does not exist: " + directory.toAbsolutePath()); return Collections.emptyList(); } final Pattern filePattern = LocaleUtils.createResourceFilesPattern(fileName, ...
[ "List", "<", "String", ">", "getListOfVulnerabilitiesFiles", "(", ")", "{", "if", "(", "!", "Files", ".", "exists", "(", "directory", ")", ")", "{", "logger", ".", "debug", "(", "\"Skipping read of vulnerabilities, the directory does not exist: \"", "+", "directory"...
Returns a {@code List} of resources files with {@code fileName} and {@code fileExtension} contained in the {@code directory}. @return the list of resources files contained in the {@code directory} @see LocaleUtils#createResourceFilesPattern(String, String)
[ "Returns", "a", "{", "@code", "List", "}", "of", "resources", "files", "with", "{", "@code", "fileName", "}", "and", "{", "@code", "fileExtension", "}", "contained", "in", "the", "{", "@code", "directory", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/VulnerabilitiesLoader.java#L157-L181
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentImpl.java
ComponentImpl.get
public Object get(int access, String name) throws PageException { """ return element that has at least given access or null @param access @param name @return matching value @throws PageException """ return get(access, KeyImpl.init(name)); }
java
public Object get(int access, String name) throws PageException { return get(access, KeyImpl.init(name)); }
[ "public", "Object", "get", "(", "int", "access", ",", "String", "name", ")", "throws", "PageException", "{", "return", "get", "(", "access", ",", "KeyImpl", ".", "init", "(", "name", ")", ")", ";", "}" ]
return element that has at least given access or null @param access @param name @return matching value @throws PageException
[ "return", "element", "that", "has", "at", "least", "given", "access", "or", "null" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentImpl.java#L1839-L1841
josesamuel/remoter
remoter/src/main/java/remoter/compiler/builder/BindingManager.java
BindingManager.getClassBuilder
private ClassBuilder getClassBuilder(Element element) { """ Returns the {@link ClassBuilder} that generates the Builder for the Proxy and Stub classes """ ClassBuilder classBuilder = new ClassBuilder(messager, element); classBuilder.setBindingManager(this); return classBuilder; ...
java
private ClassBuilder getClassBuilder(Element element) { ClassBuilder classBuilder = new ClassBuilder(messager, element); classBuilder.setBindingManager(this); return classBuilder; }
[ "private", "ClassBuilder", "getClassBuilder", "(", "Element", "element", ")", "{", "ClassBuilder", "classBuilder", "=", "new", "ClassBuilder", "(", "messager", ",", "element", ")", ";", "classBuilder", ".", "setBindingManager", "(", "this", ")", ";", "return", "...
Returns the {@link ClassBuilder} that generates the Builder for the Proxy and Stub classes
[ "Returns", "the", "{" ]
train
https://github.com/josesamuel/remoter/blob/007401868c319740d40134ebc07c3406988f9a86/remoter/src/main/java/remoter/compiler/builder/BindingManager.java#L112-L116
apache/incubator-druid
core/src/main/java/org/apache/druid/concurrent/ConcurrentAwaitableCounter.java
ConcurrentAwaitableCounter.awaitFirstIncrement
public boolean awaitFirstIncrement(long timeout, TimeUnit unit) throws InterruptedException { """ The difference between this method and {@link #awaitCount(long, long, TimeUnit)} with argument 1 is that {@code awaitFirstIncrement()} returns boolean designating whether the count was await (while waiting for no lon...
java
public boolean awaitFirstIncrement(long timeout, TimeUnit unit) throws InterruptedException { return sync.tryAcquireSharedNanos(0, unit.toNanos(timeout)); }
[ "public", "boolean", "awaitFirstIncrement", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "return", "sync", ".", "tryAcquireSharedNanos", "(", "0", ",", "unit", ".", "toNanos", "(", "timeout", ")", ")", ";", "}" ]
The difference between this method and {@link #awaitCount(long, long, TimeUnit)} with argument 1 is that {@code awaitFirstIncrement()} returns boolean designating whether the count was await (while waiting for no longer than for the specified period of time), while {@code awaitCount()} throws {@link TimeoutException} i...
[ "The", "difference", "between", "this", "method", "and", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/concurrent/ConcurrentAwaitableCounter.java#L162-L165
mkolisnyk/cucumber-reports
cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java
LazyAssert.assertArrayEquals
public static void assertArrayEquals(String message, double[] expecteds, double[] actuals, double delta) throws ArrayComparisonFailure { """ Asserts that two double arrays are equal. If they are not, an {@link LazyAssertionError} is thrown with the given message. @param message the identifying mess...
java
public static void assertArrayEquals(String message, double[] expecteds, double[] actuals, double delta) throws ArrayComparisonFailure { try { new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals); } catch (AssertionError e) { throw new LazyAss...
[ "public", "static", "void", "assertArrayEquals", "(", "String", "message", ",", "double", "[", "]", "expecteds", ",", "double", "[", "]", "actuals", ",", "double", "delta", ")", "throws", "ArrayComparisonFailure", "{", "try", "{", "new", "InexactComparisonCriter...
Asserts that two double arrays are equal. If they are not, an {@link LazyAssertionError} is thrown with the given message. @param message the identifying message for the {@link LazyAssertionError} (<code>null</code> okay) @param expecteds double array with expected values. @param actuals double array with actual value...
[ "Asserts", "that", "two", "double", "arrays", "are", "equal", ".", "If", "they", "are", "not", "an", "{", "@link", "LazyAssertionError", "}", "is", "thrown", "with", "the", "given", "message", "." ]
train
https://github.com/mkolisnyk/cucumber-reports/blob/9c9a32f15f0bf1eb1d3d181a11bae9c5eec84a8e/cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java#L473-L480
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.retrospectives
public Collection<Retrospective> retrospectives( RetrospectiveFilter filter) { """ Get Retrospective filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter. """...
java
public Collection<Retrospective> retrospectives( RetrospectiveFilter filter) { return get(Retrospective.class, (filter != null) ? filter : new RetrospectiveFilter()); }
[ "public", "Collection", "<", "Retrospective", ">", "retrospectives", "(", "RetrospectiveFilter", "filter", ")", "{", "return", "get", "(", "Retrospective", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "RetrospectiveFilter", "...
Get Retrospective filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "Retrospective", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L282-L285
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/view/ViewRetryHandler.java
ViewRetryHandler.shouldRetry
private static boolean shouldRetry(final int status, final String content) { """ Analyses status codes and checks if a retry needs to happen. Some status codes are ambiguous, so their contents are inspected further. @param status the status code. @param content the error body from the response. @return tru...
java
private static boolean shouldRetry(final int status, final String content) { switch (status) { case 200: return false; case 404: return analyse404Response(content); case 500: return analyse500Response(content); case ...
[ "private", "static", "boolean", "shouldRetry", "(", "final", "int", "status", ",", "final", "String", "content", ")", "{", "switch", "(", "status", ")", "{", "case", "200", ":", "return", "false", ";", "case", "404", ":", "return", "analyse404Response", "(...
Analyses status codes and checks if a retry needs to happen. Some status codes are ambiguous, so their contents are inspected further. @param status the status code. @param content the error body from the response. @return true if retry is needed, false otherwise.
[ "Analyses", "status", "codes", "and", "checks", "if", "a", "retry", "needs", "to", "happen", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/view/ViewRetryHandler.java#L118-L146
google/closure-compiler
src/com/google/javascript/jscomp/Tracer.java
Tracer.longToPaddedString
private static String longToPaddedString(long v, int digitsColumnWidth) { """ Converts 'v' to a string and pads it with up to 16 spaces for improved alignment. @param v The value to convert. @param digitsColumnWidth The desired with of the string. """ int digitWidth = numDigits(v); StringBuilder sb ...
java
private static String longToPaddedString(long v, int digitsColumnWidth) { int digitWidth = numDigits(v); StringBuilder sb = new StringBuilder(); appendSpaces(sb, digitsColumnWidth - digitWidth); sb.append(v); return sb.toString(); }
[ "private", "static", "String", "longToPaddedString", "(", "long", "v", ",", "int", "digitsColumnWidth", ")", "{", "int", "digitWidth", "=", "numDigits", "(", "v", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "appendSpaces", "(...
Converts 'v' to a string and pads it with up to 16 spaces for improved alignment. @param v The value to convert. @param digitsColumnWidth The desired with of the string.
[ "Converts", "v", "to", "a", "string", "and", "pads", "it", "with", "up", "to", "16", "spaces", "for", "improved", "alignment", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Tracer.java#L295-L301
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_glueRecord_host_DELETE
public net.minidev.ovh.api.domain.OvhTask serviceName_glueRecord_host_DELETE(String serviceName, String host) throws IOException { """ Delete the glue record REST: DELETE /domain/{serviceName}/glueRecord/{host} @param serviceName [required] The internal name of your domain @param host [required] Host of the g...
java
public net.minidev.ovh.api.domain.OvhTask serviceName_glueRecord_host_DELETE(String serviceName, String host) throws IOException { String qPath = "/domain/{serviceName}/glueRecord/{host}"; StringBuilder sb = path(qPath, serviceName, host); String resp = exec(qPath, "DELETE", sb.toString(), null); return convert...
[ "public", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "domain", ".", "OvhTask", "serviceName_glueRecord_host_DELETE", "(", "String", "serviceName", ",", "String", "host", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/{serviceName}/g...
Delete the glue record REST: DELETE /domain/{serviceName}/glueRecord/{host} @param serviceName [required] The internal name of your domain @param host [required] Host of the glue record
[ "Delete", "the", "glue", "record" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1212-L1217
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/detector/Detector.java
Detector.sizeOfBlackWhiteBlackRunBothWays
private float sizeOfBlackWhiteBlackRunBothWays(int fromX, int fromY, int toX, int toY) { """ See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of a finder pattern by looking for a black-white-black run from the center in the direction of another point (another finder pattern cen...
java
private float sizeOfBlackWhiteBlackRunBothWays(int fromX, int fromY, int toX, int toY) { float result = sizeOfBlackWhiteBlackRun(fromX, fromY, toX, toY); // Now count other way -- don't run off image though of course float scale = 1.0f; int otherToX = fromX - (toX - fromX); if (otherToX < 0) { ...
[ "private", "float", "sizeOfBlackWhiteBlackRunBothWays", "(", "int", "fromX", ",", "int", "fromY", ",", "int", "toX", ",", "int", "toY", ")", "{", "float", "result", "=", "sizeOfBlackWhiteBlackRun", "(", "fromX", ",", "fromY", ",", "toX", ",", "toY", ")", "...
See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of a finder pattern by looking for a black-white-black run from the center in the direction of another point (another finder pattern center), and in the opposite direction too.
[ "See", "{" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/detector/Detector.java#L266-L296
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updateMember
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { """ Updates a member of a project. <pre><code>PUT /projects/:projectId/members/:userId</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(...
java
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("access_level", accessLevel, true) .withParam("expires_at", expiresAt, false); Resp...
[ "public", "Member", "updateMember", "(", "Object", "projectIdOrPath", ",", "Integer", "userId", ",", "Integer", "accessLevel", ",", "Date", "expiresAt", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", "...
Updates a member of a project. <pre><code>PUT /projects/:projectId/members/:userId</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param userId the user ID of the member to update, required @param accessLevel the new access le...
[ "Updates", "a", "member", "of", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1381-L1387
betfair/cougar
cougar-framework/jetty-transport/src/main/java/com/betfair/cougar/transport/impl/protocol/http/AbstractHttpCommandProcessor.java
AbstractHttpCommandProcessor.handleResponseWritingIOException
protected CougarException handleResponseWritingIOException(Exception e, Class resultClass) { """ If an exception is received while writing a response to the client, it might be because the that client has closed their connection. If so, the problem should be ignored. """ String errorMessage = "Excepti...
java
protected CougarException handleResponseWritingIOException(Exception e, Class resultClass) { String errorMessage = "Exception writing "+ resultClass.getCanonicalName() +" to http stream"; IOException ioe = getIOException(e); if (ioe == null) { CougarException ce; if (e in...
[ "protected", "CougarException", "handleResponseWritingIOException", "(", "Exception", "e", ",", "Class", "resultClass", ")", "{", "String", "errorMessage", "=", "\"Exception writing \"", "+", "resultClass", ".", "getCanonicalName", "(", ")", "+", "\" to http stream\"", ...
If an exception is received while writing a response to the client, it might be because the that client has closed their connection. If so, the problem should be ignored.
[ "If", "an", "exception", "is", "received", "while", "writing", "a", "response", "to", "the", "client", "it", "might", "be", "because", "the", "that", "client", "has", "closed", "their", "connection", ".", "If", "so", "the", "problem", "should", "be", "igno...
train
https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-framework/jetty-transport/src/main/java/com/betfair/cougar/transport/impl/protocol/http/AbstractHttpCommandProcessor.java#L280-L304
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.invalidRangeIfNot
public static void invalidRangeIfNot(boolean tester, String msg, Object... args) { """ Throws out an {@link InvalidRangeException} with error message specified when `tester` is `false`. @param tester when `false` then throw out the exception @param msg the error message format pattern. @param args the err...
java
public static void invalidRangeIfNot(boolean tester, String msg, Object... args) { if (!tester) { throw new InvalidRangeException(msg, args); } }
[ "public", "static", "void", "invalidRangeIfNot", "(", "boolean", "tester", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "tester", ")", "{", "throw", "new", "InvalidRangeException", "(", "msg", ",", "args", ")", ";", "}", ...
Throws out an {@link InvalidRangeException} with error message specified when `tester` is `false`. @param tester when `false` then throw out the exception @param msg the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "an", "{", "@link", "InvalidRangeException", "}", "with", "error", "message", "specified", "when", "tester", "is", "false", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L498-L502
alkacon/opencms-core
src/org/opencms/ui/login/CmsLoginController.java
CmsLoginController.displayError
private void displayError(String message, boolean showForgotPassword, boolean showTime) { """ Displays the given error message.<p> @param message the message @param showForgotPassword in case the forgot password link should be shown @param showTime show the time """ message = message.replace("\n"...
java
private void displayError(String message, boolean showForgotPassword, boolean showTime) { message = message.replace("\n", "<br />"); if (showForgotPassword) { message += "<br /><br /><a href=\"" + getResetPasswordLink() + "\">" + CmsVaadinUtil...
[ "private", "void", "displayError", "(", "String", "message", ",", "boolean", "showForgotPassword", ",", "boolean", "showTime", ")", "{", "message", "=", "message", ".", "replace", "(", "\"\\n\"", ",", "\"<br />\"", ")", ";", "if", "(", "showForgotPassword", ")...
Displays the given error message.<p> @param message the message @param showForgotPassword in case the forgot password link should be shown @param showTime show the time
[ "Displays", "the", "given", "error", "message", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsLoginController.java#L732-L749
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_dynHost_login_login_DELETE
public void zone_zoneName_dynHost_login_login_DELETE(String zoneName, String login) throws IOException { """ Delete a DynHost login REST: DELETE /domain/zone/{zoneName}/dynHost/login/{login} @param zoneName [required] The internal name of your zone @param login [required] Login """ String qPath = "/doma...
java
public void zone_zoneName_dynHost_login_login_DELETE(String zoneName, String login) throws IOException { String qPath = "/domain/zone/{zoneName}/dynHost/login/{login}"; StringBuilder sb = path(qPath, zoneName, login); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "zone_zoneName_dynHost_login_login_DELETE", "(", "String", "zoneName", ",", "String", "login", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/dynHost/login/{login}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Delete a DynHost login REST: DELETE /domain/zone/{zoneName}/dynHost/login/{login} @param zoneName [required] The internal name of your zone @param login [required] Login
[ "Delete", "a", "DynHost", "login" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L466-L470
SpartaTech/sparta-spring-web-utils
src/main/java/org/sparta/springwebutils/SpringContextUtils.java
SpringContextUtils.setProperties
private static void setProperties(GenericApplicationContext newContext, Properties properties) { """ Set properties into the context. @param newContext new context to add properties @param properties properties to add to the context """ PropertiesPropertySource pps = new PropertiesPropertySource("e...
java
private static void setProperties(GenericApplicationContext newContext, Properties properties) { PropertiesPropertySource pps = new PropertiesPropertySource("external-props", properties); newContext.getEnvironment().getPropertySources().addFirst(pps); }
[ "private", "static", "void", "setProperties", "(", "GenericApplicationContext", "newContext", ",", "Properties", "properties", ")", "{", "PropertiesPropertySource", "pps", "=", "new", "PropertiesPropertySource", "(", "\"external-props\"", ",", "properties", ")", ";", "n...
Set properties into the context. @param newContext new context to add properties @param properties properties to add to the context
[ "Set", "properties", "into", "the", "context", "." ]
train
https://github.com/SpartaTech/sparta-spring-web-utils/blob/f5382474d46a6048d58707fc64e7936277e8b2ce/src/main/java/org/sparta/springwebutils/SpringContextUtils.java#L100-L103
jenetics/jenetics
jenetics/src/main/java/io/jenetics/engine/EvolutionResult.java
EvolutionResult.toUniquePopulation
public static <G extends Gene<?, G>, C extends Comparable<? super C>> UnaryOperator<EvolutionResult<G, C>> toUniquePopulation(final Factory<Genotype<G>> factory) { """ Return a mapping function, which removes duplicate individuals from the population and replaces it with newly created one by the given genotype ...
java
public static <G extends Gene<?, G>, C extends Comparable<? super C>> UnaryOperator<EvolutionResult<G, C>> toUniquePopulation(final Factory<Genotype<G>> factory) { return toUniquePopulation(factory, 100); }
[ "public", "static", "<", "G", "extends", "Gene", "<", "?", ",", "G", ">", ",", "C", "extends", "Comparable", "<", "?", "super", "C", ">", ">", "UnaryOperator", "<", "EvolutionResult", "<", "G", ",", "C", ">", ">", "toUniquePopulation", "(", "final", ...
Return a mapping function, which removes duplicate individuals from the population and replaces it with newly created one by the given genotype {@code factory}. <pre>{@code final Problem<Double, DoubleGene, Integer> problem = ...; final Engine<DoubleGene, Integer> engine = Engine.builder(problem) .mapping(EvolutionRes...
[ "Return", "a", "mapping", "function", "which", "removes", "duplicate", "individuals", "from", "the", "population", "and", "replaces", "it", "with", "newly", "created", "one", "by", "the", "given", "genotype", "{", "@code", "factory", "}", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics/src/main/java/io/jenetics/engine/EvolutionResult.java#L611-L615
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java
RandomUtil.randomDay
public static DateTime randomDay(int min, int max) { """ 以当天为基准,随机产生一个日期 @param min 偏移最小天,可以为负数表示过去的时间 @param max 偏移最大天,可以为负数表示过去的时间 @return 随机日期(随机天,其它时间不变) @since 4.0.8 """ return DateUtil.offsetDay(DateUtil.date(), randomInt(min, max)); }
java
public static DateTime randomDay(int min, int max) { return DateUtil.offsetDay(DateUtil.date(), randomInt(min, max)); }
[ "public", "static", "DateTime", "randomDay", "(", "int", "min", ",", "int", "max", ")", "{", "return", "DateUtil", ".", "offsetDay", "(", "DateUtil", ".", "date", "(", ")", ",", "randomInt", "(", "min", ",", "max", ")", ")", ";", "}" ]
以当天为基准,随机产生一个日期 @param min 偏移最小天,可以为负数表示过去的时间 @param max 偏移最大天,可以为负数表示过去的时间 @return 随机日期(随机天,其它时间不变) @since 4.0.8
[ "以当天为基准,随机产生一个日期" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java#L491-L493
leancloud/java-sdk-all
android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/push/DeleteTokenApi.java
DeleteTokenApi.onConnect
@Override public void onConnect(final int rst, final HuaweiApiClient client) { """ HuaweiApiClient 连接结果回调 @param rst 结果码 @param client HuaweiApiClient 实例 """ //需要在子线程中执行删除TOKEN操作 ThreadUtil.INST.excute(new Runnable() { @Override public void run() { ...
java
@Override public void onConnect(final int rst, final HuaweiApiClient client) { //需要在子线程中执行删除TOKEN操作 ThreadUtil.INST.excute(new Runnable() { @Override public void run() { //调用删除TOKEN需要传入通过getToken接口获取到TOKEN,并且需要对TOKEN进行非空判断 if (!TextUtils...
[ "@", "Override", "public", "void", "onConnect", "(", "final", "int", "rst", ",", "final", "HuaweiApiClient", "client", ")", "{", "//需要在子线程中执行删除TOKEN操作\r", "ThreadUtil", ".", "INST", ".", "excute", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "publ...
HuaweiApiClient 连接结果回调 @param rst 结果码 @param client HuaweiApiClient 实例
[ "HuaweiApiClient", "连接结果回调" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/push/DeleteTokenApi.java#L39-L65
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java
StringToIntTable.put
public final void put(String key, int value) { """ Append a string onto the vector. @param key String to append @param value The int value of the string """ if ((m_firstFree + 1) >= m_mapSize) { m_mapSize += m_blocksize; String newMap[] = new String[m_mapSize]; System.arraycopy...
java
public final void put(String key, int value) { if ((m_firstFree + 1) >= m_mapSize) { m_mapSize += m_blocksize; String newMap[] = new String[m_mapSize]; System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1); m_map = newMap; int newValues[] = new int[m_mapSize]; System...
[ "public", "final", "void", "put", "(", "String", "key", ",", "int", "value", ")", "{", "if", "(", "(", "m_firstFree", "+", "1", ")", ">=", "m_mapSize", ")", "{", "m_mapSize", "+=", "m_blocksize", ";", "String", "newMap", "[", "]", "=", "new", "String...
Append a string onto the vector. @param key String to append @param value The int value of the string
[ "Append", "a", "string", "onto", "the", "vector", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java#L100-L124
kiegroup/drools
drools-core/src/main/java/org/drools/core/reteoo/compiled/AbstractCompilerHandler.java
AbstractCompilerHandler.getVariableName
private String getVariableName(Class clazz, int nodeId) { """ Returns a variable name based on the simple name of the specified class appended with the specified nodeId. @param clazz class whose simple name is lowercased and user as the prefix of the variable name @param nodeId id of {@link org.kie.common.Ne...
java
private String getVariableName(Class clazz, int nodeId) { String type = clazz.getSimpleName(); return Character.toLowerCase(type.charAt(0)) + type.substring(1) + nodeId; }
[ "private", "String", "getVariableName", "(", "Class", "clazz", ",", "int", "nodeId", ")", "{", "String", "type", "=", "clazz", ".", "getSimpleName", "(", ")", ";", "return", "Character", ".", "toLowerCase", "(", "type", ".", "charAt", "(", "0", ")", ")",...
Returns a variable name based on the simple name of the specified class appended with the specified nodeId. @param clazz class whose simple name is lowercased and user as the prefix of the variable name @param nodeId id of {@link org.kie.common.NetworkNode} @return variable name @see Class#getSimpleName()
[ "Returns", "a", "variable", "name", "based", "on", "the", "simple", "name", "of", "the", "specified", "class", "appended", "with", "the", "specified", "nodeId", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/compiled/AbstractCompilerHandler.java#L76-L79
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WLabelRenderer.java
WLabelRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given {@link WLabel}. @param component the WLabel to paint. @param renderContext the RenderContext to paint to. """ WLabel label = (WLabel) component; XmlStringBuilder xml = renderConte...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WLabel label = (WLabel) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:label"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", compone...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WLabel", "label", "=", "(", "WLabel", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext", ...
Paints the given {@link WLabel}. @param component the WLabel to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "{", "@link", "WLabel", "}", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WLabelRenderer.java#L27-L67
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsADEConfigData.java
CmsADEConfigData.getFormattersFromSchema
protected CmsFormatterConfiguration getFormattersFromSchema(CmsObject cms, CmsResource res) { """ Gets the formatters from the schema.<p> @param cms the current CMS context @param res the resource for which the formatters should be retrieved @return the formatters from the schema """ try { ...
java
protected CmsFormatterConfiguration getFormattersFromSchema(CmsObject cms, CmsResource res) { try { return OpenCms.getResourceManager().getResourceType(res.getTypeId()).getFormattersForResource(cms, res); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); ...
[ "protected", "CmsFormatterConfiguration", "getFormattersFromSchema", "(", "CmsObject", "cms", ",", "CmsResource", "res", ")", "{", "try", "{", "return", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceType", "(", "res", ".", "getTypeId", "(", ")",...
Gets the formatters from the schema.<p> @param cms the current CMS context @param res the resource for which the formatters should be retrieved @return the formatters from the schema
[ "Gets", "the", "formatters", "from", "the", "schema", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsADEConfigData.java#L1116-L1124
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/Mapper.java
Mapper.addMappedClass
public MappedClass addMappedClass(final Class c) { """ Creates a MappedClass and validates it. @param c the Class to map @return the MappedClass for the given Class """ MappedClass mappedClass = mappedClasses.get(c.getName()); if (mappedClass == null) { mappedClass = new Mapped...
java
public MappedClass addMappedClass(final Class c) { MappedClass mappedClass = mappedClasses.get(c.getName()); if (mappedClass == null) { mappedClass = new MappedClass(c, this); return addMappedClass(mappedClass, true); } return mappedClass; }
[ "public", "MappedClass", "addMappedClass", "(", "final", "Class", "c", ")", "{", "MappedClass", "mappedClass", "=", "mappedClasses", ".", "get", "(", "c", ".", "getName", "(", ")", ")", ";", "if", "(", "mappedClass", "==", "null", ")", "{", "mappedClass", ...
Creates a MappedClass and validates it. @param c the Class to map @return the MappedClass for the given Class
[ "Creates", "a", "MappedClass", "and", "validates", "it", "." ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/Mapper.java#L168-L176
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_publicFolderQuota_GET
public OvhPublicFolderQuota organizationName_service_exchangeService_publicFolderQuota_GET(String organizationName, String exchangeService) throws IOException { """ Get public folder quota usage in total available space REST: GET /email/exchange/{organizationName}/service/{exchangeService}/publicFolderQuota @p...
java
public OvhPublicFolderQuota organizationName_service_exchangeService_publicFolderQuota_GET(String organizationName, String exchangeService) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolderQuota"; StringBuilder sb = path(qPath, organizationName, exchangeS...
[ "public", "OvhPublicFolderQuota", "organizationName_service_exchangeService_publicFolderQuota_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/service/{exchangeS...
Get public folder quota usage in total available space REST: GET /email/exchange/{organizationName}/service/{exchangeService}/publicFolderQuota @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service
[ "Get", "public", "folder", "quota", "usage", "in", "total", "available", "space" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L364-L369
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance/src/com/ibm/ws/microprofile/faulttolerance/impl/async/QueuedFuture.java
QueuedFuture.start
public void start(ExecutorService executorService, Callable<Future<R>> innerTask, ThreadContextDescriptor threadContext) { """ Submit this task for execution by the given executor service. @param executorService the executor service to use @param innerTask the task to run @param threadContext the thread conte...
java
public void start(ExecutorService executorService, Callable<Future<R>> innerTask, ThreadContextDescriptor threadContext) { synchronized (this) { this.innerTask = innerTask; this.threadContext = threadContext; //set up the future to hold the result this.resultFutur...
[ "public", "void", "start", "(", "ExecutorService", "executorService", ",", "Callable", "<", "Future", "<", "R", ">", ">", "innerTask", ",", "ThreadContextDescriptor", "threadContext", ")", "{", "synchronized", "(", "this", ")", "{", "this", ".", "innerTask", "...
Submit this task for execution by the given executor service. @param executorService the executor service to use @param innerTask the task to run @param threadContext the thread context to apply when running the task
[ "Submit", "this", "task", "for", "execution", "by", "the", "given", "executor", "service", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance/src/com/ibm/ws/microprofile/faulttolerance/impl/async/QueuedFuture.java#L265-L274
dialogflow/dialogflow-android-client
ailib/src/main/java/ai/api/android/AIService.java
AIService.getService
public static AIService getService(final Context context, final AIConfiguration config) { """ Use this method to get ready to work instance @param context @param config @return instance of AIService implementation """ if (config.getRecognitionEngine() == AIConfiguration.RecognitionEngine.Google) { ...
java
public static AIService getService(final Context context, final AIConfiguration config) { if (config.getRecognitionEngine() == AIConfiguration.RecognitionEngine.Google) { return new GoogleRecognitionServiceImpl(context, config); } if (config.getRecognitionEngine() == AIConfiguration....
[ "public", "static", "AIService", "getService", "(", "final", "Context", "context", ",", "final", "AIConfiguration", "config", ")", "{", "if", "(", "config", ".", "getRecognitionEngine", "(", ")", "==", "AIConfiguration", ".", "RecognitionEngine", ".", "Google", ...
Use this method to get ready to work instance @param context @param config @return instance of AIService implementation
[ "Use", "this", "method", "to", "get", "ready", "to", "work", "instance" ]
train
https://github.com/dialogflow/dialogflow-android-client/blob/331f3ae8f2e404e245cc6024fdf44ec99feba7ee/ailib/src/main/java/ai/api/android/AIService.java#L58-L70
JodaOrg/joda-time
src/main/java/org/joda/time/chrono/LimitChronology.java
LimitChronology.getInstance
public static LimitChronology getInstance(Chronology base, ReadableDateTime lowerLimit, ReadableDateTime upperLimit) { """ Wraps another chronology, with datetime limits. When withUTC or withZone is called, the returned Li...
java
public static LimitChronology getInstance(Chronology base, ReadableDateTime lowerLimit, ReadableDateTime upperLimit) { if (base == null) { throw new IllegalArgumentException("Must supply a chronology"); ...
[ "public", "static", "LimitChronology", "getInstance", "(", "Chronology", "base", ",", "ReadableDateTime", "lowerLimit", ",", "ReadableDateTime", "upperLimit", ")", "{", "if", "(", "base", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"...
Wraps another chronology, with datetime limits. When withUTC or withZone is called, the returned LimitChronology instance has the same limits, except they are time zone adjusted. @param base base chronology to wrap @param lowerLimit inclusive lower limit, or null if none @param upperLimit exclusive upper limit, or ...
[ "Wraps", "another", "chronology", "with", "datetime", "limits", ".", "When", "withUTC", "or", "withZone", "is", "called", "the", "returned", "LimitChronology", "instance", "has", "the", "same", "limits", "except", "they", "are", "time", "zone", "adjusted", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/chrono/LimitChronology.java#L64-L80
PvdBerg1998/PNet
src/main/java/nl/pvdberg/pnet/event/PacketDistributer.java
PacketDistributer.addHandler
public synchronized void addHandler(final short packetID, final PacketHandler packetHandler) { """ Adds a new handler for this specific Packet ID @param packetID Packet ID to add handler for @param packetHandler Handler for given Packet ID @throws IllegalArgumentException when Packet ID already has a registered...
java
public synchronized void addHandler(final short packetID, final PacketHandler packetHandler) { if (registry.containsKey(packetID)) throw new IllegalArgumentException("Handler for ID: " + packetID + " already exists"); registry.put(packetID, packetHandler); }
[ "public", "synchronized", "void", "addHandler", "(", "final", "short", "packetID", ",", "final", "PacketHandler", "packetHandler", ")", "{", "if", "(", "registry", ".", "containsKey", "(", "packetID", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\...
Adds a new handler for this specific Packet ID @param packetID Packet ID to add handler for @param packetHandler Handler for given Packet ID @throws IllegalArgumentException when Packet ID already has a registered handler
[ "Adds", "a", "new", "handler", "for", "this", "specific", "Packet", "ID" ]
train
https://github.com/PvdBerg1998/PNet/blob/d3dfff2ceaf69c244e0593e3f7606f171ec718bb/src/main/java/nl/pvdberg/pnet/event/PacketDistributer.java#L70-L74
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java
TaskProxy.createRemoteTask
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException { """ Build a new remote session and initialize it. NOTE: This is convenience method to create a task below the current APPLICATION (not below this task) @param properties to create the new remote task @return The remote T...
java
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException { // Note: This new task's parent is MY application! BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_TASK); // Don't use my method yet, since I don't have the returned ID transport.addParam(...
[ "public", "RemoteTask", "createRemoteTask", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "// Note: This new task's parent is MY application!", "BaseTransport", "transport", "=", "this", ".", "createProxyTransport", "(...
Build a new remote session and initialize it. NOTE: This is convenience method to create a task below the current APPLICATION (not below this task) @param properties to create the new remote task @return The remote Task.
[ "Build", "a", "new", "remote", "session", "and", "initialize", "it", ".", "NOTE", ":", "This", "is", "convenience", "method", "to", "create", "a", "task", "below", "the", "current", "APPLICATION", "(", "not", "below", "this", "task", ")" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java#L117-L123
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java
Pattern.checkLabels
private void checkLabels(boolean forGenerative, String... label) { """ Checks if all labels (other than the last if generative) exists. @param forGenerative whether the check is performed for a generative constraint @param label labels to check @throws IllegalArgumentException when a necessary label is not foun...
java
private void checkLabels(boolean forGenerative, String... label) { for (int i = 0; i < (forGenerative ? label.length - 1 : label.length); i++) { if (!hasLabel(label[i])) throw new IllegalArgumentException( "Label neither found, nor generated: " + label[i]); } }
[ "private", "void", "checkLabels", "(", "boolean", "forGenerative", ",", "String", "...", "label", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "(", "forGenerative", "?", "label", ".", "length", "-", "1", ":", "label", ".", "length", ")"...
Checks if all labels (other than the last if generative) exists. @param forGenerative whether the check is performed for a generative constraint @param label labels to check @throws IllegalArgumentException when a necessary label is not found
[ "Checks", "if", "all", "labels", "(", "other", "than", "the", "last", "if", "generative", ")", "exists", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L264-L271
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.concatColumnsMulti
public static DMatrixRMaj concatColumnsMulti(DMatrixRMaj ...m ) { """ <p>Concatinates all the matrices together along their columns. If the rows do not match the upper elements are set to zero.</p> A = [ m[0] , ... , m[n-1] ] @param m Set of matrices @return Resulting matrix """ int rows = 0; ...
java
public static DMatrixRMaj concatColumnsMulti(DMatrixRMaj ...m ) { int rows = 0; int cols = 0; for (int i = 0; i < m.length; i++) { rows = Math.max(rows,m[i].numRows); cols += m[i].numCols; } DMatrixRMaj R = new DMatrixRMaj(rows,cols); int col = 0...
[ "public", "static", "DMatrixRMaj", "concatColumnsMulti", "(", "DMatrixRMaj", "...", "m", ")", "{", "int", "rows", "=", "0", ";", "int", "cols", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m", ".", "length", ";", "i", "++", ")...
<p>Concatinates all the matrices together along their columns. If the rows do not match the upper elements are set to zero.</p> A = [ m[0] , ... , m[n-1] ] @param m Set of matrices @return Resulting matrix
[ "<p", ">", "Concatinates", "all", "the", "matrices", "together", "along", "their", "columns", ".", "If", "the", "rows", "do", "not", "match", "the", "upper", "elements", "are", "set", "to", "zero", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L2815-L2832