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
JakeWharton/butterknife
butterknife-reflect/src/main/java/butterknife/ButterKnife.java
ButterKnife.validateReturnType
private static boolean validateReturnType(Method method, Class<?> expected) { """ Returns true when the return value should be propagated. Use a default otherwise. """ Class<?> returnType = method.getReturnType(); if (returnType == void.class) { return false; } if (returnType != expected)...
java
private static boolean validateReturnType(Method method, Class<?> expected) { Class<?> returnType = method.getReturnType(); if (returnType == void.class) { return false; } if (returnType != expected) { String expectedType = "'" + expected.getName() + "'"; if (expected != void.class) { ...
[ "private", "static", "boolean", "validateReturnType", "(", "Method", "method", ",", "Class", "<", "?", ">", "expected", ")", "{", "Class", "<", "?", ">", "returnType", "=", "method", ".", "getReturnType", "(", ")", ";", "if", "(", "returnType", "==", "vo...
Returns true when the return value should be propagated. Use a default otherwise.
[ "Returns", "true", "when", "the", "return", "value", "should", "be", "propagated", ".", "Use", "a", "default", "otherwise", "." ]
train
https://github.com/JakeWharton/butterknife/blob/0ead8a7b21620effcf78c728089fc16ae9d664c0/butterknife-reflect/src/main/java/butterknife/ButterKnife.java#L993-L1010
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.fetchPubkeysList
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
java
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
[ "public", "static", "PublicKeysListElement", "fetchPubkeysList", "(", "XMPPConnection", "connection", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "PubSubException", ".", "NotAPubSubNodeException", ",", "PubSubException", ".", ...
Consult the public key metadata node and fetch a list of all of our published OpenPGP public keys. @see <a href="https://xmpp.org/extensions/xep-0373.html#discover-pubkey-list"> XEP-0373 §4.3: Discovering Public Keys of a User</a> @param connection XMPP connection @return content of our metadata node. @throws Interr...
[ "Consult", "the", "public", "key", "metadata", "node", "and", "fetch", "a", "list", "of", "all", "of", "our", "published", "OpenPGP", "public", "keys", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L180-L184
aws/aws-sdk-java
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/TreeHashGenerator.java
TreeHashGenerator.calculateTreeHash
public static String calculateTreeHash(List<byte[]> checksums) throws AmazonClientException { """ Returns the hex encoded binary tree hash for the individual checksums given. The sums are assumed to have been generated from sequential 1MB portions of a larger file, with the possible exception of the last part, ...
java
public static String calculateTreeHash(List<byte[]> checksums) throws AmazonClientException { /* * The tree hash algorithm involves concatenating adjacent pairs of * individual checksums, then taking the checksum of the resulting bytes * and storing it, then recursing on this ne...
[ "public", "static", "String", "calculateTreeHash", "(", "List", "<", "byte", "[", "]", ">", "checksums", ")", "throws", "AmazonClientException", "{", "/*\r\n * The tree hash algorithm involves concatenating adjacent pairs of\r\n * individual checksums, then taking the...
Returns the hex encoded binary tree hash for the individual checksums given. The sums are assumed to have been generated from sequential 1MB portions of a larger file, with the possible exception of the last part, which may be less than a full MB. @return The combined hex encoded binary tree hash for the individual ch...
[ "Returns", "the", "hex", "encoded", "binary", "tree", "hash", "for", "the", "individual", "checksums", "given", ".", "The", "sums", "are", "assumed", "to", "have", "been", "generated", "from", "sequential", "1MB", "portions", "of", "a", "larger", "file", "wi...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/TreeHashGenerator.java#L112-L144
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionsInner.java
ConnectionsInner.updateAsync
public Observable<ConnectionInner> updateAsync(String resourceGroupName, String automationAccountName, String connectionName, ConnectionUpdateParameters parameters) { """ Update a connection. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation accou...
java
public Observable<ConnectionInner> updateAsync(String resourceGroupName, String automationAccountName, String connectionName, ConnectionUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, connectionName, parameters).map(new Func1<ServiceResponse<Connect...
[ "public", "Observable", "<", "ConnectionInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "connectionName", ",", "ConnectionUpdateParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAs...
Update a connection. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param connectionName The parameters supplied to the update a connection operation. @param parameters The parameters supplied to the update a connection operation. @throws Ill...
[ "Update", "a", "connection", "." ]
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/ConnectionsInner.java#L417-L424
UrielCh/ovh-java-sdk
ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java
ApiOvhMetrics.serviceName_token_POST
public OvhToken serviceName_token_POST(String serviceName, String description, OvhLabel[] labels, OvhPermissionEnum permission) throws IOException { """ Create a token REST: POST /metrics/{serviceName}/token @param description [required] Description for the new token @param labels [required] Labels for the ne...
java
public OvhToken serviceName_token_POST(String serviceName, String description, OvhLabel[] labels, OvhPermissionEnum permission) throws IOException { String qPath = "/metrics/{serviceName}/token"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "d...
[ "public", "OvhToken", "serviceName_token_POST", "(", "String", "serviceName", ",", "String", "description", ",", "OvhLabel", "[", "]", "labels", ",", "OvhPermissionEnum", "permission", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/metrics/{serviceName...
Create a token REST: POST /metrics/{serviceName}/token @param description [required] Description for the new token @param labels [required] Labels for the new token @param serviceName [required] Name of your service @param permission [required] Type of the new token. Read or Write API beta
[ "Create", "a", "token" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java#L214-L223
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.markdownToHtml
public String markdownToHtml(String markdownString) { """ Converts Markdown to HTML. @param markdownString Markdown @return HTML """ MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("md", markdownString); return getEntity(invokeGet("utils/md2html", params), String.cl...
java
public String markdownToHtml(String markdownString) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("md", markdownString); return getEntity(invokeGet("utils/md2html", params), String.class); }
[ "public", "String", "markdownToHtml", "(", "String", "markdownString", ")", "{", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "=", "new", "MultivaluedHashMap", "<>", "(", ")", ";", "params", ".", "putSingle", "(", "\"md\"", ",", "markdownStri...
Converts Markdown to HTML. @param markdownString Markdown @return HTML
[ "Converts", "Markdown", "to", "HTML", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1232-L1236
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java
DateBetween.create
public static DateBetween create(Date begin, Date end, boolean isAbs) { """ 创建<br> 在前的日期做为起始时间,在后的做为结束时间,间隔只保留绝对值正数 @param begin 起始时间 @param end 结束时间 @param isAbs 日期间隔是否只保留绝对值正数 @return {@link DateBetween} @since 3.2.3 """ return new DateBetween(begin, end, isAbs); }
java
public static DateBetween create(Date begin, Date end, boolean isAbs) { return new DateBetween(begin, end, isAbs); }
[ "public", "static", "DateBetween", "create", "(", "Date", "begin", ",", "Date", "end", ",", "boolean", "isAbs", ")", "{", "return", "new", "DateBetween", "(", "begin", ",", "end", ",", "isAbs", ")", ";", "}" ]
创建<br> 在前的日期做为起始时间,在后的做为结束时间,间隔只保留绝对值正数 @param begin 起始时间 @param end 结束时间 @param isAbs 日期间隔是否只保留绝对值正数 @return {@link DateBetween} @since 3.2.3
[ "创建<br", ">", "在前的日期做为起始时间,在后的做为结束时间,间隔只保留绝对值正数" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java#L44-L46
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.isPointOnMultiPolyline
public static boolean isPointOnMultiPolyline(LatLng point, MultiPolylineOptions multiPolyline, boolean geodesic, double tolerance) { """ Is the point on the multi polyline @param point point @param multiPolyline multi polyline @param geodesic geodesic check flag @param tolerance distance tol...
java
public static boolean isPointOnMultiPolyline(LatLng point, MultiPolylineOptions multiPolyline, boolean geodesic, double tolerance) { boolean near = false; for (PolylineOptions polyline : multiPolyline.getPolylineOptions()) { near = isPointOnPolyline(point, polyline, geodesic, tolerance); ...
[ "public", "static", "boolean", "isPointOnMultiPolyline", "(", "LatLng", "point", ",", "MultiPolylineOptions", "multiPolyline", ",", "boolean", "geodesic", ",", "double", "tolerance", ")", "{", "boolean", "near", "=", "false", ";", "for", "(", "PolylineOptions", "p...
Is the point on the multi polyline @param point point @param multiPolyline multi polyline @param geodesic geodesic check flag @param tolerance distance tolerance @return true if on the multi line
[ "Is", "the", "point", "on", "the", "multi", "polyline" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L338-L347
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java
ScriptModuleLoader.compileModule
protected void compileModule(Module module, Path moduleCompilationRoot) throws ScriptCompilationException, IOException { """ Compiles and links the scripts within the module by locating the correct compiler and delegating the compilation. the classes will be loaded into the module's classloader upon completion. ...
java
protected void compileModule(Module module, Path moduleCompilationRoot) throws ScriptCompilationException, IOException { // compile the script archive for the module, and inject the resultant classes into // the ModuleClassLoader ModuleClassLoader moduleClassLoader = module.getClassLoader(); ...
[ "protected", "void", "compileModule", "(", "Module", "module", ",", "Path", "moduleCompilationRoot", ")", "throws", "ScriptCompilationException", ",", "IOException", "{", "// compile the script archive for the module, and inject the resultant classes into", "// the ModuleClassLoader"...
Compiles and links the scripts within the module by locating the correct compiler and delegating the compilation. the classes will be loaded into the module's classloader upon completion. @param module module to be compiled @param moduleCompilationRoot the directory to store compiled classes in.
[ "Compiles", "and", "links", "the", "scripts", "within", "the", "module", "by", "locating", "the", "correct", "compiler", "and", "delegating", "the", "compilation", ".", "the", "classes", "will", "be", "loaded", "into", "the", "module", "s", "classloader", "upo...
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java#L368-L385
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.writeDouble
public static final void writeDouble(double value, byte[] array, int offset) { """ Write value to byte array @param value @param array @param offset @see java.nio.ByteBuffer#putDouble(double) """ writeLong(Double.doubleToRawLongBits(value), array, offset); }
java
public static final void writeDouble(double value, byte[] array, int offset) { writeLong(Double.doubleToRawLongBits(value), array, offset); }
[ "public", "static", "final", "void", "writeDouble", "(", "double", "value", ",", "byte", "[", "]", "array", ",", "int", "offset", ")", "{", "writeLong", "(", "Double", ".", "doubleToRawLongBits", "(", "value", ")", ",", "array", ",", "offset", ")", ";", ...
Write value to byte array @param value @param array @param offset @see java.nio.ByteBuffer#putDouble(double)
[ "Write", "value", "to", "byte", "array" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L199-L202
thinkaurelius/titan
titan-es/src/main/java/com/thinkaurelius/titan/diskstorage/es/ElasticSearchIndex.java
ElasticSearchIndex.checkForOrCreateIndex
private void checkForOrCreateIndex(Configuration config) { """ If ES already contains this instance's target index, then do nothing. Otherwise, create the index, then wait {@link #CREATE_SLEEP}. <p> The {@code client} field must point to a live, connected client. The {@code indexName} field must be non-null an...
java
private void checkForOrCreateIndex(Configuration config) { Preconditions.checkState(null != client); //Create index if it does not already exist IndicesExistsResponse response = client.admin().indices().exists(new IndicesExistsRequest(indexName)).actionGet(); if (!response.isExists()) {...
[ "private", "void", "checkForOrCreateIndex", "(", "Configuration", "config", ")", "{", "Preconditions", ".", "checkState", "(", "null", "!=", "client", ")", ";", "//Create index if it does not already exist", "IndicesExistsResponse", "response", "=", "client", ".", "admi...
If ES already contains this instance's target index, then do nothing. Otherwise, create the index, then wait {@link #CREATE_SLEEP}. <p> The {@code client} field must point to a live, connected client. The {@code indexName} field must be non-null and point to the name of the index to check for existence or create. @par...
[ "If", "ES", "already", "contains", "this", "instance", "s", "target", "index", "then", "do", "nothing", ".", "Otherwise", "create", "the", "index", "then", "wait", "{", "@link", "#CREATE_SLEEP", "}", ".", "<p", ">", "The", "{", "@code", "client", "}", "f...
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-es/src/main/java/com/thinkaurelius/titan/diskstorage/es/ElasticSearchIndex.java#L217-L239
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dslTemplate
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, Object... args) { """ Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression """ return dslTemplate(cl, template, Immu...
java
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, Object... args) { return dslTemplate(cl, template, ImmutableList.copyOf(args)); }
[ "public", "static", "<", "T", ">", "DslTemplate", "<", "T", ">", "dslTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "Template", "template", ",", "Object", "...", "args", ")", "{", "return", "dslTemplate", "(", "cl", ",", "template",...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L359-L361
defei/codelogger-utils
src/main/java/org/codelogger/utils/DateUtils.java
DateUtils.getDateFormat
public static String getDateFormat(final Date date, final String pattern) { """ Format date by given pattern. @param date date to be handled. @param pattern pattern use to handle given date. @return a string object of format date by given pattern. """ SimpleDateFormat simpleDateFormat = buildDateForm...
java
public static String getDateFormat(final Date date, final String pattern) { SimpleDateFormat simpleDateFormat = buildDateFormat(pattern); return simpleDateFormat.format(date); }
[ "public", "static", "String", "getDateFormat", "(", "final", "Date", "date", ",", "final", "String", "pattern", ")", "{", "SimpleDateFormat", "simpleDateFormat", "=", "buildDateFormat", "(", "pattern", ")", ";", "return", "simpleDateFormat", ".", "format", "(", ...
Format date by given pattern. @param date date to be handled. @param pattern pattern use to handle given date. @return a string object of format date by given pattern.
[ "Format", "date", "by", "given", "pattern", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/DateUtils.java#L111-L115
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.fetchSnapshotTxnId
private void fetchSnapshotTxnId() { """ Get the txnId of the snapshot the cluster is restoring from from ZK. NOTE that the barrier for this is now completely contained in run() in the restorePlanner thread; nobody gets out of there until someone wins the leader election and successfully writes the VoltZK.restor...
java
private void fetchSnapshotTxnId() { try { byte[] data = m_zk.getData(VoltZK.restore_snapshot_id, false, null); String jsonData = new String(data, Constants.UTF8ENCODING); if (!jsonData.equals("{}")) { m_hasRestored = true; JSONObject jo = new ...
[ "private", "void", "fetchSnapshotTxnId", "(", ")", "{", "try", "{", "byte", "[", "]", "data", "=", "m_zk", ".", "getData", "(", "VoltZK", ".", "restore_snapshot_id", ",", "false", ",", "null", ")", ";", "String", "jsonData", "=", "new", "String", "(", ...
Get the txnId of the snapshot the cluster is restoring from from ZK. NOTE that the barrier for this is now completely contained in run() in the restorePlanner thread; nobody gets out of there until someone wins the leader election and successfully writes the VoltZK.restore_snapshot_id node, so we just need to read it h...
[ "Get", "the", "txnId", "of", "the", "snapshot", "the", "cluster", "is", "restoring", "from", "from", "ZK", ".", "NOTE", "that", "the", "barrier", "for", "this", "is", "now", "completely", "contained", "in", "run", "()", "in", "the", "restorePlanner", "thre...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L954-L975
CubeEngine/Dirigent
src/main/java/org/cubeengine/dirigent/builder/MessageBuilder.java
MessageBuilder.buildAny
protected final void buildAny(Component component, BuilderT builder, Context context) { """ Appends a Component to the builder @param component the component @param builder the builder @param context the context """ if (component instanceof ResolvedMacro) { buildResolved((Resol...
java
protected final void buildAny(Component component, BuilderT builder, Context context) { if (component instanceof ResolvedMacro) { buildResolved((ResolvedMacro)component, builder, context); } else if (component instanceof UnresolvableMacro) { buildUnres...
[ "protected", "final", "void", "buildAny", "(", "Component", "component", ",", "BuilderT", "builder", ",", "Context", "context", ")", "{", "if", "(", "component", "instanceof", "ResolvedMacro", ")", "{", "buildResolved", "(", "(", "ResolvedMacro", ")", "component...
Appends a Component to the builder @param component the component @param builder the builder @param context the context
[ "Appends", "a", "Component", "to", "the", "builder" ]
train
https://github.com/CubeEngine/Dirigent/blob/68587a8202754a6a6b629cc15e14c516806badaa/src/main/java/org/cubeengine/dirigent/builder/MessageBuilder.java#L80-L102
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.countByC_C
@Override public int countByC_C(long CPDefinitionId, String CPInstanceUuid) { """ Returns the number of cp instances where CPDefinitionId = &#63; and CPInstanceUuid = &#63;. @param CPDefinitionId the cp definition ID @param CPInstanceUuid the cp instance uuid @return the number of matching cp instances "...
java
@Override public int countByC_C(long CPDefinitionId, String CPInstanceUuid) { FinderPath finderPath = FINDER_PATH_COUNT_BY_C_C; Object[] finderArgs = new Object[] { CPDefinitionId, CPInstanceUuid }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler...
[ "@", "Override", "public", "int", "countByC_C", "(", "long", "CPDefinitionId", ",", "String", "CPInstanceUuid", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_C_C", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "...
Returns the number of cp instances where CPDefinitionId = &#63; and CPInstanceUuid = &#63;. @param CPDefinitionId the cp definition ID @param CPInstanceUuid the cp instance uuid @return the number of matching cp instances
[ "Returns", "the", "number", "of", "cp", "instances", "where", "CPDefinitionId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L4248-L4309
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java
ToHTMLStream.processAttribute
protected void processAttribute( java.io.Writer writer, String name, String value, ElemDesc elemDesc) throws IOException { """ Process an attribute. @param writer The writer to write the processed output to. @param name The name of the attribute. @param value Th...
java
protected void processAttribute( java.io.Writer writer, String name, String value, ElemDesc elemDesc) throws IOException { writer.write(' '); if ( ((value.length() == 0) || value.equalsIgnoreCase(name)) && elemDesc != null && elemDe...
[ "protected", "void", "processAttribute", "(", "java", ".", "io", ".", "Writer", "writer", ",", "String", "name", ",", "String", "value", ",", "ElemDesc", "elemDesc", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "'", "'", ")", ";", "if"...
Process an attribute. @param writer The writer to write the processed output to. @param name The name of the attribute. @param value The value of the attribute. @param elemDesc The description of the HTML element that has this attribute. @throws org.xml.sax.SAXException
[ "Process", "an", "attribute", ".", "@param", "writer", "The", "writer", "to", "write", "the", "processed", "output", "to", ".", "@param", "name", "The", "name", "of", "the", "attribute", ".", "@param", "value", "The", "value", "of", "the", "attribute", "."...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java#L1059-L1089
ecclesia/kipeto
kipeto-core/src/main/java/de/ecclesia/kipeto/repository/Blob.java
Blob.retrieveFromStream
public static <E extends Blob> E retrieveFromStream(String id, InputStream inputStream, Class<E> clazz) throws IOException { """ Erzeugt aus einem Roh-Stream (d.h. mit Header und ggf. Kompression) ein passendes Blob-Objekt. Wenn das Blob vom Typ <i>BLOB, DIR oder BLUEPRINT</i> ist, so wird eine korrekte Instan...
java
public static <E extends Blob> E retrieveFromStream(String id, InputStream inputStream, Class<E> clazz) throws IOException { logger.debug("trying to retrieve from Stream. id = {}, class = {}", id, clazz); DataInputStream dataInputStream = new DataInputStream(inputStream); byte binaryVersion = dataInputStream...
[ "public", "static", "<", "E", "extends", "Blob", ">", "E", "retrieveFromStream", "(", "String", "id", ",", "InputStream", "inputStream", ",", "Class", "<", "E", ">", "clazz", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"trying to retrie...
Erzeugt aus einem Roh-Stream (d.h. mit Header und ggf. Kompression) ein passendes Blob-Objekt. Wenn das Blob vom Typ <i>BLOB, DIR oder BLUEPRINT</i> ist, so wird eine korrekte Instanz der entsprechenden Klasse zurückgegeben. @param id Id, unter der das gewünschte Blob abgelegt wurde @return Blob-Objekt (z.B. Directory...
[ "Erzeugt", "aus", "einem", "Roh", "-", "Stream", "(", "d", ".", "h", ".", "mit", "Header", "und", "ggf", ".", "Kompression", ")", "ein", "passendes", "Blob", "-", "Objekt", ".", "Wenn", "das", "Blob", "vom", "Typ", "<i", ">", "BLOB", "DIR", "oder", ...
train
https://github.com/ecclesia/kipeto/blob/ea39a10ae4eaa550f71a856ab2f2845270a64913/kipeto-core/src/main/java/de/ecclesia/kipeto/repository/Blob.java#L171-L203
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/XmlConfigurer.java
XmlConfigurer.setParserConfigParameter
public void setParserConfigParameter(LSParser parser, String parameterName, Object value) { """ Sets a config parameter on LSParser instance if settable. Otherwise logging unset parameter. @param parser @param parameterName @param value """ if (parser.getDomConfig().canSetParameter(parameterName, va...
java
public void setParserConfigParameter(LSParser parser, String parameterName, Object value) { if (parser.getDomConfig().canSetParameter(parameterName, value)) { parser.getDomConfig().setParameter(parameterName, value); } else { logParameterNotSet(parameterName, "LSParser"); ...
[ "public", "void", "setParserConfigParameter", "(", "LSParser", "parser", ",", "String", "parameterName", ",", "Object", "value", ")", "{", "if", "(", "parser", ".", "getDomConfig", "(", ")", ".", "canSetParameter", "(", "parameterName", ",", "value", ")", ")",...
Sets a config parameter on LSParser instance if settable. Otherwise logging unset parameter. @param parser @param parameterName @param value
[ "Sets", "a", "config", "parameter", "on", "LSParser", "instance", "if", "settable", ".", "Otherwise", "logging", "unset", "parameter", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/XmlConfigurer.java#L218-L224
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.consent_campaignName_GET
public OvhCampaign consent_campaignName_GET(String campaignName) throws IOException { """ Retrieve information about a consent campaign REST: GET /me/consent/{campaignName} @param campaignName [required] Consent campaign name """ String qPath = "/me/consent/{campaignName}"; StringBuilder sb = path(qPat...
java
public OvhCampaign consent_campaignName_GET(String campaignName) throws IOException { String qPath = "/me/consent/{campaignName}"; StringBuilder sb = path(qPath, campaignName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhCampaign.class); }
[ "public", "OvhCampaign", "consent_campaignName_GET", "(", "String", "campaignName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/consent/{campaignName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "campaignName", ")", ";", "St...
Retrieve information about a consent campaign REST: GET /me/consent/{campaignName} @param campaignName [required] Consent campaign name
[ "Retrieve", "information", "about", "a", "consent", "campaign" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1549-L1554
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/records/converter/RecordReaderConverter.java
RecordReaderConverter.convert
public static void convert(SequenceRecordReader reader, SequenceRecordWriter writer) throws IOException { """ Write all sequences from the specified sequence record reader to the specified sequence record writer. Closes the sequence record writer on completion. @param reader Sequence record reader (source of d...
java
public static void convert(SequenceRecordReader reader, SequenceRecordWriter writer) throws IOException { convert(reader, writer, true); }
[ "public", "static", "void", "convert", "(", "SequenceRecordReader", "reader", ",", "SequenceRecordWriter", "writer", ")", "throws", "IOException", "{", "convert", "(", "reader", ",", "writer", ",", "true", ")", ";", "}" ]
Write all sequences from the specified sequence record reader to the specified sequence record writer. Closes the sequence record writer on completion. @param reader Sequence record reader (source of data) @param writer Sequence record writer (location to write data) @throws IOException If underlying reader/writer thr...
[ "Write", "all", "sequences", "from", "the", "specified", "sequence", "record", "reader", "to", "the", "specified", "sequence", "record", "writer", ".", "Closes", "the", "sequence", "record", "writer", "on", "completion", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/records/converter/RecordReaderConverter.java#L80-L82
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/collections/ImmutableMultitable.java
ImmutableMultitable.putAll
@Deprecated @Override public boolean putAll(final R rowKey, final C columnKey, final Iterable<? extends V> values) { """ Guaranteed to throw an exception and leave the table unmodified. @throws UnsupportedOperationException always @deprecated Unsupported operation. """ throw new UnsupportedOperatio...
java
@Deprecated @Override public boolean putAll(final R rowKey, final C columnKey, final Iterable<? extends V> values) { throw new UnsupportedOperationException(); }
[ "@", "Deprecated", "@", "Override", "public", "boolean", "putAll", "(", "final", "R", "rowKey", ",", "final", "C", "columnKey", ",", "final", "Iterable", "<", "?", "extends", "V", ">", "values", ")", "{", "throw", "new", "UnsupportedOperationException", "(",...
Guaranteed to throw an exception and leave the table unmodified. @throws UnsupportedOperationException always @deprecated Unsupported operation.
[ "Guaranteed", "to", "throw", "an", "exception", "and", "leave", "the", "table", "unmodified", "." ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/ImmutableMultitable.java#L129-L133
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.getView
public View getView(int id) { """ Returns a View matching the specified resource id. @param id the R.id of the {@link View} to return @return a {@link View} matching the specified id """ if(config.commandLogging){ Log.d(config.commandLoggingTag, "getView("+id+")"); } return getView(id, 0); }
java
public View getView(int id){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "getView("+id+")"); } return getView(id, 0); }
[ "public", "View", "getView", "(", "int", "id", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"getView(\"", "+", "id", "+", "\")\"", ")", ";", "}", "return", "getView", ...
Returns a View matching the specified resource id. @param id the R.id of the {@link View} to return @return a {@link View} matching the specified id
[ "Returns", "a", "View", "matching", "the", "specified", "resource", "id", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L3025-L3031
javagl/CommonUI
src/main/java/de/javagl/common/ui/tree/filtered/FilteredTreeModel.java
FilteredTreeModel.createNode
private FilteredTreeNode createNode(final TreeNode delegateNode) { """ Recursively create the node for the given delegate node and its children. @param delegateNode The delegate node @return The filtered version of the node """ FilteredTreeNode node = new FilteredTreeNode(this, delegateNode); ...
java
private FilteredTreeNode createNode(final TreeNode delegateNode) { FilteredTreeNode node = new FilteredTreeNode(this, delegateNode); delegateToThis.put(delegateNode, node); thisToDelegate.put(node, delegateNode); @SuppressWarnings("unchecked") Enumeration<? extends Tr...
[ "private", "FilteredTreeNode", "createNode", "(", "final", "TreeNode", "delegateNode", ")", "{", "FilteredTreeNode", "node", "=", "new", "FilteredTreeNode", "(", "this", ",", "delegateNode", ")", ";", "delegateToThis", ".", "put", "(", "delegateNode", ",", "node",...
Recursively create the node for the given delegate node and its children. @param delegateNode The delegate node @return The filtered version of the node
[ "Recursively", "create", "the", "node", "for", "the", "given", "delegate", "node", "and", "its", "children", "." ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/tree/filtered/FilteredTreeModel.java#L165-L180
geomajas/geomajas-project-server
command/src/main/java/org/geomajas/command/dto/SearchByLocationRequest.java
SearchByLocationRequest.addLayerWithFilter
public void addLayerWithFilter(String resultTag, String serverLayerId, String filter) { """ Add a layer with an optional filter expression which should be applied on the given layer. <p/> If the filter contains a geometry, then this needs to be in layer CRS, it is not converted! @param resultTag tag to make t...
java
public void addLayerWithFilter(String resultTag, String serverLayerId, String filter) { // note: layer filter specification will be overwritten if it already // exists layerFilters.put(resultTag, new LayerFilterSpecification(serverLayerId, filter)); }
[ "public", "void", "addLayerWithFilter", "(", "String", "resultTag", ",", "String", "serverLayerId", ",", "String", "filter", ")", "{", "// note: layer filter specification will be overwritten if it already", "// exists", "layerFilters", ".", "put", "(", "resultTag", ",", ...
Add a layer with an optional filter expression which should be applied on the given layer. <p/> If the filter contains a geometry, then this needs to be in layer CRS, it is not converted! @param resultTag tag to make the distinction in the response object between the features for the same serverLayerId but a different...
[ "Add", "a", "layer", "with", "an", "optional", "filter", "expression", "which", "should", "be", "applied", "on", "the", "given", "layer", ".", "<p", "/", ">", "If", "the", "filter", "contains", "a", "geometry", "then", "this", "needs", "to", "be", "in", ...
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/command/src/main/java/org/geomajas/command/dto/SearchByLocationRequest.java#L278-L282
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.createRemoteEnvironment
public static ExecutionEnvironment createRemoteEnvironment(String host, int port, int parallelism, String... jarFiles) { """ Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the...
java
public static ExecutionEnvironment createRemoteEnvironment(String host, int port, int parallelism, String... jarFiles) { RemoteEnvironment rec = new RemoteEnvironment(host, port, jarFiles); rec.setParallelism(parallelism); return rec; }
[ "public", "static", "ExecutionEnvironment", "createRemoteEnvironment", "(", "String", "host", ",", "int", "port", ",", "int", "parallelism", ",", "String", "...", "jarFiles", ")", "{", "RemoteEnvironment", "rec", "=", "new", "RemoteEnvironment", "(", "host", ",", ...
Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the cluster. The execution will use the specified parallelism. @param host The host name or address of the master (JobManager), where...
[ "Creates", "a", "{", "@link", "RemoteEnvironment", "}", ".", "The", "remote", "environment", "sends", "(", "parts", "of", ")", "the", "program", "to", "a", "cluster", "for", "execution", ".", "Note", "that", "all", "file", "paths", "used", "in", "the", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L1210-L1214
Crab2died/Excel4J
src/main/java/com/github/crab2died/utils/Utils.java
Utils.matchClassField
private static Field matchClassField(Class clazz, String fieldName) { """ <p>根据对象的属性名{@code fieldName}获取某个java的属性{@link java.lang.reflect.Field}</p> @param clazz java对象的class属性 @param fieldName 属性名 @return {@link java.lang.reflect.Field} java对象的属性 @author Crab2Died """ List<Field> fields =...
java
private static Field matchClassField(Class clazz, String fieldName) { List<Field> fields = new ArrayList<>(); for (; clazz != Object.class; clazz = clazz.getSuperclass()) { fields.addAll(Arrays.asList(clazz.getDeclaredFields())); } for (Field field : fields) { if...
[ "private", "static", "Field", "matchClassField", "(", "Class", "clazz", ",", "String", "fieldName", ")", "{", "List", "<", "Field", ">", "fields", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ";", "clazz", "!=", "Object", ".", "class", ";"...
<p>根据对象的属性名{@code fieldName}获取某个java的属性{@link java.lang.reflect.Field}</p> @param clazz java对象的class属性 @param fieldName 属性名 @return {@link java.lang.reflect.Field} java对象的属性 @author Crab2Died
[ "<p", ">", "根据对象的属性名", "{", "@code", "fieldName", "}", "获取某个java的属性", "{", "@link", "java", ".", "lang", ".", "reflect", ".", "Field", "}", "<", "/", "p", ">" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/utils/Utils.java#L259-L271
rhuss/jolokia
agent/core/src/main/java/org/jolokia/backend/LocalRequestDispatcher.java
LocalRequestDispatcher.initMBeans
public void initMBeans(HistoryStore pHistoryStore, DebugStore pDebugStore) throws MalformedObjectNameException, MBeanRegistrationException, NotCompliantMBeanException { """ Initialise this request dispatcher, which will register a {@link ConfigMBean} for easy external access to the {@link HistoryStore...
java
public void initMBeans(HistoryStore pHistoryStore, DebugStore pDebugStore) throws MalformedObjectNameException, MBeanRegistrationException, NotCompliantMBeanException { // Register the Config MBean String oName = createObjectNameWithQualifier(Config.OBJECT_NAME); try { C...
[ "public", "void", "initMBeans", "(", "HistoryStore", "pHistoryStore", ",", "DebugStore", "pDebugStore", ")", "throws", "MalformedObjectNameException", ",", "MBeanRegistrationException", ",", "NotCompliantMBeanException", "{", "// Register the Config MBean", "String", "oName", ...
Initialise this request dispatcher, which will register a {@link ConfigMBean} for easy external access to the {@link HistoryStore} and {@link DebugStore}. Also a {@link JolokiaDiscoveryMBean} is registered @param pHistoryStore history store to be managed from within an MBean @param pDebugStore managed debug store @thr...
[ "Initialise", "this", "request", "dispatcher", "which", "will", "register", "a", "{", "@link", "ConfigMBean", "}", "for", "easy", "external", "access", "to", "the", "{", "@link", "HistoryStore", "}", "and", "{", "@link", "DebugStore", "}", ".", "Also", "a", ...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/LocalRequestDispatcher.java#L113-L153
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/resource/Delay.java
Delay.equalJitter
public static Delay equalJitter(Duration lower, Duration upper, long base, TimeUnit targetTimeUnit) { """ Creates a new {@link EqualJitterDelay}. @param lower the lower boundary, must be non-negative @param upper the upper boundary, must be greater than the lower boundary @param base the base, must be greater...
java
public static Delay equalJitter(Duration lower, Duration upper, long base, TimeUnit targetTimeUnit) { LettuceAssert.notNull(lower, "Lower boundary must not be null"); LettuceAssert.isTrue(lower.toNanos() >= 0, "Lower boundary must be greater or equal to 0"); LettuceAssert.notNull(upper, "Upper ...
[ "public", "static", "Delay", "equalJitter", "(", "Duration", "lower", ",", "Duration", "upper", ",", "long", "base", ",", "TimeUnit", "targetTimeUnit", ")", "{", "LettuceAssert", ".", "notNull", "(", "lower", ",", "\"Lower boundary must not be null\"", ")", ";", ...
Creates a new {@link EqualJitterDelay}. @param lower the lower boundary, must be non-negative @param upper the upper boundary, must be greater than the lower boundary @param base the base, must be greater or equal to 1 @param targetTimeUnit the unit of the delay. @return a created {@link EqualJitterDelay}. @since 5.0
[ "Creates", "a", "new", "{", "@link", "EqualJitterDelay", "}", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/resource/Delay.java#L182-L192
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
AbstractLogger.enter
@Deprecated protected EntryMessage enter(final String fqcn, final MessageSupplier msgSupplier) { """ Logs entry to a method with location information. @param fqcn The fully qualified class name of the <b>caller</b>. @param msgSupplier The Supplier of the Message. """ EntryMessage message = null...
java
@Deprecated protected EntryMessage enter(final String fqcn, final MessageSupplier msgSupplier) { EntryMessage message = null; if (isEnabled(Level.TRACE, ENTRY_MARKER, (Object) null, null)) { logMessageSafely(fqcn, Level.TRACE, ENTRY_MARKER, message = flowMessageFactory.newEntryMessage( ...
[ "@", "Deprecated", "protected", "EntryMessage", "enter", "(", "final", "String", "fqcn", ",", "final", "MessageSupplier", "msgSupplier", ")", "{", "EntryMessage", "message", "=", "null", ";", "if", "(", "isEnabled", "(", "Level", ".", "TRACE", ",", "ENTRY_MARK...
Logs entry to a method with location information. @param fqcn The fully qualified class name of the <b>caller</b>. @param msgSupplier The Supplier of the Message.
[ "Logs", "entry", "to", "a", "method", "with", "location", "information", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java#L552-L560
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/GeneralPurposeFFT_F32_1D.java
GeneralPurposeFFT_F32_1D.realForwardFull
public void realForwardFull(final float[] a, final int offa) { """ Computes 1D forward DFT of real data leaving the result in <code>a</code> . This method computes the full real forward transform, i.e. you will get the same result as from <code>complexForward</code> called with all imaginary part equal 0. Becau...
java
public void realForwardFull(final float[] a, final int offa) { final int twon = 2 * n; switch (plan) { case SPLIT_RADIX:{ realForward(a, offa); int idx1, idx2; for (int k = 0; k < n / 2; k++) { idx1 = 2 * k; idx2 = offa + ((twon - idx1) % twon); a[idx2] = a[offa + idx1]; a[idx2 ...
[ "public", "void", "realForwardFull", "(", "final", "float", "[", "]", "a", ",", "final", "int", "offa", ")", "{", "final", "int", "twon", "=", "2", "*", "n", ";", "switch", "(", "plan", ")", "{", "case", "SPLIT_RADIX", ":", "{", "realForward", "(", ...
Computes 1D forward DFT of real data leaving the result in <code>a</code> . This method computes the full real forward transform, i.e. you will get the same result as from <code>complexForward</code> called with all imaginary part equal 0. Because the result is stored in <code>a</code>, the size of the input array must...
[ "Computes", "1D", "forward", "DFT", "of", "real", "data", "leaving", "the", "result", "in", "<code", ">", "a<", "/", "code", ">", ".", "This", "method", "computes", "the", "full", "real", "forward", "transform", "i", ".", "e", ".", "you", "will", "get"...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/GeneralPurposeFFT_F32_1D.java#L383-L426
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/Address.java
Address.fromModelNodeWrapper
public static Address fromModelNodeWrapper(ModelNode haystack, String needle) { """ Obtains an address property list from the given ModelNode wrapper. The given haystack must have a key whose value is the same as needle. The value of that named property must itself be a property list containing all address parts...
java
public static Address fromModelNodeWrapper(ModelNode haystack, String needle) { if (haystack.hasDefined(needle)) { return fromModelNode(haystack.get(needle)); } throw new IllegalArgumentException("There is no address under the key [" + needle + "] in the node: " + ha...
[ "public", "static", "Address", "fromModelNodeWrapper", "(", "ModelNode", "haystack", ",", "String", "needle", ")", "{", "if", "(", "haystack", ".", "hasDefined", "(", "needle", ")", ")", "{", "return", "fromModelNode", "(", "haystack", ".", "get", "(", "need...
Obtains an address property list from the given ModelNode wrapper. The given haystack must have a key whose value is the same as needle. The value of that named property must itself be a property list containing all address parts (and only address parts). @param haystack the wrapper ModelNode that contains a property ...
[ "Obtains", "an", "address", "property", "list", "from", "the", "given", "ModelNode", "wrapper", ".", "The", "given", "haystack", "must", "have", "a", "key", "whose", "value", "is", "the", "same", "as", "needle", ".", "The", "value", "of", "that", "named", ...
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/Address.java#L119-L126
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/recordcount/CompactionRecordCountProvider.java
CompactionRecordCountProvider.constructFileName
@Deprecated public static String constructFileName(String filenamePrefix, long recordCount) { """ Construct the file name as {filenamePrefix}{recordCount}.{SystemCurrentTimeInMills}.{RandomInteger}{SUFFIX}. @deprecated discouraged since default behavior is not obvious from API itself. """ return constru...
java
@Deprecated public static String constructFileName(String filenamePrefix, long recordCount) { return constructFileName(filenamePrefix, DEFAULT_SUFFIX, recordCount); }
[ "@", "Deprecated", "public", "static", "String", "constructFileName", "(", "String", "filenamePrefix", ",", "long", "recordCount", ")", "{", "return", "constructFileName", "(", "filenamePrefix", ",", "DEFAULT_SUFFIX", ",", "recordCount", ")", ";", "}" ]
Construct the file name as {filenamePrefix}{recordCount}.{SystemCurrentTimeInMills}.{RandomInteger}{SUFFIX}. @deprecated discouraged since default behavior is not obvious from API itself.
[ "Construct", "the", "file", "name", "as", "{", "filenamePrefix", "}", "{", "recordCount", "}", ".", "{", "SystemCurrentTimeInMills", "}", ".", "{", "RandomInteger", "}", "{", "SUFFIX", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/recordcount/CompactionRecordCountProvider.java#L48-L51
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java
DirectionsPane.fromLatLngToPoint
public Point2D fromLatLngToPoint(LatLong loc) { """ Returns the screen point for the provided LatLong. Note: Unexpected results can be obtained if this method is called as a result of a zoom change, as the zoom event is fired before the bounds are updated, and bounds need to be used to obtain the answer! <p> ...
java
public Point2D fromLatLngToPoint(LatLong loc) { // System.out.println("GoogleMap.fromLatLngToPoint loc: " + loc); Projection proj = getProjection(); //System.out.println("map.fromLatLngToPoint Projection: " + proj); LatLongBounds llb = getBounds(); // System.out.println("GoogleMap....
[ "public", "Point2D", "fromLatLngToPoint", "(", "LatLong", "loc", ")", "{", "// System.out.println(\"GoogleMap.fromLatLngToPoint loc: \" + loc);", "Projection", "proj", "=", "getProjection", "(", ")", ";", "//System.out.println(\"map.fromLatLngToPoint Projection: \" + proj);", ...
Returns the screen point for the provided LatLong. Note: Unexpected results can be obtained if this method is called as a result of a zoom change, as the zoom event is fired before the bounds are updated, and bounds need to be used to obtain the answer! <p> One workaround is to only operate off bounds_changed events. ...
[ "Returns", "the", "screen", "point", "for", "the", "provided", "LatLong", ".", "Note", ":", "Unexpected", "results", "can", "be", "obtained", "if", "this", "method", "is", "called", "as", "a", "result", "of", "a", "zoom", "change", "as", "the", "zoom", "...
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java#L170-L191
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
TaskInProgress.alreadyCompletedTask
void alreadyCompletedTask(TaskAttemptID taskid) { """ Indicate that one of the taskids in this already-completed TaskInProgress has successfully completed; hence we mark this taskid as {@link TaskStatus.State.KILLED}. """ // 'KILL' the task completedTask(taskid, TaskStatus.State.KILLED); //...
java
void alreadyCompletedTask(TaskAttemptID taskid) { // 'KILL' the task completedTask(taskid, TaskStatus.State.KILLED); // Note the reason for the task being 'KILLED' addDiagnosticInfo(taskid, "Already completed TIP"); LOG.info("Already complete TIP " + getTIPId() + " has compl...
[ "void", "alreadyCompletedTask", "(", "TaskAttemptID", "taskid", ")", "{", "// 'KILL' the task ", "completedTask", "(", "taskid", ",", "TaskStatus", ".", "State", ".", "KILLED", ")", ";", "// Note the reason for the task being 'KILLED'", "addDiagnosticInfo", "(", "taskid",...
Indicate that one of the taskids in this already-completed TaskInProgress has successfully completed; hence we mark this taskid as {@link TaskStatus.State.KILLED}.
[ "Indicate", "that", "one", "of", "the", "taskids", "in", "this", "already", "-", "completed", "TaskInProgress", "has", "successfully", "completed", ";", "hence", "we", "mark", "this", "taskid", "as", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java#L900-L909
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java
MessageAction.appendFormat
@CheckReturnValue public MessageAction appendFormat(final String format, final Object... args) { """ Applies the result of {@link String#format(String, Object...) String.format(String, Object...)} as content. <p>For more information of formatting review the {@link java.util.Formatter Formatter} documentati...
java
@CheckReturnValue public MessageAction appendFormat(final String format, final Object... args) { return append(String.format(format, args)); }
[ "@", "CheckReturnValue", "public", "MessageAction", "appendFormat", "(", "final", "String", "format", ",", "final", "Object", "...", "args", ")", "{", "return", "append", "(", "String", ".", "format", "(", "format", ",", "args", ")", ")", ";", "}" ]
Applies the result of {@link String#format(String, Object...) String.format(String, Object...)} as content. <p>For more information of formatting review the {@link java.util.Formatter Formatter} documentation! @param format The format String @param args The arguments that should be used for conversion @throws java...
[ "Applies", "the", "result", "of", "{", "@link", "String#format", "(", "String", "Object", "...", ")", "String", ".", "format", "(", "String", "Object", "...", ")", "}", "as", "content", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java#L336-L340
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_PUT
public void organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_PUT(String organizationName, String exchangeService, String sharedEmailAddress, OvhSharedAccount body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService...
java
public void organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_PUT(String organizationName, String exchangeService, String sharedEmailAddress, OvhSharedAccount body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/sharedAccount/{sharedEmailAddre...
[ "public", "void", "organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "sharedEmailAddress", ",", "OvhSharedAccount", "body", ")", "throws", "IOException", "{", "Stri...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/sharedAccount/{sharedEmailAddress} @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of y...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L883-L887
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftLikelihood.java
TrackerMeanShiftLikelihood.initialize
public void initialize( T image , RectangleLength2D_I32 initial ) { """ Specifies the initial target location so that it can learn its description @param image Image @param initial Initial target location and the mean-shift bandwidth """ if( !image.isInBounds(initial.x0,initial.y0) ) throw new IllegalAr...
java
public void initialize( T image , RectangleLength2D_I32 initial ) { if( !image.isInBounds(initial.x0,initial.y0) ) throw new IllegalArgumentException("Initial rectangle is out of bounds!"); if( !image.isInBounds(initial.x0+initial.width,initial.y0+initial.height) ) throw new IllegalArgumentException("Initial ...
[ "public", "void", "initialize", "(", "T", "image", ",", "RectangleLength2D_I32", "initial", ")", "{", "if", "(", "!", "image", ".", "isInBounds", "(", "initial", ".", "x0", ",", "initial", ".", "y0", ")", ")", "throw", "new", "IllegalArgumentException", "(...
Specifies the initial target location so that it can learn its description @param image Image @param initial Initial target location and the mean-shift bandwidth
[ "Specifies", "the", "initial", "target", "location", "so", "that", "it", "can", "learn", "its", "description" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftLikelihood.java#L93-L117
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/MyProxy.java
MyProxy.get
public GSSCredential get(GSSCredential credential, String username, String passphrase, int lifetime) throws MyProxyException { """ Retrieves delegated credentials from the MyProxy server. Notes: Performs simple verifi...
java
public GSSCredential get(GSSCredential credential, String username, String passphrase, int lifetime) throws MyProxyException { GetParams request = new GetParams(); request.setUserName(username); reques...
[ "public", "GSSCredential", "get", "(", "GSSCredential", "credential", ",", "String", "username", ",", "String", "passphrase", ",", "int", "lifetime", ")", "throws", "MyProxyException", "{", "GetParams", "request", "=", "new", "GetParams", "(", ")", ";", "request...
Retrieves delegated credentials from the MyProxy server. Notes: Performs simple verification of private/public keys of the delegated credential. Should be improved later. And only checks for RSA keys. @param credential The local GSI credentials to use for authentication. Can be set to null if no local credentials. @...
[ "Retrieves", "delegated", "credentials", "from", "the", "MyProxy", "server", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/MyProxy.java#L925-L935
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java
VmlGraphicsContext.drawRectangle
public void drawRectangle(Object parent, String name, Bbox rectangle, ShapeStyle style) { """ Draw a rectangle onto the <code>GraphicsContext</code>. @param parent parent group object @param name The rectangle's name. @param rectangle The rectangle to be drawn. The bounding box's origin, is the rectangle's...
java
public void drawRectangle(Object parent, String name, Bbox rectangle, ShapeStyle style) { if (isAttached()) { Element element = helper.createOrUpdateElement(parent, name, "rect", style); applyAbsolutePosition(element, rectangle.getOrigin()); applyElementSize(element, (int) rectangle.getWidth(), (int) rectang...
[ "public", "void", "drawRectangle", "(", "Object", "parent", ",", "String", "name", ",", "Bbox", "rectangle", ",", "ShapeStyle", "style", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "Element", "element", "=", "helper", ".", "createOrUpdateElement",...
Draw a rectangle onto the <code>GraphicsContext</code>. @param parent parent group object @param name The rectangle's name. @param rectangle The rectangle to be drawn. The bounding box's origin, is the rectangle's upper left corner on the screen. @param style The styling object for the rectangle.
[ "Draw", "a", "rectangle", "onto", "the", "<code", ">", "GraphicsContext<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlGraphicsContext.java#L336-L342
deeplearning4j/deeplearning4j
datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java
ArrowConverter.toArrowWritablesTimeSeries
public static List<List<List<Writable>>> toArrowWritablesTimeSeries(List<FieldVector> fieldVectors,Schema schema,int timeSeriesLength) { """ Convert the input field vectors (the input data) and the given schema to a proper list of writables. @param fieldVectors the field vectors to use @param schema the schema ...
java
public static List<List<List<Writable>>> toArrowWritablesTimeSeries(List<FieldVector> fieldVectors,Schema schema,int timeSeriesLength) { ArrowWritableRecordTimeSeriesBatch arrowWritableRecordBatch = new ArrowWritableRecordTimeSeriesBatch(fieldVectors,schema,timeSeriesLength); return arrowWritableRecordB...
[ "public", "static", "List", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "toArrowWritablesTimeSeries", "(", "List", "<", "FieldVector", ">", "fieldVectors", ",", "Schema", "schema", ",", "int", "timeSeriesLength", ")", "{", "ArrowWritableRecordTimeS...
Convert the input field vectors (the input data) and the given schema to a proper list of writables. @param fieldVectors the field vectors to use @param schema the schema to use @param timeSeriesLength the length of the time series @return the equivalent datavec batch given the input data
[ "Convert", "the", "input", "field", "vectors", "(", "the", "input", "data", ")", "and", "the", "given", "schema", "to", "a", "proper", "list", "of", "writables", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java#L324-L327
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java
AmazonSQSMessagingClientWrapper.changeMessageVisibility
public void changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws JMSException { """ Calls <code>changeMessageVisibility</code> and wraps <code>AmazonClientException</code>. This is used to for negative acknowledge of a single message, so that messages can be received again...
java
public void changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws JMSException { try { prepareRequest(changeMessageVisibilityRequest); amazonSQSClient.changeMessageVisibility(changeMessageVisibilityRequest); } catch (AmazonClientException e...
[ "public", "void", "changeMessageVisibility", "(", "ChangeMessageVisibilityRequest", "changeMessageVisibilityRequest", ")", "throws", "JMSException", "{", "try", "{", "prepareRequest", "(", "changeMessageVisibilityRequest", ")", ";", "amazonSQSClient", ".", "changeMessageVisibil...
Calls <code>changeMessageVisibility</code> and wraps <code>AmazonClientException</code>. This is used to for negative acknowledge of a single message, so that messages can be received again without any delay. @param changeMessageVisibilityRequest Container for the necessary parameters to execute the changeMessageVisib...
[ "Calls", "<code", ">", "changeMessageVisibility<", "/", "code", ">", "and", "wraps", "<code", ">", "AmazonClientException<", "/", "code", ">", ".", "This", "is", "used", "to", "for", "negative", "acknowledge", "of", "a", "single", "message", "so", "that", "m...
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L366-L373
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java
Constraints.toNormalizedQueryMap
public Map<String, String> toNormalizedQueryMap() { """ Get a normalized query map for the constraints. A normalized query map will be equal in value and iteration order for any logically equivalent set of constraints. """ Map<String, String> query = Maps.newTreeMap(); return toQueryMap(query, true);...
java
public Map<String, String> toNormalizedQueryMap() { Map<String, String> query = Maps.newTreeMap(); return toQueryMap(query, true); }
[ "public", "Map", "<", "String", ",", "String", ">", "toNormalizedQueryMap", "(", ")", "{", "Map", "<", "String", ",", "String", ">", "query", "=", "Maps", ".", "newTreeMap", "(", ")", ";", "return", "toQueryMap", "(", "query", ",", "true", ")", ";", ...
Get a normalized query map for the constraints. A normalized query map will be equal in value and iteration order for any logically equivalent set of constraints.
[ "Get", "a", "normalized", "query", "map", "for", "the", "constraints", ".", "A", "normalized", "query", "map", "will", "be", "equal", "in", "value", "and", "iteration", "order", "for", "any", "logically", "equivalent", "set", "of", "constraints", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java#L459-L462
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HpackStaticTable.java
HpackStaticTable.getIndex
static int getIndex(CharSequence name, CharSequence value) { """ Returns the index value for the given header field in the static table. Returns -1 if the header field is not in the static table. """ int index = getIndex(name); if (index == -1) { return -1; } // No...
java
static int getIndex(CharSequence name, CharSequence value) { int index = getIndex(name); if (index == -1) { return -1; } // Note this assumes all entries for a given header field are sequential. while (index <= length) { HpackHeaderField entry = getEntry(...
[ "static", "int", "getIndex", "(", "CharSequence", "name", ",", "CharSequence", "value", ")", "{", "int", "index", "=", "getIndex", "(", "name", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "return", "-", "1", ";", "}", "// Note this assumes ...
Returns the index value for the given header field in the static table. Returns -1 if the header field is not in the static table.
[ "Returns", "the", "index", "value", "for", "the", "given", "header", "field", "in", "the", "static", "table", ".", "Returns", "-", "1", "if", "the", "header", "field", "is", "not", "in", "the", "static", "table", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackStaticTable.java#L148-L167
windup/windup
utils/src/main/java/org/jboss/windup/util/ZipUtil.java
ZipUtil.unzipFromClassResource
public static void unzipFromClassResource(Class<?> clazz, String resourcePath, File extractToPath) throws IOException { """ Unzip a classpath resource using the given {@link Class} as the resource root path. """ File inputFile = File.createTempFile("windup-resource-to-unzip-", ".zip"); try ...
java
public static void unzipFromClassResource(Class<?> clazz, String resourcePath, File extractToPath) throws IOException { File inputFile = File.createTempFile("windup-resource-to-unzip-", ".zip"); try { try (final InputStream stream = clazz.getResourceAsStream(resourcePath)) ...
[ "public", "static", "void", "unzipFromClassResource", "(", "Class", "<", "?", ">", "clazz", ",", "String", "resourcePath", ",", "File", "extractToPath", ")", "throws", "IOException", "{", "File", "inputFile", "=", "File", ".", "createTempFile", "(", "\"windup-re...
Unzip a classpath resource using the given {@link Class} as the resource root path.
[ "Unzip", "a", "classpath", "resource", "using", "the", "given", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/ZipUtil.java#L39-L55
modelmapper/modelmapper
core/src/main/java/org/modelmapper/internal/util/Iterables.java
Iterables.getElement
@SuppressWarnings("unchecked") public static Object getElement(Object iterable, int index) { """ Gets the element from an iterable with given index. @param iterable the iterable @param index the index @return null if the iterable doesn't have the element at index, otherwise, return the element """ ...
java
@SuppressWarnings("unchecked") public static Object getElement(Object iterable, int index) { if (iterable.getClass().isArray()) return getElementFromArrary(iterable, index); if (iterable instanceof Collection) return getElementFromCollection((Collection<Object>) iterable, index); retur...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Object", "getElement", "(", "Object", "iterable", ",", "int", "index", ")", "{", "if", "(", "iterable", ".", "getClass", "(", ")", ".", "isArray", "(", ")", ")", "return", "getElement...
Gets the element from an iterable with given index. @param iterable the iterable @param index the index @return null if the iterable doesn't have the element at index, otherwise, return the element
[ "Gets", "the", "element", "from", "an", "iterable", "with", "given", "index", "." ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/internal/util/Iterables.java#L73-L81
RestComm/jss7
map/map-impl/src/main/java/org/restcomm/protocols/ss7/map/MAPDialogImpl.java
MAPDialogImpl.getMessageUserDataLengthOnSend
public int getMessageUserDataLengthOnSend() throws MAPException { """ Return the MAP message length (in bytes) that will be after encoding if TC-BEGIN or TC-CONTINUE cases This value must not exceed getMaxUserDataLength() value @return """ try { switch (this.tcapDialog.getState()) { ...
java
public int getMessageUserDataLengthOnSend() throws MAPException { try { switch (this.tcapDialog.getState()) { case Idle: ApplicationContextName acn = this.mapProviderImpl.getTCAPProvider().getDialogPrimitiveFactory() .createApplication...
[ "public", "int", "getMessageUserDataLengthOnSend", "(", ")", "throws", "MAPException", "{", "try", "{", "switch", "(", "this", ".", "tcapDialog", ".", "getState", "(", ")", ")", "{", "case", "Idle", ":", "ApplicationContextName", "acn", "=", "this", ".", "ma...
Return the MAP message length (in bytes) that will be after encoding if TC-BEGIN or TC-CONTINUE cases This value must not exceed getMaxUserDataLength() value @return
[ "Return", "the", "MAP", "message", "length", "(", "in", "bytes", ")", "that", "will", "be", "after", "encoding", "if", "TC", "-", "BEGIN", "or", "TC", "-", "CONTINUE", "cases", "This", "value", "must", "not", "exceed", "getMaxUserDataLength", "()", "value"...
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/map/map-impl/src/main/java/org/restcomm/protocols/ss7/map/MAPDialogImpl.java#L608-L640
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java
InnerNodeImpl.insertChildAt
Node insertChildAt(Node newChild, int index) throws DOMException { """ Inserts {@code newChild} at {@code index}. If it is already child of another node, it is removed from there. """ if (newChild instanceof DocumentFragment) { NodeList toAdd = newChild.getChildNodes(); for (in...
java
Node insertChildAt(Node newChild, int index) throws DOMException { if (newChild instanceof DocumentFragment) { NodeList toAdd = newChild.getChildNodes(); for (int i = 0; i < toAdd.getLength(); i++) { insertChildAt(toAdd.item(i), index + i); } retur...
[ "Node", "insertChildAt", "(", "Node", "newChild", ",", "int", "index", ")", "throws", "DOMException", "{", "if", "(", "newChild", "instanceof", "DocumentFragment", ")", "{", "NodeList", "toAdd", "=", "newChild", ".", "getChildNodes", "(", ")", ";", "for", "(...
Inserts {@code newChild} at {@code index}. If it is already child of another node, it is removed from there.
[ "Inserts", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java#L107-L135
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/PersianCalendar.java
PersianCalendar.handleComputeFields
@Deprecated protected void handleComputeFields(int julianDay) { """ Override Calendar to compute several fields specific to the Persian calendar system. These are: <ul><li>ERA <li>YEAR <li>MONTH <li>DAY_OF_MONTH <li>DAY_OF_YEAR <li>EXTENDED_YEAR</ul> The DAY_OF_WEEK and DOW_LOCAL fields are alread...
java
@Deprecated protected void handleComputeFields(int julianDay) { int year, month, dayOfMonth, dayOfYear; long daysSinceEpoch = julianDay - PERSIAN_EPOCH; year = 1 + (int) floorDivide(33 * daysSinceEpoch + 3, 12053); long farvardin1 = 365L * (year - 1L) + floorDivide(8L * year + 21, ...
[ "@", "Deprecated", "protected", "void", "handleComputeFields", "(", "int", "julianDay", ")", "{", "int", "year", ",", "month", ",", "dayOfMonth", ",", "dayOfYear", ";", "long", "daysSinceEpoch", "=", "julianDay", "-", "PERSIAN_EPOCH", ";", "year", "=", "1", ...
Override Calendar to compute several fields specific to the Persian calendar system. These are: <ul><li>ERA <li>YEAR <li>MONTH <li>DAY_OF_MONTH <li>DAY_OF_YEAR <li>EXTENDED_YEAR</ul> The DAY_OF_WEEK and DOW_LOCAL fields are already set when this method is called. @deprecated This API is ICU internal only. @hide dra...
[ "Override", "Calendar", "to", "compute", "several", "fields", "specific", "to", "the", "Persian", "calendar", "system", ".", "These", "are", ":" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/PersianCalendar.java#L420-L443
hageldave/ImagingKit
ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/ComplexImg.java
ComplexImg.setComplex
public void setComplex(int x, int y, double real, double imag) { """ Sets the real and imaginary part at the specified position <br> If {@link #isSynchronizePowerSpectrum()} is true, then this will also update the corresponding power value. @param x coordinate @param y coordinate @param real part to be set ...
java
public void setComplex(int x, int y, double real, double imag){ int idx=y*width+x; setComplex_atIndex(idx, real, imag); }
[ "public", "void", "setComplex", "(", "int", "x", ",", "int", "y", ",", "double", "real", ",", "double", "imag", ")", "{", "int", "idx", "=", "y", "*", "width", "+", "x", ";", "setComplex_atIndex", "(", "idx", ",", "real", ",", "imag", ")", ";", "...
Sets the real and imaginary part at the specified position <br> If {@link #isSynchronizePowerSpectrum()} is true, then this will also update the corresponding power value. @param x coordinate @param y coordinate @param real part to be set @param imag imaginary part to be set
[ "Sets", "the", "real", "and", "imaginary", "part", "at", "the", "specified", "position", "<br", ">", "If", "{" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/ComplexImg.java#L459-L462
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getAllEmblemIDs
public void getAllEmblemIDs(Emblem.Type type, Callback<List<Integer>> callback) throws NullPointerException { """ For more info on emblem API go <a href="https://wiki.guildwars2.com/wiki/API:2/emblem">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(C...
java
public void getAllEmblemIDs(Emblem.Type type, Callback<List<Integer>> callback) throws NullPointerException { gw2API.getAllEmblemIDs(type.name()).enqueue(callback); }
[ "public", "void", "getAllEmblemIDs", "(", "Emblem", ".", "Type", "type", ",", "Callback", "<", "List", "<", "Integer", ">", ">", "callback", ")", "throws", "NullPointerException", "{", "gw2API", ".", "getAllEmblemIDs", "(", "type", ".", "name", "(", ")", "...
For more info on emblem API go <a href="https://wiki.guildwars2.com/wiki/API:2/emblem">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param type foregrounds/backgrounds @param callback callback that ...
[ "For", "more", "info", "on", "emblem", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "emblem", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", "t...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1315-L1317
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPartialDateField.java
WPartialDateField.getDay
public Integer getDay() { """ Returns the day of the month value. @return the day of the month, or null if unspecified. """ String dateValue = getValue(); if (dateValue != null && dateValue.length() == DAY_END) { return parseDateComponent(dateValue.substring(DAY_START, DAY_END), getPaddingChar()); ...
java
public Integer getDay() { String dateValue = getValue(); if (dateValue != null && dateValue.length() == DAY_END) { return parseDateComponent(dateValue.substring(DAY_START, DAY_END), getPaddingChar()); } else { return null; } }
[ "public", "Integer", "getDay", "(", ")", "{", "String", "dateValue", "=", "getValue", "(", ")", ";", "if", "(", "dateValue", "!=", "null", "&&", "dateValue", ".", "length", "(", ")", "==", "DAY_END", ")", "{", "return", "parseDateComponent", "(", "dateVa...
Returns the day of the month value. @return the day of the month, or null if unspecified.
[ "Returns", "the", "day", "of", "the", "month", "value", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPartialDateField.java#L497-L505
perwendel/spark
src/main/java/spark/FilterImpl.java
FilterImpl.create
static FilterImpl create(final String path, String acceptType, final Filter filter) { """ Wraps the filter in FilterImpl @param path the path @param acceptType the accept type @param filter the filter @return the wrapped route """ if (acceptType == null) { acceptType = DEFAU...
java
static FilterImpl create(final String path, String acceptType, final Filter filter) { if (acceptType == null) { acceptType = DEFAULT_ACCEPT_TYPE; } return new FilterImpl(path, acceptType, filter) { @Override public void handle(Request request, Response respons...
[ "static", "FilterImpl", "create", "(", "final", "String", "path", ",", "String", "acceptType", ",", "final", "Filter", "filter", ")", "{", "if", "(", "acceptType", "==", "null", ")", "{", "acceptType", "=", "DEFAULT_ACCEPT_TYPE", ";", "}", "return", "new", ...
Wraps the filter in FilterImpl @param path the path @param acceptType the accept type @param filter the filter @return the wrapped route
[ "Wraps", "the", "filter", "in", "FilterImpl" ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/FilterImpl.java#L66-L76
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java
FailoverGroupsInner.updateAsync
public Observable<FailoverGroupInner> updateAsync(String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { """ Updates a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Re...
java
public Observable<FailoverGroupInner> updateAsync(String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters).map(new Func1<ServiceResponse<FailoverGroupInner>, Failov...
[ "public", "Observable", "<", "FailoverGroupInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "failoverGroupName", ",", "FailoverGroupUpdate", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(",...
Updates a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server containing the failover group. @param failoverGroupName The name of the failover group. @pa...
[ "Updates", "a", "failover", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java#L611-L618
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.lastOrdinalIndexOf
public static int lastOrdinalIndexOf(final CharSequence str, final CharSequence searchStr, final int ordinal) { """ <p>Finds the n-th last index within a String, handling {@code null}. This method uses {@link String#lastIndexOf(String)}.</p> <p>A {@code null} String will return {@code -1}.</p> <pre> String...
java
public static int lastOrdinalIndexOf(final CharSequence str, final CharSequence searchStr, final int ordinal) { return ordinalIndexOf(str, searchStr, ordinal, true); }
[ "public", "static", "int", "lastOrdinalIndexOf", "(", "final", "CharSequence", "str", ",", "final", "CharSequence", "searchStr", ",", "final", "int", "ordinal", ")", "{", "return", "ordinalIndexOf", "(", "str", ",", "searchStr", ",", "ordinal", ",", "true", ")...
<p>Finds the n-th last index within a String, handling {@code null}. This method uses {@link String#lastIndexOf(String)}.</p> <p>A {@code null} String will return {@code -1}.</p> <pre> StringUtils.lastOrdinalIndexOf(null, *, *) = -1 StringUtils.lastOrdinalIndexOf(*, null, *) = -1 StringUtils.lastOrd...
[ "<p", ">", "Finds", "the", "n", "-", "th", "last", "index", "within", "a", "String", "handling", "{", "@code", "null", "}", ".", "This", "method", "uses", "{", "@link", "String#lastIndexOf", "(", "String", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L1797-L1799
alkacon/opencms-core
src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorTypes.java
CmsMessageBundleEditorTypes.getDescriptor
public static CmsResource getDescriptor(CmsObject cms, String basename) { """ Returns the bundle descriptor for the bundle with the provided base name. @param cms {@link CmsObject} used for searching. @param basename the bundle base name, for which the descriptor is searched. @return the bundle descriptor, or <...
java
public static CmsResource getDescriptor(CmsObject cms, String basename) { CmsSolrQuery query = new CmsSolrQuery(); query.setResourceTypes(CmsMessageBundleEditorTypes.BundleType.DESCRIPTOR.toString()); query.setFilterQueries("filename:\"" + basename + CmsMessageBundleEditorTypes.Descriptor.POSTF...
[ "public", "static", "CmsResource", "getDescriptor", "(", "CmsObject", "cms", ",", "String", "basename", ")", "{", "CmsSolrQuery", "query", "=", "new", "CmsSolrQuery", "(", ")", ";", "query", ".", "setResourceTypes", "(", "CmsMessageBundleEditorTypes", ".", "Bundle...
Returns the bundle descriptor for the bundle with the provided base name. @param cms {@link CmsObject} used for searching. @param basename the bundle base name, for which the descriptor is searched. @return the bundle descriptor, or <code>null</code> if it does not exist or searching fails.
[ "Returns", "the", "bundle", "descriptor", "for", "the", "bundle", "with", "the", "provided", "base", "name", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/editors/messagebundle/CmsMessageBundleEditorTypes.java#L976-L1007
ops4j/org.ops4j.pax.web
pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/Activator.java
Activator.trackHttpContexts
private void trackHttpContexts(final BundleContext bundleContext, ExtendedHttpServiceRuntime httpServiceRuntime) { """ Track http contexts. @param bundleContext the BundleContext associated with this bundle @param httpServiceRuntime """ final ServiceTracker<HttpContext, HttpContextElement> httpContextTr...
java
private void trackHttpContexts(final BundleContext bundleContext, ExtendedHttpServiceRuntime httpServiceRuntime) { final ServiceTracker<HttpContext, HttpContextElement> httpContextTracker = HttpContextTracker .createTracker(extenderContext, bundleContext, httpServiceRuntime); httpContextTracker.open(); ...
[ "private", "void", "trackHttpContexts", "(", "final", "BundleContext", "bundleContext", ",", "ExtendedHttpServiceRuntime", "httpServiceRuntime", ")", "{", "final", "ServiceTracker", "<", "HttpContext", ",", "HttpContextElement", ">", "httpContextTracker", "=", "HttpContextT...
Track http contexts. @param bundleContext the BundleContext associated with this bundle @param httpServiceRuntime
[ "Track", "http", "contexts", "." ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/Activator.java#L143-L155
twitter/cloudhopper-commons
ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/GsmUtil.java
GsmUtil.createConcatenatedBinaryShortMessages
static public byte[][] createConcatenatedBinaryShortMessages(byte[] binaryShortMessage, byte referenceNum) throws IllegalArgumentException { """ Creates multiple short messages (that include a user data header) by splitting the binaryShortMessage data into 134 byte parts. If the binaryShortMessage does not need...
java
static public byte[][] createConcatenatedBinaryShortMessages(byte[] binaryShortMessage, byte referenceNum) throws IllegalArgumentException { if (binaryShortMessage == null) { return null; } // if the short message does not need to be concatenated if (binaryShortMessage.length...
[ "static", "public", "byte", "[", "]", "[", "]", "createConcatenatedBinaryShortMessages", "(", "byte", "[", "]", "binaryShortMessage", ",", "byte", "referenceNum", ")", "throws", "IllegalArgumentException", "{", "if", "(", "binaryShortMessage", "==", "null", ")", "...
Creates multiple short messages (that include a user data header) by splitting the binaryShortMessage data into 134 byte parts. If the binaryShortMessage does not need to be concatenated (less than or equal to 140 bytes), this method will return NULL. <br><br> WARNING: This method only works on binary short messages t...
[ "Creates", "multiple", "short", "messages", "(", "that", "include", "a", "user", "data", "header", ")", "by", "splitting", "the", "binaryShortMessage", "data", "into", "134", "byte", "parts", ".", "If", "the", "binaryShortMessage", "does", "not", "need", "to",...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/GsmUtil.java#L268-L314
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
QueryReferenceBroker.getReferencedObject
private Object getReferencedObject(Identity id, ObjectReferenceDescriptor rds) { """ retrieves an Object reference by its Identity. <br> If there is a Proxy-class is defined in the ReferenceDescriptor or if the ReferenceDescriptor is lazy, a Proxy-object is returned. <br> If no Proxy-class is defined, a getOb...
java
private Object getReferencedObject(Identity id, ObjectReferenceDescriptor rds) { Class baseClassForProxy; if (rds.isLazy()) { /* arminw: use real reference class instead of the top-level class, because we want to use a proxy represent...
[ "private", "Object", "getReferencedObject", "(", "Identity", "id", ",", "ObjectReferenceDescriptor", "rds", ")", "{", "Class", "baseClassForProxy", ";", "if", "(", "rds", ".", "isLazy", "(", ")", ")", "{", "/*\r\n arminw:\r\n use real reference cla...
retrieves an Object reference by its Identity. <br> If there is a Proxy-class is defined in the ReferenceDescriptor or if the ReferenceDescriptor is lazy, a Proxy-object is returned. <br> If no Proxy-class is defined, a getObjectByIdentity(...) lookup is performed.
[ "retrieves", "an", "Object", "reference", "by", "its", "Identity", ".", "<br", ">", "If", "there", "is", "a", "Proxy", "-", "class", "is", "defined", "in", "the", "ReferenceDescriptor", "or", "if", "the", "ReferenceDescriptor", "is", "lazy", "a", "Proxy", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java#L653-L707
mozilla/rhino
src/org/mozilla/javascript/Arguments.java
Arguments.putIntoActivation
private void putIntoActivation(int index, Object value) { """ the following helper methods assume that 0 < index < args.length """ String argName = activation.function.getParamOrVarName(index); activation.put(argName, activation, value); }
java
private void putIntoActivation(int index, Object value) { String argName = activation.function.getParamOrVarName(index); activation.put(argName, activation, value); }
[ "private", "void", "putIntoActivation", "(", "int", "index", ",", "Object", "value", ")", "{", "String", "argName", "=", "activation", ".", "function", ".", "getParamOrVarName", "(", "index", ")", ";", "activation", ".", "put", "(", "argName", ",", "activati...
the following helper methods assume that 0 < index < args.length
[ "the", "following", "helper", "methods", "assume", "that", "0", "<", "index", "<", "args", ".", "length" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Arguments.java#L64-L67
landawn/AbacusUtil
src/com/landawn/abacus/util/Matth.java
Matth.addExact
public static long addExact(long a, long b) { """ Returns the sum of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a + b} overflows in signed {@code long} arithmetic """ long result = a + b; checkNoOverflow((a ^ b) < 0 | (a ^ result) >= 0); ...
java
public static long addExact(long a, long b) { long result = a + b; checkNoOverflow((a ^ b) < 0 | (a ^ result) >= 0); return result; }
[ "public", "static", "long", "addExact", "(", "long", "a", ",", "long", "b", ")", "{", "long", "result", "=", "a", "+", "b", ";", "checkNoOverflow", "(", "(", "a", "^", "b", ")", "<", "0", "|", "(", "a", "^", "result", ")", ">=", "0", ")", ";"...
Returns the sum of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a + b} overflows in signed {@code long} arithmetic
[ "Returns", "the", "sum", "of", "{", "@code", "a", "}", "and", "{", "@code", "b", "}", "provided", "it", "does", "not", "overflow", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Matth.java#L1382-L1386
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/remarketing/UploadOfflineData.java
UploadOfflineData.getFieldPathElementIndex
private static Integer getFieldPathElementIndex(ApiError apiError, String field) { """ Returns the {@link FieldPathElement#getIndex()} for the specified {@code field} name, if present in the error's field path elements. @param apiError the error to inspect. @param field the name of the field to search for in ...
java
private static Integer getFieldPathElementIndex(ApiError apiError, String field) { FieldPathElement[] fieldPathElements = apiError.getFieldPathElements(); if (fieldPathElements == null) { return null; } for(int i = 0; i < fieldPathElements.length; i++) { FieldPathElement fieldPathElement = f...
[ "private", "static", "Integer", "getFieldPathElementIndex", "(", "ApiError", "apiError", ",", "String", "field", ")", "{", "FieldPathElement", "[", "]", "fieldPathElements", "=", "apiError", ".", "getFieldPathElements", "(", ")", ";", "if", "(", "fieldPathElements",...
Returns the {@link FieldPathElement#getIndex()} for the specified {@code field} name, if present in the error's field path elements. @param apiError the error to inspect. @param field the name of the field to search for in the error's field path elements. @return the index of the entry with the specified field, or {@c...
[ "Returns", "the", "{", "@link", "FieldPathElement#getIndex", "()", "}", "for", "the", "specified", "{", "@code", "field", "}", "name", "if", "present", "in", "the", "error", "s", "field", "path", "elements", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/remarketing/UploadOfflineData.java#L377-L389
alkacon/opencms-core
src/org/opencms/workplace/editors/CmsXmlContentEditor.java
CmsXmlContentEditor.actionPreview
public void actionPreview() throws IOException, JspException { """ Performs the preview XML content action in a new browser window.<p> @throws IOException if redirect fails @throws JspException if inclusion of error page fails """ try { // save content of the editor only to the tempora...
java
public void actionPreview() throws IOException, JspException { try { // save content of the editor only to the temporary file setEditorValues(getElementLocale()); writeContent(); CmsObject cloneCms = getCloneCms(); CmsUUID tempProjectId = OpenCms.getW...
[ "public", "void", "actionPreview", "(", ")", "throws", "IOException", ",", "JspException", "{", "try", "{", "// save content of the editor only to the temporary file", "setEditorValues", "(", "getElementLocale", "(", ")", ")", ";", "writeContent", "(", ")", ";", "CmsO...
Performs the preview XML content action in a new browser window.<p> @throws IOException if redirect fails @throws JspException if inclusion of error page fails
[ "Performs", "the", "preview", "XML", "content", "action", "in", "a", "new", "browser", "window", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsXmlContentEditor.java#L534-L568
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/Workspace.java
Workspace.workspaceToElement
public Element workspaceToElement() { """ Serialize an AtomService.DefaultWorkspace object into an XML element """ final Workspace space = this; final Element element = new Element("workspace", AtomService.ATOM_PROTOCOL); final Element titleElem = new Element("title", AtomService.ATOM...
java
public Element workspaceToElement() { final Workspace space = this; final Element element = new Element("workspace", AtomService.ATOM_PROTOCOL); final Element titleElem = new Element("title", AtomService.ATOM_FORMAT); titleElem.setText(space.getTitle()); if (space.getTitleType(...
[ "public", "Element", "workspaceToElement", "(", ")", "{", "final", "Workspace", "space", "=", "this", ";", "final", "Element", "element", "=", "new", "Element", "(", "\"workspace\"", ",", "AtomService", ".", "ATOM_PROTOCOL", ")", ";", "final", "Element", "titl...
Serialize an AtomService.DefaultWorkspace object into an XML element
[ "Serialize", "an", "AtomService", ".", "DefaultWorkspace", "object", "into", "an", "XML", "element" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/Workspace.java#L119-L136
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java
FastaAFPChainConverter.fastaToAfpChain
public static AFPChain fastaToAfpChain(ProteinSequence sequence1, ProteinSequence sequence2, Structure structure1, Structure structure2) throws StructureException { """ Returns an AFPChain corresponding to the alignment between {@code structure1} and {@code structure2}, which is given by the gapped protein sequ...
java
public static AFPChain fastaToAfpChain(ProteinSequence sequence1, ProteinSequence sequence2, Structure structure1, Structure structure2) throws StructureException { if (structure1 == null || structure2 == null) { throw new IllegalArgumentException("A structure is null"); } if (sequence1 == null || sequenc...
[ "public", "static", "AFPChain", "fastaToAfpChain", "(", "ProteinSequence", "sequence1", ",", "ProteinSequence", "sequence2", ",", "Structure", "structure1", ",", "Structure", "structure2", ")", "throws", "StructureException", "{", "if", "(", "structure1", "==", "null"...
Returns an AFPChain corresponding to the alignment between {@code structure1} and {@code structure2}, which is given by the gapped protein sequences {@code sequence1} and {@code sequence2}. The sequences need not correspond to the entire structures, since local alignment is performed to match the sequences to structure...
[ "Returns", "an", "AFPChain", "corresponding", "to", "the", "alignment", "between", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java#L275-L302
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreReader.java
DefaultDatastoreReader.loadByName
public <E> List<E> loadByName(Class<E> entityClass, List<String> identifiers) { """ Loads and returns the entities with the given <b>names (a.k.a String IDs)</b>. The entities are assumed to be root entities (no parent). The entity kind is determined from the supplied class. @param entityClass the entity clas...
java
public <E> List<E> loadByName(Class<E> entityClass, List<String> identifiers) { Key[] nativeKeys = stringListToNativeKeys(entityClass, identifiers); return fetch(entityClass, nativeKeys); }
[ "public", "<", "E", ">", "List", "<", "E", ">", "loadByName", "(", "Class", "<", "E", ">", "entityClass", ",", "List", "<", "String", ">", "identifiers", ")", "{", "Key", "[", "]", "nativeKeys", "=", "stringListToNativeKeys", "(", "entityClass", ",", "...
Loads and returns the entities with the given <b>names (a.k.a String IDs)</b>. The entities are assumed to be root entities (no parent). The entity kind is determined from the supplied class. @param entityClass the entity class @param identifiers the IDs of the entities @return the list of entity objects in the same o...
[ "Loads", "and", "returns", "the", "entities", "with", "the", "given", "<b", ">", "names", "(", "a", ".", "k", ".", "a", "String", "IDs", ")", "<", "/", "b", ">", ".", "The", "entities", "are", "assumed", "to", "be", "root", "entities", "(", "no", ...
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreReader.java#L228-L231
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/blockdata/BlockDataHandler.java
BlockDataHandler.setBlockData
static void setBlockData(int chunkX, int chunkZ, String identifier, ByteBuf data) { """ Called on the client when receiving the data from the server, either because client started to watch the chunk or server manually sent the data. @param chunkX the chunk X @param chunkZ the chunk Z @param identifier the id...
java
static void setBlockData(int chunkX, int chunkZ, String identifier, ByteBuf data) { HandlerInfo<?> handlerInfo = instance.handlerInfos.get(identifier); if (handlerInfo == null) return; //MalisisCore.message("Received blockData (" + chunkX + "/" + chunkZ + ") for " + identifier); Chunk chunk = Utils.getClie...
[ "static", "void", "setBlockData", "(", "int", "chunkX", ",", "int", "chunkZ", ",", "String", "identifier", ",", "ByteBuf", "data", ")", "{", "HandlerInfo", "<", "?", ">", "handlerInfo", "=", "instance", ".", "handlerInfos", ".", "get", "(", "identifier", "...
Called on the client when receiving the data from the server, either because client started to watch the chunk or server manually sent the data. @param chunkX the chunk X @param chunkZ the chunk Z @param identifier the identifier @param data the data
[ "Called", "on", "the", "client", "when", "receiving", "the", "data", "from", "the", "server", "either", "because", "client", "started", "to", "watch", "the", "chunk", "or", "server", "manually", "sent", "the", "data", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/blockdata/BlockDataHandler.java#L375-L385
anotheria/moskito
moskito-webui/src/main/java/net/anotheria/moskito/webui/shared/action/BaseMoskitoUIAction.java
BaseMoskitoUIAction.rebuildQueryStringWithoutParameter
protected String rebuildQueryStringWithoutParameter(String source, String ... params) { """ Rebuilds query string from source. @param source original source. @param params parameters that should be included in the query string. @return """ if (source==null || source.length()==0) return ""; if (params...
java
protected String rebuildQueryStringWithoutParameter(String source, String ... params){ if (source==null || source.length()==0) return ""; if (params == null || params.length==0) return source; HashSet<String> paramsSet = new HashSet<String>(params.length); paramsSet.addAll(Arrays.asList(params)); String...
[ "protected", "String", "rebuildQueryStringWithoutParameter", "(", "String", "source", ",", "String", "...", "params", ")", "{", "if", "(", "source", "==", "null", "||", "source", ".", "length", "(", ")", "==", "0", ")", "return", "\"\"", ";", "if", "(", ...
Rebuilds query string from source. @param source original source. @param params parameters that should be included in the query string. @return
[ "Rebuilds", "query", "string", "from", "source", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-webui/src/main/java/net/anotheria/moskito/webui/shared/action/BaseMoskitoUIAction.java#L635-L653
wisdom-framework/wisdom-jcr
wisdom-modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestNodeHandlerImpl.java
RestNodeHandlerImpl.updateNodeWithId
@Override public RestItem updateNodeWithId(Request request, String rawRepositoryName, String rawWorkspaceName, String id, String requestContent) throws RepositoryExcept...
java
@Override public RestItem updateNodeWithId(Request request, String rawRepositoryName, String rawWorkspaceName, String id, String requestContent) throws RepositoryExcept...
[ "@", "Override", "public", "RestItem", "updateNodeWithId", "(", "Request", "request", ",", "String", "rawRepositoryName", ",", "String", "rawWorkspaceName", ",", "String", "id", ",", "String", "requestContent", ")", "throws", "RepositoryException", "{", "Session", "...
Updates the properties at the path. <p> If path points to a property, this method expects the request content to be either a JSON array or a JSON string. The array or string will become the values or value of the property. If path points to a node, this method expects the request content to be a JSON object. The keys o...
[ "Updates", "the", "properties", "at", "the", "path", ".", "<p", ">", "If", "path", "points", "to", "a", "property", "this", "method", "expects", "the", "request", "content", "to", "be", "either", "a", "JSON", "array", "or", "a", "JSON", "string", ".", ...
train
https://github.com/wisdom-framework/wisdom-jcr/blob/2711383dde2239a19b90c226b3fd2aecab5715e4/wisdom-modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestNodeHandlerImpl.java#L107-L119
rzwitserloot/lombok
experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java
DisableCheckedExceptionsAgent.process
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { """ Does nothing - we just wanted the init method so we can inject an agent. """ if (errorToShow != null) { if (errorToShow != null) { Set<? extends Element> rootElements = roundEnv.getRootElements();...
java
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { if (errorToShow != null) { if (errorToShow != null) { Set<? extends Element> rootElements = roundEnv.getRootElements(); if (!rootElements.isEmpty()) { processingEnv.getMessager().printMessage(Kind.WAR...
[ "@", "Override", "public", "boolean", "process", "(", "Set", "<", "?", "extends", "TypeElement", ">", "annotations", ",", "RoundEnvironment", "roundEnv", ")", "{", "if", "(", "errorToShow", "!=", "null", ")", "{", "if", "(", "errorToShow", "!=", "null", ")...
Does nothing - we just wanted the init method so we can inject an agent.
[ "Does", "nothing", "-", "we", "just", "wanted", "the", "init", "method", "so", "we", "can", "inject", "an", "agent", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java#L65-L76
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.listFromJobScheduleNextAsync
public ServiceFuture<List<CloudJob>> listFromJobScheduleNextAsync(final String nextPageLink, final ServiceFuture<List<CloudJob>> serviceFuture, final ListOperationCallback<CloudJob> serviceCallback) { """ Lists the jobs that have been created under the specified job schedule. @param nextPageLink The NextLink fr...
java
public ServiceFuture<List<CloudJob>> listFromJobScheduleNextAsync(final String nextPageLink, final ServiceFuture<List<CloudJob>> serviceFuture, final ListOperationCallback<CloudJob> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listFromJobScheduleNextSinglePageAsync(nextPageLi...
[ "public", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "listFromJobScheduleNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "serviceFuture", ",", "final", "ListOperationCallback", ...
Lists the jobs that have been created under the specified job schedule. @param nextPageLink The NextLink from the previous successful call to List operation. @param serviceFuture the ServiceFuture object tracking the Retrofit calls @param serviceCallback the async ServiceCallback to handle successful and failed respon...
[ "Lists", "the", "jobs", "that", "have", "been", "created", "under", "the", "specified", "job", "schedule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L3578-L3588
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java
OverrideService.updateRepeatNumber
public void updateRepeatNumber(int overrideId, int pathId, Integer ordinal, Integer repeatNumber, String clientUUID) { """ Update the repeat number for a given enabled override @param overrideId - override ID to update @param pathId - path ID to update @param ordinal - can be null, Index of the enabled overri...
java
public void updateRepeatNumber(int overrideId, int pathId, Integer ordinal, Integer repeatNumber, String clientUUID) { if (ordinal == null) { ordinal = 1; } try { // get ID of the ordinal int enabledId = getEnabledEndpoint(pathId, overrideId, ordinal, clientU...
[ "public", "void", "updateRepeatNumber", "(", "int", "overrideId", ",", "int", "pathId", ",", "Integer", "ordinal", ",", "Integer", "repeatNumber", ",", "String", "clientUUID", ")", "{", "if", "(", "ordinal", "==", "null", ")", "{", "ordinal", "=", "1", ";"...
Update the repeat number for a given enabled override @param overrideId - override ID to update @param pathId - path ID to update @param ordinal - can be null, Index of the enabled override to edit if multiple of the same are enabled @param repeatNumber - number of times to repeat @param clientUUID - clientUUID
[ "Update", "the", "repeat", "number", "for", "a", "given", "enabled", "override" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java#L188-L200
osiam/connector4java
src/main/java/org/osiam/resources/scim/Extension.java
Extension.getField
public <T> T getField(String field, ExtensionFieldType<T> extensionFieldType) { """ Return the value for the field with a given name and type. @param field The name of the field to retrieve the value of. @param extensionFieldType The type of the field. @return The value for the field with the giv...
java
public <T> T getField(String field, ExtensionFieldType<T> extensionFieldType) { if (field == null || field.isEmpty()) { throw new IllegalArgumentException("Invalid field name"); } if (extensionFieldType == null) { throw new IllegalArgumentException("Invalid field type"); ...
[ "public", "<", "T", ">", "T", "getField", "(", "String", "field", ",", "ExtensionFieldType", "<", "T", ">", "extensionFieldType", ")", "{", "if", "(", "field", "==", "null", "||", "field", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArg...
Return the value for the field with a given name and type. @param field The name of the field to retrieve the value of. @param extensionFieldType The type of the field. @return The value for the field with the given name. @throws NoSuchElementException if this schema does not contain a field of the give...
[ "Return", "the", "value", "for", "the", "field", "with", "a", "given", "name", "and", "type", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/resources/scim/Extension.java#L88-L101
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java
HBaseDataHandler.populateEntityFromHBaseData
private Object populateEntityFromHBaseData(Object entity, HBaseDataWrapper hbaseData, EntityMetadata m, Object rowKey) { """ Populate entity from hBase data. @param entity the entity @param hbaseData the hbase data @param m the m @param rowKey the row key @return the object """ t...
java
private Object populateEntityFromHBaseData(Object entity, HBaseDataWrapper hbaseData, EntityMetadata m, Object rowKey) { try { Map<String, Object> relations = new HashMap<String, Object>(); if (entity.getClass().isAssignableFrom(EnhanceEntity.class)) {...
[ "private", "Object", "populateEntityFromHBaseData", "(", "Object", "entity", ",", "HBaseDataWrapper", "hbaseData", ",", "EntityMetadata", "m", ",", "Object", "rowKey", ")", "{", "try", "{", "Map", "<", "String", ",", "Object", ">", "relations", "=", "new", "Ha...
Populate entity from hBase data. @param entity the entity @param hbaseData the hbase data @param m the m @param rowKey the row key @return the object
[ "Populate", "entity", "from", "hBase", "data", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java#L519-L546
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java
RoleDefinitionsInner.createOrUpdate
public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId, RoleDefinitionProperties properties) { """ Creates or updates a role definition. @param scope The scope of the role definition. @param roleDefinitionId The ID of the role definition. @param properties Role definition properties. ...
java
public RoleDefinitionInner createOrUpdate(String scope, String roleDefinitionId, RoleDefinitionProperties properties) { return createOrUpdateWithServiceResponseAsync(scope, roleDefinitionId, properties).toBlocking().single().body(); }
[ "public", "RoleDefinitionInner", "createOrUpdate", "(", "String", "scope", ",", "String", "roleDefinitionId", ",", "RoleDefinitionProperties", "properties", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "scope", ",", "roleDefinitionId", ",", "properties...
Creates or updates a role definition. @param scope The scope of the role definition. @param roleDefinitionId The ID of the role definition. @param properties Role definition properties. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by...
[ "Creates", "or", "updates", "a", "role", "definition", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsInner.java#L348-L350
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java
BoBHash.fromSrc
public static BoBHash fromSrc(String src) { """ Get BoB hash from src attribute string. @param src @return the BoB hash """ String hashType = src.substring(src.lastIndexOf("cid:") + 4, src.indexOf("+")); String hash = src.substring(src.indexOf("+") + 1, src.indexOf("@bob.xmpp.org")); ...
java
public static BoBHash fromSrc(String src) { String hashType = src.substring(src.lastIndexOf("cid:") + 4, src.indexOf("+")); String hash = src.substring(src.indexOf("+") + 1, src.indexOf("@bob.xmpp.org")); return new BoBHash(hash, hashType); }
[ "public", "static", "BoBHash", "fromSrc", "(", "String", "src", ")", "{", "String", "hashType", "=", "src", ".", "substring", "(", "src", ".", "lastIndexOf", "(", "\"cid:\"", ")", "+", "4", ",", "src", ".", "indexOf", "(", "\"+\"", ")", ")", ";", "St...
Get BoB hash from src attribute string. @param src @return the BoB hash
[ "Get", "BoB", "hash", "from", "src", "attribute", "string", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java#L103-L107
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/resourceindex/cdxserver/EmbeddedCDXServerIndex.java
EmbeddedCDXServerIndex.createAuthToken
protected AuthToken createAuthToken(WaybackRequest wbRequest, String urlkey) { """ <ul> <li>robots.txt may be ignored for embedded resources (CSS, images, javascripts)</li> <li>robots.txt may be ignored if {@code urlkey} starts with any of {@code ignoreRobotPaths}</li> </ul> @param wbRequest @param urlkey @r...
java
protected AuthToken createAuthToken(WaybackRequest wbRequest, String urlkey) { AuthToken waybackAuthToken = new APContextAuthToken( wbRequest.getAccessPoint()); waybackAuthToken.setAllCdxFieldsAllow(); boolean ignoreRobots = wbRequest.isCSSContext() || wbRequest.isIMGContext() || wbRequest.isJSContext();...
[ "protected", "AuthToken", "createAuthToken", "(", "WaybackRequest", "wbRequest", ",", "String", "urlkey", ")", "{", "AuthToken", "waybackAuthToken", "=", "new", "APContextAuthToken", "(", "wbRequest", ".", "getAccessPoint", "(", ")", ")", ";", "waybackAuthToken", "....
<ul> <li>robots.txt may be ignored for embedded resources (CSS, images, javascripts)</li> <li>robots.txt may be ignored if {@code urlkey} starts with any of {@code ignoreRobotPaths}</li> </ul> @param wbRequest @param urlkey @return {@link AuthToken} representing user's privileges on {@code urlkey}.
[ "<ul", ">", "<li", ">", "robots", ".", "txt", "may", "be", "ignored", "for", "embedded", "resources", "(", "CSS", "images", "javascripts", ")", "<", "/", "li", ">", "<li", ">", "robots", ".", "txt", "may", "be", "ignored", "if", "{" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdxserver/EmbeddedCDXServerIndex.java#L132-L154
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/GenericFilter.java
GenericFilter.doFilter
public final void doFilter(final ServletRequest pRequest, final ServletResponse pResponse, final FilterChain pFilterChain) throws IOException, ServletException { """ The {@code doFilter} method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client ...
java
public final void doFilter(final ServletRequest pRequest, final ServletResponse pResponse, final FilterChain pFilterChain) throws IOException, ServletException { // If request filter and already run, continue chain and return fast if (oncePerRequest && isRunOnce(pRequest)) { pFilterChain....
[ "public", "final", "void", "doFilter", "(", "final", "ServletRequest", "pRequest", ",", "final", "ServletResponse", "pResponse", ",", "final", "FilterChain", "pFilterChain", ")", "throws", "IOException", ",", "ServletException", "{", "// If request filter and already run,...
The {@code doFilter} method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. <p/> Subclasses <em>should not override this method</em>, but rather the abstract {@link #doFilterImpl(javax.servlet.ServletR...
[ "The", "{", "@code", "doFilter", "}", "method", "of", "the", "Filter", "is", "called", "by", "the", "container", "each", "time", "a", "request", "/", "response", "pair", "is", "passed", "through", "the", "chain", "due", "to", "a", "client", "request", "f...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/GenericFilter.java#L200-L209
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queues.java
Queues.getQueues
public static ArrayList<QueueModel> getQueues(Client client, String previousQueueName) throws IOException { """ Retrieves queues in alphabetical order. @param previousQueueName this is the last queue on the previous page, it will start from the next one. If queue with specified name doesn't exist result will c...
java
public static ArrayList<QueueModel> getQueues(Client client, String previousQueueName) throws IOException { return getQueues(client, previousQueueName, null, null); }
[ "public", "static", "ArrayList", "<", "QueueModel", ">", "getQueues", "(", "Client", "client", ",", "String", "previousQueueName", ")", "throws", "IOException", "{", "return", "getQueues", "(", "client", ",", "previousQueueName", ",", "null", ",", "null", ")", ...
Retrieves queues in alphabetical order. @param previousQueueName this is the last queue on the previous page, it will start from the next one. If queue with specified name doesn't exist result will contain first per_page queues that lexicographically greater than previous @throws HTTPException If the IronMQ service r...
[ "Retrieves", "queues", "in", "alphabetical", "order", "." ]
train
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queues.java#L62-L64
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAGNode.java
MDAGNode.reassignOutgoingTransition
public void reassignOutgoingTransition(char letter, MDAGNode oldTargetNode, MDAGNode newTargetNode) { """ 重新设置转移状态函数的目标 Reassigns the target node of one of this node's outgoing transitions. @param letter the char which labels the outgoing _transition of interest @param oldTargetNode the MDAGNod...
java
public void reassignOutgoingTransition(char letter, MDAGNode oldTargetNode, MDAGNode newTargetNode) { oldTargetNode.incomingTransitionCount--; newTargetNode.incomingTransitionCount++; outgoingTransitionTreeMap.put(letter, newTargetNode); }
[ "public", "void", "reassignOutgoingTransition", "(", "char", "letter", ",", "MDAGNode", "oldTargetNode", ",", "MDAGNode", "newTargetNode", ")", "{", "oldTargetNode", ".", "incomingTransitionCount", "--", ";", "newTargetNode", ".", "incomingTransitionCount", "++", ";", ...
重新设置转移状态函数的目标 Reassigns the target node of one of this node's outgoing transitions. @param letter the char which labels the outgoing _transition of interest @param oldTargetNode the MDAGNode that is currently the target of the _transition of interest @param newTargetNode the MDAGNode that is to be t...
[ "重新设置转移状态函数的目标", "Reassigns", "the", "target", "node", "of", "one", "of", "this", "node", "s", "outgoing", "transitions", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAGNode.java#L387-L393
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F3.applyOrElse
public R applyOrElse(P1 p1, P2 p2, P3 p3, F3<? super P1, ? super P2, ? super P3, ? extends R> fallback) { """ Applies this partial function to the given argument when it is contained in the function domain. Applies fallback function where this partial function is not defined. @param p1 the first argument @pa...
java
public R applyOrElse(P1 p1, P2 p2, P3 p3, F3<? super P1, ? super P2, ? super P3, ? extends R> fallback) { try { return apply(p1, p2, p3); } catch (RuntimeException e) { return fallback.apply(p1, p2, p3); } }
[ "public", "R", "applyOrElse", "(", "P1", "p1", ",", "P2", "p2", ",", "P3", "p3", ",", "F3", "<", "?", "super", "P1", ",", "?", "super", "P2", ",", "?", "super", "P3", ",", "?", "extends", "R", ">", "fallback", ")", "{", "try", "{", "return", ...
Applies this partial function to the given argument when it is contained in the function domain. Applies fallback function where this partial function is not defined. @param p1 the first argument @param p2 the second argument @param p3 the third argument @param fallback the function to be called of application of this...
[ "Applies", "this", "partial", "function", "to", "the", "given", "argument", "when", "it", "is", "contained", "in", "the", "function", "domain", ".", "Applies", "fallback", "function", "where", "this", "partial", "function", "is", "not", "defined", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L1202-L1208
hal/core
gui/src/main/java/org/jboss/as/console/client/shared/flow/TimeoutOperation.java
TimeoutOperation.start
public final void start(final DispatchAsync dispatcher, final ModelNode operation, final Callback callback) { """ Executes a DMR operation and repeatedly calls {@code checker} until {@link #setConditionSatisfied(boolean)} was called with {@code true} or the timeout is reached. @param dispatcher the dispatcher ...
java
public final void start(final DispatchAsync dispatcher, final ModelNode operation, final Callback callback) { Command dispatchCmd = new Command() { @Override public void execute() { dispatcher.execute(new DMRAction(operation), new AsyncCallback<DMRResponse>() { ...
[ "public", "final", "void", "start", "(", "final", "DispatchAsync", "dispatcher", ",", "final", "ModelNode", "operation", ",", "final", "Callback", "callback", ")", "{", "Command", "dispatchCmd", "=", "new", "Command", "(", ")", "{", "@", "Override", "public", ...
Executes a DMR operation and repeatedly calls {@code checker} until {@link #setConditionSatisfied(boolean)} was called with {@code true} or the timeout is reached. @param dispatcher the dispatcher @param operation the DMR operation which should be executed @param callback the final callback
[ "Executes", "a", "DMR", "operation", "and", "repeatedly", "calls", "{", "@code", "checker", "}", "until", "{", "@link", "#setConditionSatisfied", "(", "boolean", ")", "}", "was", "called", "with", "{", "@code", "true", "}", "or", "the", "timeout", "is", "r...
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/shared/flow/TimeoutOperation.java#L53-L72
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java
TokenLifeCycleManager.getInstance
static TokenLifeCycleManager getInstance(final String iamEndpoint, final String apiKey) { """ Get an instance of TokenLifeCylceManager. Single instance is maintained for each unique pair of iamEndpoint and apiKey. The method is thread safe. @param iamEndpoint IAM endpoint. @param apiKey IAM API...
java
static TokenLifeCycleManager getInstance(final String iamEndpoint, final String apiKey) { if (iamEndpoint == null || iamEndpoint.isEmpty()) { throw new IllegalArgumentException( "Cannot initialize with null or empty IAM endpoint."); } if (apiKey == nul...
[ "static", "TokenLifeCycleManager", "getInstance", "(", "final", "String", "iamEndpoint", ",", "final", "String", "apiKey", ")", "{", "if", "(", "iamEndpoint", "==", "null", "||", "iamEndpoint", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgume...
Get an instance of TokenLifeCylceManager. Single instance is maintained for each unique pair of iamEndpoint and apiKey. The method is thread safe. @param iamEndpoint IAM endpoint. @param apiKey IAM API Key. @return Instance of TokenLifeCylceManager
[ "Get", "an", "instance", "of", "TokenLifeCylceManager", ".", "Single", "instance", "is", "maintained", "for", "each", "unique", "pair", "of", "iamEndpoint", "and", "apiKey", ".", "The", "method", "is", "thread", "safe", "." ]
train
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java#L184-L195
apache/spark
common/network-common/src/main/java/org/apache/spark/network/TransportContext.java
TransportContext.createServer
public TransportServer createServer( String host, int port, List<TransportServerBootstrap> bootstraps) { """ Create a server which will attempt to bind to a specific host and port. """ return new TransportServer(this, host, port, rpcHandler, bootstraps); }
java
public TransportServer createServer( String host, int port, List<TransportServerBootstrap> bootstraps) { return new TransportServer(this, host, port, rpcHandler, bootstraps); }
[ "public", "TransportServer", "createServer", "(", "String", "host", ",", "int", "port", ",", "List", "<", "TransportServerBootstrap", ">", "bootstraps", ")", "{", "return", "new", "TransportServer", "(", "this", ",", "host", ",", "port", ",", "rpcHandler", ","...
Create a server which will attempt to bind to a specific host and port.
[ "Create", "a", "server", "which", "will", "attempt", "to", "bind", "to", "a", "specific", "host", "and", "port", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/TransportContext.java#L155-L158
molgenis/molgenis
molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/repository/impl/MappingProjectRepositoryImpl.java
MappingProjectRepositoryImpl.toMappingProject
private MappingProject toMappingProject(Entity mappingProjectEntity) { """ Creates a fully reconstructed MappingProject from an Entity retrieved from the repository. @param mappingProjectEntity Entity with {@link MappingProjectMetadata} metadata @return fully reconstructed MappingProject """ String ide...
java
private MappingProject toMappingProject(Entity mappingProjectEntity) { String identifier = mappingProjectEntity.getString(MappingProjectMetadata.IDENTIFIER); String name = mappingProjectEntity.getString(MappingProjectMetadata.NAME); int depth = Optional.ofNullable(mappingProjectEntity.getInt(DEPTH)).orElse(...
[ "private", "MappingProject", "toMappingProject", "(", "Entity", "mappingProjectEntity", ")", "{", "String", "identifier", "=", "mappingProjectEntity", ".", "getString", "(", "MappingProjectMetadata", ".", "IDENTIFIER", ")", ";", "String", "name", "=", "mappingProjectEnt...
Creates a fully reconstructed MappingProject from an Entity retrieved from the repository. @param mappingProjectEntity Entity with {@link MappingProjectMetadata} metadata @return fully reconstructed MappingProject
[ "Creates", "a", "fully", "reconstructed", "MappingProject", "from", "an", "Entity", "retrieved", "from", "the", "repository", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/repository/impl/MappingProjectRepositoryImpl.java#L92-L102
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java
HawkbitCommonUtil.formattingFinishedPercentage
public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) { """ Formats the finished percentage of a rollout group into a string with one digit after comma. @param rolloutGroup the rollout group @param finishedPercentage the calculated finished percen...
java
public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) { float tmpFinishedPercentage = 0; switch (rolloutGroup.getStatus()) { case READY: case SCHEDULED: case ERROR: tmpFinishedPercentage = 0.0F; ...
[ "public", "static", "String", "formattingFinishedPercentage", "(", "final", "RolloutGroup", "rolloutGroup", ",", "final", "float", "finishedPercentage", ")", "{", "float", "tmpFinishedPercentage", "=", "0", ";", "switch", "(", "rolloutGroup", ".", "getStatus", "(", ...
Formats the finished percentage of a rollout group into a string with one digit after comma. @param rolloutGroup the rollout group @param finishedPercentage the calculated finished percentage of the rolloutgroup @return formatted String value
[ "Formats", "the", "finished", "percentage", "of", "a", "rollout", "group", "into", "a", "string", "with", "one", "digit", "after", "comma", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L464-L482
intellimate/Izou
src/main/java/org/intellimate/izou/output/OutputManager.java
OutputManager.addOutputPlugin
public void addOutputPlugin(OutputPluginModel<?, ?> outputPlugin) throws IllegalIDException { """ adds outputPlugin to outputPluginList, starts a new thread for the outputPlugin, and stores the future object in a HashMap @param outputPlugin OutputPlugin to add @throws IllegalIDException not yet implemented ...
java
public void addOutputPlugin(OutputPluginModel<?, ?> outputPlugin) throws IllegalIDException { if (!futureHashMap.containsKey(outputPlugin.getID())) { outputPlugins.add(outputPlugin); futureHashMap.put(outputPlugin.getID(), submit(outputPlugin)); } else { if (futureHas...
[ "public", "void", "addOutputPlugin", "(", "OutputPluginModel", "<", "?", ",", "?", ">", "outputPlugin", ")", "throws", "IllegalIDException", "{", "if", "(", "!", "futureHashMap", ".", "containsKey", "(", "outputPlugin", ".", "getID", "(", ")", ")", ")", "{",...
adds outputPlugin to outputPluginList, starts a new thread for the outputPlugin, and stores the future object in a HashMap @param outputPlugin OutputPlugin to add @throws IllegalIDException not yet implemented
[ "adds", "outputPlugin", "to", "outputPluginList", "starts", "a", "new", "thread", "for", "the", "outputPlugin", "and", "stores", "the", "future", "object", "in", "a", "HashMap" ]
train
https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/output/OutputManager.java#L67-L77
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.tagImageInStreamWithServiceResponseAsync
public Observable<ServiceResponse<TagResult>> tagImageInStreamWithServiceResponseAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter) { """ This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can retu...
java
public Observable<ServiceResponse<TagResult>> tagImageInStreamWithServiceResponseAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and canno...
[ "public", "Observable", "<", "ServiceResponse", "<", "TagResult", ">", ">", "tagImageInStreamWithServiceResponseAsync", "(", "byte", "[", "]", "image", ",", "TagImageInStreamOptionalParameter", "tagImageInStreamOptionalParameter", ")", "{", "if", "(", "this", ".", "clie...
This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but corresp...
[ "This", "operation", "generates", "a", "list", "of", "words", "or", "tags", "that", "are", "relevant", "to", "the", "content", "of", "the", "supplied", "image", ".", "The", "Computer", "Vision", "API", "can", "return", "tags", "based", "on", "objects", "li...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L468-L478
OpenLiberty/open-liberty
dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/LoggingFileUtils.java
LoggingFileUtils.showErrorMsg
private static void showErrorMsg(boolean showError, String msgKey, Object[] objs) { """ Show the error message if showError is true @param showError @param msgKey @param objs """ if (showError) { String msg = Tr.formatMessage(TraceSpecification.getTc(), msgKey, objs); BaseT...
java
private static void showErrorMsg(boolean showError, String msgKey, Object[] objs) { if (showError) { String msg = Tr.formatMessage(TraceSpecification.getTc(), msgKey, objs); BaseTraceService.rawSystemErr.println(msg); } }
[ "private", "static", "void", "showErrorMsg", "(", "boolean", "showError", ",", "String", "msgKey", ",", "Object", "[", "]", "objs", ")", "{", "if", "(", "showError", ")", "{", "String", "msg", "=", "Tr", ".", "formatMessage", "(", "TraceSpecification", "."...
Show the error message if showError is true @param showError @param msgKey @param objs
[ "Show", "the", "error", "message", "if", "showError", "is", "true" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/LoggingFileUtils.java#L127-L132
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java
SPUIComponentProvider.getButton
public static Button getButton(final String id, final String buttonName, final String buttonDesc, final String style, final boolean setStyle, final Resource icon, final Class<? extends SPUIButtonDecorator> buttonDecoratorclassName) { """ Get Button - Factory Approach for decoration. @par...
java
public static Button getButton(final String id, final String buttonName, final String buttonDesc, final String style, final boolean setStyle, final Resource icon, final Class<? extends SPUIButtonDecorator> buttonDecoratorclassName) { Button button = null; SPUIButtonDecorator butt...
[ "public", "static", "Button", "getButton", "(", "final", "String", "id", ",", "final", "String", "buttonName", ",", "final", "String", "buttonDesc", ",", "final", "String", "style", ",", "final", "boolean", "setStyle", ",", "final", "Resource", "icon", ",", ...
Get Button - Factory Approach for decoration. @param id as string @param buttonName as string @param buttonDesc as string @param style string as string @param setStyle string as boolean @param icon as image @param buttonDecoratorclassName as decorator @return Button as UI
[ "Get", "Button", "-", "Factory", "Approach", "for", "decoration", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L139-L155
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java
FieldDescriptorConstraints.checkSequenceName
private void checkSequenceName(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException { """ Checks that sequence-name is only used with autoincrement='ojb' @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked in basic and strict) @excep...
java
private void checkSequenceName(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } String autoIncr = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_AUTOINCREMENT); String seqNa...
[ "private", "void", "checkSequenceName", "(", "FieldDescriptorDef", "fieldDef", ",", "String", "checkLevel", ")", "throws", "ConstraintException", "{", "if", "(", "CHECKLEVEL_NONE", ".", "equals", "(", "checkLevel", ")", ")", "{", "return", ";", "}", "String", "a...
Checks that sequence-name is only used with autoincrement='ojb' @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked in basic and strict) @exception ConstraintException If the constraint has been violated
[ "Checks", "that", "sequence", "-", "name", "is", "only", "used", "with", "autoincrement", "=", "ojb" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L339-L356
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.parseCapacity
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { """ Parse capacity tag @param reader reader @return the parsed capacity object @throws XMLStreamException in case of error @throws ParserException in case of error @throws ValidateE...
java
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { Extension incrementer = null; Extension decrementer = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT : {...
[ "protected", "Capacity", "parseCapacity", "(", "XMLStreamReader", "reader", ")", "throws", "XMLStreamException", ",", "ParserException", ",", "ValidateException", "{", "Extension", "incrementer", "=", "null", ";", "Extension", "decrementer", "=", "null", ";", "while",...
Parse capacity tag @param reader reader @return the parsed capacity object @throws XMLStreamException in case of error @throws ParserException in case of error @throws ValidateException in case of error
[ "Parse", "capacity", "tag" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L836-L876
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.readLines
public static <T extends Collection<String>> T readLines(InputStream in, String charsetName, T collection) throws IORuntimeException { """ 从流中读取内容 @param <T> 集合类型 @param in 输入流 @param charsetName 字符集 @param collection 返回集合 @return 内容 @throws IORuntimeException IO异常 """ return readLines(in, CharsetUt...
java
public static <T extends Collection<String>> T readLines(InputStream in, String charsetName, T collection) throws IORuntimeException { return readLines(in, CharsetUtil.charset(charsetName), collection); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "readLines", "(", "InputStream", "in", ",", "String", "charsetName", ",", "T", "collection", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "in", ",",...
从流中读取内容 @param <T> 集合类型 @param in 输入流 @param charsetName 字符集 @param collection 返回集合 @return 内容 @throws IORuntimeException IO异常
[ "从流中读取内容" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L644-L646
heinrichreimer/material-drawer
library/src/main/java/com/heinrichreimersoftware/materialdrawer/structure/DrawerItem.java
DrawerItem.setImage
public DrawerItem setImage(Context context, Bitmap image, int imageMode) { """ Sets an image with a given image mode to the drawer item @param image Image to set @param imageMode Image mode to set """ return setImage(new BitmapDrawable(context.getResources(), image), imageMode); }
java
public DrawerItem setImage(Context context, Bitmap image, int imageMode) { return setImage(new BitmapDrawable(context.getResources(), image), imageMode); }
[ "public", "DrawerItem", "setImage", "(", "Context", "context", ",", "Bitmap", "image", ",", "int", "imageMode", ")", "{", "return", "setImage", "(", "new", "BitmapDrawable", "(", "context", ".", "getResources", "(", ")", ",", "image", ")", ",", "imageMode", ...
Sets an image with a given image mode to the drawer item @param image Image to set @param imageMode Image mode to set
[ "Sets", "an", "image", "with", "a", "given", "image", "mode", "to", "the", "drawer", "item" ]
train
https://github.com/heinrichreimer/material-drawer/blob/7c2406812d73f710ef8bb73d4a0f4bbef3b275ce/library/src/main/java/com/heinrichreimersoftware/materialdrawer/structure/DrawerItem.java#L194-L196
apache/incubator-gobblin
gobblin-restli/gobblin-restli-utils/src/main/java/org/apache/gobblin/restli/EmbeddedRestliServer.java
EmbeddedRestliServer.getListeningURI
public URI getListeningURI() { """ Get the scheme and authority at which this server is listening. """ try { return new URI(this.serverUri.getScheme(), this.serverUri.getUserInfo(), this.serverUri.getHost(), this.port, null, null, null); } catch (URISyntaxException use) { throw ne...
java
public URI getListeningURI() { try { return new URI(this.serverUri.getScheme(), this.serverUri.getUserInfo(), this.serverUri.getHost(), this.port, null, null, null); } catch (URISyntaxException use) { throw new RuntimeException("Invalid URI. This is an error in code.", use); } }
[ "public", "URI", "getListeningURI", "(", ")", "{", "try", "{", "return", "new", "URI", "(", "this", ".", "serverUri", ".", "getScheme", "(", ")", ",", "this", ".", "serverUri", ".", "getUserInfo", "(", ")", ",", "this", ".", "serverUri", ".", "getHost"...
Get the scheme and authority at which this server is listening.
[ "Get", "the", "scheme", "and", "authority", "at", "which", "this", "server", "is", "listening", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-restli-utils/src/main/java/org/apache/gobblin/restli/EmbeddedRestliServer.java#L162-L169
rahulsom/genealogy
src/main/java/com/github/rahulsom/genealogy/NameDbUsa.java
NameDbUsa.getNameObject
private Name getNameObject(List<? extends Name> list, double probability) { """ Finds name at a given cumulative probability accounting for gaps. @param list The list to look for name in @param probability the cumulative probability to search for (between 0 and 1) @return the name object """ ...
java
private Name getNameObject(List<? extends Name> list, double probability) { int index = Collections.binarySearch(list, new Name(null, probability), locateNameByCumulativeProbability); if (index >= 0) { return list.get(index); } else if (-index > list.size()) { throw new R...
[ "private", "Name", "getNameObject", "(", "List", "<", "?", "extends", "Name", ">", "list", ",", "double", "probability", ")", "{", "int", "index", "=", "Collections", ".", "binarySearch", "(", "list", ",", "new", "Name", "(", "null", ",", "probability", ...
Finds name at a given cumulative probability accounting for gaps. @param list The list to look for name in @param probability the cumulative probability to search for (between 0 and 1) @return the name object
[ "Finds", "name", "at", "a", "given", "cumulative", "probability", "accounting", "for", "gaps", "." ]
train
https://github.com/rahulsom/genealogy/blob/2beb35ab9c6e03080328aa08b18f0a3c5d3f5c12/src/main/java/com/github/rahulsom/genealogy/NameDbUsa.java#L94-L104
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/Flickr.java
Flickr.getTagsInterface
@Override public TagsInterface getTagsInterface() { """ Get the TagsInterface for working with Flickr Tags. @return The TagsInterface """ if (tagsInterface == null) { tagsInterface = new TagsInterface(apiKey, sharedSecret, transport); } return tagsInterface; }
java
@Override public TagsInterface getTagsInterface() { if (tagsInterface == null) { tagsInterface = new TagsInterface(apiKey, sharedSecret, transport); } return tagsInterface; }
[ "@", "Override", "public", "TagsInterface", "getTagsInterface", "(", ")", "{", "if", "(", "tagsInterface", "==", "null", ")", "{", "tagsInterface", "=", "new", "TagsInterface", "(", "apiKey", ",", "sharedSecret", ",", "transport", ")", ";", "}", "return", "t...
Get the TagsInterface for working with Flickr Tags. @return The TagsInterface
[ "Get", "the", "TagsInterface", "for", "working", "with", "Flickr", "Tags", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L583-L589
Azure/azure-sdk-for-java
recoveryservices.backup/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_06_01/implementation/RestoresInner.java
RestoresInner.trigger
public void trigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource resourceRestoreRequest) { """ Restores the specified backup data. This is an asynchronous operation. To know the status of this API call,...
java
public void trigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource resourceRestoreRequest) { triggerWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, ...
[ "public", "void", "trigger", "(", "String", "vaultName", ",", "String", "resourceGroupName", ",", "String", "fabricName", ",", "String", "containerName", ",", "String", "protectedItemName", ",", "String", "recoveryPointId", ",", "RestoreRequestResource", "resourceRestor...
Restores the specified backup data. This is an asynchronous operation. To know the status of this API call, use GetProtectedItemOperationResult API. @param vaultName The name of the Recovery Services vault. @param resourceGroupName The name of the resource group associated with the Recovery Services vault. @param fabr...
[ "Restores", "the", "specified", "backup", "data", ".", "This", "is", "an", "asynchronous", "operation", ".", "To", "know", "the", "status", "of", "this", "API", "call", "use", "GetProtectedItemOperationResult", "API", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_06_01/implementation/RestoresInner.java#L77-L79
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/utils/ToastUtils.java
ToastUtils.showToast
public static void showToast(String message, int duration) { """ Show the {@link Toast} on the current Thread. @param message The text to show. Can be formatted text. @param duration How long to display the message. Either {@link Toast#LENGTH_SHORT} {@link Toast#LENGTH_LONG} """ showToast(message, durati...
java
public static void showToast(String message, int duration) { showToast(message, duration, null, null, null); }
[ "public", "static", "void", "showToast", "(", "String", "message", ",", "int", "duration", ")", "{", "showToast", "(", "message", ",", "duration", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Show the {@link Toast} on the current Thread. @param message The text to show. Can be formatted text. @param duration How long to display the message. Either {@link Toast#LENGTH_SHORT} {@link Toast#LENGTH_LONG}
[ "Show", "the", "{", "@link", "Toast", "}", "on", "the", "current", "Thread", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/utils/ToastUtils.java#L85-L87
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/CmsSearchIndexSourceList.java
CmsSearchIndexSourceList.fillDetailResources
private void fillDetailResources(CmsListItem item, String detailId) { """ Fills details about resource paths of the index source into the given item. <p> @param item the list item to fill @param detailId the id for the detail to fill """ CmsSearchManager searchManager = OpenCms.getSearchManager();...
java
private void fillDetailResources(CmsListItem item, String detailId) { CmsSearchManager searchManager = OpenCms.getSearchManager(); StringBuffer html = new StringBuffer(); // search for the corresponding CmsSearchIndexSource: String idxSourceName = (String)item.get(LIST_COLUMN_NAME); ...
[ "private", "void", "fillDetailResources", "(", "CmsListItem", "item", ",", "String", "detailId", ")", "{", "CmsSearchManager", "searchManager", "=", "OpenCms", ".", "getSearchManager", "(", ")", ";", "StringBuffer", "html", "=", "new", "StringBuffer", "(", ")", ...
Fills details about resource paths of the index source into the given item. <p> @param item the list item to fill @param detailId the id for the detail to fill
[ "Fills", "details", "about", "resource", "paths", "of", "the", "index", "source", "into", "the", "given", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsSearchIndexSourceList.java#L439-L462