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
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DifferenceEvaluators.java
DifferenceEvaluators.ignorePrologDifferences
public static DifferenceEvaluator ignorePrologDifferences() { """ Ignore any differences that are part of the <a href="https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd">XML prolog</a>. <p>Here "ignore" means return {@code ComparisonResult.EQUAL}.</p> @since XMLUnit 2.1.0 """ return n...
java
public static DifferenceEvaluator ignorePrologDifferences() { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { return belongsToProlog(comparison, true) || isSequenceOfRootElem...
[ "public", "static", "DifferenceEvaluator", "ignorePrologDifferences", "(", ")", "{", "return", "new", "DifferenceEvaluator", "(", ")", "{", "@", "Override", "public", "ComparisonResult", "evaluate", "(", "Comparison", "comparison", ",", "ComparisonResult", "orig", ")"...
Ignore any differences that are part of the <a href="https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd">XML prolog</a>. <p>Here "ignore" means return {@code ComparisonResult.EQUAL}.</p> @since XMLUnit 2.1.0
[ "Ignore", "any", "differences", "that", "are", "part", "of", "the", "<a", "href", "=", "https", ":", "//", "www", ".", "w3", ".", "org", "/", "TR", "/", "2008", "/", "REC", "-", "xml", "-", "20081126", "/", "#sec", "-", "prolog", "-", "dtd", ">",...
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DifferenceEvaluators.java#L168-L177
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/SslCodec.java
SslCodec.onIOError
@Handler(channels = EncryptedChannel.class) public void onIOError(IOError event, IOSubchannel encryptedChannel) throws SSLException, InterruptedException { """ Handles an {@link IOError} event from the encrypted channel (client) by sending it downstream. @param event the event @param encrypted...
java
@Handler(channels = EncryptedChannel.class) public void onIOError(IOError event, IOSubchannel encryptedChannel) throws SSLException, InterruptedException { @SuppressWarnings("unchecked") final Optional<PlainChannel> plainChannel = (Optional<PlainChannel>) LinkedIOSubchannel ...
[ "@", "Handler", "(", "channels", "=", "EncryptedChannel", ".", "class", ")", "public", "void", "onIOError", "(", "IOError", "event", ",", "IOSubchannel", "encryptedChannel", ")", "throws", "SSLException", ",", "InterruptedException", "{", "@", "SuppressWarnings", ...
Handles an {@link IOError} event from the encrypted channel (client) by sending it downstream. @param event the event @param encryptedChannel the channel for exchanging the encrypted data @throws InterruptedException @throws SSLException
[ "Handles", "an", "{", "@link", "IOError", "}", "event", "from", "the", "encrypted", "channel", "(", "client", ")", "by", "sending", "it", "downstream", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/SslCodec.java#L253-L261
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_region_regionName_workflow_backup_backupWorkflowId_GET
public OvhBackup project_serviceName_region_regionName_workflow_backup_backupWorkflowId_GET(String serviceName, String regionName, String backupWorkflowId) throws IOException { """ Get details about a backup workflow process REST: GET /cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkf...
java
public OvhBackup project_serviceName_region_regionName_workflow_backup_backupWorkflowId_GET(String serviceName, String regionName, String backupWorkflowId) throws IOException { String qPath = "/cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkflowId}"; StringBuilder sb = path(qPath, servic...
[ "public", "OvhBackup", "project_serviceName_region_regionName_workflow_backup_backupWorkflowId_GET", "(", "String", "serviceName", ",", "String", "regionName", ",", "String", "backupWorkflowId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{servi...
Get details about a backup workflow process REST: GET /cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkflowId} @param backupWorkflowId [required] ID of your backup workflow @param regionName [required] Public Cloud region @param serviceName [required] Public Cloud project API beta
[ "Get", "details", "about", "a", "backup", "workflow", "process" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L231-L236
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/DirectCompactUnorderedSketch.java
DirectCompactUnorderedSketch.wrapInstance
static DirectCompactUnorderedSketch wrapInstance(final Memory srcMem, final long seed) { """ Wraps the given Memory, which must be a SerVer 3, unordered, Compact Sketch image. Must check the validity of the Memory before calling. @param srcMem <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @p...
java
static DirectCompactUnorderedSketch wrapInstance(final Memory srcMem, final long seed) { final short memSeedHash = srcMem.getShort(SEED_HASH_SHORT); final short computedSeedHash = computeSeedHash(seed); checkSeedHashes(memSeedHash, computedSeedHash); return new DirectCompactUnorderedSketch(srcMem); }
[ "static", "DirectCompactUnorderedSketch", "wrapInstance", "(", "final", "Memory", "srcMem", ",", "final", "long", "seed", ")", "{", "final", "short", "memSeedHash", "=", "srcMem", ".", "getShort", "(", "SEED_HASH_SHORT", ")", ";", "final", "short", "computedSeedHa...
Wraps the given Memory, which must be a SerVer 3, unordered, Compact Sketch image. Must check the validity of the Memory before calling. @param srcMem <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources/dictionary.html#seed">See Update Hash Seed</a>. @return this ...
[ "Wraps", "the", "given", "Memory", "which", "must", "be", "a", "SerVer", "3", "unordered", "Compact", "Sketch", "image", ".", "Must", "check", "the", "validity", "of", "the", "Memory", "before", "calling", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/DirectCompactUnorderedSketch.java#L41-L46
azkaban/azkaban
az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopConfigurationInjector.java
HadoopConfigurationInjector.prepareResourcesToInject
public static void prepareResourcesToInject(Props props, String workingDir) { """ Writes out the XML configuration file that will be injected by the client as a configuration resource. <p> This file will include a series of links injected by Azkaban as well as any job properties that begin with the designated ...
java
public static void prepareResourcesToInject(Props props, String workingDir) { try { Configuration conf = new Configuration(false); // First, inject a series of Azkaban links. These are equivalent to // CommonJobProperties.[EXECUTION,WORKFLOW,JOB,JOBEXEC,ATTEMPT]_LINK addHadoopProperties(pro...
[ "public", "static", "void", "prepareResourcesToInject", "(", "Props", "props", ",", "String", "workingDir", ")", "{", "try", "{", "Configuration", "conf", "=", "new", "Configuration", "(", "false", ")", ";", "// First, inject a series of Azkaban links. These are equival...
Writes out the XML configuration file that will be injected by the client as a configuration resource. <p> This file will include a series of links injected by Azkaban as well as any job properties that begin with the designated injection prefix. @param props The Azkaban properties @param workingDir The Azkaban job wo...
[ "Writes", "out", "the", "XML", "configuration", "file", "that", "will", "be", "injected", "by", "the", "client", "as", "a", "configuration", "resource", ".", "<p", ">", "This", "file", "will", "include", "a", "series", "of", "links", "injected", "by", "Azk...
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopConfigurationInjector.java#L82-L110
classgraph/classgraph
src/main/java/io/github/classgraph/ClasspathElement.java
ClasspathElement.checkResourcePathWhiteBlackList
protected void checkResourcePathWhiteBlackList(final String relativePath, final LogNode log) { """ Check relativePath against classpathElementResourcePathWhiteBlackList. @param relativePath the relative path @param log the log """ // Whitelist/blacklist classpath elements based on file resource p...
java
protected void checkResourcePathWhiteBlackList(final String relativePath, final LogNode log) { // Whitelist/blacklist classpath elements based on file resource paths if (!scanSpec.classpathElementResourcePathWhiteBlackList.whitelistAndBlacklistAreEmpty()) { if (scanSpec.classpathElementResou...
[ "protected", "void", "checkResourcePathWhiteBlackList", "(", "final", "String", "relativePath", ",", "final", "LogNode", "log", ")", "{", "// Whitelist/blacklist classpath elements based on file resource paths", "if", "(", "!", "scanSpec", ".", "classpathElementResourcePathWhit...
Check relativePath against classpathElementResourcePathWhiteBlackList. @param relativePath the relative path @param log the log
[ "Check", "relativePath", "against", "classpathElementResourcePathWhiteBlackList", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClasspathElement.java#L153-L171
joniles/mpxj
src/main/java/net/sf/mpxj/Duration.java
Duration.getInstance
public static Duration getInstance(double duration, TimeUnit type) { """ Retrieve an Duration instance. Use shared objects to represent common values for memory efficiency. @param duration duration value @param type duration type @return Duration instance """ Duration result; if (duration == ...
java
public static Duration getInstance(double duration, TimeUnit type) { Duration result; if (duration == 0) { result = ZERO_DURATIONS[type.getValue()]; } else { result = new Duration(duration, type); } return (result); }
[ "public", "static", "Duration", "getInstance", "(", "double", "duration", ",", "TimeUnit", "type", ")", "{", "Duration", "result", ";", "if", "(", "duration", "==", "0", ")", "{", "result", "=", "ZERO_DURATIONS", "[", "type", ".", "getValue", "(", ")", "...
Retrieve an Duration instance. Use shared objects to represent common values for memory efficiency. @param duration duration value @param type duration type @return Duration instance
[ "Retrieve", "an", "Duration", "instance", ".", "Use", "shared", "objects", "to", "represent", "common", "values", "for", "memory", "efficiency", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Duration.java#L298-L310
alkacon/opencms-core
src/org/opencms/util/CmsXsltUtil.java
CmsXsltUtil.transformCsvContent
public static String transformCsvContent(CmsObject cms, String xsltFile, String csvContent, String delimiter) throws CmsException, CmsXmlException { """ Changes content from CSV to xml/html.<p> The method does not use DOM4J, because iso-8859-1 code ist not transformed correctly. @param cms the cms object...
java
public static String transformCsvContent(CmsObject cms, String xsltFile, String csvContent, String delimiter) throws CmsException, CmsXmlException { String xmlContent = ""; try { xmlContent = getTableHtml(csvContent, delimiter); } catch (IOException e) { throw new Cm...
[ "public", "static", "String", "transformCsvContent", "(", "CmsObject", "cms", ",", "String", "xsltFile", ",", "String", "csvContent", ",", "String", "delimiter", ")", "throws", "CmsException", ",", "CmsXmlException", "{", "String", "xmlContent", "=", "\"\"", ";", ...
Changes content from CSV to xml/html.<p> The method does not use DOM4J, because iso-8859-1 code ist not transformed correctly. @param cms the cms object @param xsltFile the XSLT transformation file @param csvContent the csv content to transform @param delimiter delimiter used to separate csv fields @return the trans...
[ "Changes", "content", "from", "CSV", "to", "xml", "/", "html", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsXsltUtil.java#L112-L129
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.setBeforeLoginMessage
public void setBeforeLoginMessage(CmsObject cms, CmsLoginMessage message) throws CmsRoleViolationException { """ Sets the before login message to display on the login form.<p> This operation requires that the current user has role permissions of <code>{@link CmsRole#ROOT_ADMIN}</code>.<p> @param cms the curr...
java
public void setBeforeLoginMessage(CmsObject cms, CmsLoginMessage message) throws CmsRoleViolationException { if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) { // during configuration phase no permission check id required OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT...
[ "public", "void", "setBeforeLoginMessage", "(", "CmsObject", "cms", ",", "CmsLoginMessage", "message", ")", "throws", "CmsRoleViolationException", "{", "if", "(", "OpenCms", ".", "getRunLevel", "(", ")", ">=", "OpenCms", ".", "RUNLEVEL_3_SHELL_ACCESS", ")", "{", "...
Sets the before login message to display on the login form.<p> This operation requires that the current user has role permissions of <code>{@link CmsRole#ROOT_ADMIN}</code>.<p> @param cms the current OpenCms user context @param message the message to set @throws CmsRoleViolationException in case the current user doe...
[ "Sets", "the", "before", "login", "message", "to", "display", "on", "the", "login", "form", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L656-L667
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/CheckTime.java
CheckTime.analyze
private void analyze(final List<Metric> metrics, final long elapsed, final Date now, final Date date) { """ Analizes the data and produces the metrics. @param metrics produced metrics @param elapsed elapsed time @param now date as of now @param date """ long diff = 0; boolean behind =...
java
private void analyze(final List<Metric> metrics, final long elapsed, final Date now, final Date date) { long diff = 0; boolean behind = false; if (now.before(date)) { behind = true; diff = date.getTime() - now.getTime(); } else if (now.after(date)) { ...
[ "private", "void", "analyze", "(", "final", "List", "<", "Metric", ">", "metrics", ",", "final", "long", "elapsed", ",", "final", "Date", "now", ",", "final", "Date", "date", ")", "{", "long", "diff", "=", "0", ";", "boolean", "behind", "=", "false", ...
Analizes the data and produces the metrics. @param metrics produced metrics @param elapsed elapsed time @param now date as of now @param date
[ "Analizes", "the", "data", "and", "produces", "the", "metrics", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/CheckTime.java#L126-L149
twilio/twilio-java
src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java
SessionUpdater.setParticipants
public SessionUpdater setParticipants(final Map<String, Object> participants) { """ The Participant objects to include in the session.. @param participants The Participant objects to include in the session @return this """ return setParticipants(Promoter.listOfOne(participants)); }
java
public SessionUpdater setParticipants(final Map<String, Object> participants) { return setParticipants(Promoter.listOfOne(participants)); }
[ "public", "SessionUpdater", "setParticipants", "(", "final", "Map", "<", "String", ",", "Object", ">", "participants", ")", "{", "return", "setParticipants", "(", "Promoter", ".", "listOfOne", "(", "participants", ")", ")", ";", "}" ]
The Participant objects to include in the session.. @param participants The Participant objects to include in the session @return this
[ "The", "Participant", "objects", "to", "include", "in", "the", "session", ".." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java#L117-L119
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java
CommonOps_DDF6.extractRow
public static DMatrix6 extractRow( DMatrix6x6 a , int row , DMatrix6 out ) { """ Extracts the row from the matrix a. @param a Input matrix @param row Which row is to be extracted @param out output. Storage for the extracted row. If null then a new vector will be returned. @return The extracted row. """ ...
java
public static DMatrix6 extractRow( DMatrix6x6 a , int row , DMatrix6 out ) { if( out == null) out = new DMatrix6(); switch( row ) { case 0: out.a1 = a.a11; out.a2 = a.a12; out.a3 = a.a13; out.a4 = a.a14; out.a5 =...
[ "public", "static", "DMatrix6", "extractRow", "(", "DMatrix6x6", "a", ",", "int", "row", ",", "DMatrix6", "out", ")", "{", "if", "(", "out", "==", "null", ")", "out", "=", "new", "DMatrix6", "(", ")", ";", "switch", "(", "row", ")", "{", "case", "0...
Extracts the row from the matrix a. @param a Input matrix @param row Which row is to be extracted @param out output. Storage for the extracted row. If null then a new vector will be returned. @return The extracted row.
[ "Extracts", "the", "row", "from", "the", "matrix", "a", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java#L2149-L2204
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZonedDateTime.java
ZonedDateTime.resolveOffset
private ZonedDateTime resolveOffset(ZoneOffset offset) { """ Resolves the offset into this zoned date-time for the with methods. <p> This typically ignores the offset, unless it can be used to switch offset in a DST overlap. @param offset the offset, not null @return the zoned date-time, not null """ ...
java
private ZonedDateTime resolveOffset(ZoneOffset offset) { if (offset.equals(this.offset) == false && zone.getRules().isValidOffset(dateTime, offset)) { return new ZonedDateTime(dateTime, offset, zone); } return this; }
[ "private", "ZonedDateTime", "resolveOffset", "(", "ZoneOffset", "offset", ")", "{", "if", "(", "offset", ".", "equals", "(", "this", ".", "offset", ")", "==", "false", "&&", "zone", ".", "getRules", "(", ")", ".", "isValidOffset", "(", "dateTime", ",", "...
Resolves the offset into this zoned date-time for the with methods. <p> This typically ignores the offset, unless it can be used to switch offset in a DST overlap. @param offset the offset, not null @return the zoned date-time, not null
[ "Resolves", "the", "offset", "into", "this", "zoned", "date", "-", "time", "for", "the", "with", "methods", ".", "<p", ">", "This", "typically", "ignores", "the", "offset", "unless", "it", "can", "be", "used", "to", "switch", "offset", "in", "a", "DST", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZonedDateTime.java#L636-L641
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java
RTreeIndexCoreExtension.dropTriggers
public boolean dropTriggers(String tableName, String columnName) { """ Check if the table and column has the RTree extension and if found, drop the triggers @param tableName table name @param columnName column name @return true if dropped """ boolean dropped = has(tableName, columnName); if (droppe...
java
public boolean dropTriggers(String tableName, String columnName) { boolean dropped = has(tableName, columnName); if (dropped) { dropAllTriggers(tableName, columnName); } return dropped; }
[ "public", "boolean", "dropTriggers", "(", "String", "tableName", ",", "String", "columnName", ")", "{", "boolean", "dropped", "=", "has", "(", "tableName", ",", "columnName", ")", ";", "if", "(", "dropped", ")", "{", "dropAllTriggers", "(", "tableName", ",",...
Check if the table and column has the RTree extension and if found, drop the triggers @param tableName table name @param columnName column name @return true if dropped
[ "Check", "if", "the", "table", "and", "column", "has", "the", "RTree", "extension", "and", "if", "found", "drop", "the", "triggers" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java#L849-L855
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.storeCollections
private void storeCollections(Object obj, ClassDescriptor cld, boolean insert) throws PersistenceBrokerException { """ Store/Link collections of objects poiting to <b>obj</b>. More info please see comments in source. @param obj real object which we will store collections for @throws PersistenceBrokerException...
java
private void storeCollections(Object obj, ClassDescriptor cld, boolean insert) throws PersistenceBrokerException { // get all members of obj that are collections and store all their elements Collection listCods = cld.getCollectionDescriptors(); // return if nothing to do if (listCods...
[ "private", "void", "storeCollections", "(", "Object", "obj", ",", "ClassDescriptor", "cld", ",", "boolean", "insert", ")", "throws", "PersistenceBrokerException", "{", "// get all members of obj that are collections and store all their elements", "Collection", "listCods", "=", ...
Store/Link collections of objects poiting to <b>obj</b>. More info please see comments in source. @param obj real object which we will store collections for @throws PersistenceBrokerException if some goes wrong - please see the error message for details
[ "Store", "/", "Link", "collections", "of", "objects", "poiting", "to", "<b", ">", "obj<", "/", "b", ">", ".", "More", "info", "please", "see", "comments", "in", "source", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L1028-L1064
icode/ameba-utils
src/main/java/ameba/util/Assert.java
Assert.notEmpty
public static void notEmpty(Object[] array, String message) { """ Assert that an array has elements; that is, it must not be {@code null} and must have at least one element. <pre class="code">Assert.notEmpty(array, "The array must have elements");</pre> @param array the array to check @param message the exce...
java
public static void notEmpty(Object[] array, String message) { if (ArrayUtils.isEmpty(array)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "notEmpty", "(", "Object", "[", "]", "array", ",", "String", "message", ")", "{", "if", "(", "ArrayUtils", ".", "isEmpty", "(", "array", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}",...
Assert that an array has elements; that is, it must not be {@code null} and must have at least one element. <pre class="code">Assert.notEmpty(array, "The array must have elements");</pre> @param array the array to check @param message the exception message to use if the assertion fails @throws java.lang.IllegalArgumen...
[ "Assert", "that", "an", "array", "has", "elements", ";", "that", "is", "it", "must", "not", "be", "{", "@code", "null", "}", "and", "must", "have", "at", "least", "one", "element", ".", "<pre", "class", "=", "code", ">", "Assert", ".", "notEmpty", "(...
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/Assert.java#L212-L216
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java
PaymentSession.createFromBitcoinUri
public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri) throws PaymentProtocolException { """ <p>Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. uri is a BIP-72-style BitcoinURI object that specifies where the {@link...
java
public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri) throws PaymentProtocolException { return createFromBitcoinUri(uri, true, null); }
[ "public", "static", "ListenableFuture", "<", "PaymentSession", ">", "createFromBitcoinUri", "(", "final", "BitcoinURI", "uri", ")", "throws", "PaymentProtocolException", "{", "return", "createFromBitcoinUri", "(", "uri", ",", "true", ",", "null", ")", ";", "}" ]
<p>Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may be fetched in the r= parameter.</p> <p>If the payment request object specifies a PKI method, then ...
[ "<p", ">", "Returns", "a", "future", "that", "will", "be", "notified", "with", "a", "PaymentSession", "object", "after", "it", "is", "fetched", "using", "the", "provided", "uri", ".", "uri", "is", "a", "BIP", "-", "72", "-", "style", "BitcoinURI", "objec...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java#L93-L95
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterImpl.java
PNCounterImpl.updateAndGet
private CRDTTimestampedLong updateAndGet(long delta, VectorClock observedTimestamps, boolean isAddition) { """ Updates the PN counter state for this replica and returns the updated value. The {@code delta} parameter must be greater than or equal to 0. The {@code isAddition} parameter determines if this is an add...
java
private CRDTTimestampedLong updateAndGet(long delta, VectorClock observedTimestamps, boolean isAddition) { if (delta < 0) { throw new IllegalArgumentException("Delta must be greater than or equal to 0"); } final long nextTimestamp = stateVectorClock.getTimestampForReplica(localReplic...
[ "private", "CRDTTimestampedLong", "updateAndGet", "(", "long", "delta", ",", "VectorClock", "observedTimestamps", ",", "boolean", "isAddition", ")", "{", "if", "(", "delta", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Delta must be greate...
Updates the PN counter state for this replica and returns the updated value. The {@code delta} parameter must be greater than or equal to 0. The {@code isAddition} parameter determines if this is an addition or a subtraction. @param delta the delta to be applied to the current value, must be greater than ...
[ "Updates", "the", "PN", "counter", "state", "for", "this", "replica", "and", "returns", "the", "updated", "value", ".", "The", "{", "@code", "delta", "}", "parameter", "must", "be", "greater", "than", "or", "equal", "to", "0", ".", "The", "{", "@code", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterImpl.java#L241-L251
Netflix/astyanax
astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/MappingCache.java
MappingCache.getMapping
public <T> Mapping<T> getMapping(Class<T> clazz, boolean includeParentFields) { """ Return a new or cached mapper @param clazz class for the mapper @return mapper """ return getMapping(clazz, new DefaultAnnotationSet(), includeParentFields); }
java
public <T> Mapping<T> getMapping(Class<T> clazz, boolean includeParentFields) { return getMapping(clazz, new DefaultAnnotationSet(), includeParentFields); }
[ "public", "<", "T", ">", "Mapping", "<", "T", ">", "getMapping", "(", "Class", "<", "T", ">", "clazz", ",", "boolean", "includeParentFields", ")", "{", "return", "getMapping", "(", "clazz", ",", "new", "DefaultAnnotationSet", "(", ")", ",", "includeParentF...
Return a new or cached mapper @param clazz class for the mapper @return mapper
[ "Return", "a", "new", "or", "cached", "mapper" ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/MappingCache.java#L36-L38
jeremylong/DependencyCheck
maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java
BaseDependencyCheckMojo.artifactsMatch
private static boolean artifactsMatch(org.apache.maven.model.Dependency d, Artifact a) { """ Determines if the groupId, artifactId, and version of the Maven dependency and artifact match. @param d the Maven dependency @param a the Maven artifact @return true if the groupId, artifactId, and version match ...
java
private static boolean artifactsMatch(org.apache.maven.model.Dependency d, Artifact a) { return isEqualOrNull(a.getArtifactId(), d.getArtifactId()) && isEqualOrNull(a.getGroupId(), d.getGroupId()) && isEqualOrNull(a.getVersion(), d.getVersion()); }
[ "private", "static", "boolean", "artifactsMatch", "(", "org", ".", "apache", ".", "maven", ".", "model", ".", "Dependency", "d", ",", "Artifact", "a", ")", "{", "return", "isEqualOrNull", "(", "a", ".", "getArtifactId", "(", ")", ",", "d", ".", "getArtif...
Determines if the groupId, artifactId, and version of the Maven dependency and artifact match. @param d the Maven dependency @param a the Maven artifact @return true if the groupId, artifactId, and version match
[ "Determines", "if", "the", "groupId", "artifactId", "and", "version", "of", "the", "Maven", "dependency", "and", "artifact", "match", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java#L683-L687
alkacon/opencms-core
src/org/opencms/security/CmsOrgUnitManager.java
CmsOrgUnitManager.addResourceToOrgUnit
public void addResourceToOrgUnit(CmsObject cms, String ouFqn, String resourceName) throws CmsException { """ Adds a resource to the given organizational unit.<p> @param cms the opencms context @param ouFqn the full qualified name of the organizational unit to add the resource to @param resourceName the name o...
java
public void addResourceToOrgUnit(CmsObject cms, String ouFqn, String resourceName) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); CmsResource resource = cms.readResource(resourceName); m_securityManager.addResourceToOrgUnit(cms.getRequestContext(), org...
[ "public", "void", "addResourceToOrgUnit", "(", "CmsObject", "cms", ",", "String", "ouFqn", ",", "String", "resourceName", ")", "throws", "CmsException", "{", "CmsOrganizationalUnit", "orgUnit", "=", "readOrganizationalUnit", "(", "cms", ",", "ouFqn", ")", ";", "Cm...
Adds a resource to the given organizational unit.<p> @param cms the opencms context @param ouFqn the full qualified name of the organizational unit to add the resource to @param resourceName the name of the resource that is to be added to the organizational unit @throws CmsException if something goes wrong
[ "Adds", "a", "resource", "to", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsOrgUnitManager.java#L78-L83
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java
WRadioButtonSelectExample.addSingleColumnSelectExample
private void addSingleColumnSelectExample() { """ adds a WRadioButtonSelect with LAYOUT_COLUMN in 1 column simply by not setting the number of columns. This is superfluous as you should use LAYOUT_STACKED (the default) instead. """ add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect laid out in a single c...
java
private void addSingleColumnSelectExample() { add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect laid out in a single column")); add(new ExplanatoryText("When layout is COLUMN, setting the layoutColumnCount property to one, or forgetting to set it at all (default is " + "one) is a little bit pointless.")); ...
[ "private", "void", "addSingleColumnSelectExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H3", ",", "\"WRadioButtonSelect laid out in a single column\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"When layout is COLU...
adds a WRadioButtonSelect with LAYOUT_COLUMN in 1 column simply by not setting the number of columns. This is superfluous as you should use LAYOUT_STACKED (the default) instead.
[ "adds", "a", "WRadioButtonSelect", "with", "LAYOUT_COLUMN", "in", "1", "column", "simply", "by", "not", "setting", "the", "number", "of", "columns", ".", "This", "is", "superfluous", "as", "you", "should", "use", "LAYOUT_STACKED", "(", "the", "default", ")", ...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java#L236-L244
mytechia/mytechia_commons
mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java
PrototypeContainer.registerPrototype
public void registerPrototype( String key, IPrototype prototype ) { """ Registers a new prototype associated to the specified key NOTE: IPrototype pattern @param key key for the new prototype @param prototype the prototype to register """ prototypes.put(new PrototypeKey(key, prototype.getClass(...
java
public void registerPrototype( String key, IPrototype prototype ) { prototypes.put(new PrototypeKey(key, prototype.getClass()), prototype); }
[ "public", "void", "registerPrototype", "(", "String", "key", ",", "IPrototype", "prototype", ")", "{", "prototypes", ".", "put", "(", "new", "PrototypeKey", "(", "key", ",", "prototype", ".", "getClass", "(", ")", ")", ",", "prototype", ")", ";", "}" ]
Registers a new prototype associated to the specified key NOTE: IPrototype pattern @param key key for the new prototype @param prototype the prototype to register
[ "Registers", "a", "new", "prototype", "associated", "to", "the", "specified", "key" ]
train
https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java#L138-L143
BioPAX/Paxtools
paxtools-console/src/main/java/org/biopax/paxtools/examples/ProteinNameLister.java
ProteinNameLister.listUnificationXrefsPerPathway
public static void listUnificationXrefsPerPathway(Model model) { """ Here is a more elegant way of doing the previous method! @param model BioPAX object Model """ // This is a visitor for elements in a pathway - direct and indirect Visitor visitor = new Visitor() { public void visit(BioPAXElement dom...
java
public static void listUnificationXrefsPerPathway(Model model) { // This is a visitor for elements in a pathway - direct and indirect Visitor visitor = new Visitor() { public void visit(BioPAXElement domain, Object range, Model model, PropertyEditor editor) { if (range instanceof physicalEntity) { ...
[ "public", "static", "void", "listUnificationXrefsPerPathway", "(", "Model", "model", ")", "{", "// This is a visitor for elements in a pathway - direct and indirect", "Visitor", "visitor", "=", "new", "Visitor", "(", ")", "{", "public", "void", "visit", "(", "BioPAXElemen...
Here is a more elegant way of doing the previous method! @param model BioPAX object Model
[ "Here", "is", "a", "more", "elegant", "way", "of", "doing", "the", "previous", "method!" ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-console/src/main/java/org/biopax/paxtools/examples/ProteinNameLister.java#L136-L165
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/java/io/IOUtils.java
IOUtils.checkOffsetAndCount
private static void checkOffsetAndCount(final int length, final int offset, final int count) { """ Validates the offset and the byte count for the given array length. @param length Length of the array to be checked. @param offset Starting offset in the array. @param count Total number of elements to be access...
java
private static void checkOffsetAndCount(final int length, final int offset, final int count) { if (offset < 0 || count < 0 || offset + count > length) { throw new IndexOutOfBoundsException(); } }
[ "private", "static", "void", "checkOffsetAndCount", "(", "final", "int", "length", ",", "final", "int", "offset", ",", "final", "int", "count", ")", "{", "if", "(", "offset", "<", "0", "||", "count", "<", "0", "||", "offset", "+", "count", ">", "length...
Validates the offset and the byte count for the given array length. @param length Length of the array to be checked. @param offset Starting offset in the array. @param count Total number of elements to be accessed. @throws IndexOutOfBoundsException if {@code offset} is negative, {@code count} is negative or their sum ...
[ "Validates", "the", "offset", "and", "the", "byte", "count", "for", "the", "given", "array", "length", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/java/io/IOUtils.java#L76-L80
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java
XMLAssert.assertXMLEqual
public static void assertXMLEqual(InputSource control, InputSource test) throws SAXException, IOException { """ Assert that two XML documents are similar @param control XML to be compared against @param test XML to be tested @throws SAXException @throws IOException """ assertXMLEqual(null, ...
java
public static void assertXMLEqual(InputSource control, InputSource test) throws SAXException, IOException { assertXMLEqual(null, control, test); }
[ "public", "static", "void", "assertXMLEqual", "(", "InputSource", "control", ",", "InputSource", "test", ")", "throws", "SAXException", ",", "IOException", "{", "assertXMLEqual", "(", "null", ",", "control", ",", "test", ")", ";", "}" ]
Assert that two XML documents are similar @param control XML to be compared against @param test XML to be tested @throws SAXException @throws IOException
[ "Assert", "that", "two", "XML", "documents", "are", "similar" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java#L169-L172
atomix/atomix
core/src/main/java/io/atomix/core/impl/CoreTransactionService.java
CoreTransactionService.completePreparingTransaction
private void completePreparingTransaction(TransactionId transactionId) { """ Completes a transaction in the {@link TransactionState#PREPARING} state. @param transactionId the transaction identifier for the transaction to complete """ // Change ownership of the transaction to the local node and set its s...
java
private void completePreparingTransaction(TransactionId transactionId) { // Change ownership of the transaction to the local node and set its state to ROLLING_BACK and then roll it back. completeTransaction( transactionId, TransactionState.PREPARING, info -> new TransactionInfo(localMemb...
[ "private", "void", "completePreparingTransaction", "(", "TransactionId", "transactionId", ")", "{", "// Change ownership of the transaction to the local node and set its state to ROLLING_BACK and then roll it back.", "completeTransaction", "(", "transactionId", ",", "TransactionState", "...
Completes a transaction in the {@link TransactionState#PREPARING} state. @param transactionId the transaction identifier for the transaction to complete
[ "Completes", "a", "transaction", "in", "the", "{", "@link", "TransactionState#PREPARING", "}", "state", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/core/src/main/java/io/atomix/core/impl/CoreTransactionService.java#L233-L251
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/LoggingHelper.java
LoggingHelper.formatCommunicationMessage
public static String formatCommunicationMessage(final String protocol, final String source, final String destination, final String message) { """ Helper method for formatting transmission and reception messages. @param protocol The protocol used @param source Message source @param destination Message desti...
java
public static String formatCommunicationMessage(final String protocol, final String source, final String destination, final String message) { return COMM_MESSAGE_FORMAT.format(new Object[] { protocol, source, destination, message }); }
[ "public", "static", "String", "formatCommunicationMessage", "(", "final", "String", "protocol", ",", "final", "String", "source", ",", "final", "String", "destination", ",", "final", "String", "message", ")", "{", "return", "COMM_MESSAGE_FORMAT", ".", "format", "(...
Helper method for formatting transmission and reception messages. @param protocol The protocol used @param source Message source @param destination Message destination @param message The message @return A formatted message in the format: "protocol[&lt;protocol&gt;] source[&lt;source&gt;] destination[&lt;destination&gt...
[ "Helper", "method", "for", "formatting", "transmission", "and", "reception", "messages", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/LoggingHelper.java#L423-L425
craftercms/commons
utilities/src/main/java/org/craftercms/commons/http/RequestContextBindingFilter.java
RequestContextBindingFilter.createRequestContext
protected RequestContext createRequestContext(HttpServletRequest request, HttpServletResponse response) { """ Returns a new {@link RequestContext}, using the specified {@link HttpServletRequest} and {@link HttpServletResponse}. """ return new RequestContext(request, response, servletContext); }
java
protected RequestContext createRequestContext(HttpServletRequest request, HttpServletResponse response) { return new RequestContext(request, response, servletContext); }
[ "protected", "RequestContext", "createRequestContext", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "return", "new", "RequestContext", "(", "request", ",", "response", ",", "servletContext", ")", ";", "}" ]
Returns a new {@link RequestContext}, using the specified {@link HttpServletRequest} and {@link HttpServletResponse}.
[ "Returns", "a", "new", "{" ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/http/RequestContextBindingFilter.java#L91-L93
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java
GenericResource.supportedMethodSet
protected HierarchicalProperty supportedMethodSet() { """ The information about supported methods. @return information about supported methods """ HierarchicalProperty supportedMethodProp = new HierarchicalProperty(SUPPORTEDMETHODSET); supportedMethodProp.addChild(new HierarchicalProperty(ne...
java
protected HierarchicalProperty supportedMethodSet() { HierarchicalProperty supportedMethodProp = new HierarchicalProperty(SUPPORTEDMETHODSET); supportedMethodProp.addChild(new HierarchicalProperty(new QName("DAV:", "supported-method"))).setAttribute( "name", "PROPFIND"); supportedMe...
[ "protected", "HierarchicalProperty", "supportedMethodSet", "(", ")", "{", "HierarchicalProperty", "supportedMethodProp", "=", "new", "HierarchicalProperty", "(", "SUPPORTEDMETHODSET", ")", ";", "supportedMethodProp", ".", "addChild", "(", "new", "HierarchicalProperty", "(",...
The information about supported methods. @return information about supported methods
[ "The", "information", "about", "supported", "methods", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/GenericResource.java#L209-L250
aol/cyclops
cyclops/src/main/java/cyclops/companion/Functions.java
Functions.mapInts
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> mapInts(IntUnaryOperator b) { """ /* Fluent transform operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.mapInts; ReactiveSeq.ofInts(1,2,3) .to(mapInts(i->i*2)); //[2,4,6] } </pre> ...
java
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> mapInts(IntUnaryOperator b){ return a->a.ints(i->i,s->s.map(b)); }
[ "public", "static", "Function", "<", "?", "super", "ReactiveSeq", "<", "Integer", ">", ",", "?", "extends", "ReactiveSeq", "<", "Integer", ">", ">", "mapInts", "(", "IntUnaryOperator", "b", ")", "{", "return", "a", "->", "a", ".", "ints", "(", "i", "->...
/* Fluent transform operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.mapInts; ReactiveSeq.ofInts(1,2,3) .to(mapInts(i->i*2)); //[2,4,6] } </pre>
[ "/", "*", "Fluent", "transform", "operation", "using", "primitive", "types", "e", ".", "g", ".", "<pre", ">", "{", "@code", "import", "static", "cyclops", ".", "ReactiveSeq", ".", "mapInts", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L259-L262
JM-Lab/utils-java8
src/main/java/kr/jm/utils/time/JMTimeUtil.java
JMTimeUtil.changeFormatAndTimeZoneToOffsetDateTime
public static String changeFormatAndTimeZoneToOffsetDateTime( String dateFormat, String dateString) { """ Change format and time zone to offset date time string. @param dateFormat the date format @param dateString the date string @return the string """ return getOffsetDateTime(changeTi...
java
public static String changeFormatAndTimeZoneToOffsetDateTime( String dateFormat, String dateString) { return getOffsetDateTime(changeTimestampToLong(dateFormat, dateString)) .toString(); }
[ "public", "static", "String", "changeFormatAndTimeZoneToOffsetDateTime", "(", "String", "dateFormat", ",", "String", "dateString", ")", "{", "return", "getOffsetDateTime", "(", "changeTimestampToLong", "(", "dateFormat", ",", "dateString", ")", ")", ".", "toString", "...
Change format and time zone to offset date time string. @param dateFormat the date format @param dateString the date string @return the string
[ "Change", "format", "and", "time", "zone", "to", "offset", "date", "time", "string", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/time/JMTimeUtil.java#L417-L421
jingwei/krati
krati-main/src/main/java/krati/util/SourceWaterMarks.java
SourceWaterMarks.syncWaterMarks
public boolean syncWaterMarks(String source, long lwmScn, long hwmScn) { """ Sets and flushes the water marks of a source. @param source - the source @param lwmScn - the low water mark SCN @param hwmScn - the high water mark SCN @return <tt>true</tt> if flush is successful. """ setWaterMarks(sour...
java
public boolean syncWaterMarks(String source, long lwmScn, long hwmScn) { setWaterMarks(source, lwmScn, hwmScn); return flush(); }
[ "public", "boolean", "syncWaterMarks", "(", "String", "source", ",", "long", "lwmScn", ",", "long", "hwmScn", ")", "{", "setWaterMarks", "(", "source", ",", "lwmScn", ",", "hwmScn", ")", ";", "return", "flush", "(", ")", ";", "}" ]
Sets and flushes the water marks of a source. @param source - the source @param lwmScn - the low water mark SCN @param hwmScn - the high water mark SCN @return <tt>true</tt> if flush is successful.
[ "Sets", "and", "flushes", "the", "water", "marks", "of", "a", "source", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/util/SourceWaterMarks.java#L266-L269
canoo/dolphin-platform
platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/Assert.java
Assert.requireNonNull
public static <T> T requireNonNull(final T value, final String argumentName) { """ Checks that the specified {@code value} is null and throws {@link java.lang.NullPointerException} with a customized error message if it is. @param value the value to be checked. @param argumentName the name of the argumen...
java
public static <T> T requireNonNull(final T value, final String argumentName) { Objects.requireNonNull(argumentName, String.format(NOT_NULL_MSG_FORMAT, "argumentName")); return Objects.requireNonNull(value, String.format(NOT_NULL_MSG_FORMAT, argumentName)); }
[ "public", "static", "<", "T", ">", "T", "requireNonNull", "(", "final", "T", "value", ",", "final", "String", "argumentName", ")", "{", "Objects", ".", "requireNonNull", "(", "argumentName", ",", "String", ".", "format", "(", "NOT_NULL_MSG_FORMAT", ",", "\"a...
Checks that the specified {@code value} is null and throws {@link java.lang.NullPointerException} with a customized error message if it is. @param value the value to be checked. @param argumentName the name of the argument to be used in the error message. @return the {@code value}. @throws java.lang.NullPointer...
[ "Checks", "that", "the", "specified", "{", "@code", "value", "}", "is", "null", "and", "throws", "{", "@link", "java", ".", "lang", ".", "NullPointerException", "}", "with", "a", "customized", "error", "message", "if", "it", "is", "." ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/Assert.java#L48-L51
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BinaryTransform.java
BinaryTransform.getString
protected String getString(byte[] data, int offset) { """ Returns a string value from a zero-terminated byte array at the specified offset. @param data The source data. @param offset The byte offset. @return A string. """ if (offset < 0) { return ""; } int i = offset; ...
java
protected String getString(byte[] data, int offset) { if (offset < 0) { return ""; } int i = offset; while (data[i++] != 0x00) { ; } return getString(data, offset, i - offset - 1); }
[ "protected", "String", "getString", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "if", "(", "offset", "<", "0", ")", "{", "return", "\"\"", ";", "}", "int", "i", "=", "offset", ";", "while", "(", "data", "[", "i", "++", "]", "...
Returns a string value from a zero-terminated byte array at the specified offset. @param data The source data. @param offset The byte offset. @return A string.
[ "Returns", "a", "string", "value", "from", "a", "zero", "-", "terminated", "byte", "array", "at", "the", "specified", "offset", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BinaryTransform.java#L119-L129
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java
PropertyBuilder.renderingOption
public PropertyBuilder renderingOption(final String optionKey, final Object optionValue) { """ Adds the given renderingOption @param optionKey key @param optionValue value @return this builder @see StringRenderingConstants """ this.renderingOptions.put(optionKey, optionValue); return this...
java
public PropertyBuilder renderingOption(final String optionKey, final Object optionValue) { this.renderingOptions.put(optionKey, optionValue); return this; }
[ "public", "PropertyBuilder", "renderingOption", "(", "final", "String", "optionKey", ",", "final", "Object", "optionValue", ")", "{", "this", ".", "renderingOptions", ".", "put", "(", "optionKey", ",", "optionValue", ")", ";", "return", "this", ";", "}" ]
Adds the given renderingOption @param optionKey key @param optionValue value @return this builder @see StringRenderingConstants
[ "Adds", "the", "given", "renderingOption", "@param", "optionKey", "key", "@param", "optionValue", "value" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java#L306-L309
apereo/cas
support/cas-server-support-memcached-core/src/main/java/org/apereo/cas/memcached/kryo/serial/RegisteredServiceSerializer.java
RegisteredServiceSerializer.readObjectByReflection
@SneakyThrows private static <T> T readObjectByReflection(final Kryo kryo, final Input input, final Class<T> clazz) { """ Read object by reflection. @param <T> the type parameter @param kryo the kryo @param input the input @param clazz the clazz @return the t """ val className = kryo.read...
java
@SneakyThrows private static <T> T readObjectByReflection(final Kryo kryo, final Input input, final Class<T> clazz) { val className = kryo.readObject(input, String.class); val foundClass = (Class<T>) Class.forName(className); val result = kryo.readObject(input, foundClass); if (!cla...
[ "@", "SneakyThrows", "private", "static", "<", "T", ">", "T", "readObjectByReflection", "(", "final", "Kryo", "kryo", ",", "final", "Input", "input", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "val", "className", "=", "kryo", ".", "readObje...
Read object by reflection. @param <T> the type parameter @param kryo the kryo @param input the input @param clazz the clazz @return the t
[ "Read", "object", "by", "reflection", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-memcached-core/src/main/java/org/apereo/cas/memcached/kryo/serial/RegisteredServiceSerializer.java#L75-L87
apache/groovy
src/main/groovy/groovy/lang/ExpandoMetaClass.java
ExpandoMetaClass.registerBeanProperty
public void registerBeanProperty(final String property, final Object newValue) { """ Registers a new bean property @param property The property name @param newValue The properties initial value """ performOperationOnMetaClass(new Callable() { public void call() { Class t...
java
public void registerBeanProperty(final String property, final Object newValue) { performOperationOnMetaClass(new Callable() { public void call() { Class type = newValue == null ? Object.class : newValue.getClass(); MetaBeanProperty mbp = newValue instanceof MetaBeanP...
[ "public", "void", "registerBeanProperty", "(", "final", "String", "property", ",", "final", "Object", "newValue", ")", "{", "performOperationOnMetaClass", "(", "new", "Callable", "(", ")", "{", "public", "void", "call", "(", ")", "{", "Class", "type", "=", "...
Registers a new bean property @param property The property name @param newValue The properties initial value
[ "Registers", "a", "new", "bean", "property" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/ExpandoMetaClass.java#L845-L868
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/DirectQuickSelectSketch.java
DirectQuickSelectSketch.fastWritableWrap
static DirectQuickSelectSketch fastWritableWrap(final WritableMemory srcMem, final long seed) { """ Fast-wrap a sketch around the given source Memory containing sketch data that originated from this sketch. This does NO validity checking of the given Memory. @param srcMem <a href="{@docRoot}/resources/dictionar...
java
static DirectQuickSelectSketch fastWritableWrap(final WritableMemory srcMem, final long seed) { final int lgNomLongs = extractLgNomLongs(srcMem); //byte 3 final int lgArrLongs = extractLgArrLongs(srcMem); //byte 4 final DirectQuickSelectSketch dqss = new DirectQu...
[ "static", "DirectQuickSelectSketch", "fastWritableWrap", "(", "final", "WritableMemory", "srcMem", ",", "final", "long", "seed", ")", "{", "final", "int", "lgNomLongs", "=", "extractLgNomLongs", "(", "srcMem", ")", ";", "//byte 3", "final", "int", "lgArrLongs", "=...
Fast-wrap a sketch around the given source Memory containing sketch data that originated from this sketch. This does NO validity checking of the given Memory. @param srcMem <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> The given Memory object must be in hash table form and not read only. @param see...
[ "Fast", "-", "wrap", "a", "sketch", "around", "the", "given", "source", "Memory", "containing", "sketch", "data", "that", "originated", "from", "this", "sketch", ".", "This", "does", "NO", "validity", "checking", "of", "the", "given", "Memory", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/DirectQuickSelectSketch.java#L185-L193
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java
ParticleIO.saveEmitter
public static void saveEmitter(OutputStream out, ConfigurableEmitter emitter) throws IOException { """ Save a single emitter to the XML file @param out The location to which we should save @param emitter The emitter to store to the XML file @throws IOException Indicates a failure to write or encode the...
java
public static void saveEmitter(OutputStream out, ConfigurableEmitter emitter) throws IOException { try { DocumentBuilder builder = DocumentBuilderFactory.newInstance() .newDocumentBuilder(); Document document = builder.newDocument(); document.appendChild(emitterToElement(document, emitter)); ...
[ "public", "static", "void", "saveEmitter", "(", "OutputStream", "out", ",", "ConfigurableEmitter", "emitter", ")", "throws", "IOException", "{", "try", "{", "DocumentBuilder", "builder", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ".", "newDocumentB...
Save a single emitter to the XML file @param out The location to which we should save @param emitter The emitter to store to the XML file @throws IOException Indicates a failure to write or encode the XML
[ "Save", "a", "single", "emitter", "to", "the", "XML", "file" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java#L447-L468
cuba-platform/yarg
core/modules/api/src/com/haulmont/yarg/reporting/RunParams.java
RunParams.templateCode
public RunParams templateCode(String templateCode) { """ Setup necessary template by string code. Throws validation exception if code is null or template not found @param templateCode - string code of template """ if (templateCode == null) { throw new NullPointerException("\"templateCode\"...
java
public RunParams templateCode(String templateCode) { if (templateCode == null) { throw new NullPointerException("\"templateCode\" parameter can not be null"); } this.reportTemplate = report.getReportTemplates().get(templateCode); if (reportTemplate == null) { thro...
[ "public", "RunParams", "templateCode", "(", "String", "templateCode", ")", "{", "if", "(", "templateCode", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"\\\"templateCode\\\" parameter can not be null\"", ")", ";", "}", "this", ".", "reportT...
Setup necessary template by string code. Throws validation exception if code is null or template not found @param templateCode - string code of template
[ "Setup", "necessary", "template", "by", "string", "code", ".", "Throws", "validation", "exception", "if", "code", "is", "null", "or", "template", "not", "found" ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/api/src/com/haulmont/yarg/reporting/RunParams.java#L43-L52
infinispan/infinispan
lucene/lucene-directory/src/main/java/org/infinispan/lucene/impl/DirectoryLucene.java
DirectoryLucene.forceUnlock
@Override public void forceUnlock(String lockName) { """ Force release of the lock in this directory. Make sure to understand the consequences """ Cache<Object, Integer> lockCache = getDistLockCache().getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD); FileCacheKey fileCa...
java
@Override public void forceUnlock(String lockName) { Cache<Object, Integer> lockCache = getDistLockCache().getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD); FileCacheKey fileCacheKey = new FileCacheKey(indexName, lockName, affinitySegmentId); Object previousValue = lockCach...
[ "@", "Override", "public", "void", "forceUnlock", "(", "String", "lockName", ")", "{", "Cache", "<", "Object", ",", "Integer", ">", "lockCache", "=", "getDistLockCache", "(", ")", ".", "getAdvancedCache", "(", ")", ".", "withFlags", "(", "Flag", ".", "SKIP...
Force release of the lock in this directory. Make sure to understand the consequences
[ "Force", "release", "of", "the", "lock", "in", "this", "directory", ".", "Make", "sure", "to", "understand", "the", "consequences" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/lucene-directory/src/main/java/org/infinispan/lucene/impl/DirectoryLucene.java#L174-L182
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseSessionHolder.java
BaseSessionHolder.setReturnSessionOrObject
public void setReturnSessionOrObject(PrintWriter out, Object objReturn) { """ If this is a session, convert to a proxy session and return, if object, convert and return. @param out The return output stream. @param strReturn The string to return. """ String strID = null; String strSessionClass...
java
public void setReturnSessionOrObject(PrintWriter out, Object objReturn) { String strID = null; String strSessionClass = null; if (objReturn instanceof RemoteTable) { strSessionClass = REMOTE_TABLE; strID = this.add(new TableHolder(this, (RemoteTable)objReturn)...
[ "public", "void", "setReturnSessionOrObject", "(", "PrintWriter", "out", ",", "Object", "objReturn", ")", "{", "String", "strID", "=", "null", ";", "String", "strSessionClass", "=", "null", ";", "if", "(", "objReturn", "instanceof", "RemoteTable", ")", "{", "s...
If this is a session, convert to a proxy session and return, if object, convert and return. @param out The return output stream. @param strReturn The string to return.
[ "If", "this", "is", "a", "session", "convert", "to", "a", "proxy", "session", "and", "return", "if", "object", "convert", "and", "return", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseSessionHolder.java#L99-L122
adyliu/jafka
src/main/java/io/jafka/utils/Utils.java
Utils.getProps
public static Properties getProps(Properties props, String name, Properties defaultProperties) { """ Get a property of type java.util.Properties or return the default if no such property is defined @param props properties @param name the key @param defaultProperties default property if empty @return value fro...
java
public static Properties getProps(Properties props, String name, Properties defaultProperties) { final String propString = props.getProperty(name); if (propString == null) return defaultProperties; String[] propValues = propString.split(","); if (propValues.length < 1) { thro...
[ "public", "static", "Properties", "getProps", "(", "Properties", "props", ",", "String", "name", ",", "Properties", "defaultProperties", ")", "{", "final", "String", "propString", "=", "props", ".", "getProperty", "(", "name", ")", ";", "if", "(", "propString"...
Get a property of type java.util.Properties or return the default if no such property is defined @param props properties @param name the key @param defaultProperties default property if empty @return value from the property
[ "Get", "a", "property", "of", "type", "java", ".", "util", ".", "Properties", "or", "return", "the", "default", "if", "no", "such", "property", "is", "defined" ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/utils/Utils.java#L70-L84
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readResource
public I_CmsHistoryResource readResource(CmsDbContext dbc, CmsResource resource, int version) throws CmsException { """ Reads an historical resource entry for the given resource and with the given version number.<p> @param dbc the current db context @param resource the resource to be read @param version the v...
java
public I_CmsHistoryResource readResource(CmsDbContext dbc, CmsResource resource, int version) throws CmsException { Iterator<I_CmsHistoryResource> itVersions = getHistoryDriver(dbc).readAllAvailableVersions( dbc, resource.getStructureId()).iterator(); while (itVersions.hasNext()...
[ "public", "I_CmsHistoryResource", "readResource", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ",", "int", "version", ")", "throws", "CmsException", "{", "Iterator", "<", "I_CmsHistoryResource", ">", "itVersions", "=", "getHistoryDriver", "(", "dbc", ...
Reads an historical resource entry for the given resource and with the given version number.<p> @param dbc the current db context @param resource the resource to be read @param version the version number to retrieve @return the resource that was read @throws CmsException if the resource could not be read for any rea...
[ "Reads", "an", "historical", "resource", "entry", "for", "the", "given", "resource", "and", "with", "the", "given", "version", "number", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7614-L7629
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/document/json/JsonObject.java
JsonObject.getAndDecryptArray
public JsonArray getAndDecryptArray(String name, String providerName) throws Exception { """ Retrieves the decrypted value from the field name and casts it to {@link JsonArray}. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase...
java
public JsonArray getAndDecryptArray(String name, String providerName) throws Exception { return (JsonArray) getAndDecrypt(name, providerName); }
[ "public", "JsonArray", "getAndDecryptArray", "(", "String", "name", ",", "String", "providerName", ")", "throws", "Exception", "{", "return", "(", "JsonArray", ")", "getAndDecrypt", "(", "name", ",", "providerName", ")", ";", "}" ]
Retrieves the decrypted value from the field name and casts it to {@link JsonArray}. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase is subject to the Couchbase Inc. Enterprise Subscription License Agreement at https://www.couchbase....
[ "Retrieves", "the", "decrypted", "value", "from", "the", "field", "name", "and", "casts", "it", "to", "{", "@link", "JsonArray", "}", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L886-L888
aaschmid/gradle-cpd-plugin
src/main/java/de/aaschmid/gradle/plugins/cpd/internal/CpdReporter.java
CpdReporter.setTrimLeadingWhitespacesByReflection
private void setTrimLeadingWhitespacesByReflection(Renderer result, boolean trimLeadingCommonSourceWhitespaces) { """ Also set second field to trim leading whitespaces. <p/> <i>Information:</i> Use reflection because neither proper constructor for setting both fields nor setter are available. """ St...
java
private void setTrimLeadingWhitespacesByReflection(Renderer result, boolean trimLeadingCommonSourceWhitespaces) { String fieldName = "trimLeadingWhitespace"; if (logger.isDebugEnabled()) { logger.debug("Try setting '{}' field to '{}' for '{}' by reflection.", fieldName, trimLeadingCommonSour...
[ "private", "void", "setTrimLeadingWhitespacesByReflection", "(", "Renderer", "result", ",", "boolean", "trimLeadingCommonSourceWhitespaces", ")", "{", "String", "fieldName", "=", "\"trimLeadingWhitespace\"", ";", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")"...
Also set second field to trim leading whitespaces. <p/> <i>Information:</i> Use reflection because neither proper constructor for setting both fields nor setter are available.
[ "Also", "set", "second", "field", "to", "trim", "leading", "whitespaces", ".", "<p", "/", ">", "<i", ">", "Information", ":", "<", "/", "i", ">", "Use", "reflection", "because", "neither", "proper", "constructor", "for", "setting", "both", "fields", "nor",...
train
https://github.com/aaschmid/gradle-cpd-plugin/blob/1cf1b79e0f7fa6eddd5d135a359c90e37b5e90fe/src/main/java/de/aaschmid/gradle/plugins/cpd/internal/CpdReporter.java#L112-L127
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPrinter.java
MPrinter.getTextAt
protected String getTextAt(final MBasicTable table, final int row, final int column) { """ Renvoie le texte de la cellule de cette JTable à la ligne et la colonne spécifiée. @return String @param table MBasicTable @param row int @param column int """ String text = table.getTextAt(row, column); /...
java
protected String getTextAt(final MBasicTable table, final int row, final int column) { String text = table.getTextAt(row, column); // suppression de tags éventuellements présents (par ex. avec un MultiLineTableCellRenderer) if (text != null && text.startsWith("<html>")) { text = text.replaceFirst("<html>",...
[ "protected", "String", "getTextAt", "(", "final", "MBasicTable", "table", ",", "final", "int", "row", ",", "final", "int", "column", ")", "{", "String", "text", "=", "table", ".", "getTextAt", "(", "row", ",", "column", ")", ";", "// suppression de tags éven...
Renvoie le texte de la cellule de cette JTable à la ligne et la colonne spécifiée. @return String @param table MBasicTable @param row int @param column int
[ "Renvoie", "le", "texte", "de", "la", "cellule", "de", "cette", "JTable", "à", "la", "ligne", "et", "la", "colonne", "spécifiée", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPrinter.java#L100-L111
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildMapClickMessage
public String buildMapClickMessage(LatLng latLng, View view, GoogleMap map, Projection projection) { """ Perform a query based upon the map click location and build a info message @param latLng location @param view view @param map Google Map @param projection desired geometry projection @re...
java
public String buildMapClickMessage(LatLng latLng, View view, GoogleMap map, Projection projection) { // Get the zoom level double zoom = MapUtils.getCurrentZoom(map); // Build a bounding box to represent the click location BoundingBox boundingBox = MapUtils.buildClickBoundingBox(latLng...
[ "public", "String", "buildMapClickMessage", "(", "LatLng", "latLng", ",", "View", "view", ",", "GoogleMap", "map", ",", "Projection", "projection", ")", "{", "// Get the zoom level", "double", "zoom", "=", "MapUtils", ".", "getCurrentZoom", "(", "map", ")", ";",...
Perform a query based upon the map click location and build a info message @param latLng location @param view view @param map Google Map @param projection desired geometry projection @return information message on what was clicked, or null @since 1.2.7
[ "Perform", "a", "query", "based", "upon", "the", "map", "click", "location", "and", "build", "a", "info", "message" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L356-L370
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java
JaxbConfigurationReader.marshall
public void marshall(Configuration configuration, OutputStream outputStream) { """ Convenience method to marshal a JAXB configuration object into an output stream. @param configuration @param outputStream """ try { final Marshaller marshaller = _jaxbContext.createMarshaller(); ...
java
public void marshall(Configuration configuration, OutputStream outputStream) { try { final Marshaller marshaller = _jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setEventHandler(new JaxbValidationEventHandle...
[ "public", "void", "marshall", "(", "Configuration", "configuration", ",", "OutputStream", "outputStream", ")", "{", "try", "{", "final", "Marshaller", "marshaller", "=", "_jaxbContext", ".", "createMarshaller", "(", ")", ";", "marshaller", ".", "setProperty", "(",...
Convenience method to marshal a JAXB configuration object into an output stream. @param configuration @param outputStream
[ "Convenience", "method", "to", "marshal", "a", "JAXB", "configuration", "object", "into", "an", "output", "stream", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java#L258-L267
junit-team/junit4
src/main/java/org/junit/Assert.java
Assert.assertThrows
public static <T extends Throwable> T assertThrows(Class<T> expectedThrowable, ThrowingRunnable runnable) { """ Asserts that {@code runnable} throws an exception of type {@code expectedThrowable} when executed. If it does, the exception object is returned. If it does not throw an exception, an {@link...
java
public static <T extends Throwable> T assertThrows(Class<T> expectedThrowable, ThrowingRunnable runnable) { return assertThrows(null, expectedThrowable, runnable); }
[ "public", "static", "<", "T", "extends", "Throwable", ">", "T", "assertThrows", "(", "Class", "<", "T", ">", "expectedThrowable", ",", "ThrowingRunnable", "runnable", ")", "{", "return", "assertThrows", "(", "null", ",", "expectedThrowable", ",", "runnable", "...
Asserts that {@code runnable} throws an exception of type {@code expectedThrowable} when executed. If it does, the exception object is returned. If it does not throw an exception, an {@link AssertionError} is thrown. If it throws the wrong type of exception, an {@code AssertionError} is thrown describing the mismatch; ...
[ "Asserts", "that", "{", "@code", "runnable", "}", "throws", "an", "exception", "of", "type", "{", "@code", "expectedThrowable", "}", "when", "executed", ".", "If", "it", "does", "the", "exception", "object", "is", "returned", ".", "If", "it", "does", "not"...
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/Assert.java#L981-L984
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTree.java
MkTabTree.createNewDirectoryEntry
@Override protected MkTabEntry createNewDirectoryEntry(MkTabTreeNode<O> node, DBID routingObjectID, double parentDistance) { """ Creates a new directory entry representing the specified node. @param node the node to be represented by the new entry @param routingObjectID the id of the routing object of the no...
java
@Override protected MkTabEntry createNewDirectoryEntry(MkTabTreeNode<O> node, DBID routingObjectID, double parentDistance) { return new MkTabDirectoryEntry(routingObjectID, parentDistance, node.getPageID(), node.coveringRadiusFromEntries(routingObjectID, this), node.kNNDistances()); }
[ "@", "Override", "protected", "MkTabEntry", "createNewDirectoryEntry", "(", "MkTabTreeNode", "<", "O", ">", "node", ",", "DBID", "routingObjectID", ",", "double", "parentDistance", ")", "{", "return", "new", "MkTabDirectoryEntry", "(", "routingObjectID", ",", "paren...
Creates a new directory entry representing the specified node. @param node the node to be represented by the new entry @param routingObjectID the id of the routing object of the node @param parentDistance the distance from the routing object of the node to the routing object of the parent node
[ "Creates", "a", "new", "directory", "entry", "representing", "the", "specified", "node", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTree.java#L187-L190
facebookarchive/hadoop-20
src/core/org/apache/hadoop/record/compiler/CGenerator.java
CGenerator.genCode
void genCode(String name, ArrayList<JFile> ilist, ArrayList<JRecord> rlist, String destDir, ArrayList<String> options) throws IOException { """ Generate C code. This method only creates the requested file(s) and spits-out file-level elements (such as include statements etc.) record-level code ...
java
void genCode(String name, ArrayList<JFile> ilist, ArrayList<JRecord> rlist, String destDir, ArrayList<String> options) throws IOException { name = new File(destDir, (new File(name)).getName()).getAbsolutePath(); FileWriter cc = new FileWriter(name+".c"); try { FileWriter hh = new Fi...
[ "void", "genCode", "(", "String", "name", ",", "ArrayList", "<", "JFile", ">", "ilist", ",", "ArrayList", "<", "JRecord", ">", "rlist", ",", "String", "destDir", ",", "ArrayList", "<", "String", ">", "options", ")", "throws", "IOException", "{", "name", ...
Generate C code. This method only creates the requested file(s) and spits-out file-level elements (such as include statements etc.) record-level code is generated by JRecord.
[ "Generate", "C", "code", ".", "This", "method", "only", "creates", "the", "requested", "file", "(", "s", ")", "and", "spits", "-", "out", "file", "-", "level", "elements", "(", "such", "as", "include", "statements", "etc", ".", ")", "record", "-", "lev...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/record/compiler/CGenerator.java#L40-L70
apache/fluo
modules/command/src/main/java/org/apache/fluo/command/FluoWait.java
FluoWait.waitTillNoNotifications
private static boolean waitTillNoNotifications(Environment env, TableRange range) throws TableNotFoundException { """ Wait until a range has no notifications. @return true if notifications were ever seen while waiting """ boolean sawNotifications = false; long retryTime = MIN_SLEEP_MS; lo...
java
private static boolean waitTillNoNotifications(Environment env, TableRange range) throws TableNotFoundException { boolean sawNotifications = false; long retryTime = MIN_SLEEP_MS; log.debug("Scanning tablet {} for notifications", range); long start = System.currentTimeMillis(); while (hasNoti...
[ "private", "static", "boolean", "waitTillNoNotifications", "(", "Environment", "env", ",", "TableRange", "range", ")", "throws", "TableNotFoundException", "{", "boolean", "sawNotifications", "=", "false", ";", "long", "retryTime", "=", "MIN_SLEEP_MS", ";", "log", "....
Wait until a range has no notifications. @return true if notifications were ever seen while waiting
[ "Wait", "until", "a", "range", "has", "no", "notifications", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/command/src/main/java/org/apache/fluo/command/FluoWait.java#L66-L84
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.adjustAutoCommitConfig
static void adjustAutoCommitConfig(Properties properties, OffsetCommitMode offsetCommitMode) { """ Make sure that auto commit is disabled when our offset commit mode is ON_CHECKPOINTS. This overwrites whatever setting the user configured in the properties. @param properties - Kafka configuration properties to be...
java
static void adjustAutoCommitConfig(Properties properties, OffsetCommitMode offsetCommitMode) { if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS || offsetCommitMode == OffsetCommitMode.DISABLED) { properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false"); } }
[ "static", "void", "adjustAutoCommitConfig", "(", "Properties", "properties", ",", "OffsetCommitMode", "offsetCommitMode", ")", "{", "if", "(", "offsetCommitMode", "==", "OffsetCommitMode", ".", "ON_CHECKPOINTS", "||", "offsetCommitMode", "==", "OffsetCommitMode", ".", "...
Make sure that auto commit is disabled when our offset commit mode is ON_CHECKPOINTS. This overwrites whatever setting the user configured in the properties. @param properties - Kafka configuration properties to be adjusted @param offsetCommitMode offset commit mode
[ "Make", "sure", "that", "auto", "commit", "is", "disabled", "when", "our", "offset", "commit", "mode", "is", "ON_CHECKPOINTS", ".", "This", "overwrites", "whatever", "setting", "the", "user", "configured", "in", "the", "properties", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L263-L267
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMultiRoleMetricsAsync
public Observable<Page<ResourceMetricInner>> listMultiRoleMetricsAsync(final String resourceGroupName, final String name) { """ Get metrics for a multi-role pool of an App Service Environment. Get metrics for a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group t...
java
public Observable<Page<ResourceMetricInner>> listMultiRoleMetricsAsync(final String resourceGroupName, final String name) { return listMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name) .map(new Func1<ServiceResponse<Page<ResourceMetricInner>>, Page<ResourceMetricInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "ResourceMetricInner", ">", ">", "listMultiRoleMetricsAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listMultiRoleMetricsWithServiceResponseAsync", "(", "resourceGroupName...
Get metrics for a multi-role pool of an App Service Environment. Get metrics for a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fai...
[ "Get", "metrics", "for", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metrics", "for", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L3133-L3141
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/ReturnValue.java
ReturnValue.withPerformanceData
public ReturnValue withPerformanceData(final Metric metric, IThreshold threshold) { """ Adds performance data to the plugin result. Thos data will be added to the output formatted as specified in Nagios specifications (http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201) @param metric The metr...
java
public ReturnValue withPerformanceData(final Metric metric, IThreshold threshold) { performanceDataList.add(new PerformanceData(metric, threshold.getPrefix(), threshold.getUnitString(), threshold.getRangesAsString(Status.WARNING), threshold.getRangesAsString(Status.CRITICAL))); return this; }
[ "public", "ReturnValue", "withPerformanceData", "(", "final", "Metric", "metric", ",", "IThreshold", "threshold", ")", "{", "performanceDataList", ".", "add", "(", "new", "PerformanceData", "(", "metric", ",", "threshold", ".", "getPrefix", "(", ")", ",", "thres...
Adds performance data to the plugin result. Thos data will be added to the output formatted as specified in Nagios specifications (http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201) @param metric The metric relative to this result @param threshold The treshold to be evaluated @return this
[ "Adds", "performance", "data", "to", "the", "plugin", "result", ".", "Thos", "data", "will", "be", "added", "to", "the", "output", "formatted", "as", "specified", "in", "Nagios", "specifications", "(", "http", ":", "//", "nagiosplug", ".", "sourceforge", "."...
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/ReturnValue.java#L254-L258
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addNotLike
public void addNotLike(String attribute, Object value) { """ Adds Like (NOT LIKE) criteria, customer_id NOT LIKE 10034 @see LikeCriteria @param attribute The field name to be used @param value An object representing the value of the field """ // PAW // addSelectionCriteria(ValueCriteria.b...
java
public void addNotLike(String attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildNotLikeCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildNotLikeCriteria(attribute, value, getUserAlias(attribute))); }
[ "public", "void", "addNotLike", "(", "String", "attribute", ",", "Object", "value", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildNotLikeCriteria(attribute, value, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildNotLikeCriteria", "("...
Adds Like (NOT LIKE) criteria, customer_id NOT LIKE 10034 @see LikeCriteria @param attribute The field name to be used @param value An object representing the value of the field
[ "Adds", "Like", "(", "NOT", "LIKE", ")", "criteria", "customer_id", "NOT", "LIKE", "10034" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L479-L484
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_outplanNotification_id_GET
public OvhConsumptionThreshold billingAccount_outplanNotification_id_GET(String billingAccount, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/outplanNotification/{id} @param billingAccount [required] The name of your billingAccount @param id [required] Id o...
java
public OvhConsumptionThreshold billingAccount_outplanNotification_id_GET(String billingAccount, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/outplanNotification/{id}"; StringBuilder sb = path(qPath, billingAccount, id); String resp = exec(qPath, "GET", sb.toString(), null); return c...
[ "public", "OvhConsumptionThreshold", "billingAccount_outplanNotification_id_GET", "(", "String", "billingAccount", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/outplanNotification/{id}\"", ";", "StringBuilder", "sb...
Get this object properties REST: GET /telephony/{billingAccount}/outplanNotification/{id} @param billingAccount [required] The name of your billingAccount @param id [required] Id of the object
[ "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#L8346-L8351
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java
Configuration.setDynamicNameMapping
public void setDynamicNameMapping(NameMapping nameMapping) { """ Programmers can specify name mappings by implementing the {@link NameMapping} interface. The mapping rules that are specified by this property are checked if no mapping is specified by any of the <code>register*Override</code> functions. @param...
java
public void setDynamicNameMapping(NameMapping nameMapping) { if (nameMapping == null) { this.nameMapping = this.internalNameMapping; } else { this.nameMapping = new ChainedNameMapping(this.internalNameMapping, nameMapping); } }
[ "public", "void", "setDynamicNameMapping", "(", "NameMapping", "nameMapping", ")", "{", "if", "(", "nameMapping", "==", "null", ")", "{", "this", ".", "nameMapping", "=", "this", ".", "internalNameMapping", ";", "}", "else", "{", "this", ".", "nameMapping", ...
Programmers can specify name mappings by implementing the {@link NameMapping} interface. The mapping rules that are specified by this property are checked if no mapping is specified by any of the <code>register*Override</code> functions. @param nameMapping The name mapping that is implemented by the user.
[ "Programmers", "can", "specify", "name", "mappings", "by", "implementing", "the", "{", "@link", "NameMapping", "}", "interface", ".", "The", "mapping", "rules", "that", "are", "specified", "by", "this", "property", "are", "checked", "if", "no", "mapping", "is"...
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java#L233-L239
jetty-project/jetty-npn
npn-boot/src/main/java/sun/security/ssl/Handshaker.java
Handshaker.process_record
void process_record(InputRecord r, boolean expectingFinished) throws IOException { """ /* This routine is fed SSL handshake records when they become available, and processes messages found therein. """ checkThrown(); /* * Store the incoming handshake data, then see if w...
java
void process_record(InputRecord r, boolean expectingFinished) throws IOException { checkThrown(); /* * Store the incoming handshake data, then see if we can * now process any completed handshake messages */ input.incomingRecord(r); /* * ...
[ "void", "process_record", "(", "InputRecord", "r", ",", "boolean", "expectingFinished", ")", "throws", "IOException", "{", "checkThrown", "(", ")", ";", "/*\n * Store the incoming handshake data, then see if we can\n * now process any completed handshake messages\n ...
/* This routine is fed SSL handshake records when they become available, and processes messages found therein.
[ "/", "*", "This", "routine", "is", "fed", "SSL", "handshake", "records", "when", "they", "become", "available", "and", "processes", "messages", "found", "therein", "." ]
train
https://github.com/jetty-project/jetty-npn/blob/a26a7a5eabeeb57a63c6ee08fcf9b8cec1fa6c0d/npn-boot/src/main/java/sun/security/ssl/Handshaker.java#L837-L862
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java
NameHelper.getGetterName
public String getGetterName(String propertyName, JType type, JsonNode node) { """ Generate getter method name for property. @param propertyName @param type @param node @return """ propertyName = getPropertyNameForAccessor(propertyName, node); String prefix = type.equals(type.owner()._ref...
java
public String getGetterName(String propertyName, JType type, JsonNode node) { propertyName = getPropertyNameForAccessor(propertyName, node); String prefix = type.equals(type.owner()._ref(boolean.class)) ? "is" : "get"; String getterName; if (propertyName.length() > 1 && Character.isUpp...
[ "public", "String", "getGetterName", "(", "String", "propertyName", ",", "JType", "type", ",", "JsonNode", "node", ")", "{", "propertyName", "=", "getPropertyNameForAccessor", "(", "propertyName", ",", "node", ")", ";", "String", "prefix", "=", "type", ".", "e...
Generate getter method name for property. @param propertyName @param type @param node @return
[ "Generate", "getter", "method", "name", "for", "property", "." ]
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/NameHelper.java#L197-L214
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java
MLLibUtil.fromLabeledPoint
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels) { """ Converts JavaRDD labeled points to JavaRDD datasets. @param data JavaRDD LabeledPoints @param numPossibleLabels number of possible labels @return """ return fromLabeledPoint(data, numPossi...
java
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels) { return fromLabeledPoint(data, numPossibleLabels, false); }
[ "public", "static", "JavaRDD", "<", "DataSet", ">", "fromLabeledPoint", "(", "JavaRDD", "<", "LabeledPoint", ">", "data", ",", "final", "long", "numPossibleLabels", ")", "{", "return", "fromLabeledPoint", "(", "data", ",", "numPossibleLabels", ",", "false", ")",...
Converts JavaRDD labeled points to JavaRDD datasets. @param data JavaRDD LabeledPoints @param numPossibleLabels number of possible labels @return
[ "Converts", "JavaRDD", "labeled", "points", "to", "JavaRDD", "datasets", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java#L347-L349
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/TemplateRest.java
TemplateRest.getTemplates
@GET @Produces(MediaType.APPLICATION_XML) public Response getTemplates() { """ Gets a the list of available templates from where we can get metrics, host information, etc. <pre> GET /templates Request: GET /templates HTTP/1.1 Response: HTTP/1.1 200 Ok {@code <?xml version="1.0" encoding="U...
java
@GET @Produces(MediaType.APPLICATION_XML) public Response getTemplates() { logger.debug("StartOf getTemplates - REQUEST for /templates"); TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = null; try { serializedTemplate = templateR...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_XML", ")", "public", "Response", "getTemplates", "(", ")", "{", "logger", ".", "debug", "(", "\"StartOf getTemplates - REQUEST for /templates\"", ")", ";", "TemplateHelper", "templateRestService", "=", ...
Gets a the list of available templates from where we can get metrics, host information, etc. <pre> GET /templates Request: GET /templates HTTP/1.1 Response: HTTP/1.1 200 Ok {@code <?xml version="1.0" encoding="UTF-8"?> <collection href="/templates"> <items offset="0" total="1"> <wsag:Template>...</wsag:Template> .....
[ "Gets", "a", "the", "list", "of", "available", "templates", "from", "where", "we", "can", "get", "metrics", "host", "information", "etc", "." ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/TemplateRest.java#L148-L164
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/minimizer/hopcroft/HopcroftMinimization.java
HopcroftMinimization.minimizeDFA
public static <I> CompactDFA<I> minimizeDFA(DFA<?, I> dfa, Alphabet<I> alphabet, PruningMode pruningMode) { """ Minimizes the given DFA. The result is returned in the form of a {@link CompactDFA}. @param dfa the DFA to minimize @param alphabet the input alphabet (this will be the input alphabet of the return...
java
public static <I> CompactDFA<I> minimizeDFA(DFA<?, I> dfa, Alphabet<I> alphabet, PruningMode pruningMode) { return doMinimizeDFA(dfa, alphabet, new CompactDFA.Creator<>(), pruningMode); }
[ "public", "static", "<", "I", ">", "CompactDFA", "<", "I", ">", "minimizeDFA", "(", "DFA", "<", "?", ",", "I", ">", "dfa", ",", "Alphabet", "<", "I", ">", "alphabet", ",", "PruningMode", "pruningMode", ")", "{", "return", "doMinimizeDFA", "(", "dfa", ...
Minimizes the given DFA. The result is returned in the form of a {@link CompactDFA}. @param dfa the DFA to minimize @param alphabet the input alphabet (this will be the input alphabet of the returned DFA) @param pruningMode the pruning mode (see above) @return a minimized version of the specified DFA
[ "Minimizes", "the", "given", "DFA", ".", "The", "result", "is", "returned", "in", "the", "form", "of", "a", "{", "@link", "CompactDFA", "}", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/minimizer/hopcroft/HopcroftMinimization.java#L176-L178
Jasig/uPortal
uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PermissionTargetProviderRegistryImpl.java
PermissionTargetProviderRegistryImpl.setProviders
public void setProviders(Map<String, IPermissionTargetProvider> providers) { """ Construct a new target provider registry and initialize it with the supplied map of key -> provider pairs. @param providers """ this.providers.clear(); for (Map.Entry<String, IPermissionTargetProvider> provider...
java
public void setProviders(Map<String, IPermissionTargetProvider> providers) { this.providers.clear(); for (Map.Entry<String, IPermissionTargetProvider> provider : providers.entrySet()) { this.providers.put(provider.getKey(), provider.getValue()); } }
[ "public", "void", "setProviders", "(", "Map", "<", "String", ",", "IPermissionTargetProvider", ">", "providers", ")", "{", "this", ".", "providers", ".", "clear", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "IPermissionTargetProvider"...
Construct a new target provider registry and initialize it with the supplied map of key -> provider pairs. @param providers
[ "Construct", "a", "new", "target", "provider", "registry", "and", "initialize", "it", "with", "the", "supplied", "map", "of", "key", "-", ">", "provider", "pairs", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PermissionTargetProviderRegistryImpl.java#L42-L47
fernandospr/javapns-jdk16
src/main/java/javapns/communication/ProxyManager.java
ProxyManager.setProxy
public static void setProxy(String host, String port) { """ Configure a proxy to use for HTTPS connections created by JavaPNS. @param host the proxyHost @param port the proxyPort """ System.setProperty(LOCAL_PROXY_HOST_PROPERTY, host); System.setProperty(LOCAL_PROXY_PORT_PROPERTY, port); }
java
public static void setProxy(String host, String port) { System.setProperty(LOCAL_PROXY_HOST_PROPERTY, host); System.setProperty(LOCAL_PROXY_PORT_PROPERTY, port); }
[ "public", "static", "void", "setProxy", "(", "String", "host", ",", "String", "port", ")", "{", "System", ".", "setProperty", "(", "LOCAL_PROXY_HOST_PROPERTY", ",", "host", ")", ";", "System", ".", "setProperty", "(", "LOCAL_PROXY_PORT_PROPERTY", ",", "port", ...
Configure a proxy to use for HTTPS connections created by JavaPNS. @param host the proxyHost @param port the proxyPort
[ "Configure", "a", "proxy", "to", "use", "for", "HTTPS", "connections", "created", "by", "JavaPNS", "." ]
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/communication/ProxyManager.java#L27-L30
carewebframework/carewebframework-vista
org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/RPCParameter.java
RPCParameter.put
public void put(String subscript, Object value) { """ Adds (or removes) a vector value at the specified subscript. @param subscript Subscript specifier @param value Value (if null, any existing value is removed). """ if (value == null) { values.remove(subscript); } else { ...
java
public void put(String subscript, Object value) { if (value == null) { values.remove(subscript); } else { values.put(subscript, value); } }
[ "public", "void", "put", "(", "String", "subscript", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "values", ".", "remove", "(", "subscript", ")", ";", "}", "else", "{", "values", ".", "put", "(", "subscript", ",", "...
Adds (or removes) a vector value at the specified subscript. @param subscript Subscript specifier @param value Value (if null, any existing value is removed).
[ "Adds", "(", "or", "removes", ")", "a", "vector", "value", "at", "the", "specified", "subscript", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/RPCParameter.java#L172-L178
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.extractDataRoot
public static String extractDataRoot(String publicURL, String accessURL) { """ Extracts container name from http://hostname/v1/auth_id/container/object @param publicURL public url @param accessURL access url @return container name """ if (publicURL != null && !publicURL.startsWith("http")) { ret...
java
public static String extractDataRoot(String publicURL, String accessURL) { if (publicURL != null && !publicURL.startsWith("http")) { return ""; } String reminder = publicURL.substring(accessURL.length() + 1); String container = null; if (reminder.indexOf("/") > 0) { container = reminder...
[ "public", "static", "String", "extractDataRoot", "(", "String", "publicURL", ",", "String", "accessURL", ")", "{", "if", "(", "publicURL", "!=", "null", "&&", "!", "publicURL", ".", "startsWith", "(", "\"http\"", ")", ")", "{", "return", "\"\"", ";", "}", ...
Extracts container name from http://hostname/v1/auth_id/container/object @param publicURL public url @param accessURL access url @return container name
[ "Extracts", "container", "name", "from", "http", ":", "//", "hostname", "/", "v1", "/", "auth_id", "/", "container", "/", "object" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L434-L449
killbill/killbill
payment/src/main/java/org/killbill/billing/payment/caching/DefaultStateMachineConfigCache.java
DefaultStateMachineConfigCache.getCacheKeyName
private String getCacheKeyName(final String pluginName, final InternalTenantContext internalContext) { """ See also DefaultTenantUserApi - we use the same conventions as the main XML cache (so we can re-use the invalidation code) """ final StringBuilder tenantKey = new StringBuilder(TenantKey.PLUGIN_PA...
java
private String getCacheKeyName(final String pluginName, final InternalTenantContext internalContext) { final StringBuilder tenantKey = new StringBuilder(TenantKey.PLUGIN_PAYMENT_STATE_MACHINE_.toString()); tenantKey.append(pluginName); tenantKey.append(CacheControllerDispatcher.CACHE_KEY_SEPARAT...
[ "private", "String", "getCacheKeyName", "(", "final", "String", "pluginName", ",", "final", "InternalTenantContext", "internalContext", ")", "{", "final", "StringBuilder", "tenantKey", "=", "new", "StringBuilder", "(", "TenantKey", ".", "PLUGIN_PAYMENT_STATE_MACHINE_", ...
See also DefaultTenantUserApi - we use the same conventions as the main XML cache (so we can re-use the invalidation code)
[ "See", "also", "DefaultTenantUserApi", "-", "we", "use", "the", "same", "conventions", "as", "the", "main", "XML", "cache", "(", "so", "we", "can", "re", "-", "use", "the", "invalidation", "code", ")" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/payment/src/main/java/org/killbill/billing/payment/caching/DefaultStateMachineConfigCache.java#L115-L121
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java
KnowledgeOperations.containsGlobals
public static boolean containsGlobals(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { """ Contains the globals. @param message the message @param operation the operation @param runtime the runtime engine @return containsGlobal """ Map<String, Object> expression...
java
public static boolean containsGlobals(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { Map<String, Object> expressionMap = getMap(message, operation.getGlobalExpressionMappings(), null); return expressionMap != null && expressionMap.size() > 0; }
[ "public", "static", "boolean", "containsGlobals", "(", "Message", "message", ",", "KnowledgeOperation", "operation", ",", "KnowledgeRuntimeEngine", "runtime", ")", "{", "Map", "<", "String", ",", "Object", ">", "expressionMap", "=", "getMap", "(", "message", ",", ...
Contains the globals. @param message the message @param operation the operation @param runtime the runtime engine @return containsGlobal
[ "Contains", "the", "globals", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java#L160-L164
MaxLeap/SDK-CloudCode-Java
cloud-code-sdk/src/main/java/com/maxleap/code/impl/WebUtils.java
WebUtils.doGet
public static String doGet(String url, Map<String, String> header, Map<String, String> params) throws IOException { """ 执行HTTP GET请求。 @param url 请求地址 @param params 请求参数 @return 响应字符串 @throws IOException """ return doRequestWithUrl(url, METHOD_GET, header, params, DEFAULT_CHARSET); }
java
public static String doGet(String url, Map<String, String> header, Map<String, String> params) throws IOException { return doRequestWithUrl(url, METHOD_GET, header, params, DEFAULT_CHARSET); }
[ "public", "static", "String", "doGet", "(", "String", "url", ",", "Map", "<", "String", ",", "String", ">", "header", ",", "Map", "<", "String", ",", "String", ">", "params", ")", "throws", "IOException", "{", "return", "doRequestWithUrl", "(", "url", ",...
执行HTTP GET请求。 @param url 请求地址 @param params 请求参数 @return 响应字符串 @throws IOException
[ "执行HTTP", "GET请求。" ]
train
https://github.com/MaxLeap/SDK-CloudCode-Java/blob/756064c65dd613919c377bf136cf8710c7507968/cloud-code-sdk/src/main/java/com/maxleap/code/impl/WebUtils.java#L139-L141
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectWidth
public int getObjectWidth(int groupID, int objectID) { """ Returns the width of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The width of an object, or -1, when error occurred """ if (groupID >= 0 && groupID < objectGroups.size())...
java
public int getObjectWidth(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); return object.wi...
[ "public", "int", "getObjectWidth", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "obj...
Returns the width of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The width of an object, or -1, when error occurred
[ "Returns", "the", "width", "of", "a", "specific", "object", "from", "a", "specific", "group", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L886-L895
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java
XMLAssert.assertXMLNotEqual
public static void assertXMLNotEqual(Reader control, Reader test) throws SAXException, IOException { """ Assert that two XML documents are NOT similar @param control XML to be compared against @param test XML to be tested @throws SAXException @throws IOException """ assertXMLNotEqual(null, ...
java
public static void assertXMLNotEqual(Reader control, Reader test) throws SAXException, IOException { assertXMLNotEqual(null, control, test); }
[ "public", "static", "void", "assertXMLNotEqual", "(", "Reader", "control", ",", "Reader", "test", ")", "throws", "SAXException", ",", "IOException", "{", "assertXMLNotEqual", "(", "null", ",", "control", ",", "test", ")", ";", "}" ]
Assert that two XML documents are NOT similar @param control XML to be compared against @param test XML to be tested @throws SAXException @throws IOException
[ "Assert", "that", "two", "XML", "documents", "are", "NOT", "similar" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java#L302-L305
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableModel.java
PathfindableModel.assignObjectId
private void assignObjectId(int dtx, int dty) { """ Assign the map object id of the pathfindable. @param dtx The tile horizontal destination. @param dty The tile vertical destination. """ final int tw = transformable.getWidth() / map.getTileWidth(); final int th = transformable.getHeight() ...
java
private void assignObjectId(int dtx, int dty) { final int tw = transformable.getWidth() / map.getTileWidth(); final int th = transformable.getHeight() / map.getTileHeight(); for (int tx = dtx; tx < dtx + tw; tx++) { for (int ty = dty; ty < dty + th; ty++) { ...
[ "private", "void", "assignObjectId", "(", "int", "dtx", ",", "int", "dty", ")", "{", "final", "int", "tw", "=", "transformable", ".", "getWidth", "(", ")", "/", "map", ".", "getTileWidth", "(", ")", ";", "final", "int", "th", "=", "transformable", ".",...
Assign the map object id of the pathfindable. @param dtx The tile horizontal destination. @param dty The tile vertical destination.
[ "Assign", "the", "map", "object", "id", "of", "the", "pathfindable", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableModel.java#L167-L179
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java
FileHelper.getDirectoryContent
@Nonnull @ReturnsMutableCopy public static ICommonsList <File> getDirectoryContent (@Nonnull final File aDirectory, @Nonnull final FilenameFilter aFilenameFilter) { """ This is a replacement for <code>File.listFiles(FilenameFilter)</code> doing some add...
java
@Nonnull @ReturnsMutableCopy public static ICommonsList <File> getDirectoryContent (@Nonnull final File aDirectory, @Nonnull final FilenameFilter aFilenameFilter) { ValueEnforcer.notNull (aDirectory, "Directory"); ValueEnforcer.notNull (aFilenameFil...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "ICommonsList", "<", "File", ">", "getDirectoryContent", "(", "@", "Nonnull", "final", "File", "aDirectory", ",", "@", "Nonnull", "final", "FilenameFilter", "aFilenameFilter", ")", "{", "ValueEnforcer", ...
This is a replacement for <code>File.listFiles(FilenameFilter)</code> doing some additional checks on permissions. The order of the returned files is defined by the underlying {@link File#listFiles(FilenameFilter)} method. @param aDirectory The directory to be listed. May not be <code>null</code>. @param aFilenameFilt...
[ "This", "is", "a", "replacement", "for", "<code", ">", "File", ".", "listFiles", "(", "FilenameFilter", ")", "<", "/", "code", ">", "doing", "some", "additional", "checks", "on", "permissions", ".", "The", "order", "of", "the", "returned", "files", "is", ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java#L710-L719
realexpayments/rxp-hpp-java
src/main/java/com/realexpayments/hpp/sdk/utils/JsonUtils.java
JsonUtils.fromJsonHppRequest
public static HppRequest fromJsonHppRequest(String json) { """ Method deserialises JSON to <code>HppRequest</code>. @param json @return HppRequest """ try { return hppRequestReader.readValue(json); } catch (Exception ex) { LOGGER.error("Error creating HppRequest from JSON.", ex); throw new Rea...
java
public static HppRequest fromJsonHppRequest(String json) { try { return hppRequestReader.readValue(json); } catch (Exception ex) { LOGGER.error("Error creating HppRequest from JSON.", ex); throw new RealexException("Error creating HppRequest from JSON.", ex); } }
[ "public", "static", "HppRequest", "fromJsonHppRequest", "(", "String", "json", ")", "{", "try", "{", "return", "hppRequestReader", ".", "readValue", "(", "json", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "LOGGER", ".", "error", "(", "\"Erro...
Method deserialises JSON to <code>HppRequest</code>. @param json @return HppRequest
[ "Method", "deserialises", "JSON", "to", "<code", ">", "HppRequest<", "/", "code", ">", "." ]
train
https://github.com/realexpayments/rxp-hpp-java/blob/29cc5df036af09a6d8ea16ccd7e02e856f72620f/src/main/java/com/realexpayments/hpp/sdk/utils/JsonUtils.java#L93-L100
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java
SvgGraphicsContext.drawGroup
public void drawGroup(Object parent, Object object) { """ Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements together. @param parent parent group object @param object group object """ if (isAttached()) { helper.createOrUpdateGroup(paren...
java
public void drawGroup(Object parent, Object object) { if (isAttached()) { helper.createOrUpdateGroup(parent, object, null, null); } }
[ "public", "void", "drawGroup", "(", "Object", "parent", ",", "Object", "object", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "helper", ".", "createOrUpdateGroup", "(", "parent", ",", "object", ",", "null", ",", "null", ")", ";", "}", "}" ]
Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements together. @param parent parent group object @param object group object
[ "Creates", "a", "group", "element", "in", "the", "technology", "(", "SVG", "/", "VML", "/", "...", ")", "of", "this", "context", ".", "A", "group", "is", "meant", "to", "group", "other", "elements", "together", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L177-L181
jimmoores/quandl4j
core/src/main/java/com/jimmoores/quandl/MetaDataResult.java
MetaDataResult.getOffsetDateTime
public OffsetDateTime getOffsetDateTime(final String fieldName) { """ Get a LocalDate field (converted from a String internally). Throws a QuandlRuntimeException if it cannot find the field @param fieldName the name of the field @return the field value, or null if the field is null """ try { if (...
java
public OffsetDateTime getOffsetDateTime(final String fieldName) { try { if (_jsonObject.isNull(fieldName)) { return null; } else { return OffsetDateTime.parse(_jsonObject.getString(fieldName), DATE_TIME_FORMATTER); } } catch (JSONException ex) { throw new QuandlRuntimeExc...
[ "public", "OffsetDateTime", "getOffsetDateTime", "(", "final", "String", "fieldName", ")", "{", "try", "{", "if", "(", "_jsonObject", ".", "isNull", "(", "fieldName", ")", ")", "{", "return", "null", ";", "}", "else", "{", "return", "OffsetDateTime", ".", ...
Get a LocalDate field (converted from a String internally). Throws a QuandlRuntimeException if it cannot find the field @param fieldName the name of the field @return the field value, or null if the field is null
[ "Get", "a", "LocalDate", "field", "(", "converted", "from", "a", "String", "internally", ")", ".", "Throws", "a", "QuandlRuntimeException", "if", "it", "cannot", "find", "the", "field" ]
train
https://github.com/jimmoores/quandl4j/blob/5d67ae60279d889da93ae7aa3bf6b7d536f88822/core/src/main/java/com/jimmoores/quandl/MetaDataResult.java#L121-L131
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java
HazardCurve.createHazardCurveFromHazardRate
public static HazardCurve createHazardCurveFromHazardRate( String name, Date referenceDate, double[] times, double[] givenHazardRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { """ Create a hazard cur...
java
public static HazardCurve createHazardCurveFromHazardRate( String name, Date referenceDate, double[] times, double[] givenHazardRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { LocalDate referenceDataAs...
[ "public", "static", "HazardCurve", "createHazardCurveFromHazardRate", "(", "String", "name", ",", "Date", "referenceDate", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenHazardRates", ",", "boolean", "[", "]", "isParameter", ",", "InterpolationMe...
Create a hazard curve from given times and given zero rates using given interpolation and extrapolation methods. The discount factor is determined by <code> givenSurvivalProbabilities[timeIndex] = givenSurvivalProbabilities[timeIndex-1] * Math.exp(- givenHazardRates[timeIndex] * (times[timeIndex]-times[timeIndex-1])); ...
[ "Create", "a", "hazard", "curve", "from", "given", "times", "and", "given", "zero", "rates", "using", "given", "interpolation", "and", "extrapolation", "methods", ".", "The", "discount", "factor", "is", "determined", "by", "<code", ">", "givenSurvivalProbabilities...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java#L226-L233
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newActionLabel
public static Label newActionLabel (String text, ClickHandler onClick) { """ Creates a label that triggers an action using the supplied text and handler. """ return newActionLabel(text, null, onClick); }
java
public static Label newActionLabel (String text, ClickHandler onClick) { return newActionLabel(text, null, onClick); }
[ "public", "static", "Label", "newActionLabel", "(", "String", "text", ",", "ClickHandler", "onClick", ")", "{", "return", "newActionLabel", "(", "text", ",", "null", ",", "onClick", ")", ";", "}" ]
Creates a label that triggers an action using the supplied text and handler.
[ "Creates", "a", "label", "that", "triggers", "an", "action", "using", "the", "supplied", "text", "and", "handler", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L194-L197
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java
DateSpinner.setSelectedDate
public void setSelectedDate(@NonNull Calendar date) { """ Sets the Spinner's selection as date. If the date was not in the possible selections, a temporary item is created and passed to selectTemporary(). @param date The date to be selected. """ final int count = getAdapter().getCount() - 1; ...
java
public void setSelectedDate(@NonNull Calendar date) { final int count = getAdapter().getCount() - 1; int itemPosition = -1; for(int i=0; i<count; i++) { if(getAdapter().getItem(i).equals(date)) { // because DateItem deeply compares to calendar itemPosition = i; ...
[ "public", "void", "setSelectedDate", "(", "@", "NonNull", "Calendar", "date", ")", "{", "final", "int", "count", "=", "getAdapter", "(", ")", ".", "getCount", "(", ")", "-", "1", ";", "int", "itemPosition", "=", "-", "1", ";", "for", "(", "int", "i",...
Sets the Spinner's selection as date. If the date was not in the possible selections, a temporary item is created and passed to selectTemporary(). @param date The date to be selected.
[ "Sets", "the", "Spinner", "s", "selection", "as", "date", ".", "If", "the", "date", "was", "not", "in", "the", "possible", "selections", "a", "temporary", "item", "is", "created", "and", "passed", "to", "selectTemporary", "()", "." ]
train
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java#L260-L292
jscep/jscep
src/main/java/org/jscep/client/Client.java
Client.getCertificate
public CertStore getCertificate(final X509Certificate identity, final PrivateKey key, final BigInteger serial) throws ClientException, OperationFailureException { """ Retrieves the certificate corresponding to the provided serial number. <p> This request relates only to the current CA cer...
java
public CertStore getCertificate(final X509Certificate identity, final PrivateKey key, final BigInteger serial) throws ClientException, OperationFailureException { return getCertificate(identity, key, serial, null); }
[ "public", "CertStore", "getCertificate", "(", "final", "X509Certificate", "identity", ",", "final", "PrivateKey", "key", ",", "final", "BigInteger", "serial", ")", "throws", "ClientException", ",", "OperationFailureException", "{", "return", "getCertificate", "(", "id...
Retrieves the certificate corresponding to the provided serial number. <p> This request relates only to the current CA certificate. If the CA certificate has changed since the requested certificate was issued, this operation will fail. @param identity the identity of the client. @param key the private key to sign the ...
[ "Retrieves", "the", "certificate", "corresponding", "to", "the", "provided", "serial", "number", ".", "<p", ">", "This", "request", "relates", "only", "to", "the", "current", "CA", "certificate", ".", "If", "the", "CA", "certificate", "has", "changed", "since"...
train
https://github.com/jscep/jscep/blob/d2c602f8b3adb774704c24eaf62f6b8654a40e35/src/main/java/org/jscep/client/Client.java#L495-L499
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/SqlClosureElf.java
SqlClosureElf.countObjectsFromClause
public static <T> int countObjectsFromClause(Class<T> clazz, String clause, Object... args) { """ Counts the number of rows for the given query. @param clazz the class of the object to query. @param clause The conditional part of a SQL where clause. @param args The query parameters used to find the list of ob...
java
public static <T> int countObjectsFromClause(Class<T> clazz, String clause, Object... args) { return SqlClosure.sqlExecute(c -> OrmElf.countObjectsFromClause(c, clazz, clause, args)); }
[ "public", "static", "<", "T", ">", "int", "countObjectsFromClause", "(", "Class", "<", "T", ">", "clazz", ",", "String", "clause", ",", "Object", "...", "args", ")", "{", "return", "SqlClosure", ".", "sqlExecute", "(", "c", "->", "OrmElf", ".", "countObj...
Counts the number of rows for the given query. @param clazz the class of the object to query. @param clause The conditional part of a SQL where clause. @param args The query parameters used to find the list of objects. @param <T> the type of object to query. @return The result count.
[ "Counts", "the", "number", "of", "rows", "for", "the", "given", "query", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/SqlClosureElf.java#L128-L131
haifengl/smile
math/src/main/java/smile/math/matrix/BiconjugateGradient.java
BiconjugateGradient.snorm
private static double snorm(double[] x, int itol) { """ Compute L2 or L-infinity norms for a vector x, as signaled by itol. """ int n = x.length; if (itol <= 3) { double ans = 0.0; for (int i = 0; i < n; i++) { ans += x[i] * x[i]; } ...
java
private static double snorm(double[] x, int itol) { int n = x.length; if (itol <= 3) { double ans = 0.0; for (int i = 0; i < n; i++) { ans += x[i] * x[i]; } return Math.sqrt(ans); } else { int isamax = 0; fo...
[ "private", "static", "double", "snorm", "(", "double", "[", "]", "x", ",", "int", "itol", ")", "{", "int", "n", "=", "x", ".", "length", ";", "if", "(", "itol", "<=", "3", ")", "{", "double", "ans", "=", "0.0", ";", "for", "(", "int", "i", "=...
Compute L2 or L-infinity norms for a vector x, as signaled by itol.
[ "Compute", "L2", "or", "L", "-", "infinity", "norms", "for", "a", "vector", "x", "as", "signaled", "by", "itol", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/matrix/BiconjugateGradient.java#L291-L310
Omertron/api-thetvdb
src/main/java/com/omertron/thetvdbapi/tools/DOMHelper.java
DOMHelper.writeDocumentToFile
public static boolean writeDocumentToFile(Document doc, String localFile) { """ Write the Document out to a file using nice formatting @param doc The document to save @param localFile The file to write to @return """ try { TransformerFactory transfact = TransformerFactory.newInstance()...
java
public static boolean writeDocumentToFile(Document doc, String localFile) { try { TransformerFactory transfact = TransformerFactory.newInstance(); Transformer trans = transfact.newTransformer(); trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, YES); trans....
[ "public", "static", "boolean", "writeDocumentToFile", "(", "Document", "doc", ",", "String", "localFile", ")", "{", "try", "{", "TransformerFactory", "transfact", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "Transformer", "trans", "=", "transfact...
Write the Document out to a file using nice formatting @param doc The document to save @param localFile The file to write to @return
[ "Write", "the", "Document", "out", "to", "a", "file", "using", "nice", "formatting" ]
train
https://github.com/Omertron/api-thetvdb/blob/2ff9f9580e76043f19d2fc3234d87e16a95fa485/src/main/java/com/omertron/thetvdbapi/tools/DOMHelper.java#L204-L219
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/Configuration.java
Configuration.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { """ Returns the value associated with the given key as a boolean. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (def...
java
public boolean getBoolean(String key, boolean defaultValue) { String val = getStringInternal(key); if (val == null) { return defaultValue; } else { return Boolean.parseBoolean(val); } }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "val", "=", "getStringInternal", "(", "key", ")", ";", "if", "(", "val", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "else", "{",...
Returns the value associated with the given key as a boolean. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "boolean", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/Configuration.java#L242-L249
googleapis/google-cloud-java
google-cloud-clients/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java
RecaptchaEnterpriseServiceV1Beta1Client.createAssessment
public final Assessment createAssessment(ProjectName parent, Assessment assessment) { """ Creates an Assessment of the likelihood an event is legitimate. <p>Sample code: <pre><code> try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client...
java
public final Assessment createAssessment(ProjectName parent, Assessment assessment) { CreateAssessmentRequest request = CreateAssessmentRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setAssessment(assessment) .build(); return createAssess...
[ "public", "final", "Assessment", "createAssessment", "(", "ProjectName", "parent", ",", "Assessment", "assessment", ")", "{", "CreateAssessmentRequest", "request", "=", "CreateAssessmentRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "n...
Creates an Assessment of the likelihood an event is legitimate. <p>Sample code: <pre><code> try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); Assessment assessment = Assessment.ne...
[ "Creates", "an", "Assessment", "of", "the", "likelihood", "an", "event", "is", "legitimate", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java#L179-L187
twitter/scrooge
scrooge-maven-plugin/src/main/java/com/twitter/AbstractMavenScroogeMojo.java
AbstractMavenScroogeMojo.getRecursiveThriftFiles
protected List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory) throws IOException { """ Walk project references recursively, building up a list of thrift files they provide, starting with an empty file list. """ return getRecursiveThriftFiles(project, outputDirectory, new Array...
java
protected List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory) throws IOException { return getRecursiveThriftFiles(project, outputDirectory, new ArrayList<File>()); }
[ "protected", "List", "<", "File", ">", "getRecursiveThriftFiles", "(", "MavenProject", "project", ",", "String", "outputDirectory", ")", "throws", "IOException", "{", "return", "getRecursiveThriftFiles", "(", "project", ",", "outputDirectory", ",", "new", "ArrayList",...
Walk project references recursively, building up a list of thrift files they provide, starting with an empty file list.
[ "Walk", "project", "references", "recursively", "building", "up", "a", "list", "of", "thrift", "files", "they", "provide", "starting", "with", "an", "empty", "file", "list", "." ]
train
https://github.com/twitter/scrooge/blob/2aec9b19a610e12be9609cd97925d0b1284d48bc/scrooge-maven-plugin/src/main/java/com/twitter/AbstractMavenScroogeMojo.java#L488-L490
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/executors/JdkRejectedExecutionHandler.java
JdkRejectedExecutionHandler.runRejectedTask
protected static boolean runRejectedTask(Runnable runnable, ThreadPoolExecutor executor) { """ Run the given task within the current thread if the executor is not shut down. The task is not run by the given executor. The executor is used for checking if the executor service is shut down. @param runnable the r...
java
protected static boolean runRejectedTask(Runnable runnable, ThreadPoolExecutor executor) { // Runs the task directly in the calling thread of the {@code execute} method, // unless the executor has been shut down, in which case the task // is discarded. if (!executor.isShutdown()) { runnable.run(); return ...
[ "protected", "static", "boolean", "runRejectedTask", "(", "Runnable", "runnable", ",", "ThreadPoolExecutor", "executor", ")", "{", "// Runs the task directly in the calling thread of the {@code execute} method,", "// unless the executor has been shut down, in which case the task", "// is...
Run the given task within the current thread if the executor is not shut down. The task is not run by the given executor. The executor is used for checking if the executor service is shut down. @param runnable the runnable task to be executed @param executor the executor attempting to give the shut down status @return...
[ "Run", "the", "given", "task", "within", "the", "current", "thread", "if", "the", "executor", "is", "not", "shut", "down", ".", "The", "task", "is", "not", "run", "by", "the", "given", "executor", ".", "The", "executor", "is", "used", "for", "checking", ...
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/executors/JdkRejectedExecutionHandler.java#L79-L88
olavloite/spanner-jdbc
src/main/java/nl/topicus/jdbc/CloudSpannerDriver.java
CloudSpannerDriver.getSpanner
synchronized Spanner getSpanner(String projectId, Credentials credentials, String host) { """ Get a {@link Spanner} instance from the pool or create a new one if needed. @param projectId The projectId to connect to @param credentials The credentials to use for the connection @param host The host to connect to...
java
synchronized Spanner getSpanner(String projectId, Credentials credentials, String host) { SpannerKey key = SpannerKey.of(host, projectId, credentials); Spanner spanner = spanners.get(key); if (spanner == null) { spanner = createSpanner(key); spanners.put(key, spanner); } return sp...
[ "synchronized", "Spanner", "getSpanner", "(", "String", "projectId", ",", "Credentials", "credentials", ",", "String", "host", ")", "{", "SpannerKey", "key", "=", "SpannerKey", ".", "of", "(", "host", ",", "projectId", ",", "credentials", ")", ";", "Spanner", ...
Get a {@link Spanner} instance from the pool or create a new one if needed. @param projectId The projectId to connect to @param credentials The credentials to use for the connection @param host The host to connect to. Normally this is https://spanner.googleapis.com, but you could also use a (local) emulator. If null, ...
[ "Get", "a", "{", "@link", "Spanner", "}", "instance", "from", "the", "pool", "or", "create", "a", "new", "one", "if", "needed", "." ]
train
https://github.com/olavloite/spanner-jdbc/blob/b65a5185300580b143866e57501a1ea606b59aa5/src/main/java/nl/topicus/jdbc/CloudSpannerDriver.java#L220-L228
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java
ColumnLayoutExample.addAutoWidthExample
private void addAutoWidthExample() { """ This example shows a column which does not have widths set in Java. This is a "good thing": widths should be set in CSS. """ add(new WHeading(HeadingLevel.H2, "Automatic (app defined) widths")); add(new ExplanatoryText("This example shows what happens if you use und...
java
private void addAutoWidthExample() { add(new WHeading(HeadingLevel.H2, "Automatic (app defined) widths")); add(new ExplanatoryText("This example shows what happens if you use undefined (0) column width and do not then define them in CSS.")); WPanel panel = new WPanel(); panel.setLayout(new ColumnLayout(new int[...
[ "private", "void", "addAutoWidthExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H2", ",", "\"Automatic (app defined) widths\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"This example shows what happens if you use u...
This example shows a column which does not have widths set in Java. This is a "good thing": widths should be set in CSS.
[ "This", "example", "shows", "a", "column", "which", "does", "not", "have", "widths", "set", "in", "Java", ".", "This", "is", "a", "good", "thing", ":", "widths", "should", "be", "set", "in", "CSS", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/ColumnLayoutExample.java#L149-L165
infinispan/infinispan
core/src/main/java/org/infinispan/io/GridFilesystem.java
GridFilesystem.getOutput
public OutputStream getOutput(GridFile file) throws IOException { """ Opens an OutputStream for writing to the given file. @param file the file to write to @return an OutputStream for writing to the file @throws IOException if an error occurs """ checkIsNotDirectory(file); createIfNeeded(file); ...
java
public OutputStream getOutput(GridFile file) throws IOException { checkIsNotDirectory(file); createIfNeeded(file); return new GridOutputStream(file, false, data); }
[ "public", "OutputStream", "getOutput", "(", "GridFile", "file", ")", "throws", "IOException", "{", "checkIsNotDirectory", "(", "file", ")", ";", "createIfNeeded", "(", "file", ")", ";", "return", "new", "GridOutputStream", "(", "file", ",", "false", ",", "data...
Opens an OutputStream for writing to the given file. @param file the file to write to @return an OutputStream for writing to the file @throws IOException if an error occurs
[ "Opens", "an", "OutputStream", "for", "writing", "to", "the", "given", "file", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/io/GridFilesystem.java#L132-L136
bazaarvoice/jolt
cli/src/main/java/com/bazaarvoice/jolt/JoltCliUtilities.java
JoltCliUtilities.printJsonObject
public static boolean printJsonObject( Object output, Boolean uglyPrint, boolean suppressOutput ) { """ Prints the given json object to standard out, accounting for pretty printing and suppressed output. @param output The object to print. This method will fail if this object is not well formed JSON. @param ugl...
java
public static boolean printJsonObject( Object output, Boolean uglyPrint, boolean suppressOutput ) { try { if ( uglyPrint ) { printToStandardOut( JsonUtils.toJsonString( output ), suppressOutput ); } else { printToStandardOut( JsonUtils.toPrettyJsonString( ...
[ "public", "static", "boolean", "printJsonObject", "(", "Object", "output", ",", "Boolean", "uglyPrint", ",", "boolean", "suppressOutput", ")", "{", "try", "{", "if", "(", "uglyPrint", ")", "{", "printToStandardOut", "(", "JsonUtils", ".", "toJsonString", "(", ...
Prints the given json object to standard out, accounting for pretty printing and suppressed output. @param output The object to print. This method will fail if this object is not well formed JSON. @param uglyPrint ignore pretty print @param suppressOutput suppress output to standard out @return true if printing operat...
[ "Prints", "the", "given", "json", "object", "to", "standard", "out", "accounting", "for", "pretty", "printing", "and", "suppressed", "output", "." ]
train
https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/cli/src/main/java/com/bazaarvoice/jolt/JoltCliUtilities.java#L74-L86
lestard/advanced-bindings
src/main/java/eu/lestard/advanced_bindings/api/NumberBindings.java
NumberBindings.divideSafe
public static IntegerBinding divideSafe(ObservableIntegerValue dividend, ObservableIntegerValue divisor, ObservableIntegerValue defaultValue) { """ An integer binding of a division that won't throw an {@link java.lang.ArithmeticException} when a division by zero happens. See {@link #divideSafe(javafx.beans.value....
java
public static IntegerBinding divideSafe(ObservableIntegerValue dividend, ObservableIntegerValue divisor, ObservableIntegerValue defaultValue) { return Bindings.createIntegerBinding(() -> { if (divisor.intValue() == 0) { return defaultValue.get(); } else { ...
[ "public", "static", "IntegerBinding", "divideSafe", "(", "ObservableIntegerValue", "dividend", ",", "ObservableIntegerValue", "divisor", ",", "ObservableIntegerValue", "defaultValue", ")", "{", "return", "Bindings", ".", "createIntegerBinding", "(", "(", ")", "->", "{",...
An integer binding of a division that won't throw an {@link java.lang.ArithmeticException} when a division by zero happens. See {@link #divideSafe(javafx.beans.value.ObservableIntegerValue, javafx.beans.value.ObservableIntegerValue)} for more information. @param dividend the observable value used as dividend @para...
[ "An", "integer", "binding", "of", "a", "division", "that", "won", "t", "throw", "an", "{", "@link", "java", ".", "lang", ".", "ArithmeticException", "}", "when", "a", "division", "by", "zero", "happens", ".", "See", "{", "@link", "#divideSafe", "(", "jav...
train
https://github.com/lestard/advanced-bindings/blob/054a5dde261c29f862b971765fa3da3704a13ab4/src/main/java/eu/lestard/advanced_bindings/api/NumberBindings.java#L221-L231
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java
Value.boolArray
public static Value boolArray(@Nullable boolean[] v) { """ Returns an {@code ARRAY<BOOL>} value. @param v the source of element values, which may be null to produce a value for which {@code isNull()} is {@code true} """ return boolArray(v, 0, v == null ? 0 : v.length); }
java
public static Value boolArray(@Nullable boolean[] v) { return boolArray(v, 0, v == null ? 0 : v.length); }
[ "public", "static", "Value", "boolArray", "(", "@", "Nullable", "boolean", "[", "]", "v", ")", "{", "return", "boolArray", "(", "v", ",", "0", ",", "v", "==", "null", "?", "0", ":", "v", ".", "length", ")", ";", "}" ]
Returns an {@code ARRAY<BOOL>} value. @param v the source of element values, which may be null to produce a value for which {@code isNull()} is {@code true}
[ "Returns", "an", "{", "@code", "ARRAY<BOOL", ">", "}", "value", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java#L189-L191
indeedeng/util
io/src/main/java/com/indeed/util/io/Files.java
Files.writeObjectIfChangedOrDie
public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file, @Nonnull final Logger log) throws IOException { """ Writes an object to a file only if it is different from the current contents of the file, or if the file does not exist. Note that you must have enough heap ...
java
public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file, @Nonnull final Logger log) throws IOException { Preconditions.checkNotNull(log, "log argument is required!"); Preconditions.checkNotNull(file, "file argument is required!"); Preconditions....
[ "public", "static", "boolean", "writeObjectIfChangedOrDie", "(", "@", "Nonnull", "final", "Object", "obj", ",", "@", "Nonnull", "final", "String", "file", ",", "@", "Nonnull", "final", "Logger", "log", ")", "throws", "IOException", "{", "Preconditions", ".", "...
Writes an object to a file only if it is different from the current contents of the file, or if the file does not exist. Note that you must have enough heap to contain the entire contents of the object graph. @param obj object to write to a file @param file path to save the object to @param log logger to use @return ...
[ "Writes", "an", "object", "to", "a", "file", "only", "if", "it", "is", "different", "from", "the", "current", "contents", "of", "the", "file", "or", "if", "the", "file", "does", "not", "exist", ".", "Note", "that", "you", "must", "have", "enough", "hea...
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L269-L323
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java
ProcessEngineDriver.startProcess
public Long startProcess(Long processId, String masterRequestId, String ownerType, Long ownerId, Map<String,String> vars, String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception { """ Starting a regular process. @param processId ID of the process to b...
java
public Long startProcess(Long processId, String masterRequestId, String ownerType, Long ownerId, Map<String,String> vars, String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception { Process procdef = getProcessDefinition(processId); int perfor...
[ "public", "Long", "startProcess", "(", "Long", "processId", ",", "String", "masterRequestId", ",", "String", "ownerType", ",", "Long", "ownerId", ",", "Map", "<", "String", ",", "String", ">", "vars", ",", "String", "secondaryOwnerType", ",", "Long", "secondar...
Starting a regular process. @param processId ID of the process to be started @param masterRequestId @param ownerType @param ownerId @param vars Input parameter bindings for the process instance to be created @return Process instance ID
[ "Starting", "a", "regular", "process", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L935-L964
vipshop/vjtools
vjkit/src/main/java/com/vip/vjtools/vjkit/text/WildcardMatcher.java
WildcardMatcher.matchPath
public static boolean matchPath(String path, String pattern) { """ Matches path against pattern using *, ? and ** wildcards. Both path and the pattern are tokenized on path separators (both \ and /). '**' represents deep tree wildcard, as in Ant. The separator should match the corresponding path """ List<S...
java
public static boolean matchPath(String path, String pattern) { List<String> pathElements = PATH_SPLITTER.splitToList(path); List<String> patternElements = PATH_SPLITTER.splitToList(pattern); return matchTokens(pathElements.toArray(new String[0]), patternElements.toArray(new String[0])); }
[ "public", "static", "boolean", "matchPath", "(", "String", "path", ",", "String", "pattern", ")", "{", "List", "<", "String", ">", "pathElements", "=", "PATH_SPLITTER", ".", "splitToList", "(", "path", ")", ";", "List", "<", "String", ">", "patternElements",...
Matches path against pattern using *, ? and ** wildcards. Both path and the pattern are tokenized on path separators (both \ and /). '**' represents deep tree wildcard, as in Ant. The separator should match the corresponding path
[ "Matches", "path", "against", "pattern", "using", "*", "?", "and", "**", "wildcards", ".", "Both", "path", "and", "the", "pattern", "are", "tokenized", "on", "path", "separators", "(", "both", "\\", "and", "/", ")", ".", "**", "represents", "deep", "tree...
train
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjkit/src/main/java/com/vip/vjtools/vjkit/text/WildcardMatcher.java#L176-L180
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/fmt/JakartaInline.java
JakartaInline.getLocale
static Locale getLocale(PageContext pageContext, String name) { """ /* Returns the locale specified by the named scoped attribute or context configuration parameter. <p> The named scoped attribute is searched in the page, request, session (if valid), and application scope(s) (in this order). If no such attr...
java
static Locale getLocale(PageContext pageContext, String name) { Locale loc = null; Object obj = Config.find(pageContext, name); if (obj != null) { if (obj instanceof Locale) { loc = (Locale) obj; } else { loc = parseLocale((String) obj, nu...
[ "static", "Locale", "getLocale", "(", "PageContext", "pageContext", ",", "String", "name", ")", "{", "Locale", "loc", "=", "null", ";", "Object", "obj", "=", "Config", ".", "find", "(", "pageContext", ",", "name", ")", ";", "if", "(", "obj", "!=", "nul...
/* Returns the locale specified by the named scoped attribute or context configuration parameter. <p> The named scoped attribute is searched in the page, request, session (if valid), and application scope(s) (in this order). If no such attribute exists in any of the scopes, the locale is taken from the named context c...
[ "/", "*", "Returns", "the", "locale", "specified", "by", "the", "named", "scoped", "attribute", "or", "context", "configuration", "parameter", "." ]
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/fmt/JakartaInline.java#L366-L379