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 |
|---|---|---|---|---|---|---|---|---|---|---|
Bandwidth/java-bandwidth | src/main/java/com/bandwidth/sdk/model/Domain.java | Domain.update | public static Domain update(final BandwidthClient client, final String id, final Map<String, Object>params) throws AppPlatformException, ParseException, IOException, Exception {
"""
Convenience method to return a Domain.
@param client the client.
@param id the domain id.
@param params the params
@return the do... | java | public static Domain update(final BandwidthClient client, final String id, final Map<String, Object>params) throws AppPlatformException, ParseException, IOException, Exception {
assert(client != null && id != null);
final String domainsUri = client.getUserResourceInstanceUri(BandwidthConstants.DOMAINS_... | [
"public",
"static",
"Domain",
"update",
"(",
"final",
"BandwidthClient",
"client",
",",
"final",
"String",
"id",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"AppPlatformException",
",",
"ParseException",
",",
"IOException",
... | Convenience method to return a Domain.
@param client the client.
@param id the domain id.
@param params the params
@return the domain object.
@throws AppPlatformException API Exception
@throws ParseException Error parsing data
@throws IOException unexpected error
@throws Exception error | [
"Convenience",
"method",
"to",
"return",
"a",
"Domain",
"."
] | train | https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Domain.java#L220-L226 |
code4everything/util | src/main/java/com/zhazhapan/util/dialog/Alerts.java | Alerts.getAlert | public static Alert getAlert(String title, String header, String content, AlertType alertType) {
"""
获取{@link Alert}对象,modality默认为{@link Modality#APPLICATION_MODAL},window默认为null,style默认为{@link
StageStyle#DECORATED}
@param title 标题
@param header 信息头
@param content 内容
@param alertType {@link AlertType}
@r... | java | public static Alert getAlert(String title, String header, String content, AlertType alertType) {
return getAlert(title, header, content, alertType, Modality.APPLICATION_MODAL, null, StageStyle.DECORATED);
} | [
"public",
"static",
"Alert",
"getAlert",
"(",
"String",
"title",
",",
"String",
"header",
",",
"String",
"content",
",",
"AlertType",
"alertType",
")",
"{",
"return",
"getAlert",
"(",
"title",
",",
"header",
",",
"content",
",",
"alertType",
",",
"Modality",... | 获取{@link Alert}对象,modality默认为{@link Modality#APPLICATION_MODAL},window默认为null,style默认为{@link
StageStyle#DECORATED}
@param title 标题
@param header 信息头
@param content 内容
@param alertType {@link AlertType}
@return {@link Alert} | [
"获取",
"{",
"@link",
"Alert",
"}",
"对象,modality默认为",
"{",
"@link",
"Modality#APPLICATION_MODAL",
"}",
",window默认为null,style默认为",
"{",
"@link",
"StageStyle#DECORATED",
"}"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/dialog/Alerts.java#L266-L268 |
kiswanij/jk-util | src/main/java/com/jk/util/JKObjectUtil.java | JKObjectUtil.newInstance | public static <T> T newInstance(final Class<T> clas, final Object... params) {
"""
New instance.
@param <T> the generic type
@param clas the clas
@param params the params
@return the t
"""
try {
final Class<?>[] paramClasses = JKObjectUtil.toClassesFromObjects(params);
if (paramClasse... | java | public static <T> T newInstance(final Class<T> clas, final Object... params) {
try {
final Class<?>[] paramClasses = JKObjectUtil.toClassesFromObjects(params);
if (paramClasses.length == 0) {
return clas.newInstance();
}
return ConstructorUtils.invokeConstructor(clas, params);
} catch (final ... | [
"public",
"static",
"<",
"T",
">",
"T",
"newInstance",
"(",
"final",
"Class",
"<",
"T",
">",
"clas",
",",
"final",
"Object",
"...",
"params",
")",
"{",
"try",
"{",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"paramClasses",
"=",
"JKObjectUtil",
".",
... | New instance.
@param <T> the generic type
@param clas the clas
@param params the params
@return the t | [
"New",
"instance",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKObjectUtil.java#L224-L234 |
b3dgs/lionengine | lionengine-core/src/main/java/com/b3dgs/lionengine/UtilReflection.java | UtilReflection.createReduce | @SuppressWarnings("unchecked")
public static <T> T createReduce(Class<T> type, Object... params) throws NoSuchMethodException {
"""
Create a class instance with its parameters. Use a compatible constructor with the following parameters, reducing
parameter types array as a queue until empty in order to find a... | java | @SuppressWarnings("unchecked")
public static <T> T createReduce(Class<T> type, Object... params) throws NoSuchMethodException
{
Check.notNull(type);
Check.notNull(params);
final Class<?>[] paramTypes = getParamTypes(params);
final Queue<Class<?>> typesQueue = new ArrayDeq... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"createReduce",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"Object",
"...",
"params",
")",
"throws",
"NoSuchMethodException",
"{",
"Check",
".",
"notNull",
"(",
"typ... | Create a class instance with its parameters. Use a compatible constructor with the following parameters, reducing
parameter types array as a queue until empty in order to find a constructor.
@param <T> The element type used.
@param type The class type (must not be <code>null</code>).
@param params The maximum paramete... | [
"Create",
"a",
"class",
"instance",
"with",
"its",
"parameters",
".",
"Use",
"a",
"compatible",
"constructor",
"with",
"the",
"following",
"parameters",
"reducing",
"parameter",
"types",
"array",
"as",
"a",
"queue",
"until",
"empty",
"in",
"order",
"to",
"find... | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilReflection.java#L85-L117 |
jaxio/javaee-lab | javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java | GenericRepository.isPropertyNull | @Transactional
public boolean isPropertyNull(PK id, SingularAttribute<E, ?> property) {
"""
/*
Helper to determine if the passed given property is null. Used mainly on binary lazy loaded property.
@param id the entity id
@param property the property to check
"""
checkNotNull(id, "The id ... | java | @Transactional
public boolean isPropertyNull(PK id, SingularAttribute<E, ?> property) {
checkNotNull(id, "The id cannot be null");
checkNotNull(property, "The property cannot be null");
CriteriaBuilder builder = entityManager.getCriteriaBuilder();
CriteriaQuery<Long> criteriaQuery = ... | [
"@",
"Transactional",
"public",
"boolean",
"isPropertyNull",
"(",
"PK",
"id",
",",
"SingularAttribute",
"<",
"E",
",",
"?",
">",
"property",
")",
"{",
"checkNotNull",
"(",
"id",
",",
"\"The id cannot be null\"",
")",
";",
"checkNotNull",
"(",
"property",
",",
... | /*
Helper to determine if the passed given property is null. Used mainly on binary lazy loaded property.
@param id the entity id
@param property the property to check | [
"/",
"*",
"Helper",
"to",
"determine",
"if",
"the",
"passed",
"given",
"property",
"is",
"null",
".",
"Used",
"mainly",
"on",
"binary",
"lazy",
"loaded",
"property",
"."
] | train | https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L643-L659 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getResolvedScriptSet | private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
"""
Computes the resolved script set for a string, according to UTS 39 section 5.1.
"""
getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
} | java | private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
} | [
"private",
"void",
"getResolvedScriptSet",
"(",
"CharSequence",
"input",
",",
"ScriptSet",
"result",
")",
"{",
"getResolvedScriptSetWithout",
"(",
"input",
",",
"UScript",
".",
"CODE_LIMIT",
",",
"result",
")",
";",
"}"
] | Computes the resolved script set for a string, according to UTS 39 section 5.1. | [
"Computes",
"the",
"resolved",
"script",
"set",
"for",
"a",
"string",
"according",
"to",
"UTS",
"39",
"section",
"5",
".",
"1",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1519-L1521 |
google/closure-compiler | src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java | TypeTransformationParser.validTemplateTypeOfExpression | private boolean validTemplateTypeOfExpression(Node expr) {
"""
A template type of expression must be of the form
templateTypeOf(TTLExp, index)
"""
// The expression must have three children. The templateTypeOf keyword, a
// templatized type and an index
if (!checkParameterCount(expr, Keywords.TEMP... | java | private boolean validTemplateTypeOfExpression(Node expr) {
// The expression must have three children. The templateTypeOf keyword, a
// templatized type and an index
if (!checkParameterCount(expr, Keywords.TEMPLATETYPEOF)) {
return false;
}
// The parameter must be a valid type expression
... | [
"private",
"boolean",
"validTemplateTypeOfExpression",
"(",
"Node",
"expr",
")",
"{",
"// The expression must have three children. The templateTypeOf keyword, a",
"// templatized type and an index",
"if",
"(",
"!",
"checkParameterCount",
"(",
"expr",
",",
"Keywords",
".",
"TEMP... | A template type of expression must be of the form
templateTypeOf(TTLExp, index) | [
"A",
"template",
"type",
"of",
"expression",
"must",
"be",
"of",
"the",
"form",
"templateTypeOf",
"(",
"TTLExp",
"index",
")"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java#L382-L405 |
raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java | ByteBuddy.makeInterface | public DynamicType.Builder<?> makeInterface(Collection<? extends TypeDefinition> interfaceTypes) {
"""
<p>
Creates a new interface type that extends the provided interface.
</p>
<p>
<b>Note</b>: This methods implements the supplied types <i>as is</i>, i.e. any {@link TypeDescription} values are implemented
as... | java | public DynamicType.Builder<?> makeInterface(Collection<? extends TypeDefinition> interfaceTypes) {
return subclass(Object.class, ConstructorStrategy.Default.NO_CONSTRUCTORS).implement(interfaceTypes).modifiers(TypeManifestation.INTERFACE, Visibility.PUBLIC);
} | [
"public",
"DynamicType",
".",
"Builder",
"<",
"?",
">",
"makeInterface",
"(",
"Collection",
"<",
"?",
"extends",
"TypeDefinition",
">",
"interfaceTypes",
")",
"{",
"return",
"subclass",
"(",
"Object",
".",
"class",
",",
"ConstructorStrategy",
".",
"Default",
"... | <p>
Creates a new interface type that extends the provided interface.
</p>
<p>
<b>Note</b>: This methods implements the supplied types <i>as is</i>, i.e. any {@link TypeDescription} values are implemented
as raw types if they declare type variables or an owner type.
</p>
<p>
<b>Note</b>: Byte Buddy does not cache previ... | [
"<p",
">",
"Creates",
"a",
"new",
"interface",
"type",
"that",
"extends",
"the",
"provided",
"interface",
".",
"<",
"/",
"p",
">",
"<p",
">",
"<b",
">",
"Note<",
"/",
"b",
">",
":",
"This",
"methods",
"implements",
"the",
"supplied",
"types",
"<i",
"... | train | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java#L550-L552 |
alkacon/opencms-core | src/org/opencms/ade/contenteditor/CmsContentService.java | CmsContentService.getRdfaAttributes | public static String getRdfaAttributes(I_CmsXmlDocument document, Locale contentLocale, String elementPath) {
"""
Returns the RDF annotations required for in line editing.<p>
@param document the parent XML document
@param contentLocale the content locale
@param elementPath the element xpath to get the RDF ann... | java | public static String getRdfaAttributes(I_CmsXmlDocument document, Locale contentLocale, String elementPath) {
I_CmsXmlSchemaType schemaType = document.getContentDefinition().getSchemaType(elementPath);
if (schemaType != null) {
String path = "";
if (elementPath.contains("/")) {
... | [
"public",
"static",
"String",
"getRdfaAttributes",
"(",
"I_CmsXmlDocument",
"document",
",",
"Locale",
"contentLocale",
",",
"String",
"elementPath",
")",
"{",
"I_CmsXmlSchemaType",
"schemaType",
"=",
"document",
".",
"getContentDefinition",
"(",
")",
".",
"getSchemaT... | Returns the RDF annotations required for in line editing.<p>
@param document the parent XML document
@param contentLocale the content locale
@param elementPath the element xpath to get the RDF annotation for
@return the RDFA | [
"Returns",
"the",
"RDF",
"annotations",
"required",
"for",
"in",
"line",
"editing",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentService.java#L358-L374 |
MariaDB/mariadb-connector-j | src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java | MariaDbDatabaseMetaData.getClientInfoProperties | public ResultSet getClientInfoProperties() {
"""
Retrieves a list of the client info properties that the driver supports. The result set
contains the following columns
<ol>
<li>NAME String : The name of the client info property</li>
<li>MAX_LEN int : The maximum length of the value for the property</li>
<li>D... | java | public ResultSet getClientInfoProperties() {
ColumnInformation[] columns = new ColumnInformation[4];
columns[0] = ColumnInformation.create("NAME", ColumnType.STRING);
columns[1] = ColumnInformation.create("MAX_LEN", ColumnType.INTEGER);
columns[2] = ColumnInformation.create("DEFAULT_VALUE", ColumnType.S... | [
"public",
"ResultSet",
"getClientInfoProperties",
"(",
")",
"{",
"ColumnInformation",
"[",
"]",
"columns",
"=",
"new",
"ColumnInformation",
"[",
"4",
"]",
";",
"columns",
"[",
"0",
"]",
"=",
"ColumnInformation",
".",
"create",
"(",
"\"NAME\"",
",",
"ColumnType... | Retrieves a list of the client info properties that the driver supports. The result set
contains the following columns
<ol>
<li>NAME String : The name of the client info property</li>
<li>MAX_LEN int : The maximum length of the value for the property</li>
<li>DEFAULT_VALUE String : The default value of the property</li... | [
"Retrieves",
"a",
"list",
"of",
"the",
"client",
"info",
"properties",
"that",
"the",
"driver",
"supports",
".",
"The",
"result",
"set",
"contains",
"the",
"following",
"columns",
"<ol",
">",
"<li",
">",
"NAME",
"String",
":",
"The",
"name",
"of",
"the",
... | train | https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java#L2940-L2972 |
sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java | VimGenerator2.appendCmd | protected IStyleAppendable appendCmd(IStyleAppendable it, String text) {
"""
Append a Vim command.
@param it the receiver of the generated elements.
@param text the text of the command.
@return {@code it}.
"""
return appendCmd(it, true, text);
} | java | protected IStyleAppendable appendCmd(IStyleAppendable it, String text) {
return appendCmd(it, true, text);
} | [
"protected",
"IStyleAppendable",
"appendCmd",
"(",
"IStyleAppendable",
"it",
",",
"String",
"text",
")",
"{",
"return",
"appendCmd",
"(",
"it",
",",
"true",
",",
"text",
")",
";",
"}"
] | Append a Vim command.
@param it the receiver of the generated elements.
@param text the text of the command.
@return {@code it}. | [
"Append",
"a",
"Vim",
"command",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java#L539-L541 |
RestComm/sipunit | src/main/java/org/cafesip/sipunit/SipSession.java | SipSession.sendRequestWithTransaction | public SipTransaction sendRequestWithTransaction(Request request, boolean viaProxy,
Dialog dialog) {
"""
This basic method sends out a request message as part of a transaction. A test program should
use this method when a response to a request is expected. The Request object passed in must be
a fully forme... | java | public SipTransaction sendRequestWithTransaction(Request request, boolean viaProxy,
Dialog dialog) {
return sendRequestWithTransaction(request, viaProxy, dialog, null);
} | [
"public",
"SipTransaction",
"sendRequestWithTransaction",
"(",
"Request",
"request",
",",
"boolean",
"viaProxy",
",",
"Dialog",
"dialog",
")",
"{",
"return",
"sendRequestWithTransaction",
"(",
"request",
",",
"viaProxy",
",",
"dialog",
",",
"null",
")",
";",
"}"
] | This basic method sends out a request message as part of a transaction. A test program should
use this method when a response to a request is expected. The Request object passed in must be
a fully formed Request with all required content, EXCEPT for the Via header branch parameter,
which cannot be filled in until a cli... | [
"This",
"basic",
"method",
"sends",
"out",
"a",
"request",
"message",
"as",
"part",
"of",
"a",
"transaction",
".",
"A",
"test",
"program",
"should",
"use",
"this",
"method",
"when",
"a",
"response",
"to",
"a",
"request",
"is",
"expected",
".",
"The",
"Re... | train | https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipSession.java#L935-L938 |
foundation-runtime/service-directory | 2.0/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/HttpUtils.java | HttpUtils.getJson | public static HttpResponse getJson(String urlStr) throws IOException {
"""
Invoke REST Service using GET method.
@param urlStr
the REST service URL String.
@return
the HttpResponse.
@throws IOException
"""
URL url = new URL(urlStr);
HttpURLConnection urlConnection = (HttpURLConnection) u... | java | public static HttpResponse getJson(String urlStr) throws IOException {
URL url = new URL(urlStr);
HttpURLConnection urlConnection = (HttpURLConnection) url
.openConnection();
urlConnection.addRequestProperty("Accept", "application/json");
BufferedReader in = null;
... | [
"public",
"static",
"HttpResponse",
"getJson",
"(",
"String",
"urlStr",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
"urlStr",
")",
";",
"HttpURLConnection",
"urlConnection",
"=",
"(",
"HttpURLConnection",
")",
"url",
".",
"openConn... | Invoke REST Service using GET method.
@param urlStr
the REST service URL String.
@return
the HttpResponse.
@throws IOException | [
"Invoke",
"REST",
"Service",
"using",
"GET",
"method",
"."
] | train | https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/HttpUtils.java#L193-L222 |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/util/FormatUtilities.java | FormatUtilities.getDateTime | static public long getDateTime(String s, String format, boolean useTZ, boolean throwException) {
"""
Returns the given date time parsed using the given format.
@param s The formatted date to be parsed
@param format The format to use when parsing the date
@param useTZ <CODE>true</CODE> if the date should be pars... | java | static public long getDateTime(String s, String format, boolean useTZ, boolean throwException)
{
long ret = 0L;
SimpleDateFormat df = null;
try
{
if(s!= null && s.length() > 0)
{
df = formatPool.getFormat(format);
if(useTZ)
... | [
"static",
"public",
"long",
"getDateTime",
"(",
"String",
"s",
",",
"String",
"format",
",",
"boolean",
"useTZ",
",",
"boolean",
"throwException",
")",
"{",
"long",
"ret",
"=",
"0L",
";",
"SimpleDateFormat",
"df",
"=",
"null",
";",
"try",
"{",
"if",
"(",... | Returns the given date time parsed using the given format.
@param s The formatted date to be parsed
@param format The format to use when parsing the date
@param useTZ <CODE>true</CODE> if the date should be parsed using the current timezone
@param throwException <CODE>true</CODE> if an exception should be thrown for an... | [
"Returns",
"the",
"given",
"date",
"time",
"parsed",
"using",
"the",
"given",
"format",
"."
] | train | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/FormatUtilities.java#L273-L301 |
netty/netty | codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java | HttpUtil.getContentLength | public static int getContentLength(HttpMessage message, int defaultValue) {
"""
Get an {@code int} representation of {@link #getContentLength(HttpMessage, long)}.
@return the content length or {@code defaultValue} if this message does
not have the {@code "Content-Length"} header or its value is not
a number. ... | java | public static int getContentLength(HttpMessage message, int defaultValue) {
return (int) Math.min(Integer.MAX_VALUE, getContentLength(message, (long) defaultValue));
} | [
"public",
"static",
"int",
"getContentLength",
"(",
"HttpMessage",
"message",
",",
"int",
"defaultValue",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"min",
"(",
"Integer",
".",
"MAX_VALUE",
",",
"getContentLength",
"(",
"message",
",",
"(",
"long",
... | Get an {@code int} representation of {@link #getContentLength(HttpMessage, long)}.
@return the content length or {@code defaultValue} if this message does
not have the {@code "Content-Length"} header or its value is not
a number. Not to exceed the boundaries of integer. | [
"Get",
"an",
"{",
"@code",
"int",
"}",
"representation",
"of",
"{",
"@link",
"#getContentLength",
"(",
"HttpMessage",
"long",
")",
"}",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L195-L197 |
powermock/powermock | powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java | SuppressCode.suppressConstructor | public static synchronized void suppressConstructor(Class<?> clazz, boolean excludePrivateConstructors) {
"""
Suppress all constructors in the given class.
@param clazz
The classes whose constructors will be suppressed.
@param excludePrivateConstructors
optionally keep code in private constructors
"""
... | java | public static synchronized void suppressConstructor(Class<?> clazz, boolean excludePrivateConstructors) {
Constructor<?>[] ctors = null;
if (excludePrivateConstructors) {
ctors = clazz.getConstructors();
} else {
ctors = clazz.getDeclaredConstructors();
}
for (Constructor<?> ctor : ctors) {
MockRep... | [
"public",
"static",
"synchronized",
"void",
"suppressConstructor",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"boolean",
"excludePrivateConstructors",
")",
"{",
"Constructor",
"<",
"?",
">",
"[",
"]",
"ctors",
"=",
"null",
";",
"if",
"(",
"excludePrivateConstr... | Suppress all constructors in the given class.
@param clazz
The classes whose constructors will be suppressed.
@param excludePrivateConstructors
optionally keep code in private constructors | [
"Suppress",
"all",
"constructors",
"in",
"the",
"given",
"class",
"."
] | train | https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java#L80-L92 |
lucee/Lucee | core/src/main/java/lucee/runtime/net/mail/MailUtil.java | MailUtil.parseEmail | public static InternetAddress parseEmail(Object value, InternetAddress defaultValue) {
"""
returns an InternetAddress object or null if the parsing fails. to be be used in multiple places.
@param value
@return
"""
String str = Caster.toString(value, "");
if (str.indexOf('@') > -1) {
try {
str = fi... | java | public static InternetAddress parseEmail(Object value, InternetAddress defaultValue) {
String str = Caster.toString(value, "");
if (str.indexOf('@') > -1) {
try {
str = fixIDN(str);
InternetAddress addr = new InternetAddress(str);
// fixIDN( addr );
return addr;
}
catch (AddressException ex) {}... | [
"public",
"static",
"InternetAddress",
"parseEmail",
"(",
"Object",
"value",
",",
"InternetAddress",
"defaultValue",
")",
"{",
"String",
"str",
"=",
"Caster",
".",
"toString",
"(",
"value",
",",
"\"\"",
")",
";",
"if",
"(",
"str",
".",
"indexOf",
"(",
"'",... | returns an InternetAddress object or null if the parsing fails. to be be used in multiple places.
@param value
@return | [
"returns",
"an",
"InternetAddress",
"object",
"or",
"null",
"if",
"the",
"parsing",
"fails",
".",
"to",
"be",
"be",
"used",
"in",
"multiple",
"places",
"."
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/MailUtil.java#L184-L196 |
actorapp/actor-platform | actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/primitives/curve25519/fe_cmov.java | fe_cmov.fe_cmov | public static void fe_cmov(int[] f, int[] g, int b) {
"""
/*
Replace (f,g) with (g,g) if b == 1;
replace (f,g) with (f,g) if b == 0.
Preconditions: b in {0,1}.
"""
int f0 = f[0];
int f1 = f[1];
int f2 = f[2];
int f3 = f[3];
int f4 = f[4];
int f5 = f[5];
... | java | public static void fe_cmov(int[] f, int[] g, int b) {
int f0 = f[0];
int f1 = f[1];
int f2 = f[2];
int f3 = f[3];
int f4 = f[4];
int f5 = f[5];
int f6 = f[6];
int f7 = f[7];
int f8 = f[8];
int f9 = f[9];
int g0 = g[0];
int g... | [
"public",
"static",
"void",
"fe_cmov",
"(",
"int",
"[",
"]",
"f",
",",
"int",
"[",
"]",
"g",
",",
"int",
"b",
")",
"{",
"int",
"f0",
"=",
"f",
"[",
"0",
"]",
";",
"int",
"f1",
"=",
"f",
"[",
"1",
"]",
";",
"int",
"f2",
"=",
"f",
"[",
"2... | /*
Replace (f,g) with (g,g) if b == 1;
replace (f,g) with (f,g) if b == 0.
Preconditions: b in {0,1}. | [
"/",
"*",
"Replace",
"(",
"f",
"g",
")",
"with",
"(",
"g",
"g",
")",
"if",
"b",
"==",
"1",
";",
"replace",
"(",
"f",
"g",
")",
"with",
"(",
"f",
"g",
")",
"if",
"b",
"==",
"0",
"."
] | train | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/primitives/curve25519/fe_cmov.java#L20-L72 |
aws/aws-sdk-java | aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/UpdateLayerRequest.java | UpdateLayerRequest.withAttributes | public UpdateLayerRequest withAttributes(java.util.Map<String, String> attributes) {
"""
<p>
One or more user-defined key/value pairs to be added to the stack attributes.
</p>
@param attributes
One or more user-defined key/value pairs to be added to the stack attributes.
@return Returns a reference to this ... | java | public UpdateLayerRequest withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | [
"public",
"UpdateLayerRequest",
"withAttributes",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"setAttributes",
"(",
"attributes",
")",
";",
"return",
"this",
";",
"}"
] | <p>
One or more user-defined key/value pairs to be added to the stack attributes.
</p>
@param attributes
One or more user-defined key/value pairs to be added to the stack attributes.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"One",
"or",
"more",
"user",
"-",
"defined",
"key",
"/",
"value",
"pairs",
"to",
"be",
"added",
"to",
"the",
"stack",
"attributes",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/UpdateLayerRequest.java#L348-L351 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java | ApiOvhDbaaslogs.serviceName_role_roleId_permission_permissionId_GET | public ArrayList<OvhPermission> serviceName_role_roleId_permission_permissionId_GET(String serviceName, String roleId, String permissionId) throws IOException {
"""
Returns details of specified permission
REST: GET /dbaas/logs/{serviceName}/role/{roleId}/permission/{permissionId}
@param serviceName [required] ... | java | public ArrayList<OvhPermission> serviceName_role_roleId_permission_permissionId_GET(String serviceName, String roleId, String permissionId) throws IOException {
String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/permission/{permissionId}";
StringBuilder sb = path(qPath, serviceName, roleId, permissionId);
St... | [
"public",
"ArrayList",
"<",
"OvhPermission",
">",
"serviceName_role_roleId_permission_permissionId_GET",
"(",
"String",
"serviceName",
",",
"String",
"roleId",
",",
"String",
"permissionId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dbaas/logs/{servic... | Returns details of specified permission
REST: GET /dbaas/logs/{serviceName}/role/{roleId}/permission/{permissionId}
@param serviceName [required] Service name
@param roleId [required] Role ID
@param permissionId [required] Permission ID | [
"Returns",
"details",
"of",
"specified",
"permission"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L801-L806 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/serialize/SerializerUtils.java | SerializerUtils.addAttribute | public static void addAttribute(SerializationHandler handler, int attr)
throws TransformerException {
"""
Copy an DOM attribute to the created output element, executing
attribute templates as need be, and processing the xsl:use
attribute.
@param handler SerializationHandler to which the attributes are... | java | public static void addAttribute(SerializationHandler handler, int attr)
throws TransformerException
{
TransformerImpl transformer =
(TransformerImpl) handler.getTransformer();
DTM dtm = transformer.getXPathContext().getDTM(attr);
if (SerializerUtils.isDefinedNSDecl(hand... | [
"public",
"static",
"void",
"addAttribute",
"(",
"SerializationHandler",
"handler",
",",
"int",
"attr",
")",
"throws",
"TransformerException",
"{",
"TransformerImpl",
"transformer",
"=",
"(",
"TransformerImpl",
")",
"handler",
".",
"getTransformer",
"(",
")",
";",
... | Copy an DOM attribute to the created output element, executing
attribute templates as need be, and processing the xsl:use
attribute.
@param handler SerializationHandler to which the attributes are added.
@param attr Attribute node to add to SerializationHandler.
@throws TransformerException | [
"Copy",
"an",
"DOM",
"attribute",
"to",
"the",
"created",
"output",
"element",
"executing",
"attribute",
"templates",
"as",
"need",
"be",
"and",
"processing",
"the",
"xsl",
":",
"use",
"attribute",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/serialize/SerializerUtils.java#L54-L84 |
ontop/ontop | core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/OrderByNodeImpl.java | OrderByNodeImpl.liftChildConstructionNode | private IQTree liftChildConstructionNode(ConstructionNode newChildRoot, UnaryIQTree newChild, IQProperties liftedProperties) {
"""
Lifts the construction node above and updates the order comparators
"""
UnaryIQTree newOrderByTree = iqFactory.createUnaryIQTree(
applySubstitution(newChil... | java | private IQTree liftChildConstructionNode(ConstructionNode newChildRoot, UnaryIQTree newChild, IQProperties liftedProperties) {
UnaryIQTree newOrderByTree = iqFactory.createUnaryIQTree(
applySubstitution(newChildRoot.getSubstitution()),
newChild.getChild(),
lifted... | [
"private",
"IQTree",
"liftChildConstructionNode",
"(",
"ConstructionNode",
"newChildRoot",
",",
"UnaryIQTree",
"newChild",
",",
"IQProperties",
"liftedProperties",
")",
"{",
"UnaryIQTree",
"newOrderByTree",
"=",
"iqFactory",
".",
"createUnaryIQTree",
"(",
"applySubstitution... | Lifts the construction node above and updates the order comparators | [
"Lifts",
"the",
"construction",
"node",
"above",
"and",
"updates",
"the",
"order",
"comparators"
] | train | https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/OrderByNodeImpl.java#L69-L77 |
eclipse/xtext-lib | org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java | BigIntegerExtensions.operator_plus | @Inline(value="$1.add($2)")
@Pure
public static BigInteger operator_plus(BigInteger a, BigInteger b) {
"""
The binary <code>plus</code> operator.
@param a
a BigInteger. May not be <code>null</code>.
@param b
a BigInteger. May not be <code>null</code>.
@return <code>a.add(b)</code>
@throws NullPointerExce... | java | @Inline(value="$1.add($2)")
@Pure
public static BigInteger operator_plus(BigInteger a, BigInteger b) {
return a.add(b);
} | [
"@",
"Inline",
"(",
"value",
"=",
"\"$1.add($2)\"",
")",
"@",
"Pure",
"public",
"static",
"BigInteger",
"operator_plus",
"(",
"BigInteger",
"a",
",",
"BigInteger",
"b",
")",
"{",
"return",
"a",
".",
"add",
"(",
"b",
")",
";",
"}"
] | The binary <code>plus</code> operator.
@param a
a BigInteger. May not be <code>null</code>.
@param b
a BigInteger. May not be <code>null</code>.
@return <code>a.add(b)</code>
@throws NullPointerException
if {@code a} or {@code b} is <code>null</code>. | [
"The",
"binary",
"<code",
">",
"plus<",
"/",
"code",
">",
"operator",
"."
] | train | https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java#L48-L52 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.collectEntries | public static <K, V, E> Map<K, V> collectEntries(Iterator<E> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform) {
"""
A variant of collectEntries for Iterators.
@param self an Iterator
@param transform the closure used for transforming, which has an item from self as the paramet... | java | public static <K, V, E> Map<K, V> collectEntries(Iterator<E> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform) {
return collectEntries(self, new LinkedHashMap<K, V>(), transform);
} | [
"public",
"static",
"<",
"K",
",",
"V",
",",
"E",
">",
"Map",
"<",
"K",
",",
"V",
">",
"collectEntries",
"(",
"Iterator",
"<",
"E",
">",
"self",
",",
"@",
"ClosureParams",
"(",
"FirstParam",
".",
"FirstGenericType",
".",
"class",
")",
"Closure",
"<",... | A variant of collectEntries for Iterators.
@param self an Iterator
@param transform the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value
@return a Map of the transformed entries
@see #colle... | [
"A",
"variant",
"of",
"collectEntries",
"for",
"Iterators",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4022-L4024 |
OpenLiberty/open-liberty | dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java | LifecycleCallbackHelper.getAnnotatedMethod | @SuppressWarnings("rawtypes")
public Method getAnnotatedMethod(Class clazz, Class<? extends Annotation> annotationClass) {
"""
Gets the annotated method from the class object.
@param clazz the Class to be inspected.
@param annotationClass the annotation class object
@return a Method object or null if ther... | java | @SuppressWarnings("rawtypes")
public Method getAnnotatedMethod(Class clazz, Class<? extends Annotation> annotationClass) {
Method m = null;
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
Annotation[] a = methods[i].getAnnotations();
... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"Method",
"getAnnotatedMethod",
"(",
"Class",
"clazz",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationClass",
")",
"{",
"Method",
"m",
"=",
"null",
";",
"Method",
"[",
"]",
"metho... | Gets the annotated method from the class object.
@param clazz the Class to be inspected.
@param annotationClass the annotation class object
@return a Method object or null if there is no annotated method. | [
"Gets",
"the",
"annotated",
"method",
"from",
"the",
"class",
"object",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L156-L177 |
facebook/fresco | imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java | DefaultImageFormatChecker.getWebpFormat | private static ImageFormat getWebpFormat(final byte[] imageHeaderBytes, final int headerSize) {
"""
Determines type of WebP image. imageHeaderBytes has to be header of a WebP image
"""
Preconditions.checkArgument(WebpSupportStatus.isWebpHeader(imageHeaderBytes, 0, headerSize));
if (WebpSupportStatus.is... | java | private static ImageFormat getWebpFormat(final byte[] imageHeaderBytes, final int headerSize) {
Preconditions.checkArgument(WebpSupportStatus.isWebpHeader(imageHeaderBytes, 0, headerSize));
if (WebpSupportStatus.isSimpleWebpHeader(imageHeaderBytes, 0)) {
return DefaultImageFormats.WEBP_SIMPLE;
}
... | [
"private",
"static",
"ImageFormat",
"getWebpFormat",
"(",
"final",
"byte",
"[",
"]",
"imageHeaderBytes",
",",
"final",
"int",
"headerSize",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"WebpSupportStatus",
".",
"isWebpHeader",
"(",
"imageHeaderBytes",
",",
... | Determines type of WebP image. imageHeaderBytes has to be header of a WebP image | [
"Determines",
"type",
"of",
"WebP",
"image",
".",
"imageHeaderBytes",
"has",
"to",
"be",
"header",
"of",
"a",
"WebP",
"image"
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java#L104-L125 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java | PersistenceBrokerFactoryDefaultImpl.createPool | private GenericKeyedObjectPool createPool() {
"""
Create the {@link org.apache.commons.pool.KeyedObjectPool}, pooling
the {@link PersistenceBroker} instances - override this method to
implement your own pool and {@link org.apache.commons.pool.KeyedPoolableObjectFactory}.
"""
GenericKeyedObjectPool.C... | java | private GenericKeyedObjectPool createPool()
{
GenericKeyedObjectPool.Config conf = poolConfig.getKeyedObjectPoolConfig();
if (log.isDebugEnabled())
log.debug("PersistenceBroker pool will be setup with the following configuration " +
ToStringBuilder.reflectionToSt... | [
"private",
"GenericKeyedObjectPool",
"createPool",
"(",
")",
"{",
"GenericKeyedObjectPool",
".",
"Config",
"conf",
"=",
"poolConfig",
".",
"getKeyedObjectPoolConfig",
"(",
")",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"... | Create the {@link org.apache.commons.pool.KeyedObjectPool}, pooling
the {@link PersistenceBroker} instances - override this method to
implement your own pool and {@link org.apache.commons.pool.KeyedPoolableObjectFactory}. | [
"Create",
"the",
"{"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java#L216-L225 |
code4everything/util | src/main/java/com/zhazhapan/util/Formatter.java | Formatter.stringToCustomDateTime | public static Date stringToCustomDateTime(String datetime, String formatWay) throws ParseException {
"""
将字符串转换成自定义格式的日期
@param datetime 日期格式的字符串
@param formatWay 自定义格式
@return 自定义格式的日期
@throws ParseException 异常
"""
return stringToCustomDateTime(new SimpleDateFormat(formatWay), datetime);
... | java | public static Date stringToCustomDateTime(String datetime, String formatWay) throws ParseException {
return stringToCustomDateTime(new SimpleDateFormat(formatWay), datetime);
} | [
"public",
"static",
"Date",
"stringToCustomDateTime",
"(",
"String",
"datetime",
",",
"String",
"formatWay",
")",
"throws",
"ParseException",
"{",
"return",
"stringToCustomDateTime",
"(",
"new",
"SimpleDateFormat",
"(",
"formatWay",
")",
",",
"datetime",
")",
";",
... | 将字符串转换成自定义格式的日期
@param datetime 日期格式的字符串
@param formatWay 自定义格式
@return 自定义格式的日期
@throws ParseException 异常 | [
"将字符串转换成自定义格式的日期"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Formatter.java#L525-L527 |
beanshell/beanshell | src/main/java/bsh/Operators.java | Operators.bigIntegerBinaryOperation | static Object bigIntegerBinaryOperation(BigInteger lhs, BigInteger rhs, int kind) {
"""
returns Object covering both Integer and Boolean return types
"""
switch(kind)
{
// arithmetic
case PLUS:
return lhs.add(rhs);
case MINUS:
... | java | static Object bigIntegerBinaryOperation(BigInteger lhs, BigInteger rhs, int kind)
{
switch(kind)
{
// arithmetic
case PLUS:
return lhs.add(rhs);
case MINUS:
return lhs.subtract(rhs);
case STAR:
return ... | [
"static",
"Object",
"bigIntegerBinaryOperation",
"(",
"BigInteger",
"lhs",
",",
"BigInteger",
"rhs",
",",
"int",
"kind",
")",
"{",
"switch",
"(",
"kind",
")",
"{",
"// arithmetic",
"case",
"PLUS",
":",
"return",
"lhs",
".",
"add",
"(",
"rhs",
")",
";",
"... | returns Object covering both Integer and Boolean return types | [
"returns",
"Object",
"covering",
"both",
"Integer",
"and",
"Boolean",
"return",
"types"
] | train | https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Operators.java#L311-L371 |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ContrastUtils.java | ContrastUtils.calculateContrastRatio | public static double calculateContrastRatio(double lum1, double lum2) {
"""
Calculates the contrast ratio of two order-independent luminance values.
<p>
Derived from formula at http://gmazzocato.altervista.org/colorwheel/algo.php
@param lum1 The first luminance value
@param lum2 The second luminance value
@... | java | public static double calculateContrastRatio(double lum1, double lum2) {
if ((lum1 < 0.0d) || (lum2 < 0.0d)) {
throw new IllegalArgumentException("Luminance values may not be negative.");
}
return (Math.max(lum1, lum2) + 0.05d) / (Math.min(lum1, lum2) + 0.05d);
} | [
"public",
"static",
"double",
"calculateContrastRatio",
"(",
"double",
"lum1",
",",
"double",
"lum2",
")",
"{",
"if",
"(",
"(",
"lum1",
"<",
"0.0d",
")",
"||",
"(",
"lum2",
"<",
"0.0d",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"L... | Calculates the contrast ratio of two order-independent luminance values.
<p>
Derived from formula at http://gmazzocato.altervista.org/colorwheel/algo.php
@param lum1 The first luminance value
@param lum2 The second luminance value
@return The contrast ratio of the luminance values
@throws IllegalArgumentException if l... | [
"Calculates",
"the",
"contrast",
"ratio",
"of",
"two",
"order",
"-",
"independent",
"luminance",
"values",
".",
"<p",
">",
"Derived",
"from",
"formula",
"at",
"http",
":",
"//",
"gmazzocato",
".",
"altervista",
".",
"org",
"/",
"colorwheel",
"/",
"algo",
"... | train | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ContrastUtils.java#L95-L101 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java | DefaultAnnotationMetadata.addRepeatable | protected final void addRepeatable(String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue) {
"""
Adds a repeatable annotation value. If a value already exists will be added
@param annotationName The annotation name
@param annotationValue The annotation value
"""
if (Str... | java | protected final void addRepeatable(String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue) {
if (StringUtils.isNotEmpty(annotationName) && annotationValue != null) {
Map<String, Map<CharSequence, Object>> allAnnotations = getAllAnnotations();
addRepeatableIn... | [
"protected",
"final",
"void",
"addRepeatable",
"(",
"String",
"annotationName",
",",
"io",
".",
"micronaut",
".",
"core",
".",
"annotation",
".",
"AnnotationValue",
"annotationValue",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNotEmpty",
"(",
"annotationName",
... | Adds a repeatable annotation value. If a value already exists will be added
@param annotationName The annotation name
@param annotationValue The annotation value | [
"Adds",
"a",
"repeatable",
"annotation",
"value",
".",
"If",
"a",
"value",
"already",
"exists",
"will",
"be",
"added"
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java#L550-L556 |
krummas/DrizzleJDBC | src/main/java/org/drizzle/jdbc/DrizzleStatement.java | DrizzleStatement.getGeneratedKeys | public ResultSet getGeneratedKeys() throws SQLException {
"""
Retrieves any auto-generated keys created as a result of executing this <code>Statement</code> object. If this
<code>Statement</code> object did not generate any keys, an empty <code>ResultSet</code> object is returned.
<p/>
<p><B>Note:</B>If the col... | java | public ResultSet getGeneratedKeys() throws SQLException {
if (queryResult != null && queryResult.getResultSetType() == ResultSetType.MODIFY) {
final QueryResult genRes = ((ModifyQueryResult) queryResult).getGeneratedKeysResult();
return new DrizzleResultSet(genRes, this, getProtocol());
... | [
"public",
"ResultSet",
"getGeneratedKeys",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"queryResult",
"!=",
"null",
"&&",
"queryResult",
".",
"getResultSetType",
"(",
")",
"==",
"ResultSetType",
".",
"MODIFY",
")",
"{",
"final",
"QueryResult",
"genRes",
... | Retrieves any auto-generated keys created as a result of executing this <code>Statement</code> object. If this
<code>Statement</code> object did not generate any keys, an empty <code>ResultSet</code> object is returned.
<p/>
<p><B>Note:</B>If the columns which represent the auto-generated keys were not specified, the J... | [
"Retrieves",
"any",
"auto",
"-",
"generated",
"keys",
"created",
"as",
"a",
"result",
"of",
"executing",
"this",
"<code",
">",
"Statement<",
"/",
"code",
">",
"object",
".",
"If",
"this",
"<code",
">",
"Statement<",
"/",
"code",
">",
"object",
"did",
"no... | train | https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleStatement.java#L481-L487 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAsymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.java | OWLAsymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.deserializeInstance | @Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLAsymmetricObjectPropertyAxiomImpl instance) throws SerializationException {
"""
Deserializes the content of the object from the
{@link com.google.gwt.user.client.rpc.SerializationStreamReader}.
@param streamReader the {@li... | java | @Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLAsymmetricObjectPropertyAxiomImpl instance) throws SerializationException {
deserialize(streamReader, instance);
} | [
"@",
"Override",
"public",
"void",
"deserializeInstance",
"(",
"SerializationStreamReader",
"streamReader",
",",
"OWLAsymmetricObjectPropertyAxiomImpl",
"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... | [
"Deserializes",
"the",
"content",
"of",
"the",
"object",
"from",
"the",
"{",
"@link",
"com",
".",
"google",
".",
"gwt",
".",
"user",
".",
"client",
".",
"rpc",
".",
"SerializationStreamReader",
"}",
"."
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAsymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.java#L94-L97 |
ocelotds/ocelot | ocelot-web/src/main/java/org/ocelotds/core/mtc/MessageToClientManager.java | MessageToClientManager._getDataService | Object _getDataService(T session, Class cls) throws DataServiceException {
"""
Get Dataservice, store dataservice in session if session scope.<br>
@param session
@param cls
@return
@throws DataServiceException
"""
String dataServiceClassName = cls.getName();
DataService dataServiceAnno = (DataServi... | java | Object _getDataService(T session, Class cls) throws DataServiceException {
String dataServiceClassName = cls.getName();
DataService dataServiceAnno = (DataService) cls.getAnnotation(DataService.class);
IDataServiceResolver resolver = getResolver(dataServiceAnno.resolver());
Scope scope = resolver.getScope(c... | [
"Object",
"_getDataService",
"(",
"T",
"session",
",",
"Class",
"cls",
")",
"throws",
"DataServiceException",
"{",
"String",
"dataServiceClassName",
"=",
"cls",
".",
"getName",
"(",
")",
";",
"DataService",
"dataServiceAnno",
"=",
"(",
"DataService",
")",
"cls",... | Get Dataservice, store dataservice in session if session scope.<br>
@param session
@param cls
@return
@throws DataServiceException | [
"Get",
"Dataservice",
"store",
"dataservice",
"in",
"session",
"if",
"session",
"scope",
".",
"<br",
">"
] | train | https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/core/mtc/MessageToClientManager.java#L93-L113 |
JOML-CI/JOML | src/org/joml/RayAabIntersection.java | RayAabIntersection.set | public void set(float originX, float originY, float originZ, float dirX, float dirY, float dirZ) {
"""
Update the ray stored by this {@link RayAabIntersection} with the new origin <code>(originX, originY, originZ)</code>
and direction <code>(dirX, dirY, dirZ)</code>.
@param originX
the x coordinate of the ray... | java | public void set(float originX, float originY, float originZ, float dirX, float dirY, float dirZ) {
this.originX = originX;
this.originY = originY;
this.originZ = originZ;
this.dirX = dirX;
this.dirY = dirY;
this.dirZ = dirZ;
precomputeSlope();
} | [
"public",
"void",
"set",
"(",
"float",
"originX",
",",
"float",
"originY",
",",
"float",
"originZ",
",",
"float",
"dirX",
",",
"float",
"dirY",
",",
"float",
"dirZ",
")",
"{",
"this",
".",
"originX",
"=",
"originX",
";",
"this",
".",
"originY",
"=",
... | Update the ray stored by this {@link RayAabIntersection} with the new origin <code>(originX, originY, originZ)</code>
and direction <code>(dirX, dirY, dirZ)</code>.
@param originX
the x coordinate of the ray origin
@param originY
the y coordinate of the ray origin
@param originZ
the z coordinate of the ray origin
@par... | [
"Update",
"the",
"ray",
"stored",
"by",
"this",
"{",
"@link",
"RayAabIntersection",
"}",
"with",
"the",
"new",
"origin",
"<code",
">",
"(",
"originX",
"originY",
"originZ",
")",
"<",
"/",
"code",
">",
"and",
"direction",
"<code",
">",
"(",
"dirX",
"dirY"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/RayAabIntersection.java#L100-L108 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java | PathNormalizer.joinPaths | public static String joinPaths(String prefix, String path, GeneratorRegistry generatorRegistry) {
"""
Normalizes two paths and joins them as a single path.
@param prefix
@param path
@param generatorRegistry
the generator registry
@return the joined path
"""
return joinPaths(prefix, path, generatorReg... | java | public static String joinPaths(String prefix, String path, GeneratorRegistry generatorRegistry) {
return joinPaths(prefix, path, generatorRegistry.isPathGenerated(prefix));
} | [
"public",
"static",
"String",
"joinPaths",
"(",
"String",
"prefix",
",",
"String",
"path",
",",
"GeneratorRegistry",
"generatorRegistry",
")",
"{",
"return",
"joinPaths",
"(",
"prefix",
",",
"path",
",",
"generatorRegistry",
".",
"isPathGenerated",
"(",
"prefix",
... | Normalizes two paths and joins them as a single path.
@param prefix
@param path
@param generatorRegistry
the generator registry
@return the joined path | [
"Normalizes",
"two",
"paths",
"and",
"joins",
"them",
"as",
"a",
"single",
"path",
"."
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L282-L285 |
Impetus/Kundera | src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java | CQLTranslator.buildSetClause | public void buildSetClause(EntityMetadata m, StringBuilder builder, String property, Object value) {
"""
Builds set clause for a given field.
@param m
the m
@param builder
the builder
@param property
the property
@param value
the value
"""
builder = ensureCase(builder, property, false);
... | java | public void buildSetClause(EntityMetadata m, StringBuilder builder, String property, Object value)
{
builder = ensureCase(builder, property, false);
builder.append(EQ_CLAUSE);
if (m.isCounterColumnType())
{
builder = ensureCase(builder, property, false);
buil... | [
"public",
"void",
"buildSetClause",
"(",
"EntityMetadata",
"m",
",",
"StringBuilder",
"builder",
",",
"String",
"property",
",",
"Object",
"value",
")",
"{",
"builder",
"=",
"ensureCase",
"(",
"builder",
",",
"property",
",",
"false",
")",
";",
"builder",
".... | Builds set clause for a given field.
@param m
the m
@param builder
the builder
@param property
the property
@param value
the value | [
"Builds",
"set",
"clause",
"for",
"a",
"given",
"field",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L973-L990 |
Erudika/para | para-client/src/main/java/com/erudika/para/client/ParaClient.java | ParaClient.isLinked | public boolean isLinked(ParaObject obj, ParaObject toObj) {
"""
Checks if a given object is linked to this one.
@param toObj the other object
@param obj the object to execute this method on
@return true if linked
"""
if (obj == null || obj.getId() == null || toObj == null || toObj.getId() == null) {
re... | java | public boolean isLinked(ParaObject obj, ParaObject toObj) {
if (obj == null || obj.getId() == null || toObj == null || toObj.getId() == null) {
return false;
}
return isLinked(obj, toObj.getType(), toObj.getId());
} | [
"public",
"boolean",
"isLinked",
"(",
"ParaObject",
"obj",
",",
"ParaObject",
"toObj",
")",
"{",
"if",
"(",
"obj",
"==",
"null",
"||",
"obj",
".",
"getId",
"(",
")",
"==",
"null",
"||",
"toObj",
"==",
"null",
"||",
"toObj",
".",
"getId",
"(",
")",
... | Checks if a given object is linked to this one.
@param toObj the other object
@param obj the object to execute this method on
@return true if linked | [
"Checks",
"if",
"a",
"given",
"object",
"is",
"linked",
"to",
"this",
"one",
"."
] | train | https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1013-L1018 |
jbundle/jbundle | main/screen/src/main/java/org/jbundle/main/user/screen/UserGroupGridScreen.java | UserGroupGridScreen.doCommand | public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) {
"""
Process the command.
<br />Step 1 - Process the command if possible and return true if processed.
<br />Step 2 - If I can't process, pass to all children (with me as the source).
<br />Step 3 - If children didn't pr... | java | public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions)
{
if (strCommand.equalsIgnoreCase(MenuConstants.FORMDETAIL))
return (this.onForm(null, ScreenConstants.DETAIL_MODE, true, iCommandOptions, null) != null);
else if (strCommand.equalsIgnoreCase(UserG... | [
"public",
"boolean",
"doCommand",
"(",
"String",
"strCommand",
",",
"ScreenField",
"sourceSField",
",",
"int",
"iCommandOptions",
")",
"{",
"if",
"(",
"strCommand",
".",
"equalsIgnoreCase",
"(",
"MenuConstants",
".",
"FORMDETAIL",
")",
")",
"return",
"(",
"this"... | Process the command.
<br />Step 1 - Process the command if possible and return true if processed.
<br />Step 2 - If I can't process, pass to all children (with me as the source).
<br />Step 3 - If children didn't process, pass to parent (with me as the source).
<br />Note: Never pass to a parent or child that matches t... | [
"Process",
"the",
"command",
".",
"<br",
"/",
">",
"Step",
"1",
"-",
"Process",
"the",
"command",
"if",
"possible",
"and",
"return",
"true",
"if",
"processed",
".",
"<br",
"/",
">",
"Step",
"2",
"-",
"If",
"I",
"can",
"t",
"process",
"pass",
"to",
... | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/screen/src/main/java/org/jbundle/main/user/screen/UserGroupGridScreen.java#L96-L104 |
apache/spark | sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java | ThriftCLIService.getSessionHandle | SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res)
throws HiveSQLException, LoginException, IOException {
"""
Create a session handle
@param req
@param res
@return
@throws HiveSQLException
@throws LoginException
@throws IOException
"""
String userName = getUserName(req);
... | java | SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res)
throws HiveSQLException, LoginException, IOException {
String userName = getUserName(req);
String ipAddress = getIpAddress();
TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION,
req.getClient_protocol())... | [
"SessionHandle",
"getSessionHandle",
"(",
"TOpenSessionReq",
"req",
",",
"TOpenSessionResp",
"res",
")",
"throws",
"HiveSQLException",
",",
"LoginException",
",",
"IOException",
"{",
"String",
"userName",
"=",
"getUserName",
"(",
"req",
")",
";",
"String",
"ipAddres... | Create a session handle
@param req
@param res
@return
@throws HiveSQLException
@throws LoginException
@throws IOException | [
"Create",
"a",
"session",
"handle"
] | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java#L341-L359 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimSort.java | TimSort.mergeAt | private void mergeAt(int i) {
"""
Merges the two runs at stack indices i and i+1. Run i must be
the penultimate or antepenultimate run on the stack. In other words,
i must be equal to stackSize-2 or stackSize-3.
@param i stack index of the first of the two runs to merge
"""
assert stackSize >= 2... | java | private void mergeAt(int i) {
assert stackSize >= 2;
assert i >= 0;
assert i == stackSize - 2 || i == stackSize - 3;
int base1 = runBase[i];
int len1 = runLen[i];
int base2 = runBase[i + 1];
int len2 = runLen[i + 1];
assert len1 > 0 && len2 > 0;
a... | [
"private",
"void",
"mergeAt",
"(",
"int",
"i",
")",
"{",
"assert",
"stackSize",
">=",
"2",
";",
"assert",
"i",
">=",
"0",
";",
"assert",
"i",
"==",
"stackSize",
"-",
"2",
"||",
"i",
"==",
"stackSize",
"-",
"3",
";",
"int",
"base1",
"=",
"runBase",
... | Merges the two runs at stack indices i and i+1. Run i must be
the penultimate or antepenultimate run on the stack. In other words,
i must be equal to stackSize-2 or stackSize-3.
@param i stack index of the first of the two runs to merge | [
"Merges",
"the",
"two",
"runs",
"at",
"stack",
"indices",
"i",
"and",
"i",
"+",
"1",
".",
"Run",
"i",
"must",
"be",
"the",
"penultimate",
"or",
"antepenultimate",
"run",
"on",
"the",
"stack",
".",
"In",
"other",
"words",
"i",
"must",
"be",
"equal",
"... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimSort.java#L468-L517 |
google/error-prone | check_api/src/main/java/com/google/errorprone/matchers/Matchers.java | Matchers.isPrimitiveOrVoidType | public static <T extends Tree> Matcher<T> isPrimitiveOrVoidType() {
"""
Matches an AST node if its type is either a primitive type or a {@code void} type.
"""
return new Matcher<T>() {
@Override
public boolean matches(T t, VisitorState state) {
Type type = getType(t);
return typ... | java | public static <T extends Tree> Matcher<T> isPrimitiveOrVoidType() {
return new Matcher<T>() {
@Override
public boolean matches(T t, VisitorState state) {
Type type = getType(t);
return type != null && type.isPrimitiveOrVoid();
}
};
} | [
"public",
"static",
"<",
"T",
"extends",
"Tree",
">",
"Matcher",
"<",
"T",
">",
"isPrimitiveOrVoidType",
"(",
")",
"{",
"return",
"new",
"Matcher",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"T",
"t",
",",
"Vi... | Matches an AST node if its type is either a primitive type or a {@code void} type. | [
"Matches",
"an",
"AST",
"node",
"if",
"its",
"type",
"is",
"either",
"a",
"primitive",
"type",
"or",
"a",
"{"
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L486-L494 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getArrayLengthOfTheField | static int getArrayLengthOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
"""
Reads the length of the given array.
It does not validate if the current position is actually an array - has to be taken care of by the caller.
@param fd field of the array
@param in ... | java | static int getArrayLengthOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
int originalPos = in.position();
try {
int pos = getStreamPositionOfTheField(fd, in, offset);
in.position(pos);
return in.readInt();
} finally {
... | [
"static",
"int",
"getArrayLengthOfTheField",
"(",
"FieldDefinition",
"fd",
",",
"BufferObjectDataInput",
"in",
",",
"int",
"offset",
")",
"throws",
"IOException",
"{",
"int",
"originalPos",
"=",
"in",
".",
"position",
"(",
")",
";",
"try",
"{",
"int",
"pos",
... | Reads the length of the given array.
It does not validate if the current position is actually an array - has to be taken care of by the caller.
@param fd field of the array
@param in data input stream
@param offset offset to use while stream reading
@return length of the array
@throws IOException on any stream... | [
"Reads",
"the",
"length",
"of",
"the",
"given",
"array",
".",
"It",
"does",
"not",
"validate",
"if",
"the",
"current",
"position",
"is",
"actually",
"an",
"array",
"-",
"has",
"to",
"be",
"taken",
"care",
"of",
"by",
"the",
"caller",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L96-L105 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java | ClassDescriptor.getAttributeDescriptorsForPath | public ArrayList getAttributeDescriptorsForPath(String aPath, Map pathHints) {
"""
return all AttributeDescriptors for the path<br>
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors
(ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)<br>
ie: partner.addresses returns a C... | java | public ArrayList getAttributeDescriptorsForPath(String aPath, Map pathHints)
{
return getAttributeDescriptorsForCleanPath(SqlHelper.cleanPath(aPath), pathHints);
} | [
"public",
"ArrayList",
"getAttributeDescriptorsForPath",
"(",
"String",
"aPath",
",",
"Map",
"pathHints",
")",
"{",
"return",
"getAttributeDescriptorsForCleanPath",
"(",
"SqlHelper",
".",
"cleanPath",
"(",
"aPath",
")",
",",
"pathHints",
")",
";",
"}"
] | return all AttributeDescriptors for the path<br>
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors
(ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)<br>
ie: partner.addresses returns a Collection of 2 AttributeDescriptors
(ObjectReferenceDescriptor, CollectionDescriptor)
@para... | [
"return",
"all",
"AttributeDescriptors",
"for",
"the",
"path<br",
">",
"ie",
":",
"partner",
".",
"addresses",
".",
"street",
"returns",
"a",
"Collection",
"of",
"3",
"AttributeDescriptors",
"(",
"ObjectReferenceDescriptor",
"CollectionDescriptor",
"FieldDescriptor",
... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java#L1193-L1196 |
UrielCh/ovh-java-sdk | ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java | ApiOvhMe.debtAccount_debt_debtId_GET | public OvhDebt debtAccount_debt_debtId_GET(Long debtId) throws IOException {
"""
Get this object properties
REST: GET /me/debtAccount/debt/{debtId}
@param debtId [required]
"""
String qPath = "/me/debtAccount/debt/{debtId}";
StringBuilder sb = path(qPath, debtId);
String resp = exec(qPath, "GET", sb.... | java | public OvhDebt debtAccount_debt_debtId_GET(Long debtId) throws IOException {
String qPath = "/me/debtAccount/debt/{debtId}";
StringBuilder sb = path(qPath, debtId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhDebt.class);
} | [
"public",
"OvhDebt",
"debtAccount_debt_debtId_GET",
"(",
"Long",
"debtId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/me/debtAccount/debt/{debtId}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"debtId",
")",
";",
"String",
"re... | Get this object properties
REST: GET /me/debtAccount/debt/{debtId}
@param debtId [required] | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2745-L2750 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java | WSConnectionRequestInfoImpl.matchTypeMap | public static final boolean matchTypeMap(Map<String, Class<?>> m1, Map<String, Class<?>> m2) {
"""
determines if two typeMaps match. Note that this method takes under account
an Oracle 11g change with TypeMap
@param m1
@param m2
@return
"""
final boolean isTraceOn = TraceComponent.isAnyTracingEna... | java | public static final boolean matchTypeMap(Map<String, Class<?>> m1, Map<String, Class<?>> m2) {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "matchTypeMap", new Object[] { m1, m2 });
boolean match = false;
... | [
"public",
"static",
"final",
"boolean",
"matchTypeMap",
"(",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"m1",
",",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"m2",
")",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceCompon... | determines if two typeMaps match. Note that this method takes under account
an Oracle 11g change with TypeMap
@param m1
@param m2
@return | [
"determines",
"if",
"two",
"typeMaps",
"match",
".",
"Note",
"that",
"this",
"method",
"takes",
"under",
"account",
"an",
"Oracle",
"11g",
"change",
"with",
"TypeMap"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java#L676-L691 |
infinispan/infinispan | core/src/main/java/org/infinispan/atomic/AtomicMapLookup.java | AtomicMapLookup.removeAtomicMap | public static <MK> void removeAtomicMap(Cache<MK, ?> cache, MK key) {
"""
Removes the atomic map associated with the given key from the underlying cache.
@param cache underlying cache
@param key key under which the atomic map exists
@param <MK> key param of the cache
"""
// This removes any entry... | java | public static <MK> void removeAtomicMap(Cache<MK, ?> cache, MK key) {
// This removes any entry from the cache but includes special handling for fine-grained maps
FineGrainedAtomicMapProxyImpl.removeMap((Cache<Object, Object>) cache, key);
} | [
"public",
"static",
"<",
"MK",
">",
"void",
"removeAtomicMap",
"(",
"Cache",
"<",
"MK",
",",
"?",
">",
"cache",
",",
"MK",
"key",
")",
"{",
"// This removes any entry from the cache but includes special handling for fine-grained maps",
"FineGrainedAtomicMapProxyImpl",
"."... | Removes the atomic map associated with the given key from the underlying cache.
@param cache underlying cache
@param key key under which the atomic map exists
@param <MK> key param of the cache | [
"Removes",
"the",
"atomic",
"map",
"associated",
"with",
"the",
"given",
"key",
"from",
"the",
"underlying",
"cache",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/atomic/AtomicMapLookup.java#L131-L134 |
teatrove/teatrove | tea/src/main/java/org/teatrove/tea/util/FileCompilationProvider.java | FileCompilationProvider.createCompilationSource | @Override
public CompilationSource createCompilationSource(String name) {
"""
Always returns an instance of FileCompiler.Unit. Any errors reported
by the compiler that have a reference to a CompilationUnit will have
been created by this factory method. Casting this to FileCompiler.Unit
allows error reporter... | java | @Override
public CompilationSource createCompilationSource(String name) {
File sourceFile = getSourceFile(name);
if (sourceFile == null || !sourceFile.exists()) {
return null;
}
return new FileSource(name, sourceFile);
} | [
"@",
"Override",
"public",
"CompilationSource",
"createCompilationSource",
"(",
"String",
"name",
")",
"{",
"File",
"sourceFile",
"=",
"getSourceFile",
"(",
"name",
")",
";",
"if",
"(",
"sourceFile",
"==",
"null",
"||",
"!",
"sourceFile",
".",
"exists",
"(",
... | Always returns an instance of FileCompiler.Unit. Any errors reported
by the compiler that have a reference to a CompilationUnit will have
been created by this factory method. Casting this to FileCompiler.Unit
allows error reporters to access the source file via the getSourceFile
method.
@see FileCompilationProvider.Un... | [
"Always",
"returns",
"an",
"instance",
"of",
"FileCompiler",
".",
"Unit",
".",
"Any",
"errors",
"reported",
"by",
"the",
"compiler",
"that",
"have",
"a",
"reference",
"to",
"a",
"CompilationUnit",
"will",
"have",
"been",
"created",
"by",
"this",
"factory",
"... | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/util/FileCompilationProvider.java#L228-L236 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java | RunbookDraftsInner.beginPublishAsync | public Observable<Void> beginPublishAsync(String resourceGroupName, String automationAccountName, String runbookName) {
"""
Publish runbook draft.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param runbookName The parameters suppli... | java | public Observable<Void> beginPublishAsync(String resourceGroupName, String automationAccountName, String runbookName) {
return beginPublishWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).map(new Func1<ServiceResponseWithHeaders<Void, RunbookDraftPublishHeaders>, Void>() {
... | [
"public",
"Observable",
"<",
"Void",
">",
"beginPublishAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
",",
"String",
"runbookName",
")",
"{",
"return",
"beginPublishWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"automationA... | Publish runbook draft.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param runbookName The parameters supplied to the publish runbook operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the {@link Ser... | [
"Publish",
"runbook",
"draft",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java#L563-L570 |
google/closure-templates | java/src/com/google/template/soy/soytree/SoyTreeUtils.java | SoyTreeUtils.visitAllNodes | public static void visitAllNodes(Node node, NodeVisitor<? super Node, VisitDirective> visitor) {
"""
Runs the visitor on all nodes (including {@link ExprNode expr nodes}) reachable from the given
node. The order of visiting is breadth first.
<p>If the visitor return {@code false} from {@link NodeVisitor#exec(N... | java | public static void visitAllNodes(Node node, NodeVisitor<? super Node, VisitDirective> visitor) {
ArrayDeque<Node> queue = new ArrayDeque<>();
queue.add(node);
Node current;
while ((current = queue.poll()) != null) {
switch (visitor.exec(current)) {
case ABORT:
return;
cas... | [
"public",
"static",
"void",
"visitAllNodes",
"(",
"Node",
"node",
",",
"NodeVisitor",
"<",
"?",
"super",
"Node",
",",
"VisitDirective",
">",
"visitor",
")",
"{",
"ArrayDeque",
"<",
"Node",
">",
"queue",
"=",
"new",
"ArrayDeque",
"<>",
"(",
")",
";",
"que... | Runs the visitor on all nodes (including {@link ExprNode expr nodes}) reachable from the given
node. The order of visiting is breadth first.
<p>If the visitor return {@code false} from {@link NodeVisitor#exec(Node)} we will short
circuit visiting. | [
"Runs",
"the",
"visitor",
"on",
"all",
"nodes",
"(",
"including",
"{",
"@link",
"ExprNode",
"expr",
"nodes",
"}",
")",
"reachable",
"from",
"the",
"given",
"node",
".",
"The",
"order",
"of",
"visiting",
"is",
"breadth",
"first",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soytree/SoyTreeUtils.java#L106-L126 |
otto-de/edison-hal | src/main/java/de/otto/edison/hal/traverson/Traverson.java | Traverson.getResourceAs | public <T extends HalRepresentation> Optional<T> getResourceAs(final Class<T> type,
final EmbeddedTypeInfo embeddedTypeInfo,
final EmbeddedTypeInfo... moreEmbeddedTypeInfos) throws IOExc... | java | public <T extends HalRepresentation> Optional<T> getResourceAs(final Class<T> type,
final EmbeddedTypeInfo embeddedTypeInfo,
final EmbeddedTypeInfo... moreEmbeddedTypeInfos) throws IOExc... | [
"public",
"<",
"T",
"extends",
"HalRepresentation",
">",
"Optional",
"<",
"T",
">",
"getResourceAs",
"(",
"final",
"Class",
"<",
"T",
">",
"type",
",",
"final",
"EmbeddedTypeInfo",
"embeddedTypeInfo",
",",
"final",
"EmbeddedTypeInfo",
"...",
"moreEmbeddedTypeInfos... | Return the selected resource and return it in the specified type.
<p>
The EmbeddedTypeInfo is used to define the specific type of embedded items.
</p>
<p>
If there are multiple matching representations, the first node is returned.
</p>
@param type the subtype of the HalRepresentation used to parse the resource.
@param ... | [
"Return",
"the",
"selected",
"resource",
"and",
"return",
"it",
"in",
"the",
"specified",
"type",
".",
"<p",
">",
"The",
"EmbeddedTypeInfo",
"is",
"used",
"to",
"define",
"the",
"specific",
"type",
"of",
"embedded",
"items",
".",
"<",
"/",
"p",
">",
"<p"... | train | https://github.com/otto-de/edison-hal/blob/1582d2b49d1f0d9103e03bf742f18afa9d166992/src/main/java/de/otto/edison/hal/traverson/Traverson.java#L1140-L1151 |
BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java | EditorMapImpl.registerEditorsWithSubClasses | protected void registerEditorsWithSubClasses(PropertyEditor editor, Class<? extends BioPAXElement> domain) {
"""
This method registers an editor with sub classes - i.e. inserts the editor to the proper value in editor maps.
@param editor to be registered
@param domain a subclass of the editor's original domain.
... | java | protected void registerEditorsWithSubClasses(PropertyEditor editor, Class<? extends BioPAXElement> domain) {
for (Class<? extends BioPAXElement> c : classToEditorMap.keySet())
{
if (domain.isAssignableFrom(c)) {
//workaround for participants - can be replaced w/ a general
... | [
"protected",
"void",
"registerEditorsWithSubClasses",
"(",
"PropertyEditor",
"editor",
",",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
"domain",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
"c",
":",
"classToEditorMap",
".",... | This method registers an editor with sub classes - i.e. inserts the editor to the proper value in editor maps.
@param editor to be registered
@param domain a subclass of the editor's original domain. | [
"This",
"method",
"registers",
"an",
"editor",
"with",
"sub",
"classes",
"-",
"i",
".",
"e",
".",
"inserts",
"the",
"editor",
"to",
"the",
"proper",
"value",
"in",
"editor",
"maps",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java#L145-L170 |
aws/aws-sdk-java | aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/AdjustedRangeInputStream.java | AdjustedRangeInputStream.initializeForRead | private void initializeForRead(long rangeBeginning, long rangeEnd) throws IOException {
"""
Skip to the start location of the range of bytes desired by the user.
"""
// To get to the left-most byte desired by a user, we must skip over the 16 bytes of the
// preliminary cipher block, and then po... | java | private void initializeForRead(long rangeBeginning, long rangeEnd) throws IOException {
// To get to the left-most byte desired by a user, we must skip over the 16 bytes of the
// preliminary cipher block, and then possibly skip a few more bytes into the next block
// to where the the left-most ... | [
"private",
"void",
"initializeForRead",
"(",
"long",
"rangeBeginning",
",",
"long",
"rangeEnd",
")",
"throws",
"IOException",
"{",
"// To get to the left-most byte desired by a user, we must skip over the 16 bytes of the",
"// preliminary cipher block, and then possibly skip a few more b... | Skip to the start location of the range of bytes desired by the user. | [
"Skip",
"to",
"the",
"start",
"location",
"of",
"the",
"range",
"of",
"bytes",
"desired",
"by",
"the",
"user",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/AdjustedRangeInputStream.java#L52-L74 |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java | PLFIntegrator.appendChild | static Element appendChild(Element plfChild, Element parent, boolean copyChildren) {
"""
This method copies a plf node and any of its children into the passed in compViewParent.
"""
Document document = parent.getOwnerDocument();
Element copy = (Element) document.importNode(plfChild, false);
... | java | static Element appendChild(Element plfChild, Element parent, boolean copyChildren) {
Document document = parent.getOwnerDocument();
Element copy = (Element) document.importNode(plfChild, false);
parent.appendChild(copy);
// set the identifier for the doc if warrented
String id =... | [
"static",
"Element",
"appendChild",
"(",
"Element",
"plfChild",
",",
"Element",
"parent",
",",
"boolean",
"copyChildren",
")",
"{",
"Document",
"document",
"=",
"parent",
".",
"getOwnerDocument",
"(",
")",
";",
"Element",
"copy",
"=",
"(",
"Element",
")",
"d... | This method copies a plf node and any of its children into the passed in compViewParent. | [
"This",
"method",
"copies",
"a",
"plf",
"node",
"and",
"any",
"of",
"its",
"children",
"into",
"the",
"passed",
"in",
"compViewParent",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java#L208-L225 |
aws/aws-sdk-java | aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java | AmazonS3Client.resolveRequestEndpoint | private void resolveRequestEndpoint(Request<?> request, String bucketName, String key, URI endpoint) {
"""
Configure the given request with an endpoint and resource path based on the bucket name and
key provided
"""
ServiceEndpointBuilder builder = getBuilder(endpoint, endpoint.getScheme(), false);
... | java | private void resolveRequestEndpoint(Request<?> request, String bucketName, String key, URI endpoint) {
ServiceEndpointBuilder builder = getBuilder(endpoint, endpoint.getScheme(), false);
buildEndpointResolver(builder, bucketName, key).resolveRequestEndpoint(request);
} | [
"private",
"void",
"resolveRequestEndpoint",
"(",
"Request",
"<",
"?",
">",
"request",
",",
"String",
"bucketName",
",",
"String",
"key",
",",
"URI",
"endpoint",
")",
"{",
"ServiceEndpointBuilder",
"builder",
"=",
"getBuilder",
"(",
"endpoint",
",",
"endpoint",
... | Configure the given request with an endpoint and resource path based on the bucket name and
key provided | [
"Configure",
"the",
"given",
"request",
"with",
"an",
"endpoint",
"and",
"resource",
"path",
"based",
"on",
"the",
"bucket",
"name",
"and",
"key",
"provided"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L4663-L4666 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java | DESKeySpec.isParityAdjusted | public static boolean isParityAdjusted(byte[] key, int offset)
throws InvalidKeyException {
"""
Checks if the given DES key material, starting at <code>offset</code>
inclusive, is parity-adjusted.
@param key the buffer with the DES key material.
@param offset the offset in <code>key</code>, where the ... | java | public static boolean isParityAdjusted(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
throw new InvalidKeyException("null key");
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException("Wrong key size")... | [
"public",
"static",
"boolean",
"isParityAdjusted",
"(",
"byte",
"[",
"]",
"key",
",",
"int",
"offset",
")",
"throws",
"InvalidKeyException",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidKeyException",
"(",
"\"null key\"",
")",
";",
... | Checks if the given DES key material, starting at <code>offset</code>
inclusive, is parity-adjusted.
@param key the buffer with the DES key material.
@param offset the offset in <code>key</code>, where the DES key
material starts.
@return true if the given DES key material is parity-adjusted, false
otherwise.
@excep... | [
"Checks",
"if",
"the",
"given",
"DES",
"key",
"material",
"starting",
"at",
"<code",
">",
"offset<",
"/",
"code",
">",
"inclusive",
"is",
"parity",
"-",
"adjusted",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java#L186-L203 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/BarcodeCodabar.java | BarcodeCodabar.getBarsCodabar | public static byte[] getBarsCodabar(String text) {
"""
Creates the bars.
@param text the text to create the bars
@return the bars
"""
text = text.toUpperCase();
int len = text.length();
if (len < 2)
throw new IllegalArgumentException("Codabar must have at least a start and... | java | public static byte[] getBarsCodabar(String text) {
text = text.toUpperCase();
int len = text.length();
if (len < 2)
throw new IllegalArgumentException("Codabar must have at least a start and stop character.");
if (CHARS.indexOf(text.charAt(0)) < START_STOP_IDX || CHARS.indexO... | [
"public",
"static",
"byte",
"[",
"]",
"getBarsCodabar",
"(",
"String",
"text",
")",
"{",
"text",
"=",
"text",
".",
"toUpperCase",
"(",
")",
";",
"int",
"len",
"=",
"text",
".",
"length",
"(",
")",
";",
"if",
"(",
"len",
"<",
"2",
")",
"throw",
"n... | Creates the bars.
@param text the text to create the bars
@return the bars | [
"Creates",
"the",
"bars",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/BarcodeCodabar.java#L134-L151 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/form/FormModelFactory.java | FormModelFactory.createChildPageFormModel | public ValidatingFormModel createChildPageFormModel(HierarchicalFormModel parentModel, String childPageName,
String childFormObjectPropertyPath) {
"""
Create a child form model nested by this form model identified by the
provided name. The form object... | java | public ValidatingFormModel createChildPageFormModel(HierarchicalFormModel parentModel, String childPageName,
String childFormObjectPropertyPath) {
final ValueModel childValueModel = parentModel.getValueModel(childFormObjectPropertyPath);
ret... | [
"public",
"ValidatingFormModel",
"createChildPageFormModel",
"(",
"HierarchicalFormModel",
"parentModel",
",",
"String",
"childPageName",
",",
"String",
"childFormObjectPropertyPath",
")",
"{",
"final",
"ValueModel",
"childValueModel",
"=",
"parentModel",
".",
"getValueModel"... | Create a child form model nested by this form model identified by the
provided name. The form object associated with the created child model is
the value model at the specified parent property path.
@param parentModel the model to create the FormModelFactory in
@param childPageName the na... | [
"Create",
"a",
"child",
"form",
"model",
"nested",
"by",
"this",
"form",
"model",
"identified",
"by",
"the",
"provided",
"name",
".",
"The",
"form",
"object",
"associated",
"with",
"the",
"created",
"child",
"model",
"is",
"the",
"value",
"model",
"at",
"t... | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/FormModelFactory.java#L129-L133 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertex.java | ManagementGroupVertex.insertForwardEdge | void insertForwardEdge(final ManagementGroupEdge edge, final int index) {
"""
Inserts a new edge starting at this group vertex at the given index.
@param edge
the edge to be added
@param index
the index at which the edge shall be added
"""
while (index >= this.forwardEdges.size()) {
this.forwardEdg... | java | void insertForwardEdge(final ManagementGroupEdge edge, final int index) {
while (index >= this.forwardEdges.size()) {
this.forwardEdges.add(null);
}
this.forwardEdges.set(index, edge);
} | [
"void",
"insertForwardEdge",
"(",
"final",
"ManagementGroupEdge",
"edge",
",",
"final",
"int",
"index",
")",
"{",
"while",
"(",
"index",
">=",
"this",
".",
"forwardEdges",
".",
"size",
"(",
")",
")",
"{",
"this",
".",
"forwardEdges",
".",
"add",
"(",
"nu... | Inserts a new edge starting at this group vertex at the given index.
@param edge
the edge to be added
@param index
the index at which the edge shall be added | [
"Inserts",
"a",
"new",
"edge",
"starting",
"at",
"this",
"group",
"vertex",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertex.java#L127-L134 |
carewebframework/carewebframework-core | org.carewebframework.plugin-parent/org.carewebframework.plugin.infopanel/src/main/java/org/carewebframework/plugin/infopanel/controller/ActionListener.java | ActionListener.unbindActionListeners | public static void unbindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
"""
Unbinds all action listeners from the specified target.
@param target The action target.
@param actionListeners List of action listeners.
"""
if (actionListeners != null) {
for (Ac... | java | public static void unbindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
if (actionListeners != null) {
for (ActionListener listener : actionListeners) {
listener.unbind(target);
}
}
} | [
"public",
"static",
"void",
"unbindActionListeners",
"(",
"IActionTarget",
"target",
",",
"List",
"<",
"ActionListener",
">",
"actionListeners",
")",
"{",
"if",
"(",
"actionListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ActionListener",
"listener",
":",
"actio... | Unbinds all action listeners from the specified target.
@param target The action target.
@param actionListeners List of action listeners. | [
"Unbinds",
"all",
"action",
"listeners",
"from",
"the",
"specified",
"target",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.plugin-parent/org.carewebframework.plugin.infopanel/src/main/java/org/carewebframework/plugin/infopanel/controller/ActionListener.java#L71-L77 |
indeedeng/util | util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java | Quicksortables.popHeap | public static void popHeap(Quicksortable q, int size) {
"""
Pops the lowest element off the heap and stores it in the last element
@param q The quicksortable to heapify down.
@param size The size of the quicksortable.
"""
q.swap(0, size-1);
heapifyDown(q, 0, size-1);
} | java | public static void popHeap(Quicksortable q, int size) {
q.swap(0, size-1);
heapifyDown(q, 0, size-1);
} | [
"public",
"static",
"void",
"popHeap",
"(",
"Quicksortable",
"q",
",",
"int",
"size",
")",
"{",
"q",
".",
"swap",
"(",
"0",
",",
"size",
"-",
"1",
")",
";",
"heapifyDown",
"(",
"q",
",",
"0",
",",
"size",
"-",
"1",
")",
";",
"}"
] | Pops the lowest element off the heap and stores it in the last element
@param q The quicksortable to heapify down.
@param size The size of the quicksortable. | [
"Pops",
"the",
"lowest",
"element",
"off",
"the",
"heap",
"and",
"stores",
"it",
"in",
"the",
"last",
"element"
] | train | https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java#L330-L333 |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributePool.java | DBaseFileAttributePool.getCollection | @Pure
public static DBaseFileAttributeCollection getCollection(String resource, int recordNumber) {
"""
Get an attribute container that corresponds to the specified file
<p>The resource should be located according to the
{@link Class#getResource(String)} or
{@link Class#getResourceAsStream(String)} functions... | java | @Pure
public static DBaseFileAttributeCollection getCollection(String resource, int recordNumber) {
final DBaseFileAttributePool pool = getPool(resource);
if (pool != null) {
final DBaseFileAttributeAccessor accessor = pool.getAccessor(recordNumber);
if (accessor != null) {
return new DBaseFileAttributeC... | [
"@",
"Pure",
"public",
"static",
"DBaseFileAttributeCollection",
"getCollection",
"(",
"String",
"resource",
",",
"int",
"recordNumber",
")",
"{",
"final",
"DBaseFileAttributePool",
"pool",
"=",
"getPool",
"(",
"resource",
")",
";",
"if",
"(",
"pool",
"!=",
"nul... | Get an attribute container that corresponds to the specified file
<p>The resource should be located according to the
{@link Class#getResource(String)} or
{@link Class#getResourceAsStream(String)} functions.
@param resource is the resource to read
@param recordNumber is the index of the record inside the file ({@code ... | [
"Get",
"an",
"attribute",
"container",
"that",
"corresponds",
"to",
"the",
"specified",
"file"
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributePool.java#L299-L309 |
stephenc/simple-java-mail | src/main/java/org/codemonkey/simplejavamail/Email.java | Email.setFromAddress | public void setFromAddress(final String name, final String fromAddress) {
"""
Sets the sender address.
@param name The sender's name.
@param fromAddress The sender's email address.
"""
fromRecipient = new Recipient(name, fromAddress, null);
} | java | public void setFromAddress(final String name, final String fromAddress) {
fromRecipient = new Recipient(name, fromAddress, null);
} | [
"public",
"void",
"setFromAddress",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"fromAddress",
")",
"{",
"fromRecipient",
"=",
"new",
"Recipient",
"(",
"name",
",",
"fromAddress",
",",
"null",
")",
";",
"}"
] | Sets the sender address.
@param name The sender's name.
@param fromAddress The sender's email address. | [
"Sets",
"the",
"sender",
"address",
"."
] | train | https://github.com/stephenc/simple-java-mail/blob/8c5897e6bbc23c11e7c7eb5064f407625c653923/src/main/java/org/codemonkey/simplejavamail/Email.java#L64-L66 |
Erudika/para | para-server/src/main/java/com/erudika/para/rest/RestUtils.java | RestUtils.getPagerFromParams | public static Pager getPagerFromParams(MultivaluedMap<String, String> params) {
"""
Returns a {@link Pager} instance populated from request parameters.
@param params query params map
@return a Pager
"""
Pager pager = new Pager();
pager.setPage(NumberUtils.toLong(paramOrDefault(params, "page", ""), 0));
... | java | public static Pager getPagerFromParams(MultivaluedMap<String, String> params) {
Pager pager = new Pager();
pager.setPage(NumberUtils.toLong(paramOrDefault(params, "page", ""), 0));
if (pager.getPage() > Config.MAX_PAGES) {
pager.setPage(Config.MAX_PAGES);
}
pager.setLimit(NumberUtils.toInt(paramOrDefault(p... | [
"public",
"static",
"Pager",
"getPagerFromParams",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"params",
")",
"{",
"Pager",
"pager",
"=",
"new",
"Pager",
"(",
")",
";",
"pager",
".",
"setPage",
"(",
"NumberUtils",
".",
"toLong",
"(",
"paramOr... | Returns a {@link Pager} instance populated from request parameters.
@param params query params map
@return a Pager | [
"Returns",
"a",
"{"
] | train | https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/rest/RestUtils.java#L898-L912 |
skyscreamer/JSONassert | src/main/java/org/skyscreamer/jsonassert/JSONAssert.java | JSONAssert.assertNotEquals | public static void assertNotEquals(String expectedStr, String actualStr, JSONCompareMode compareMode)
throws JSONException {
"""
Asserts that the JSONArray provided does not match the expected string. If it is it throws an
{@link AssertionError}.
@param expectedStr Expected JSON string
@param act... | java | public static void assertNotEquals(String expectedStr, String actualStr, JSONCompareMode compareMode)
throws JSONException {
assertNotEquals("", expectedStr, actualStr, compareMode);
} | [
"public",
"static",
"void",
"assertNotEquals",
"(",
"String",
"expectedStr",
",",
"String",
"actualStr",
",",
"JSONCompareMode",
"compareMode",
")",
"throws",
"JSONException",
"{",
"assertNotEquals",
"(",
"\"\"",
",",
"expectedStr",
",",
"actualStr",
",",
"compareMo... | Asserts that the JSONArray provided does not match the expected string. If it is it throws an
{@link AssertionError}.
@param expectedStr Expected JSON string
@param actualStr String to compare
@param compareMode Specifies which comparison mode to use
@throws JSONException JSON parsing error | [
"Asserts",
"that",
"the",
"JSONArray",
"provided",
"does",
"not",
"match",
"the",
"expected",
"string",
".",
"If",
"it",
"is",
"it",
"throws",
"an",
"{",
"@link",
"AssertionError",
"}",
"."
] | train | https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L430-L433 |
briandilley/jsonrpc4j | src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java | JsonRpcClient.invokeNotification | public void invokeNotification(String methodName, Object argument, OutputStream output) throws IOException {
"""
Invokes the given method on the remote service passing
the given argument without reading or expecting a return
response.
@param methodName the method to invoke
@param argument the argument to p... | java | public void invokeNotification(String methodName, Object argument, OutputStream output) throws IOException {
writeRequest(methodName, argument, output, null);
output.flush();
} | [
"public",
"void",
"invokeNotification",
"(",
"String",
"methodName",
",",
"Object",
"argument",
",",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"writeRequest",
"(",
"methodName",
",",
"argument",
",",
"output",
",",
"null",
")",
";",
"output",
... | Invokes the given method on the remote service passing
the given argument without reading or expecting a return
response.
@param methodName the method to invoke
@param argument the argument to pass to the method
@param output the {@link OutputStream} to write to
@throws IOException on error
@see #writeRequest(St... | [
"Invokes",
"the",
"given",
"method",
"on",
"the",
"remote",
"service",
"passing",
"the",
"given",
"argument",
"without",
"reading",
"or",
"expecting",
"a",
"return",
"response",
"."
] | train | https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java#L501-L504 |
JM-Lab/utils-elasticsearch | src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchDelete.java | JMElasticsearchDelete.deleteDoc | public DeleteResponse deleteDoc(String index, String type, String id) {
"""
Delete doc delete response.
@param index the index
@param type the type
@param id the id
@return the delete response
"""
return deleteQuery(esClient.prepareDelete(index, type, id));
} | java | public DeleteResponse deleteDoc(String index, String type, String id) {
return deleteQuery(esClient.prepareDelete(index, type, id));
} | [
"public",
"DeleteResponse",
"deleteDoc",
"(",
"String",
"index",
",",
"String",
"type",
",",
"String",
"id",
")",
"{",
"return",
"deleteQuery",
"(",
"esClient",
".",
"prepareDelete",
"(",
"index",
",",
"type",
",",
"id",
")",
")",
";",
"}"
] | Delete doc delete response.
@param index the index
@param type the type
@param id the id
@return the delete response | [
"Delete",
"doc",
"delete",
"response",
"."
] | train | https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchDelete.java#L58-L60 |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/EncodingUtilsImpl.java | EncodingUtilsImpl.extractLocales | private List<Locale> extractLocales(List<List<String>> allLangs) {
"""
Extract the locales from a passed in language list.
@param allLangs
@return List<Locale>
"""
List<Locale> rc = new ArrayList<Locale>();
for (List<String> langList : allLangs) {
for (String language : langList... | java | private List<Locale> extractLocales(List<List<String>> allLangs) {
List<Locale> rc = new ArrayList<Locale>();
for (List<String> langList : allLangs) {
for (String language : langList) {
String country = "";
String variant = "";
int countryIndex... | [
"private",
"List",
"<",
"Locale",
">",
"extractLocales",
"(",
"List",
"<",
"List",
"<",
"String",
">",
">",
"allLangs",
")",
"{",
"List",
"<",
"Locale",
">",
"rc",
"=",
"new",
"ArrayList",
"<",
"Locale",
">",
"(",
")",
";",
"for",
"(",
"List",
"<",... | Extract the locales from a passed in language list.
@param allLangs
@return List<Locale> | [
"Extract",
"the",
"locales",
"from",
"a",
"passed",
"in",
"language",
"list",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/EncodingUtilsImpl.java#L264-L287 |
udoprog/ffwd-client-java | src/main/java/com/google/protobuf250/CodedOutputStream.java | CodedOutputStream.computeStringSizeNoTag | public static int computeStringSizeNoTag(final String value) {
"""
Compute the number of bytes that would be needed to encode a
{@code string} field.
"""
try {
final byte[] bytes = value.getBytes("UTF-8");
return computeRawVarint32Size(bytes.length) +
bytes.length;
} catch (Un... | java | public static int computeStringSizeNoTag(final String value) {
try {
final byte[] bytes = value.getBytes("UTF-8");
return computeRawVarint32Size(bytes.length) +
bytes.length;
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 not supported.", e);
}
... | [
"public",
"static",
"int",
"computeStringSizeNoTag",
"(",
"final",
"String",
"value",
")",
"{",
"try",
"{",
"final",
"byte",
"[",
"]",
"bytes",
"=",
"value",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
";",
"return",
"computeRawVarint32Size",
"(",
"bytes",
".",
... | Compute the number of bytes that would be needed to encode a
{@code string} field. | [
"Compute",
"the",
"number",
"of",
"bytes",
"that",
"would",
"be",
"needed",
"to",
"encode",
"a",
"{"
] | train | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/CodedOutputStream.java#L713-L721 |
haifengl/smile | data/src/main/java/smile/data/SparseDataset.java | SparseDataset.get | public double get(int i, int j) {
"""
Returns the value at entry (i, j).
@param i the row index.
@param j the column index.
"""
if (i < 0 || i >= size() || j < 0 || j >= ncols()) {
throw new IllegalArgumentException("Invalid index: i = " + i + " j = " + j);
}
for (SparseA... | java | public double get(int i, int j) {
if (i < 0 || i >= size() || j < 0 || j >= ncols()) {
throw new IllegalArgumentException("Invalid index: i = " + i + " j = " + j);
}
for (SparseArray.Entry e : get(i).x) {
if (e.i == j) {
return e.x;
}
... | [
"public",
"double",
"get",
"(",
"int",
"i",
",",
"int",
"j",
")",
"{",
"if",
"(",
"i",
"<",
"0",
"||",
"i",
">=",
"size",
"(",
")",
"||",
"j",
"<",
"0",
"||",
"j",
">=",
"ncols",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Returns the value at entry (i, j).
@param i the row index.
@param j the column index. | [
"Returns",
"the",
"value",
"at",
"entry",
"(",
"i",
"j",
")",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/data/src/main/java/smile/data/SparseDataset.java#L313-L325 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java | Gen.binaryQualifier | Symbol binaryQualifier(Symbol sym, Type site) {
"""
Construct a symbol to reflect the qualifying type that should
appear in the byte code as per JLS 13.1.
For {@literal target >= 1.2}: Clone a method with the qualifier as owner (except
for those cases where we need to work around VM bugs).
For {@literal ta... | java | Symbol binaryQualifier(Symbol sym, Type site) {
if (site.hasTag(ARRAY)) {
if (sym == syms.lengthVar ||
sym.owner != syms.arrayClass)
return sym;
// array clone can be qualified by the array type in later targets
Symbol qualifier = new ClassSym... | [
"Symbol",
"binaryQualifier",
"(",
"Symbol",
"sym",
",",
"Type",
"site",
")",
"{",
"if",
"(",
"site",
".",
"hasTag",
"(",
"ARRAY",
")",
")",
"{",
"if",
"(",
"sym",
"==",
"syms",
".",
"lengthVar",
"||",
"sym",
".",
"owner",
"!=",
"syms",
".",
"arrayC... | Construct a symbol to reflect the qualifying type that should
appear in the byte code as per JLS 13.1.
For {@literal target >= 1.2}: Clone a method with the qualifier as owner (except
for those cases where we need to work around VM bugs).
For {@literal target <= 1.1}: If qualified variable or method is defined in a
n... | [
"Construct",
"a",
"symbol",
"to",
"reflect",
"the",
"qualifying",
"type",
"that",
"should",
"appear",
"in",
"the",
"byte",
"code",
"as",
"per",
"JLS",
"13",
".",
"1",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L222-L245 |
OpenLiberty/open-liberty | dev/com.ibm.websphere.security.wim.base/src/com/ibm/wsspi/security/wim/model/Group.java | Group.setExtendedProperty | private void setExtendedProperty(String property, Object value) {
"""
Set an extended property's value.
@param property The property to set.
@param value The value to set.
@throws ClassCastException If the value was not of the correct data type.
"""
String dataType = extendedPropertiesDataType.get... | java | private void setExtendedProperty(String property, Object value) {
String dataType = extendedPropertiesDataType.get(property);
String valueClass = value.getClass().getSimpleName();
if (dataType.equals(valueClass) && !extendedMultiValuedProperties.contains(property)) {
extendedPropert... | [
"private",
"void",
"setExtendedProperty",
"(",
"String",
"property",
",",
"Object",
"value",
")",
"{",
"String",
"dataType",
"=",
"extendedPropertiesDataType",
".",
"get",
"(",
"property",
")",
";",
"String",
"valueClass",
"=",
"value",
".",
"getClass",
"(",
"... | Set an extended property's value.
@param property The property to set.
@param value The value to set.
@throws ClassCastException If the value was not of the correct data type. | [
"Set",
"an",
"extended",
"property",
"s",
"value",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security.wim.base/src/com/ibm/wsspi/security/wim/model/Group.java#L790-L812 |
jhalterman/failsafe | src/main/java/net/jodah/failsafe/FailsafeExecutor.java | FailsafeExecutor.getStageAsyncExecution | public <T extends R> CompletableFuture<T> getStageAsyncExecution(
AsyncSupplier<? extends CompletionStage<T>> supplier) {
"""
Executes the {@code supplier} asynchronously until the resulting future is successfully completed or the configured
policies are exceeded. This method is intended for integration wit... | java | public <T extends R> CompletableFuture<T> getStageAsyncExecution(
AsyncSupplier<? extends CompletionStage<T>> supplier) {
return callAsync(execution -> Functions.asyncOfFutureExecution(supplier, execution), true);
} | [
"public",
"<",
"T",
"extends",
"R",
">",
"CompletableFuture",
"<",
"T",
">",
"getStageAsyncExecution",
"(",
"AsyncSupplier",
"<",
"?",
"extends",
"CompletionStage",
"<",
"T",
">",
">",
"supplier",
")",
"{",
"return",
"callAsync",
"(",
"execution",
"->",
"Fun... | Executes the {@code supplier} asynchronously until the resulting future is successfully completed or the configured
policies are exceeded. This method is intended for integration with asynchronous code. Retries must be manually
scheduled via one of the {@code AsyncExecution.retry} methods.
<p>
If a configured circuit b... | [
"Executes",
"the",
"{",
"@code",
"supplier",
"}",
"asynchronously",
"until",
"the",
"resulting",
"future",
"is",
"successfully",
"completed",
"or",
"the",
"configured",
"policies",
"are",
"exceeded",
".",
"This",
"method",
"is",
"intended",
"for",
"integration",
... | train | https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailsafeExecutor.java#L203-L206 |
javalite/activejdbc | activejdbc/src/main/java/org/javalite/activejdbc/MetaModel.java | MetaModel.getAssociationForTarget | public <A extends Association> A getAssociationForTarget(Class<? extends Model> targetModelClass, Class<A> associationClass) {
"""
Returns association of this table with the target table. Will return null if there is no association.
@param targetModelClass association of this model and the target model.
@param... | java | public <A extends Association> A getAssociationForTarget(Class<? extends Model> targetModelClass, Class<A> associationClass){
Association result = null;
for (Association association : associations) {
if (association.getClass().getName().equals(associationClass.getName()) && association.getTa... | [
"public",
"<",
"A",
"extends",
"Association",
">",
"A",
"getAssociationForTarget",
"(",
"Class",
"<",
"?",
"extends",
"Model",
">",
"targetModelClass",
",",
"Class",
"<",
"A",
">",
"associationClass",
")",
"{",
"Association",
"result",
"=",
"null",
";",
"for... | Returns association of this table with the target table. Will return null if there is no association.
@param targetModelClass association of this model and the target model.
@param associationClass class of association in requested.
@return association of this table with the target table. Will return null if there is ... | [
"Returns",
"association",
"of",
"this",
"table",
"with",
"the",
"target",
"table",
".",
"Will",
"return",
"null",
"if",
"there",
"is",
"no",
"association",
"."
] | train | https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/MetaModel.java#L292-L300 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.newPoolInstance | public void newPoolInstance(CmsParameterConfiguration configuration, String poolName) throws CmsInitException {
"""
Method to create a new instance of a pool.<p>
@param configuration the configurations from the propertyfile
@param poolName the configuration name of the pool
@throws CmsInitException if the p... | java | public void newPoolInstance(CmsParameterConfiguration configuration, String poolName) throws CmsInitException {
CmsDbPoolV11 pool;
try {
pool = new CmsDbPoolV11(configuration, poolName);
} catch (Exception e) {
CmsMessageContainer message = Messages.get().container(Mes... | [
"public",
"void",
"newPoolInstance",
"(",
"CmsParameterConfiguration",
"configuration",
",",
"String",
"poolName",
")",
"throws",
"CmsInitException",
"{",
"CmsDbPoolV11",
"pool",
";",
"try",
"{",
"pool",
"=",
"new",
"CmsDbPoolV11",
"(",
"configuration",
",",
"poolNa... | Method to create a new instance of a pool.<p>
@param configuration the configurations from the propertyfile
@param poolName the configuration name of the pool
@throws CmsInitException if the pools could not be initialized | [
"Method",
"to",
"create",
"a",
"new",
"instance",
"of",
"a",
"pool",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L6019-L6034 |
chr78rm/tracelogger | src/main/java/de/christofreichardt/diagnosis/QueueTracer.java | QueueTracer.logException | @Override
public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) {
"""
Delegates to the corresponding method of the wrapped tracer.
@param logLevel one of the predefined levels INFO, WARNING, ERROR, FATAL and SEVERE
@param throwable the to be logged throwable
@para... | java | @Override
public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) {
this.tracer.logException(logLevel, throwable, clazz, methodName);
} | [
"@",
"Override",
"public",
"void",
"logException",
"(",
"LogLevel",
"logLevel",
",",
"Throwable",
"throwable",
",",
"Class",
"clazz",
",",
"String",
"methodName",
")",
"{",
"this",
".",
"tracer",
".",
"logException",
"(",
"logLevel",
",",
"throwable",
",",
"... | Delegates to the corresponding method of the wrapped tracer.
@param logLevel one of the predefined levels INFO, WARNING, ERROR, FATAL and SEVERE
@param throwable the to be logged throwable
@param clazz the originating class
@param methodName the name of the relevant method | [
"Delegates",
"to",
"the",
"corresponding",
"method",
"of",
"the",
"wrapped",
"tracer",
"."
] | train | https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/QueueTracer.java#L205-L208 |
zxing/zxing | core/src/main/java/com/google/zxing/common/BitMatrix.java | BitMatrix.parse | public static BitMatrix parse(boolean[][] image) {
"""
Interprets a 2D array of booleans as a {@code BitMatrix}, where "true" means an "on" bit.
@param image bits of the image, as a row-major 2D array. Elements are arrays representing rows
@return {@code BitMatrix} representation of image
"""
int heigh... | java | public static BitMatrix parse(boolean[][] image) {
int height = image.length;
int width = image[0].length;
BitMatrix bits = new BitMatrix(width, height);
for (int i = 0; i < height; i++) {
boolean[] imageI = image[i];
for (int j = 0; j < width; j++) {
if (imageI[j]) {
bits.... | [
"public",
"static",
"BitMatrix",
"parse",
"(",
"boolean",
"[",
"]",
"[",
"]",
"image",
")",
"{",
"int",
"height",
"=",
"image",
".",
"length",
";",
"int",
"width",
"=",
"image",
"[",
"0",
"]",
".",
"length",
";",
"BitMatrix",
"bits",
"=",
"new",
"B... | Interprets a 2D array of booleans as a {@code BitMatrix}, where "true" means an "on" bit.
@param image bits of the image, as a row-major 2D array. Elements are arrays representing rows
@return {@code BitMatrix} representation of image | [
"Interprets",
"a",
"2D",
"array",
"of",
"booleans",
"as",
"a",
"{",
"@code",
"BitMatrix",
"}",
"where",
"true",
"means",
"an",
"on",
"bit",
"."
] | train | https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/common/BitMatrix.java#L81-L94 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLInverseObjectPropertiesAxiomImpl_CustomFieldSerializer.java | OWLInverseObjectPropertiesAxiomImpl_CustomFieldSerializer.serializeInstance | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLInverseObjectPropertiesAxiomImpl instance) throws SerializationException {
"""
Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link co... | java | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLInverseObjectPropertiesAxiomImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | [
"@",
"Override",
"public",
"void",
"serializeInstance",
"(",
"SerializationStreamWriter",
"streamWriter",
",",
"OWLInverseObjectPropertiesAxiomImpl",
"instance",
")",
"throws",
"SerializationException",
"{",
"serialize",
"(",
"streamWriter",
",",
"instance",
")",
";",
"}"... | Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the
object's content to
@param instance the object instance to serialize
@throws com.google.gwt.user.clie... | [
"Serializes",
"the",
"content",
"of",
"the",
"object",
"into",
"the",
"{",
"@link",
"com",
".",
"google",
".",
"gwt",
".",
"user",
".",
"client",
".",
"rpc",
".",
"SerializationStreamWriter",
"}",
"."
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLInverseObjectPropertiesAxiomImpl_CustomFieldSerializer.java#L75-L78 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/DescriptionElementParser.java | DescriptionElementParser.doParse | public static void doParse(Element element, BeanDefinitionBuilder builder) {
"""
Static parse method taking care of test action description.
@param element
@param builder
"""
Element descriptionElement = DomUtils.getChildElementByTagName(element, "description");
if (descriptionElement != null... | java | public static void doParse(Element element, BeanDefinitionBuilder builder) {
Element descriptionElement = DomUtils.getChildElementByTagName(element, "description");
if (descriptionElement != null) {
builder.addPropertyValue("description", DomUtils.getTextValue(descriptionElement).trim());
... | [
"public",
"static",
"void",
"doParse",
"(",
"Element",
"element",
",",
"BeanDefinitionBuilder",
"builder",
")",
"{",
"Element",
"descriptionElement",
"=",
"DomUtils",
".",
"getChildElementByTagName",
"(",
"element",
",",
"\"description\"",
")",
";",
"if",
"(",
"de... | Static parse method taking care of test action description.
@param element
@param builder | [
"Static",
"parse",
"method",
"taking",
"care",
"of",
"test",
"action",
"description",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/DescriptionElementParser.java#L41-L46 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/core/TransactionOutput.java | TransactionOutput.duplicateDetached | public TransactionOutput duplicateDetached() {
"""
Returns a copy of the output detached from its containing transaction, if need be.
"""
return new TransactionOutput(params, null, Coin.valueOf(value), Arrays.copyOf(scriptBytes, scriptBytes.length));
} | java | public TransactionOutput duplicateDetached() {
return new TransactionOutput(params, null, Coin.valueOf(value), Arrays.copyOf(scriptBytes, scriptBytes.length));
} | [
"public",
"TransactionOutput",
"duplicateDetached",
"(",
")",
"{",
"return",
"new",
"TransactionOutput",
"(",
"params",
",",
"null",
",",
"Coin",
".",
"valueOf",
"(",
"value",
")",
",",
"Arrays",
".",
"copyOf",
"(",
"scriptBytes",
",",
"scriptBytes",
".",
"l... | Returns a copy of the output detached from its containing transaction, if need be. | [
"Returns",
"a",
"copy",
"of",
"the",
"output",
"detached",
"from",
"its",
"containing",
"transaction",
"if",
"need",
"be",
"."
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/TransactionOutput.java#L405-L407 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_ovhPabx_serviceName_dialplan_dialplanId_PUT | public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_PUT(String billingAccount, String serviceName, Long dialplanId, OvhOvhPabxDialplan body) throws IOException {
"""
Alter this object properties
REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}
@param body [requir... | java | public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_PUT(String billingAccount, String serviceName, Long dialplanId, OvhOvhPabxDialplan body) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}";
StringBuilder sb = path(qPath, billingAccount, se... | [
"public",
"void",
"billingAccount_ovhPabx_serviceName_dialplan_dialplanId_PUT",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"dialplanId",
",",
"OvhOvhPabxDialplan",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/tele... | Alter this object properties
REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}
@param body [required] New object properties
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param dialplanId [required] | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7387-L7391 |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.core/src/com/ibm/ws/ffdc/FFDCFilter.java | FFDCFilter.processException | public static void processException(Throwable th, String sourceId, String probeId, Object callerThis) {
"""
Write a first failure data capture record for the provided throwable
@param th
The throwable
@param sourceId
An identifier for the source of this record, for example the package and class name
@param ... | java | public static void processException(Throwable th, String sourceId, String probeId, Object callerThis) {
FFDCConfigurator.getDelegate().processException(th, sourceId, probeId, callerThis);
} | [
"public",
"static",
"void",
"processException",
"(",
"Throwable",
"th",
",",
"String",
"sourceId",
",",
"String",
"probeId",
",",
"Object",
"callerThis",
")",
"{",
"FFDCConfigurator",
".",
"getDelegate",
"(",
")",
".",
"processException",
"(",
"th",
",",
"sour... | Write a first failure data capture record for the provided throwable
@param th
The throwable
@param sourceId
An identifier for the source of this record, for example the package and class name
@param probeId
A unique identifier within the source of this record, for example the source file line number
@param callerThis... | [
"Write",
"a",
"first",
"failure",
"data",
"capture",
"record",
"for",
"the",
"provided",
"throwable"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ws/ffdc/FFDCFilter.java#L59-L61 |
BlueBrain/bluima | modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java | Header.setPubTypeList | public void setPubTypeList(int i, PubType v) {
"""
indexed setter for pubTypeList - sets an indexed value - The list of the publication types, O
@generated
@param i index in the array to set
@param v value to set into the array
"""
if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeLis... | java | public void setPubTypeList(int i, PubType v) {
if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null)
jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).cas... | [
"public",
"void",
"setPubTypeList",
"(",
"int",
"i",
",",
"PubType",
"v",
")",
"{",
"if",
"(",
"Header_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"Header_Type",
")",
"jcasType",
")",
".",
"casFeat_pubTypeList",
"==",
"null",
")",
"jcasType",
".",
"jcas",
"... | indexed setter for pubTypeList - sets an indexed value - The list of the publication types, O
@generated
@param i index in the array to set
@param v value to set into the array | [
"indexed",
"setter",
"for",
"pubTypeList",
"-",
"sets",
"an",
"indexed",
"value",
"-",
"The",
"list",
"of",
"the",
"publication",
"types",
"O"
] | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Header.java#L292-L296 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/SavedState.java | SavedState.getString | public String getString(String nameOfField, String defaultValue) {
"""
Get the String at the given location
@param nameOfField location of string
@param defaultValue The value to return if the specified value hasn't been set
@return String stored at the location given
"""
String value = (String) string... | java | public String getString(String nameOfField, String defaultValue) {
String value = (String) stringData.get(nameOfField);
if (value == null) {
return defaultValue;
}
return value;
} | [
"public",
"String",
"getString",
"(",
"String",
"nameOfField",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"(",
"String",
")",
"stringData",
".",
"get",
"(",
"nameOfField",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"retur... | Get the String at the given location
@param nameOfField location of string
@param defaultValue The value to return if the specified value hasn't been set
@return String stored at the location given | [
"Get",
"the",
"String",
"at",
"the",
"given",
"location"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/SavedState.java#L110-L118 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.createFundamental | public static DMatrixRMaj createFundamental(DMatrixRMaj R, Vector3D_F64 T,
DMatrixRMaj K1, DMatrixRMaj K2, @Nullable DMatrixRMaj F ) {
"""
<p>
Computes an fudamental matrix from a rotation, translation, and calibration matrix. Motion
is from the first camera frame into the second camera frame.
</p... | java | public static DMatrixRMaj createFundamental(DMatrixRMaj R, Vector3D_F64 T,
DMatrixRMaj K1, DMatrixRMaj K2, @Nullable DMatrixRMaj F )
{
if( F == null )
F = new DMatrixRMaj(3,3);
else
F.reshape(3,3);
createEssential(R,T,F);
F.set(createFundamental(F,K1,K2));
return F;
} | [
"public",
"static",
"DMatrixRMaj",
"createFundamental",
"(",
"DMatrixRMaj",
"R",
",",
"Vector3D_F64",
"T",
",",
"DMatrixRMaj",
"K1",
",",
"DMatrixRMaj",
"K2",
",",
"@",
"Nullable",
"DMatrixRMaj",
"F",
")",
"{",
"if",
"(",
"F",
"==",
"null",
")",
"F",
"=",
... | <p>
Computes an fudamental matrix from a rotation, translation, and calibration matrix. Motion
is from the first camera frame into the second camera frame.
</p>
@param R Rotation matrix. first to second
@param T Translation vector. first to second
@param K1 Intrinsic camera calibration matrix for camera 1
@param K2 I... | [
"<p",
">",
"Computes",
"an",
"fudamental",
"matrix",
"from",
"a",
"rotation",
"translation",
"and",
"calibration",
"matrix",
".",
"Motion",
"is",
"from",
"the",
"first",
"camera",
"frame",
"into",
"the",
"second",
"camera",
"frame",
".",
"<",
"/",
"p",
">"... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L751-L762 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java | OpenStreetMapRenderer.encodeEnd | @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
"""
This methods generates the HTML code of the current b:openStreetMap.
<code>encodeBegin</code> generates the start of the component. After the, the
JSF framework calls <code>encodeChildren()</code> to generate t... | java | @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
OpenStreetMap openStreetMap = (OpenStreetMap) component;
ResponseWriter rw = context.getResponseWriter();
String clientIdRaw = openStreetMap.getClientId();
String cl... | [
"@",
"Override",
"public",
"void",
"encodeEnd",
"(",
"FacesContext",
"context",
",",
"UIComponent",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"component",
".",
"isRendered",
"(",
")",
")",
"{",
"return",
";",
"}",
"OpenStreetMap",
"open... | This methods generates the HTML code of the current b:openStreetMap.
<code>encodeBegin</code> generates the start of the component. After the, the
JSF framework calls <code>encodeChildren()</code> to generate the HTML code
between the beginning and the end of the component. For instance, in the case
of a panel componen... | [
"This",
"methods",
"generates",
"the",
"HTML",
"code",
"of",
"the",
"current",
"b",
":",
"openStreetMap",
".",
"<code",
">",
"encodeBegin<",
"/",
"code",
">",
"generates",
"the",
"start",
"of",
"the",
"component",
".",
"After",
"the",
"the",
"JSF",
"framew... | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java#L90-L135 |
jronrun/benayn | benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java | Uris.getParametersFromMap | private static Iterable<String> getParametersFromMap(final Map<String, String> paramMap, final boolean strict) {
"""
/* Returns a set of parameters for the given map - escaping the values as needed
"""
return Iterables.transform(paramMap.entrySet(), new Function<Map.Entry<String, String>, String>() {
... | java | private static Iterable<String> getParametersFromMap(final Map<String, String> paramMap, final boolean strict) {
return Iterables.transform(paramMap.entrySet(), new Function<Map.Entry<String, String>, String>() {
@Override public String apply(final Map.Entry<String, String> input) {
... | [
"private",
"static",
"Iterable",
"<",
"String",
">",
"getParametersFromMap",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"paramMap",
",",
"final",
"boolean",
"strict",
")",
"{",
"return",
"Iterables",
".",
"transform",
"(",
"paramMap",
".",
"entr... | /* Returns a set of parameters for the given map - escaping the values as needed | [
"/",
"*",
"Returns",
"a",
"set",
"of",
"parameters",
"for",
"the",
"given",
"map",
"-",
"escaping",
"the",
"values",
"as",
"needed"
] | train | https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L357-L364 |
gliga/ekstazi | org.ekstazi.core/src/main/java/org/ekstazi/agent/EkstaziCFT.java | EkstaziCFT.saveClassfileBufferForDebugging | @SuppressWarnings("unused")
private void saveClassfileBufferForDebugging(String className, byte[] classfileBuffer) {
"""
This method is for debugging purposes. So far one of the best way to
debug instrumentation was to actually look at the instrumented code. This
method let us choose which class to print.
... | java | @SuppressWarnings("unused")
private void saveClassfileBufferForDebugging(String className, byte[] classfileBuffer) {
try {
if (className.contains("CX")) {
java.io.DataOutputStream tmpout = new java.io.DataOutputStream(new java.io.FileOutputStream("out"));
tmpout.w... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"void",
"saveClassfileBufferForDebugging",
"(",
"String",
"className",
",",
"byte",
"[",
"]",
"classfileBuffer",
")",
"{",
"try",
"{",
"if",
"(",
"className",
".",
"contains",
"(",
"\"CX\"",
")",
")",... | This method is for debugging purposes. So far one of the best way to
debug instrumentation was to actually look at the instrumented code. This
method let us choose which class to print.
@param className
Name of the class being instrumented.
@param classfileBuffer
Byte array with the instrumented class content. | [
"This",
"method",
"is",
"for",
"debugging",
"purposes",
".",
"So",
"far",
"one",
"of",
"the",
"best",
"way",
"to",
"debug",
"instrumentation",
"was",
"to",
"actually",
"look",
"at",
"the",
"instrumented",
"code",
".",
"This",
"method",
"let",
"us",
"choose... | train | https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/agent/EkstaziCFT.java#L264-L275 |
Azure/azure-sdk-for-java | hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java | ClustersInner.resizeAsync | public Observable<Void> resizeAsync(String resourceGroupName, String clusterName) {
"""
Resizes the specified HDInsight cluster to the specified size.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgumentException thrown if parameters fail... | java | public Observable<Void> resizeAsync(String resourceGroupName, String clusterName) {
return resizeWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return res... | [
"public",
"Observable",
"<",
"Void",
">",
"resizeAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
")",
"{",
"return",
"resizeWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"clusterName",
")",
".",
"map",
"(",
"new",
"Func1",
"<"... | Resizes the specified HDInsight cluster to the specified size.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable for the request | [
"Resizes",
"the",
"specified",
"HDInsight",
"cluster",
"to",
"the",
"specified",
"size",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L889-L896 |
joniles/mpxj | src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java | AbstractVarMeta.getOffset | @Override public Integer getOffset(Integer id, Integer type) {
"""
This method retrieves the offset of a given entry in the Var2Data block.
Each entry can be uniquely located by the identifier of the object to
which the data belongs, and the type of the data.
@param id unique identifier of an entity
@param t... | java | @Override public Integer getOffset(Integer id, Integer type)
{
Integer result = null;
Map<Integer, Integer> map = m_table.get(id);
if (map != null && type != null)
{
result = map.get(type);
}
return (result);
} | [
"@",
"Override",
"public",
"Integer",
"getOffset",
"(",
"Integer",
"id",
",",
"Integer",
"type",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"map",
"=",
"m_table",
".",
"get",
"(",
"id",
")",
";",
"if"... | This method retrieves the offset of a given entry in the Var2Data block.
Each entry can be uniquely located by the identifier of the object to
which the data belongs, and the type of the data.
@param id unique identifier of an entity
@param type data type identifier
@return offset of requested item | [
"This",
"method",
"retrieves",
"the",
"offset",
"of",
"a",
"given",
"entry",
"in",
"the",
"Var2Data",
"block",
".",
"Each",
"entry",
"can",
"be",
"uniquely",
"located",
"by",
"the",
"identifier",
"of",
"the",
"object",
"to",
"which",
"the",
"data",
"belong... | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java#L102-L113 |
unic/neba | core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java | FieldValueMappingCallback.resolvePropertyTypedValueFromForeignResource | private <T> T resolvePropertyTypedValueFromForeignResource(FieldData field, Class<T> propertyType) {
"""
Resolves a property via a property {@link Resource}. This is used to retrieve relative or absolute references to
the properties of resources other than the current resource. Such references cannot be reliably ... | java | private <T> T resolvePropertyTypedValueFromForeignResource(FieldData field, Class<T> propertyType) {
Resource property = this.resource.getResourceResolver().getResource(this.resource, field.path);
if (property == null) {
return null;
}
// Only adaptation to String-types is s... | [
"private",
"<",
"T",
">",
"T",
"resolvePropertyTypedValueFromForeignResource",
"(",
"FieldData",
"field",
",",
"Class",
"<",
"T",
">",
"propertyType",
")",
"{",
"Resource",
"property",
"=",
"this",
".",
"resource",
".",
"getResourceResolver",
"(",
")",
".",
"g... | Resolves a property via a property {@link Resource}. This is used to retrieve relative or absolute references to
the properties of resources other than the current resource. Such references cannot be reliably retrieved using a
resource's {@link ValueMap} as the value map may be <code>null</code> and does not support ac... | [
"Resolves",
"a",
"property",
"via",
"a",
"property",
"{",
"@link",
"Resource",
"}",
".",
"This",
"is",
"used",
"to",
"retrieve",
"relative",
"or",
"absolute",
"references",
"to",
"the",
"properties",
"of",
"resources",
"other",
"than",
"the",
"current",
"res... | train | https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java#L423-L446 |
ontop/ontop | engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitnessRewriter.java | TreeWitnessRewriter.isContainedIn | private static boolean isContainedIn(CQIE cq1, CQIE cq2) {
"""
Check if query cq1 is contained in cq2, syntactically. That is, if the
head of cq1 and cq2 are equal according to toString().equals and each
atom in cq2 is also in the body of cq1 (also by means of toString().equals().
"""
if (!cq2.getHea... | java | private static boolean isContainedIn(CQIE cq1, CQIE cq2) {
if (!cq2.getHead().equals(cq1.getHead()))
return false;
for (Function atom : cq2.getBody())
if (!cq1.getBody().contains(atom))
return false;
return true;
} | [
"private",
"static",
"boolean",
"isContainedIn",
"(",
"CQIE",
"cq1",
",",
"CQIE",
"cq2",
")",
"{",
"if",
"(",
"!",
"cq2",
".",
"getHead",
"(",
")",
".",
"equals",
"(",
"cq1",
".",
"getHead",
"(",
")",
")",
")",
"return",
"false",
";",
"for",
"(",
... | Check if query cq1 is contained in cq2, syntactically. That is, if the
head of cq1 and cq2 are equal according to toString().equals and each
atom in cq2 is also in the body of cq1 (also by means of toString().equals(). | [
"Check",
"if",
"query",
"cq1",
"is",
"contained",
"in",
"cq2",
"syntactically",
".",
"That",
"is",
"if",
"the",
"head",
"of",
"cq1",
"and",
"cq2",
"are",
"equal",
"according",
"to",
"toString",
"()",
".",
"equals",
"and",
"each",
"atom",
"in",
"cq2",
"... | train | https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitnessRewriter.java#L566-L575 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistriesInner.java | RegistriesInner.listPoliciesAsync | public Observable<RegistryPoliciesInner> listPoliciesAsync(String resourceGroupName, String registryName) {
"""
Lists the policies 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... | java | public Observable<RegistryPoliciesInner> listPoliciesAsync(String resourceGroupName, String registryName) {
return listPoliciesWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1<ServiceResponse<RegistryPoliciesInner>, RegistryPoliciesInner>() {
@Override
public Regis... | [
"public",
"Observable",
"<",
"RegistryPoliciesInner",
">",
"listPoliciesAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
")",
"{",
"return",
"listPoliciesWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"registryName",
")",
".",
"map",
... | Lists the policies 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
@return the observable to the Regis... | [
"Lists",
"the",
"policies",
"for",
"the",
"specified",
"container",
"registry",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistriesInner.java#L1516-L1523 |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.launchVM | @Inline(value = "VMCommandLine.launchVM(($1).getCanonicalName(), ($2))", imported = {
"""
Run a new VM with the class path of the current VM.
@param classToLaunch is the class to launch.
@param additionalParams is the list of additional parameters
@return the process that is running the new virtual machine, n... | java | @Inline(value = "VMCommandLine.launchVM(($1).getCanonicalName(), ($2))", imported = {VMCommandLine.class},
statementExpression = true)
public static Process launchVM(Class<?> classToLaunch, String... additionalParams) throws IOException {
return launchVM(classToLaunch.getCanonicalName(), additionalParams);
} | [
"@",
"Inline",
"(",
"value",
"=",
"\"VMCommandLine.launchVM(($1).getCanonicalName(), ($2))\"",
",",
"imported",
"=",
"{",
"VMCommandLine",
".",
"class",
"}",
",",
"statementExpression",
"=",
"true",
")",
"public",
"static",
"Process",
"launchVM",
"(",
"Class",
"<",
... | Run a new VM with the class path of the current VM.
@param classToLaunch is the class to launch.
@param additionalParams is the list of additional parameters
@return the process that is running the new virtual machine, neither <code>null</code>
@throws IOException when a IO error occurs. | [
"Run",
"a",
"new",
"VM",
"with",
"the",
"class",
"path",
"of",
"the",
"current",
"VM",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L280-L284 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java | StyleUtils.setFeatureStyle | public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) {
"""
Set the feature row style (icon or style) into the marker options
@param markerOptions marker options
@param featureStyleExtension feature style ex... | java | public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) {
return setFeatureStyle(markerOptions, featureStyleExtension, featureRow, density, null);
} | [
"public",
"static",
"boolean",
"setFeatureStyle",
"(",
"MarkerOptions",
"markerOptions",
",",
"FeatureStyleExtension",
"featureStyleExtension",
",",
"FeatureRow",
"featureRow",
",",
"float",
"density",
")",
"{",
"return",
"setFeatureStyle",
"(",
"markerOptions",
",",
"f... | Set the feature row style (icon or style) into the marker options
@param markerOptions marker options
@param featureStyleExtension feature style extension
@param featureRow feature row
@param density display density: {@link android.util.DisplayMetrics#density}
@return true if icon or s... | [
"Set",
"the",
"feature",
"row",
"style",
"(",
"icon",
"or",
"style",
")",
"into",
"the",
"marker",
"options"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L111-L113 |
osmdroid/osmdroid | osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java | TileSystem.getLatitudeFromY01 | public double getLatitudeFromY01(final double pY01, boolean wrapEnabled) {
"""
Converts a "Y01" value into latitude
"Y01" is a double between 0 and 1 for the whole latitude range
MaxLatitude:0 ... MinLatitude:1
@since 6.0.0
"""
final double latitude = getLatitudeFromY01(wrapEnabled ? Clip(pY01, 0, 1) : pY... | java | public double getLatitudeFromY01(final double pY01, boolean wrapEnabled) {
final double latitude = getLatitudeFromY01(wrapEnabled ? Clip(pY01, 0, 1) : pY01);
return wrapEnabled ? Clip(latitude, getMinLatitude(), getMaxLatitude()) : latitude;
} | [
"public",
"double",
"getLatitudeFromY01",
"(",
"final",
"double",
"pY01",
",",
"boolean",
"wrapEnabled",
")",
"{",
"final",
"double",
"latitude",
"=",
"getLatitudeFromY01",
"(",
"wrapEnabled",
"?",
"Clip",
"(",
"pY01",
",",
"0",
",",
"1",
")",
":",
"pY01",
... | Converts a "Y01" value into latitude
"Y01" is a double between 0 and 1 for the whole latitude range
MaxLatitude:0 ... MinLatitude:1
@since 6.0.0 | [
"Converts",
"a",
"Y01",
"value",
"into",
"latitude",
"Y01",
"is",
"a",
"double",
"between",
"0",
"and",
"1",
"for",
"the",
"whole",
"latitude",
"range",
"MaxLatitude",
":",
"0",
"...",
"MinLatitude",
":",
"1"
] | train | https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java#L505-L508 |
glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingFilter.java | StreamInterceptingFilter.interceptStream | public void interceptStream(int index, T stream) throws GuacamoleException {
"""
Intercept the stream having the given index, producing or consuming its
data as appropriate. The given stream object will automatically be closed
when the stream ends. If there is no stream having the given index, then
the stream o... | java | public void interceptStream(int index, T stream) throws GuacamoleException {
InterceptedStream<T> interceptedStream;
String indexString = Integer.toString(index);
// Atomically verify tunnel is open and add the given stream
synchronized (tunnel) {
// Do nothing if tunnel i... | [
"public",
"void",
"interceptStream",
"(",
"int",
"index",
",",
"T",
"stream",
")",
"throws",
"GuacamoleException",
"{",
"InterceptedStream",
"<",
"T",
">",
"interceptedStream",
";",
"String",
"indexString",
"=",
"Integer",
".",
"toString",
"(",
"index",
")",
"... | Intercept the stream having the given index, producing or consuming its
data as appropriate. The given stream object will automatically be closed
when the stream ends. If there is no stream having the given index, then
the stream object will be closed immediately. This function will block
until all data has been handle... | [
"Intercept",
"the",
"stream",
"having",
"the",
"given",
"index",
"producing",
"or",
"consuming",
"its",
"data",
"as",
"appropriate",
".",
"The",
"given",
"stream",
"object",
"will",
"automatically",
"be",
"closed",
"when",
"the",
"stream",
"ends",
".",
"If",
... | train | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingFilter.java#L185-L215 |
groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.waitForActivity | public boolean waitForActivity(String applicationName, String activityName, int retryTime) {
"""
Wait for activity to become active (by string)
@param applicationName
@param activityName
@param retryTime
"""
ComponentName componentName = new ComponentName(applicationName, activityName);
retu... | java | public boolean waitForActivity(String applicationName, String activityName, int retryTime) {
ComponentName componentName = new ComponentName(applicationName, activityName);
return waitForActivity(componentName, retryTime);
} | [
"public",
"boolean",
"waitForActivity",
"(",
"String",
"applicationName",
",",
"String",
"activityName",
",",
"int",
"retryTime",
")",
"{",
"ComponentName",
"componentName",
"=",
"new",
"ComponentName",
"(",
"applicationName",
",",
"activityName",
")",
";",
"return"... | Wait for activity to become active (by string)
@param applicationName
@param activityName
@param retryTime | [
"Wait",
"for",
"activity",
"to",
"become",
"active",
"(",
"by",
"string",
")"
] | train | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L180-L183 |
alkacon/opencms-core | src-setup/org/opencms/setup/CmsSetupBean.java | CmsSetupBean.getHtmlHelpIcon | public String getHtmlHelpIcon(String id, String pathPrefix) {
"""
Returns a help image icon tag to display a help text in the setup wizard.<p>
@param id the id of the desired help div
@param pathPrefix the path prefix to the image
@return the HTML part for the help icon or an empty String, if the part was not... | java | public String getHtmlHelpIcon(String id, String pathPrefix) {
String value = m_htmlProps.getProperty("C_HELP_IMG");
if (value == null) {
return "";
} else {
value = CmsStringUtil.substitute(value, "$replace$", id);
return CmsStringUtil.substitute(value, "$pat... | [
"public",
"String",
"getHtmlHelpIcon",
"(",
"String",
"id",
",",
"String",
"pathPrefix",
")",
"{",
"String",
"value",
"=",
"m_htmlProps",
".",
"getProperty",
"(",
"\"C_HELP_IMG\"",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"\"\"",
";"... | Returns a help image icon tag to display a help text in the setup wizard.<p>
@param id the id of the desired help div
@param pathPrefix the path prefix to the image
@return the HTML part for the help icon or an empty String, if the part was not found | [
"Returns",
"a",
"help",
"image",
"icon",
"tag",
"to",
"display",
"a",
"help",
"text",
"in",
"the",
"setup",
"wizard",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupBean.java#L906-L915 |
threerings/nenya | core/src/main/java/com/threerings/media/tile/TileSet.java | TileSet.getTile | public Tile getTile (int tileIndex, Colorizer rizer) {
"""
Creates a {@link Tile} object from this tileset corresponding to the specified tile id and
returns that tile. A null tile will never be returned, but one with an error image may be
returned if a problem occurs loading the underlying tileset image.
@pa... | java | public Tile getTile (int tileIndex, Colorizer rizer)
{
return getTile(tileIndex, getColorizations(tileIndex, rizer));
} | [
"public",
"Tile",
"getTile",
"(",
"int",
"tileIndex",
",",
"Colorizer",
"rizer",
")",
"{",
"return",
"getTile",
"(",
"tileIndex",
",",
"getColorizations",
"(",
"tileIndex",
",",
"rizer",
")",
")",
";",
"}"
] | Creates a {@link Tile} object from this tileset corresponding to the specified tile id and
returns that tile. A null tile will never be returned, but one with an error image may be
returned if a problem occurs loading the underlying tileset image.
@param tileIndex the index of the tile in the tileset. Tile indexes sta... | [
"Creates",
"a",
"{",
"@link",
"Tile",
"}",
"object",
"from",
"this",
"tileset",
"corresponding",
"to",
"the",
"specified",
"tile",
"id",
"and",
"returns",
"that",
"tile",
".",
"A",
"null",
"tile",
"will",
"never",
"be",
"returned",
"but",
"one",
"with",
... | train | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/TileSet.java#L184-L187 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.