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
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java
JQMHeader.setRightButton
public JQMButton setRightButton(String text, String url, DataIcon icon) { """ Creates a new {@link JQMButton} with the given text and linking to the given url and with the given icon and then sets that button in the right slot. Any existing right button will be replaced. @param text the text for the button ...
java
public JQMButton setRightButton(String text, String url, DataIcon icon) { JQMButton button = createButton(text, url, icon); setRightButton(button); return button; }
[ "public", "JQMButton", "setRightButton", "(", "String", "text", ",", "String", "url", ",", "DataIcon", "icon", ")", "{", "JQMButton", "button", "=", "createButton", "(", "text", ",", "url", ",", "icon", ")", ";", "setRightButton", "(", "button", ")", ";", ...
Creates a new {@link JQMButton} with the given text and linking to the given url and with the given icon and then sets that button in the right slot. Any existing right button will be replaced. @param text the text for the button @param url the optional url for the button, if null then this button does not navigate by...
[ "Creates", "a", "new", "{", "@link", "JQMButton", "}", "with", "the", "given", "text", "and", "linking", "to", "the", "given", "url", "and", "with", "the", "given", "icon", "and", "then", "sets", "that", "button", "in", "the", "right", "slot", ".", "An...
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L365-L369
FasterXML/woodstox
src/main/java/com/ctc/wstx/sr/AttributeCollector.java
AttributeCollector.writeAttribute
public void writeAttribute(int index, XmlWriter xw, XMLValidator validator) throws IOException, XMLStreamException { """ Method that basically serializes the specified (read-in) attribute using Writers provided. Serialization is done by writing out (fully-qualified) name of the attribute, followed b...
java
public void writeAttribute(int index, XmlWriter xw, XMLValidator validator) throws IOException, XMLStreamException { // Note: here we assume index checks have been done by caller Attribute attr = mAttributes[index]; String ln = attr.mLocalName; String prefix = attr.mPrefi...
[ "public", "void", "writeAttribute", "(", "int", "index", ",", "XmlWriter", "xw", ",", "XMLValidator", "validator", ")", "throws", "IOException", ",", "XMLStreamException", "{", "// Note: here we assume index checks have been done by caller", "Attribute", "attr", "=", "mAt...
Method that basically serializes the specified (read-in) attribute using Writers provided. Serialization is done by writing out (fully-qualified) name of the attribute, followed by the equals sign and quoted value.
[ "Method", "that", "basically", "serializes", "the", "specified", "(", "read", "-", "in", ")", "attribute", "using", "Writers", "provided", ".", "Serialization", "is", "done", "by", "writing", "out", "(", "fully", "-", "qualified", ")", "name", "of", "the", ...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sr/AttributeCollector.java#L1091-L1107
jhunters/jprotobuf
android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java
StringUtils.removeEnd
public static String removeEnd(String str, String remove) { """ <p> Removes a substring only if it is at the end of a source string, otherwise returns the source string. </p> <p> A <code>null</code> source string will return <code>null</code>. An empty ("") source string will return the empty string. A <co...
java
public static String removeEnd(String str, String remove) { if (isEmpty(str) || isEmpty(remove)) { return str; } if (str.endsWith(remove)) { return str.substring(0, str.length() - remove.length()); } return str; }
[ "public", "static", "String", "removeEnd", "(", "String", "str", ",", "String", "remove", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "remove", ")", ")", "{", "return", "str", ";", "}", "if", "(", "str", ".", "endsWith", ...
<p> Removes a substring only if it is at the end of a source string, otherwise returns the source string. </p> <p> A <code>null</code> source string will return <code>null</code>. An empty ("") source string will return the empty string. A <code>null</code> search string will return the source string. </p> <pre> Stri...
[ "<p", ">", "Removes", "a", "substring", "only", "if", "it", "is", "at", "the", "end", "of", "a", "source", "string", "otherwise", "returns", "the", "source", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java#L158-L166
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getParent
public CmsGroup getParent(CmsDbContext dbc, String groupname) throws CmsException { """ Returns the parent group of a group.<p> @param dbc the current database context @param groupname the name of the group @return group the parent group or <code>null</code> @throws CmsException if operation was not succ...
java
public CmsGroup getParent(CmsDbContext dbc, String groupname) throws CmsException { CmsGroup group = readGroup(dbc, groupname); if (group.getParentId().isNullUUID()) { return null; } // try to read from cache CmsGroup parent = m_monitor.getCachedGroup(group.getParen...
[ "public", "CmsGroup", "getParent", "(", "CmsDbContext", "dbc", ",", "String", "groupname", ")", "throws", "CmsException", "{", "CmsGroup", "group", "=", "readGroup", "(", "dbc", ",", "groupname", ")", ";", "if", "(", "group", ".", "getParentId", "(", ")", ...
Returns the parent group of a group.<p> @param dbc the current database context @param groupname the name of the group @return group the parent group or <code>null</code> @throws CmsException if operation was not successful
[ "Returns", "the", "parent", "group", "of", "a", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L4254-L4268
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.getByResourceGroup
public PrivateZoneInner getByResourceGroup(String resourceGroupName, String privateZoneName) { """ Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone. @param resourceGroupName The name of the resource group. @param privateZoneName The n...
java
public PrivateZoneInner getByResourceGroup(String resourceGroupName, String privateZoneName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateZoneName).toBlocking().single().body(); }
[ "public", "PrivateZoneInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "privateZoneName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "privateZoneName", ")", ".", "toBlocking", "(", ")", ...
Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @throws IllegalArgumentException thrown if paramet...
[ "Gets", "a", "Private", "DNS", "zone", ".", "Retrieves", "the", "zone", "properties", "but", "not", "the", "virtual", "networks", "links", "or", "the", "record", "sets", "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#L1135-L1137
graphql-java/graphql-java
src/main/java/graphql/Assert.java
Assert.assertValidName
public static String assertValidName(String name) { """ Validates that the Lexical token name matches the current spec. currently non null, non empty, @param name - the name to be validated. @return the name if valid, or AssertException if invalid. """ if (name != null && !name.isEmpty() && name...
java
public static String assertValidName(String name) { if (name != null && !name.isEmpty() && name.matches("[_A-Za-z][_0-9A-Za-z]*")) { return name; } throw new AssertException(String.format(invalidNameErrorMessage, name)); }
[ "public", "static", "String", "assertValidName", "(", "String", "name", ")", "{", "if", "(", "name", "!=", "null", "&&", "!", "name", ".", "isEmpty", "(", ")", "&&", "name", ".", "matches", "(", "\"[_A-Za-z][_0-9A-Za-z]*\"", ")", ")", "{", "return", "nam...
Validates that the Lexical token name matches the current spec. currently non null, non empty, @param name - the name to be validated. @return the name if valid, or AssertException if invalid.
[ "Validates", "that", "the", "Lexical", "token", "name", "matches", "the", "current", "spec", ".", "currently", "non", "null", "non", "empty" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/Assert.java#L96-L101
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeDataResult
public void writeDataResult(String column, int line, String value) { """ Writes some data as result. @param column The column name @param line The line number @param value The data value """ logger.debug("Write Data result => column:{} line:{} value:{}", column, line, value); writeValue...
java
public void writeDataResult(String column, int line, String value) { logger.debug("Write Data result => column:{} line:{} value:{}", column, line, value); writeValue(column, line, value); }
[ "public", "void", "writeDataResult", "(", "String", "column", ",", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Data result => column:{} line:{} value:{}\"", ",", "column", ",", "line", ",", "value", ")", ";", "writeValu...
Writes some data as result. @param column The column name @param line The line number @param value The data value
[ "Writes", "some", "data", "as", "result", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L182-L185
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java
GenericUtils.byteIndexOf
static public int byteIndexOf(byte[] bytes, byte target, int start_index) { """ Helper function for byte[]s to simulate the String.indexOf() method. @param bytes @param target @param start_index @return int (-1 if not found) """ int rc = -1; // simulate String.indexOf rc // stop when we ...
java
static public int byteIndexOf(byte[] bytes, byte target, int start_index) { int rc = -1; // simulate String.indexOf rc // stop when we are out of data or hit the target byte for (int index = start_index; index < bytes.length; index++) { if (target == bytes[index]) { ...
[ "static", "public", "int", "byteIndexOf", "(", "byte", "[", "]", "bytes", ",", "byte", "target", ",", "int", "start_index", ")", "{", "int", "rc", "=", "-", "1", ";", "// simulate String.indexOf rc", "// stop when we are out of data or hit the target byte", "for", ...
Helper function for byte[]s to simulate the String.indexOf() method. @param bytes @param target @param start_index @return int (-1 if not found)
[ "Helper", "function", "for", "byte", "[]", "s", "to", "simulate", "the", "String", ".", "indexOf", "()", "method", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java#L608-L622
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.rejectMapOnEntry
public static <K, V, R extends Map<K, V>> R rejectMapOnEntry( Map<K, V> map, final Predicate2<? super K, ? super V> predicate, final R target) { """ For each <em>value</em> of the map, predicate is evaluated with the element as the parameter. Each element which causes predicate...
java
public static <K, V, R extends Map<K, V>> R rejectMapOnEntry( Map<K, V> map, final Predicate2<? super K, ? super V> predicate, final R target) { MapIterate.forEachKeyValue(map, new Procedure2<K, V>() { public void value(K argument1, V argument2) ...
[ "public", "static", "<", "K", ",", "V", ",", "R", "extends", "Map", "<", "K", ",", "V", ">", ">", "R", "rejectMapOnEntry", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "final", "Predicate2", "<", "?", "super", "K", ",", "?", "super", "V", ...
For each <em>value</em> of the map, predicate is evaluated with the element as the parameter. Each element which causes predicate to evaluate to false is added to the targetCollection.
[ "For", "each", "<em", ">", "value<", "/", "em", ">", "of", "the", "map", "predicate", "is", "evaluated", "with", "the", "element", "as", "the", "parameter", ".", "Each", "element", "which", "causes", "predicate", "to", "evaluate", "to", "false", "is", "a...
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L399-L416
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.writeProperties
private static void writeProperties(Properties props, String keyPrefix, Map<String, Boolean> filters) { """ Helper method to write array of strings out of the properties file, using a Findbugs style format. @param props The properties file to write the array to. @param keyPrefix The key prefix of the array....
java
private static void writeProperties(Properties props, String keyPrefix, Map<String, Boolean> filters) { int counter = 0; Set<Entry<String, Boolean>> entrySet = filters.entrySet(); for (Entry<String, Boolean> entry : entrySet) { props.setProperty(keyPrefix + counter, entry.getKey() + ...
[ "private", "static", "void", "writeProperties", "(", "Properties", "props", ",", "String", "keyPrefix", ",", "Map", "<", "String", ",", "Boolean", ">", "filters", ")", "{", "int", "counter", "=", "0", ";", "Set", "<", "Entry", "<", "String", ",", "Boolea...
Helper method to write array of strings out of the properties file, using a Findbugs style format. @param props The properties file to write the array to. @param keyPrefix The key prefix of the array. @param filters The filters array to write to the properties.
[ "Helper", "method", "to", "write", "array", "of", "strings", "out", "of", "the", "properties", "file", "using", "a", "Findbugs", "style", "format", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L694-L712
spring-projects/spring-plugin
core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java
OrderAwarePluginRegistry.ofReverse
public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> ofReverse(List<? extends T> plugins) { """ Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and the order of the {@link Plugin}s reverted. @param plugins must not be {@literal null}. @return @since 2.0 """ ...
java
public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> ofReverse(List<? extends T> plugins) { return of(plugins, DEFAULT_REVERSE_COMPARATOR); }
[ "public", "static", "<", "S", ",", "T", "extends", "Plugin", "<", "S", ">", ">", "OrderAwarePluginRegistry", "<", "T", ",", "S", ">", "ofReverse", "(", "List", "<", "?", "extends", "T", ">", "plugins", ")", "{", "return", "of", "(", "plugins", ",", ...
Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and the order of the {@link Plugin}s reverted. @param plugins must not be {@literal null}. @return @since 2.0
[ "Creates", "a", "new", "{", "@link", "OrderAwarePluginRegistry", "}", "with", "the", "given", "{", "@link", "Plugin", "}", "s", "and", "the", "order", "of", "the", "{", "@link", "Plugin", "}", "s", "reverted", "." ]
train
https://github.com/spring-projects/spring-plugin/blob/953d2ce12f05f26444fbb3bf21011f538f729868/core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java#L123-L125
alexcojocaru/elasticsearch-maven-plugin
src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/util/ProcessUtil.java
ProcessUtil.executeScript
public static List<String> executeScript(InstanceConfiguration config, CommandLine command, Map<String, String> environment, ProcessDestroyer processDestroyer) { """ Run the given command as a process within the supplied instance config context and wait until it finalizes. An E...
java
public static List<String> executeScript(InstanceConfiguration config, CommandLine command, Map<String, String> environment, ProcessDestroyer processDestroyer) { return executeScript(config, command, environment, processDestroyer, false); }
[ "public", "static", "List", "<", "String", ">", "executeScript", "(", "InstanceConfiguration", "config", ",", "CommandLine", "command", ",", "Map", "<", "String", ",", "String", ">", "environment", ",", "ProcessDestroyer", "processDestroyer", ")", "{", "return", ...
Run the given command as a process within the supplied instance config context and wait until it finalizes. An ElasticsearchSetupException is thrown if the exit code is not 0. @param config - the instance config @param command - the command to execute @param environment - a map of environment variables; can be null @pa...
[ "Run", "the", "given", "command", "as", "a", "process", "within", "the", "supplied", "instance", "config", "context", "and", "wait", "until", "it", "finalizes", ".", "An", "ElasticsearchSetupException", "is", "thrown", "if", "the", "exit", "code", "is", "not",...
train
https://github.com/alexcojocaru/elasticsearch-maven-plugin/blob/c283053cf99dc6b6d411b58629364b6aae62b7f8/src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/util/ProcessUtil.java#L174-L180
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/config/StormConfigGenerator.java
StormConfigGenerator.readYaml
@SuppressWarnings("unchecked") public static Map<String, Object> readYaml(File targetFile) throws IOException { """ Read yaml config object from the yaml file at specified file. @param targetFile target file @return config read from yaml @throws IOException Fail read yaml file or convert to config object...
java
@SuppressWarnings("unchecked") public static Map<String, Object> readYaml(File targetFile) throws IOException { Map<String, Object> configObject = null; Yaml yaml = new Yaml(); InputStream inputStream = null; InputStreamReader steamReader = null; try {...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Map", "<", "String", ",", "Object", ">", "readYaml", "(", "File", "targetFile", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "Object", ">", "configObject", "=", "null",...
Read yaml config object from the yaml file at specified file. @param targetFile target file @return config read from yaml @throws IOException Fail read yaml file or convert to config object.
[ "Read", "yaml", "config", "object", "from", "the", "yaml", "file", "at", "specified", "file", "." ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/StormConfigGenerator.java#L129-L156
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/filter/ProxyFilter.java
ProxyFilter.sessionOpened
@Override public void sessionOpened(NextFilter nextFilter, IoSession session) throws Exception { """ Event is stored in an {@link IoSessionEventQueue} for later delivery to the next filter in the chain when the handshake would have succeed. This will prevent the rest of the filter chain from bein...
java
@Override public void sessionOpened(NextFilter nextFilter, IoSession session) throws Exception { ProxyIoSession proxyIoSession = (ProxyIoSession) session .getAttribute(ProxyIoSession.PROXY_SESSION); proxyIoSession.getEventQueue().enqueueEventIfNecessary( n...
[ "@", "Override", "public", "void", "sessionOpened", "(", "NextFilter", "nextFilter", ",", "IoSession", "session", ")", "throws", "Exception", "{", "ProxyIoSession", "proxyIoSession", "=", "(", "ProxyIoSession", ")", "session", ".", "getAttribute", "(", "ProxyIoSessi...
Event is stored in an {@link IoSessionEventQueue} for later delivery to the next filter in the chain when the handshake would have succeed. This will prevent the rest of the filter chain from being affected by this filter internals. @param nextFilter the next filter in filter chain @param session the session object
[ "Event", "is", "stored", "in", "an", "{", "@link", "IoSessionEventQueue", "}", "for", "later", "delivery", "to", "the", "next", "filter", "in", "the", "chain", "when", "the", "handshake", "would", "have", "succeed", ".", "This", "will", "prevent", "the", "...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/filter/ProxyFilter.java#L316-L324
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java
MongoDBClient.findGFSEntity
private Object findGFSEntity(EntityMetadata entityMetadata, Class entityClass, Object key) { """ Find GFS entity. @param entityMetadata the entity metadata @param entityClass the entity class @param key the key @return the object """ GridFSDBFile outputFile = findGridFSDBFile(entityMetadata, k...
java
private Object findGFSEntity(EntityMetadata entityMetadata, Class entityClass, Object key) { GridFSDBFile outputFile = findGridFSDBFile(entityMetadata, key); return outputFile != null ? handler.getEntityFromGFSDBFile(entityMetadata.getEntityClazz(), instantiateEntity(entityClass, nul...
[ "private", "Object", "findGFSEntity", "(", "EntityMetadata", "entityMetadata", ",", "Class", "entityClass", ",", "Object", "key", ")", "{", "GridFSDBFile", "outputFile", "=", "findGridFSDBFile", "(", "entityMetadata", ",", "key", ")", ";", "return", "outputFile", ...
Find GFS entity. @param entityMetadata the entity metadata @param entityClass the entity class @param key the key @return the object
[ "Find", "GFS", "entity", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java#L410-L415
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormat.java
DateTimeFormat.createDateTimeFormatter
private static DateTimeFormatter createDateTimeFormatter(int dateStyle, int timeStyle) { """ Creates a formatter for the specified style. @param dateStyle the date style @param timeStyle the time style @return the formatter """ int type = DATETIME; if (dateStyle == NONE) { ty...
java
private static DateTimeFormatter createDateTimeFormatter(int dateStyle, int timeStyle){ int type = DATETIME; if (dateStyle == NONE) { type = TIME; } else if (timeStyle == NONE) { type = DATE; } StyleFormatter llf = new StyleFormatter(dateStyle, timeStyle, ...
[ "private", "static", "DateTimeFormatter", "createDateTimeFormatter", "(", "int", "dateStyle", ",", "int", "timeStyle", ")", "{", "int", "type", "=", "DATETIME", ";", "if", "(", "dateStyle", "==", "NONE", ")", "{", "type", "=", "TIME", ";", "}", "else", "if...
Creates a formatter for the specified style. @param dateStyle the date style @param timeStyle the time style @return the formatter
[ "Creates", "a", "formatter", "for", "the", "specified", "style", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormat.java#L752-L761
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.migrateMultiInstanceJobDefinitions
public static void migrateMultiInstanceJobDefinitions(ProcessDefinitionEntity processDefinition, List<JobDefinitionEntity> jobDefinitions) { """ When deploying an async job definition for an activity wrapped in an miBody, set the activity id to the miBody except the wrapped activity is marked as async. Backgro...
java
public static void migrateMultiInstanceJobDefinitions(ProcessDefinitionEntity processDefinition, List<JobDefinitionEntity> jobDefinitions) { for (JobDefinitionEntity jobDefinition : jobDefinitions) { String activityId = jobDefinition.getActivityId(); if (activityId != null) { ActivityImpl activ...
[ "public", "static", "void", "migrateMultiInstanceJobDefinitions", "(", "ProcessDefinitionEntity", "processDefinition", ",", "List", "<", "JobDefinitionEntity", ">", "jobDefinitions", ")", "{", "for", "(", "JobDefinitionEntity", "jobDefinition", ":", "jobDefinitions", ")", ...
When deploying an async job definition for an activity wrapped in an miBody, set the activity id to the miBody except the wrapped activity is marked as async. Background: in <= 7.2 async job definitions were created for the inner activity, although the semantics are that they are executed before the miBody is entered
[ "When", "deploying", "an", "async", "job", "definition", "for", "an", "activity", "wrapped", "in", "an", "miBody", "set", "the", "activity", "id", "to", "the", "miBody", "except", "the", "wrapped", "activity", "is", "marked", "as", "async", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L525-L537
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
TimestampUtils.convertToTime
public Time convertToTime(long millis, TimeZone tz) { """ Extracts the time part from a timestamp. This method ensures the date part of output timestamp looks like 1970-01-01 in given timezone. @param millis The timestamp from which to extract the time. @param tz timezone to use. @return The extracted time. ...
java
public Time convertToTime(long millis, TimeZone tz) { if (tz == null) { tz = getDefaultTz(); } if (isSimpleTimeZone(tz.getID())) { // Leave just time part of the day. // Suppose the input date is 2015 7 Jan 15:40 GMT+02:00 (that is 13:40 UTC) // We want it to become 1970 1 Jan 15:40 ...
[ "public", "Time", "convertToTime", "(", "long", "millis", ",", "TimeZone", "tz", ")", "{", "if", "(", "tz", "==", "null", ")", "{", "tz", "=", "getDefaultTz", "(", ")", ";", "}", "if", "(", "isSimpleTimeZone", "(", "tz", ".", "getID", "(", ")", ")"...
Extracts the time part from a timestamp. This method ensures the date part of output timestamp looks like 1970-01-01 in given timezone. @param millis The timestamp from which to extract the time. @param tz timezone to use. @return The extracted time.
[ "Extracts", "the", "time", "part", "from", "a", "timestamp", ".", "This", "method", "ensures", "the", "date", "part", "of", "output", "timestamp", "looks", "like", "1970", "-", "01", "-", "01", "in", "given", "timezone", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java#L1269-L1297
alkacon/opencms-core
src/org/opencms/ade/detailpage/CmsDetailPageConfigurationWriter.java
CmsDetailPageConfigurationWriter.writeDetailPageInfos
private void writeDetailPageInfos(List<CmsDetailPageInfo> infos, CmsUUID newId) { """ Writes the detail page information to the XML content.<p> @param infos the list of detail page information bean @param newId the id to use for new pages """ int i = 0; for (CmsDetailPageInfo info : infos)...
java
private void writeDetailPageInfos(List<CmsDetailPageInfo> infos, CmsUUID newId) { int i = 0; for (CmsDetailPageInfo info : infos) { if (info.isInherited()) { continue; } CmsUUID id = info.getId(); if (id == null) { id = new...
[ "private", "void", "writeDetailPageInfos", "(", "List", "<", "CmsDetailPageInfo", ">", "infos", ",", "CmsUUID", "newId", ")", "{", "int", "i", "=", "0", ";", "for", "(", "CmsDetailPageInfo", "info", ":", "infos", ")", "{", "if", "(", "info", ".", "isInhe...
Writes the detail page information to the XML content.<p> @param infos the list of detail page information bean @param newId the id to use for new pages
[ "Writes", "the", "detail", "page", "information", "to", "the", "XML", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/detailpage/CmsDetailPageConfigurationWriter.java#L164-L178
prometheus/client_java
simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java
Graphite.start
public Thread start(CollectorRegistry registry, int intervalSeconds) { """ Push samples from the given registry to Graphite at the given interval. """ Thread thread = new PushThread(registry, intervalSeconds); thread.setDaemon(true); thread.start(); return thread; }
java
public Thread start(CollectorRegistry registry, int intervalSeconds) { Thread thread = new PushThread(registry, intervalSeconds); thread.setDaemon(true); thread.start(); return thread; }
[ "public", "Thread", "start", "(", "CollectorRegistry", "registry", ",", "int", "intervalSeconds", ")", "{", "Thread", "thread", "=", "new", "PushThread", "(", "registry", ",", "intervalSeconds", ")", ";", "thread", ".", "setDaemon", "(", "true", ")", ";", "t...
Push samples from the given registry to Graphite at the given interval.
[ "Push", "samples", "from", "the", "given", "registry", "to", "Graphite", "at", "the", "given", "interval", "." ]
train
https://github.com/prometheus/client_java/blob/4e0e7527b048f1ffd0382dcb74c0b9dab23b4d9f/simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java#L81-L86
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.generateThumbnailAsync
public Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter) { """ This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the regio...
java
public Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter) { return generateThumbnailWithServiceResponseAsync(width, height, url, generateThumbnailOptionalParameter).map(new Func1<ServiceResponse<InputStream>, I...
[ "public", "Observable", "<", "InputStream", ">", "generateThumbnailAsync", "(", "int", "width", ",", "int", "height", ",", "String", "url", ",", "GenerateThumbnailOptionalParameter", "generateThumbnailOptionalParameter", ")", "{", "return", "generateThumbnailWithServiceResp...
This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input i...
[ "This", "operation", "generates", "a", "thumbnail", "image", "with", "the", "user", "-", "specified", "width", "and", "height", ".", "By", "default", "the", "service", "analyzes", "the", "image", "identifies", "the", "region", "of", "interest", "(", "ROI", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L2095-L2102
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_appcvpx_image.java
xen_appcvpx_image.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> """ xen_appcvpx_image_responses result = (xen_appcvpx_image_responses) serv...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_appcvpx_image_responses result = (xen_appcvpx_image_responses) service.get_payload_formatter().string_to_resource(xen_appcvpx_image_responses.class, response); if(result.errorcode != 0) { if (...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_appcvpx_image_responses", "result", "=", "(", "xen_appcvpx_image_responses", ")", "service", ".", "get_pa...
<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/xen/xen_appcvpx_image.java#L264-L281
alkacon/opencms-core
src/org/opencms/pdftools/CmsPdfResourceHandler.java
CmsPdfResourceHandler.handlePdfLink
protected void handlePdfLink(CmsObject cms, HttpServletRequest request, HttpServletResponse response, String uri) throws Exception { """ Handles a link for generating a PDF.<p> @param cms the current CMS context @param request the servlet request @param response the servlet response @param uri the curren...
java
protected void handlePdfLink(CmsObject cms, HttpServletRequest request, HttpServletResponse response, String uri) throws Exception { CmsPdfLink linkObj = new CmsPdfLink(cms, uri); CmsResource formatter = linkObj.getFormatter(); CmsResource content = linkObj.getContent(); LOG.info("T...
[ "protected", "void", "handlePdfLink", "(", "CmsObject", "cms", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "String", "uri", ")", "throws", "Exception", "{", "CmsPdfLink", "linkObj", "=", "new", "CmsPdfLink", "(", "cms", ",", ...
Handles a link for generating a PDF.<p> @param cms the current CMS context @param request the servlet request @param response the servlet response @param uri the current uri @throws Exception if something goes wrong @throws CmsResourceInitException if the resource initialization is cancelled
[ "Handles", "a", "link", "for", "generating", "a", "PDF", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/pdftools/CmsPdfResourceHandler.java#L160-L212
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java
Math.nextAfter
public static float nextAfter(float start, double direction) { """ Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal a value equivalent to the second argument is returned. <p> Special cases: <ul> <li> If either arg...
java
public static float nextAfter(float start, double direction) { /* * The cases: * * nextAfter(+infinity, 0) == MAX_VALUE * nextAfter(+infinity, +infinity) == +infinity * nextAfter(-infinity, 0) == -MAX_VALUE * nextAfter(-infinity, -infinity) == -infinity ...
[ "public", "static", "float", "nextAfter", "(", "float", "start", ",", "double", "direction", ")", "{", "/*\n * The cases:\n *\n * nextAfter(+infinity, 0) == MAX_VALUE\n * nextAfter(+infinity, +infinity) == +infinity\n * nextAfter(-infinity, 0) == -M...
Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal a value equivalent to the second argument is returned. <p> Special cases: <ul> <li> If either argument is a NaN, then NaN is returned. <li> If both arguments are signed zeros, ...
[ "Returns", "the", "floating", "-", "point", "number", "adjacent", "to", "the", "first", "argument", "in", "the", "direction", "of", "the", "second", "argument", ".", "If", "both", "arguments", "compare", "as", "equal", "a", "value", "equivalent", "to", "the"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L1988-L2046
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_timeCondition_serviceName_condition_POST
public OvhTimeCondition billingAccount_timeCondition_serviceName_condition_POST(String billingAccount, String serviceName, OvhTimeConditionsDayEnum day, String hourBegin, String hourEnd, OvhTimeConditionsPolicyEnum policy) throws IOException { """ Create a new time condition rule REST: POST /telephony/{billingA...
java
public OvhTimeCondition billingAccount_timeCondition_serviceName_condition_POST(String billingAccount, String serviceName, OvhTimeConditionsDayEnum day, String hourBegin, String hourEnd, OvhTimeConditionsPolicyEnum policy) throws IOException { String qPath = "/telephony/{billingAccount}/timeCondition/{serviceName}/co...
[ "public", "OvhTimeCondition", "billingAccount_timeCondition_serviceName_condition_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhTimeConditionsDayEnum", "day", ",", "String", "hourBegin", ",", "String", "hourEnd", ",", "OvhTimeConditionsPolicyEnu...
Create a new time condition rule REST: POST /telephony/{billingAccount}/timeCondition/{serviceName}/condition @param day [required] The day of the time condition @param policy [required] The policy @param hourBegin [required] The hour where the time condition begins (format : hhmm) @param hourEnd [required] The hour w...
[ "Create", "a", "new", "time", "condition", "rule" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5805-L5815
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/util/RequestParameters.java
RequestParameters.put
public void put(String name, String value) { """ Set a parameter to a single value. @param name the parameter name @param value the value of the parameter """ List<String> list = new ArrayList<>(); list.add(value); getMap().put(name, list); }
java
public void put(String name, String value) { List<String> list = new ArrayList<>(); list.add(value); getMap().put(name, list); }
[ "public", "void", "put", "(", "String", "name", ",", "String", "value", ")", "{", "List", "<", "String", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "list", ".", "add", "(", "value", ")", ";", "getMap", "(", ")", ".", "put", "(", ...
Set a parameter to a single value. @param name the parameter name @param value the value of the parameter
[ "Set", "a", "parameter", "to", "a", "single", "value", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/util/RequestParameters.java#L48-L52
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.generateThumbnailInStreamWithServiceResponseAsync
public Observable<ServiceResponse<InputStream>> generateThumbnailInStreamWithServiceResponseAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter) { """ This operation generates a thumbnail image with the user-specified width and height. By...
java
public Observable<ServiceResponse<InputStream>> generateThumbnailInStreamWithServiceResponseAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Pa...
[ "public", "Observable", "<", "ServiceResponse", "<", "InputStream", ">", ">", "generateThumbnailInStreamWithServiceResponseAsync", "(", "int", "width", ",", "int", "height", ",", "byte", "[", "]", "image", ",", "GenerateThumbnailInStreamOptionalParameter", "generateThumbn...
This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input i...
[ "This", "operation", "generates", "a", "thumbnail", "image", "with", "the", "user", "-", "specified", "width", "and", "height", ".", "By", "default", "the", "service", "analyzes", "the", "image", "identifies", "the", "region", "of", "interest", "(", "ROI", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L953-L963
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/DefaultBeanContext.java
DefaultBeanContext.streamOfType
protected <T> Stream<T> streamOfType(BeanResolutionContext resolutionContext, Class<T> beanType, Qualifier<T> qualifier) { """ Obtains a stream of beans of the given type and qualifier. @param resolutionContext The bean resolution context @param beanType The bean type @param qualifier The qua...
java
protected <T> Stream<T> streamOfType(BeanResolutionContext resolutionContext, Class<T> beanType, Qualifier<T> qualifier) { return getBeansOfTypeInternal(resolutionContext, beanType, qualifier).stream(); }
[ "protected", "<", "T", ">", "Stream", "<", "T", ">", "streamOfType", "(", "BeanResolutionContext", "resolutionContext", ",", "Class", "<", "T", ">", "beanType", ",", "Qualifier", "<", "T", ">", "qualifier", ")", "{", "return", "getBeansOfTypeInternal", "(", ...
Obtains a stream of beans of the given type and qualifier. @param resolutionContext The bean resolution context @param beanType The bean type @param qualifier The qualifier @param <T> The bean concrete type @return A stream
[ "Obtains", "a", "stream", "of", "beans", "of", "the", "given", "type", "and", "qualifier", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L614-L616
interedition/collatex
collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java
SuffixArrays.createWithLCP
public static SuffixData createWithLCP(CharSequence s, ISuffixArrayBuilder builder) { """ Create a suffix array and an LCP array for a given character sequence, use the given algorithm for building the suffix array. @see #computeLCP(int[], int, int, int[]) """ final CharSequenceAdapter adapter = ne...
java
public static SuffixData createWithLCP(CharSequence s, ISuffixArrayBuilder builder) { final CharSequenceAdapter adapter = new CharSequenceAdapter(builder); final int[] sa = adapter.buildSuffixArray(s); final int[] lcp = computeLCP(adapter.input, 0, s.length(), sa); return new SuffixData(...
[ "public", "static", "SuffixData", "createWithLCP", "(", "CharSequence", "s", ",", "ISuffixArrayBuilder", "builder", ")", "{", "final", "CharSequenceAdapter", "adapter", "=", "new", "CharSequenceAdapter", "(", "builder", ")", ";", "final", "int", "[", "]", "sa", ...
Create a suffix array and an LCP array for a given character sequence, use the given algorithm for building the suffix array. @see #computeLCP(int[], int, int, int[])
[ "Create", "a", "suffix", "array", "and", "an", "LCP", "array", "for", "a", "given", "character", "sequence", "use", "the", "given", "algorithm", "for", "building", "the", "suffix", "array", "." ]
train
https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java#L74-L79
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java
SdkUtils.copyStreamAndComputeSha1
public static String copyStreamAndComputeSha1(final InputStream inputStream, final OutputStream outputStream) throws NoSuchAlgorithmException, IOException, InterruptedException { """ Utility method to write given inputStream to given outputStream and compute the sha1 while transferring the bytes @pa...
java
public static String copyStreamAndComputeSha1(final InputStream inputStream, final OutputStream outputStream) throws NoSuchAlgorithmException, IOException, InterruptedException { MessageDigest md = MessageDigest.getInstance("SHA-1"); copyStream(inputStream, outputStream, md); return ...
[ "public", "static", "String", "copyStreamAndComputeSha1", "(", "final", "InputStream", "inputStream", ",", "final", "OutputStream", "outputStream", ")", "throws", "NoSuchAlgorithmException", ",", "IOException", ",", "InterruptedException", "{", "MessageDigest", "md", "=",...
Utility method to write given inputStream to given outputStream and compute the sha1 while transferring the bytes @param inputStream the inputStream to copy from. @param outputStream the outputStream to write to. @return @throws IOException thrown if there was a problem reading from inputStream or writing to...
[ "Utility", "method", "to", "write", "given", "inputStream", "to", "given", "outputStream", "and", "compute", "the", "sha1", "while", "transferring", "the", "bytes" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java#L88-L93
jmrozanec/cron-utils
src/main/java/com/cronutils/mapper/ConstantsMapper.java
ConstantsMapper.weekDayMapping
public static int weekDayMapping(final WeekDay source, final WeekDay target, final int weekday) { """ Performs weekday mapping between two weekday definitions. @param source - source @param target - target weekday definition @param weekday - value in source range. @return int - mapped value """ ...
java
public static int weekDayMapping(final WeekDay source, final WeekDay target, final int weekday) { return source.mapTo(weekday, target); }
[ "public", "static", "int", "weekDayMapping", "(", "final", "WeekDay", "source", ",", "final", "WeekDay", "target", ",", "final", "int", "weekday", ")", "{", "return", "source", ".", "mapTo", "(", "weekday", ",", "target", ")", ";", "}" ]
Performs weekday mapping between two weekday definitions. @param source - source @param target - target weekday definition @param weekday - value in source range. @return int - mapped value
[ "Performs", "weekday", "mapping", "between", "two", "weekday", "definitions", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/mapper/ConstantsMapper.java#L31-L33
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.requestMetadataFrom
@SuppressWarnings("WeakerAccess") public TrackMetadata requestMetadataFrom(final CdjStatus status) { """ Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is an appropriate metadata cache, will use that, otherwise makes a query to the players dbserver. @...
java
@SuppressWarnings("WeakerAccess") public TrackMetadata requestMetadataFrom(final CdjStatus status) { if (status.getTrackSourceSlot() == CdjStatus.TrackSourceSlot.NO_TRACK || status.getRekordboxId() == 0) { return null; } final DataReference track = new DataReference(status.getTra...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "TrackMetadata", "requestMetadataFrom", "(", "final", "CdjStatus", "status", ")", "{", "if", "(", "status", ".", "getTrackSourceSlot", "(", ")", "==", "CdjStatus", ".", "TrackSourceSlot", ".", "NO_TR...
Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is an appropriate metadata cache, will use that, otherwise makes a query to the players dbserver. @param status the CDJ status update that will be used to determine the loaded track and ask the appropriate player for...
[ "Given", "a", "status", "update", "from", "a", "CDJ", "find", "the", "metadata", "for", "the", "track", "that", "it", "has", "loaded", "if", "any", ".", "If", "there", "is", "an", "appropriate", "metadata", "cache", "will", "use", "that", "otherwise", "m...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L52-L60
googleapis/google-cloud-java
google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java
ClusterManagerClient.deleteCluster
public final Operation deleteCluster(String projectId, String zone, String clusterId) { """ Deletes the cluster, including the Kubernetes endpoint and all worker nodes. <p>Firewalls and routes that were configured during cluster creation are also deleted. <p>Other Google Compute Engine resources that might b...
java
public final Operation deleteCluster(String projectId, String zone, String clusterId) { DeleteClusterRequest request = DeleteClusterRequest.newBuilder() .setProjectId(projectId) .setZone(zone) .setClusterId(clusterId) .build(); return deleteCluster(reques...
[ "public", "final", "Operation", "deleteCluster", "(", "String", "projectId", ",", "String", "zone", ",", "String", "clusterId", ")", "{", "DeleteClusterRequest", "request", "=", "DeleteClusterRequest", ".", "newBuilder", "(", ")", ".", "setProjectId", "(", "projec...
Deletes the cluster, including the Kubernetes endpoint and all worker nodes. <p>Firewalls and routes that were configured during cluster creation are also deleted. <p>Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at...
[ "Deletes", "the", "cluster", "including", "the", "Kubernetes", "endpoint", "and", "all", "worker", "nodes", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java#L1300-L1309
tencentyun/cos-java-sdk
src/main/java/com/qcloud/cos/common_utils/CommonFileUtils.java
CommonFileUtils.getFileContent
public static String getFileContent(InputStream inputStream, long offset, int length) throws Exception { """ 读取指定流从某处开始的内容,此函数有一定的风险,如果流对应的内容过大,则会造成OOM @param inputStream @param offset 读取的开始偏移 @param length 读取的长度 @return 读取的内容 @throws Exception """ byte[] fileContent = getFileContent...
java
public static String getFileContent(InputStream inputStream, long offset, int length) throws Exception { byte[] fileContent = getFileContentByte(inputStream, offset, length); return new String(fileContent, Charset.forName("ISO-8859-1")); }
[ "public", "static", "String", "getFileContent", "(", "InputStream", "inputStream", ",", "long", "offset", ",", "int", "length", ")", "throws", "Exception", "{", "byte", "[", "]", "fileContent", "=", "getFileContentByte", "(", "inputStream", ",", "offset", ",", ...
读取指定流从某处开始的内容,此函数有一定的风险,如果流对应的内容过大,则会造成OOM @param inputStream @param offset 读取的开始偏移 @param length 读取的长度 @return 读取的内容 @throws Exception
[ "读取指定流从某处开始的内容,此函数有一定的风险,如果流对应的内容过大,则会造成OOM" ]
train
https://github.com/tencentyun/cos-java-sdk/blob/6709a48f67c1ea7b82a7215f5037d6ccf218b630/src/main/java/com/qcloud/cos/common_utils/CommonFileUtils.java#L115-L119
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java
Utility.appendToRule
public static void appendToRule(StringBuffer rule, String text, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf) { """ Append the given string to the rule. Calls the single-character version of appendToRule for each character. """ fo...
java
public static void appendToRule(StringBuffer rule, String text, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf) { for (int i=0; i<text.length(); ++i) { // Okay to process in 16-bit code units here appendToRule(rule, tex...
[ "public", "static", "void", "appendToRule", "(", "StringBuffer", "rule", ",", "String", "text", ",", "boolean", "isLiteral", ",", "boolean", "escapeUnprintable", ",", "StringBuffer", "quoteBuf", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "t...
Append the given string to the rule. Calls the single-character version of appendToRule for each character.
[ "Append", "the", "given", "string", "to", "the", "rule", ".", "Calls", "the", "single", "-", "character", "version", "of", "appendToRule", "for", "each", "character", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1655-L1664
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10Minimal
public static void escapeXml10Minimal(final String text, final Writer writer) throws IOException { """ <p> Perform an XML 1.0 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means ...
java
public static void escapeXml10Minimal(final String text, final Writer writer) throws IOException { escapeXml(text, writer, XmlEscapeSymbols.XML10_SYMBOLS, XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA, XmlEscapeLevel.LEVEL_1_ONLY_MARKUP_SIGNIFICANT); }
[ "public", "static", "void", "escapeXml10Minimal", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeXml", "(", "text", ",", "writer", ",", "XmlEscapeSymbols", ".", "XML10_SYMBOLS", ",", "XmlEscapeType", "...
<p> Perform an XML 1.0 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only escape the five markup-significant characters which are <em>predefined</em> as Character Entity Referen...
[ "<p", ">", "Perform", "an", "XML", "1", ".", "0", "level", "1", "(", "only", "markup", "-", "significant", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing",...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L695-L700
google/closure-compiler
src/com/google/javascript/jscomp/deps/DefaultDependencyResolver.java
DefaultDependencyResolver.getDependencies
@Override public List<String> getDependencies(Collection<String> symbols) throws ServiceException { """ Gets a list of dependencies for the provided list of symbols. """ return getDependencies(symbols, new HashSet<String>()); }
java
@Override public List<String> getDependencies(Collection<String> symbols) throws ServiceException { return getDependencies(symbols, new HashSet<String>()); }
[ "@", "Override", "public", "List", "<", "String", ">", "getDependencies", "(", "Collection", "<", "String", ">", "symbols", ")", "throws", "ServiceException", "{", "return", "getDependencies", "(", "symbols", ",", "new", "HashSet", "<", "String", ">", "(", "...
Gets a list of dependencies for the provided list of symbols.
[ "Gets", "a", "list", "of", "dependencies", "for", "the", "provided", "list", "of", "symbols", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/deps/DefaultDependencyResolver.java#L78-L82
matomo-org/piwik-java-tracker
src/main/java/org/piwik/java/tracking/PiwikRequest.java
PiwikRequest.getFromJsonArray
private JsonValue getFromJsonArray(String key, int index) { """ Get the value at the specified index from the json array at the specified parameter. @param key the key of the json array to access @param index the index of the value in the json array @return the value at the index in the json array """ ...
java
private JsonValue getFromJsonArray(String key, int index){ PiwikJsonArray a = (PiwikJsonArray)parameters.get(key); if (a == null){ return null; } return a.get(index); }
[ "private", "JsonValue", "getFromJsonArray", "(", "String", "key", ",", "int", "index", ")", "{", "PiwikJsonArray", "a", "=", "(", "PiwikJsonArray", ")", "parameters", ".", "get", "(", "key", ")", ";", "if", "(", "a", "==", "null", ")", "{", "return", "...
Get the value at the specified index from the json array at the specified parameter. @param key the key of the json array to access @param index the index of the value in the json array @return the value at the index in the json array
[ "Get", "the", "value", "at", "the", "specified", "index", "from", "the", "json", "array", "at", "the", "specified", "parameter", "." ]
train
https://github.com/matomo-org/piwik-java-tracker/blob/23df71d27a89e89dc7a539b2eda88c90a206458b/src/main/java/org/piwik/java/tracking/PiwikRequest.java#L1899-L1906
arquillian/arquillian-cube
docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/DockerMachine.java
DockerMachine.startDockerMachine
public void startDockerMachine(String cliPathExec, String machineName) { """ Starts given docker machine. @param cliPathExec location of docker-machine or null if it is on PATH. @param machineName to be started. """ commandLineExecutor.execCommand(createDockerMachineCommand(cliPathExec), "start",...
java
public void startDockerMachine(String cliPathExec, String machineName) { commandLineExecutor.execCommand(createDockerMachineCommand(cliPathExec), "start", machineName); this.manuallyStarted = true; }
[ "public", "void", "startDockerMachine", "(", "String", "cliPathExec", ",", "String", "machineName", ")", "{", "commandLineExecutor", ".", "execCommand", "(", "createDockerMachineCommand", "(", "cliPathExec", ")", ",", "\"start\"", ",", "machineName", ")", ";", "this...
Starts given docker machine. @param cliPathExec location of docker-machine or null if it is on PATH. @param machineName to be started.
[ "Starts", "given", "docker", "machine", "." ]
train
https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/DockerMachine.java#L53-L56
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addInlineDeprecatedComment
public void addInlineDeprecatedComment(Element e, DocTree tag, Content htmltree) { """ Add the inline deprecated comment. @param e the Element for which the inline deprecated comment will be added @param tag the inline tag to be added @param htmltree the content tree to which the comment will be added """...
java
public void addInlineDeprecatedComment(Element e, DocTree tag, Content htmltree) { CommentHelper ch = utils.getCommentHelper(e); addCommentTags(e, ch.getBody(configuration, tag), true, false, htmltree); }
[ "public", "void", "addInlineDeprecatedComment", "(", "Element", "e", ",", "DocTree", "tag", ",", "Content", "htmltree", ")", "{", "CommentHelper", "ch", "=", "utils", ".", "getCommentHelper", "(", "e", ")", ";", "addCommentTags", "(", "e", ",", "ch", ".", ...
Add the inline deprecated comment. @param e the Element for which the inline deprecated comment will be added @param tag the inline tag to be added @param htmltree the content tree to which the comment will be added
[ "Add", "the", "inline", "deprecated", "comment", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1647-L1650
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.missingRequiredElement
public static XMLStreamException missingRequiredElement(final XMLExtendedStreamReader reader, final Set<?> required) { """ Get an exception reporting a missing, required XML child element. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return th...
java
public static XMLStreamException missingRequiredElement(final XMLExtendedStreamReader reader, final Set<?> required) { final StringBuilder b = new StringBuilder(); Iterator<?> iterator = required.iterator(); while (iterator.hasNext()) { final Object o = iterator.next(); b...
[ "public", "static", "XMLStreamException", "missingRequiredElement", "(", "final", "XMLExtendedStreamReader", "reader", ",", "final", "Set", "<", "?", ">", "required", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "Iterator", ...
Get an exception reporting a missing, required XML child element. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return the exception
[ "Get", "an", "exception", "reporting", "a", "missing", "required", "XML", "child", "element", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L246-L268
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java
CmsAreaSelectPanel.setSelectPositionX
private void setSelectPositionX(int posX, int width) { """ Sets X position and width of the select area.<p> @param posX the new X position @param width the new width """ m_markerStyle.setLeft(posX, Unit.PX); m_markerStyle.setWidth(width, Unit.PX); m_overlayLeftStyle.setWidth(posX,...
java
private void setSelectPositionX(int posX, int width) { m_markerStyle.setLeft(posX, Unit.PX); m_markerStyle.setWidth(width, Unit.PX); m_overlayLeftStyle.setWidth(posX, Unit.PX); m_overlayTopStyle.setLeft(posX, Unit.PX); m_overlayTopStyle.setWidth(width, Unit.PX); m_overl...
[ "private", "void", "setSelectPositionX", "(", "int", "posX", ",", "int", "width", ")", "{", "m_markerStyle", ".", "setLeft", "(", "posX", ",", "Unit", ".", "PX", ")", ";", "m_markerStyle", ".", "setWidth", "(", "width", ",", "Unit", ".", "PX", ")", ";"...
Sets X position and width of the select area.<p> @param posX the new X position @param width the new width
[ "Sets", "X", "position", "and", "width", "of", "the", "select", "area", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java#L791-L805
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java
DTMNamedNodeMap.removeNamedItemNS
public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException { """ Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes ...
java
public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException { throw new DTMException(DTMException.NO_MODIFICATION_ALLOWED_ERR); }
[ "public", "Node", "removeNamedItemNS", "(", "String", "namespaceURI", ",", "String", "localName", ")", "throws", "DOMException", "{", "throw", "new", "DTMException", "(", "DTMException", ".", "NO_MODIFICATION_ALLOWED_ERR", ")", ";", "}" ]
Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the <code>Node</code> interface. If so, an attribute immediately appears containing the default valu...
[ "Removes", "a", "node", "specified", "by", "local", "name", "and", "namespace", "URI", ".", "A", "removed", "attribute", "may", "be", "known", "to", "have", "a", "default", "value", "when", "this", "map", "contains", "the", "attributes", "attached", "to", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java#L265-L269
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java
RequestParam.get
public static @Nullable String get(@NotNull ServletRequest request, @NotNull String param) { """ Returns a request parameter.<br> In addition the method fixes problems with incorrect UTF-8 characters returned by the servlet engine. All character data is converted from ISO-8859-1 to UTF-8 if not '_charset_' param...
java
public static @Nullable String get(@NotNull ServletRequest request, @NotNull String param) { return get(request, param, null); }
[ "public", "static", "@", "Nullable", "String", "get", "(", "@", "NotNull", "ServletRequest", "request", ",", "@", "NotNull", "String", "param", ")", "{", "return", "get", "(", "request", ",", "param", ",", "null", ")", ";", "}" ]
Returns a request parameter.<br> In addition the method fixes problems with incorrect UTF-8 characters returned by the servlet engine. All character data is converted from ISO-8859-1 to UTF-8 if not '_charset_' parameter is provided. @param request Request. @param param Parameter name. @return Parameter value or null i...
[ "Returns", "a", "request", "parameter", ".", "<br", ">", "In", "addition", "the", "method", "fixes", "problems", "with", "incorrect", "UTF", "-", "8", "characters", "returned", "by", "the", "servlet", "engine", ".", "All", "character", "data", "is", "convert...
train
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java#L63-L65
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/PlanNode.java
PlanNode.isNotOneOf
public boolean isNotOneOf( Type first, Type... rest ) { """ Return true if this node's type does not match any of the supplied types @param first the type to compare @param rest the additional types to compare @return true if this node's type is different than all of those suppl...
java
public boolean isNotOneOf( Type first, Type... rest ) { return isNotOneOf(EnumSet.of(first, rest)); }
[ "public", "boolean", "isNotOneOf", "(", "Type", "first", ",", "Type", "...", "rest", ")", "{", "return", "isNotOneOf", "(", "EnumSet", ".", "of", "(", "first", ",", "rest", ")", ")", ";", "}" ]
Return true if this node's type does not match any of the supplied types @param first the type to compare @param rest the additional types to compare @return true if this node's type is different than all of those supplied, or false if matches one of the supplied types
[ "Return", "true", "if", "this", "node", "s", "type", "does", "not", "match", "any", "of", "the", "supplied", "types" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/PlanNode.java#L343-L346
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTableUtil.java
VoltTableUtil.toCSV
public static Pair<Integer,byte[]> toCSV( VoltTable vt, ArrayList<VoltType> columns, char delimiter, char fullDelimiters[], int lastNumCharacters) throws IOException { """ /* Returns the number of characters generated and the csv data in UTF-8 encoding....
java
public static Pair<Integer,byte[]> toCSV( VoltTable vt, ArrayList<VoltType> columns, char delimiter, char fullDelimiters[], int lastNumCharacters) throws IOException { StringWriter sw = new StringWriter((int)(lastNumCharacters * 1.2)); CSVWrite...
[ "public", "static", "Pair", "<", "Integer", ",", "byte", "[", "]", ">", "toCSV", "(", "VoltTable", "vt", ",", "ArrayList", "<", "VoltType", ">", "columns", ",", "char", "delimiter", ",", "char", "fullDelimiters", "[", "]", ",", "int", "lastNumCharacters", ...
/* Returns the number of characters generated and the csv data in UTF-8 encoding.
[ "/", "*", "Returns", "the", "number", "of", "characters", "generated", "and", "the", "csv", "data", "in", "UTF", "-", "8", "encoding", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTableUtil.java#L166-L188
grandstaish/paperparcel
paperparcel/src/main/java/paperparcel/internal/Utils.java
Utils.nullSafeClone
public static <T> TypeAdapter<T> nullSafeClone(@NonNull final TypeAdapter<T> delegate) { """ Returns a type adapter equal to this type adapter, but with support for reading and writing {@code null} values. """ return new TypeAdapter<T>() { @Nullable @Override public T readFromParcel(@NonNull Parcel ...
java
public static <T> TypeAdapter<T> nullSafeClone(@NonNull final TypeAdapter<T> delegate) { return new TypeAdapter<T>() { @Nullable @Override public T readFromParcel(@NonNull Parcel source) { return readNullable(source, delegate); } @Override public void writeToParcel(@Nullable T value, @Non...
[ "public", "static", "<", "T", ">", "TypeAdapter", "<", "T", ">", "nullSafeClone", "(", "@", "NonNull", "final", "TypeAdapter", "<", "T", ">", "delegate", ")", "{", "return", "new", "TypeAdapter", "<", "T", ">", "(", ")", "{", "@", "Nullable", "@", "O...
Returns a type adapter equal to this type adapter, but with support for reading and writing {@code null} values.
[ "Returns", "a", "type", "adapter", "equal", "to", "this", "type", "adapter", "but", "with", "support", "for", "reading", "and", "writing", "{" ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel/src/main/java/paperparcel/internal/Utils.java#L85-L95
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/contextmenu/A_CmsContextMenuItem.java
A_CmsContextMenuItem.setActive
public void setActive(boolean active, String reason) { """ Makes the menu item active or inactive.<p> If the item is inactive all handlers are removed.<p> @param active <code>true</code> if the item should be active, <code>false</code> otherwise @param reason the reason for de-activation """ if...
java
public void setActive(boolean active, String reason) { if (!active) { m_clickRegistration.removeHandler(); m_mouseOutRegistration.removeHandler(); m_mouseOverRegistration.removeHandler(); getElement().addClassName(I_CmsLayoutBundle.INSTANCE.contextmenuCss().disab...
[ "public", "void", "setActive", "(", "boolean", "active", ",", "String", "reason", ")", "{", "if", "(", "!", "active", ")", "{", "m_clickRegistration", ".", "removeHandler", "(", ")", ";", "m_mouseOutRegistration", ".", "removeHandler", "(", ")", ";", "m_mous...
Makes the menu item active or inactive.<p> If the item is inactive all handlers are removed.<p> @param active <code>true</code> if the item should be active, <code>false</code> otherwise @param reason the reason for de-activation
[ "Makes", "the", "menu", "item", "active", "or", "inactive", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/contextmenu/A_CmsContextMenuItem.java#L216-L231
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/style/ColorUtils.java
ColorUtils.hslConvert
private static float hslConvert(float t1, float t2, float hue) { """ HSL convert helper method @param t1 t1 @param t2 t2 @param hue hue @return arithmetic RBG value """ float value; if (hue < 0) { hue += 6; } if (hue >= 6) { hue -= 6; } if (hue < 1) { value = (t2 - t1) * hue + t1;...
java
private static float hslConvert(float t1, float t2, float hue) { float value; if (hue < 0) { hue += 6; } if (hue >= 6) { hue -= 6; } if (hue < 1) { value = (t2 - t1) * hue + t1; } else if (hue < 3) { value = t2; } else if (hue < 4) { value = (t2 - t1) * (4 - hue) + t1; } else { value...
[ "private", "static", "float", "hslConvert", "(", "float", "t1", ",", "float", "t2", ",", "float", "hue", ")", "{", "float", "value", ";", "if", "(", "hue", "<", "0", ")", "{", "hue", "+=", "6", ";", "}", "if", "(", "hue", ">=", "6", ")", "{", ...
HSL convert helper method @param t1 t1 @param t2 t2 @param hue hue @return arithmetic RBG value
[ "HSL", "convert", "helper", "method" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/style/ColorUtils.java#L425-L443
osglworks/java-mvc
src/main/java/org/osgl/mvc/result/NotFound.java
NotFound.of
public static NotFound of(int errorCode, Throwable cause, String message, Object... args) { """ Returns a static NotFound instance and set the {@link #payload} thread local with error code, cause and message specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored i...
java
public static NotFound of(int errorCode, Throwable cause, String message, Object... args) { touchPayload().errorCode(errorCode).message(message, args).cause(cause); return _INSTANCE; }
[ "public", "static", "NotFound", "of", "(", "int", "errorCode", ",", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "touchPayload", "(", ")", ".", "errorCode", "(", "errorCode", ")", ".", "message", "(", "message", ...
Returns a static NotFound instance and set the {@link #payload} thread local with error code, cause and message specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param cause the cause @param errorCode the app defined error code ...
[ "Returns", "a", "static", "NotFound", "instance", "and", "set", "the", "{", "@link", "#payload", "}", "thread", "local", "with", "error", "code", "cause", "and", "message", "specified", "." ]
train
https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/NotFound.java#L229-L232
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantBundleName
public static String getVariantBundleName(String bundleName, Map<String, String> variants, boolean isGeneratedResource) { """ Returns the bundle name from the variants given in parameter @param bundleName the original bundle name @param variants the map of variant @param isGeneratedResource the flag ind...
java
public static String getVariantBundleName(String bundleName, Map<String, String> variants, boolean isGeneratedResource) { String variantKey = getVariantKey(variants); return getVariantBundleName(bundleName, variantKey, isGeneratedResource); }
[ "public", "static", "String", "getVariantBundleName", "(", "String", "bundleName", ",", "Map", "<", "String", ",", "String", ">", "variants", ",", "boolean", "isGeneratedResource", ")", "{", "String", "variantKey", "=", "getVariantKey", "(", "variants", ")", ";"...
Returns the bundle name from the variants given in parameter @param bundleName the original bundle name @param variants the map of variant @param isGeneratedResource the flag indicating if it's a generated resource or not @return the variant bundle name
[ "Returns", "the", "bundle", "name", "from", "the", "variants", "given", "in", "parameter" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L277-L282
TimeAndSpaceIO/SmoothieMap
src/main/java/net/openhft/smoothie/SmoothieMap.java
SmoothieMap.replaceAll
@Override public final void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { """ Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception. Exceptions thrown by the function are relaye...
java
@Override public final void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { Objects.requireNonNull(function); int mc = this.modCount; Segment<K, V> segment; for (long segmentIndex = 0; segmentIndex >= 0; segmentIndex = nextSegmentIndex(segmentIndex, ...
[ "@", "Override", "public", "final", "void", "replaceAll", "(", "BiFunction", "<", "?", "super", "K", ",", "?", "super", "V", ",", "?", "extends", "V", ">", "function", ")", "{", "Objects", ".", "requireNonNull", "(", "function", ")", ";", "int", "mc", ...
Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception. Exceptions thrown by the function are relayed to the caller. @param function the function to apply to each entry @throws NullPointerException if the specif...
[ "Replaces", "each", "entry", "s", "value", "with", "the", "result", "of", "invoking", "the", "given", "function", "on", "that", "entry", "until", "all", "entries", "have", "been", "processed", "or", "the", "function", "throws", "an", "exception", ".", "Excep...
train
https://github.com/TimeAndSpaceIO/SmoothieMap/blob/c798f6cae1d377f6913e8821a1fcf5bf45ee0412/src/main/java/net/openhft/smoothie/SmoothieMap.java#L1107-L1118
mapbox/mapbox-navigation-android
libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/ImageCreator.java
ImageCreator.loadImages
private void loadImages(TextView textView, List<BannerComponentNode> bannerComponentNodes) { """ Takes the given components from the {@link BannerText} and creates a new {@link Spannable} with text / {@link ImageSpan}s which is loaded into the given {@link TextView}. @param textView target for the banner te...
java
private void loadImages(TextView textView, List<BannerComponentNode> bannerComponentNodes) { if (!hasImages()) { return; } updateShieldUrlIndices(bannerComponentNodes); createTargets(textView); loadTargets(); }
[ "private", "void", "loadImages", "(", "TextView", "textView", ",", "List", "<", "BannerComponentNode", ">", "bannerComponentNodes", ")", "{", "if", "(", "!", "hasImages", "(", ")", ")", "{", "return", ";", "}", "updateShieldUrlIndices", "(", "bannerComponentNode...
Takes the given components from the {@link BannerText} and creates a new {@link Spannable} with text / {@link ImageSpan}s which is loaded into the given {@link TextView}. @param textView target for the banner text @since 0.9.0
[ "Takes", "the", "given", "components", "from", "the", "{", "@link", "BannerText", "}", "and", "creates", "a", "new", "{", "@link", "Spannable", "}", "with", "text", "/", "{", "@link", "ImageSpan", "}", "s", "which", "is", "loaded", "into", "the", "given"...
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/ImageCreator.java#L115-L123
alkacon/opencms-core
src/org/opencms/loader/CmsJspLoader.java
CmsJspLoader.removeFromCache
public void removeFromCache(Set<String> rootPaths, boolean online) { """ Removes the given resources from the cache.<p> @param rootPaths the set of root paths to remove @param online if online or offline """ Map<String, Boolean> cache; if (online) { cache = m_onlineJsps; ...
java
public void removeFromCache(Set<String> rootPaths, boolean online) { Map<String, Boolean> cache; if (online) { cache = m_onlineJsps; } else { cache = m_offlineJsps; } Iterator<String> itRemove = rootPaths.iterator(); while (itRemove.hasNext()) { ...
[ "public", "void", "removeFromCache", "(", "Set", "<", "String", ">", "rootPaths", ",", "boolean", "online", ")", "{", "Map", "<", "String", ",", "Boolean", ">", "cache", ";", "if", "(", "online", ")", "{", "cache", "=", "m_onlineJsps", ";", "}", "else"...
Removes the given resources from the cache.<p> @param rootPaths the set of root paths to remove @param online if online or offline
[ "Removes", "the", "given", "resources", "from", "the", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsJspLoader.java#L602-L615
diffplug/durian
src/com/diffplug/common/base/FieldsAndGetters.java
FieldsAndGetters.dumpIf
public static void dumpIf(String name, Object obj, Predicate<String> evalPredicate, Predicate<Map.Entry<String, Object>> dumpPredicate, StringPrinter printer) { """ Passes each field and getter of {@code obj} to {@code evalPredicate}, grabs its value if it passes, and if the value passes {@code dumpPredicate} then...
java
public static void dumpIf(String name, Object obj, Predicate<String> evalPredicate, Predicate<Map.Entry<String, Object>> dumpPredicate, StringPrinter printer) { printer.println(name + ": " + obj.getClass().getName()); fieldsAndGetters(obj, evalPredicate).filter(dumpPredicate).forEach(entry -> { printer.println("...
[ "public", "static", "void", "dumpIf", "(", "String", "name", ",", "Object", "obj", ",", "Predicate", "<", "String", ">", "evalPredicate", ",", "Predicate", "<", "Map", ".", "Entry", "<", "String", ",", "Object", ">", ">", "dumpPredicate", ",", "StringPrint...
Passes each field and getter of {@code obj} to {@code evalPredicate}, grabs its value if it passes, and if the value passes {@code dumpPredicate} then it is dumped to {@code printer}. @see #fieldsAndGetters(Object, Predicate)
[ "Passes", "each", "field", "and", "getter", "of", "{" ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/FieldsAndGetters.java#L158-L163
jbundle/jbundle
base/model/src/main/java/org/jbundle/base/model/Resources.java
Resources.init
public void init(ResourceBundle resourceBundle, String strResourceName, boolean bReturnKeyOnMissing) { """ Constuctor. @param resourceBundle The resource bundle to do lookups in. @param strResourceName The name of this resource. @param bReturnKeyOnMissing Return the key if it is not in the resource bundle. ...
java
public void init(ResourceBundle resourceBundle, String strResourceName, boolean bReturnKeyOnMissing) { m_resourceBundle = resourceBundle; m_strResourceName = strResourceName; m_bReturnKeyOnMissing = bReturnKeyOnMissing; }
[ "public", "void", "init", "(", "ResourceBundle", "resourceBundle", ",", "String", "strResourceName", ",", "boolean", "bReturnKeyOnMissing", ")", "{", "m_resourceBundle", "=", "resourceBundle", ";", "m_strResourceName", "=", "strResourceName", ";", "m_bReturnKeyOnMissing",...
Constuctor. @param resourceBundle The resource bundle to do lookups in. @param strResourceName The name of this resource. @param bReturnKeyOnMissing Return the key if it is not in the resource bundle.
[ "Constuctor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Resources.java#L60-L65
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/thread_pool/ThreadPoolManager.java
ThreadPoolManager.schedule
public static ScheduledFuture schedule(Runnable runnable, long delayInMilli, String msgId) { """ Creates and executes a one-shot action that becomes enabled after the given delay. @param runnable a java runnable object you want to submit @param delayInMilli the delay in milliseconds @param msgId th...
java
public static ScheduledFuture schedule(Runnable runnable, long delayInMilli, String msgId) { if (StringUtil.isEmpty(msgId)) { throw new IllegalArgumentException("You must specify a $msgId for the the one-shot action."); } Runnable proxy = wrapRunnable(runnable, msgId); return...
[ "public", "static", "ScheduledFuture", "schedule", "(", "Runnable", "runnable", ",", "long", "delayInMilli", ",", "String", "msgId", ")", "{", "if", "(", "StringUtil", ".", "isEmpty", "(", "msgId", ")", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Creates and executes a one-shot action that becomes enabled after the given delay. @param runnable a java runnable object you want to submit @param delayInMilli the delay in milliseconds @param msgId the message id. Not null. @return the future
[ "Creates", "and", "executes", "a", "one", "-", "shot", "action", "that", "becomes", "enabled", "after", "the", "given", "delay", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/thread_pool/ThreadPoolManager.java#L279-L285
craftercms/core
src/main/java/org/craftercms/core/service/impl/ContentStoreServiceImpl.java
ContentStoreServiceImpl.doFindItem
@Override protected Item doFindItem(Context context, CachingOptions cachingOptions, String url, ItemProcessor processor) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException { """ Returns the content store item for the given url, retu...
java
@Override protected Item doFindItem(Context context, CachingOptions cachingOptions, String url, ItemProcessor processor) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException { // Add a leading slash if not present at the beginning ...
[ "@", "Override", "protected", "Item", "doFindItem", "(", "Context", "context", ",", "CachingOptions", "cachingOptions", ",", "String", "url", ",", "ItemProcessor", "processor", ")", "throws", "InvalidContextException", ",", "XmlFileParseException", ",", "XmlMergeExcepti...
Returns the content store item for the given url, returning null if not found. <p/> <p>After acquiring the item from the {@link ContentStoreAdapter}, the item's descriptor is merged (according to its {@link org.craftercms.core.xml.mergers.DescriptorMergeStrategy}) with related descriptors, and the final item is then pr...
[ "Returns", "the", "content", "store", "item", "for", "the", "given", "url", "returning", "null", "if", "not", "found", ".", "<p", "/", ">", "<p", ">", "After", "acquiring", "the", "item", "from", "the", "{" ]
train
https://github.com/craftercms/core/blob/d3ec74d669d3f8cfcf995177615d5f126edfa237/src/main/java/org/craftercms/core/service/impl/ContentStoreServiceImpl.java#L246-L270
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java
ManualArrayCopy.similarArrayInstructions
private static boolean similarArrayInstructions(int load, int store) { """ looks to see if a load and store operation are working on the same type of array @param load the load instruction on an array @param store the store instruction on an array @return whether the type of the load and store are the same ...
java
private static boolean similarArrayInstructions(int load, int store) { return ((load == Const.AALOAD) && (store == Const.AASTORE)) || ((load == Const.IALOAD) && (store == Const.IASTORE)) || ((load == Const.DALOAD) && (store == Const.DASTORE)) || ((load == Const.LALOAD) && (store == Const.LASTORE...
[ "private", "static", "boolean", "similarArrayInstructions", "(", "int", "load", ",", "int", "store", ")", "{", "return", "(", "(", "load", "==", "Const", ".", "AALOAD", ")", "&&", "(", "store", "==", "Const", ".", "AASTORE", ")", ")", "||", "(", "(", ...
looks to see if a load and store operation are working on the same type of array @param load the load instruction on an array @param store the store instruction on an array @return whether the type of the load and store are the same
[ "looks", "to", "see", "if", "a", "load", "and", "store", "operation", "are", "working", "on", "the", "same", "type", "of", "array" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/ManualArrayCopy.java#L196-L201
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.replaceEntry
public static boolean replaceEntry(final File zip, final ZipEntrySource entry) { """ Changes an existing ZIP file: replaces a given entry in it. @param zip an existing ZIP file. @param entry new ZIP entry. @return <code>true</code> if the entry was replaced. """ return operateInPlace(zip, new InPlac...
java
public static boolean replaceEntry(final File zip, final ZipEntrySource entry) { return operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { return replaceEntry(zip, entry, tmpFile); } }); }
[ "public", "static", "boolean", "replaceEntry", "(", "final", "File", "zip", ",", "final", "ZipEntrySource", "entry", ")", "{", "return", "operateInPlace", "(", "zip", ",", "new", "InPlaceAction", "(", ")", "{", "public", "boolean", "act", "(", "File", "tmpFi...
Changes an existing ZIP file: replaces a given entry in it. @param zip an existing ZIP file. @param entry new ZIP entry. @return <code>true</code> if the entry was replaced.
[ "Changes", "an", "existing", "ZIP", "file", ":", "replaces", "a", "given", "entry", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2607-L2613
apache/groovy
subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
AstBuilder.visitIntegerLiteralAlt
@Override public ConstantExpression visitIntegerLiteralAlt(IntegerLiteralAltContext ctx) { """ literal { -------------------------------------------------------------------- """ String text = ctx.IntegerLiteral().getText(); Number num = null; try { num = Numbers.p...
java
@Override public ConstantExpression visitIntegerLiteralAlt(IntegerLiteralAltContext ctx) { String text = ctx.IntegerLiteral().getText(); Number num = null; try { num = Numbers.parseInteger(null, text); } catch (Exception e) { this.numberFormatError = tuple(ct...
[ "@", "Override", "public", "ConstantExpression", "visitIntegerLiteralAlt", "(", "IntegerLiteralAltContext", "ctx", ")", "{", "String", "text", "=", "ctx", ".", "IntegerLiteral", "(", ")", ".", "getText", "(", ")", ";", "Number", "num", "=", "null", ";", "try",...
literal { --------------------------------------------------------------------
[ "literal", "{", "--------------------------------------------------------------------" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java#L3510-L3526
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java
SDNN.biasAdd
public SDVariable biasAdd(String name, SDVariable input, SDVariable bias) { """ Bias addition operation: a special case of addition, typically used with CNN 4D activations and a 1D bias vector @param name Name of the output variable @param input 4d input variable @param bias 1d bias @return Output variable...
java
public SDVariable biasAdd(String name, SDVariable input, SDVariable bias) { validateFloatingPoint("biasAdd", "input", input); validateFloatingPoint("biasAdd", "bias", bias); SDVariable ret = f().biasAdd(input, bias); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "biasAdd", "(", "String", "name", ",", "SDVariable", "input", ",", "SDVariable", "bias", ")", "{", "validateFloatingPoint", "(", "\"biasAdd\"", ",", "\"input\"", ",", "input", ")", ";", "validateFloatingPoint", "(", "\"biasAdd\"", ",", "\...
Bias addition operation: a special case of addition, typically used with CNN 4D activations and a 1D bias vector @param name Name of the output variable @param input 4d input variable @param bias 1d bias @return Output variable
[ "Bias", "addition", "operation", ":", "a", "special", "case", "of", "addition", "typically", "used", "with", "CNN", "4D", "activations", "and", "a", "1D", "bias", "vector" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L90-L95
spring-projects/spring-mobile
spring-mobile-device/src/main/java/org/springframework/mobile/device/util/ResolverUtils.java
ResolverUtils.isMobile
public static boolean isMobile(Device device, SitePreference sitePreference) { """ Should the combination of {@link Device} and {@link SitePreference} be handled as a mobile device @param device the resolved device @param sitePreference the specified site preference @return true if mobile """ return site...
java
public static boolean isMobile(Device device, SitePreference sitePreference) { return sitePreference == SitePreference.MOBILE || device != null && device.isMobile() && sitePreference == null; }
[ "public", "static", "boolean", "isMobile", "(", "Device", "device", ",", "SitePreference", "sitePreference", ")", "{", "return", "sitePreference", "==", "SitePreference", ".", "MOBILE", "||", "device", "!=", "null", "&&", "device", ".", "isMobile", "(", ")", "...
Should the combination of {@link Device} and {@link SitePreference} be handled as a mobile device @param device the resolved device @param sitePreference the specified site preference @return true if mobile
[ "Should", "the", "combination", "of", "{" ]
train
https://github.com/spring-projects/spring-mobile/blob/a402cbcaf208e24288b957f44c9984bd6e8bf064/spring-mobile-device/src/main/java/org/springframework/mobile/device/util/ResolverUtils.java#L48-L50
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyDecoder.java
KeyDecoder.decodeFloatDesc
public static float decodeFloatDesc(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a float from exactly 4 bytes, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return float value """ int bits = Data...
java
public static float decodeFloatDesc(byte[] src, int srcOffset) throws CorruptEncodingException { int bits = DataDecoder.decodeFloatBits(src, srcOffset); if (bits >= 0) { bits ^= 0x7fffffff; } return Float.intBitsToFloat(bits); }
[ "public", "static", "float", "decodeFloatDesc", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "int", "bits", "=", "DataDecoder", ".", "decodeFloatBits", "(", "src", ",", "srcOffset", ")", ";", "if", "(...
Decodes a float from exactly 4 bytes, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return float value
[ "Decodes", "a", "float", "from", "exactly", "4", "bytes", "as", "encoded", "for", "descending", "order", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L276-L284
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java
ResourceHealthMetadatasInner.getBySite
public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) { """ Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource group to which the resource belon...
java
public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) { return getBySiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "ResourceHealthMetadataInner", "getBySite", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getBySiteWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")"...
Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of web app @throws IllegalArgumentException thrown if parameters fail the val...
[ "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", ".", "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java#L474-L476
ontop/ontop
mapping/sql/native/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/OntopNativeMappingParser.java
OntopNativeMappingParser.parse
@Override public SQLPPMapping parse(File file) throws InvalidMappingException, DuplicateMappingException, MappingIOException { """ Parsing is not done at construction time because our dependency injection framework (Guice) does not manage exceptions nicely. """ checkFile(file); try (Reader...
java
@Override public SQLPPMapping parse(File file) throws InvalidMappingException, DuplicateMappingException, MappingIOException { checkFile(file); try (Reader reader = new FileReader(file)) { return load(reader, specificationFactory, ppMappingFactory, file.getName()); } catch (IOExc...
[ "@", "Override", "public", "SQLPPMapping", "parse", "(", "File", "file", ")", "throws", "InvalidMappingException", ",", "DuplicateMappingException", ",", "MappingIOException", "{", "checkFile", "(", "file", ")", ";", "try", "(", "Reader", "reader", "=", "new", "...
Parsing is not done at construction time because our dependency injection framework (Guice) does not manage exceptions nicely.
[ "Parsing", "is", "not", "done", "at", "construction", "time", "because", "our", "dependency", "injection", "framework", "(", "Guice", ")", "does", "not", "manage", "exceptions", "nicely", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/native/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/OntopNativeMappingParser.java#L111-L119
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/Check.java
Check.inferiorOrEqual
public static void inferiorOrEqual(int a, int b) { """ Check if <code>a</code> is inferior to <code>b</code>. @param a The parameter to test. @param b The parameter to compare to. @throws LionEngineException If check failed. """ if (a > b) { throw new LionEngineException(ERR...
java
public static void inferiorOrEqual(int a, int b) { if (a > b) { throw new LionEngineException(ERROR_ARGUMENT + String.valueOf(a) + ERROR_INFERIOR + String.valueOf(b)); } }
[ "public", "static", "void", "inferiorOrEqual", "(", "int", "a", ",", "int", "b", ")", "{", "if", "(", "a", ">", "b", ")", "{", "throw", "new", "LionEngineException", "(", "ERROR_ARGUMENT", "+", "String", ".", "valueOf", "(", "a", ")", "+", "ERROR_INFER...
Check if <code>a</code> is inferior to <code>b</code>. @param a The parameter to test. @param b The parameter to compare to. @throws LionEngineException If check failed.
[ "Check", "if", "<code", ">", "a<", "/", "code", ">", "is", "inferior", "to", "<code", ">", "b<", "/", "code", ">", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/Check.java#L118-L124
wcm-io/wcm-io-handler
url/src/main/java/io/wcm/handler/url/impl/modes/DefaultUrlMode.java
DefaultUrlMode.linksToOtherDomain
private boolean linksToOtherDomain(Adaptable adaptable, Page currentPage, Resource targetResource) { """ Checks if the target resource is located outsite the current site, and if for this other resource context a valid url configuration with a specific hostname exists. @param adaptable Adaptable @param currentP...
java
private boolean linksToOtherDomain(Adaptable adaptable, Page currentPage, Resource targetResource) { if (currentPage == null || targetResource == null) { return false; } UrlHandlerConfig urlHandlerConfig = AdaptTo.notNull(adaptable, UrlHandlerConfig.class); Resource currentResource = AdaptTo.notN...
[ "private", "boolean", "linksToOtherDomain", "(", "Adaptable", "adaptable", ",", "Page", "currentPage", ",", "Resource", "targetResource", ")", "{", "if", "(", "currentPage", "==", "null", "||", "targetResource", "==", "null", ")", "{", "return", "false", ";", ...
Checks if the target resource is located outsite the current site, and if for this other resource context a valid url configuration with a specific hostname exists. @param adaptable Adaptable @param currentPage Current page (may be null) @param targetResource Target resource (may be null) @return true if the target res...
[ "Checks", "if", "the", "target", "resource", "is", "located", "outsite", "the", "current", "site", "and", "if", "for", "this", "other", "resource", "context", "a", "valid", "url", "configuration", "with", "a", "specific", "hostname", "exists", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/url/src/main/java/io/wcm/handler/url/impl/modes/DefaultUrlMode.java#L79-L98
JetBrains/xodus
openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java
EnvironmentConfig.setGcRunPeriod
public EnvironmentConfig setGcRunPeriod(final int runPeriod) throws InvalidSettingException { """ Sets the number of milliseconds after which background cleaning cycle (single run of the database garbage collector) can be repeated if the previous one didn't reach required utilization. Default value is {@code 300...
java
public EnvironmentConfig setGcRunPeriod(final int runPeriod) throws InvalidSettingException { if (runPeriod < 0) { throw new InvalidSettingException("Invalid GC run period: " + runPeriod); } return setSetting(GC_RUN_PERIOD, runPeriod); }
[ "public", "EnvironmentConfig", "setGcRunPeriod", "(", "final", "int", "runPeriod", ")", "throws", "InvalidSettingException", "{", "if", "(", "runPeriod", "<", "0", ")", "{", "throw", "new", "InvalidSettingException", "(", "\"Invalid GC run period: \"", "+", "runPeriod...
Sets the number of milliseconds after which background cleaning cycle (single run of the database garbage collector) can be repeated if the previous one didn't reach required utilization. Default value is {@code 30000}. <p>Mutable at runtime: yes @param runPeriod number of milliseconds after which background cleaning ...
[ "Sets", "the", "number", "of", "milliseconds", "after", "which", "background", "cleaning", "cycle", "(", "single", "run", "of", "the", "database", "garbage", "collector", ")", "can", "be", "repeated", "if", "the", "previous", "one", "didn", "t", "reach", "re...
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java#L1987-L1992
JDBDT/jdbdt
src/main/java/org/jdbdt/DB.java
DB.logDataSetOperation
void logDataSetOperation(CallInfo callInfo, DataSet data) { """ Log insertion. @param callInfo Call info. @param data Data set. """ if (isEnabled(Option.LOG_SETUP)) { log.write(callInfo, data); } }
java
void logDataSetOperation(CallInfo callInfo, DataSet data) { if (isEnabled(Option.LOG_SETUP)) { log.write(callInfo, data); } }
[ "void", "logDataSetOperation", "(", "CallInfo", "callInfo", ",", "DataSet", "data", ")", "{", "if", "(", "isEnabled", "(", "Option", ".", "LOG_SETUP", ")", ")", "{", "log", ".", "write", "(", "callInfo", ",", "data", ")", ";", "}", "}" ]
Log insertion. @param callInfo Call info. @param data Data set.
[ "Log", "insertion", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/DB.java#L490-L494
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.notPositive
@Throws(IllegalPositiveArgumentException.class) public static void notPositive(final boolean condition, final int value, @Nullable final String name) { """ Ensures that an integer reference passed as a parameter to the calling method is not greater than {@code 0}. @param condition condition must be {@code tru...
java
@Throws(IllegalPositiveArgumentException.class) public static void notPositive(final boolean condition, final int value, @Nullable final String name) { if (condition) { Check.notPositive(value, name); } }
[ "@", "Throws", "(", "IllegalPositiveArgumentException", ".", "class", ")", "public", "static", "void", "notPositive", "(", "final", "boolean", "condition", ",", "final", "int", "value", ",", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "c...
Ensures that an integer reference passed as a parameter to the calling method is not greater than {@code 0}. @param condition condition must be {@code true}^ so that the check will be performed @param value a number @param name name of the number reference (in source code) @throws IllegalNullArgumentException if the ...
[ "Ensures", "that", "an", "integer", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "greater", "than", "{", "@code", "0", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L2063-L2068
alipay/sofa-rpc
extension-impl/remoting-http/src/main/java/com/alipay/sofa/rpc/transport/netty/NettyHelper.java
NettyHelper.getServerBizEventLoopGroup
public static EventLoopGroup getServerBizEventLoopGroup(ServerTransportConfig config, Executor executor) { """ 得到服务端业务线程池 @param config 服务端配置 @param executor 业务线程池 @return 服务端业务线程池 """ int bizThreads = config.getBizMaxThreads(); return config.isUseEpoll() ? new EpollEventLoop...
java
public static EventLoopGroup getServerBizEventLoopGroup(ServerTransportConfig config, Executor executor) { int bizThreads = config.getBizMaxThreads(); return config.isUseEpoll() ? new EpollEventLoopGroup(config.getBizMaxThreads(), executor) : new NioEventLoopGroup(bizThreads, exe...
[ "public", "static", "EventLoopGroup", "getServerBizEventLoopGroup", "(", "ServerTransportConfig", "config", ",", "Executor", "executor", ")", "{", "int", "bizThreads", "=", "config", ".", "getBizMaxThreads", "(", ")", ";", "return", "config", ".", "isUseEpoll", "(",...
得到服务端业务线程池 @param config 服务端配置 @param executor 业务线程池 @return 服务端业务线程池
[ "得到服务端业务线程池" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/remoting-http/src/main/java/com/alipay/sofa/rpc/transport/netty/NettyHelper.java#L231-L236
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/json/JSON.java
JSON.parseObject
public static <T> T parseObject(String text, Class<T> clazz) { """ 解析为指定对象 @param text json字符串 @param clazz 指定类 @param <T> 指定对象 @return 指定对象 """ Object obj = JSONSerializer.deserialize(text); return BeanSerializer.deserializeByType(obj, clazz); }
java
public static <T> T parseObject(String text, Class<T> clazz) { Object obj = JSONSerializer.deserialize(text); return BeanSerializer.deserializeByType(obj, clazz); }
[ "public", "static", "<", "T", ">", "T", "parseObject", "(", "String", "text", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Object", "obj", "=", "JSONSerializer", ".", "deserialize", "(", "text", ")", ";", "return", "BeanSerializer", ".", "deserialize...
解析为指定对象 @param text json字符串 @param clazz 指定类 @param <T> 指定对象 @return 指定对象
[ "解析为指定对象" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/json/JSON.java#L62-L65
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java
JsonService.getBooleanValue
public static Boolean getBooleanValue(JSONObject jsonObject, String key) throws JSONException { """ Get a boolean value from a {@link JSONObject}. @param jsonObject The object to get the key value from. @param key The name of the key to search the value for. @return Returns the value for the key in the object...
java
public static Boolean getBooleanValue(JSONObject jsonObject, String key) throws JSONException { checkArguments(jsonObject, key); JSONValue value = jsonObject.get(key); Boolean result = null; if (value != null && value.isBoolean() != null) { return ((JSONBoolean) value).booleanValue(); } return result; }
[ "public", "static", "Boolean", "getBooleanValue", "(", "JSONObject", "jsonObject", ",", "String", "key", ")", "throws", "JSONException", "{", "checkArguments", "(", "jsonObject", ",", "key", ")", ";", "JSONValue", "value", "=", "jsonObject", ".", "get", "(", "...
Get a boolean value from a {@link JSONObject}. @param jsonObject The object to get the key value from. @param key The name of the key to search the value for. @return Returns the value for the key in the object . @throws JSONException Thrown in case the key could not be found in the JSON object.
[ "Get", "a", "boolean", "value", "from", "a", "{", "@link", "JSONObject", "}", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java#L377-L385
joniles/mpxj
src/main/java/net/sf/mpxj/planner/PlannerReader.java
PlannerReader.getDateTime
private Date getDateTime(String value) throws MPXJException { """ Convert a Planner date-time value into a Java date. 20070222T080000Z @param value Planner date-time @return Java Date instance """ try { Number year = m_fourDigitFormat.parse(value.substring(0, 4)); Number mo...
java
private Date getDateTime(String value) throws MPXJException { try { Number year = m_fourDigitFormat.parse(value.substring(0, 4)); Number month = m_twoDigitFormat.parse(value.substring(4, 6)); Number day = m_twoDigitFormat.parse(value.substring(6, 8)); Number hours = m...
[ "private", "Date", "getDateTime", "(", "String", "value", ")", "throws", "MPXJException", "{", "try", "{", "Number", "year", "=", "m_fourDigitFormat", ".", "parse", "(", "value", ".", "substring", "(", "0", ",", "4", ")", ")", ";", "Number", "month", "="...
Convert a Planner date-time value into a Java date. 20070222T080000Z @param value Planner date-time @return Java Date instance
[ "Convert", "a", "Planner", "date", "-", "time", "value", "into", "a", "Java", "date", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L791-L822
libgdx/gdx-ai
gdx-ai/src/com/badlogic/gdx/ai/msg/PriorityQueue.java
PriorityQueue.siftDown
@SuppressWarnings("unchecked") private void siftDown (int k, E x) { """ Inserts item x at position k, maintaining heap invariant by demoting x down the tree repeatedly until it is less than or equal to its children or is a leaf. @param k the position to fill @param x the item to insert """ int half = s...
java
@SuppressWarnings("unchecked") private void siftDown (int k, E x) { int half = size >>> 1; // loop while a non-leaf while (k < half) { int child = (k << 1) + 1; // assume left child is least E c = (E)queue[child]; int right = child + 1; if (right < size && c.compareTo((E)queue[right]) > 0) c = (E)queue...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "siftDown", "(", "int", "k", ",", "E", "x", ")", "{", "int", "half", "=", "size", ">>>", "1", ";", "// loop while a non-leaf", "while", "(", "k", "<", "half", ")", "{", "int", "chil...
Inserts item x at position k, maintaining heap invariant by demoting x down the tree repeatedly until it is less than or equal to its children or is a leaf. @param k the position to fill @param x the item to insert
[ "Inserts", "item", "x", "at", "position", "k", "maintaining", "heap", "invariant", "by", "demoting", "x", "down", "the", "tree", "repeatedly", "until", "it", "is", "less", "than", "or", "equal", "to", "its", "children", "or", "is", "a", "leaf", "." ]
train
https://github.com/libgdx/gdx-ai/blob/2d1523a97193a45e18e11a4837c6800d08f177c5/gdx-ai/src/com/badlogic/gdx/ai/msg/PriorityQueue.java#L186-L199
icode/ameba-utils
src/main/java/ameba/util/Cookies.java
Cookies.newDeletedCookie
public static NewCookie newDeletedCookie(String name) { """ <p>newDeletedCookie.</p> @param name a {@link java.lang.String} object. @return a {@link javax.ws.rs.core.NewCookie} object. """ /** * Create a new instance. * * @param name the name of the cookie * ...
java
public static NewCookie newDeletedCookie(String name) { /** * Create a new instance. * * @param name the name of the cookie * @param value the value of the cookie * @param path the URI path for which the cookie is valid * @param domain the host ...
[ "public", "static", "NewCookie", "newDeletedCookie", "(", "String", "name", ")", "{", "/**\n * Create a new instance.\n *\n * @param name the name of the cookie\n * @param value the value of the cookie\n * @param path the URI path for which the co...
<p>newDeletedCookie.</p> @param name a {@link java.lang.String} object. @return a {@link javax.ws.rs.core.NewCookie} object.
[ "<p", ">", "newDeletedCookie", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/Cookies.java#L29-L47
Azure/azure-sdk-for-java
storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/ManagementPoliciesInner.java
ManagementPoliciesInner.getAsync
public Observable<ManagementPolicyInner> getAsync(String resourceGroupName, String accountName) { """ Gets the managementpolicy associated with the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName...
java
public Observable<ManagementPolicyInner> getAsync(String resourceGroupName, String accountName) { return getWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<ManagementPolicyInner>, ManagementPolicyInner>() { @Override public ManagementPolicyInner cal...
[ "public", "Observable", "<", "ManagementPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ")", ".", "map", "(", "new", "Fu...
Gets the managementpolicy associated with the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 ...
[ "Gets", "the", "managementpolicy", "associated", "with", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/ManagementPoliciesInner.java#L109-L116
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/html/DatePicker.java
DatePicker.setDate
public void setDate(Calendar to) { """ This is the main function of the DatePicker object to select the date specified by the input parameter. It will calculate how many time needed to click on the "next month" or "previous month" button to arrive at the correct month and year in the input parameters. It then cl...
java
public void setDate(Calendar to) { // Navigate from the current date // to the new date navigateMonth(calendar, to); // Select the day-of-month. clickDay(to.get(Calendar.DATE)); Calendar cal = calendar; cal.set(Calendar.YEAR, to.get(Calendar.YEAR)); cal....
[ "public", "void", "setDate", "(", "Calendar", "to", ")", "{", "// Navigate from the current date", "// to the new date", "navigateMonth", "(", "calendar", ",", "to", ")", ";", "// Select the day-of-month.", "clickDay", "(", "to", ".", "get", "(", "Calendar", ".", ...
This is the main function of the DatePicker object to select the date specified by the input parameter. It will calculate how many time needed to click on the "next month" or "previous month" button to arrive at the correct month and year in the input parameters. It then click on the day-of-month tablet to select the c...
[ "This", "is", "the", "main", "function", "of", "the", "DatePicker", "object", "to", "select", "the", "date", "specified", "by", "the", "input", "parameter", ".", "It", "will", "calculate", "how", "many", "time", "needed", "to", "click", "on", "the", "next"...
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L210-L222
massfords/jaxb-visitor
src/main/java/com/massfords/jaxb/ClassDiscoverer.java
ClassDiscoverer.parseXmlAnnotations
private static void parseXmlAnnotations(Outline outline, FieldOutline field, Set<String> directClasses) throws IllegalAccessException { """ Parse the annotations on the field to see if there is an XmlElements annotation on it. If so, we'll check this annotation to see if it refers to any classes that are externa...
java
private static void parseXmlAnnotations(Outline outline, FieldOutline field, Set<String> directClasses) throws IllegalAccessException { if (field instanceof UntypedListField) { JFieldVar jfv = (JFieldVar) FieldHack.listField.get(field); for(JAnnotationUse jau : jfv.annotations()) { ...
[ "private", "static", "void", "parseXmlAnnotations", "(", "Outline", "outline", ",", "FieldOutline", "field", ",", "Set", "<", "String", ">", "directClasses", ")", "throws", "IllegalAccessException", "{", "if", "(", "field", "instanceof", "UntypedListField", ")", "...
Parse the annotations on the field to see if there is an XmlElements annotation on it. If so, we'll check this annotation to see if it refers to any classes that are external from our code schema compile. If we find any, then we'll add them to our visitor. @param outline root of the generated code @param field parses t...
[ "Parse", "the", "annotations", "on", "the", "field", "to", "see", "if", "there", "is", "an", "XmlElements", "annotation", "on", "it", ".", "If", "so", "we", "ll", "check", "this", "annotation", "to", "see", "if", "it", "refers", "to", "any", "classes", ...
train
https://github.com/massfords/jaxb-visitor/blob/0d66cd4d8b6700b5eb67c028a87b53792be895b8/src/main/java/com/massfords/jaxb/ClassDiscoverer.java#L83-L96
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesValue
public static String escapePropertiesValue(final String text, final PropertiesValueEscapeLevel level) { """ <p> Perform a (configurable) Java Properties Value <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link o...
java
public static String escapePropertiesValue(final String text, final PropertiesValueEscapeLevel level) { if (level == null) { throw new IllegalArgumentException("The 'level' argument cannot be null"); } return PropertiesValueEscapeUtil.escape(text, level); }
[ "public", "static", "String", "escapePropertiesValue", "(", "final", "String", "text", ",", "final", "PropertiesValueEscapeLevel", "level", ")", "{", "if", "(", "level", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The 'level' argument...
<p> Perform a (configurable) Java Properties Value <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.properties.PropertiesValueEscapeLevel} argument value. </p> <p> All other <tt>String</tt>-based <tt>escap...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "Java", "Properties", "Value", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "This", "...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L282-L290
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/collect/FluentCloseableIterable.java
FluentCloseableIterable.firstMatch
public final Optional<T> firstMatch(Predicate<? super T> predicate) { """ Returns an {@link Optional} containing the first element in this fluent iterable that satisfies the given predicate, if such an element exists. <p><b>Warning:</b> avoid using a {@code predicate} that matches {@code null}. If {@code null}...
java
public final Optional<T> firstMatch(Predicate<? super T> predicate) { return ofNullable(Iterables.tryFind(this, predicate::test).orNull()); }
[ "public", "final", "Optional", "<", "T", ">", "firstMatch", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "return", "ofNullable", "(", "Iterables", ".", "tryFind", "(", "this", ",", "predicate", "::", "test", ")", ".", "orNull", ...
Returns an {@link Optional} containing the first element in this fluent iterable that satisfies the given predicate, if such an element exists. <p><b>Warning:</b> avoid using a {@code predicate} that matches {@code null}. If {@code null} is matched in this fluent iterable, a {@link NullPointerException} will be thrown...
[ "Returns", "an", "{", "@link", "Optional", "}", "containing", "the", "first", "element", "in", "this", "fluent", "iterable", "that", "satisfies", "the", "given", "predicate", "if", "such", "an", "element", "exists", "." ]
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/FluentCloseableIterable.java#L176-L178
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callMethod
public static Object callMethod(Object obj, Collection.Key methodName, Object[] args, Object defaultValue) { """ /* private static void checkAccesibilityx(Object obj, Key methodName) { if(methodName.equals(SET_ACCESSIBLE) && obj instanceof Member) { if(true) return; Member member=(Member) obj; Class<?> cls = me...
java
public static Object callMethod(Object obj, Collection.Key methodName, Object[] args, Object defaultValue) { if (obj == null) { return defaultValue; } // checkAccesibility(obj,methodName); MethodInstance mi = getMethodInstanceEL(obj, obj.getClass(), methodName, args); if (mi == null) return defaultValue; tr...
[ "public", "static", "Object", "callMethod", "(", "Object", "obj", ",", "Collection", ".", "Key", "methodName", ",", "Object", "[", "]", "args", ",", "Object", "defaultValue", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "defaultValue", "...
/* private static void checkAccesibilityx(Object obj, Key methodName) { if(methodName.equals(SET_ACCESSIBLE) && obj instanceof Member) { if(true) return; Member member=(Member) obj; Class<?> cls = member.getDeclaringClass(); if(cls.getPackage().getName().startsWith("lucee.")) { throw new PageRuntimeException(new Securi...
[ "/", "*", "private", "static", "void", "checkAccesibilityx", "(", "Object", "obj", "Key", "methodName", ")", "{", "if", "(", "methodName", ".", "equals", "(", "SET_ACCESSIBLE", ")", "&&", "obj", "instanceof", "Member", ")", "{", "if", "(", "true", ")", "...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L889-L904
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.putString
public void putString(String key, String value) { """ put the string value to shared preference @param key the name of the preference to save @param value the name of the preference to modify. @see android.content.SharedPreferences#edit()#putString(String, String) """ sharedPreferences.edit().putStr...
java
public void putString(String key, String value) { sharedPreferences.edit().putString(key, value).commit(); }
[ "public", "void", "putString", "(", "String", "key", ",", "String", "value", ")", "{", "sharedPreferences", ".", "edit", "(", ")", ".", "putString", "(", "key", ",", "value", ")", ".", "commit", "(", ")", ";", "}" ]
put the string value to shared preference @param key the name of the preference to save @param value the name of the preference to modify. @see android.content.SharedPreferences#edit()#putString(String, String)
[ "put", "the", "string", "value", "to", "shared", "preference" ]
train
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L431-L433
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionEventManager.java
PartitionEventManager.sendMigrationEvent
void sendMigrationEvent(final MigrationInfo migrationInfo, final MigrationEvent.MigrationStatus status) { """ Sends a {@link MigrationEvent} to the registered event listeners. """ if (migrationInfo.getSourceCurrentReplicaIndex() != 0 && migrationInfo.getDestinationNewReplicaIndex() != 0...
java
void sendMigrationEvent(final MigrationInfo migrationInfo, final MigrationEvent.MigrationStatus status) { if (migrationInfo.getSourceCurrentReplicaIndex() != 0 && migrationInfo.getDestinationNewReplicaIndex() != 0) { // only fire events for 0th replica migrations return; ...
[ "void", "sendMigrationEvent", "(", "final", "MigrationInfo", "migrationInfo", ",", "final", "MigrationEvent", ".", "MigrationStatus", "status", ")", "{", "if", "(", "migrationInfo", ".", "getSourceCurrentReplicaIndex", "(", ")", "!=", "0", "&&", "migrationInfo", "."...
Sends a {@link MigrationEvent} to the registered event listeners.
[ "Sends", "a", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionEventManager.java#L55-L69
OpenLiberty/open-liberty
dev/com.ibm.ws.cloudant/src/com/ibm/ws/cloudant/internal/CloudantService.java
CloudantService.getCloudantClient
public Object getCloudantClient(int resAuth, List<? extends ResourceInfo.Property> loginPropertyList) throws Exception { """ Return the cloudant client object used for a particular username and password @param resAuth @param loginPropertyList @return CloudantClient object @throws Exception """ Au...
java
public Object getCloudantClient(int resAuth, List<? extends ResourceInfo.Property> loginPropertyList) throws Exception { AuthData containerAuthData = null; if (resAuth == ResourceInfo.AUTH_CONTAINER) { containerAuthData = getContainerAuthData(loginPropertyList); } String use...
[ "public", "Object", "getCloudantClient", "(", "int", "resAuth", ",", "List", "<", "?", "extends", "ResourceInfo", ".", "Property", ">", "loginPropertyList", ")", "throws", "Exception", "{", "AuthData", "containerAuthData", "=", "null", ";", "if", "(", "resAuth",...
Return the cloudant client object used for a particular username and password @param resAuth @param loginPropertyList @return CloudantClient object @throws Exception
[ "Return", "the", "cloudant", "client", "object", "used", "for", "a", "particular", "username", "and", "password" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cloudant/src/com/ibm/ws/cloudant/internal/CloudantService.java#L618-L637
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotGet
public static Optional<Object> dotGet(final Map map, final String pathString) { """ Get object value by path. @param map subject @param pathString nodes to walk in map @return value """ return dotGet(map, Object.class, pathString); }
java
public static Optional<Object> dotGet(final Map map, final String pathString) { return dotGet(map, Object.class, pathString); }
[ "public", "static", "Optional", "<", "Object", ">", "dotGet", "(", "final", "Map", "map", ",", "final", "String", "pathString", ")", "{", "return", "dotGet", "(", "map", ",", "Object", ".", "class", ",", "pathString", ")", ";", "}" ]
Get object value by path. @param map subject @param pathString nodes to walk in map @return value
[ "Get", "object", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L106-L108
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/Keys.java
Keys.areCompatible
public boolean areCompatible(Keys<?> other) throws IncompatibleKeysException { """ Check if two sets of keys are compatible to each other (matching types, key counts) """ TypeInformation<?>[] thisKeyFieldTypes = this.getKeyFieldTypes(); TypeInformation<?>[] otherKeyFieldTypes = other.getKeyFieldTypes(); ...
java
public boolean areCompatible(Keys<?> other) throws IncompatibleKeysException { TypeInformation<?>[] thisKeyFieldTypes = this.getKeyFieldTypes(); TypeInformation<?>[] otherKeyFieldTypes = other.getKeyFieldTypes(); if (thisKeyFieldTypes.length != otherKeyFieldTypes.length) { throw new IncompatibleKeysException...
[ "public", "boolean", "areCompatible", "(", "Keys", "<", "?", ">", "other", ")", "throws", "IncompatibleKeysException", "{", "TypeInformation", "<", "?", ">", "[", "]", "thisKeyFieldTypes", "=", "this", ".", "getKeyFieldTypes", "(", ")", ";", "TypeInformation", ...
Check if two sets of keys are compatible to each other (matching types, key counts)
[ "Check", "if", "two", "sets", "of", "keys", "are", "compatible", "to", "each", "other", "(", "matching", "types", "key", "counts", ")" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Keys.java#L60-L75
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.sounds_POST
public OvhSound sounds_POST(String description, String filename) throws IOException { """ Create a new sound REST: POST /telephony/sounds @param description [required] Sound description @param filename [required] Sound filename """ String qPath = "/telephony/sounds"; StringBuilder sb = path(qPath); ...
java
public OvhSound sounds_POST(String description, String filename) throws IOException { String qPath = "/telephony/sounds"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "description", description); addBody(o, "filename", filename); String resp = exec(qPa...
[ "public", "OvhSound", "sounds_POST", "(", "String", "description", ",", "String", "filename", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/sounds\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "HashMap", "<", "...
Create a new sound REST: POST /telephony/sounds @param description [required] Sound description @param filename [required] Sound filename
[ "Create", "a", "new", "sound" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8778-L8786
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createStaticExtensionsScope
protected IScope createStaticExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { """ Create a scope that contains static extension features, which are features that ar...
java
protected IScope createStaticExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { return new StaticExtensionImportsScope(parent, session, firstArgument, firstArgumentType,...
[ "protected", "IScope", "createStaticExtensionsScope", "(", "EObject", "featureCall", ",", "XExpression", "firstArgument", ",", "LightweightTypeReference", "firstArgumentType", ",", "boolean", "implicitArgument", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session",...
Create a scope that contains static extension features, which are features that are contributed statically via an import. @param featureCall the feature call that is currently processed by the scoping infrastructure @param firstArgument an optionally available first argument expression. @param firstArgumentType option...
[ "Create", "a", "scope", "that", "contains", "static", "extension", "features", "which", "are", "features", "that", "are", "contributed", "statically", "via", "an", "import", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L568-L576
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/io/UrlIO.java
UrlIO.readAsMapOf
@Scope(DocScope.IO) public <T> XBAutoMap<T> readAsMapOf(final Class<T> valueType) throws IOException { """ Read complete document to a Map. @param valueType @return Closeable map bound to complete document. @throws IOException """ DefaultXPathBinder.validateEvaluationType(valueType); f...
java
@Scope(DocScope.IO) public <T> XBAutoMap<T> readAsMapOf(final Class<T> valueType) throws IOException { DefaultXPathBinder.validateEvaluationType(valueType); final Class<?> resourceAwareClass = ReflectionHelper.getDirectCallerClass(); Document document = IOHelper.getDocumentFromURL(projector....
[ "@", "Scope", "(", "DocScope", ".", "IO", ")", "public", "<", "T", ">", "XBAutoMap", "<", "T", ">", "readAsMapOf", "(", "final", "Class", "<", "T", ">", "valueType", ")", "throws", "IOException", "{", "DefaultXPathBinder", ".", "validateEvaluationType", "(...
Read complete document to a Map. @param valueType @return Closeable map bound to complete document. @throws IOException
[ "Read", "complete", "document", "to", "a", "Map", "." ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/io/UrlIO.java#L142-L149
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.registerPrimitiveClassPair
private static final void registerPrimitiveClassPair(Class<?> left, Class<?> right) { """ Just add two entries to the class compatibility map @param left @param right """ PRIMITIVE_TYPE_COMPATIBLE_CLASSES.put(left, right); PRIMITIVE_TYPE_COMPATIBLE_CLASSES.put(right, left); }
java
private static final void registerPrimitiveClassPair(Class<?> left, Class<?> right) { PRIMITIVE_TYPE_COMPATIBLE_CLASSES.put(left, right); PRIMITIVE_TYPE_COMPATIBLE_CLASSES.put(right, left); }
[ "private", "static", "final", "void", "registerPrimitiveClassPair", "(", "Class", "<", "?", ">", "left", ",", "Class", "<", "?", ">", "right", ")", "{", "PRIMITIVE_TYPE_COMPATIBLE_CLASSES", ".", "put", "(", "left", ",", "right", ")", ";", "PRIMITIVE_TYPE_COMPA...
Just add two entries to the class compatibility map @param left @param right
[ "Just", "add", "two", "entries", "to", "the", "class", "compatibility", "map" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L73-L76
phax/ph-oton
ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java
UserGroupManager.renameUserGroup
@Nonnull public EChange renameUserGroup (@Nullable final String sUserGroupID, @Nonnull @Nonempty final String sNewName) { """ Rename the user group with the specified ID @param sUserGroupID The ID of the user group. May be <code>null</code>. @param sNewName The new name of the user group. May neither be <c...
java
@Nonnull public EChange renameUserGroup (@Nullable final String sUserGroupID, @Nonnull @Nonempty final String sNewName) { // Resolve user group final UserGroup aUserGroup = getOfID (sUserGroupID); if (aUserGroup == null) { AuditHelper.onAuditModifyFailure (UserGroup.OT, sUserGroupID, "no-such-...
[ "@", "Nonnull", "public", "EChange", "renameUserGroup", "(", "@", "Nullable", "final", "String", "sUserGroupID", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sNewName", ")", "{", "// Resolve user group", "final", "UserGroup", "aUserGroup", "=", "getOf...
Rename the user group with the specified ID @param sUserGroupID The ID of the user group. May be <code>null</code>. @param sNewName The new name of the user group. May neither be <code>null</code> nor empty. @return {@link EChange#CHANGED} if the user group ID was valid, and the new name was different from the old nam...
[ "Rename", "the", "user", "group", "with", "the", "specified", "ID" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java#L329-L359
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitValue
@Override public R visitValue(ValueTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ return scan(node.getReference(), p); }
java
@Override public R visitValue(ValueTree node, P p) { return scan(node.getReference(), p); }
[ "@", "Override", "public", "R", "visitValue", "(", "ValueTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getReference", "(", ")", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L511-L514
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/doc/Documents.java
Documents.db5Sim
public static void db5Sim(File file, Class comp, CSProperties params, String title) throws FileNotFoundException { """ Document @param file the xml outputfile. @param comp the component to document @param params the model parameter @param title the title @throws FileNotFoundException """ db5Sim(...
java
public static void db5Sim(File file, Class comp, CSProperties params, String title) throws FileNotFoundException { db5Sim(file, comp, params, title, Locale.getDefault()); }
[ "public", "static", "void", "db5Sim", "(", "File", "file", ",", "Class", "comp", ",", "CSProperties", "params", ",", "String", "title", ")", "throws", "FileNotFoundException", "{", "db5Sim", "(", "file", ",", "comp", ",", "params", ",", "title", ",", "Loca...
Document @param file the xml outputfile. @param comp the component to document @param params the model parameter @param title the title @throws FileNotFoundException
[ "Document" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/doc/Documents.java#L46-L48
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.getOrderItemViaLineIdUrl
public static MozuUrl getOrderItemViaLineIdUrl(Boolean draft, Integer lineId, String orderId, String responseFields) { """ Get Resource Url for GetOrderItemViaLineId @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. @param lineI...
java
public static MozuUrl getOrderItemViaLineIdUrl(Boolean draft, Integer lineId, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{lineId}?draft={draft}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.forma...
[ "public", "static", "MozuUrl", "getOrderItemViaLineIdUrl", "(", "Boolean", "draft", ",", "Integer", "lineId", ",", "String", "orderId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{or...
Get Resource Url for GetOrderItemViaLineId @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. @param lineId The specific line id that's associated with the order item. @param orderId Unique identifier of the order. @param responseFields...
[ "Get", "Resource", "Url", "for", "GetOrderItemViaLineId" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L24-L32
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isFalse
public static void isFalse (@Nonnull final BooleanSupplier aValue, final String sMsg) { """ Check that the passed value is <code>false</code>. @param aValue The value to check. @param sMsg The message to be emitted in case the value is <code>true</code> @throws IllegalArgumentException if the passed value ...
java
public static void isFalse (@Nonnull final BooleanSupplier aValue, final String sMsg) { if (isEnabled ()) isFalse (aValue, () -> sMsg); }
[ "public", "static", "void", "isFalse", "(", "@", "Nonnull", "final", "BooleanSupplier", "aValue", ",", "final", "String", "sMsg", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "isFalse", "(", "aValue", ",", "(", ")", "->", "sMsg", ")", ";", "}" ]
Check that the passed value is <code>false</code>. @param aValue The value to check. @param sMsg The message to be emitted in case the value is <code>true</code> @throws IllegalArgumentException if the passed value is not <code>null</code>.
[ "Check", "that", "the", "passed", "value", "is", "<code", ">", "false<", "/", "code", ">", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L185-L189
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java
BaseNDArrayFactory.randn
@Override public INDArray randn(int[] shape, long seed) { """ Random normal using the specified seed @param shape the shape of the ndarray @return """ Nd4j.getRandom().setSeed(seed); return randn(shape, Nd4j.getRandom()); }
java
@Override public INDArray randn(int[] shape, long seed) { Nd4j.getRandom().setSeed(seed); return randn(shape, Nd4j.getRandom()); }
[ "@", "Override", "public", "INDArray", "randn", "(", "int", "[", "]", "shape", ",", "long", "seed", ")", "{", "Nd4j", ".", "getRandom", "(", ")", ".", "setSeed", "(", "seed", ")", ";", "return", "randn", "(", "shape", ",", "Nd4j", ".", "getRandom", ...
Random normal using the specified seed @param shape the shape of the ndarray @return
[ "Random", "normal", "using", "the", "specified", "seed" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java#L686-L690
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/TransitiveGroup.java
TransitiveGroup.checkTransitives
private void checkTransitives(Tile tile, int tx, int ty) { """ Check transitive tiles. @param tile The tile reference. @param tx The horizontal index neighbor. @param ty The vertical index neighbor. """ final Tile neighbor = map.getTile(tx, ty); final String group = mapGroup.getGroup(nei...
java
private void checkTransitives(Tile tile, int tx, int ty) { final Tile neighbor = map.getTile(tx, ty); final String group = mapGroup.getGroup(neighbor); if (neighbor != null) { for (final GroupTransition current : getTransitives(mapGroup.getGroup(tile), mapGroup.getG...
[ "private", "void", "checkTransitives", "(", "Tile", "tile", ",", "int", "tx", ",", "int", "ty", ")", "{", "final", "Tile", "neighbor", "=", "map", ".", "getTile", "(", "tx", ",", "ty", ")", ";", "final", "String", "group", "=", "mapGroup", ".", "getG...
Check transitive tiles. @param tile The tile reference. @param tx The horizontal index neighbor. @param ty The vertical index neighbor.
[ "Check", "transitive", "tiles", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/TransitiveGroup.java#L294-L309
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/MatrixOps_DDRB.java
MatrixOps_DDRB.checkIdenticalShape
public static void checkIdenticalShape(DMatrixRBlock A , DMatrixRBlock B ) { """ <p> Checks to see if the two matrices have an identical shape an block size. </p> @param A Matrix. @param B Matrix. """ if( A.blockLength != B.blockLength ) throw new IllegalArgumentException("Block size ...
java
public static void checkIdenticalShape(DMatrixRBlock A , DMatrixRBlock B ) { if( A.blockLength != B.blockLength ) throw new IllegalArgumentException("Block size is different"); if( A.numRows != B.numRows ) throw new IllegalArgumentException("Number of rows is different"); ...
[ "public", "static", "void", "checkIdenticalShape", "(", "DMatrixRBlock", "A", ",", "DMatrixRBlock", "B", ")", "{", "if", "(", "A", ".", "blockLength", "!=", "B", ".", "blockLength", ")", "throw", "new", "IllegalArgumentException", "(", "\"Block size is different\"...
<p> Checks to see if the two matrices have an identical shape an block size. </p> @param A Matrix. @param B Matrix.
[ "<p", ">", "Checks", "to", "see", "if", "the", "two", "matrices", "have", "an", "identical", "shape", "an", "block", "size", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/MatrixOps_DDRB.java#L547-L554