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
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setEnterpriseCustomField
public void setEnterpriseCustomField(int index, String value) { """ Set an enterprise custom field value. @param index field index @param value field value """ set(selectField(TaskFieldLists.ENTERPRISE_CUSTOM_FIELD, index), value); }
java
public void setEnterpriseCustomField(int index, String value) { set(selectField(TaskFieldLists.ENTERPRISE_CUSTOM_FIELD, index), value); }
[ "public", "void", "setEnterpriseCustomField", "(", "int", "index", ",", "String", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "ENTERPRISE_CUSTOM_FIELD", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set an enterprise custom field value. @param index field index @param value field value
[ "Set", "an", "enterprise", "custom", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3969-L3972
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java
MethodDelegation.toMethodReturnOf
public static MethodDelegation toMethodReturnOf(String name, MethodGraph.Compiler methodGraphCompiler) { """ Delegates any intercepted method to invoke a method on an instance that is returned by a parameterless method of the given name. To be considered a valid delegation target, a method must be visible and acc...
java
public static MethodDelegation toMethodReturnOf(String name, MethodGraph.Compiler methodGraphCompiler) { return withDefaultConfiguration().toMethodReturnOf(name, methodGraphCompiler); }
[ "public", "static", "MethodDelegation", "toMethodReturnOf", "(", "String", "name", ",", "MethodGraph", ".", "Compiler", "methodGraphCompiler", ")", "{", "return", "withDefaultConfiguration", "(", ")", ".", "toMethodReturnOf", "(", "name", ",", "methodGraphCompiler", "...
Delegates any intercepted method to invoke a method on an instance that is returned by a parameterless method of the given name. To be considered a valid delegation target, a method must be visible and accessible to the instrumented type. This is the case if the method's declaring type is either public or in the same p...
[ "Delegates", "any", "intercepted", "method", "to", "invoke", "a", "method", "on", "an", "instance", "that", "is", "returned", "by", "a", "parameterless", "method", "of", "the", "given", "name", ".", "To", "be", "considered", "a", "valid", "delegation", "targ...
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java#L525-L527
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Scroller.java
Scroller.scrollViewToSide
public void scrollViewToSide(View view, Side side, float scrollPosition, int stepCount) { """ Scrolls view horizontally. @param view the view to scroll @param side the side to which to scroll; {@link Side#RIGHT} or {@link Side#LEFT} @param scrollPosition the position to scroll to, from 0 to 1 where 1 is all t...
java
public void scrollViewToSide(View view, Side side, float scrollPosition, int stepCount) { int[] corners = new int[2]; view.getLocationOnScreen(corners); int viewHeight = view.getHeight(); int viewWidth = view.getWidth(); float x = corners[0] + viewWidth * scrollPosition; float y = corners[1] + viewHeight / ...
[ "public", "void", "scrollViewToSide", "(", "View", "view", ",", "Side", "side", ",", "float", "scrollPosition", ",", "int", "stepCount", ")", "{", "int", "[", "]", "corners", "=", "new", "int", "[", "2", "]", ";", "view", ".", "getLocationOnScreen", "(",...
Scrolls view horizontally. @param view the view to scroll @param side the side to which to scroll; {@link Side#RIGHT} or {@link Side#LEFT} @param scrollPosition the position to scroll to, from 0 to 1 where 1 is all the way. Example is: 0.55. @param stepCount how many move steps to include in the scroll. Less steps res...
[ "Scrolls", "view", "horizontally", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Scroller.java#L372-L383
super-csv/super-csv
super-csv-java8/src/main/java/org/supercsv/cellprocessor/time/FmtPeriod.java
FmtPeriod.execute
public Object execute(final Object value, final CsvContext context) { """ {@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Period """ validateInputNotNull(value, context); if( !(value instanceof Period) ) { throw new SuperCsvCellProcessorException(Period.class, value, co...
java
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Period) ) { throw new SuperCsvCellProcessorException(Period.class, value, context, this); } final Period period = (Period) value; final String result = period.toString(); re...
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "validateInputNotNull", "(", "value", ",", "context", ")", ";", "if", "(", "!", "(", "value", "instanceof", "Period", ")", ")", "{", "throw", ...
{@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Period
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv-java8/src/main/java/org/supercsv/cellprocessor/time/FmtPeriod.java#L60-L69
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsDObjectMgr.java
PresentsDObjectMgr.informObjectAvailable
protected static <T extends DObject> void informObjectAvailable (Subscriber<T> sub, T obj) { """ Calls {@link Subscriber#objectAvailable} and catches and logs any exception thrown by the subscriber during the call. """ try { sub.objectAvailable(obj); } catch (Exception e) { ...
java
protected static <T extends DObject> void informObjectAvailable (Subscriber<T> sub, T obj) { try { sub.objectAvailable(obj); } catch (Exception e) { log.warning("Subscriber choked during object available", "obj", StringUtil.safeToString(obj), "sub", su...
[ "protected", "static", "<", "T", "extends", "DObject", ">", "void", "informObjectAvailable", "(", "Subscriber", "<", "T", ">", "sub", ",", "T", "obj", ")", "{", "try", "{", "sub", ".", "objectAvailable", "(", "obj", ")", ";", "}", "catch", "(", "Except...
Calls {@link Subscriber#objectAvailable} and catches and logs any exception thrown by the subscriber during the call.
[ "Calls", "{" ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsDObjectMgr.java#L912-L920
alkacon/opencms-core
src/org/opencms/loader/CmsTemplateContextManager.java
CmsTemplateContextManager.readPropertyFromTemplate
public String readPropertyFromTemplate(CmsObject cms, CmsResource res, String propertyName, String fallbackValue) { """ Utility method which either reads a property from the template used for a specific resource, or from the template context provider used for the resource if available.<p> @param cms the CMS con...
java
public String readPropertyFromTemplate(CmsObject cms, CmsResource res, String propertyName, String fallbackValue) { try { CmsProperty templateProp = cms.readPropertyObject(res, CmsPropertyDefinition.PROPERTY_TEMPLATE, true); String templatePath = templateProp.getValue().trim(); ...
[ "public", "String", "readPropertyFromTemplate", "(", "CmsObject", "cms", ",", "CmsResource", "res", ",", "String", "propertyName", ",", "String", "fallbackValue", ")", "{", "try", "{", "CmsProperty", "templateProp", "=", "cms", ".", "readPropertyObject", "(", "res...
Utility method which either reads a property from the template used for a specific resource, or from the template context provider used for the resource if available.<p> @param cms the CMS context to use @param res the resource from whose template or template context provider the property should be read @param propert...
[ "Utility", "method", "which", "either", "reads", "a", "property", "from", "the", "template", "used", "for", "a", "specific", "resource", "or", "from", "the", "template", "context", "provider", "used", "for", "the", "resource", "if", "available", ".", "<p", "...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsTemplateContextManager.java#L330-L345
groupon/odo
proxyui/src/main/java/com/groupon/odo/controllers/PathOrderController.java
PathOrderController.pathOrderUpdated
@RequestMapping(value = "", method = RequestMethod.POST) public String pathOrderUpdated(Model model, @PathVariable int profileId, String pathOrder) { """ Called when a path's priority is changed @param model @param profileId @param pathOrder @return """ logger.info("new path order = {}", pat...
java
@RequestMapping(value = "", method = RequestMethod.POST) public String pathOrderUpdated(Model model, @PathVariable int profileId, String pathOrder) { logger.info("new path order = {}", pathOrder); int[] intArrayPathOrder = Utils.arrayFromStringOfIntegers(pathOrder); pathOverrideService.upda...
[ "@", "RequestMapping", "(", "value", "=", "\"\"", ",", "method", "=", "RequestMethod", ".", "POST", ")", "public", "String", "pathOrderUpdated", "(", "Model", "model", ",", "@", "PathVariable", "int", "profileId", ",", "String", "pathOrder", ")", "{", "logge...
Called when a path's priority is changed @param model @param profileId @param pathOrder @return
[ "Called", "when", "a", "path", "s", "priority", "is", "changed" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyui/src/main/java/com/groupon/odo/controllers/PathOrderController.java#L68-L76
VoltDB/voltdb
src/frontend/org/voltdb/iv2/InitiatorMailbox.java
InitiatorMailbox.checkMisroutedFragmentTaskMessage
private boolean checkMisroutedFragmentTaskMessage(FragmentTaskMessage message) { """ After MigratePartitionLeader has been requested, the fragments which are sent to leader site should be restarted. """ if (m_scheduler.isLeader() || message.isForReplica()) { return false; } ...
java
private boolean checkMisroutedFragmentTaskMessage(FragmentTaskMessage message) { if (m_scheduler.isLeader() || message.isForReplica()) { return false; } TransactionState txnState = (((SpScheduler)m_scheduler).getTransactionState(message.getTxnId())); // If a fragment is par...
[ "private", "boolean", "checkMisroutedFragmentTaskMessage", "(", "FragmentTaskMessage", "message", ")", "{", "if", "(", "m_scheduler", ".", "isLeader", "(", ")", "||", "message", ".", "isForReplica", "(", ")", ")", "{", "return", "false", ";", "}", "TransactionSt...
After MigratePartitionLeader has been requested, the fragments which are sent to leader site should be restarted.
[ "After", "MigratePartitionLeader", "has", "been", "requested", "the", "fragments", "which", "are", "sent", "to", "leader", "site", "should", "be", "restarted", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/InitiatorMailbox.java#L451-L484
Azure/azure-sdk-for-java
recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultExtendedInfosInner.java
VaultExtendedInfosInner.getAsync
public Observable<VaultExtendedInfoResourceInner> getAsync(String resourceGroupName, String vaultName) { """ Get the vault extended info. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws Ille...
java
public Observable<VaultExtendedInfoResourceInner> getAsync(String resourceGroupName, String vaultName) { return getWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1<ServiceResponse<VaultExtendedInfoResourceInner>, VaultExtendedInfoResourceInner>() { @Override public Va...
[ "public", "Observable", "<", "VaultExtendedInfoResourceInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "vaultName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "vaultName", ")", ".", "map", "(", "new", ...
Get the vault extended info. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VaultExtendedInfoResourceI...
[ "Get", "the", "vault", "extended", "info", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultExtendedInfosInner.java#L107-L114
AgNO3/jcifs-ng
src/main/java/jcifs/Config.java
Config.getInt
public static int getInt ( Properties props, String key, int def ) { """ Retrieve an <code>int</code>. If the key does not exist or cannot be converted to an <code>int</code>, the provided default argument will be returned. """ String s = props.getProperty(key); if ( s != null ) { ...
java
public static int getInt ( Properties props, String key, int def ) { String s = props.getProperty(key); if ( s != null ) { try { def = Integer.parseInt(s); } catch ( NumberFormatException nfe ) { log.error("Not a number", nfe); ...
[ "public", "static", "int", "getInt", "(", "Properties", "props", ",", "String", "key", ",", "int", "def", ")", "{", "String", "s", "=", "props", ".", "getProperty", "(", "key", ")", ";", "if", "(", "s", "!=", "null", ")", "{", "try", "{", "def", ...
Retrieve an <code>int</code>. If the key does not exist or cannot be converted to an <code>int</code>, the provided default argument will be returned.
[ "Retrieve", "an", "<code", ">", "int<", "/", "code", ">", ".", "If", "the", "key", "does", "not", "exist", "or", "cannot", "be", "converted", "to", "an", "<code", ">", "int<", "/", "code", ">", "the", "provided", "default", "argument", "will", "be", ...
train
https://github.com/AgNO3/jcifs-ng/blob/0311107a077ea372527ae74839eec8042197332f/src/main/java/jcifs/Config.java#L79-L90
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.getPermissions
public CmsPermissionSet getPermissions(String resourceName) throws CmsException { """ Returns the set of permissions of the current user for a given resource.<p> @param resourceName the name of the resource @return the bit set of the permissions of the current user @throws CmsException if something goes w...
java
public CmsPermissionSet getPermissions(String resourceName) throws CmsException { return getPermissions(resourceName, m_context.getCurrentUser().getName()); }
[ "public", "CmsPermissionSet", "getPermissions", "(", "String", "resourceName", ")", "throws", "CmsException", "{", "return", "getPermissions", "(", "resourceName", ",", "m_context", ".", "getCurrentUser", "(", ")", ".", "getName", "(", ")", ")", ";", "}" ]
Returns the set of permissions of the current user for a given resource.<p> @param resourceName the name of the resource @return the bit set of the permissions of the current user @throws CmsException if something goes wrong
[ "Returns", "the", "set", "of", "permissions", "of", "the", "current", "user", "for", "a", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1662-L1665
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java
BidiagonalDecompositionRow_DDRM.getV
@Override public DMatrixRMaj getV(DMatrixRMaj V , boolean transpose , boolean compact ) { """ Returns the orthogonal V matrix. @param V If not null then the results will be stored here. Otherwise a new matrix will be created. @return The extracted Q matrix. """ V = handleV(V, transpose, compac...
java
@Override public DMatrixRMaj getV(DMatrixRMaj V , boolean transpose , boolean compact ) { V = handleV(V, transpose, compact,m,n,min); CommonOps_DDRM.setIdentity(V); // UBV.print(); // todo the very first multiplication can be avoided by setting to the rank1update output for(...
[ "@", "Override", "public", "DMatrixRMaj", "getV", "(", "DMatrixRMaj", "V", ",", "boolean", "transpose", ",", "boolean", "compact", ")", "{", "V", "=", "handleV", "(", "V", ",", "transpose", ",", "compact", ",", "m", ",", "n", ",", "min", ")", ";", "C...
Returns the orthogonal V matrix. @param V If not null then the results will be stored here. Otherwise a new matrix will be created. @return The extracted Q matrix.
[ "Returns", "the", "orthogonal", "V", "matrix", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java#L234-L254
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java
ASMUtil.getAttributeBoolean
public static Boolean getAttributeBoolean(Tag tag, String attrName, Boolean defaultValue) { """ extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException """ Literal lit = getAttributeLiteral(tag, attrName, null); if (lit == null) return default...
java
public static Boolean getAttributeBoolean(Tag tag, String attrName, Boolean defaultValue) { Literal lit = getAttributeLiteral(tag, attrName, null); if (lit == null) return defaultValue; return lit.getBoolean(defaultValue); }
[ "public", "static", "Boolean", "getAttributeBoolean", "(", "Tag", "tag", ",", "String", "attrName", ",", "Boolean", "defaultValue", ")", "{", "Literal", "lit", "=", "getAttributeLiteral", "(", "tag", ",", "attrName", ",", "null", ")", ";", "if", "(", "lit", ...
extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException
[ "extract", "the", "content", "of", "a", "attribut" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java#L331-L335
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/lang/AtomicBiInteger.java
AtomicBiInteger.compareAndSet
public boolean compareAndSet(int expectHi, int hi, int expectLo, int lo) { """ Atomically sets the hi and lo values to the given updated values only if the current hi and lo values {@code ==} the expected hi and lo values. @param expectHi the expected hi value @param hi the new hi value @param expectLo...
java
public boolean compareAndSet(int expectHi, int hi, int expectLo, int lo) { long encoded = encode(expectHi, expectLo); long update = encode(hi, lo); return compareAndSet(encoded, update); }
[ "public", "boolean", "compareAndSet", "(", "int", "expectHi", ",", "int", "hi", ",", "int", "expectLo", ",", "int", "lo", ")", "{", "long", "encoded", "=", "encode", "(", "expectHi", ",", "expectLo", ")", ";", "long", "update", "=", "encode", "(", "hi"...
Atomically sets the hi and lo values to the given updated values only if the current hi and lo values {@code ==} the expected hi and lo values. @param expectHi the expected hi value @param hi the new hi value @param expectLo the expected lo value @param lo the new lo value @return {@code true} if successfu...
[ "Atomically", "sets", "the", "hi", "and", "lo", "values", "to", "the", "given", "updated", "values", "only", "if", "the", "current", "hi", "and", "lo", "values", "{", "@code", "==", "}", "the", "expected", "hi", "and", "lo", "values", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/lang/AtomicBiInteger.java#L131-L135
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/action/ActionManager.java
ActionManager.addMenuItem
public JMenuItem addMenuItem(JMenu menu, String strCommand, ActionListener targetListener, KeyStroke keyStroke) { """ Add this button to this window. @param strIcon The command and Icon name. @param strLink The button name. """ BaseAction action = new BaseAction(strCommand, targetListener); i...
java
public JMenuItem addMenuItem(JMenu menu, String strCommand, ActionListener targetListener, KeyStroke keyStroke) { BaseAction action = new BaseAction(strCommand, targetListener); if (keyStroke != null) action.putValue(Action.ACCELERATOR_KEY, keyStroke); return this.addMenuItem(men...
[ "public", "JMenuItem", "addMenuItem", "(", "JMenu", "menu", ",", "String", "strCommand", ",", "ActionListener", "targetListener", ",", "KeyStroke", "keyStroke", ")", "{", "BaseAction", "action", "=", "new", "BaseAction", "(", "strCommand", ",", "targetListener", "...
Add this button to this window. @param strIcon The command and Icon name. @param strLink The button name.
[ "Add", "this", "button", "to", "this", "window", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/action/ActionManager.java#L211-L217
apereo/cas
support/cas-server-support-redis-core/src/main/java/org/apereo/cas/redis/core/RedisObjectFactory.java
RedisObjectFactory.newRedisConnectionFactory
public static RedisConnectionFactory newRedisConnectionFactory(final BaseRedisProperties redis) { """ New redis connection factory. @param redis the redis @return the redis connection factory """ val redisConfiguration = redis.getSentinel() == null ? (RedisConfiguration) getStandaloneCo...
java
public static RedisConnectionFactory newRedisConnectionFactory(final BaseRedisProperties redis) { val redisConfiguration = redis.getSentinel() == null ? (RedisConfiguration) getStandaloneConfig(redis) : getSentinelConfig(redis); val factory = new LettuceConnectionFactory(redisCo...
[ "public", "static", "RedisConnectionFactory", "newRedisConnectionFactory", "(", "final", "BaseRedisProperties", "redis", ")", "{", "val", "redisConfiguration", "=", "redis", ".", "getSentinel", "(", ")", "==", "null", "?", "(", "RedisConfiguration", ")", "getStandalon...
New redis connection factory. @param redis the redis @return the redis connection factory
[ "New", "redis", "connection", "factory", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-redis-core/src/main/java/org/apereo/cas/redis/core/RedisObjectFactory.java#L63-L71
FXMisc/WellBehavedFX
src/main/java/org/fxmisc/wellbehaved/event/Nodes.java
Nodes.addFallbackInputMap
public static void addFallbackInputMap(Node node, InputMap<?> im) { """ Adds the given input map to the end of the node's list of input maps, so that an event will be pattern-matched against all other input maps currently "installed" in the node before being pattern-matched against the given input map. """ ...
java
public static void addFallbackInputMap(Node node, InputMap<?> im) { // getInputMap calls init, so can use unsafe setter setInputMapUnsafe(node, InputMap.sequence(getInputMap(node), im)); }
[ "public", "static", "void", "addFallbackInputMap", "(", "Node", "node", ",", "InputMap", "<", "?", ">", "im", ")", "{", "// getInputMap calls init, so can use unsafe setter", "setInputMapUnsafe", "(", "node", ",", "InputMap", ".", "sequence", "(", "getInputMap", "("...
Adds the given input map to the end of the node's list of input maps, so that an event will be pattern-matched against all other input maps currently "installed" in the node before being pattern-matched against the given input map.
[ "Adds", "the", "given", "input", "map", "to", "the", "end", "of", "the", "node", "s", "list", "of", "input", "maps", "so", "that", "an", "event", "will", "be", "pattern", "-", "matched", "against", "all", "other", "input", "maps", "currently", "installed...
train
https://github.com/FXMisc/WellBehavedFX/blob/ca889734481f5439655ca8deb6f742964b5654b0/src/main/java/org/fxmisc/wellbehaved/event/Nodes.java#L61-L64
google/auto
value/src/main/java/com/google/auto/value/processor/ErrorReporter.java
ErrorReporter.reportNote
void reportNote(String msg, Element e) { """ Issue a compilation note. @param msg the text of the note @param e the element to which it pertains """ messager.printMessage(Diagnostic.Kind.NOTE, msg, e); }
java
void reportNote(String msg, Element e) { messager.printMessage(Diagnostic.Kind.NOTE, msg, e); }
[ "void", "reportNote", "(", "String", "msg", ",", "Element", "e", ")", "{", "messager", ".", "printMessage", "(", "Diagnostic", ".", "Kind", ".", "NOTE", ",", "msg", ",", "e", ")", ";", "}" ]
Issue a compilation note. @param msg the text of the note @param e the element to which it pertains
[ "Issue", "a", "compilation", "note", "." ]
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/value/src/main/java/com/google/auto/value/processor/ErrorReporter.java#L42-L44
elibom/jogger
src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java
AbstractFileRoutesLoader.validateControllerAndMethod
private String validateControllerAndMethod(String beanAndMethod, int line) throws ParseException { """ Helper method. Validates that the format of the controller and method is valid (i.e. in the form of controller#method). @param beanAndMethod the beanAndMethod string to be validated. @return the same beanAn...
java
private String validateControllerAndMethod(String beanAndMethod, int line) throws ParseException { int hashPos = beanAndMethod.indexOf('#'); if (hashPos == -1) { throw new ParseException("Unrecognized format for '" + beanAndMethod + "'", line); } return beanAndMethod; }
[ "private", "String", "validateControllerAndMethod", "(", "String", "beanAndMethod", ",", "int", "line", ")", "throws", "ParseException", "{", "int", "hashPos", "=", "beanAndMethod", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "hashPos", "==", "-", "1...
Helper method. Validates that the format of the controller and method is valid (i.e. in the form of controller#method). @param beanAndMethod the beanAndMethod string to be validated. @return the same beanAndMethod that was received as an argument. @throws ParseException if the format of the controller and method is n...
[ "Helper", "method", ".", "Validates", "that", "the", "format", "of", "the", "controller", "and", "method", "is", "valid", "(", "i", ".", "e", ".", "in", "the", "form", "of", "controller#method", ")", "." ]
train
https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java#L229-L236
apache/incubator-gobblin
gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/CleanableHivePartitionDatasetFinder.java
CleanableHivePartitionDatasetFinder.findDatasets
public List<HivePartitionDataset> findDatasets() throws IOException { """ Will find all datasets according to whitelist, except the backup and staging tables. """ List<HivePartitionDataset> list = new ArrayList<>(); for (HivePartitionDataset hivePartitionDataset : super.findDatasets()) { Cl...
java
public List<HivePartitionDataset> findDatasets() throws IOException { List<HivePartitionDataset> list = new ArrayList<>(); for (HivePartitionDataset hivePartitionDataset : super.findDatasets()) { CleanableHivePartitionDataset dataset = new CleanableHivePartitionDataset(hivePartitionDataset...
[ "public", "List", "<", "HivePartitionDataset", ">", "findDatasets", "(", ")", "throws", "IOException", "{", "List", "<", "HivePartitionDataset", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "HivePartitionDataset", "hivePartitionDataset", ...
Will find all datasets according to whitelist, except the backup and staging tables.
[ "Will", "find", "all", "datasets", "according", "to", "whitelist", "except", "the", "backup", "and", "staging", "tables", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/CleanableHivePartitionDatasetFinder.java#L53-L62
MenoData/Time4J
base/src/main/java/net/time4j/range/TimestampInterval.java
TimestampInterval.until
public static TimestampInterval until(PlainTimestamp end) { """ /*[deutsch] <p>Erzeugt ein unbegrenztes offenes Intervall bis zum angegebenen Endzeitpunkt. </p> @param end timestamp of upper boundary (exclusive) @return new timestamp interval @since 2.0 """ Boundary<PlainTimestamp> pas...
java
public static TimestampInterval until(PlainTimestamp end) { Boundary<PlainTimestamp> past = Boundary.infinitePast(); return new TimestampInterval(past, Boundary.of(OPEN, end)); }
[ "public", "static", "TimestampInterval", "until", "(", "PlainTimestamp", "end", ")", "{", "Boundary", "<", "PlainTimestamp", ">", "past", "=", "Boundary", ".", "infinitePast", "(", ")", ";", "return", "new", "TimestampInterval", "(", "past", ",", "Boundary", "...
/*[deutsch] <p>Erzeugt ein unbegrenztes offenes Intervall bis zum angegebenen Endzeitpunkt. </p> @param end timestamp of upper boundary (exclusive) @return new timestamp interval @since 2.0
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "ein", "unbegrenztes", "offenes", "Intervall", "bis", "zum", "angegebenen", "Endzeitpunkt", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/TimestampInterval.java#L274-L279
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
CompressorHttp2ConnectionEncoder.newCompressor
private EmbeddedChannel newCompressor(ChannelHandlerContext ctx, Http2Headers headers, boolean endOfStream) throws Http2Exception { """ Checks if a new compressor object is needed for the stream identified by {@code streamId}. This method will modify the {@code content-encoding} header contained in {@...
java
private EmbeddedChannel newCompressor(ChannelHandlerContext ctx, Http2Headers headers, boolean endOfStream) throws Http2Exception { if (endOfStream) { return null; } CharSequence encoding = headers.get(CONTENT_ENCODING); if (encoding == null) { encodi...
[ "private", "EmbeddedChannel", "newCompressor", "(", "ChannelHandlerContext", "ctx", ",", "Http2Headers", "headers", ",", "boolean", "endOfStream", ")", "throws", "Http2Exception", "{", "if", "(", "endOfStream", ")", "{", "return", "null", ";", "}", "CharSequence", ...
Checks if a new compressor object is needed for the stream identified by {@code streamId}. This method will modify the {@code content-encoding} header contained in {@code headers}. @param ctx the context. @param headers Object representing headers which are to be written @param endOfStream Indicates if the stream has ...
[ "Checks", "if", "a", "new", "compressor", "object", "is", "needed", "for", "the", "stream", "identified", "by", "{", "@code", "streamId", "}", ".", "This", "method", "will", "modify", "the", "{", "@code", "content", "-", "encoding", "}", "header", "contain...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java#L238-L264
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/util/RgbaColor.java
RgbaColor.withHsl
private RgbaColor withHsl(int index, float value) { """ Returns a new color with a new value of the specified HSL component. """ float[] HSL = convertToHsl(); HSL[index] = value; return RgbaColor.fromHsl(HSL); }
java
private RgbaColor withHsl(int index, float value) { float[] HSL = convertToHsl(); HSL[index] = value; return RgbaColor.fromHsl(HSL); }
[ "private", "RgbaColor", "withHsl", "(", "int", "index", ",", "float", "value", ")", "{", "float", "[", "]", "HSL", "=", "convertToHsl", "(", ")", ";", "HSL", "[", "index", "]", "=", "value", ";", "return", "RgbaColor", ".", "fromHsl", "(", "HSL", ")"...
Returns a new color with a new value of the specified HSL component.
[ "Returns", "a", "new", "color", "with", "a", "new", "value", "of", "the", "specified", "HSL", "component", "." ]
train
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/RgbaColor.java#L389-L393
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java
CopiedOverriddenMethod.sameAccess
private static boolean sameAccess(int parentAccess, int childAccess) { """ determines if two access flags contain the same access modifiers @param parentAccess the access flags of the parent method @param childAccess the access flats of the child method @return whether the access modifiers are the same ...
java
private static boolean sameAccess(int parentAccess, int childAccess) { return ((parentAccess & (Const.ACC_PUBLIC | Const.ACC_PROTECTED)) == (childAccess & (Const.ACC_PUBLIC | Const.ACC_PROTECTED))); }
[ "private", "static", "boolean", "sameAccess", "(", "int", "parentAccess", ",", "int", "childAccess", ")", "{", "return", "(", "(", "parentAccess", "&", "(", "Const", ".", "ACC_PUBLIC", "|", "Const", ".", "ACC_PROTECTED", ")", ")", "==", "(", "childAccess", ...
determines if two access flags contain the same access modifiers @param parentAccess the access flags of the parent method @param childAccess the access flats of the child method @return whether the access modifiers are the same
[ "determines", "if", "two", "access", "flags", "contain", "the", "same", "access", "modifiers" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java#L255-L257
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java
PlacesApi.getShapeHistory
public ShapeHistory getShapeHistory(String placeId, String woeId) throws JinxException { """ Return an historical list of all the shape data generated for a Places or Where on Earth (WOE) ID. <p>Authentication</p> <p>This method does not require authentication.</p> @param placeId 4yya valid Flickr place i...
java
public ShapeHistory getShapeHistory(String placeId, String woeId) throws JinxException { if (JinxUtils.isNullOrEmpty(placeId)) { JinxUtils.validateParams(woeId); } Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.getShapeHistory"); if (JinxUtils.isNullOrEmpty(p...
[ "public", "ShapeHistory", "getShapeHistory", "(", "String", "placeId", ",", "String", "woeId", ")", "throws", "JinxException", "{", "if", "(", "JinxUtils", ".", "isNullOrEmpty", "(", "placeId", ")", ")", "{", "JinxUtils", ".", "validateParams", "(", "woeId", "...
Return an historical list of all the shape data generated for a Places or Where on Earth (WOE) ID. <p>Authentication</p> <p>This method does not require authentication.</p> @param placeId 4yya valid Flickr place id. @param woeId a Where On Earth (WOE) id. @return information about the specified place. @throws Jinx...
[ "Return", "an", "historical", "list", "of", "all", "the", "shape", "data", "generated", "for", "a", "Places", "or", "Where", "on", "Earth", "(", "WOE", ")", "ID", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java#L219-L231
enioka/jqm
jqm-all/jqm-client/jqm-api-client-jdbc/src/main/java/com/enioka/jqm/api/JdbcClient.java
JdbcClient.getJobRequest
private JobRequest getJobRequest(int launchId, DbConn cnx) { """ Internal helper to create a new execution request from an History row.<br> To be called for a single row only, not for converting multiple History elements.<br> Does not create a transaction, and no need for an active transaction. @param launchI...
java
private JobRequest getJobRequest(int launchId, DbConn cnx) { Map<String, String> prms = RuntimeParameter.select_map(cnx, "jiprm_select_by_ji", launchId); ResultSet rs = cnx.runSelect("history_select_reenqueue_by_id", launchId); try { if (!rs.next()) { ...
[ "private", "JobRequest", "getJobRequest", "(", "int", "launchId", ",", "DbConn", "cnx", ")", "{", "Map", "<", "String", ",", "String", ">", "prms", "=", "RuntimeParameter", ".", "select_map", "(", "cnx", ",", "\"jiprm_select_by_ji\"", ",", "launchId", ")", "...
Internal helper to create a new execution request from an History row.<br> To be called for a single row only, not for converting multiple History elements.<br> Does not create a transaction, and no need for an active transaction. @param launchId the ID of the launch (was the ID of the JI, now the ID of the History ob...
[ "Internal", "helper", "to", "create", "a", "new", "execution", "request", "from", "an", "History", "row", ".", "<br", ">", "To", "be", "called", "for", "a", "single", "row", "only", "not", "for", "converting", "multiple", "History", "elements", ".", "<br",...
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-client/jqm-api-client-jdbc/src/main/java/com/enioka/jqm/api/JdbcClient.java#L428-L470
rainu/dbc
src/main/java/de/raysha/lib/dbc/meta/MetadataManager.java
MetadataManager.insertMetadata
public TableMetadata insertMetadata(String tableName, String version) { """ Fügt neue Metadaten einer Tabelle hinzu. @param tableName Name der Tabelle. @param version Version der Tabelle. @return """ TableMetadata result = new TableMetadata(this); result.setId(new Long(tableName.hashCode())); result...
java
public TableMetadata insertMetadata(String tableName, String version){ TableMetadata result = new TableMetadata(this); result.setId(new Long(tableName.hashCode())); result.setName(tableName); result.setVersion(version); try{ insertStatement.setLong(1, result.getId()); insertStatement.setString(2, res...
[ "public", "TableMetadata", "insertMetadata", "(", "String", "tableName", ",", "String", "version", ")", "{", "TableMetadata", "result", "=", "new", "TableMetadata", "(", "this", ")", ";", "result", ".", "setId", "(", "new", "Long", "(", "tableName", ".", "ha...
Fügt neue Metadaten einer Tabelle hinzu. @param tableName Name der Tabelle. @param version Version der Tabelle. @return
[ "Fügt", "neue", "Metadaten", "einer", "Tabelle", "hinzu", "." ]
train
https://github.com/rainu/dbc/blob/bdf1d1945ccaa8db8ed0b91bd08d5ef9802777f7/src/main/java/de/raysha/lib/dbc/meta/MetadataManager.java#L134-L151
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.findInvocationLeastUpperBound
public static @CheckForNull JavaClassAndMethod findInvocationLeastUpperBound(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException { """ <p>Find the least upper bound method in the class hierarchy which could be called by the given InvokeInstruction. One reason this method is useful is th...
java
public static @CheckForNull JavaClassAndMethod findInvocationLeastUpperBound(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException { return findInvocationLeastUpperBound(inv, cpg, ANY_METHOD); }
[ "public", "static", "@", "CheckForNull", "JavaClassAndMethod", "findInvocationLeastUpperBound", "(", "InvokeInstruction", "inv", ",", "ConstantPoolGen", "cpg", ")", "throws", "ClassNotFoundException", "{", "return", "findInvocationLeastUpperBound", "(", "inv", ",", "cpg", ...
<p>Find the least upper bound method in the class hierarchy which could be called by the given InvokeInstruction. One reason this method is useful is that it indicates which declared exceptions are thrown by the called methods.</p> <ul> <li>For invokespecial, this is simply an exact lookup.</li> <li>For invokestatic an...
[ "<p", ">", "Find", "the", "least", "upper", "bound", "method", "in", "the", "class", "hierarchy", "which", "could", "be", "called", "by", "the", "given", "InvokeInstruction", ".", "One", "reason", "this", "method", "is", "useful", "is", "that", "it", "indi...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L320-L323
EdwardRaff/JSAT
JSAT/src/jsat/driftdetectors/DDM.java
DDM.setDriftThreshold
public void setDriftThreshold(double driftThreshold) { """ Sets the multiplier on the standard deviation that must be exceeded to recognize the change as a drift. <br> Increasing the drift threshold makes it take longer to start detecting a change, but reduces false positives. @param driftThreshold the positiv...
java
public void setDriftThreshold(double driftThreshold) { if(driftThreshold <= 0 || Double.isNaN(driftThreshold) || Double.isInfinite(driftThreshold)) throw new IllegalArgumentException("Dritf threshold must be positive, not " + driftThreshold); this.driftThreshold = driftThreshold; }
[ "public", "void", "setDriftThreshold", "(", "double", "driftThreshold", ")", "{", "if", "(", "driftThreshold", "<=", "0", "||", "Double", ".", "isNaN", "(", "driftThreshold", ")", "||", "Double", ".", "isInfinite", "(", "driftThreshold", ")", ")", "throw", "...
Sets the multiplier on the standard deviation that must be exceeded to recognize the change as a drift. <br> Increasing the drift threshold makes it take longer to start detecting a change, but reduces false positives. @param driftThreshold the positive multiplier threshold for detecting a drift
[ "Sets", "the", "multiplier", "on", "the", "standard", "deviation", "that", "must", "be", "exceeded", "to", "recognize", "the", "change", "as", "a", "drift", ".", "<br", ">", "Increasing", "the", "drift", "threshold", "makes", "it", "take", "longer", "to", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/driftdetectors/DDM.java#L177-L182
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java
HiveRegistrationUnit.setProp
public void setProp(String key, Object value) { """ Set a table/partition parameter. <p> When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use {@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.api.Partition} which...
java
public void setProp(String key, Object value) { this.props.setProp(key, value); updateTablePartitionFields(this.props, key, value); }
[ "public", "void", "setProp", "(", "String", "key", ",", "Object", "value", ")", "{", "this", ".", "props", ".", "setProp", "(", "key", ",", "value", ")", ";", "updateTablePartitionFields", "(", "this", ".", "props", ",", "key", ",", "value", ")", ";", ...
Set a table/partition parameter. <p> When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use {@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.api.Partition} which distinguishes between table/partition parameters, storage des...
[ "Set", "a", "table", "/", "partition", "parameter", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java#L173-L176
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/impl/edir/entry/EdirEntries.java
EdirEntries.writeGroupMembership
public static void writeGroupMembership( final ChaiUser user, final ChaiGroup group ) throws ChaiOperationException, ChaiUnavailableException { """ Add a group membership for the supplied user and group. This implementation takes care of all four attributes used in eDirectory static group association...
java
public static void writeGroupMembership( final ChaiUser user, final ChaiGroup group ) throws ChaiOperationException, ChaiUnavailableException { if ( user == null ) { throw new NullPointerException( "user cannot be null" ); } if ( group == null ) { ...
[ "public", "static", "void", "writeGroupMembership", "(", "final", "ChaiUser", "user", ",", "final", "ChaiGroup", "group", ")", "throws", "ChaiOperationException", ",", "ChaiUnavailableException", "{", "if", "(", "user", "==", "null", ")", "{", "throw", "new", "N...
Add a group membership for the supplied user and group. This implementation takes care of all four attributes used in eDirectory static group associations: <ul> <li>{@link com.novell.ldapchai.ChaiConstant#ATTR_LDAP_GROUP_MEMBERSHIP}</li> <li>{@link com.novell.ldapchai.ChaiConstant#ATTR_LDAP_MEMBER}</li> <li>{@link com...
[ "Add", "a", "group", "membership", "for", "the", "supplied", "user", "and", "group", ".", "This", "implementation", "takes", "care", "of", "all", "four", "attributes", "used", "in", "eDirectory", "static", "group", "associations", ":", "<ul", ">", "<li", ">"...
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/impl/edir/entry/EdirEntries.java#L257-L275
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newActionLabel
public static Label newActionLabel (String text, String style, ClickHandler onClick) { """ Creates a label that triggers an action using the supplied text and handler. The label will be styled as specified with an additional style that configures the mouse pointer and adds underline to the text. """ ...
java
public static Label newActionLabel (String text, String style, ClickHandler onClick) { return makeActionLabel(newLabel(text, style), onClick); }
[ "public", "static", "Label", "newActionLabel", "(", "String", "text", ",", "String", "style", ",", "ClickHandler", "onClick", ")", "{", "return", "makeActionLabel", "(", "newLabel", "(", "text", ",", "style", ")", ",", "onClick", ")", ";", "}" ]
Creates a label that triggers an action using the supplied text and handler. The label will be styled as specified with an additional style that configures the mouse pointer and adds underline to the text.
[ "Creates", "a", "label", "that", "triggers", "an", "action", "using", "the", "supplied", "text", "and", "handler", ".", "The", "label", "will", "be", "styled", "as", "specified", "with", "an", "additional", "style", "that", "configures", "the", "mouse", "poi...
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L204-L207
alkacon/opencms-core
src/org/opencms/xml/CmsXmlGenericWrapper.java
CmsXmlGenericWrapper.elementIterable
public static Iterable<Element> elementIterable(final Element element, final String name) { """ Returns an element iterator.<p> @param element the element @param name the name @return the iterator """ return new Iterable<Element>() { public Iterator<Element> iterator() { ...
java
public static Iterable<Element> elementIterable(final Element element, final String name) { return new Iterable<Element>() { public Iterator<Element> iterator() { return elementIterator(element, name); } }; }
[ "public", "static", "Iterable", "<", "Element", ">", "elementIterable", "(", "final", "Element", "element", ",", "final", "String", "name", ")", "{", "return", "new", "Iterable", "<", "Element", ">", "(", ")", "{", "public", "Iterator", "<", "Element", ">"...
Returns an element iterator.<p> @param element the element @param name the name @return the iterator
[ "Returns", "an", "element", "iterator", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlGenericWrapper.java#L74-L83
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java
StringUtils.indexOfAny
public static int indexOfAny(String str, String searchChars) { """ <p>Search a String to find the first index of any character in the given set of characters.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> search string will return <code>-1</code>.</p> <pre> StringUtils...
java
public static int indexOfAny(String str, String searchChars) { if (isEmpty(str) || isEmpty(searchChars)) { return INDEX_NOT_FOUND; } return indexOfAny(str, searchChars.toCharArray()); }
[ "public", "static", "int", "indexOfAny", "(", "String", "str", ",", "String", "searchChars", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "searchChars", ")", ")", "{", "return", "INDEX_NOT_FOUND", ";", "}", "return", "indexOfAny",...
<p>Search a String to find the first index of any character in the given set of characters.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> search string will return <code>-1</code>.</p> <pre> StringUtils.indexOfAny(null, *) = -1 StringUtils.indexOfAny("", *) ...
[ "<p", ">", "Search", "a", "String", "to", "find", "the", "first", "index", "of", "any", "character", "in", "the", "given", "set", "of", "characters", ".", "<", "/", "p", ">" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java#L1351-L1356
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsResourceTypeConfig.java
CmsResourceTypeConfig.createNewElement
public CmsResource createNewElement(CmsObject userCms, CmsResource modelResource, String pageFolderRootPath) throws CmsException { """ Creates a new element.<p> @param userCms the CMS context to use @param modelResource the model resource to use @param pageFolderRootPath the root path of the folder contai...
java
public CmsResource createNewElement(CmsObject userCms, CmsResource modelResource, String pageFolderRootPath) throws CmsException { checkOffline(userCms); checkInitialized(); CmsObject rootCms = rootCms(userCms); String folderPath = getFolderPath(userCms, pageFolderRootPath); ...
[ "public", "CmsResource", "createNewElement", "(", "CmsObject", "userCms", ",", "CmsResource", "modelResource", ",", "String", "pageFolderRootPath", ")", "throws", "CmsException", "{", "checkOffline", "(", "userCms", ")", ";", "checkInitialized", "(", ")", ";", "CmsO...
Creates a new element.<p> @param userCms the CMS context to use @param modelResource the model resource to use @param pageFolderRootPath the root path of the folder containing the current container page @return the created resource @throws CmsException if something goes wrong
[ "Creates", "a", "new", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsResourceTypeConfig.java#L358-L392
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/af_persistant_stat_info.java
af_persistant_stat_info.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ af_persistant_stat_info_responses result = (af_persistant_stat_info_res...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { af_persistant_stat_info_responses result = (af_persistant_stat_info_responses) service.get_payload_formatter().string_to_resource(af_persistant_stat_info_responses.class, response); if(result.errorcode !...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "af_persistant_stat_info_responses", "result", "=", "(", "af_persistant_stat_info_responses", ")", "service", "....
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/af_persistant_stat_info.java#L262-L279
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/dispatching/composing/PipelinedTernaryConsumer.java
PipelinedTernaryConsumer.accept
@Override public void accept(E1 first, E2 second, E3 third) { """ Performs every composed consumer. @param first the first element @param second the second element @param third the third element """ for (TriConsumer<E1, E2, E3> consumer : consumers) { consumer.accept(first, second,...
java
@Override public void accept(E1 first, E2 second, E3 third) { for (TriConsumer<E1, E2, E3> consumer : consumers) { consumer.accept(first, second, third); } }
[ "@", "Override", "public", "void", "accept", "(", "E1", "first", ",", "E2", "second", ",", "E3", "third", ")", "{", "for", "(", "TriConsumer", "<", "E1", ",", "E2", ",", "E3", ">", "consumer", ":", "consumers", ")", "{", "consumer", ".", "accept", ...
Performs every composed consumer. @param first the first element @param second the second element @param third the third element
[ "Performs", "every", "composed", "consumer", "." ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/dispatching/composing/PipelinedTernaryConsumer.java#L31-L36
datasalt/pangool
core/src/main/java/com/datasalt/pangool/tuplemr/MapOnlyJobBuilder.java
MapOnlyJobBuilder.setDefaultNamedOutput
public void setDefaultNamedOutput(Schema outputSchema) throws TupleMRException { """ Sets the default named output (Tuple format) specs. By using this method one can use an arbitrary number of named outputs without pre-defining them beforehand. """ Output output = new Output(true, "DEFAULT", new TupleOutpu...
java
public void setDefaultNamedOutput(Schema outputSchema) throws TupleMRException { Output output = new Output(true, "DEFAULT", new TupleOutputFormat(outputSchema), ITuple.class, NullWritable.class, null); namedOutputs.add(output); }
[ "public", "void", "setDefaultNamedOutput", "(", "Schema", "outputSchema", ")", "throws", "TupleMRException", "{", "Output", "output", "=", "new", "Output", "(", "true", ",", "\"DEFAULT\"", ",", "new", "TupleOutputFormat", "(", "outputSchema", ")", ",", "ITuple", ...
Sets the default named output (Tuple format) specs. By using this method one can use an arbitrary number of named outputs without pre-defining them beforehand.
[ "Sets", "the", "default", "named", "output", "(", "Tuple", "format", ")", "specs", ".", "By", "using", "this", "method", "one", "can", "use", "an", "arbitrary", "number", "of", "named", "outputs", "without", "pre", "-", "defining", "them", "beforehand", "....
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/tuplemr/MapOnlyJobBuilder.java#L121-L125
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.assertCurrentActivity
@SuppressWarnings("unchecked") public void assertCurrentActivity(String message, @SuppressWarnings("rawtypes") Class activityClass, boolean isNewInstance) { """ Asserts that the Activity matching the specified class is active, with the possibility to verify that the expected Activity is a new instance of the ...
java
@SuppressWarnings("unchecked") public void assertCurrentActivity(String message, @SuppressWarnings("rawtypes") Class activityClass, boolean isNewInstance) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "assertCurrentActivity(\""+message+"\", "+activityClass+", "+isNewInstance+")"); } asser...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "assertCurrentActivity", "(", "String", "message", ",", "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "Class", "activityClass", ",", "boolean", "isNewInstance", ")", "{", "if", "(", "config...
Asserts that the Activity matching the specified class is active, with the possibility to verify that the expected Activity is a new instance of the Activity. @param message the message to display if the assert fails @param activityClass the class of the Activity that is expected to be active. Example is: {@code MyAct...
[ "Asserts", "that", "the", "Activity", "matching", "the", "specified", "class", "is", "active", "with", "the", "possibility", "to", "verify", "that", "the", "expected", "Activity", "is", "a", "new", "instance", "of", "the", "Activity", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L1031-L1039
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/TreeGraphNode.java
TreeGraphNode.addArc
@SuppressWarnings("unchecked") public <GR extends GrammaticalRelationAnnotation> boolean addArc(Class<GR> arcLabel, TreeGraphNode node) { """ Add a labeled arc from this node to the argument node. @param arcLabel the <code>Class&lt;? extends GrammaticalRelationAnnotation&gt;</code> with which the new arc is...
java
@SuppressWarnings("unchecked") public <GR extends GrammaticalRelationAnnotation> boolean addArc(Class<GR> arcLabel, TreeGraphNode node) { if (node == null) { return false; } if (!treeGraph().equals(node.treeGraph())) { System.err.println("Warning: you are trying to add an arc from node "...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "GR", "extends", "GrammaticalRelationAnnotation", ">", "boolean", "addArc", "(", "Class", "<", "GR", ">", "arcLabel", ",", "TreeGraphNode", "node", ")", "{", "if", "(", "node", "==", "null", ...
Add a labeled arc from this node to the argument node. @param arcLabel the <code>Class&lt;? extends GrammaticalRelationAnnotation&gt;</code> with which the new arc is to be labeled. @param node the <code>TreeGraphNode</code> to which the new arc should point. @return <code>true</code> iff the arc did not already e...
[ "Add", "a", "labeled", "arc", "from", "this", "node", "to", "the", "argument", "node", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/TreeGraphNode.java#L351-L363
real-logic/agrona
agrona/src/main/java/org/agrona/BufferUtil.java
BufferUtil.boundsCheck
public static void boundsCheck(final byte[] buffer, final long index, final int length) { """ Bounds check the access range and throw a {@link IndexOutOfBoundsException} if exceeded. @param buffer to be checked. @param index at which the access will begin. @param length of the range accessed. """ ...
java
public static void boundsCheck(final byte[] buffer, final long index, final int length) { final int capacity = buffer.length; final long resultingPosition = index + (long)length; if (index < 0 || resultingPosition > capacity) { throw new IndexOutOfBoundsException("index="...
[ "public", "static", "void", "boundsCheck", "(", "final", "byte", "[", "]", "buffer", ",", "final", "long", "index", ",", "final", "int", "length", ")", "{", "final", "int", "capacity", "=", "buffer", ".", "length", ";", "final", "long", "resultingPosition"...
Bounds check the access range and throw a {@link IndexOutOfBoundsException} if exceeded. @param buffer to be checked. @param index at which the access will begin. @param length of the range accessed.
[ "Bounds", "check", "the", "access", "range", "and", "throw", "a", "{", "@link", "IndexOutOfBoundsException", "}", "if", "exceeded", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/BufferUtil.java#L61-L69
real-logic/agrona
agrona/src/main/java/org/agrona/IoUtil.java
IoUtil.createEmptyFile
public static FileChannel createEmptyFile(final File file, final long length, final boolean fillWithZeros) { """ Create an empty file, and optionally fill with 0s, and return the {@link FileChannel} @param file to create @param length of the file to create @param fillWithZeros to the length of...
java
public static FileChannel createEmptyFile(final File file, final long length, final boolean fillWithZeros) { ensureDirectoryExists(file.getParentFile(), file.getParent()); FileChannel templateFile = null; try { final RandomAccessFile randomAccessFile = new RandomAccessFi...
[ "public", "static", "FileChannel", "createEmptyFile", "(", "final", "File", "file", ",", "final", "long", "length", ",", "final", "boolean", "fillWithZeros", ")", "{", "ensureDirectoryExists", "(", "file", ".", "getParentFile", "(", ")", ",", "file", ".", "get...
Create an empty file, and optionally fill with 0s, and return the {@link FileChannel} @param file to create @param length of the file to create @param fillWithZeros to the length of the file to force allocation. @return {@link java.nio.channels.FileChannel} for the file
[ "Create", "an", "empty", "file", "and", "optionally", "fill", "with", "0s", "and", "return", "the", "{", "@link", "FileChannel", "}" ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/IoUtil.java#L246-L268
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NodeVector.java
NodeVector.insertElementAt
public void insertElementAt(int value, int at) { """ Inserts the specified node in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously. @param value Node to inse...
java
public void insertElementAt(int value, int at) { if (null == m_map) { m_map = new int[m_blocksize]; m_mapSize = m_blocksize; } else if ((m_firstFree + 1) >= m_mapSize) { m_mapSize += m_blocksize; int newMap[] = new int[m_mapSize]; System.arraycopy(m_map, 0, newMap,...
[ "public", "void", "insertElementAt", "(", "int", "value", ",", "int", "at", ")", "{", "if", "(", "null", "==", "m_map", ")", "{", "m_map", "=", "new", "int", "[", "m_blocksize", "]", ";", "m_mapSize", "=", "m_blocksize", ";", "}", "else", "if", "(", ...
Inserts the specified node in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously. @param value Node to insert @param at Position where to insert
[ "Inserts", "the", "specified", "node", "in", "this", "vector", "at", "the", "specified", "index", ".", "Each", "component", "in", "this", "vector", "with", "an", "index", "greater", "or", "equal", "to", "the", "specified", "index", "is", "shifted", "upward",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NodeVector.java#L362-L389
hsiafan/apk-parser
src/main/java/net/dongliu/apk/parser/cert/asn1/ber/InputStreamBerDataValueReader.java
InputStreamBerDataValueReader.readDataValue
@SuppressWarnings("resource") private static BerDataValue readDataValue(InputStream input) throws BerDataValueFormatException { """ Returns the next data value or {@code null} if end of input has been reached. @throws BerDataValueFormatException if the value being read is malformed. """ ...
java
@SuppressWarnings("resource") private static BerDataValue readDataValue(InputStream input) throws BerDataValueFormatException { RecordingInputStream in = new RecordingInputStream(input); try { int firstIdentifierByte = in.read(); if (firstIdentifierByte == -1) { ...
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "private", "static", "BerDataValue", "readDataValue", "(", "InputStream", "input", ")", "throws", "BerDataValueFormatException", "{", "RecordingInputStream", "in", "=", "new", "RecordingInputStream", "(", "input", ")", ...
Returns the next data value or {@code null} if end of input has been reached. @throws BerDataValueFormatException if the value being read is malformed.
[ "Returns", "the", "next", "data", "value", "or", "{", "@code", "null", "}", "if", "end", "of", "input", "has", "been", "reached", "." ]
train
https://github.com/hsiafan/apk-parser/blob/8993ddd52017b37b8f2e784ae0a15417d9ede932/src/main/java/net/dongliu/apk/parser/cert/asn1/ber/InputStreamBerDataValueReader.java#L48-L100
nightcode/yaranga
core/src/org/nightcode/common/base/Splitter.java
Splitter.trim
public Splitter trim(char[] chars) { """ Returns a splitter that removes all leading or trailing characters matching the given characters from each returned key and value. @param chars characters @return a splitter with the desired configuration """ Matcher matcher = new CharsMatcher(chars); retur...
java
public Splitter trim(char[] chars) { Matcher matcher = new CharsMatcher(chars); return new Splitter(pairSeparator, keyValueSeparator, matcher, matcher); }
[ "public", "Splitter", "trim", "(", "char", "[", "]", "chars", ")", "{", "Matcher", "matcher", "=", "new", "CharsMatcher", "(", "chars", ")", ";", "return", "new", "Splitter", "(", "pairSeparator", ",", "keyValueSeparator", ",", "matcher", ",", "matcher", "...
Returns a splitter that removes all leading or trailing characters matching the given characters from each returned key and value. @param chars characters @return a splitter with the desired configuration
[ "Returns", "a", "splitter", "that", "removes", "all", "leading", "or", "trailing", "characters", "matching", "the", "given", "characters", "from", "each", "returned", "key", "and", "value", "." ]
train
https://github.com/nightcode/yaranga/blob/f02cf8d8bcd365b6b1d55638938631a00e9ee808/core/src/org/nightcode/common/base/Splitter.java#L152-L155
Azure/azure-sdk-for-java
privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/PrivateZonesInner.java
PrivateZonesInner.createOrUpdate
public PrivateZoneInner createOrUpdate(String resourceGroupName, String privateZoneName, PrivateZoneInner parameters) { """ Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone. @param resourceGroupName The name of the resource group. @param privateZon...
java
public PrivateZoneInner createOrUpdate(String resourceGroupName, String privateZoneName, PrivateZoneInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateZoneName, parameters).toBlocking().last().body(); }
[ "public", "PrivateZoneInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "privateZoneName", ",", "PrivateZoneInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "privateZoneName", ",", ...
Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @param parameters Parameters supplied to the CreateOrUpdate oper...
[ "Creates", "or", "updates", "a", "Private", "DNS", "zone", ".", "Does", "not", "modify", "Links", "to", "virtual", "networks", "or", "DNS", "records", "within", "the", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/PrivateZonesInner.java#L125-L127
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/utils/Assert.java
Assert.parameterNotEmpty
public static void parameterNotEmpty(final String name, final Iterable obj) { """ Validates that the Iterable is not empty @param name the parameter name @param obj the proposed parameter value """ if (!obj.iterator().hasNext()) { raiseError(format("Parameter '%s' from type '%s' is exp...
java
public static void parameterNotEmpty(final String name, final Iterable obj) { if (!obj.iterator().hasNext()) { raiseError(format("Parameter '%s' from type '%s' is expected to NOT be empty", name, obj.getClass().getName())); } }
[ "public", "static", "void", "parameterNotEmpty", "(", "final", "String", "name", ",", "final", "Iterable", "obj", ")", "{", "if", "(", "!", "obj", ".", "iterator", "(", ")", ".", "hasNext", "(", ")", ")", "{", "raiseError", "(", "format", "(", "\"Param...
Validates that the Iterable is not empty @param name the parameter name @param obj the proposed parameter value
[ "Validates", "that", "the", "Iterable", "is", "not", "empty" ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/utils/Assert.java#L61-L65
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulator.java
MolecularFormulaSetManipulator.validCorrelation
private static boolean validCorrelation(IMolecularFormula formulaMin, IMolecularFormula formulamax) { """ In the minimal IMolecularFormula must contain all those IElement found in the minimal IMolecularFormula. @param formulaMax A IMolecularFormula which contains the maximal representation of the Elements @p...
java
private static boolean validCorrelation(IMolecularFormula formulaMin, IMolecularFormula formulamax) { for (IElement element : MolecularFormulaManipulator.elements(formulaMin)) { if (!MolecularFormulaManipulator.containsElement(formulamax, element)) return false; } return true; }
[ "private", "static", "boolean", "validCorrelation", "(", "IMolecularFormula", "formulaMin", ",", "IMolecularFormula", "formulamax", ")", "{", "for", "(", "IElement", "element", ":", "MolecularFormulaManipulator", ".", "elements", "(", "formulaMin", ")", ")", "{", "i...
In the minimal IMolecularFormula must contain all those IElement found in the minimal IMolecularFormula. @param formulaMax A IMolecularFormula which contains the maximal representation of the Elements @param formulaMin A IMolecularFormula which contains the minimal representation of the Elements @return T...
[ "In", "the", "minimal", "IMolecularFormula", "must", "contain", "all", "those", "IElement", "found", "in", "the", "minimal", "IMolecularFormula", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulator.java#L158-L164
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntVector.java
IntVector.addElements
public final void addElements(int value, int numberOfElements) { """ Append several int values onto the vector. @param value Int to add to the list """ if ((m_firstFree + numberOfElements) >= m_mapSize) { m_mapSize += (m_blocksize+numberOfElements); int newMap[] = new int[m_mapSize]; ...
java
public final void addElements(int value, int numberOfElements) { if ((m_firstFree + numberOfElements) >= m_mapSize) { m_mapSize += (m_blocksize+numberOfElements); int newMap[] = new int[m_mapSize]; System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1); m_map = newMap; } f...
[ "public", "final", "void", "addElements", "(", "int", "value", ",", "int", "numberOfElements", ")", "{", "if", "(", "(", "m_firstFree", "+", "numberOfElements", ")", ">=", "m_mapSize", ")", "{", "m_mapSize", "+=", "(", "m_blocksize", "+", "numberOfElements", ...
Append several int values onto the vector. @param value Int to add to the list
[ "Append", "several", "int", "values", "onto", "the", "vector", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntVector.java#L150-L169
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.checkForOverride
private void checkForOverride(Properties properties, String name, String attr, String value) { """ Print a warning if a property with a given name already exists with a different value """ String propertyValue = properties.getProperty(attr); if (propertyValue != null && !propertyValue.equals(value)) { ...
java
private void checkForOverride(Properties properties, String name, String attr, String value) { String propertyValue = properties.getProperty(attr); if (propertyValue != null && !propertyValue.equals(value)) { LOG.warn(name + ":an attempt to override final parameter: " + attr + "; Ignoring."); } }
[ "private", "void", "checkForOverride", "(", "Properties", "properties", ",", "String", "name", ",", "String", "attr", ",", "String", "value", ")", "{", "String", "propertyValue", "=", "properties", ".", "getProperty", "(", "attr", ")", ";", "if", "(", "prope...
Print a warning if a property with a given name already exists with a different value
[ "Print", "a", "warning", "if", "a", "property", "with", "a", "given", "name", "already", "exists", "with", "a", "different", "value" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L3078-L3084
j256/ormlite-core
src/main/java/com/j256/ormlite/misc/TransactionManager.java
TransactionManager.callInTransaction
public static <T> T callInTransaction(String tableName, final ConnectionSource connectionSource, final Callable<T> callable) throws SQLException { """ Same as {@link #callInTransaction(ConnectionSource, Callable)} except this has a table-name. <p> WARNING: it is up to you to properly synchronize around this...
java
public static <T> T callInTransaction(String tableName, final ConnectionSource connectionSource, final Callable<T> callable) throws SQLException { DatabaseConnection connection = connectionSource.getReadWriteConnection(tableName); try { boolean saved = connectionSource.saveSpecialConnection(connection); r...
[ "public", "static", "<", "T", ">", "T", "callInTransaction", "(", "String", "tableName", ",", "final", "ConnectionSource", "connectionSource", ",", "final", "Callable", "<", "T", ">", "callable", ")", "throws", "SQLException", "{", "DatabaseConnection", "connectio...
Same as {@link #callInTransaction(ConnectionSource, Callable)} except this has a table-name. <p> WARNING: it is up to you to properly synchronize around this method if multiple threads are using a connection-source which works gives out a single-connection. The reason why this is necessary is that multiple operations ...
[ "Same", "as", "{", "@link", "#callInTransaction", "(", "ConnectionSource", "Callable", ")", "}", "except", "this", "has", "a", "table", "-", "name", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/misc/TransactionManager.java#L171-L183
Harium/keel
src/main/java/com/harium/keel/core/helper/ColorHelper.java
ColorHelper.fromHSV
public static int fromHSV(float h, float s, float v, int a) { """ Method to transform from HSV to ARGB Source from: https://www.cs.rit.edu/~ncs/color/t_convert.html @param h - hue @param s - saturation @param v - brightness @param a - alpha @return rgb color """ float r = v; float g = v...
java
public static int fromHSV(float h, float s, float v, int a) { float r = v; float g = v; float b = v; int i; float f, p, q, t; if (s == 0) { // achromatic (grey) int ri = (int) (r * 0xff); int gi = (int) (g * 0xff); int bi ...
[ "public", "static", "int", "fromHSV", "(", "float", "h", ",", "float", "s", ",", "float", "v", ",", "int", "a", ")", "{", "float", "r", "=", "v", ";", "float", "g", "=", "v", ";", "float", "b", "=", "v", ";", "int", "i", ";", "float", "f", ...
Method to transform from HSV to ARGB Source from: https://www.cs.rit.edu/~ncs/color/t_convert.html @param h - hue @param s - saturation @param v - brightness @param a - alpha @return rgb color
[ "Method", "to", "transform", "from", "HSV", "to", "ARGB", "Source", "from", ":", "https", ":", "//", "www", ".", "cs", ".", "rit", ".", "edu", "/", "~ncs", "/", "color", "/", "t_convert", ".", "html" ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/core/helper/ColorHelper.java#L314-L377
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.getResourceUrl
public String getResourceUrl(String bucketName, String key) { """ Returns the URL to the key in the bucket given, using the client's scheme and endpoint. Returns null if the given bucket and key cannot be converted to a URL. """ try { return getUrl(bucketName, key).toString(); } c...
java
public String getResourceUrl(String bucketName, String key) { try { return getUrl(bucketName, key).toString(); } catch ( Exception e ) { return null; } }
[ "public", "String", "getResourceUrl", "(", "String", "bucketName", ",", "String", "key", ")", "{", "try", "{", "return", "getUrl", "(", "bucketName", ",", "key", ")", ".", "toString", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "retur...
Returns the URL to the key in the bucket given, using the client's scheme and endpoint. Returns null if the given bucket and key cannot be converted to a URL.
[ "Returns", "the", "URL", "to", "the", "key", "in", "the", "bucket", "given", "using", "the", "client", "s", "scheme", "and", "endpoint", ".", "Returns", "null", "if", "the", "given", "bucket", "and", "key", "cannot", "be", "converted", "to", "a", "URL", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L4559-L4565
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/TileEntityUtils.java
TileEntityUtils.getTileEntity
public static <T> T getTileEntity(Class<T> clazz, IBlockAccess world, BlockPos pos) { """ Gets the {@link TileEntity} of type <b>T</b> at the specified {@link BlockPos}.<br> If no <code>TileEntity</code> was found at the coordinates, or if the <code>TileEntity</code> is not of type <b>T</b>, returns <code>null</...
java
public static <T> T getTileEntity(Class<T> clazz, IBlockAccess world, BlockPos pos) { if (world == null) return null; TileEntity te = world.getTileEntity(pos); return te != null && clazz.isAssignableFrom(te.getClass()) ? Silenced.get(() -> clazz.cast(te)) : null; }
[ "public", "static", "<", "T", ">", "T", "getTileEntity", "(", "Class", "<", "T", ">", "clazz", ",", "IBlockAccess", "world", ",", "BlockPos", "pos", ")", "{", "if", "(", "world", "==", "null", ")", "return", "null", ";", "TileEntity", "te", "=", "wor...
Gets the {@link TileEntity} of type <b>T</b> at the specified {@link BlockPos}.<br> If no <code>TileEntity</code> was found at the coordinates, or if the <code>TileEntity</code> is not of type <b>T</b>, returns <code>null</code> instead. @param <T> type of TileEntity requested @param clazz the class of the TileEntity ...
[ "Gets", "the", "{", "@link", "TileEntity", "}", "of", "type", "<b", ">", "T<", "/", "b", ">", "at", "the", "specified", "{", "@link", "BlockPos", "}", ".", "<br", ">", "If", "no", "<code", ">", "TileEntity<", "/", "code", ">", "was", "found", "at",...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/TileEntityUtils.java#L61-L68
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/DescribeIdentityPoolResult.java
DescribeIdentityPoolResult.withIdentityPoolTags
public DescribeIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { """ <p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other...
java
public DescribeIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { setIdentityPoolTags(identityPoolTags); return this; }
[ "public", "DescribeIdentityPoolResult", "withIdentityPoolTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "identityPoolTags", ")", "{", "setIdentityPoolTags", "(", "identityPoolTags", ")", ";", "return", "this", ";", "}" ]
<p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria. </p> @param identityPoolTags The tags that are assigned to the identity pool. A tag is a label that you ...
[ "<p", ">", "The", "tags", "that", "are", "assigned", "to", "the", "identity", "pool", ".", "A", "tag", "is", "a", "label", "that", "you", "can", "apply", "to", "identity", "pools", "to", "categorize", "and", "manage", "them", "in", "different", "ways", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/DescribeIdentityPoolResult.java#L569-L572
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java
StylesContainer.writeVisibleDataStyles
public void writeVisibleDataStyles(final XMLUtil util, final Appendable appendable) throws IOException { """ Write data styles to styles.xml/common-styles @param util an util @param appendable the destination @throws IOException if an I/O error occurs """ final Iterable<DataStyle> da...
java
public void writeVisibleDataStyles(final XMLUtil util, final Appendable appendable) throws IOException { final Iterable<DataStyle> dataStyles = this.dataStylesContainer .getValues(Dest.STYLES_COMMON_STYLES); for (final DataStyle dataStyle : dataStyles) { assert !d...
[ "public", "void", "writeVisibleDataStyles", "(", "final", "XMLUtil", "util", ",", "final", "Appendable", "appendable", ")", "throws", "IOException", "{", "final", "Iterable", "<", "DataStyle", ">", "dataStyles", "=", "this", ".", "dataStylesContainer", ".", "getVa...
Write data styles to styles.xml/common-styles @param util an util @param appendable the destination @throws IOException if an I/O error occurs
[ "Write", "data", "styles", "to", "styles", ".", "xml", "/", "common", "-", "styles" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/StylesContainer.java#L462-L472
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.importCSV
public static <E extends Exception> long importCSV(final File file, final long offset, final long count, final Try.Predicate<String[], E> filter, final PreparedStatement stmt, final int batchSize, final int batchInterval, final Try.BiConsumer<? super PreparedStatement, ? super String[], SQLExc...
java
public static <E extends Exception> long importCSV(final File file, final long offset, final long count, final Try.Predicate<String[], E> filter, final PreparedStatement stmt, final int batchSize, final int batchInterval, final Try.BiConsumer<? super PreparedStatement, ? super String[], SQLExc...
[ "public", "static", "<", "E", "extends", "Exception", ">", "long", "importCSV", "(", "final", "File", "file", ",", "final", "long", "offset", ",", "final", "long", "count", ",", "final", "Try", ".", "Predicate", "<", "String", "[", "]", ",", "E", ">", ...
Imports the data from CSV to database. @param file @param offset @param count @param filter @param stmt the column order in the sql should be consistent with the column order in the CSV file. @param batchSize @param batchInterval @param stmtSetter @return
[ "Imports", "the", "data", "from", "CSV", "to", "database", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L1604-L1618
watchrabbit/rabbit-commons
src/main/java/com/watchrabbit/commons/async/FutureContext.java
FutureContext.register
public static <T> void register(Future<T> future, Consumer<T> consumer) { """ Adds new {@code Future} and {@code Consumer} to the context of this thread. To resolve this future and invoke the result consumer use method {@link resolve()} @param <T> type of {@code future} and {@code consumer} @param future {@c...
java
public static <T> void register(Future<T> future, Consumer<T> consumer) { LOGGER.debug("Registering new future {} and consumer {}", future, consumer); getFutureContext().add(future, consumer); }
[ "public", "static", "<", "T", ">", "void", "register", "(", "Future", "<", "T", ">", "future", ",", "Consumer", "<", "T", ">", "consumer", ")", "{", "LOGGER", ".", "debug", "(", "\"Registering new future {} and consumer {}\"", ",", "future", ",", "consumer",...
Adds new {@code Future} and {@code Consumer} to the context of this thread. To resolve this future and invoke the result consumer use method {@link resolve()} @param <T> type of {@code future} and {@code consumer} @param future {@code future} that returns argument of type {@code <T>} used by {@code consumer} @param co...
[ "Adds", "new", "{", "@code", "Future", "}", "and", "{", "@code", "Consumer", "}", "to", "the", "context", "of", "this", "thread", ".", "To", "resolve", "this", "future", "and", "invoke", "the", "result", "consumer", "use", "method", "{", "@link", "resolv...
train
https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/async/FutureContext.java#L60-L63
cerner/beadledom
client/resteasy-client/src/main/java/com/cerner/beadledom/client/resteasy/BeadledomResteasyClientBuilder.java
BeadledomResteasyClientBuilder.setSocketTimeout
@Override public BeadledomResteasyClientBuilder setSocketTimeout(int socketTimeout, TimeUnit timeUnit) { """ Sets the default socket timeout to be used if a {@link ClientHttpEngine} isn't specified via {@link #setHttpEngine(ClientHttpEngine)}. <p>If a {@link ClientHttpEngine} is specified via {@link #setHttp...
java
@Override public BeadledomResteasyClientBuilder setSocketTimeout(int socketTimeout, TimeUnit timeUnit) { long millis = timeUnit.toMillis(socketTimeout); if (millis > Integer.MAX_VALUE || millis < 0) { throw new IllegalArgumentException( "Socket timeout must be smaller than Integer.MAX_VALUE wh...
[ "@", "Override", "public", "BeadledomResteasyClientBuilder", "setSocketTimeout", "(", "int", "socketTimeout", ",", "TimeUnit", "timeUnit", ")", "{", "long", "millis", "=", "timeUnit", ".", "toMillis", "(", "socketTimeout", ")", ";", "if", "(", "millis", ">", "In...
Sets the default socket timeout to be used if a {@link ClientHttpEngine} isn't specified via {@link #setHttpEngine(ClientHttpEngine)}. <p>If a {@link ClientHttpEngine} is specified via {@link #setHttpEngine(ClientHttpEngine)}, then this property will be ignored. @return this builder
[ "Sets", "the", "default", "socket", "timeout", "to", "be", "used", "if", "a", "{", "@link", "ClientHttpEngine", "}", "isn", "t", "specified", "via", "{", "@link", "#setHttpEngine", "(", "ClientHttpEngine", ")", "}", "." ]
train
https://github.com/cerner/beadledom/blob/75435bced5187d5455b46518fadf85c93cf32014/client/resteasy-client/src/main/java/com/cerner/beadledom/client/resteasy/BeadledomResteasyClientBuilder.java#L149-L158
amzn/ion-java
src/com/amazon/ion/impl/IonWriterSystemBinary.java
IonWriterSystemBinary.writeRaw
public void writeRaw(byte[] value, int start, int len) throws IOException { """ just transfer the bytes into the current patch as 'proper' ion binary serialization """ startValue(TID_RAW); _writer.write(value, start, len); _patch.patchValue(len); closeValue(); }
java
public void writeRaw(byte[] value, int start, int len) throws IOException { startValue(TID_RAW); _writer.write(value, start, len); _patch.patchValue(len); closeValue(); }
[ "public", "void", "writeRaw", "(", "byte", "[", "]", "value", ",", "int", "start", ",", "int", "len", ")", "throws", "IOException", "{", "startValue", "(", "TID_RAW", ")", ";", "_writer", ".", "write", "(", "value", ",", "start", ",", "len", ")", ";"...
just transfer the bytes into the current patch as 'proper' ion binary serialization
[ "just", "transfer", "the", "bytes", "into", "the", "current", "patch", "as", "proper", "ion", "binary", "serialization" ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonWriterSystemBinary.java#L808-L814
EXIficient/exificient-core
src/main/java/com/siemens/ct/exi/core/io/channel/AbstractDecoderChannel.java
AbstractDecoderChannel.decodeDecimalValue
public DecimalValue decodeDecimalValue() throws IOException { """ Decode a decimal represented as a Boolean sign followed by two Unsigned Integers. A sign value of zero (0) is used to represent positive Decimal values and a sign value of one (1) is used to represent negative Decimal values The first Integer rep...
java
public DecimalValue decodeDecimalValue() throws IOException { boolean negative = decodeBoolean(); IntegerValue integral = decodeUnsignedIntegerValue(false); IntegerValue revFractional = decodeUnsignedIntegerValue(false); return new DecimalValue(negative, integral, revFractional); }
[ "public", "DecimalValue", "decodeDecimalValue", "(", ")", "throws", "IOException", "{", "boolean", "negative", "=", "decodeBoolean", "(", ")", ";", "IntegerValue", "integral", "=", "decodeUnsignedIntegerValue", "(", "false", ")", ";", "IntegerValue", "revFractional", ...
Decode a decimal represented as a Boolean sign followed by two Unsigned Integers. A sign value of zero (0) is used to represent positive Decimal values and a sign value of one (1) is used to represent negative Decimal values The first Integer represents the integral portion of the Decimal value. The second positive int...
[ "Decode", "a", "decimal", "represented", "as", "a", "Boolean", "sign", "followed", "by", "two", "Unsigned", "Integers", ".", "A", "sign", "value", "of", "zero", "(", "0", ")", "is", "used", "to", "represent", "positive", "Decimal", "values", "and", "a", ...
train
https://github.com/EXIficient/exificient-core/blob/b6026c5fd39e9cc3d7874caa20f084e264e0ddc7/src/main/java/com/siemens/ct/exi/core/io/channel/AbstractDecoderChannel.java#L307-L314
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
ClustersInner.beginExecuteScriptActionsAsync
public Observable<Void> beginExecuteScriptActionsAsync(String resourceGroupName, String clusterName, ExecuteScriptActionParameters parameters) { """ Executes script actions on the specified HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. ...
java
public Observable<Void> beginExecuteScriptActionsAsync(String resourceGroupName, String clusterName, ExecuteScriptActionParameters parameters) { return beginExecuteScriptActionsWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Overri...
[ "public", "Observable", "<", "Void", ">", "beginExecuteScriptActionsAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "ExecuteScriptActionParameters", "parameters", ")", "{", "return", "beginExecuteScriptActionsWithServiceResponseAsync", "(", "res...
Executes script actions on the specified HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param parameters The parameters for executing script actions. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link Se...
[ "Executes", "script", "actions", "on", "the", "specified", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L1822-L1829
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getIndexOf
public static int getIndexOf (@Nullable final String sText, final char cSearch) { """ Get the first index of cSearch within sText. @param sText The text to search in. May be <code>null</code>. @param cSearch The character to search for. May be <code>null</code>. @return The first index of sSearch within sTe...
java
public static int getIndexOf (@Nullable final String sText, final char cSearch) { return sText != null && sText.length () >= 1 ? sText.indexOf (cSearch) : STRING_NOT_FOUND; }
[ "public", "static", "int", "getIndexOf", "(", "@", "Nullable", "final", "String", "sText", ",", "final", "char", "cSearch", ")", "{", "return", "sText", "!=", "null", "&&", "sText", ".", "length", "(", ")", ">=", "1", "?", "sText", ".", "indexOf", "(",...
Get the first index of cSearch within sText. @param sText The text to search in. May be <code>null</code>. @param cSearch The character to search for. May be <code>null</code>. @return The first index of sSearch within sText or {@value #STRING_NOT_FOUND} if cSearch was not found or if any parameter was <code>null</cod...
[ "Get", "the", "first", "index", "of", "cSearch", "within", "sText", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L2755-L2758
Bedework/bw-util
bw-util-options/src/main/java/org/bedework/util/options/Options.java
Options.toXml
public void toXml(final OptionElement root, final OutputStream str) throws OptionsException { """ Emit the options as xml. @param root @param str @throws OptionsException """ Writer wtr = null; try { XmlEmit xml = new XmlEmit(true); wtr = new OutputStreamWriter(str); xml.startE...
java
public void toXml(final OptionElement root, final OutputStream str) throws OptionsException { Writer wtr = null; try { XmlEmit xml = new XmlEmit(true); wtr = new OutputStreamWriter(str); xml.startEmit(wtr); xml.openTag(outerTag); for (OptionElement oe: root.getChildren()) { ...
[ "public", "void", "toXml", "(", "final", "OptionElement", "root", ",", "final", "OutputStream", "str", ")", "throws", "OptionsException", "{", "Writer", "wtr", "=", "null", ";", "try", "{", "XmlEmit", "xml", "=", "new", "XmlEmit", "(", "true", ")", ";", ...
Emit the options as xml. @param root @param str @throws OptionsException
[ "Emit", "the", "options", "as", "xml", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-options/src/main/java/org/bedework/util/options/Options.java#L202-L229
apache/incubator-atlas
common/src/main/java/org/apache/atlas/ha/HAConfiguration.java
HAConfiguration.getBoundAddressForId
public static String getBoundAddressForId(Configuration configuration, String serverId) { """ Get the web server address that a server instance with the passed ID is bound to. This method uses the property {@link SecurityProperties#TLS_ENABLED} to determine whether the URL is http or https. @param configura...
java
public static String getBoundAddressForId(Configuration configuration, String serverId) { String hostPort = configuration.getString(ATLAS_SERVER_ADDRESS_PREFIX +serverId); boolean isSecure = configuration.getBoolean(SecurityProperties.TLS_ENABLED); String protocol = (isSecure) ? "https://" : "ht...
[ "public", "static", "String", "getBoundAddressForId", "(", "Configuration", "configuration", ",", "String", "serverId", ")", "{", "String", "hostPort", "=", "configuration", ".", "getString", "(", "ATLAS_SERVER_ADDRESS_PREFIX", "+", "serverId", ")", ";", "boolean", ...
Get the web server address that a server instance with the passed ID is bound to. This method uses the property {@link SecurityProperties#TLS_ENABLED} to determine whether the URL is http or https. @param configuration underlying configuration @param serverId serverId whose host:port property is picked to build the w...
[ "Get", "the", "web", "server", "address", "that", "a", "server", "instance", "with", "the", "passed", "ID", "is", "bound", "to", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/ha/HAConfiguration.java#L86-L91
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
StylesheetHandler.processingInstruction
public void processingInstruction(String target, String data) throws org.xml.sax.SAXException { """ Receive notification of a processing instruction. <p>The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main...
java
public void processingInstruction(String target, String data) throws org.xml.sax.SAXException { if (!m_shouldProcess) return; // Recreating Scott's kluge: // A xsl:for-each or xsl:apply-templates may have a special // PI that tells us not to cache the document. This PI // shoul...
[ "public", "void", "processingInstruction", "(", "String", "target", ",", "String", "data", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "if", "(", "!", "m_shouldProcess", ")", "return", ";", "// Recreating Scott's kluge:", "// A xsl:fo...
Receive notification of a processing instruction. <p>The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.</p> <p>A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declara...
[ "Receive", "notification", "of", "a", "processing", "instruction", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java#L754-L813
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.box
@SafeVarargs public static Integer[] box(final int... a) { """ <p> Converts an array of primitive ints to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a an {@code int} array @return an {@code Integer} array, {@code null} if null array input """...
java
@SafeVarargs public static Integer[] box(final int... a) { if (a == null) { return null; } return box(a, 0, a.length); }
[ "@", "SafeVarargs", "public", "static", "Integer", "[", "]", "box", "(", "final", "int", "...", "a", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "box", "(", "a", ",", "0", ",", "a", ".", "length", ")"...
<p> Converts an array of primitive ints to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a an {@code int} array @return an {@code Integer} array, {@code null} if null array input
[ "<p", ">", "Converts", "an", "array", "of", "primitive", "ints", "to", "objects", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L275-L282
finmath/finmath-lib
src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java
StochasticPathwiseLevenbergMarquardt.getCloneWithModifiedTargetValues
public StochasticPathwiseLevenbergMarquardt getCloneWithModifiedTargetValues(List<RandomVariable> newTargetVaues, List<RandomVariable> newWeights, boolean isUseBestParametersAsInitialParameters) throws CloneNotSupportedException { """ Create a clone of this LevenbergMarquardt optimizer with a new vector for the t...
java
public StochasticPathwiseLevenbergMarquardt getCloneWithModifiedTargetValues(List<RandomVariable> newTargetVaues, List<RandomVariable> newWeights, boolean isUseBestParametersAsInitialParameters) throws CloneNotSupportedException { StochasticPathwiseLevenbergMarquardt clonedOptimizer = clone(); clonedOptimizer.targe...
[ "public", "StochasticPathwiseLevenbergMarquardt", "getCloneWithModifiedTargetValues", "(", "List", "<", "RandomVariable", ">", "newTargetVaues", ",", "List", "<", "RandomVariable", ">", "newWeights", ",", "boolean", "isUseBestParametersAsInitialParameters", ")", "throws", "Cl...
Create a clone of this LevenbergMarquardt optimizer with a new vector for the target values and weights. The clone will use the same objective function than this implementation, i.e., the implementation of {@link #setValues(RandomVariable[], RandomVariable[])} and that of {@link #setDerivatives(RandomVariable[], Rando...
[ "Create", "a", "clone", "of", "this", "LevenbergMarquardt", "optimizer", "with", "a", "new", "vector", "for", "the", "target", "values", "and", "weights", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java#L718-L728
groupon/odo
client/src/main/java/com/groupon/odo/client/Client.java
Client.activateServerGroup
public ServerGroup activateServerGroup(int serverGroupId) { """ Activate a server group @param serverGroupId ID of server group @return Updated ServerGroup """ ServerGroup serverGroup = null; BasicNameValuePair[] params = { new BasicNameValuePair("activate", String.valueOf(true)...
java
public ServerGroup activateServerGroup(int serverGroupId) { ServerGroup serverGroup = null; BasicNameValuePair[] params = { new BasicNameValuePair("activate", String.valueOf(true)), new BasicNameValuePair("profileIdentifier", this._profileName) }; try { ...
[ "public", "ServerGroup", "activateServerGroup", "(", "int", "serverGroupId", ")", "{", "ServerGroup", "serverGroup", "=", "null", ";", "BasicNameValuePair", "[", "]", "params", "=", "{", "new", "BasicNameValuePair", "(", "\"activate\"", ",", "String", ".", "valueO...
Activate a server group @param serverGroupId ID of server group @return Updated ServerGroup
[ "Activate", "a", "server", "group" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L1296-L1310
codescape/bitvunit
bitvunit-core/src/main/java/de/codescape/bitvunit/ruleset/XmlRuleSet.java
XmlRuleSet.buildDocument
private Document buildDocument(String location) { """ Parses the file at the given location and creates a {@link Document} instance to read the rules from. @param location location of the XML file @return {@link Document} instance representing the XML file """ try { return documentBuild...
java
private Document buildDocument(String location) { try { return documentBuilderFactory.newDocumentBuilder().parse(ClassPathResource.asInputStream(location)); } catch (ParserConfigurationException | SAXException | IOException | RuntimeException e) { throw new XmlRuleSetException("C...
[ "private", "Document", "buildDocument", "(", "String", "location", ")", "{", "try", "{", "return", "documentBuilderFactory", ".", "newDocumentBuilder", "(", ")", ".", "parse", "(", "ClassPathResource", ".", "asInputStream", "(", "location", ")", ")", ";", "}", ...
Parses the file at the given location and creates a {@link Document} instance to read the rules from. @param location location of the XML file @return {@link Document} instance representing the XML file
[ "Parses", "the", "file", "at", "the", "given", "location", "and", "creates", "a", "{", "@link", "Document", "}", "instance", "to", "read", "the", "rules", "from", "." ]
train
https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/ruleset/XmlRuleSet.java#L42-L48
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_boot_bootId_GET
public OvhNetboot serviceName_boot_bootId_GET(String serviceName, Long bootId) throws IOException { """ Get this object properties REST: GET /dedicated/server/{serviceName}/boot/{bootId} @param serviceName [required] The internal name of your dedicated server @param bootId [required] boot id """ String ...
java
public OvhNetboot serviceName_boot_bootId_GET(String serviceName, Long bootId) throws IOException { String qPath = "/dedicated/server/{serviceName}/boot/{bootId}"; StringBuilder sb = path(qPath, serviceName, bootId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhNetboot.class)...
[ "public", "OvhNetboot", "serviceName_boot_bootId_GET", "(", "String", "serviceName", ",", "Long", "bootId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/boot/{bootId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPa...
Get this object properties REST: GET /dedicated/server/{serviceName}/boot/{bootId} @param serviceName [required] The internal name of your dedicated server @param bootId [required] boot id
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1829-L1834
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbDiscover.java
TmdbDiscover.getDiscoverTV
public ResultList<TVBasic> getDiscoverTV(Discover discover) throws MovieDbException { """ Discover movies by different types of data like average rating, number of votes, genres and certifications. @param discover A discover object containing the search criteria required @return @throws MovieDbException "...
java
public ResultList<TVBasic> getDiscoverTV(Discover discover) throws MovieDbException { URL url = new ApiUrl(apiKey, MethodBase.DISCOVER).subMethod(MethodSub.TV).buildUrl(discover.getParams()); String webpage = httpTools.getRequest(url); WrapperGenericList<TVBasic> wrapper = processWrapper(getType...
[ "public", "ResultList", "<", "TVBasic", ">", "getDiscoverTV", "(", "Discover", "discover", ")", "throws", "MovieDbException", "{", "URL", "url", "=", "new", "ApiUrl", "(", "apiKey", ",", "MethodBase", ".", "DISCOVER", ")", ".", "subMethod", "(", "MethodSub", ...
Discover movies by different types of data like average rating, number of votes, genres and certifications. @param discover A discover object containing the search criteria required @return @throws MovieDbException
[ "Discover", "movies", "by", "different", "types", "of", "data", "like", "average", "rating", "number", "of", "votes", "genres", "and", "certifications", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbDiscover.java#L72-L77
jenkinsci/jenkins
core/src/main/java/jenkins/util/JSONSignatureValidator.java
JSONSignatureValidator.checkSpecificSignature
private FormValidation checkSpecificSignature(JSONObject json, JSONObject signatureJson, MessageDigest digest, String digestEntry, Signature signature, String signatureEntry, String digestName) throws IOException { """ Computes the specified {@code digest} and {@code signature} for the provided {@code json} object...
java
private FormValidation checkSpecificSignature(JSONObject json, JSONObject signatureJson, MessageDigest digest, String digestEntry, Signature signature, String signatureEntry, String digestName) throws IOException { // this is for computing a digest to check sanity DigestOutputStream dos = new DigestOutp...
[ "private", "FormValidation", "checkSpecificSignature", "(", "JSONObject", "json", ",", "JSONObject", "signatureJson", ",", "MessageDigest", "digest", ",", "String", "digestEntry", ",", "Signature", "signature", ",", "String", "signatureEntry", ",", "String", "digestName...
Computes the specified {@code digest} and {@code signature} for the provided {@code json} object and checks whether they match {@code digestEntry} and {@signatureEntry} in the provided {@code signatureJson} object. @param json the full update-center.json content @param signatureJson signature block from update-center....
[ "Computes", "the", "specified", "{", "@code", "digest", "}", "and", "{", "@code", "signature", "}", "for", "the", "provided", "{", "@code", "json", "}", "object", "and", "checks", "whether", "they", "match", "{", "@code", "digestEntry", "}", "and", "{", ...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/JSONSignatureValidator.java#L155-L204
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getAccountBalance
public AccountBalance getAccountBalance(final String accountCode) { """ Get Account Balance <p> Retrieves the remaining balance on the account @param accountCode recurly account id @return the updated AccountBalance if success, null otherwise """ return doGET(Account.ACCOUNT_RESOURCE + "/" + acco...
java
public AccountBalance getAccountBalance(final String accountCode) { return doGET(Account.ACCOUNT_RESOURCE + "/" + accountCode + AccountBalance.ACCOUNT_BALANCE_RESOURCE, AccountBalance.class); }
[ "public", "AccountBalance", "getAccountBalance", "(", "final", "String", "accountCode", ")", "{", "return", "doGET", "(", "Account", ".", "ACCOUNT_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "AccountBalance", ".", "ACCOUNT_BALANCE_RESOURCE", ",", "AccountBalance...
Get Account Balance <p> Retrieves the remaining balance on the account @param accountCode recurly account id @return the updated AccountBalance if success, null otherwise
[ "Get", "Account", "Balance", "<p", ">", "Retrieves", "the", "remaining", "balance", "on", "the", "account" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L337-L339
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularTools_F64.java
EquirectangularTools_F64.equiToLatLon
public void equiToLatLon(double x , double y , GeoLL_F64 geo ) { """ Converts the equirectangular coordinate into a latitude and longitude @param x pixel coordinate in equirectangular image @param y pixel coordinate in equirectangular image @param geo (output) """ geo.lon = (x/width - 0.5)*GrlConstants.P...
java
public void equiToLatLon(double x , double y , GeoLL_F64 geo ) { geo.lon = (x/width - 0.5)*GrlConstants.PI2; geo.lat = (y/(height-1) - 0.5)*GrlConstants.PI; }
[ "public", "void", "equiToLatLon", "(", "double", "x", ",", "double", "y", ",", "GeoLL_F64", "geo", ")", "{", "geo", ".", "lon", "=", "(", "x", "/", "width", "-", "0.5", ")", "*", "GrlConstants", ".", "PI2", ";", "geo", ".", "lat", "=", "(", "y", ...
Converts the equirectangular coordinate into a latitude and longitude @param x pixel coordinate in equirectangular image @param y pixel coordinate in equirectangular image @param geo (output)
[ "Converts", "the", "equirectangular", "coordinate", "into", "a", "latitude", "and", "longitude" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularTools_F64.java#L118-L121
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java
ApplicationsImpl.listAsync
public ServiceFuture<List<ApplicationSummary>> listAsync(final ApplicationListOptions applicationListOptions, final ListOperationCallback<ApplicationSummary> serviceCallback) { """ Lists all of the applications available in the specified account. This operation returns only applications and versions that are avai...
java
public ServiceFuture<List<ApplicationSummary>> listAsync(final ApplicationListOptions applicationListOptions, final ListOperationCallback<ApplicationSummary> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listSinglePageAsync(applicationListOptions), new Func1<String...
[ "public", "ServiceFuture", "<", "List", "<", "ApplicationSummary", ">", ">", "listAsync", "(", "final", "ApplicationListOptions", "applicationListOptions", ",", "final", "ListOperationCallback", "<", "ApplicationSummary", ">", "serviceCallback", ")", "{", "return", "Azu...
Lists all of the applications available in the specified account. This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to ...
[ "Lists", "all", "of", "the", "applications", "available", "in", "the", "specified", "account", ".", "This", "operation", "returns", "only", "applications", "and", "versions", "that", "are", "available", "for", "use", "on", "compute", "nodes", ";", "that", "is"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java#L235-L252
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.Byte
public JBBPDslBuilder Byte(final String name) { """ Add named signed byte field. @param name name of the field, can be null for anonymous one @return the builder instance, must not be null """ final Item item = new Item(BinType.BYTE, name, this.byteOrder); this.addItem(item); return this; }
java
public JBBPDslBuilder Byte(final String name) { final Item item = new Item(BinType.BYTE, name, this.byteOrder); this.addItem(item); return this; }
[ "public", "JBBPDslBuilder", "Byte", "(", "final", "String", "name", ")", "{", "final", "Item", "item", "=", "new", "Item", "(", "BinType", ".", "BYTE", ",", "name", ",", "this", ".", "byteOrder", ")", ";", "this", ".", "addItem", "(", "item", ")", ";...
Add named signed byte field. @param name name of the field, can be null for anonymous one @return the builder instance, must not be null
[ "Add", "named", "signed", "byte", "field", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L827-L831
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/DescribePointBinaryCompare.java
DescribePointBinaryCompare.process
public void process( int c_x , int c_y , TupleDesc_B feature ) { """ Computes the descriptor at the specified point. If the region go outside of the image then a description will not be made. @param c_x Center of region being described. @param c_y Center of region being described. @param feature Where the d...
java
public void process( int c_x , int c_y , TupleDesc_B feature ) { if( BoofMiscOps.checkInside(image,c_x, c_y, definition.radius) ) { processInside(c_x,c_y,feature); } else { processBorder(c_x,c_y,feature); } }
[ "public", "void", "process", "(", "int", "c_x", ",", "int", "c_y", ",", "TupleDesc_B", "feature", ")", "{", "if", "(", "BoofMiscOps", ".", "checkInside", "(", "image", ",", "c_x", ",", "c_y", ",", "definition", ".", "radius", ")", ")", "{", "processIns...
Computes the descriptor at the specified point. If the region go outside of the image then a description will not be made. @param c_x Center of region being described. @param c_y Center of region being described. @param feature Where the descriptor is written to.
[ "Computes", "the", "descriptor", "at", "the", "specified", "point", ".", "If", "the", "region", "go", "outside", "of", "the", "image", "then", "a", "description", "will", "not", "be", "made", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/DescribePointBinaryCompare.java#L92-L98
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java
MonthSheetView.setCellFactory
public final void setCellFactory(Callback<DateParameter, DateCell> factory) { """ Sets the value of {@link #cellFactoryProperty()}. @param factory the cell factory """ requireNonNull(factory); cellFactoryProperty().set(factory); }
java
public final void setCellFactory(Callback<DateParameter, DateCell> factory) { requireNonNull(factory); cellFactoryProperty().set(factory); }
[ "public", "final", "void", "setCellFactory", "(", "Callback", "<", "DateParameter", ",", "DateCell", ">", "factory", ")", "{", "requireNonNull", "(", "factory", ")", ";", "cellFactoryProperty", "(", ")", ".", "set", "(", "factory", ")", ";", "}" ]
Sets the value of {@link #cellFactoryProperty()}. @param factory the cell factory
[ "Sets", "the", "value", "of", "{", "@link", "#cellFactoryProperty", "()", "}", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java#L202-L205
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.resolveAction
public String resolveAction( String actionName, Object form ) throws Exception { """ Call an action and return the result URI. @deprecated Use {@link FlowController#resolveAction(String, Object, HttpServletRequest, HttpServletResponse)} instead. @param actionName the name of the action to run. @param ...
java
public String resolveAction( String actionName, Object form ) throws Exception { return resolveAction( actionName, form, getRequest(), getResponse() ); }
[ "public", "String", "resolveAction", "(", "String", "actionName", ",", "Object", "form", ")", "throws", "Exception", "{", "return", "resolveAction", "(", "actionName", ",", "form", ",", "getRequest", "(", ")", ",", "getResponse", "(", ")", ")", ";", "}" ]
Call an action and return the result URI. @deprecated Use {@link FlowController#resolveAction(String, Object, HttpServletRequest, HttpServletResponse)} instead. @param actionName the name of the action to run. @param form the form bean instance to pass to the action, or <code>null</code> if none should be passed. @ret...
[ "Call", "an", "action", "and", "return", "the", "result", "URI", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1134-L1138
TrueNight/Utils
utils/src/main/java/xyz/truenight/utils/Palazzo.java
Palazzo.submitSafe
public synchronized void submitSafe(Object tag, Object subTag, boolean priority, Runnable runnable) { """ Same as submit(String tag, String subTag, Runnable runnable) but task will NOT be added to queue IF there is same task in queue @param tag queue tag @param subTag task tag @param runnable task ...
java
public synchronized void submitSafe(Object tag, Object subTag, boolean priority, Runnable runnable) { Task task = new Task(tag, subTag, runnable); if (!isContains(task)) { submitInternal(task.mTag, priority, task); } else if (priority) { remove(task); submitIn...
[ "public", "synchronized", "void", "submitSafe", "(", "Object", "tag", ",", "Object", "subTag", ",", "boolean", "priority", ",", "Runnable", "runnable", ")", "{", "Task", "task", "=", "new", "Task", "(", "tag", ",", "subTag", ",", "runnable", ")", ";", "i...
Same as submit(String tag, String subTag, Runnable runnable) but task will NOT be added to queue IF there is same task in queue @param tag queue tag @param subTag task tag @param runnable task
[ "Same", "as", "submit", "(", "String", "tag", "String", "subTag", "Runnable", "runnable", ")", "but", "task", "will", "NOT", "be", "added", "to", "queue", "IF", "there", "is", "same", "task", "in", "queue" ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Palazzo.java#L110-L121
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateMethodResult.java
UpdateMethodResult.withRequestModels
public UpdateMethodResult withRequestModels(java.util.Map<String, String> requestModels) { """ <p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value ...
java
public UpdateMethodResult withRequestModels(java.util.Map<String, String> requestModels) { setRequestModels(requestModels); return this; }
[ "public", "UpdateMethodResult", "withRequestModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestModels", ")", "{", "setRequestModels", "(", "requestModels", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request p...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "data", "schemas", "represented", "by", "<a", ">", "Model<", "/", "a", ">", "resources", "(", "as", "the", "mapped", "value", ")", "of", "the", "request", "payloads", "of", "given", "content", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateMethodResult.java#L614-L617
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/temperature/TemperatureConversion.java
TemperatureConversion.convertToKelvin
public static double convertToKelvin(TemperatureScale from, double temperature) { """ Convert a temperature value from another temperature scale into the Kelvin temperature scale. @param from TemperatureScale @param temperature value from other scale @return converted temperature value in Kelvin """ ...
java
public static double convertToKelvin(TemperatureScale from, double temperature) { switch(from) { case FARENHEIT: return convertFarenheitToKelvin(temperature); case CELSIUS: return convertCelsiusToKelvin(temperature); case KELVIN: ...
[ "public", "static", "double", "convertToKelvin", "(", "TemperatureScale", "from", ",", "double", "temperature", ")", "{", "switch", "(", "from", ")", "{", "case", "FARENHEIT", ":", "return", "convertFarenheitToKelvin", "(", "temperature", ")", ";", "case", "CELS...
Convert a temperature value from another temperature scale into the Kelvin temperature scale. @param from TemperatureScale @param temperature value from other scale @return converted temperature value in Kelvin
[ "Convert", "a", "temperature", "value", "from", "another", "temperature", "scale", "into", "the", "Kelvin", "temperature", "scale", "." ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/temperature/TemperatureConversion.java#L193-L208
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java
NativeIO.trySyncFileRange
private static void trySyncFileRange(int fd, long offset, long nbytes, int flags) { """ Sync part of an open file to the file system. @param fd The file descriptor of the source file. @param offset The offset within the file. @param nbytes The number of bytes to be synced. @param flags Signal how to...
java
private static void trySyncFileRange(int fd, long offset, long nbytes, int flags) { if (!initialized || !syncFileRangePossible || fd < 0) { return; } try { int ret_code = sync_file_range(fd, offset, nbytes, flags); if (ret_code != 0) { log.warn("failed on syncing fd [%d], offset ...
[ "private", "static", "void", "trySyncFileRange", "(", "int", "fd", ",", "long", "offset", ",", "long", "nbytes", ",", "int", "flags", ")", "{", "if", "(", "!", "initialized", "||", "!", "syncFileRangePossible", "||", "fd", "<", "0", ")", "{", "return", ...
Sync part of an open file to the file system. @param fd The file descriptor of the source file. @param offset The offset within the file. @param nbytes The number of bytes to be synced. @param flags Signal how to synchronize
[ "Sync", "part", "of", "an", "open", "file", "to", "the", "file", "system", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java#L167-L193
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java
DrawerUIUtils.getPlaceHolder
public static Drawable getPlaceHolder(Context ctx) { """ helper method to get a person placeHolder drawable @param ctx @return """ return new IconicsDrawable(ctx, MaterialDrawerFont.Icon.mdf_person).colorRes(R.color.accent).backgroundColorRes(R.color.primary).sizeDp(56).paddingDp(16); }
java
public static Drawable getPlaceHolder(Context ctx) { return new IconicsDrawable(ctx, MaterialDrawerFont.Icon.mdf_person).colorRes(R.color.accent).backgroundColorRes(R.color.primary).sizeDp(56).paddingDp(16); }
[ "public", "static", "Drawable", "getPlaceHolder", "(", "Context", "ctx", ")", "{", "return", "new", "IconicsDrawable", "(", "ctx", ",", "MaterialDrawerFont", ".", "Icon", ".", "mdf_person", ")", ".", "colorRes", "(", "R", ".", "color", ".", "accent", ")", ...
helper method to get a person placeHolder drawable @param ctx @return
[ "helper", "method", "to", "get", "a", "person", "placeHolder", "drawable" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java#L194-L196
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.acknowledgeAlreadyProcessedOperation
private void acknowledgeAlreadyProcessedOperation(SegmentOperation operation) throws DataCorruptionException { """ Processes (acks) an operation that has already been processed and would otherwise result in no change to the underlying Storage. @param operation The operation to handle. """ if (opera...
java
private void acknowledgeAlreadyProcessedOperation(SegmentOperation operation) throws DataCorruptionException { if (operation instanceof MergeSegmentOperation) { // Only MergeSegmentOperations need special handling. Others, such as StreamSegmentSealOperation, are not // needed since they'...
[ "private", "void", "acknowledgeAlreadyProcessedOperation", "(", "SegmentOperation", "operation", ")", "throws", "DataCorruptionException", "{", "if", "(", "operation", "instanceof", "MergeSegmentOperation", ")", "{", "// Only MergeSegmentOperations need special handling. Others, su...
Processes (acks) an operation that has already been processed and would otherwise result in no change to the underlying Storage. @param operation The operation to handle.
[ "Processes", "(", "acks", ")", "an", "operation", "that", "has", "already", "been", "processed", "and", "would", "otherwise", "result", "in", "no", "change", "to", "the", "underlying", "Storage", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L436-L450
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAppearance.java
PdfAppearance.setFontAndSize
public void setFontAndSize(BaseFont bf, float size) { """ Set the font and the size for the subsequent text writing. @param bf the font @param size the font size in points """ checkWriter(); state.size = size; if (bf.getFontType() == BaseFont.FONT_TYPE_DOCUMENT) { state....
java
public void setFontAndSize(BaseFont bf, float size) { checkWriter(); state.size = size; if (bf.getFontType() == BaseFont.FONT_TYPE_DOCUMENT) { state.fontDetails = new FontDetails(null, ((DocumentFont)bf).getIndirectReference(), bf); } else state.fontDetail...
[ "public", "void", "setFontAndSize", "(", "BaseFont", "bf", ",", "float", "size", ")", "{", "checkWriter", "(", ")", ";", "state", ".", "size", "=", "size", ";", "if", "(", "bf", ".", "getFontType", "(", ")", "==", "BaseFont", ".", "FONT_TYPE_DOCUMENT", ...
Set the font and the size for the subsequent text writing. @param bf the font @param size the font size in points
[ "Set", "the", "font", "and", "the", "size", "for", "the", "subsequent", "text", "writing", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAppearance.java#L138-L159
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVParser.java
CSVParser.parseLine
@Nullable public ICommonsList <String> parseLine (@Nullable final String sNextLine) throws IOException { """ Parses an incoming String and returns an array of elements. This method is used when all data is contained in a single line. @param sNextLine Line to be parsed. @return the tokenized list of element...
java
@Nullable public ICommonsList <String> parseLine (@Nullable final String sNextLine) throws IOException { return _parseLine (sNextLine, false); }
[ "@", "Nullable", "public", "ICommonsList", "<", "String", ">", "parseLine", "(", "@", "Nullable", "final", "String", "sNextLine", ")", "throws", "IOException", "{", "return", "_parseLine", "(", "sNextLine", ",", "false", ")", ";", "}" ]
Parses an incoming String and returns an array of elements. This method is used when all data is contained in a single line. @param sNextLine Line to be parsed. @return the tokenized list of elements, or <code>null</code> if nextLine is <code>null</code> @throws IOException if bad things happen during the read
[ "Parses", "an", "incoming", "String", "and", "returns", "an", "array", "of", "elements", ".", "This", "method", "is", "used", "when", "all", "data", "is", "contained", "in", "a", "single", "line", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVParser.java#L303-L307
JoeKerouac/utils
src/main/java/com/joe/utils/serialize/json/JsonParser.java
JsonParser.toJson
public String toJson(Object obj, boolean ignoreNull) { """ 将Object序列化(对于byte[],会将byte[]用Base64编码一下,然后返回,相当于对该byte调用Base64的encode方法然后将结果返回,对于String 会直接将String返回) @param obj 要序列化的对象 @param ignoreNull 是否忽略空元素 ,如果为true为忽略 @return 序列化失败将返回空字符串 """ if (obj == null) { return null; ...
java
public String toJson(Object obj, boolean ignoreNull) { if (obj == null) { return null; } if (obj instanceof String) { return (String) obj; } try { ObjectMapper mapper; if (ignoreNull) { mapper = MAPPER_IGNORE_NULL; ...
[ "public", "String", "toJson", "(", "Object", "obj", ",", "boolean", "ignoreNull", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "obj", "instanceof", "String", ")", "{", "return", "(", "String", ")", "obj",...
将Object序列化(对于byte[],会将byte[]用Base64编码一下,然后返回,相当于对该byte调用Base64的encode方法然后将结果返回,对于String 会直接将String返回) @param obj 要序列化的对象 @param ignoreNull 是否忽略空元素 ,如果为true为忽略 @return 序列化失败将返回空字符串
[ "将Object序列化(对于byte", "[]", ",会将byte", "[]", "用Base64编码一下,然后返回,相当于对该byte调用Base64的encode方法然后将结果返回,对于String", "会直接将String返回)" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/serialize/json/JsonParser.java#L85-L104
wanglinsong/thx-android
uia-client/src/main/java/com/android/uiautomator/stub/PointerCoords.java
PointerCoords.setAxisValue
public void setAxisValue(int axis, float value) { """ Sets the value associated with the specified axis. @param axis The axis identifier for the axis value to assign. @param value The value to set. """ switch (axis) { case AXIS_X: x = value; break; ...
java
public void setAxisValue(int axis, float value) { switch (axis) { case AXIS_X: x = value; break; case AXIS_Y: y = value; break; case AXIS_PRESSURE: pressure = value; break; ...
[ "public", "void", "setAxisValue", "(", "int", "axis", ",", "float", "value", ")", "{", "switch", "(", "axis", ")", "{", "case", "AXIS_X", ":", "x", "=", "value", ";", "break", ";", "case", "AXIS_Y", ":", "y", "=", "value", ";", "break", ";", "case"...
Sets the value associated with the specified axis. @param axis The axis identifier for the axis value to assign. @param value The value to set.
[ "Sets", "the", "value", "associated", "with", "the", "specified", "axis", "." ]
train
https://github.com/wanglinsong/thx-android/blob/4a98c4181b3e8876e688591737da37627c07e72b/uia-client/src/main/java/com/android/uiautomator/stub/PointerCoords.java#L489-L551
openbase/jul
exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java
ExceptionPrinter.printHistoryAndReturnThrowable
public static <T extends Throwable> T printHistoryAndReturnThrowable(final T th, final PrintStream stream) { """ Print Exception messages without stack trace in non debug mode. Method prints recursive all messages of the given exception stack to get a history overview of the causes. In verbose mode (app -v) the s...
java
public static <T extends Throwable> T printHistoryAndReturnThrowable(final T th, final PrintStream stream) { printHistory(th, new SystemPrinter(stream)); return th; }
[ "public", "static", "<", "T", "extends", "Throwable", ">", "T", "printHistoryAndReturnThrowable", "(", "final", "T", "th", ",", "final", "PrintStream", "stream", ")", "{", "printHistory", "(", "th", ",", "new", "SystemPrinter", "(", "stream", ")", ")", ";", ...
Print Exception messages without stack trace in non debug mode. Method prints recursive all messages of the given exception stack to get a history overview of the causes. In verbose mode (app -v) the stacktrace is printed in the end of history. @param <T> Exception type @param th exception stack to print. @param strea...
[ "Print", "Exception", "messages", "without", "stack", "trace", "in", "non", "debug", "mode", ".", "Method", "prints", "recursive", "all", "messages", "of", "the", "given", "exception", "stack", "to", "get", "a", "history", "overview", "of", "the", "causes", ...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java#L276-L279
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/utils/TermUtils.java
TermUtils.getPosition
public static int getPosition(Term subTerm, Term term) { """ Finds the index of appearance of a term's sub-term. @param subTerm the inner term, must be included in <code>term</code> @param term the container term. @return the starting index of <code>subTerm</code> in <code>term</code>. -1 otherwise. ...
java
public static int getPosition(Term subTerm, Term term) { int startingIndex = -1; int j = 0; for(int i=0; i<term.getWords().size(); i++) { if(term.getWords().get(i).equals(subTerm.getWords().get(j))) { j++; if(startingIndex == -1) startingIndex = i; } else { startingIndex = -1; j = 0; ...
[ "public", "static", "int", "getPosition", "(", "Term", "subTerm", ",", "Term", "term", ")", "{", "int", "startingIndex", "=", "-", "1", ";", "int", "j", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "term", ".", "getWords", "(",...
Finds the index of appearance of a term's sub-term. @param subTerm the inner term, must be included in <code>term</code> @param term the container term. @return the starting index of <code>subTerm</code> in <code>term</code>. -1 otherwise.
[ "Finds", "the", "index", "of", "appearance", "of", "a", "term", "s", "sub", "-", "term", "." ]
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/utils/TermUtils.java#L125-L141
kaazing/gateway
transport/http/src/main/java/org/kaazing/gateway/transport/http/HttpUtils.java
HttpUtils.getRequestURI
public static URI getRequestURI(HttpRequestMessage request, IoSession session) { """ constructs an http specific request uri with host, port (or explicit default port), and path """ URI requestURI = request.getRequestURI(); String host = request.getHeader("Host"); return getRequestURI(r...
java
public static URI getRequestURI(HttpRequestMessage request, IoSession session) { URI requestURI = request.getRequestURI(); String host = request.getHeader("Host"); return getRequestURI(requestURI, host, session); }
[ "public", "static", "URI", "getRequestURI", "(", "HttpRequestMessage", "request", ",", "IoSession", "session", ")", "{", "URI", "requestURI", "=", "request", ".", "getRequestURI", "(", ")", ";", "String", "host", "=", "request", ".", "getHeader", "(", "\"Host\...
constructs an http specific request uri with host, port (or explicit default port), and path
[ "constructs", "an", "http", "specific", "request", "uri", "with", "host", "port", "(", "or", "explicit", "default", "port", ")", "and", "path" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/http/src/main/java/org/kaazing/gateway/transport/http/HttpUtils.java#L390-L394
paymill/paymill-java
src/main/java/com/paymill/services/RefundService.java
RefundService.refundTransaction
public Refund refundTransaction( String transactionId, Integer amount ) { """ This function refunds a {@link Transaction} that has been created previously and was refunded in parts or wasn't refunded at all. The inserted amount will be refunded to the credit card / direct debit of the original {@link Transaction}...
java
public Refund refundTransaction( String transactionId, Integer amount ) { return this.refundTransaction( new Transaction( transactionId ), amount, null ); }
[ "public", "Refund", "refundTransaction", "(", "String", "transactionId", ",", "Integer", "amount", ")", "{", "return", "this", ".", "refundTransaction", "(", "new", "Transaction", "(", "transactionId", ")", ",", "amount", ",", "null", ")", ";", "}" ]
This function refunds a {@link Transaction} that has been created previously and was refunded in parts or wasn't refunded at all. The inserted amount will be refunded to the credit card / direct debit of the original {@link Transaction}. There will be some fees for the merchant for every refund. <p> Note: <ul> <li>You ...
[ "This", "function", "refunds", "a", "{" ]
train
https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/RefundService.java#L134-L136
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/SplitMergeLineFit.java
SplitMergeLineFit.process
public boolean process( List<Point2D_I32> list , GrowQueue_I32 vertexes ) { """ Approximates the input list with a set of line segments @param list (Input) Ordered list of connected points. @param vertexes (Output) Indexes in the input list which are corners in the polyline @return true if it could fit a poly...
java
public boolean process( List<Point2D_I32> list , GrowQueue_I32 vertexes ) { this.contour = list; this.minimumSideLengthPixel = minimumSideLength.computeI(contour.size()); splits.reset(); boolean result = _process(list); // remove reference so that it can be freed this.contour = null; vertexes.setTo(spli...
[ "public", "boolean", "process", "(", "List", "<", "Point2D_I32", ">", "list", ",", "GrowQueue_I32", "vertexes", ")", "{", "this", ".", "contour", "=", "list", ";", "this", ".", "minimumSideLengthPixel", "=", "minimumSideLength", ".", "computeI", "(", "contour"...
Approximates the input list with a set of line segments @param list (Input) Ordered list of connected points. @param vertexes (Output) Indexes in the input list which are corners in the polyline @return true if it could fit a polygon to the points or false if not
[ "Approximates", "the", "input", "list", "with", "a", "set", "of", "line", "segments" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/SplitMergeLineFit.java#L102-L113
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/ArrayUtils.java
ArrayUtils.equalContents
public static boolean equalContents(int[][] xs, int[][] ys) { """ Tests two int[][] arrays for having equal contents. @return true iff for each i, <code>equalContents(xs[i],ys[i])</code> is true """ if(xs ==null) return ys == null; if(ys == null) return false; if(xs.length != ys.l...
java
public static boolean equalContents(int[][] xs, int[][] ys) { if(xs ==null) return ys == null; if(ys == null) return false; if(xs.length != ys.length) return false; for(int i = xs.length-1; i >= 0; i--) { if(! equalContents(xs[i],ys[i])) return false; } ...
[ "public", "static", "boolean", "equalContents", "(", "int", "[", "]", "[", "]", "xs", ",", "int", "[", "]", "[", "]", "ys", ")", "{", "if", "(", "xs", "==", "null", ")", "return", "ys", "==", "null", ";", "if", "(", "ys", "==", "null", ")", "...
Tests two int[][] arrays for having equal contents. @return true iff for each i, <code>equalContents(xs[i],ys[i])</code> is true
[ "Tests", "two", "int", "[]", "[]", "arrays", "for", "having", "equal", "contents", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/ArrayUtils.java#L490-L502
upwork/java-upwork
src/com/Upwork/api/Routers/Hr/Clients/Offers.java
Offers.getSpecific
public JSONObject getSpecific(String reference, HashMap<String, String> params) throws JSONException { """ Get specific offer @param reference Offer reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.get("/offers/v1/clien...
java
public JSONObject getSpecific(String reference, HashMap<String, String> params) throws JSONException { return oClient.get("/offers/v1/clients/offers/" + reference, params); }
[ "public", "JSONObject", "getSpecific", "(", "String", "reference", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/offers/v1/clients/offers/\"", "+", "reference", ",", "p...
Get specific offer @param reference Offer reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Get", "specific", "offer" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Hr/Clients/Offers.java#L65-L67
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/OutputAccessor.java
OutputAccessor.asStream
public static OutputStream asStream(OutputAccessorPoolHolder poolHolder, ByteBuffer byteBuffer) { """ Retrieved a pooled an {@link OutputStream} for the given {@link ByteBuffer}. Instances are pooled within the thread scope. @param poolHolder @param byteBuffer @return """ ByteBufferOutputStream ...
java
public static OutputStream asStream(OutputAccessorPoolHolder poolHolder, ByteBuffer byteBuffer) { ByteBufferOutputStream accessor = poolHolder.getByteBufferOutputStream(); accessor.byteBuffer = byteBuffer; return accessor; }
[ "public", "static", "OutputStream", "asStream", "(", "OutputAccessorPoolHolder", "poolHolder", ",", "ByteBuffer", "byteBuffer", ")", "{", "ByteBufferOutputStream", "accessor", "=", "poolHolder", ".", "getByteBufferOutputStream", "(", ")", ";", "accessor", ".", "byteBuff...
Retrieved a pooled an {@link OutputStream} for the given {@link ByteBuffer}. Instances are pooled within the thread scope. @param poolHolder @param byteBuffer @return
[ "Retrieved", "a", "pooled", "an", "{", "@link", "OutputStream", "}", "for", "the", "given", "{", "@link", "ByteBuffer", "}", ".", "Instances", "are", "pooled", "within", "the", "thread", "scope", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/OutputAccessor.java#L75-L81
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.generateQuantifierRanges
private Expr generateQuantifierRanges(WyilFile.Expr.Quantifier expr, LocalEnvironment environment) { """ Generate a logical conjunction which represents the given ranges of all quantified variables. That is a conjunction of the form <code>start <= var && var < end</code>. @return """ Expr ranges = null;...
java
private Expr generateQuantifierRanges(WyilFile.Expr.Quantifier expr, LocalEnvironment environment) { Expr ranges = null; Tuple<WyilFile.Decl.Variable> parameters = expr.getParameters(); for (int i = 0; i != parameters.size(); ++i) { WyilFile.Decl.Variable var = parameters.get(i); WyilFile.Expr.ArrayRange ra...
[ "private", "Expr", "generateQuantifierRanges", "(", "WyilFile", ".", "Expr", ".", "Quantifier", "expr", ",", "LocalEnvironment", "environment", ")", "{", "Expr", "ranges", "=", "null", ";", "Tuple", "<", "WyilFile", ".", "Decl", ".", "Variable", ">", "paramete...
Generate a logical conjunction which represents the given ranges of all quantified variables. That is a conjunction of the form <code>start <= var && var < end</code>. @return
[ "Generate", "a", "logical", "conjunction", "which", "represents", "the", "given", "ranges", "of", "all", "quantified", "variables", ".", "That", "is", "a", "conjunction", "of", "the", "form", "<code", ">", "start", "<", "=", "var", "&&", "var", "<", "end<"...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L1679-L1694
mailin-api/sendinblue-java-mvn
src/main/java/com/sendinblue/Sendinblue.java
Sendinblue.get_campaigns_v2
public String get_campaigns_v2(Map<String, Object> data) { """ /* Get all campaigns detail. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional] @options data {...
java
public String get_campaigns_v2(Map<String, Object> data) { String type = data.get("type").toString(); String status = data.get("status").toString(); String page = data.get("page").toString(); String page_limit = data.get("page_limit").toString(); String url; if (EMPTY_ST...
[ "public", "String", "get_campaigns_v2", "(", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "String", "type", "=", "data", ".", "get", "(", "\"type\"", ")", ".", "toString", "(", ")", ";", "String", "status", "=", "data", ".", "get", "("...
/* Get all campaigns detail. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional] @options data {String} status: Status of campaign. Possible values – draft, sent, archi...
[ "/", "*", "Get", "all", "campaigns", "detail", "." ]
train
https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L332-L346