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
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/HttpRedirectBindingUtil.java
HttpRedirectBindingUtil.toDeflatedBase64
static String toDeflatedBase64(SAMLObject message) { """ Encodes the specified {@code message} into a deflated base64 string. """ requireNonNull(message, "message"); final String messageStr; try { messageStr = nodeToString(XMLObjectSupport.marshall(message)); } catc...
java
static String toDeflatedBase64(SAMLObject message) { requireNonNull(message, "message"); final String messageStr; try { messageStr = nodeToString(XMLObjectSupport.marshall(message)); } catch (MarshallingException e) { throw new SamlException("failed to serialize ...
[ "static", "String", "toDeflatedBase64", "(", "SAMLObject", "message", ")", "{", "requireNonNull", "(", "message", ",", "\"message\"", ")", ";", "final", "String", "messageStr", ";", "try", "{", "messageStr", "=", "nodeToString", "(", "XMLObjectSupport", ".", "ma...
Encodes the specified {@code message} into a deflated base64 string.
[ "Encodes", "the", "specified", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/HttpRedirectBindingUtil.java#L186-L205
unbescape/unbescape
src/main/java/org/unbescape/java/JavaEscape.java
JavaEscape.unescapeJava
public static void unescapeJava(final Reader reader, final Writer writer) throws IOException { """ <p> Perform a Java <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operatio...
java
public static void unescapeJava(final Reader reader, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } JavaEscapeUtil.unescape(reader, writer); }
[ "public", "static", "void", "unescapeJava", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writer' ...
<p> Perform a Java <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> Java unescape of SECs, u-based and octal escapes. </p> <p> This method is <stron...
[ "<p", ">", "Perform", "a", "Java", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", "p", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/java/JavaEscape.java#L918-L927
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/server/support/EmbeddedSolrServerFactory.java
EmbeddedSolrServerFactory.createCoreContainerViaConstructor
private CoreContainer createCoreContainerViaConstructor(String solrHomeDirectory, File solrXmlFile) { """ Create {@link CoreContainer} via its constructor (Solr 3.6.0 - 4.3.1) @param solrHomeDirectory @param solrXmlFile @return """ Constructor<CoreContainer> constructor = ClassUtils.getConstructorIfAvai...
java
private CoreContainer createCoreContainerViaConstructor(String solrHomeDirectory, File solrXmlFile) { Constructor<CoreContainer> constructor = ClassUtils.getConstructorIfAvailable(CoreContainer.class, String.class, File.class); return BeanUtils.instantiateClass(constructor, solrHomeDirectory, solrXmlFile); }
[ "private", "CoreContainer", "createCoreContainerViaConstructor", "(", "String", "solrHomeDirectory", ",", "File", "solrXmlFile", ")", "{", "Constructor", "<", "CoreContainer", ">", "constructor", "=", "ClassUtils", ".", "getConstructorIfAvailable", "(", "CoreContainer", "...
Create {@link CoreContainer} via its constructor (Solr 3.6.0 - 4.3.1) @param solrHomeDirectory @param solrXmlFile @return
[ "Create", "{", "@link", "CoreContainer", "}", "via", "its", "constructor", "(", "Solr", "3", ".", "6", ".", "0", "-", "4", ".", "3", ".", "1", ")" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/server/support/EmbeddedSolrServerFactory.java#L127-L131
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/util/PdfBoxUtilities.java
PdfBoxUtilities.splitPdf
public static void splitPdf(File inputPdfFile, File outputPdfFile, int firstPage, int lastPage) { """ Splits PDF. @param inputPdfFile input file @param outputPdfFile output file @param firstPage begin page @param lastPage end page """ PDDocument document = null; try { document...
java
public static void splitPdf(File inputPdfFile, File outputPdfFile, int firstPage, int lastPage) { PDDocument document = null; try { document = PDDocument.load(inputPdfFile); Splitter splitter = new Splitter(); splitter.setStartPage(firstPage); splitter.se...
[ "public", "static", "void", "splitPdf", "(", "File", "inputPdfFile", ",", "File", "outputPdfFile", ",", "int", "firstPage", ",", "int", "lastPage", ")", "{", "PDDocument", "document", "=", "null", ";", "try", "{", "document", "=", "PDDocument", ".", "load", ...
Splits PDF. @param inputPdfFile input file @param outputPdfFile output file @param firstPage begin page @param lastPage end page
[ "Splits", "PDF", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/PdfBoxUtilities.java#L142-L171
gsi-upm/BeastTool
beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/common/AgentRegistration.java
AgentRegistration.registerAgent
public static void registerAgent(Agent agent, String serviceName, String serviceType) throws FIPAException { """ Register the agent in the platform @param agent_name The name of the agent to be registered @param agent The agent to register. @throws FIPAException """ DFAgentDescription dfd = new ...
java
public static void registerAgent(Agent agent, String serviceName, String serviceType) throws FIPAException{ DFAgentDescription dfd = new DFAgentDescription(); ServiceDescription sd = new ServiceDescription(); sd.setType(serviceType); sd.setName(serviceName); //N...
[ "public", "static", "void", "registerAgent", "(", "Agent", "agent", ",", "String", "serviceName", ",", "String", "serviceType", ")", "throws", "FIPAException", "{", "DFAgentDescription", "dfd", "=", "new", "DFAgentDescription", "(", ")", ";", "ServiceDescription", ...
Register the agent in the platform @param agent_name The name of the agent to be registered @param agent The agent to register. @throws FIPAException
[ "Register", "the", "agent", "in", "the", "platform" ]
train
https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/common/AgentRegistration.java#L34-L56
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.paceFormat
public static String paceFormat(final Number value, final TimeMillis interval) { """ Same as {@link #paceFormat(Number, long)} @param value The number of occurrences within the specified interval @param interval The interval in milliseconds @return an human readable textual representation of the pace ""...
java
public static String paceFormat(final Number value, final TimeMillis interval) { return paceFormat(value, interval.millis()); }
[ "public", "static", "String", "paceFormat", "(", "final", "Number", "value", ",", "final", "TimeMillis", "interval", ")", "{", "return", "paceFormat", "(", "value", ",", "interval", ".", "millis", "(", ")", ")", ";", "}" ]
Same as {@link #paceFormat(Number, long)} @param value The number of occurrences within the specified interval @param interval The interval in milliseconds @return an human readable textual representation of the pace
[ "Same", "as", "{", "@link", "#paceFormat", "(", "Number", "long", ")", "}" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2118-L2121
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/mbeans/MeterMetric.java
MeterMetric.newMeter
public static MeterMetric newMeter(ScheduledExecutorService tickThread, String eventType, TimeUnit rateUnit) { """ Creates a new {@link MeterMetric}. @param tickThread background thread for updating the rates @param eventType the plural name of the event the meter is measuring (e.g., {@code "requests"}) @par...
java
public static MeterMetric newMeter(ScheduledExecutorService tickThread, String eventType, TimeUnit rateUnit) { return new MeterMetric(tickThread, eventType, rateUnit); }
[ "public", "static", "MeterMetric", "newMeter", "(", "ScheduledExecutorService", "tickThread", ",", "String", "eventType", ",", "TimeUnit", "rateUnit", ")", "{", "return", "new", "MeterMetric", "(", "tickThread", ",", "eventType", ",", "rateUnit", ")", ";", "}" ]
Creates a new {@link MeterMetric}. @param tickThread background thread for updating the rates @param eventType the plural name of the event the meter is measuring (e.g., {@code "requests"}) @param rateUnit the rate unit of the new meter @return a new {@link MeterMetric}
[ "Creates", "a", "new", "{", "@link", "MeterMetric", "}", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/mbeans/MeterMetric.java#L44-L46
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java
DAOValidatorHelper.resolveEnvironmentsParameters
public static String resolveEnvironmentsParameters(String expression) { """ Methode permettant de resoudre les variables d'environnement dans une chemin @param expression Expression du chemin @return Expression resolue """ // Si l'expression est vide if(expression == null || expression.trim().length(...
java
public static String resolveEnvironmentsParameters(String expression) { // Si l'expression est vide if(expression == null || expression.trim().length() == 0) { // On retourne null return null; } // Tant que la chaene traitee contient des ENVs while(isExpressionContainPattern(expression...
[ "public", "static", "String", "resolveEnvironmentsParameters", "(", "String", "expression", ")", "{", "// Si l'expression est vide\r", "if", "(", "expression", "==", "null", "||", "expression", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{...
Methode permettant de resoudre les variables d'environnement dans une chemin @param expression Expression du chemin @return Expression resolue
[ "Methode", "permettant", "de", "resoudre", "les", "variables", "d", "environnement", "dans", "une", "chemin" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L442-L470
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/BackendTransaction.java
BackendTransaction.mutateIndex
public void mutateIndex(StaticBuffer key, List<Entry> additions, List<Entry> deletions) throws BackendException { """ Applies the specified insertion and deletion mutations on the property index to the provided key. Both, the list of additions or deletions, may be empty or NULL if there is nothing to be added and...
java
public void mutateIndex(StaticBuffer key, List<Entry> additions, List<Entry> deletions) throws BackendException { indexStore.mutateEntries(key, additions, deletions, storeTx); }
[ "public", "void", "mutateIndex", "(", "StaticBuffer", "key", ",", "List", "<", "Entry", ">", "additions", ",", "List", "<", "Entry", ">", "deletions", ")", "throws", "BackendException", "{", "indexStore", ".", "mutateEntries", "(", "key", ",", "additions", "...
Applies the specified insertion and deletion mutations on the property index to the provided key. Both, the list of additions or deletions, may be empty or NULL if there is nothing to be added and/or deleted. @param key Key @param additions List of entries (column + value) to be added @param deletions List of co...
[ "Applies", "the", "specified", "insertion", "and", "deletion", "mutations", "on", "the", "property", "index", "to", "the", "provided", "key", ".", "Both", "the", "list", "of", "additions", "or", "deletions", "may", "be", "empty", "or", "NULL", "if", "there",...
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/BackendTransaction.java#L196-L198
casmi/casmi
src/main/java/casmi/graphics/element/Rect.java
Rect.setGradationColor
public void setGradationColor(GradationMode2D mode, Color color1, Color color2) { """ Sets the gradation mode and colors. @param mode The mode of gradation. @param color1 The color for gradation. @param color2 The color for gradation. @see casmi.GradationMode2D """ setGradation(true); i...
java
public void setGradationColor(GradationMode2D mode, Color color1, Color color2) { setGradation(true); if (startColor == null || endColor == null) { startColor = new RGBColor(0.0, 0.0, 0.0); endColor = new RGBColor(0.0, 0.0, 0.0); } startColor = color1; end...
[ "public", "void", "setGradationColor", "(", "GradationMode2D", "mode", ",", "Color", "color1", ",", "Color", "color2", ")", "{", "setGradation", "(", "true", ")", ";", "if", "(", "startColor", "==", "null", "||", "endColor", "==", "null", ")", "{", "startC...
Sets the gradation mode and colors. @param mode The mode of gradation. @param color1 The color for gradation. @param color2 The color for gradation. @see casmi.GradationMode2D
[ "Sets", "the", "gradation", "mode", "and", "colors", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Rect.java#L257-L266
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.getEpisodeImages
public ResultList<Artwork> getEpisodeImages(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException { """ Get the images (episode stills) for a TV episode by combination of a season and episode number. @param tvID @param seasonNumber @param episodeNumber @return @throws MovieDbException ...
java
public ResultList<Artwork> getEpisodeImages(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, tvID); parameters.add(Param.SEASON_NUMBER, seasonNumber); parameters.add(Param.EPISODE_NUMBER, e...
[ "public", "ResultList", "<", "Artwork", ">", "getEpisodeImages", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "pa...
Get the images (episode stills) for a TV episode by combination of a season and episode number. @param tvID @param seasonNumber @param episodeNumber @return @throws MovieDbException
[ "Get", "the", "images", "(", "episode", "stills", ")", "for", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L201-L218
EXIficient/exificient-core
src/main/java/com/siemens/ct/exi/core/values/DateTimeValue.java
DateTimeValue.setMonthDay
protected static void setMonthDay(int monthDay, Calendar cal) { """ Sets month and day of the given calendar making use of of the monthDay representation defined in EXI format @param monthDay monthDay @param cal calendar """ // monthDay = month * 32 + day; int month = monthDay / MONTH_MULTIPLICATOR;...
java
protected static void setMonthDay(int monthDay, Calendar cal) { // monthDay = month * 32 + day; int month = monthDay / MONTH_MULTIPLICATOR; cal.set(Calendar.MONTH, month - 1); int day = monthDay - month * MONTH_MULTIPLICATOR; cal.set(Calendar.DAY_OF_MONTH, day); }
[ "protected", "static", "void", "setMonthDay", "(", "int", "monthDay", ",", "Calendar", "cal", ")", "{", "// monthDay = month * 32 + day;", "int", "month", "=", "monthDay", "/", "MONTH_MULTIPLICATOR", ";", "cal", ".", "set", "(", "Calendar", ".", "MONTH", ",", ...
Sets month and day of the given calendar making use of of the monthDay representation defined in EXI format @param monthDay monthDay @param cal calendar
[ "Sets", "month", "and", "day", "of", "the", "given", "calendar", "making", "use", "of", "of", "the", "monthDay", "representation", "defined", "in", "EXI", "format" ]
train
https://github.com/EXIficient/exificient-core/blob/b6026c5fd39e9cc3d7874caa20f084e264e0ddc7/src/main/java/com/siemens/ct/exi/core/values/DateTimeValue.java#L488-L494
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/WindowUtils.java
WindowUtils.setWindowShape
public static void setWindowShape(Window window, Shape s) { """ Sets the shape of a window. This will be done via a com.sun API and may be not available on all platforms. @param window to change the shape for @param s the new shape for the window. """ if (PlatformUtils.isJava6()) { setWi...
java
public static void setWindowShape(Window window, Shape s) { if (PlatformUtils.isJava6()) { setWindowShapeJava6(window, s); } else { setWindowShapeJava7(window, s); } }
[ "public", "static", "void", "setWindowShape", "(", "Window", "window", ",", "Shape", "s", ")", "{", "if", "(", "PlatformUtils", ".", "isJava6", "(", ")", ")", "{", "setWindowShapeJava6", "(", "window", ",", "s", ")", ";", "}", "else", "{", "setWindowShap...
Sets the shape of a window. This will be done via a com.sun API and may be not available on all platforms. @param window to change the shape for @param s the new shape for the window.
[ "Sets", "the", "shape", "of", "a", "window", ".", "This", "will", "be", "done", "via", "a", "com", ".", "sun", "API", "and", "may", "be", "not", "available", "on", "all", "platforms", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/WindowUtils.java#L75-L81
killbill/killbill
util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java
InternalCallContextFactory.createInternalCallContext
public InternalCallContext createInternalCallContext(final UUID objectId, final ObjectType objectType, final CallContext context) { """ Create an internal call callcontext from a call callcontext, and retrieving the account_record_id from another table @param objectId the id of the row in the table pointed by...
java
public InternalCallContext createInternalCallContext(final UUID objectId, final ObjectType objectType, final CallContext context) { // The callcontext may come from a user API - for security, check we're not doing cross-tenants operations //final Long tenantRecordIdFromObject = retrieveTenantRecordIdFro...
[ "public", "InternalCallContext", "createInternalCallContext", "(", "final", "UUID", "objectId", ",", "final", "ObjectType", "objectType", ",", "final", "CallContext", "context", ")", "{", "// The callcontext may come from a user API - for security, check we're not doing cross-tenan...
Create an internal call callcontext from a call callcontext, and retrieving the account_record_id from another table @param objectId the id of the row in the table pointed by object type where to look for account_record_id @param objectType the object type pointed by this objectId @param context original call cal...
[ "Create", "an", "internal", "call", "callcontext", "from", "a", "call", "callcontext", "and", "retrieving", "the", "account_record_id", "from", "another", "table" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java#L194-L213
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java
AmazonS3EncryptionClient.onAbort
private <T extends Throwable> T onAbort(UploadObjectObserver observer, T t) { """ Convenient method to notifies the observer to abort the multi-part upload, and returns the original exception. """ observer.onAbort(); return t; }
java
private <T extends Throwable> T onAbort(UploadObjectObserver observer, T t) { observer.onAbort(); return t; }
[ "private", "<", "T", "extends", "Throwable", ">", "T", "onAbort", "(", "UploadObjectObserver", "observer", ",", "T", "t", ")", "{", "observer", ".", "onAbort", "(", ")", ";", "return", "t", ";", "}" ]
Convenient method to notifies the observer to abort the multi-part upload, and returns the original exception.
[ "Convenient", "method", "to", "notifies", "the", "observer", "to", "abort", "the", "multi", "-", "part", "upload", "and", "returns", "the", "original", "exception", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java#L843-L846
RogerParkinson/madura-objects-parent
madura-utils/src/main/java/nz/co/senanque/parser/Parser.java
Parser.exactOrError
public boolean exactOrError(String match,TextProvider textProvider) { """ Match against the passed string. Case is ignored if the ignoreCase flag is set. @param match @param textProvider @return true if matched """ if (!exact(match,textProvider,false)) { throw new ParserExceptio...
java
public boolean exactOrError(String match,TextProvider textProvider) { if (!exact(match,textProvider,false)) { throw new ParserException("Expected "+match,textProvider); } return true; }
[ "public", "boolean", "exactOrError", "(", "String", "match", ",", "TextProvider", "textProvider", ")", "{", "if", "(", "!", "exact", "(", "match", ",", "textProvider", ",", "false", ")", ")", "{", "throw", "new", "ParserException", "(", "\"Expected \"", "+",...
Match against the passed string. Case is ignored if the ignoreCase flag is set. @param match @param textProvider @return true if matched
[ "Match", "against", "the", "passed", "string", ".", "Case", "is", "ignored", "if", "the", "ignoreCase", "flag", "is", "set", "." ]
train
https://github.com/RogerParkinson/madura-objects-parent/blob/9b5385dd0437611f0ce8506f63646e018d06fb8e/madura-utils/src/main/java/nz/co/senanque/parser/Parser.java#L225-L232
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java
Expr.setRecursive
private void setRecursive(Type type, IAtomContainer mol) { """ Set the recursive value of this atom expression. @param type the type of expression @param mol the recursive pattern """ switch (type) { case RECURSIVE: this.type = type; this.value = 0; ...
java
private void setRecursive(Type type, IAtomContainer mol) { switch (type) { case RECURSIVE: this.type = type; this.value = 0; this.left = null; this.right = null; this.query = mol; this.ptrn = null; ...
[ "private", "void", "setRecursive", "(", "Type", "type", ",", "IAtomContainer", "mol", ")", "{", "switch", "(", "type", ")", "{", "case", "RECURSIVE", ":", "this", ".", "type", "=", "type", ";", "this", ".", "value", "=", "0", ";", "this", ".", "left"...
Set the recursive value of this atom expression. @param type the type of expression @param mol the recursive pattern
[ "Set", "the", "recursive", "value", "of", "this", "atom", "expression", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java#L631-L644
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.evaluateMDS
public <T extends Evaluation> T evaluateMDS(JavaRDD<MultiDataSet> data) { """ Evaluate the network (classification performance) in a distributed manner on the provided data """ return evaluateMDS(data, DEFAULT_EVAL_SCORE_BATCH_SIZE); }
java
public <T extends Evaluation> T evaluateMDS(JavaRDD<MultiDataSet> data) { return evaluateMDS(data, DEFAULT_EVAL_SCORE_BATCH_SIZE); }
[ "public", "<", "T", "extends", "Evaluation", ">", "T", "evaluateMDS", "(", "JavaRDD", "<", "MultiDataSet", ">", "data", ")", "{", "return", "evaluateMDS", "(", "data", ",", "DEFAULT_EVAL_SCORE_BATCH_SIZE", ")", ";", "}" ]
Evaluate the network (classification performance) in a distributed manner on the provided data
[ "Evaluate", "the", "network", "(", "classification", "performance", ")", "in", "a", "distributed", "manner", "on", "the", "provided", "data" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L726-L728
forge/xml-parser
src/main/java/org/jboss/forge/parser/xml/QueryUtil.java
QueryUtil.validateNodeAndPatterns
public static void validateNodeAndPatterns(final Node node, final Pattern... patterns) throws IllegalArgumentException { """ Validates input @param node @param patterns @throws IllegalArgumentException If the {@link Node} is not specified or no {@link Pattern}s are specified """ // Preco...
java
public static void validateNodeAndPatterns(final Node node, final Pattern... patterns) throws IllegalArgumentException { // Precondition checks if (node == null) { throw new IllegalArgumentException("node must be specified"); } if (patterns == null || patterns.lengt...
[ "public", "static", "void", "validateNodeAndPatterns", "(", "final", "Node", "node", ",", "final", "Pattern", "...", "patterns", ")", "throws", "IllegalArgumentException", "{", "// Precondition checks", "if", "(", "node", "==", "null", ")", "{", "throw", "new", ...
Validates input @param node @param patterns @throws IllegalArgumentException If the {@link Node} is not specified or no {@link Pattern}s are specified
[ "Validates", "input" ]
train
https://github.com/forge/xml-parser/blob/2804337a6028878a3f97fb12f8bbe45501fa0024/src/main/java/org/jboss/forge/parser/xml/QueryUtil.java#L40-L54
Bernardo-MG/maven-site-fixer
src/main/java/com/bernardomg/velocity/tool/SiteTool.java
SiteTool.transformTables
public final void transformTables(final Element root) { """ Transforms tables to stripped and bordered tables. <p> This will apply Bootstrap classes to the table. @param root root element with tables to transform """ final Collection<Element> tables; // Tables to fix checkNotNull(root, "...
java
public final void transformTables(final Element root) { final Collection<Element> tables; // Tables to fix checkNotNull(root, "Received a null pointer as root element"); // Table rows with <th> tags in a <tbody> tables = root.select("table"); for (final Element table : tables) ...
[ "public", "final", "void", "transformTables", "(", "final", "Element", "root", ")", "{", "final", "Collection", "<", "Element", ">", "tables", ";", "// Tables to fix", "checkNotNull", "(", "root", ",", "\"Received a null pointer as root element\"", ")", ";", "// Tab...
Transforms tables to stripped and bordered tables. <p> This will apply Bootstrap classes to the table. @param root root element with tables to transform
[ "Transforms", "tables", "to", "stripped", "and", "bordered", "tables", ".", "<p", ">", "This", "will", "apply", "Bootstrap", "classes", "to", "the", "table", "." ]
train
https://github.com/Bernardo-MG/maven-site-fixer/blob/e064472faa7edb0fca11647a22d90ad72089baa3/src/main/java/com/bernardomg/velocity/tool/SiteTool.java#L326-L338
wildfly/wildfly-core
threads/src/main/java/org/jboss/as/threads/ThreadsParser.java
ThreadsParser.nextElement
private static Element nextElement(XMLExtendedStreamReader reader, String expectedNamespace) throws XMLStreamException { """ A variation of nextElement that verifies the nextElement is not in a different namespace. @param reader the XmlExtendedReader to read from. @param expectedNamespace the namesp...
java
private static Element nextElement(XMLExtendedStreamReader reader, String expectedNamespace) throws XMLStreamException { Element element = Element.forName(reader.getLocalName()); if (element == null) { return element; } else if (expectedNamespace.equals(reader.getNamespaceURI())) { ...
[ "private", "static", "Element", "nextElement", "(", "XMLExtendedStreamReader", "reader", ",", "String", "expectedNamespace", ")", "throws", "XMLStreamException", "{", "Element", "element", "=", "Element", ".", "forName", "(", "reader", ".", "getLocalName", "(", ")",...
A variation of nextElement that verifies the nextElement is not in a different namespace. @param reader the XmlExtendedReader to read from. @param expectedNamespace the namespace expected. @return the element or null if the end is reached @throws XMLStreamException if the namespace is wrong or there is a pr...
[ "A", "variation", "of", "nextElement", "that", "verifies", "the", "nextElement", "is", "not", "in", "a", "different", "namespace", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/threads/src/main/java/org/jboss/as/threads/ThreadsParser.java#L890-L900
reactor/reactor-netty
src/main/java/reactor/netty/http/Cookies.java
Cookies.newServerRequestHolder
public static Cookies newServerRequestHolder(HttpHeaders headers, ServerCookieDecoder decoder) { """ Return a new cookies holder from server request headers @param headers server request headers @return a new cookies holder from server request headers """ return new Cookies(headers, HttpHeaderNames.COOKIE,...
java
public static Cookies newServerRequestHolder(HttpHeaders headers, ServerCookieDecoder decoder) { return new Cookies(headers, HttpHeaderNames.COOKIE, false, decoder); }
[ "public", "static", "Cookies", "newServerRequestHolder", "(", "HttpHeaders", "headers", ",", "ServerCookieDecoder", "decoder", ")", "{", "return", "new", "Cookies", "(", "headers", ",", "HttpHeaderNames", ".", "COOKIE", ",", "false", ",", "decoder", ")", ";", "}...
Return a new cookies holder from server request headers @param headers server request headers @return a new cookies holder from server request headers
[ "Return", "a", "new", "cookies", "holder", "from", "server", "request", "headers" ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/Cookies.java#L55-L57
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/table/CellBasedWidgetImpl.java
CellBasedWidgetImpl.sinkEvents
public final void sinkEvents(Widget widget, Set<String> typeNames) { """ Sink events on the widget. @param widget the {@link Widget} that will handle the events @param typeNames the names of the events to sink """ if (typeNames == null) { return; } int eventsToSink = 0; for (String t...
java
public final void sinkEvents(Widget widget, Set<String> typeNames) { if (typeNames == null) { return; } int eventsToSink = 0; for (String typeName : typeNames) { int typeInt = Event.getTypeInt(typeName); if (typeInt < 0) { widget.sinkBitlessEvent(typeName); } else { ...
[ "public", "final", "void", "sinkEvents", "(", "Widget", "widget", ",", "Set", "<", "String", ">", "typeNames", ")", "{", "if", "(", "typeNames", "==", "null", ")", "{", "return", ";", "}", "int", "eventsToSink", "=", "0", ";", "for", "(", "String", "...
Sink events on the widget. @param widget the {@link Widget} that will handle the events @param typeNames the names of the events to sink
[ "Sink", "events", "on", "the", "widget", "." ]
train
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/table/CellBasedWidgetImpl.java#L133-L153
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java
ContentSpecProcessor.doesParentMatch
protected boolean doesParentMatch(final CSNodeWrapper parent, final CSNodeWrapper entityParent) { """ Checks to see if two parent nodes match @param parent The current parent being used for processing. @param entityParent The processed entities parent. @return True if the two match, otherwise false. ...
java
protected boolean doesParentMatch(final CSNodeWrapper parent, final CSNodeWrapper entityParent) { if (parent != null && entityParent != null) { if (parent.getId() != null && parent.getId().equals(entityParent.getId())) { return true; } else if (parent.getId() == null && e...
[ "protected", "boolean", "doesParentMatch", "(", "final", "CSNodeWrapper", "parent", ",", "final", "CSNodeWrapper", "entityParent", ")", "{", "if", "(", "parent", "!=", "null", "&&", "entityParent", "!=", "null", ")", "{", "if", "(", "parent", ".", "getId", "...
Checks to see if two parent nodes match @param parent The current parent being used for processing. @param entityParent The processed entities parent. @return True if the two match, otherwise false.
[ "Checks", "to", "see", "if", "two", "parent", "nodes", "match" ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java#L1570-L1584
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/Img.java
Img.pressText
public Img pressText(String pressText, Color color, Font font, int x, int y, float alpha) { """ 给图片添加文字水印<br> 此方法并不关闭流 @param pressText 水印文字 @param color 水印的字体颜色 @param font {@link Font} 字体相关信息 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的...
java
public Img pressText(String pressText, Color color, Font font, int x, int y, float alpha) { final BufferedImage targetImage = getValidSrcImg(); final Graphics2D g = targetImage.createGraphics(); if(null == font) { // 默认字体 font = new Font("Courier", Font.PLAIN, (int)(targetImage.getHeight() * 0.75))...
[ "public", "Img", "pressText", "(", "String", "pressText", ",", "Color", "color", ",", "Font", "font", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "{", "final", "BufferedImage", "targetImage", "=", "getValidSrcImg", "(", ")", ";", "final...
给图片添加文字水印<br> 此方法并不关闭流 @param pressText 水印文字 @param color 水印的字体颜色 @param font {@link Font} 字体相关信息 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @return 处理后的图像
[ "给图片添加文字水印<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L398-L422
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java
LayoutRefiner.isCrossed
private boolean isCrossed(Point2d beg1, Point2d end1, Point2d beg2, Point2d end2) { """ Check if two bonds are crossing. @param beg1 first atom of first bond @param end1 second atom of first bond @param beg2 first atom of second bond @param end2 first atom of second bond @return bond is crossing """ ...
java
private boolean isCrossed(Point2d beg1, Point2d end1, Point2d beg2, Point2d end2) { return Line2D.linesIntersect(beg1.x, beg1.y, end1.x, end1.y, beg2.x, beg2.y, end2.x, end2.y); }
[ "private", "boolean", "isCrossed", "(", "Point2d", "beg1", ",", "Point2d", "end1", ",", "Point2d", "beg2", ",", "Point2d", "end2", ")", "{", "return", "Line2D", ".", "linesIntersect", "(", "beg1", ".", "x", ",", "beg1", ".", "y", ",", "end1", ".", "x",...
Check if two bonds are crossing. @param beg1 first atom of first bond @param end1 second atom of first bond @param beg2 first atom of second bond @param end2 first atom of second bond @return bond is crossing
[ "Check", "if", "two", "bonds", "are", "crossing", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java#L293-L295
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.deleteWhitespace
public static String deleteWhitespace(String str) { """ <p>Deletes all whitespaces from a String as defined by {@link Character#isWhitespace(char)}.</p> <pre> GosuStringUtil.deleteWhitespace(null) = null GosuStringUtil.deleteWhitespace("") = "" GosuStringUtil.deleteWhitespace("abc") ...
java
public static String deleteWhitespace(String str) { if (isEmpty(str)) { return str; } int sz = str.length(); char[] chs = new char[sz]; int count = 0; for (int i = 0; i < sz; i++) { if (!Character.isWhitespace(str.charAt(i))) { chs[count++] = str.cha...
[ "public", "static", "String", "deleteWhitespace", "(", "String", "str", ")", "{", "if", "(", "isEmpty", "(", "str", ")", ")", "{", "return", "str", ";", "}", "int", "sz", "=", "str", ".", "length", "(", ")", ";", "char", "[", "]", "chs", "=", "ne...
<p>Deletes all whitespaces from a String as defined by {@link Character#isWhitespace(char)}.</p> <pre> GosuStringUtil.deleteWhitespace(null) = null GosuStringUtil.deleteWhitespace("") = "" GosuStringUtil.deleteWhitespace("abc") = "abc" GosuStringUtil.deleteWhitespace(" ab c ") = "abc" </pr...
[ "<p", ">", "Deletes", "all", "whitespaces", "from", "a", "String", "as", "defined", "by", "{", "@link", "Character#isWhitespace", "(", "char", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L3121-L3137
hotchemi/Android-Rate
library/src/main/java/hotchemi/android/rate/PreferenceHelper.java
PreferenceHelper.setAgreeShowDialog
static void setAgreeShowDialog(Context context, boolean isAgree) { """ Set agree flag about show dialog.<br/> If it is false, rate dialog will never shown unless data is cleared. @param context context @param isAgree agree with showing rate dialog """ SharedPreferences.Editor editor = getPreferenc...
java
static void setAgreeShowDialog(Context context, boolean isAgree) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putBoolean(PREF_KEY_IS_AGREE_SHOW_DIALOG, isAgree); editor.apply(); }
[ "static", "void", "setAgreeShowDialog", "(", "Context", "context", ",", "boolean", "isAgree", ")", "{", "SharedPreferences", ".", "Editor", "editor", "=", "getPreferencesEditor", "(", "context", ")", ";", "editor", ".", "putBoolean", "(", "PREF_KEY_IS_AGREE_SHOW_DIA...
Set agree flag about show dialog.<br/> If it is false, rate dialog will never shown unless data is cleared. @param context context @param isAgree agree with showing rate dialog
[ "Set", "agree", "flag", "about", "show", "dialog", ".", "<br", "/", ">", "If", "it", "is", "false", "rate", "dialog", "will", "never", "shown", "unless", "data", "is", "cleared", "." ]
train
https://github.com/hotchemi/Android-Rate/blob/5d327976fd5106b8edfee5e5f7ad05dfe66c7857/library/src/main/java/hotchemi/android/rate/PreferenceHelper.java#L51-L55
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java
JBasePanel.getSubScreen
public static Component getSubScreen(Container container, Class<?> targetClass) { """ Climb down through the panel hierarchy until you find a component of this class. @param component The (non-inclusive) component to start climbing down to find this class. @param targetClass The class type to find (or inherited)...
java
public static Component getSubScreen(Container container, Class<?> targetClass) { for (int i = container.getComponentCount() - 1; i >= 0; i--) { // Go backwards to do toolbars, menubars last. Component component = container.getComponent(i); if (targetClass.isAssignableFrom(...
[ "public", "static", "Component", "getSubScreen", "(", "Container", "container", ",", "Class", "<", "?", ">", "targetClass", ")", "{", "for", "(", "int", "i", "=", "container", ".", "getComponentCount", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i",...
Climb down through the panel hierarchy until you find a component of this class. @param component The (non-inclusive) component to start climbing down to find this class. @param targetClass The class type to find (or inherited). @return The first parent down the tree to match this class (or null).
[ "Climb", "down", "through", "the", "panel", "hierarchy", "until", "you", "find", "a", "component", "of", "this", "class", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L391-L406
apache/groovy
src/main/groovy/groovy/lang/GroovyClassLoader.java
GroovyClassLoader.isSourceNewer
protected boolean isSourceNewer(URL source, Class cls) throws IOException { """ Decides if the given source is newer than a class. @param source the source we may want to compile @param cls the former class @return true if the source is newer, false else @throws IOException if it is not possible to open a...
java
protected boolean isSourceNewer(URL source, Class cls) throws IOException { long lastMod; // Special handling for file:// protocol, as getLastModified() often reports // incorrect results (-1) if (isFile(source)) { // Coerce the file URL to a File // See ClassNod...
[ "protected", "boolean", "isSourceNewer", "(", "URL", "source", ",", "Class", "cls", ")", "throws", "IOException", "{", "long", "lastMod", ";", "// Special handling for file:// protocol, as getLastModified() often reports", "// incorrect results (-1)", "if", "(", "isFile", "...
Decides if the given source is newer than a class. @param source the source we may want to compile @param cls the former class @return true if the source is newer, false else @throws IOException if it is not possible to open an connection for the given source @see #getTimeStamp(Class)
[ "Decides", "if", "the", "given", "source", "is", "newer", "than", "a", "class", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/GroovyClassLoader.java#L962-L981
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java
Widget.rotateByAxis
public void rotateByAxis(float angle, float x, float y, float z) { """ Modify the widget's current rotation in angle/axis terms. @param angle Angle of rotation in degrees. @param x 'X' component of the axis. @param y 'Y' component of the axis. @param z 'Z' component of the axis. """ getTransf...
java
public void rotateByAxis(float angle, float x, float y, float z) { getTransform().rotateByAxis(angle, x, y, z); if (mTransformCache.rotateByAxis(angle, x, y, z)) { onTransformChanged(); } }
[ "public", "void", "rotateByAxis", "(", "float", "angle", ",", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "getTransform", "(", ")", ".", "rotateByAxis", "(", "angle", ",", "x", ",", "y", ",", "z", ")", ";", "if", "(", "mTransformC...
Modify the widget's current rotation in angle/axis terms. @param angle Angle of rotation in degrees. @param x 'X' component of the axis. @param y 'Y' component of the axis. @param z 'Z' component of the axis.
[ "Modify", "the", "widget", "s", "current", "rotation", "in", "angle", "/", "axis", "terms", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1638-L1643
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java
SchedulerStateManagerAdaptor.getTopology
public TopologyAPI.Topology getTopology(String topologyName) { """ Get the topology definition for the given topology @return Topology """ return awaitResult(delegate.getTopology(null, topologyName)); }
java
public TopologyAPI.Topology getTopology(String topologyName) { return awaitResult(delegate.getTopology(null, topologyName)); }
[ "public", "TopologyAPI", ".", "Topology", "getTopology", "(", "String", "topologyName", ")", "{", "return", "awaitResult", "(", "delegate", ".", "getTopology", "(", "null", ",", "topologyName", ")", ")", ";", "}" ]
Get the topology definition for the given topology @return Topology
[ "Get", "the", "topology", "definition", "for", "the", "given", "topology" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java#L275-L277
quattor/pan
panc/src/main/java/org/quattor/pan/ttemplate/IteratorMap.java
IteratorMap.put
public void put(Resource resource, Resource.Iterator iterator) { """ Associate the iterator to the given resource. If the iterator is null, then the mapping is removed. @param resource resource to associate the iterator to @param iterator iterator to associate to the resource; if null mapping is removed ...
java
public void put(Resource resource, Resource.Iterator iterator) { assert (resource != null); Integer key = Integer.valueOf(System.identityHashCode(resource)); if (iterator != null) { map.put(key, iterator); } else { map.remove(key); } }
[ "public", "void", "put", "(", "Resource", "resource", ",", "Resource", ".", "Iterator", "iterator", ")", "{", "assert", "(", "resource", "!=", "null", ")", ";", "Integer", "key", "=", "Integer", ".", "valueOf", "(", "System", ".", "identityHashCode", "(", ...
Associate the iterator to the given resource. If the iterator is null, then the mapping is removed. @param resource resource to associate the iterator to @param iterator iterator to associate to the resource; if null mapping is removed
[ "Associate", "the", "iterator", "to", "the", "given", "resource", ".", "If", "the", "iterator", "is", "null", "then", "the", "mapping", "is", "removed", "." ]
train
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/pan/ttemplate/IteratorMap.java#L52-L62
ag-gipp/MathMLTools
mathml-converters/src/main/java/com/formulasearchengine/mathmltools/converters/MathMLConverter.java
MathMLConverter.scanFormulaNode
Content scanFormulaNode(Element formulaNode) throws Exception { """ Tries to scan and interpret a formula node and guess its content format. @param formulaNode formula to be inspected @return sse {@link Content} format @throws Exception parsing error """ // first off, try scanning for a semantic s...
java
Content scanFormulaNode(Element formulaNode) throws Exception { // first off, try scanning for a semantic split, this indicates multiple semantics Boolean containsSemantic = XMLHelper.getElementB(formulaNode, xPath.compile("//m:semantics")) != null; // check if there is an annotationNode and if...
[ "Content", "scanFormulaNode", "(", "Element", "formulaNode", ")", "throws", "Exception", "{", "// first off, try scanning for a semantic split, this indicates multiple semantics", "Boolean", "containsSemantic", "=", "XMLHelper", ".", "getElementB", "(", "formulaNode", ",", "xPa...
Tries to scan and interpret a formula node and guess its content format. @param formulaNode formula to be inspected @return sse {@link Content} format @throws Exception parsing error
[ "Tries", "to", "scan", "and", "interpret", "a", "formula", "node", "and", "guess", "its", "content", "format", "." ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-converters/src/main/java/com/formulasearchengine/mathmltools/converters/MathMLConverter.java#L230-L271
RestComm/jss7
m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UARouteManagement.java
M3UARouteManagement.addRoute
protected void addRoute(int dpc, int opc, int si, String asName, int traffmode) throws Exception { """ Creates key (combination of dpc:opc:si) and adds instance of {@link AsImpl} represented by asName as route for this key @param dpc @param opc @param si @param asName @throws Exception If corresponding {@li...
java
protected void addRoute(int dpc, int opc, int si, String asName, int traffmode) throws Exception { AsImpl asImpl = null; for (FastList.Node<As> n = this.m3uaManagement.appServers.head(), end = this.m3uaManagement.appServers.tail(); (n = n .getNext()) != end;) { if (n.getValue...
[ "protected", "void", "addRoute", "(", "int", "dpc", ",", "int", "opc", ",", "int", "si", ",", "String", "asName", ",", "int", "traffmode", ")", "throws", "Exception", "{", "AsImpl", "asImpl", "=", "null", ";", "for", "(", "FastList", ".", "Node", "<", ...
Creates key (combination of dpc:opc:si) and adds instance of {@link AsImpl} represented by asName as route for this key @param dpc @param opc @param si @param asName @throws Exception If corresponding {@link AsImpl} doesn't exist or {@link AsImpl} already added
[ "Creates", "key", "(", "combination", "of", "dpc", ":", "opc", ":", "si", ")", "and", "adds", "instance", "of", "{", "@link", "AsImpl", "}", "represented", "by", "asName", "as", "route", "for", "this", "key" ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UARouteManagement.java#L191-L221
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/SFSUtilities.java
SFSUtilities.getResultSetEnvelope
public static Envelope getResultSetEnvelope(ResultSet resultSet, String fieldName) throws SQLException { """ Compute the full extend of a ResultSet using a specified geometry field. If the ResultSet does not contain this geometry field throw an exception @param resultSet ResultSet to analyse @param fieldName ...
java
public static Envelope getResultSetEnvelope(ResultSet resultSet, String fieldName) throws SQLException { Envelope aggregatedEnvelope = null; while (resultSet.next()) { Geometry geom = (Geometry) resultSet.getObject(fieldName); if (aggregatedEnvelope != null) { agg...
[ "public", "static", "Envelope", "getResultSetEnvelope", "(", "ResultSet", "resultSet", ",", "String", "fieldName", ")", "throws", "SQLException", "{", "Envelope", "aggregatedEnvelope", "=", "null", ";", "while", "(", "resultSet", ".", "next", "(", ")", ")", "{",...
Compute the full extend of a ResultSet using a specified geometry field. If the ResultSet does not contain this geometry field throw an exception @param resultSet ResultSet to analyse @param fieldName Field to analyse @return The full extend of the field in the ResultSet @throws SQLException
[ "Compute", "the", "full", "extend", "of", "a", "ResultSet", "using", "a", "specified", "geometry", "field", ".", "If", "the", "ResultSet", "does", "not", "contain", "this", "geometry", "field", "throw", "an", "exception" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/SFSUtilities.java#L468-L479
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Base.java
Base.withDb
public static <T> T withDb(String jndiName, Supplier<T> supplier) { """ Same as {@link DB#withDb(String, Supplier)}, but with db name {@link DB#DEFAULT_NAME}. """ return new DB(DB.DEFAULT_NAME).withDb(jndiName, supplier); }
java
public static <T> T withDb(String jndiName, Supplier<T> supplier) { return new DB(DB.DEFAULT_NAME).withDb(jndiName, supplier); }
[ "public", "static", "<", "T", ">", "T", "withDb", "(", "String", "jndiName", ",", "Supplier", "<", "T", ">", "supplier", ")", "{", "return", "new", "DB", "(", "DB", ".", "DEFAULT_NAME", ")", ".", "withDb", "(", "jndiName", ",", "supplier", ")", ";", ...
Same as {@link DB#withDb(String, Supplier)}, but with db name {@link DB#DEFAULT_NAME}.
[ "Same", "as", "{" ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Base.java#L406-L408
JCTools/JCTools
jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java
MpscRelaxedArrayQueue.fixProducerOverClaim
private boolean fixProducerOverClaim( final int activeCycleIndex, final long producerCycleClaim, final boolean slowProducer) { """ It tries to fix a producer overclaim. @return {@code true} if the claim is now safe to be used,{@code false} otherwise and is needed to retry the claim. ...
java
private boolean fixProducerOverClaim( final int activeCycleIndex, final long producerCycleClaim, final boolean slowProducer) { final long expectedProducerCycleClaim = producerCycleClaim + 1; //try to fix the overclaim bringing it back to a lower or a safe position if ...
[ "private", "boolean", "fixProducerOverClaim", "(", "final", "int", "activeCycleIndex", ",", "final", "long", "producerCycleClaim", ",", "final", "boolean", "slowProducer", ")", "{", "final", "long", "expectedProducerCycleClaim", "=", "producerCycleClaim", "+", "1", ";...
It tries to fix a producer overclaim. @return {@code true} if the claim is now safe to be used,{@code false} otherwise and is needed to retry the claim.
[ "It", "tries", "to", "fix", "a", "producer", "overclaim", "." ]
train
https://github.com/JCTools/JCTools/blob/9250fe316ec84209cbba0a41682f341256df781e/jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java#L406-L433
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.expandAtFiles
private String[] expandAtFiles(String args[]) throws CmdLineException { """ Expands every entry prefixed with the AT sign by reading the file. The AT sign is used to reference another file that contains command line options separated by line breaks. @param args the command line arguments to be preprocessed. @...
java
private String[] expandAtFiles(String args[]) throws CmdLineException { List<String> result = new ArrayList<String>(); for (String arg : args) { if (arg.startsWith("@")) { File file = new File(arg.substring(1)); if (!file.exists()) throw ne...
[ "private", "String", "[", "]", "expandAtFiles", "(", "String", "args", "[", "]", ")", "throws", "CmdLineException", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "arg", ":",...
Expands every entry prefixed with the AT sign by reading the file. The AT sign is used to reference another file that contains command line options separated by line breaks. @param args the command line arguments to be preprocessed. @return args with the @ sequences replaced by the text files referenced by the @ sequen...
[ "Expands", "every", "entry", "prefixed", "with", "the", "AT", "sign", "by", "reading", "the", "file", ".", "The", "AT", "sign", "is", "used", "to", "reference", "another", "file", "that", "contains", "command", "line", "options", "separated", "by", "line", ...
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L548-L565
UrielCh/ovh-java-sdk
ovh-java-sdk-overTheBox/src/main/java/net/minidev/ovh/api/ApiOvhOverTheBox.java
ApiOvhOverTheBox.serviceName_remoteAccesses_remoteAccessId_DELETE
public void serviceName_remoteAccesses_remoteAccessId_DELETE(String serviceName, String remoteAccessId) throws IOException { """ Delete a remote access REST: DELETE /overTheBox/{serviceName}/remoteAccesses/{remoteAccessId} @param serviceName [required] The internal name of your overTheBox offer @param remoteA...
java
public void serviceName_remoteAccesses_remoteAccessId_DELETE(String serviceName, String remoteAccessId) throws IOException { String qPath = "/overTheBox/{serviceName}/remoteAccesses/{remoteAccessId}"; StringBuilder sb = path(qPath, serviceName, remoteAccessId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_remoteAccesses_remoteAccessId_DELETE", "(", "String", "serviceName", ",", "String", "remoteAccessId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/overTheBox/{serviceName}/remoteAccesses/{remoteAccessId}\"", ";", "StringBuilder", ...
Delete a remote access REST: DELETE /overTheBox/{serviceName}/remoteAccesses/{remoteAccessId} @param serviceName [required] The internal name of your overTheBox offer @param remoteAccessId [required] The id of the remote access
[ "Delete", "a", "remote", "access" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-overTheBox/src/main/java/net/minidev/ovh/api/ApiOvhOverTheBox.java#L295-L299
codelibs/jcifs
src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java
NtlmPasswordAuthentication.E
private static void E( byte[] key, byte[] data, byte[] e ) { """ /* Accepts key multiple of 7 Returns enc multiple of 8 Multiple is the same like: 21 byte key gives 24 byte result """ byte[] key7 = new byte[7]; byte[] e8 = new byte[8]; for( int i = 0; i < key.length / 7; i++ ) { ...
java
private static void E( byte[] key, byte[] data, byte[] e ) { byte[] key7 = new byte[7]; byte[] e8 = new byte[8]; for( int i = 0; i < key.length / 7; i++ ) { System.arraycopy( key, i * 7, key7, 0, 7 ); DES des = new DES( key7 ); des.encrypt( data, e8 ); ...
[ "private", "static", "void", "E", "(", "byte", "[", "]", "key", ",", "byte", "[", "]", "data", ",", "byte", "[", "]", "e", ")", "{", "byte", "[", "]", "key7", "=", "new", "byte", "[", "7", "]", ";", "byte", "[", "]", "e8", "=", "new", "byte...
/* Accepts key multiple of 7 Returns enc multiple of 8 Multiple is the same like: 21 byte key gives 24 byte result
[ "/", "*", "Accepts", "key", "multiple", "of", "7", "Returns", "enc", "multiple", "of", "8", "Multiple", "is", "the", "same", "like", ":", "21", "byte", "key", "gives", "24", "byte", "result" ]
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java#L62-L72
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.depositSecretKey
public static void depositSecretKey(XMPPConnection connection, SecretkeyElement element) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException, SmackException.Feat...
java
public static void depositSecretKey(XMPPConnection connection, SecretkeyElement element) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException, SmackException.Feat...
[ "public", "static", "void", "depositSecretKey", "(", "XMPPConnection", "connection", ",", "SecretkeyElement", "element", ")", "throws", "InterruptedException", ",", "PubSubException", ".", "NotALeafNodeException", ",", "XMPPException", ".", "XMPPErrorException", ",", "Sma...
Publishes a {@link SecretkeyElement} to the secret key node. The node will be configured to use the whitelist access model to prevent access from subscribers. @see <a href="https://xmpp.org/extensions/xep-0373.html#synchro-pep"> XEP-0373 §5. Synchronizing the Secret Key with a Private PEP Node</a> @param connection {...
[ "Publishes", "a", "{", "@link", "SecretkeyElement", "}", "to", "the", "secret", "key", "node", ".", "The", "node", "will", "be", "configured", "to", "use", "the", "whitelist", "access", "model", "to", "prevent", "access", "from", "subscribers", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L342-L354
nabedge/mixer2
src/main/java/org/mixer2/xhtml/AbstractJaxb.java
AbstractJaxb.insertAfterId
public <T extends AbstractJaxb> boolean insertAfterId(String id, T insObject) throws TagTypeUnmatchException { """ <p> insert element after the element having specified id attribute. This method use deep copy of "insObject" </p> @param id id attribute @param insObject @return true if success t...
java
public <T extends AbstractJaxb> boolean insertAfterId(String id, T insObject) throws TagTypeUnmatchException { return InsertByIdUtil.insertAfterId(id, insObject, this); }
[ "public", "<", "T", "extends", "AbstractJaxb", ">", "boolean", "insertAfterId", "(", "String", "id", ",", "T", "insObject", ")", "throws", "TagTypeUnmatchException", "{", "return", "InsertByIdUtil", ".", "insertAfterId", "(", "id", ",", "insObject", ",", "this",...
<p> insert element after the element having specified id attribute. This method use deep copy of "insObject" </p> @param id id attribute @param insObject @return true if success to insert. if no hit, return false. @throws TagTypeUnmatchException
[ "<p", ">", "insert", "element", "after", "the", "element", "having", "specified", "id", "attribute", ".", "This", "method", "use", "deep", "copy", "of", "insObject", "<", "/", "p", ">" ]
train
https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/AbstractJaxb.java#L489-L492
mikepenz/Materialize
library/src/main/java/com/mikepenz/materialize/holder/ImageHolder.java
ImageHolder.applyTo
public boolean applyTo(ImageView imageView, String tag) { """ sets an existing image to the imageView @param imageView @param tag used to identify imageViews and define different placeholders @return true if an image was set """ if (mUri != null) { imageView.setImageURI(mUri); ...
java
public boolean applyTo(ImageView imageView, String tag) { if (mUri != null) { imageView.setImageURI(mUri); /* if ("http".equals(mUri.getScheme()) || "https".equals(mUri.getScheme())) { DrawerImageLoader.getInstance().setImage(imageView, mUri, tag); ...
[ "public", "boolean", "applyTo", "(", "ImageView", "imageView", ",", "String", "tag", ")", "{", "if", "(", "mUri", "!=", "null", ")", "{", "imageView", ".", "setImageURI", "(", "mUri", ")", ";", "/*\n if (\"http\".equals(mUri.getScheme()) || \"https\".equa...
sets an existing image to the imageView @param imageView @param tag used to identify imageViews and define different placeholders @return true if an image was set
[ "sets", "an", "existing", "image", "to", "the", "imageView" ]
train
https://github.com/mikepenz/Materialize/blob/2612c10c7570191a78d57f23620e945d61370e3d/library/src/main/java/com/mikepenz/materialize/holder/ImageHolder.java#L97-L118
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiJournalReceiver.java
RmiJournalReceiver.openFile
public void openFile(String repositoryHash, String filename) throws JournalException { """ Request to open a file. Check that: <ul> <li>a file is not already open,</li> <li>we can create a {@link TransportOutputFile}, and open a {@link Writer} on it.</li> </ul> """ if (journalFile != n...
java
public void openFile(String repositoryHash, String filename) throws JournalException { if (journalFile != null) { throw logAndGetException("Attempting to open file '" + filename + "' when file '" + journalFile.getName() + "' has not been closed.");...
[ "public", "void", "openFile", "(", "String", "repositoryHash", ",", "String", "filename", ")", "throws", "JournalException", "{", "if", "(", "journalFile", "!=", "null", ")", "{", "throw", "logAndGetException", "(", "\"Attempting to open file '\"", "+", "filename", ...
Request to open a file. Check that: <ul> <li>a file is not already open,</li> <li>we can create a {@link TransportOutputFile}, and open a {@link Writer} on it.</li> </ul>
[ "Request", "to", "open", "a", "file", ".", "Check", "that", ":", "<ul", ">", "<li", ">", "a", "file", "is", "not", "already", "open", "<", "/", "li", ">", "<li", ">", "we", "can", "create", "a", "{" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiJournalReceiver.java#L97-L116
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_domain_services_POST
public OvhTask packName_domain_services_POST(String packName, OvhDomainActionEnum action, String authInfo, String domain, String tld) throws IOException { """ Activate a domain service REST: POST /pack/xdsl/{packName}/domain/services @param domain [required] Domain name @param authInfo [required] Needed for t...
java
public OvhTask packName_domain_services_POST(String packName, OvhDomainActionEnum action, String authInfo, String domain, String tld) throws IOException { String qPath = "/pack/xdsl/{packName}/domain/services"; StringBuilder sb = path(qPath, packName); HashMap<String, Object>o = new HashMap<String, Object>(); a...
[ "public", "OvhTask", "packName_domain_services_POST", "(", "String", "packName", ",", "OvhDomainActionEnum", "action", ",", "String", "authInfo", ",", "String", "domain", ",", "String", "tld", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/...
Activate a domain service REST: POST /pack/xdsl/{packName}/domain/services @param domain [required] Domain name @param authInfo [required] Needed for transfer from another registrar @param tld [required] TLD of the domain @param action [required] Domain action @param packName [required] The internal name of your pack
[ "Activate", "a", "domain", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L102-L112
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/authentication/storage/CryptoUtil.java
CryptoUtil.RSADecrypt
@VisibleForTesting byte[] RSADecrypt(byte[] encryptedInput) throws IncompatibleDeviceException, CryptoException { """ Decrypts the given input using a generated RSA Private Key. Used to decrypt the AES key for later usage. @param encryptedInput the input bytes to decrypt @return the decrypted bytes output...
java
@VisibleForTesting byte[] RSADecrypt(byte[] encryptedInput) throws IncompatibleDeviceException, CryptoException { try { PrivateKey privateKey = getRSAKeyEntry().getPrivateKey(); Cipher cipher = Cipher.getInstance(RSA_TRANSFORMATION); cipher.init(Cipher.DECRYPT_MODE, priva...
[ "@", "VisibleForTesting", "byte", "[", "]", "RSADecrypt", "(", "byte", "[", "]", "encryptedInput", ")", "throws", "IncompatibleDeviceException", ",", "CryptoException", "{", "try", "{", "PrivateKey", "privateKey", "=", "getRSAKeyEntry", "(", ")", ".", "getPrivateK...
Decrypts the given input using a generated RSA Private Key. Used to decrypt the AES key for later usage. @param encryptedInput the input bytes to decrypt @return the decrypted bytes output @throws IncompatibleDeviceException in the event the device can't understand the cryptographic settings required @throws CryptoExc...
[ "Decrypts", "the", "given", "input", "using", "a", "generated", "RSA", "Private", "Key", ".", "Used", "to", "decrypt", "the", "AES", "key", "for", "later", "usage", "." ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/storage/CryptoUtil.java#L246-L283
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/comparator/impl/ViolationThresholdComparator.java
ViolationThresholdComparator.needToCompare
public boolean needToCompare(S solution1, S solution2) { """ Returns true if solutions s1 and/or s2 have an overall constraint violation with value less than 0 """ boolean needToCompare; double overall1, overall2; overall1 = Math.abs(numberOfViolatedConstraints.getAttribute(solution1) * ov...
java
public boolean needToCompare(S solution1, S solution2) { boolean needToCompare; double overall1, overall2; overall1 = Math.abs(numberOfViolatedConstraints.getAttribute(solution1) * overallConstraintViolation.getAttribute(solution1)); overall2 = Math.abs(numberOfViolatedConstraints.getAttribute(s...
[ "public", "boolean", "needToCompare", "(", "S", "solution1", ",", "S", "solution2", ")", "{", "boolean", "needToCompare", ";", "double", "overall1", ",", "overall2", ";", "overall1", "=", "Math", ".", "abs", "(", "numberOfViolatedConstraints", ".", "getAttribute...
Returns true if solutions s1 and/or s2 have an overall constraint violation with value less than 0
[ "Returns", "true", "if", "solutions", "s1", "and", "/", "or", "s2", "have", "an", "overall", "constraint", "violation", "with", "value", "less", "than", "0" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/comparator/impl/ViolationThresholdComparator.java#L73-L84
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_binding.java
aaagroup_binding.get
public static aaagroup_binding get(nitro_service service, String groupname) throws Exception { """ Use this API to fetch aaagroup_binding resource of given name . """ aaagroup_binding obj = new aaagroup_binding(); obj.set_groupname(groupname); aaagroup_binding response = (aaagroup_binding) obj.get_resour...
java
public static aaagroup_binding get(nitro_service service, String groupname) throws Exception{ aaagroup_binding obj = new aaagroup_binding(); obj.set_groupname(groupname); aaagroup_binding response = (aaagroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "aaagroup_binding", "get", "(", "nitro_service", "service", ",", "String", "groupname", ")", "throws", "Exception", "{", "aaagroup_binding", "obj", "=", "new", "aaagroup_binding", "(", ")", ";", "obj", ".", "set_groupname", "(", "groupname", ...
Use this API to fetch aaagroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "aaagroup_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_binding.java#L202-L207
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java
JsonServiceDocumentWriter.writeName
private void writeName(JsonGenerator jsonGenerator, Object entity) throws IOException { """ Writes the name of the entity It is a MUST element. @param jsonGenerator jsonGenerator @param entity entity from the container """ jsonGenerator.writeFieldName(NAME); if (entity instanceof En...
java
private void writeName(JsonGenerator jsonGenerator, Object entity) throws IOException { jsonGenerator.writeFieldName(NAME); if (entity instanceof EntitySet) { jsonGenerator.writeObject(((EntitySet) entity).getName()); } else { jsonGenerator.writeObject(((Singleton) entity...
[ "private", "void", "writeName", "(", "JsonGenerator", "jsonGenerator", ",", "Object", "entity", ")", "throws", "IOException", "{", "jsonGenerator", ".", "writeFieldName", "(", "NAME", ")", ";", "if", "(", "entity", "instanceof", "EntitySet", ")", "{", "jsonGener...
Writes the name of the entity It is a MUST element. @param jsonGenerator jsonGenerator @param entity entity from the container
[ "Writes", "the", "name", "of", "the", "entity", "It", "is", "a", "MUST", "element", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java#L123-L130
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.updateRecipients
public RecipientsUpdateSummary updateRecipients(String accountId, String templateId, TemplateRecipients templateRecipients) throws ApiException { """ Updates recipients in a template. Updates recipients in a template. You can edit the following properties: &#x60;email&#x60;, &#x60;userName&#x60;, &#x60;routingO...
java
public RecipientsUpdateSummary updateRecipients(String accountId, String templateId, TemplateRecipients templateRecipients) throws ApiException { return updateRecipients(accountId, templateId, templateRecipients, null); }
[ "public", "RecipientsUpdateSummary", "updateRecipients", "(", "String", "accountId", ",", "String", "templateId", ",", "TemplateRecipients", "templateRecipients", ")", "throws", "ApiException", "{", "return", "updateRecipients", "(", "accountId", ",", "templateId", ",", ...
Updates recipients in a template. Updates recipients in a template. You can edit the following properties: &#x60;email&#x60;, &#x60;userName&#x60;, &#x60;routingOrder&#x60;, &#x60;faxNumber&#x60;, &#x60;deliveryMethod&#x60;, &#x60;accessCode&#x60;, and &#x60;requireIdLookup&#x60;. @param accountId The external accoun...
[ "Updates", "recipients", "in", "a", "template", ".", "Updates", "recipients", "in", "a", "template", ".", "You", "can", "edit", "the", "following", "properties", ":", "&#x60", ";", "email&#x60", ";", "&#x60", ";", "userName&#x60", ";", "&#x60", ";", "routing...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L3358-L3360
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java
AbstractRStarTree.insertDirectoryEntry
protected void insertDirectoryEntry(E entry, int depth) { """ Inserts the specified directory entry at the specified level into this R*-Tree. @param entry the directory entry to be inserted @param depth the depth at which the directory entry is to be inserted """ lastInsertedEntry = entry; // choo...
java
protected void insertDirectoryEntry(E entry, int depth) { lastInsertedEntry = entry; // choose node for insertion of o IndexTreePath<E> subtree = choosePath(getRootPath(), entry, depth, 1); if(getLogger().isDebugging()) { getLogger().debugFine("subtree " + subtree); } N parent = getNode(s...
[ "protected", "void", "insertDirectoryEntry", "(", "E", "entry", ",", "int", "depth", ")", "{", "lastInsertedEntry", "=", "entry", ";", "// choose node for insertion of o", "IndexTreePath", "<", "E", ">", "subtree", "=", "choosePath", "(", "getRootPath", "(", ")", ...
Inserts the specified directory entry at the specified level into this R*-Tree. @param entry the directory entry to be inserted @param depth the depth at which the directory entry is to be inserted
[ "Inserts", "the", "specified", "directory", "entry", "at", "the", "specified", "level", "into", "this", "R", "*", "-", "Tree", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/AbstractRStarTree.java#L182-L196
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriendGroupByName
public FriendGroup getFriendGroupByName(String name) { """ Gets a FriendGroup by name, for example "Duo Partners". The name is case sensitive! The FriendGroup will be created if it didn't exist yet. @param name The name of your group (case-sensitive) @return The corresponding FriendGroup """ final Rost...
java
public FriendGroup getFriendGroupByName(String name) { final RosterGroup g = connection.getRoster().getGroup(name); if (g != null) { return new FriendGroup(this, connection, g); } return addFriendGroup(name); }
[ "public", "FriendGroup", "getFriendGroupByName", "(", "String", "name", ")", "{", "final", "RosterGroup", "g", "=", "connection", ".", "getRoster", "(", ")", ".", "getGroup", "(", "name", ")", ";", "if", "(", "g", "!=", "null", ")", "{", "return", "new",...
Gets a FriendGroup by name, for example "Duo Partners". The name is case sensitive! The FriendGroup will be created if it didn't exist yet. @param name The name of your group (case-sensitive) @return The corresponding FriendGroup
[ "Gets", "a", "FriendGroup", "by", "name", "for", "example", "Duo", "Partners", ".", "The", "name", "is", "case", "sensitive!", "The", "FriendGroup", "will", "be", "created", "if", "it", "didn", "t", "exist", "yet", "." ]
train
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L493-L499
TheHortonMachine/hortonmachine
extras/sideprojects/gpextras/src/main/java/org/hortonmachine/gpextras/tiles/MapsforgeTilesGenerator.java
MapsforgeTilesGenerator.getTile4TileCoordinate
public <T> T getTile4TileCoordinate( final int tx, final int ty, int zoom, Class<T> adaptee ) throws IOException { """ Get tile data for a given tile schema coordinate. @param tx the x tile index. @param ty the y tile index. @param zoom the zoomlevel @param adaptee the class to adapt to. @return the generat...
java
public <T> T getTile4TileCoordinate( final int tx, final int ty, int zoom, Class<T> adaptee ) throws IOException { //System.out.println("https://tile.openstreetmap.org/" + zoom + "/" + tx + "/" + ty + ".png"); Tile tile = new Tile(tx, ty, (byte) zoom, tileSize); RendererJob mapGeneratorJob = ne...
[ "public", "<", "T", ">", "T", "getTile4TileCoordinate", "(", "final", "int", "tx", ",", "final", "int", "ty", ",", "int", "zoom", ",", "Class", "<", "T", ">", "adaptee", ")", "throws", "IOException", "{", "//System.out.println(\"https://tile.openstreetmap.org/\"...
Get tile data for a given tile schema coordinate. @param tx the x tile index. @param ty the y tile index. @param zoom the zoomlevel @param adaptee the class to adapt to. @return the generated data. @throws IOException
[ "Get", "tile", "data", "for", "a", "given", "tile", "schema", "coordinate", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/extras/sideprojects/gpextras/src/main/java/org/hortonmachine/gpextras/tiles/MapsforgeTilesGenerator.java#L169-L196
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/matchers/DefaultVFBondMatcher.java
DefaultVFBondMatcher.matches
@Override public boolean matches(TargetProperties targetConatiner, IBond targetBond) { """ {@inheritDoc} @param targetConatiner target container @param targetBond target bond @return true if bonds match """ if (this.smartQueryBond != null) { return smartQueryBond.matches(targetBond...
java
@Override public boolean matches(TargetProperties targetConatiner, IBond targetBond) { if (this.smartQueryBond != null) { return smartQueryBond.matches(targetBond); } else { if (!isBondMatchFlag()) { return true; } if (isBondMatchFlag()...
[ "@", "Override", "public", "boolean", "matches", "(", "TargetProperties", "targetConatiner", ",", "IBond", "targetBond", ")", "{", "if", "(", "this", ".", "smartQueryBond", "!=", "null", ")", "{", "return", "smartQueryBond", ".", "matches", "(", "targetBond", ...
{@inheritDoc} @param targetConatiner target container @param targetBond target bond @return true if bonds match
[ "{", "@inheritDoc", "}" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/matchers/DefaultVFBondMatcher.java#L114-L130
vanilladb/vanillacore
src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java
SelectPlan.joinFieldBucket
public static Bucket joinFieldBucket(Bucket bkt1, Bucket bkt2, double numRec) { """ Creates a new bucket by keeping the statistics of joining records and values from the two specified buckets. <p> Assumes that: <ul> <li>Values in a bucket have the same frequency (uniform frequency)</li> <li>Given values wi...
java
public static Bucket joinFieldBucket(Bucket bkt1, Bucket bkt2, double numRec) { ConstantRange newRange = bkt1.valueRange().intersect(bkt2.valueRange()); if (!newRange.isValid()) return null; double rdv1 = bkt1.distinctValues(newRange); double rdv2 = bkt2.distinctValues(newRange); double newDistVals =...
[ "public", "static", "Bucket", "joinFieldBucket", "(", "Bucket", "bkt1", ",", "Bucket", "bkt2", ",", "double", "numRec", ")", "{", "ConstantRange", "newRange", "=", "bkt1", ".", "valueRange", "(", ")", ".", "intersect", "(", "bkt2", ".", "valueRange", "(", ...
Creates a new bucket by keeping the statistics of joining records and values from the two specified buckets. <p> Assumes that: <ul> <li>Values in a bucket have the same frequency (uniform frequency)</li> <li>Given values within two equal ranges (of two joinable fields), all values in the range having smaller number of...
[ "Creates", "a", "new", "bucket", "by", "keeping", "the", "statistics", "of", "joining", "records", "and", "values", "from", "the", "two", "specified", "buckets", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java#L290-L311
cdk/cdk
tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java
SmartsFragmentExtractor.markRings
private void markRings(int idx, int bprev) { """ Recursively marks ring closures (back edges) in the {@link #rbnds} array in a depth first order. @param idx atom index @param bprev previous bond """ avisit[idx] = numVisit++; final int d = deg[idx]; for (int j = 0; j < d; j++) { ...
java
private void markRings(int idx, int bprev) { avisit[idx] = numVisit++; final int d = deg[idx]; for (int j = 0; j < d; j++) { int nbr = atomAdj[idx][j]; int bidx = bondAdj[idx][j]; if (avisit[nbr] == 0 || bidx == bprev) continue; // ignored ...
[ "private", "void", "markRings", "(", "int", "idx", ",", "int", "bprev", ")", "{", "avisit", "[", "idx", "]", "=", "numVisit", "++", ";", "final", "int", "d", "=", "deg", "[", "idx", "]", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "...
Recursively marks ring closures (back edges) in the {@link #rbnds} array in a depth first order. @param idx atom index @param bprev previous bond
[ "Recursively", "marks", "ring", "closures", "(", "back", "edges", ")", "in", "the", "{", "@link", "#rbnds", "}", "array", "in", "a", "depth", "first", "order", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L244-L257
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_binding.java
vpnvserver_binding.get
public static vpnvserver_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch vpnvserver_binding resource of given name . """ vpnvserver_binding obj = new vpnvserver_binding(); obj.set_name(name); vpnvserver_binding response = (vpnvserver_binding) obj.get_resource(...
java
public static vpnvserver_binding get(nitro_service service, String name) throws Exception{ vpnvserver_binding obj = new vpnvserver_binding(); obj.set_name(name); vpnvserver_binding response = (vpnvserver_binding) obj.get_resource(service); return response; }
[ "public", "static", "vpnvserver_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnvserver_binding", "obj", "=", "new", "vpnvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";...
Use this API to fetch vpnvserver_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_binding.java#L356-L361
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextImpl.java
UIContextImpl.invokeLater
@Override public void invokeLater(final UIContext uic, final Runnable runnable) { """ Adds a runnable to the list of runnables to be invoked later. @param uic the UIContext to invoke the runnable in. @param runnable the runnable to add """ if (invokeLaterRunnables == null) { invokeLaterRunnables = ne...
java
@Override public void invokeLater(final UIContext uic, final Runnable runnable) { if (invokeLaterRunnables == null) { invokeLaterRunnables = new ArrayList<>(); } invokeLaterRunnables.add(new UIContextImplRunnable(uic, runnable)); }
[ "@", "Override", "public", "void", "invokeLater", "(", "final", "UIContext", "uic", ",", "final", "Runnable", "runnable", ")", "{", "if", "(", "invokeLaterRunnables", "==", "null", ")", "{", "invokeLaterRunnables", "=", "new", "ArrayList", "<>", "(", ")", ";...
Adds a runnable to the list of runnables to be invoked later. @param uic the UIContext to invoke the runnable in. @param runnable the runnable to add
[ "Adds", "a", "runnable", "to", "the", "list", "of", "runnables", "to", "be", "invoked", "later", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/UIContextImpl.java#L195-L202
jbellis/jamm
src/org/github/jamm/MemoryLayoutSpecification.java
MemoryLayoutSpecification.sizeOfArray
public static long sizeOfArray(int length, long elementSize) { """ Memory an array will consume @param length Number of elements in the array @param elementSize In-memory size of each element's primitive stored @return In-memory size of the array """ return roundTo(SPEC.getArrayHeaderSize() + length...
java
public static long sizeOfArray(int length, long elementSize) { return roundTo(SPEC.getArrayHeaderSize() + length * elementSize, SPEC.getObjectPadding()); }
[ "public", "static", "long", "sizeOfArray", "(", "int", "length", ",", "long", "elementSize", ")", "{", "return", "roundTo", "(", "SPEC", ".", "getArrayHeaderSize", "(", ")", "+", "length", "*", "elementSize", ",", "SPEC", ".", "getObjectPadding", "(", ")", ...
Memory an array will consume @param length Number of elements in the array @param elementSize In-memory size of each element's primitive stored @return In-memory size of the array
[ "Memory", "an", "array", "will", "consume" ]
train
https://github.com/jbellis/jamm/blob/b397a48705ff579028df258e08e28b9c97d8472b/src/org/github/jamm/MemoryLayoutSpecification.java#L136-L138
spring-projects/spring-retry
src/main/java/org/springframework/retry/support/RetrySimulator.java
RetrySimulator.executeSingleSimulation
public List<Long> executeSingleSimulation() { """ Execute a single simulation @return The sleeps which occurred within the single simulation. """ StealingSleeper stealingSleeper = new StealingSleeper(); SleepingBackOffPolicy<?> stealingBackoff = backOffPolicy .withSleeper(stealingSleeper); RetryTem...
java
public List<Long> executeSingleSimulation() { StealingSleeper stealingSleeper = new StealingSleeper(); SleepingBackOffPolicy<?> stealingBackoff = backOffPolicy .withSleeper(stealingSleeper); RetryTemplate template = new RetryTemplate(); template.setBackOffPolicy(stealingBackoff); template.setRetryPolicy(...
[ "public", "List", "<", "Long", ">", "executeSingleSimulation", "(", ")", "{", "StealingSleeper", "stealingSleeper", "=", "new", "StealingSleeper", "(", ")", ";", "SleepingBackOffPolicy", "<", "?", ">", "stealingBackoff", "=", "backOffPolicy", ".", "withSleeper", "...
Execute a single simulation @return The sleeps which occurred within the single simulation.
[ "Execute", "a", "single", "simulation" ]
train
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/support/RetrySimulator.java#L79-L99
menacher/java-game-server
jetclient/src/main/java/org/menacheri/jetclient/communication/NettyTCPMessageSender.java
NettyTCPMessageSender.closeAfterFlushingPendingWrites
public void closeAfterFlushingPendingWrites(Channel channel, Event event) { """ This method will write an event to the channel and then add a close listener which will close it after the write has completed. @param channel @param event """ if (channel.isConnected()) { channel.write(event).addListen...
java
public void closeAfterFlushingPendingWrites(Channel channel, Event event) { if (channel.isConnected()) { channel.write(event).addListener(ChannelFutureListener.CLOSE); } else { System.err.println("Unable to write the Event :" + event + " to socket as channel is ot connected"); } }
[ "public", "void", "closeAfterFlushingPendingWrites", "(", "Channel", "channel", ",", "Event", "event", ")", "{", "if", "(", "channel", ".", "isConnected", "(", ")", ")", "{", "channel", ".", "write", "(", "event", ")", ".", "addListener", "(", "ChannelFuture...
This method will write an event to the channel and then add a close listener which will close it after the write has completed. @param channel @param event
[ "This", "method", "will", "write", "an", "event", "to", "the", "channel", "and", "then", "add", "a", "close", "listener", "which", "will", "close", "it", "after", "the", "write", "has", "completed", "." ]
train
https://github.com/menacher/java-game-server/blob/668ca49e8bd1dac43add62378cf6c22a93125d48/jetclient/src/main/java/org/menacheri/jetclient/communication/NettyTCPMessageSender.java#L78-L89
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setBaselineFixedCostAccrual
public void setBaselineFixedCostAccrual(int baselineNumber, AccrueType value) { """ Set a baseline value. @param baselineNumber baseline index (1-10) @param value baseline value """ set(selectField(TaskFieldLists.BASELINE_FIXED_COST_ACCRUALS, baselineNumber), value); }
java
public void setBaselineFixedCostAccrual(int baselineNumber, AccrueType value) { set(selectField(TaskFieldLists.BASELINE_FIXED_COST_ACCRUALS, baselineNumber), value); }
[ "public", "void", "setBaselineFixedCostAccrual", "(", "int", "baselineNumber", ",", "AccrueType", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "BASELINE_FIXED_COST_ACCRUALS", ",", "baselineNumber", ")", ",", "value", ")", ";", "}" ]
Set a baseline value. @param baselineNumber baseline index (1-10) @param value baseline value
[ "Set", "a", "baseline", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4546-L4549
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java
MailUtil.sendHtml
public static void sendHtml(String to, String subject, String content, File... files) { """ 使用配置文件中设置的账户发送HTML邮件,发送给单个或多个收件人<br> 多个收件人可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param to 收件人 @param subject 标题 @param content 正文 @param files 附件列表 @since 3.2.0 """ send(to, subject, content, true, files); }
java
public static void sendHtml(String to, String subject, String content, File... files) { send(to, subject, content, true, files); }
[ "public", "static", "void", "sendHtml", "(", "String", "to", ",", "String", "subject", ",", "String", "content", ",", "File", "...", "files", ")", "{", "send", "(", "to", ",", "subject", ",", "content", ",", "true", ",", "files", ")", ";", "}" ]
使用配置文件中设置的账户发送HTML邮件,发送给单个或多个收件人<br> 多个收件人可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param to 收件人 @param subject 标题 @param content 正文 @param files 附件列表 @since 3.2.0
[ "使用配置文件中设置的账户发送HTML邮件,发送给单个或多个收件人<br", ">", "多个收件人可以使用逗号“", "”分隔,也可以通过分号“", ";", "”分隔" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L42-L44
graknlabs/grakn
server/src/server/kb/concept/RelationReified.java
RelationReified.putRolePlayerEdge
public void putRolePlayerEdge(Role role, Thing toThing) { """ If the edge does not exist then it adds a Schema.EdgeLabel#ROLE_PLAYER edge from this Relation to a target Thing which is playing some Role. If the edge does exist nothing is done. @param role The Role being played by the Thing in this Relation ...
java
public void putRolePlayerEdge(Role role, Thing toThing) { //Checking if the edge exists GraphTraversal<Vertex, Edge> traversal = vertex().tx().getTinkerTraversal().V(). hasId(this.elementId()). outE(Schema.EdgeLabel.ROLE_PLAYER.getLabel()). has(Schema.Edge...
[ "public", "void", "putRolePlayerEdge", "(", "Role", "role", ",", "Thing", "toThing", ")", "{", "//Checking if the edge exists", "GraphTraversal", "<", "Vertex", ",", "Edge", ">", "traversal", "=", "vertex", "(", ")", ".", "tx", "(", ")", ".", "getTinkerTravers...
If the edge does not exist then it adds a Schema.EdgeLabel#ROLE_PLAYER edge from this Relation to a target Thing which is playing some Role. If the edge does exist nothing is done. @param role The Role being played by the Thing in this Relation @param toThing The Thing playing a Role in this Relation
[ "If", "the", "edge", "does", "not", "exist", "then", "it", "adds", "a", "Schema", ".", "EdgeLabel#ROLE_PLAYER", "edge", "from", "this", "Relation", "to", "a", "target", "Thing", "which", "is", "playing", "some", "Role", ".", "If", "the", "edge", "does", ...
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/concept/RelationReified.java#L137-L159
documents4j/documents4j
documents4j-server-standalone/src/main/java/com/documents4j/builder/ConverterServerBuilder.java
ConverterServerBuilder.processTimeout
public ConverterServerBuilder processTimeout(long processTimeout, TimeUnit timeUnit) { """ Returns the specified process time out in milliseconds. @return The process time out in milliseconds. """ assertNumericArgument(processTimeout, false); this.processTimeout = timeUnit.toMillis(processTi...
java
public ConverterServerBuilder processTimeout(long processTimeout, TimeUnit timeUnit) { assertNumericArgument(processTimeout, false); this.processTimeout = timeUnit.toMillis(processTimeout); return this; }
[ "public", "ConverterServerBuilder", "processTimeout", "(", "long", "processTimeout", ",", "TimeUnit", "timeUnit", ")", "{", "assertNumericArgument", "(", "processTimeout", ",", "false", ")", ";", "this", ".", "processTimeout", "=", "timeUnit", ".", "toMillis", "(", ...
Returns the specified process time out in milliseconds. @return The process time out in milliseconds.
[ "Returns", "the", "specified", "process", "time", "out", "in", "milliseconds", "." ]
train
https://github.com/documents4j/documents4j/blob/eebb3ede43ffeb5fbfc85b3134f67a9c379a5594/documents4j-server-standalone/src/main/java/com/documents4j/builder/ConverterServerBuilder.java#L148-L152
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArray
public static <T> Level0ArrayOperator<BigDecimal[],BigDecimal> onArray(final BigDecimal[] target) { """ <p> Creates an <i>operation expression</i> on the specified target object. </p> @param target the target object on which the expression will execute @return an operator, ready for chaining """ ...
java
public static <T> Level0ArrayOperator<BigDecimal[],BigDecimal> onArray(final BigDecimal[] target) { return onArrayOf(Types.BIG_DECIMAL, target); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "BigDecimal", "[", "]", ",", "BigDecimal", ">", "onArray", "(", "final", "BigDecimal", "[", "]", "target", ")", "{", "return", "onArrayOf", "(", "Types", ".", "BIG_DECIMAL", ",", "target", ")",...
<p> Creates an <i>operation expression</i> on the specified target object. </p> @param target the target object on which the expression will execute @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "the", "specified", "target", "object", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L793-L795
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisRepository.java
CmsCmisRepository.gatherDescendants
private void gatherDescendants( CmsCmisCallContext context, CmsObject cms, CmsResource folder, List<ObjectInFolderContainer> list, boolean foldersOnly, int depth, Set<String> filter, boolean includeAllowableActions, boolean includePathSegm...
java
private void gatherDescendants( CmsCmisCallContext context, CmsObject cms, CmsResource folder, List<ObjectInFolderContainer> list, boolean foldersOnly, int depth, Set<String> filter, boolean includeAllowableActions, boolean includePathSegm...
[ "private", "void", "gatherDescendants", "(", "CmsCmisCallContext", "context", ",", "CmsObject", "cms", ",", "CmsResource", "folder", ",", "List", "<", "ObjectInFolderContainer", ">", "list", ",", "boolean", "foldersOnly", ",", "int", "depth", ",", "Set", "<", "S...
Helper method to collect the descendants of a given folder.<p> @param context the call context @param cms the CMS context @param folder the parent folder @param list the list to which the descendants should be added @param foldersOnly flag to exclude files from the result @param depth the maximum depth @param filter t...
[ "Helper", "method", "to", "collect", "the", "descendants", "of", "a", "given", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisRepository.java#L1592-L1660
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java
StringUtils.getPrefix
public static String getPrefix(String input, char delimiter) { """ Returns the prefix of the input string from 0 to the first index of the delimiter OR it returns the input string. @param input @param delimiter @return the prefix substring or the entire input string if the delimiter is not found """ ...
java
public static String getPrefix(String input, char delimiter) { int index = input.indexOf(delimiter); if (index > -1) { return input.substring(0, index); } return input; }
[ "public", "static", "String", "getPrefix", "(", "String", "input", ",", "char", "delimiter", ")", "{", "int", "index", "=", "input", ".", "indexOf", "(", "delimiter", ")", ";", "if", "(", "index", ">", "-", "1", ")", "{", "return", "input", ".", "sub...
Returns the prefix of the input string from 0 to the first index of the delimiter OR it returns the input string. @param input @param delimiter @return the prefix substring or the entire input string if the delimiter is not found
[ "Returns", "the", "prefix", "of", "the", "input", "string", "from", "0", "to", "the", "first", "index", "of", "the", "delimiter", "OR", "it", "returns", "the", "input", "string", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java#L226-L233
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/images/ImageGenerator.java
ImageGenerator.dumpPngImageForScaleAndPaper
public void dumpPngImageForScaleAndPaper( String imagePath, ReferencedEnvelope bounds, double scale, EPaperFormat paperFormat, Double dpi, BufferedImage legend, int legendX, int legendY, String scalePrefix, float scaleSize, int scaleX, int scaleY ) throws Exception { """ Create an image for...
java
public void dumpPngImageForScaleAndPaper( String imagePath, ReferencedEnvelope bounds, double scale, EPaperFormat paperFormat, Double dpi, BufferedImage legend, int legendX, int legendY, String scalePrefix, float scaleSize, int scaleX, int scaleY ) throws Exception { if (dpi == null) { ...
[ "public", "void", "dumpPngImageForScaleAndPaper", "(", "String", "imagePath", ",", "ReferencedEnvelope", "bounds", ",", "double", "scale", ",", "EPaperFormat", "paperFormat", ",", "Double", "dpi", ",", "BufferedImage", "legend", ",", "int", "legendX", ",", "int", ...
Create an image for a given paper size and scale. @param imagePath the path to which to write the image. @param bounds the area of interest. In this case only the center is considered. The bounds are recalculated based in paper size and scale. @param scale the scale wanted for the map. @param paperFormat the paper for...
[ "Create", "an", "image", "for", "a", "given", "paper", "size", "and", "scale", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/images/ImageGenerator.java#L668-L721
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java
StringUtils.ordinalIndexOf
public static int ordinalIndexOf(String str, String searchStr, int ordinal) { """ <p>Finds the n-th index within a String, handling <code>null</code>. This method uses {@link String#indexOf(String)}.</p> <p>A <code>null</code> String will return <code>-1</code>.</p> <pre> StringUtils.ordinalIndexOf(null, *...
java
public static int ordinalIndexOf(String str, String searchStr, int ordinal) { return ordinalIndexOf(str, searchStr, ordinal, false); }
[ "public", "static", "int", "ordinalIndexOf", "(", "String", "str", ",", "String", "searchStr", ",", "int", "ordinal", ")", "{", "return", "ordinalIndexOf", "(", "str", ",", "searchStr", ",", "ordinal", ",", "false", ")", ";", "}" ]
<p>Finds the n-th index within a String, handling <code>null</code>. This method uses {@link String#indexOf(String)}.</p> <p>A <code>null</code> String will return <code>-1</code>.</p> <pre> StringUtils.ordinalIndexOf(null, *, *) = -1 StringUtils.ordinalIndexOf(*, null, *) = -1 StringUtils.ordinalIn...
[ "<p", ">", "Finds", "the", "n", "-", "th", "index", "within", "a", "String", "handling", "<code", ">", "null<", "/", "code", ">", ".", "This", "method", "uses", "{", "@link", "String#indexOf", "(", "String", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java#L779-L781
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/ChunkStepControllerImpl.java
ChunkStepControllerImpl.publishCheckpointEvent
private void publishCheckpointEvent(String stepName, long jobInstanceId, long jobExecutionId, long stepExecutionId) { """ Helper method to publish checkpoint event @param stepName @param jobInstanceId @param jobExecutionId """ BatchEventsPublisher publisher = getBatchEventsPublisher(); if...
java
private void publishCheckpointEvent(String stepName, long jobInstanceId, long jobExecutionId, long stepExecutionId) { BatchEventsPublisher publisher = getBatchEventsPublisher(); if (publisher != null) { String correlationId = runtimeWorkUnitExecution.getCorrelationId(); publishe...
[ "private", "void", "publishCheckpointEvent", "(", "String", "stepName", ",", "long", "jobInstanceId", ",", "long", "jobExecutionId", ",", "long", "stepExecutionId", ")", "{", "BatchEventsPublisher", "publisher", "=", "getBatchEventsPublisher", "(", ")", ";", "if", "...
Helper method to publish checkpoint event @param stepName @param jobInstanceId @param jobExecutionId
[ "Helper", "method", "to", "publish", "checkpoint", "event" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/ChunkStepControllerImpl.java#L718-L725
OpenLiberty/open-liberty
dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java
ThreadPoolController.manageIdlePool
boolean manageIdlePool(ThreadPoolExecutor threadPool, long intervalCompleted) { """ Determine whether or not the thread pool has been idle long enough to pause the monitoring task. @param threadPool a reference to the thread pool @param intervalCompleted the tasks completed this interval @return true if th...
java
boolean manageIdlePool(ThreadPoolExecutor threadPool, long intervalCompleted) { // Manage the intervalCompleted count if (intervalCompleted == 0 && threadPool.getActiveCount() == 0) { consecutiveIdleCount++; } else { consecutiveIdleCount = 0; } if (conse...
[ "boolean", "manageIdlePool", "(", "ThreadPoolExecutor", "threadPool", ",", "long", "intervalCompleted", ")", "{", "// Manage the intervalCompleted count", "if", "(", "intervalCompleted", "==", "0", "&&", "threadPool", ".", "getActiveCount", "(", ")", "==", "0", ")", ...
Determine whether or not the thread pool has been idle long enough to pause the monitoring task. @param threadPool a reference to the thread pool @param intervalCompleted the tasks completed this interval @return true if the controller has been paused
[ "Determine", "whether", "or", "not", "the", "thread", "pool", "has", "been", "idle", "long", "enough", "to", "pause", "the", "monitoring", "task", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java#L774-L790
bushidowallet/bushido-java-service
bushido-service-lib/src/main/java/com/bccapi/bitlib/StandardTransactionBuilder.java
StandardTransactionBuilder.createUnsignedTransaction
public UnsignedTransaction createUnsignedTransaction(List<UnspentTransactionOutput> unspent, Address changeAddress, long fee, PublicKeyRing keyRing, NetworkParameters network) throws InsufficientFundsException { """ Create an unsigned transaction with a specific miner fee. Note that specifying a miner fe...
java
public UnsignedTransaction createUnsignedTransaction(List<UnspentTransactionOutput> unspent, Address changeAddress, long fee, PublicKeyRing keyRing, NetworkParameters network) throws InsufficientFundsException { // Make a copy so we can mutate the list unspent = new LinkedList<UnspentTransactionOut...
[ "public", "UnsignedTransaction", "createUnsignedTransaction", "(", "List", "<", "UnspentTransactionOutput", ">", "unspent", ",", "Address", "changeAddress", ",", "long", "fee", ",", "PublicKeyRing", "keyRing", ",", "NetworkParameters", "network", ")", "throws", "Insuffi...
Create an unsigned transaction with a specific miner fee. Note that specifying a miner fee that is too low may result in hanging transactions that never confirm. @param unspent The list of unspent transaction outputs that can be used as funding @param changeAddress The address to send any change to @param fee The mine...
[ "Create", "an", "unsigned", "transaction", "with", "a", "specific", "miner", "fee", ".", "Note", "that", "specifying", "a", "miner", "fee", "that", "is", "too", "low", "may", "result", "in", "hanging", "transactions", "that", "never", "confirm", "." ]
train
https://github.com/bushidowallet/bushido-java-service/blob/e1a0157527e57459b509718044d2df44084876a2/bushido-service-lib/src/main/java/com/bccapi/bitlib/StandardTransactionBuilder.java#L256-L285
networknt/light-rest-4j
swagger-validator/src/main/java/com/networknt/validator/ResponseValidator.java
ResponseValidator.validateResponse
public Status validateResponse(final HttpServerExchange exchange, final SwaggerOperation swaggerOperation) { """ Validate the given response against the API operation. @param exchange The exchange to validate @param swaggerOperation The API operation to validate the response against @return A status contain...
java
public Status validateResponse(final HttpServerExchange exchange, final SwaggerOperation swaggerOperation) { requireNonNull(exchange, "An exchange is required"); requireNonNull(swaggerOperation, "A swagger operation is required"); io.swagger.models.Response swaggerResponse = swaggerOperation.ge...
[ "public", "Status", "validateResponse", "(", "final", "HttpServerExchange", "exchange", ",", "final", "SwaggerOperation", "swaggerOperation", ")", "{", "requireNonNull", "(", "exchange", ",", "\"An exchange is required\"", ")", ";", "requireNonNull", "(", "swaggerOperatio...
Validate the given response against the API operation. @param exchange The exchange to validate @param swaggerOperation The API operation to validate the response against @return A status containing validation error
[ "Validate", "the", "given", "response", "against", "the", "API", "operation", "." ]
train
https://github.com/networknt/light-rest-4j/blob/06b15128e6101351e617284a636ef5d632e6b1fe/swagger-validator/src/main/java/com/networknt/validator/ResponseValidator.java#L50-L72
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java
Jassimp.importFile
public static AiScene importFile(String filename, Set<AiPostProcessSteps> postProcessing) throws IOException { """ Imports a file via assimp. @param filename the file to import @param postProcessing post processing flags @return...
java
public static AiScene importFile(String filename, Set<AiPostProcessSteps> postProcessing) throws IOException { return importFile(filename, postProcessing, null); }
[ "public", "static", "AiScene", "importFile", "(", "String", "filename", ",", "Set", "<", "AiPostProcessSteps", ">", "postProcessing", ")", "throws", "IOException", "{", "return", "importFile", "(", "filename", ",", "postProcessing", ",", "null", ")", ";", "}" ]
Imports a file via assimp. @param filename the file to import @param postProcessing post processing flags @return the loaded scene, or null if an error occurred @throws IOException if an error occurs
[ "Imports", "a", "file", "via", "assimp", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java#L105-L109
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/themes/ThemeUiHelper.java
ThemeUiHelper.iconComponent
public static void iconComponent(Component component, IconEnum iconEnum) { """ Method to display your composant as an icon @param component Wicket component @param iconEnum Icon to display """ component.add(AttributeModifier.append("class", "ui-icon " + iconEnum.getCssClass())); }
java
public static void iconComponent(Component component, IconEnum iconEnum) { component.add(AttributeModifier.append("class", "ui-icon " + iconEnum.getCssClass())); }
[ "public", "static", "void", "iconComponent", "(", "Component", "component", ",", "IconEnum", "iconEnum", ")", "{", "component", ".", "add", "(", "AttributeModifier", ".", "append", "(", "\"class\"", ",", "\"ui-icon \"", "+", "iconEnum", ".", "getCssClass", "(", ...
Method to display your composant as an icon @param component Wicket component @param iconEnum Icon to display
[ "Method", "to", "display", "your", "composant", "as", "an", "icon" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/themes/ThemeUiHelper.java#L345-L348
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
XLogPDescriptor.getPresenceOfHydroxy
private boolean getPresenceOfHydroxy(IAtomContainer ac, IAtom atom) { """ Gets the presenceOf Hydroxy group attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The presenceOfCarbonil value """ IAtom neighbour0...
java
private boolean getPresenceOfHydroxy(IAtomContainer ac, IAtom atom) { IAtom neighbour0 = (IAtom) ac.getConnectedAtomsList(atom).get(0); List first = null; if (neighbour0.getSymbol().equals("C")) { first = ac.getConnectedAtomsList(neighbour0); for (int i = 0; i < first.siz...
[ "private", "boolean", "getPresenceOfHydroxy", "(", "IAtomContainer", "ac", ",", "IAtom", "atom", ")", "{", "IAtom", "neighbour0", "=", "(", "IAtom", ")", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ".", "get", "(", "0", ")", ";", "List", "first",...
Gets the presenceOf Hydroxy group attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The presenceOfCarbonil value
[ "Gets", "the", "presenceOf", "Hydroxy", "group", "attribute", "of", "the", "XLogPDescriptor", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1287-L1306
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.contextClick
public Actions contextClick() { """ Performs a context-click at the current mouse location. @return A self reference. """ if (isBuildingActions()) { action.addAction(new ContextClickAction(jsonMouse, null)); } return clickInTicks(RIGHT); }
java
public Actions contextClick() { if (isBuildingActions()) { action.addAction(new ContextClickAction(jsonMouse, null)); } return clickInTicks(RIGHT); }
[ "public", "Actions", "contextClick", "(", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ContextClickAction", "(", "jsonMouse", ",", "null", ")", ")", ";", "}", "return", "clickInTicks", "(", "RIGHT",...
Performs a context-click at the current mouse location. @return A self reference.
[ "Performs", "a", "context", "-", "click", "at", "the", "current", "mouse", "location", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L432-L438
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java
Organizer.addMappableCopiesToMap
public static <K, V> void addMappableCopiesToMap(Collection<Mappable<K, V>> aMappables, Map<K, V> aMap) { """ Add mappable to map @param <K> the key @param <V> the value @param aMappables the collection of Mappables that must implement the Copier interface @param aMap the map to add to """ if (aM...
java
public static <K, V> void addMappableCopiesToMap(Collection<Mappable<K, V>> aMappables, Map<K, V> aMap) { if (aMappables == null || aMap == null) return; Mappable<K, V> mappable = null; Copier previous = null; for (Iterator<Mappable<K, V>> i = aMappables.iterator(); i.hasNext();) { mappable =...
[ "public", "static", "<", "K", ",", "V", ">", "void", "addMappableCopiesToMap", "(", "Collection", "<", "Mappable", "<", "K", ",", "V", ">", ">", "aMappables", ",", "Map", "<", "K", ",", "V", ">", "aMap", ")", "{", "if", "(", "aMappables", "==", "nu...
Add mappable to map @param <K> the key @param <V> the value @param aMappables the collection of Mappables that must implement the Copier interface @param aMap the map to add to
[ "Add", "mappable", "to", "map" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java#L626-L650
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbStatement.java
MariaDbStatement.executeUpdate
public int executeUpdate(final String sql, final String[] columnNames) throws SQLException { """ Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target tab...
java
public int executeUpdate(final String sql, final String[] columnNames) throws SQLException { return executeUpdate(sql, Statement.RETURN_GENERATED_KEYS); }
[ "public", "int", "executeUpdate", "(", "final", "String", "sql", ",", "final", "String", "[", "]", "columnNames", ")", "throws", "SQLException", "{", "return", "executeUpdate", "(", "sql", ",", "Statement", ".", "RETURN_GENERATED_KEYS", ")", ";", "}" ]
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array ...
[ "Executes", "the", "given", "SQL", "statement", "and", "signals", "the", "driver", "that", "the", "auto", "-", "generated", "keys", "indicated", "in", "the", "given", "array", "should", "be", "made", "available", "for", "retrieval", ".", "This", "array", "co...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbStatement.java#L604-L606
code4everything/util
src/main/java/com/zhazhapan/util/RandomUtils.java
RandomUtils.getRandomDouble
public static double getRandomDouble(double floor, double ceil, int precision) { """ 获取随机浮点数 @param floor 下限 @param ceil 上限 @param precision 精度(小数位数) @return {@link Double} """ BigDecimal decimal = new BigDecimal(floor + new Random().nextDouble() * (ceil - floor)); return decimal.setSca...
java
public static double getRandomDouble(double floor, double ceil, int precision) { BigDecimal decimal = new BigDecimal(floor + new Random().nextDouble() * (ceil - floor)); return decimal.setScale(precision, RoundingMode.HALF_UP).doubleValue(); }
[ "public", "static", "double", "getRandomDouble", "(", "double", "floor", ",", "double", "ceil", ",", "int", "precision", ")", "{", "BigDecimal", "decimal", "=", "new", "BigDecimal", "(", "floor", "+", "new", "Random", "(", ")", ".", "nextDouble", "(", ")",...
获取随机浮点数 @param floor 下限 @param ceil 上限 @param precision 精度(小数位数) @return {@link Double}
[ "获取随机浮点数" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/RandomUtils.java#L171-L174
zaproxy/zaproxy
src/org/zaproxy/zap/view/StandardFieldsDialog.java
StandardFieldsDialog.addComboField
public <E> void addComboField(int tabIndex, String fieldLabel, ComboBoxModel<E> comboBoxModel) { """ Adds a combo box field with the given label and model, to the tab with the given index. <p> Control of selection state (i.e. set/get selected item) is done through the combo box model. @param <E> the type of t...
java
public <E> void addComboField(int tabIndex, String fieldLabel, ComboBoxModel<E> comboBoxModel) { addComboField(tabIndex, fieldLabel, comboBoxModel, false); }
[ "public", "<", "E", ">", "void", "addComboField", "(", "int", "tabIndex", ",", "String", "fieldLabel", ",", "ComboBoxModel", "<", "E", ">", "comboBoxModel", ")", "{", "addComboField", "(", "tabIndex", ",", "fieldLabel", ",", "comboBoxModel", ",", "false", ")...
Adds a combo box field with the given label and model, to the tab with the given index. <p> Control of selection state (i.e. set/get selected item) is done through the combo box model. @param <E> the type of the elements of the combo box model. @param tabIndex the index of the tab where the combo box should be added. ...
[ "Adds", "a", "combo", "box", "field", "with", "the", "given", "label", "and", "model", "to", "the", "tab", "with", "the", "given", "index", ".", "<p", ">", "Control", "of", "selection", "state", "(", "i", ".", "e", ".", "set", "/", "get", "selected",...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L805-L807
landawn/AbacusUtil
src/com/landawn/abacus/util/HBaseExecutor.java
HBaseExecutor.exists
boolean exists(final String tableName, final Object rowKey) throws UncheckedIOException { """ And it may cause error because the "Object" is ambiguous to any type. """ return exists(tableName, AnyGet.of(rowKey)); }
java
boolean exists(final String tableName, final Object rowKey) throws UncheckedIOException { return exists(tableName, AnyGet.of(rowKey)); }
[ "boolean", "exists", "(", "final", "String", "tableName", ",", "final", "Object", "rowKey", ")", "throws", "UncheckedIOException", "{", "return", "exists", "(", "tableName", ",", "AnyGet", ".", "of", "(", "rowKey", ")", ")", ";", "}" ]
And it may cause error because the "Object" is ambiguous to any type.
[ "And", "it", "may", "cause", "error", "because", "the", "Object", "is", "ambiguous", "to", "any", "type", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/HBaseExecutor.java#L726-L728
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java
MutateInBuilder.arrayAddUnique
public <T> MutateInBuilder arrayAddUnique(String path, T value, SubdocOptionsBuilder optionsBuilder) { """ Insert a value in an existing array only if the value isn't already contained in the array (by way of string comparison). @param path the path to mutate in the JSON. @param value the value to insert. @p...
java
public <T> MutateInBuilder arrayAddUnique(String path, T value, SubdocOptionsBuilder optionsBuilder) { asyncBuilder.arrayAddUnique(path, value, optionsBuilder); return this; }
[ "public", "<", "T", ">", "MutateInBuilder", "arrayAddUnique", "(", "String", "path", ",", "T", "value", ",", "SubdocOptionsBuilder", "optionsBuilder", ")", "{", "asyncBuilder", ".", "arrayAddUnique", "(", "path", ",", "value", ",", "optionsBuilder", ")", ";", ...
Insert a value in an existing array only if the value isn't already contained in the array (by way of string comparison). @param path the path to mutate in the JSON. @param value the value to insert. @param optionsBuilder {@link SubdocOptionsBuilder}
[ "Insert", "a", "value", "in", "an", "existing", "array", "only", "if", "the", "value", "isn", "t", "already", "contained", "in", "the", "array", "(", "by", "way", "of", "string", "comparison", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java#L1031-L1034
dmerkushov/os-helper
src/main/java/ru/dmerkushov/oshelper/OSHelper.java
OSHelper.procWaitWithProcessReturn
public static ProcessReturn procWaitWithProcessReturn (Process process, final long timeout) throws OSHelperException { """ Waits for a specified process to terminate for the specified amount of milliseconds. If it is not terminated in the desired time, it is terminated explicitly. NOT TESTED!!! @param proc...
java
public static ProcessReturn procWaitWithProcessReturn (Process process, final long timeout) throws OSHelperException { long endTime = Calendar.getInstance ().getTimeInMillis () + timeout; boolean terminatedByItself = false; ProcessReturn processReturn = new ProcessReturn (); while (Calendar.getInstance ().get...
[ "public", "static", "ProcessReturn", "procWaitWithProcessReturn", "(", "Process", "process", ",", "final", "long", "timeout", ")", "throws", "OSHelperException", "{", "long", "endTime", "=", "Calendar", ".", "getInstance", "(", ")", ".", "getTimeInMillis", "(", ")...
Waits for a specified process to terminate for the specified amount of milliseconds. If it is not terminated in the desired time, it is terminated explicitly. NOT TESTED!!! @param process @param timeout @return @throws OSHelperException
[ "Waits", "for", "a", "specified", "process", "to", "terminate", "for", "the", "specified", "amount", "of", "milliseconds", ".", "If", "it", "is", "not", "terminated", "in", "the", "desired", "time", "it", "is", "terminated", "explicitly", "." ]
train
https://github.com/dmerkushov/os-helper/blob/a7c2b72d289d9bc23ae106d1c5e11769cf3463d6/src/main/java/ru/dmerkushov/oshelper/OSHelper.java#L106-L150
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/checkbox/CheckGroupSelectorPanel.java
CheckGroupSelectorPanel.newChoices
protected ListView<T> newChoices(final String id, final IModel<CheckboxModelBean<T>> model) { """ Factory method for creating the new {@link ListView} for the choices. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of the new {@link...
java
protected ListView<T> newChoices(final String id, final IModel<CheckboxModelBean<T>> model) { final ListView<T> choices = new ListView<T>("choices", model.getObject().getChoices()) { /** The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override ...
[ "protected", "ListView", "<", "T", ">", "newChoices", "(", "final", "String", "id", ",", "final", "IModel", "<", "CheckboxModelBean", "<", "T", ">", ">", "model", ")", "{", "final", "ListView", "<", "T", ">", "choices", "=", "new", "ListView", "<", "T"...
Factory method for creating the new {@link ListView} for the choices. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of the new {@link ListView} for the choices. @param id the id @param model the model @return the new {@link ListView} for...
[ "Factory", "method", "for", "creating", "the", "new", "{", "@link", "ListView", "}", "for", "the", "choices", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/checkbox/CheckGroupSelectorPanel.java#L186-L206
keyboardsurfer/Crouton
library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java
Crouton.show
public static void show(Activity activity, View customView, ViewGroup viewGroup) { """ Creates a {@link Crouton} with provided text and style for a given activity and displays it directly. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param customView T...
java
public static void show(Activity activity, View customView, ViewGroup viewGroup) { make(activity, customView, viewGroup).show(); }
[ "public", "static", "void", "show", "(", "Activity", "activity", ",", "View", "customView", ",", "ViewGroup", "viewGroup", ")", "{", "make", "(", "activity", ",", "customView", ",", "viewGroup", ")", ".", "show", "(", ")", ";", "}" ]
Creates a {@link Crouton} with provided text and style for a given activity and displays it directly. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param customView The custom {@link View} to display @param viewGroup The {@link ViewGroup} that this {@link Crouton}...
[ "Creates", "a", "{", "@link", "Crouton", "}", "with", "provided", "text", "and", "style", "for", "a", "given", "activity", "and", "displays", "it", "directly", "." ]
train
https://github.com/keyboardsurfer/Crouton/blob/7806b15e4d52793e1f5aeaa4a55b1e220289e619/library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java#L462-L464
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getRoles
public List<Role> getRoles(HashMap<String, String> queryParameters) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Gets a list of Role resources. @param queryParameters Query parameters of the Resource Parameters to filter the result of the list @return List of Role @throws ...
java
public List<Role> getRoles(HashMap<String, String> queryParameters) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getRoles(queryParameters, this.maxResults); }
[ "public", "List", "<", "Role", ">", "getRoles", "(", "HashMap", "<", "String", ",", "String", ">", "queryParameters", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "getRoles", "(", "queryParameters", ...
Gets a list of Role resources. @param queryParameters Query parameters of the Resource Parameters to filter the result of the list @return List of Role @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating t...
[ "Gets", "a", "list", "of", "Role", "resources", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L1821-L1823
samskivert/pythagoras
src/main/java/pythagoras/f/Points.java
Points.epsilonEquals
public static boolean epsilonEquals (IPoint p1, IPoint p2) { """ Returns true if the supplied points' x and y components are equal to one another within {@link MathUtil#EPSILON}. """ return epsilonEquals(p1, p2, MathUtil.EPSILON); }
java
public static boolean epsilonEquals (IPoint p1, IPoint p2) { return epsilonEquals(p1, p2, MathUtil.EPSILON); }
[ "public", "static", "boolean", "epsilonEquals", "(", "IPoint", "p1", ",", "IPoint", "p2", ")", "{", "return", "epsilonEquals", "(", "p1", ",", "p2", ",", "MathUtil", ".", "EPSILON", ")", ";", "}" ]
Returns true if the supplied points' x and y components are equal to one another within {@link MathUtil#EPSILON}.
[ "Returns", "true", "if", "the", "supplied", "points", "x", "and", "y", "components", "are", "equal", "to", "one", "another", "within", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Points.java#L35-L37
JoeKerouac/utils
src/main/java/com/joe/utils/secure/impl/SignatureUtilImpl.java
SignatureUtilImpl.buildInstance
public static SignatureUtil buildInstance(String privateKey, String publicKey, Algorithms algorithms) { """ 构建一个SignatureUtil @param privateKey PKCS8文件格式的私钥 @param publicKey X509格式的公钥 @param algorithms RSA加密类型 @return SignatureUtil """ return new Sig...
java
public static SignatureUtil buildInstance(String privateKey, String publicKey, Algorithms algorithms) { return new SignatureUtilImpl(privateKey, publicKey, algorithms); }
[ "public", "static", "SignatureUtil", "buildInstance", "(", "String", "privateKey", ",", "String", "publicKey", ",", "Algorithms", "algorithms", ")", "{", "return", "new", "SignatureUtilImpl", "(", "privateKey", ",", "publicKey", ",", "algorithms", ")", ";", "}" ]
构建一个SignatureUtil @param privateKey PKCS8文件格式的私钥 @param publicKey X509格式的公钥 @param algorithms RSA加密类型 @return SignatureUtil
[ "构建一个SignatureUtil" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/secure/impl/SignatureUtilImpl.java#L67-L70
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/squares/SquareRegularClustersIntoGrids.java
SquareRegularClustersIntoGrids.pickNot
static SquareNode pickNot( SquareNode target , SquareNode child ) { """ There are only two edges on target. Pick the edge which does not go to the provided child """ for (int i = 0; i < 4; i++) { SquareEdge e = target.edges[i]; if( e == null ) continue; SquareNode c = e.destination(target); ...
java
static SquareNode pickNot( SquareNode target , SquareNode child ) { for (int i = 0; i < 4; i++) { SquareEdge e = target.edges[i]; if( e == null ) continue; SquareNode c = e.destination(target); if( c != child ) return c; } throw new RuntimeException("There was no odd one out some how"); }
[ "static", "SquareNode", "pickNot", "(", "SquareNode", "target", ",", "SquareNode", "child", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "SquareEdge", "e", "=", "target", ".", "edges", "[", "i", "]", "...
There are only two edges on target. Pick the edge which does not go to the provided child
[ "There", "are", "only", "two", "edges", "on", "target", ".", "Pick", "the", "edge", "which", "does", "not", "go", "to", "the", "provided", "child" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/squares/SquareRegularClustersIntoGrids.java#L334-L344
microfocus-idol/java-configuration-impl
src/main/java/com/hp/autonomy/frontend/configuration/ConfigurationUtils.java
ConfigurationUtils.mergeComponent
public static <F extends ConfigurationComponent<F>> F mergeComponent(final F localValue, final F defaultValue) { """ Merges a (nullable) object field on the local config object with a default (nullable) value in the default config object @param localValue local field value @param defaultValue default field v...
java
public static <F extends ConfigurationComponent<F>> F mergeComponent(final F localValue, final F defaultValue) { return Optional.ofNullable(localValue).map(v -> v.merge(defaultValue)).orElse(defaultValue); }
[ "public", "static", "<", "F", "extends", "ConfigurationComponent", "<", "F", ">", ">", "F", "mergeComponent", "(", "final", "F", "localValue", ",", "final", "F", "defaultValue", ")", "{", "return", "Optional", ".", "ofNullable", "(", "localValue", ")", ".", ...
Merges a (nullable) object field on the local config object with a default (nullable) value in the default config object @param localValue local field value @param defaultValue default field value @param <F> the configuration object type @return the merged field value
[ "Merges", "a", "(", "nullable", ")", "object", "field", "on", "the", "local", "config", "object", "with", "a", "default", "(", "nullable", ")", "value", "in", "the", "default", "config", "object" ]
train
https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/ConfigurationUtils.java#L54-L56
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java
MultiLayerNetwork.rnnTimeStep
public INDArray rnnTimeStep(INDArray input, MemoryWorkspace outputWorkspace ) { """ See {@link #rnnTimeStep(INDArray)} for details<br> If no memory workspace is provided, the output will be detached (not in any workspace).<br> If a memory workspace is provided, the output activation array (i.e., the INDArray ret...
java
public INDArray rnnTimeStep(INDArray input, MemoryWorkspace outputWorkspace ) { try { boolean inputIs2d = input.rank() == 2; INDArray out = outputOfLayerDetached(false, FwdPassType.RNN_TIMESTEP, layers.length - 1, input, null, null, outputWorkspace); if (inputIs2d && out.rank...
[ "public", "INDArray", "rnnTimeStep", "(", "INDArray", "input", ",", "MemoryWorkspace", "outputWorkspace", ")", "{", "try", "{", "boolean", "inputIs2d", "=", "input", ".", "rank", "(", ")", "==", "2", ";", "INDArray", "out", "=", "outputOfLayerDetached", "(", ...
See {@link #rnnTimeStep(INDArray)} for details<br> If no memory workspace is provided, the output will be detached (not in any workspace).<br> If a memory workspace is provided, the output activation array (i.e., the INDArray returned by this method) will be placed in the specified workspace. This workspace must be ope...
[ "See", "{", "@link", "#rnnTimeStep", "(", "INDArray", ")", "}", "for", "details<br", ">", "If", "no", "memory", "workspace", "is", "provided", "the", "output", "will", "be", "detached", "(", "not", "in", "any", "workspace", ")", ".", "<br", ">", "If", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java#L3062-L3076
graknlabs/grakn
server/src/graql/gremlin/sets/LabelFragmentSet.java
LabelFragmentSet.tryExpandSubs
@Nullable LabelFragmentSet tryExpandSubs(Variable typeVar, TransactionOLTP tx) { """ Expand a {@link LabelFragmentSet} to match all sub-concepts of the single existing {@link Label}. Returns null if there is not exactly one label any of the {@link Label}s mentioned are not in the knowledge base. """ ...
java
@Nullable LabelFragmentSet tryExpandSubs(Variable typeVar, TransactionOLTP tx) { if (labels().size() != 1) return null; Label oldLabel = Iterables.getOnlyElement(labels()); SchemaConcept concept = tx.getSchemaConcept(oldLabel); if (concept == null) return null; Set<Label> ...
[ "@", "Nullable", "LabelFragmentSet", "tryExpandSubs", "(", "Variable", "typeVar", ",", "TransactionOLTP", "tx", ")", "{", "if", "(", "labels", "(", ")", ".", "size", "(", ")", "!=", "1", ")", "return", "null", ";", "Label", "oldLabel", "=", "Iterables", ...
Expand a {@link LabelFragmentSet} to match all sub-concepts of the single existing {@link Label}. Returns null if there is not exactly one label any of the {@link Label}s mentioned are not in the knowledge base.
[ "Expand", "a", "{", "@link", "LabelFragmentSet", "}", "to", "match", "all", "sub", "-", "concepts", "of", "the", "single", "existing", "{", "@link", "Label", "}", "." ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/gremlin/sets/LabelFragmentSet.java#L58-L70
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpURI.java
HttpURI.parseRequestTarget
public void parseRequestTarget(String method, String uri) { """ Parse according to https://tools.ietf.org/html/rfc7230#section-5.3 @param method the request method @param uri the request uri """ clear(); _uri = uri; if (HttpMethod.CONNECT.is(method)) _path = uri; ...
java
public void parseRequestTarget(String method, String uri) { clear(); _uri = uri; if (HttpMethod.CONNECT.is(method)) _path = uri; else parse(uri.startsWith("/") ? State.PATH : State.START, uri, 0, uri.length()); }
[ "public", "void", "parseRequestTarget", "(", "String", "method", ",", "String", "uri", ")", "{", "clear", "(", ")", ";", "_uri", "=", "uri", ";", "if", "(", "HttpMethod", ".", "CONNECT", ".", "is", "(", "method", ")", ")", "_path", "=", "uri", ";", ...
Parse according to https://tools.ietf.org/html/rfc7230#section-5.3 @param method the request method @param uri the request uri
[ "Parse", "according", "to", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc7230#section", "-", "5", ".", "3" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpURI.java#L161-L169
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/attributes/AttributeVocabularyValueUrl.java
AttributeVocabularyValueUrl.addAttributeVocabularyValueUrl
public static MozuUrl addAttributeVocabularyValueUrl(String attributeFQN, String responseFields) { """ Get Resource Url for AddAttributeVocabularyValue @param attributeFQN Fully qualified name for an attribute. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of d...
java
public static MozuUrl addAttributeVocabularyValueUrl(String attributeFQN, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/attributes/{attributeFQN}/VocabularyValues?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attribut...
[ "public", "static", "MozuUrl", "addAttributeVocabularyValueUrl", "(", "String", "attributeFQN", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/attributes/{attributeFQN}/Vo...
Get Resource Url for AddAttributeVocabularyValue @param attributeFQN Fully qualified name for an attribute. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update d...
[ "Get", "Resource", "Url", "for", "AddAttributeVocabularyValue" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/attributes/AttributeVocabularyValueUrl.java#L98-L104
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/IDLProxyObject.java
IDLProxyObject.getField
private Object getField(Object object, Field f) { """ Gets the field. @param object the object @param f the f @return the field """ f.setAccessible(true); try { return f.get(object); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e);...
java
private Object getField(Object object, Field f) { f.setAccessible(true); try { return f.get(object); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
[ "private", "Object", "getField", "(", "Object", "object", ",", "Field", "f", ")", "{", "f", ".", "setAccessible", "(", "true", ")", ";", "try", "{", "return", "f", ".", "get", "(", "object", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", ...
Gets the field. @param object the object @param f the f @return the field
[ "Gets", "the", "field", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/IDLProxyObject.java#L312-L319
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/TimeSpan.java
TimeSpan.insideRange
public boolean insideRange(Calendar startDate, Calendar endDate) { """ Returns {@code true} if the end date occurs after the start date during the period of time represented by this time span. """ // make a copy of the start time so that it is safe to modify it without // affecting the input param...
java
public boolean insideRange(Calendar startDate, Calendar endDate) { // make a copy of the start time so that it is safe to modify it without // affecting the input parameter Calendar mutableStartDate = (Calendar)(startDate.clone()); return isInRange(mutableStartDate, endDate); }
[ "public", "boolean", "insideRange", "(", "Calendar", "startDate", ",", "Calendar", "endDate", ")", "{", "// make a copy of the start time so that it is safe to modify it without", "// affecting the input parameter", "Calendar", "mutableStartDate", "=", "(", "Calendar", ")", "("...
Returns {@code true} if the end date occurs after the start date during the period of time represented by this time span.
[ "Returns", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/TimeSpan.java#L307-L313
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/rendering/strategy/TiledFeatureService.java
TiledFeatureService.exceedsScreenDimensions
private boolean exceedsScreenDimensions(InternalFeature f, double scale) { """ The test that checks if clipping is needed. @param f feature to test @param scale scale @return true if clipping is needed """ Envelope env = f.getBounds(); return (env.getWidth() * scale > MAXIMUM_TILE_COORDINATE) || ...
java
private boolean exceedsScreenDimensions(InternalFeature f, double scale) { Envelope env = f.getBounds(); return (env.getWidth() * scale > MAXIMUM_TILE_COORDINATE) || (env.getHeight() * scale > MAXIMUM_TILE_COORDINATE); }
[ "private", "boolean", "exceedsScreenDimensions", "(", "InternalFeature", "f", ",", "double", "scale", ")", "{", "Envelope", "env", "=", "f", ".", "getBounds", "(", ")", ";", "return", "(", "env", ".", "getWidth", "(", ")", "*", "scale", ">", "MAXIMUM_TILE_...
The test that checks if clipping is needed. @param f feature to test @param scale scale @return true if clipping is needed
[ "The", "test", "that", "checks", "if", "clipping", "is", "needed", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/strategy/TiledFeatureService.java#L190-L194