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
primefaces-extensions/core
src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java
SheetRenderer.encodeFilterVar
protected void encodeFilterVar(final FacesContext context, final Sheet sheet, final WidgetBuilder wb) throws IOException { """ Encodes a javascript filter var that informs the col header event of the column's filtering options. The var is an array in the form: <pre> ["false","true",["option 1",...
java
protected void encodeFilterVar(final FacesContext context, final Sheet sheet, final WidgetBuilder wb) throws IOException { final JavascriptVarBuilder vb = new JavascriptVarBuilder(null, false); for (final SheetColumn column : sheet.getColumns()) { if (!column.isRendered()) {...
[ "protected", "void", "encodeFilterVar", "(", "final", "FacesContext", "context", ",", "final", "Sheet", "sheet", ",", "final", "WidgetBuilder", "wb", ")", "throws", "IOException", "{", "final", "JavascriptVarBuilder", "vb", "=", "new", "JavascriptVarBuilder", "(", ...
Encodes a javascript filter var that informs the col header event of the column's filtering options. The var is an array in the form: <pre> ["false","true",["option 1", "option 2"]] </pre> False indicates no filtering for the column. True indicates simple input text filter. Array of values indicates a drop down filte...
[ "Encodes", "a", "javascript", "filter", "var", "that", "informs", "the", "col", "header", "event", "of", "the", "column", "s", "filtering", "options", ".", "The", "var", "is", "an", "array", "in", "the", "form", ":" ]
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java#L740-L769
networknt/light-4j
utility/src/main/java/com/networknt/utility/NioUtils.java
NioUtils.deleteOldFiles
public static void deleteOldFiles(String dirPath, int olderThanMinute) { """ Delele old files @param dirPath path of the filesystem @param olderThanMinute the minutes that defines older files """ File folder = new File(dirPath); if (folder.exists()) { File[] listFiles = folder....
java
public static void deleteOldFiles(String dirPath, int olderThanMinute) { File folder = new File(dirPath); if (folder.exists()) { File[] listFiles = folder.listFiles(); long eligibleForDeletion = System.currentTimeMillis() - (olderThanMinute * 60 * 1000L); for (File ...
[ "public", "static", "void", "deleteOldFiles", "(", "String", "dirPath", ",", "int", "olderThanMinute", ")", "{", "File", "folder", "=", "new", "File", "(", "dirPath", ")", ";", "if", "(", "folder", ".", "exists", "(", ")", ")", "{", "File", "[", "]", ...
Delele old files @param dirPath path of the filesystem @param olderThanMinute the minutes that defines older files
[ "Delele", "old", "files" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/NioUtils.java#L230-L244
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readShort
public static Short readShort(String value, Short defaultValue) { """ Read short. @param value the value @param defaultValue the default value @return the short """ if (!StringUtils.hasText(value)) return defaultValue; return Short.valueOf(value); }
java
public static Short readShort(String value, Short defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Short.valueOf(value); }
[ "public", "static", "Short", "readShort", "(", "String", "value", ",", "Short", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Short", ".", "valueOf", "(", "value",...
Read short. @param value the value @param defaultValue the default value @return the short
[ "Read", "short", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L104-L108
OpenLiberty/open-liberty
dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/AppMessageHelper.java
AppMessageHelper.formatMessage
public String formatMessage(String key, Object... params) { """ Format a message. @param key message key for the application manager messages file. @param params message parameters. @return the translated message. """ return Tr.formatMessage(tc, key, params); }
java
public String formatMessage(String key, Object... params) { return Tr.formatMessage(tc, key, params); }
[ "public", "String", "formatMessage", "(", "String", "key", ",", "Object", "...", "params", ")", "{", "return", "Tr", ".", "formatMessage", "(", "tc", ",", "key", ",", "params", ")", ";", "}" ]
Format a message. @param key message key for the application manager messages file. @param params message parameters. @return the translated message.
[ "Format", "a", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/AppMessageHelper.java#L48-L50
HeidelTime/heideltime
src/de/unihd/dbs/uima/consumer/eventi2014writer/Eventi2014Writer.java
Eventi2014Writer.writeDocument
private void writeDocument(String fullDocument, String filename) { """ writes a populated DOM xml(timeml) document to a given directory/file @param xmlDoc xml dom object @param filename name of the file that gets appended to the set output path """ // create output file handle File outFile = new File(mOu...
java
private void writeDocument(String fullDocument, String filename) { // create output file handle File outFile = new File(mOutputDir, filename+".xml"); BufferedWriter bw = null; try { // create a buffered writer for the output file bw = new BufferedWriter(new FileWriter(outFile)); bw.append(fullDocum...
[ "private", "void", "writeDocument", "(", "String", "fullDocument", ",", "String", "filename", ")", "{", "// create output file handle", "File", "outFile", "=", "new", "File", "(", "mOutputDir", ",", "filename", "+", "\".xml\"", ")", ";", "BufferedWriter", "bw", ...
writes a populated DOM xml(timeml) document to a given directory/file @param xmlDoc xml dom object @param filename name of the file that gets appended to the set output path
[ "writes", "a", "populated", "DOM", "xml", "(", "timeml", ")", "document", "to", "a", "given", "directory", "/", "file" ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/consumer/eventi2014writer/Eventi2014Writer.java#L226-L247
aws/aws-sdk-java
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/HadoopStepConfig.java
HadoopStepConfig.withProperties
public HadoopStepConfig withProperties(java.util.Map<String, String> properties) { """ <p> The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function. </p> @param properties The list of Java properties that are set when the step ru...
java
public HadoopStepConfig withProperties(java.util.Map<String, String> properties) { setProperties(properties); return this; }
[ "public", "HadoopStepConfig", "withProperties", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "setProperties", "(", "properties", ")", ";", "return", "this", ";", "}" ]
<p> The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function. </p> @param properties The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function. @return Returns a ...
[ "<p", ">", "The", "list", "of", "Java", "properties", "that", "are", "set", "when", "the", "step", "runs", ".", "You", "can", "use", "these", "properties", "to", "pass", "key", "value", "pairs", "to", "your", "main", "function", ".", "<", "/", "p", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/HadoopStepConfig.java#L143-L146
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
JavacParser.reportSyntaxError
protected void reportSyntaxError(JCDiagnostic.DiagnosticPosition diagPos, String key, Object... args) { """ Report a syntax error using the given DiagnosticPosition object and arguments, unless one was already reported at the same position. """ int pos = diagPos.getPreferredPosition(); if (pos...
java
protected void reportSyntaxError(JCDiagnostic.DiagnosticPosition diagPos, String key, Object... args) { int pos = diagPos.getPreferredPosition(); if (pos > S.errPos() || pos == Position.NOPOS) { if (token.kind == EOF) { error(diagPos, "premature.eof"); } else { ...
[ "protected", "void", "reportSyntaxError", "(", "JCDiagnostic", ".", "DiagnosticPosition", "diagPos", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "int", "pos", "=", "diagPos", ".", "getPreferredPosition", "(", ")", ";", "if", "(", "pos", ">"...
Report a syntax error using the given DiagnosticPosition object and arguments, unless one was already reported at the same position.
[ "Report", "a", "syntax", "error", "using", "the", "given", "DiagnosticPosition", "object", "and", "arguments", "unless", "one", "was", "already", "reported", "at", "the", "same", "position", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java#L469-L486
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionContext.java
SessionContext.addHttpSessionAttributeListener
public void addHttpSessionAttributeListener(ArrayList al, String j2eeName) { """ /* Adds a list of Session Attribute Listeners For shared session context or global sesions, we call this method to add each app's listeners. """ if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SE...
java
public void addHttpSessionAttributeListener(ArrayList al, String j2eeName) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[ADD_HTTP_SESSION_ATTRIBUTE_LISTENER...
[ "public", "void", "addHttpSessionAttributeListener", "(", "ArrayList", "al", ",", "String", "j2eeName", ")", "{", "if", "(", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "LoggingUtil", ".", "SE...
/* Adds a list of Session Attribute Listeners For shared session context or global sesions, we call this method to add each app's listeners.
[ "/", "*", "Adds", "a", "list", "of", "Session", "Attribute", "Listeners", "For", "shared", "session", "context", "or", "global", "sesions", "we", "call", "this", "method", "to", "add", "each", "app", "s", "listeners", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionContext.java#L804-L818
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/BacklogEndPointSupport.java
BacklogEndPointSupport.getWikiAttachmentEndpoint
public String getWikiAttachmentEndpoint(Object wikiId, Object attachmentId) throws BacklogException { """ Returns the endpoint of Wiki page's attachment file. @param wikiId the Wiki page identifier @param attachmentId the attachment identifier @return the endpoint @throws BacklogException """ ...
java
public String getWikiAttachmentEndpoint(Object wikiId, Object attachmentId) throws BacklogException { return buildEndpoint("wikis/" + wikiId + "/attachments/" + attachmentId); }
[ "public", "String", "getWikiAttachmentEndpoint", "(", "Object", "wikiId", ",", "Object", "attachmentId", ")", "throws", "BacklogException", "{", "return", "buildEndpoint", "(", "\"wikis/\"", "+", "wikiId", "+", "\"/attachments/\"", "+", "attachmentId", ")", ";", "}"...
Returns the endpoint of Wiki page's attachment file. @param wikiId the Wiki page identifier @param attachmentId the attachment identifier @return the endpoint @throws BacklogException
[ "Returns", "the", "endpoint", "of", "Wiki", "page", "s", "attachment", "file", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/BacklogEndPointSupport.java#L82-L84
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/Utilities.java
Utilities.makeProcessExitOnUncaughtException
public static void makeProcessExitOnUncaughtException(final Log log) { """ Sets an uncaught exception handler. This will make the process exit with exit code 1 if a thread exits due to an uncaught exception. """ Thread.setDefaultUncaughtExceptionHandler( new Thread.UncaughtExceptionHandler() { ...
java
public static void makeProcessExitOnUncaughtException(final Log log) { Thread.setDefaultUncaughtExceptionHandler( new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { log.error("UNCAUGHT: Thread " + t.getName() + " got a...
[ "public", "static", "void", "makeProcessExitOnUncaughtException", "(", "final", "Log", "log", ")", "{", "Thread", ".", "setDefaultUncaughtExceptionHandler", "(", "new", "Thread", ".", "UncaughtExceptionHandler", "(", ")", "{", "@", "Override", "public", "void", "unc...
Sets an uncaught exception handler. This will make the process exit with exit code 1 if a thread exits due to an uncaught exception.
[ "Sets", "an", "uncaught", "exception", "handler", ".", "This", "will", "make", "the", "process", "exit", "with", "exit", "code", "1", "if", "a", "thread", "exits", "due", "to", "an", "uncaught", "exception", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/Utilities.java#L156-L166
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/masterslave/MasterSlave.java
MasterSlave.connectAsync
public static <K, V> CompletableFuture<StatefulRedisMasterSlaveConnection<K, V>> connectAsync(RedisClient redisClient, RedisCodec<K, V> codec, Iterable<RedisURI> redisURIs) { """ Open asynchronously a new connection to a Redis Master-Slave server/servers using the supplied {@link RedisURI} and the sup...
java
public static <K, V> CompletableFuture<StatefulRedisMasterSlaveConnection<K, V>> connectAsync(RedisClient redisClient, RedisCodec<K, V> codec, Iterable<RedisURI> redisURIs) { return transformAsyncConnectionException(connectAsyncSentinelOrStaticSetup(redisClient, codec, redisURIs), redisURIs); }
[ "public", "static", "<", "K", ",", "V", ">", "CompletableFuture", "<", "StatefulRedisMasterSlaveConnection", "<", "K", ",", "V", ">", ">", "connectAsync", "(", "RedisClient", "redisClient", ",", "RedisCodec", "<", "K", ",", "V", ">", "codec", ",", "Iterable"...
Open asynchronously a new connection to a Redis Master-Slave server/servers using the supplied {@link RedisURI} and the supplied {@link RedisCodec codec} to encode/decode keys. <p> This {@link MasterSlave} performs auto-discovery of nodes if the URI is a Redis Sentinel URI. Master/Slave URIs will be treated as static t...
[ "Open", "asynchronously", "a", "new", "connection", "to", "a", "Redis", "Master", "-", "Slave", "server", "/", "servers", "using", "the", "supplied", "{", "@link", "RedisURI", "}", "and", "the", "supplied", "{", "@link", "RedisCodec", "codec", "}", "to", "...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/masterslave/MasterSlave.java#L194-L197
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/flyOutMenu/FlyOutMenuRenderer.java
FlyOutMenuRenderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:flyOutMenu. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate th...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } FlyOutMenu flyOutMenu = (FlyOutMenu) component; ResponseWriter rw = context.getResponseWriter(); String clientId = flyOutMenu.getClientId(); // put custom code he...
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "FlyOutMenu", "flyOu...
This methods generates the HTML code of the current b:flyOutMenu. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component t...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "flyOutMenu", ".", "<code", ">", "encodeBegin<", "/", "code", ">", "generates", "the", "start", "of", "the", "component", ".", "After", "the", "the", "JSF", "framework...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/flyOutMenu/FlyOutMenuRenderer.java#L51-L81
craigwblake/redline
src/main/java/org/redline_rpm/Builder.java
Builder.setPackage
public void setPackage( final CharSequence name, final CharSequence version, final CharSequence release, final int epoch) { """ <b>Required Field</b>. Sets the package information, such as the rpm name, the version, and the release number. @param name the name of the RPM package. @param version the version of ...
java
public void setPackage( final CharSequence name, final CharSequence version, final CharSequence release, final int epoch) { checkVariableContainsIllegalChars(ILLEGAL_CHARS_NAME, name, "name"); checkVariableContainsIllegalChars(ILLEGAL_CHARS_VARIABLE, version, "version"); checkVariableContainsIllegalChars(ILLEGAL_...
[ "public", "void", "setPackage", "(", "final", "CharSequence", "name", ",", "final", "CharSequence", "version", ",", "final", "CharSequence", "release", ",", "final", "int", "epoch", ")", "{", "checkVariableContainsIllegalChars", "(", "ILLEGAL_CHARS_NAME", ",", "name...
<b>Required Field</b>. Sets the package information, such as the rpm name, the version, and the release number. @param name the name of the RPM package. @param version the version of the new package. @param release the release number, specified after the version, of the new RPM. @param epoch the epoch number of the ne...
[ "<b", ">", "Required", "Field<", "/", "b", ">", ".", "Sets", "the", "package", "information", "such", "as", "the", "rpm", "name", "the", "version", "and", "the", "release", "number", "." ]
train
https://github.com/craigwblake/redline/blob/b2fee5eb6c8150e801a132a4478a643f9ec0df04/src/main/java/org/redline_rpm/Builder.java#L342-L353
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/ComponentAccess.java
ComponentAccess.callAnnotated
public static void callAnnotated(Object o, Class<? extends Annotation> ann, boolean lazy) { """ Call an method by Annotation. @param o the object to call. @param ann the annotation @param lazy if true, the a missing annotation is OK. if false the annotation has to be present or a Runtime exception is thrown....
java
public static void callAnnotated(Object o, Class<? extends Annotation> ann, boolean lazy) { try { getMethodOfInterest(o, ann).invoke(o); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } catch (InvocationTargetException ex) { throw new Ru...
[ "public", "static", "void", "callAnnotated", "(", "Object", "o", ",", "Class", "<", "?", "extends", "Annotation", ">", "ann", ",", "boolean", "lazy", ")", "{", "try", "{", "getMethodOfInterest", "(", "o", ",", "ann", ")", ".", "invoke", "(", "o", ")", ...
Call an method by Annotation. @param o the object to call. @param ann the annotation @param lazy if true, the a missing annotation is OK. if false the annotation has to be present or a Runtime exception is thrown.
[ "Call", "an", "method", "by", "Annotation", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/ComponentAccess.java#L255-L267
killbill/killbill
invoice/src/main/java/org/killbill/billing/invoice/tree/SubscriptionItemTree.java
SubscriptionItemTree.addItem
public void addItem(final InvoiceItem invoiceItem) { """ Add an existing item in the tree. A new node is inserted or an existing one updated, if one for the same period already exists. @param invoiceItem new existing invoice item on disk. """ Preconditions.checkState(!isBuilt, "Tree already built, u...
java
public void addItem(final InvoiceItem invoiceItem) { Preconditions.checkState(!isBuilt, "Tree already built, unable to add new invoiceItem=%s", invoiceItem); switch (invoiceItem.getInvoiceItemType()) { case RECURRING: if (invoiceItem.getAmount().compareTo(BigDecimal.ZERO) ==...
[ "public", "void", "addItem", "(", "final", "InvoiceItem", "invoiceItem", ")", "{", "Preconditions", ".", "checkState", "(", "!", "isBuilt", ",", "\"Tree already built, unable to add new invoiceItem=%s\"", ",", "invoiceItem", ")", ";", "switch", "(", "invoiceItem", "."...
Add an existing item in the tree. A new node is inserted or an existing one updated, if one for the same period already exists. @param invoiceItem new existing invoice item on disk.
[ "Add", "an", "existing", "item", "in", "the", "tree", ".", "A", "new", "node", "is", "inserted", "or", "an", "existing", "one", "updated", "if", "one", "for", "the", "same", "period", "already", "exists", "." ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/invoice/src/main/java/org/killbill/billing/invoice/tree/SubscriptionItemTree.java#L90-L118
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/Record.java
Record.removeListener
public void removeListener(BaseListener theBehavior, boolean bFreeBehavior) { """ Remove a listener from the chain. @param theBehavior Listener or Filter to add to this record. @param bFreeBehavior Free the behavior. """ if (m_listener != null) { if (m_listener == theBehavior) ...
java
public void removeListener(BaseListener theBehavior, boolean bFreeBehavior) { if (m_listener != null) { if (m_listener == theBehavior) { m_listener = (FileListener)theBehavior.getNextListener(); theBehavior.unlink(bFreeBehavior); // remove...
[ "public", "void", "removeListener", "(", "BaseListener", "theBehavior", ",", "boolean", "bFreeBehavior", ")", "{", "if", "(", "m_listener", "!=", "null", ")", "{", "if", "(", "m_listener", "==", "theBehavior", ")", "{", "m_listener", "=", "(", "FileListener", ...
Remove a listener from the chain. @param theBehavior Listener or Filter to add to this record. @param bFreeBehavior Free the behavior.
[ "Remove", "a", "listener", "from", "the", "chain", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L456-L468
liaochong/spring-boot-starter-converter
src/main/java/com/github/liaochong/converter/core/BeansConvertStrategy.java
BeansConvertStrategy.convertBeans
public static <E, T, X extends RuntimeException> List<E> convertBeans(List<T> source, Class<E> targetClass, Supplier<X> exceptionSupplier, boolean nonNullFilter) { """ 集合转换,无指定异常提供 @param source 需要转换的集合 @param targetClass 需要转换到的类型 @param exceptionSupplier 异常操作 @param nonNullFilter 是否非空过滤 @param ...
java
public static <E, T, X extends RuntimeException> List<E> convertBeans(List<T> source, Class<E> targetClass, Supplier<X> exceptionSupplier, boolean nonNullFilter) { return convertBeans(source, targetClass, exceptionSupplier, false, nonNullFilter); }
[ "public", "static", "<", "E", ",", "T", ",", "X", "extends", "RuntimeException", ">", "List", "<", "E", ">", "convertBeans", "(", "List", "<", "T", ">", "source", ",", "Class", "<", "E", ">", "targetClass", ",", "Supplier", "<", "X", ">", "exceptionS...
集合转换,无指定异常提供 @param source 需要转换的集合 @param targetClass 需要转换到的类型 @param exceptionSupplier 异常操作 @param nonNullFilter 是否非空过滤 @param <E> 转换后的类型 @param <T> 转换前的类型 @param <X> 异常返回类型 @return 结果
[ "集合转换,无指定异常提供" ]
train
https://github.com/liaochong/spring-boot-starter-converter/blob/a36bea44bd23330a6f43b0372906a804a09285c5/src/main/java/com/github/liaochong/converter/core/BeansConvertStrategy.java#L68-L71
NextFaze/power-adapters
power-adapters/src/main/java/com/nextfaze/poweradapters/DividerAdapterBuilder.java
DividerAdapterBuilder.trailingView
@NonNull public DividerAdapterBuilder trailingView(@NonNull ViewFactory viewFactory) { """ Sets the divider that appears after the wrapped adapters items. """ mTrailingItem = new Item(checkNotNull(viewFactory, "viewFactory"), false); return this; }
java
@NonNull public DividerAdapterBuilder trailingView(@NonNull ViewFactory viewFactory) { mTrailingItem = new Item(checkNotNull(viewFactory, "viewFactory"), false); return this; }
[ "@", "NonNull", "public", "DividerAdapterBuilder", "trailingView", "(", "@", "NonNull", "ViewFactory", "viewFactory", ")", "{", "mTrailingItem", "=", "new", "Item", "(", "checkNotNull", "(", "viewFactory", ",", "\"viewFactory\"", ")", ",", "false", ")", ";", "re...
Sets the divider that appears after the wrapped adapters items.
[ "Sets", "the", "divider", "that", "appears", "after", "the", "wrapped", "adapters", "items", "." ]
train
https://github.com/NextFaze/power-adapters/blob/cdf00b1b723ed9d6bcd549ae9741a19dd59651e1/power-adapters/src/main/java/com/nextfaze/poweradapters/DividerAdapterBuilder.java#L51-L55
RestComm/cluster
cache/src/main/java/org/restcomm/cache/MobicentsCache.java
MobicentsCache.unsetReplicationClassLoader
@SuppressWarnings("rawtypes") public void unsetReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { """ Unsets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. @param regionFqn @param classLoader """ if (!isLocalMode()) { final ...
java
@SuppressWarnings("rawtypes") public void unsetReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); if (region != null) { if (region.isActive()) { region.deactivate(); } region.unregisterContextC...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "unsetReplicationClassLoader", "(", "Fqn", "regionFqn", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "!", "isLocalMode", "(", ")", ")", "{", "final", "Region", "region", "=", "jBos...
Unsets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. @param regionFqn @param classLoader
[ "Unsets", "the", "class", "loader", "to", "be", "used", "on", "serialization", "operations", "for", "data", "stored", "in", "the", "specified", "fqn", "and", "child", "nodes", "." ]
train
https://github.com/RestComm/cluster/blob/46bff5e9ae89528ccc7b43ba50a0de5b96913e6f/cache/src/main/java/org/restcomm/cache/MobicentsCache.java#L212-L224
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java
BondCountDescriptor.setParameters
@Override public void setParameters(Object[] params) throws CDKException { """ Sets the parameters attribute of the BondCountDescriptor object @param params The new parameters value @exception CDKException Description of the Exception """ if (params.length > 1) { throw...
java
@Override public void setParameters(Object[] params) throws CDKException { if (params.length > 1) { throw new CDKException("BondCount only expects one parameter"); } if (!(params[0] instanceof String)) { throw new CDKException("The parameter must be of type IBond.Orde...
[ "@", "Override", "public", "void", "setParameters", "(", "Object", "[", "]", "params", ")", "throws", "CDKException", "{", "if", "(", "params", ".", "length", ">", "1", ")", "{", "throw", "new", "CDKException", "(", "\"BondCount only expects one parameter\"", ...
Sets the parameters attribute of the BondCountDescriptor object @param params The new parameters value @exception CDKException Description of the Exception
[ "Sets", "the", "parameters", "attribute", "of", "the", "BondCountDescriptor", "object" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java#L93-L107
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_KNOB_Image
private BufferedImage create_KNOB_Image(final int WIDTH, final KnobType KNOB_TYPE, final KnobStyle KNOB_STYLE) { """ Creates a single alignment post image that could be placed on all the positions where it is needed @param WIDTH @param KNOB_TYPE @return a buffered image that contains a single alignment post of ...
java
private BufferedImage create_KNOB_Image(final int WIDTH, final KnobType KNOB_TYPE, final KnobStyle KNOB_STYLE) { return KNOB_FACTORY.create_KNOB_Image(WIDTH, KNOB_TYPE, KNOB_STYLE); }
[ "private", "BufferedImage", "create_KNOB_Image", "(", "final", "int", "WIDTH", ",", "final", "KnobType", "KNOB_TYPE", ",", "final", "KnobStyle", "KNOB_STYLE", ")", "{", "return", "KNOB_FACTORY", ".", "create_KNOB_Image", "(", "WIDTH", ",", "KNOB_TYPE", ",", "KNOB_...
Creates a single alignment post image that could be placed on all the positions where it is needed @param WIDTH @param KNOB_TYPE @return a buffered image that contains a single alignment post of the given type
[ "Creates", "a", "single", "alignment", "post", "image", "that", "could", "be", "placed", "on", "all", "the", "positions", "where", "it", "is", "needed" ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L2822-L2824
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXWriter.java
MPXWriter.writeCalendarException
private void writeCalendarException(ProjectCalendar parentCalendar, ProjectCalendarException record) throws IOException { """ Write a calendar exception. @param parentCalendar parent calendar instance @param record calendar exception instance @throws IOException """ m_buffer.setLength(0); if ...
java
private void writeCalendarException(ProjectCalendar parentCalendar, ProjectCalendarException record) throws IOException { m_buffer.setLength(0); if (!parentCalendar.isDerived()) { m_buffer.append(MPXConstants.BASE_CALENDAR_EXCEPTION_RECORD_NUMBER); } else { m_bu...
[ "private", "void", "writeCalendarException", "(", "ProjectCalendar", "parentCalendar", ",", "ProjectCalendarException", "record", ")", "throws", "IOException", "{", "m_buffer", ".", "setLength", "(", "0", ")", ";", "if", "(", "!", "parentCalendar", ".", "isDerived",...
Write a calendar exception. @param parentCalendar parent calendar instance @param record calendar exception instance @throws IOException
[ "Write", "a", "calendar", "exception", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L455-L489
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/plugins/PluginDefinition.java
PluginDefinition.initElement
public void initElement(ElementBase element, IPropertyProvider propertyProvider) { """ Initialize the element's properties using the specified property provider. @param element Element to initialize. @param propertyProvider Provider of property values. """ if (propertyProvider != null) { ...
java
public void initElement(ElementBase element, IPropertyProvider propertyProvider) { if (propertyProvider != null) { for (PropertyInfo propInfo : getProperties()) { String key = propInfo.getId(); if (propertyProvider.hasProperty(key)) { String value...
[ "public", "void", "initElement", "(", "ElementBase", "element", ",", "IPropertyProvider", "propertyProvider", ")", "{", "if", "(", "propertyProvider", "!=", "null", ")", "{", "for", "(", "PropertyInfo", "propInfo", ":", "getProperties", "(", ")", ")", "{", "St...
Initialize the element's properties using the specified property provider. @param element Element to initialize. @param propertyProvider Provider of property values.
[ "Initialize", "the", "element", "s", "properties", "using", "the", "specified", "property", "provider", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/plugins/PluginDefinition.java#L655-L666
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.getClient
public Client getClient(String clientId, AccessToken accessToken) { """ Get client by the given client id. @param clientId the client id @param accessToken the access token used to access the service @return The found client @throws UnauthorizedException if the accessToken is not valid @throw...
java
public Client getClient(String clientId, AccessToken accessToken) { return getAuthService().getClient(clientId, accessToken); }
[ "public", "Client", "getClient", "(", "String", "clientId", ",", "AccessToken", "accessToken", ")", "{", "return", "getAuthService", "(", ")", ".", "getClient", "(", "clientId", ",", "accessToken", ")", ";", "}" ]
Get client by the given client id. @param clientId the client id @param accessToken the access token used to access the service @return The found client @throws UnauthorizedException if the accessToken is not valid @throws ForbiddenException if access to this resource is not allowed @thro...
[ "Get", "client", "by", "the", "given", "client", "id", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L636-L638
openengsb/openengsb
ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java
AttributeEditorUtil.createFieldList
public static RepeatingView createFieldList(String id, Class<?> bean, Map<String, String> values) { """ creates a RepeatingView providing a suitable editor field for every property. @param values map used for saving the data @see org.openengsb.ui.common.wicket.model.MapModel """ List<AttributeDefini...
java
public static RepeatingView createFieldList(String id, Class<?> bean, Map<String, String> values) { List<AttributeDefinition> attributes = MethodUtil.buildAttributesList(bean); return createFieldList(id, attributes, values); }
[ "public", "static", "RepeatingView", "createFieldList", "(", "String", "id", ",", "Class", "<", "?", ">", "bean", ",", "Map", "<", "String", ",", "String", ">", "values", ")", "{", "List", "<", "AttributeDefinition", ">", "attributes", "=", "MethodUtil", "...
creates a RepeatingView providing a suitable editor field for every property. @param values map used for saving the data @see org.openengsb.ui.common.wicket.model.MapModel
[ "creates", "a", "RepeatingView", "providing", "a", "suitable", "editor", "field", "for", "every", "property", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java#L53-L56
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/pathfinding/navmesh/Link.java
Link.distance2
public float distance2(float tx, float ty) { """ Get the distance squared from this link to the given position @param tx The x coordinate of the target location @param ty The y coordinate of the target location @return The distance squared from this link to the target """ float dx = tx - px; float dy ...
java
public float distance2(float tx, float ty) { float dx = tx - px; float dy = ty - py; return ((dx*dx) + (dy*dy)); }
[ "public", "float", "distance2", "(", "float", "tx", ",", "float", "ty", ")", "{", "float", "dx", "=", "tx", "-", "px", ";", "float", "dy", "=", "ty", "-", "py", ";", "return", "(", "(", "dx", "*", "dx", ")", "+", "(", "dy", "*", "dy", ")", ...
Get the distance squared from this link to the given position @param tx The x coordinate of the target location @param ty The y coordinate of the target location @return The distance squared from this link to the target
[ "Get", "the", "distance", "squared", "from", "this", "link", "to", "the", "given", "position" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/pathfinding/navmesh/Link.java#L36-L41
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.exportIteration
public Export exportIteration(UUID projectId, UUID iterationId, String platform, ExportIterationOptionalParameter exportIterationOptionalParameter) { """ Export a trained iteration. @param projectId The project id @param iterationId The iteration id @param platform The target platform (coreml or tensorflow). ...
java
public Export exportIteration(UUID projectId, UUID iterationId, String platform, ExportIterationOptionalParameter exportIterationOptionalParameter) { return exportIterationWithServiceResponseAsync(projectId, iterationId, platform, exportIterationOptionalParameter).toBlocking().single().body(); }
[ "public", "Export", "exportIteration", "(", "UUID", "projectId", ",", "UUID", "iterationId", ",", "String", "platform", ",", "ExportIterationOptionalParameter", "exportIterationOptionalParameter", ")", "{", "return", "exportIterationWithServiceResponseAsync", "(", "projectId"...
Export a trained iteration. @param projectId The project id @param iterationId The iteration id @param platform The target platform (coreml or tensorflow). Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' @param exportIterationOptionalParameter the object representing the optional parameters to be...
[ "Export", "a", "trained", "iteration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L946-L948
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.inexistentField
public static void inexistentField(String targetFieldName, String targetClassName) { """ Thrown when the target field doesn't exist. @param targetFieldName name of the target field @param targetClassName name of the target field's class """ throw new MappingErrorException(MSG.INSTANCE.message(mappingError...
java
public static void inexistentField(String targetFieldName, String targetClassName){ throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException5, targetFieldName, targetClassName)); }
[ "public", "static", "void", "inexistentField", "(", "String", "targetFieldName", ",", "String", "targetClassName", ")", "{", "throw", "new", "MappingErrorException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "mappingErrorException5", ",", "targetFieldName", ...
Thrown when the target field doesn't exist. @param targetFieldName name of the target field @param targetClassName name of the target field's class
[ "Thrown", "when", "the", "target", "field", "doesn", "t", "exist", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L491-L493
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java
BetterRecyclerAdapter.onBindViewHolder
@Override public void onBindViewHolder(final VH vh, final int i) { """ Intercept the bind View holder method to wire up the item click listener only if the listener is set by the user CAVEAT: Be sure that you still override this method and call it's super (or don't if you want to override this functionali...
java
@Override public void onBindViewHolder(final VH vh, final int i) { if(itemClickListener != null){ vh.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int position = vh.getAdapterPosition(); ...
[ "@", "Override", "public", "void", "onBindViewHolder", "(", "final", "VH", "vh", ",", "final", "int", "i", ")", "{", "if", "(", "itemClickListener", "!=", "null", ")", "{", "vh", ".", "itemView", ".", "setOnClickListener", "(", "new", "View", ".", "OnCli...
Intercept the bind View holder method to wire up the item click listener only if the listener is set by the user CAVEAT: Be sure that you still override this method and call it's super (or don't if you want to override this functionality and use the {@link #onItemClick(android.view.View, int)} method) @param vh ...
[ "Intercept", "the", "bind", "View", "holder", "method", "to", "wire", "up", "the", "item", "click", "listener", "only", "if", "the", "listener", "is", "set", "by", "the", "user" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java#L398-L424
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBIDataWrapper.java
RBBIDataWrapper.dumpRow
private void dumpRow(java.io.PrintStream out, short table[], int state) { """ Dump (for debug) a single row of an RBBI state table @param table @param state """ StringBuilder dest = new StringBuilder(fHeader.fCatCount*5 + 20); dest.append(intToString(state, 4)); int row = getRowInde...
java
private void dumpRow(java.io.PrintStream out, short table[], int state) { StringBuilder dest = new StringBuilder(fHeader.fCatCount*5 + 20); dest.append(intToString(state, 4)); int row = getRowIndex(state); if (table[row+ACCEPTING] != 0) { dest.append(intToString(table[row+AC...
[ "private", "void", "dumpRow", "(", "java", ".", "io", ".", "PrintStream", "out", ",", "short", "table", "[", "]", ",", "int", "state", ")", "{", "StringBuilder", "dest", "=", "new", "StringBuilder", "(", "fHeader", ".", "fCatCount", "*", "5", "+", "20"...
Dump (for debug) a single row of an RBBI state table @param table @param state
[ "Dump", "(", "for", "debug", ")", "a", "single", "row", "of", "an", "RBBI", "state", "table" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBIDataWrapper.java#L424-L445
tweea/matrixjavalib-main-common
src/main/java/net/matrix/security/Cryptos.java
Cryptos.hmacSha1
public static byte[] hmacSha1(final byte[] input, final byte[] key) throws GeneralSecurityException { """ 使用 HMAC-SHA1 进行消息签名,返回字节数组,长度为 20 字节。 @param input 原始输入字符数组 @param key HMAC-SHA1 密钥 @return 签名 @throws GeneralSecurityException 签名失败 """ try { SecretKey secretKey = new SecretKeySpec(key, H...
java
public static byte[] hmacSha1(final byte[] input, final byte[] key) throws GeneralSecurityException { try { SecretKey secretKey = new SecretKeySpec(key, HMACSHA1_NAME); Mac mac = Mac.getInstance(HMACSHA1_NAME); mac.init(secretKey); return mac.doFinal(input); } catch (NoSuchAlgorithmException e) { t...
[ "public", "static", "byte", "[", "]", "hmacSha1", "(", "final", "byte", "[", "]", "input", ",", "final", "byte", "[", "]", "key", ")", "throws", "GeneralSecurityException", "{", "try", "{", "SecretKey", "secretKey", "=", "new", "SecretKeySpec", "(", "key",...
使用 HMAC-SHA1 进行消息签名,返回字节数组,长度为 20 字节。 @param input 原始输入字符数组 @param key HMAC-SHA1 密钥 @return 签名 @throws GeneralSecurityException 签名失败
[ "使用", "HMAC", "-", "SHA1", "进行消息签名,返回字节数组", "长度为", "20", "字节。" ]
train
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/security/Cryptos.java#L80-L90
buyi/RecyclerViewPagerIndicator
recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java
RecyclerTitlePageIndicator.clipViewOnTheRight
private void clipViewOnTheRight(Rect curViewBound, float curViewWidth, int right) { """ Set bounds for the right textView including clip padding. @param curViewBound current bounds. @param curViewWidth width of the view. """ curViewBound.right = (int) (right - mClipPadding); curViewBound....
java
private void clipViewOnTheRight(Rect curViewBound, float curViewWidth, int right) { curViewBound.right = (int) (right - mClipPadding); curViewBound.left = (int) (curViewBound.right - curViewWidth); }
[ "private", "void", "clipViewOnTheRight", "(", "Rect", "curViewBound", ",", "float", "curViewWidth", ",", "int", "right", ")", "{", "curViewBound", ".", "right", "=", "(", "int", ")", "(", "right", "-", "mClipPadding", ")", ";", "curViewBound", ".", "left", ...
Set bounds for the right textView including clip padding. @param curViewBound current bounds. @param curViewWidth width of the view.
[ "Set", "bounds", "for", "the", "right", "textView", "including", "clip", "padding", "." ]
train
https://github.com/buyi/RecyclerViewPagerIndicator/blob/b3b5283801b60d40f7325c7f590c945262194fad/recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java#L647-L650
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/RegistriesInner.java
RegistriesInner.listUsages
public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { """ Gets the quota usages for the specified container registry. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry...
java
public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { return listUsagesWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body(); }
[ "public", "RegistryUsageListResultInner", "listUsages", "(", "String", "resourceGroupName", ",", "String", "registryName", ")", "{", "return", "listUsagesWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ")", ".", "toBlocking", "(", ")", ".", "si...
Gets the quota usages for the specified container registry. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if...
[ "Gets", "the", "quota", "usages", "for", "the", "specified", "container", "registry", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/RegistriesInner.java#L1214-L1216
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.createOrUpdateElement
public Element createOrUpdateElement(Object parent, String name, String type, Style style, boolean generateId) { """ Create or update an element in the DOM. The id will be generated. @param parent the parent group @param name the local group name of the element (should be unique within the group) @param typ...
java
public Element createOrUpdateElement(Object parent, String name, String type, Style style, boolean generateId) { Element element; // check existence if (name != null) { if (!generateId) { element = Dom.getElementById(name); } else { element = getElement(parent, name); } } else { return null;...
[ "public", "Element", "createOrUpdateElement", "(", "Object", "parent", ",", "String", "name", ",", "String", "type", ",", "Style", "style", ",", "boolean", "generateId", ")", "{", "Element", "element", ";", "// check existence", "if", "(", "name", "!=", "null"...
Create or update an element in the DOM. The id will be generated. @param parent the parent group @param name the local group name of the element (should be unique within the group) @param type the type of the element (tag name, e.g. 'image') @param style The style to apply on the element. @param generateId true if a u...
[ "Create", "or", "update", "an", "element", "in", "the", "DOM", ".", "The", "id", "will", "be", "generated", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L162-L186
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java
PolylineSplitMerge.findInitialTriangle
boolean findInitialTriangle(List<Point2D_I32> contour) { """ Select an initial triangle. A good initial triangle is needed. By good it should minimize the error of the contour from each side """ // find the first estimate for a corner int cornerSeed = findCornerSeed(contour); // see if it can reject th...
java
boolean findInitialTriangle(List<Point2D_I32> contour) { // find the first estimate for a corner int cornerSeed = findCornerSeed(contour); // see if it can reject the contour immediately if( convex ) { if( !isConvexUsingMaxDistantPoints(contour,0,cornerSeed)) return false; } // Select the second co...
[ "boolean", "findInitialTriangle", "(", "List", "<", "Point2D_I32", ">", "contour", ")", "{", "// find the first estimate for a corner", "int", "cornerSeed", "=", "findCornerSeed", "(", "contour", ")", ";", "// see if it can reject the contour immediately", "if", "(", "con...
Select an initial triangle. A good initial triangle is needed. By good it should minimize the error of the contour from each side
[ "Select", "an", "initial", "triangle", ".", "A", "good", "initial", "triangle", "is", "needed", ".", "By", "good", "it", "should", "minimize", "the", "error", "of", "the", "contour", "from", "each", "side" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java#L309-L342
aws/aws-sdk-java
aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/StartJobRunRequest.java
StartJobRunRequest.withArguments
public StartJobRunRequest withArguments(java.util.Map<String, String> arguments) { """ <p> The job arguments specifically for this run. For this job run, they replace the default arguments set in the job definition itself. </p> <p> You can specify arguments here that your own job-execution script consumes, as...
java
public StartJobRunRequest withArguments(java.util.Map<String, String> arguments) { setArguments(arguments); return this; }
[ "public", "StartJobRunRequest", "withArguments", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "arguments", ")", "{", "setArguments", "(", "arguments", ")", ";", "return", "this", ";", "}" ]
<p> The job arguments specifically for this run. For this job run, they replace the default arguments set in the job definition itself. </p> <p> You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes. </p> <p> For information about how to specify a...
[ "<p", ">", "The", "job", "arguments", "specifically", "for", "this", "run", ".", "For", "this", "job", "run", "they", "replace", "the", "default", "arguments", "set", "in", "the", "job", "definition", "itself", ".", "<", "/", "p", ">", "<p", ">", "You"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/StartJobRunRequest.java#L361-L364
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GGradientToEdgeFeatures.java
GGradientToEdgeFeatures.intensityE
static public <D extends ImageGray<D>> void intensityE( D derivX , D derivY , GrayF32 intensity ) { """ Computes the edge intensity using a Euclidean norm. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param intensity Edge intensity. """ if( ...
java
static public <D extends ImageGray<D>> void intensityE( D derivX , D derivY , GrayF32 intensity ) { if( derivX instanceof GrayF32) { GradientToEdgeFeatures.intensityE((GrayF32)derivX,(GrayF32)derivY,intensity); } else if( derivX instanceof GrayS16) { GradientToEdgeFeatures.intensityE((GrayS16)derivX,(GrayS1...
[ "static", "public", "<", "D", "extends", "ImageGray", "<", "D", ">", ">", "void", "intensityE", "(", "D", "derivX", ",", "D", "derivY", ",", "GrayF32", "intensity", ")", "{", "if", "(", "derivX", "instanceof", "GrayF32", ")", "{", "GradientToEdgeFeatures",...
Computes the edge intensity using a Euclidean norm. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param intensity Edge intensity.
[ "Computes", "the", "edge", "intensity", "using", "a", "Euclidean", "norm", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GGradientToEdgeFeatures.java#L41-L53
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/geom/Geom.java
Geom.createArea
public static Area createArea(double x, double y, double width, double height) { """ Create an area. @param x The horizontal location. @param y The vertical location. @param width The rectangle width. @param height The rectangle height. @return The created area. """ return new AreaImpl(x, y, wi...
java
public static Area createArea(double x, double y, double width, double height) { return new AreaImpl(x, y, width, height); }
[ "public", "static", "Area", "createArea", "(", "double", "x", ",", "double", "y", ",", "double", "width", ",", "double", "height", ")", "{", "return", "new", "AreaImpl", "(", "x", ",", "y", ",", "width", ",", "height", ")", ";", "}" ]
Create an area. @param x The horizontal location. @param y The vertical location. @param width The rectangle width. @param height The rectangle height. @return The created area.
[ "Create", "an", "area", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/geom/Geom.java#L90-L93
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/DeploymentsInner.java
DeploymentsInner.getByResourceGroupAsync
public Observable<DeploymentExtendedInner> getByResourceGroupAsync(String resourceGroupName, String deploymentName) { """ Gets a deployment. @param resourceGroupName The name of the resource group. The name is case insensitive. @param deploymentName The name of the deployment to get. @throws IllegalArgumentEx...
java
public Observable<DeploymentExtendedInner> getByResourceGroupAsync(String resourceGroupName, String deploymentName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<DeploymentExtendedInner>, DeploymentExtendedInner>() { @Override ...
[ "public", "Observable", "<", "DeploymentExtendedInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "deploymentName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "deploymentName", ")",...
Gets a deployment. @param resourceGroupName The name of the resource group. The name is case insensitive. @param deploymentName The name of the deployment to get. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DeploymentExtendedInner object
[ "Gets", "a", "deployment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/DeploymentsInner.java#L583-L590
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/Eval.java
Eval.sourceToSnippets
private List<Snippet> sourceToSnippets(String userSource) { """ Converts the user source of a snippet into a Snippet object (or list of objects in the case of: int x, y, z;). Does not install the Snippets or execute them. @param userSource the source of the snippet @return usually a singleton list of Snippe...
java
private List<Snippet> sourceToSnippets(String userSource) { String compileSource = Util.trimEnd(new MaskCommentsAndModifiers(userSource, false).cleared()); if (compileSource.length() == 0) { return Collections.emptyList(); } ParseTask pt = state.taskFactory.parse(compileSourc...
[ "private", "List", "<", "Snippet", ">", "sourceToSnippets", "(", "String", "userSource", ")", "{", "String", "compileSource", "=", "Util", ".", "trimEnd", "(", "new", "MaskCommentsAndModifiers", "(", "userSource", ",", "false", ")", ".", "cleared", "(", ")", ...
Converts the user source of a snippet into a Snippet object (or list of objects in the case of: int x, y, z;). Does not install the Snippets or execute them. @param userSource the source of the snippet @return usually a singleton list of Snippet, but may be empty or multiple
[ "Converts", "the", "user", "source", "of", "a", "snippet", "into", "a", "Snippet", "object", "(", "or", "list", "of", "objects", "in", "the", "case", "of", ":", "int", "x", "y", "z", ";", ")", ".", "Does", "not", "install", "the", "Snippets", "or", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/Eval.java#L153-L192
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
KeyMap.get
public V get(K key) { """ Looks up the value mapped under the given key. Returns null if no value is mapped under this key. @param key The key to look up. @return The value associated with the key, or null, if no value is found for the key. @throws java.lang.NullPointerException Thrown, if the key is null. ...
java
public V get(K key) { final int hash = hash(key); final int slot = indexOf(hash); // search the chain from the slot for (Entry<K, V> entry = table[slot]; entry != null; entry = entry.next) { if (entry.hashCode == hash && entry.key.equals(key)) { return entry.value; } } // not found return null...
[ "public", "V", "get", "(", "K", "key", ")", "{", "final", "int", "hash", "=", "hash", "(", "key", ")", ";", "final", "int", "slot", "=", "indexOf", "(", "hash", ")", ";", "// search the chain from the slot", "for", "(", "Entry", "<", "K", ",", "V", ...
Looks up the value mapped under the given key. Returns null if no value is mapped under this key. @param key The key to look up. @return The value associated with the key, or null, if no value is found for the key. @throws java.lang.NullPointerException Thrown, if the key is null.
[ "Looks", "up", "the", "value", "mapped", "under", "the", "given", "key", ".", "Returns", "null", "if", "no", "value", "is", "mapped", "under", "this", "key", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java#L219-L232
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getMethodIgnoreCase
public static Method getMethodIgnoreCase(Class<?> clazz, String methodName, Class<?>... paramTypes) throws SecurityException { """ 忽略大小写查找指定方法,如果找不到对应的方法则返回<code>null</code> <p> 此方法为精准获取方法名,即方法名和参数数量和类型必须一致,否则返回<code>null</code>。 </p> @param clazz 类,如果为{@code null}返回{@code null} @param methodName 方法名,如果为空...
java
public static Method getMethodIgnoreCase(Class<?> clazz, String methodName, Class<?>... paramTypes) throws SecurityException { return getMethod(clazz, true, methodName, paramTypes); }
[ "public", "static", "Method", "getMethodIgnoreCase", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "paramTypes", ")", "throws", "SecurityException", "{", "return", "getMethod", "(", "clazz", ",", "true...
忽略大小写查找指定方法,如果找不到对应的方法则返回<code>null</code> <p> 此方法为精准获取方法名,即方法名和参数数量和类型必须一致,否则返回<code>null</code>。 </p> @param clazz 类,如果为{@code null}返回{@code null} @param methodName 方法名,如果为空字符串返回{@code null} @param paramTypes 参数类型,指定参数类型如果是方法的子类也算 @return 方法 @throws SecurityException 无权访问抛出异常 @since 3.2.0
[ "忽略大小写查找指定方法,如果找不到对应的方法则返回<code", ">", "null<", "/", "code", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L414-L416
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.addYears
public static <T extends Calendar> T addYears(final T calendar, final int amount) { """ Adds a number of years to a calendar returning a new object. The original {@code Date} is unchanged. @param calendar the calendar, not null @param amount the amount to add, may be negative @return the new {@code Date} w...
java
public static <T extends Calendar> T addYears(final T calendar, final int amount) { return roll(calendar, amount, CalendarUnit.YEAR); }
[ "public", "static", "<", "T", "extends", "Calendar", ">", "T", "addYears", "(", "final", "T", "calendar", ",", "final", "int", "amount", ")", "{", "return", "roll", "(", "calendar", ",", "amount", ",", "CalendarUnit", ".", "YEAR", ")", ";", "}" ]
Adds a number of years to a calendar returning a new object. The original {@code Date} is unchanged. @param calendar the calendar, not null @param amount the amount to add, may be negative @return the new {@code Date} with the amount added @throws IllegalArgumentException if the calendar is null
[ "Adds", "a", "number", "of", "years", "to", "a", "calendar", "returning", "a", "new", "object", ".", "The", "original", "{", "@code", "Date", "}", "is", "unchanged", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L1063-L1065
facebookarchive/hadoop-20
src/core/org/apache/hadoop/filecache/DistributedCache.java
DistributedCache.releaseCache
public static void releaseCache(URI cache, Configuration conf, long timeStamp) throws IOException { """ This is the opposite of getlocalcache. When you are done with using the cache, you need to release the cache @param cache The cache URI to be released @param conf configuration which contains the filesyst...
java
public static void releaseCache(URI cache, Configuration conf, long timeStamp) throws IOException { String cacheId = getKey(cache, conf, timeStamp); synchronized (cachedArchives) { CacheStatus lcacheStatus = cachedArchives.get(cacheId); if (lcacheStatus == null) { LOG.warn("Cannot find ...
[ "public", "static", "void", "releaseCache", "(", "URI", "cache", ",", "Configuration", "conf", ",", "long", "timeStamp", ")", "throws", "IOException", "{", "String", "cacheId", "=", "getKey", "(", "cache", ",", "conf", ",", "timeStamp", ")", ";", "synchroniz...
This is the opposite of getlocalcache. When you are done with using the cache, you need to release the cache @param cache The cache URI to be released @param conf configuration which contains the filesystem the cache is contained in. @throws IOException
[ "This", "is", "the", "opposite", "of", "getlocalcache", ".", "When", "you", "are", "done", "with", "using", "the", "cache", "you", "need", "to", "release", "the", "cache" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/filecache/DistributedCache.java#L377-L390
Stratio/stratio-cassandra
src/java/org/apache/cassandra/serializers/MapSerializer.java
MapSerializer.getSerializedValue
public ByteBuffer getSerializedValue(ByteBuffer serializedMap, ByteBuffer serializedKey, AbstractType keyType) { """ Given a serialized map, gets the value associated with a given key. @param serializedMap a serialized map @param serializedKey a serialized key @param keyType the key type for the map @return th...
java
public ByteBuffer getSerializedValue(ByteBuffer serializedMap, ByteBuffer serializedKey, AbstractType keyType) { try { ByteBuffer input = serializedMap.duplicate(); int n = readCollectionSize(input, Server.VERSION_3); for (int i = 0; i < n; i++) { ...
[ "public", "ByteBuffer", "getSerializedValue", "(", "ByteBuffer", "serializedMap", ",", "ByteBuffer", "serializedKey", ",", "AbstractType", "keyType", ")", "{", "try", "{", "ByteBuffer", "input", "=", "serializedMap", ".", "duplicate", "(", ")", ";", "int", "n", ...
Given a serialized map, gets the value associated with a given key. @param serializedMap a serialized map @param serializedKey a serialized key @param keyType the key type for the map @return the value associated with the key if one exists, null otherwise
[ "Given", "a", "serialized", "map", "gets", "the", "value", "associated", "with", "a", "given", "key", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/serializers/MapSerializer.java#L126-L149
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.setColumn
public Matrix3f setColumn(int column, Vector3fc src) throws IndexOutOfBoundsException { """ Set the column at the given <code>column</code> index, starting with <code>0</code>. @param column the column index in <code>[0..2]</code> @param src the column components to set @return this @throws IndexOutOfBound...
java
public Matrix3f setColumn(int column, Vector3fc src) throws IndexOutOfBoundsException { return setColumn(column, src.x(), src.y(), src.z()); }
[ "public", "Matrix3f", "setColumn", "(", "int", "column", ",", "Vector3fc", "src", ")", "throws", "IndexOutOfBoundsException", "{", "return", "setColumn", "(", "column", ",", "src", ".", "x", "(", ")", ",", "src", ".", "y", "(", ")", ",", "src", ".", "z...
Set the column at the given <code>column</code> index, starting with <code>0</code>. @param column the column index in <code>[0..2]</code> @param src the column components to set @return this @throws IndexOutOfBoundsException if <code>column</code> is not in <code>[0..2]</code>
[ "Set", "the", "column", "at", "the", "given", "<code", ">", "column<", "/", "code", ">", "index", "starting", "with", "<code", ">", "0<", "/", "code", ">", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L3325-L3327
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/FullySegmentedWindowTinyLfuPolicy.java
FullySegmentedWindowTinyLfuPolicy.policies
public static Set<Policy> policies(Config config) { """ Returns all variations of this policy based on the configuration parameters. """ FullySegmentedWindowTinyLfuSettings settings = new FullySegmentedWindowTinyLfuSettings(config); return settings.percentMain().stream() .map(percentMain -> new...
java
public static Set<Policy> policies(Config config) { FullySegmentedWindowTinyLfuSettings settings = new FullySegmentedWindowTinyLfuSettings(config); return settings.percentMain().stream() .map(percentMain -> new FullySegmentedWindowTinyLfuPolicy(percentMain, settings)) .collect(toSet()); }
[ "public", "static", "Set", "<", "Policy", ">", "policies", "(", "Config", "config", ")", "{", "FullySegmentedWindowTinyLfuSettings", "settings", "=", "new", "FullySegmentedWindowTinyLfuSettings", "(", "config", ")", ";", "return", "settings", ".", "percentMain", "("...
Returns all variations of this policy based on the configuration parameters.
[ "Returns", "all", "variations", "of", "this", "policy", "based", "on", "the", "configuration", "parameters", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/FullySegmentedWindowTinyLfuPolicy.java#L81-L86
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java
EntityTypesClient.getEntityType
public final EntityType getEntityType(EntityTypeName name, String languageCode) { """ Retrieves the specified entity type. <p>Sample code: <pre><code> try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); String lang...
java
public final EntityType getEntityType(EntityTypeName name, String languageCode) { GetEntityTypeRequest request = GetEntityTypeRequest.newBuilder() .setName(name == null ? null : name.toString()) .setLanguageCode(languageCode) .build(); return getEntityType(request); ...
[ "public", "final", "EntityType", "getEntityType", "(", "EntityTypeName", "name", ",", "String", "languageCode", ")", "{", "GetEntityTypeRequest", "request", "=", "GetEntityTypeRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==", "null", "?", ...
Retrieves the specified entity type. <p>Sample code: <pre><code> try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); String languageCode = ""; EntityType response = entityTypesClient.getEntityType(name, languageCode); } </code...
[ "Retrieves", "the", "specified", "entity", "type", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java#L464-L472
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.noneSatisfyCodePoint
public static boolean noneSatisfyCodePoint(String string, CodePointPredicate predicate) { """ @return true if none of the code points in the {@code string} answer true for the specified {@code predicate}. @since 7.0 """ int size = string.length(); for (int i = 0; i < size; ) { ...
java
public static boolean noneSatisfyCodePoint(String string, CodePointPredicate predicate) { int size = string.length(); for (int i = 0; i < size; ) { int codePoint = string.codePointAt(i); if (predicate.accept(codePoint)) { return false; ...
[ "public", "static", "boolean", "noneSatisfyCodePoint", "(", "String", "string", ",", "CodePointPredicate", "predicate", ")", "{", "int", "size", "=", "string", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", ...
@return true if none of the code points in the {@code string} answer true for the specified {@code predicate}. @since 7.0
[ "@return", "true", "if", "none", "of", "the", "code", "points", "in", "the", "{", "@code", "string", "}", "answer", "true", "for", "the", "specified", "{", "@code", "predicate", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L950-L963
nextreports/nextreports-server
src/ro/nextreports/server/util/FileUtil.java
FileUtil.deleteDir
public static boolean deleteDir(File dir) { """ If a deletion fails, the method stops attempting to delete and returns false. """ if (dir.isDirectory()) { String[] children = dir.list(); for (String file : children) { boolean success = deleteDir(new File(...
java
public static boolean deleteDir(File dir) { if (dir.isDirectory()) { String[] children = dir.list(); for (String file : children) { boolean success = deleteDir(new File(dir, file)); if (!success) { return false; ...
[ "public", "static", "boolean", "deleteDir", "(", "File", "dir", ")", "{", "if", "(", "dir", ".", "isDirectory", "(", ")", ")", "{", "String", "[", "]", "children", "=", "dir", ".", "list", "(", ")", ";", "for", "(", "String", "file", ":", "children...
If a deletion fails, the method stops attempting to delete and returns false.
[ "If", "a", "deletion", "fails", "the", "method", "stops", "attempting", "to", "delete", "and", "returns", "false", "." ]
train
https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/util/FileUtil.java#L326-L339
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.order_orderId_associatedObject_GET
public OvhAssociatedObject order_orderId_associatedObject_GET(Long orderId) throws IOException { """ Return main data about the object the processing of the order generated REST: GET /me/order/{orderId}/associatedObject @param orderId [required] """ String qPath = "/me/order/{orderId}/associatedObject"; ...
java
public OvhAssociatedObject order_orderId_associatedObject_GET(Long orderId) throws IOException { String qPath = "/me/order/{orderId}/associatedObject"; StringBuilder sb = path(qPath, orderId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhAssociatedObject.class); }
[ "public", "OvhAssociatedObject", "order_orderId_associatedObject_GET", "(", "Long", "orderId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/order/{orderId}/associatedObject\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "orderId", "...
Return main data about the object the processing of the order generated REST: GET /me/order/{orderId}/associatedObject @param orderId [required]
[ "Return", "main", "data", "about", "the", "object", "the", "processing", "of", "the", "order", "generated" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1871-L1876
jblas-project/jblas
src/main/java/org/jblas/ComplexDouble.java
ComplexDouble.addi
public ComplexDouble addi(double a, ComplexDouble result) { """ Add a real number to a complex number in-place. @param a real number to add @param result complex number to hold result @return same as result """ if (this == result) { r += a; } else { result.r = r + a; result....
java
public ComplexDouble addi(double a, ComplexDouble result) { if (this == result) { r += a; } else { result.r = r + a; result.i = i; } return result; }
[ "public", "ComplexDouble", "addi", "(", "double", "a", ",", "ComplexDouble", "result", ")", "{", "if", "(", "this", "==", "result", ")", "{", "r", "+=", "a", ";", "}", "else", "{", "result", ".", "r", "=", "r", "+", "a", ";", "result", ".", "i", ...
Add a real number to a complex number in-place. @param a real number to add @param result complex number to hold result @return same as result
[ "Add", "a", "real", "number", "to", "a", "complex", "number", "in", "-", "place", "." ]
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/ComplexDouble.java#L139-L147
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java
Util.forwardExecutionControlAndIO
public static void forwardExecutionControlAndIO(ExecutionControl ec, InputStream inStream, OutputStream outStream, Map<String, Consumer<OutputStream>> outputStreamMap, Map<String, Consumer<InputStream>> inputStreamMap) throws IOException { """ Forward commands from the input to ...
java
public static void forwardExecutionControlAndIO(ExecutionControl ec, InputStream inStream, OutputStream outStream, Map<String, Consumer<OutputStream>> outputStreamMap, Map<String, Consumer<InputStream>> inputStreamMap) throws IOException { for (Entry<String, Consumer<OutputSt...
[ "public", "static", "void", "forwardExecutionControlAndIO", "(", "ExecutionControl", "ec", ",", "InputStream", "inStream", ",", "OutputStream", "outStream", ",", "Map", "<", "String", ",", "Consumer", "<", "OutputStream", ">", ">", "outputStreamMap", ",", "Map", "...
Forward commands from the input to the specified {@link ExecutionControl} instance, then responses back on the output. @param ec the direct instance of {@link ExecutionControl} to process commands @param inStream the stream from which to create the command input @param outStream the stream that will carry any specified...
[ "Forward", "commands", "from", "the", "input", "to", "the", "specified", "{" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java#L92-L138
JodaOrg/joda-time
src/main/java/org/joda/time/Months.java
Months.monthsBetween
public static Months monthsBetween(ReadablePartial start, ReadablePartial end) { """ Creates a <code>Months</code> representing the number of whole months between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalDate</code> objec...
java
public static Months monthsBetween(ReadablePartial start, ReadablePartial end) { if (start instanceof LocalDate && end instanceof LocalDate) { Chronology chrono = DateTimeUtils.getChronology(start.getChronology()); int months = chrono.months().getDifference( ((Local...
[ "public", "static", "Months", "monthsBetween", "(", "ReadablePartial", "start", ",", "ReadablePartial", "end", ")", "{", "if", "(", "start", "instanceof", "LocalDate", "&&", "end", "instanceof", "LocalDate", ")", "{", "Chronology", "chrono", "=", "DateTimeUtils", ...
Creates a <code>Months</code> representing the number of whole months between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalDate</code> objects. <p> This method calculates by adding months to the start date until the result is past the...
[ "Creates", "a", "<code", ">", "Months<", "/", "code", ">", "representing", "the", "number", "of", "whole", "months", "between", "the", "two", "specified", "partial", "datetimes", ".", "<p", ">", "The", "two", "partials", "must", "contain", "the", "same", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Months.java#L162-L171
pwittchen/kirai
src/main/java/com/github/pwittchen/kirai/library/Preconditions.java
Preconditions.checkNotEmpty
public static void checkNotEmpty(CharSequence str, String message) { """ Throws an exception with a message, when CharSequence is null @param str is a CharSequence to examine @param message for IllegalArgumentException """ if (str == null || str.length() == 0) { throw new IllegalArgumentException...
java
public static void checkNotEmpty(CharSequence str, String message) { if (str == null || str.length() == 0) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "checkNotEmpty", "(", "CharSequence", "str", ",", "String", "message", ")", "{", "if", "(", "str", "==", "null", "||", "str", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "mess...
Throws an exception with a message, when CharSequence is null @param str is a CharSequence to examine @param message for IllegalArgumentException
[ "Throws", "an", "exception", "with", "a", "message", "when", "CharSequence", "is", "null" ]
train
https://github.com/pwittchen/kirai/blob/0b8080a1f28c1e068a00e5bd2804dc3d2fb3c334/src/main/java/com/github/pwittchen/kirai/library/Preconditions.java#L25-L29
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/ThrottleableTransport.java
ThrottleableTransport.blockUntilUnthrottled
public boolean blockUntilUnthrottled(long timeout, TimeUnit unit) { """ Blocks until the blockLatch is released or until the timeout is exceeded. @param timeout the maximum time to wait @param unit the time unit for the {@code timeout} argument. @return {@code true} if the blockLatch was released be...
java
public boolean blockUntilUnthrottled(long timeout, TimeUnit unit) { // sanity: if there's no latch, don't try to access it if (blockLatch == null) { return false; } // purposely allow interrupts as a means to let the caller check if it should exit its run loop try { ...
[ "public", "boolean", "blockUntilUnthrottled", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "// sanity: if there's no latch, don't try to access it", "if", "(", "blockLatch", "==", "null", ")", "{", "return", "false", ";", "}", "// purposely allow interrupt...
Blocks until the blockLatch is released or until the timeout is exceeded. @param timeout the maximum time to wait @param unit the time unit for the {@code timeout} argument. @return {@code true} if the blockLatch was released before the {@code timeout} elapsed. and {@code false} if the {@code timeout} was ex...
[ "Blocks", "until", "the", "blockLatch", "is", "released", "or", "until", "the", "timeout", "is", "exceeded", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/ThrottleableTransport.java#L239-L250
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/EventHubConnectionsInner.java
EventHubConnectionsInner.beginUpdate
public EventHubConnectionInner beginUpdate(String resourceGroupName, String clusterName, String databaseName, String eventHubConnectionName, EventHubConnectionUpdate parameters) { """ Updates a Event Hub connection. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param cl...
java
public EventHubConnectionInner beginUpdate(String resourceGroupName, String clusterName, String databaseName, String eventHubConnectionName, EventHubConnectionUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, eventHubConnectionName, parameters).toBlock...
[ "public", "EventHubConnectionInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ",", "String", "eventHubConnectionName", ",", "EventHubConnectionUpdate", "parameters", ")", "{", "return", "beginUpdateWithS...
Updates a Event Hub connection. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @param eventHubConnectionName The name of the event hub connection. @param parameter...
[ "Updates", "a", "Event", "Hub", "connection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/EventHubConnectionsInner.java#L705-L707
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrObservationManager.java
JcrObservationManager.getEventJournal
@Override public EventJournal getEventJournal( int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName ) { """ {@inher...
java
@Override public EventJournal getEventJournal( int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName ) { return s...
[ "@", "Override", "public", "EventJournal", "getEventJournal", "(", "int", "eventTypes", ",", "String", "absPath", ",", "boolean", "isDeep", ",", "String", "[", "]", "uuid", ",", "String", "[", "]", "nodeTypeName", ")", "{", "return", "session", ".", "reposit...
{@inheritDoc} <p> ModeShape supports journaled observation only if journaling is configured as such in the repository configuration. </p> @see javax.jcr.observation.ObservationManager#getEventJournal(int, java.lang.String, boolean, java.lang.String[], java.lang.String[]) @see RepositoryConfiguration#getJournaling()
[ "{", "@inheritDoc", "}", "<p", ">", "ModeShape", "supports", "journaled", "observation", "only", "if", "journaling", "is", "configured", "as", "such", "in", "the", "repository", "configuration", ".", "<", "/", "p", ">" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrObservationManager.java#L243-L250
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java
AbstractRegionPainter.createHorizontalGradient
protected Paint createHorizontalGradient(Shape s, FourColors colors) { """ Creates a simple horizontal gradient using the shape for bounds and the colors for top, two middle, and bottom colors. @param s the shape to use for bounds. @param colors the colors to use for the gradient. @return the gradie...
java
protected Paint createHorizontalGradient(Shape s, FourColors colors) { Rectangle2D bounds = s.getBounds2D(); float x = (float) bounds.getX(); float y = (float) bounds.getY(); float w = (float) bounds.getWidth(); float h = (float) bounds...
[ "protected", "Paint", "createHorizontalGradient", "(", "Shape", "s", ",", "FourColors", "colors", ")", "{", "Rectangle2D", "bounds", "=", "s", ".", "getBounds2D", "(", ")", ";", "float", "x", "=", "(", "float", ")", "bounds", ".", "getX", "(", ")", ";", ...
Creates a simple horizontal gradient using the shape for bounds and the colors for top, two middle, and bottom colors. @param s the shape to use for bounds. @param colors the colors to use for the gradient. @return the gradient.
[ "Creates", "a", "simple", "horizontal", "gradient", "using", "the", "shape", "for", "bounds", "and", "the", "colors", "for", "top", "two", "middle", "and", "bottom", "colors", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java#L431-L440
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java
RDBMEntityGroupStore.findParentGroups
public java.util.Iterator findParentGroups(IEntityGroup group) throws GroupsException { """ Find the groups that this group belongs to. @param group IEntityGroup @return java.util.Iterator """ String memberKey = group.getLocalKey(); String serviceName = group.getServiceName().toString(); ...
java
public java.util.Iterator findParentGroups(IEntityGroup group) throws GroupsException { String memberKey = group.getLocalKey(); String serviceName = group.getServiceName().toString(); Integer type = EntityTypesLocator.getEntityTypes().getEntityIDFromType(group.getLeafType()); return find...
[ "public", "java", ".", "util", ".", "Iterator", "findParentGroups", "(", "IEntityGroup", "group", ")", "throws", "GroupsException", "{", "String", "memberKey", "=", "group", ".", "getLocalKey", "(", ")", ";", "String", "serviceName", "=", "group", ".", "getSer...
Find the groups that this group belongs to. @param group IEntityGroup @return java.util.Iterator
[ "Find", "the", "groups", "that", "this", "group", "belongs", "to", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L310-L315
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java
ConfigValidator.checkLocalUpdatePolicy
private static void checkLocalUpdatePolicy(String mapName, LocalUpdatePolicy localUpdatePolicy) { """ Checks IMap's supported Near Cache local update policy configuration. @param mapName name of the map that Near Cache will be created for @param localUpdatePolicy local update policy """ i...
java
private static void checkLocalUpdatePolicy(String mapName, LocalUpdatePolicy localUpdatePolicy) { if (localUpdatePolicy != INVALIDATE) { throw new IllegalArgumentException(format("Wrong `local-update-policy` option is selected for `%s` map Near Cache." + " Only `%s` option is sup...
[ "private", "static", "void", "checkLocalUpdatePolicy", "(", "String", "mapName", ",", "LocalUpdatePolicy", "localUpdatePolicy", ")", "{", "if", "(", "localUpdatePolicy", "!=", "INVALIDATE", ")", "{", "throw", "new", "IllegalArgumentException", "(", "format", "(", "\...
Checks IMap's supported Near Cache local update policy configuration. @param mapName name of the map that Near Cache will be created for @param localUpdatePolicy local update policy
[ "Checks", "IMap", "s", "supported", "Near", "Cache", "local", "update", "policy", "configuration", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java#L218-L223
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.buildJQLDelete
private static JQL buildJQLDelete(SQLiteModelMethod method, final JQL result, final Map<JQLDynamicStatementType, String> dynamicReplace, String preparedJql) { """ <pre> DELETE person WHERE id = :bean.id AND #{where} </pre> @param method the method @param result the result @param dynamicReplace the dynami...
java
private static JQL buildJQLDelete(SQLiteModelMethod method, final JQL result, final Map<JQLDynamicStatementType, String> dynamicReplace, String preparedJql) { final SQLiteDaoDefinition dao = method.getParent(); if (StringUtils.hasText(preparedJql)) { // in DELETE SQL only where statement can contains bind param...
[ "private", "static", "JQL", "buildJQLDelete", "(", "SQLiteModelMethod", "method", ",", "final", "JQL", "result", ",", "final", "Map", "<", "JQLDynamicStatementType", ",", "String", ">", "dynamicReplace", ",", "String", "preparedJql", ")", "{", "final", "SQLiteDaoD...
<pre> DELETE person WHERE id = :bean.id AND #{where} </pre> @param method the method @param result the result @param dynamicReplace the dynamic replace @param preparedJql the prepared jql @return the jql
[ "<pre", ">", "DELETE", "person", "WHERE", "id", "=", ":", "bean", ".", "id", "AND", "#", "{", "where", "}", "<", "/", "pre", ">" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L222-L273
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java
NumberUtilities.isValidDouble
public static boolean isValidDouble(@Nullable final String doubleStr, double lowerBound, double upperBound) { """ Given an double string, it checks if it's a valid double (base on apaches NumberUtils.createDouble) and if it's between the lowerBound and upperBound (including the lower bound and excluding the upper...
java
public static boolean isValidDouble(@Nullable final String doubleStr, double lowerBound, double upperBound) { return isValidDouble(doubleStr, lowerBound, upperBound, true, false); }
[ "public", "static", "boolean", "isValidDouble", "(", "@", "Nullable", "final", "String", "doubleStr", ",", "double", "lowerBound", ",", "double", "upperBound", ")", "{", "return", "isValidDouble", "(", "doubleStr", ",", "lowerBound", ",", "upperBound", ",", "tru...
Given an double string, it checks if it's a valid double (base on apaches NumberUtils.createDouble) and if it's between the lowerBound and upperBound (including the lower bound and excluding the upper one) @param doubleStr the integer string to check @param lowerBound the lower bound of the interval @param upperBound...
[ "Given", "an", "double", "string", "it", "checks", "if", "it", "s", "a", "valid", "double", "(", "base", "on", "apaches", "NumberUtils", ".", "createDouble", ")", "and", "if", "it", "s", "between", "the", "lowerBound", "and", "upperBound", "(", "including"...
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java#L237-L239
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionNamespacesManager.java
ExtensionNamespacesManager.namespaceIndex
public int namespaceIndex(String namespace, Vector extensions) { """ Get the index for a namespace entry in the extension namespace Vector, -1 if no such entry yet exists. """ for (int i = 0; i < extensions.size(); i++) { if (((ExtensionNamespaceSupport)extensions.get(i)).getNamespace().equals(n...
java
public int namespaceIndex(String namespace, Vector extensions) { for (int i = 0; i < extensions.size(); i++) { if (((ExtensionNamespaceSupport)extensions.get(i)).getNamespace().equals(namespace)) return i; } return -1; }
[ "public", "int", "namespaceIndex", "(", "String", "namespace", ",", "Vector", "extensions", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "extensions", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "(", "(", "ExtensionNam...
Get the index for a namespace entry in the extension namespace Vector, -1 if no such entry yet exists.
[ "Get", "the", "index", "for", "a", "namespace", "entry", "in", "the", "extension", "namespace", "Vector", "-", "1", "if", "no", "such", "entry", "yet", "exists", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionNamespacesManager.java#L103-L111
liyiorg/weixin-popular
src/main/java/weixin/popular/api/MessageAPI.java
MessageAPI.messageTemplateSend
public static TemplateMessageResult messageTemplateSend(String access_token, TemplateMessage templateMessage) { """ 模板消息发送 <p> <a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277">微信模板消息文档</a> @param access_token access_token @param templateMessage templateMessage @return TemplateM...
java
public static TemplateMessageResult messageTemplateSend(String access_token, TemplateMessage templateMessage) { String messageJson = JsonUtil.toJSONString(templateMessage); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/c...
[ "public", "static", "TemplateMessageResult", "messageTemplateSend", "(", "String", "access_token", ",", "TemplateMessage", "templateMessage", ")", "{", "String", "messageJson", "=", "JsonUtil", ".", "toJSONString", "(", "templateMessage", ")", ";", "HttpUriRequest", "ht...
模板消息发送 <p> <a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277">微信模板消息文档</a> @param access_token access_token @param templateMessage templateMessage @return TemplateMessageResult
[ "模板消息发送", "<p", ">", "<a", "href", "=", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?t", "=", "resource", "/", "res_main&id", "=", "mp1433751277", ">", "微信模板消息文档<", "/", "a", ">" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/MessageAPI.java#L274-L283
alkacon/opencms-core
src/org/opencms/util/CmsMacroResolver.java
CmsMacroResolver.addDynamicMacro
public void addDynamicMacro(String name, Factory factory) { """ Adds a macro whose value will be dynamically generated at macro resolution time.<p> The value will be generated for each occurence of the macro in a string.<p> @param name the name of the macro @param factory the macro value generator """ ...
java
public void addDynamicMacro(String name, Factory factory) { if (m_factories == null) { m_factories = new HashMap<String, Factory>(); } m_factories.put(name, factory); }
[ "public", "void", "addDynamicMacro", "(", "String", "name", ",", "Factory", "factory", ")", "{", "if", "(", "m_factories", "==", "null", ")", "{", "m_factories", "=", "new", "HashMap", "<", "String", ",", "Factory", ">", "(", ")", ";", "}", "m_factories"...
Adds a macro whose value will be dynamically generated at macro resolution time.<p> The value will be generated for each occurence of the macro in a string.<p> @param name the name of the macro @param factory the macro value generator
[ "Adds", "a", "macro", "whose", "value", "will", "be", "dynamically", "generated", "at", "macro", "resolution", "time", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsMacroResolver.java#L777-L783
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.addStringListHeader
private static void addStringListHeader(Request<?> request, String header, List<String> values) { """ <p> Adds the specified string list header, joined together separated with commas, to the specified request. This method will not add a string list header if the specified values are <code>null</code> or empty....
java
private static void addStringListHeader(Request<?> request, String header, List<String> values) { if (values != null && !values.isEmpty()) { request.addHeader(header, ServiceUtils.join(values)); } }
[ "private", "static", "void", "addStringListHeader", "(", "Request", "<", "?", ">", "request", ",", "String", "header", ",", "List", "<", "String", ">", "values", ")", "{", "if", "(", "values", "!=", "null", "&&", "!", "values", ".", "isEmpty", "(", ")"...
<p> Adds the specified string list header, joined together separated with commas, to the specified request. This method will not add a string list header if the specified values are <code>null</code> or empty. </p> @param request The request to add the header to. @param header The header name. @param values The list o...
[ "<p", ">", "Adds", "the", "specified", "string", "list", "header", "joined", "together", "separated", "with", "commas", "to", "the", "specified", "request", ".", "This", "method", "will", "not", "add", "a", "string", "list", "header", "if", "the", "specified...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L4512-L4516
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.toValidInterval
public static <E extends Comparable<E>> Interval<E> toValidInterval(E a, E b, int flags) { """ Create an interval with the specified endpoints, reordering them as needed, using the specified flags @param a one of the endpoints @param b the other endpoint @param flags flags characterizing the interval @param <...
java
public static <E extends Comparable<E>> Interval<E> toValidInterval(E a, E b, int flags) { int comp = a.compareTo(b); if (comp <= 0) { return new Interval(a,b,flags); } else { return new Interval(b,a,flags); } }
[ "public", "static", "<", "E", "extends", "Comparable", "<", "E", ">", ">", "Interval", "<", "E", ">", "toValidInterval", "(", "E", "a", ",", "E", "b", ",", "int", "flags", ")", "{", "int", "comp", "=", "a", ".", "compareTo", "(", "b", ")", ";", ...
Create an interval with the specified endpoints, reordering them as needed, using the specified flags @param a one of the endpoints @param b the other endpoint @param flags flags characterizing the interval @param <E> type of the interval endpoints @return Interval with endpoints re-ordered as needed
[ "Create", "an", "interval", "with", "the", "specified", "endpoints", "reordering", "them", "as", "needed", "using", "the", "specified", "flags" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L382-L389
GCRC/nunaliit
nunaliit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/apachePDFBox/imageio/ImageIOUtil.java
ImageIOUtil.writeImage
public static boolean writeImage(BufferedImage image, String formatName, OutputStream output) throws IOException { """ Writes a buffered image to a file using the given image format. See {@link #writeImage(BufferedImage image, String formatName, OutputStream output, int dpi, float quality)} for more ...
java
public static boolean writeImage(BufferedImage image, String formatName, OutputStream output) throws IOException { return writeImage(image, formatName, output, 72); }
[ "public", "static", "boolean", "writeImage", "(", "BufferedImage", "image", ",", "String", "formatName", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "return", "writeImage", "(", "image", ",", "formatName", ",", "output", ",", "72", ")", "...
Writes a buffered image to a file using the given image format. See {@link #writeImage(BufferedImage image, String formatName, OutputStream output, int dpi, float quality)} for more details. @param image the image to be written @param formatName the target format (ex. "png") @param output the output stream to be used ...
[ "Writes", "a", "buffered", "image", "to", "a", "file", "using", "the", "given", "image", "format", ".", "See", "{", "@link", "#writeImage", "(", "BufferedImage", "image", "String", "formatName", "OutputStream", "output", "int", "dpi", "float", "quality", ")", ...
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/apachePDFBox/imageio/ImageIOUtil.java#L141-L145
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java
GraphicsUtilities.createCompatibleTranslucentImage
public static BufferedImage createCompatibleTranslucentImage(int width, int height) { """ <p>Returns a new translucent compatible image of the specified width and height. That is, the returned <code>BufferedImage</code> is compatible with the graph...
java
public static BufferedImage createCompatibleTranslucentImage(int width, int height) { return isHeadless() ? new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB) : getGraphicsConfiguration().createCompatible...
[ "public", "static", "BufferedImage", "createCompatibleTranslucentImage", "(", "int", "width", ",", "int", "height", ")", "{", "return", "isHeadless", "(", ")", "?", "new", "BufferedImage", "(", "width", ",", "height", ",", "BufferedImage", ".", "TYPE_INT_ARGB", ...
<p>Returns a new translucent compatible image of the specified width and height. That is, the returned <code>BufferedImage</code> is compatible with the graphics hardware. If the method is called in a headless environment, then the returned BufferedImage will be compatible with the source image.</p> @see #createCompat...
[ "<p", ">", "Returns", "a", "new", "translucent", "compatible", "image", "of", "the", "specified", "width", "and", "height", ".", "That", "is", "the", "returned", "<code", ">", "BufferedImage<", "/", "code", ">", "is", "compatible", "with", "the", "graphics",...
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java#L241-L247
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.getSupportFragment
private Fragment getSupportFragment(String tag, int id) { """ Returns a SupportFragment with a given tag or id. @param tag the tag of the SupportFragment or null if no tag @param id the id of the SupportFragment @return a SupportFragment with a given tag or id """ FragmentActivity fragmentActivity = nul...
java
private Fragment getSupportFragment(String tag, int id){ FragmentActivity fragmentActivity = null; try{ fragmentActivity = (FragmentActivity) activityUtils.getCurrentActivity(false); }catch (Throwable ignored) {} if(fragmentActivity != null){ try{ if(tag == null) return fragmentActivity.getSupp...
[ "private", "Fragment", "getSupportFragment", "(", "String", "tag", ",", "int", "id", ")", "{", "FragmentActivity", "fragmentActivity", "=", "null", ";", "try", "{", "fragmentActivity", "=", "(", "FragmentActivity", ")", "activityUtils", ".", "getCurrentActivity", ...
Returns a SupportFragment with a given tag or id. @param tag the tag of the SupportFragment or null if no tag @param id the id of the SupportFragment @return a SupportFragment with a given tag or id
[ "Returns", "a", "SupportFragment", "with", "a", "given", "tag", "or", "id", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L703-L719
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/Document.java
Document.createAnnotation
public Annotation createAnnotation(@NonNull AnnotationType type, int start, int end, @NonNull Map<AttributeType, ?> attributeMap) { """ Creates an annotation of the given type encompassing the given span and having the given attributes. The annotation is added to the document and has a unique id assigned. @pa...
java
public Annotation createAnnotation(@NonNull AnnotationType type, int start, int end, @NonNull Map<AttributeType, ?> attributeMap) { Preconditions.checkArgument(start >= start(), "Annotation must have a starting position >= the start of the document"); Preconditions.checkArg...
[ "public", "Annotation", "createAnnotation", "(", "@", "NonNull", "AnnotationType", "type", ",", "int", "start", ",", "int", "end", ",", "@", "NonNull", "Map", "<", "AttributeType", ",", "?", ">", "attributeMap", ")", "{", "Preconditions", ".", "checkArgument",...
Creates an annotation of the given type encompassing the given span and having the given attributes. The annotation is added to the document and has a unique id assigned. @param type the type of annotation @param start the start of the span @param end the end of the span @param attributeMap the...
[ "Creates", "an", "annotation", "of", "the", "given", "type", "encompassing", "the", "given", "span", "and", "having", "the", "given", "attributes", ".", "The", "annotation", "is", "added", "to", "the", "document", "and", "has", "a", "unique", "id", "assigned...
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/Document.java#L366-L375
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationtacacspolicy_binding.java
authenticationtacacspolicy_binding.get
public static authenticationtacacspolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch authenticationtacacspolicy_binding resource of given name . """ authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding(); obj.set_name(name); auth...
java
public static authenticationtacacspolicy_binding get(nitro_service service, String name) throws Exception{ authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding(); obj.set_name(name); authenticationtacacspolicy_binding response = (authenticationtacacspolicy_binding) obj.get_resource(serv...
[ "public", "static", "authenticationtacacspolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationtacacspolicy_binding", "obj", "=", "new", "authenticationtacacspolicy_binding", "(", ")", ";", "obj", ...
Use this API to fetch authenticationtacacspolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationtacacspolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationtacacspolicy_binding.java#L136-L141
Commonjava/webdav-handler
common/src/main/java/net/sf/webdav/util/RequestUtil.java
RequestUtil.putMapEntry
private static void putMapEntry( final Map<String, String[]> map, final String name, final String value ) { """ Put name and value pair in map. When name already exist, add value to array of values. @param map The map to populate @param name The parameter name @param value The parameter value """ ...
java
private static void putMapEntry( final Map<String, String[]> map, final String name, final String value ) { String[] newValues = null; final String[] oldValues = map.get( name ); if ( oldValues == null ) { newValues = new String[1]; newValues[0] = value; ...
[ "private", "static", "void", "putMapEntry", "(", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "map", ",", "final", "String", "name", ",", "final", "String", "value", ")", "{", "String", "[", "]", "newValues", "=", "null", ";", "final", ...
Put name and value pair in map. When name already exist, add value to array of values. @param map The map to populate @param name The parameter name @param value The parameter value
[ "Put", "name", "and", "value", "pair", "in", "map", ".", "When", "name", "already", "exist", "add", "value", "to", "array", "of", "values", "." ]
train
https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/RequestUtil.java#L672-L688
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterables.java
CloseableIterables.fromStream
public static <T> CloseableIterable<T> fromStream(Stream<T> stream) { """ Creates a {@link CloseableIterable} from a standard {@link Stream}. """ return wrap(stream::iterator, stream); }
java
public static <T> CloseableIterable<T> fromStream(Stream<T> stream) { return wrap(stream::iterator, stream); }
[ "public", "static", "<", "T", ">", "CloseableIterable", "<", "T", ">", "fromStream", "(", "Stream", "<", "T", ">", "stream", ")", "{", "return", "wrap", "(", "stream", "::", "iterator", ",", "stream", ")", ";", "}" ]
Creates a {@link CloseableIterable} from a standard {@link Stream}.
[ "Creates", "a", "{" ]
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterables.java#L53-L55
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
ProtectedBranchesApi.protectBranch
public ProtectedBranch protectBranch(Integer projectIdOrPath, String branchName, AccessLevel pushAccessLevel, AccessLevel mergeAccessLevel) throws GitLabApiException { """ Protects a single repository branch or several project repository branches using a wildcard protected branch. <pre><code>GitLab Endpoint: PO...
java
public ProtectedBranch protectBranch(Integer projectIdOrPath, String branchName, AccessLevel pushAccessLevel, AccessLevel mergeAccessLevel) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("name", branchName, true) .withParam("push_access_level", pushAcc...
[ "public", "ProtectedBranch", "protectBranch", "(", "Integer", "projectIdOrPath", ",", "String", "branchName", ",", "AccessLevel", "pushAccessLevel", ",", "AccessLevel", "mergeAccessLevel", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLab...
Protects a single repository branch or several project repository branches using a wildcard protected branch. <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param branchName the name of...
[ "Protects", "a", "single", "repository", "branch", "or", "several", "project", "repository", "branches", "using", "a", "wildcard", "protected", "branch", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java#L98-L106
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java
RAExpressionAttributes.joinUsing
public static RAExpressionAttributes joinUsing(RAExpressionAttributes re1, RAExpressionAttributes re2, ImmutableSet<QuotedID> using) throws IllegalJoinException { """ JOIN USING @param re1 a {@link RAExpression...
java
public static RAExpressionAttributes joinUsing(RAExpressionAttributes re1, RAExpressionAttributes re2, ImmutableSet<QuotedID> using) throws IllegalJoinException { checkRelationAliasesConsistency(re1, re2); ...
[ "public", "static", "RAExpressionAttributes", "joinUsing", "(", "RAExpressionAttributes", "re1", ",", "RAExpressionAttributes", "re2", ",", "ImmutableSet", "<", "QuotedID", ">", "using", ")", "throws", "IllegalJoinException", "{", "checkRelationAliasesConsistency", "(", "...
JOIN USING @param re1 a {@link RAExpressionAttributes} @param re2 a {@link RAExpressionAttributes} @param using a {@link ImmutableSet}<{@link QuotedID}> @return a {@link RAExpressionAttributes} @throws IllegalJoinException if the same alias occurs in both arguments or one of the `using' attributes is ambiguous or abse...
[ "JOIN", "USING" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java#L114-L153
graphhopper/graphhopper
core/src/main/java/com/graphhopper/storage/EdgeAccess.java
EdgeAccess.internalEdgeAdd
final int internalEdgeAdd(int newEdgeId, int nodeA, int nodeB) { """ Writes a new edge to the array of edges and adds it to the linked list of edges at nodeA and nodeB """ writeEdge(newEdgeId, nodeA, nodeB, EdgeIterator.NO_EDGE, EdgeIterator.NO_EDGE); long edgePointer = toPointer(newEdgeId); ...
java
final int internalEdgeAdd(int newEdgeId, int nodeA, int nodeB) { writeEdge(newEdgeId, nodeA, nodeB, EdgeIterator.NO_EDGE, EdgeIterator.NO_EDGE); long edgePointer = toPointer(newEdgeId); int edge = getEdgeRef(nodeA); if (edge > EdgeIterator.NO_EDGE) edges.setInt(E_LINKA + edg...
[ "final", "int", "internalEdgeAdd", "(", "int", "newEdgeId", ",", "int", "nodeA", ",", "int", "nodeB", ")", "{", "writeEdge", "(", "newEdgeId", ",", "nodeA", ",", "nodeB", ",", "EdgeIterator", ".", "NO_EDGE", ",", "EdgeIterator", ".", "NO_EDGE", ")", ";", ...
Writes a new edge to the array of edges and adds it to the linked list of edges at nodeA and nodeB
[ "Writes", "a", "new", "edge", "to", "the", "array", "of", "edges", "and", "adds", "it", "to", "the", "linked", "list", "of", "edges", "at", "nodeA", "and", "nodeB" ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/storage/EdgeAccess.java#L112-L128
git-commit-id/maven-git-commit-id-plugin
src/main/java/pl/project13/maven/git/NativeGitProvider.java
NativeGitProvider.tryCheckEmptyRunGitCommand
private boolean tryCheckEmptyRunGitCommand(File directory, long nativeGitTimeoutInMs, String gitCommand) { """ Runs a maven command and returns {@code true} if output was non empty. Can be used to short cut reading output from command when we know it may be a rather long one. Return true if the result is empty. ...
java
private boolean tryCheckEmptyRunGitCommand(File directory, long nativeGitTimeoutInMs, String gitCommand) { try { String env = System.getenv("GIT_PATH"); String exec = env == null ? "git" : env; String command = String.format("%s %s", exec, gitCommand); return getRunner().runEmpty(directory,...
[ "private", "boolean", "tryCheckEmptyRunGitCommand", "(", "File", "directory", ",", "long", "nativeGitTimeoutInMs", ",", "String", "gitCommand", ")", "{", "try", "{", "String", "env", "=", "System", ".", "getenv", "(", "\"GIT_PATH\"", ")", ";", "String", "exec", ...
Runs a maven command and returns {@code true} if output was non empty. Can be used to short cut reading output from command when we know it may be a rather long one. Return true if the result is empty.
[ "Runs", "a", "maven", "command", "and", "returns", "{" ]
train
https://github.com/git-commit-id/maven-git-commit-id-plugin/blob/a276551fb043d1b7fc4c890603f6ea0c79dc729a/src/main/java/pl/project13/maven/git/NativeGitProvider.java#L301-L313
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionListener.java
RaftSessionListener.removeEventListener
public void removeEventListener(EventType eventType, Consumer<PrimitiveEvent> listener) { """ Removes an event listener from the session. @param listener the event listener callback """ executor.execute(() -> eventListeners.computeIfAbsent(eventType.canonicalize(), e -> Sets.newLinkedHashSet()).remove(l...
java
public void removeEventListener(EventType eventType, Consumer<PrimitiveEvent> listener) { executor.execute(() -> eventListeners.computeIfAbsent(eventType.canonicalize(), e -> Sets.newLinkedHashSet()).remove(listener)); }
[ "public", "void", "removeEventListener", "(", "EventType", "eventType", ",", "Consumer", "<", "PrimitiveEvent", ">", "listener", ")", "{", "executor", ".", "execute", "(", "(", ")", "->", "eventListeners", ".", "computeIfAbsent", "(", "eventType", ".", "canonica...
Removes an event listener from the session. @param listener the event listener callback
[ "Removes", "an", "event", "listener", "from", "the", "session", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionListener.java#L78-L80
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/interceptors/InterceptorProxy.java
InterceptorProxy.invokeInterceptor
public final Object invokeInterceptor(Object bean, InvocationContext inv, Object[] interceptors) throws Exception { """ Invoke the interceptor method associated with the interceptor index that was passed as the "interceptorIndex" parameter of the constructor method of this class. @param bean is the EJB instan...
java
public final Object invokeInterceptor(Object bean, InvocationContext inv, Object[] interceptors) throws Exception { // Interceptor instance is the bean instance itself if the // interceptor index is < 0. Object interceptorInstance = (ivBeanInterceptor) ? bean : interceptors[ivInterceptorIndex]; ...
[ "public", "final", "Object", "invokeInterceptor", "(", "Object", "bean", ",", "InvocationContext", "inv", ",", "Object", "[", "]", "interceptors", ")", "throws", "Exception", "{", "// Interceptor instance is the bean instance itself if the", "// interceptor index is < 0.", ...
Invoke the interceptor method associated with the interceptor index that was passed as the "interceptorIndex" parameter of the constructor method of this class. @param bean is the EJB instance that is the target of this invocation. @param inv is the InvocationContext to pass as an argument to the interceptor method i...
[ "Invoke", "the", "interceptor", "method", "associated", "with", "the", "interceptor", "index", "that", "was", "passed", "as", "the", "interceptorIndex", "parameter", "of", "the", "constructor", "method", "of", "this", "class", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/interceptors/InterceptorProxy.java#L173-L202
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.xmlClassExistent
public static void xmlClassExistent(String path, Class<?> aClass) { """ Thrown if class is present in xml file. @param path xml path @param aClass Class analyzed """ throw new XmlMappingClassExistException (MSG.INSTANCE.message(xmlMappingClassExistException1,aClass.getSimpleName(),path)); }
java
public static void xmlClassExistent(String path, Class<?> aClass){ throw new XmlMappingClassExistException (MSG.INSTANCE.message(xmlMappingClassExistException1,aClass.getSimpleName(),path)); }
[ "public", "static", "void", "xmlClassExistent", "(", "String", "path", ",", "Class", "<", "?", ">", "aClass", ")", "{", "throw", "new", "XmlMappingClassExistException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "xmlMappingClassExistException1", ",", "aCl...
Thrown if class is present in xml file. @param path xml path @param aClass Class analyzed
[ "Thrown", "if", "class", "is", "present", "in", "xml", "file", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L319-L321
CycloneDX/cyclonedx-core-java
src/main/java/org/cyclonedx/util/BomUtils.java
BomUtils.calculateHashes
public static List<Hash> calculateHashes(File file) throws IOException { """ Calculates the hashes of the specified file. @param file the File to calculate hashes on @return a List of Hash objets @throws IOException an IOException @since 1.0.0 """ if (file == null || !file.exists() || !file.canRead...
java
public static List<Hash> calculateHashes(File file) throws IOException { if (file == null || !file.exists() || !file.canRead()) { return null; } final List<Hash> hashes = new ArrayList<>(); try (InputStream fis = Files.newInputStream(file.toPath())) { hashes.add(n...
[ "public", "static", "List", "<", "Hash", ">", "calculateHashes", "(", "File", "file", ")", "throws", "IOException", "{", "if", "(", "file", "==", "null", "||", "!", "file", ".", "exists", "(", ")", "||", "!", "file", ".", "canRead", "(", ")", ")", ...
Calculates the hashes of the specified file. @param file the File to calculate hashes on @return a List of Hash objets @throws IOException an IOException @since 1.0.0
[ "Calculates", "the", "hashes", "of", "the", "specified", "file", "." ]
train
https://github.com/CycloneDX/cyclonedx-core-java/blob/45f8f55a7f308f41280b834f179b48ea852b8c20/src/main/java/org/cyclonedx/util/BomUtils.java#L41-L62
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/system/SystemProperties.java
SystemProperties.setPropertyValue
@Nonnull public static EChange setPropertyValue (@Nonnull final String sKey, final boolean bValue) { """ Set a system property value under consideration of an eventually present {@link SecurityManager}. @param sKey The key of the system property. May not be <code>null</code>. @param bValue The value of th...
java
@Nonnull public static EChange setPropertyValue (@Nonnull final String sKey, final boolean bValue) { return setPropertyValue (sKey, Boolean.toString (bValue)); }
[ "@", "Nonnull", "public", "static", "EChange", "setPropertyValue", "(", "@", "Nonnull", "final", "String", "sKey", ",", "final", "boolean", "bValue", ")", "{", "return", "setPropertyValue", "(", "sKey", ",", "Boolean", ".", "toString", "(", "bValue", ")", ")...
Set a system property value under consideration of an eventually present {@link SecurityManager}. @param sKey The key of the system property. May not be <code>null</code>. @param bValue The value of the system property. @return {@link EChange}
[ "Set", "a", "system", "property", "value", "under", "consideration", "of", "an", "eventually", "present", "{", "@link", "SecurityManager", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/system/SystemProperties.java#L145-L149
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldSet.java
WFieldSet.setMandatory
public void setMandatory(final boolean mandatory, final String message) { """ Set whether or not this field set is mandatory, and customise the error message that will be displayed. @param mandatory true for mandatory, false for optional. @param message the message to display to the user on mandatory validatio...
java
public void setMandatory(final boolean mandatory, final String message) { setFlag(ComponentModel.MANDATORY_FLAG, mandatory); getOrCreateComponentModel().errorMessage = message; }
[ "public", "void", "setMandatory", "(", "final", "boolean", "mandatory", ",", "final", "String", "message", ")", "{", "setFlag", "(", "ComponentModel", ".", "MANDATORY_FLAG", ",", "mandatory", ")", ";", "getOrCreateComponentModel", "(", ")", ".", "errorMessage", ...
Set whether or not this field set is mandatory, and customise the error message that will be displayed. @param mandatory true for mandatory, false for optional. @param message the message to display to the user on mandatory validation failure.
[ "Set", "whether", "or", "not", "this", "field", "set", "is", "mandatory", "and", "customise", "the", "error", "message", "that", "will", "be", "displayed", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldSet.java#L110-L113
weld/core
environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java
Weld.addPackages
public Weld addPackages(boolean scanRecursively, Class<?>... packageClasses) { """ Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive. @param scanRecursively @param packageClasses @return self """ for (Class<?...
java
public Weld addPackages(boolean scanRecursively, Class<?>... packageClasses) { for (Class<?> packageClass : packageClasses) { addPackage(scanRecursively, packageClass); } return this; }
[ "public", "Weld", "addPackages", "(", "boolean", "scanRecursively", ",", "Class", "<", "?", ">", "...", "packageClasses", ")", "{", "for", "(", "Class", "<", "?", ">", "packageClass", ":", "packageClasses", ")", "{", "addPackage", "(", "scanRecursively", ","...
Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive. @param scanRecursively @param packageClasses @return self
[ "Packages", "of", "the", "specified", "classes", "will", "be", "scanned", "and", "found", "classes", "will", "be", "added", "to", "the", "set", "of", "bean", "classes", "for", "the", "synthetic", "bean", "archive", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java#L368-L373
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/primitives/NetISO8601Utils.java
NetISO8601Utils.checkOffset
private static void checkOffset(String value, int offset, char expected) throws IndexOutOfBoundsException { """ Check if the expected character exist at the given offset of the @param value the string to check at the specified offset @param offset the offset to look for the expected character @param expe...
java
private static void checkOffset(String value, int offset, char expected) throws IndexOutOfBoundsException { char found = value.charAt(offset); if (found != expected) { throw new IndexOutOfBoundsException("Expected '" + expected + "' character but found '" + found + "'"); } }
[ "private", "static", "void", "checkOffset", "(", "String", "value", ",", "int", "offset", ",", "char", "expected", ")", "throws", "IndexOutOfBoundsException", "{", "char", "found", "=", "value", ".", "charAt", "(", "offset", ")", ";", "if", "(", "found", "...
Check if the expected character exist at the given offset of the @param value the string to check at the specified offset @param offset the offset to look for the expected character @param expected the expected character @throws IndexOutOfBoundsException if the expected character is not found
[ "Check", "if", "the", "expected", "character", "exist", "at", "the", "given", "offset", "of", "the" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/primitives/NetISO8601Utils.java#L190-L195
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.truncatedEquals
public static boolean truncatedEquals(final java.util.Date date1, final java.util.Date date2, final int field) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Determines if two dates are equal up to no more than the specified most significant field. @param date1 the first date, not <c...
java
public static boolean truncatedEquals(final java.util.Date date1, final java.util.Date date2, final int field) { return truncatedCompareTo(date1, date2, field) == 0; }
[ "public", "static", "boolean", "truncatedEquals", "(", "final", "java", ".", "util", ".", "Date", "date1", ",", "final", "java", ".", "util", ".", "Date", "date2", ",", "final", "int", "field", ")", "{", "return", "truncatedCompareTo", "(", "date1", ",", ...
Copied from Apache Commons Lang under Apache License v2. <br /> Determines if two dates are equal up to no more than the specified most significant field. @param date1 the first date, not <code>null</code> @param date2 the second date, not <code>null</code> @param field the field from {@code Calendar} @return <code>t...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L1560-L1562
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java
UriBuilderImpl.assertNotNullOrEmpty
private void assertNotNullOrEmpty(String value, String message, boolean isState) throws IllegalArgumentException { """ Assert that the value is not null or empty. @param value the value @param message the message to include with any exceptions @param isState if true, throw a state exception instead @thro...
java
private void assertNotNullOrEmpty(String value, String message, boolean isState) throws IllegalArgumentException { if (value == null || value.length() == 0) { if (isState) { throw new IllegalStateException(message); } else { throw new IllegalArgumentExcept...
[ "private", "void", "assertNotNullOrEmpty", "(", "String", "value", ",", "String", "message", ",", "boolean", "isState", ")", "throws", "IllegalArgumentException", "{", "if", "(", "value", "==", "null", "||", "value", ".", "length", "(", ")", "==", "0", ")", ...
Assert that the value is not null or empty. @param value the value @param message the message to include with any exceptions @param isState if true, throw a state exception instead @throws IllegalArgumentException if value is null @throws IllegalStateException if value is null and isState is true
[ "Assert", "that", "the", "value", "is", "not", "null", "or", "empty", "." ]
train
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java#L333-L341
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_hunting_customStatus_id_GET
public OvhOvhPabxCustomStatus billingAccount_ovhPabx_serviceName_hunting_customStatus_id_GET(String billingAccount, String serviceName, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id} @param billingAccount [requi...
java
public OvhOvhPabxCustomStatus billingAccount_ovhPabx_serviceName_hunting_customStatus_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceNa...
[ "public", "OvhOvhPabxCustomStatus", "billingAccount_ovhPabx_serviceName_hunting_customStatus_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/ovhP...
Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L6561-L6566
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendSpeak
public static void sendSpeak (DObject speakObj, Name speaker, String bundle, String message) { """ Sends a speak notification to the specified place object originating with the specified speaker (the speaker optionally being a server entity that wishes to fake a "speak" message) and with the supplied message con...
java
public static void sendSpeak (DObject speakObj, Name speaker, String bundle, String message) { sendSpeak(speakObj, speaker, bundle, message, ChatCodes.DEFAULT_MODE); }
[ "public", "static", "void", "sendSpeak", "(", "DObject", "speakObj", ",", "Name", "speaker", ",", "String", "bundle", ",", "String", "message", ")", "{", "sendSpeak", "(", "speakObj", ",", "speaker", ",", "bundle", ",", "message", ",", "ChatCodes", ".", "D...
Sends a speak notification to the specified place object originating with the specified speaker (the speaker optionally being a server entity that wishes to fake a "speak" message) and with the supplied message content. @param speakObj the object on which to generate the speak message. @param speaker the username of t...
[ "Sends", "a", "speak", "notification", "to", "the", "specified", "place", "object", "originating", "with", "the", "specified", "speaker", "(", "the", "speaker", "optionally", "being", "a", "server", "entity", "that", "wishes", "to", "fake", "a", "speak", "mess...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L87-L90
nmdp-bioinformatics/ngs
hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java
HmlUtils.createSequences
public static Iterable<Sequence> createSequences(final BufferedReader reader) throws IOException { """ Create and return zero or more DNA HML Sequences read from the specified reader in FASTA format. @param reader reader to read from, must not be null @return zero or more DNA HML Sequences read from the specif...
java
public static Iterable<Sequence> createSequences(final BufferedReader reader) throws IOException { checkNotNull(reader); List<Sequence> sequences = new ArrayList<Sequence>(); for (SequenceIterator it = SeqIOTools.readFastaDNA(reader); it.hasNext(); ) { try { sequences...
[ "public", "static", "Iterable", "<", "Sequence", ">", "createSequences", "(", "final", "BufferedReader", "reader", ")", "throws", "IOException", "{", "checkNotNull", "(", "reader", ")", ";", "List", "<", "Sequence", ">", "sequences", "=", "new", "ArrayList", "...
Create and return zero or more DNA HML Sequences read from the specified reader in FASTA format. @param reader reader to read from, must not be null @return zero or more DNA HML Sequences read from the specified reader in FASTA format @throws IOException if an I/O error occurs
[ "Create", "and", "return", "zero", "or", "more", "DNA", "HML", "Sequences", "read", "from", "the", "specified", "reader", "in", "FASTA", "format", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L94-L106
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setCreate
public void setCreate(long now, SimpleOrderedMap<Object> status) throws IOException { """ Sets the create. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred. """ if (action.equals(ComponentCollection.ACTION_CREATE)) { this.now = now;...
java
public void setCreate(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_CREATE)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setCreate", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_CREATE", ")", ")", "{", "this", ".", "...
Sets the create. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "create", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L181-L189
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.createBranch
public void createBranch(Serializable projectId, String branchName, String ref) throws IOException { """ Create Branch. <a href="http://doc.gitlab.com/ce/api/branches.html#create-repository-branch"> Create Repository Branch Documentation </a> @param projectId The id of the project @param branchName The nam...
java
public void createBranch(Serializable projectId, String branchName, String ref) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBranch.URL; dispatch().with("branch", branchName).with("ref", ref).to(tailUrl, Void.class); }
[ "public", "void", "createBranch", "(", "Serializable", "projectId", ",", "String", "branchName", ",", "String", "ref", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "sanitizeProjectId", "(", "project...
Create Branch. <a href="http://doc.gitlab.com/ce/api/branches.html#create-repository-branch"> Create Repository Branch Documentation </a> @param projectId The id of the project @param branchName The name of the branch to create @param ref The branch name or commit SHA to create branch from @throws IOException ...
[ "Create", "Branch", ".", "<a", "href", "=", "http", ":", "//", "doc", ".", "gitlab", ".", "com", "/", "ce", "/", "api", "/", "branches", ".", "html#create", "-", "repository", "-", "branch", ">", "Create", "Repository", "Branch", "Documentation", "<", ...
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2333-L2336
h2oai/h2o-2
src/main/java/water/exec/Env.java
Env.frId
public Frame frId(int d, int n) { """ Load the nth Id/variable from the named lexical scope, typed as a Frame """ int idx = _display[_tod-d]+n; assert _ary[idx]!=null; return _ary[idx]; }
java
public Frame frId(int d, int n) { int idx = _display[_tod-d]+n; assert _ary[idx]!=null; return _ary[idx]; }
[ "public", "Frame", "frId", "(", "int", "d", ",", "int", "n", ")", "{", "int", "idx", "=", "_display", "[", "_tod", "-", "d", "]", "+", "n", ";", "assert", "_ary", "[", "idx", "]", "!=", "null", ";", "return", "_ary", "[", "idx", "]", ";", "}"...
Load the nth Id/variable from the named lexical scope, typed as a Frame
[ "Load", "the", "nth", "Id", "/", "variable", "from", "the", "named", "lexical", "scope", "typed", "as", "a", "Frame" ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/exec/Env.java#L76-L80
landawn/AbacusUtil
src/com/landawn/abacus/util/FileSystemUtil.java
FileSystemUtil.parseBytes
long parseBytes(final String freeSpace, final String path) throws IOException { """ Parses the bytes from a string. @param freeSpace the free space string @param path the path @return the number of bytes @throws IOException if an error occurs """ try { final long bytes = Long.pars...
java
long parseBytes(final String freeSpace, final String path) throws IOException { try { final long bytes = Long.parseLong(freeSpace); if (bytes < 0) { throw new IOException("Command line '" + DF + "' did not find free space in response " + "for path '" + path + "'- chec...
[ "long", "parseBytes", "(", "final", "String", "freeSpace", ",", "final", "String", "path", ")", "throws", "IOException", "{", "try", "{", "final", "long", "bytes", "=", "Long", ".", "parseLong", "(", "freeSpace", ")", ";", "if", "(", "bytes", "<", "0", ...
Parses the bytes from a string. @param freeSpace the free space string @param path the path @return the number of bytes @throws IOException if an error occurs
[ "Parses", "the", "bytes", "from", "a", "string", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FileSystemUtil.java#L387-L398
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.fillInternalShadow
private void fillInternalShadow(Graphics2D g, Shape s, boolean paintRightShadow) { """ Fill a rectangular shadow. @param g the Graphics context to paint with. @param s the shape to fill. This is only used for its bounds. @param paintRightShadow {@code true} if the shape is recta...
java
private void fillInternalShadow(Graphics2D g, Shape s, boolean paintRightShadow) { Rectangle bounds = s.getBounds(); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; s = shapeGenerator.createRect...
[ "private", "void", "fillInternalShadow", "(", "Graphics2D", "g", ",", "Shape", "s", ",", "boolean", "paintRightShadow", ")", "{", "Rectangle", "bounds", "=", "s", ".", "getBounds", "(", ")", ";", "int", "x", "=", "bounds", ".", "x", ";", "int", "y", "=...
Fill a rectangular shadow. @param g the Graphics context to paint with. @param s the shape to fill. This is only used for its bounds. @param paintRightShadow {@code true} if the shape is rectangular and the rightmost shadow should be painted, {@code false} otherwise.
[ "Fill", "a", "rectangular", "shadow", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L82-L102
scireum/server-sass
src/main/java/org/serversass/Functions.java
Functions.fade_out
@SuppressWarnings("squid:S00100") public static Expression fade_out(Generator generator, FunctionCall input) { """ Decreases the opacity of the given color by the given amount. @param generator the surrounding generator @param input the function call to evaluate @return the result of the evaluation ...
java
@SuppressWarnings("squid:S00100") public static Expression fade_out(Generator generator, FunctionCall input) { return opacify(generator, input); }
[ "@", "SuppressWarnings", "(", "\"squid:S00100\"", ")", "public", "static", "Expression", "fade_out", "(", "Generator", "generator", ",", "FunctionCall", "input", ")", "{", "return", "opacify", "(", "generator", ",", "input", ")", ";", "}" ]
Decreases the opacity of the given color by the given amount. @param generator the surrounding generator @param input the function call to evaluate @return the result of the evaluation
[ "Decreases", "the", "opacity", "of", "the", "given", "color", "by", "the", "given", "amount", "." ]
train
https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/Functions.java#L207-L210
liuyukuai/commons
commons-core/src/main/java/com/itxiaoer/commons/core/beans/ProcessUtils.java
ProcessUtils.processObject
public static <T, R> void processObject(R r, T src, BiConsumer<R, T> biConsumer) { """ 拷贝单个对象 @param r 目标对象 @param src 原对象 @param biConsumer 回调函数 @param <T> 原数据类型 @param <R> 目标数据类型 """ try { String beanKey = generateKey(src.getClass(), r.getClass()); ...
java
public static <T, R> void processObject(R r, T src, BiConsumer<R, T> biConsumer) { try { String beanKey = generateKey(src.getClass(), r.getClass()); BeanCopier copier = BEAN_COPIER_MAP.getIfPresent(beanKey); if (copier == null) { copier = BeanCopier.create(src...
[ "public", "static", "<", "T", ",", "R", ">", "void", "processObject", "(", "R", "r", ",", "T", "src", ",", "BiConsumer", "<", "R", ",", "T", ">", "biConsumer", ")", "{", "try", "{", "String", "beanKey", "=", "generateKey", "(", "src", ".", "getClas...
拷贝单个对象 @param r 目标对象 @param src 原对象 @param biConsumer 回调函数 @param <T> 原数据类型 @param <R> 目标数据类型
[ "拷贝单个对象" ]
train
https://github.com/liuyukuai/commons/blob/ba67eddb542446b12f419f1866dbaa82e47fbf35/commons-core/src/main/java/com/itxiaoer/commons/core/beans/ProcessUtils.java#L130-L145
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.filterLine
public static Writable filterLine(InputStream self, String charset, @ClosureParams(value=SimpleType.class, options="java.lang.String") Closure predicate) throws UnsupportedEncodingException { """ Filter lines from an input stream using a closure predicate. The closure will be passed each line as a St...
java
public static Writable filterLine(InputStream self, String charset, @ClosureParams(value=SimpleType.class, options="java.lang.String") Closure predicate) throws UnsupportedEncodingException { return filterLine(newReader(self, charset), predicate); }
[ "public", "static", "Writable", "filterLine", "(", "InputStream", "self", ",", "String", "charset", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.lang.String\"", ")", "Closure", "predicate", ")", "throws",...
Filter lines from an input stream using a closure predicate. The closure will be passed each line as a String, and it should return <code>true</code> if the line should be passed to the writer. @param self an input stream @param charset opens the stream with a specified charset @param predicate a closure which...
[ "Filter", "lines", "from", "an", "input", "stream", "using", "a", "closure", "predicate", ".", "The", "closure", "will", "be", "passed", "each", "line", "as", "a", "String", "and", "it", "should", "return", "<code", ">", "true<", "/", "code", ">", "if", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L1549-L1552