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
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagBundle.java
CmsJspTagBundle.getLocalizationContext
public static LocalizationContext getLocalizationContext(PageContext pc, String basename) { """ Returns the initialized localization context.<p> @param pc the current page context @param basename the bas name of the bundle @return the initialized localization context """ LocalizationContext loc...
java
public static LocalizationContext getLocalizationContext(PageContext pc, String basename) { LocalizationContext locCtxt = null; ResourceBundle bundle = null; if ((basename == null) || basename.equals("")) { return new LocalizationContext(); } // Try prefer...
[ "public", "static", "LocalizationContext", "getLocalizationContext", "(", "PageContext", "pc", ",", "String", "basename", ")", "{", "LocalizationContext", "locCtxt", "=", "null", ";", "ResourceBundle", "bundle", "=", "null", ";", "if", "(", "(", "basename", "==", ...
Returns the initialized localization context.<p> @param pc the current page context @param basename the bas name of the bundle @return the initialized localization context
[ "Returns", "the", "initialized", "localization", "context", ".", "<p", ">", "@param", "pc", "the", "current", "page", "context", "@param", "basename", "the", "bas", "name", "of", "the", "bundle" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagBundle.java#L85-L115
Red5/red5-io
src/main/java/org/red5/io/utils/IOUtils.java
IOUtils.writeReverseInt
public final static void writeReverseInt(IoBuffer out, int value) { """ Writes integer in reverse order @param out Data buffer to fill @param value Integer """ out.putInt((int) ((value & 0xFF) << 24 | ((value >> 8) & 0x00FF) << 16 | ((value >>> 16) & 0x000000FF) << 8 | ((value >>> 24) & 0x000000F...
java
public final static void writeReverseInt(IoBuffer out, int value) { out.putInt((int) ((value & 0xFF) << 24 | ((value >> 8) & 0x00FF) << 16 | ((value >>> 16) & 0x000000FF) << 8 | ((value >>> 24) & 0x000000FF))); }
[ "public", "final", "static", "void", "writeReverseInt", "(", "IoBuffer", "out", ",", "int", "value", ")", "{", "out", ".", "putInt", "(", "(", "int", ")", "(", "(", "value", "&", "0xFF", ")", "<<", "24", "|", "(", "(", "value", ">>", "8", ")", "&...
Writes integer in reverse order @param out Data buffer to fill @param value Integer
[ "Writes", "integer", "in", "reverse", "order" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/utils/IOUtils.java#L47-L49
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/moladb/model/Key.java
Key.withAttribute
public Key withAttribute(String attributeName, AttributeValue value) { """ The method set attribute name and attribute value with input parameters for a key. Returns a reference to this object so that method calls can be chained together. @param attributeName The attribute name to set for a key. @param value ...
java
public Key withAttribute(String attributeName, AttributeValue value) { if (this.attributes == null) { this.attributes = new HashMap<String, AttributeValue>(); } attributes.put(attributeName, value); return this; }
[ "public", "Key", "withAttribute", "(", "String", "attributeName", ",", "AttributeValue", "value", ")", "{", "if", "(", "this", ".", "attributes", "==", "null", ")", "{", "this", ".", "attributes", "=", "new", "HashMap", "<", "String", ",", "AttributeValue", ...
The method set attribute name and attribute value with input parameters for a key. Returns a reference to this object so that method calls can be chained together. @param attributeName The attribute name to set for a key. @param value The attribute value to set for a key. @return A reference to this object so that met...
[ "The", "method", "set", "attribute", "name", "and", "attribute", "value", "with", "input", "parameters", "for", "a", "key", ".", "Returns", "a", "reference", "to", "this", "object", "so", "that", "method", "calls", "can", "be", "chained", "together", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/moladb/model/Key.java#L79-L85
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java
PAbstractObject.getLong
@Override public final long getLong(final String key) { """ Get a property as an long or throw an exception. @param key the property name """ Long result = optLong(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
java
@Override public final long getLong(final String key) { Long result = optLong(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "@", "Override", "public", "final", "long", "getLong", "(", "final", "String", "key", ")", "{", "Long", "result", "=", "optLong", "(", "key", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "ObjectMissingException", "(", "this", ...
Get a property as an long or throw an exception. @param key the property name
[ "Get", "a", "property", "as", "an", "long", "or", "throw", "an", "exception", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L76-L83
google/closure-compiler
src/com/google/javascript/jscomp/FunctionInjector.java
FunctionInjector.unsafeInline
Node unsafeInline(Reference ref, String fnName, Node fnNode) { """ Inline a function into the call site. Note that this unsafe version doesn't verify if the AST is normalized. You should use {@link inline} instead, unless you are 100% certain that the bit of code you're inlining is safe without being normalized ...
java
Node unsafeInline(Reference ref, String fnName, Node fnNode) { return internalInline(ref, fnName, fnNode); }
[ "Node", "unsafeInline", "(", "Reference", "ref", ",", "String", "fnName", ",", "Node", "fnNode", ")", "{", "return", "internalInline", "(", "ref", ",", "fnName", ",", "fnNode", ")", ";", "}" ]
Inline a function into the call site. Note that this unsafe version doesn't verify if the AST is normalized. You should use {@link inline} instead, unless you are 100% certain that the bit of code you're inlining is safe without being normalized first.
[ "Inline", "a", "function", "into", "the", "call", "site", ".", "Note", "that", "this", "unsafe", "version", "doesn", "t", "verify", "if", "the", "AST", "is", "normalized", ".", "You", "should", "use", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FunctionInjector.java#L308-L310
alkacon/opencms-core
src/org/opencms/db/generic/CmsSqlManager.java
CmsSqlManager.getPreparedStatement
public PreparedStatement getPreparedStatement(Connection con, CmsProject project, String queryKey) throws SQLException { """ Returns a PreparedStatement for a JDBC connection specified by the key of a SQL query and the CmsProject.<p> @param con the JDBC connection @param project the specified CmsProject ...
java
public PreparedStatement getPreparedStatement(Connection con, CmsProject project, String queryKey) throws SQLException { return getPreparedStatement(con, project.getUuid(), queryKey); }
[ "public", "PreparedStatement", "getPreparedStatement", "(", "Connection", "con", ",", "CmsProject", "project", ",", "String", "queryKey", ")", "throws", "SQLException", "{", "return", "getPreparedStatement", "(", "con", ",", "project", ".", "getUuid", "(", ")", ",...
Returns a PreparedStatement for a JDBC connection specified by the key of a SQL query and the CmsProject.<p> @param con the JDBC connection @param project the specified CmsProject @param queryKey the key of the SQL query @return PreparedStatement a new PreparedStatement containing the pre-compiled SQL statement @thr...
[ "Returns", "a", "PreparedStatement", "for", "a", "JDBC", "connection", "specified", "by", "the", "key", "of", "a", "SQL", "query", "and", "the", "CmsProject", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSqlManager.java#L239-L243
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/sc/scpolicy_stats.java
scpolicy_stats.get
public static scpolicy_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of scpolicy_stats resource of given name . """ scpolicy_stats obj = new scpolicy_stats(); obj.set_name(name); scpolicy_stats response = (scpolicy_stats) obj.stat_resource(service);...
java
public static scpolicy_stats get(nitro_service service, String name) throws Exception{ scpolicy_stats obj = new scpolicy_stats(); obj.set_name(name); scpolicy_stats response = (scpolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "scpolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "scpolicy_stats", "obj", "=", "new", "scpolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "scpoli...
Use this API to fetch statistics of scpolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "scpolicy_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/sc/scpolicy_stats.java#L429-L434
jenkinsci/ssh-slaves-plugin
src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java
JavaVersionChecker.resolveJava
protected String resolveJava() throws InterruptedException, IOException { """ return javaPath if specified in the configuration. Finds local Java. """ for (JavaProvider provider : JavaProvider.all()) { for (String javaCommand : provider.getJavas(computer, listener, connection)) { ...
java
protected String resolveJava() throws InterruptedException, IOException { for (JavaProvider provider : JavaProvider.all()) { for (String javaCommand : provider.getJavas(computer, listener, connection)) { LOGGER.fine("Trying Java at " + javaCommand); try { ...
[ "protected", "String", "resolveJava", "(", ")", "throws", "InterruptedException", ",", "IOException", "{", "for", "(", "JavaProvider", "provider", ":", "JavaProvider", ".", "all", "(", ")", ")", "{", "for", "(", "String", "javaCommand", ":", "provider", ".", ...
return javaPath if specified in the configuration. Finds local Java.
[ "return", "javaPath", "if", "specified", "in", "the", "configuration", ".", "Finds", "local", "Java", "." ]
train
https://github.com/jenkinsci/ssh-slaves-plugin/blob/95f528730fc1e01b25983459927b7516ead3ee00/src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java#L70-L83
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java
CreateIssueParams.singleListCustomFieldMap
public CreateIssueParams singleListCustomFieldMap(Map<Long, Long> customFieldMap) { """ Sets the single list type custom field with Map. @param customFieldMap set of the custom field identifiers and custom field item identifiers @return CreateIssueParams instance """ Set<Long> keySet = customFieldM...
java
public CreateIssueParams singleListCustomFieldMap(Map<Long, Long> customFieldMap) { Set<Long> keySet = customFieldMap.keySet(); for (Long key : keySet) { parameters.add(new NameValuePair("customField_" + key.toString(), customFieldMap.get(key).toString())); } return this; ...
[ "public", "CreateIssueParams", "singleListCustomFieldMap", "(", "Map", "<", "Long", ",", "Long", ">", "customFieldMap", ")", "{", "Set", "<", "Long", ">", "keySet", "=", "customFieldMap", ".", "keySet", "(", ")", ";", "for", "(", "Long", "key", ":", "keySe...
Sets the single list type custom field with Map. @param customFieldMap set of the custom field identifiers and custom field item identifiers @return CreateIssueParams instance
[ "Sets", "the", "single", "list", "type", "custom", "field", "with", "Map", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java#L561-L567
GII/broccoli
broccoli-impl/src/main/java/com/hi3project/broccoli/bsdl/impl/parsing/xml/AxiomAssign.java
AxiomAssign.assignParsedElement
public boolean assignParsedElement(Property parsedProperty, String syntaxElementName, ISyntaxElement syntaxElement) throws ModelException { """ /* A property: -has a name as attribute - may have an URI as attribute - may contain N concepts as contained alements - may have N properties as contained elements (syn...
java
public boolean assignParsedElement(Property parsedProperty, String syntaxElementName, ISyntaxElement syntaxElement) throws ModelException { if (syntaxElementName.equalsIgnoreCase(XMLSyntax.PROPERTY_NAME()) && syntaxElement instanceof IAxiomProperty) { parsedProperty.setName(((IAxiomProperty) syntaxE...
[ "public", "boolean", "assignParsedElement", "(", "Property", "parsedProperty", ",", "String", "syntaxElementName", ",", "ISyntaxElement", "syntaxElement", ")", "throws", "ModelException", "{", "if", "(", "syntaxElementName", ".", "equalsIgnoreCase", "(", "XMLSyntax", "....
/* A property: -has a name as attribute - may have an URI as attribute - may contain N concepts as contained alements - may have N properties as contained elements (syntactic sugar for a containted concept) - may have a multiplicity (as contained element)
[ "/", "*", "A", "property", ":", "-", "has", "a", "name", "as", "attribute", "-", "may", "have", "an", "URI", "as", "attribute", "-", "may", "contain", "N", "concepts", "as", "contained", "alements", "-", "may", "have", "N", "properties", "as", "contain...
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-impl/src/main/java/com/hi3project/broccoli/bsdl/impl/parsing/xml/AxiomAssign.java#L143-L161
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.transformAffine
public Vector4d transformAffine(double x, double y, double z, double w, Vector4d dest) { """ /* (non-Javadoc) @see org.joml.Matrix4dc#transformAffine(double, double, double, double, org.joml.Vector4d) """ double rx = m00 * x + m10 * y + m20 * z + m30 * w; double ry = m01 * x + m11 * y + m21 * ...
java
public Vector4d transformAffine(double x, double y, double z, double w, Vector4d dest) { double rx = m00 * x + m10 * y + m20 * z + m30 * w; double ry = m01 * x + m11 * y + m21 * z + m31 * w; double rz = m02 * x + m12 * y + m22 * z + m32 * w; dest.x = rx; dest.y = ry; dest...
[ "public", "Vector4d", "transformAffine", "(", "double", "x", ",", "double", "y", ",", "double", "z", ",", "double", "w", ",", "Vector4d", "dest", ")", "{", "double", "rx", "=", "m00", "*", "x", "+", "m10", "*", "y", "+", "m20", "*", "z", "+", "m3...
/* (non-Javadoc) @see org.joml.Matrix4dc#transformAffine(double, double, double, double, org.joml.Vector4d)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L4265-L4274
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/shared/FakeRecordOwner.java
FakeRecordOwner.getTask
public Task getTask() { """ Get the environment to use for this record owner. @return Record owner's environment, or null to use the default enviroment. """ Task task = super.getTask(); if (task == null) task = m_taskFake; if (task == null) task = m_taskFake = n...
java
public Task getTask() { Task task = super.getTask(); if (task == null) task = m_taskFake; if (task == null) task = m_taskFake = new FakeTask(new FakeApplication(null, null, null), null, null); return task; }
[ "public", "Task", "getTask", "(", ")", "{", "Task", "task", "=", "super", ".", "getTask", "(", ")", ";", "if", "(", "task", "==", "null", ")", "task", "=", "m_taskFake", ";", "if", "(", "task", "==", "null", ")", "task", "=", "m_taskFake", "=", "...
Get the environment to use for this record owner. @return Record owner's environment, or null to use the default enviroment.
[ "Get", "the", "environment", "to", "use", "for", "this", "record", "owner", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/FakeRecordOwner.java#L145-L153
vanilladb/vanillacore
src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java
SelectPlan.predHistogram
public static Histogram predHistogram(Histogram hist, Predicate pred) { """ Returns a histogram that, for each field, approximates the distribution of field values from the specified histogram satisfying the specified predicate. <p> Assumes that: <ul> <li>Equality selection always finds matching records</l...
java
public static Histogram predHistogram(Histogram hist, Predicate pred) { if (Double.compare(hist.recordsOutput(), 1.0) < 0) return new Histogram(hist.fields()); // apply constant ranges Map<String, ConstantRange> cRanges = new HashMap<String, ConstantRange>(); for (String fld : hist.fields()) { Con...
[ "public", "static", "Histogram", "predHistogram", "(", "Histogram", "hist", ",", "Predicate", "pred", ")", "{", "if", "(", "Double", ".", "compare", "(", "hist", ".", "recordsOutput", "(", ")", ",", "1.0", ")", "<", "0", ")", "return", "new", "Histogram"...
Returns a histogram that, for each field, approximates the distribution of field values from the specified histogram satisfying the specified predicate. <p> Assumes that: <ul> <li>Equality selection always finds matching records</li> <li>Values in a bucket have the same frequency (uniform frequency)</li> <li>Given val...
[ "Returns", "a", "histogram", "that", "for", "each", "field", "approximates", "the", "distribution", "of", "field", "values", "from", "the", "specified", "histogram", "satisfying", "the", "specified", "predicate", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java#L63-L89
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/step/SqlgVertexStep.java
SqlgVertexStep.elements
private ListIterator<List<Emit<E>>> elements(SchemaTable schemaTable, SchemaTableTree rootSchemaTableTree) { """ Called from SqlgVertexStepCompiler which compiled VertexStep and HasSteps. This is only called when not in BatchMode """ this.sqlgGraph.tx().readWrite(); if (this.sqlgGraph.getSqlDi...
java
private ListIterator<List<Emit<E>>> elements(SchemaTable schemaTable, SchemaTableTree rootSchemaTableTree) { this.sqlgGraph.tx().readWrite(); if (this.sqlgGraph.getSqlDialect().supportsBatchMode() && this.sqlgGraph.tx().getBatchManager().isStreaming()) { throw new IllegalStateException("stre...
[ "private", "ListIterator", "<", "List", "<", "Emit", "<", "E", ">", ">", ">", "elements", "(", "SchemaTable", "schemaTable", ",", "SchemaTableTree", "rootSchemaTableTree", ")", "{", "this", ".", "sqlgGraph", ".", "tx", "(", ")", ".", "readWrite", "(", ")",...
Called from SqlgVertexStepCompiler which compiled VertexStep and HasSteps. This is only called when not in BatchMode
[ "Called", "from", "SqlgVertexStepCompiler", "which", "compiled", "VertexStep", "and", "HasSteps", ".", "This", "is", "only", "called", "when", "not", "in", "BatchMode" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/step/SqlgVertexStep.java#L238-L248
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/BacklogEndPointSupport.java
BacklogEndPointSupport.getSharedFileEndpoint
public String getSharedFileEndpoint(Object projectIdOrKey, Object sharedFileId) throws BacklogException { """ Returns the endpoint of shared file. @param projectIdOrKey the project identifier @param sharedFileId the shared file identifier @return the endpoint @throws BacklogException """ ...
java
public String getSharedFileEndpoint(Object projectIdOrKey, Object sharedFileId) throws BacklogException { return buildEndpoint("projects/" + projectIdOrKey + "/files/" + sharedFileId); }
[ "public", "String", "getSharedFileEndpoint", "(", "Object", "projectIdOrKey", ",", "Object", "sharedFileId", ")", "throws", "BacklogException", "{", "return", "buildEndpoint", "(", "\"projects/\"", "+", "projectIdOrKey", "+", "\"/files/\"", "+", "sharedFileId", ")", "...
Returns the endpoint of shared file. @param projectIdOrKey the project identifier @param sharedFileId the shared file identifier @return the endpoint @throws BacklogException
[ "Returns", "the", "endpoint", "of", "shared", "file", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/BacklogEndPointSupport.java#L58-L60
OpenTSDB/opentsdb
src/core/TSDB.java
TSDB.addPoint
public Deferred<Object> addPoint(final String metric, final long timestamp, final long value, final Map<String, String> tags) { """ Adds a single integer value data point in the TSDB. <p> WARNING: The tags ma...
java
public Deferred<Object> addPoint(final String metric, final long timestamp, final long value, final Map<String, String> tags) { final byte[] v; if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) { ...
[ "public", "Deferred", "<", "Object", ">", "addPoint", "(", "final", "String", "metric", ",", "final", "long", "timestamp", ",", "final", "long", "value", ",", "final", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "final", "byte", "[", "]...
Adds a single integer value data point in the TSDB. <p> WARNING: The tags map may be modified by this method without a lock. Give the method a copy if you plan to use it elsewhere. <p> @param metric A non-empty string. @param timestamp The timestamp associated with the value. @param value The value of the data point. @...
[ "Adds", "a", "single", "integer", "value", "data", "point", "in", "the", "TSDB", ".", "<p", ">", "WARNING", ":", "The", "tags", "map", "may", "be", "modified", "by", "this", "method", "without", "a", "lock", ".", "Give", "the", "method", "a", "copy", ...
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/TSDB.java#L1004-L1021
aws/aws-sdk-java
aws-java-sdk-fms/src/main/java/com/amazonaws/services/fms/model/Policy.java
Policy.withIncludeMap
public Policy withIncludeMap(java.util.Map<String, java.util.List<String>> includeMap) { """ <p> Specifies the AWS account IDs to include in the policy. If <code>IncludeMap</code> is null, all accounts in the organization in AWS Organizations are included in the policy. If <code>IncludeMap</code> is not null, on...
java
public Policy withIncludeMap(java.util.Map<String, java.util.List<String>> includeMap) { setIncludeMap(includeMap); return this; }
[ "public", "Policy", "withIncludeMap", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "includeMap", ")", "{", "setIncludeMap", "(", "includeMap", ")", ";", "return", "this", ";", "}" ...
<p> Specifies the AWS account IDs to include in the policy. If <code>IncludeMap</code> is null, all accounts in the organization in AWS Organizations are included in the policy. If <code>IncludeMap</code> is not null, only values listed in <code>IncludeMap</code> are included in the policy. </p> <p> The key to the map ...
[ "<p", ">", "Specifies", "the", "AWS", "account", "IDs", "to", "include", "in", "the", "policy", ".", "If", "<code", ">", "IncludeMap<", "/", "code", ">", "is", "null", "all", "accounts", "in", "the", "organization", "in", "AWS", "Organizations", "are", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-fms/src/main/java/com/amazonaws/services/fms/model/Policy.java#L681-L684
Prototik/HoloEverywhere
library/src/org/holoeverywhere/widget/ListView.java
ListView.drawDivider
void drawDivider(Canvas canvas, Rect bounds, int childIndex) { """ O_O This method doesn't override super method, but super class invoke it instead of android.widget.ListView.drawDivider. It's fucking magic of dalvik? """ final Drawable divider = getDivider(); divider.setBounds(bounds); ...
java
void drawDivider(Canvas canvas, Rect bounds, int childIndex) { final Drawable divider = getDivider(); divider.setBounds(bounds); divider.draw(canvas); }
[ "void", "drawDivider", "(", "Canvas", "canvas", ",", "Rect", "bounds", ",", "int", "childIndex", ")", "{", "final", "Drawable", "divider", "=", "getDivider", "(", ")", ";", "divider", ".", "setBounds", "(", "bounds", ")", ";", "divider", ".", "draw", "("...
O_O This method doesn't override super method, but super class invoke it instead of android.widget.ListView.drawDivider. It's fucking magic of dalvik?
[ "O_O", "This", "method", "doesn", "t", "override", "super", "method", "but", "super", "class", "invoke", "it", "instead", "of", "android", ".", "widget", ".", "ListView", ".", "drawDivider", ".", "It", "s", "fucking", "magic", "of", "dalvik?" ]
train
https://github.com/Prototik/HoloEverywhere/blob/b870abb5ab009a5a6dbab3fb855ec2854e35e125/library/src/org/holoeverywhere/widget/ListView.java#L212-L216
btaz/data-util
src/main/java/com/btaz/util/unit/ResourceUtil.java
ResourceUtil.createTmpDir
public static File createTmpDir(String directoryName) { """ This method will create a new directory in the system temp folder @param directoryName directory name """ File tmpDir = new File(System.getProperty("java.io.tmpdir")); File testDir = new File(tmpDir, directoryName); if(!testDi...
java
public static File createTmpDir(String directoryName) { File tmpDir = new File(System.getProperty("java.io.tmpdir")); File testDir = new File(tmpDir, directoryName); if(!testDir.mkdir()) { throw new ResourceUtilException("Can't create directory: " + testDir.getAbsolutePath()); ...
[ "public", "static", "File", "createTmpDir", "(", "String", "directoryName", ")", "{", "File", "tmpDir", "=", "new", "File", "(", "System", ".", "getProperty", "(", "\"java.io.tmpdir\"", ")", ")", ";", "File", "testDir", "=", "new", "File", "(", "tmpDir", "...
This method will create a new directory in the system temp folder @param directoryName directory name
[ "This", "method", "will", "create", "a", "new", "directory", "in", "the", "system", "temp", "folder" ]
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/unit/ResourceUtil.java#L130-L138
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java
GobblinMetrics.addCustomTagToState
public static void addCustomTagToState(State state, List<? extends Tag<?>> tags) { """ Add a {@link List} of {@link Tag}s to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}. <p> {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the met...
java
public static void addCustomTagToState(State state, List<? extends Tag<?>> tags) { for (Tag<?> tag : tags) { state.appendToListProp(METRICS_STATE_CUSTOM_TAGS, tag.toString()); } }
[ "public", "static", "void", "addCustomTagToState", "(", "State", "state", ",", "List", "<", "?", "extends", "Tag", "<", "?", ">", ">", "tags", ")", "{", "for", "(", "Tag", "<", "?", ">", "tag", ":", "tags", ")", "{", "state", ".", "appendToListProp",...
Add a {@link List} of {@link Tag}s to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}. <p> {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the method {@link #getCustomTagsFromState}. </p> @param state {@link org.apache.gobblin.configuration...
[ "Add", "a", "{", "@link", "List", "}", "of", "{", "@link", "Tag", "}", "s", "to", "a", "{", "@link", "org", ".", "apache", ".", "gobblin", ".", "configuration", ".", "State", "}", "with", "key", "{", "@link", "#METRICS_STATE_CUSTOM_TAGS", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java#L178-L182
facebookarchive/hadoop-20
src/examples/org/apache/hadoop/examples/dancing/OneSidedPentomino.java
OneSidedPentomino.initializePieces
protected void initializePieces() { """ Define the one sided pieces. The flipped pieces have the same name with a capital letter. """ pieces.add(new Piece("x", " x /xxx/ x ", false, oneRotation)); pieces.add(new Piece("v", "x /x /xxx", false, fourRotations)); pieces.add(new Piece("t", "xxx/ x / ...
java
protected void initializePieces() { pieces.add(new Piece("x", " x /xxx/ x ", false, oneRotation)); pieces.add(new Piece("v", "x /x /xxx", false, fourRotations)); pieces.add(new Piece("t", "xxx/ x / x ", false, fourRotations)); pieces.add(new Piece("w", " x/ xx/xx ", false, fourRotations)); pieces...
[ "protected", "void", "initializePieces", "(", ")", "{", "pieces", ".", "add", "(", "new", "Piece", "(", "\"x\"", ",", "\" x /xxx/ x \"", ",", "false", ",", "oneRotation", ")", ")", ";", "pieces", ".", "add", "(", "new", "Piece", "(", "\"v\"", ",", "\"x...
Define the one sided pieces. The flipped pieces have the same name with a capital letter.
[ "Define", "the", "one", "sided", "pieces", ".", "The", "flipped", "pieces", "have", "the", "same", "name", "with", "a", "capital", "letter", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/examples/org/apache/hadoop/examples/dancing/OneSidedPentomino.java#L39-L58
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.getAngle
public static double getAngle(double xDiff, double yDiff) { """ Gets the angle attribute of the GeometryTools class. @param xDiff Description of the Parameter @param yDiff Description of the Parameter @return The angle value """ double angle = 0; // logger.debug("getAngle->xDif...
java
public static double getAngle(double xDiff, double yDiff) { double angle = 0; // logger.debug("getAngle->xDiff: " + xDiff); // logger.debug("getAngle->yDiff: " + yDiff); if (xDiff >= 0 && yDiff >= 0) { angle = Math.atan(yDiff / xDiff); } else if (xDiff < 0 && yDiff ...
[ "public", "static", "double", "getAngle", "(", "double", "xDiff", ",", "double", "yDiff", ")", "{", "double", "angle", "=", "0", ";", "//\t\tlogger.debug(\"getAngle->xDiff: \" + xDiff);", "//\t\tlogger.debug(\"getAngle->yDiff: \" + yDiff);", "if", "(", "xDiff", ">=", "0...
Gets the angle attribute of the GeometryTools class. @param xDiff Description of the Parameter @param yDiff Description of the Parameter @return The angle value
[ "Gets", "the", "angle", "attribute", "of", "the", "GeometryTools", "class", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L584-L598
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/discovery/cloud/ComputeInstanceMetadataResolverUtils.java
ComputeInstanceMetadataResolverUtils.readMetadataUrl
public static JsonNode readMetadataUrl(URL url, int connectionTimeoutMs, int readTimeoutMs, ObjectMapper objectMapper, Map<String, String> requestProperties) throws IOException { """ Reads the result of a URL and parses it using the given {@link ObjectMapper}. @param url the URL to read @param ...
java
public static JsonNode readMetadataUrl(URL url, int connectionTimeoutMs, int readTimeoutMs, ObjectMapper objectMapper, Map<String, String> requestProperties) throws IOException { URLConnection urlConnection = url.openConnection(); if (url.getProtocol().equalsIgnoreCase("file")) { urlConnect...
[ "public", "static", "JsonNode", "readMetadataUrl", "(", "URL", "url", ",", "int", "connectionTimeoutMs", ",", "int", "readTimeoutMs", ",", "ObjectMapper", "objectMapper", ",", "Map", "<", "String", ",", "String", ">", "requestProperties", ")", "throws", "IOExcepti...
Reads the result of a URL and parses it using the given {@link ObjectMapper}. @param url the URL to read @param connectionTimeoutMs connection timeout, in milliseconds @param readTimeoutMs read timeout, in milliseconds @param objectMapper Jackson's {@link ObjectMapper} @param requestProper...
[ "Reads", "the", "result", "of", "a", "URL", "and", "parses", "it", "using", "the", "given", "{", "@link", "ObjectMapper", "}", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/discovery/cloud/ComputeInstanceMetadataResolverUtils.java#L52-L72
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/util/CollectionUtil.java
CollectionUtil.addAll
public static <E> void addAll(Collection<E> pCollection, Iterator<? extends E> pIterator) { """ Adds all elements of the iterator to the collection. @param pCollection the collection @param pIterator the elements to add @throws UnsupportedOperationException if {@code add} is not supported by the given coll...
java
public static <E> void addAll(Collection<E> pCollection, Iterator<? extends E> pIterator) { while (pIterator.hasNext()) { pCollection.add(pIterator.next()); } }
[ "public", "static", "<", "E", ">", "void", "addAll", "(", "Collection", "<", "E", ">", "pCollection", ",", "Iterator", "<", "?", "extends", "E", ">", "pIterator", ")", "{", "while", "(", "pIterator", ".", "hasNext", "(", ")", ")", "{", "pCollection", ...
Adds all elements of the iterator to the collection. @param pCollection the collection @param pIterator the elements to add @throws UnsupportedOperationException if {@code add} is not supported by the given collection. @throws ClassCastException class of the specified element prevents it from being added to this coll...
[ "Adds", "all", "elements", "of", "the", "iterator", "to", "the", "collection", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/util/CollectionUtil.java#L414-L418
kaazing/java.client
net.api/src/main/java/org/kaazing/net/URLFactory.java
URLFactory.createURL
public static URL createURL(String protocol, String host, String file) throws MalformedURLException { """ Creates a URL from the specified protocol name, host name, and file name. The default port for the specified protocol is used. <p/> This method is equivalent to calling the four-argument method ...
java
public static URL createURL(String protocol, String host, String file) throws MalformedURLException { return createURL(protocol, host, -1, file); }
[ "public", "static", "URL", "createURL", "(", "String", "protocol", ",", "String", "host", ",", "String", "file", ")", "throws", "MalformedURLException", "{", "return", "createURL", "(", "protocol", ",", "host", ",", "-", "1", ",", "file", ")", ";", "}" ]
Creates a URL from the specified protocol name, host name, and file name. The default port for the specified protocol is used. <p/> This method is equivalent to calling the four-argument method with the arguments being protocol, host, -1, and file. No validation of the inputs is performed by this method. @param protoc...
[ "Creates", "a", "URL", "from", "the", "specified", "protocol", "name", "host", "name", "and", "file", "name", ".", "The", "default", "port", "for", "the", "specified", "protocol", "is", "used", ".", "<p", "/", ">", "This", "method", "is", "equivalent", "...
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/net.api/src/main/java/org/kaazing/net/URLFactory.java#L163-L167
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <T1, T2, R> Func2<T1, T2, Observable<R>> toAsync(Func2<? super T1, ? super T2, ? extends R> func) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.pn...
java
public static <T1, T2, R> Func2<T1, T2, Observable<R>> toAsync(Func2<? super T1, ? super T2, ? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "R", ">", "Func2", "<", "T1", ",", "T2", ",", "Observable", "<", "R", ">", ">", "toAsync", "(", "Func2", "<", "?", "super", "T1", ",", "?", "super", "T2", ",", "?", "extends", "R", ">", "func", "...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <R> the result type @param func...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L256-L258
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
SearchManager.createQuery
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, Node node) throws InvalidQueryException, RepositoryException { """ Creates a query object from a node that can be executed on the workspace. @param session the session of the user executing the query. @param sessionDat...
java
public Query createQuery(SessionImpl session, SessionDataManager sessionDataManager, Node node) throws InvalidQueryException, RepositoryException { AbstractQueryImpl query = createQueryInstance(); query.init(session, sessionDataManager, handler, node); return query; }
[ "public", "Query", "createQuery", "(", "SessionImpl", "session", ",", "SessionDataManager", "sessionDataManager", ",", "Node", "node", ")", "throws", "InvalidQueryException", ",", "RepositoryException", "{", "AbstractQueryImpl", "query", "=", "createQueryInstance", "(", ...
Creates a query object from a node that can be executed on the workspace. @param session the session of the user executing the query. @param sessionDataManager the item manager of the user executing the query. Needed to return <code>Node</code> instances in the result set. @param node a node of type nt:query. @return ...
[ "Creates", "a", "query", "object", "from", "a", "node", "that", "can", "be", "executed", "on", "the", "workspace", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java#L366-L372
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.sendTransactionProposal
public Collection<ProposalResponse> sendTransactionProposal(TransactionProposalRequest transactionProposalRequest) throws ProposalException, InvalidArgumentException { """ Send a transaction proposal. @param transactionProposalRequest The transaction proposal to be sent to all the required peers needed for end...
java
public Collection<ProposalResponse> sendTransactionProposal(TransactionProposalRequest transactionProposalRequest) throws ProposalException, InvalidArgumentException { return sendProposal(transactionProposalRequest, getEndorsingPeers()); }
[ "public", "Collection", "<", "ProposalResponse", ">", "sendTransactionProposal", "(", "TransactionProposalRequest", "transactionProposalRequest", ")", "throws", "ProposalException", ",", "InvalidArgumentException", "{", "return", "sendProposal", "(", "transactionProposalRequest",...
Send a transaction proposal. @param transactionProposalRequest The transaction proposal to be sent to all the required peers needed for endorsing. @return responses from peers. @throws InvalidArgumentException @throws ProposalException
[ "Send", "a", "transaction", "proposal", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4020-L4023
eostermueller/headlessInTraceClient
src/main/java/org/headlessintrace/client/connection/ConnectionDetail.java
ConnectionDetail.setSocket
public void setSocket(Socket socket) { """ Why do we have ConnectionPartOne and ConnectionPartTwo? There is a hand off, and it happens right here. Once ConnectionPartOne is finished with it's business, it invokes this setSocket() method. """ if (socket != null) { m_remoteAddress = socket...
java
public void setSocket(Socket socket) { if (socket != null) { m_remoteAddress = socket.getInetAddress(); this.port = socket.getPort(); m_controlThread = new DebugControlConnectionThread(socket, this); m_controlThread.start(); executeStartupCommands(); m_control...
[ "public", "void", "setSocket", "(", "Socket", "socket", ")", "{", "if", "(", "socket", "!=", "null", ")", "{", "m_remoteAddress", "=", "socket", ".", "getInetAddress", "(", ")", ";", "this", ".", "port", "=", "socket", ".", "getPort", "(", ")", ";", ...
Why do we have ConnectionPartOne and ConnectionPartTwo? There is a hand off, and it happens right here. Once ConnectionPartOne is finished with it's business, it invokes this setSocket() method.
[ "Why", "do", "we", "have", "ConnectionPartOne", "and", "ConnectionPartTwo?", "There", "is", "a", "hand", "off", "and", "it", "happens", "right", "here", ".", "Once", "ConnectionPartOne", "is", "finished", "with", "it", "s", "business", "it", "invokes", "this",...
train
https://github.com/eostermueller/headlessInTraceClient/blob/50b1dccc5ff9e342c7c1d06b5a382e8c0afc7604/src/main/java/org/headlessintrace/client/connection/ConnectionDetail.java#L236-L291
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java
CmsAreaSelectPanel.setAreaPosition
public void setAreaPosition(boolean relative, CmsPositionBean pos) { """ Sets the selection area.<p> @param relative <code>true</code> if provided position is relative to the select area, not absolute to the page @param pos the area position to select """ if (pos == null) { return; ...
java
public void setAreaPosition(boolean relative, CmsPositionBean pos) { if (pos == null) { return; } m_state = State.SELECTED; showSelect(true); m_currentSelection = new CmsPositionBean(); m_firstX = pos.getLeft(); m_firstY = pos.getTop(); if (!r...
[ "public", "void", "setAreaPosition", "(", "boolean", "relative", ",", "CmsPositionBean", "pos", ")", "{", "if", "(", "pos", "==", "null", ")", "{", "return", ";", "}", "m_state", "=", "State", ".", "SELECTED", ";", "showSelect", "(", "true", ")", ";", ...
Sets the selection area.<p> @param relative <code>true</code> if provided position is relative to the select area, not absolute to the page @param pos the area position to select
[ "Sets", "the", "selection", "area", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java#L585-L601
square/dagger
compiler/src/main/java/dagger/internal/codegen/Util.java
Util.injectableType
public static TypeName injectableType(TypeMirror type) { """ Returns a string for {@code type}. Primitive types are always boxed. """ return type.accept(new SimpleTypeVisitor6<TypeName, Void>() { @Override public TypeName visitPrimitive(PrimitiveType primitiveType, Void v) { return box(primit...
java
public static TypeName injectableType(TypeMirror type) { return type.accept(new SimpleTypeVisitor6<TypeName, Void>() { @Override public TypeName visitPrimitive(PrimitiveType primitiveType, Void v) { return box(primitiveType); } @Override public TypeName visitError(ErrorType errorType, Voi...
[ "public", "static", "TypeName", "injectableType", "(", "TypeMirror", "type", ")", "{", "return", "type", ".", "accept", "(", "new", "SimpleTypeVisitor6", "<", "TypeName", ",", "Void", ">", "(", ")", "{", "@", "Override", "public", "TypeName", "visitPrimitive",...
Returns a string for {@code type}. Primitive types are always boxed.
[ "Returns", "a", "string", "for", "{" ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/compiler/src/main/java/dagger/internal/codegen/Util.java#L182-L206
att/AAF
authz/authz-defOrg/src/main/java/com/osaaf/defOrg/DefaultOrg.java
DefaultOrg.whenToValidate
@Override public Date whenToValidate(Notify type, Date lastValidated) { """ Default Policy is to set to 6 Months for Notification Types. add others/change as required """ switch(type) { case Approval: case PasswordExpiration: return null; default: GregorianCalendar gc = new GregorianCalend...
java
@Override public Date whenToValidate(Notify type, Date lastValidated) { switch(type) { case Approval: case PasswordExpiration: return null; default: GregorianCalendar gc = new GregorianCalendar(); gc.setTime(lastValidated); gc.add(GregorianCalendar.MONTH, 6); // 6 month policy return gc...
[ "@", "Override", "public", "Date", "whenToValidate", "(", "Notify", "type", ",", "Date", "lastValidated", ")", "{", "switch", "(", "type", ")", "{", "case", "Approval", ":", "case", "PasswordExpiration", ":", "return", "null", ";", "default", ":", "Gregorian...
Default Policy is to set to 6 Months for Notification Types. add others/change as required
[ "Default", "Policy", "is", "to", "set", "to", "6", "Months", "for", "Notification", "Types", ".", "add", "others", "/", "change", "as", "required" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/authz/authz-defOrg/src/main/java/com/osaaf/defOrg/DefaultOrg.java#L407-L419
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/logging/internal/HTTPLoggingServiceImpl.java
HTTPLoggingServiceImpl.convertInt
private int convertInt(String input, int defaultValue) { """ Convert the input string to an int value. @param input @param defaultValue - if malformed, then return this instead @return int """ try { return Integer.parseInt(input.trim()); } catch (NumberFormatException nfe) { ...
java
private int convertInt(String input, int defaultValue) { try { return Integer.parseInt(input.trim()); } catch (NumberFormatException nfe) { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Malformed input: " + input); } ...
[ "private", "int", "convertInt", "(", "String", "input", ",", "int", "defaultValue", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "input", ".", "trim", "(", ")", ")", ";", "}", "catch", "(", "NumberFormatException", "nfe", ")", "{", ...
Convert the input string to an int value. @param input @param defaultValue - if malformed, then return this instead @return int
[ "Convert", "the", "input", "string", "to", "an", "int", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/logging/internal/HTTPLoggingServiceImpl.java#L297-L306
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeNotificationRegistration
public void writeNotificationRegistration(OutputStream out, NotificationRegistration value) throws IOException { """ Encode a NotificationRegistration instance as JSON: { "objectName" : ObjectName, "filters" : [ NotificationFilter* ] } @param out The stream to write JSON to @param value The NotificationReg...
java
public void writeNotificationRegistration(OutputStream out, NotificationRegistration value) throws IOException { writeStartObject(out); writeObjectNameField(out, OM_OBJECTNAME, value.objectName); writeNotificationFiltersField(out, OM_FILTERS, value.filters); writeEndObject(out); }
[ "public", "void", "writeNotificationRegistration", "(", "OutputStream", "out", ",", "NotificationRegistration", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writeObjectNameField", "(", "out", ",", "OM_OBJECTNAME", ",", "value"...
Encode a NotificationRegistration instance as JSON: { "objectName" : ObjectName, "filters" : [ NotificationFilter* ] } @param out The stream to write JSON to @param value The NotificationRegistration instance to encode. Can't be null. See writeNotificationFilters() for requirements on the filters. @throws IOException ...
[ "Encode", "a", "NotificationRegistration", "instance", "as", "JSON", ":", "{", "objectName", ":", "ObjectName", "filters", ":", "[", "NotificationFilter", "*", "]", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1483-L1488
hawkular/hawkular-alerts
actions/actions-plugins/actions-email/src/main/java/org/hawkular/alerts/actions/email/EmailTemplate.java
EmailTemplate.processTemplate
public Map<String, String> processTemplate(ActionMessage msg) throws Exception { """ Process a PluginMessage and creates email content based on templates. @param msg the PluginMessage to be processed @return a Map with following entries: - "emailSubject": Subject of the email - "emailBodyPlain": Content for ...
java
public Map<String, String> processTemplate(ActionMessage msg) throws Exception { Map<String, String> emailProcessed = new HashMap<>(); PluginMessageDescription pmDesc = new PluginMessageDescription(msg); // Prepare emailSubject directly from PluginMessageDescription class emailProcesse...
[ "public", "Map", "<", "String", ",", "String", ">", "processTemplate", "(", "ActionMessage", "msg", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "String", ">", "emailProcessed", "=", "new", "HashMap", "<>", "(", ")", ";", "PluginMessageDescrip...
Process a PluginMessage and creates email content based on templates. @param msg the PluginMessage to be processed @return a Map with following entries: - "emailSubject": Subject of the email - "emailBodyPlain": Content for plain text email - "emailBodyHtml": Content for html email @throws Exception on any problem
[ "Process", "a", "PluginMessage", "and", "creates", "email", "content", "based", "on", "templates", "." ]
train
https://github.com/hawkular/hawkular-alerts/blob/b4a0c2909b38e03e72cc1828219562ee8fcbf426/actions/actions-plugins/actions-email/src/main/java/org/hawkular/alerts/actions/email/EmailTemplate.java#L133-L186
morfologik/morfologik-stemming
morfologik-stemming/src/main/java/morfologik/stemming/BufferUtils.java
BufferUtils.sharedPrefixLength
static int sharedPrefixLength(ByteBuffer a, int aStart, ByteBuffer b, int bStart) { """ Compute the length of the shared prefix between two byte sequences. """ int i = 0; final int max = Math.min(a.remaining() - aStart, b.remaining() - bStart); aStart += a.position(); bStart += b.position()...
java
static int sharedPrefixLength(ByteBuffer a, int aStart, ByteBuffer b, int bStart) { int i = 0; final int max = Math.min(a.remaining() - aStart, b.remaining() - bStart); aStart += a.position(); bStart += b.position(); while (i < max && a.get(aStart++) == b.get(bStart++)) { i++; } ...
[ "static", "int", "sharedPrefixLength", "(", "ByteBuffer", "a", ",", "int", "aStart", ",", "ByteBuffer", "b", ",", "int", "bStart", ")", "{", "int", "i", "=", "0", ";", "final", "int", "max", "=", "Math", ".", "min", "(", "a", ".", "remaining", "(", ...
Compute the length of the shared prefix between two byte sequences.
[ "Compute", "the", "length", "of", "the", "shared", "prefix", "between", "two", "byte", "sequences", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-stemming/src/main/java/morfologik/stemming/BufferUtils.java#L99-L108
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsWidgetDialog.java
CmsWidgetDialog.createDialogRowsHtml
protected String createDialogRowsHtml(int startIndex, int endIndex) { """ Creates the dialog widget rows HTML for the specified widget indices.<p> @param startIndex the widget index to start with @param endIndex the widget index to stop at @return the dialog widget rows HTML for the specified widget indices...
java
protected String createDialogRowsHtml(int startIndex, int endIndex) { StringBuffer result = new StringBuffer((endIndex - startIndex) * 8); for (int i = startIndex; i <= endIndex; i++) { CmsWidgetDialogParameter base = getWidgets().get(i); result.append(createDialogRowHtml(base))...
[ "protected", "String", "createDialogRowsHtml", "(", "int", "startIndex", ",", "int", "endIndex", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "(", "endIndex", "-", "startIndex", ")", "*", "8", ")", ";", "for", "(", "int", "i", "=", ...
Creates the dialog widget rows HTML for the specified widget indices.<p> @param startIndex the widget index to start with @param endIndex the widget index to stop at @return the dialog widget rows HTML for the specified widget indices
[ "Creates", "the", "dialog", "widget", "rows", "HTML", "for", "the", "specified", "widget", "indices", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsWidgetDialog.java#L1042-L1050
f2prateek/dart
henson/src/main/java/dart/henson/Bundler.java
Bundler.putStringArrayList
public Bundler putStringArrayList(String key, ArrayList<String> value) { """ Inserts an ArrayList<String> value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or ...
java
public Bundler putStringArrayList(String key, ArrayList<String> value) { delegate.putStringArrayList(key, value); return this; }
[ "public", "Bundler", "putStringArrayList", "(", "String", "key", ",", "ArrayList", "<", "String", ">", "value", ")", "{", "delegate", ".", "putStringArrayList", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts an ArrayList<String> value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or null @return this bundler instance to chain method calls
[ "Inserts", "an", "ArrayList<String", ">", "value", "into", "the", "mapping", "of", "the", "underlying", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/f2prateek/dart/blob/7163b1b148e5141817975ae7dad99d58a8589aeb/henson/src/main/java/dart/henson/Bundler.java#L192-L195
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java
DockerAgentUtils.updateImageParentOnAgents
public static boolean updateImageParentOnAgents(final JenkinsBuildInfoLog log, final String imageTag, final String host, final int buildInfoId) throws IOException, InterruptedException { """ Updates property of parent id for the image provided. Returns false if image was not captured true otherwise. @param log...
java
public static boolean updateImageParentOnAgents(final JenkinsBuildInfoLog log, final String imageTag, final String host, final int buildInfoId) throws IOException, InterruptedException { boolean parentUpdated = updateImageParent(log, imageTag, host, buildInfoId); List<Node> nodes = Jenkins.getInstance()...
[ "public", "static", "boolean", "updateImageParentOnAgents", "(", "final", "JenkinsBuildInfoLog", "log", ",", "final", "String", "imageTag", ",", "final", "String", "host", ",", "final", "int", "buildInfoId", ")", "throws", "IOException", ",", "InterruptedException", ...
Updates property of parent id for the image provided. Returns false if image was not captured true otherwise. @param log @param imageTag @param host @param buildInfoId @return @throws IOException @throws InterruptedException
[ "Updates", "property", "of", "parent", "id", "for", "the", "image", "provided", ".", "Returns", "false", "if", "image", "was", "not", "captured", "true", "otherwise", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java#L228-L243
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.hasText
public static void hasText(String value, Supplier<String> message) { """ Assert that the given {@link String} is not blank. The assertion holds if and only if the {@link String} is not {@literal null}, {@link String#isEmpty() empty} or contains only {@link Character#isWhitespace(char) whitespace characters}. ...
java
public static void hasText(String value, Supplier<String> message) { if (isBlank(value)) { throw new IllegalArgumentException(message.get()); } }
[ "public", "static", "void", "hasText", "(", "String", "value", ",", "Supplier", "<", "String", ">", "message", ")", "{", "if", "(", "isBlank", "(", "value", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ".", "get", "(", ")", ...
Assert that the given {@link String} is not blank. The assertion holds if and only if the {@link String} is not {@literal null}, {@link String#isEmpty() empty} or contains only {@link Character#isWhitespace(char) whitespace characters}. @param value {@link String} being evaluated. @param message {@link Supplier} cont...
[ "Assert", "that", "the", "given", "{", "@link", "String", "}", "is", "not", "blank", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L382-L386
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.improperUseOfTheParameter
public static void improperUseOfTheParameter(String conversionName,String xmlPath,String className) { """ Thrown if the use of the parameters is incorrect. @param conversionName conversion name @param xmlPath xml path @param className class name """ throw new XmlConversionParameterException(MSG.INSTANCE....
java
public static void improperUseOfTheParameter(String conversionName,String xmlPath,String className){ throw new XmlConversionParameterException(MSG.INSTANCE.message(xmlConversionParameterException,conversionName,xmlPath,className)); }
[ "public", "static", "void", "improperUseOfTheParameter", "(", "String", "conversionName", ",", "String", "xmlPath", ",", "String", "className", ")", "{", "throw", "new", "XmlConversionParameterException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "xmlConvers...
Thrown if the use of the parameters is incorrect. @param conversionName conversion name @param xmlPath xml path @param className class name
[ "Thrown", "if", "the", "use", "of", "the", "parameters", "is", "incorrect", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L347-L349
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java
ParseUtil.match
private static boolean match(char c, long lowMask, long highMask) { """ Tell whether the given character is permitted by the given mask pair """ if (c < 64) return ((1L << c) & lowMask) != 0; if (c < 128) return ((1L << (c - 64)) & highMask) != 0; return false; ...
java
private static boolean match(char c, long lowMask, long highMask) { if (c < 64) return ((1L << c) & lowMask) != 0; if (c < 128) return ((1L << (c - 64)) & highMask) != 0; return false; }
[ "private", "static", "boolean", "match", "(", "char", "c", ",", "long", "lowMask", ",", "long", "highMask", ")", "{", "if", "(", "c", "<", "64", ")", "return", "(", "(", "1L", "<<", "c", ")", "&", "lowMask", ")", "!=", "0", ";", "if", "(", "c",...
Tell whether the given character is permitted by the given mask pair
[ "Tell", "whether", "the", "given", "character", "is", "permitted", "by", "the", "given", "mask", "pair" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L519-L525
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java
BackPropagationNet.setMomentum
public void setMomentum(double momentum) { """ Sets the non negative momentum used in training. @param momentum the momentum to apply to training """ if(momentum < 0 || Double.isNaN(momentum) || Double.isInfinite(momentum)) throw new ArithmeticException("Momentum must be non negative, not ...
java
public void setMomentum(double momentum) { if(momentum < 0 || Double.isNaN(momentum) || Double.isInfinite(momentum)) throw new ArithmeticException("Momentum must be non negative, not " + momentum); this.momentum = momentum; }
[ "public", "void", "setMomentum", "(", "double", "momentum", ")", "{", "if", "(", "momentum", "<", "0", "||", "Double", ".", "isNaN", "(", "momentum", ")", "||", "Double", ".", "isInfinite", "(", "momentum", ")", ")", "throw", "new", "ArithmeticException", ...
Sets the non negative momentum used in training. @param momentum the momentum to apply to training
[ "Sets", "the", "non", "negative", "momentum", "used", "in", "training", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java#L315-L320
jdereg/java-util
src/main/java/com/cedarsoftware/util/IOUtilities.java
IOUtilities.transfer
public static void transfer(InputStream in, byte[] bytes) throws IOException { """ Use this when you expect a byte[] length of bytes to be read from the InputStream """ // Read in the bytes int offset = 0; int numRead; while (offset < bytes.length && (numRead = in.read(bytes, of...
java
public static void transfer(InputStream in, byte[] bytes) throws IOException { // Read in the bytes int offset = 0; int numRead; while (offset < bytes.length && (numRead = in.read(bytes, offset, bytes.length - offset)) >= 0) { offset += numRead; } ...
[ "public", "static", "void", "transfer", "(", "InputStream", "in", ",", "byte", "[", "]", "bytes", ")", "throws", "IOException", "{", "// Read in the bytes", "int", "offset", "=", "0", ";", "int", "numRead", ";", "while", "(", "offset", "<", "bytes", ".", ...
Use this when you expect a byte[] length of bytes to be read from the InputStream
[ "Use", "this", "when", "you", "expect", "a", "byte", "[]", "length", "of", "bytes", "to", "be", "read", "from", "the", "InputStream" ]
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/IOUtilities.java#L132-L146
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/ApplicationLauncherApp.java
ApplicationLauncherApp.handleContextMenu
private void handleContextMenu(JTree tree, int x, int y) { """ Displays a context menu for a class leaf node Allows copying of the name and the path to the source """ TreePath path = tree.getPathForLocation(x, y); tree.setSelectionPath(path); DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.g...
java
private void handleContextMenu(JTree tree, int x, int y) { TreePath path = tree.getPathForLocation(x, y); tree.setSelectionPath(path); DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node == null) return; if (!node.isLeaf()) { tree.setSelectionPath(null);...
[ "private", "void", "handleContextMenu", "(", "JTree", "tree", ",", "int", "x", ",", "int", "y", ")", "{", "TreePath", "path", "=", "tree", ".", "getPathForLocation", "(", "x", ",", "y", ")", ";", "tree", ".", "setSelectionPath", "(", "path", ")", ";", ...
Displays a context menu for a class leaf node Allows copying of the name and the path to the source
[ "Displays", "a", "context", "menu", "for", "a", "class", "leaf", "node", "Allows", "copying", "of", "the", "name", "and", "the", "path", "to", "the", "source" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/ApplicationLauncherApp.java#L337-L371
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.replaceAll
public static String replaceAll(String source, Pattern pattern, Handler<String, String> handler) { """ Replace all pattern occurrences using match transformer. This method is the standard replace all but allows for matched pattern transformation via caller code handler. Common usage is to supply match transformer...
java
public static String replaceAll(String source, Pattern pattern, Handler<String, String> handler) { Matcher matcher = pattern.matcher(source); StringBuilder builder = new StringBuilder(); int start = 0; while(matcher.find(start)) { builder.append(source.substring(start, matcher.start())); ...
[ "public", "static", "String", "replaceAll", "(", "String", "source", ",", "Pattern", "pattern", ",", "Handler", "<", "String", ",", "String", ">", "handler", ")", "{", "Matcher", "matcher", "=", "pattern", ".", "matcher", "(", "source", ")", ";", "StringBu...
Replace all pattern occurrences using match transformer. This method is the standard replace all but allows for matched pattern transformation via caller code handler. Common usage is to supply match transformer as anonymous instance of {@link Handler} interface. If {@link Handler#handle(Object)} method returns given <...
[ "Replace", "all", "pattern", "occurrences", "using", "match", "transformer", ".", "This", "method", "is", "the", "standard", "replace", "all", "but", "allows", "for", "matched", "pattern", "transformation", "via", "caller", "code", "handler", ".", "Common", "usa...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1169-L1188
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listCustomPrebuiltEntitiesAsync
public Observable<List<EntityExtractor>> listCustomPrebuiltEntitiesAsync(UUID appId, String versionId) { """ Gets all custom prebuilt entities information of this application. @param appId The application ID. @param versionId The version ID. @throws IllegalArgumentException thrown if parameters fail the valid...
java
public Observable<List<EntityExtractor>> listCustomPrebuiltEntitiesAsync(UUID appId, String versionId) { return listCustomPrebuiltEntitiesWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<List<EntityExtractor>>, List<EntityExtractor>>() { @Override public List<Enti...
[ "public", "Observable", "<", "List", "<", "EntityExtractor", ">", ">", "listCustomPrebuiltEntitiesAsync", "(", "UUID", "appId", ",", "String", "versionId", ")", "{", "return", "listCustomPrebuiltEntitiesWithServiceResponseAsync", "(", "appId", ",", "versionId", ")", "...
Gets all custom prebuilt entities information of this application. @param appId The application ID. @param versionId The version ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;EntityExtractor&gt; object
[ "Gets", "all", "custom", "prebuilt", "entities", "information", "of", "this", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L6005-L6012
denisneuling/cctrl.jar
cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java
ClassUtil.getClassAnnotationValue
@SuppressWarnings( { """ <p> getClassAnnotationValue. </p> @param source a {@link java.lang.Class} object. @param annotation a {@link java.lang.Class} object. @param attributeName a {@link java.lang.String} object. @param expected a {@link java.lang.Class} object. @param <T> a T object. @return a T ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public static <T> T getClassAnnotationValue(Class source, Class annotation, String attributeName, Class<T> expected) { Annotation instance = source.getAnnotation(annotation); T value = null; if (instance != null) { try { value = (T) instance.annotationType()....
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "static", "<", "T", ">", "T", "getClassAnnotationValue", "(", "Class", "source", ",", "Class", "annotation", ",", "String", "attributeName", ",", "Class", "<", "T", ...
<p> getClassAnnotationValue. </p> @param source a {@link java.lang.Class} object. @param annotation a {@link java.lang.Class} object. @param attributeName a {@link java.lang.String} object. @param expected a {@link java.lang.Class} object. @param <T> a T object. @return a T object.
[ "<p", ">", "getClassAnnotationValue", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/cctrl.jar/blob/37450d824f4dc5ecbcc81c61e48f1ec876ca2de8/cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java#L50-L61
bazaarvoice/emodb
common/client/src/main/java/com/bazaarvoice/emodb/client/uri/EmoUriComponent.java
EmoUriComponent.decodeQuery
public static MultivaluedMap<String, String> decodeQuery(String q, boolean decode) { """ Decode the query component of a URI. <p> Query parameter names in the returned map are always decoded. Decoding of query parameter values can be controlled using the {@code decode} parameter flag. </p> @param q the...
java
public static MultivaluedMap<String, String> decodeQuery(String q, boolean decode) { return decodeQuery(q, true, decode); }
[ "public", "static", "MultivaluedMap", "<", "String", ",", "String", ">", "decodeQuery", "(", "String", "q", ",", "boolean", "decode", ")", "{", "return", "decodeQuery", "(", "q", ",", "true", ",", "decode", ")", ";", "}" ]
Decode the query component of a URI. <p> Query parameter names in the returned map are always decoded. Decoding of query parameter values can be controlled using the {@code decode} parameter flag. </p> @param q the query component in encoded form. @param decode {@code true} if the returned query parameter values ...
[ "Decode", "the", "query", "component", "of", "a", "URI", ".", "<p", ">", "Query", "parameter", "names", "in", "the", "returned", "map", "are", "always", "decoded", ".", "Decoding", "of", "query", "parameter", "values", "can", "be", "controlled", "using", "...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/client/src/main/java/com/bazaarvoice/emodb/client/uri/EmoUriComponent.java#L485-L487
apache/incubator-gobblin
gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriterBuilder.java
EventhubDataWriterBuilder.getAsyncDataWriter
public AsyncDataWriter getAsyncDataWriter(Properties properties) { """ Create an eventhub data writer, wrapped into a buffered async data writer """ EventhubDataWriter eventhubDataWriter = new EventhubDataWriter(properties); EventhubBatchAccumulator accumulator = new EventhubBatchAccumulator(properties...
java
public AsyncDataWriter getAsyncDataWriter(Properties properties) { EventhubDataWriter eventhubDataWriter = new EventhubDataWriter(properties); EventhubBatchAccumulator accumulator = new EventhubBatchAccumulator(properties); BatchedEventhubDataWriter batchedEventhubDataWriter = new BatchedEventhubDataWriter(...
[ "public", "AsyncDataWriter", "getAsyncDataWriter", "(", "Properties", "properties", ")", "{", "EventhubDataWriter", "eventhubDataWriter", "=", "new", "EventhubDataWriter", "(", "properties", ")", ";", "EventhubBatchAccumulator", "accumulator", "=", "new", "EventhubBatchAccu...
Create an eventhub data writer, wrapped into a buffered async data writer
[ "Create", "an", "eventhub", "data", "writer", "wrapped", "into", "a", "buffered", "async", "data", "writer" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriterBuilder.java#L42-L47
jamesagnew/hapi-fhir
hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java
FhirServerImpl.unregisterOsgiProvider
@Override public void unregisterOsgiProvider (Object provider) throws FhirConfigurationException { """ Dynamically unregisters a single provider with the RestfulServer @param provider the provider to be unregistered @throws FhirConfigurationException """ if (null == provider) { throw new NullPointerE...
java
@Override public void unregisterOsgiProvider (Object provider) throws FhirConfigurationException { if (null == provider) { throw new NullPointerException("FHIR Provider cannot be null"); } try { this.serverProviders.remove(provider); log.trace("unregistered provider. class ["+provider.getClass().getName...
[ "@", "Override", "public", "void", "unregisterOsgiProvider", "(", "Object", "provider", ")", "throws", "FhirConfigurationException", "{", "if", "(", "null", "==", "provider", ")", "{", "throw", "new", "NullPointerException", "(", "\"FHIR Provider cannot be null\"", ")...
Dynamically unregisters a single provider with the RestfulServer @param provider the provider to be unregistered @throws FhirConfigurationException
[ "Dynamically", "unregisters", "a", "single", "provider", "with", "the", "RestfulServer" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java#L81-L94
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/database/RecordMapper.java
RecordMapper.setField
protected void setField(Field field, Object object) throws IllegalAccessException { """ Implement in inner class in domain class decorator to ensure access to private and protected fields @param field @param object @throws IllegalAccessException """ dataObject.setField(field, object); }
java
protected void setField(Field field, Object object) throws IllegalAccessException { dataObject.setField(field, object); }
[ "protected", "void", "setField", "(", "Field", "field", ",", "Object", "object", ")", "throws", "IllegalAccessException", "{", "dataObject", ".", "setField", "(", "field", ",", "object", ")", ";", "}" ]
Implement in inner class in domain class decorator to ensure access to private and protected fields @param field @param object @throws IllegalAccessException
[ "Implement", "in", "inner", "class", "in", "domain", "class", "decorator", "to", "ensure", "access", "to", "private", "and", "protected", "fields" ]
train
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/database/RecordMapper.java#L133-L135
graknlabs/grakn
server/src/server/exception/TransactionException.java
TransactionException.illegalUnhasInherited
public static TransactionException illegalUnhasInherited(String type, String attributeType, boolean isKey) { """ Thrown when there exists and instance of {@code type} HAS {@code attributeType} upon unlinking the AttributeType from the Type """ return create(ErrorMessage.ILLEGAL_TYPE_UNHAS_ATTRIBUTE_INH...
java
public static TransactionException illegalUnhasInherited(String type, String attributeType, boolean isKey) { return create(ErrorMessage.ILLEGAL_TYPE_UNHAS_ATTRIBUTE_INHERITED.getMessage(type, isKey ? "key" : "has", attributeType)); }
[ "public", "static", "TransactionException", "illegalUnhasInherited", "(", "String", "type", ",", "String", "attributeType", ",", "boolean", "isKey", ")", "{", "return", "create", "(", "ErrorMessage", ".", "ILLEGAL_TYPE_UNHAS_ATTRIBUTE_INHERITED", ".", "getMessage", "(",...
Thrown when there exists and instance of {@code type} HAS {@code attributeType} upon unlinking the AttributeType from the Type
[ "Thrown", "when", "there", "exists", "and", "instance", "of", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/exception/TransactionException.java#L129-L131
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/iter/Util.java
Util.nextWeekStart
static DateValue nextWeekStart(DateValue date, DayOfWeek weekday) { """ <p> Advances the given date to next date that falls on the given weekday. If the given date already falls on the given weekday, then the same date is returned. </p> <p> For example, if the date is a Thursday, and the week start is Monday...
java
static DateValue nextWeekStart(DateValue date, DayOfWeek weekday) { DTBuilder builder = new DTBuilder(date); builder.day += (7 - ((7 + (TimeUtils.dayOfWeek(date).getCalendarConstant() - weekday.getCalendarConstant())) % 7)) % 7; return builder.toDate(); }
[ "static", "DateValue", "nextWeekStart", "(", "DateValue", "date", ",", "DayOfWeek", "weekday", ")", "{", "DTBuilder", "builder", "=", "new", "DTBuilder", "(", "date", ")", ";", "builder", ".", "day", "+=", "(", "7", "-", "(", "(", "7", "+", "(", "TimeU...
<p> Advances the given date to next date that falls on the given weekday. If the given date already falls on the given weekday, then the same date is returned. </p> <p> For example, if the date is a Thursday, and the week start is Monday, this method will return a date value that is set to the next Monday (4 days in th...
[ "<p", ">", "Advances", "the", "given", "date", "to", "next", "date", "that", "falls", "on", "the", "given", "weekday", ".", "If", "the", "given", "date", "already", "falls", "on", "the", "given", "weekday", "then", "the", "same", "date", "is", "returned"...
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/iter/Util.java#L69-L73
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.addPartition
@RuleSetup public void addPartition(String partitionId, String suffix) { """ Adds a partition to the rule. The actual parititon is created when the rule is applied. @param partitionId the id of the partition @param suffix the suffix of the partition """ this.partitions.put(partitionId, suffi...
java
@RuleSetup public void addPartition(String partitionId, String suffix) { this.partitions.put(partitionId, suffix); }
[ "@", "RuleSetup", "public", "void", "addPartition", "(", "String", "partitionId", ",", "String", "suffix", ")", "{", "this", ".", "partitions", ".", "put", "(", "partitionId", ",", "suffix", ")", ";", "}" ]
Adds a partition to the rule. The actual parititon is created when the rule is applied. @param partitionId the id of the partition @param suffix the suffix of the partition
[ "Adds", "a", "partition", "to", "the", "rule", ".", "The", "actual", "parititon", "is", "created", "when", "the", "rule", "is", "applied", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L371-L375
gitblit/fathom
fathom-rest-swagger/src/main/java/fathom/rest/swagger/SwaggerBuilder.java
SwaggerBuilder.translate
protected String translate(String messageKey, String defaultMessage) { """ Attempts to provide a localized message. @param messageKey @param defaultMessage @return the default message or a localized message or null """ if (messages == null || Strings.isNullOrEmpty(messageKey)) { return...
java
protected String translate(String messageKey, String defaultMessage) { if (messages == null || Strings.isNullOrEmpty(messageKey)) { return Strings.emptyToNull(defaultMessage); } return Strings.emptyToNull(messages.getWithDefault(messageKey, defaultMessage, defaultLanguage)); }
[ "protected", "String", "translate", "(", "String", "messageKey", ",", "String", "defaultMessage", ")", "{", "if", "(", "messages", "==", "null", "||", "Strings", ".", "isNullOrEmpty", "(", "messageKey", ")", ")", "{", "return", "Strings", ".", "emptyToNull", ...
Attempts to provide a localized message. @param messageKey @param defaultMessage @return the default message or a localized message or null
[ "Attempts", "to", "provide", "a", "localized", "message", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-rest-swagger/src/main/java/fathom/rest/swagger/SwaggerBuilder.java#L1083-L1088
gitblit/fathom
fathom-x509/src/main/java/fathom/x509/X509Utils.java
X509Utils.newCertificateRevocationList
public static void newCertificateRevocationList(File caRevocationList, File caKeystoreFile, String caKeystorePassword) { """ Creates a new certificate revocation list (CRL). This function will destroy any existing CRL file. @param caRevocationList @param caKeystoreFile @param caKeystorePassword @return ...
java
public static void newCertificateRevocationList(File caRevocationList, File caKeystoreFile, String caKeystorePassword) { try { // read the Fathom CA key and certificate KeyStore store = openKeyStore(caKeystoreFile, caKeystorePassword); PrivateKey caPrivateKey = (PrivateKey) s...
[ "public", "static", "void", "newCertificateRevocationList", "(", "File", "caRevocationList", ",", "File", "caKeystoreFile", ",", "String", "caKeystorePassword", ")", "{", "try", "{", "// read the Fathom CA key and certificate", "KeyStore", "store", "=", "openKeyStore", "(...
Creates a new certificate revocation list (CRL). This function will destroy any existing CRL file. @param caRevocationList @param caKeystoreFile @param caKeystorePassword @return
[ "Creates", "a", "new", "certificate", "revocation", "list", "(", "CRL", ")", ".", "This", "function", "will", "destroy", "any", "existing", "CRL", "file", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-x509/src/main/java/fathom/x509/X509Utils.java#L669-L705
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_database_name_dump_POST
public OvhTask serviceName_database_name_dump_POST(String serviceName, String name, OvhDateEnum date, Boolean sendEmail) throws IOException { """ Request the dump from your database REST: POST /hosting/web/{serviceName}/database/{name}/dump @param date [required] The date you want to dump @param sendEmail [re...
java
public OvhTask serviceName_database_name_dump_POST(String serviceName, String name, OvhDateEnum date, Boolean sendEmail) throws IOException { String qPath = "/hosting/web/{serviceName}/database/{name}/dump"; StringBuilder sb = path(qPath, serviceName, name); HashMap<String, Object>o = new HashMap<String, Object>(...
[ "public", "OvhTask", "serviceName_database_name_dump_POST", "(", "String", "serviceName", ",", "String", "name", ",", "OvhDateEnum", "date", ",", "Boolean", "sendEmail", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/database/{nam...
Request the dump from your database REST: POST /hosting/web/{serviceName}/database/{name}/dump @param date [required] The date you want to dump @param sendEmail [required] Send an email when dump will be available? Default: true @param serviceName [required] The internal name of your hosting @param name [required] Dat...
[ "Request", "the", "dump", "from", "your", "database" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1198-L1206
spring-cloud/spring-cloud-contract
spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/assertion/CollectionAssert.java
CollectionAssert.hasFlattenedSizeBetween
public CollectionAssert hasFlattenedSizeBetween(int lowerBound, int higherBound) { """ Flattens the collection and checks whether size is between the provided value. @param lowerBound - the flattened collection should have size greater than or equal to this value @param higherBound - the flattened collection sh...
java
public CollectionAssert hasFlattenedSizeBetween(int lowerBound, int higherBound) { isNotNull(); int flattenedSize = flattenedSize(0, this.actual); if (!(flattenedSize >= lowerBound && flattenedSize <= higherBound)) { failWithMessage("The flattened size <%s> is not between <%s> and <%s>", flattenedSize, lo...
[ "public", "CollectionAssert", "hasFlattenedSizeBetween", "(", "int", "lowerBound", ",", "int", "higherBound", ")", "{", "isNotNull", "(", ")", ";", "int", "flattenedSize", "=", "flattenedSize", "(", "0", ",", "this", ".", "actual", ")", ";", "if", "(", "!", ...
Flattens the collection and checks whether size is between the provided value. @param lowerBound - the flattened collection should have size greater than or equal to this value @param higherBound - the flattened collection should have size less than or equal to this value @return this
[ "Flattens", "the", "collection", "and", "checks", "whether", "size", "is", "between", "the", "provided", "value", "." ]
train
https://github.com/spring-cloud/spring-cloud-contract/blob/857da51950a87b393286e3bb1b2208c420c01087/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/assertion/CollectionAssert.java#L115-L123
devnull-tools/trugger
src/main/java/tools/devnull/trugger/util/factory/ContextFactory.java
ContextFactory.toCreate
public ContextFactory toCreate(BiFunction<Constructor, Object[], Object> function) { """ Changes the way the objects are created by using the given function. @param function the function to use for creating the objects. @return a new ContextFactory that uses the given function and this context """ retu...
java
public ContextFactory toCreate(BiFunction<Constructor, Object[], Object> function) { return new ContextFactory(this.context, function); }
[ "public", "ContextFactory", "toCreate", "(", "BiFunction", "<", "Constructor", ",", "Object", "[", "]", ",", "Object", ">", "function", ")", "{", "return", "new", "ContextFactory", "(", "this", ".", "context", ",", "function", ")", ";", "}" ]
Changes the way the objects are created by using the given function. @param function the function to use for creating the objects. @return a new ContextFactory that uses the given function and this context
[ "Changes", "the", "way", "the", "objects", "are", "created", "by", "using", "the", "given", "function", "." ]
train
https://github.com/devnull-tools/trugger/blob/614d5f0b30daf82fc251a46fb436d0fc5e787627/src/main/java/tools/devnull/trugger/util/factory/ContextFactory.java#L89-L91
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.beginCreateOrUpdateAsync
public Observable<AppServiceEnvironmentResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { """ Create or update an App Service Environment. Create or update an App Service Environment. @param resourceGroupName Name of t...
java
public Observable<AppServiceEnvironmentResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1<ServiceResp...
[ "public", "Observable", "<", "AppServiceEnvironmentResourceInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "AppServiceEnvironmentResourceInner", "hostingEnvironmentEnvelope", ")", "{", "return", "beginCreateOrUpdateWithServ...
Create or update an App Service Environment. Create or update an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. @throws I...
[ "Create", "or", "update", "an", "App", "Service", "Environment", ".", "Create", "or", "update", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L796-L803
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/CmsImagePreviewHandler.java
CmsImagePreviewHandler.getImageAttributes
public void getImageAttributes(I_CmsSimpleCallback<Map<String, String>> callback) { """ Returns image tag attributes to set for editor plugins.<p> @param callback the callback to execute """ Map<String, String> result = new HashMap<String, String>(); result.put(Attribute.hash.name(), String...
java
public void getImageAttributes(I_CmsSimpleCallback<Map<String, String>> callback) { Map<String, String> result = new HashMap<String, String>(); result.put(Attribute.hash.name(), String.valueOf(getImageIdHash())); m_formatHandler.getImageAttributes(result); m_previewDialog.getImageAttrib...
[ "public", "void", "getImageAttributes", "(", "I_CmsSimpleCallback", "<", "Map", "<", "String", ",", "String", ">", ">", "callback", ")", "{", "Map", "<", "String", ",", "String", ">", "result", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(...
Returns image tag attributes to set for editor plugins.<p> @param callback the callback to execute
[ "Returns", "image", "tag", "attributes", "to", "set", "for", "editor", "plugins", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/CmsImagePreviewHandler.java#L204-L210
line/armeria
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
ServerBuilder.serviceAt
@Deprecated public ServerBuilder serviceAt(String pathPattern, Service<HttpRequest, HttpResponse> service) { """ Binds the specified {@link Service} at the specified path pattern of the default {@link VirtualHost}. @deprecated Use {@link #service(String, Service)} instead. """ return service(pat...
java
@Deprecated public ServerBuilder serviceAt(String pathPattern, Service<HttpRequest, HttpResponse> service) { return service(pathPattern, service); }
[ "@", "Deprecated", "public", "ServerBuilder", "serviceAt", "(", "String", "pathPattern", ",", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", "service", ")", "{", "return", "service", "(", "pathPattern", ",", "service", ")", ";", "}" ]
Binds the specified {@link Service} at the specified path pattern of the default {@link VirtualHost}. @deprecated Use {@link #service(String, Service)} instead.
[ "Binds", "the", "specified", "{", "@link", "Service", "}", "at", "the", "specified", "path", "pattern", "of", "the", "default", "{", "@link", "VirtualHost", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java#L880-L883
icode/ameba-utils
src/main/java/ameba/util/Assert.java
Assert.isBlank
public static void isBlank(String text, String message) { """ Assert that the given String is not empty; that is, it must not be {@code null} and not the empty String. <pre class="code">Assert.hasLength(name, "Name must not be empty");</pre> @param text the String to check @param message the exception messag...
java
public static void isBlank(String text, String message) { if (StringUtils.isBlank(text)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "isBlank", "(", "String", "text", ",", "String", "message", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "text", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that the given String is not empty; that is, it must not be {@code null} and not the empty String. <pre class="code">Assert.hasLength(name, "Name must not be empty");</pre> @param text the String to check @param message the exception message to use if the assertion fails @see org.apache.commons.lang3.StringUtil...
[ "Assert", "that", "the", "given", "String", "is", "not", "empty", ";", "that", "is", "it", "must", "not", "be", "{", "@code", "null", "}", "and", "not", "the", "empty", "String", ".", "<pre", "class", "=", "code", ">", "Assert", ".", "hasLength", "("...
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/Assert.java#L128-L132
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonWriter.java
JsonWriter.property
public JsonWriter property(String key, Map<String, ?> map) throws IOException { """ Writes a map with the given key name @param key the key name for the map @param map the map to be written @return This structured writer @throws IOException Something went wrong writing """ Preconditions.checkArgume...
java
public JsonWriter property(String key, Map<String, ?> map) throws IOException { Preconditions.checkArgument(!inArray(), "Cannot write a property inside an array."); writeName(key); value(map); return this; }
[ "public", "JsonWriter", "property", "(", "String", "key", ",", "Map", "<", "String", ",", "?", ">", "map", ")", "throws", "IOException", "{", "Preconditions", ".", "checkArgument", "(", "!", "inArray", "(", ")", ",", "\"Cannot write a property inside an array.\"...
Writes a map with the given key name @param key the key name for the map @param map the map to be written @return This structured writer @throws IOException Something went wrong writing
[ "Writes", "a", "map", "with", "the", "given", "key", "name" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonWriter.java#L307-L312
lessthanoptimal/BoofCV
examples/src/main/java/boofcv/examples/imageprocessing/ExampleFourierTransform.java
ExampleFourierTransform.applyBoxFilter
public static void applyBoxFilter( GrayF32 input ) { """ Demonstration of how to apply a box filter in the frequency domain and compares the results to a box filter which has been applied in the spatial domain """ // declare storage GrayF32 boxImage = new GrayF32(input.width, input.height); Interleaved...
java
public static void applyBoxFilter( GrayF32 input ) { // declare storage GrayF32 boxImage = new GrayF32(input.width, input.height); InterleavedF32 boxTransform = new InterleavedF32(input.width,input.height,2); InterleavedF32 transform = new InterleavedF32(input.width,input.height,2); GrayF32 blurredImage = ne...
[ "public", "static", "void", "applyBoxFilter", "(", "GrayF32", "input", ")", "{", "// declare storage", "GrayF32", "boxImage", "=", "new", "GrayF32", "(", "input", ".", "width", ",", "input", ".", "height", ")", ";", "InterleavedF32", "boxTransform", "=", "new"...
Demonstration of how to apply a box filter in the frequency domain and compares the results to a box filter which has been applied in the spatial domain
[ "Demonstration", "of", "how", "to", "apply", "a", "box", "filter", "in", "the", "frequency", "domain", "and", "compares", "the", "results", "to", "a", "box", "filter", "which", "has", "been", "applied", "in", "the", "spatial", "domain" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/imageprocessing/ExampleFourierTransform.java#L49-L111
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.deleteById
public void deleteById(String resourceId, String apiVersion) { """ Deletes a resource by ID. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource...
java
public void deleteById(String resourceId, String apiVersion) { deleteByIdWithServiceResponseAsync(resourceId, apiVersion).toBlocking().last().body(); }
[ "public", "void", "deleteById", "(", "String", "resourceId", ",", "String", "apiVersion", ")", "{", "deleteByIdWithServiceResponseAsync", "(", "resourceId", ",", "apiVersion", ")", ".", "toBlocking", "(", ")", ".", "last", "(", ")", ".", "body", "(", ")", ";...
Deletes a resource by ID. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} @param apiVersion The API version to use for the op...
[ "Deletes", "a", "resource", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L1925-L1927
andkulikov/Transitions-Everywhere
library(1.x)/src/main/java/com/transitionseverywhere/utils/RectEvaluator.java
RectEvaluator.evaluate
@Override @NonNull public Rect evaluate(float fraction, @NonNull Rect startValue, @NonNull Rect endValue) { """ This function returns the result of linearly interpolating the start and end Rect values, with <code>fraction</code> representing the proportion between the start and end values. The calculatio...
java
@Override @NonNull public Rect evaluate(float fraction, @NonNull Rect startValue, @NonNull Rect endValue) { int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction); int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction); int right = startV...
[ "@", "Override", "@", "NonNull", "public", "Rect", "evaluate", "(", "float", "fraction", ",", "@", "NonNull", "Rect", "startValue", ",", "@", "NonNull", "Rect", "endValue", ")", "{", "int", "left", "=", "startValue", ".", "left", "+", "(", "int", ")", ...
This function returns the result of linearly interpolating the start and end Rect values, with <code>fraction</code> representing the proportion between the start and end values. The calculation is a simple parametric calculation on each of the separate components in the Rect objects (left, top, right, and bottom). <p...
[ "This", "function", "returns", "the", "result", "of", "linearly", "interpolating", "the", "start", "and", "end", "Rect", "values", "with", "<code", ">", "fraction<", "/", "code", ">", "representing", "the", "proportion", "between", "the", "start", "and", "end"...
train
https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/utils/RectEvaluator.java#L78-L91
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/JcNumber.java
JcNumber.minus
public JcNumber minus(Number val) { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the result of subtracting two numbers, return a <b>JcNumber</b></i></div> <br/> """ JcNumber ret = new JcNumber(val, this,...
java
public JcNumber minus(Number val) { JcNumber ret = new JcNumber(val, this, OPERATOR.Number.MINUS); QueryRecorder.recordInvocationConditional(this, "minus", ret, QueryRecorder.literal(val)); return ret; }
[ "public", "JcNumber", "minus", "(", "Number", "val", ")", "{", "JcNumber", "ret", "=", "new", "JcNumber", "(", "val", ",", "this", ",", "OPERATOR", ".", "Number", ".", "MINUS", ")", ";", "QueryRecorder", ".", "recordInvocationConditional", "(", "this", ","...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the result of subtracting two numbers, return a <b>JcNumber</b></i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/JcNumber.java#L91-L95
sebastiangraf/jSCSI
bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java
ProtocolDataUnit.deserializeDataSegment
private final int deserializeDataSegment (final ByteBuffer pdu, final int offset) throws IOException , InternetSCSIException , DigestException { """ Deserializes a array (starting from the given offset) and store the informations to the Data Segment. @param pdu The array to read from. @param offset The offset ...
java
private final int deserializeDataSegment (final ByteBuffer pdu, final int offset) throws IOException , InternetSCSIException , DigestException { final int length = basicHeaderSegment.getDataSegmentLength(); if (dataSegment == null || dataSegment.limit() < length) { dataSegment = ByteBuffer...
[ "private", "final", "int", "deserializeDataSegment", "(", "final", "ByteBuffer", "pdu", ",", "final", "int", "offset", ")", "throws", "IOException", ",", "InternetSCSIException", ",", "DigestException", "{", "final", "int", "length", "=", "basicHeaderSegment", ".", ...
Deserializes a array (starting from the given offset) and store the informations to the Data Segment. @param pdu The array to read from. @param offset The offset to start from. @return The length of the written bytes. @throws IOException if an I/O error occurs. @throws InternetSCSIException If any violation of the iSC...
[ "Deserializes", "a", "array", "(", "starting", "from", "the", "given", "offset", ")", "and", "store", "the", "informations", "to", "the", "Data", "Segment", "." ]
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L287-L308
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/startup/ConvergedServletContextImpl.java
ConvergedServletContextImpl.invokeMethod
private Object invokeMethod(ServletContextImpl appContext, final String methodName, Object[] params) throws Throwable { """ Use reflection to invoke the requested method. Cache the method object to speed up the process @param appContext The AppliationContext object on which the method will be invoked @param me...
java
private Object invokeMethod(ServletContextImpl appContext, final String methodName, Object[] params) throws Throwable { try { Method method = objectCache.get(methodName); if (method == null) { method = appContext.getClass().getMethod(methodName, classCache.get(methodName...
[ "private", "Object", "invokeMethod", "(", "ServletContextImpl", "appContext", ",", "final", "String", "methodName", ",", "Object", "[", "]", "params", ")", "throws", "Throwable", "{", "try", "{", "Method", "method", "=", "objectCache", ".", "get", "(", "method...
Use reflection to invoke the requested method. Cache the method object to speed up the process @param appContext The AppliationContext object on which the method will be invoked @param methodName The method to call. @param params The arguments passed to the called method.
[ "Use", "reflection", "to", "invoke", "the", "requested", "method", ".", "Cache", "the", "method", "object", "to", "speed", "up", "the", "process" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/startup/ConvergedServletContextImpl.java#L809-L825
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java
StorageDir.removeTempBlockMeta
public void removeTempBlockMeta(TempBlockMeta tempBlockMeta) throws BlockDoesNotExistException { """ Removes a temp block from this storage dir. @param tempBlockMeta the metadata of the temp block to remove @throws BlockDoesNotExistException if no temp block is found """ Preconditions.checkNotNull(temp...
java
public void removeTempBlockMeta(TempBlockMeta tempBlockMeta) throws BlockDoesNotExistException { Preconditions.checkNotNull(tempBlockMeta, "tempBlockMeta"); final long blockId = tempBlockMeta.getBlockId(); final long sessionId = tempBlockMeta.getSessionId(); TempBlockMeta deletedTempBlockMeta = mBlockId...
[ "public", "void", "removeTempBlockMeta", "(", "TempBlockMeta", "tempBlockMeta", ")", "throws", "BlockDoesNotExistException", "{", "Preconditions", ".", "checkNotNull", "(", "tempBlockMeta", ",", "\"tempBlockMeta\"", ")", ";", "final", "long", "blockId", "=", "tempBlockM...
Removes a temp block from this storage dir. @param tempBlockMeta the metadata of the temp block to remove @throws BlockDoesNotExistException if no temp block is found
[ "Removes", "a", "temp", "block", "from", "this", "storage", "dir", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java#L345-L363
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/access/PortMapping.java
PortMapping.updateProperties
public void updateProperties(Map<String, Container.PortBinding> dockerObtainedDynamicBindings) { """ Update variable-to-port mappings with dynamically obtained ports and host ips. This should only be called once after this dynamically allocated parts has been be obtained. @param dockerObtainedDynamicBindings k...
java
public void updateProperties(Map<String, Container.PortBinding> dockerObtainedDynamicBindings) { for (Map.Entry<String, Container.PortBinding> entry : dockerObtainedDynamicBindings.entrySet()) { String variable = entry.getKey(); Container.PortBinding portBinding = entry.getValue(); ...
[ "public", "void", "updateProperties", "(", "Map", "<", "String", ",", "Container", ".", "PortBinding", ">", "dockerObtainedDynamicBindings", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Container", ".", "PortBinding", ">", "entry", ":", "d...
Update variable-to-port mappings with dynamically obtained ports and host ips. This should only be called once after this dynamically allocated parts has been be obtained. @param dockerObtainedDynamicBindings keys are the container ports, values are the dynamically mapped host ports and host ips.
[ "Update", "variable", "-", "to", "-", "port", "mappings", "with", "dynamically", "obtained", "ports", "and", "host", "ips", ".", "This", "should", "only", "be", "called", "once", "after", "this", "dynamically", "allocated", "parts", "has", "been", "be", "obt...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/access/PortMapping.java#L104-L125
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getByte
public Byte getByte(String nameSpace, String cellName) { """ Returns the {@code Byte} 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 ...
java
public Byte getByte(String nameSpace, String cellName) { return getValue(nameSpace, cellName, Byte.class); }
[ "public", "Byte", "getByte", "(", "String", "nameSpace", ",", "String", "cellName", ")", "{", "return", "getValue", "(", "nameSpace", ",", "cellName", ",", "Byte", ".", "class", ")", ";", "}" ]
Returns the {@code Byte} 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 {@cod...
[ "Returns", "the", "{", "@code", "Byte", "}", "value", "of", "the", "{", "@link", "Cell", "}", "(", "associated", "to", "{", "@code", "table", "}", ")", "whose", "name", "iscellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", "cel...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L835-L837
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/NLS.java
NLS.getInteger
public int getInteger(String key, int defaultValue) { """ Not sure why this is here. Looks like it is a replacement for Integer.getInteger with error checking for the key (non-null check). """ int result = defaultValue; try { if (key != null) result = getInteger(ke...
java
public int getInteger(String key, int defaultValue) { int result = defaultValue; try { if (key != null) result = getInteger(key); } catch (MissingResourceException e) { } return result; }
[ "public", "int", "getInteger", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "int", "result", "=", "defaultValue", ";", "try", "{", "if", "(", "key", "!=", "null", ")", "result", "=", "getInteger", "(", "key", ")", ";", "}", "catch", "(...
Not sure why this is here. Looks like it is a replacement for Integer.getInteger with error checking for the key (non-null check).
[ "Not", "sure", "why", "this", "is", "here", ".", "Looks", "like", "it", "is", "a", "replacement", "for", "Integer", ".", "getInteger", "with", "error", "checking", "for", "the", "key", "(", "non", "-", "null", "check", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/NLS.java#L394-L402
gallandarakhneorg/afc
core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticLaw.java
StochasticLaw.paramBoolean
@Pure protected static boolean paramBoolean(String paramName, Map<String, String> parameters) throws LawParameterNotFoundException { """ Extract a parameter value from a map of parameters. @param paramName is the nameof the parameter to extract. @param parameters is the map of available parameters @return ...
java
@Pure protected static boolean paramBoolean(String paramName, Map<String, String> parameters) throws LawParameterNotFoundException { final String svalue = parameters.get(paramName); if (svalue != null && !"".equals(svalue)) { //$NON-NLS-1$ try { return Boolean.parseBoolean(svalue); } catch (AssertionEr...
[ "@", "Pure", "protected", "static", "boolean", "paramBoolean", "(", "String", "paramName", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "throws", "LawParameterNotFoundException", "{", "final", "String", "svalue", "=", "parameters", ".", "get...
Extract a parameter value from a map of parameters. @param paramName is the nameof the parameter to extract. @param parameters is the map of available parameters @return the extract value @throws LawParameterNotFoundException if the parameter was not found or the value is not a double.
[ "Extract", "a", "parameter", "value", "from", "a", "map", "of", "parameters", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticLaw.java#L76-L90
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/SerializeInterceptor.java
SerializeInterceptor.getImageContent
private byte[] getImageContent(InputStream in, String mime) throws FMSException { """ Method to return the byte[] value of the given image input stream @param in the input stream @param mime the mime type of the file @return byte[] the file content @throws FMSException """ byte[] imageInByte = null; ...
java
private byte[] getImageContent(InputStream in, String mime) throws FMSException { byte[] imageInByte = null; ByteArrayOutputStream baos = null; try { BufferedImage originalImage = ImageIO.read(in); baos = new ByteArrayOutputStream(); ImageIO.write(originalImage, mime, baos); baos.flush(); imageInBy...
[ "private", "byte", "[", "]", "getImageContent", "(", "InputStream", "in", ",", "String", "mime", ")", "throws", "FMSException", "{", "byte", "[", "]", "imageInByte", "=", "null", ";", "ByteArrayOutputStream", "baos", "=", "null", ";", "try", "{", "BufferedIm...
Method to return the byte[] value of the given image input stream @param in the input stream @param mime the mime type of the file @return byte[] the file content @throws FMSException
[ "Method", "to", "return", "the", "byte", "[]", "value", "of", "the", "given", "image", "input", "stream" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/SerializeInterceptor.java#L161-L178
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/mac/MACAddress.java
MACAddress.toEUI64
public MACAddress toEUI64(boolean asMAC) { """ Convert to IPv6 EUI-64 section http://standards.ieee.org/develop/regauth/tut/eui64.pdf @param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe Note that IP...
java
public MACAddress toEUI64(boolean asMAC) { if(!isExtended()) {//getSegmentCount() == EXTENDED_UNIQUE_IDENTIFIER_48_SEGMENT_COUNT MACAddressCreator creator = getAddressCreator(); MACAddressSegment segs[] = creator.createSegmentArray(EXTENDED_UNIQUE_IDENTIFIER_64_SEGMENT_COUNT); MACAddressSection section =...
[ "public", "MACAddress", "toEUI64", "(", "boolean", "asMAC", ")", "{", "if", "(", "!", "isExtended", "(", ")", ")", "{", "//getSegmentCount() == EXTENDED_UNIQUE_IDENTIFIER_48_SEGMENT_COUNT\r", "MACAddressCreator", "creator", "=", "getAddressCreator", "(", ")", ";", "MA...
Convert to IPv6 EUI-64 section http://standards.ieee.org/develop/regauth/tut/eui64.pdf @param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe Note that IPv6 treats MAC as EUI-48 and extends MAC to IPv6 addresses...
[ "Convert", "to", "IPv6", "EUI", "-", "64", "section" ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/mac/MACAddress.java#L511-L539
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.verifyDomainOwnership
public void verifyDomainOwnership(String resourceGroupName, String certificateOrderName) { """ Verify domain ownership for this certificate order. Verify domain ownership for this certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName ...
java
public void verifyDomainOwnership(String resourceGroupName, String certificateOrderName) { verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); }
[ "public", "void", "verifyDomainOwnership", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ")", "{", "verifyDomainOwnershipWithServiceResponseAsync", "(", "resourceGroupName", ",", "certificateOrderName", ")", ".", "toBlocking", "(", ")", ".", "...
Verify domain ownership for this certificate order. Verify domain ownership for this certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Verify", "domain", "ownership", "for", "this", "certificate", "order", ".", "Verify", "domain", "ownership", "for", "this", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L2144-L2146
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/MapUtils.java
MapUtils.getValue
public static <T> T getValue(Map<String, Object> map, String key, Class<T> clazz) { """ Extract a value from a map. @param map @param key @param clazz @return """ return map != null ? ValueUtils.convertValue(map.get(key), clazz) : null; }
java
public static <T> T getValue(Map<String, Object> map, String key, Class<T> clazz) { return map != null ? ValueUtils.convertValue(map.get(key), clazz) : null; }
[ "public", "static", "<", "T", ">", "T", "getValue", "(", "Map", "<", "String", ",", "Object", ">", "map", ",", "String", "key", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "map", "!=", "null", "?", "ValueUtils", ".", "convertValue", "...
Extract a value from a map. @param map @param key @param clazz @return
[ "Extract", "a", "value", "from", "a", "map", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/MapUtils.java#L40-L42
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/StereoProcessingBase.java
StereoProcessingBase.setImages
public void setImages( T leftImage , T rightImage ) { """ Sets the input images. Processing is delayed until {@link #initialize()} has been called. @param leftImage Left image @param rightImage Right image """ this.imageLeftInput = leftImage; this.imageRightInput = rightImage; // rectify input imag...
java
public void setImages( T leftImage , T rightImage ) { this.imageLeftInput = leftImage; this.imageRightInput = rightImage; // rectify input images distortLeftRect.apply(imageLeftInput, imageLeftRect); distortRightRect.apply(imageRightInput, imageRightRect); }
[ "public", "void", "setImages", "(", "T", "leftImage", ",", "T", "rightImage", ")", "{", "this", ".", "imageLeftInput", "=", "leftImage", ";", "this", ".", "imageRightInput", "=", "rightImage", ";", "// rectify input images", "distortLeftRect", ".", "apply", "(",...
Sets the input images. Processing is delayed until {@link #initialize()} has been called. @param leftImage Left image @param rightImage Right image
[ "Sets", "the", "input", "images", ".", "Processing", "is", "delayed", "until", "{", "@link", "#initialize", "()", "}", "has", "been", "called", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/StereoProcessingBase.java#L163-L170
JoeKerouac/utils
src/main/java/com/joe/utils/common/DateUtil.java
DateUtil.calc
public static long calc(String arg0, String arg1, String format, DateUnit dateUnit) { """ 计算arg0-arg1的时间差 @param arg0 日期字符串 @param arg1 日期字符串 @param format 日期字符串的格式 @param dateUnit 返回结果的单位 @return arg0-arg1的时间差,精确到指定的单位(field),出错时返回-1 """ try { return calc(getTime(format, a...
java
public static long calc(String arg0, String arg1, String format, DateUnit dateUnit) { try { return calc(getTime(format, arg0), getTime(format, arg1), dateUnit); } catch (Exception e) { logger.error("日期计算出错", e); return -1; } }
[ "public", "static", "long", "calc", "(", "String", "arg0", ",", "String", "arg1", ",", "String", "format", ",", "DateUnit", "dateUnit", ")", "{", "try", "{", "return", "calc", "(", "getTime", "(", "format", ",", "arg0", ")", ",", "getTime", "(", "forma...
计算arg0-arg1的时间差 @param arg0 日期字符串 @param arg1 日期字符串 @param format 日期字符串的格式 @param dateUnit 返回结果的单位 @return arg0-arg1的时间差,精确到指定的单位(field),出错时返回-1
[ "计算arg0", "-", "arg1的时间差" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/DateUtil.java#L117-L124
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java
ExpressRouteCrossConnectionPeeringsInner.beginCreateOrUpdate
public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { """ Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The na...
java
public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peerin...
[ "public", "ExpressRouteCrossConnectionPeeringInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "String", "peeringName", ",", "ExpressRouteCrossConnectionPeeringInner", "peeringParameters", ")", "{", "return", "beginCreat...
Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param peeringName The name of the peering. @param peeringParameters Parameters supplied to the create or update Ex...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "ExpressRouteCrossConnection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java#L565-L567
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java
DiscordApiImpl.getOrCreateMessage
public Message getOrCreateMessage(TextChannel channel, JsonNode data) { """ Gets or creates a new message object. @param channel The channel of the message. @param data The data of the message. @return The message for the given json object. """ long id = Long.parseLong(data.get("id").asText()); ...
java
public Message getOrCreateMessage(TextChannel channel, JsonNode data) { long id = Long.parseLong(data.get("id").asText()); synchronized (messages) { return getCachedMessageById(id).orElseGet(() -> new MessageImpl(this, channel, data)); } }
[ "public", "Message", "getOrCreateMessage", "(", "TextChannel", "channel", ",", "JsonNode", "data", ")", "{", "long", "id", "=", "Long", ".", "parseLong", "(", "data", ".", "get", "(", "\"id\"", ")", ".", "asText", "(", ")", ")", ";", "synchronized", "(",...
Gets or creates a new message object. @param channel The channel of the message. @param data The data of the message. @return The message for the given json object.
[ "Gets", "or", "creates", "a", "new", "message", "object", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java#L859-L864
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardGenerator.java
StandardGenerator.outerGlow
static IRenderingElement outerGlow(IRenderingElement element, Color color, double glowWidth, double stroke) { """ Generate an outer glow for the provided rendering element. The glow is defined by the glow width and the stroke size. @param element rendering element @param color color of the glow @param ...
java
static IRenderingElement outerGlow(IRenderingElement element, Color color, double glowWidth, double stroke) { if (element instanceof ElementGroup) { ElementGroup orgGroup = (ElementGroup) element; ElementGroup newGroup = new ElementGroup(); for (IRenderingElement child : orgG...
[ "static", "IRenderingElement", "outerGlow", "(", "IRenderingElement", "element", ",", "Color", "color", ",", "double", "glowWidth", ",", "double", "stroke", ")", "{", "if", "(", "element", "instanceof", "ElementGroup", ")", "{", "ElementGroup", "orgGroup", "=", ...
Generate an outer glow for the provided rendering element. The glow is defined by the glow width and the stroke size. @param element rendering element @param color color of the glow @param glowWidth the width of the glow @param stroke the stroke width @return generated outer glow
[ "Generate", "an", "outer", "glow", "for", "the", "provided", "rendering", "element", ".", "The", "glow", "is", "defined", "by", "the", "glow", "width", "and", "the", "stroke", "size", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardGenerator.java#L678-L699
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/ChatChannelManager.java
ChatChannelManager.bodyRemovedFromChannel
@AnyThread public void bodyRemovedFromChannel (ChatChannel channel, final int bodyId) { """ When a body loses channel membership, this method should be called so that any server that happens to be hosting that channel can be told that the body in question is now a participant. """ _peerMan.invoke...
java
@AnyThread public void bodyRemovedFromChannel (ChatChannel channel, final int bodyId) { _peerMan.invokeNodeAction(new ChannelAction(channel) { @Override protected void execute () { ChannelInfo info = _channelMan._channels.get(_channel); if (info != null) { ...
[ "@", "AnyThread", "public", "void", "bodyRemovedFromChannel", "(", "ChatChannel", "channel", ",", "final", "int", "bodyId", ")", "{", "_peerMan", ".", "invokeNodeAction", "(", "new", "ChannelAction", "(", "channel", ")", "{", "@", "Override", "protected", "void"...
When a body loses channel membership, this method should be called so that any server that happens to be hosting that channel can be told that the body in question is now a participant.
[ "When", "a", "body", "loses", "channel", "membership", "this", "method", "should", "be", "called", "so", "that", "any", "server", "that", "happens", "to", "be", "hosting", "that", "channel", "can", "be", "told", "that", "the", "body", "in", "question", "is...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/ChatChannelManager.java#L114-L128
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java
VmService.updateVM
public Map<String, String> updateVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception { """ Method used to connect to data center to update existing devices of a virtual machine identified by the inputs provided. @param httpInputs Object that has all the inputs necessary to made a connection to data c...
java
public Map<String, String> updateVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception { ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs); try { ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources, ...
[ "public", "Map", "<", "String", ",", "String", ">", "updateVM", "(", "HttpInputs", "httpInputs", ",", "VmInputs", "vmInputs", ")", "throws", "Exception", "{", "ConnectionResources", "connectionResources", "=", "new", "ConnectionResources", "(", "httpInputs", ",", ...
Method used to connect to data center to update existing devices of a virtual machine identified by the inputs provided. @param httpInputs Object that has all the inputs necessary to made a connection to data center @param vmInputs Object that has all the specific inputs necessary to identify the targeted device @re...
[ "Method", "used", "to", "connect", "to", "data", "center", "to", "update", "existing", "devices", "of", "a", "virtual", "machine", "identified", "by", "the", "inputs", "provided", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L295-L325
Bearded-Hen/Android-Bootstrap
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/utils/ColorUtils.java
ColorUtils.increaseOpacity
@ColorInt public static int increaseOpacity(Context context, @ColorRes int res, int alpha) { """ Lightens a color by increasing its alpha channel value @param context the current context @param res the color resource @param alpha the alpha to set @return a color int """ int c = resolveColor...
java
@ColorInt public static int increaseOpacity(Context context, @ColorRes int res, int alpha) { int c = resolveColor(res, context); return increaseOpacityFromInt(context, resolveColor(res, context), alpha); }
[ "@", "ColorInt", "public", "static", "int", "increaseOpacity", "(", "Context", "context", ",", "@", "ColorRes", "int", "res", ",", "int", "alpha", ")", "{", "int", "c", "=", "resolveColor", "(", "res", ",", "context", ")", ";", "return", "increaseOpacityFr...
Lightens a color by increasing its alpha channel value @param context the current context @param res the color resource @param alpha the alpha to set @return a color int
[ "Lightens", "a", "color", "by", "increasing", "its", "alpha", "channel", "value" ]
train
https://github.com/Bearded-Hen/Android-Bootstrap/blob/b3d62cc1847e26d420c53c92665a4fe1e6ee7ecf/AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/utils/ColorUtils.java#L72-L75
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfPRow.java
PdfPRow.writeBorderAndBackground
public void writeBorderAndBackground(float xPos, float yPos, float currentMaxHeight, PdfPCell cell, PdfContentByte[] canvases) { """ Writes the border and background of one cell in the row. @param xPos The x-coordinate where the table starts on the canvas @param yPos The y-coordinate where the table starts on ...
java
public void writeBorderAndBackground(float xPos, float yPos, float currentMaxHeight, PdfPCell cell, PdfContentByte[] canvases) { Color background = cell.getBackgroundColor(); if (background != null || cell.hasBorders()) { // Add xPos resp. yPos to the cell's coordinates for absolute coordinates float right = ...
[ "public", "void", "writeBorderAndBackground", "(", "float", "xPos", ",", "float", "yPos", ",", "float", "currentMaxHeight", ",", "PdfPCell", "cell", ",", "PdfContentByte", "[", "]", "canvases", ")", "{", "Color", "background", "=", "cell", ".", "getBackgroundCol...
Writes the border and background of one cell in the row. @param xPos The x-coordinate where the table starts on the canvas @param yPos The y-coordinate where the table starts on the canvas @param currentMaxHeight The height of the cell to be drawn. @param cell @param canvases @since 2.1.6 extra parameter currentMaxHei...
[ "Writes", "the", "border", "and", "background", "of", "one", "cell", "in", "the", "row", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfPRow.java#L208-L233
codecentric/zucchini
zucchini-bdd/src/main/java/de/codecentric/zucchini/bdd/resolver/token/TokenList.java
TokenList.tokenTextsDoNotMatch
private boolean tokenTextsDoNotMatch(Token token1, Token token2) { """ Checks whether both tokens have the same texts. @param token1 The first token to check. @param token2 The second token to check. @return {@literal true} if the tokens do not have the same texts, and {@literal false} otherwise. """ ...
java
private boolean tokenTextsDoNotMatch(Token token1, Token token2) { return !token1.getText().equals(token2.getText()); }
[ "private", "boolean", "tokenTextsDoNotMatch", "(", "Token", "token1", ",", "Token", "token2", ")", "{", "return", "!", "token1", ".", "getText", "(", ")", ".", "equals", "(", "token2", ".", "getText", "(", ")", ")", ";", "}" ]
Checks whether both tokens have the same texts. @param token1 The first token to check. @param token2 The second token to check. @return {@literal true} if the tokens do not have the same texts, and {@literal false} otherwise.
[ "Checks", "whether", "both", "tokens", "have", "the", "same", "texts", "." ]
train
https://github.com/codecentric/zucchini/blob/61541cd8ce666ef21ad943486a7c0eb53310ed5a/zucchini-bdd/src/main/java/de/codecentric/zucchini/bdd/resolver/token/TokenList.java#L208-L210
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java
BaseMessageFilter.setFilterMap
public final void setFilterMap(Map<String, Object> propFilter) { """ Update the remote filter with this new map information. @param propFilter New filter information (ie, bookmark=345). """ if (this.getMessageReceiver() != null) this.getMessageReceiver().setNewFilterProperties(this, null, ...
java
public final void setFilterMap(Map<String, Object> propFilter) { if (this.getMessageReceiver() != null) this.getMessageReceiver().setNewFilterProperties(this, null, propFilter); // Update any remote copy of this. }
[ "public", "final", "void", "setFilterMap", "(", "Map", "<", "String", ",", "Object", ">", "propFilter", ")", "{", "if", "(", "this", ".", "getMessageReceiver", "(", ")", "!=", "null", ")", "this", ".", "getMessageReceiver", "(", ")", ".", "setNewFilterProp...
Update the remote filter with this new map information. @param propFilter New filter information (ie, bookmark=345).
[ "Update", "the", "remote", "filter", "with", "this", "new", "map", "information", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L478-L482
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.createReviewsAsync
public Observable<List<String>> createReviewsAsync(String teamName, String urlContentType, List<CreateReviewBodyItem> createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter) { """ The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the ...
java
public Observable<List<String>> createReviewsAsync(String teamName, String urlContentType, List<CreateReviewBodyItem> createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter) { return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, createReviewsOptionalP...
[ "public", "Observable", "<", "List", "<", "String", ">", ">", "createReviewsAsync", "(", "String", "teamName", ",", "String", "urlContentType", ",", "List", "<", "CreateReviewBodyItem", ">", "createReviewBody", ",", "CreateReviewsOptionalParameter", "createReviewsOption...
The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. &lt;h3&gt;CallBack Schemas &lt;/h3&gt; &lt;h4&gt;Review Completion CallBack Sample&lt;/h4&gt; &lt;p&gt; {&lt;br/&gt; "ReviewId": "&lt;R...
[ "The", "reviews", "created", "would", "show", "up", "for", "Reviewers", "on", "your", "team", ".", "As", "Reviewers", "complete", "reviewing", "results", "of", "the", "Review", "would", "be", "POSTED", "(", "i", ".", "e", ".", "HTTP", "POST", ")", "on", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L404-L411
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/chunkblock/ChunkBlockHandler.java
ChunkBlockHandler.addCoord
private void addCoord(Chunk chunk, BlockPos pos) { """ Adds a coordinate for the specified {@link Chunk}. @param chunk the chunk @param pos the pos """ chunks(chunk).add(chunk, pos); }
java
private void addCoord(Chunk chunk, BlockPos pos) { chunks(chunk).add(chunk, pos); }
[ "private", "void", "addCoord", "(", "Chunk", "chunk", ",", "BlockPos", "pos", ")", "{", "chunks", "(", "chunk", ")", ".", "add", "(", "chunk", ",", "pos", ")", ";", "}" ]
Adds a coordinate for the specified {@link Chunk}. @param chunk the chunk @param pos the pos
[ "Adds", "a", "coordinate", "for", "the", "specified", "{", "@link", "Chunk", "}", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/chunkblock/ChunkBlockHandler.java#L159-L162
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.createVariable
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException { """ Create a new group variable. <pre><code>GitLab Endpoint: POST /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holdin...
java
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("key", key, true) .withParam("value", value, true) .withParam("protected", isPr...
[ "public", "Variable", "createVariable", "(", "Object", "groupIdOrPath", ",", "String", "key", ",", "String", "value", ",", "Boolean", "isProtected", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", ...
Create a new group variable. <pre><code>GitLab Endpoint: POST /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allow...
[ "Create", "a", "new", "group", "variable", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1093-L1101
hankcs/HanLP
src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/interval/IntervalNode.java
IntervalNode.addToOverlaps
protected void addToOverlaps(Intervalable interval, List<Intervalable> overlaps, List<Intervalable> newOverlaps) { """ 添加到重叠区间列表中 @param interval 跟此区间重叠 @param overlaps 重叠区间列表 @param newOverlaps 希望将这些区间加入 """ for (Intervalable currentInterval : newOverlaps) { if (!currentInterval...
java
protected void addToOverlaps(Intervalable interval, List<Intervalable> overlaps, List<Intervalable> newOverlaps) { for (Intervalable currentInterval : newOverlaps) { if (!currentInterval.equals(interval)) { overlaps.add(currentInterval); } ...
[ "protected", "void", "addToOverlaps", "(", "Intervalable", "interval", ",", "List", "<", "Intervalable", ">", "overlaps", ",", "List", "<", "Intervalable", ">", "newOverlaps", ")", "{", "for", "(", "Intervalable", "currentInterval", ":", "newOverlaps", ")", "{",...
添加到重叠区间列表中 @param interval 跟此区间重叠 @param overlaps 重叠区间列表 @param newOverlaps 希望将这些区间加入
[ "添加到重叠区间列表中" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/interval/IntervalNode.java#L138-L147
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.getColor
public static final Color getColor(byte[] data, int offset) { """ Reads a color value represented by three bytes, for R, G, and B components, plus a flag byte indicating if this is an automatic color. Returns null if the color type is "Automatic". @param data byte array of data @param offset offset into arra...
java
public static final Color getColor(byte[] data, int offset) { Color result = null; if (getByte(data, offset + 3) == 0) { int r = getByte(data, offset); int g = getByte(data, offset + 1); int b = getByte(data, offset + 2); result = new Color(r, g, b); } ...
[ "public", "static", "final", "Color", "getColor", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "Color", "result", "=", "null", ";", "if", "(", "getByte", "(", "data", ",", "offset", "+", "3", ")", "==", "0", ")", "{", "int", "r"...
Reads a color value represented by three bytes, for R, G, and B components, plus a flag byte indicating if this is an automatic color. Returns null if the color type is "Automatic". @param data byte array of data @param offset offset into array @return new Color instance
[ "Reads", "a", "color", "value", "represented", "by", "three", "bytes", "for", "R", "G", "and", "B", "components", "plus", "a", "flag", "byte", "indicating", "if", "this", "is", "an", "automatic", "color", ".", "Returns", "null", "if", "the", "color", "ty...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L534-L547
google/closure-templates
java/src/com/google/template/soy/jbcsrc/runtime/JbcSrcRuntime.java
JbcSrcRuntime.applyEscapers
public static CompiledTemplate applyEscapers( CompiledTemplate delegate, ImmutableList<SoyJavaPrintDirective> directives) { """ Wraps a given template with a collection of escapers to apply. @param delegate The delegate template to render @param directives The set of directives to apply """ Conte...
java
public static CompiledTemplate applyEscapers( CompiledTemplate delegate, ImmutableList<SoyJavaPrintDirective> directives) { ContentKind kind = delegate.kind(); if (canSkipEscaping(directives, kind)) { return delegate; } return new EscapedCompiledTemplate(delegate, directives, kind); }
[ "public", "static", "CompiledTemplate", "applyEscapers", "(", "CompiledTemplate", "delegate", ",", "ImmutableList", "<", "SoyJavaPrintDirective", ">", "directives", ")", "{", "ContentKind", "kind", "=", "delegate", ".", "kind", "(", ")", ";", "if", "(", "canSkipEs...
Wraps a given template with a collection of escapers to apply. @param delegate The delegate template to render @param directives The set of directives to apply
[ "Wraps", "a", "given", "template", "with", "a", "collection", "of", "escapers", "to", "apply", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/runtime/JbcSrcRuntime.java#L242-L249
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.sslContext
public static SSLContext sslContext(AbstractConfig config, String key) { """ Method will create a SSLContext based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return SSLContext based on the type specified in the config. """ final St...
java
public static SSLContext sslContext(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return SSLContext.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new ConfigException( k...
[ "public", "static", "SSLContext", "sslContext", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "trustManagerFactoryType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "SSLContext", ".", "getI...
Method will create a SSLContext based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return SSLContext based on the type specified in the config.
[ "Method", "will", "create", "a", "SSLContext", "based", "on", "the", "Algorithm", "type", "specified", "in", "the", "config", "." ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L443-L456
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.checkPositionInside
public static boolean checkPositionInside(Element element, int x, int y) { """ Returns if the given client position is over the given element.<p> Use <code>-1</code> for x or y to ignore one ordering orientation.<p> @param element the element @param x the client x position, use <code>-1</code> to ignore x pos...
java
public static boolean checkPositionInside(Element element, int x, int y) { // ignore x / left-right values for x == -1 if (x != -1) { // check if the mouse pointer is within the width of the target int left = CmsDomUtil.getRelativeX(x, element); int offsetWidth = ele...
[ "public", "static", "boolean", "checkPositionInside", "(", "Element", "element", ",", "int", "x", ",", "int", "y", ")", "{", "// ignore x / left-right values for x == -1", "if", "(", "x", "!=", "-", "1", ")", "{", "// check if the mouse pointer is within the width of ...
Returns if the given client position is over the given element.<p> Use <code>-1</code> for x or y to ignore one ordering orientation.<p> @param element the element @param x the client x position, use <code>-1</code> to ignore x position @param y the client y position, use <code>-1</code> to ignore y position @return ...
[ "Returns", "if", "the", "given", "client", "position", "is", "over", "the", "given", "element", ".", "<p", ">", "Use", "<code", ">", "-", "1<", "/", "code", ">", "for", "x", "or", "y", "to", "ignore", "one", "ordering", "orientation", ".", "<p", ">" ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L553-L574
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.listUsageMetricsNextAsync
public ServiceFuture<List<PoolUsageMetrics>> listUsageMetricsNextAsync(final String nextPageLink, final PoolListUsageMetricsNextOptions poolListUsageMetricsNextOptions, final ServiceFuture<List<PoolUsageMetrics>> serviceFuture, final ListOperationCallback<PoolUsageMetrics> serviceCallback) { """ Lists the usage me...
java
public ServiceFuture<List<PoolUsageMetrics>> listUsageMetricsNextAsync(final String nextPageLink, final PoolListUsageMetricsNextOptions poolListUsageMetricsNextOptions, final ServiceFuture<List<PoolUsageMetrics>> serviceFuture, final ListOperationCallback<PoolUsageMetrics> serviceCallback) { return AzureService...
[ "public", "ServiceFuture", "<", "List", "<", "PoolUsageMetrics", ">", ">", "listUsageMetricsNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "PoolListUsageMetricsNextOptions", "poolListUsageMetricsNextOptions", ",", "final", "ServiceFuture", "<", "List", ...
Lists the usage metrics, aggregated by pool across individual time intervals, for the specified account. If you do not specify a $filter clause including a poolId, the response includes all pools that existed in the account in the time range of the returned aggregation intervals. If you do not specify a $filter clause ...
[ "Lists", "the", "usage", "metrics", "aggregated", "by", "pool", "across", "individual", "time", "intervals", "for", "the", "specified", "account", ".", "If", "you", "do", "not", "specify", "a", "$filter", "clause", "including", "a", "poolId", "the", "response"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L3788-L3798