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
alkacon/opencms-core
src/org/opencms/flex/CmsFlexController.java
CmsFlexController.isNotModifiedSince
public static boolean isNotModifiedSince(HttpServletRequest req, long dateLastModified) { """ Checks if the request has the "If-Modified-Since" header set, and if so, if the header date value is equal to the provided last modification date.<p> @param req the request to set the "If-Modified-Since" date header f...
java
public static boolean isNotModifiedSince(HttpServletRequest req, long dateLastModified) { // check if the request contains a last modified header try { long lastModifiedHeader = req.getDateHeader(CmsRequestUtil.HEADER_IF_MODIFIED_SINCE); // if last modified header is set (> -1),...
[ "public", "static", "boolean", "isNotModifiedSince", "(", "HttpServletRequest", "req", ",", "long", "dateLastModified", ")", "{", "// check if the request contains a last modified header", "try", "{", "long", "lastModifiedHeader", "=", "req", ".", "getDateHeader", "(", "C...
Checks if the request has the "If-Modified-Since" header set, and if so, if the header date value is equal to the provided last modification date.<p> @param req the request to set the "If-Modified-Since" date header from @param dateLastModified the date to compare the header with @return <code>true</code> if the head...
[ "Checks", "if", "the", "request", "has", "the", "If", "-", "Modified", "-", "Since", "header", "set", "and", "if", "so", "if", "the", "header", "date", "value", "is", "equal", "to", "the", "provided", "last", "modification", "date", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexController.java#L265-L287
fcrepo4/fcrepo4
fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/responses/ViewHelpers.java
ViewHelpers.getVersions
public Iterator<Node> getVersions(final Graph graph, final Node subject) { """ Return an iterator of Triples for versions. @param graph the graph @param subject the subject @return iterator """ // Mementos should be ordered by date so use the getOrderedVersions. return getOrderedVe...
java
public Iterator<Node> getVersions(final Graph graph, final Node subject) { // Mementos should be ordered by date so use the getOrderedVersions. return getOrderedVersions(graph, subject, CONTAINS.asResource()); }
[ "public", "Iterator", "<", "Node", ">", "getVersions", "(", "final", "Graph", "graph", ",", "final", "Node", "subject", ")", "{", "// Mementos should be ordered by date so use the getOrderedVersions.", "return", "getOrderedVersions", "(", "graph", ",", "subject", ",", ...
Return an iterator of Triples for versions. @param graph the graph @param subject the subject @return iterator
[ "Return", "an", "iterator", "of", "Triples", "for", "versions", "." ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/responses/ViewHelpers.java#L106-L110
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/util/Utils.java
Utils.retrieveProxy
public static Protocol retrieveProxy(final UrlParser urlParser, final GlobalStateInfo globalInfo) throws SQLException { """ Retrieve protocol corresponding to the failover options. if no failover option, protocol will not be proxied. if a failover option is precised, protocol will be proxied so that any co...
java
public static Protocol retrieveProxy(final UrlParser urlParser, final GlobalStateInfo globalInfo) throws SQLException { final ReentrantLock lock = new ReentrantLock(); Protocol protocol; switch (urlParser.getHaMode()) { case AURORA: return getProxyLoggingIfNeeded(urlParser, (Protocol) Pr...
[ "public", "static", "Protocol", "retrieveProxy", "(", "final", "UrlParser", "urlParser", ",", "final", "GlobalStateInfo", "globalInfo", ")", "throws", "SQLException", "{", "final", "ReentrantLock", "lock", "=", "new", "ReentrantLock", "(", ")", ";", "Protocol", "p...
Retrieve protocol corresponding to the failover options. if no failover option, protocol will not be proxied. if a failover option is precised, protocol will be proxied so that any connection error will be handle directly. @param urlParser urlParser corresponding to connection url string. @param globalInfo global var...
[ "Retrieve", "protocol", "corresponding", "to", "the", "failover", "options", ".", "if", "no", "failover", "option", "protocol", "will", "not", "be", "proxied", ".", "if", "a", "failover", "option", "is", "precised", "protocol", "will", "be", "proxied", "so", ...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/util/Utils.java#L535-L563
aws/aws-sdk-java
aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ListQueryLoggingConfigsResult.java
ListQueryLoggingConfigsResult.getQueryLoggingConfigs
public java.util.List<QueryLoggingConfig> getQueryLoggingConfigs() { """ <p> An array that contains one <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html">QueryLoggingConfig</a> element for each configuration for DNS query logging that is associated with the current AW...
java
public java.util.List<QueryLoggingConfig> getQueryLoggingConfigs() { if (queryLoggingConfigs == null) { queryLoggingConfigs = new com.amazonaws.internal.SdkInternalList<QueryLoggingConfig>(); } return queryLoggingConfigs; }
[ "public", "java", ".", "util", ".", "List", "<", "QueryLoggingConfig", ">", "getQueryLoggingConfigs", "(", ")", "{", "if", "(", "queryLoggingConfigs", "==", "null", ")", "{", "queryLoggingConfigs", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "...
<p> An array that contains one <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html">QueryLoggingConfig</a> element for each configuration for DNS query logging that is associated with the current AWS account. </p> @return An array that contains one <a href="https://docs.aws.ama...
[ "<p", ">", "An", "array", "that", "contains", "one", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "Route53", "/", "latest", "/", "APIReference", "/", "API_QueryLoggingConfig", ".", "html", ">", "QueryLoggingC...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ListQueryLoggingConfigsResult.java#L61-L66
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ClassUtils.java
ClassUtils.loadClass
@SuppressWarnings("unchecked") public static <T> Class<T> loadClass(String fullyQualifiedClassName, boolean initialize, ClassLoader classLoader) { """ Loads the Class object for the specified, fully qualified class name using the provided ClassLoader and the option to initialize the class (calling any static in...
java
@SuppressWarnings("unchecked") public static <T> Class<T> loadClass(String fullyQualifiedClassName, boolean initialize, ClassLoader classLoader) { try { return (Class<T>) Class.forName(fullyQualifiedClassName, initialize, classLoader); } catch (ClassNotFoundException | NoClassDefFoundError cause) {...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "Class", "<", "T", ">", "loadClass", "(", "String", "fullyQualifiedClassName", ",", "boolean", "initialize", ",", "ClassLoader", "classLoader", ")", "{", "try", "{", "return...
Loads the Class object for the specified, fully qualified class name using the provided ClassLoader and the option to initialize the class (calling any static initializers) once loaded. @param <T> {@link Class} type of T. @param fullyQualifiedClassName a String indicating the fully qualified class name of the Class to...
[ "Loads", "the", "Class", "object", "for", "the", "specified", "fully", "qualified", "class", "name", "using", "the", "provided", "ClassLoader", "and", "the", "option", "to", "initialize", "the", "class", "(", "calling", "any", "static", "initializers", ")", "o...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ClassUtils.java#L757-L766
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/ItemsUpdateImpl.java
ItemsUpdateImpl.maybeGrowLevels
static <T> void maybeGrowLevels(final ItemsSketch<T> sketch, final long newN) { """ This only increases the size and does not touch or move any data. """ // important: newN might not equal n_ final int k = sketch.getK(); final int numLevelsNeeded = Util.computeNumLevelsNeeded(k, newN); if (numL...
java
static <T> void maybeGrowLevels(final ItemsSketch<T> sketch, final long newN) { // important: newN might not equal n_ final int k = sketch.getK(); final int numLevelsNeeded = Util.computeNumLevelsNeeded(k, newN); if (numLevelsNeeded == 0) { // don't need any levels yet, and might have small base b...
[ "static", "<", "T", ">", "void", "maybeGrowLevels", "(", "final", "ItemsSketch", "<", "T", ">", "sketch", ",", "final", "long", "newN", ")", "{", "// important: newN might not equal n_", "final", "int", "k", "=", "sketch", ".", "getK", "(", ")", ";", "fina...
This only increases the size and does not touch or move any data.
[ "This", "only", "increases", "the", "size", "and", "does", "not", "touch", "or", "move", "any", "data", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/ItemsUpdateImpl.java#L17-L35
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java
JPAGenericDAORulesBasedImpl.addQueryParameters
protected void addQueryParameters(Query query, Map<String, Object> parameters) { """ Méthode d'ajout de parametres à la requete @param query Requete @param parameters Map des parametres """ // Si la MAP est nulle if(parameters == null || parameters.size() == 0) return; // Parcours for(Ent...
java
protected void addQueryParameters(Query query, Map<String, Object> parameters) { // Si la MAP est nulle if(parameters == null || parameters.size() == 0) return; // Parcours for(Entry<String, Object> entry : parameters.entrySet()) { // Ajout query.setParameter(entry.getKey(), entry.getVa...
[ "protected", "void", "addQueryParameters", "(", "Query", "query", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "{", "// Si la MAP est nulle\r", "if", "(", "parameters", "==", "null", "||", "parameters", ".", "size", "(", ")", "==", "0", ...
Méthode d'ajout de parametres à la requete @param query Requete @param parameters Map des parametres
[ "Méthode", "d", "ajout", "de", "parametres", "à", "la", "requete" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java#L655-L666
jenkinsci/jenkins
core/src/main/java/jenkins/util/xml/XMLUtils.java
XMLUtils.getValue
public static @Nonnull String getValue(@Nonnull String xpath, @Nonnull File file) throws IOException, SAXException, XPathExpressionException { """ The a "value" from an XML file using XPath. <p> Uses the system encoding for reading the file. @param xpath The XPath expression to select the value. @param file ...
java
public static @Nonnull String getValue(@Nonnull String xpath, @Nonnull File file) throws IOException, SAXException, XPathExpressionException { return getValue(xpath, file, Charset.defaultCharset().toString()); }
[ "public", "static", "@", "Nonnull", "String", "getValue", "(", "@", "Nonnull", "String", "xpath", ",", "@", "Nonnull", "File", "file", ")", "throws", "IOException", ",", "SAXException", ",", "XPathExpressionException", "{", "return", "getValue", "(", "xpath", ...
The a "value" from an XML file using XPath. <p> Uses the system encoding for reading the file. @param xpath The XPath expression to select the value. @param file The file to read. @return The data value. An empty {@link String} is returned when the expression does not evaluate to anything in the document. @throws IOEx...
[ "The", "a", "value", "from", "an", "XML", "file", "using", "XPath", ".", "<p", ">", "Uses", "the", "system", "encoding", "for", "reading", "the", "file", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/xml/XMLUtils.java#L163-L165
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.isAfter
public static IsAfter isAfter(Expression<Date> left, Expression<Date> right) { """ Creates an IsAfter expression from the given expressions. @param left The left hand side of the comparison @param right The right hand side of the comparison. @return An IsBefore expression. """ return new IsAfter(l...
java
public static IsAfter isAfter(Expression<Date> left, Expression<Date> right) { return new IsAfter(left, right); }
[ "public", "static", "IsAfter", "isAfter", "(", "Expression", "<", "Date", ">", "left", ",", "Expression", "<", "Date", ">", "right", ")", "{", "return", "new", "IsAfter", "(", "left", ",", "right", ")", ";", "}" ]
Creates an IsAfter expression from the given expressions. @param left The left hand side of the comparison @param right The right hand side of the comparison. @return An IsBefore expression.
[ "Creates", "an", "IsAfter", "expression", "from", "the", "given", "expressions", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L755-L757
lopspower/CircularProgressBar
circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java
CircularProgressBar.setProgressWithAnimation
public void setProgressWithAnimation(float progress, int duration) { """ Set the progress with an animation. @param progress The progress it should animate to it. @param duration The length of the animation, in milliseconds. """ if (progressAnimator != null) { progressAnimator.cancel();...
java
public void setProgressWithAnimation(float progress, int duration) { if (progressAnimator != null) { progressAnimator.cancel(); } progressAnimator = ValueAnimator.ofFloat(this.progress, progress); progressAnimator.setDuration(duration); progressAnimator.addUpdateListe...
[ "public", "void", "setProgressWithAnimation", "(", "float", "progress", ",", "int", "duration", ")", "{", "if", "(", "progressAnimator", "!=", "null", ")", "{", "progressAnimator", ".", "cancel", "(", ")", ";", "}", "progressAnimator", "=", "ValueAnimator", "....
Set the progress with an animation. @param progress The progress it should animate to it. @param duration The length of the animation, in milliseconds.
[ "Set", "the", "progress", "with", "an", "animation", "." ]
train
https://github.com/lopspower/CircularProgressBar/blob/a805979677f76f6a441dfca2f85f3b01ae6a3e18/circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java#L211-L229
apereo/cas
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java
DelegatedClientWebflowManager.retrieveSessionTicketViaClientId
protected TransientSessionTicket retrieveSessionTicketViaClientId(final WebContext webContext, final String clientId) { """ Retrieve session ticket via client id. @param webContext the web context @param clientId the client id @return the transient session ticket """ val ticket = this.ticketRegi...
java
protected TransientSessionTicket retrieveSessionTicketViaClientId(final WebContext webContext, final String clientId) { val ticket = this.ticketRegistry.getTicket(clientId, TransientSessionTicket.class); if (ticket == null) { LOGGER.error("Delegated client identifier cannot be located in the...
[ "protected", "TransientSessionTicket", "retrieveSessionTicketViaClientId", "(", "final", "WebContext", "webContext", ",", "final", "String", "clientId", ")", "{", "val", "ticket", "=", "this", ".", "ticketRegistry", ".", "getTicket", "(", "clientId", ",", "TransientSe...
Retrieve session ticket via client id. @param webContext the web context @param clientId the client id @return the transient session ticket
[ "Retrieve", "session", "ticket", "via", "client", "id", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java#L182-L195
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinitionBuilder.java
SimpleAttributeDefinitionBuilder.create
public static SimpleAttributeDefinitionBuilder create(final String name, final ModelNode node) { """ /* "code" => { "type" => STRING, "description" => "Fully Qualified Name of the Security Vault Implementation.", "expressions-allowed" => false, "nillable" => true, "min-length" => 1L, "max-length" => 2147483...
java
public static SimpleAttributeDefinitionBuilder create(final String name, final ModelNode node) { ModelType type = node.get(ModelDescriptionConstants.TYPE).asType(); boolean nillable = node.get(ModelDescriptionConstants.NILLABLE).asBoolean(true); boolean expressionAllowed = node.get(ModelDescript...
[ "public", "static", "SimpleAttributeDefinitionBuilder", "create", "(", "final", "String", "name", ",", "final", "ModelNode", "node", ")", "{", "ModelType", "type", "=", "node", ".", "get", "(", "ModelDescriptionConstants", ".", "TYPE", ")", ".", "asType", "(", ...
/* "code" => { "type" => STRING, "description" => "Fully Qualified Name of the Security Vault Implementation.", "expressions-allowed" => false, "nillable" => true, "min-length" => 1L, "max-length" => 2147483647L, "access-type" => "read-write", "storage" => "configuration", "restart-required" => "no-services" },
[ "/", "*", "code", "=", ">", "{", "type", "=", ">", "STRING", "description", "=", ">", "Fully", "Qualified", "Name", "of", "the", "Security", "Vault", "Implementation", ".", "expressions", "-", "allowed", "=", ">", "false", "nillable", "=", ">", "true", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinitionBuilder.java#L61-L69
liyiorg/weixin-popular
src/main/java/weixin/popular/util/XMLConverUtil.java
XMLConverUtil.convertToObject
@SuppressWarnings("unchecked") public static <T> T convertToObject(Class<T> clazz, Reader reader) { """ XML to Object @param <T> T @param clazz clazz @param reader reader @return T """ try { /** * XXE 漏洞 * https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sh...
java
@SuppressWarnings("unchecked") public static <T> T convertToObject(Class<T> clazz, Reader reader) { try { /** * XXE 漏洞 * https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet#JAXB_Unmarshaller */ SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setFea...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "convertToObject", "(", "Class", "<", "T", ">", "clazz", ",", "Reader", "reader", ")", "{", "try", "{", "/**\r\n\t\t\t * XXE 漏洞\r\n\t\t\t * https://www.owasp.org/index.php/XM...
XML to Object @param <T> T @param clazz clazz @param reader reader @return T
[ "XML", "to", "Object" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/util/XMLConverUtil.java#L109-L132
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Image.java
Image.drawFlash
public void drawFlash(float x,float y,float width,float height) { """ Draw this image at a specified location and size as a silohette @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to render the ...
java
public void drawFlash(float x,float y,float width,float height) { drawFlash(x,y,width,height,Color.white); }
[ "public", "void", "drawFlash", "(", "float", "x", ",", "float", "y", ",", "float", "width", ",", "float", "height", ")", "{", "drawFlash", "(", "x", ",", "y", ",", "width", ",", "height", ",", "Color", ".", "white", ")", ";", "}" ]
Draw this image at a specified location and size as a silohette @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to render the image at
[ "Draw", "this", "image", "at", "a", "specified", "location", "and", "size", "as", "a", "silohette" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Image.java#L805-L807
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java
ModuleSummaryBuilder.buildModuleDoc
public void buildModuleDoc(XMLNode node, Content contentTree) throws DocletException { """ Build the module documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added @throws DocletException if there is a ...
java
public void buildModuleDoc(XMLNode node, Content contentTree) throws DocletException { contentTree = moduleWriter.getModuleHeader(mdle.getQualifiedName().toString()); buildChildren(node, contentTree); moduleWriter.addModuleFooter(contentTree); moduleWriter.printDocument(contentTree); ...
[ "public", "void", "buildModuleDoc", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "DocletException", "{", "contentTree", "=", "moduleWriter", ".", "getModuleHeader", "(", "mdle", ".", "getQualifiedName", "(", ")", ".", "toString", "(", ")...
Build the module documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "module", "documentation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java#L133-L139
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/bucket/api/Utils.java
Utils.putIfNotNull
private static void putIfNotNull(final Map<String, Object> map, final String key, final Object value) { """ Helper method to avoid ugly if/else blocks in {@link #formatTimeout(CouchbaseRequest, long)}. """ if (value != null) { map.put(key, value); } }
java
private static void putIfNotNull(final Map<String, Object> map, final String key, final Object value) { if (value != null) { map.put(key, value); } }
[ "private", "static", "void", "putIfNotNull", "(", "final", "Map", "<", "String", ",", "Object", ">", "map", ",", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "map", ".", "put", "(", ...
Helper method to avoid ugly if/else blocks in {@link #formatTimeout(CouchbaseRequest, long)}.
[ "Helper", "method", "to", "avoid", "ugly", "if", "/", "else", "blocks", "in", "{" ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/bucket/api/Utils.java#L94-L98
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/actions/AuthenticationExceptionHandlerAction.java
AuthenticationExceptionHandlerAction.handleAbstractTicketException
protected String handleAbstractTicketException(final AbstractTicketException e, final RequestContext requestContext) { """ Maps an {@link AbstractTicketException} onto a state name equal to the simple class name of the exception with highest precedence. Also sets an ERROR severity message in the message context w...
java
protected String handleAbstractTicketException(final AbstractTicketException e, final RequestContext requestContext) { val messageContext = requestContext.getMessageContext(); val match = this.errors.stream() .filter(c -> c.isInstance(e)).map(Class::getSimpleName) .findFirst(); ...
[ "protected", "String", "handleAbstractTicketException", "(", "final", "AbstractTicketException", "e", ",", "final", "RequestContext", "requestContext", ")", "{", "val", "messageContext", "=", "requestContext", ".", "getMessageContext", "(", ")", ";", "val", "match", "...
Maps an {@link AbstractTicketException} onto a state name equal to the simple class name of the exception with highest precedence. Also sets an ERROR severity message in the message context with the error code found in {@link AbstractTicketException#getCode()}. If no match is found, {@value #UNKNOWN} is returned. @par...
[ "Maps", "an", "{", "@link", "AbstractTicketException", "}", "onto", "a", "state", "name", "equal", "to", "the", "simple", "class", "name", "of", "the", "exception", "with", "highest", "precedence", ".", "Also", "sets", "an", "ERROR", "severity", "message", "...
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/actions/AuthenticationExceptionHandlerAction.java#L137-L145
haifengl/smile
core/src/main/java/smile/clustering/XMeans.java
XMeans.logLikelihood
private static double logLikelihood(int k, int n, int ni, int d, double variance) { """ Estimate the log-likelihood of the data for the given model. @param k the number of clusters. @param n the total number of samples. @param ni the number of samples belong to this cluster. @param d the dimensionality of da...
java
private static double logLikelihood(int k, int n, int ni, int d, double variance) { double p1 = -ni * LOG2PI; double p2 = -ni * d * Math.log(variance); double p3 = -(ni - k); double p4 = ni * Math.log(ni); double p5 = -ni * Math.log(n); double loglike = (p1 + p2 + p3) / 2...
[ "private", "static", "double", "logLikelihood", "(", "int", "k", ",", "int", "n", ",", "int", "ni", ",", "int", "d", ",", "double", "variance", ")", "{", "double", "p1", "=", "-", "ni", "*", "LOG2PI", ";", "double", "p2", "=", "-", "ni", "*", "d"...
Estimate the log-likelihood of the data for the given model. @param k the number of clusters. @param n the total number of samples. @param ni the number of samples belong to this cluster. @param d the dimensionality of data. @param variance the estimated variance of clusters. @return the likelihood estimate
[ "Estimate", "the", "log", "-", "likelihood", "of", "the", "data", "for", "the", "given", "model", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/clustering/XMeans.java#L225-L233
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/EC2CredentialsFetcher.java
EC2CredentialsFetcher.handleError
private void handleError(String errorMessage, Exception e) { """ Handles reporting or throwing an error encountered while requesting credentials from the Amazon EC2 endpoint. The Service could be briefly unavailable for a number of reasons, so we need to gracefully handle falling back to valid credentials if th...
java
private void handleError(String errorMessage, Exception e) { // If we don't have any valid credentials to fall back on, then throw an exception if (credentials == null || expired()) throw new SdkClientException(errorMessage, e); // Otherwise, just log the error and continuing using ...
[ "private", "void", "handleError", "(", "String", "errorMessage", ",", "Exception", "e", ")", "{", "// If we don't have any valid credentials to fall back on, then throw an exception", "if", "(", "credentials", "==", "null", "||", "expired", "(", ")", ")", "throw", "new"...
Handles reporting or throwing an error encountered while requesting credentials from the Amazon EC2 endpoint. The Service could be briefly unavailable for a number of reasons, so we need to gracefully handle falling back to valid credentials if they're available, and only throw exceptions if we really can't recover. @...
[ "Handles", "reporting", "or", "throwing", "an", "error", "encountered", "while", "requesting", "credentials", "from", "the", "Amazon", "EC2", "endpoint", ".", "The", "Service", "could", "be", "briefly", "unavailable", "for", "a", "number", "of", "reasons", "so",...
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/EC2CredentialsFetcher.java#L177-L184
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/interfaces/InetAddressMatchInterfaceCriteria.java
InetAddressMatchInterfaceCriteria.isAcceptable
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { """ {@inheritDoc} @return <code>getAddress()</code> if the <code>address</code> is the same as the one returned by {@link #getAddress()}. """ try { InetAddre...
java
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { try { InetAddress toMatch = getAddress(); // One time only warn against use of wildcard addresses if (!anyLocalLogged && toMatch.isAnyLocalAddres...
[ "@", "Override", "protected", "InetAddress", "isAcceptable", "(", "NetworkInterface", "networkInterface", ",", "InetAddress", "address", ")", "throws", "SocketException", "{", "try", "{", "InetAddress", "toMatch", "=", "getAddress", "(", ")", ";", "// One time only wa...
{@inheritDoc} @return <code>getAddress()</code> if the <code>address</code> is the same as the one returned by {@link #getAddress()}.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/interfaces/InetAddressMatchInterfaceCriteria.java#L114-L141
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/android/Facebook.java
Facebook.authorizeCallback
@Deprecated public void authorizeCallback(int requestCode, int resultCode, Intent data) { """ IMPORTANT: If you are using the deprecated authorize() method, this method must be invoked at the top of the calling activity's onActivityResult() function or Facebook authentication will not function properly! <p...
java
@Deprecated public void authorizeCallback(int requestCode, int resultCode, Intent data) { checkUserSession("authorizeCallback"); Session pending = this.pendingOpeningSession; if (pending != null) { if (pending.onActivityResult(this.pendingAuthorizationActivity, requestCode, resul...
[ "@", "Deprecated", "public", "void", "authorizeCallback", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "data", ")", "{", "checkUserSession", "(", "\"authorizeCallback\"", ")", ";", "Session", "pending", "=", "this", ".", "pendingOpeningSessi...
IMPORTANT: If you are using the deprecated authorize() method, this method must be invoked at the top of the calling activity's onActivityResult() function or Facebook authentication will not function properly! <p/> If your calling activity does not currently implement onActivityResult(), you must implement it and incl...
[ "IMPORTANT", ":", "If", "you", "are", "using", "the", "deprecated", "authorize", "()", "method", "this", "method", "must", "be", "invoked", "at", "the", "top", "of", "the", "calling", "activity", "s", "onActivityResult", "()", "function", "or", "Facebook", "...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/android/Facebook.java#L422-L433
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/CirculantGraph.java
CirculantGraph.addRange
public CirculantGraph addRange(long offset, long length) { """ Required configuration for each range of offsets in the graph. @param offset first offset appointing the vertices' position @param length number of contiguous offsets in range @return this """ Preconditions.checkArgument(offset >= MINIMUM_OF...
java
public CirculantGraph addRange(long offset, long length) { Preconditions.checkArgument(offset >= MINIMUM_OFFSET, "Range offset must be at least " + MINIMUM_OFFSET); Preconditions.checkArgument(length <= vertexCount - offset, "Range length must not be greater than the vertex count minus the range offset."); ...
[ "public", "CirculantGraph", "addRange", "(", "long", "offset", ",", "long", "length", ")", "{", "Preconditions", ".", "checkArgument", "(", "offset", ">=", "MINIMUM_OFFSET", ",", "\"Range offset must be at least \"", "+", "MINIMUM_OFFSET", ")", ";", "Preconditions", ...
Required configuration for each range of offsets in the graph. @param offset first offset appointing the vertices' position @param length number of contiguous offsets in range @return this
[ "Required", "configuration", "for", "each", "range", "of", "offsets", "in", "the", "graph", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/CirculantGraph.java#L81-L90
samuelcampos/usbdrivedetector
src/main/java/net/samuelcampos/usbdrivedetector/USBDeviceDetectorManager.java
USBDeviceDetectorManager.updateConnectedDevices
private void updateConnectedDevices(final List<USBStorageDevice> currentConnectedDevices) { """ Updates the internal state of this manager and sends @param currentConnectedDevices a list with the currently connected USB storage devices """ final List<USBStorageDevice> removedDevices = new ArrayList<...
java
private void updateConnectedDevices(final List<USBStorageDevice> currentConnectedDevices) { final List<USBStorageDevice> removedDevices = new ArrayList<>(); synchronized (this) { final Iterator<USBStorageDevice> itConnectedDevices = connectedDevices.iterator(); while (itConnect...
[ "private", "void", "updateConnectedDevices", "(", "final", "List", "<", "USBStorageDevice", ">", "currentConnectedDevices", ")", "{", "final", "List", "<", "USBStorageDevice", ">", "removedDevices", "=", "new", "ArrayList", "<>", "(", ")", ";", "synchronized", "("...
Updates the internal state of this manager and sends @param currentConnectedDevices a list with the currently connected USB storage devices
[ "Updates", "the", "internal", "state", "of", "this", "manager", "and", "sends" ]
train
https://github.com/samuelcampos/usbdrivedetector/blob/2f45c2a189b0ea5ba29cd4d408032f48a6b5a3bc/src/main/java/net/samuelcampos/usbdrivedetector/USBDeviceDetectorManager.java#L177-L203
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/OverlapResolver.java
OverlapResolver.getAtomOverlapScore
public double getAtomOverlapScore(IAtomContainer ac, Vector overlappingAtoms) { """ Calculates a score based on the overlap of atoms. The overlap is calculated by summing up the distances between all pairs of atoms, if they are less than half the standard bondlength apart. @param ac The Atomco...
java
public double getAtomOverlapScore(IAtomContainer ac, Vector overlappingAtoms) { overlappingAtoms.removeAllElements(); IAtom atom1 = null; IAtom atom2 = null; Point2d p1 = null; Point2d p2 = null; double distance = 0; double overlapScore = 0; double bondLen...
[ "public", "double", "getAtomOverlapScore", "(", "IAtomContainer", "ac", ",", "Vector", "overlappingAtoms", ")", "{", "overlappingAtoms", ".", "removeAllElements", "(", ")", ";", "IAtom", "atom1", "=", "null", ";", "IAtom", "atom2", "=", "null", ";", "Point2d", ...
Calculates a score based on the overlap of atoms. The overlap is calculated by summing up the distances between all pairs of atoms, if they are less than half the standard bondlength apart. @param ac The Atomcontainer to work on @param overlappingAtoms Description of the Parameter @return ...
[ "Calculates", "a", "score", "based", "on", "the", "overlap", "of", "atoms", ".", "The", "overlap", "is", "calculated", "by", "summing", "up", "the", "distances", "between", "all", "pairs", "of", "atoms", "if", "they", "are", "less", "than", "half", "the", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/OverlapResolver.java#L178-L206
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java
AbstractElementVisitor6.visitModule
@Override public R visitModule(ModuleElement e, P p) { """ {@inheritDoc} @implSpec Visits a {@code ModuleElement} by calling {@code visitUnknown}. @param e {@inheritDoc} @param p {@inheritDoc} @return the result of {@code visitUnknown} @since 9 @spec JPMS """ // Use implementation fr...
java
@Override public R visitModule(ModuleElement e, P p) { // Use implementation from interface default method return ElementVisitor.super.visitModule(e, p); }
[ "@", "Override", "public", "R", "visitModule", "(", "ModuleElement", "e", ",", "P", "p", ")", "{", "// Use implementation from interface default method", "return", "ElementVisitor", ".", "super", ".", "visitModule", "(", "e", ",", "p", ")", ";", "}" ]
{@inheritDoc} @implSpec Visits a {@code ModuleElement} by calling {@code visitUnknown}. @param e {@inheritDoc} @param p {@inheritDoc} @return the result of {@code visitUnknown} @since 9 @spec JPMS
[ "{", "@inheritDoc", "}" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java#L141-L145
probedock/probedock-java
src/main/java/io/probedock/client/utils/EnvironmentUtils.java
EnvironmentUtils.getEnvironmentBoolean
public static Boolean getEnvironmentBoolean(String name, Boolean defaultValue) { """ Retrieve boolean value for the environment variable name @param name The name of the variable without prefix @param defaultValue The default value if not found @return The value found, or the default if not found """ ...
java
public static Boolean getEnvironmentBoolean(String name, Boolean defaultValue) { if (envVars == null) { throw new IllegalStateException("The environment vars must be provided before calling getEnvironmentBoolean."); } String value = getEnvironmentString(name, null); if (val...
[ "public", "static", "Boolean", "getEnvironmentBoolean", "(", "String", "name", ",", "Boolean", "defaultValue", ")", "{", "if", "(", "envVars", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"The environment vars must be provided before calling g...
Retrieve boolean value for the environment variable name @param name The name of the variable without prefix @param defaultValue The default value if not found @return The value found, or the default if not found
[ "Retrieve", "boolean", "value", "for", "the", "environment", "variable", "name" ]
train
https://github.com/probedock/probedock-java/blob/92ee6634ba4fe3fdffeb4e202f5372ef947a67c3/src/main/java/io/probedock/client/utils/EnvironmentUtils.java#L32-L45
google/closure-compiler
src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java
FixedPointGraphTraversal.computeFixedPoint
public void computeFixedPoint(DiGraph<N, E> graph, N entry) { """ Compute a fixed point for the given graph, entering from the given node. @param graph The graph to traverse. @param entry The node to begin traversing from. """ Set<N> entrySet = new LinkedHashSet<>(); entrySet.add(entry); computeF...
java
public void computeFixedPoint(DiGraph<N, E> graph, N entry) { Set<N> entrySet = new LinkedHashSet<>(); entrySet.add(entry); computeFixedPoint(graph, entrySet); }
[ "public", "void", "computeFixedPoint", "(", "DiGraph", "<", "N", ",", "E", ">", "graph", ",", "N", "entry", ")", "{", "Set", "<", "N", ">", "entrySet", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "entrySet", ".", "add", "(", "entry", ")", ";"...
Compute a fixed point for the given graph, entering from the given node. @param graph The graph to traverse. @param entry The node to begin traversing from.
[ "Compute", "a", "fixed", "point", "for", "the", "given", "graph", "entering", "from", "the", "given", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java#L80-L84
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/FieldUtils.java
FieldUtils.findField
public static Field findField(Class clazz, String name) { """ Attempt to find a {@link Field field} on the supplied {@link Class} with the supplied <code>name</code>. Searches all superclasses up to {@link Object}. @param clazz the class to introspect @param name the name of the field @return the correspo...
java
public static Field findField(Class clazz, String name) { return findField(clazz, name, null); }
[ "public", "static", "Field", "findField", "(", "Class", "clazz", ",", "String", "name", ")", "{", "return", "findField", "(", "clazz", ",", "name", ",", "null", ")", ";", "}" ]
Attempt to find a {@link Field field} on the supplied {@link Class} with the supplied <code>name</code>. Searches all superclasses up to {@link Object}. @param clazz the class to introspect @param name the name of the field @return the corresponding Field object, or <code>null</code> if not found
[ "Attempt", "to", "find", "a", "{", "@link", "Field", "field", "}", "on", "the", "supplied", "{", "@link", "Class", "}", "with", "the", "supplied", "<code", ">", "name<", "/", "code", ">", ".", "Searches", "all", "superclasses", "up", "to", "{", "@link"...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/FieldUtils.java#L136-L138
yshavit/antlr-denter
core/src/main/java/com/yuvalshavit/antlr4/DenterHelper.java
DenterHelper.unwindTo
private Token unwindTo(int targetIndent, Token copyFrom) { """ Returns a DEDENT token, and also queues up additional DEDENTS as necessary. @param targetIndent the "size" of the indentation (number of spaces) by the end @param copyFrom the triggering token @return a DEDENT token """ assert dentsBuffer.is...
java
private Token unwindTo(int targetIndent, Token copyFrom) { assert dentsBuffer.isEmpty() : dentsBuffer; dentsBuffer.add(createToken(nlToken, copyFrom)); // To make things easier, we'll queue up ALL of the dedents, and then pop off the first one. // For example, here's how some text is analyzed: // ...
[ "private", "Token", "unwindTo", "(", "int", "targetIndent", ",", "Token", "copyFrom", ")", "{", "assert", "dentsBuffer", ".", "isEmpty", "(", ")", ":", "dentsBuffer", ";", "dentsBuffer", ".", "add", "(", "createToken", "(", "nlToken", ",", "copyFrom", ")", ...
Returns a DEDENT token, and also queues up additional DEDENTS as necessary. @param targetIndent the "size" of the indentation (number of spaces) by the end @param copyFrom the triggering token @return a DEDENT token
[ "Returns", "a", "DEDENT", "token", "and", "also", "queues", "up", "additional", "DEDENTS", "as", "necessary", "." ]
train
https://github.com/yshavit/antlr-denter/blob/65ab8d2f491cc044cee873078fb063c021a8a708/core/src/main/java/com/yuvalshavit/antlr4/DenterHelper.java#L141-L168
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java
MultiUserChatLight.getFullInfo
public MUCLightRoomInfo getFullInfo(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Get the MUC Light info. @param version @return the room info @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException ...
java
public MUCLightRoomInfo getFullInfo(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCLightGetInfoIQ mucLightGetInfoIQ = new MUCLightGetInfoIQ(room, version); IQ responseIq = connection.createStanzaCollectorAndSend(mucLightGetIn...
[ "public", "MUCLightRoomInfo", "getFullInfo", "(", "String", "version", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "MUCLightGetInfoIQ", "mucLightGetInfoIQ", "=", "new", "MUCLightGetInfoIQ", ...
Get the MUC Light info. @param version @return the room info @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedException
[ "Get", "the", "MUC", "Light", "info", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java#L321-L330
grpc/grpc-java
core/src/main/java/io/grpc/internal/ServiceConfigUtil.java
ServiceConfigUtil.saturatedAdd
@SuppressWarnings("ShortCircuitBoolean") private static long saturatedAdd(long a, long b) { """ Returns the sum of {@code a} and {@code b} unless it would overflow or underflow in which case {@code Long.MAX_VALUE} or {@code Long.MIN_VALUE} is returned, respectively. <p>Copy of {@link com.google.common.math.L...
java
@SuppressWarnings("ShortCircuitBoolean") private static long saturatedAdd(long a, long b) { long naiveSum = a + b; if ((a ^ b) < 0 | (a ^ naiveSum) >= 0) { // If a and b have different signs or a has the same sign as the result then there was no // overflow, return. return naiveSum; } ...
[ "@", "SuppressWarnings", "(", "\"ShortCircuitBoolean\"", ")", "private", "static", "long", "saturatedAdd", "(", "long", "a", ",", "long", "b", ")", "{", "long", "naiveSum", "=", "a", "+", "b", ";", "if", "(", "(", "a", "^", "b", ")", "<", "0", "|", ...
Returns the sum of {@code a} and {@code b} unless it would overflow or underflow in which case {@code Long.MAX_VALUE} or {@code Long.MIN_VALUE} is returned, respectively. <p>Copy of {@link com.google.common.math.LongMath#saturatedAdd}.</p>
[ "Returns", "the", "sum", "of", "{", "@code", "a", "}", "and", "{", "@code", "b", "}", "unless", "it", "would", "overflow", "or", "underflow", "in", "which", "case", "{", "@code", "Long", ".", "MAX_VALUE", "}", "or", "{", "@code", "Long", ".", "MIN_VA...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/ServiceConfigUtil.java#L659-L669
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.pushFcmRegistrationId
@SuppressWarnings("WeakerAccess") public void pushFcmRegistrationId(String fcmId, boolean register) { """ Sends the FCM registration ID to CleverTap. @param fcmId The FCM registration ID @param register Boolean indicating whether to register or not for receiving push messages from CleverTap. Set this ...
java
@SuppressWarnings("WeakerAccess") public void pushFcmRegistrationId(String fcmId, boolean register) { pushDeviceToken(fcmId, register, PushType.FCM); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "pushFcmRegistrationId", "(", "String", "fcmId", ",", "boolean", "register", ")", "{", "pushDeviceToken", "(", "fcmId", ",", "register", ",", "PushType", ".", "FCM", ")", ";", "}" ]
Sends the FCM registration ID to CleverTap. @param fcmId The FCM registration ID @param register Boolean indicating whether to register or not for receiving push messages from CleverTap. Set this to true to receive push messages from CleverTap, and false to not receive any messages from CleverTap.
[ "Sends", "the", "FCM", "registration", "ID", "to", "CleverTap", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L4821-L4824
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/Centroid.java
Centroid.make
public static Centroid make(Relation<? extends NumberVector> relation, DBIDs ids) { """ Static constructor from an existing relation. @param relation Relation to use @param ids IDs to use @return Centroid """ final int dim = RelationUtil.dimensionality(relation); Centroid c = new Centroid(dim); ...
java
public static Centroid make(Relation<? extends NumberVector> relation, DBIDs ids) { final int dim = RelationUtil.dimensionality(relation); Centroid c = new Centroid(dim); double[] elems = c.elements; int count = 0; for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { NumberVector v ...
[ "public", "static", "Centroid", "make", "(", "Relation", "<", "?", "extends", "NumberVector", ">", "relation", ",", "DBIDs", "ids", ")", "{", "final", "int", "dim", "=", "RelationUtil", ".", "dimensionality", "(", "relation", ")", ";", "Centroid", "c", "="...
Static constructor from an existing relation. @param relation Relation to use @param ids IDs to use @return Centroid
[ "Static", "constructor", "from", "an", "existing", "relation", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/Centroid.java#L155-L175
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/ops/MatrixIO.java
MatrixIO.loadCSV
public static DMatrixRMaj loadCSV(String fileName , int numRows , int numCols ) throws IOException { """ Reads a matrix in which has been encoded using a Column Space Value (CSV) file format. For a description of the format see {@link MatrixIO#loadCSV(String,boolean)}. @param fileName The file being l...
java
public static DMatrixRMaj loadCSV(String fileName , int numRows , int numCols ) throws IOException { FileInputStream fileStream = new FileInputStream(fileName); ReadMatrixCsv csv = new ReadMatrixCsv(fileStream); DMatrixRMaj ret = csv.readDDRM(numRows, numCols); fileStream.c...
[ "public", "static", "DMatrixRMaj", "loadCSV", "(", "String", "fileName", ",", "int", "numRows", ",", "int", "numCols", ")", "throws", "IOException", "{", "FileInputStream", "fileStream", "=", "new", "FileInputStream", "(", "fileName", ")", ";", "ReadMatrixCsv", ...
Reads a matrix in which has been encoded using a Column Space Value (CSV) file format. For a description of the format see {@link MatrixIO#loadCSV(String,boolean)}. @param fileName The file being loaded. @param numRows number of rows in the matrix. @param numCols number of columns in the matrix. @return DMatrixRMaj @...
[ "Reads", "a", "matrix", "in", "which", "has", "been", "encoded", "using", "a", "Column", "Space", "Value", "(", "CSV", ")", "file", "format", ".", "For", "a", "description", "of", "the", "format", "see", "{", "@link", "MatrixIO#loadCSV", "(", "String", "...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/ops/MatrixIO.java#L205-L216
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_ssl_certkey.java
mps_ssl_certkey.add
public static mps_ssl_certkey add(nitro_service client, mps_ssl_certkey resource) throws Exception { """ <pre> Use this operation to install certificate on Management Service. </pre> """ resource.validate("add"); return ((mps_ssl_certkey[]) resource.perform_operation(client, "add"))[0]; }
java
public static mps_ssl_certkey add(nitro_service client, mps_ssl_certkey resource) throws Exception { resource.validate("add"); return ((mps_ssl_certkey[]) resource.perform_operation(client, "add"))[0]; }
[ "public", "static", "mps_ssl_certkey", "add", "(", "nitro_service", "client", ",", "mps_ssl_certkey", "resource", ")", "throws", "Exception", "{", "resource", ".", "validate", "(", "\"add\"", ")", ";", "return", "(", "(", "mps_ssl_certkey", "[", "]", ")", "res...
<pre> Use this operation to install certificate on Management Service. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "install", "certificate", "on", "Management", "Service", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_ssl_certkey.java#L301-L305
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.getField
public Object getField(Object instance, String fieldname, boolean isStatic) throws IllegalAccessException { """ Attempt to set the value of a field on an instance to the specified value. Simply locate the field, which returns an object capable of reading/writing it, then use that to retrieve the value. @param ...
java
public Object getField(Object instance, String fieldname, boolean isStatic) throws IllegalAccessException { FieldReaderWriter fieldReaderWriter = locateField(fieldname); if (isStatic && !fieldReaderWriter.isStatic()) { throw new IncompatibleClassChangeError("Expected static field " + fieldReaderWriter.theFi...
[ "public", "Object", "getField", "(", "Object", "instance", ",", "String", "fieldname", ",", "boolean", "isStatic", ")", "throws", "IllegalAccessException", "{", "FieldReaderWriter", "fieldReaderWriter", "=", "locateField", "(", "fieldname", ")", ";", "if", "(", "i...
Attempt to set the value of a field on an instance to the specified value. Simply locate the field, which returns an object capable of reading/writing it, then use that to retrieve the value. @param instance the object upon which to set the field (maybe null for static fields) @param fieldname the name of the field @p...
[ "Attempt", "to", "set", "the", "value", "of", "a", "field", "on", "an", "instance", "to", "the", "specified", "value", ".", "Simply", "locate", "the", "field", "which", "returns", "an", "object", "capable", "of", "reading", "/", "writing", "it", "then", ...
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1389-L1410
undertow-io/undertow
core/src/main/java/io/undertow/util/ETagUtils.java
ETagUtils.handleIfMatch
public static boolean handleIfMatch(final HttpServerExchange exchange, final ETag etag, boolean allowWeak) { """ Handles the if-match header. returns true if the request should proceed, false otherwise @param exchange the exchange @param etag The etags @return """ return handleIfMatch(exchange,...
java
public static boolean handleIfMatch(final HttpServerExchange exchange, final ETag etag, boolean allowWeak) { return handleIfMatch(exchange, Collections.singletonList(etag), allowWeak); }
[ "public", "static", "boolean", "handleIfMatch", "(", "final", "HttpServerExchange", "exchange", ",", "final", "ETag", "etag", ",", "boolean", "allowWeak", ")", "{", "return", "handleIfMatch", "(", "exchange", ",", "Collections", ".", "singletonList", "(", "etag", ...
Handles the if-match header. returns true if the request should proceed, false otherwise @param exchange the exchange @param etag The etags @return
[ "Handles", "the", "if", "-", "match", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ETagUtils.java#L44-L46
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java
UnitResponse.processStreamPartByPart
public void processStreamPartByPart(String delimiterPattern, Function<String, Object> function) { """ Process the data InputStream Part By Part orderly. Only use this method when data of this response object is an input stream. @param function the processing function whose parameter is the input stream...
java
public void processStreamPartByPart(String delimiterPattern, Function<String, Object> function) { StreamUtil.partByPart(dataToType(InputStream.class), delimiterPattern, function); }
[ "public", "void", "processStreamPartByPart", "(", "String", "delimiterPattern", ",", "Function", "<", "String", ",", "Object", ">", "function", ")", "{", "StreamUtil", ".", "partByPart", "(", "dataToType", "(", "InputStream", ".", "class", ")", ",", "delimiterPa...
Process the data InputStream Part By Part orderly. Only use this method when data of this response object is an input stream. @param function the processing function whose parameter is the input stream part. @param delimiterPattern 分段分隔符,支持正则表达式
[ "Process", "the", "data", "InputStream", "Part", "By", "Part", "orderly", ".", "Only", "use", "this", "method", "when", "data", "of", "this", "response", "object", "is", "an", "input", "stream", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java#L569-L571
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedKeyAsync
public Observable<DeletedKeyBundle> getDeletedKeyAsync(String vaultBaseUrl, String keyName) { """ Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-del...
java
public Observable<DeletedKeyBundle> getDeletedKeyAsync(String vaultBaseUrl, String keyName) { return getDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName).map(new Func1<ServiceResponse<DeletedKeyBundle>, DeletedKeyBundle>() { @Override public DeletedKeyBundle call(ServiceResponse<...
[ "public", "Observable", "<", "DeletedKeyBundle", ">", "getDeletedKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ")", "{", "return", "getDeletedKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ")", ".", "map", "(", "new", "Func1...
Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission. @param vaultBaseUrl The vault name,...
[ "Gets", "the", "public", "part", "of", "a", "deleted", "key", ".", "The", "Get", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3085-L3092
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java
CommsLightTrace.traceMessageId
public static void traceMessageId(TraceComponent callersTrace, String action, SIBusMessage message) { """ Allow minimal tracing of System Message IDs (along with a transaction if on exists) @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix t...
java
public static void traceMessageId(TraceComponent callersTrace, String action, SIBusMessage message) { if (light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) { _traceMessageId(callersTrace, action, msgToString(message)); } }
[ "public", "static", "void", "traceMessageId", "(", "TraceComponent", "callersTrace", ",", "String", "action", ",", "SIBusMessage", "message", ")", "{", "if", "(", "light_tc", ".", "isDebugEnabled", "(", ")", "||", "callersTrace", ".", "isDebugEnabled", "(", ")",...
Allow minimal tracing of System Message IDs (along with a transaction if on exists) @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix the keyword included in the trace line @param message The message to trace
[ "Allow", "minimal", "tracing", "of", "System", "Message", "IDs", "(", "along", "with", "a", "transaction", "if", "on", "exists", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java#L54-L59
logic-ng/LogicNG
src/main/java/org/logicng/solvers/sat/MiniSatStyleSolver.java
MiniSatStyleSolver.lt
public boolean lt(int x, int y) { """ Compares two variables by their activity. @param x the first variable @param y the second variable @return {@code true} if the first variable's activity is larger then the second one's """ return this.vars.get(x).activity() > this.vars.get(y).activity(); }
java
public boolean lt(int x, int y) { return this.vars.get(x).activity() > this.vars.get(y).activity(); }
[ "public", "boolean", "lt", "(", "int", "x", ",", "int", "y", ")", "{", "return", "this", ".", "vars", ".", "get", "(", "x", ")", ".", "activity", "(", ")", ">", "this", ".", "vars", ".", "get", "(", "y", ")", ".", "activity", "(", ")", ";", ...
Compares two variables by their activity. @param x the first variable @param y the second variable @return {@code true} if the first variable's activity is larger then the second one's
[ "Compares", "two", "variables", "by", "their", "activity", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/MiniSatStyleSolver.java#L266-L268
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getStorySeasonInfo
public void getStorySeasonInfo(String[] ids, Callback<List<StorySeason>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on stories seasons API go <a href="https://wiki.guildwars2.com/wiki/API:2/stories/seasons">here</a><br/> Give user the access to {@link Callback#onResponse(Call, ...
java
public void getStorySeasonInfo(String[] ids, Callback<List<StorySeason>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getStorySeasonInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getStorySeasonInfo", "(", "String", "[", "]", "ids", ",", "Callback", "<", "List", "<", "StorySeason", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(...
For more info on stories seasons API go <a href="https://wiki.guildwars2.com/wiki/API:2/stories/seasons">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of story season id @param callb...
[ "For", "more", "info", "on", "stories", "seasons", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "stories", "/", "seasons", ">", "here<", "/", "a", ">", "<br", "...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2466-L2469
facebook/fresco
animated-base/src/main/java/com/facebook/imagepipeline/animated/util/AnimatedDrawableUtil.java
AnimatedDrawableUtil.isOutsideRange
public static boolean isOutsideRange(int startFrame, int endFrame, int frameNumber) { """ Checks whether the specified frame number is outside the range inclusive of both start and end. If start <= end, start is within, end is within, and everything in between is within. If start > end, start is within, end is w...
java
public static boolean isOutsideRange(int startFrame, int endFrame, int frameNumber) { if (startFrame == -1 || endFrame == -1) { // This means nothing should pass. return true; } boolean outsideRange; if (startFrame <= endFrame) { outsideRange = frameNumber < startFrame || frameNumber >...
[ "public", "static", "boolean", "isOutsideRange", "(", "int", "startFrame", ",", "int", "endFrame", ",", "int", "frameNumber", ")", "{", "if", "(", "startFrame", "==", "-", "1", "||", "endFrame", "==", "-", "1", ")", "{", "// This means nothing should pass.", ...
Checks whether the specified frame number is outside the range inclusive of both start and end. If start <= end, start is within, end is within, and everything in between is within. If start > end, start is within, end is within, everything less than start is within and everything greater than end is within. This behav...
[ "Checks", "whether", "the", "specified", "frame", "number", "is", "outside", "the", "range", "inclusive", "of", "both", "start", "and", "end", ".", "If", "start", "<", "=", "end", "start", "is", "within", "end", "is", "within", "and", "everything", "in", ...
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/animated-base/src/main/java/com/facebook/imagepipeline/animated/util/AnimatedDrawableUtil.java#L113-L126
google/closure-compiler
src/com/google/javascript/jscomp/gwt/client/Es6ClassConverterJsDocHelper.java
Es6ClassConverterJsDocHelper.getClassJsDoc
@JsMethod(name = "getClassJsDoc", namespace = "jscomp") public static String getClassJsDoc(String jsDoc) { """ Gets JS Doc that should be retained on a class. Used to upgrade ES5 to ES6 classes and separate class from constructor comments. """ if (Strings.isNullOrEmpty(jsDoc)) { return null; }...
java
@JsMethod(name = "getClassJsDoc", namespace = "jscomp") public static String getClassJsDoc(String jsDoc) { if (Strings.isNullOrEmpty(jsDoc)) { return null; } Config config = Config.builder() .setLanguageMode(LanguageMode.ECMASCRIPT3) .setStrictMode(Config.StrictMode.S...
[ "@", "JsMethod", "(", "name", "=", "\"getClassJsDoc\"", ",", "namespace", "=", "\"jscomp\"", ")", "public", "static", "String", "getClassJsDoc", "(", "String", "jsDoc", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "jsDoc", ")", ")", "{", "ret...
Gets JS Doc that should be retained on a class. Used to upgrade ES5 to ES6 classes and separate class from constructor comments.
[ "Gets", "JS", "Doc", "that", "should", "be", "retained", "on", "a", "class", ".", "Used", "to", "upgrade", "ES5", "to", "ES6", "classes", "and", "separate", "class", "from", "constructor", "comments", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/gwt/client/Es6ClassConverterJsDocHelper.java#L57-L88
pryzach/midao
midao-jdbc-dbcp-1-4/src/main/java/org/midao/jdbc/core/pool/MjdbcPoolBinder.java
MjdbcPoolBinder.createDataSource
public static DataSource createDataSource(String url, String userName, String password) throws SQLException { """ Returns new Pooled {@link DataSource} implementation <p/> In case this function won't work - use {@link #createDataSource(java.util.Properties)} @param url Database connection url @param use...
java
public static DataSource createDataSource(String url, String userName, String password) throws SQLException { assertNotNull(url); assertNotNull(userName); assertNotNull(password); BasicDataSource ds = new BasicDataSource(); ds.setUrl(url); ds.setUsername(userName); ...
[ "public", "static", "DataSource", "createDataSource", "(", "String", "url", ",", "String", "userName", ",", "String", "password", ")", "throws", "SQLException", "{", "assertNotNull", "(", "url", ")", ";", "assertNotNull", "(", "userName", ")", ";", "assertNotNul...
Returns new Pooled {@link DataSource} implementation <p/> In case this function won't work - use {@link #createDataSource(java.util.Properties)} @param url Database connection url @param userName Database user name @param password Database user password @return new Pooled {@link DataSource} implementation @throws...
[ "Returns", "new", "Pooled", "{", "@link", "DataSource", "}", "implementation", "<p", "/", ">", "In", "case", "this", "function", "won", "t", "work", "-", "use", "{", "@link", "#createDataSource", "(", "java", ".", "util", ".", "Properties", ")", "}" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-dbcp-1-4/src/main/java/org/midao/jdbc/core/pool/MjdbcPoolBinder.java#L78-L89
androidsx/rate-me
LibraryRateMe/src/com/androidsx/rateme/RateMeDialogTimer.java
RateMeDialogTimer.setOptOut
public static void setOptOut(final Context context, boolean optOut) { """ Set opt out flag. If it is true, the rate dialog will never shown unless app data is cleared. """ SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); Editor editor = pref.edit(); ...
java
public static void setOptOut(final Context context, boolean optOut) { SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); Editor editor = pref.edit(); editor.putBoolean(KEY_OPT_OUT, optOut); editor.apply(); }
[ "public", "static", "void", "setOptOut", "(", "final", "Context", "context", ",", "boolean", "optOut", ")", "{", "SharedPreferences", "pref", "=", "context", ".", "getSharedPreferences", "(", "PREF_NAME", ",", "Context", ".", "MODE_PRIVATE", ")", ";", "Editor", ...
Set opt out flag. If it is true, the rate dialog will never shown unless app data is cleared.
[ "Set", "opt", "out", "flag", ".", "If", "it", "is", "true", "the", "rate", "dialog", "will", "never", "shown", "unless", "app", "data", "is", "cleared", "." ]
train
https://github.com/androidsx/rate-me/blob/a779706454ba585a09110745ac3035f28920524a/LibraryRateMe/src/com/androidsx/rateme/RateMeDialogTimer.java#L97-L102
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedinstallationTemplate/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedinstallationTemplate.java
ApiOvhDedicatedinstallationTemplate.templateName_partitionScheme_schemeName_hardwareRaid_name_GET
public OvhHardwareRaid templateName_partitionScheme_schemeName_hardwareRaid_name_GET(String templateName, String schemeName, String name) throws IOException { """ Get this object properties REST: GET /dedicated/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name} @param template...
java
public OvhHardwareRaid templateName_partitionScheme_schemeName_hardwareRaid_name_GET(String templateName, String schemeName, String name) throws IOException { String qPath = "/dedicated/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name}"; StringBuilder sb = path(qPath, templateName...
[ "public", "OvhHardwareRaid", "templateName_partitionScheme_schemeName_hardwareRaid_name_GET", "(", "String", "templateName", ",", "String", "schemeName", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/installationTemplate/{templa...
Get this object properties REST: GET /dedicated/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name} @param templateName [required] This template name @param schemeName [required] name of this partitioning scheme @param name [required] Hardware RAID name
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedinstallationTemplate/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedinstallationTemplate.java#L44-L49
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_upgrade.java
br_upgrade.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> """ br_upgrade_responses result = (br_upgrade_responses) service.get_payloa...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_upgrade_responses result = (br_upgrade_responses) service.get_payload_formatter().string_to_resource(br_upgrade_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == S...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_upgrade_responses", "result", "=", "(", "br_upgrade_responses", ")", "service", ".", "get_payload_formatte...
<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/br/br_upgrade.java#L157-L174
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/DataSetUtils.java
DataSetUtils.zipWithIndex
public static <T> DataSet<Tuple2<Long, T>> zipWithIndex(DataSet<T> input) { """ Method that assigns a unique {@link Long} value to all elements in the input data set. The generated values are consecutive. @param input the input data set @return a data set of tuple 2 consisting of consecutive ids and initial v...
java
public static <T> DataSet<Tuple2<Long, T>> zipWithIndex(DataSet<T> input) { DataSet<Tuple2<Integer, Long>> elementCount = countElementsPerPartition(input); return input.mapPartition(new RichMapPartitionFunction<T, Tuple2<Long, T>>() { long start = 0; @Override public void open(Configuration parameters)...
[ "public", "static", "<", "T", ">", "DataSet", "<", "Tuple2", "<", "Long", ",", "T", ">", ">", "zipWithIndex", "(", "DataSet", "<", "T", ">", "input", ")", "{", "DataSet", "<", "Tuple2", "<", "Integer", ",", "Long", ">", ">", "elementCount", "=", "c...
Method that assigns a unique {@link Long} value to all elements in the input data set. The generated values are consecutive. @param input the input data set @return a data set of tuple 2 consisting of consecutive ids and initial values.
[ "Method", "that", "assigns", "a", "unique", "{", "@link", "Long", "}", "value", "to", "all", "elements", "in", "the", "input", "data", "set", ".", "The", "generated", "values", "are", "consecutive", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/DataSetUtils.java#L89-L134
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/FedoraResourceImpl.java
FedoraResourceImpl.convertMementoReferences
protected static Function<Triple, Triple> convertMementoReferences( final IdentifierConverter<Resource, FedoraResource> translator, final IdentifierConverter<Resource, FedoraResource> internalTranslator) { """ Returns a function that converts the subject to the original URI and the object o...
java
protected static Function<Triple, Triple> convertMementoReferences( final IdentifierConverter<Resource, FedoraResource> translator, final IdentifierConverter<Resource, FedoraResource> internalTranslator) { return t -> { final String subjectURI = t.getSubject().getURI(); ...
[ "protected", "static", "Function", "<", "Triple", ",", "Triple", ">", "convertMementoReferences", "(", "final", "IdentifierConverter", "<", "Resource", ",", "FedoraResource", ">", "translator", ",", "final", "IdentifierConverter", "<", "Resource", ",", "FedoraResource...
Returns a function that converts the subject to the original URI and the object of a triple from an undereferenceable internal identifier back to it's original external resource path. If the object is not an internal identifier, the object is returned. @param translator a converter to get the external resource identif...
[ "Returns", "a", "function", "that", "converts", "the", "subject", "to", "the", "original", "URI", "and", "the", "object", "of", "a", "triple", "from", "an", "undereferenceable", "internal", "identifier", "back", "to", "it", "s", "original", "external", "resour...
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/FedoraResourceImpl.java#L1175-L1212
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_domain_domainName_disclaimer_GET
public OvhDisclaimer organizationName_service_exchangeService_domain_domainName_disclaimer_GET(String organizationName, String exchangeService, String domainName) throws IOException { """ Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/discla...
java
public OvhDisclaimer organizationName_service_exchangeService_domain_domainName_disclaimer_GET(String organizationName, String exchangeService, String domainName) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/disclaimer"; StringBuilder sb = pat...
[ "public", "OvhDisclaimer", "organizationName_service_exchangeService_domain_domainName_disclaimer_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "domainName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchang...
Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/domain/{domainName}/disclaimer @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service @param domainName [required] D...
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L529-L534
galan/commons
src/main/java/de/galan/commons/net/Ports.java
Ports.findFree
public static Integer findFree(int lowIncluse, int highInclusive) { """ Returns a free port in the defined range, returns null if none is available. """ int low = Math.max(1, Math.min(lowIncluse, highInclusive)); int high = Math.min(65535, Math.max(lowIncluse, highInclusive)); Integer result = null; in...
java
public static Integer findFree(int lowIncluse, int highInclusive) { int low = Math.max(1, Math.min(lowIncluse, highInclusive)); int high = Math.min(65535, Math.max(lowIncluse, highInclusive)); Integer result = null; int split = RandomUtils.nextInt(low, high + 1); for (int port = split; port <= high; port++) {...
[ "public", "static", "Integer", "findFree", "(", "int", "lowIncluse", ",", "int", "highInclusive", ")", "{", "int", "low", "=", "Math", ".", "max", "(", "1", ",", "Math", ".", "min", "(", "lowIncluse", ",", "highInclusive", ")", ")", ";", "int", "high",...
Returns a free port in the defined range, returns null if none is available.
[ "Returns", "a", "free", "port", "in", "the", "defined", "range", "returns", "null", "if", "none", "is", "available", "." ]
train
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/Ports.java#L27-L47
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java
ModelSerializer.restoreMultiLayerNetworkAndNormalizer
public static Pair<MultiLayerNetwork, Normalizer> restoreMultiLayerNetworkAndNormalizer( @NonNull InputStream is, boolean loadUpdater) throws IOException { """ Restore a MultiLayerNetwork and Normalizer (if present - null if not) from the InputStream. Note: the input stream is read fully and closed by...
java
public static Pair<MultiLayerNetwork, Normalizer> restoreMultiLayerNetworkAndNormalizer( @NonNull InputStream is, boolean loadUpdater) throws IOException { checkInputStream(is); File tmpFile = null; try { tmpFile = tempFileFromStream(is); return restoreMultiL...
[ "public", "static", "Pair", "<", "MultiLayerNetwork", ",", "Normalizer", ">", "restoreMultiLayerNetworkAndNormalizer", "(", "@", "NonNull", "InputStream", "is", ",", "boolean", "loadUpdater", ")", "throws", "IOException", "{", "checkInputStream", "(", "is", ")", ";"...
Restore a MultiLayerNetwork and Normalizer (if present - null if not) from the InputStream. Note: the input stream is read fully and closed by this method. Consequently, the input stream cannot be re-used. @param is Input stream to read from @param loadUpdater Whether to load the updater from the model or not...
[ "Restore", "a", "MultiLayerNetwork", "and", "Normalizer", "(", "if", "present", "-", "null", "if", "not", ")", "from", "the", "InputStream", ".", "Note", ":", "the", "input", "stream", "is", "read", "fully", "and", "closed", "by", "this", "method", ".", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java#L403-L416
landawn/AbacusUtil
src/com/landawn/abacus/util/AnyDelete.java
AnyDelete.addFamilyVersion
public AnyDelete addFamilyVersion(String family, final long timestamp) { """ Delete all columns of the specified family with a timestamp equal to the specified timestamp. @param family @param timestamp @return """ delete.addFamilyVersion(toFamilyQualifierBytes(family), timestamp); retu...
java
public AnyDelete addFamilyVersion(String family, final long timestamp) { delete.addFamilyVersion(toFamilyQualifierBytes(family), timestamp); return this; }
[ "public", "AnyDelete", "addFamilyVersion", "(", "String", "family", ",", "final", "long", "timestamp", ")", "{", "delete", ".", "addFamilyVersion", "(", "toFamilyQualifierBytes", "(", "family", ")", ",", "timestamp", ")", ";", "return", "this", ";", "}" ]
Delete all columns of the specified family with a timestamp equal to the specified timestamp. @param family @param timestamp @return
[ "Delete", "all", "columns", "of", "the", "specified", "family", "with", "a", "timestamp", "equal", "to", "the", "specified", "timestamp", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/AnyDelete.java#L120-L124
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/io/Files.java
Files.readFileToString
public static String readFileToString(File file, Charset charset) throws IOException { """ Reads the contents of a file into a String. The file is always closed. """ InputStream in = null; try { in = new FileInputStream(file); StringBuilderWriter sw = new StringBuilderWriter(); if (...
java
public static String readFileToString(File file, Charset charset) throws IOException { InputStream in = null; try { in = new FileInputStream(file); StringBuilderWriter sw = new StringBuilderWriter(); if (null == charset) IOs.copy(new InputStreamReader(in), sw); else IOs.copy(new InputSt...
[ "public", "static", "String", "readFileToString", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IOException", "{", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "new", "FileInputStream", "(", "file", ")", ";", "StringBuilder...
Reads the contents of a file into a String. The file is always closed.
[ "Reads", "the", "contents", "of", "a", "file", "into", "a", "String", ".", "The", "file", "is", "always", "closed", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/io/Files.java#L57-L70
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/creational/builder/mapped/FileMappedKeyDirector.java
FileMappedKeyDirector.constructDocument
public void constructDocument(String filePath, MappedKeyEngineer<K,V> engineer) { """ Director method to construct a document @param filePath the file path the output @param engineer the strategy """ //clear cache try { crawl(new File(filePath), engineer); } finally { crawledPath...
java
public void constructDocument(String filePath, MappedKeyEngineer<K,V> engineer) { //clear cache try { crawl(new File(filePath), engineer); } finally { crawledPaths.clear(); } }
[ "public", "void", "constructDocument", "(", "String", "filePath", ",", "MappedKeyEngineer", "<", "K", ",", "V", ">", "engineer", ")", "{", "//clear cache\t\t\r", "try", "{", "crawl", "(", "new", "File", "(", "filePath", ")", ",", "engineer", ")", ";", "}",...
Director method to construct a document @param filePath the file path the output @param engineer the strategy
[ "Director", "method", "to", "construct", "a", "document" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/creational/builder/mapped/FileMappedKeyDirector.java#L23-L34
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/datamovement/ProgressListener.java
ProgressListener.newProgressUpdate
protected ProgressUpdate newProgressUpdate(QueryBatch batch, long startTime, long totalForThisUpdate, double timeSoFar) { """ A subclass can override this to provide a different implementation of ProgressUpdate. @param batch @param startTime @param totalForThisUpdate @param timeSoFar @return """ retur...
java
protected ProgressUpdate newProgressUpdate(QueryBatch batch, long startTime, long totalForThisUpdate, double timeSoFar) { return new SimpleProgressUpdate(batch, startTime, totalForThisUpdate, timeSoFar); }
[ "protected", "ProgressUpdate", "newProgressUpdate", "(", "QueryBatch", "batch", ",", "long", "startTime", ",", "long", "totalForThisUpdate", ",", "double", "timeSoFar", ")", "{", "return", "new", "SimpleProgressUpdate", "(", "batch", ",", "startTime", ",", "totalFor...
A subclass can override this to provide a different implementation of ProgressUpdate. @param batch @param startTime @param totalForThisUpdate @param timeSoFar @return
[ "A", "subclass", "can", "override", "this", "to", "provide", "a", "different", "implementation", "of", "ProgressUpdate", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/datamovement/ProgressListener.java#L154-L156
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/stream/streamidentifier_stats.java
streamidentifier_stats.get
public static streamidentifier_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of streamidentifier_stats resource of given name . """ streamidentifier_stats obj = new streamidentifier_stats(); obj.set_name(name); streamidentifier_stats response = (str...
java
public static streamidentifier_stats get(nitro_service service, String name) throws Exception{ streamidentifier_stats obj = new streamidentifier_stats(); obj.set_name(name); streamidentifier_stats response = (streamidentifier_stats) obj.stat_resource(service); return response; }
[ "public", "static", "streamidentifier_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "streamidentifier_stats", "obj", "=", "new", "streamidentifier_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name",...
Use this API to fetch statistics of streamidentifier_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "streamidentifier_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/stream/streamidentifier_stats.java#L252-L257
FasterXML/woodstox
src/main/java/com/ctc/wstx/sr/BasicStreamReader.java
BasicStreamReader.withStartElement
@Override public Object withStartElement(ElemCallback cb, Location loc) { """ Method called by {@link com.ctc.wstx.evt.DefaultEventAllocator} to get double-indirection necessary for constructing start element events. @return Null, if stream does not point to start element; whatever callback returns other...
java
@Override public Object withStartElement(ElemCallback cb, Location loc) { if (mCurrToken != START_ELEMENT) { return null; } return cb.withStartElement(loc, getName(), mElementStack.createNonTransientNsContext(loc), mAttrCollector.buildAttrOb()...
[ "@", "Override", "public", "Object", "withStartElement", "(", "ElemCallback", "cb", ",", "Location", "loc", ")", "{", "if", "(", "mCurrToken", "!=", "START_ELEMENT", ")", "{", "return", "null", ";", "}", "return", "cb", ".", "withStartElement", "(", "loc", ...
Method called by {@link com.ctc.wstx.evt.DefaultEventAllocator} to get double-indirection necessary for constructing start element events. @return Null, if stream does not point to start element; whatever callback returns otherwise.
[ "Method", "called", "by", "{", "@link", "com", ".", "ctc", ".", "wstx", ".", "evt", ".", "DefaultEventAllocator", "}", "to", "get", "double", "-", "indirection", "necessary", "for", "constructing", "start", "element", "events", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sr/BasicStreamReader.java#L1729-L1739
huahin/huahin-core
src/main/java/org/huahinframework/core/io/Record.java
Record.addSort
public void addSort(Object object, int sort, int priority) { """ Add sort key @param object Java primitive sort key @param sort sort type SORT_NON or SORT_LOWER or SORT_UPPER @param priority sort order """ key.addPrimitiveValue(String.format(SORT_LABEL, priority), object, sort, priority); }
java
public void addSort(Object object, int sort, int priority) { key.addPrimitiveValue(String.format(SORT_LABEL, priority), object, sort, priority); }
[ "public", "void", "addSort", "(", "Object", "object", ",", "int", "sort", ",", "int", "priority", ")", "{", "key", ".", "addPrimitiveValue", "(", "String", ".", "format", "(", "SORT_LABEL", ",", "priority", ")", ",", "object", ",", "sort", ",", "priority...
Add sort key @param object Java primitive sort key @param sort sort type SORT_NON or SORT_LOWER or SORT_UPPER @param priority sort order
[ "Add", "sort", "key" ]
train
https://github.com/huahin/huahin-core/blob/a87921b5a12be92a822f753c075ab2431036e6f5/src/main/java/org/huahinframework/core/io/Record.java#L222-L224
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/ItemRule.java
ItemRule.makeReferenceToken
public static Token makeReferenceToken(String bean, String template, String parameter, String attribute, String property) { """ Returns a made reference token. @param bean the bean id @param template the template id @param parameter the parameter name @param attribu...
java
public static Token makeReferenceToken(String bean, String template, String parameter, String attribute, String property) { Token token; if (bean != null) { token = new Token(TokenType.BEAN, bean); } else if (template != null) { ...
[ "public", "static", "Token", "makeReferenceToken", "(", "String", "bean", ",", "String", "template", ",", "String", "parameter", ",", "String", "attribute", ",", "String", "property", ")", "{", "Token", "token", ";", "if", "(", "bean", "!=", "null", ")", "...
Returns a made reference token. @param bean the bean id @param template the template id @param parameter the parameter name @param attribute the attribute name @param property the property name @return the token
[ "Returns", "a", "made", "reference", "token", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/ItemRule.java#L726-L743
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java
GreenMailUtil.newMimeMessage
public static MimeMessage newMimeMessage(String mailString) throws MessagingException { """ Convenience method which creates a new {@link MimeMessage} from a string @throws MessagingException """ return newMimeMessage(EncodingUtil.toStream(mailString, EncodingUtil.CHARSET_EIGHT_BIT_ENCODING)); ...
java
public static MimeMessage newMimeMessage(String mailString) throws MessagingException { return newMimeMessage(EncodingUtil.toStream(mailString, EncodingUtil.CHARSET_EIGHT_BIT_ENCODING)); }
[ "public", "static", "MimeMessage", "newMimeMessage", "(", "String", "mailString", ")", "throws", "MessagingException", "{", "return", "newMimeMessage", "(", "EncodingUtil", ".", "toStream", "(", "mailString", ",", "EncodingUtil", ".", "CHARSET_EIGHT_BIT_ENCODING", ")", ...
Convenience method which creates a new {@link MimeMessage} from a string @throws MessagingException
[ "Convenience", "method", "which", "creates", "a", "new", "{", "@link", "MimeMessage", "}", "from", "a", "string" ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java#L83-L85
opsgenie/opsgenieclient
sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java
AlertApi.deleteAttachment
public SuccessResponse deleteAttachment(DeleteAlertAttachmentRequest params) throws ApiException { """ Delete Alert Attachment Delete alert attachment for the given identifier @param params.identifier Identifier of alert which could be alert id, tiny id or alert alias (required) @param params.attachm...
java
public SuccessResponse deleteAttachment(DeleteAlertAttachmentRequest params) throws ApiException { String identifier = params.getIdentifier(); Long attachmentId = params.getAttachmentId(); String alertIdentifierType = params.getAlertIdentifierType().getValue(); String user = params.getUser(); Obje...
[ "public", "SuccessResponse", "deleteAttachment", "(", "DeleteAlertAttachmentRequest", "params", ")", "throws", "ApiException", "{", "String", "identifier", "=", "params", ".", "getIdentifier", "(", ")", ";", "Long", "attachmentId", "=", "params", ".", "getAttachmentId...
Delete Alert Attachment Delete alert attachment for the given identifier @param params.identifier Identifier of alert which could be alert id, tiny id or alert alias (required) @param params.attachmentId Identifier of alert attachment (required) @param params.alertIdentifierType Type of the identifier ...
[ "Delete", "Alert", "Attachment", "Delete", "alert", "attachment", "for", "the", "given", "identifier" ]
train
https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java#L570-L618
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/shared/core/types/Color.java
Color.fromHSL
public static final Color fromHSL(double h, double s, double l) { """ Converts HSL (hue, saturation, lightness) to RGB Color. HSL values are not normalized yet. @param h in [0,360] degrees @param s in [0,100] percent @param l in [0,100] percent @return Color with RGB values """ h = (((h % 360)...
java
public static final Color fromHSL(double h, double s, double l) { h = (((h % 360) + 360) % 360) / 360; s = convertPercents(s); l = convertPercents(l); return fromNormalizedHSL(h, s, l); }
[ "public", "static", "final", "Color", "fromHSL", "(", "double", "h", ",", "double", "s", ",", "double", "l", ")", "{", "h", "=", "(", "(", "(", "h", "%", "360", ")", "+", "360", ")", "%", "360", ")", "/", "360", ";", "s", "=", "convertPercents"...
Converts HSL (hue, saturation, lightness) to RGB Color. HSL values are not normalized yet. @param h in [0,360] degrees @param s in [0,100] percent @param l in [0,100] percent @return Color with RGB values
[ "Converts", "HSL", "(", "hue", "saturation", "lightness", ")", "to", "RGB", "Color", ".", "HSL", "values", "are", "not", "normalized", "yet", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/shared/core/types/Color.java#L221-L230
graphhopper/map-matching
matching-web/src/main/java/com/graphhopper/matching/cli/MeasurementCommand.java
MeasurementCommand.printLocationIndexMatchQuery
private void printLocationIndexMatchQuery(final LocationIndexTree idx) { """ Test the performance of finding candidate points for the index (which is run for every GPX entry). """ final double latDelta = bbox.maxLat - bbox.minLat; final double lonDelta = bbox.maxLon - bbox.minLon; fina...
java
private void printLocationIndexMatchQuery(final LocationIndexTree idx) { final double latDelta = bbox.maxLat - bbox.minLat; final double lonDelta = bbox.maxLon - bbox.minLon; final Random rand = new Random(seed); MiniPerfTest miniPerf = new MiniPerfTest() { @Override ...
[ "private", "void", "printLocationIndexMatchQuery", "(", "final", "LocationIndexTree", "idx", ")", "{", "final", "double", "latDelta", "=", "bbox", ".", "maxLat", "-", "bbox", ".", "minLat", ";", "final", "double", "lonDelta", "=", "bbox", ".", "maxLon", "-", ...
Test the performance of finding candidate points for the index (which is run for every GPX entry).
[ "Test", "the", "performance", "of", "finding", "candidate", "points", "for", "the", "index", "(", "which", "is", "run", "for", "every", "GPX", "entry", ")", "." ]
train
https://github.com/graphhopper/map-matching/blob/32cd83f14cb990c2be83c8781f22dfb59e0dbeb4/matching-web/src/main/java/com/graphhopper/matching/cli/MeasurementCommand.java#L145-L158
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_billingAccount_portability_GET
public OvhOrder telephony_billingAccount_portability_GET(String billingAccount, String building, String callNumber, String city, String contactName, String contactNumber, OvhCountriesAvailable country, Date desireDate, Boolean displayUniversalDirectory, String door, Boolean executeAsSoonAsPossible, Boolean fiabilisatio...
java
public OvhOrder telephony_billingAccount_portability_GET(String billingAccount, String building, String callNumber, String city, String contactName, String contactNumber, OvhCountriesAvailable country, Date desireDate, Boolean displayUniversalDirectory, String door, Boolean executeAsSoonAsPossible, Boolean fiabilisatio...
[ "public", "OvhOrder", "telephony_billingAccount_portability_GET", "(", "String", "billingAccount", ",", "String", "building", ",", "String", "callNumber", ",", "String", "city", ",", "String", "contactName", ",", "String", "contactNumber", ",", "OvhCountriesAvailable", ...
Get prices and contracts information REST: GET /order/telephony/{billingAccount}/portability @param desireDate [required] The date you want for portability execution. Overridden if flag executeAsSoonAsPossible is set @param type [required] The type of number : landline or special @param callNumber [required] The numbe...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6455-L6489
alkacon/opencms-core
src/org/opencms/gwt/CmsGwtActionElement.java
CmsGwtActionElement.exportDictionary
public static String exportDictionary(String name, Method method, Object data) throws SerializationException { """ Serializes the result of the given method for RPC-prefetching.<p> @param name the dictionary name @param method the method @param data the result to serialize @return the serialized data @t...
java
public static String exportDictionary(String name, Method method, Object data) throws SerializationException { return exportDictionary(name, serialize(method, data)); }
[ "public", "static", "String", "exportDictionary", "(", "String", "name", ",", "Method", "method", ",", "Object", "data", ")", "throws", "SerializationException", "{", "return", "exportDictionary", "(", "name", ",", "serialize", "(", "method", ",", "data", ")", ...
Serializes the result of the given method for RPC-prefetching.<p> @param name the dictionary name @param method the method @param data the result to serialize @return the serialized data @throws SerializationException if something goes wrong
[ "Serializes", "the", "result", "of", "the", "given", "method", "for", "RPC", "-", "prefetching", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtActionElement.java#L180-L183
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.packEntries
public static void packEntries(File[] filesToPack, File destZipFile, NameMapper mapper) { """ Compresses the given files into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param filesToPack files that needs to be zipped. @param destZipFile ZIP file that will be ...
java
public static void packEntries(File[] filesToPack, File destZipFile, NameMapper mapper) { packEntries(filesToPack, destZipFile, mapper, DEFAULT_COMPRESSION_LEVEL); }
[ "public", "static", "void", "packEntries", "(", "File", "[", "]", "filesToPack", ",", "File", "destZipFile", ",", "NameMapper", "mapper", ")", "{", "packEntries", "(", "filesToPack", ",", "destZipFile", ",", "mapper", ",", "DEFAULT_COMPRESSION_LEVEL", ")", ";", ...
Compresses the given files into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param filesToPack files that needs to be zipped. @param destZipFile ZIP file that will be created or overwritten. @param mapper call-back for renaming the entries.
[ "Compresses", "the", "given", "files", "into", "a", "ZIP", "file", ".", "<p", ">", "The", "ZIP", "file", "must", "not", "be", "a", "directory", "and", "its", "parent", "directory", "must", "exist", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1509-L1511
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/Index.java
Index.dropIndex
public static UsingPath dropIndex(String namespace, String keyspace, String indexName) { """ Drop a secondary index in the given namespace:keyspace. @param namespace the namespace prefix (will be escaped). @param keyspace the keyspace (bucket, will be escaped). @param indexName the name of the index to be dro...
java
public static UsingPath dropIndex(String namespace, String keyspace, String indexName) { return new DefaultDropPath().drop(namespace, keyspace, indexName); }
[ "public", "static", "UsingPath", "dropIndex", "(", "String", "namespace", ",", "String", "keyspace", ",", "String", "indexName", ")", "{", "return", "new", "DefaultDropPath", "(", ")", ".", "drop", "(", "namespace", ",", "keyspace", ",", "indexName", ")", ";...
Drop a secondary index in the given namespace:keyspace. @param namespace the namespace prefix (will be escaped). @param keyspace the keyspace (bucket, will be escaped). @param indexName the name of the index to be dropped (will be escaped).
[ "Drop", "a", "secondary", "index", "in", "the", "given", "namespace", ":", "keyspace", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/Index.java#L85-L87
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java
StyleCache.setStyle
public boolean setStyle(PolylineOptions polylineOptions, StyleRow style) { """ Set the style into the polyline options @param polylineOptions polyline options @param style style row @return true if style was set into the polyline options """ return StyleUtils.setStyle(polylineOptions, st...
java
public boolean setStyle(PolylineOptions polylineOptions, StyleRow style) { return StyleUtils.setStyle(polylineOptions, style, density); }
[ "public", "boolean", "setStyle", "(", "PolylineOptions", "polylineOptions", ",", "StyleRow", "style", ")", "{", "return", "StyleUtils", ".", "setStyle", "(", "polylineOptions", ",", "style", ",", "density", ")", ";", "}" ]
Set the style into the polyline options @param polylineOptions polyline options @param style style row @return true if style was set into the polyline options
[ "Set", "the", "style", "into", "the", "polyline", "options" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java#L271-L273
matthewhorridge/owlexplanation
src/main/java/org/semanticweb/owl/explanation/impl/laconic/LaconicExplanationGeneratorBasedOnOPlus.java
LaconicExplanationGeneratorBasedOnOPlus.getExplanations
public Set<Explanation<OWLAxiom>> getExplanations(OWLAxiom entailment, int limit) throws ExplanationException { """ Gets explanations for an entailment, with limit on the number of explanations returned. @param entailment The entailment for which explanations will be generated. @param limit The maximum number of...
java
public Set<Explanation<OWLAxiom>> getExplanations(OWLAxiom entailment, int limit) throws ExplanationException { OWLDataFactory dataFactory = new OWLDataFactoryImpl(); OPlusGenerator transformation = new OPlusGenerator(dataFactory, oplusSplitting); OWLOntologyManager man = OWLManager.createOWLO...
[ "public", "Set", "<", "Explanation", "<", "OWLAxiom", ">", ">", "getExplanations", "(", "OWLAxiom", "entailment", ",", "int", "limit", ")", "throws", "ExplanationException", "{", "OWLDataFactory", "dataFactory", "=", "new", "OWLDataFactoryImpl", "(", ")", ";", "...
Gets explanations for an entailment, with limit on the number of explanations returned. @param entailment The entailment for which explanations will be generated. @param limit The maximum number of explanations to generate. This should be a positive integer. @return A set containing explanations. The maximum cardinali...
[ "Gets", "explanations", "for", "an", "entailment", "with", "limit", "on", "the", "number", "of", "explanations", "returned", "." ]
train
https://github.com/matthewhorridge/owlexplanation/blob/439c5ca67835f5e421adde725e4e8a3bcd760ac8/src/main/java/org/semanticweb/owl/explanation/impl/laconic/LaconicExplanationGeneratorBasedOnOPlus.java#L60-L101
alkacon/opencms-core
src/org/opencms/workflow/CmsExtendedPublishResourceFormatter.java
CmsExtendedPublishResourceFormatter.getMessage
protected String getMessage(String key, String... args) { """ Gets a message from the message bundle.<p> @param key the message key @param args the message parameters @return the message from the message bundle """ return Messages.get().getBundle(m_cms.getRequestContext().getLocale()).key(key, ...
java
protected String getMessage(String key, String... args) { return Messages.get().getBundle(m_cms.getRequestContext().getLocale()).key(key, args); }
[ "protected", "String", "getMessage", "(", "String", "key", ",", "String", "...", "args", ")", "{", "return", "Messages", ".", "get", "(", ")", ".", "getBundle", "(", "m_cms", ".", "getRequestContext", "(", ")", ".", "getLocale", "(", ")", ")", ".", "ke...
Gets a message from the message bundle.<p> @param key the message key @param args the message parameters @return the message from the message bundle
[ "Gets", "a", "message", "from", "the", "message", "bundle", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/CmsExtendedPublishResourceFormatter.java#L153-L156
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.createUser
public User createUser(Map<String, Object> userParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Creates an user @param userParams User data (firstname, lastname, email, username, company, department, directory_id, distinguished_name, external_id, group_id, invalid_login_att...
java
public User createUser(Map<String, Object> userParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient(); OAuthClient oAuthClient = new OAuthClient(httpClient); URIBuilder url = ne...
[ "public", "User", "createUser", "(", "Map", "<", "String", ",", "Object", ">", "userParams", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "Onelogi...
Creates an user @param userParams User data (firstname, lastname, email, username, company, department, directory_id, distinguished_name, external_id, group_id, invalid_login_attempts, locale_code, manager_ad_id, member_of, notes, openid_name, phone, samaccountname, title, userprincipalname) @return Created user @th...
[ "Creates", "an", "user" ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L672-L705
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/accounts/A_CmsUserDataImexportDialog.java
A_CmsUserDataImexportDialog.getSelectRoles
protected List<CmsSelectWidgetOption> getSelectRoles() { """ Returns the role names to show in the select box.<p> @return the role names to show in the select box """ List<CmsSelectWidgetOption> retVal = new ArrayList<CmsSelectWidgetOption>(); try { boolean inRootOu = CmsString...
java
protected List<CmsSelectWidgetOption> getSelectRoles() { List<CmsSelectWidgetOption> retVal = new ArrayList<CmsSelectWidgetOption>(); try { boolean inRootOu = CmsStringUtil.isEmptyOrWhitespaceOnly(getParamOufqn()) || CmsOrganizationalUnit.SEPARATOR.equals(getParamOufqn()); ...
[ "protected", "List", "<", "CmsSelectWidgetOption", ">", "getSelectRoles", "(", ")", "{", "List", "<", "CmsSelectWidgetOption", ">", "retVal", "=", "new", "ArrayList", "<", "CmsSelectWidgetOption", ">", "(", ")", ";", "try", "{", "boolean", "inRootOu", "=", "Cm...
Returns the role names to show in the select box.<p> @return the role names to show in the select box
[ "Returns", "the", "role", "names", "to", "show", "in", "the", "select", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/accounts/A_CmsUserDataImexportDialog.java#L182-L216
sirensolutions/siren-join
src/main/java/solutions/siren/join/common/Bytes.java
Bytes.readBytesRef
public final static void readBytesRef(BytesRef src, BytesRef dst) { """ Decodes a {@link BytesRef} from another {@link BytesRef}. @see Bytes#writeBytesRef(BytesRef, BytesRef) """ int length = Bytes.readVInt(src); if (length == 0) { dst.offset = dst.length = 0; return; } if (dst.b...
java
public final static void readBytesRef(BytesRef src, BytesRef dst) { int length = Bytes.readVInt(src); if (length == 0) { dst.offset = dst.length = 0; return; } if (dst.bytes.length < length) { dst.bytes = new byte[length]; } System.arraycopy(src.bytes, src.offset, dst.bytes,...
[ "public", "final", "static", "void", "readBytesRef", "(", "BytesRef", "src", ",", "BytesRef", "dst", ")", "{", "int", "length", "=", "Bytes", ".", "readVInt", "(", "src", ")", ";", "if", "(", "length", "==", "0", ")", "{", "dst", ".", "offset", "=", ...
Decodes a {@link BytesRef} from another {@link BytesRef}. @see Bytes#writeBytesRef(BytesRef, BytesRef)
[ "Decodes", "a", "{" ]
train
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/common/Bytes.java#L148-L165
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/CalendarPanel.java
CalendarPanel.zApplyBorderPropertiesList
void zApplyBorderPropertiesList() { """ zApplyBorderPropertiesList, This applies the currently stored border property list to this calendar. The border property list is retrieved from the current date picker settings. Before the Borders properties list is applied, the existing border labels will be cleared. "...
java
void zApplyBorderPropertiesList() { // Skip this function if the settings have not been applied. if (settings == null) { return; } // Clear the current borders. (Set them to be invisible and black.) CalendarBorderProperties clearBordersProperties = new CalendarBorderP...
[ "void", "zApplyBorderPropertiesList", "(", ")", "{", "// Skip this function if the settings have not been applied.", "if", "(", "settings", "==", "null", ")", "{", "return", ";", "}", "// Clear the current borders. (Set them to be invisible and black.)", "CalendarBorderProperties",...
zApplyBorderPropertiesList, This applies the currently stored border property list to this calendar. The border property list is retrieved from the current date picker settings. Before the Borders properties list is applied, the existing border labels will be cleared. "Clearing" the labels means that the JLabel proper...
[ "zApplyBorderPropertiesList", "This", "applies", "the", "currently", "stored", "border", "property", "list", "to", "this", "calendar", ".", "The", "border", "property", "list", "is", "retrieved", "from", "the", "current", "date", "picker", "settings", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/CalendarPanel.java#L1636-L1655
relayrides/pushy
pushy/src/main/java/com/turo/pushy/apns/server/AcceptAllPushNotificationHandlerFactory.java
AcceptAllPushNotificationHandlerFactory.buildHandler
@Override public PushNotificationHandler buildHandler(final SSLSession sslSession) { """ Constructs a new push notification handler that unconditionally accepts all push notifications. @param sslSession the SSL session associated with the channel for which this handler will handle notifications @return a...
java
@Override public PushNotificationHandler buildHandler(final SSLSession sslSession) { return new PushNotificationHandler() { @Override public void handlePushNotification(final Http2Headers headers, final ByteBuf payload) { // Accept everything unconditionally! ...
[ "@", "Override", "public", "PushNotificationHandler", "buildHandler", "(", "final", "SSLSession", "sslSession", ")", "{", "return", "new", "PushNotificationHandler", "(", ")", "{", "@", "Override", "public", "void", "handlePushNotification", "(", "final", "Http2Header...
Constructs a new push notification handler that unconditionally accepts all push notifications. @param sslSession the SSL session associated with the channel for which this handler will handle notifications @return a new "accept everything" push notification handler
[ "Constructs", "a", "new", "push", "notification", "handler", "that", "unconditionally", "accepts", "all", "push", "notifications", "." ]
train
https://github.com/relayrides/pushy/blob/1f6f9a0e07d785c815d74c2320a8d87c80231d36/pushy/src/main/java/com/turo/pushy/apns/server/AcceptAllPushNotificationHandlerFactory.java#L48-L57
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/globalfac/ConstituencyTreeFactor.java
ConstituencyTreeFactor.getLogOddsRatios
private void getLogOddsRatios(VarTensor[] inMsgs, double[][] spanWeights) { """ Computes the log odds ratio for each edge. w_{ij} = \mu_{ij}(1) / \mu_{ij}(0) """ Algebra s = inMsgs[0].getAlgebra(); // Compute the odds ratios of the messages for each edge in the tree. DoubleArra...
java
private void getLogOddsRatios(VarTensor[] inMsgs, double[][] spanWeights) { Algebra s = inMsgs[0].getAlgebra(); // Compute the odds ratios of the messages for each edge in the tree. DoubleArrays.fill(spanWeights, Double.NEGATIVE_INFINITY); for (VarTensor inMsg : inMsgs) { ...
[ "private", "void", "getLogOddsRatios", "(", "VarTensor", "[", "]", "inMsgs", ",", "double", "[", "]", "[", "]", "spanWeights", ")", "{", "Algebra", "s", "=", "inMsgs", "[", "0", "]", ".", "getAlgebra", "(", ")", ";", "// Compute the odds ratios of the messag...
Computes the log odds ratio for each edge. w_{ij} = \mu_{ij}(1) / \mu_{ij}(0)
[ "Computes", "the", "log", "odds", "ratio", "for", "each", "edge", ".", "w_", "{", "ij", "}", "=", "\\", "mu_", "{", "ij", "}", "(", "1", ")", "/", "\\", "mu_", "{", "ij", "}", "(", "0", ")" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/globalfac/ConstituencyTreeFactor.java#L250-L262
jmrozanec/cron-utils
src/main/java/com/cronutils/model/definition/CronConstraintsFactory.java
CronConstraintsFactory.ensureEitherDayOfYearOrMonth
public static CronConstraint ensureEitherDayOfYearOrMonth() { """ Creates CronConstraint to ensure that either day-of-year or month is assigned a specific value. @return newly created CronConstraint instance, never {@code null}; """ return new CronConstraint("Both, a day-of-year AND a day-of-month o...
java
public static CronConstraint ensureEitherDayOfYearOrMonth() { return new CronConstraint("Both, a day-of-year AND a day-of-month or day-of-week, are not supported.") { private static final long serialVersionUID = 520379111876897579L; @Override public boolean validate(Cron cro...
[ "public", "static", "CronConstraint", "ensureEitherDayOfYearOrMonth", "(", ")", "{", "return", "new", "CronConstraint", "(", "\"Both, a day-of-year AND a day-of-month or day-of-week, are not supported.\"", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=",...
Creates CronConstraint to ensure that either day-of-year or month is assigned a specific value. @return newly created CronConstraint instance, never {@code null};
[ "Creates", "CronConstraint", "to", "ensure", "that", "either", "day", "-", "of", "-", "year", "or", "month", "is", "assigned", "a", "specific", "value", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/model/definition/CronConstraintsFactory.java#L30-L45
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.setAlignementOption
@Override public void setAlignementOption(String key, String val) { """ This method forwards to {@link #setAlignmentOption(BlastAlignmentParameterEnum, String)}. Consider using it instead. """ setAlignmentOption(BlastAlignmentParameterEnum.valueOf(key), val); }
java
@Override public void setAlignementOption(String key, String val) { setAlignmentOption(BlastAlignmentParameterEnum.valueOf(key), val); }
[ "@", "Override", "public", "void", "setAlignementOption", "(", "String", "key", ",", "String", "val", ")", "{", "setAlignmentOption", "(", "BlastAlignmentParameterEnum", ".", "valueOf", "(", "key", ")", ",", "val", ")", ";", "}" ]
This method forwards to {@link #setAlignmentOption(BlastAlignmentParameterEnum, String)}. Consider using it instead.
[ "This", "method", "forwards", "to", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L62-L65
codescape/bitvunit
bitvunit-core/src/main/java/de/codescape/bitvunit/BitvUnit.java
BitvUnit.assertAccessibility
public static void assertAccessibility(HtmlPage htmlPage, Testable testable) { """ JUnit Assertion to verify a {@link com.gargoylesoftware.htmlunit.html.HtmlPage} instance for accessibility. @param htmlPage {@link com.gargoylesoftware.htmlunit.html.HtmlPage} instance @param testable rule(s) to apply """ ...
java
public static void assertAccessibility(HtmlPage htmlPage, Testable testable) { assertThat(htmlPage, is(compliantTo(testable))); }
[ "public", "static", "void", "assertAccessibility", "(", "HtmlPage", "htmlPage", ",", "Testable", "testable", ")", "{", "assertThat", "(", "htmlPage", ",", "is", "(", "compliantTo", "(", "testable", ")", ")", ")", ";", "}" ]
JUnit Assertion to verify a {@link com.gargoylesoftware.htmlunit.html.HtmlPage} instance for accessibility. @param htmlPage {@link com.gargoylesoftware.htmlunit.html.HtmlPage} instance @param testable rule(s) to apply
[ "JUnit", "Assertion", "to", "verify", "a", "{", "@link", "com", ".", "gargoylesoftware", ".", "htmlunit", ".", "html", ".", "HtmlPage", "}", "instance", "for", "accessibility", "." ]
train
https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/BitvUnit.java#L58-L60
b3dgs/lionengine
lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/MouseMoveAwt.java
MouseMoveAwt.robotMove
void robotMove(int nx, int ny) { """ Move mouse with robot. @param nx The new X. @param ny The new Y. """ oldX = x; oldY = y; x = nx; y = ny; wx = nx; wy = ny; mx = x - oldX; my = y - oldY; moved = true; }
java
void robotMove(int nx, int ny) { oldX = x; oldY = y; x = nx; y = ny; wx = nx; wy = ny; mx = x - oldX; my = y - oldY; moved = true; }
[ "void", "robotMove", "(", "int", "nx", ",", "int", "ny", ")", "{", "oldX", "=", "x", ";", "oldY", "=", "y", ";", "x", "=", "nx", ";", "y", "=", "ny", ";", "wx", "=", "nx", ";", "wy", "=", "ny", ";", "mx", "=", "x", "-", "oldX", ";", "my...
Move mouse with robot. @param nx The new X. @param ny The new Y.
[ "Move", "mouse", "with", "robot", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/MouseMoveAwt.java#L99-L110
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/html/AbstractSWECHTMLProvider.java
AbstractSWECHTMLProvider.fillHead
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void fillHead (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nonnull final HCHtml aHtml) { """ Fill the HTML HEAD element. @param aSWEC Web execution context @param aHtml The HTML object to be filled. """ final IRequestWebScopeWith...
java
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void fillHead (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nonnull final HCHtml aHtml) { final IRequestWebScopeWithoutResponse aRequestScope = aSWEC.getRequestScope (); final HCHead aHead = aHtml.head (); // Add all meta elements ...
[ "@", "OverrideOnDemand", "@", "OverridingMethodsMustInvokeSuper", "protected", "void", "fillHead", "(", "@", "Nonnull", "final", "ISimpleWebExecutionContext", "aSWEC", ",", "@", "Nonnull", "final", "HCHtml", "aHtml", ")", "{", "final", "IRequestWebScopeWithoutResponse", ...
Fill the HTML HEAD element. @param aSWEC Web execution context @param aHtml The HTML object to be filled.
[ "Fill", "the", "HTML", "HEAD", "element", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/html/AbstractSWECHTMLProvider.java#L67-L76
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java
TmdbMovies.getMovieCredits
public MediaCreditList getMovieCredits(int movieId) throws MovieDbException { """ Get the cast and crew information for a specific movie id. @param movieId @return @throws MovieDbException """ TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); URL...
java
public MediaCreditList getMovieCredits(int movieId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.CREDITS).buildUrl(parameters); String webpage = httpTools...
[ "public", "MediaCreditList", "getMovieCredits", "(", "int", "movieId", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID", ",", "movieId", ")", ...
Get the cast and crew information for a specific movie id. @param movieId @return @throws MovieDbException
[ "Get", "the", "cast", "and", "crew", "information", "for", "a", "specific", "movie", "id", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java#L200-L211
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.trimEnd
@Nullable @CheckReturnValue public static String trimEnd (@Nullable final String sSrc, @Nullable final String sTail) { """ Trim the passed tail from the source value. If the source value does not end with the passed tail, nothing happens. @param sSrc The input source string @param sTail The string to be...
java
@Nullable @CheckReturnValue public static String trimEnd (@Nullable final String sSrc, @Nullable final String sTail) { return endsWith (sSrc, sTail) ? sSrc.substring (0, sSrc.length () - sTail.length ()) : sSrc; }
[ "@", "Nullable", "@", "CheckReturnValue", "public", "static", "String", "trimEnd", "(", "@", "Nullable", "final", "String", "sSrc", ",", "@", "Nullable", "final", "String", "sTail", ")", "{", "return", "endsWith", "(", "sSrc", ",", "sTail", ")", "?", "sSrc...
Trim the passed tail from the source value. If the source value does not end with the passed tail, nothing happens. @param sSrc The input source string @param sTail The string to be trimmed of the end @return The trimmed string, or the original input string, if the tail was not found @see #trimStart(String, String) @s...
[ "Trim", "the", "passed", "tail", "from", "the", "source", "value", ".", "If", "the", "source", "value", "does", "not", "end", "with", "the", "passed", "tail", "nothing", "happens", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3376-L3381
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.createClient
public Client createClient(Client client, AccessToken accessToken) { """ Create a client. @param client the client to create @param accessToken the access token used to access the service @return The created client @throws UnauthorizedException if the accessToken is not valid @throws Connec...
java
public Client createClient(Client client, AccessToken accessToken) { return getAuthService().createClient(client, accessToken); }
[ "public", "Client", "createClient", "(", "Client", "client", ",", "AccessToken", "accessToken", ")", "{", "return", "getAuthService", "(", ")", ".", "createClient", "(", "client", ",", "accessToken", ")", ";", "}" ]
Create a client. @param client the client to create @param accessToken the access token used to access the service @return The created client @throws UnauthorizedException if the accessToken is not valid @throws ConnectionInitializationException if the connection to the given OSIAM service could not b...
[ "Create", "a", "client", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L665-L667
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java
CurationManager.saveObjectData
private void saveObjectData(JsonSimple data, String oid) throws TransactionException { """ Save the provided object data back into storage @param data The data to save @param oid The object we want it saved in """ // Get from storage DigitalObject object = null; try { object = storage.getObje...
java
private void saveObjectData(JsonSimple data, String oid) throws TransactionException { // Get from storage DigitalObject object = null; try { object = storage.getObject(oid); getDataPayload(object); } catch (StorageException ex) { log.error("Error accessing object '{}' in storage: ", oid, ex); th...
[ "private", "void", "saveObjectData", "(", "JsonSimple", "data", ",", "String", "oid", ")", "throws", "TransactionException", "{", "// Get from storage", "DigitalObject", "object", "=", "null", ";", "try", "{", "object", "=", "storage", ".", "getObject", "(", "oi...
Save the provided object data back into storage @param data The data to save @param oid The object we want it saved in
[ "Save", "the", "provided", "object", "data", "back", "into", "storage" ]
train
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java#L1922-L1942
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/WorkspacesInner.java
WorkspacesInner.getByResourceGroupAsync
public Observable<WorkspaceInner> getByResourceGroupAsync(String resourceGroupName, String workspaceName) { """ Gets information about a Workspace. @param resourceGroupName Name of the resource group to which the resource belongs. @param workspaceName The name of the workspace. Workspace names can only contain...
java
public Observable<WorkspaceInner> getByResourceGroupAsync(String resourceGroupName, String workspaceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInn...
[ "public", "Observable", "<", "WorkspaceInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "workspaceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "workspaceName", ")", ".", "...
Gets information about a Workspace. @param resourceGroupName Name of the resource group to which the resource belongs. @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 cha...
[ "Gets", "information", "about", "a", "Workspace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/WorkspacesInner.java#L924-L931
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addLessThan
public void addLessThan(Object attribute, Object value) { """ Adds Less Than (<) criteria, customer_id < 10034 @param attribute The field name to be used @param value An object representing the value of the field """ // PAW // addSelectionCriteria(ValueCriteria.buildLessCriteria(attribute,...
java
public void addLessThan(Object attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildLessCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildLessCriteria(attribute, value, getUserAlias(attribute))); }
[ "public", "void", "addLessThan", "(", "Object", "attribute", ",", "Object", "value", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildLessCriteria(attribute, value, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildLessCriteria", "(", "...
Adds Less Than (<) criteria, customer_id < 10034 @param attribute The field name to be used @param value An object representing the value of the field
[ "Adds", "Less", "Than", "(", "<", ")", "criteria", "customer_id", "<", "10034" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L535-L540
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/TSDBEntityDto.java
TSDBEntityDto.createDtoObject
public static <D extends TSDBEntityDto, E extends TSDBEntity> D createDtoObject(Class<D> clazz, E tsdbEntity) { """ Converts a TSDB entity to a DTO. @param <D> The TSDB DTO type. @param <E> The TSDB entity type. @param clazz The runtime type of the DTO object. @param tsdbEntity ...
java
public static <D extends TSDBEntityDto, E extends TSDBEntity> D createDtoObject(Class<D> clazz, E tsdbEntity) { D result = null; try { result = clazz.newInstance(); BeanUtils.copyProperties(result, tsdbEntity); } catch (Exception ex) { throw new WebApplicatio...
[ "public", "static", "<", "D", "extends", "TSDBEntityDto", ",", "E", "extends", "TSDBEntity", ">", "D", "createDtoObject", "(", "Class", "<", "D", ">", "clazz", ",", "E", "tsdbEntity", ")", "{", "D", "result", "=", "null", ";", "try", "{", "result", "="...
Converts a TSDB entity to a DTO. @param <D> The TSDB DTO type. @param <E> The TSDB entity type. @param clazz The runtime type of the DTO object. @param tsdbEntity The TSDB entity to convert. @return The TSDB DTO. @throws WebApplicationException If an error occurs.
[ "Converts", "a", "TSDB", "entity", "to", "a", "DTO", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/TSDBEntityDto.java#L67-L77
alkacon/opencms-core
src-gwt/org/opencms/ade/publish/client/CmsPublishDataModel.java
CmsPublishDataModel.countResourcesInGroup
public int countResourcesInGroup(I_CmsPublishResourceCheck check, List<CmsPublishResource> group) { """ Counts the resources of a group which pass a given check.<p> @param check the check to apply @param group the group of publish resources @return the number of resources in that group which passed the chec...
java
public int countResourcesInGroup(I_CmsPublishResourceCheck check, List<CmsPublishResource> group) { int result = 0; for (CmsPublishResource res : group) { if (check.check(res)) { result += 1; } } return result; }
[ "public", "int", "countResourcesInGroup", "(", "I_CmsPublishResourceCheck", "check", ",", "List", "<", "CmsPublishResource", ">", "group", ")", "{", "int", "result", "=", "0", ";", "for", "(", "CmsPublishResource", "res", ":", "group", ")", "{", "if", "(", "...
Counts the resources of a group which pass a given check.<p> @param check the check to apply @param group the group of publish resources @return the number of resources in that group which passed the check
[ "Counts", "the", "resources", "of", "a", "group", "which", "pass", "a", "given", "check", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/publish/client/CmsPublishDataModel.java#L220-L230
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java
HazardCurve.createHazardCurveFromSurvivalProbabilities
public static HazardCurve createHazardCurveFromSurvivalProbabilities(String name, double[] times, double[] givenSurvivalProbabilities) { """ Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods. @param name The name of this hazard curve. @param...
java
public static HazardCurve createHazardCurveFromSurvivalProbabilities(String name, double[] times, double[] givenSurvivalProbabilities){ HazardCurve survivalProbabilities = new HazardCurve(name); for(int timeIndex=0; timeIndex<times.length;timeIndex++) { survivalProbabilities.addSurvivalProbability(times[timeInd...
[ "public", "static", "HazardCurve", "createHazardCurveFromSurvivalProbabilities", "(", "String", "name", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenSurvivalProbabilities", ")", "{", "HazardCurve", "survivalProbabilities", "=", "new", "HazardCurve", ...
Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods. @param name The name of this hazard curve. @param times Array of times as doubles. @param givenSurvivalProbabilities Array of corresponding survival probabilities. @return A new discount factor obje...
[ "Create", "a", "hazard", "curve", "from", "given", "times", "and", "given", "discount", "factors", "using", "default", "interpolation", "and", "extrapolation", "methods", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java#L152-L160
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/image/ColorServlet.java
ColorServlet.service
public void service(ServletRequest pRequest, ServletResponse pResponse) throws IOException, ServletException { """ Renders the 1 x 1 single color PNG to the response. @see ColorServlet class description @param pRequest the request @param pResponse the response @throws IOException @throws ServletExceptio...
java
public void service(ServletRequest pRequest, ServletResponse pResponse) throws IOException, ServletException { int red = 0; int green = 0; int blue = 0; // Get color parameter and parse color String rgb = pRequest.getParameter(RGB_PARAME); if (rgb != null && rgb.l...
[ "public", "void", "service", "(", "ServletRequest", "pRequest", ",", "ServletResponse", "pResponse", ")", "throws", "IOException", ",", "ServletException", "{", "int", "red", "=", "0", ";", "int", "green", "=", "0", ";", "int", "blue", "=", "0", ";", "// G...
Renders the 1 x 1 single color PNG to the response. @see ColorServlet class description @param pRequest the request @param pResponse the response @throws IOException @throws ServletException
[ "Renders", "the", "1", "x", "1", "single", "color", "PNG", "to", "the", "response", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/image/ColorServlet.java#L112-L162
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.getByRecommendedElasticPoolAsync
public Observable<DatabaseInner> getByRecommendedElasticPoolAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { """ Gets a database inside of a recommented elastic pool. @param resourceGroupName The name of the resource group that contains the resource. Y...
java
public Observable<DatabaseInner> getByRecommendedElasticPoolAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { return getByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).map(new Fun...
[ "public", "Observable", "<", "DatabaseInner", ">", "getByRecommendedElasticPoolAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "recommendedElasticPoolName", ",", "String", "databaseName", ")", "{", "return", "getByRecommendedElasticPo...
Gets a database inside of a recommented elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param recommendedElasticPoolName The name of the elastic pool...
[ "Gets", "a", "database", "inside", "of", "a", "recommented", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L1569-L1576
vlingo/vlingo-actors
src/main/java/io/vlingo/actors/DirectoryScannerActor.java
DirectoryScannerActor.internalActorOf
private <T> T internalActorOf(final Class<T> protocol, final Address address) { """ Answer the actor as the {@code protocol} or {@code null}. @param protocol the {@code Class<T>} of the protocol that the actor must support @param address the {@code Address} of the actor to find @param T the protocol type @retu...
java
private <T> T internalActorOf(final Class<T> protocol, final Address address) { final Actor actor = directory.actorOf(address); try { if (actor != null) { return stage().actorAs(actor, protocol); } else { logger().log("Actor with address: " + address + " not found; protocol is: " + ...
[ "private", "<", "T", ">", "T", "internalActorOf", "(", "final", "Class", "<", "T", ">", "protocol", ",", "final", "Address", "address", ")", "{", "final", "Actor", "actor", "=", "directory", ".", "actorOf", "(", "address", ")", ";", "try", "{", "if", ...
Answer the actor as the {@code protocol} or {@code null}. @param protocol the {@code Class<T>} of the protocol that the actor must support @param address the {@code Address} of the actor to find @param T the protocol type @return T
[ "Answer", "the", "actor", "as", "the", "{" ]
train
https://github.com/vlingo/vlingo-actors/blob/c7d046fd139c0490cf0fd2588d7dc2f792f13493/src/main/java/io/vlingo/actors/DirectoryScannerActor.java#L46-L59
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getJobAsync
public ServiceFuture<JobResponseInner> getJobAsync(String resourceGroupName, String resourceName, String jobId, final ServiceCallback<JobResponseInner> serviceCallback) { """ Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-regi...
java
public ServiceFuture<JobResponseInner> getJobAsync(String resourceGroupName, String resourceName, String jobId, final ServiceCallback<JobResponseInner> serviceCallback) { return ServiceFuture.fromResponse(getJobWithServiceResponseAsync(resourceGroupName, resourceName, jobId), serviceCallback); }
[ "public", "ServiceFuture", "<", "JobResponseInner", ">", "getJobAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "jobId", ",", "final", "ServiceCallback", "<", "JobResponseInner", ">", "serviceCallback", ")", "{", "return", "...
Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. @param resourceGroupName Th...
[ "Get", "the", "details", "of", "a", "job", "from", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub", "-", "de...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L2223-L2225
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.formatCurrency
public static String formatCurrency(final Number value, final Locale locale) { """ <p> Same as {@link #formatCurrency(Number) formatCurrency} for the specified locale. </p> @param value Number to be formatted @param locale Target locale @return String representing the monetary amount """ retu...
java
public static String formatCurrency(final Number value, final Locale locale) { return withinLocale(new Callable<String>() { public String call() { return formatCurrency(value); } }, locale); }
[ "public", "static", "String", "formatCurrency", "(", "final", "Number", "value", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "String", ">", "(", ")", "{", "public", "String", "call", "(", ")", "{", "...
<p> Same as {@link #formatCurrency(Number) formatCurrency} for the specified locale. </p> @param value Number to be formatted @param locale Target locale @return String representing the monetary amount
[ "<p", ">", "Same", "as", "{", "@link", "#formatCurrency", "(", "Number", ")", "formatCurrency", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L648-L657
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/api/InjectorHolder.java
InjectorHolder.setInjector
public static void setInjector(String applicationName, PaxWicketInjector newInjector) { """ <p>setInjector.</p> @param applicationName a {@link java.lang.String} object. @param newInjector a {@link org.ops4j.pax.wicket.api.PaxWicketInjector} object. """ synchronized (instance.injectorMap) { ...
java
public static void setInjector(String applicationName, PaxWicketInjector newInjector) { synchronized (instance.injectorMap) { instance.injectorMap.put(applicationName, newInjector); } LOGGER.debug("registered Injector for application {}", applicationName); }
[ "public", "static", "void", "setInjector", "(", "String", "applicationName", ",", "PaxWicketInjector", "newInjector", ")", "{", "synchronized", "(", "instance", ".", "injectorMap", ")", "{", "instance", ".", "injectorMap", ".", "put", "(", "applicationName", ",", ...
<p>setInjector.</p> @param applicationName a {@link java.lang.String} object. @param newInjector a {@link org.ops4j.pax.wicket.api.PaxWicketInjector} object.
[ "<p", ">", "setInjector", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/api/InjectorHolder.java#L66-L71
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java
AjaxAddableTabbedPanel.onRemoveTab
public void onRemoveTab(final AjaxRequestTarget target, final int index) { """ On remove tab removes the tab of the given index. @param target the target @param index the index """ final int tabSize = getTabs().size(); // there have to be at least one tab on the ajaxTabbedPanel... if ((2 <= tabSize...
java
public void onRemoveTab(final AjaxRequestTarget target, final int index) { final int tabSize = getTabs().size(); // there have to be at least one tab on the ajaxTabbedPanel... if ((2 <= tabSize) && (index < tabSize)) { setSelectedTab(index); getTabs().remove(index); target.add(this); } }
[ "public", "void", "onRemoveTab", "(", "final", "AjaxRequestTarget", "target", ",", "final", "int", "index", ")", "{", "final", "int", "tabSize", "=", "getTabs", "(", ")", ".", "size", "(", ")", ";", "// there have to be at least one tab on the ajaxTabbedPanel...", ...
On remove tab removes the tab of the given index. @param target the target @param index the index
[ "On", "remove", "tab", "removes", "the", "tab", "of", "the", "given", "index", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L752-L762
alrocar/POIProxy
es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/proxy/POIProxy.java
POIProxy.getPOIs
public String getPOIs(String id, double lon, double lat, double distanceInMeters, List<Param> optionalParams) throws Exception { """ This method is used to get the pois from a service and return a GeoJSON document with the data retrieved given a longitude, latitude and a radius in meters. @param id The id...
java
public String getPOIs(String id, double lon, double lat, double distanceInMeters, List<Param> optionalParams) throws Exception { DescribeService describeService = getDescribeServiceByID(id); double[] bbox = Calculator.boundingCoordinates(lon, lat, distanceInMeters); POIProxyEvent beforeEvent = new POIProxyEv...
[ "public", "String", "getPOIs", "(", "String", "id", ",", "double", "lon", ",", "double", "lat", ",", "double", "distanceInMeters", ",", "List", "<", "Param", ">", "optionalParams", ")", "throws", "Exception", "{", "DescribeService", "describeService", "=", "ge...
This method is used to get the pois from a service and return a GeoJSON document with the data retrieved given a longitude, latitude and a radius in meters. @param id The id of the service @param lon The longitude @param lat The latitude @param distanceInMeters The distance in meters from the lon, lat @return The GeoJ...
[ "This", "method", "is", "used", "to", "get", "the", "pois", "from", "a", "service", "and", "return", "a", "GeoJSON", "document", "with", "the", "data", "retrieved", "given", "a", "longitude", "latitude", "and", "a", "radius", "in", "meters", "." ]
train
https://github.com/alrocar/POIProxy/blob/e1dabe738a862478b2580e90d5fc4209a2997868/es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/proxy/POIProxy.java#L326-L358