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 |
|---|---|---|---|---|---|---|---|---|---|---|
biojava/biojava | biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/SequenceMixin.java | SequenceMixin.countGC | public static int countGC(Sequence<NucleotideCompound> sequence) {
"""
Returns the count of GC in the given sequence
@param sequence The {@link NucleotideCompound} {@link Sequence} to perform
the GC analysis on
@return The number of GC compounds in the sequence
"""
CompoundSet<NucleotideCompound> cs = s... | java | public static int countGC(Sequence<NucleotideCompound> sequence) {
CompoundSet<NucleotideCompound> cs = sequence.getCompoundSet();
NucleotideCompound G = cs.getCompoundForString("G");
NucleotideCompound C = cs.getCompoundForString("C");
NucleotideCompound g = cs.getCompoundForString("g");
NucleotideCompound c... | [
"public",
"static",
"int",
"countGC",
"(",
"Sequence",
"<",
"NucleotideCompound",
">",
"sequence",
")",
"{",
"CompoundSet",
"<",
"NucleotideCompound",
">",
"cs",
"=",
"sequence",
".",
"getCompoundSet",
"(",
")",
";",
"NucleotideCompound",
"G",
"=",
"cs",
".",
... | Returns the count of GC in the given sequence
@param sequence The {@link NucleotideCompound} {@link Sequence} to perform
the GC analysis on
@return The number of GC compounds in the sequence | [
"Returns",
"the",
"count",
"of",
"GC",
"in",
"the",
"given",
"sequence"
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/SequenceMixin.java#L81-L88 |
google/j2objc | jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java | IosHttpURLConnection.secureConnectionException | static IOException secureConnectionException(String description) {
"""
Returns an SSLException if that class is linked into the application,
otherwise IOException.
"""
try {
Class<?> sslExceptionClass = Class.forName("javax.net.ssl.SSLException");
Constructor<?> constructor = sslExceptionClass... | java | static IOException secureConnectionException(String description) {
try {
Class<?> sslExceptionClass = Class.forName("javax.net.ssl.SSLException");
Constructor<?> constructor = sslExceptionClass.getConstructor(String.class);
return (IOException) constructor.newInstance(description);
} catch (Cl... | [
"static",
"IOException",
"secureConnectionException",
"(",
"String",
"description",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"sslExceptionClass",
"=",
"Class",
".",
"forName",
"(",
"\"javax.net.ssl.SSLException\"",
")",
";",
"Constructor",
"<",
"?",
">",
"c... | Returns an SSLException if that class is linked into the application,
otherwise IOException. | [
"Returns",
"an",
"SSLException",
"if",
"that",
"class",
"is",
"linked",
"into",
"the",
"application",
"otherwise",
"IOException",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java#L759-L769 |
ModeShape/modeshape | modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrExporter.java | AbstractJcrExporter.exportView | public void exportView( Node node,
OutputStream os,
boolean skipBinary,
boolean noRecurse ) throws IOException, RepositoryException {
"""
Exports <code>node</code> (or the subtree rooted at <code>node</code>) into an XML document t... | java | public void exportView( Node node,
OutputStream os,
boolean skipBinary,
boolean noRecurse ) throws IOException, RepositoryException {
try {
exportView(node, new StreamingContentHandler(os, UNEXPORTABLE_NAMESPACES), s... | [
"public",
"void",
"exportView",
"(",
"Node",
"node",
",",
"OutputStream",
"os",
",",
"boolean",
"skipBinary",
",",
"boolean",
"noRecurse",
")",
"throws",
"IOException",
",",
"RepositoryException",
"{",
"try",
"{",
"exportView",
"(",
"node",
",",
"new",
"Stream... | Exports <code>node</code> (or the subtree rooted at <code>node</code>) into an XML document that is written to
<code>os</code>.
@param node the node which should be exported. If <code>noRecursion</code> was set to <code>false</code> in the
constructor, the entire subtree rooted at <code>node</code> will be exported.
@... | [
"Exports",
"<code",
">",
"node<",
"/",
"code",
">",
"(",
"or",
"the",
"subtree",
"rooted",
"at",
"<code",
">",
"node<",
"/",
"code",
">",
")",
"into",
"an",
"XML",
"document",
"that",
"is",
"written",
"to",
"<code",
">",
"os<",
"/",
"code",
">",
".... | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrExporter.java#L195-L205 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/StructureIO.java | StructureIO.getBiologicalAssembly | public static Structure getBiologicalAssembly(String pdbId, int biolAssemblyNr) throws IOException, StructureException {
"""
Returns the biological assembly for the given PDB id and bioassembly identifier,
using multiModel={@value AtomCache#DEFAULT_BIOASSEMBLY_STYLE}
@param pdbId
@param biolAssemblyNr - the ith... | java | public static Structure getBiologicalAssembly(String pdbId, int biolAssemblyNr) throws IOException, StructureException {
return getBiologicalAssembly(pdbId, biolAssemblyNr, AtomCache.DEFAULT_BIOASSEMBLY_STYLE);
} | [
"public",
"static",
"Structure",
"getBiologicalAssembly",
"(",
"String",
"pdbId",
",",
"int",
"biolAssemblyNr",
")",
"throws",
"IOException",
",",
"StructureException",
"{",
"return",
"getBiologicalAssembly",
"(",
"pdbId",
",",
"biolAssemblyNr",
",",
"AtomCache",
".",... | Returns the biological assembly for the given PDB id and bioassembly identifier,
using multiModel={@value AtomCache#DEFAULT_BIOASSEMBLY_STYLE}
@param pdbId
@param biolAssemblyNr - the ith biological assembly that is available for a PDB ID (we start counting at 1, 0 represents the asym unit).
@return a Structure object ... | [
"Returns",
"the",
"biological",
"assembly",
"for",
"the",
"given",
"PDB",
"id",
"and",
"bioassembly",
"identifier",
"using",
"multiModel",
"=",
"{"
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureIO.java#L216-L218 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java | InstanceFailoverGroupsInner.deleteAsync | public Observable<Void> deleteAsync(String resourceGroupName, String locationName, String failoverGroupName) {
"""
Deletes a failover group.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param lo... | java | public Observable<Void> deleteAsync(String resourceGroupName, String locationName, String failoverGroupName) {
return deleteWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceRespon... | [
"public",
"Observable",
"<",
"Void",
">",
"deleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"locationName",
",",
"String",
"failoverGroupName",
")",
"{",
"return",
"deleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"locationName",
",",
"f... | Deletes a failover group.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param locationName The name of the region where the resource is located.
@param failoverGroupName The name of the failover group.
@... | [
"Deletes",
"a",
"failover",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L428-L435 |
ralscha/extdirectspring | src/main/java/ch/ralscha/extdirectspring/util/JsonHandler.java | JsonHandler.convertValue | public <T> T convertValue(Object object, JavaType toValueTypeRef) {
"""
Converts one object into another.
@param object the source
@param toValueTypeRef the type of the target
@return the converted object
"""
return this.mapper.convertValue(object, toValueTypeRef);
} | java | public <T> T convertValue(Object object, JavaType toValueTypeRef) {
return this.mapper.convertValue(object, toValueTypeRef);
} | [
"public",
"<",
"T",
">",
"T",
"convertValue",
"(",
"Object",
"object",
",",
"JavaType",
"toValueTypeRef",
")",
"{",
"return",
"this",
".",
"mapper",
".",
"convertValue",
"(",
"object",
",",
"toValueTypeRef",
")",
";",
"}"
] | Converts one object into another.
@param object the source
@param toValueTypeRef the type of the target
@return the converted object | [
"Converts",
"one",
"object",
"into",
"another",
"."
] | train | https://github.com/ralscha/extdirectspring/blob/4b018497c4e7503033f91d0491b4e74bf8291d2c/src/main/java/ch/ralscha/extdirectspring/util/JsonHandler.java#L170-L172 |
versionone/VersionOne.SDK.Java.ObjectModel | src/main/java/com/versionone/om/V1InstanceGetter.java | V1InstanceGetter.effortRecords | public Collection<Effort> effortRecords(EffortFilter filter) {
"""
Get effort records filtered by the criteria specified in the passed in
filter.
@param filter Limit the items returned. If null, then all items returned.
@return Collection of items as specified in the filter.
"""
return get(Effort.... | java | public Collection<Effort> effortRecords(EffortFilter filter) {
return get(Effort.class, (filter != null) ? filter : new EffortFilter());
} | [
"public",
"Collection",
"<",
"Effort",
">",
"effortRecords",
"(",
"EffortFilter",
"filter",
")",
"{",
"return",
"get",
"(",
"Effort",
".",
"class",
",",
"(",
"filter",
"!=",
"null",
")",
"?",
"filter",
":",
"new",
"EffortFilter",
"(",
")",
")",
";",
"}... | Get effort records filtered by the criteria specified in the passed in
filter.
@param filter Limit the items returned. If null, then all items returned.
@return Collection of items as specified in the filter. | [
"Get",
"effort",
"records",
"filtered",
"by",
"the",
"criteria",
"specified",
"in",
"the",
"passed",
"in",
"filter",
"."
] | train | https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L88-L90 |
opentelecoms-org/zrtp-java | src/zorg/platform/blackberry/DHSuite.java | DHSuite.setAlgorithm | public void setAlgorithm(KeyAgreementType dh) {
"""
DH3K RIM implementation is currently buggy and DOES NOT WORK!!!
"""
log("DH algorithm set: " + getDHName(dhMode) + " -> " + getDHName(dh));
try {
if(dhMode != null && dh.keyType == dhMode.keyType) return;
dhMode = dh;
switch (dhMode.keyType)... | java | public void setAlgorithm(KeyAgreementType dh)
{
log("DH algorithm set: " + getDHName(dhMode) + " -> " + getDHName(dh));
try {
if(dhMode != null && dh.keyType == dhMode.keyType) return;
dhMode = dh;
switch (dhMode.keyType) {
case KeyAgreementType.DH_MODE_DH3K:
byte[] dhGen = new ... | [
"public",
"void",
"setAlgorithm",
"(",
"KeyAgreementType",
"dh",
")",
"{",
"log",
"(",
"\"DH algorithm set: \"",
"+",
"getDHName",
"(",
"dhMode",
")",
"+",
"\" -> \"",
"+",
"getDHName",
"(",
"dh",
")",
")",
";",
"try",
"{",
"if",
"(",
"dhMode",
"!=",
"nu... | DH3K RIM implementation is currently buggy and DOES NOT WORK!!! | [
"DH3K",
"RIM",
"implementation",
"is",
"currently",
"buggy",
"and",
"DOES",
"NOT",
"WORK!!!"
] | train | https://github.com/opentelecoms-org/zrtp-java/blob/10a0c77866c5d1b1504df161db9a447f5069ed54/src/zorg/platform/blackberry/DHSuite.java#L133-L173 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.authentication.builtin/src/com/ibm/ws/security/authentication/internal/jaas/JAASServiceImpl.java | JAASServiceImpl.performLogin | @Override
public Subject performLogin(String jaasEntryName, CallbackHandler callbackHandler, Subject partialSubject) throws LoginException {
"""
Performs a JAAS login.
@param jaasEntryName
@param callbackHandler
@param partialSubject
@return the authenticated subject.
@throws javax.security.auth.login.L... | java | @Override
public Subject performLogin(String jaasEntryName, CallbackHandler callbackHandler, Subject partialSubject) throws LoginException {
LoginContext loginContext = null;
loginContext = doLoginContext(jaasEntryName, callbackHandler, partialSubject);
return (loginContext == null ? null : ... | [
"@",
"Override",
"public",
"Subject",
"performLogin",
"(",
"String",
"jaasEntryName",
",",
"CallbackHandler",
"callbackHandler",
",",
"Subject",
"partialSubject",
")",
"throws",
"LoginException",
"{",
"LoginContext",
"loginContext",
"=",
"null",
";",
"loginContext",
"... | Performs a JAAS login.
@param jaasEntryName
@param callbackHandler
@param partialSubject
@return the authenticated subject.
@throws javax.security.auth.login.LoginException | [
"Performs",
"a",
"JAAS",
"login",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.builtin/src/com/ibm/ws/security/authentication/internal/jaas/JAASServiceImpl.java#L326-L331 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java | MethodAnnotation.fromCalledMethod | public static MethodAnnotation fromCalledMethod(String className, String methodName, String methodSig, boolean isStatic) {
"""
Create a MethodAnnotation from a method that is not directly accessible.
We will use the repository to try to find its class in order to populate
the information as fully as possible.
... | java | public static MethodAnnotation fromCalledMethod(String className, String methodName, String methodSig, boolean isStatic) {
MethodAnnotation methodAnnotation = fromForeignMethod(className, methodName, methodSig, isStatic);
methodAnnotation.setDescription(METHOD_CALLED);
return methodAnnotation;
... | [
"public",
"static",
"MethodAnnotation",
"fromCalledMethod",
"(",
"String",
"className",
",",
"String",
"methodName",
",",
"String",
"methodSig",
",",
"boolean",
"isStatic",
")",
"{",
"MethodAnnotation",
"methodAnnotation",
"=",
"fromForeignMethod",
"(",
"className",
"... | Create a MethodAnnotation from a method that is not directly accessible.
We will use the repository to try to find its class in order to populate
the information as fully as possible.
@param className
class containing called method
@param methodName
name of called method
@param methodSig
signature of called method
@pa... | [
"Create",
"a",
"MethodAnnotation",
"from",
"a",
"method",
"that",
"is",
"not",
"directly",
"accessible",
".",
"We",
"will",
"use",
"the",
"repository",
"to",
"try",
"to",
"find",
"its",
"class",
"in",
"order",
"to",
"populate",
"the",
"information",
"as",
... | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L247-L253 |
haifengl/smile | plot/src/main/java/smile/swing/AlphaIcon.java | AlphaIcon.paintIcon | @Override
public void paintIcon(Component c, Graphics g, int x, int y) {
"""
Paints the wrapped icon with this
<CODE>AlphaIcon</CODE>'s transparency.
@param c The component to which the icon is painted
@param g the graphics context
@param x the X coordinate of the icon's top-left corner
@param y the Y c... | java | @Override
public void paintIcon(Component c, Graphics g, int x, int y) {
Graphics2D g2 = (Graphics2D) g.create();
g2.setComposite(AlphaComposite.SrcAtop.derive(alpha));
icon.paintIcon(c, g2, x, y);
g2.dispose();
} | [
"@",
"Override",
"public",
"void",
"paintIcon",
"(",
"Component",
"c",
",",
"Graphics",
"g",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"Graphics2D",
"g2",
"=",
"(",
"Graphics2D",
")",
"g",
".",
"create",
"(",
")",
";",
"g2",
".",
"setComposite",
... | Paints the wrapped icon with this
<CODE>AlphaIcon</CODE>'s transparency.
@param c The component to which the icon is painted
@param g the graphics context
@param x the X coordinate of the icon's top-left corner
@param y the Y coordinate of the icon's top-left corner | [
"Paints",
"the",
"wrapped",
"icon",
"with",
"this",
"<CODE",
">",
"AlphaIcon<",
"/",
"CODE",
">",
"s",
"transparency",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/plot/src/main/java/smile/swing/AlphaIcon.java#L78-L84 |
dita-ot/dita-ot | src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/IndexPreprocessor.java | IndexPreprocessor.createElement | private Element createElement(final Document theTargetDocument, final String theName) {
"""
Creates element with "prefix" in "namespace_url" with given name for the target document
@param theTargetDocument target document
@param theName name
@return new element
"""
final Element indexEnt... | java | private Element createElement(final Document theTargetDocument, final String theName) {
final Element indexEntryNode = theTargetDocument.createElementNS(this.namespace_url, theName);
indexEntryNode.setPrefix(this.prefix);
return indexEntryNode;
} | [
"private",
"Element",
"createElement",
"(",
"final",
"Document",
"theTargetDocument",
",",
"final",
"String",
"theName",
")",
"{",
"final",
"Element",
"indexEntryNode",
"=",
"theTargetDocument",
".",
"createElementNS",
"(",
"this",
".",
"namespace_url",
",",
"theNam... | Creates element with "prefix" in "namespace_url" with given name for the target document
@param theTargetDocument target document
@param theName name
@return new element | [
"Creates",
"element",
"with",
"prefix",
"in",
"namespace_url",
"with",
"given",
"name",
"for",
"the",
"target",
"document"
] | train | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/IndexPreprocessor.java#L388-L392 |
GoogleCloudPlatform/bigdata-interop | bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/BigQueryConfiguration.java | BigQueryConfiguration.getTemporaryPathRoot | public static String getTemporaryPathRoot(Configuration conf, @Nullable JobID jobId)
throws IOException {
"""
Resolves to provided {@link #TEMP_GCS_PATH_KEY} or fallbacks to a temporary path based on
{@link #GCS_BUCKET_KEY} and {@code jobId}.
@param conf the configuration to fetch the keys from.
@param ... | java | public static String getTemporaryPathRoot(Configuration conf, @Nullable JobID jobId)
throws IOException {
// Try using the temporary gcs path.
String pathRoot = conf.get(BigQueryConfiguration.TEMP_GCS_PATH_KEY);
if (Strings.isNullOrEmpty(pathRoot)) {
checkNotNull(jobId, "jobId is required if '%... | [
"public",
"static",
"String",
"getTemporaryPathRoot",
"(",
"Configuration",
"conf",
",",
"@",
"Nullable",
"JobID",
"jobId",
")",
"throws",
"IOException",
"{",
"// Try using the temporary gcs path.",
"String",
"pathRoot",
"=",
"conf",
".",
"get",
"(",
"BigQueryConfigur... | Resolves to provided {@link #TEMP_GCS_PATH_KEY} or fallbacks to a temporary path based on
{@link #GCS_BUCKET_KEY} and {@code jobId}.
@param conf the configuration to fetch the keys from.
@param jobId the ID of the job requesting a working path. Optional (could be {@code null}) if
{@link #TEMP_GCS_PATH_KEY} is provided... | [
"Resolves",
"to",
"provided",
"{",
"@link",
"#TEMP_GCS_PATH_KEY",
"}",
"or",
"fallbacks",
"to",
"a",
"temporary",
"path",
"based",
"on",
"{",
"@link",
"#GCS_BUCKET_KEY",
"}",
"and",
"{",
"@code",
"jobId",
"}",
"."
] | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/BigQueryConfiguration.java#L310-L336 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java | ToUnknownStream.endElement | public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
"""
Pass the call on to the underlying handler
@see org.xml.sax.ContentHandler#endElement(String, String, String)
"""
if (m_firstTagNotEmitted)
{
flush();
if (names... | java | public void endElement(String namespaceURI, String localName, String qName)
throws SAXException
{
if (m_firstTagNotEmitted)
{
flush();
if (namespaceURI == null && m_firstElementURI != null)
namespaceURI = m_firstElementURI;
if (localName ... | [
"public",
"void",
"endElement",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"m_firstTagNotEmitted",
")",
"{",
"flush",
"(",
")",
";",
"if",
"(",
"namespaceURI",
"==",
"null... | Pass the call on to the underlying handler
@see org.xml.sax.ContentHandler#endElement(String, String, String) | [
"Pass",
"the",
"call",
"on",
"to",
"the",
"underlying",
"handler"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L809-L824 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/WikisApi.java | WikisApi.updatePage | public WikiPage updatePage(Object projectIdOrPath, String slug, String title, String content) throws GitLabApiException {
"""
Updates an existing project wiki page. The user must have permission to change an existing wiki page.
<pre><code>GitLab Endpoint: PUT /projects/:id/wikis/:slug</code></pre>
@param pro... | java | public WikiPage updatePage(Object projectIdOrPath, String slug, String title, String content) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title)
.withParam("slug", slug, true)
.withParam("content", content);
... | [
"public",
"WikiPage",
"updatePage",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"slug",
",",
"String",
"title",
",",
"String",
"content",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"wit... | Updates an existing project wiki page. The user must have permission to change an existing wiki page.
<pre><code>GitLab Endpoint: PUT /projects/:id/wikis/:slug</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param slug the slug of the project's wiki pa... | [
"Updates",
"an",
"existing",
"project",
"wiki",
"page",
".",
"The",
"user",
"must",
"have",
"permission",
"to",
"change",
"an",
"existing",
"wiki",
"page",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L146-L155 |
forge/furnace | container-api/src/main/java/org/jboss/forge/furnace/util/ClassLoaders.java | ClassLoaders.executeIn | public static void executeIn(ClassLoader loader, Runnable task) throws Exception {
"""
Execute the given {@link Runnable} in the {@link ClassLoader} provided. Return the result, if any.
"""
if (task == null)
return;
if (log.isLoggable(Level.FINE))
{
log.fine("ClassLoader ["... | java | public static void executeIn(ClassLoader loader, Runnable task) throws Exception
{
if (task == null)
return;
if (log.isLoggable(Level.FINE))
{
log.fine("ClassLoader [" + loader + "] task began.");
}
ClassLoader original = SecurityActions.getContextClassLoader();
... | [
"public",
"static",
"void",
"executeIn",
"(",
"ClassLoader",
"loader",
",",
"Runnable",
"task",
")",
"throws",
"Exception",
"{",
"if",
"(",
"task",
"==",
"null",
")",
"return",
";",
"if",
"(",
"log",
".",
"isLoggable",
"(",
"Level",
".",
"FINE",
")",
"... | Execute the given {@link Runnable} in the {@link ClassLoader} provided. Return the result, if any. | [
"Execute",
"the",
"given",
"{"
] | train | https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/container-api/src/main/java/org/jboss/forge/furnace/util/ClassLoaders.java#L57-L80 |
trellis-ldp-archive/trellis-http | src/main/java/org/trellisldp/http/impl/MementoResource.java | MementoResource.getMementoLinks | public static Stream<Link> getMementoLinks(final String identifier, final List<VersionRange> mementos) {
"""
Retrieve all of the Memento-related link headers given a stream of VersionRange objects
@param identifier the public identifier for the resource
@param mementos a stream of memento values
@return a strea... | java | public static Stream<Link> getMementoLinks(final String identifier, final List<VersionRange> mementos) {
return concat(getTimeMap(identifier, mementos.stream()), mementos.stream().map(mementoToLink(identifier)));
} | [
"public",
"static",
"Stream",
"<",
"Link",
">",
"getMementoLinks",
"(",
"final",
"String",
"identifier",
",",
"final",
"List",
"<",
"VersionRange",
">",
"mementos",
")",
"{",
"return",
"concat",
"(",
"getTimeMap",
"(",
"identifier",
",",
"mementos",
".",
"st... | Retrieve all of the Memento-related link headers given a stream of VersionRange objects
@param identifier the public identifier for the resource
@param mementos a stream of memento values
@return a stream of link headers | [
"Retrieve",
"all",
"of",
"the",
"Memento",
"-",
"related",
"link",
"headers",
"given",
"a",
"stream",
"of",
"VersionRange",
"objects"
] | train | https://github.com/trellis-ldp-archive/trellis-http/blob/bc762f88602c49c2b137a7adf68d576666e55fff/src/main/java/org/trellisldp/http/impl/MementoResource.java#L185-L187 |
kiegroup/jbpm | jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java | QueryCriteriaUtil.applyMetaCriteriaToQuery | public static void applyMetaCriteriaToQuery(Query query, QueryWhere queryWhere) {
"""
Small method to apply the meta criteria from the {@link QueryWhere} instance to the {@link Query} instance
@param query The {@link Query} instance
@param queryWhere The {@link QueryWhere} instance, with the abstract information... | java | public static void applyMetaCriteriaToQuery(Query query, QueryWhere queryWhere) {
if( queryWhere.getCount() != null ) {
query.setMaxResults(queryWhere.getCount());
}
if( queryWhere.getOffset() != null ) {
query.setFirstResult(queryWhere.getOffset());
}
} | [
"public",
"static",
"void",
"applyMetaCriteriaToQuery",
"(",
"Query",
"query",
",",
"QueryWhere",
"queryWhere",
")",
"{",
"if",
"(",
"queryWhere",
".",
"getCount",
"(",
")",
"!=",
"null",
")",
"{",
"query",
".",
"setMaxResults",
"(",
"queryWhere",
".",
"getC... | Small method to apply the meta criteria from the {@link QueryWhere} instance to the {@link Query} instance
@param query The {@link Query} instance
@param queryWhere The {@link QueryWhere} instance, with the abstract information about the query | [
"Small",
"method",
"to",
"apply",
"the",
"meta",
"criteria",
"from",
"the",
"{"
] | train | https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java#L621-L628 |
boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java | CommentsInterface.editComment | public void editComment(String commentId, String commentText) throws FlickrException {
"""
Edit the text of a comment as the currently authenticated user.
This method requires authentication with 'write' permission.
@param commentId
The id of the comment to edit.
@param commentText
Update the comment to t... | java | public void editComment(String commentId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COMMENT);
parameters.put("comment_id", commentId);
parameters.put("comment_text", commentText)... | [
"public",
"void",
"editComment",
"(",
"String",
"commentId",
",",
"String",
"commentText",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";... | Edit the text of a comment as the currently authenticated user.
This method requires authentication with 'write' permission.
@param commentId
The id of the comment to edit.
@param commentText
Update the comment to this text.
@throws FlickrException | [
"Edit",
"the",
"text",
"of",
"a",
"comment",
"as",
"the",
"currently",
"authenticated",
"user",
"."
] | train | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java#L115-L129 |
lucee/Lucee | core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java | WeakConstructorStorage.storeArgs | private void storeArgs(Constructor constructor, Array conArgs) {
"""
seperate and store the different arguments of one constructor
@param constructor
@param conArgs
"""
Class[] pmt = constructor.getParameterTypes();
Object o = conArgs.get(pmt.length + 1, null);
Constructor[] args;
if (o == null) {
... | java | private void storeArgs(Constructor constructor, Array conArgs) {
Class[] pmt = constructor.getParameterTypes();
Object o = conArgs.get(pmt.length + 1, null);
Constructor[] args;
if (o == null) {
args = new Constructor[1];
conArgs.setEL(pmt.length + 1, args);
}
else {
Constructor[] cs = (Constructor... | [
"private",
"void",
"storeArgs",
"(",
"Constructor",
"constructor",
",",
"Array",
"conArgs",
")",
"{",
"Class",
"[",
"]",
"pmt",
"=",
"constructor",
".",
"getParameterTypes",
"(",
")",
";",
"Object",
"o",
"=",
"conArgs",
".",
"get",
"(",
"pmt",
".",
"leng... | seperate and store the different arguments of one constructor
@param constructor
@param conArgs | [
"seperate",
"and",
"store",
"the",
"different",
"arguments",
"of",
"one",
"constructor"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java#L78-L96 |
adamfisk/littleshoot-commons-id | src/main/java/org/apache/commons/id/uuid/VersionFourGenerator.java | VersionFourGenerator.setPRNGProvider | public static void setPRNGProvider(String prngName, String packageName) {
"""
<p>Allows clients to set the pseudo-random number generator implementation used when generating a version four uuid with
the secure option. The secure option uses a <code>SecureRandom</code>. The packageName string may be null to specif... | java | public static void setPRNGProvider(String prngName, String packageName) {
VersionFourGenerator.usePRNG = prngName;
VersionFourGenerator.usePRNGPackage = packageName;
VersionFourGenerator.secureRandom = null;
} | [
"public",
"static",
"void",
"setPRNGProvider",
"(",
"String",
"prngName",
",",
"String",
"packageName",
")",
"{",
"VersionFourGenerator",
".",
"usePRNG",
"=",
"prngName",
";",
"VersionFourGenerator",
".",
"usePRNGPackage",
"=",
"packageName",
";",
"VersionFourGenerato... | <p>Allows clients to set the pseudo-random number generator implementation used when generating a version four uuid with
the secure option. The secure option uses a <code>SecureRandom</code>. The packageName string may be null to specify
no preferred package.</p>
@param prngName the pseudo-random number generator impl... | [
"<p",
">",
"Allows",
"clients",
"to",
"set",
"the",
"pseudo",
"-",
"random",
"number",
"generator",
"implementation",
"used",
"when",
"generating",
"a",
"version",
"four",
"uuid",
"with",
"the",
"secure",
"option",
".",
"The",
"secure",
"option",
"uses",
"a"... | train | https://github.com/adamfisk/littleshoot-commons-id/blob/49a8f5f2b10831c509876ca463bf1a87e1e49ae9/src/main/java/org/apache/commons/id/uuid/VersionFourGenerator.java#L156-L160 |
biojava/biojava | biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/Location.java | Location.fromBioExt | public static Location fromBioExt( int start, int length, char strand, int totalLength ) {
"""
Create a location from MAF file coordinates, which represent negative
strand locations as the distance from the end of the sequence.
@param start Origin 1 index of first symbol.
@param length Number of symbols in ra... | java | public static Location fromBioExt( int start, int length, char strand, int totalLength )
{
int s= start;
int e= s + length;
if( !( strand == '-' || strand == '+' || strand == '.' ))
{
throw new IllegalArgumentException( "Strand must be '+', '-', or '.'" );
}
if( strand == '-' )
{
s= s - totalLen... | [
"public",
"static",
"Location",
"fromBioExt",
"(",
"int",
"start",
",",
"int",
"length",
",",
"char",
"strand",
",",
"int",
"totalLength",
")",
"{",
"int",
"s",
"=",
"start",
";",
"int",
"e",
"=",
"s",
"+",
"length",
";",
"if",
"(",
"!",
"(",
"stra... | Create a location from MAF file coordinates, which represent negative
strand locations as the distance from the end of the sequence.
@param start Origin 1 index of first symbol.
@param length Number of symbols in range.
@param strand '+' or '-' or '.' ('.' is interpreted as '+').
@param totalLength Total number of sym... | [
"Create",
"a",
"location",
"from",
"MAF",
"file",
"coordinates",
"which",
"represent",
"negative",
"strand",
"locations",
"as",
"the",
"distance",
"from",
"the",
"end",
"of",
"the",
"sequence",
"."
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/Location.java#L164-L181 |
centic9/commons-dost | src/main/java/org/dstadler/commons/date/DateParser.java | DateParser.computeTimeAgoString | public static String computeTimeAgoString(long ts, String suffix) {
"""
Takes the time in milliseconds since the epoch and
converts it into a string of "x days/hours/minutes/seconds"
compared to the current time.
@param ts The timestamp in milliseconds since the epoch
@param suffix Some text that is appended... | java | public static String computeTimeAgoString(long ts, String suffix) {
long now = System.currentTimeMillis();
checkArgument(ts <= now, "Cannot handle timestamp in the future" +
", now: " + now + "/" + new Date(now) +
", ts: " + ts + "/" + new Date(ts));
long diff ... | [
"public",
"static",
"String",
"computeTimeAgoString",
"(",
"long",
"ts",
",",
"String",
"suffix",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"checkArgument",
"(",
"ts",
"<=",
"now",
",",
"\"Cannot handle timestamp in the fut... | Takes the time in milliseconds since the epoch and
converts it into a string of "x days/hours/minutes/seconds"
compared to the current time.
@param ts The timestamp in milliseconds since the epoch
@param suffix Some text that is appended only if there is a time-difference, i.e.
it is not appended when the time is now.... | [
"Takes",
"the",
"time",
"in",
"milliseconds",
"since",
"the",
"epoch",
"and",
"converts",
"it",
"into",
"a",
"string",
"of",
"x",
"days",
"/",
"hours",
"/",
"minutes",
"/",
"seconds",
"compared",
"to",
"the",
"current",
"time",
"."
] | train | https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/date/DateParser.java#L168-L177 |
RestComm/sip-servlets | sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java | SipFactoryImpl.validateCreation | private static void validateCreation(String method, SipApplicationSession app) {
"""
Does basic check for illegal methods, wrong state, if it finds, it throws
exception
"""
if (method.equals(Request.ACK)) {
throw new IllegalArgumentException(
"Wrong method to create request with[" + Request.ACK + "... | java | private static void validateCreation(String method, SipApplicationSession app) {
if (method.equals(Request.ACK)) {
throw new IllegalArgumentException(
"Wrong method to create request with[" + Request.ACK + "]!");
}
if (method.equals(Request.PRACK)) {
throw new IllegalArgumentException(
"Wrong met... | [
"private",
"static",
"void",
"validateCreation",
"(",
"String",
"method",
",",
"SipApplicationSession",
"app",
")",
"{",
"if",
"(",
"method",
".",
"equals",
"(",
"Request",
".",
"ACK",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Wrong me... | Does basic check for illegal methods, wrong state, if it finds, it throws
exception | [
"Does",
"basic",
"check",
"for",
"illegal",
"methods",
"wrong",
"state",
"if",
"it",
"finds",
"it",
"throws",
"exception"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java#L631-L651 |
uscexp/grappa.extension | src/main/java/com/github/uscexp/grappa/extension/interpreter/ProcessStore.java | ProcessStore.setLocalVariable | public boolean setLocalVariable(Object key, Object value) {
"""
set a new local variable, on the highest block hierarchy.
@param key
name of the variable
@param value
value of the variable
@return true if at least one local block hierarchy exists else false
"""
boolean success = false;
if (working.... | java | public boolean setLocalVariable(Object key, Object value) {
boolean success = false;
if (working.size() > 0) {
Map<Object, Object> map = working.get(working.size() - 1);
map.put(key, value);
success = true;
}
return success;
} | [
"public",
"boolean",
"setLocalVariable",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"boolean",
"success",
"=",
"false",
";",
"if",
"(",
"working",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"Map",
"<",
"Object",
",",
"Object",
">",
"map"... | set a new local variable, on the highest block hierarchy.
@param key
name of the variable
@param value
value of the variable
@return true if at least one local block hierarchy exists else false | [
"set",
"a",
"new",
"local",
"variable",
"on",
"the",
"highest",
"block",
"hierarchy",
"."
] | train | https://github.com/uscexp/grappa.extension/blob/a6001eb6eee434a09e2870e7513f883c7fdaea94/src/main/java/com/github/uscexp/grappa/extension/interpreter/ProcessStore.java#L322-L331 |
cdk/cdk | tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java | AtomPlacer3D.getPlacedHeavyAtom | public IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB) {
"""
Gets the first placed Heavy Atom around atomA which is not atomB.
@param molecule
@param atomA Description of the Parameter
@param atomB Description of the Parameter
@return The placedHeavyAtom value
"""
... | java | public IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB) {
List<IBond> bonds = molecule.getConnectedBondsList(atomA);
for (IBond bond : bonds) {
IAtom connectedAtom = bond.getOther(atomA);
if (isPlacedHeavyAtom(connectedAtom) && !connectedAtom.equals(ato... | [
"public",
"IAtom",
"getPlacedHeavyAtom",
"(",
"IAtomContainer",
"molecule",
",",
"IAtom",
"atomA",
",",
"IAtom",
"atomB",
")",
"{",
"List",
"<",
"IBond",
">",
"bonds",
"=",
"molecule",
".",
"getConnectedBondsList",
"(",
"atomA",
")",
";",
"for",
"(",
"IBond"... | Gets the first placed Heavy Atom around atomA which is not atomB.
@param molecule
@param atomA Description of the Parameter
@param atomB Description of the Parameter
@return The placedHeavyAtom value | [
"Gets",
"the",
"first",
"placed",
"Heavy",
"Atom",
"around",
"atomA",
"which",
"is",
"not",
"atomB",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java#L540-L549 |
alkacon/opencms-core | src/org/opencms/security/CmsPersistentLoginTokenHandler.java | CmsPersistentLoginTokenHandler.removeExpiredTokens | public void removeExpiredTokens(CmsUser user, long now) {
"""
Removes expired tokens from the user's additional infos.<p>
This method does not write the user back to the database.
@param user the user for which to remove the additional infos
@param now the current time
"""
List<String> toRemov... | java | public void removeExpiredTokens(CmsUser user, long now) {
List<String> toRemove = Lists.newArrayList();
for (Map.Entry<String, Object> entry : user.getAdditionalInfo().entrySet()) {
String key = entry.getKey();
if (key.startsWith(KEY_PREFIX)) {
try {
... | [
"public",
"void",
"removeExpiredTokens",
"(",
"CmsUser",
"user",
",",
"long",
"now",
")",
"{",
"List",
"<",
"String",
">",
"toRemove",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Object",
">",... | Removes expired tokens from the user's additional infos.<p>
This method does not write the user back to the database.
@param user the user for which to remove the additional infos
@param now the current time | [
"Removes",
"expired",
"tokens",
"from",
"the",
"user",
"s",
"additional",
"infos",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsPersistentLoginTokenHandler.java#L271-L291 |
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.getPatternAnyEntityInfosAsync | public Observable<List<PatternAnyEntityExtractor>> getPatternAnyEntityInfosAsync(UUID appId, String versionId, GetPatternAnyEntityInfosOptionalParameter getPatternAnyEntityInfosOptionalParameter) {
"""
Get information about the Pattern.Any entity models.
@param appId The application ID.
@param versionId The ve... | java | public Observable<List<PatternAnyEntityExtractor>> getPatternAnyEntityInfosAsync(UUID appId, String versionId, GetPatternAnyEntityInfosOptionalParameter getPatternAnyEntityInfosOptionalParameter) {
return getPatternAnyEntityInfosWithServiceResponseAsync(appId, versionId, getPatternAnyEntityInfosOptionalParamete... | [
"public",
"Observable",
"<",
"List",
"<",
"PatternAnyEntityExtractor",
">",
">",
"getPatternAnyEntityInfosAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"GetPatternAnyEntityInfosOptionalParameter",
"getPatternAnyEntityInfosOptionalParameter",
")",
"{",
"return... | Get information about the Pattern.Any entity models.
@param appId The application ID.
@param versionId The version ID.
@param getPatternAnyEntityInfosOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the valida... | [
"Get",
"information",
"about",
"the",
"Pattern",
".",
"Any",
"entity",
"models",
"."
] | 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#L7417-L7424 |
shrinkwrap/shrinkwrap | impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java | TarHeader.getOctalBytes | public static int getOctalBytes(long value, byte[] buf, int offset, int length) {
"""
Parse an octal integer from a header buffer.
@param header
The header buffer from which to parse.
@param offset
The offset into the buffer from which to parse.
@param length
The number of header bytes to parse.
@return T... | java | public static int getOctalBytes(long value, byte[] buf, int offset, int length) {
int idx = length - 1;
buf[offset + idx] = 0;
--idx;
buf[offset + idx] = (byte) ' ';
--idx;
if (value == 0) {
buf[offset + idx] = (byte) '0';
--idx;
... | [
"public",
"static",
"int",
"getOctalBytes",
"(",
"long",
"value",
",",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"int",
"idx",
"=",
"length",
"-",
"1",
";",
"buf",
"[",
"offset",
"+",
"idx",
"]",
"=",
"0",
";"... | Parse an octal integer from a header buffer.
@param header
The header buffer from which to parse.
@param offset
The offset into the buffer from which to parse.
@param length
The number of header bytes to parse.
@return The integer value of the octal bytes. | [
"Parse",
"an",
"octal",
"integer",
"from",
"a",
"header",
"buffer",
"."
] | train | https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java#L425-L448 |
OpenTSDB/opentsdb | src/core/Tags.java | Tags.resolveAllAsync | public static Deferred<ArrayList<byte[]>> resolveAllAsync(final TSDB tsdb,
final Map<String, String> tags) {
"""
Resolves a set of tag strings to their UIDs asynchronously
@param tsdb the TSDB to use for access
@param tags The tags to resolve
@return A deferred with the list of UIDs in tagk1, tagv1, .. ta... | java | public static Deferred<ArrayList<byte[]>> resolveAllAsync(final TSDB tsdb,
final Map<String, String> tags) {
return resolveAllInternalAsync(tsdb, null, tags, false);
} | [
"public",
"static",
"Deferred",
"<",
"ArrayList",
"<",
"byte",
"[",
"]",
">",
">",
"resolveAllAsync",
"(",
"final",
"TSDB",
"tsdb",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"return",
"resolveAllInternalAsync",
"(",
"tsdb",
... | Resolves a set of tag strings to their UIDs asynchronously
@param tsdb the TSDB to use for access
@param tags The tags to resolve
@return A deferred with the list of UIDs in tagk1, tagv1, .. tagkn, tagvn
order
@throws NoSuchUniqueName if one of the elements in the map contained an
unknown tag name or tag value.
@since ... | [
"Resolves",
"a",
"set",
"of",
"tag",
"strings",
"to",
"their",
"UIDs",
"asynchronously"
] | train | https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/Tags.java#L598-L601 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java | CommonOps_DDRM.invertSPD | public static boolean invertSPD(DMatrixRMaj mat, DMatrixRMaj result ) {
"""
Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled
cholesky is used. Otherwise a standard decomposition.
@see UnrolledCholesky_DDRM
@see LinearSolverFactory_DDRM#chol(int)
@param mat (Input) SPD... | java | public static boolean invertSPD(DMatrixRMaj mat, DMatrixRMaj result ) {
if( mat.numRows != mat.numCols )
throw new IllegalArgumentException("Must be a square matrix");
result.reshape(mat.numRows,mat.numRows);
if( mat.numRows <= UnrolledCholesky_DDRM.MAX ) {
// L*L' = A
... | [
"public",
"static",
"boolean",
"invertSPD",
"(",
"DMatrixRMaj",
"mat",
",",
"DMatrixRMaj",
"result",
")",
"{",
"if",
"(",
"mat",
".",
"numRows",
"!=",
"mat",
".",
"numCols",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Must be a square matrix\"",
")"... | Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled
cholesky is used. Otherwise a standard decomposition.
@see UnrolledCholesky_DDRM
@see LinearSolverFactory_DDRM#chol(int)
@param mat (Input) SPD matrix
@param result (Output) Inverted matrix.
@return true if it could invert the mat... | [
"Matrix",
"inverse",
"for",
"symmetric",
"positive",
"definite",
"matrices",
".",
"For",
"small",
"matrices",
"an",
"unrolled",
"cholesky",
"is",
"used",
".",
"Otherwise",
"a",
"standard",
"decomposition",
"."
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L818-L842 |
overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.detectMimeType | public String detectMimeType(String filename, final InputStream is) throws GetBytesException {
"""
Determines the MIME type of a file with a given input stream.
<p>
The InputStream must exist. It must point to the beginning of the file
contents. And {@link java.io.InputStream#markSupported()} must return
{@l... | java | public String detectMimeType(String filename, final InputStream is) throws GetBytesException {
Callable<byte[]> getBytes = new Callable<byte[]>() {
public byte[] call() throws IOException {
return inputStreamToFirstBytes(is);
}
};
return detectMimeType(filename, getBytes);
} | [
"public",
"String",
"detectMimeType",
"(",
"String",
"filename",
",",
"final",
"InputStream",
"is",
")",
"throws",
"GetBytesException",
"{",
"Callable",
"<",
"byte",
"[",
"]",
">",
"getBytes",
"=",
"new",
"Callable",
"<",
"byte",
"[",
"]",
">",
"(",
")",
... | Determines the MIME type of a file with a given input stream.
<p>
The InputStream must exist. It must point to the beginning of the file
contents. And {@link java.io.InputStream#markSupported()} must return
{@literal true}. (When in doubt, pass a
{@link java.io.BufferedInputStream}.)
</p>
@param filename Name of file... | [
"Determines",
"the",
"MIME",
"type",
"of",
"a",
"file",
"with",
"a",
"given",
"input",
"stream",
"."
] | train | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L219-L227 |
nyla-solutions/nyla | nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java | ClassPath.newInstance | public static <T> T newInstance(Class<?> aClass, Class<?> parameterType,Object initarg)
throws SetupException {
"""
Use a constructor of the a class to create an instance
@param aClass the class object
@param parameterType the parameter type for the constructor
@param initarg the initial constructor argumen... | java | public static <T> T newInstance(Class<?> aClass, Class<?> parameterType,Object initarg)
throws SetupException
{
Class<?>[] paramTypes = {parameterType};
Object[] initArgs = {initarg};
return newInstance(aClass,paramTypes,initArgs);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"newInstance",
"(",
"Class",
"<",
"?",
">",
"aClass",
",",
"Class",
"<",
"?",
">",
"parameterType",
",",
"Object",
"initarg",
")",
"throws",
"SetupException",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"paramTypes",
... | Use a constructor of the a class to create an instance
@param aClass the class object
@param parameterType the parameter type for the constructor
@param initarg the initial constructor argument
@param <T> the class type
@return the new created object
@throws SetupException when an setup error occurs | [
"Use",
"a",
"constructor",
"of",
"the",
"a",
"class",
"to",
"create",
"an",
"instance"
] | train | https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java#L165-L172 |
facebook/fresco | imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java | DefaultImageFormatChecker.isIcoHeader | private static boolean isIcoHeader(final byte[] imageHeaderBytes, final int headerSize) {
"""
Checks if first headerSize bytes of imageHeaderBytes constitute a valid header for a ico image.
Details on ICO header can be found <a href="https://en.wikipedia.org/wiki/ICO_(file_format)">
</a>
@param imageHeaderByt... | java | private static boolean isIcoHeader(final byte[] imageHeaderBytes, final int headerSize) {
if (headerSize < ICO_HEADER.length) {
return false;
}
return ImageFormatCheckerUtils.startsWithPattern(imageHeaderBytes, ICO_HEADER);
} | [
"private",
"static",
"boolean",
"isIcoHeader",
"(",
"final",
"byte",
"[",
"]",
"imageHeaderBytes",
",",
"final",
"int",
"headerSize",
")",
"{",
"if",
"(",
"headerSize",
"<",
"ICO_HEADER",
".",
"length",
")",
"{",
"return",
"false",
";",
"}",
"return",
"Ima... | Checks if first headerSize bytes of imageHeaderBytes constitute a valid header for a ico image.
Details on ICO header can be found <a href="https://en.wikipedia.org/wiki/ICO_(file_format)">
</a>
@param imageHeaderBytes
@param headerSize
@return true if imageHeaderBytes is a valid header for a ico image | [
"Checks",
"if",
"first",
"headerSize",
"bytes",
"of",
"imageHeaderBytes",
"constitute",
"a",
"valid",
"header",
"for",
"a",
"ico",
"image",
".",
"Details",
"on",
"ICO",
"header",
"can",
"be",
"found",
"<a",
"href",
"=",
"https",
":",
"//",
"en",
".",
"wi... | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java#L234-L239 |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java | ZoomableGraphicsContext.fillText | public void fillText(String text, double x, double y) {
"""
Fills the given string of text at position x, y
with the current fill paint attribute.
A {@code null} text value will be ignored.
<p>This method will be affected by any of the
global common, fill, or text
attributes as specified in the
Rendering A... | java | public void fillText(String text, double x, double y) {
this.gc.fillText(text, doc2fxX(x), doc2fxY(y));
} | [
"public",
"void",
"fillText",
"(",
"String",
"text",
",",
"double",
"x",
",",
"double",
"y",
")",
"{",
"this",
".",
"gc",
".",
"fillText",
"(",
"text",
",",
"doc2fxX",
"(",
"x",
")",
",",
"doc2fxY",
"(",
"y",
")",
")",
";",
"}"
] | Fills the given string of text at position x, y
with the current fill paint attribute.
A {@code null} text value will be ignored.
<p>This method will be affected by any of the
global common, fill, or text
attributes as specified in the
Rendering Attributes Table of {@link GraphicsContext}.
@param text the string of t... | [
"Fills",
"the",
"given",
"string",
"of",
"text",
"at",
"position",
"x",
"y",
"with",
"the",
"current",
"fill",
"paint",
"attribute",
".",
"A",
"{",
"@code",
"null",
"}",
"text",
"value",
"will",
"be",
"ignored",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java#L1093-L1095 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/SiftDetector.java | SiftDetector.isEdge | boolean isEdge( int x , int y ) {
"""
Performs an edge test to remove false positives. See 4.1 in [1].
"""
if( edgeThreshold <= 0 )
return false;
double xx = derivXX.compute(x,y);
double xy = derivXY.compute(x,y);
double yy = derivYY.compute(x,y);
double Tr = xx + yy;
double det = xx*yy - xy*... | java | boolean isEdge( int x , int y ) {
if( edgeThreshold <= 0 )
return false;
double xx = derivXX.compute(x,y);
double xy = derivXY.compute(x,y);
double yy = derivYY.compute(x,y);
double Tr = xx + yy;
double det = xx*yy - xy*xy;
// Paper quite "In the unlikely event that the determinant is negative, the ... | [
"boolean",
"isEdge",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"if",
"(",
"edgeThreshold",
"<=",
"0",
")",
"return",
"false",
";",
"double",
"xx",
"=",
"derivXX",
".",
"compute",
"(",
"x",
",",
"y",
")",
";",
"double",
"xy",
"=",
"derivXY",
"."... | Performs an edge test to remove false positives. See 4.1 in [1]. | [
"Performs",
"an",
"edge",
"test",
"to",
"remove",
"false",
"positives",
".",
"See",
"4",
".",
"1",
"in",
"[",
"1",
"]",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/SiftDetector.java#L311-L331 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/MultiMEProxyHandler.java | MultiMEProxyHandler.initialiseNonPersistent | public void initialiseNonPersistent(MessageProcessor messageProcessor,
SIMPTransactionManager txManager) {
"""
Called to recover Neighbours from the MessageStore.
@param messageProcessor The message processor instance
@param txManager The transaction manager instance to ... | java | public void initialiseNonPersistent(MessageProcessor messageProcessor,
SIMPTransactionManager txManager)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "initialiseNonPersistent", messageProcessor);
//Release 1 has no Link Bundle ... | [
"public",
"void",
"initialiseNonPersistent",
"(",
"MessageProcessor",
"messageProcessor",
",",
"SIMPTransactionManager",
"txManager",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibT... | Called to recover Neighbours from the MessageStore.
@param messageProcessor The message processor instance
@param txManager The transaction manager instance to create Local transactions
under. | [
"Called",
"to",
"recover",
"Neighbours",
"from",
"the",
"MessageStore",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/MultiMEProxyHandler.java#L140-L167 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/NumericUtils.java | NumericUtils.checkIfZero | public static final boolean checkIfZero(String value, Class valueClazz) {
"""
Check if zero
@param value value string
@param valueClazz value class
@return
"""
boolean returnValue=false;
if(value != null && NumberUtils.isNumber(value) && numberTypes.get(valueClazz) != null)
... | java | public static final boolean checkIfZero(String value, Class valueClazz)
{
boolean returnValue=false;
if(value != null && NumberUtils.isNumber(value) && numberTypes.get(valueClazz) != null)
{
switch (numberTypes.get(valueClazz))
{
case INTEGER:... | [
"public",
"static",
"final",
"boolean",
"checkIfZero",
"(",
"String",
"value",
",",
"Class",
"valueClazz",
")",
"{",
"boolean",
"returnValue",
"=",
"false",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"NumberUtils",
".",
"isNumber",
"(",
"value",
")",
"&&... | Check if zero
@param value value string
@param valueClazz value class
@return | [
"Check",
"if",
"zero"
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/NumericUtils.java#L66-L103 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java | RegistriesInner.getCredentials | public RegistryCredentialsInner getCredentials(String resourceGroupName, String registryName) {
"""
Gets the administrator login credentials for the specified container registry.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the... | java | public RegistryCredentialsInner getCredentials(String resourceGroupName, String registryName) {
return getCredentialsWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body();
} | [
"public",
"RegistryCredentialsInner",
"getCredentials",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
")",
"{",
"return",
"getCredentialsWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"registryName",
")",
".",
"toBlocking",
"(",
")",
".",
... | Gets the administrator login credentials for the specified container registry.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws Cloud... | [
"Gets",
"the",
"administrator",
"login",
"credentials",
"for",
"the",
"specified",
"container",
"registry",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java#L791-L793 |
joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java | TurboProjectReader.readLeafTasks | private void readLeafTasks(Task parent, Integer id) {
"""
Read the leaf tasks for an individual WBS node.
@param parent parent task
@param id first task ID
"""
Integer currentID = id;
Table table = getTable("A1TAB");
while (currentID.intValue() != 0)
{
if (m_projectFile.get... | java | private void readLeafTasks(Task parent, Integer id)
{
Integer currentID = id;
Table table = getTable("A1TAB");
while (currentID.intValue() != 0)
{
if (m_projectFile.getTaskByUniqueID(currentID) == null)
{
readTask(parent, currentID);
}
currentID... | [
"private",
"void",
"readLeafTasks",
"(",
"Task",
"parent",
",",
"Integer",
"id",
")",
"{",
"Integer",
"currentID",
"=",
"id",
";",
"Table",
"table",
"=",
"getTable",
"(",
"\"A1TAB\"",
")",
";",
"while",
"(",
"currentID",
".",
"intValue",
"(",
")",
"!=",
... | Read the leaf tasks for an individual WBS node.
@param parent parent task
@param id first task ID | [
"Read",
"the",
"leaf",
"tasks",
"for",
"an",
"individual",
"WBS",
"node",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java#L349-L361 |
elki-project/elki | elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java | ByteArrayUtil.writeShort | public static int writeShort(byte[] array, int offset, int v) {
"""
Write a short to the byte array at the given offset.
@param array Array to write to
@param offset Offset to write to
@param v data
@return number of bytes written
"""
array[offset + 0] = (byte) (v >>> 8);
array[offset + 1] = (byt... | java | public static int writeShort(byte[] array, int offset, int v) {
array[offset + 0] = (byte) (v >>> 8);
array[offset + 1] = (byte) (v >>> 0);
return SIZE_SHORT;
} | [
"public",
"static",
"int",
"writeShort",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"offset",
",",
"int",
"v",
")",
"{",
"array",
"[",
"offset",
"+",
"0",
"]",
"=",
"(",
"byte",
")",
"(",
"v",
">>>",
"8",
")",
";",
"array",
"[",
"offset",
"+",... | Write a short to the byte array at the given offset.
@param array Array to write to
@param offset Offset to write to
@param v data
@return number of bytes written | [
"Write",
"a",
"short",
"to",
"the",
"byte",
"array",
"at",
"the",
"given",
"offset",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L106-L110 |
att/AAF | cadi/core/src/main/java/com/att/cadi/filter/CadiAccess.java | CadiAccess.buildLine | public final static StringBuilder buildLine(StringBuilder sb, Object[] elements) {
"""
/*
Build a line of code onto a StringBuilder based on Objects. Analyze whether
spaces need including.
@param sb
@param elements
@return
"""
sb.append(' ');
String str;
boolean notFirst = false;
for(Object o :... | java | public final static StringBuilder buildLine(StringBuilder sb, Object[] elements) {
sb.append(' ');
String str;
boolean notFirst = false;
for(Object o : elements) {
if(o!=null) {
str = o.toString();
if(str.length()>0) {
if(notFirst && shouldAddSpace(str,true) && shouldAddSpace(sb,false)) {
... | [
"public",
"final",
"static",
"StringBuilder",
"buildLine",
"(",
"StringBuilder",
"sb",
",",
"Object",
"[",
"]",
"elements",
")",
"{",
"sb",
".",
"append",
"(",
"'",
"'",
")",
";",
"String",
"str",
";",
"boolean",
"notFirst",
"=",
"false",
";",
"for",
"... | /*
Build a line of code onto a StringBuilder based on Objects. Analyze whether
spaces need including.
@param sb
@param elements
@return | [
"/",
"*",
"Build",
"a",
"line",
"of",
"code",
"onto",
"a",
"StringBuilder",
"based",
"on",
"Objects",
".",
"Analyze",
"whether",
"spaces",
"need",
"including",
"."
] | train | https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/core/src/main/java/com/att/cadi/filter/CadiAccess.java#L93-L112 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/SampleableConcurrentHashMap.java | SampleableConcurrentHashMap.fetchEntries | public int fetchEntries(int tableIndex, int size, List<Map.Entry<K, V>> entries) {
"""
Fetches entries from given <code>tableIndex</code> as <code>size</code>
and puts them into <code>entries</code> list.
@param tableIndex Index (checkpoint) for starting point of fetch operation
@param size Count of how... | java | public int fetchEntries(int tableIndex, int size, List<Map.Entry<K, V>> entries) {
final long now = Clock.currentTimeMillis();
final Segment<K, V> segment = segments[0];
final HashEntry<K, V>[] currentTable = segment.table;
int nextTableIndex;
if (tableIndex >= 0 && tableIndex < ... | [
"public",
"int",
"fetchEntries",
"(",
"int",
"tableIndex",
",",
"int",
"size",
",",
"List",
"<",
"Map",
".",
"Entry",
"<",
"K",
",",
"V",
">",
">",
"entries",
")",
"{",
"final",
"long",
"now",
"=",
"Clock",
".",
"currentTimeMillis",
"(",
")",
";",
... | Fetches entries from given <code>tableIndex</code> as <code>size</code>
and puts them into <code>entries</code> list.
@param tableIndex Index (checkpoint) for starting point of fetch operation
@param size Count of how many entries will be fetched
@param entries List that fetched entries will be put into
@retu... | [
"Fetches",
"entries",
"from",
"given",
"<code",
">",
"tableIndex<",
"/",
"code",
">",
"as",
"<code",
">",
"size<",
"/",
"code",
">",
"and",
"puts",
"them",
"into",
"<code",
">",
"entries<",
"/",
"code",
">",
"list",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/SampleableConcurrentHashMap.java#L102-L128 |
before/uadetector | modules/uadetector-core/src/main/java/net/sf/uadetector/VersionParser.java | VersionParser.parseVersion | public static VersionNumber parseVersion(@Nonnull final String version) {
"""
Interprets a string with version information. The first found group will be taken and processed.
@param version
version as string
@return an object of {@code VersionNumber}, never {@code null}
"""
Check.notNull(version, "versi... | java | public static VersionNumber parseVersion(@Nonnull final String version) {
Check.notNull(version, "version");
VersionNumber result = new VersionNumber(new ArrayList<String>(0), version);
final Matcher matcher = VERSIONSTRING.matcher(version);
if (matcher.find()) {
final List<String> groups = Arrays.asList(ma... | [
"public",
"static",
"VersionNumber",
"parseVersion",
"(",
"@",
"Nonnull",
"final",
"String",
"version",
")",
"{",
"Check",
".",
"notNull",
"(",
"version",
",",
"\"version\"",
")",
";",
"VersionNumber",
"result",
"=",
"new",
"VersionNumber",
"(",
"new",
"ArrayL... | Interprets a string with version information. The first found group will be taken and processed.
@param version
version as string
@return an object of {@code VersionNumber}, never {@code null} | [
"Interprets",
"a",
"string",
"with",
"version",
"information",
".",
"The",
"first",
"found",
"group",
"will",
"be",
"taken",
"and",
"processed",
"."
] | train | https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/VersionParser.java#L346-L359 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/CharacterDecoder.java | CharacterDecoder.decodeBuffer | public void decodeBuffer(InputStream aStream, OutputStream bStream) throws IOException {
"""
Decode the text from the InputStream and write the decoded
octets to the OutputStream. This method runs until the stream
is exhausted.
@exception CEFormatException An error has occured while decoding
@exception CEStrea... | java | public void decodeBuffer(InputStream aStream, OutputStream bStream) throws IOException {
int i;
int totalBytes = 0;
PushbackInputStream ps = new PushbackInputStream (aStream);
decodeBufferPrefix(ps, bStream);
while (true) {
int length;
try {
... | [
"public",
"void",
"decodeBuffer",
"(",
"InputStream",
"aStream",
",",
"OutputStream",
"bStream",
")",
"throws",
"IOException",
"{",
"int",
"i",
";",
"int",
"totalBytes",
"=",
"0",
";",
"PushbackInputStream",
"ps",
"=",
"new",
"PushbackInputStream",
"(",
"aStream... | Decode the text from the InputStream and write the decoded
octets to the OutputStream. This method runs until the stream
is exhausted.
@exception CEFormatException An error has occured while decoding
@exception CEStreamExhausted The input stream is unexpectedly out of data | [
"Decode",
"the",
"text",
"from",
"the",
"InputStream",
"and",
"write",
"the",
"decoded",
"octets",
"to",
"the",
"OutputStream",
".",
"This",
"method",
"runs",
"until",
"the",
"stream",
"is",
"exhausted",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/CharacterDecoder.java#L151-L179 |
UrielCh/ovh-java-sdk | ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java | ApiOvhVps.serviceName_backupftp_access_POST | public net.minidev.ovh.api.dedicated.server.OvhTask serviceName_backupftp_access_POST(String serviceName, Boolean cifs, Boolean ftp, String ipBlock, Boolean nfs) throws IOException {
"""
Create a new Backup FTP ACL
REST: POST /vps/{serviceName}/backupftp/access
@param ipBlock [required] The IP Block specific t... | java | public net.minidev.ovh.api.dedicated.server.OvhTask serviceName_backupftp_access_POST(String serviceName, Boolean cifs, Boolean ftp, String ipBlock, Boolean nfs) throws IOException {
String qPath = "/vps/{serviceName}/backupftp/access";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new H... | [
"public",
"net",
".",
"minidev",
".",
"ovh",
".",
"api",
".",
"dedicated",
".",
"server",
".",
"OvhTask",
"serviceName_backupftp_access_POST",
"(",
"String",
"serviceName",
",",
"Boolean",
"cifs",
",",
"Boolean",
"ftp",
",",
"String",
"ipBlock",
",",
"Boolean"... | Create a new Backup FTP ACL
REST: POST /vps/{serviceName}/backupftp/access
@param ipBlock [required] The IP Block specific to this ACL. It musts belong to your server.
@param cifs [required] Wether to allow the CIFS (SMB) protocol for this ACL
@param nfs [required] Wether to allow the NFS protocol for this ACL
@param ... | [
"Create",
"a",
"new",
"Backup",
"FTP",
"ACL"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L792-L802 |
zk1931/jzab | src/main/java/com/github/zk1931/jzab/PersistentState.java | PersistentState.setLastSeenConfig | void setLastSeenConfig(ClusterConfiguration conf) throws IOException {
"""
Updates the last seen configuration.
@param conf the updated configuration.
@throws IOException in case of IO failure.
"""
String version = conf.getVersion().toSimpleString();
File file = new File(rootDir, String.format("clu... | java | void setLastSeenConfig(ClusterConfiguration conf) throws IOException {
String version = conf.getVersion().toSimpleString();
File file = new File(rootDir, String.format("cluster_config.%s", version));
FileUtils.writePropertiesToFile(conf.toProperties(), file);
// Since the new config file gets created, w... | [
"void",
"setLastSeenConfig",
"(",
"ClusterConfiguration",
"conf",
")",
"throws",
"IOException",
"{",
"String",
"version",
"=",
"conf",
".",
"getVersion",
"(",
")",
".",
"toSimpleString",
"(",
")",
";",
"File",
"file",
"=",
"new",
"File",
"(",
"rootDir",
",",... | Updates the last seen configuration.
@param conf the updated configuration.
@throws IOException in case of IO failure. | [
"Updates",
"the",
"last",
"seen",
"configuration",
"."
] | train | https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/PersistentState.java#L253-L259 |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java | GroupAdministrationHelper.updateGroupMembers | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
"""
Update the members of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user
"""
if (!canEditGroup(updater, groupForm.getKey())) {
throw... | java | public void updateGroupMembers(GroupForm groupForm, IPerson updater) {
if (!canEditGroup(updater, groupForm.getKey())) {
throw new RuntimeAuthorizationException(
updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
}
if (log.isDebugEnabled()) {
... | [
"public",
"void",
"updateGroupMembers",
"(",
"GroupForm",
"groupForm",
",",
"IPerson",
"updater",
")",
"{",
"if",
"(",
"!",
"canEditGroup",
"(",
"updater",
",",
"groupForm",
".",
"getKey",
"(",
")",
")",
")",
"{",
"throw",
"new",
"RuntimeAuthorizationException... | Update the members of an existing group in the group store.
@param groupForm Form representing the new group configuration
@param updater Updating user | [
"Update",
"the",
"members",
"of",
"an",
"existing",
"group",
"in",
"the",
"group",
"store",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java#L144-L179 |
lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera/VideoRenderProcessing.java | VideoRenderProcessing.imageToOutput | protected void imageToOutput( double x , double y , Point2D_F64 pt ) {
"""
Converts a coordinate from pixel to the output image coordinates
"""
pt.x = x/scale - tranX/scale;
pt.y = y/scale - tranY/scale;
} | java | protected void imageToOutput( double x , double y , Point2D_F64 pt ) {
pt.x = x/scale - tranX/scale;
pt.y = y/scale - tranY/scale;
} | [
"protected",
"void",
"imageToOutput",
"(",
"double",
"x",
",",
"double",
"y",
",",
"Point2D_F64",
"pt",
")",
"{",
"pt",
".",
"x",
"=",
"x",
"/",
"scale",
"-",
"tranX",
"/",
"scale",
";",
"pt",
".",
"y",
"=",
"y",
"/",
"scale",
"-",
"tranY",
"/",
... | Converts a coordinate from pixel to the output image coordinates | [
"Converts",
"a",
"coordinate",
"from",
"pixel",
"to",
"the",
"output",
"image",
"coordinates"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoRenderProcessing.java#L139-L142 |
jeslopalo/flash-messages | flash-messages-thymeleaf/src/main/java/es/sandbox/ui/messages/thymeleaf/FlashMessagesElementTagProcessor.java | FlashMessagesElementTagProcessor.doProcess | @Override
protected void doProcess(ITemplateContext context, IProcessableElementTag tag, IElementTagStructureHandler structureHandler) {
"""
<pre>
<div data-level="${level}" class="alert alert-${level}">
<c:choose>
<c:when test="${fn:length(messages) gt 1}">
<ul>
<c:forEach var="message" items="${messages... | java | @Override
protected void doProcess(ITemplateContext context, IProcessableElementTag tag, IElementTagStructureHandler structureHandler) {
checkPreconditions(context, tag, structureHandler);
final WebEngineContext webEngineContext = (WebEngineContext) context;
final IModelFactory modelFactory... | [
"@",
"Override",
"protected",
"void",
"doProcess",
"(",
"ITemplateContext",
"context",
",",
"IProcessableElementTag",
"tag",
",",
"IElementTagStructureHandler",
"structureHandler",
")",
"{",
"checkPreconditions",
"(",
"context",
",",
"tag",
",",
"structureHandler",
")",... | <pre>
<div data-level="${level}" class="alert alert-${level}">
<c:choose>
<c:when test="${fn:length(messages) gt 1}">
<ul>
<c:forEach var="message" items="${messages}">
<li data-timestamp="${message.timestamp}"><c:out value="${message.text}" escapeXml="false"/></li>
</c:forEach>
</ul>
</c:when>
<c:otherwise>
<c:forEach... | [
"<pre",
">",
"<div",
"data",
"-",
"level",
"=",
"$",
"{",
"level",
"}",
"class",
"=",
"alert",
"alert",
"-",
"$",
"{",
"level",
"}",
">",
"<c",
":",
"choose",
">",
"<c",
":",
"when",
"test",
"=",
"$",
"{",
"fn",
":",
"length",
"(",
"messages",
... | train | https://github.com/jeslopalo/flash-messages/blob/2faf23b09a8f72803fb295f0e0fe1d57282224cf/flash-messages-thymeleaf/src/main/java/es/sandbox/ui/messages/thymeleaf/FlashMessagesElementTagProcessor.java#L79-L100 |
hawkular/hawkular-commons | hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java | MessageProcessor.createMessageWithBinaryData | protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage,
InputStream inputStream) throws JMSException {
"""
Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers.
"""
return createMessageWithBinaryData(... | java | protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage,
InputStream inputStream) throws JMSException {
return createMessageWithBinaryData(context, basicMessage, inputStream, null);
} | [
"protected",
"Message",
"createMessageWithBinaryData",
"(",
"ConnectionContext",
"context",
",",
"BasicMessage",
"basicMessage",
",",
"InputStream",
"inputStream",
")",
"throws",
"JMSException",
"{",
"return",
"createMessageWithBinaryData",
"(",
"context",
",",
"basicMessag... | Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers. | [
"Same",
"as",
"{"
] | train | https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java#L418-L421 |
NordicSemiconductor/Android-DFU-Library | dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java | SecureDfuImpl.selectObject | private ObjectInfo selectObject(final int type)
throws DeviceDisconnectedException, DfuException, UploadAbortedException,
RemoteDfuException, UnknownResponseException {
"""
Selects the current object and reads its metadata. The object info contains the max object
size, and the offset and CRC32 of the whole ... | java | private ObjectInfo selectObject(final int type)
throws DeviceDisconnectedException, DfuException, UploadAbortedException,
RemoteDfuException, UnknownResponseException {
if (!mConnected)
throw new DeviceDisconnectedException("Unable to read object info: device disconnected");
OP_CODE_SELECT_OBJECT[1] = (by... | [
"private",
"ObjectInfo",
"selectObject",
"(",
"final",
"int",
"type",
")",
"throws",
"DeviceDisconnectedException",
",",
"DfuException",
",",
"UploadAbortedException",
",",
"RemoteDfuException",
",",
"UnknownResponseException",
"{",
"if",
"(",
"!",
"mConnected",
")",
... | Selects the current object and reads its metadata. The object info contains the max object
size, and the offset and CRC32 of the whole object until now.
@return object info.
@throws DeviceDisconnectedException
@throws DfuException
@throws UploadAbortedException
@throws RemoteDfuException thrown when the returned statu... | [
"Selects",
"the",
"current",
"object",
"and",
"reads",
"its",
"metadata",
".",
"The",
"object",
"info",
"contains",
"the",
"max",
"object",
"size",
"and",
"the",
"offset",
"and",
"CRC32",
"of",
"the",
"whole",
"object",
"until",
"now",
"."
] | train | https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java#L836-L857 |
liferay/com-liferay-commerce | commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java | CommerceCurrencyPersistenceImpl.removeByG_P | @Override
public void removeByG_P(long groupId, boolean primary) {
"""
Removes all the commerce currencies where groupId = ? and primary = ? from the database.
@param groupId the group ID
@param primary the primary
"""
for (CommerceCurrency commerceCurrency : findByG_P(groupId, primary,
Quer... | java | @Override
public void removeByG_P(long groupId, boolean primary) {
for (CommerceCurrency commerceCurrency : findByG_P(groupId, primary,
QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceCurrency);
}
} | [
"@",
"Override",
"public",
"void",
"removeByG_P",
"(",
"long",
"groupId",
",",
"boolean",
"primary",
")",
"{",
"for",
"(",
"CommerceCurrency",
"commerceCurrency",
":",
"findByG_P",
"(",
"groupId",
",",
"primary",
",",
"QueryUtil",
".",
"ALL_POS",
",",
"QueryUt... | Removes all the commerce currencies where groupId = ? and primary = ? from the database.
@param groupId the group ID
@param primary the primary | [
"Removes",
"all",
"the",
"commerce",
"currencies",
"where",
"groupId",
"=",
"?",
";",
"and",
"primary",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L2719-L2725 |
alkacon/opencms-core | src-modules/org/opencms/workplace/commons/CmsLock.java | CmsLock.performSingleResourceOperation | protected void performSingleResourceOperation(String resourceName, int dialogAction) throws CmsException {
"""
Performs the lock state operation on a single resource.<p>
@param resourceName the resource name to perform the operation on
@param dialogAction the lock action: lock, unlock or change lock
@throws C... | java | protected void performSingleResourceOperation(String resourceName, int dialogAction) throws CmsException {
// store original name to use for lock action
String originalResourceName = resourceName;
CmsResource res = getCms().readResource(resourceName, CmsResourceFilter.ALL);
if (res.isFo... | [
"protected",
"void",
"performSingleResourceOperation",
"(",
"String",
"resourceName",
",",
"int",
"dialogAction",
")",
"throws",
"CmsException",
"{",
"// store original name to use for lock action",
"String",
"originalResourceName",
"=",
"resourceName",
";",
"CmsResource",
"r... | Performs the lock state operation on a single resource.<p>
@param resourceName the resource name to perform the operation on
@param dialogAction the lock action: lock, unlock or change lock
@throws CmsException if the operation fails | [
"Performs",
"the",
"lock",
"state",
"operation",
"on",
"a",
"single",
"resource",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsLock.java#L975-L1003 |
hdbeukel/james-core | src/main/java/org/jamesframework/core/problems/constraints/validations/UnanimousValidation.java | UnanimousValidation.addValidation | public void addValidation(Object key, Validation validation) {
"""
Add a validation object. A key is required that can be used to retrieve the validation object.
@param key key used to retrieve the validation object
@param validation validation object
"""
initMapOnce();
validations.put(key,... | java | public void addValidation(Object key, Validation validation){
initMapOnce();
validations.put(key, validation);
// update aggregated value
passedAll = passedAll && validation.passed();
} | [
"public",
"void",
"addValidation",
"(",
"Object",
"key",
",",
"Validation",
"validation",
")",
"{",
"initMapOnce",
"(",
")",
";",
"validations",
".",
"put",
"(",
"key",
",",
"validation",
")",
";",
"// update aggregated value",
"passedAll",
"=",
"passedAll",
"... | Add a validation object. A key is required that can be used to retrieve the validation object.
@param key key used to retrieve the validation object
@param validation validation object | [
"Add",
"a",
"validation",
"object",
".",
"A",
"key",
"is",
"required",
"that",
"can",
"be",
"used",
"to",
"retrieve",
"the",
"validation",
"object",
"."
] | train | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/problems/constraints/validations/UnanimousValidation.java#L60-L65 |
mapsforge/mapsforge | sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java | DatabaseUtils.appendEscapedSQLString | public static void appendEscapedSQLString(StringBuilder sb, String sqlString) {
"""
Appends an SQL string to the given StringBuilder, including the opening
and closing single quotes. Any single quotes internal to sqlString will
be escaped.
This method is deprecated because we want to encourage everyone
to us... | java | public static void appendEscapedSQLString(StringBuilder sb, String sqlString) {
sb.append('\'');
if (sqlString.indexOf('\'') != -1) {
int length = sqlString.length();
for (int i = 0; i < length; i++) {
char c = sqlString.charAt(i);
if (c == '\'') {... | [
"public",
"static",
"void",
"appendEscapedSQLString",
"(",
"StringBuilder",
"sb",
",",
"String",
"sqlString",
")",
"{",
"sb",
".",
"append",
"(",
"'",
"'",
")",
";",
"if",
"(",
"sqlString",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
")",
"{"... | Appends an SQL string to the given StringBuilder, including the opening
and closing single quotes. Any single quotes internal to sqlString will
be escaped.
This method is deprecated because we want to encourage everyone
to use the "?" binding form. However, when implementing a
ContentProvider, one may want to add WHE... | [
"Appends",
"an",
"SQL",
"string",
"to",
"the",
"given",
"StringBuilder",
"including",
"the",
"opening",
"and",
"closing",
"single",
"quotes",
".",
"Any",
"single",
"quotes",
"internal",
"to",
"sqlString",
"will",
"be",
"escaped",
"."
] | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L343-L357 |
facebook/fresco | imagepipeline/src/main/java/com/facebook/imagepipeline/core/ImagePipeline.java | ImagePipeline.fetchEncodedImage | public DataSource<CloseableReference<PooledByteBuffer>> fetchEncodedImage(
ImageRequest imageRequest,
Object callerContext) {
"""
Submits a request for execution and returns a DataSource representing the pending encoded
image(s).
<p> The ResizeOptions in the imageRequest will be ignored for this fe... | java | public DataSource<CloseableReference<PooledByteBuffer>> fetchEncodedImage(
ImageRequest imageRequest,
Object callerContext) {
return fetchEncodedImage(imageRequest, callerContext, null);
} | [
"public",
"DataSource",
"<",
"CloseableReference",
"<",
"PooledByteBuffer",
">",
">",
"fetchEncodedImage",
"(",
"ImageRequest",
"imageRequest",
",",
"Object",
"callerContext",
")",
"{",
"return",
"fetchEncodedImage",
"(",
"imageRequest",
",",
"callerContext",
",",
"nu... | Submits a request for execution and returns a DataSource representing the pending encoded
image(s).
<p> The ResizeOptions in the imageRequest will be ignored for this fetch
<p>The returned DataSource must be closed once the client has finished with it.
@param imageRequest the request to submit
@return a DataSource r... | [
"Submits",
"a",
"request",
"for",
"execution",
"and",
"returns",
"a",
"DataSource",
"representing",
"the",
"pending",
"encoded",
"image",
"(",
"s",
")",
"."
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline/src/main/java/com/facebook/imagepipeline/core/ImagePipeline.java#L296-L300 |
alkacon/opencms-core | src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java | CmsDetailOnlyContainerUtil.getDetailOnlyPageName | public static String getDetailOnlyPageName(
CmsObject cms,
CmsResource pageResource,
String detailPath,
String locale) {
"""
Returns the site/root path to the detail only container page, for site/root path of the detail content.<p>
@param cms the current cms context
@param pageR... | java | public static String getDetailOnlyPageName(
CmsObject cms,
CmsResource pageResource,
String detailPath,
String locale) {
return getDetailOnlyPageNameWithoutLocaleCheck(detailPath, getDetailContainerLocale(cms, locale, pageResource));
} | [
"public",
"static",
"String",
"getDetailOnlyPageName",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"pageResource",
",",
"String",
"detailPath",
",",
"String",
"locale",
")",
"{",
"return",
"getDetailOnlyPageNameWithoutLocaleCheck",
"(",
"detailPath",
",",
"getDetailCon... | Returns the site/root path to the detail only container page, for site/root path of the detail content.<p>
@param cms the current cms context
@param pageResource the detail page resource
@param detailPath the site or root path to the detail content (accordingly site or root path's will be returned)
@param locale the l... | [
"Returns",
"the",
"site",
"/",
"root",
"path",
"to",
"the",
"detail",
"only",
"container",
"page",
"for",
"site",
"/",
"root",
"path",
"of",
"the",
"detail",
"content",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java#L234-L241 |
apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateModality | private void validateModality(SqlNode query) {
"""
Validates that a query can deliver the modality it promises. Only called
on the top-most SELECT or set operator in the tree.
"""
final SqlModality modality = deduceModality(query);
if (query instanceof SqlSelect) {
final SqlSelect select = (SqlSelect) ... | java | private void validateModality(SqlNode query) {
final SqlModality modality = deduceModality(query);
if (query instanceof SqlSelect) {
final SqlSelect select = (SqlSelect) query;
validateModality(select, modality, true);
} else if (query.getKind() == SqlKind.VALUES) {
switch (modality) {
case STREAM:
... | [
"private",
"void",
"validateModality",
"(",
"SqlNode",
"query",
")",
"{",
"final",
"SqlModality",
"modality",
"=",
"deduceModality",
"(",
"query",
")",
";",
"if",
"(",
"query",
"instanceof",
"SqlSelect",
")",
"{",
"final",
"SqlSelect",
"select",
"=",
"(",
"S... | Validates that a query can deliver the modality it promises. Only called
on the top-most SELECT or set operator in the tree. | [
"Validates",
"that",
"a",
"query",
"can",
"deliver",
"the",
"modality",
"it",
"promises",
".",
"Only",
"called",
"on",
"the",
"top",
"-",
"most",
"SELECT",
"or",
"set",
"operator",
"in",
"the",
"tree",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3550-L3571 |
paymill/paymill-java | src/main/java/com/paymill/services/TransactionService.java | TransactionService.createWithPaymentAndClient | public Transaction createWithPaymentAndClient( Payment payment, Client client, Integer amount, String currency ) {
"""
Executes a {@link Transaction} with {@link Payment} for the given amount in the given currency.
@param payment
A PAYMILL {@link Payment} representing credit card or direct debit.
@param client
... | java | public Transaction createWithPaymentAndClient( Payment payment, Client client, Integer amount, String currency ) {
return this.createWithPaymentAndClient( payment, client, amount, currency, null );
} | [
"public",
"Transaction",
"createWithPaymentAndClient",
"(",
"Payment",
"payment",
",",
"Client",
"client",
",",
"Integer",
"amount",
",",
"String",
"currency",
")",
"{",
"return",
"this",
".",
"createWithPaymentAndClient",
"(",
"payment",
",",
"client",
",",
"amou... | Executes a {@link Transaction} with {@link Payment} for the given amount in the given currency.
@param payment
A PAYMILL {@link Payment} representing credit card or direct debit.
@param client
The PAYMILL {@link Client} which have to be charged.
@param amount
Amount (in cents) which will be charged.
@param currency
ISO... | [
"Executes",
"a",
"{"
] | train | https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/TransactionService.java#L258-L260 |
ops4j/org.ops4j.pax.logging | pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java | ThrowableProxy.formatWrapper | public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final String suffix) {
"""
Formats the specified Throwable.
@param sb StringBuilder to contain the formatted Throwable.
@param cause The Throwable to format.
@param suffix
"""
this.formatWrapper(sb, cause, null, PlainTe... | java | public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final String suffix) {
this.formatWrapper(sb, cause, null, PlainTextRenderer.getInstance(), suffix);
} | [
"public",
"void",
"formatWrapper",
"(",
"final",
"StringBuilder",
"sb",
",",
"final",
"ThrowableProxy",
"cause",
",",
"final",
"String",
"suffix",
")",
"{",
"this",
".",
"formatWrapper",
"(",
"sb",
",",
"cause",
",",
"null",
",",
"PlainTextRenderer",
".",
"g... | Formats the specified Throwable.
@param sb StringBuilder to contain the formatted Throwable.
@param cause The Throwable to format.
@param suffix | [
"Formats",
"the",
"specified",
"Throwable",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java#L349-L351 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/PCARunner.java | PCARunner.processIds | public PCAResult processIds(DBIDs ids, Relation<? extends NumberVector> database) {
"""
Run PCA on a collection of database IDs.
@param ids a collection of ids
@param database the database used
@return PCA result
"""
return processCovarMatrix(covarianceMatrixBuilder.processIds(ids, database));
} | java | public PCAResult processIds(DBIDs ids, Relation<? extends NumberVector> database) {
return processCovarMatrix(covarianceMatrixBuilder.processIds(ids, database));
} | [
"public",
"PCAResult",
"processIds",
"(",
"DBIDs",
"ids",
",",
"Relation",
"<",
"?",
"extends",
"NumberVector",
">",
"database",
")",
"{",
"return",
"processCovarMatrix",
"(",
"covarianceMatrixBuilder",
".",
"processIds",
"(",
"ids",
",",
"database",
")",
")",
... | Run PCA on a collection of database IDs.
@param ids a collection of ids
@param database the database used
@return PCA result | [
"Run",
"PCA",
"on",
"a",
"collection",
"of",
"database",
"IDs",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/PCARunner.java#L73-L75 |
SUSE/salt-netapi-client | src/main/java/com/suse/salt/netapi/parser/ArgumentsAdapter.java | ArgumentsAdapter.isKwarg | private boolean isKwarg(Map<String, Object> arg) {
"""
Checks whether an object argument is kwarg.
Object argument is kwarg if it contains __kwarg__ property set to true.
@param arg object argument to be tested
@return true if object argument is kwarg
"""
Object kwarg = arg.get(KWARG_KEY);
... | java | private boolean isKwarg(Map<String, Object> arg) {
Object kwarg = arg.get(KWARG_KEY);
return kwarg != null
&& kwarg instanceof Boolean
&& ((Boolean) kwarg);
} | [
"private",
"boolean",
"isKwarg",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"arg",
")",
"{",
"Object",
"kwarg",
"=",
"arg",
".",
"get",
"(",
"KWARG_KEY",
")",
";",
"return",
"kwarg",
"!=",
"null",
"&&",
"kwarg",
"instanceof",
"Boolean",
"&&",
"(",
... | Checks whether an object argument is kwarg.
Object argument is kwarg if it contains __kwarg__ property set to true.
@param arg object argument to be tested
@return true if object argument is kwarg | [
"Checks",
"whether",
"an",
"object",
"argument",
"is",
"kwarg",
".",
"Object",
"argument",
"is",
"kwarg",
"if",
"it",
"contains",
"__kwarg__",
"property",
"set",
"to",
"true",
"."
] | train | https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/parser/ArgumentsAdapter.java#L77-L82 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/SoftDeleteDetailHandler.java | SoftDeleteDetailHandler.init | public void init(Record record, BaseField fldDeleteFlag, Record recDetail) {
"""
Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()).
"""
m_fldDeleteFlag = fldDeleteFlag;
m_recDetail = recDetail;
super.init(record);
} | java | public void init(Record record, BaseField fldDeleteFlag, Record recDetail)
{
m_fldDeleteFlag = fldDeleteFlag;
m_recDetail = recDetail;
super.init(record);
} | [
"public",
"void",
"init",
"(",
"Record",
"record",
",",
"BaseField",
"fldDeleteFlag",
",",
"Record",
"recDetail",
")",
"{",
"m_fldDeleteFlag",
"=",
"fldDeleteFlag",
";",
"m_recDetail",
"=",
"recDetail",
";",
"super",
".",
"init",
"(",
"record",
")",
";",
"}"... | Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()). | [
"Constructor",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/SoftDeleteDetailHandler.java#L57-L62 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/math/SparseSquareMatrix.java | SparseSquareMatrix.get | public double get(int i, int j) {
"""
access a value at i,j
@param i
@param j
@return return A[i][j]
"""
if (i < 0 || i >= N) throw new IllegalArgumentException("Illegal index " + i + " should be > 0 and < " + N);
if (j < 0 || j >= N) throw new IllegalArgumentException("Illegal index " + j + " should... | java | public double get(int i, int j) {
if (i < 0 || i >= N) throw new IllegalArgumentException("Illegal index " + i + " should be > 0 and < " + N);
if (j < 0 || j >= N) throw new IllegalArgumentException("Illegal index " + j + " should be > 0 and < " + N);
return rows[i].get(j);
} | [
"public",
"double",
"get",
"(",
"int",
"i",
",",
"int",
"j",
")",
"{",
"if",
"(",
"i",
"<",
"0",
"||",
"i",
">=",
"N",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Illegal index \"",
"+",
"i",
"+",
"\" should be > 0 and < \"",
"+",
"N",
")"... | access a value at i,j
@param i
@param j
@return return A[i][j] | [
"access",
"a",
"value",
"at",
"i",
"j"
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/math/SparseSquareMatrix.java#L87-L93 |
BlueBrain/bluima | modules/bluima_typesystem/src/main/java/de/julielab/jules/types/List.java | List.setItemList | public void setItemList(int i, ListItem v) {
"""
indexed setter for itemList - sets an indexed value - contains items of the level 1. The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items.
@generated
@param i index in the array to ... | java | public void setItemList(int i, ListItem v) {
if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null)
jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((List_Type)jcasType).casFeatCode_itemLis... | [
"public",
"void",
"setItemList",
"(",
"int",
"i",
",",
"ListItem",
"v",
")",
"{",
"if",
"(",
"List_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"List_Type",
")",
"jcasType",
")",
".",
"casFeat_itemList",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"th... | indexed setter for itemList - sets an indexed value - contains items of the level 1. The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items.
@generated
@param i index in the array to set
@param v value to set into the array | [
"indexed",
"setter",
"for",
"itemList",
"-",
"sets",
"an",
"indexed",
"value",
"-",
"contains",
"items",
"of",
"the",
"level",
"1",
".",
"The",
"items",
"of",
"the",
"level",
"1",
"could",
"contain",
"further",
"items",
"of",
"next",
"level",
"and",
"so"... | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/List.java#L116-L120 |
cycorp/api-suite | core-api/src/main/java/com/cyc/session/exception/SessionManagerException.java | SessionManagerException.fromThrowable | public static SessionManagerException fromThrowable(String message, Throwable cause) {
"""
Converts a Throwable to a SessionManagerException with the specified detail message. If the
Throwable is a SessionManagerException and if the Throwable's message is identical to the
one supplied, the Throwable will be pass... | java | public static SessionManagerException fromThrowable(String message, Throwable cause) {
return (cause instanceof SessionManagerException && Objects.equals(message, cause.getMessage()))
? (SessionManagerException) cause
: new SessionManagerException(message, cause);
} | [
"public",
"static",
"SessionManagerException",
"fromThrowable",
"(",
"String",
"message",
",",
"Throwable",
"cause",
")",
"{",
"return",
"(",
"cause",
"instanceof",
"SessionManagerException",
"&&",
"Objects",
".",
"equals",
"(",
"message",
",",
"cause",
".",
"getM... | Converts a Throwable to a SessionManagerException with the specified detail message. If the
Throwable is a SessionManagerException and if the Throwable's message is identical to the
one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in
a new SessionManagerException with the det... | [
"Converts",
"a",
"Throwable",
"to",
"a",
"SessionManagerException",
"with",
"the",
"specified",
"detail",
"message",
".",
"If",
"the",
"Throwable",
"is",
"a",
"SessionManagerException",
"and",
"if",
"the",
"Throwable",
"s",
"message",
"is",
"identical",
"to",
"t... | train | https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/session/exception/SessionManagerException.java#L62-L66 |
orbisgis/h2gis | h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/Voronoi.java | Voronoi.generateTriangleNeighbors | public Triple[] generateTriangleNeighbors(Geometry geometry) throws TopologyException {
"""
Given the input TIN, construct a graph of triangle.
@param geometry Collection of Polygon with 3 vertex.
@return Array of triangle neighbors. Order and count is the same of the input array.
@throws TopologyException If i... | java | public Triple[] generateTriangleNeighbors(Geometry geometry) throws TopologyException {
inputTriangles = geometry;
CoordinateSequenceDimensionFilter sequenceDimensionFilter = new CoordinateSequenceDimensionFilter();
geometry.apply(sequenceDimensionFilter);
hasZ = sequenceDimensionFilter.... | [
"public",
"Triple",
"[",
"]",
"generateTriangleNeighbors",
"(",
"Geometry",
"geometry",
")",
"throws",
"TopologyException",
"{",
"inputTriangles",
"=",
"geometry",
";",
"CoordinateSequenceDimensionFilter",
"sequenceDimensionFilter",
"=",
"new",
"CoordinateSequenceDimensionFil... | Given the input TIN, construct a graph of triangle.
@param geometry Collection of Polygon with 3 vertex.
@return Array of triangle neighbors. Order and count is the same of the input array.
@throws TopologyException If incompatible type geometry is given | [
"Given",
"the",
"input",
"TIN",
"construct",
"a",
"graph",
"of",
"triangle",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/Voronoi.java#L115-L153 |
DDTH/ddth-queue | ddth-queue-core/src/main/java/com/github/ddth/queue/impl/DisruptorQueue.java | DisruptorQueue.requeue | @Override
public boolean requeue(IQueueMessage<ID, DATA> _msg) throws QueueException.QueueIsFull {
"""
{@inheritDoc}
@throws QueueException.QueueIsFull
if the ring buffer is full
"""
IQueueMessage<ID, DATA> msg = _msg.clone();
Date now = new Date();
msg.incNumRequeues().setQueue... | java | @Override
public boolean requeue(IQueueMessage<ID, DATA> _msg) throws QueueException.QueueIsFull {
IQueueMessage<ID, DATA> msg = _msg.clone();
Date now = new Date();
msg.incNumRequeues().setQueueTimestamp(now);
putToRingBuffer(msg);
if (!isEphemeralDisabled()) {
e... | [
"@",
"Override",
"public",
"boolean",
"requeue",
"(",
"IQueueMessage",
"<",
"ID",
",",
"DATA",
">",
"_msg",
")",
"throws",
"QueueException",
".",
"QueueIsFull",
"{",
"IQueueMessage",
"<",
"ID",
",",
"DATA",
">",
"msg",
"=",
"_msg",
".",
"clone",
"(",
")"... | {@inheritDoc}
@throws QueueException.QueueIsFull
if the ring buffer is full | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/queue/impl/DisruptorQueue.java#L176-L186 |
Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.getInetAddress | public InetAddress getInetAddress(String nameSpace, String cellName) {
"""
Returns the {@code InetAddress} 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 c... | java | public InetAddress getInetAddress(String nameSpace, String cellName) {
return getValue(nameSpace, cellName, InetAddress.class);
} | [
"public",
"InetAddress",
"getInetAddress",
"(",
"String",
"nameSpace",
",",
"String",
"cellName",
")",
"{",
"return",
"getValue",
"(",
"nameSpace",
",",
"cellName",
",",
"InetAddress",
".",
"class",
")",
";",
"}"
] | Returns the {@code InetAddress} 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 th... | [
"Returns",
"the",
"{",
"@code",
"InetAddress",
"}",
"value",
"of",
"the",
"{",
"@link",
"Cell",
"}",
"(",
"associated",
"to",
"{",
"@code",
"table",
"}",
")",
"whose",
"name",
"iscellName",
"or",
"null",
"if",
"this",
"Cells",
"object",
"contains",
"no",... | train | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L1411-L1413 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringParser.java | StringParser.parseByteObj | @Nullable
public static Byte parseByteObj (@Nullable final Object aObject) {
"""
Parse the given {@link Object} as {@link Byte} with radix
{@value #DEFAULT_RADIX}.
@param aObject
The object to parse. May be <code>null</code>.
@return <code>null</code> if the object does not represent a valid value.
"""... | java | @Nullable
public static Byte parseByteObj (@Nullable final Object aObject)
{
return parseByteObj (aObject, DEFAULT_RADIX, null);
} | [
"@",
"Nullable",
"public",
"static",
"Byte",
"parseByteObj",
"(",
"@",
"Nullable",
"final",
"Object",
"aObject",
")",
"{",
"return",
"parseByteObj",
"(",
"aObject",
",",
"DEFAULT_RADIX",
",",
"null",
")",
";",
"}"
] | Parse the given {@link Object} as {@link Byte} with radix
{@value #DEFAULT_RADIX}.
@param aObject
The object to parse. May be <code>null</code>.
@return <code>null</code> if the object does not represent a valid value. | [
"Parse",
"the",
"given",
"{",
"@link",
"Object",
"}",
"as",
"{",
"@link",
"Byte",
"}",
"with",
"radix",
"{",
"@value",
"#DEFAULT_RADIX",
"}",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L338-L342 |
lucasr/probe | library/src/main/java/org/lucasr/probe/Interceptor.java | Interceptor.setMeasuredDimension | protected final void setMeasuredDimension(View view, int width, int height) {
"""
Calls {@link View#setMeasuredDimension(int, int)} on the given {@link View}.
This can be used to override {@link View#onMeasure(int, int)} calls on-the-fly
in interceptors.
"""
final ViewProxy proxy = (ViewProxy) view;
... | java | protected final void setMeasuredDimension(View view, int width, int height) {
final ViewProxy proxy = (ViewProxy) view;
proxy.invokeSetMeasuredDimension(width, height);
} | [
"protected",
"final",
"void",
"setMeasuredDimension",
"(",
"View",
"view",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"final",
"ViewProxy",
"proxy",
"=",
"(",
"ViewProxy",
")",
"view",
";",
"proxy",
".",
"invokeSetMeasuredDimension",
"(",
"width",
... | Calls {@link View#setMeasuredDimension(int, int)} on the given {@link View}.
This can be used to override {@link View#onMeasure(int, int)} calls on-the-fly
in interceptors. | [
"Calls",
"{"
] | train | https://github.com/lucasr/probe/blob/cd15cc04383a1bf85de2f4c345d2018415b9ddc9/library/src/main/java/org/lucasr/probe/Interceptor.java#L149-L152 |
joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP9CalendarFactory.java | MPP9CalendarFactory.processCalendarExceptions | @Override protected void processCalendarExceptions(byte[] data, ProjectCalendar cal) {
"""
This method extracts any exceptions associated with a calendar.
@param data calendar data block
@param cal calendar instance
"""
//
// Handle any exceptions
//
int exceptionCount = MPPUtility.... | java | @Override protected void processCalendarExceptions(byte[] data, ProjectCalendar cal)
{
//
// Handle any exceptions
//
int exceptionCount = MPPUtility.getShort(data, 0);
if (exceptionCount != 0)
{
int index;
int offset;
ProjectCalendarException exception... | [
"@",
"Override",
"protected",
"void",
"processCalendarExceptions",
"(",
"byte",
"[",
"]",
"data",
",",
"ProjectCalendar",
"cal",
")",
"{",
"//",
"// Handle any exceptions",
"//",
"int",
"exceptionCount",
"=",
"MPPUtility",
".",
"getShort",
"(",
"data",
",",
"0",... | This method extracts any exceptions associated with a calendar.
@param data calendar data block
@param cal calendar instance | [
"This",
"method",
"extracts",
"any",
"exceptions",
"associated",
"with",
"a",
"calendar",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP9CalendarFactory.java#L115-L151 |
matthewhorridge/mdock | src/main/java/org/coode/mdock/SplitterNode.java | SplitterNode.insertNodeAt | public void insertNodeAt(Node insert, int index, double split) {
"""
Inserts a node after (right of or bottom of) a given node by splitting the inserted
node with the given node.
@param insert The node to be inserted.
@param index The index
@param split The split
"""
addChild(insert, index, spli... | java | public void insertNodeAt(Node insert, int index, double split) {
addChild(insert, index, split);
notifyStateChange();
} | [
"public",
"void",
"insertNodeAt",
"(",
"Node",
"insert",
",",
"int",
"index",
",",
"double",
"split",
")",
"{",
"addChild",
"(",
"insert",
",",
"index",
",",
"split",
")",
";",
"notifyStateChange",
"(",
")",
";",
"}"
] | Inserts a node after (right of or bottom of) a given node by splitting the inserted
node with the given node.
@param insert The node to be inserted.
@param index The index
@param split The split | [
"Inserts",
"a",
"node",
"after",
"(",
"right",
"of",
"or",
"bottom",
"of",
")",
"a",
"given",
"node",
"by",
"splitting",
"the",
"inserted",
"node",
"with",
"the",
"given",
"node",
"."
] | train | https://github.com/matthewhorridge/mdock/blob/37839a56f30bdb73d56d82c4d1afe548d66b404b/src/main/java/org/coode/mdock/SplitterNode.java#L303-L306 |
rubenlagus/TelegramBots | telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAudio.java | SendAudio.setAudio | public SendAudio setAudio(File file) {
"""
Use this method to set the audio to a new file
@param file New audio file
"""
Objects.requireNonNull(file, "file cannot be null!");
this.audio = new InputFile(file, file.getName());
return this;
} | java | public SendAudio setAudio(File file) {
Objects.requireNonNull(file, "file cannot be null!");
this.audio = new InputFile(file, file.getName());
return this;
} | [
"public",
"SendAudio",
"setAudio",
"(",
"File",
"file",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"file",
",",
"\"file cannot be null!\"",
")",
";",
"this",
".",
"audio",
"=",
"new",
"InputFile",
"(",
"file",
",",
"file",
".",
"getName",
"(",
")",
... | Use this method to set the audio to a new file
@param file New audio file | [
"Use",
"this",
"method",
"to",
"set",
"the",
"audio",
"to",
"a",
"new",
"file"
] | train | https://github.com/rubenlagus/TelegramBots/blob/d62354915d7664597a40fd9858f16bce67ef1478/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAudio.java#L108-L112 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/endian/EndianNumbers.java | EndianNumbers.toLEInt | @Pure
public static int toLEInt(int b1, int b2, int b3, int b4) {
"""
Converting four bytes to a Little Endian integer.
@param b1 the first byte.
@param b2 the second byte.
@param b3 the third byte.
@param b4 the fourth byte.
@return the conversion result
"""
return ((b4 & 0xFF) << 24) + ((b3 &... | java | @Pure
public static int toLEInt(int b1, int b2, int b3, int b4) {
return ((b4 & 0xFF) << 24) + ((b3 & 0xFF) << 16) + ((b2 & 0xFF) << 8) + (b1 & 0xFF);
} | [
"@",
"Pure",
"public",
"static",
"int",
"toLEInt",
"(",
"int",
"b1",
",",
"int",
"b2",
",",
"int",
"b3",
",",
"int",
"b4",
")",
"{",
"return",
"(",
"(",
"b4",
"&",
"0xFF",
")",
"<<",
"24",
")",
"+",
"(",
"(",
"b3",
"&",
"0xFF",
")",
"<<",
"... | Converting four bytes to a Little Endian integer.
@param b1 the first byte.
@param b2 the second byte.
@param b3 the third byte.
@param b4 the fourth byte.
@return the conversion result | [
"Converting",
"four",
"bytes",
"to",
"a",
"Little",
"Endian",
"integer",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/endian/EndianNumbers.java#L75-L78 |
astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/factory/ComponentFactory.java | ComponentFactory.newImage | public static Image newImage(final String id, final IResource imageResource) {
"""
Factory method for create a new {@link Image}.
@param id
the id
@param imageResource
the IResource object
@return the new {@link Image}.
"""
final Image image = new Image(id, imageResource);
image.setOutputMarkupId(tr... | java | public static Image newImage(final String id, final IResource imageResource)
{
final Image image = new Image(id, imageResource);
image.setOutputMarkupId(true);
return image;
} | [
"public",
"static",
"Image",
"newImage",
"(",
"final",
"String",
"id",
",",
"final",
"IResource",
"imageResource",
")",
"{",
"final",
"Image",
"image",
"=",
"new",
"Image",
"(",
"id",
",",
"imageResource",
")",
";",
"image",
".",
"setOutputMarkupId",
"(",
... | Factory method for create a new {@link Image}.
@param id
the id
@param imageResource
the IResource object
@return the new {@link Image}. | [
"Factory",
"method",
"for",
"create",
"a",
"new",
"{",
"@link",
"Image",
"}",
"."
] | train | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/factory/ComponentFactory.java#L389-L394 |
google/error-prone | check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java | ASTHelpers.inSamePackage | public static boolean inSamePackage(Symbol targetSymbol, VisitorState state) {
"""
Return true if the given symbol is defined in the current package.
"""
JCCompilationUnit compilationUnit = (JCCompilationUnit) state.getPath().getCompilationUnit();
PackageSymbol usePackage = compilationUnit.packge;
... | java | public static boolean inSamePackage(Symbol targetSymbol, VisitorState state) {
JCCompilationUnit compilationUnit = (JCCompilationUnit) state.getPath().getCompilationUnit();
PackageSymbol usePackage = compilationUnit.packge;
PackageSymbol targetPackage = targetSymbol.packge();
return targetPackage != nu... | [
"public",
"static",
"boolean",
"inSamePackage",
"(",
"Symbol",
"targetSymbol",
",",
"VisitorState",
"state",
")",
"{",
"JCCompilationUnit",
"compilationUnit",
"=",
"(",
"JCCompilationUnit",
")",
"state",
".",
"getPath",
"(",
")",
".",
"getCompilationUnit",
"(",
")... | Return true if the given symbol is defined in the current package. | [
"Return",
"true",
"if",
"the",
"given",
"symbol",
"is",
"defined",
"in",
"the",
"current",
"package",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L889-L897 |
jingwei/krati | krati-main/src/main/java/krati/core/array/SimpleDataArray.java | SimpleDataArray.setAddress | protected void setAddress(int index, long value, long scn) throws Exception {
"""
Sets the address (long value) at the specified array index.
@param index - the array index.
@param value - the address value.
@param scn - the System Change Number (SCN) representing an ever-increasing update order.
@throws ... | java | protected void setAddress(int index, long value, long scn) throws Exception {
_addressArray.set(index, value, scn);
_hwmSet = Math.max(_hwmSet, scn);
} | [
"protected",
"void",
"setAddress",
"(",
"int",
"index",
",",
"long",
"value",
",",
"long",
"scn",
")",
"throws",
"Exception",
"{",
"_addressArray",
".",
"set",
"(",
"index",
",",
"value",
",",
"scn",
")",
";",
"_hwmSet",
"=",
"Math",
".",
"max",
"(",
... | Sets the address (long value) at the specified array index.
@param index - the array index.
@param value - the address value.
@param scn - the System Change Number (SCN) representing an ever-increasing update order.
@throws Exception if the address cannot be updated at the specified array index. | [
"Sets",
"the",
"address",
"(",
"long",
"value",
")",
"at",
"the",
"specified",
"array",
"index",
"."
] | train | https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L348-L351 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.ensureJdbcType | private void ensureJdbcType(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException {
"""
Constraint that ensures that the field has a jdbc type. If none is specified, then
the default type is used (which has been determined when the field descriptor was added)
and - if necessary - the default... | java | private void ensureJdbcType(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE))
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_JDBC_TYPE))
{
throw... | [
"private",
"void",
"ensureJdbcType",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"!",
"fieldDef",
".",
"hasProperty",
"(",
"PropertyHelper",
".",
"OJB_PROPERTY_JDBC_TYPE",
")",
")",
"{",
... | Constraint that ensures that the field has a jdbc type. If none is specified, then
the default type is used (which has been determined when the field descriptor was added)
and - if necessary - the default conversion is set.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constrai... | [
"Constraint",
"that",
"ensures",
"that",
"the",
"field",
"has",
"a",
"jdbc",
"type",
".",
"If",
"none",
"is",
"specified",
"then",
"the",
"default",
"type",
"is",
"used",
"(",
"which",
"has",
"been",
"determined",
"when",
"the",
"field",
"descriptor",
"was... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L150-L176 |
xcesco/kripton | kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java | SQLiteEvent.createInsertWithId | public static SQLiteEvent createInsertWithId(Long result) {
"""
Creates the insert.
@param result
the result
@return the SQ lite event
"""
return new SQLiteEvent(SqlModificationType.INSERT, null, result, null);
} | java | public static SQLiteEvent createInsertWithId(Long result) {
return new SQLiteEvent(SqlModificationType.INSERT, null, result, null);
} | [
"public",
"static",
"SQLiteEvent",
"createInsertWithId",
"(",
"Long",
"result",
")",
"{",
"return",
"new",
"SQLiteEvent",
"(",
"SqlModificationType",
".",
"INSERT",
",",
"null",
",",
"result",
",",
"null",
")",
";",
"}"
] | Creates the insert.
@param result
the result
@return the SQ lite event | [
"Creates",
"the",
"insert",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java#L57-L59 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java | SessionDataManager.getItemByIdentifier | public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException {
"""
For internal use, required privileges. Return item by identifier in this transient storage then in workspace container.
@param identifier
- identifier of searched item
@param pool
- indicate... | java | public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException
{
long start = 0;
if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
LOG.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
}
ItemImpl i... | [
"public",
"ItemImpl",
"getItemByIdentifier",
"(",
"String",
"identifier",
",",
"boolean",
"pool",
",",
"boolean",
"apiRead",
")",
"throws",
"RepositoryException",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{... | For internal use, required privileges. Return item by identifier in this transient storage then in workspace container.
@param identifier
- identifier of searched item
@param pool
- indicates does the item fall in pool
@param apiRead
- if true will call postRead Action and check permissions
@return existed item data o... | [
"For",
"internal",
"use",
"required",
"privileges",
".",
"Return",
"item",
"by",
"identifier",
"in",
"this",
"transient",
"storage",
"then",
"in",
"workspace",
"container",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L667-L689 |
pwall567/jsonutil | src/main/java/net/pwall/json/JSON.java | JSON.appendJSON | public static void appendJSON(Appendable a, JSONValue value) throws IOException {
"""
Convenience method to append the JSON string for a value to an {@link Appendable}, for
cases where the value may be {@code null}.
@param a the {@link Appendable}
@param value the {@link JSONValue}
@throws IOExc... | java | public static void appendJSON(Appendable a, JSONValue value) throws IOException {
if (value == null)
a.append("null");
else
value.appendJSON(a);
} | [
"public",
"static",
"void",
"appendJSON",
"(",
"Appendable",
"a",
",",
"JSONValue",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"a",
".",
"append",
"(",
"\"null\"",
")",
";",
"else",
"value",
".",
"appendJSON",
"(",... | Convenience method to append the JSON string for a value to an {@link Appendable}, for
cases where the value may be {@code null}.
@param a the {@link Appendable}
@param value the {@link JSONValue}
@throws IOException if thrown by the {@link Appendable} | [
"Convenience",
"method",
"to",
"append",
"the",
"JSON",
"string",
"for",
"a",
"value",
"to",
"an",
"{",
"@link",
"Appendable",
"}",
"for",
"cases",
"where",
"the",
"value",
"may",
"be",
"{",
"@code",
"null",
"}",
"."
] | train | https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSON.java#L738-L743 |
facebookarchive/hadoop-20 | src/contrib/corona/src/java/org/apache/hadoop/mapred/ResourceTracker.java | ResourceTracker.updateTrackerAddr | public void updateTrackerAddr(String trackerName, InetAddress addr) {
"""
Updates mapping between tracker names and adresses
@param trackerName name of tracker
@param addr address of the tracker
"""
synchronized (lockObject) {
trackerAddress.put(trackerName, addr);
}
} | java | public void updateTrackerAddr(String trackerName, InetAddress addr) {
synchronized (lockObject) {
trackerAddress.put(trackerName, addr);
}
} | [
"public",
"void",
"updateTrackerAddr",
"(",
"String",
"trackerName",
",",
"InetAddress",
"addr",
")",
"{",
"synchronized",
"(",
"lockObject",
")",
"{",
"trackerAddress",
".",
"put",
"(",
"trackerName",
",",
"addr",
")",
";",
"}",
"}"
] | Updates mapping between tracker names and adresses
@param trackerName name of tracker
@param addr address of the tracker | [
"Updates",
"mapping",
"between",
"tracker",
"names",
"and",
"adresses"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/mapred/ResourceTracker.java#L347-L351 |
jhipster/jhipster | jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java | QueryService.buildSpecification | protected Specification<ENTITY> buildSpecification(StringFilter filter, Function<Root<ENTITY>, Expression<String>> metaclassFunction) {
"""
Helper function to return a specification for filtering on a {@link String} field, where equality, containment,
and null/non-null conditions are supported.
@param filter ... | java | protected Specification<ENTITY> buildSpecification(StringFilter filter, Function<Root<ENTITY>, Expression<String>> metaclassFunction) {
if (filter.getEquals() != null) {
return equalsSpecification(metaclassFunction, filter.getEquals());
} else if (filter.getIn() != null) {
return... | [
"protected",
"Specification",
"<",
"ENTITY",
">",
"buildSpecification",
"(",
"StringFilter",
"filter",
",",
"Function",
"<",
"Root",
"<",
"ENTITY",
">",
",",
"Expression",
"<",
"String",
">",
">",
"metaclassFunction",
")",
"{",
"if",
"(",
"filter",
".",
"get... | Helper function to return a specification for filtering on a {@link String} field, where equality, containment,
and null/non-null conditions are supported.
@param filter the individual attribute filter coming from the frontend.
@param metaclassFunction lambda, which based on a Root<ENTITY> returns Exp... | [
"Helper",
"function",
"to",
"return",
"a",
"specification",
"for",
"filtering",
"on",
"a",
"{",
"@link",
"String",
"}",
"field",
"where",
"equality",
"containment",
"and",
"null",
"/",
"non",
"-",
"null",
"conditions",
"are",
"supported",
"."
] | train | https://github.com/jhipster/jhipster/blob/5dcf4239c7cc035e188ef02447d3c628fac5c5d9/jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java#L101-L112 |
feedzai/pdb | src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java | AbstractDatabaseEngine.beginTransaction | @Override
public synchronized void beginTransaction() throws DatabaseEngineRuntimeException {
"""
Starts a transaction. Doing this will set auto commit to false ({@link Connection#getAutoCommit()}).
@throws DatabaseEngineRuntimeException If something goes wrong while beginning transaction.
"""
/... | java | @Override
public synchronized void beginTransaction() throws DatabaseEngineRuntimeException {
/*
* It makes sense trying to reconnect since it's the beginning of a transaction.
*/
try {
getConnection();
if (!conn.getAutoCommit()) { //I.E. Manual control
... | [
"@",
"Override",
"public",
"synchronized",
"void",
"beginTransaction",
"(",
")",
"throws",
"DatabaseEngineRuntimeException",
"{",
"/*\n * It makes sense trying to reconnect since it's the beginning of a transaction.\n */",
"try",
"{",
"getConnection",
"(",
")",
";",... | Starts a transaction. Doing this will set auto commit to false ({@link Connection#getAutoCommit()}).
@throws DatabaseEngineRuntimeException If something goes wrong while beginning transaction. | [
"Starts",
"a",
"transaction",
".",
"Doing",
"this",
"will",
"set",
"auto",
"commit",
"to",
"false",
"(",
"{",
"@link",
"Connection#getAutoCommit",
"()",
"}",
")",
"."
] | train | https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L474-L490 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java | CommonOps_DDRM.identity | public static DMatrixRMaj identity(int numRows , int numCols ) {
"""
Creates a rectangular matrix which is zero except along the diagonals.
@param numRows Number of rows in the matrix.
@param numCols NUmber of columns in the matrix.
@return A matrix with diagonal elements equal to one.
"""
DMatrix... | java | public static DMatrixRMaj identity(int numRows , int numCols )
{
DMatrixRMaj ret = new DMatrixRMaj(numRows,numCols);
int small = numRows < numCols ? numRows : numCols;
for( int i = 0; i < small; i++ ) {
ret.set(i,i,1.0);
}
return ret;
} | [
"public",
"static",
"DMatrixRMaj",
"identity",
"(",
"int",
"numRows",
",",
"int",
"numCols",
")",
"{",
"DMatrixRMaj",
"ret",
"=",
"new",
"DMatrixRMaj",
"(",
"numRows",
",",
"numCols",
")",
";",
"int",
"small",
"=",
"numRows",
"<",
"numCols",
"?",
"numRows"... | Creates a rectangular matrix which is zero except along the diagonals.
@param numRows Number of rows in the matrix.
@param numCols NUmber of columns in the matrix.
@return A matrix with diagonal elements equal to one. | [
"Creates",
"a",
"rectangular",
"matrix",
"which",
"is",
"zero",
"except",
"along",
"the",
"diagonals",
"."
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L987-L998 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationMain.java | DatabaseInformationMain.SYSTEM_SCHEMAS | final Table SYSTEM_SCHEMAS() {
"""
Retrieves a <code>Table</code> object describing the accessible schemas
defined within this database. <p>
Each row is a schema description with the following
columns: <p>
<pre class="SqlCodeExample">
TABLE_SCHEM VARCHAR simple schema name
TABLE_CATALOG VARCHAR... | java | final Table SYSTEM_SCHEMAS() {
Table t = sysTables[SYSTEM_SCHEMAS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SYSTEM_SCHEMAS]);
addColumn(t, "TABLE_SCHEM", SQL_IDENTIFIER); // not null
addColumn(t, "TABLE_CATALOG", SQL_IDENTIFIER);
addC... | [
"final",
"Table",
"SYSTEM_SCHEMAS",
"(",
")",
"{",
"Table",
"t",
"=",
"sysTables",
"[",
"SYSTEM_SCHEMAS",
"]",
";",
"if",
"(",
"t",
"==",
"null",
")",
"{",
"t",
"=",
"createBlankTable",
"(",
"sysTableHsqlNames",
"[",
"SYSTEM_SCHEMAS",
"]",
")",
";",
"add... | Retrieves a <code>Table</code> object describing the accessible schemas
defined within this database. <p>
Each row is a schema description with the following
columns: <p>
<pre class="SqlCodeExample">
TABLE_SCHEM VARCHAR simple schema name
TABLE_CATALOG VARCHAR catalog in which schema is defined
IS_DEFAULT... | [
"Retrieves",
"a",
"<code",
">",
"Table<",
"/",
"code",
">",
"object",
"describing",
"the",
"accessible",
"schemas",
"defined",
"within",
"this",
"database",
".",
"<p",
">"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationMain.java#L2137-L2184 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java | ChannelFrameworkImpl.createChannelData | protected ChannelData createChannelData(String name, Class<?> factoryClass, Map<Object, Object> properties, int weight) {
"""
Create a new ChannelData Object.
@param name
@param factoryClass
@param properties
@param weight
@return ChannelData
"""
return new ChannelDataImpl(name, factoryClass, p... | java | protected ChannelData createChannelData(String name, Class<?> factoryClass, Map<Object, Object> properties, int weight) {
return new ChannelDataImpl(name, factoryClass, properties, weight, this);
} | [
"protected",
"ChannelData",
"createChannelData",
"(",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"factoryClass",
",",
"Map",
"<",
"Object",
",",
"Object",
">",
"properties",
",",
"int",
"weight",
")",
"{",
"return",
"new",
"ChannelDataImpl",
"(",
"name",... | Create a new ChannelData Object.
@param name
@param factoryClass
@param properties
@param weight
@return ChannelData | [
"Create",
"a",
"new",
"ChannelData",
"Object",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L4275-L4278 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/query/Criteria.java | Criteria.addColumnEqualToField | public void addColumnEqualToField(String column, Object fieldName) {
"""
Adds and equals (=) criteria for field comparison.
The field name will be translated into the appropriate columnName by SqlStatement.
The attribute will NOT be translated into column name
@param column The column name to be used w... | java | public void addColumnEqualToField(String column, Object fieldName)
{
// PAW
//SelectionCriteria c = FieldCriteria.buildEqualToCriteria(column, fieldName, getAlias());
SelectionCriteria c = FieldCriteria.buildEqualToCriteria(column, fieldName, getUserAlias(column));
c.setTranslateAttribute(fals... | [
"public",
"void",
"addColumnEqualToField",
"(",
"String",
"column",
",",
"Object",
"fieldName",
")",
"{",
"// PAW\r",
"//SelectionCriteria c = FieldCriteria.buildEqualToCriteria(column, fieldName, getAlias());\r",
"SelectionCriteria",
"c",
"=",
"FieldCriteria",
".",
"buildEqualTo... | Adds and equals (=) criteria for field comparison.
The field name will be translated into the appropriate columnName by SqlStatement.
The attribute will NOT be translated into column name
@param column The column name to be used without translation
@param fieldName An object representing the value of the fi... | [
"Adds",
"and",
"equals",
"(",
"=",
")",
"criteria",
"for",
"field",
"comparison",
".",
"The",
"field",
"name",
"will",
"be",
"translated",
"into",
"the",
"appropriate",
"columnName",
"by",
"SqlStatement",
".",
"The",
"attribute",
"will",
"NOT",
"be",
"transl... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L322-L329 |
SonarSource/sonarqube | server/sonar-server/src/main/java/org/sonar/server/util/ClassLoaderUtils.java | ClassLoaderUtils.listFiles | public static Collection<String> listFiles(ClassLoader classLoader, String rootPath) {
"""
Finds files within a given directory and its subdirectories
@param classLoader
@param rootPath the root directory, for example org/sonar/sqale
@return a list of relative paths, for example {"org/sonar/sqale/foo/bar.t... | java | public static Collection<String> listFiles(ClassLoader classLoader, String rootPath) {
return listResources(classLoader, rootPath, path -> !StringUtils.endsWith(path, "/"));
} | [
"public",
"static",
"Collection",
"<",
"String",
">",
"listFiles",
"(",
"ClassLoader",
"classLoader",
",",
"String",
"rootPath",
")",
"{",
"return",
"listResources",
"(",
"classLoader",
",",
"rootPath",
",",
"path",
"->",
"!",
"StringUtils",
".",
"endsWith",
"... | Finds files within a given directory and its subdirectories
@param classLoader
@param rootPath the root directory, for example org/sonar/sqale
@return a list of relative paths, for example {"org/sonar/sqale/foo/bar.txt}. Never null. | [
"Finds",
"files",
"within",
"a",
"given",
"directory",
"and",
"its",
"subdirectories"
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/util/ClassLoaderUtils.java#L50-L52 |
lucee/Lucee | core/src/main/java/lucee/transformer/library/tag/TagLibTag.java | TagLibTag.setTTEClassDefinition | protected void setTTEClassDefinition(String tteClass, Identification id, Attributes attr) {
"""
Setzt die implementierende Klassendefinition des Evaluator. Diese Methode wird durch die Klasse
TagLibFactory verwendet.
@param tteClass Klassendefinition der Evaluator-Implementation.
"""
this.tteCD = ClassDef... | java | protected void setTTEClassDefinition(String tteClass, Identification id, Attributes attr) {
this.tteCD = ClassDefinitionImpl.toClassDefinition(tteClass, id, attr);
} | [
"protected",
"void",
"setTTEClassDefinition",
"(",
"String",
"tteClass",
",",
"Identification",
"id",
",",
"Attributes",
"attr",
")",
"{",
"this",
".",
"tteCD",
"=",
"ClassDefinitionImpl",
".",
"toClassDefinition",
"(",
"tteClass",
",",
"id",
",",
"attr",
")",
... | Setzt die implementierende Klassendefinition des Evaluator. Diese Methode wird durch die Klasse
TagLibFactory verwendet.
@param tteClass Klassendefinition der Evaluator-Implementation. | [
"Setzt",
"die",
"implementierende",
"Klassendefinition",
"des",
"Evaluator",
".",
"Diese",
"Methode",
"wird",
"durch",
"die",
"Klasse",
"TagLibFactory",
"verwendet",
"."
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibTag.java#L584-L586 |
box/box-android-sdk | box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java | BoxApiFile.getDeleteVersionRequest | public BoxRequestsFile.DeleteFileVersion getDeleteVersionRequest(String id, String versionId) {
"""
Gets a request that deletes a version of a file
@param id id of the file to delete a version of
@param versionId id of the file version to delete
@return request to delete a file version
"""
Box... | java | public BoxRequestsFile.DeleteFileVersion getDeleteVersionRequest(String id, String versionId) {
BoxRequestsFile.DeleteFileVersion request = new BoxRequestsFile.DeleteFileVersion(versionId, getDeleteFileVersionUrl(id, versionId), mSession);
return request;
} | [
"public",
"BoxRequestsFile",
".",
"DeleteFileVersion",
"getDeleteVersionRequest",
"(",
"String",
"id",
",",
"String",
"versionId",
")",
"{",
"BoxRequestsFile",
".",
"DeleteFileVersion",
"request",
"=",
"new",
"BoxRequestsFile",
".",
"DeleteFileVersion",
"(",
"versionId"... | Gets a request that deletes a version of a file
@param id id of the file to delete a version of
@param versionId id of the file version to delete
@return request to delete a file version | [
"Gets",
"a",
"request",
"that",
"deletes",
"a",
"version",
"of",
"a",
"file"
] | train | https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java#L533-L536 |
Deep-Symmetry/beat-link | src/main/java/org/deepsymmetry/beatlink/data/ArtFinder.java | ArtFinder.updateArt | private void updateArt(TrackMetadataUpdate update, AlbumArt art) {
"""
We have obtained album art for a device, so store it and alert any listeners.
@param update the update which caused us to retrieve this art
@param art the album art which we retrieved
"""
hotCache.put(DeckReference.getDeckRefere... | java | private void updateArt(TrackMetadataUpdate update, AlbumArt art) {
hotCache.put(DeckReference.getDeckReference(update.player, 0), art); // Main deck
if (update.metadata.getCueList() != null) { // Update the cache with any hot cues in this track as well
for (CueList.Entry entry : update.met... | [
"private",
"void",
"updateArt",
"(",
"TrackMetadataUpdate",
"update",
",",
"AlbumArt",
"art",
")",
"{",
"hotCache",
".",
"put",
"(",
"DeckReference",
".",
"getDeckReference",
"(",
"update",
".",
"player",
",",
"0",
")",
",",
"art",
")",
";",
"// Main deck",
... | We have obtained album art for a device, so store it and alert any listeners.
@param update the update which caused us to retrieve this art
@param art the album art which we retrieved | [
"We",
"have",
"obtained",
"album",
"art",
"for",
"a",
"device",
"so",
"store",
"it",
"and",
"alert",
"any",
"listeners",
"."
] | train | https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/ArtFinder.java#L177-L187 |
xmlet/XsdAsmFaster | src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmAttributes.java | XsdAsmAttributes.numericAdjustment | private static void numericAdjustment(MethodVisitor mVisitor, String javaType) {
"""
Applies a cast to numeric types, i.e. int, short, long, to double.
@param mVisitor The visitor of the attribute constructor.
@param javaType The type of the argument received in the constructor.
"""
adjustmentsMapper... | java | private static void numericAdjustment(MethodVisitor mVisitor, String javaType) {
adjustmentsMapper.getOrDefault(javaType, XsdAsmAttributes::doubleAdjustment).accept(mVisitor);
} | [
"private",
"static",
"void",
"numericAdjustment",
"(",
"MethodVisitor",
"mVisitor",
",",
"String",
"javaType",
")",
"{",
"adjustmentsMapper",
".",
"getOrDefault",
"(",
"javaType",
",",
"XsdAsmAttributes",
"::",
"doubleAdjustment",
")",
".",
"accept",
"(",
"mVisitor"... | Applies a cast to numeric types, i.e. int, short, long, to double.
@param mVisitor The visitor of the attribute constructor.
@param javaType The type of the argument received in the constructor. | [
"Applies",
"a",
"cast",
"to",
"numeric",
"types",
"i",
".",
"e",
".",
"int",
"short",
"long",
"to",
"double",
"."
] | train | https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmAttributes.java#L280-L282 |
katjahahn/PortEx | src/main/java/com/github/katjahahn/parser/PEData.java | PEData.readMSDOSLoadModule | @Beta
// TODO maybe load with PELoader
public MSDOSLoadModule readMSDOSLoadModule() throws IOException {
"""
Reads and returns the {@link MSDOSLoadModule}.
@return msdos load module
@throws IOException if load module can not be read.
"""
MSDOSLoadModule module = new MSDOSLoadModule(msdos, f... | java | @Beta
// TODO maybe load with PELoader
public MSDOSLoadModule readMSDOSLoadModule() throws IOException {
MSDOSLoadModule module = new MSDOSLoadModule(msdos, file);
module.read();
return module;
} | [
"@",
"Beta",
"// TODO maybe load with PELoader",
"public",
"MSDOSLoadModule",
"readMSDOSLoadModule",
"(",
")",
"throws",
"IOException",
"{",
"MSDOSLoadModule",
"module",
"=",
"new",
"MSDOSLoadModule",
"(",
"msdos",
",",
"file",
")",
";",
"module",
".",
"read",
"(",
... | Reads and returns the {@link MSDOSLoadModule}.
@return msdos load module
@throws IOException if load module can not be read. | [
"Reads",
"and",
"returns",
"the",
"{",
"@link",
"MSDOSLoadModule",
"}",
"."
] | train | https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/PEData.java#L124-L130 |
MKLab-ITI/multimedia-indexing | src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java | ImageIOGreyScale.createImageOutputStream | public static ImageOutputStream createImageOutputStream(Object output) throws IOException {
"""
Returns an <code>ImageOutputStream</code> that will send its output to the given <code>Object</code>.
The set of <code>ImageOutputStreamSpi</code>s registered with the <code>IIORegistry</code> class is
queried and the... | java | public static ImageOutputStream createImageOutputStream(Object output) throws IOException {
if (output == null) {
throw new IllegalArgumentException("output == null!");
}
Iterator iter;
// Ensure category is present
try {
iter = theRegistry.getServiceProviders(ImageOutputStreamSpi.class, true);... | [
"public",
"static",
"ImageOutputStream",
"createImageOutputStream",
"(",
"Object",
"output",
")",
"throws",
"IOException",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"output == null!\"",
")",
";",
"}",
"Ite... | Returns an <code>ImageOutputStream</code> that will send its output to the given <code>Object</code>.
The set of <code>ImageOutputStreamSpi</code>s registered with the <code>IIORegistry</code> class is
queried and the first one that is able to send output from the supplied object is used to create the
returned <code>Im... | [
"Returns",
"an",
"<code",
">",
"ImageOutputStream<",
"/",
"code",
">",
"that",
"will",
"send",
"its",
"output",
"to",
"the",
"given",
"<code",
">",
"Object<",
"/",
"code",
">",
".",
"The",
"set",
"of",
"<code",
">",
"ImageOutputStreamSpi<",
"/",
"code",
... | train | https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java#L351-L378 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/org/semanticweb/owlapi/model/EntityType_CustomFieldSerializer.java | EntityType_CustomFieldSerializer.deserializeInstance | @Override
public void deserializeInstance(SerializationStreamReader streamReader, EntityType instance) throws SerializationException {
"""
Deserializes the content of the object from the
{@link com.google.gwt.user.client.rpc.SerializationStreamReader}.
@param streamReader the {@link com.google.gwt.user.clien... | java | @Override
public void deserializeInstance(SerializationStreamReader streamReader, EntityType instance) throws SerializationException {
deserialize(streamReader, instance);
} | [
"@",
"Override",
"public",
"void",
"deserializeInstance",
"(",
"SerializationStreamReader",
"streamReader",
",",
"EntityType",
"instance",
")",
"throws",
"SerializationException",
"{",
"deserialize",
"(",
"streamReader",
",",
"instance",
")",
";",
"}"
] | Deserializes the content of the object from the
{@link com.google.gwt.user.client.rpc.SerializationStreamReader}.
@param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the
object's content from
@param instance the object instance to deserialize
@throws com.google.gwt.user.clie... | [
"Deserializes",
"the",
"content",
"of",
"the",
"object",
"from",
"the",
"{"
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/org/semanticweb/owlapi/model/EntityType_CustomFieldSerializer.java#L132-L135 |
eclipse/xtext-extras | org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java | OverrideHelper.getResolvedFeatures | public ResolvedFeatures getResolvedFeatures(LightweightTypeReference contextType, JavaVersion targetVersion) {
"""
Returns the resolved features targeting a specific Java version in order to support new language features.
"""
return new ResolvedFeatures(contextType, overrideTester, targetVersion);
} | java | public ResolvedFeatures getResolvedFeatures(LightweightTypeReference contextType, JavaVersion targetVersion) {
return new ResolvedFeatures(contextType, overrideTester, targetVersion);
} | [
"public",
"ResolvedFeatures",
"getResolvedFeatures",
"(",
"LightweightTypeReference",
"contextType",
",",
"JavaVersion",
"targetVersion",
")",
"{",
"return",
"new",
"ResolvedFeatures",
"(",
"contextType",
",",
"overrideTester",
",",
"targetVersion",
")",
";",
"}"
] | Returns the resolved features targeting a specific Java version in order to support new language features. | [
"Returns",
"the",
"resolved",
"features",
"targeting",
"a",
"specific",
"Java",
"version",
"in",
"order",
"to",
"support",
"new",
"language",
"features",
"."
] | train | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java#L236-L238 |
playn/playn | html/src/playn/html/HtmlInput.java | HtmlInput.capturePageEvent | static HandlerRegistration capturePageEvent (String name, EventHandler handler) {
"""
Capture events that occur anywhere on the page. Event values will be relative to the page
(not the rootElement) {@see #getRelativeX(NativeEvent, Element)} and
{@see #getRelativeY(NativeEvent, Element)}.
"""
return addEv... | java | static HandlerRegistration capturePageEvent (String name, EventHandler handler) {
return addEventListener(Document.get(), name, handler, true);
} | [
"static",
"HandlerRegistration",
"capturePageEvent",
"(",
"String",
"name",
",",
"EventHandler",
"handler",
")",
"{",
"return",
"addEventListener",
"(",
"Document",
".",
"get",
"(",
")",
",",
"name",
",",
"handler",
",",
"true",
")",
";",
"}"
] | Capture events that occur anywhere on the page. Event values will be relative to the page
(not the rootElement) {@see #getRelativeX(NativeEvent, Element)} and
{@see #getRelativeY(NativeEvent, Element)}. | [
"Capture",
"events",
"that",
"occur",
"anywhere",
"on",
"the",
"page",
".",
"Event",
"values",
"will",
"be",
"relative",
"to",
"the",
"page",
"(",
"not",
"the",
"rootElement",
")",
"{"
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/html/src/playn/html/HtmlInput.java#L296-L298 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.