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
tehuti-io/tehuti
src/main/java/io/tehuti/metrics/Sensor.java
Sensor.add
public synchronized Metric add(String name, String description, MeasurableStat stat, MetricConfig config) { """ Register a metric with this sensor @param name The name of the metric @param description A description used when reporting the value @param stat The statistic to keep @param config A special configur...
java
public synchronized Metric add(String name, String description, MeasurableStat stat, MetricConfig config) { MetricConfig statConfig = (config == null ? this.config : config); TehutiMetric metric = new TehutiMetric(this, Utils.notNull(name), ...
[ "public", "synchronized", "Metric", "add", "(", "String", "name", ",", "String", "description", ",", "MeasurableStat", "stat", ",", "MetricConfig", "config", ")", "{", "MetricConfig", "statConfig", "=", "(", "config", "==", "null", "?", "this", ".", "config", ...
Register a metric with this sensor @param name The name of the metric @param description A description used when reporting the value @param stat The statistic to keep @param config A special configuration for this metric. If null use the sensor default configuration. @return a {@link Metric} instance representing the r...
[ "Register", "a", "metric", "with", "this", "sensor" ]
train
https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/Sensor.java#L204-L217
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java
MapApi.getUnsafe
public static Object getUnsafe(final Map map, final Object... path) { """ Get object value by path. @param map subject @param path nodes to walk in map @return value """ return getUnsafe(map, Object.class, path); }
java
public static Object getUnsafe(final Map map, final Object... path) { return getUnsafe(map, Object.class, path); }
[ "public", "static", "Object", "getUnsafe", "(", "final", "Map", "map", ",", "final", "Object", "...", "path", ")", "{", "return", "getUnsafe", "(", "map", ",", "Object", ".", "class", ",", "path", ")", ";", "}" ]
Get object value by path. @param map subject @param path 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/MapApi.java#L157-L159
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java
SarlDocumentationParser.reportError
protected static void reportError(ParsingContext context, String message, Object... parameter) { """ Report an error. @param context the context. @param message the message in a format compatible with {@link MessageFormat}. The first argument is the filename. The second argument is the line number. The third ...
java
protected static void reportError(ParsingContext context, String message, Object... parameter) { final File file = context.getCurrentFile(); final int offset = context.getMatcher().start() + context.getStartIndex(); final int lineno = context.getLineNo(); Throwable cause = null; for (final Object param :...
[ "protected", "static", "void", "reportError", "(", "ParsingContext", "context", ",", "String", "message", ",", "Object", "...", "parameter", ")", "{", "final", "File", "file", "=", "context", ".", "getCurrentFile", "(", ")", ";", "final", "int", "offset", "=...
Report an error. @param context the context. @param message the message in a format compatible with {@link MessageFormat}. The first argument is the filename. The second argument is the line number. The third argument is the position in the file. @param parameter additional parameter, starting at {4}.
[ "Report", "an", "error", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L965-L986
TrueNight/Utils
android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java
PermissionRequest.onRequestPermissionsResult
public static void onRequestPermissionsResult(int requestCode, String permissions[], @NonNull int[] grantResults) { """ Must bee called by Activity.onRequestPermissionsResult @param requestCode The automatically generated request code @param permissions The requested permissions @param grantResults The resu...
java
public static void onRequestPermissionsResult(int requestCode, String permissions[], @NonNull int[] grantResults) { ResponseWrapper responseWrapper = map.get(requestCode); if (responseWrapper == null) return; if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {...
[ "public", "static", "void", "onRequestPermissionsResult", "(", "int", "requestCode", ",", "String", "permissions", "[", "]", ",", "@", "NonNull", "int", "[", "]", "grantResults", ")", "{", "ResponseWrapper", "responseWrapper", "=", "map", ".", "get", "(", "req...
Must bee called by Activity.onRequestPermissionsResult @param requestCode The automatically generated request code @param permissions The requested permissions @param grantResults The result codes of the request @see Activity
[ "Must", "bee", "called", "by", "Activity", ".", "onRequestPermissionsResult" ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java#L199-L216
fabric8io/mockwebserver
src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java
CrudDispatcher.handlePatch
public MockResponse handlePatch(String path, String s) { """ Patches the specified object to the in-memory db. @param path @param s @return """ MockResponse response = new MockResponse(); String body = doGet(path); if (body == null) { response.setResponseCode(404); ...
java
public MockResponse handlePatch(String path, String s) { MockResponse response = new MockResponse(); String body = doGet(path); if (body == null) { response.setResponseCode(404); } else { try { JsonNode patch = context.getMapper().readTree(s); ...
[ "public", "MockResponse", "handlePatch", "(", "String", "path", ",", "String", "s", ")", "{", "MockResponse", "response", "=", "new", "MockResponse", "(", ")", ";", "String", "body", "=", "doGet", "(", "path", ")", ";", "if", "(", "body", "==", "null", ...
Patches the specified object to the in-memory db. @param path @param s @return
[ "Patches", "the", "specified", "object", "to", "the", "in", "-", "memory", "db", "." ]
train
https://github.com/fabric8io/mockwebserver/blob/ca14c6dd2ec8e2425585a548d5c0d993332b9d2f/src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java#L78-L100
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java
AbstractExternalAuthenticationController.getBinding
protected String getBinding(ProfileRequestContext<?, ?> context) { """ Utility method that may be used to obtain the binding that was used to pass the AuthnRequest message. @param context the profile context @return the binding URI @see #getBinding(HttpServletRequest) """ SAMLBindingContext samlBindi...
java
protected String getBinding(ProfileRequestContext<?, ?> context) { SAMLBindingContext samlBinding = this.samlBindingContextLookupStrategy.apply(context); return samlBinding != null ? samlBinding.getBindingUri() : null; }
[ "protected", "String", "getBinding", "(", "ProfileRequestContext", "<", "?", ",", "?", ">", "context", ")", "{", "SAMLBindingContext", "samlBinding", "=", "this", ".", "samlBindingContextLookupStrategy", ".", "apply", "(", "context", ")", ";", "return", "samlBindi...
Utility method that may be used to obtain the binding that was used to pass the AuthnRequest message. @param context the profile context @return the binding URI @see #getBinding(HttpServletRequest)
[ "Utility", "method", "that", "may", "be", "used", "to", "obtain", "the", "binding", "that", "was", "used", "to", "pass", "the", "AuthnRequest", "message", "." ]
train
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L617-L620
alkacon/opencms-core
src/org/opencms/ui/dataview/CmsDataViewPanel.java
CmsDataViewPanel.updateFilter
public void updateFilter(String id, String value) { """ Updates the search results after a filter is changed by the user.<p> @param id the filter id @param value the filter value """ CmsDataViewFilter oldFilter = m_filterMap.get(id); CmsDataViewFilter newFilter = oldFilter.copyWithValue(va...
java
public void updateFilter(String id, String value) { CmsDataViewFilter oldFilter = m_filterMap.get(id); CmsDataViewFilter newFilter = oldFilter.copyWithValue(value); m_filterMap.put(id, newFilter); List<CmsDataViewFilter> filters = new ArrayList<CmsDataViewFilter>(m_filterMap.values()); ...
[ "public", "void", "updateFilter", "(", "String", "id", ",", "String", "value", ")", "{", "CmsDataViewFilter", "oldFilter", "=", "m_filterMap", ".", "get", "(", "id", ")", ";", "CmsDataViewFilter", "newFilter", "=", "oldFilter", ".", "copyWithValue", "(", "valu...
Updates the search results after a filter is changed by the user.<p> @param id the filter id @param value the filter value
[ "Updates", "the", "search", "results", "after", "a", "filter", "is", "changed", "by", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dataview/CmsDataViewPanel.java#L433-L440
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.sliceByRowsAndCols
public static void sliceByRowsAndCols(File srcImageFile, File destDir, int rows, int cols) { """ 图像切割(指定切片的行数和列数) @param srcImageFile 源图像文件 @param destDir 切片目标文件夹 @param rows 目标切片行数。默认2,必须是范围 [1, 20] 之内 @param cols 目标切片列数。默认2,必须是范围 [1, 20] 之内 """ try { sliceByRowsAndCols(ImageIO.read(srcImageFile)...
java
public static void sliceByRowsAndCols(File srcImageFile, File destDir, int rows, int cols) { try { sliceByRowsAndCols(ImageIO.read(srcImageFile), destDir, rows, cols); } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "static", "void", "sliceByRowsAndCols", "(", "File", "srcImageFile", ",", "File", "destDir", ",", "int", "rows", ",", "int", "cols", ")", "{", "try", "{", "sliceByRowsAndCols", "(", "ImageIO", ".", "read", "(", "srcImageFile", ")", ",", "destDir", ...
图像切割(指定切片的行数和列数) @param srcImageFile 源图像文件 @param destDir 切片目标文件夹 @param rows 目标切片行数。默认2,必须是范围 [1, 20] 之内 @param cols 目标切片列数。默认2,必须是范围 [1, 20] 之内
[ "图像切割(指定切片的行数和列数)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L432-L438
wellner/jcarafe
jcarafe-core/src/main/java/org/mitre/jcarafe/jarafe/JarafeXValidator.java
JarafeXValidator.addTrainingInstance
public void addTrainingInstance(String label, List<String> features) { """ /* @param label - A string value that is the "gold standard" label for this training instance @param features - A list of strings that correspond to the names of the features present for this training instance """ evaluator.addJI...
java
public void addTrainingInstance(String label, List<String> features) { evaluator.addJInstance(label,features); }
[ "public", "void", "addTrainingInstance", "(", "String", "label", ",", "List", "<", "String", ">", "features", ")", "{", "evaluator", ".", "addJInstance", "(", "label", ",", "features", ")", ";", "}" ]
/* @param label - A string value that is the "gold standard" label for this training instance @param features - A list of strings that correspond to the names of the features present for this training instance
[ "/", "*" ]
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/org/mitre/jcarafe/jarafe/JarafeXValidator.java#L19-L21
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java
DifferentialFunctionFactory.localResponseNormalization
public SDVariable localResponseNormalization(SDVariable input, LocalResponseNormalizationConfig lrnConfig) { """ Local response normalization operation. @param input the inputs to lrn @param lrnConfig the configuration @return """ LocalResponseNormalization lrn = LocalResponseNormalization.bui...
java
public SDVariable localResponseNormalization(SDVariable input, LocalResponseNormalizationConfig lrnConfig) { LocalResponseNormalization lrn = LocalResponseNormalization.builder() .inputFunctions(new SDVariable[]{input}) .sameDiff(sameDiff()) .config(lrnConfig) ...
[ "public", "SDVariable", "localResponseNormalization", "(", "SDVariable", "input", ",", "LocalResponseNormalizationConfig", "lrnConfig", ")", "{", "LocalResponseNormalization", "lrn", "=", "LocalResponseNormalization", ".", "builder", "(", ")", ".", "inputFunctions", "(", ...
Local response normalization operation. @param input the inputs to lrn @param lrnConfig the configuration @return
[ "Local", "response", "normalization", "operation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java#L256-L264
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/ValidationMatcherLibraryParser.java
ValidationMatcherLibraryParser.parseMatcherDefinitions
private void parseMatcherDefinitions(BeanDefinitionBuilder builder, Element element) { """ Parses all variable definitions and adds those to the bean definition builder as property value. @param builder the target bean definition builder. @param element the source element. """ ManagedMap<String, Obj...
java
private void parseMatcherDefinitions(BeanDefinitionBuilder builder, Element element) { ManagedMap<String, Object> matchers = new ManagedMap<String, Object>(); for (Element matcher : DomUtils.getChildElementsByTagName(element, "matcher")) { if (matcher.hasAttribute("ref")) { m...
[ "private", "void", "parseMatcherDefinitions", "(", "BeanDefinitionBuilder", "builder", ",", "Element", "element", ")", "{", "ManagedMap", "<", "String", ",", "Object", ">", "matchers", "=", "new", "ManagedMap", "<", "String", ",", "Object", ">", "(", ")", ";",...
Parses all variable definitions and adds those to the bean definition builder as property value. @param builder the target bean definition builder. @param element the source element.
[ "Parses", "all", "variable", "definitions", "and", "adds", "those", "to", "the", "bean", "definition", "builder", "as", "property", "value", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/ValidationMatcherLibraryParser.java#L54-L67
apache/incubator-druid
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ByteBufferMinMaxOffsetHeap.java
ByteBufferMinMaxOffsetHeap.findMin
private int findMin(Comparator comparator, int index, int len) { """ Returns the index of minimum value between {@code index} and {@code index + len}, or {@code -1} if {@code index} is greater than {@code size}. """ if (index >= heapSize) { return -1; } int limit = Math.min(index, heapSize ...
java
private int findMin(Comparator comparator, int index, int len) { if (index >= heapSize) { return -1; } int limit = Math.min(index, heapSize - len) + len; int minIndex = index; for (int i = index + 1; i < limit; i++) { if (comparator.compare(buf.getInt(i * Integer.BYTES), buf.getInt(min...
[ "private", "int", "findMin", "(", "Comparator", "comparator", ",", "int", "index", ",", "int", "len", ")", "{", "if", "(", "index", ">=", "heapSize", ")", "{", "return", "-", "1", ";", "}", "int", "limit", "=", "Math", ".", "min", "(", "index", ","...
Returns the index of minimum value between {@code index} and {@code index + len}, or {@code -1} if {@code index} is greater than {@code size}.
[ "Returns", "the", "index", "of", "minimum", "value", "between", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ByteBufferMinMaxOffsetHeap.java#L357-L370
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.populateTask
private void populateTask(Row row, Task task) { """ Read data for an individual task. @param row task data from database @param task Task instance """ task.setUniqueID(row.getInteger("Z_PK")); task.setName(row.getString("ZTITLE")); task.setPriority(Priority.getInstance(row.getInt("ZPRIORI...
java
private void populateTask(Row row, Task task) { task.setUniqueID(row.getInteger("Z_PK")); task.setName(row.getString("ZTITLE")); task.setPriority(Priority.getInstance(row.getInt("ZPRIORITY"))); task.setMilestone(row.getBoolean("ZISMILESTONE")); task.setActualFinish(row.getTimestamp("ZGI...
[ "private", "void", "populateTask", "(", "Row", "row", ",", "Task", "task", ")", "{", "task", ".", "setUniqueID", "(", "row", ".", "getInteger", "(", "\"Z_PK\"", ")", ")", ";", "task", ".", "setName", "(", "row", ".", "getString", "(", "\"ZTITLE\"", ")"...
Read data for an individual task. @param row task data from database @param task Task instance
[ "Read", "data", "for", "an", "individual", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L437-L470
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSimpleValue
protected void bindSimpleValue(PersistentProperty property, PersistentProperty parentProperty, SimpleValue simpleValue, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { """ Binds a simple value to the Hibernate metamodel. A simple value is any ty...
java
protected void bindSimpleValue(PersistentProperty property, PersistentProperty parentProperty, SimpleValue simpleValue, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { // set type bindSimpleValue(property,parentProperty, simpleValue, p...
[ "protected", "void", "bindSimpleValue", "(", "PersistentProperty", "property", ",", "PersistentProperty", "parentProperty", ",", "SimpleValue", "simpleValue", ",", "String", "path", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", ...
Binds a simple value to the Hibernate metamodel. A simple value is any type within the Hibernate type system @param property @param parentProperty @param simpleValue The simple value to bind @param path @param mappings The Hibernate mappings instance @param sessionFactoryBeanName the session factory bean name
[ "Binds", "a", "simple", "value", "to", "the", "Hibernate", "metamodel", ".", "A", "simple", "value", "is", "any", "type", "within", "the", "Hibernate", "type", "system" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2806-L2810
jbundle/jbundle
thin/base/screen/cal/grid/src/main/java/org/jbundle/thin/base/screen/cal/grid/CalendarThinTableModel.java
CalendarThinTableModel.selectionChanged
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType) { """ User selected a new row. From the ListSelectionListener interface. """ boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType); if (bChanged) { // Notify all the...
java
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType) { boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType); if (bChanged) { // Notify all the listSelectionListeners this.fireMySelectionChanged(new MyListSelecti...
[ "public", "boolean", "selectionChanged", "(", "Object", "source", ",", "int", "iStartRow", ",", "int", "iEndRow", ",", "int", "iSelectType", ")", "{", "boolean", "bChanged", "=", "super", ".", "selectionChanged", "(", "source", ",", "iStartRow", ",", "iEndRow"...
User selected a new row. From the ListSelectionListener interface.
[ "User", "selected", "a", "new", "row", ".", "From", "the", "ListSelectionListener", "interface", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/grid/src/main/java/org/jbundle/thin/base/screen/cal/grid/CalendarThinTableModel.java#L184-L192
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_firewall_binary_link_GET
public OvhBinaryFirewallLink serviceName_firewall_binary_link_GET(String serviceName, String binaryName) throws IOException { """ Get url of binary to update firewall asa REST: GET /dedicated/server/{serviceName}/firewall/binary/link @param binaryName [required] Binary name @param serviceName [required] The i...
java
public OvhBinaryFirewallLink serviceName_firewall_binary_link_GET(String serviceName, String binaryName) throws IOException { String qPath = "/dedicated/server/{serviceName}/firewall/binary/link"; StringBuilder sb = path(qPath, serviceName); query(sb, "binaryName", binaryName); String resp = exec(qPath, "GET", ...
[ "public", "OvhBinaryFirewallLink", "serviceName_firewall_binary_link_GET", "(", "String", "serviceName", ",", "String", "binaryName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/firewall/binary/link\"", ";", "StringBuilder", "sb...
Get url of binary to update firewall asa REST: GET /dedicated/server/{serviceName}/firewall/binary/link @param binaryName [required] Binary name @param serviceName [required] The internal name of your dedicated server API beta
[ "Get", "url", "of", "binary", "to", "update", "firewall", "asa" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1905-L1911
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java
WebDriverHelper.waitForElementToContainText
public void waitForElementToContainText(final By by, final int maximumSeconds) { """ Waits for an element to contain some text. @param by the method of identifying the element @param maximumSeconds the maximum number of seconds to wait """ (new WebDriverWait(driver, maximumSeconds)) .until(new E...
java
public void waitForElementToContainText(final By by, final int maximumSeconds) { (new WebDriverWait(driver, maximumSeconds)) .until(new ExpectedCondition<Boolean>() { public Boolean apply(final WebDriver error1) { return !driver.findElement(by).getText().isEmpty(); } }); }
[ "public", "void", "waitForElementToContainText", "(", "final", "By", "by", ",", "final", "int", "maximumSeconds", ")", "{", "(", "new", "WebDriverWait", "(", "driver", ",", "maximumSeconds", ")", ")", ".", "until", "(", "new", "ExpectedCondition", "<", "Boolea...
Waits for an element to contain some text. @param by the method of identifying the element @param maximumSeconds the maximum number of seconds to wait
[ "Waits", "for", "an", "element", "to", "contain", "some", "text", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java#L511-L519
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/comparator/AbstractComparator.java
AbstractComparator.compareJSON
@Override public final JSONCompareResult compareJSON(JSONArray expected, JSONArray actual) throws JSONException { """ Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison. @param expected Expected JSONArray @param actual JSONArray to compare @throws JSONExcept...
java
@Override public final JSONCompareResult compareJSON(JSONArray expected, JSONArray actual) throws JSONException { JSONCompareResult result = new JSONCompareResult(); compareJSONArray("", expected, actual, result); return result; }
[ "@", "Override", "public", "final", "JSONCompareResult", "compareJSON", "(", "JSONArray", "expected", ",", "JSONArray", "actual", ")", "throws", "JSONException", "{", "JSONCompareResult", "result", "=", "new", "JSONCompareResult", "(", ")", ";", "compareJSONArray", ...
Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison. @param expected Expected JSONArray @param actual JSONArray to compare @throws JSONException JSON parsing error
[ "Compares", "JSONArray", "provided", "to", "the", "expected", "JSONArray", "and", "returns", "the", "results", "of", "the", "comparison", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/comparator/AbstractComparator.java#L53-L58
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.reimageAsync
public Observable<Void> reimageAsync(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, ComputeNodeReimageOptions computeNodeReimageOptions) { """ Reinstalls the operating system on the specified compute node. You can reinstall the operating system on a node only if it is in an idle or runn...
java
public Observable<Void> reimageAsync(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, ComputeNodeReimageOptions computeNodeReimageOptions) { return reimageWithServiceResponseAsync(poolId, nodeId, nodeReimageOption, computeNodeReimageOptions).map(new Func1<ServiceResponseWithHeaders<Void...
[ "public", "Observable", "<", "Void", ">", "reimageAsync", "(", "String", "poolId", ",", "String", "nodeId", ",", "ComputeNodeReimageOption", "nodeReimageOption", ",", "ComputeNodeReimageOptions", "computeNodeReimageOptions", ")", "{", "return", "reimageWithServiceResponseAs...
Reinstalls the operating system on the specified compute node. You can reinstall the operating system on a node only if it is in an idle or running state. This API can be invoked only on pools created with the cloud service configuration property. @param poolId The ID of the pool that contains the compute node. @param...
[ "Reinstalls", "the", "operating", "system", "on", "the", "specified", "compute", "node", ".", "You", "can", "reinstall", "the", "operating", "system", "on", "a", "node", "only", "if", "it", "is", "in", "an", "idle", "or", "running", "state", ".", "This", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L1411-L1418
alkacon/opencms-core
src/org/opencms/gwt/CmsGwtServiceContext.java
CmsGwtServiceContext.getSerializationPolicy
protected SerializationPolicy getSerializationPolicy(CmsObject cms, String moduleBaseURL, String strongName) { """ Returns the serialization policy for the service.<p> @param cms the current CMS context @param moduleBaseURL the module's base URL @param strongName the strong name of the service @return the ...
java
protected SerializationPolicy getSerializationPolicy(CmsObject cms, String moduleBaseURL, String strongName) { if (m_serializationPolicyPath == null) { m_serializationPolicyPath = getSerializationPolicyPath(moduleBaseURL, strongName); } return getSerializationPolicy(cms); }
[ "protected", "SerializationPolicy", "getSerializationPolicy", "(", "CmsObject", "cms", ",", "String", "moduleBaseURL", ",", "String", "strongName", ")", "{", "if", "(", "m_serializationPolicyPath", "==", "null", ")", "{", "m_serializationPolicyPath", "=", "getSerializat...
Returns the serialization policy for the service.<p> @param cms the current CMS context @param moduleBaseURL the module's base URL @param strongName the strong name of the service @return the serialization policy for the given service
[ "Returns", "the", "serialization", "policy", "for", "the", "service", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtServiceContext.java#L183-L189
google/closure-compiler
src/com/google/javascript/jscomp/InlineSimpleMethods.java
InlineSimpleMethods.inlineConstReturn
private void inlineConstReturn(Node parent, Node call, Node returnedValue) { """ Replace the provided object and its method call with the tree specified in returnedValue. Should be called only if the object reference has no side effects. """ Node retValue = returnedValue.cloneTree(); parent.replaceCh...
java
private void inlineConstReturn(Node parent, Node call, Node returnedValue) { Node retValue = returnedValue.cloneTree(); parent.replaceChild(call, retValue); compiler.reportChangeToEnclosingScope(retValue); }
[ "private", "void", "inlineConstReturn", "(", "Node", "parent", ",", "Node", "call", ",", "Node", "returnedValue", ")", "{", "Node", "retValue", "=", "returnedValue", ".", "cloneTree", "(", ")", ";", "parent", ".", "replaceChild", "(", "call", ",", "retValue"...
Replace the provided object and its method call with the tree specified in returnedValue. Should be called only if the object reference has no side effects.
[ "Replace", "the", "provided", "object", "and", "its", "method", "call", "with", "the", "tree", "specified", "in", "returnedValue", ".", "Should", "be", "called", "only", "if", "the", "object", "reference", "has", "no", "side", "effects", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/InlineSimpleMethods.java#L232-L236
MTDdk/jawn
jawn-templates-stringtemplate/src/main/java/net/javapla/jawn/templates/stringtemplate/StringTemplateTemplateEngine.java
StringTemplateTemplateEngine.renderContentTemplate
private final String renderContentTemplate(final ST contentTemplate, final Map<String, Object> values, final ErrorBuffer error, boolean inErrorState) { """ Renders template into string @return The rendered template if exists, or empty string """ if (contentTemplate != null) { // it has to be possible ...
java
private final String renderContentTemplate(final ST contentTemplate, final Map<String, Object> values, final ErrorBuffer error, boolean inErrorState) { if (contentTemplate != null) { // it has to be possible to use a layout without defining a template try (Writer sw = new StringBuilderWriter()) { ...
[ "private", "final", "String", "renderContentTemplate", "(", "final", "ST", "contentTemplate", ",", "final", "Map", "<", "String", ",", "Object", ">", "values", ",", "final", "ErrorBuffer", "error", ",", "boolean", "inErrorState", ")", "{", "if", "(", "contentT...
Renders template into string @return The rendered template if exists, or empty string
[ "Renders", "template", "into", "string" ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-templates-stringtemplate/src/main/java/net/javapla/jawn/templates/stringtemplate/StringTemplateTemplateEngine.java#L213-L238
signalapp/curve25519-java
common/src/main/java/org/whispersystems/curve25519/Curve25519.java
Curve25519.generateKeyPair
public Curve25519KeyPair generateKeyPair() { """ Generates a Curve25519 keypair. @return A randomly generated Curve25519 keypair. """ byte[] privateKey = provider.generatePrivateKey(); byte[] publicKey = provider.generatePublicKey(privateKey); return new Curve25519KeyPair(publicKey, privateKey...
java
public Curve25519KeyPair generateKeyPair() { byte[] privateKey = provider.generatePrivateKey(); byte[] publicKey = provider.generatePublicKey(privateKey); return new Curve25519KeyPair(publicKey, privateKey); }
[ "public", "Curve25519KeyPair", "generateKeyPair", "(", ")", "{", "byte", "[", "]", "privateKey", "=", "provider", ".", "generatePrivateKey", "(", ")", ";", "byte", "[", "]", "publicKey", "=", "provider", ".", "generatePublicKey", "(", "privateKey", ")", ";", ...
Generates a Curve25519 keypair. @return A randomly generated Curve25519 keypair.
[ "Generates", "a", "Curve25519", "keypair", "." ]
train
https://github.com/signalapp/curve25519-java/blob/70fae57d6dccff7e78a46203c534314b07dfdd98/common/src/main/java/org/whispersystems/curve25519/Curve25519.java#L58-L63
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.socketTextStream
@Deprecated @SuppressWarnings("deprecation") public DataStreamSource<String> socketTextStream(String hostname, int port, char delimiter) { """ Creates a new data stream that contains the strings received infinitely from a socket. Received strings are decoded by the system's default character set. The reader is ...
java
@Deprecated @SuppressWarnings("deprecation") public DataStreamSource<String> socketTextStream(String hostname, int port, char delimiter) { return socketTextStream(hostname, port, delimiter, 0); }
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "DataStreamSource", "<", "String", ">", "socketTextStream", "(", "String", "hostname", ",", "int", "port", ",", "char", "delimiter", ")", "{", "return", "socketTextStream", "(", "...
Creates a new data stream that contains the strings received infinitely from a socket. Received strings are decoded by the system's default character set. The reader is terminated immediately when the socket is down. @param hostname The host name which a server socket binds @param port The port number which a server s...
[ "Creates", "a", "new", "data", "stream", "that", "contains", "the", "strings", "received", "infinitely", "from", "a", "socket", ".", "Received", "strings", "are", "decoded", "by", "the", "system", "s", "default", "character", "set", ".", "The", "reader", "is...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1235-L1239
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateCheckpointOutputStream.java
OperatorStateCheckpointOutputStream.closeAndGetHandle
@Override OperatorStateHandle closeAndGetHandle() throws IOException { """ This method should not be public so as to not expose internals to user code. """ StreamStateHandle streamStateHandle = delegate.closeAndGetHandle(); if (null == streamStateHandle) { return null; } if (partitionOffsets.isEm...
java
@Override OperatorStateHandle closeAndGetHandle() throws IOException { StreamStateHandle streamStateHandle = delegate.closeAndGetHandle(); if (null == streamStateHandle) { return null; } if (partitionOffsets.isEmpty() && delegate.getPos() > initialPosition) { startNewPartition(); } Map<String, Ope...
[ "@", "Override", "OperatorStateHandle", "closeAndGetHandle", "(", ")", "throws", "IOException", "{", "StreamStateHandle", "streamStateHandle", "=", "delegate", ".", "closeAndGetHandle", "(", ")", ";", "if", "(", "null", "==", "streamStateHandle", ")", "{", "return",...
This method should not be public so as to not expose internals to user code.
[ "This", "method", "should", "not", "be", "public", "so", "as", "to", "not", "expose", "internals", "to", "user", "code", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateCheckpointOutputStream.java#L57-L79
kiswanij/jk-util
src/main/java/com/jk/util/JKHttpUtil.java
JKHttpUtil.downloadFileToTemp
public static File downloadFileToTemp(final String fileUrl, final String ext) throws IOException { """ Download file to temp. @param fileUrl the file url @param ext the ext @return the file @throws IOException Signals that an I/O exception has occurred. """ final File file = File.createTempFile("jk...
java
public static File downloadFileToTemp(final String fileUrl, final String ext) throws IOException { final File file = File.createTempFile("jk-", ext); JKHttpUtil.downloadFile(fileUrl, file.getAbsolutePath()); return file; }
[ "public", "static", "File", "downloadFileToTemp", "(", "final", "String", "fileUrl", ",", "final", "String", "ext", ")", "throws", "IOException", "{", "final", "File", "file", "=", "File", ".", "createTempFile", "(", "\"jk-\"", ",", "ext", ")", ";", "JKHttpU...
Download file to temp. @param fileUrl the file url @param ext the ext @return the file @throws IOException Signals that an I/O exception has occurred.
[ "Download", "file", "to", "temp", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKHttpUtil.java#L83-L87
aalmiray/Json-lib
src/main/java/net/sf/json/JSONSerializer.java
JSONSerializer.toJSON
private static JSON toJSON( String string, JsonConfig jsonConfig ) { """ Creates a JSONObject, JSONArray or a JSONNull from a JSONString. @throws JSONException if the string is not a valid JSON string """ JSON json = null; if( string.startsWith( "[" ) ){ json = JSONArray.fromObject( str...
java
private static JSON toJSON( String string, JsonConfig jsonConfig ) { JSON json = null; if( string.startsWith( "[" ) ){ json = JSONArray.fromObject( string, jsonConfig ); }else if( string.startsWith( "{" ) ){ json = JSONObject.fromObject( string, jsonConfig ); }else if( "null".e...
[ "private", "static", "JSON", "toJSON", "(", "String", "string", ",", "JsonConfig", "jsonConfig", ")", "{", "JSON", "json", "=", "null", ";", "if", "(", "string", ".", "startsWith", "(", "\"[\"", ")", ")", "{", "json", "=", "JSONArray", ".", "fromObject",...
Creates a JSONObject, JSONArray or a JSONNull from a JSONString. @throws JSONException if the string is not a valid JSON string
[ "Creates", "a", "JSONObject", "JSONArray", "or", "a", "JSONNull", "from", "a", "JSONString", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONSerializer.java#L134-L147
OpenLiberty/open-liberty
dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java
RepositoryResolver.splitRequestedNameAndVersion
private NameAndVersion splitRequestedNameAndVersion(String nameAndVersion) { """ Users can request a specific version to be installed using the format {@code myFeature/1.2.0}. <p> This method splits the string around the first slash character and returns the results. @param nameAndVersion the feature name, as...
java
private NameAndVersion splitRequestedNameAndVersion(String nameAndVersion) { String[] parts = nameAndVersion.split("/"); if (parts.length > 2) { throw new IllegalArgumentException("Only one \"/\" symbol is allowed in the resourceString but it was " + nameAndVersion); } if (p...
[ "private", "NameAndVersion", "splitRequestedNameAndVersion", "(", "String", "nameAndVersion", ")", "{", "String", "[", "]", "parts", "=", "nameAndVersion", ".", "split", "(", "\"/\"", ")", ";", "if", "(", "parts", ".", "length", ">", "2", ")", "{", "throw", ...
Users can request a specific version to be installed using the format {@code myFeature/1.2.0}. <p> This method splits the string around the first slash character and returns the results. @param nameAndVersion the feature name, as passed into {@link #resolve(Collection)} @return the split name and version. The version ...
[ "Users", "can", "request", "a", "specific", "version", "to", "be", "installed", "using", "the", "format", "{", "@code", "myFeature", "/", "1", ".", "2", ".", "0", "}", ".", "<p", ">", "This", "method", "splits", "the", "string", "around", "the", "first...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java#L383-L394
ChannelFinder/javaCFClient
src/main/java/gov/bnl/channelfinder/api/ChannelUtil.java
ChannelUtil.getTag
@Deprecated public static Tag getTag(Channel channel, String tagName) { """ Deprecated - use channel.getTag instead Return the Tag object with name <tt>tagName</tt> if it exists on the channel <tt>channel</tt> else return null @param channel - channel @param tagName - tag name @return Tag - tag object fo...
java
@Deprecated public static Tag getTag(Channel channel, String tagName) { Collection<Tag> tag = Collections2.filter(channel.getTags(), new TagNamePredicate(tagName)); if (tag.size() == 1) return tag.iterator().next(); else return null; }
[ "@", "Deprecated", "public", "static", "Tag", "getTag", "(", "Channel", "channel", ",", "String", "tagName", ")", "{", "Collection", "<", "Tag", ">", "tag", "=", "Collections2", ".", "filter", "(", "channel", ".", "getTags", "(", ")", ",", "new", "TagNam...
Deprecated - use channel.getTag instead Return the Tag object with name <tt>tagName</tt> if it exists on the channel <tt>channel</tt> else return null @param channel - channel @param tagName - tag name @return Tag - tag object found on channel
[ "Deprecated", "-", "use", "channel", ".", "getTag", "instead" ]
train
https://github.com/ChannelFinder/javaCFClient/blob/000fce53ad2b8f8c38ef24fec5b5ec65e383ac9d/src/main/java/gov/bnl/channelfinder/api/ChannelUtil.java#L86-L94
knowm/XChange
xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java
OkCoinTradeServiceRaw.getOrder
public OkCoinOrderResult getOrder(String symbol, Integer type, String orderIds) throws IOException { """ 批量获取用户订单 @param symbol @param type 查询类型 0:未完成的订单 1:已经完成的订单 @param orderIds @return """ OkCoinOrderResult orderResult = okCoin.getOrders(apikey, type, orderIds, symbol, signatureCrea...
java
public OkCoinOrderResult getOrder(String symbol, Integer type, String orderIds) throws IOException { OkCoinOrderResult orderResult = okCoin.getOrders(apikey, type, orderIds, symbol, signatureCreator()); return returnOrThrow(orderResult); }
[ "public", "OkCoinOrderResult", "getOrder", "(", "String", "symbol", ",", "Integer", "type", ",", "String", "orderIds", ")", "throws", "IOException", "{", "OkCoinOrderResult", "orderResult", "=", "okCoin", ".", "getOrders", "(", "apikey", ",", "type", ",", "order...
批量获取用户订单 @param symbol @param type 查询类型 0:未完成的订单 1:已经完成的订单 @param orderIds @return
[ "批量获取用户订单" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java#L145-L151
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/utils/BtcFormat.java
BtcFormat.getInstance
public static BtcFormat getInstance(int scale, int minDecimals, int... groups) { """ Return a new fixed-denomination formatter with the specified fractional decimal placing. The first argument specifies the denomination as the size of the shift from coin-denomination in increasingly-precise decimal places. The...
java
public static BtcFormat getInstance(int scale, int minDecimals, int... groups) { return getInstance(scale, defaultLocale(), minDecimals, boxAsList(groups)); }
[ "public", "static", "BtcFormat", "getInstance", "(", "int", "scale", ",", "int", "minDecimals", ",", "int", "...", "groups", ")", "{", "return", "getInstance", "(", "scale", ",", "defaultLocale", "(", ")", ",", "minDecimals", ",", "boxAsList", "(", "groups",...
Return a new fixed-denomination formatter with the specified fractional decimal placing. The first argument specifies the denomination as the size of the shift from coin-denomination in increasingly-precise decimal places. The returned object will format and parse values according to the default locale, and will form...
[ "Return", "a", "new", "fixed", "-", "denomination", "formatter", "with", "the", "specified", "fractional", "decimal", "placing", ".", "The", "first", "argument", "specifies", "the", "denomination", "as", "the", "size", "of", "the", "shift", "from", "coin", "-"...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/utils/BtcFormat.java#L1062-L1064
zk1931/jzab
src/main/java/com/github/zk1931/jzab/FileUtils.java
FileUtils.atomicMove
public static void atomicMove(File source, File dest) throws IOException { """ Atomically move one file to another file. @param source the source file. @param dest the destination file. @throws IOException if an I/O error occurs. """ Files.move(source.toPath(), dest.toPath(), ATOMIC_MOVE, REPLACE_EXIS...
java
public static void atomicMove(File source, File dest) throws IOException { Files.move(source.toPath(), dest.toPath(), ATOMIC_MOVE, REPLACE_EXISTING); }
[ "public", "static", "void", "atomicMove", "(", "File", "source", ",", "File", "dest", ")", "throws", "IOException", "{", "Files", ".", "move", "(", "source", ".", "toPath", "(", ")", ",", "dest", ".", "toPath", "(", ")", ",", "ATOMIC_MOVE", ",", "REPLA...
Atomically move one file to another file. @param source the source file. @param dest the destination file. @throws IOException if an I/O error occurs.
[ "Atomically", "move", "one", "file", "to", "another", "file", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/FileUtils.java#L141-L143
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java
BatchLinkableResource.getEObject
@Override public EObject getEObject(String uriFragment) { """ {@inheritDoc} Delegates to the {@link BatchLinkingService} if the requested reference is {@link BatchLinkingService#isBatchLinkable(EReference) linkeable in batch mode}. Implementation detail: This specialization of {@link #getEObject(String) ge...
java
@Override public EObject getEObject(String uriFragment) { synchronized (getLock()) { try { if (getEncoder().isCrossLinkFragment(this, uriFragment) && !isLoadedFromStorage()) { if (!getUnresolvableURIFragments().contains(uriFragment)) { Triple<EObject, EReference, INode> triple = getEncoder().decode...
[ "@", "Override", "public", "EObject", "getEObject", "(", "String", "uriFragment", ")", "{", "synchronized", "(", "getLock", "(", ")", ")", "{", "try", "{", "if", "(", "getEncoder", "(", ")", ".", "isCrossLinkFragment", "(", "this", ",", "uriFragment", ")",...
{@inheritDoc} Delegates to the {@link BatchLinkingService} if the requested reference is {@link BatchLinkingService#isBatchLinkable(EReference) linkeable in batch mode}. Implementation detail: This specialization of {@link #getEObject(String) getEObject} synchronizes on the {@link #getLock() lock} which is exposed by...
[ "{", "@inheritDoc", "}" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java#L107-L134
windup/windup
utils/src/main/java/org/jboss/windup/util/PathUtil.java
PathUtil.isInSubDirectory
public static boolean isInSubDirectory(File dir, File file) { """ Returns true if "file" is a subfile or subdirectory of "dir". For example with the directory /path/to/a, the following return values would occur: /path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false "...
java
public static boolean isInSubDirectory(File dir, File file) { if (file == null) return false; if (file.equals(dir)) return true; return isInSubDirectory(dir, file.getParentFile()); }
[ "public", "static", "boolean", "isInSubDirectory", "(", "File", "dir", ",", "File", "file", ")", "{", "if", "(", "file", "==", "null", ")", "return", "false", ";", "if", "(", "file", ".", "equals", "(", "dir", ")", ")", "return", "true", ";", "return...
Returns true if "file" is a subfile or subdirectory of "dir". For example with the directory /path/to/a, the following return values would occur: /path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false
[ "Returns", "true", "if", "file", "is", "a", "subfile", "or", "subdirectory", "of", "dir", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/PathUtil.java#L241-L250
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getCharacter
public Character getCharacter(String nameSpace, String cellName) { """ Returns the {@code Character} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellNam...
java
public Character getCharacter(String nameSpace, String cellName) { return getValue(nameSpace, cellName, Character.class); }
[ "public", "Character", "getCharacter", "(", "String", "nameSpace", ",", "String", "cellName", ")", "{", "return", "getValue", "(", "nameSpace", ",", "cellName", ",", "Character", ".", "class", ")", ";", "}" ]
Returns the {@code Character} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the name of the Cell we want to retrieve from this Cells object. @return the ...
[ "Returns", "the", "{", "@code", "Character", "}", "value", "of", "the", "{", "@link", "Cell", "}", "(", "associated", "to", "{", "@code", "table", "}", ")", "whose", "name", "iscellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", ...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L787-L789
jparsec/jparsec
jparsec/src/main/java/org/jparsec/pattern/Patterns.java
Patterns.stringCaseInsensitive
public static Pattern stringCaseInsensitive(final String string) { """ Returns a {@link Pattern} object that matches {@code string} case insensitively. """ return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { return matchStringCaseInsensitive(string, src, ...
java
public static Pattern stringCaseInsensitive(final String string) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { return matchStringCaseInsensitive(string, src, begin, end); } @Override public String toString() { return string.toUpperCase(...
[ "public", "static", "Pattern", "stringCaseInsensitive", "(", "final", "String", "string", ")", "{", "return", "new", "Pattern", "(", ")", "{", "@", "Override", "public", "int", "match", "(", "CharSequence", "src", ",", "int", "begin", ",", "int", "end", ")...
Returns a {@link Pattern} object that matches {@code string} case insensitively.
[ "Returns", "a", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/pattern/Patterns.java#L226-L235
Sciss/abc4j
abc/src/main/java/abc/ui/swing/ScoreTemplate.java
ScoreTemplate.setAttribute
public void setAttribute(ScoreAttribute sa, Object value) { """ Sets the object associated to an attribute @param value <TT>null</TT> to remove this attribute """ if (value == null) m_attributes.remove(sa.getName()); else m_attributes.put(sa.getName(), value); notifyListeners(); }
java
public void setAttribute(ScoreAttribute sa, Object value) { if (value == null) m_attributes.remove(sa.getName()); else m_attributes.put(sa.getName(), value); notifyListeners(); }
[ "public", "void", "setAttribute", "(", "ScoreAttribute", "sa", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "m_attributes", ".", "remove", "(", "sa", ".", "getName", "(", ")", ")", ";", "else", "m_attributes", ".", "put", "(...
Sets the object associated to an attribute @param value <TT>null</TT> to remove this attribute
[ "Sets", "the", "object", "associated", "to", "an", "attribute" ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreTemplate.java#L716-L722
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java
ConcurrentSparqlGraphStoreManager.setupModelSpecification
private void setupModelSpecification(Map<String, String> locationMappings, Set<String> ignoredImports) { """ Setup a the OntModelSpec to be used when parsing services. In particular, setup import redirections, etc. @param locationMappings @param ignoredImports @return """ OntDocumentManager docu...
java
private void setupModelSpecification(Map<String, String> locationMappings, Set<String> ignoredImports) { OntDocumentManager documentManager = new OntDocumentManager(); // Add mapping specific to OWLS TC 4 tests. // Add mappings to local files to save time and avoid connection issues fo...
[ "private", "void", "setupModelSpecification", "(", "Map", "<", "String", ",", "String", ">", "locationMappings", ",", "Set", "<", "String", ">", "ignoredImports", ")", "{", "OntDocumentManager", "documentManager", "=", "new", "OntDocumentManager", "(", ")", ";", ...
Setup a the OntModelSpec to be used when parsing services. In particular, setup import redirections, etc. @param locationMappings @param ignoredImports @return
[ "Setup", "a", "the", "OntModelSpec", "to", "be", "used", "when", "parsing", "services", ".", "In", "particular", "setup", "import", "redirections", "etc", "." ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ConcurrentSparqlGraphStoreManager.java#L166-L191
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/table/Relation.java
Relation.getUnformatted
public String getUnformatted(int r, int c) { """ Returns a string representation of the value at the given row and column indexes @param r the row index, 0 based @param c the column index, 0 based """ Column<?> column = column(c); return column.getUnformattedString(r); }
java
public String getUnformatted(int r, int c) { Column<?> column = column(c); return column.getUnformattedString(r); }
[ "public", "String", "getUnformatted", "(", "int", "r", ",", "int", "c", ")", "{", "Column", "<", "?", ">", "column", "=", "column", "(", "c", ")", ";", "return", "column", ".", "getUnformattedString", "(", "r", ")", ";", "}" ]
Returns a string representation of the value at the given row and column indexes @param r the row index, 0 based @param c the column index, 0 based
[ "Returns", "a", "string", "representation", "of", "the", "value", "at", "the", "given", "row", "and", "column", "indexes" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/table/Relation.java#L504-L507
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/cdn/CdnClient.java
CdnClient.deleteDomain
public DeleteDomainResponse deleteDomain(DeleteDomainRequest request) { """ Delete an existing domain acceleration @param request The request containing user-defined domain information. @return Result of the deleteDomain operation returned by the service. """ checkNotNull(request, "The parameter re...
java
public DeleteDomainResponse deleteDomain(DeleteDomainRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(request, HttpMethodName.DELETE, DOMAIN, request.getDomain()); return invokeHttpClient(internalRequest, Delet...
[ "public", "DeleteDomainResponse", "deleteDomain", "(", "DeleteDomainRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "request", ","...
Delete an existing domain acceleration @param request The request containing user-defined domain information. @return Result of the deleteDomain operation returned by the service.
[ "Delete", "an", "existing", "domain", "acceleration" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/cdn/CdnClient.java#L248-L252
RestComm/jss7
m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UAManagementImpl.java
M3UAManagementImpl.createAspFactory
public AspFactory createAspFactory(String aspName, String associationName) throws Exception { """ Create new {@link AspFactoryImpl} without passing optional aspid and heartbeat is false @param aspName @param associationName @return @throws Exception """ return this.createAspFactory(aspName, assoc...
java
public AspFactory createAspFactory(String aspName, String associationName) throws Exception { return this.createAspFactory(aspName, associationName, false); }
[ "public", "AspFactory", "createAspFactory", "(", "String", "aspName", ",", "String", "associationName", ")", "throws", "Exception", "{", "return", "this", ".", "createAspFactory", "(", "aspName", ",", "associationName", ",", "false", ")", ";", "}" ]
Create new {@link AspFactoryImpl} without passing optional aspid and heartbeat is false @param aspName @param associationName @return @throws Exception
[ "Create", "new", "{", "@link", "AspFactoryImpl", "}", "without", "passing", "optional", "aspid", "and", "heartbeat", "is", "false" ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UAManagementImpl.java#L521-L523
randomsync/robotframework-mqttlibrary-java
src/main/java/net/randomsync/robotframework/mqtt/MQTTLibrary.java
MQTTLibrary.publishToMQTTSynchronously
@RobotKeywordOverload @ArgumentNames( { """ Publish a message to a topic @param topic topic to which the message will be published @param message message payload to publish @throws MqttException if there is an issue publishing to the broker """ "topic", "message" }) public void publishToMQTTSyn...
java
@RobotKeywordOverload @ArgumentNames({ "topic", "message" }) public void publishToMQTTSynchronously(String topic, Object message) throws MqttException { publishToMQTTSynchronously(topic, message, 0, false); }
[ "@", "RobotKeywordOverload", "@", "ArgumentNames", "(", "{", "\"topic\"", ",", "\"message\"", "}", ")", "public", "void", "publishToMQTTSynchronously", "(", "String", "topic", ",", "Object", "message", ")", "throws", "MqttException", "{", "publishToMQTTSynchronously",...
Publish a message to a topic @param topic topic to which the message will be published @param message message payload to publish @throws MqttException if there is an issue publishing to the broker
[ "Publish", "a", "message", "to", "a", "topic" ]
train
https://github.com/randomsync/robotframework-mqttlibrary-java/blob/b10e346ea159d86e60a73062297c4a0d57149c89/src/main/java/net/randomsync/robotframework/mqtt/MQTTLibrary.java#L75-L80
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java
ByteUtils.memcmp
public static boolean memcmp( byte[] a, int a_offset, byte[] b, int b_offset, int length ) { """ Compare the contents of one array of <code>bytes</code> to another. @param a the first array @param a_offset the start offset in <code>a</code> @param b the second array @param b_offset the start offset in <code>...
java
public static boolean memcmp( byte[] a, int a_offset, byte[] b, int b_offset, int length ) { if ((a == null) && (b == null)) { return true; } if ((a == null) || (b == null)) { return false; } for( int i = 0; i < length; ++i, ++a_offset, ++b_offset ) ...
[ "public", "static", "boolean", "memcmp", "(", "byte", "[", "]", "a", ",", "int", "a_offset", ",", "byte", "[", "]", "b", ",", "int", "b_offset", ",", "int", "length", ")", "{", "if", "(", "(", "a", "==", "null", ")", "&&", "(", "b", "==", "null...
Compare the contents of one array of <code>bytes</code> to another. @param a the first array @param a_offset the start offset in <code>a</code> @param b the second array @param b_offset the start offset in <code>b</code> @param length the number of <code>byte</code>s to compare. @return DOCUMENT ME!
[ "Compare", "the", "contents", "of", "one", "array", "of", "<code", ">", "bytes<", "/", "code", ">", "to", "another", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java#L510-L525
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java
CmsHtmlImportDialog.getLocales
private List getLocales() { """ Returns a list with all available local's.<p> @return a list with all available local's """ ArrayList ret = new ArrayList(); try { Iterator i = OpenCms.getLocaleManager().getAvailableLocales().iterator(); // loop through all local's ...
java
private List getLocales() { ArrayList ret = new ArrayList(); try { Iterator i = OpenCms.getLocaleManager().getAvailableLocales().iterator(); // loop through all local's and build the entries while (i.hasNext()) { Locale locale = (Locale)i.next(); ...
[ "private", "List", "getLocales", "(", ")", "{", "ArrayList", "ret", "=", "new", "ArrayList", "(", ")", ";", "try", "{", "Iterator", "i", "=", "OpenCms", ".", "getLocaleManager", "(", ")", ".", "getAvailableLocales", "(", ")", ".", "iterator", "(", ")", ...
Returns a list with all available local's.<p> @return a list with all available local's
[ "Returns", "a", "list", "with", "all", "available", "local", "s", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java#L510-L529
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/geospatial/GeoDistance.java
GeoDistance.create
@JsonCreator public static GeoDistance create(String json) { """ Returns the {@link GeoDistance} represented by the specified JSON {@code String}. @param json A {@code String} containing a JSON encoded {@link GeoDistance}. @return The {@link GeoDistance} represented by the specified JSON {@code String}. ...
java
@JsonCreator public static GeoDistance create(String json) { try { for (GeoDistanceUnit geoDistanceUnit : GeoDistanceUnit.values()) { for (String name : geoDistanceUnit.getNames()) { if (json.endsWith(name)) { double value = Double.pars...
[ "@", "JsonCreator", "public", "static", "GeoDistance", "create", "(", "String", "json", ")", "{", "try", "{", "for", "(", "GeoDistanceUnit", "geoDistanceUnit", ":", "GeoDistanceUnit", ".", "values", "(", ")", ")", "{", "for", "(", "String", "name", ":", "g...
Returns the {@link GeoDistance} represented by the specified JSON {@code String}. @param json A {@code String} containing a JSON encoded {@link GeoDistance}. @return The {@link GeoDistance} represented by the specified JSON {@code String}.
[ "Returns", "the", "{", "@link", "GeoDistance", "}", "represented", "by", "the", "specified", "JSON", "{", "@code", "String", "}", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/geospatial/GeoDistance.java#L59-L76
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Searcher.java
Searcher.searchFor
public <T extends TextView> T searchFor(final Class<T> viewClass, final String regex, int expectedMinimumNumberOfMatches, final long timeout, final boolean scroll, final boolean onlyVisible) { """ Searches for a {@code View} with the given regex string and returns {@code true} if the searched {@code View} is foun...
java
public <T extends TextView> T searchFor(final Class<T> viewClass, final String regex, int expectedMinimumNumberOfMatches, final long timeout, final boolean scroll, final boolean onlyVisible) { if(expectedMinimumNumberOfMatches < 1) { expectedMinimumNumberOfMatches = 1; } final Callable<Collection<T>> viewFetc...
[ "public", "<", "T", "extends", "TextView", ">", "T", "searchFor", "(", "final", "Class", "<", "T", ">", "viewClass", ",", "final", "String", "regex", ",", "int", "expectedMinimumNumberOfMatches", ",", "final", "long", "timeout", ",", "final", "boolean", "scr...
Searches for a {@code View} with the given regex string and returns {@code true} if the searched {@code View} is found a given number of times. @param viewClass what kind of {@code View} to search for, e.g. {@code Button.class} or {@code TextView.class} @param regex the text to search for. The parameter <strong>will</...
[ "Searches", "for", "a", "{", "@code", "View", "}", "with", "the", "given", "regex", "string", "and", "returns", "{", "@code", "true", "}", "if", "the", "searched", "{", "@code", "View", "}", "is", "found", "a", "given", "number", "of", "times", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Searcher.java#L102-L130
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java
WarUtils.addListener
public static void addListener(Document doc, Element root) { """ Adds a shiro environment listener to load the shiro config file. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the listener to. """ Element listener = doc.createElement("listene...
java
public static void addListener(Document doc, Element root) { Element listener = doc.createElement("listener"); Element listenerClass = doc.createElement("listener-class"); listener.appendChild(listenerClass); listenerClass.appendChild(doc .createTextNode("org.apache.shiro.web.env.EnvironmentLoad...
[ "public", "static", "void", "addListener", "(", "Document", "doc", ",", "Element", "root", ")", "{", "Element", "listener", "=", "doc", ".", "createElement", "(", "\"listener\"", ")", ";", "Element", "listenerClass", "=", "doc", ".", "createElement", "(", "\...
Adds a shiro environment listener to load the shiro config file. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the listener to.
[ "Adds", "a", "shiro", "environment", "listener", "to", "load", "the", "shiro", "config", "file", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java#L261-L269
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getDoubleProperty
public double getDoubleProperty(final String name, final double defaultValue) { """ Gets the named property as a double. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the parsed double value of the property or {@code defaultVa...
java
public double getDoubleProperty(final String name, final double defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Double.parseDouble(prop); } catch (final Exception ignored) { return defaultValue; ...
[ "public", "double", "getDoubleProperty", "(", "final", "String", "name", ",", "final", "double", "defaultValue", ")", "{", "final", "String", "prop", "=", "getStringProperty", "(", "name", ")", ";", "if", "(", "prop", "!=", "null", ")", "{", "try", "{", ...
Gets the named property as a double. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the parsed double value of the property or {@code defaultValue} if it was undefined or could not be parsed.
[ "Gets", "the", "named", "property", "as", "a", "double", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L186-L196
indeedeng/util
io/src/main/java/com/indeed/util/io/Files.java
Files.readObjectFromFile
public static <T> T readObjectFromFile(String file, Class<T> clazz) { """ Convenience for {@link #readObjectFromFile(String file, Class clazz, boolean printException)} where: <ul> <li>{@code printException} is false</li> </ul> """ return readObjectFromFile(file, clazz, false); }
java
public static <T> T readObjectFromFile(String file, Class<T> clazz) { return readObjectFromFile(file, clazz, false); }
[ "public", "static", "<", "T", ">", "T", "readObjectFromFile", "(", "String", "file", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "readObjectFromFile", "(", "file", ",", "clazz", ",", "false", ")", ";", "}" ]
Convenience for {@link #readObjectFromFile(String file, Class clazz, boolean printException)} where: <ul> <li>{@code printException} is false</li> </ul>
[ "Convenience", "for", "{" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L521-L523
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.removeMember
public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { """ Removes user from project team. <pre><code>DELETE /projects/:id/members/:user_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, r...
java
public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId);...
[ "public", "void", "removeMember", "(", "Object", "projectIdOrPath", ",", "Integer", "userId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", "."...
Removes user from project team. <pre><code>DELETE /projects/:id/members/:user_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param userId the user ID of the member to remove @throws GitLabApiException if any exception occu...
[ "Removes", "user", "from", "project", "team", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1398-L1401
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java
RouteTablesInner.createOrUpdate
public RouteTableInner createOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { """ Create or updates a route table in a specified resource group. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param parameters ...
java
public RouteTableInner createOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().last().body(); }
[ "public", "RouteTableInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ",", "RouteTableInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeTableName", ",", "par...
Create or updates a route table in a specified resource group. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param parameters Parameters supplied to the create or update route table operation. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Create", "or", "updates", "a", "route", "table", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L444-L446
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/utils/JNDITools.java
JNDITools.getContext
public static Context getContext( String jdniInitialContextFactoryName , String providerURL , Hashtable<String,Object> extraEnv ) throws NamingException { """ Create a JNDI context for the current provider @param jdniInitialContextFactoryName @param providerURL @param extraEnv @return a JNDI context @throws N...
java
public static Context getContext( String jdniInitialContextFactoryName , String providerURL , Hashtable<String,Object> extraEnv ) throws NamingException { Hashtable<String,Object> env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY, jdniInitialContextFactoryName); env.put(Context.P...
[ "public", "static", "Context", "getContext", "(", "String", "jdniInitialContextFactoryName", ",", "String", "providerURL", ",", "Hashtable", "<", "String", ",", "Object", ">", "extraEnv", ")", "throws", "NamingException", "{", "Hashtable", "<", "String", ",", "Obj...
Create a JNDI context for the current provider @param jdniInitialContextFactoryName @param providerURL @param extraEnv @return a JNDI context @throws NamingException
[ "Create", "a", "JNDI", "context", "for", "the", "current", "provider" ]
train
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/utils/JNDITools.java#L52-L60
aws/aws-sdk-java
aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/EncryptRequest.java
EncryptRequest.withEncryptionContext
public EncryptRequest withEncryptionContext(java.util.Map<String, String> encryptionContext) { """ <p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more inf...
java
public EncryptRequest withEncryptionContext(java.util.Map<String, String> encryptionContext) { setEncryptionContext(encryptionContext); return this; }
[ "public", "EncryptRequest", "withEncryptionContext", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "encryptionContext", ")", "{", "setEncryptionContext", "(", "encryptionContext", ")", ";", "return", "this", ";", "}" ]
<p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encry...
[ "<p", ">", "Name", "-", "value", "pair", "that", "specifies", "the", "encryption", "context", "to", "be", "used", "for", "authenticated", "encryption", ".", "If", "used", "here", "the", "same", "value", "must", "be", "supplied", "to", "the", "<code", ">", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/EncryptRequest.java#L453-L456
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addCalendarDay
private void addCalendarDay(MpxjTreeNode parentNode, ProjectCalendar calendar, final Day day) { """ Add a calendar day node. @param parentNode parent node @param calendar ProjectCalendar instance @param day calendar day """ MpxjTreeNode dayNode = new MpxjTreeNode(day) { @Override publ...
java
private void addCalendarDay(MpxjTreeNode parentNode, ProjectCalendar calendar, final Day day) { MpxjTreeNode dayNode = new MpxjTreeNode(day) { @Override public String toString() { return day.name(); } }; parentNode.add(dayNode); addHours(dayNode, c...
[ "private", "void", "addCalendarDay", "(", "MpxjTreeNode", "parentNode", ",", "ProjectCalendar", "calendar", ",", "final", "Day", "day", ")", "{", "MpxjTreeNode", "dayNode", "=", "new", "MpxjTreeNode", "(", "day", ")", "{", "@", "Override", "public", "String", ...
Add a calendar day node. @param parentNode parent node @param calendar ProjectCalendar instance @param day calendar day
[ "Add", "a", "calendar", "day", "node", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L292-L303
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java
TrifocalLinearPoint7.process
public boolean process( List<AssociatedTriple> observations , TrifocalTensor solution ) { """ Estimates the trifocal tensor given the set of observations @param observations Set of observations @param solution Output: Where the solution is written to @return true if successful and false if it fails """ ...
java
public boolean process( List<AssociatedTriple> observations , TrifocalTensor solution ) { if( observations.size() < 7 ) throw new IllegalArgumentException( "At least 7 correspondences must be provided. Found "+observations.size()); // compute normalization to reduce numerical errors LowLevelMultiViewOps...
[ "public", "boolean", "process", "(", "List", "<", "AssociatedTriple", ">", "observations", ",", "TrifocalTensor", "solution", ")", "{", "if", "(", "observations", ".", "size", "(", ")", "<", "7", ")", "throw", "new", "IllegalArgumentException", "(", "\"At leas...
Estimates the trifocal tensor given the set of observations @param observations Set of observations @param solution Output: Where the solution is written to @return true if successful and false if it fails
[ "Estimates", "the", "trifocal", "tensor", "given", "the", "set", "of", "observations" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L97-L122
aerogear/aerogear-unifiedpush-server
push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java
AbstractJMSMessageProducer.sendTransacted
protected void sendTransacted(Destination destination, Serializable message) { """ Sends message to the destination in transactional manner. @param destination where to send @param message what to send Since transacted session is used, the message won't be committed until whole enclosing transaction ends ...
java
protected void sendTransacted(Destination destination, Serializable message) { send(destination, message, null, null, true); }
[ "protected", "void", "sendTransacted", "(", "Destination", "destination", ",", "Serializable", "message", ")", "{", "send", "(", "destination", ",", "message", ",", "null", ",", "null", ",", "true", ")", ";", "}" ]
Sends message to the destination in transactional manner. @param destination where to send @param message what to send Since transacted session is used, the message won't be committed until whole enclosing transaction ends
[ "Sends", "message", "to", "the", "destination", "in", "transactional", "manner", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java#L66-L68
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java
LollipopDrawablesCompat.createFromXml
public static Drawable createFromXml(Resources r, XmlPullParser parser, Resources.Theme theme) throws XmlPullParserException, IOException { """ Create a drawable from an XML document using an optional {@link Resources.Theme}. For more information on how to create resources in XML, see <a href="{@docRoot}guide/to...
java
public static Drawable createFromXml(Resources r, XmlPullParser parser, Resources.Theme theme) throws XmlPullParserException, IOException { AttributeSet attrs = Xml.asAttributeSet(parser); int type; while ((type = parser.next()) != XmlPullParser.START_TAG && type != XmlPullParser.END_DOCUMENT) ...
[ "public", "static", "Drawable", "createFromXml", "(", "Resources", "r", ",", "XmlPullParser", "parser", ",", "Resources", ".", "Theme", "theme", ")", "throws", "XmlPullParserException", ",", "IOException", "{", "AttributeSet", "attrs", "=", "Xml", ".", "asAttribut...
Create a drawable from an XML document using an optional {@link Resources.Theme}. For more information on how to create resources in XML, see <a href="{@docRoot}guide/topics/resources/drawable-resource.html">Drawable Resources</a>.
[ "Create", "a", "drawable", "from", "an", "XML", "document", "using", "an", "optional", "{" ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java#L108-L127
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
ConfigClient.createSink
public final LogSink createSink(String parent, LogSink sink) { """ Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only ...
java
public final LogSink createSink(String parent, LogSink sink) { CreateSinkRequest request = CreateSinkRequest.newBuilder().setParent(parent).setSink(sink).build(); return createSink(request); }
[ "public", "final", "LogSink", "createSink", "(", "String", "parent", ",", "LogSink", "sink", ")", "{", "CreateSinkRequest", "request", "=", "CreateSinkRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "setSink", "(", "sink", "...
Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. <p>Sample code: <pre><code> try (Conf...
[ "Creates", "a", "sink", "that", "exports", "specified", "log", "entries", "to", "a", "destination", ".", "The", "export", "of", "newly", "-", "ingested", "log", "entries", "begins", "immediately", "unless", "the", "sink", "s", "writer_identity", "is", "not", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java#L466-L471
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricMonitor.java
RocksDBNativeMetricMonitor.registerColumnFamily
void registerColumnFamily(String columnFamilyName, ColumnFamilyHandle handle) { """ Register gauges to pull native metrics for the column family. @param columnFamilyName group name for the new gauges @param handle native handle to the column family """ MetricGroup group = metricGroup.addGroup(columnFamilyN...
java
void registerColumnFamily(String columnFamilyName, ColumnFamilyHandle handle) { MetricGroup group = metricGroup.addGroup(columnFamilyName); for (String property : options.getProperties()) { RocksDBNativeMetricView gauge = new RocksDBNativeMetricView(handle, property); group.gauge(property, gauge); } }
[ "void", "registerColumnFamily", "(", "String", "columnFamilyName", ",", "ColumnFamilyHandle", "handle", ")", "{", "MetricGroup", "group", "=", "metricGroup", ".", "addGroup", "(", "columnFamilyName", ")", ";", "for", "(", "String", "property", ":", "options", ".",...
Register gauges to pull native metrics for the column family. @param columnFamilyName group name for the new gauges @param handle native handle to the column family
[ "Register", "gauges", "to", "pull", "native", "metrics", "for", "the", "column", "family", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricMonitor.java#L73-L80
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiComment.java
BoxApiComment.getAddCommentReplyRequest
public BoxRequestsComment.AddReplyComment getAddCommentReplyRequest(String commentId, String message) { """ Gets a request that adds a reply comment to a comment @param commentId id of the comment to reply to @param message message for the comment that will be added @return request to add a reply commen...
java
public BoxRequestsComment.AddReplyComment getAddCommentReplyRequest(String commentId, String message) { BoxRequestsComment.AddReplyComment request = new BoxRequestsComment.AddReplyComment(commentId, message, getCommentsUrl(), mSession); return request; }
[ "public", "BoxRequestsComment", ".", "AddReplyComment", "getAddCommentReplyRequest", "(", "String", "commentId", ",", "String", "message", ")", "{", "BoxRequestsComment", ".", "AddReplyComment", "request", "=", "new", "BoxRequestsComment", ".", "AddReplyComment", "(", "...
Gets a request that adds a reply comment to a comment @param commentId id of the comment to reply to @param message message for the comment that will be added @return request to add a reply comment to a comment
[ "Gets", "a", "request", "that", "adds", "a", "reply", "comment", "to", "a", "comment" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiComment.java#L44-L47
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/ContainerStateMonitor.java
ContainerStateMonitor.awaitStabilityUninterruptibly
void awaitStabilityUninterruptibly(long timeout, TimeUnit timeUnit) throws TimeoutException { """ Await service container stability ignoring thread interruption. @param timeout maximum period to wait for service container stability @param timeUnit unit in which {@code timeout} is expressed @throws java.util...
java
void awaitStabilityUninterruptibly(long timeout, TimeUnit timeUnit) throws TimeoutException { boolean interrupted = false; try { long toWait = timeUnit.toMillis(timeout); long msTimeout = System.currentTimeMillis() + toWait; while (true) { if (interrup...
[ "void", "awaitStabilityUninterruptibly", "(", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "throws", "TimeoutException", "{", "boolean", "interrupted", "=", "false", ";", "try", "{", "long", "toWait", "=", "timeUnit", ".", "toMillis", "(", "timeout", ")"...
Await service container stability ignoring thread interruption. @param timeout maximum period to wait for service container stability @param timeUnit unit in which {@code timeout} is expressed @throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout
[ "Await", "service", "container", "stability", "ignoring", "thread", "interruption", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/ContainerStateMonitor.java#L89-L112
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/NodeSequence.java
NodeSequence.batchOf
public static Batch batchOf( final Iterator<CachedNode> nodes, final long nodeCount, final float score, final String workspaceName ) { """ Create a batch of nodes around the supplied iterator. Note that the supplied ...
java
public static Batch batchOf( final Iterator<CachedNode> nodes, final long nodeCount, final float score, final String workspaceName ) { assert nodeCount >= -1; if (nodes == null) return emptyBatch(workspace...
[ "public", "static", "Batch", "batchOf", "(", "final", "Iterator", "<", "CachedNode", ">", "nodes", ",", "final", "long", "nodeCount", ",", "final", "float", "score", ",", "final", "String", "workspaceName", ")", "{", "assert", "nodeCount", ">=", "-", "1", ...
Create a batch of nodes around the supplied iterator. Note that the supplied iterator is accessed lazily only when the batch is {@link Batch#nextRow() used}. @param nodes the iterator over the nodes to be returned; if null, an {@link #emptySequence empty instance} is returned @param nodeCount the number of nodes in th...
[ "Create", "a", "batch", "of", "nodes", "around", "the", "supplied", "iterator", ".", "Note", "that", "the", "supplied", "iterator", "is", "accessed", "lazily", "only", "when", "the", "batch", "is", "{", "@link", "Batch#nextRow", "()", "used", "}", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/NodeSequence.java#L1330-L1396
RestComm/Restcomm-Connect
restcomm/restcomm.interpreter/src/main/java/org/restcomm/connect/interpreter/VoiceInterpreter.java
VoiceInterpreter.playWaitUrl
protected void playWaitUrl(final List<URI> waitUrls, final ActorRef source) { """ Because of RMS issue https://github.com/RestComm/mediaserver/issues/158 we cannot have List<URI> for waitUrl """ conference.tell(new Play(waitUrls, Short.MAX_VALUE, confModeratorPresent), source); }
java
protected void playWaitUrl(final List<URI> waitUrls, final ActorRef source) { conference.tell(new Play(waitUrls, Short.MAX_VALUE, confModeratorPresent), source); }
[ "protected", "void", "playWaitUrl", "(", "final", "List", "<", "URI", ">", "waitUrls", ",", "final", "ActorRef", "source", ")", "{", "conference", ".", "tell", "(", "new", "Play", "(", "waitUrls", ",", "Short", ".", "MAX_VALUE", ",", "confModeratorPresent", ...
Because of RMS issue https://github.com/RestComm/mediaserver/issues/158 we cannot have List<URI> for waitUrl
[ "Because", "of", "RMS", "issue", "https", ":", "//", "github", ".", "com", "/", "RestComm", "/", "mediaserver", "/", "issues", "/", "158", "we", "cannot", "have", "List<URI", ">", "for", "waitUrl" ]
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.interpreter/src/main/java/org/restcomm/connect/interpreter/VoiceInterpreter.java#L3251-L3253
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java
AbstractConversionTable.addTypeConversion
protected void addTypeConversion(String javaType, String targetType, boolean updateSelection) { """ Add a type conversion. @param javaType the name of the java type. @param targetType the name of the target type. @param updateSelection indicates if the selection should be updated. """ final ConversionMa...
java
protected void addTypeConversion(String javaType, String targetType, boolean updateSelection) { final ConversionMapping entry = new ConversionMapping(javaType, targetType); this.conversions.add(entry); //refresh from model refreshListUI(); if (updateSelection) { this.list.setSelection(new StructuredSelecti...
[ "protected", "void", "addTypeConversion", "(", "String", "javaType", ",", "String", "targetType", ",", "boolean", "updateSelection", ")", "{", "final", "ConversionMapping", "entry", "=", "new", "ConversionMapping", "(", "javaType", ",", "targetType", ")", ";", "th...
Add a type conversion. @param javaType the name of the java type. @param targetType the name of the target type. @param updateSelection indicates if the selection should be updated.
[ "Add", "a", "type", "conversion", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L442-L456
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getImagePerformances
public List<ImagePerformance> getImagePerformances(UUID projectId, UUID iterationId, GetImagePerformancesOptionalParameter getImagePerformancesOptionalParameter) { """ Get image with its prediction for a given project iteration. This API supports batching and range selection. By default it will only return first ...
java
public List<ImagePerformance> getImagePerformances(UUID projectId, UUID iterationId, GetImagePerformancesOptionalParameter getImagePerformancesOptionalParameter) { return getImagePerformancesWithServiceResponseAsync(projectId, iterationId, getImagePerformancesOptionalParameter).toBlocking().single().body(); ...
[ "public", "List", "<", "ImagePerformance", ">", "getImagePerformances", "(", "UUID", "projectId", ",", "UUID", "iterationId", ",", "GetImagePerformancesOptionalParameter", "getImagePerformancesOptionalParameter", ")", "{", "return", "getImagePerformancesWithServiceResponseAsync",...
Get image with its prediction for a given project iteration. This API supports batching and range selection. By default it will only return first 50 images matching images. Use the {take} and {skip} parameters to control how many images to return in a given batch. The filtering is on an and/or relationship. For example...
[ "Get", "image", "with", "its", "prediction", "for", "a", "given", "project", "iteration", ".", "This", "API", "supports", "batching", "and", "range", "selection", ".", "By", "default", "it", "will", "only", "return", "first", "50", "images", "matching", "ima...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L1403-L1405
aws/aws-sdk-java
aws-java-sdk-mediatailor/src/main/java/com/amazonaws/services/mediatailor/model/PutPlaybackConfigurationRequest.java
PutPlaybackConfigurationRequest.withTags
public PutPlaybackConfigurationRequest withTags(java.util.Map<String, String> tags) { """ <p> The tags to assign to the playback configuration. </p> @param tags The tags to assign to the playback configuration. @return Returns a reference to this object so that method calls can be chained together. """ ...
java
public PutPlaybackConfigurationRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "PutPlaybackConfigurationRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags to assign to the playback configuration. </p> @param tags The tags to assign to the playback configuration. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "to", "assign", "to", "the", "playback", "configuration", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediatailor/src/main/java/com/amazonaws/services/mediatailor/model/PutPlaybackConfigurationRequest.java#L366-L369
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.getPasswordlessAuthenticationAccount
public static <T> T getPasswordlessAuthenticationAccount(final Event event, final Class<T> clazz) { """ Gets passwordless authentication account. @param <T> the type parameter @param event the event @param clazz the clazz @return the passwordless authentication account """ return event.getAttri...
java
public static <T> T getPasswordlessAuthenticationAccount(final Event event, final Class<T> clazz) { return event.getAttributes().get("passwordlessAccount", clazz); }
[ "public", "static", "<", "T", ">", "T", "getPasswordlessAuthenticationAccount", "(", "final", "Event", "event", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "return", "event", ".", "getAttributes", "(", ")", ".", "get", "(", "\"passwordlessAccoun...
Gets passwordless authentication account. @param <T> the type parameter @param event the event @param clazz the clazz @return the passwordless authentication account
[ "Gets", "passwordless", "authentication", "account", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L849-L851
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseClient.java
HBaseClient.getBatchSize
private int getBatchSize(String persistenceUnit, Map<String, Object> puProperties) { """ Gets the batch size. @param persistenceUnit the persistence unit @param puProperties the pu properties @return the batch size """ String batch_size = puProperties != null ? (String) puProperties.get(Persiste...
java
private int getBatchSize(String persistenceUnit, Map<String, Object> puProperties) { String batch_size = puProperties != null ? (String) puProperties.get(PersistenceProperties.KUNDERA_BATCH_SIZE) : null; return batch_size != null ? Integer.valueOf(batch_size) : KunderaMetadataManager...
[ "private", "int", "getBatchSize", "(", "String", "persistenceUnit", ",", "Map", "<", "String", ",", "Object", ">", "puProperties", ")", "{", "String", "batch_size", "=", "puProperties", "!=", "null", "?", "(", "String", ")", "puProperties", ".", "get", "(", ...
Gets the batch size. @param persistenceUnit the persistence unit @param puProperties the pu properties @return the batch size
[ "Gets", "the", "batch", "size", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseClient.java#L655-L661
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.associateResourceAdapter
@SuppressWarnings("unchecked") protected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter, Object object) throws DeployException { """ Associate resource adapter with the object if it implements ResourceAdapterAssociation @param resourceAdapter The resource adapter @param...
java
@SuppressWarnings("unchecked") protected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter, Object object) throws DeployException { if (resourceAdapter != null && object != null && object instanceof ResourceAdapterAssociation) { try { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "associateResourceAdapter", "(", "javax", ".", "resource", ".", "spi", ".", "ResourceAdapter", "resourceAdapter", ",", "Object", "object", ")", "throws", "DeployException", "{", "if", "(", "r...
Associate resource adapter with the object if it implements ResourceAdapterAssociation @param resourceAdapter The resource adapter @param object The possible association object @throws DeployException Thrown if the resource adapter cant be associated
[ "Associate", "resource", "adapter", "with", "the", "object", "if", "it", "implements", "ResourceAdapterAssociation" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L899-L915
tntim96/JSCover
src/main/java/jscover/util/IoUtils.java
IoUtils.isSubDirectory
public boolean isSubDirectory(File file1, File file2) { """ /* public Reader getReader(String source) { ByteArrayInputStream bais = new ByteArrayInputStream(source.getBytes(charSet)); BufferedReader reader = new BufferedReader(new InputStreamReader(bais, charSet)); return reader; } """ try { ...
java
public boolean isSubDirectory(File file1, File file2) { try { return (file1.getCanonicalPath()+File.separator).startsWith(file2.getCanonicalPath()+File.separator); } catch (IOException e) { e.printStackTrace(); return false; } }
[ "public", "boolean", "isSubDirectory", "(", "File", "file1", ",", "File", "file2", ")", "{", "try", "{", "return", "(", "file1", ".", "getCanonicalPath", "(", ")", "+", "File", ".", "separator", ")", ".", "startsWith", "(", "file2", ".", "getCanonicalPath"...
/* public Reader getReader(String source) { ByteArrayInputStream bais = new ByteArrayInputStream(source.getBytes(charSet)); BufferedReader reader = new BufferedReader(new InputStreamReader(bais, charSet)); return reader; }
[ "/", "*", "public", "Reader", "getReader", "(", "String", "source", ")", "{", "ByteArrayInputStream", "bais", "=", "new", "ByteArrayInputStream", "(", "source", ".", "getBytes", "(", "charSet", "))", ";", "BufferedReader", "reader", "=", "new", "BufferedReader",...
train
https://github.com/tntim96/JSCover/blob/87808b3aa38726b369496331d28ec4111dc5143e/src/main/java/jscover/util/IoUtils.java#L622-L629
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.getterFactory
public JdbcMapperFactory getterFactory(final GetterFactory<ResultSet, JdbcColumnKey> getterFactory) { """ Override the default implementation of the GetterFactory used to get access to value from the ResultSet. @param getterFactory the getterFactory @return the current factory """ return addGetterFactory(n...
java
public JdbcMapperFactory getterFactory(final GetterFactory<ResultSet, JdbcColumnKey> getterFactory) { return addGetterFactory(new ContextualGetterFactoryAdapter<ResultSet, JdbcColumnKey>(getterFactory)); }
[ "public", "JdbcMapperFactory", "getterFactory", "(", "final", "GetterFactory", "<", "ResultSet", ",", "JdbcColumnKey", ">", "getterFactory", ")", "{", "return", "addGetterFactory", "(", "new", "ContextualGetterFactoryAdapter", "<", "ResultSet", ",", "JdbcColumnKey", ">"...
Override the default implementation of the GetterFactory used to get access to value from the ResultSet. @param getterFactory the getterFactory @return the current factory
[ "Override", "the", "default", "implementation", "of", "the", "GetterFactory", "used", "to", "get", "access", "to", "value", "from", "the", "ResultSet", "." ]
train
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L91-L93
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/TopologyAssign.java
TopologyAssign.sortSlots
public static List<WorkerSlot> sortSlots(Set<WorkerSlot> allSlots, int needSlotNum) { """ sort slots, the purpose is to ensure that the tasks are assigned in balancing @return List<WorkerSlot> """ Map<String, List<WorkerSlot>> nodeMap = new HashMap<>(); // group by first for (Worker...
java
public static List<WorkerSlot> sortSlots(Set<WorkerSlot> allSlots, int needSlotNum) { Map<String, List<WorkerSlot>> nodeMap = new HashMap<>(); // group by first for (WorkerSlot np : allSlots) { String node = np.getNodeId(); List<WorkerSlot> list = nodeMap.get(node); ...
[ "public", "static", "List", "<", "WorkerSlot", ">", "sortSlots", "(", "Set", "<", "WorkerSlot", ">", "allSlots", ",", "int", "needSlotNum", ")", "{", "Map", "<", "String", ",", "List", "<", "WorkerSlot", ">", ">", "nodeMap", "=", "new", "HashMap", "<>", ...
sort slots, the purpose is to ensure that the tasks are assigned in balancing @return List<WorkerSlot>
[ "sort", "slots", "the", "purpose", "is", "to", "ensure", "that", "the", "tasks", "are", "assigned", "in", "balancing" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/TopologyAssign.java#L648-L697
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/PIDStoreStartHandler.java
PIDStoreStartHandler.onNext
@Override public synchronized void onNext(final RuntimeStart startTime) { """ This call is idempotent: It will only write the PID exactly once per instance. @param startTime """ if (this.isPidNotWritten()) { final long pid = OSUtils.getPID(); final File outfile = new File(PID_FILE_NAME); ...
java
@Override public synchronized void onNext(final RuntimeStart startTime) { if (this.isPidNotWritten()) { final long pid = OSUtils.getPID(); final File outfile = new File(PID_FILE_NAME); LOG.log(Level.FINEST, "Storing pid `" + pid + "` in file " + outfile.getAbsolutePath()); try (final Print...
[ "@", "Override", "public", "synchronized", "void", "onNext", "(", "final", "RuntimeStart", "startTime", ")", "{", "if", "(", "this", ".", "isPidNotWritten", "(", ")", ")", "{", "final", "long", "pid", "=", "OSUtils", ".", "getPID", "(", ")", ";", "final"...
This call is idempotent: It will only write the PID exactly once per instance. @param startTime
[ "This", "call", "is", "idempotent", ":", "It", "will", "only", "write", "the", "PID", "exactly", "once", "per", "instance", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/PIDStoreStartHandler.java#L59-L75
stefanbirkner/fishbowl
src/main/java/com/github/stefanbirkner/fishbowl/Fishbowl.java
Fishbowl.exceptionThrownBy
public static <T extends Throwable> T exceptionThrownBy( Statement statement, Class<T> type) { """ Executes the provided statement and returns the exception that has been thrown by the statement if it has the specified type. This is useful for writing tests for exceptions according to the AAA (Arrange-A...
java
public static <T extends Throwable> T exceptionThrownBy( Statement statement, Class<T> type) { try { statement.evaluate(); } catch (Throwable e) { if (type.isAssignableFrom(e.getClass())) return (T) e; else throw new ExceptionWi...
[ "public", "static", "<", "T", "extends", "Throwable", ">", "T", "exceptionThrownBy", "(", "Statement", "statement", ",", "Class", "<", "T", ">", "type", ")", "{", "try", "{", "statement", ".", "evaluate", "(", ")", ";", "}", "catch", "(", "Throwable", ...
Executes the provided statement and returns the exception that has been thrown by the statement if it has the specified type. This is useful for writing tests for exceptions according to the AAA (Arrange-Act-Assert) pattern in case that you need to check properties of the exception. <p>Example: <pre> FooException excep...
[ "Executes", "the", "provided", "statement", "and", "returns", "the", "exception", "that", "has", "been", "thrown", "by", "the", "statement", "if", "it", "has", "the", "specified", "type", ".", "This", "is", "useful", "for", "writing", "tests", "for", "except...
train
https://github.com/stefanbirkner/fishbowl/blob/0ef001f1fc38822ffbe74679ee3001504eb5f23c/src/main/java/com/github/stefanbirkner/fishbowl/Fishbowl.java#L134-L145
GoogleCloudPlatform/bigdata-interop
bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/output/IndirectBigQueryOutputCommitter.java
IndirectBigQueryOutputCommitter.abortJob
@Override public void abortJob(JobContext context, State state) throws IOException { """ Performs a cleanup of the output path in addition to delegating the call to the wrapped OutputCommitter. """ super.abortJob(context, state); cleanup(context); }
java
@Override public void abortJob(JobContext context, State state) throws IOException { super.abortJob(context, state); cleanup(context); }
[ "@", "Override", "public", "void", "abortJob", "(", "JobContext", "context", ",", "State", "state", ")", "throws", "IOException", "{", "super", ".", "abortJob", "(", "context", ",", "state", ")", ";", "cleanup", "(", "context", ")", ";", "}" ]
Performs a cleanup of the output path in addition to delegating the call to the wrapped OutputCommitter.
[ "Performs", "a", "cleanup", "of", "the", "output", "path", "in", "addition", "to", "delegating", "the", "call", "to", "the", "wrapped", "OutputCommitter", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/output/IndirectBigQueryOutputCommitter.java#L91-L95
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/service/AspectranShellService.java
AspectranShellService.create
public static AspectranShellService create(AspectranConfig aspectranConfig, Console console) { """ Returns a new instance of {@code AspectranShellService}. @param aspectranConfig the aspectran configuration @param console the {@code Console} instance @return the instance of {@code AspectranShellService} "...
java
public static AspectranShellService create(AspectranConfig aspectranConfig, Console console) { ContextConfig contextConfig = aspectranConfig.touchContextConfig(); String rootFile = contextConfig.getRootFile(); if (!StringUtils.hasText(rootFile) && !contextConfig.hasAspectranParameters()) { ...
[ "public", "static", "AspectranShellService", "create", "(", "AspectranConfig", "aspectranConfig", ",", "Console", "console", ")", "{", "ContextConfig", "contextConfig", "=", "aspectranConfig", ".", "touchContextConfig", "(", ")", ";", "String", "rootFile", "=", "conte...
Returns a new instance of {@code AspectranShellService}. @param aspectranConfig the aspectran configuration @param console the {@code Console} instance @return the instance of {@code AspectranShellService}
[ "Returns", "a", "new", "instance", "of", "{", "@code", "AspectranShellService", "}", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/service/AspectranShellService.java#L159-L174
triceo/splitlog
splitlog-api/src/main/java/com/github/triceo/splitlog/api/LogWatchBuilder.java
LogWatchBuilder.withDelayBetweenSweeps
public LogWatchBuilder withDelayBetweenSweeps(final int length, final TimeUnit unit) { """ Specify the delay between attempts to sweep the log watch from unreachable messages. @param length Length of time. @param unit Unit of that length. @return This. """ this.delayBetweenSweeps = LogWatchBuil...
java
public LogWatchBuilder withDelayBetweenSweeps(final int length, final TimeUnit unit) { this.delayBetweenSweeps = LogWatchBuilder.getDelay(length, unit); return this; }
[ "public", "LogWatchBuilder", "withDelayBetweenSweeps", "(", "final", "int", "length", ",", "final", "TimeUnit", "unit", ")", "{", "this", ".", "delayBetweenSweeps", "=", "LogWatchBuilder", ".", "getDelay", "(", "length", ",", "unit", ")", ";", "return", "this", ...
Specify the delay between attempts to sweep the log watch from unreachable messages. @param length Length of time. @param unit Unit of that length. @return This.
[ "Specify", "the", "delay", "between", "attempts", "to", "sweep", "the", "log", "watch", "from", "unreachable", "messages", "." ]
train
https://github.com/triceo/splitlog/blob/4e1b188e8c814119f5cf7343bbc53917843d68a2/splitlog-api/src/main/java/com/github/triceo/splitlog/api/LogWatchBuilder.java#L329-L332
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.writeWordVectors
@Deprecated public static void writeWordVectors(@NonNull ParagraphVectors vectors, @NonNull File path) { """ This method saves paragraph vectors to the given file. @param vectors @param path """ try (FileOutputStream fos = new FileOutputStream(path)) { writeWordVectors(vectors, fos)...
java
@Deprecated public static void writeWordVectors(@NonNull ParagraphVectors vectors, @NonNull File path) { try (FileOutputStream fos = new FileOutputStream(path)) { writeWordVectors(vectors, fos); } catch (Exception e) { throw new RuntimeException(e); } }
[ "@", "Deprecated", "public", "static", "void", "writeWordVectors", "(", "@", "NonNull", "ParagraphVectors", "vectors", ",", "@", "NonNull", "File", "path", ")", "{", "try", "(", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "path", ")", ")", ...
This method saves paragraph vectors to the given file. @param vectors @param path
[ "This", "method", "saves", "paragraph", "vectors", "to", "the", "given", "file", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L376-L383
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.similarDeleteBySign
public JSONObject similarDeleteBySign(String contSign, HashMap<String, String> options) { """ 相似图检索—删除接口 **删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image,最多支持1000个cont_sign** @param contSign - 图片签名 @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject """ AipRequest re...
java
public JSONObject similarDeleteBySign(String contSign, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("cont_sign", contSign); if (options != null) { request.addBody(options); } request....
[ "public", "JSONObject", "similarDeleteBySign", "(", "String", "contSign", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "req...
相似图检索—删除接口 **删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image,最多支持1000个cont_sign** @param contSign - 图片签名 @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject
[ "相似图检索—删除接口", "**", "删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image,最多支持1000个cont_sign", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L671-L682
baratine/baratine
web/src/main/java/com/caucho/v5/util/CaseInsensitiveIntMap.java
CaseInsensitiveIntMap.get
public int get(char []key, int length) { """ Puts a new value in the property table with the appropriate flags """ if (key == null) return NULL; int hash = hash(key, length) & _mask; while (true) { char []mapKey = _keys[hash]; if (mapKey == null) return NULL; else...
java
public int get(char []key, int length) { if (key == null) return NULL; int hash = hash(key, length) & _mask; while (true) { char []mapKey = _keys[hash]; if (mapKey == null) return NULL; else if (equals(mapKey, key, length)) return _values[hash]; hash = (ha...
[ "public", "int", "get", "(", "char", "[", "]", "key", ",", "int", "length", ")", "{", "if", "(", "key", "==", "null", ")", "return", "NULL", ";", "int", "hash", "=", "hash", "(", "key", ",", "length", ")", "&", "_mask", ";", "while", "(", "true...
Puts a new value in the property table with the appropriate flags
[ "Puts", "a", "new", "value", "in", "the", "property", "table", "with", "the", "appropriate", "flags" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/util/CaseInsensitiveIntMap.java#L85-L102
payneteasy/superfly
superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java
CommonsHttpInvokerRequestExecutor.getResponseBody
protected InputStream getResponseBody(HttpInvokerClientConfiguration config, PostMethod postMethod) throws IOException { """ Extract the response body from the given executed remote invocation request. <p>The default implementation simply fetches the PostMethod's response body stream. If the response...
java
protected InputStream getResponseBody(HttpInvokerClientConfiguration config, PostMethod postMethod) throws IOException { if (isGzipResponse(postMethod)) { return new GZIPInputStream(postMethod.getResponseBodyAsStream()); } else { return postMethod.getResponse...
[ "protected", "InputStream", "getResponseBody", "(", "HttpInvokerClientConfiguration", "config", ",", "PostMethod", "postMethod", ")", "throws", "IOException", "{", "if", "(", "isGzipResponse", "(", "postMethod", ")", ")", "{", "return", "new", "GZIPInputStream", "(", ...
Extract the response body from the given executed remote invocation request. <p>The default implementation simply fetches the PostMethod's response body stream. If the response is recognized as GZIP response, the InputStream will get wrapped in a GZIPInputStream. @param config the HTTP invoker configuration that specif...
[ "Extract", "the", "response", "body", "from", "the", "given", "executed", "remote", "invocation", "request", ".", "<p", ">", "The", "default", "implementation", "simply", "fetches", "the", "PostMethod", "s", "response", "body", "stream", ".", "If", "the", "res...
train
https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java#L229-L238
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java
KunderaQuery.setParameterValue
private void setParameterValue(String name, Object value) { """ Sets parameter value into filterClause, depending upon {@link Type}. @param name parameter name. @param value parameter value. """ if (typedParameter != null) { List<FilterClause> clauses = typedParameter....
java
private void setParameterValue(String name, Object value) { if (typedParameter != null) { List<FilterClause> clauses = typedParameter.getParameters() != null ? typedParameter.getParameters().get(name) : null; if (clauses != null) { for (FilterClause clause...
[ "private", "void", "setParameterValue", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "typedParameter", "!=", "null", ")", "{", "List", "<", "FilterClause", ">", "clauses", "=", "typedParameter", ".", "getParameters", "(", ")", "!=", ...
Sets parameter value into filterClause, depending upon {@link Type}. @param name parameter name. @param value parameter value.
[ "Sets", "parameter", "value", "into", "filterClause", "depending", "upon", "{", "@link", "Type", "}", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java#L857-L877
liferay/com-liferay-commerce
commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java
CPDefinitionGroupedEntryPersistenceImpl.findByCPDefinitionId
@Override public List<CPDefinitionGroupedEntry> findByCPDefinitionId( long CPDefinitionId, int start, int end) { """ Returns a range of all the cp definition grouped entries where CPDefinitionId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start...
java
@Override public List<CPDefinitionGroupedEntry> findByCPDefinitionId( long CPDefinitionId, int start, int end) { return findByCPDefinitionId(CPDefinitionId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionGroupedEntry", ">", "findByCPDefinitionId", "(", "long", "CPDefinitionId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCPDefinitionId", "(", "CPDefinitionId", ",", "start", ",", "end", "...
Returns a range of all the cp definition grouped entries where CPDefinitionId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first ...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definition", "grouped", "entries", "where", "CPDefinitionId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java#L1549-L1553
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/GenericSorting.java
GenericSorting.quickSort
public static void quickSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { """ Sorts the specified range of elements according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(a, ...
java
public static void quickSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { quickSort1(fromIndex, toIndex-fromIndex, c, swapper); }
[ "public", "static", "void", "quickSort", "(", "int", "fromIndex", ",", "int", "toIndex", ",", "IntComparator", "c", ",", "Swapper", "swapper", ")", "{", "quickSort1", "(", "fromIndex", ",", "toIndex", "-", "fromIndex", ",", "c", ",", "swapper", ")", ";", ...
Sorts the specified range of elements according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(a, b)</tt> must not throw an exception for any indexes <tt>a</tt> and <tt>b</tt> in the range).<p> The sort...
[ "Sorts", "the", "specified", "range", "of", "elements", "according", "to", "the", "order", "induced", "by", "the", "specified", "comparator", ".", "All", "elements", "in", "the", "range", "must", "be", "<i", ">", "mutually", "comparable<", "/", "i", ">", "...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/GenericSorting.java#L324-L326
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Put.java
Put.withItem
public Put withItem(java.util.Map<String, AttributeValue> item) { """ <p> A map of attribute name to attribute values, representing the primary key of the item to be written by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's...
java
public Put withItem(java.util.Map<String, AttributeValue> item) { setItem(item); return this; }
[ "public", "Put", "withItem", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "item", ")", "{", "setItem", "(", "item", ")", ";", "return", "this", ";", "}" ]
<p> A map of attribute name to attribute values, representing the primary key of the item to be written by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an ind...
[ "<p", ">", "A", "map", "of", "attribute", "name", "to", "attribute", "values", "representing", "the", "primary", "key", "of", "the", "item", "to", "be", "written", "by", "<code", ">", "PutItem<", "/", "code", ">", ".", "All", "of", "the", "table", "s",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Put.java#L124-L127
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.newObjectInputStream
public static ObjectInputStream newObjectInputStream(Path self, final ClassLoader classLoader) throws IOException { """ Create an object input stream for this path using the given class loader. @param self a {@code Path} object @param classLoader the class loader to use when loading the class @return a...
java
public static ObjectInputStream newObjectInputStream(Path self, final ClassLoader classLoader) throws IOException { return IOGroovyMethods.newObjectInputStream(Files.newInputStream(self), classLoader); }
[ "public", "static", "ObjectInputStream", "newObjectInputStream", "(", "Path", "self", ",", "final", "ClassLoader", "classLoader", ")", "throws", "IOException", "{", "return", "IOGroovyMethods", ".", "newObjectInputStream", "(", "Files", ".", "newInputStream", "(", "se...
Create an object input stream for this path using the given class loader. @param self a {@code Path} object @param classLoader the class loader to use when loading the class @return an object input stream @throws java.io.IOException if an IOException occurs. @since 2.3.0
[ "Create", "an", "object", "input", "stream", "for", "this", "path", "using", "the", "given", "class", "loader", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L146-L148
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/compiler/JBBPCompiler.java
JBBPCompiler.writePackedInt
private static int writePackedInt(final OutputStream out, final int value) throws IOException { """ Write an integer value in packed form into an output stream. @param out the output stream to be used to write the value into @param value the value to be written into the output stream @return the length of p...
java
private static int writePackedInt(final OutputStream out, final int value) throws IOException { final byte[] packedInt = JBBPUtils.packInt(value); out.write(packedInt); return packedInt.length; }
[ "private", "static", "int", "writePackedInt", "(", "final", "OutputStream", "out", ",", "final", "int", "value", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "packedInt", "=", "JBBPUtils", ".", "packInt", "(", "value", ")", ";", "out", "."...
Write an integer value in packed form into an output stream. @param out the output stream to be used to write the value into @param value the value to be written into the output stream @return the length of packed data in bytes @throws IOException it will be thrown for any IO problems
[ "Write", "an", "integer", "value", "in", "packed", "form", "into", "an", "output", "stream", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/compiler/JBBPCompiler.java#L529-L533
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java
FileServersInner.beginCreateAsync
public Observable<FileServerInner> beginCreateAsync(String resourceGroupName, String fileServerName, FileServerCreateParameters parameters) { """ Creates a file server. @param resourceGroupName Name of the resource group to which the resource belongs. @param fileServerName The name of the file server within th...
java
public Observable<FileServerInner> beginCreateAsync(String resourceGroupName, String fileServerName, FileServerCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, fileServerName, parameters).map(new Func1<ServiceResponse<FileServerInner>, FileServerInner>() { ...
[ "public", "Observable", "<", "FileServerInner", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "fileServerName", ",", "FileServerCreateParameters", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ...
Creates a file server. @param resourceGroupName Name of the resource group to which the resource belongs. @param fileServerName The name of the file server within the specified resource group. File server names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name m...
[ "Creates", "a", "file", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java#L223-L230
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/internalJavaScriptResource/InternalJavaScriptResourceRenderer.java
InternalJavaScriptResourceRenderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:internalJavaScriptResource. @param context the FacesContext. @param component the current b:internalJavaScriptResource. @throws IOException thrown if som...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } InternalJavaScriptResource internalJavaScriptResource = (InternalJavaScriptResource) component; ResponseWriter rw = context.getResponseWriter(); rw.startElement("sc...
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "InternalJavaScriptRes...
This methods generates the HTML code of the current b:internalJavaScriptResource. @param context the FacesContext. @param component the current b:internalJavaScriptResource. @throws IOException thrown if something goes wrong when writing the HTML code.
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "internalJavaScriptResource", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/internalJavaScriptResource/InternalJavaScriptResourceRenderer.java#L40-L53
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java
MinecraftTypeHelper.attemptToGetAsVariant
public static Variation attemptToGetAsVariant(String part, ItemStack is) { """ Attempt to parse string as a Variation, allowing for block properties having different names to the enum values<br> (eg blue_orchid vs orchidBlue etc.) @param part the string (potentially in the 'wrong' format, eg 'orchidBlue') @para...
java
public static Variation attemptToGetAsVariant(String part, ItemStack is) { if (is.getItem() instanceof ItemBlock) { // Unlocalised name doesn't always match the names we use in types.xsd // (which are the names displayed by Minecraft when using the F3 debug etc.) ...
[ "public", "static", "Variation", "attemptToGetAsVariant", "(", "String", "part", ",", "ItemStack", "is", ")", "{", "if", "(", "is", ".", "getItem", "(", ")", "instanceof", "ItemBlock", ")", "{", "// Unlocalised name doesn't always match the names we use in types.xsd", ...
Attempt to parse string as a Variation, allowing for block properties having different names to the enum values<br> (eg blue_orchid vs orchidBlue etc.) @param part the string (potentially in the 'wrong' format, eg 'orchidBlue') @param is the ItemStack from which this string came (eg from is.getUnlocalisedName) @return ...
[ "Attempt", "to", "parse", "string", "as", "a", "Variation", "allowing", "for", "block", "properties", "having", "different", "names", "to", "the", "enum", "values<br", ">", "(", "eg", "blue_orchid", "vs", "orchidBlue", "etc", ".", ")" ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java#L182-L201
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/mock/CommonsAssert.java
CommonsAssert.assertNotEquals
public static <T> void assertNotEquals (@Nullable final T x, @Nullable final T y) { """ Like JUnit assertNotEquals but using {@link EqualsHelper}. @param x Fist object. May be <code>null</code> @param y Second object. May be <code>null</code>. """ assertNotEquals ((String) null, x, y); }
java
public static <T> void assertNotEquals (@Nullable final T x, @Nullable final T y) { assertNotEquals ((String) null, x, y); }
[ "public", "static", "<", "T", ">", "void", "assertNotEquals", "(", "@", "Nullable", "final", "T", "x", ",", "@", "Nullable", "final", "T", "y", ")", "{", "assertNotEquals", "(", "(", "String", ")", "null", ",", "x", ",", "y", ")", ";", "}" ]
Like JUnit assertNotEquals but using {@link EqualsHelper}. @param x Fist object. May be <code>null</code> @param y Second object. May be <code>null</code>.
[ "Like", "JUnit", "assertNotEquals", "but", "using", "{", "@link", "EqualsHelper", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/mock/CommonsAssert.java#L204-L207
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java
DTMDefaultBase.appendChild
public void appendChild(int newChild, boolean clone, boolean cloneDepth) { """ Append a child to the end of the document. Please note that the node is always cloned if it is owned by another document. <p>%REVIEW% "End of the document" needs to be defined more clearly. Does it become the last child of the Docu...
java
public void appendChild(int newChild, boolean clone, boolean cloneDepth) { error(XMLMessages.createXMLMessage(XMLErrorResources.ER_METHOD_NOT_SUPPORTED, null));//"appendChild not yet supported!"); }
[ "public", "void", "appendChild", "(", "int", "newChild", ",", "boolean", "clone", ",", "boolean", "cloneDepth", ")", "{", "error", "(", "XMLMessages", ".", "createXMLMessage", "(", "XMLErrorResources", ".", "ER_METHOD_NOT_SUPPORTED", ",", "null", ")", ")", ";", ...
Append a child to the end of the document. Please note that the node is always cloned if it is owned by another document. <p>%REVIEW% "End of the document" needs to be defined more clearly. Does it become the last child of the Document? Of the root element?</p> @param newChild Must be a valid new node handle. @param ...
[ "Append", "a", "child", "to", "the", "end", "of", "the", "document", ".", "Please", "note", "that", "the", "node", "is", "always", "cloned", "if", "it", "is", "owned", "by", "another", "document", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L2235-L2238
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringCropper.java
StringCropper.getAfterOfWithDetails
public StrPosition getAfterOfWithDetails(String srcStr, String token, boolean useTailSearch) { """ returns the string that is cropped after token with position-detail-info<br> <br> Method Example1 tail mode=true,<br> <br> getAfterOfWithDetails("AAABCDBCDEEE","BCD",true) returns str=EEE, startIndex=9, endIndex...
java
public StrPosition getAfterOfWithDetails(String srcStr, String token, boolean useTailSearch) { final StrPosition retVal = new StrPosition(); if (isBlank(srcStr) || isBlank(token)) { return retVal; } final int tokenStartIndex; if (useTailSearch) { ...
[ "public", "StrPosition", "getAfterOfWithDetails", "(", "String", "srcStr", ",", "String", "token", ",", "boolean", "useTailSearch", ")", "{", "final", "StrPosition", "retVal", "=", "new", "StrPosition", "(", ")", ";", "if", "(", "isBlank", "(", "srcStr", ")", ...
returns the string that is cropped after token with position-detail-info<br> <br> Method Example1 tail mode=true,<br> <br> getAfterOfWithDetails("AAABCDBCDEEE","BCD",true) returns str=EEE, startIndex=9, endIndex=11<br> <br> <br> Method Example2 tail mode=true,<br> getAfterOfWithDetails("AAABCDBCDEEE","BCD",true) return...
[ "returns", "the", "string", "that", "is", "cropped", "after", "token", "with", "position", "-", "detail", "-", "info<br", ">", "<br", ">", "Method", "Example1", "tail", "mode", "=", "true", "<br", ">", "<br", ">", "getAfterOfWithDetails", "(", "AAABCDBCDEEE"...
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringCropper.java#L325-L356
milaboratory/milib
src/main/java/com/milaboratory/core/io/util/IOUtil.java
IOUtil.readRawVarint64
public static long readRawVarint64(final InputStream is, long eofValue) throws IOException { """ Read a raw Varint from the stream. <p>Based on com.google.protobuf.CodedInputStream class from Google's protobuf library.</p> """ int shift = 0; long result = 0; while (shift < 64) { ...
java
public static long readRawVarint64(final InputStream is, long eofValue) throws IOException { int shift = 0; long result = 0; while (shift < 64) { final int b = is.read(); if (b == -1) if (shift == 0) return eofValue; el...
[ "public", "static", "long", "readRawVarint64", "(", "final", "InputStream", "is", ",", "long", "eofValue", ")", "throws", "IOException", "{", "int", "shift", "=", "0", ";", "long", "result", "=", "0", ";", "while", "(", "shift", "<", "64", ")", "{", "f...
Read a raw Varint from the stream. <p>Based on com.google.protobuf.CodedInputStream class from Google's protobuf library.</p>
[ "Read", "a", "raw", "Varint", "from", "the", "stream", "." ]
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/IOUtil.java#L58-L77
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java
AwsAsgUtil.setStatus
public void setStatus(String asgName, boolean enabled) { """ Sets the status of the ASG. @param asgName The name of the ASG @param enabled true to enable, false to disable """ String asgAccountId = getASGAccount(asgName); asgCache.put(new CacheKey(asgAccountId, asgName), enabled); }
java
public void setStatus(String asgName, boolean enabled) { String asgAccountId = getASGAccount(asgName); asgCache.put(new CacheKey(asgAccountId, asgName), enabled); }
[ "public", "void", "setStatus", "(", "String", "asgName", ",", "boolean", "enabled", ")", "{", "String", "asgAccountId", "=", "getASGAccount", "(", "asgName", ")", ";", "asgCache", ".", "put", "(", "new", "CacheKey", "(", "asgAccountId", ",", "asgName", ")", ...
Sets the status of the ASG. @param asgName The name of the ASG @param enabled true to enable, false to disable
[ "Sets", "the", "status", "of", "the", "ASG", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java#L193-L196
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.backupSecret
public BackupSecretResult backupSecret(String vaultBaseUrl, String secretName) { """ Backs up the specified secret. Requests that a backup of the specified secret be downloaded to the client. All versions of the secret will be downloaded. This operation requires the secrets/backup permission. @param vaultBaseU...
java
public BackupSecretResult backupSecret(String vaultBaseUrl, String secretName) { return backupSecretWithServiceResponseAsync(vaultBaseUrl, secretName).toBlocking().single().body(); }
[ "public", "BackupSecretResult", "backupSecret", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ")", "{", "return", "backupSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")",...
Backs up the specified secret. Requests that a backup of the specified secret be downloaded to the client. All versions of the secret will be downloaded. This operation requires the secrets/backup permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param secretName The name of...
[ "Backs", "up", "the", "specified", "secret", ".", "Requests", "that", "a", "backup", "of", "the", "specified", "secret", "be", "downloaded", "to", "the", "client", ".", "All", "versions", "of", "the", "secret", "will", "be", "downloaded", ".", "This", "ope...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4906-L4908
kiegroup/droolsjbpm-integration
kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration-jbpm/src/main/java/org/kie/server/springboot/jbpm/ContainerAliasResolver.java
ContainerAliasResolver.forProcessInstance
public String forProcessInstance(String alias, long processInstanceId) { """ Looks up container id for given alias that is associated with process instance @param alias container alias @param processInstanceId unique process instance id @return @throws IllegalArgumentException in case there are no containers f...
java
public String forProcessInstance(String alias, long processInstanceId) { return registry.getContainerId(alias, new ByProcessInstanceIdContainerLocator(processInstanceId)); }
[ "public", "String", "forProcessInstance", "(", "String", "alias", ",", "long", "processInstanceId", ")", "{", "return", "registry", ".", "getContainerId", "(", "alias", ",", "new", "ByProcessInstanceIdContainerLocator", "(", "processInstanceId", ")", ")", ";", "}" ]
Looks up container id for given alias that is associated with process instance @param alias container alias @param processInstanceId unique process instance id @return @throws IllegalArgumentException in case there are no containers for given alias
[ "Looks", "up", "container", "id", "for", "given", "alias", "that", "is", "associated", "with", "process", "instance" ]
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration-jbpm/src/main/java/org/kie/server/springboot/jbpm/ContainerAliasResolver.java#L65-L67
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java
MapConverter.getDate
public java.sql.Date getDate(Map<String, Object> data, String name) { """ <p> getDate. </p> @param data a {@link java.util.Map} object. @param name a {@link java.lang.String} object. @return a {@link java.sql.Date} object. """ return get(data, name, java.sql.Date.class); }
java
public java.sql.Date getDate(Map<String, Object> data, String name) { return get(data, name, java.sql.Date.class); }
[ "public", "java", ".", "sql", ".", "Date", "getDate", "(", "Map", "<", "String", ",", "Object", ">", "data", ",", "String", "name", ")", "{", "return", "get", "(", "data", ",", "name", ",", "java", ".", "sql", ".", "Date", ".", "class", ")", ";",...
<p> getDate. </p> @param data a {@link java.util.Map} object. @param name a {@link java.lang.String} object. @return a {@link java.sql.Date} object.
[ "<p", ">", "getDate", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java#L218-L220
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.intValue
public int intValue(String name, String namespace) { """ Returns an integer value of the supplied child or throws an exception if missing. @param name the child element name @param namespace the element namespace @return the value """ String s = childValue(name, namespace); if (s != null) { ...
java
public int intValue(String name, String namespace) { String s = childValue(name, namespace); if (s != null) { return Integer.parseInt(s); } throw new IllegalArgumentException(this + ": content: " + name); }
[ "public", "int", "intValue", "(", "String", "name", ",", "String", "namespace", ")", "{", "String", "s", "=", "childValue", "(", "name", ",", "namespace", ")", ";", "if", "(", "s", "!=", "null", ")", "{", "return", "Integer", ".", "parseInt", "(", "s...
Returns an integer value of the supplied child or throws an exception if missing. @param name the child element name @param namespace the element namespace @return the value
[ "Returns", "an", "integer", "value", "of", "the", "supplied", "child", "or", "throws", "an", "exception", "if", "missing", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L984-L990
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
CompressorHttp2ConnectionEncoder.bindCompressorToStream
private void bindCompressorToStream(EmbeddedChannel compressor, int streamId) { """ Called after the super class has written the headers and created any associated stream objects. @param compressor The compressor associated with the stream identified by {@code streamId}. @param streamId The stream id for which t...
java
private void bindCompressorToStream(EmbeddedChannel compressor, int streamId) { if (compressor != null) { Http2Stream stream = connection().stream(streamId); if (stream != null) { stream.setProperty(propertyKey, compressor); } } }
[ "private", "void", "bindCompressorToStream", "(", "EmbeddedChannel", "compressor", ",", "int", "streamId", ")", "{", "if", "(", "compressor", "!=", "null", ")", "{", "Http2Stream", "stream", "=", "connection", "(", ")", ".", "stream", "(", "streamId", ")", "...
Called after the super class has written the headers and created any associated stream objects. @param compressor The compressor associated with the stream identified by {@code streamId}. @param streamId The stream id for which the headers were written.
[ "Called", "after", "the", "super", "class", "has", "written", "the", "headers", "and", "created", "any", "associated", "stream", "objects", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java#L271-L278