repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
188
func_name
stringlengths
7
127
whole_func_string
stringlengths
77
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
77
3.91k
func_code_tokens
listlengths
20
745
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
477
split_name
stringclasses
1 value
func_code_url
stringlengths
111
288
spring-cloud/spring-cloud-config
spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/VaultKvAccessStrategyFactory.java
VaultKvAccessStrategyFactory.forVersion
public static VaultKvAccessStrategy forVersion(RestOperations rest, String baseUrl, int version) { switch (version) { case 1: return new V1VaultKvAccessStrategy(baseUrl, rest); case 2: return new V2VaultKvAccessStrategy(baseUrl, rest); default: throw new IllegalArgumentException( "No support f...
java
public static VaultKvAccessStrategy forVersion(RestOperations rest, String baseUrl, int version) { switch (version) { case 1: return new V1VaultKvAccessStrategy(baseUrl, rest); case 2: return new V2VaultKvAccessStrategy(baseUrl, rest); default: throw new IllegalArgumentException( "No support f...
[ "public", "static", "VaultKvAccessStrategy", "forVersion", "(", "RestOperations", "rest", ",", "String", "baseUrl", ",", "int", "version", ")", "{", "switch", "(", "version", ")", "{", "case", "1", ":", "return", "new", "V1VaultKvAccessStrategy", "(", "baseUrl",...
Create a new {@link VaultKvAccessStrategy} given {@link RestOperations}, {@code baseUrl}, and {@code version}. @param rest must not be {@literal null}. @param baseUrl the Vault base URL. @param version version of the Vault key-value backend. @return the access strategy.
[ "Create", "a", "new", "{" ]
train
https://github.com/spring-cloud/spring-cloud-config/blob/6b99631f78bac4e1b521d2cc126c8b2da45d1f1f/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/VaultKvAccessStrategyFactory.java#L44-L56
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/HttpFileUploadManager.java
HttpFileUploadManager.uploadFile
public URL uploadFile(File file) throws InterruptedException, XMPPException.XMPPErrorException, SmackException, IOException { return uploadFile(file, null); }
java
public URL uploadFile(File file) throws InterruptedException, XMPPException.XMPPErrorException, SmackException, IOException { return uploadFile(file, null); }
[ "public", "URL", "uploadFile", "(", "File", "file", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ",", "IOException", "{", "return", "uploadFile", "(", "file", ",", "null", ")", ";", "}" ]
Request slot and uploaded file to HTTP file upload service. You don't need to request slot and upload file separately, this method will do both. Note that this is a synchronous call -- Smack must wait for the server response. @param file file to be uploaded @return public URL for sharing uploaded file @throws Interru...
[ "Request", "slot", "and", "uploaded", "file", "to", "HTTP", "file", "upload", "service", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/HttpFileUploadManager.java#L236-L239
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java
HttpFields.addDateField
public void addDateField(String name, long date) { if (_dateBuffer==null) { _dateBuffer=new StringBuffer(32); _calendar=new HttpCal(); } _dateBuffer.setLength(0); _calendar.setTimeInMillis(date); formatDate(_dateBuffer, _calendar, false); ...
java
public void addDateField(String name, long date) { if (_dateBuffer==null) { _dateBuffer=new StringBuffer(32); _calendar=new HttpCal(); } _dateBuffer.setLength(0); _calendar.setTimeInMillis(date); formatDate(_dateBuffer, _calendar, false); ...
[ "public", "void", "addDateField", "(", "String", "name", ",", "long", "date", ")", "{", "if", "(", "_dateBuffer", "==", "null", ")", "{", "_dateBuffer", "=", "new", "StringBuffer", "(", "32", ")", ";", "_calendar", "=", "new", "HttpCal", "(", ")", ";",...
Adds the value of a date field. @param name the field name @param date the field date value
[ "Adds", "the", "value", "of", "a", "date", "field", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1063-L1074
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.createGroup
public CmsGroup createGroup(CmsDbContext dbc, CmsUUID id, String name, String description, int flags, String parent) throws CmsIllegalArgumentException, CmsException { // check the group name OpenCms.getValidationHandler().checkGroupName(CmsOrganizationalUnit.getSimpleName(name)); // trim t...
java
public CmsGroup createGroup(CmsDbContext dbc, CmsUUID id, String name, String description, int flags, String parent) throws CmsIllegalArgumentException, CmsException { // check the group name OpenCms.getValidationHandler().checkGroupName(CmsOrganizationalUnit.getSimpleName(name)); // trim t...
[ "public", "CmsGroup", "createGroup", "(", "CmsDbContext", "dbc", ",", "CmsUUID", "id", ",", "String", "name", ",", "String", "description", ",", "int", "flags", ",", "String", "parent", ")", "throws", "CmsIllegalArgumentException", ",", "CmsException", "{", "// ...
Add a new group to the Cms.<p> Only the admin can do this. Only users, which are in the group "administrators" are granted.<p> @param dbc the current database context @param id the id of the new group @param name the name of the new group @param description the description for the new group @param flags the flags for...
[ "Add", "a", "new", "group", "to", "the", "Cms", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L1315-L1371
lastaflute/lastaflute
src/main/java/org/lastaflute/web/hook/GodHandPrologue.java
GodHandPrologue.createSqlStringFilter
protected SqlStringFilter createSqlStringFilter(ActionRuntime runtime) { final Method actionMethod = runtime.getExecuteMethod(); return newRomanticTraceableSqlStringFilter(actionMethod, () -> { return buildSqlMarkingAdditionalInfo(); // lazy because it may be auto-login later }); ...
java
protected SqlStringFilter createSqlStringFilter(ActionRuntime runtime) { final Method actionMethod = runtime.getExecuteMethod(); return newRomanticTraceableSqlStringFilter(actionMethod, () -> { return buildSqlMarkingAdditionalInfo(); // lazy because it may be auto-login later }); ...
[ "protected", "SqlStringFilter", "createSqlStringFilter", "(", "ActionRuntime", "runtime", ")", "{", "final", "Method", "actionMethod", "=", "runtime", ".", "getExecuteMethod", "(", ")", ";", "return", "newRomanticTraceableSqlStringFilter", "(", "actionMethod", ",", "(",...
Create the filter of SQL string for DBFlute. @param runtime The runtime meta of action execute. (NotNull) @return The filter of SQL string. (NullAllowed: if null, no filter)
[ "Create", "the", "filter", "of", "SQL", "string", "for", "DBFlute", "." ]
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/hook/GodHandPrologue.java#L169-L174
aws/aws-sdk-java
aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/ProvisioningArtifactSummary.java
ProvisioningArtifactSummary.withProvisioningArtifactMetadata
public ProvisioningArtifactSummary withProvisioningArtifactMetadata(java.util.Map<String, String> provisioningArtifactMetadata) { setProvisioningArtifactMetadata(provisioningArtifactMetadata); return this; }
java
public ProvisioningArtifactSummary withProvisioningArtifactMetadata(java.util.Map<String, String> provisioningArtifactMetadata) { setProvisioningArtifactMetadata(provisioningArtifactMetadata); return this; }
[ "public", "ProvisioningArtifactSummary", "withProvisioningArtifactMetadata", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "provisioningArtifactMetadata", ")", "{", "setProvisioningArtifactMetadata", "(", "provisioningArtifactMetadata", ")", ";", ...
<p> The metadata for the provisioning artifact. This is used with AWS Marketplace products. </p> @param provisioningArtifactMetadata The metadata for the provisioning artifact. This is used with AWS Marketplace products. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "metadata", "for", "the", "provisioning", "artifact", ".", "This", "is", "used", "with", "AWS", "Marketplace", "products", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/ProvisioningArtifactSummary.java#L257-L260
alkacon/opencms-core
src-gwt/org/opencms/ade/editprovider/client/CmsDirectEditToolbarHandler.java
CmsDirectEditToolbarHandler.insertContextMenu
public void insertContextMenu(List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId) { List<I_CmsContextMenuEntry> menuEntries = transformEntries(menuBeans, structureId); m_contextButton.showMenu(menuEntries); }
java
public void insertContextMenu(List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId) { List<I_CmsContextMenuEntry> menuEntries = transformEntries(menuBeans, structureId); m_contextButton.showMenu(menuEntries); }
[ "public", "void", "insertContextMenu", "(", "List", "<", "CmsContextMenuEntryBean", ">", "menuBeans", ",", "CmsUUID", "structureId", ")", "{", "List", "<", "I_CmsContextMenuEntry", ">", "menuEntries", "=", "transformEntries", "(", "menuBeans", ",", "structureId", ")...
Inserts the context menu.<p> @param menuBeans the menu beans from the server @param structureId the structure id of the resource at which the workplace should be opened
[ "Inserts", "the", "context", "menu", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/editprovider/client/CmsDirectEditToolbarHandler.java#L167-L171
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ServiceExtensionLoader.java
ServiceExtensionLoader.createFromLoadExtension
private <T extends Assignable> T createFromLoadExtension(Class<T> extensionClass, Archive<?> archive) { ExtensionWrapper extensionWrapper = loadExtensionMapping(extensionClass); if (extensionWrapper == null) { throw new RuntimeException("Failed to load ExtensionMapping"); } ...
java
private <T extends Assignable> T createFromLoadExtension(Class<T> extensionClass, Archive<?> archive) { ExtensionWrapper extensionWrapper = loadExtensionMapping(extensionClass); if (extensionWrapper == null) { throw new RuntimeException("Failed to load ExtensionMapping"); } ...
[ "private", "<", "T", "extends", "Assignable", ">", "T", "createFromLoadExtension", "(", "Class", "<", "T", ">", "extensionClass", ",", "Archive", "<", "?", ">", "archive", ")", "{", "ExtensionWrapper", "extensionWrapper", "=", "loadExtensionMapping", "(", "exten...
Creates a new instance of a <code>extensionClass</code> implementation. The implementation class is found in a provider-configuration file in META-INF/services/ @param <T> @param extensionClass @param archive @return an instance of the <code>extensionClass</code>' implementation.
[ "Creates", "a", "new", "instance", "of", "a", "<code", ">", "extensionClass<", "/", "code", ">", "implementation", ".", "The", "implementation", "class", "is", "found", "in", "a", "provider", "-", "configuration", "file", "in", "META", "-", "INF", "/", "se...
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ServiceExtensionLoader.java#L211-L224
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/ws/logging/internal/SafeTraceLevelIndexFactory.java
SafeTraceLevelIndexFactory.addFiltersAndValuesToIndex
private static void addFiltersAndValuesToIndex(BufferedReader br, PackageIndex<Integer> packageIndex) throws IOException { String line; while ((line = br.readLine()) != null) { if (line.isEmpty() || line.startsWith("#")) { continue; } int pos = line.in...
java
private static void addFiltersAndValuesToIndex(BufferedReader br, PackageIndex<Integer> packageIndex) throws IOException { String line; while ((line = br.readLine()) != null) { if (line.isEmpty() || line.startsWith("#")) { continue; } int pos = line.in...
[ "private", "static", "void", "addFiltersAndValuesToIndex", "(", "BufferedReader", "br", ",", "PackageIndex", "<", "Integer", ">", "packageIndex", ")", "throws", "IOException", "{", "String", "line", ";", "while", "(", "(", "line", "=", "br", ".", "readLine", "...
/* Add the filters and values to the index. The values are inserted as Integers for easy comparison in TraceComponent and to avoid having to recompute each time the spec is checked.
[ "/", "*", "Add", "the", "filters", "and", "values", "to", "the", "index", ".", "The", "values", "are", "inserted", "as", "Integers", "for", "easy", "comparison", "in", "TraceComponent", "and", "to", "avoid", "having", "to", "recompute", "each", "time", "th...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ws/logging/internal/SafeTraceLevelIndexFactory.java#L72-L85
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_webstorage_serviceName_storage_GET
public ArrayList<String> cdn_webstorage_serviceName_storage_GET(String serviceName, OvhOrderStorageEnum storage) throws IOException { String qPath = "/order/cdn/webstorage/{serviceName}/storage"; StringBuilder sb = path(qPath, serviceName); query(sb, "storage", storage); String resp = exec(qPath, "GET", sb.toSt...
java
public ArrayList<String> cdn_webstorage_serviceName_storage_GET(String serviceName, OvhOrderStorageEnum storage) throws IOException { String qPath = "/order/cdn/webstorage/{serviceName}/storage"; StringBuilder sb = path(qPath, serviceName); query(sb, "storage", storage); String resp = exec(qPath, "GET", sb.toSt...
[ "public", "ArrayList", "<", "String", ">", "cdn_webstorage_serviceName_storage_GET", "(", "String", "serviceName", ",", "OvhOrderStorageEnum", "storage", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/webstorage/{serviceName}/storage\"", ";", "Stri...
Get allowed durations for 'storage' option REST: GET /order/cdn/webstorage/{serviceName}/storage @param storage [required] Storage option that will be ordered @param serviceName [required] The internal name of your CDN Static offer
[ "Get", "allowed", "durations", "for", "storage", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5466-L5472
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java
SimpleRandomSampling.xbarStd
public static double xbarStd(double std, int sampleN) { return Math.sqrt(xbarVariance(std*std, sampleN, Integer.MAX_VALUE)); }
java
public static double xbarStd(double std, int sampleN) { return Math.sqrt(xbarVariance(std*std, sampleN, Integer.MAX_VALUE)); }
[ "public", "static", "double", "xbarStd", "(", "double", "std", ",", "int", "sampleN", ")", "{", "return", "Math", ".", "sqrt", "(", "xbarVariance", "(", "std", "*", "std", ",", "sampleN", ",", "Integer", ".", "MAX_VALUE", ")", ")", ";", "}" ]
Calculates Standard Deviation for Xbar for infinite population size @param std @param sampleN @return
[ "Calculates", "Standard", "Deviation", "for", "Xbar", "for", "infinite", "population", "size" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java#L178-L180
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLClause.java
AbstractSQLClause.startContext
protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata, RelationalPath<?> entity) { SQLListenerContextImpl context = new SQLListenerContextImpl(metadata, connection, entity); listeners.start(context); return context; }
java
protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata, RelationalPath<?> entity) { SQLListenerContextImpl context = new SQLListenerContextImpl(metadata, connection, entity); listeners.start(context); return context; }
[ "protected", "SQLListenerContextImpl", "startContext", "(", "Connection", "connection", ",", "QueryMetadata", "metadata", ",", "RelationalPath", "<", "?", ">", "entity", ")", "{", "SQLListenerContextImpl", "context", "=", "new", "SQLListenerContextImpl", "(", "metadata"...
Called to create and start a new SQL Listener context @param connection the database connection @param metadata the meta data for that context @param entity the entity for that context @return the newly started context
[ "Called", "to", "create", "and", "start", "a", "new", "SQL", "Listener", "context" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLClause.java#L98-L102
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java
VelocityRenderer.noTemplatePaintHtml
@Deprecated protected void noTemplatePaintHtml(final WComponent component, final Writer writer) { try { writer.write("<!-- Start " + url + " not found -->\n"); new VelocityRenderer(NO_TEMPLATE_LAYOUT).paintXml(component, writer); writer.write("<!-- End " + url + " (template not found) -->\n"); } catch (IO...
java
@Deprecated protected void noTemplatePaintHtml(final WComponent component, final Writer writer) { try { writer.write("<!-- Start " + url + " not found -->\n"); new VelocityRenderer(NO_TEMPLATE_LAYOUT).paintXml(component, writer); writer.write("<!-- End " + url + " (template not found) -->\n"); } catch (IO...
[ "@", "Deprecated", "protected", "void", "noTemplatePaintHtml", "(", "final", "WComponent", "component", ",", "final", "Writer", "writer", ")", "{", "try", "{", "writer", ".", "write", "(", "\"<!-- Start \"", "+", "url", "+", "\" not found -->\\n\"", ")", ";", ...
Paints the component in HTML using the NoTemplateLayout. @param component the component to paint. @param writer the writer to send the HTML output to. @deprecated Unused. Will be removed in the next major release.
[ "Paints", "the", "component", "in", "HTML", "using", "the", "NoTemplateLayout", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java#L319-L328
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionVaultsInner.java
BackupLongTermRetentionVaultsInner.listByServerAsync
public Observable<List<BackupLongTermRetentionVaultInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<BackupLongTermRetentionVaultInner>>, List<BackupLongTermRetentionVaultInner>>(...
java
public Observable<List<BackupLongTermRetentionVaultInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<BackupLongTermRetentionVaultInner>>, List<BackupLongTermRetentionVaultInner>>(...
[ "public", "Observable", "<", "List", "<", "BackupLongTermRetentionVaultInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serve...
Gets server backup long term retention vaults in a server. @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. @throws IllegalArgumentException thrown if parameters fai...
[ "Gets", "server", "backup", "long", "term", "retention", "vaults", "in", "a", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionVaultsInner.java#L374-L381
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java
TxConfidenceTable.seen
public TransactionConfidence seen(Sha256Hash hash, PeerAddress byPeer) { TransactionConfidence confidence; boolean fresh = false; lock.lock(); try { cleanTable(); confidence = getOrCreate(hash); fresh = confidence.markBroadcastBy(byPeer); } fin...
java
public TransactionConfidence seen(Sha256Hash hash, PeerAddress byPeer) { TransactionConfidence confidence; boolean fresh = false; lock.lock(); try { cleanTable(); confidence = getOrCreate(hash); fresh = confidence.markBroadcastBy(byPeer); } fin...
[ "public", "TransactionConfidence", "seen", "(", "Sha256Hash", "hash", ",", "PeerAddress", "byPeer", ")", "{", "TransactionConfidence", "confidence", ";", "boolean", "fresh", "=", "false", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "cleanTable", "(", ...
Called by peers when they see a transaction advertised in an "inv" message. It passes the data on to the relevant {@link TransactionConfidence} object, creating it if needed. @return the number of peers that have now announced this hash (including the caller)
[ "Called", "by", "peers", "when", "they", "see", "a", "transaction", "advertised", "in", "an", "inv", "message", ".", "It", "passes", "the", "data", "on", "to", "the", "relevant", "{", "@link", "TransactionConfidence", "}", "object", "creating", "it", "if", ...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java#L144-L158
xebia/Xebium
src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java
SeleniumDriverFixture.startBrowserOnUrl
public void startBrowserOnUrl(final String browser, final String browserUrl) { setBrowser(browser); startDriverOnUrl(defaultWebDriverInstance(), browserUrl); }
java
public void startBrowserOnUrl(final String browser, final String browserUrl) { setBrowser(browser); startDriverOnUrl(defaultWebDriverInstance(), browserUrl); }
[ "public", "void", "startBrowserOnUrl", "(", "final", "String", "browser", ",", "final", "String", "browserUrl", ")", "{", "setBrowser", "(", "browser", ")", ";", "startDriverOnUrl", "(", "defaultWebDriverInstance", "(", ")", ",", "browserUrl", ")", ";", "}" ]
<p><code> | start browser | <i>firefox</i> | on url | <i>http://localhost</i> | </code></p> @param browser @param browserUrl
[ "<p", ">", "<code", ">", "|", "start", "browser", "|", "<i", ">", "firefox<", "/", "i", ">", "|", "on", "url", "|", "<i", ">", "http", ":", "//", "localhost<", "/", "i", ">", "|", "<", "/", "code", ">", "<", "/", "p", ">" ]
train
https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L182-L185
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createGraphicsShapes
public java.awt.Graphics2D createGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality) { return new PdfGraphics2D(this, width, height, null, true, convertImagesToJPEG, quality); }
java
public java.awt.Graphics2D createGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality) { return new PdfGraphics2D(this, width, height, null, true, convertImagesToJPEG, quality); }
[ "public", "java", ".", "awt", ".", "Graphics2D", "createGraphicsShapes", "(", "float", "width", ",", "float", "height", ",", "boolean", "convertImagesToJPEG", ",", "float", "quality", ")", "{", "return", "new", "PdfGraphics2D", "(", "this", ",", "width", ",", ...
Gets a <CODE>Graphics2D</CODE> to print on. The graphics are translated to PDF commands. @param width @param height @param convertImagesToJPEG @param quality @return A Graphics2D object
[ "Gets", "a", "<CODE", ">", "Graphics2D<", "/", "CODE", ">", "to", "print", "on", ".", "The", "graphics", "are", "translated", "to", "PDF", "commands", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2860-L2862
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AlpineQueryManager.java
AlpineQueryManager.createManagedUser
public ManagedUser createManagedUser(final String username, final String passwordHash) { return createManagedUser(username, null, null, passwordHash, false, false, false); }
java
public ManagedUser createManagedUser(final String username, final String passwordHash) { return createManagedUser(username, null, null, passwordHash, false, false, false); }
[ "public", "ManagedUser", "createManagedUser", "(", "final", "String", "username", ",", "final", "String", "passwordHash", ")", "{", "return", "createManagedUser", "(", "username", ",", "null", ",", "null", ",", "passwordHash", ",", "false", ",", "false", ",", ...
Creates a new ManagedUser object. @param username The username for the user @param passwordHash The hashed password. @return a ManagedUser @see alpine.auth.PasswordService @since 1.0.0
[ "Creates", "a", "new", "ManagedUser", "object", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AlpineQueryManager.java#L233-L235
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCatalogHelper.java
CamelCatalogHelper.isModelSupportOutput
public static boolean isModelSupportOutput(CamelCatalog camelCatalog, String modelName) { // use the camel catalog String json = camelCatalog.modelJSonSchema(modelName); if (json == null) { throw new IllegalArgumentException("Could not find catalog entry for model name: " + modelName...
java
public static boolean isModelSupportOutput(CamelCatalog camelCatalog, String modelName) { // use the camel catalog String json = camelCatalog.modelJSonSchema(modelName); if (json == null) { throw new IllegalArgumentException("Could not find catalog entry for model name: " + modelName...
[ "public", "static", "boolean", "isModelSupportOutput", "(", "CamelCatalog", "camelCatalog", ",", "String", "modelName", ")", "{", "// use the camel catalog", "String", "json", "=", "camelCatalog", ".", "modelJSonSchema", "(", "modelName", ")", ";", "if", "(", "json"...
Whether the EIP supports outputs @param modelName the model name @return <tt>true</tt> if output supported, <tt>false</tt> otherwise
[ "Whether", "the", "EIP", "supports", "outputs" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCatalogHelper.java#L429-L446
threerings/nenya
core/src/main/java/com/threerings/util/KeyTranslatorImpl.java
KeyTranslatorImpl.addPressCommand
public void addPressCommand (int keyCode, String command, int rate, long repeatDelay) { KeyRecord krec = getKeyRecord(keyCode); krec.pressCommand = command; krec.repeatRate = rate; krec.repeatDelay = repeatDelay; }
java
public void addPressCommand (int keyCode, String command, int rate, long repeatDelay) { KeyRecord krec = getKeyRecord(keyCode); krec.pressCommand = command; krec.repeatRate = rate; krec.repeatDelay = repeatDelay; }
[ "public", "void", "addPressCommand", "(", "int", "keyCode", ",", "String", "command", ",", "int", "rate", ",", "long", "repeatDelay", ")", "{", "KeyRecord", "krec", "=", "getKeyRecord", "(", "keyCode", ")", ";", "krec", ".", "pressCommand", "=", "command", ...
Adds a mapping from a key press to an action command string that will auto-repeat at the specified repeat rate after the specified auto-repeat delay has expired. Overwrites any existing mapping for the specified key code that may have already been registered. @param rate the number of times each second that the key pr...
[ "Adds", "a", "mapping", "from", "a", "key", "press", "to", "an", "action", "command", "string", "that", "will", "auto", "-", "repeat", "at", "the", "specified", "repeat", "rate", "after", "the", "specified", "auto", "-", "repeat", "delay", "has", "expired"...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyTranslatorImpl.java#L70-L76
grails/grails-core
grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java
BasePluginFilter.filterPluginList
public List<GrailsPlugin> filterPluginList(List<GrailsPlugin> original) { originalPlugins = Collections.unmodifiableList(original); addedNames = new HashSet<String>(); buildNameMap(); buildExplicitlyNamedList(); buildDerivedPluginList(); List<GrailsPlugin> pluginList ...
java
public List<GrailsPlugin> filterPluginList(List<GrailsPlugin> original) { originalPlugins = Collections.unmodifiableList(original); addedNames = new HashSet<String>(); buildNameMap(); buildExplicitlyNamedList(); buildDerivedPluginList(); List<GrailsPlugin> pluginList ...
[ "public", "List", "<", "GrailsPlugin", ">", "filterPluginList", "(", "List", "<", "GrailsPlugin", ">", "original", ")", "{", "originalPlugins", "=", "Collections", ".", "unmodifiableList", "(", "original", ")", ";", "addedNames", "=", "new", "HashSet", "<", "S...
Template method shared by subclasses of <code>BasePluginFilter</code>.
[ "Template", "method", "shared", "by", "subclasses", "of", "<code", ">", "BasePluginFilter<", "/", "code", ">", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java#L93-L107
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.padRight
public static String padRight(CharSequence self, Number numberOfChars, CharSequence padding) { String s = self.toString(); int numChars = numberOfChars.intValue(); if (numChars <= s.length()) { return s; } else { return s + getPadding(padding.toString(), numChars ...
java
public static String padRight(CharSequence self, Number numberOfChars, CharSequence padding) { String s = self.toString(); int numChars = numberOfChars.intValue(); if (numChars <= s.length()) { return s; } else { return s + getPadding(padding.toString(), numChars ...
[ "public", "static", "String", "padRight", "(", "CharSequence", "self", ",", "Number", "numberOfChars", ",", "CharSequence", "padding", ")", "{", "String", "s", "=", "self", ".", "toString", "(", ")", ";", "int", "numChars", "=", "numberOfChars", ".", "intVal...
Pad a CharSequence to a minimum length specified by <tt>numberOfChars</tt>, adding the supplied padding CharSequence as many times as needed to the right. If the CharSequence is already the same size or bigger than the target <tt>numberOfChars</tt>, then the toString() of the original CharSequence is returned. An exam...
[ "Pad", "a", "CharSequence", "to", "a", "minimum", "length", "specified", "by", "<tt", ">", "numberOfChars<", "/", "tt", ">", "adding", "the", "supplied", "padding", "CharSequence", "as", "many", "times", "as", "needed", "to", "the", "right", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L2289-L2297
bluelinelabs/Conductor
conductor/src/main/java/com/bluelinelabs/conductor/changehandler/TransitionChangeHandler.java
TransitionChangeHandler.prepareForTransition
public void prepareForTransition(@NonNull ViewGroup container, @Nullable View from, @Nullable View to, @NonNull Transition transition, boolean isPush, @NonNull OnTransitionPreparedListener onTransitionPreparedListener) { onTransitionPreparedListener.onPrepared(); }
java
public void prepareForTransition(@NonNull ViewGroup container, @Nullable View from, @Nullable View to, @NonNull Transition transition, boolean isPush, @NonNull OnTransitionPreparedListener onTransitionPreparedListener) { onTransitionPreparedListener.onPrepared(); }
[ "public", "void", "prepareForTransition", "(", "@", "NonNull", "ViewGroup", "container", ",", "@", "Nullable", "View", "from", ",", "@", "Nullable", "View", "to", ",", "@", "NonNull", "Transition", "transition", ",", "boolean", "isPush", ",", "@", "NonNull", ...
Called before a transition occurs. This can be used to reorder views, set their transition names, etc. The transition will begin when {@code onTransitionPreparedListener} is called. @param container The container these Views are hosted in @param from The previous View in the container or {@code null} if there w...
[ "Called", "before", "a", "transition", "occurs", ".", "This", "can", "be", "used", "to", "reorder", "views", "set", "their", "transition", "names", "etc", ".", "The", "transition", "will", "begin", "when", "{", "@code", "onTransitionPreparedListener", "}", "is...
train
https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/changehandler/TransitionChangeHandler.java#L120-L122
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucCalc.java
SecStrucCalc.trackHBondEnergy
private void trackHBondEnergy(int i, int j, double energy) { if (groups[i].getPDBName().equals("PRO")) { logger.debug("Ignore: PRO {}",groups[i].getResidueNumber()); return; } SecStrucState stateOne = getSecStrucState(i); SecStrucState stateTwo = getSecStrucState(j); double acc1e = stateOne.getAccep...
java
private void trackHBondEnergy(int i, int j, double energy) { if (groups[i].getPDBName().equals("PRO")) { logger.debug("Ignore: PRO {}",groups[i].getResidueNumber()); return; } SecStrucState stateOne = getSecStrucState(i); SecStrucState stateTwo = getSecStrucState(j); double acc1e = stateOne.getAccep...
[ "private", "void", "trackHBondEnergy", "(", "int", "i", ",", "int", "j", ",", "double", "energy", ")", "{", "if", "(", "groups", "[", "i", "]", ".", "getPDBName", "(", ")", ".", "equals", "(", "\"PRO\"", ")", ")", "{", "logger", ".", "debug", "(", ...
Store Hbonds in the Groups. DSSP allows two HBonds per aminoacids to allow bifurcated bonds.
[ "Store", "Hbonds", "in", "the", "Groups", ".", "DSSP", "allows", "two", "HBonds", "per", "aminoacids", "to", "allow", "bifurcated", "bonds", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucCalc.java#L877-L935
jOOQ/jOOR
jOOR-java-6/src/main/java/org/joor/Reflect.java
Reflect.as
@SuppressWarnings("unchecked") public <P> P as(final Class<P> proxyType) { final boolean isMap = (object instanceof Map); final InvocationHandler handler = new InvocationHandler() { @Override @SuppressWarnings("null") public Object invoke(Object proxy, Method meth...
java
@SuppressWarnings("unchecked") public <P> P as(final Class<P> proxyType) { final boolean isMap = (object instanceof Map); final InvocationHandler handler = new InvocationHandler() { @Override @SuppressWarnings("null") public Object invoke(Object proxy, Method meth...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "P", ">", "P", "as", "(", "final", "Class", "<", "P", ">", "proxyType", ")", "{", "final", "boolean", "isMap", "=", "(", "object", "instanceof", "Map", ")", ";", "final", "InvocationHandl...
Create a proxy for the wrapped object allowing to typesafely invoke methods on it using a custom interface @param proxyType The interface type that is implemented by the proxy @return A proxy for the wrapped object
[ "Create", "a", "proxy", "for", "the", "wrapped", "object", "allowing", "to", "typesafely", "invoke", "methods", "on", "it", "using", "a", "custom", "interface" ]
train
https://github.com/jOOQ/jOOR/blob/40b42be12ecc9939560ff86921bbc57c99a21b85/jOOR-java-6/src/main/java/org/joor/Reflect.java#L721-L783
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/Validate.java
Validate.validIndex
public static <T extends CharSequence> T validIndex(final T chars, final int index) { return INSTANCE.validIndex(chars, index); }
java
public static <T extends CharSequence> T validIndex(final T chars, final int index) { return INSTANCE.validIndex(chars, index); }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "validIndex", "(", "final", "T", "chars", ",", "final", "int", "index", ")", "{", "return", "INSTANCE", ".", "validIndex", "(", "chars", ",", "index", ")", ";", "}" ]
<p>Validates that the index is within the bounds of the argument character sequence; otherwise throwing an exception.</p> <pre>Validate.validIndex(myStr, 2);</pre> <p>If the character sequence is {@code null}, then the message of the exception is &quot;The validated object is null&quot;.</p><p>If the index is invalid, ...
[ "<p", ">", "Validates", "that", "the", "index", "is", "within", "the", "bounds", "of", "the", "argument", "character", "sequence", ";", "otherwise", "throwing", "an", "exception", ".", "<", "/", "p", ">", "<pre", ">", "Validate", ".", "validIndex", "(", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/Validate.java#L1312-L1314
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/ComputationGraph.java
ComputationGraph.scoreExamples
public INDArray scoreExamples(DataSet data, boolean addRegularizationTerms) { if (numInputArrays != 1 || numOutputArrays != 1) throw new UnsupportedOperationException("Cannot score ComputationGraph network with " + " DataSet: network does not have 1 input and 1 output arrays"); ...
java
public INDArray scoreExamples(DataSet data, boolean addRegularizationTerms) { if (numInputArrays != 1 || numOutputArrays != 1) throw new UnsupportedOperationException("Cannot score ComputationGraph network with " + " DataSet: network does not have 1 input and 1 output arrays"); ...
[ "public", "INDArray", "scoreExamples", "(", "DataSet", "data", ",", "boolean", "addRegularizationTerms", ")", "{", "if", "(", "numInputArrays", "!=", "1", "||", "numOutputArrays", "!=", "1", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Cannot score ...
Calculate the score for each example in a DataSet individually. Unlike {@link #score(DataSet)} and {@link #score(DataSet, boolean)} this method does not average/sum over examples. This method allows for examples to be scored individually (at test time only), which may be useful for example for autoencoder architectures...
[ "Calculate", "the", "score", "for", "each", "example", "in", "a", "DataSet", "individually", ".", "Unlike", "{", "@link", "#score", "(", "DataSet", ")", "}", "and", "{", "@link", "#score", "(", "DataSet", "boolean", ")", "}", "this", "method", "does", "n...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/ComputationGraph.java#L3037-L3042
googleads/googleads-java-lib
extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ApiRetryStrategyManager.java
ApiRetryStrategyManager.getRetryStrategy
public static @Nullable ApiRetryStrategy getRetryStrategy(String name, boolean isUtility) { ApiRateLimitBucket bucket = getRateLimitBucket(name, isUtility); return bucket == null ? null : bucketToStrategy.get(bucket); }
java
public static @Nullable ApiRetryStrategy getRetryStrategy(String name, boolean isUtility) { ApiRateLimitBucket bucket = getRateLimitBucket(name, isUtility); return bucket == null ? null : bucketToStrategy.get(bucket); }
[ "public", "static", "@", "Nullable", "ApiRetryStrategy", "getRetryStrategy", "(", "String", "name", ",", "boolean", "isUtility", ")", "{", "ApiRateLimitBucket", "bucket", "=", "getRateLimitBucket", "(", "name", ",", "isUtility", ")", ";", "return", "bucket", "==",...
Get the {@link ApiRetryStrategy} for the specified AdWords API service / utility name. @param name the specified AdWords API service / utility name @param isUtility whether this is for some AdWords API utility, i.e., from calling {@link com.google.api.ads.adwords.lib.factory.AdWordsServicesInterface#getUtility(com.goo...
[ "Get", "the", "{", "@link", "ApiRetryStrategy", "}", "for", "the", "specified", "AdWords", "API", "service", "/", "utility", "name", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ApiRetryStrategyManager.java#L65-L68
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.slice
public static void slice(File srcImageFile, File descDir, int destWidth, int destHeight) { slice(read(srcImageFile), descDir, destWidth, destHeight); }
java
public static void slice(File srcImageFile, File descDir, int destWidth, int destHeight) { slice(read(srcImageFile), descDir, destWidth, destHeight); }
[ "public", "static", "void", "slice", "(", "File", "srcImageFile", ",", "File", "descDir", ",", "int", "destWidth", ",", "int", "destHeight", ")", "{", "slice", "(", "read", "(", "srcImageFile", ")", ",", "descDir", ",", "destWidth", ",", "destHeight", ")",...
图像切片(指定切片的宽度和高度) @param srcImageFile 源图像 @param descDir 切片目标文件夹 @param destWidth 目标切片宽度。默认200 @param destHeight 目标切片高度。默认150
[ "图像切片(指定切片的宽度和高度)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L370-L372
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/JobConfigurationUtils.java
JobConfigurationUtils.combineSysAndJobProperties
public static Properties combineSysAndJobProperties(Properties sysProps, Properties jobProps) { Properties combinedJobProps = new Properties(); combinedJobProps.putAll(sysProps); combinedJobProps.putAll(jobProps); return combinedJobProps; }
java
public static Properties combineSysAndJobProperties(Properties sysProps, Properties jobProps) { Properties combinedJobProps = new Properties(); combinedJobProps.putAll(sysProps); combinedJobProps.putAll(jobProps); return combinedJobProps; }
[ "public", "static", "Properties", "combineSysAndJobProperties", "(", "Properties", "sysProps", ",", "Properties", "jobProps", ")", "{", "Properties", "combinedJobProps", "=", "new", "Properties", "(", ")", ";", "combinedJobProps", ".", "putAll", "(", "sysProps", ")"...
Get a new {@link Properties} instance by combining a given system configuration {@link Properties} object (first) and a job configuration {@link Properties} object (second). @param sysProps the given system configuration {@link Properties} object @param jobProps the given job configuration {@link Properties} object @r...
[ "Get", "a", "new", "{", "@link", "Properties", "}", "instance", "by", "combining", "a", "given", "system", "configuration", "{", "@link", "Properties", "}", "object", "(", "first", ")", "and", "a", "job", "configuration", "{", "@link", "Properties", "}", "...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/JobConfigurationUtils.java#L52-L57
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/oracles/wordnet/InMemoryWordNetBinaryArray.java
InMemoryWordNetBinaryArray.createWordNetCaches
public static void createWordNetCaches(String componentKey, Properties properties) throws SMatchException { properties = getComponentProperties(makeComponentPrefix(componentKey, InMemoryWordNetBinaryArray.class.getSimpleName()), properties); if (properties.containsKey(JWNL_PROPERTIES_PATH_KEY)) { ...
java
public static void createWordNetCaches(String componentKey, Properties properties) throws SMatchException { properties = getComponentProperties(makeComponentPrefix(componentKey, InMemoryWordNetBinaryArray.class.getSimpleName()), properties); if (properties.containsKey(JWNL_PROPERTIES_PATH_KEY)) { ...
[ "public", "static", "void", "createWordNetCaches", "(", "String", "componentKey", ",", "Properties", "properties", ")", "throws", "SMatchException", "{", "properties", "=", "getComponentProperties", "(", "makeComponentPrefix", "(", "componentKey", ",", "InMemoryWordNetBin...
Create caches of WordNet to speed up matching. @param componentKey a key to the component in the configuration @param properties configuration @throws SMatchException SMatchException
[ "Create", "caches", "of", "WordNet", "to", "speed", "up", "matching", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/oracles/wordnet/InMemoryWordNetBinaryArray.java#L261-L293
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/AccessToken.java
AccessToken.createFromNativeLinkingIntent
public static AccessToken createFromNativeLinkingIntent(Intent intent) { Validate.notNull(intent, "intent"); if (intent.getExtras() == null) { return null; } return createFromBundle(null, intent.getExtras(), AccessTokenSource.FACEBOOK_APPLICATION_WEB, new Date()); }
java
public static AccessToken createFromNativeLinkingIntent(Intent intent) { Validate.notNull(intent, "intent"); if (intent.getExtras() == null) { return null; } return createFromBundle(null, intent.getExtras(), AccessTokenSource.FACEBOOK_APPLICATION_WEB, new Date()); }
[ "public", "static", "AccessToken", "createFromNativeLinkingIntent", "(", "Intent", "intent", ")", "{", "Validate", ".", "notNull", "(", "intent", ",", "\"intent\"", ")", ";", "if", "(", "intent", ".", "getExtras", "(", ")", "==", "null", ")", "{", "return", ...
Creates a new AccessToken using the information contained in an Intent populated by the Facebook application in order to launch a native link. For more information on native linking, please see https://developers.facebook.com/docs/mobile/android/deep_linking/. @param intent the Intent that was used to start an Activit...
[ "Creates", "a", "new", "AccessToken", "using", "the", "information", "contained", "in", "an", "Intent", "populated", "by", "the", "Facebook", "application", "in", "order", "to", "launch", "a", "native", "link", ".", "For", "more", "information", "on", "native"...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/AccessToken.java#L177-L185
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/ExecutorServiceMetrics.java
ExecutorServiceMetrics.monitor
public static ExecutorService monitor(MeterRegistry registry, ExecutorService executor, String executorServiceName, Iterable<Tag> tags) { new ExecutorServiceMetrics(executor, executorServiceName, tags).bindTo(registry); return new TimedExecutorService(registry, executor, executorServiceName, tags); ...
java
public static ExecutorService monitor(MeterRegistry registry, ExecutorService executor, String executorServiceName, Iterable<Tag> tags) { new ExecutorServiceMetrics(executor, executorServiceName, tags).bindTo(registry); return new TimedExecutorService(registry, executor, executorServiceName, tags); ...
[ "public", "static", "ExecutorService", "monitor", "(", "MeterRegistry", "registry", ",", "ExecutorService", "executor", ",", "String", "executorServiceName", ",", "Iterable", "<", "Tag", ">", "tags", ")", "{", "new", "ExecutorServiceMetrics", "(", "executor", ",", ...
Record metrics on the use of an {@link ExecutorService}. @param registry The registry to bind metrics to. @param executor The executor to instrument. @param executorServiceName Will be used to tag metrics with "name". @param tags Tags to apply to all recorded metrics. @return The i...
[ "Record", "metrics", "on", "the", "use", "of", "an", "{", "@link", "ExecutorService", "}", "." ]
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/ExecutorServiceMetrics.java#L91-L94
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.findTerms
public <P extends ParaObject> List<P> findTerms(String type, Map<String, ?> terms, boolean matchAll, Pager... pager) { if (terms == null) { return Collections.emptyList(); } MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("matchall", Boolean.toString(matchAll)); Link...
java
public <P extends ParaObject> List<P> findTerms(String type, Map<String, ?> terms, boolean matchAll, Pager... pager) { if (terms == null) { return Collections.emptyList(); } MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("matchall", Boolean.toString(matchAll)); Link...
[ "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "findTerms", "(", "String", "type", ",", "Map", "<", "String", ",", "?", ">", "terms", ",", "boolean", "matchAll", ",", "Pager", "...", "pager", ")", "{", "if", "(", "terms", ...
Searches for objects that have properties matching some given values. A terms query. @param <P> type of the object @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param terms a map of fields (property names) to terms (property values) @param matchAll match all terms...
[ "Searches", "for", "objects", "that", "have", "properties", "matching", "some", "given", "values", ".", "A", "terms", "query", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L828-L849
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseAccessLog
private void parseAccessLog(Map<Object, Object> props) { String id = (String) props.get(HttpConfigConstants.PROPNAME_ACCESSLOG_ID); if (id != null) { AtomicReference<AccessLog> aLog = HttpEndpointImpl.getAccessLogger(id); if (aLog != null) { this.accessLogger = a...
java
private void parseAccessLog(Map<Object, Object> props) { String id = (String) props.get(HttpConfigConstants.PROPNAME_ACCESSLOG_ID); if (id != null) { AtomicReference<AccessLog> aLog = HttpEndpointImpl.getAccessLogger(id); if (aLog != null) { this.accessLogger = a...
[ "private", "void", "parseAccessLog", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "String", "id", "=", "(", "String", ")", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_ACCESSLOG_ID", ")", ";", "if", "(", "id", "!="...
Parse the NCSA access log information from the property map. @param props
[ "Parse", "the", "NCSA", "access", "log", "information", "from", "the", "property", "map", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L918-L931
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java
BuilderResultUtils.getProblemMessage
public static String getProblemMessage(Object object, String summary, String separator) { if (object instanceof CompilationProblem[]) { return fillSummary( (CompilationProblem[]) object, summary, separator ); } return summary; }
java
public static String getProblemMessage(Object object, String summary, String separator) { if (object instanceof CompilationProblem[]) { return fillSummary( (CompilationProblem[]) object, summary, separator ); } return summary; }
[ "public", "static", "String", "getProblemMessage", "(", "Object", "object", ",", "String", "summary", ",", "String", "separator", ")", "{", "if", "(", "object", "instanceof", "CompilationProblem", "[", "]", ")", "{", "return", "fillSummary", "(", "(", "Compila...
Appends compilation problems to summary message if object is an array of {@link CompilationProblem} with custom separator @param object object with compilation results @param summary summary message @param separator custom messages separator @return summary message with changes
[ "Appends", "compilation", "problems", "to", "summary", "message", "if", "object", "is", "an", "array", "of", "{", "@link", "CompilationProblem", "}", "with", "custom", "separator" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java#L36-L41
eurekaclinical/javautil
src/main/java/org/arp/javautil/stat/UpdatingCovarCalc.java
UpdatingCovarCalc.addPoint
public void addPoint(double x, double y) { numItems++; double xMinusMeanX = x - meanx; double yMinusMeanY = y - meany; sumsq += xMinusMeanX * yMinusMeanY * (numItems - 1) / numItems; meanx += xMinusMeanX / numItems; meany += yMinusMeanY / numItems; }
java
public void addPoint(double x, double y) { numItems++; double xMinusMeanX = x - meanx; double yMinusMeanY = y - meany; sumsq += xMinusMeanX * yMinusMeanY * (numItems - 1) / numItems; meanx += xMinusMeanX / numItems; meany += yMinusMeanY / numItems; }
[ "public", "void", "addPoint", "(", "double", "x", ",", "double", "y", ")", "{", "numItems", "++", ";", "double", "xMinusMeanX", "=", "x", "-", "meanx", ";", "double", "yMinusMeanY", "=", "y", "-", "meany", ";", "sumsq", "+=", "xMinusMeanX", "*", "yMinu...
Update the covariance with another point. @param x x value @param y y value
[ "Update", "the", "covariance", "with", "another", "point", "." ]
train
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/stat/UpdatingCovarCalc.java#L59-L66
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.beginMarkedContentSequence
public void beginMarkedContentSequence(PdfName tag, PdfDictionary property, boolean inline) { if (property == null) { content.append(tag.getBytes()).append(" BMC").append_i(separator); return; } content.append(tag.getBytes()).append(' '); if (inline) t...
java
public void beginMarkedContentSequence(PdfName tag, PdfDictionary property, boolean inline) { if (property == null) { content.append(tag.getBytes()).append(" BMC").append_i(separator); return; } content.append(tag.getBytes()).append(' '); if (inline) t...
[ "public", "void", "beginMarkedContentSequence", "(", "PdfName", "tag", ",", "PdfDictionary", "property", ",", "boolean", "inline", ")", "{", "if", "(", "property", "==", "null", ")", "{", "content", ".", "append", "(", "tag", ".", "getBytes", "(", ")", ")"...
Begins a marked content sequence. If property is <CODE>null</CODE> the mark will be of the type <CODE>BMC</CODE> otherwise it will be <CODE>BDC</CODE>. @param tag the tag @param property the property @param inline <CODE>true</CODE> to include the property in the content or <CODE>false</CODE> to include the property in ...
[ "Begins", "a", "marked", "content", "sequence", ".", "If", "property", "is", "<CODE", ">", "null<", "/", "CODE", ">", "the", "mark", "will", "be", "of", "the", "type", "<CODE", ">", "BMC<", "/", "CODE", ">", "otherwise", "it", "will", "be", "<CODE", ...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L3089-L3115
3redronin/mu-server
src/main/java/io/muserver/MuServerBuilder.java
MuServerBuilder.withGzip
public MuServerBuilder withGzip(long minimumGzipSize, Set<String> mimeTypesToGzip) { this.gzipEnabled = true; this.mimeTypesToGzip = mimeTypesToGzip; this.minimumGzipSize = minimumGzipSize; return this; }
java
public MuServerBuilder withGzip(long minimumGzipSize, Set<String> mimeTypesToGzip) { this.gzipEnabled = true; this.mimeTypesToGzip = mimeTypesToGzip; this.minimumGzipSize = minimumGzipSize; return this; }
[ "public", "MuServerBuilder", "withGzip", "(", "long", "minimumGzipSize", ",", "Set", "<", "String", ">", "mimeTypesToGzip", ")", "{", "this", ".", "gzipEnabled", "=", "true", ";", "this", ".", "mimeTypesToGzip", "=", "mimeTypesToGzip", ";", "this", ".", "minim...
Enables gzip for files of at least the specified size that match the given mime-types. By default, gzip is enabled for text-based mime types over 1400 bytes. It is recommended to keep the defaults and only use this method if you have very specific requirements around GZIP. @param minimumGzipSize The size in bytes befor...
[ "Enables", "gzip", "for", "files", "of", "at", "least", "the", "specified", "size", "that", "match", "the", "given", "mime", "-", "types", ".", "By", "default", "gzip", "is", "enabled", "for", "text", "-", "based", "mime", "types", "over", "1400", "bytes...
train
https://github.com/3redronin/mu-server/blob/51598606a3082a121fbd785348ee9770b40308e6/src/main/java/io/muserver/MuServerBuilder.java#L121-L126
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDao.java
BaseDao.putToCache
protected void putToCache(String cacheName, String key, Object value, long ttlSeconds) { if (cacheItemsExpireAfterWrite) { putToCache(cacheName, key, value, ttlSeconds, 0); } else { putToCache(cacheName, key, value, 0, ttlSeconds); } }
java
protected void putToCache(String cacheName, String key, Object value, long ttlSeconds) { if (cacheItemsExpireAfterWrite) { putToCache(cacheName, key, value, ttlSeconds, 0); } else { putToCache(cacheName, key, value, 0, ttlSeconds); } }
[ "protected", "void", "putToCache", "(", "String", "cacheName", ",", "String", "key", ",", "Object", "value", ",", "long", "ttlSeconds", ")", "{", "if", "(", "cacheItemsExpireAfterWrite", ")", "{", "putToCache", "(", "cacheName", ",", "key", ",", "value", ","...
Puts an entry to cache, with specific TTL. @param cacheName @param key @param value @param ttlSeconds
[ "Puts", "an", "entry", "to", "cache", "with", "specific", "TTL", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDao.java#L174-L180
dita-ot/dita-ot
src/main/java/org/dita/dost/util/Job.java
Job.setInputMap
public void setInputMap(final URI map) { assert !map.isAbsolute(); setProperty(INPUT_DITAMAP_URI, map.toString()); // Deprecated since 2.2 setProperty(INPUT_DITAMAP, toFile(map).getPath()); }
java
public void setInputMap(final URI map) { assert !map.isAbsolute(); setProperty(INPUT_DITAMAP_URI, map.toString()); // Deprecated since 2.2 setProperty(INPUT_DITAMAP, toFile(map).getPath()); }
[ "public", "void", "setInputMap", "(", "final", "URI", "map", ")", "{", "assert", "!", "map", ".", "isAbsolute", "(", ")", ";", "setProperty", "(", "INPUT_DITAMAP_URI", ",", "map", ".", "toString", "(", ")", ")", ";", "// Deprecated since 2.2", "setProperty",...
set input file @param map input file path relative to input directory
[ "set", "input", "file" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L466-L471
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java
TrainsImpl.getStatusAsync
public Observable<List<ModelTrainingInfo>> getStatusAsync(UUID appId, String versionId) { return getStatusWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<List<ModelTrainingInfo>>, List<ModelTrainingInfo>>() { @Override public List<ModelTrainingInfo> call(ServiceR...
java
public Observable<List<ModelTrainingInfo>> getStatusAsync(UUID appId, String versionId) { return getStatusWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<List<ModelTrainingInfo>>, List<ModelTrainingInfo>>() { @Override public List<ModelTrainingInfo> call(ServiceR...
[ "public", "Observable", "<", "List", "<", "ModelTrainingInfo", ">", ">", "getStatusAsync", "(", "UUID", "appId", ",", "String", "versionId", ")", "{", "return", "getStatusWithServiceResponseAsync", "(", "appId", ",", "versionId", ")", ".", "map", "(", "new", "...
Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1". @param appId The ...
[ "Gets", "the", "training", "status", "of", "all", "models", "(", "intents", "and", "entities", ")", "for", "the", "specified", "LUIS", "app", ".", "You", "must", "call", "the", "train", "API", "to", "train", "the", "LUIS", "app", "before", "you", "call",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java#L189-L196
google/closure-compiler
src/com/google/javascript/jscomp/PolymerPassStaticUtils.java
PolymerPassStaticUtils.quoteListenerAndHostAttributeKeys
static void quoteListenerAndHostAttributeKeys(Node objLit, AbstractCompiler compiler) { checkState(objLit.isObjectLit()); for (Node keyNode : objLit.children()) { if (keyNode.isComputedProp()) { continue; } if (!keyNode.getString().equals("listeners") && !keyNode.getString()....
java
static void quoteListenerAndHostAttributeKeys(Node objLit, AbstractCompiler compiler) { checkState(objLit.isObjectLit()); for (Node keyNode : objLit.children()) { if (keyNode.isComputedProp()) { continue; } if (!keyNode.getString().equals("listeners") && !keyNode.getString()....
[ "static", "void", "quoteListenerAndHostAttributeKeys", "(", "Node", "objLit", ",", "AbstractCompiler", "compiler", ")", "{", "checkState", "(", "objLit", ".", "isObjectLit", "(", ")", ")", ";", "for", "(", "Node", "keyNode", ":", "objLit", ".", "children", "("...
Makes sure that the keys for listeners and hostAttributes blocks are quoted to avoid renaming.
[ "Makes", "sure", "that", "the", "keys", "for", "listeners", "and", "hostAttributes", "blocks", "are", "quoted", "to", "avoid", "renaming", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PolymerPassStaticUtils.java#L109-L126
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java
ReferenceDataUrl.getBehaviorUrl
public static MozuUrl getBehaviorUrl(Integer behaviorId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}"); formatter.formatUrl("behaviorId", behaviorId); formatter.formatUrl("responseFields", responseFields); ...
java
public static MozuUrl getBehaviorUrl(Integer behaviorId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}"); formatter.formatUrl("behaviorId", behaviorId); formatter.formatUrl("responseFields", responseFields); ...
[ "public", "static", "MozuUrl", "getBehaviorUrl", "(", "Integer", "behaviorId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}\"", ")", "...
Get Resource Url for GetBehavior @param behaviorId Unique identifier of the behavior. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this paramet...
[ "Get", "Resource", "Url", "for", "GetBehavior" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L48-L54
carewebframework/carewebframework-vista
org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/RPCParameters.java
RPCParameters.put
public void put(int index, RPCParameter param) { expand(index); if (index < params.size()) { params.set(index, param); } else { params.add(param); } }
java
public void put(int index, RPCParameter param) { expand(index); if (index < params.size()) { params.set(index, param); } else { params.add(param); } }
[ "public", "void", "put", "(", "int", "index", ",", "RPCParameter", "param", ")", "{", "expand", "(", "index", ")", ";", "if", "(", "index", "<", "params", ".", "size", "(", ")", ")", "{", "params", ".", "set", "(", "index", ",", "param", ")", ";"...
Adds a parameter at the specified index. @param index Index for parameter. @param param Parameter to add.
[ "Adds", "a", "parameter", "at", "the", "specified", "index", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/RPCParameters.java#L124-L132
openbase/jul
storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java
AbstractRegistry.replaceInternalMap
public void replaceInternalMap(final Map<KEY, ENTRY> map, boolean finishTransaction) throws CouldNotPerformException { if (map == null) { throw new NotAvailableException("map"); } lock(); try { try { sandbox.replaceInternalMap(map); ...
java
public void replaceInternalMap(final Map<KEY, ENTRY> map, boolean finishTransaction) throws CouldNotPerformException { if (map == null) { throw new NotAvailableException("map"); } lock(); try { try { sandbox.replaceInternalMap(map); ...
[ "public", "void", "replaceInternalMap", "(", "final", "Map", "<", "KEY", ",", "ENTRY", ">", "map", ",", "boolean", "finishTransaction", ")", "throws", "CouldNotPerformException", "{", "if", "(", "map", "==", "null", ")", "{", "throw", "new", "NotAvailableExcep...
Replaces the internal registry map by the given one. <p> Use with care! @param map @param finishTransaction is true the registry transaction will be verified. @throws org.openbase.jul.exception.CouldNotPerformException
[ "Replaces", "the", "internal", "registry", "map", "by", "the", "given", "one", ".", "<p", ">", "Use", "with", "care!" ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/AbstractRegistry.java#L578-L604
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.addAsync
public Observable<Void> addAsync(PoolAddParameter pool, PoolAddOptions poolAddOptions) { return addWithServiceResponseAsync(pool, poolAddOptions).map(new Func1<ServiceResponseWithHeaders<Void, PoolAddHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, PoolAddH...
java
public Observable<Void> addAsync(PoolAddParameter pool, PoolAddOptions poolAddOptions) { return addWithServiceResponseAsync(pool, poolAddOptions).map(new Func1<ServiceResponseWithHeaders<Void, PoolAddHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, PoolAddH...
[ "public", "Observable", "<", "Void", ">", "addAsync", "(", "PoolAddParameter", "pool", ",", "PoolAddOptions", "poolAddOptions", ")", "{", "return", "addWithServiceResponseAsync", "(", "pool", ",", "poolAddOptions", ")", ".", "map", "(", "new", "Func1", "<", "Ser...
Adds a pool to the specified account. When naming pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers. @param pool The pool to be added. @param poolAddOptions Additional parameters for the opera...
[ "Adds", "a", "pool", "to", "the", "specified", "account", ".", "When", "naming", "pools", "avoid", "including", "sensitive", "information", "such", "as", "user", "names", "or", "secret", "project", "names", ".", "This", "information", "may", "appear", "in", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L780-L787
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
ProfeatProperties.getComposition
public static double getComposition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception{ return new ProfeatPropertiesImpl().getComposition(sequence, attribute, group); }
java
public static double getComposition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception{ return new ProfeatPropertiesImpl().getComposition(sequence, attribute, group); }
[ "public", "static", "double", "getComposition", "(", "ProteinSequence", "sequence", ",", "ATTRIBUTE", "attribute", ",", "GROUPING", "group", ")", "throws", "Exception", "{", "return", "new", "ProfeatPropertiesImpl", "(", ")", ".", "getComposition", "(", "sequence", ...
An adaptor method which returns the composition of the specific grouping for the given attribute. @param sequence a protein sequence consisting of non-ambiguous characters only @param attribute one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibi...
[ "An", "adaptor", "method", "which", "returns", "the", "composition", "of", "the", "specific", "grouping", "for", "the", "given", "attribute", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java#L56-L58
Impetus/Kundera
src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBUtils.java
CouchDBUtils.getDesignDocument
private static CouchDBDesignDocument getDesignDocument(HttpClient httpClient, HttpHost httpHost, Gson gson, String tableName, String schemaName) { HttpResponse response = null; try { String id = CouchDBConstants.DESIGN + tableName; URI uri = new URI(CouchD...
java
private static CouchDBDesignDocument getDesignDocument(HttpClient httpClient, HttpHost httpHost, Gson gson, String tableName, String schemaName) { HttpResponse response = null; try { String id = CouchDBConstants.DESIGN + tableName; URI uri = new URI(CouchD...
[ "private", "static", "CouchDBDesignDocument", "getDesignDocument", "(", "HttpClient", "httpClient", ",", "HttpHost", "httpHost", ",", "Gson", "gson", ",", "String", "tableName", ",", "String", "schemaName", ")", "{", "HttpResponse", "response", "=", "null", ";", "...
Gets the design document. @param httpClient the http client @param httpHost the http host @param gson the gson @param tableName the table name @param schemaName the schema name @return the design document
[ "Gets", "the", "design", "document", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBUtils.java#L258-L287
SahaginOrg/sahagin-java
src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java
RunResultsGenerateHookSetter.isLineLastStament
private boolean isLineLastStament(TestMethod method, int codeLineIndex) { CodeLine codeLine = method.getCodeBody().get(codeLineIndex); if (codeLineIndex == method.getCodeBody().size() - 1) { return true; } CodeLine nextCodeLine = method.getCodeBody().get(codeLineIndex + 1); ...
java
private boolean isLineLastStament(TestMethod method, int codeLineIndex) { CodeLine codeLine = method.getCodeBody().get(codeLineIndex); if (codeLineIndex == method.getCodeBody().size() - 1) { return true; } CodeLine nextCodeLine = method.getCodeBody().get(codeLineIndex + 1); ...
[ "private", "boolean", "isLineLastStament", "(", "TestMethod", "method", ",", "int", "codeLineIndex", ")", "{", "CodeLine", "codeLine", "=", "method", ".", "getCodeBody", "(", ")", ".", "get", "(", "codeLineIndex", ")", ";", "if", "(", "codeLineIndex", "==", ...
This may return false since multiple statement can be found in a line.
[ "This", "may", "return", "false", "since", "multiple", "statement", "can", "be", "found", "in", "a", "line", "." ]
train
https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L110-L124
alkacon/opencms-core
src/org/opencms/db/CmsDbUtil.java
CmsDbUtil.fillParameters
public static void fillParameters(PreparedStatement stmt, List<Object> params) throws SQLException { int i = 1; for (Object param : params) { if (param instanceof String) { stmt.setString(i, (String)param); } else if (param instanceof Integer) { s...
java
public static void fillParameters(PreparedStatement stmt, List<Object> params) throws SQLException { int i = 1; for (Object param : params) { if (param instanceof String) { stmt.setString(i, (String)param); } else if (param instanceof Integer) { s...
[ "public", "static", "void", "fillParameters", "(", "PreparedStatement", "stmt", ",", "List", "<", "Object", ">", "params", ")", "throws", "SQLException", "{", "int", "i", "=", "1", ";", "for", "(", "Object", "param", ":", "params", ")", "{", "if", "(", ...
Fills a given prepared statement with parameters from a list of objects.<p> @param stmt the prepared statement @param params the parameter objects @throws SQLException if something goes wrong
[ "Fills", "a", "given", "prepared", "statement", "with", "parameters", "from", "a", "list", "of", "objects", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDbUtil.java#L58-L73
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java
GlobalConfiguration.getFloatInternal
private float getFloatInternal(String key, float defaultValue) { float retVal = defaultValue; try { synchronized (this.confData) { if (this.confData.containsKey(key)) { retVal = Float.parseFloat(this.confData.get(key)); } } } catch (NumberFormatException e) { if (LOG.isDebugEnabled()) { ...
java
private float getFloatInternal(String key, float defaultValue) { float retVal = defaultValue; try { synchronized (this.confData) { if (this.confData.containsKey(key)) { retVal = Float.parseFloat(this.confData.get(key)); } } } catch (NumberFormatException e) { if (LOG.isDebugEnabled()) { ...
[ "private", "float", "getFloatInternal", "(", "String", "key", ",", "float", "defaultValue", ")", "{", "float", "retVal", "=", "defaultValue", ";", "try", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "if", "(", "this", ".", "confData", ".", ...
Returns the value associated with the given key as an integer. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "an", "integer", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java#L235-L254
structurizr/java
structurizr-core/src/com/structurizr/documentation/StructurizrDocumentationTemplate.java
StructurizrDocumentationTemplate.addComponentsSection
@Nonnull public Section addComponentsSection(@Nullable Container container, File... files) throws IOException { return addSection(container, "Components", files); }
java
@Nonnull public Section addComponentsSection(@Nullable Container container, File... files) throws IOException { return addSection(container, "Components", files); }
[ "@", "Nonnull", "public", "Section", "addComponentsSection", "(", "@", "Nullable", "Container", "container", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "addSection", "(", "container", ",", "\"Components\"", ",", "files", ")", ";", ...
Adds a "Components" section relating to a {@link Container} from one or more files. @param container the {@link Container} the documentation content relates to @param files one or more File objects that point to the documentation content @return a documentation {@link Section} @throws IOExcept...
[ "Adds", "a", "Components", "section", "relating", "to", "a", "{", "@link", "Container", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/StructurizrDocumentationTemplate.java#L239-L242
apereo/cas
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/BaseRegisteredServiceUsernameAttributeProvider.java
BaseRegisteredServiceUsernameAttributeProvider.encryptResolvedUsername
protected String encryptResolvedUsername(final Principal principal, final Service service, final RegisteredService registeredService, final String username) { val applicationContext = ApplicationContextProvider.getApplicationContext(); val cipher = applicationContext.getBean("registeredServiceCipherExec...
java
protected String encryptResolvedUsername(final Principal principal, final Service service, final RegisteredService registeredService, final String username) { val applicationContext = ApplicationContextProvider.getApplicationContext(); val cipher = applicationContext.getBean("registeredServiceCipherExec...
[ "protected", "String", "encryptResolvedUsername", "(", "final", "Principal", "principal", ",", "final", "Service", "service", ",", "final", "RegisteredService", "registeredService", ",", "final", "String", "username", ")", "{", "val", "applicationContext", "=", "Appli...
Encrypt resolved username. @param principal the principal @param service the service @param registeredService the registered service @param username the username @return the encrypted username or null
[ "Encrypt", "resolved", "username", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/BaseRegisteredServiceUsernameAttributeProvider.java#L68-L72
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnparameter.java
vpnparameter.get
public static vpnparameter get(nitro_service service, options option) throws Exception{ vpnparameter obj = new vpnparameter(); vpnparameter[] response = (vpnparameter[])obj.get_resources(service,option); return response[0]; }
java
public static vpnparameter get(nitro_service service, options option) throws Exception{ vpnparameter obj = new vpnparameter(); vpnparameter[] response = (vpnparameter[])obj.get_resources(service,option); return response[0]; }
[ "public", "static", "vpnparameter", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "vpnparameter", "obj", "=", "new", "vpnparameter", "(", ")", ";", "vpnparameter", "[", "]", "response", "=", "(", "vpnparamet...
Use this API to fetch all the vpnparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "vpnparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnparameter.java#L1494-L1498
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java
Aggregations.longSum
public static <Key, Value> Aggregation<Key, Long, Long> longSum() { return new AggregationAdapter(new LongSumAggregation<Key, Value>()); }
java
public static <Key, Value> Aggregation<Key, Long, Long> longSum() { return new AggregationAdapter(new LongSumAggregation<Key, Value>()); }
[ "public", "static", "<", "Key", ",", "Value", ">", "Aggregation", "<", "Key", ",", "Long", ",", "Long", ">", "longSum", "(", ")", "{", "return", "new", "AggregationAdapter", "(", "new", "LongSumAggregation", "<", "Key", ",", "Value", ">", "(", ")", ")"...
Returns an aggregation to calculate the long sum of all supplied values.<br/> This aggregation is similar to: <pre>SELECT SUM(value) FROM x</pre> @param <Key> the input key type @param <Value> the supplied value type @return the sum over all supplied values
[ "Returns", "an", "aggregation", "to", "calculate", "the", "long", "sum", "of", "all", "supplied", "values", ".", "<br", "/", ">", "This", "aggregation", "is", "similar", "to", ":", "<pre", ">", "SELECT", "SUM", "(", "value", ")", "FROM", "x<", "/", "pr...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java#L162-L164
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/JaasGssUtil.java
JaasGssUtil.createSubject
public static Subject createSubject(GSSName name, GSSCredential cred) throws GSSException { if (cred == null && name == null) { return null; } Subject subject = new Subject(); if (cred != null) { subject.getPrivateCredentials().add(cred); if (name == null) { GlobusPrincipal nm = toGlobusPrincipal(...
java
public static Subject createSubject(GSSName name, GSSCredential cred) throws GSSException { if (cred == null && name == null) { return null; } Subject subject = new Subject(); if (cred != null) { subject.getPrivateCredentials().add(cred); if (name == null) { GlobusPrincipal nm = toGlobusPrincipal(...
[ "public", "static", "Subject", "createSubject", "(", "GSSName", "name", ",", "GSSCredential", "cred", ")", "throws", "GSSException", "{", "if", "(", "cred", "==", "null", "&&", "name", "==", "null", ")", "{", "return", "null", ";", "}", "Subject", "subject...
Creates a new <code>Subject</code> object from specified <code>GSSCredential</code> and <code>GSSName</code>. If the GSSCredential is specified it is added to the private credential set of the Subject object. Also, if the GSSCredential.getName() is of type <code> org.globus.gsi.gssapi.GlobusGSSName</code> and the GSSNa...
[ "Creates", "a", "new", "<code", ">", "Subject<", "/", "code", ">", "object", "from", "specified", "<code", ">", "GSSCredential<", "/", "code", ">", "and", "<code", ">", "GSSName<", "/", "code", ">", ".", "If", "the", "GSSCredential", "is", "specified", "...
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/JaasGssUtil.java#L63-L82
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java
DoublesSketch.getUpdatableStorageBytes
public static int getUpdatableStorageBytes(final int k, final long n) { if (n == 0) { return 8; } final int metaPre = DoublesSketch.MAX_PRELONGS + 2; //plus min, max final int totLevels = Util.computeNumLevelsNeeded(k, n); if (n <= k) { final int ceil = Math.max(ceilingPowerOf2((int)n), DoublesSke...
java
public static int getUpdatableStorageBytes(final int k, final long n) { if (n == 0) { return 8; } final int metaPre = DoublesSketch.MAX_PRELONGS + 2; //plus min, max final int totLevels = Util.computeNumLevelsNeeded(k, n); if (n <= k) { final int ceil = Math.max(ceilingPowerOf2((int)n), DoublesSke...
[ "public", "static", "int", "getUpdatableStorageBytes", "(", "final", "int", "k", ",", "final", "long", "n", ")", "{", "if", "(", "n", "==", "0", ")", "{", "return", "8", ";", "}", "final", "int", "metaPre", "=", "DoublesSketch", ".", "MAX_PRELONGS", "+...
Returns the number of bytes a sketch would require to store in updatable form. This uses roughly 2X the storage of the compact form given the values of <i>k</i> and <i>n</i>. @param k the size configuration parameter for the sketch @param n the number of items input into the sketch @return the number of bytes this sket...
[ "Returns", "the", "number", "of", "bytes", "a", "sketch", "would", "require", "to", "store", "in", "updatable", "form", ".", "This", "uses", "roughly", "2X", "the", "storage", "of", "the", "compact", "form", "given", "the", "values", "of", "<i", ">", "k<...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java#L664-L673
apereo/cas
support/cas-server-support-google-analytics/src/main/java/org/apereo/cas/web/flow/CasGoogleAnalyticsWebflowConfigurer.java
CasGoogleAnalyticsWebflowConfigurer.putGoogleAnalyticsTrackingIdIntoFlowScope
private static void putGoogleAnalyticsTrackingIdIntoFlowScope(final RequestContext context, final String value) { if (StringUtils.isBlank(value)) { context.getFlowScope().remove(ATTRIBUTE_FLOWSCOPE_GOOGLE_ANALYTICS_TRACKING_ID); } else { context.getFlowScope().put(ATTRIBUTE_FLOWS...
java
private static void putGoogleAnalyticsTrackingIdIntoFlowScope(final RequestContext context, final String value) { if (StringUtils.isBlank(value)) { context.getFlowScope().remove(ATTRIBUTE_FLOWSCOPE_GOOGLE_ANALYTICS_TRACKING_ID); } else { context.getFlowScope().put(ATTRIBUTE_FLOWS...
[ "private", "static", "void", "putGoogleAnalyticsTrackingIdIntoFlowScope", "(", "final", "RequestContext", "context", ",", "final", "String", "value", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "value", ")", ")", "{", "context", ".", "getFlowScope", ...
Put tracking id into flow scope. @param context the context @param value the value
[ "Put", "tracking", "id", "into", "flow", "scope", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-google-analytics/src/main/java/org/apereo/cas/web/flow/CasGoogleAnalyticsWebflowConfigurer.java#L107-L113
apache/reef
lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java
FileSet.createSymbolicLinkTo
void createSymbolicLinkTo(final File destinationFolder) throws IOException { for (final File f : this.theFiles) { final File destinationFile = new File(destinationFolder, f.getName()); Files.createSymbolicLink(destinationFile.toPath(), f.toPath()); } }
java
void createSymbolicLinkTo(final File destinationFolder) throws IOException { for (final File f : this.theFiles) { final File destinationFile = new File(destinationFolder, f.getName()); Files.createSymbolicLink(destinationFile.toPath(), f.toPath()); } }
[ "void", "createSymbolicLinkTo", "(", "final", "File", "destinationFolder", ")", "throws", "IOException", "{", "for", "(", "final", "File", "f", ":", "this", ".", "theFiles", ")", "{", "final", "File", "destinationFile", "=", "new", "File", "(", "destinationFol...
Creates symbolic links for the current FileSet into the given destinationFolder. @param destinationFolder the folder where the symbolic links will be created. @throws IOException
[ "Creates", "symbolic", "links", "for", "the", "current", "FileSet", "into", "the", "given", "destinationFolder", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java#L92-L97
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/PgCallableStatement.java
PgCallableStatement.checkIndex
protected void checkIndex(int parameterIndex, int type, String getName) throws SQLException { checkIndex(parameterIndex); if (type != this.testReturn[parameterIndex - 1]) { throw new PSQLException( GT.tr("Parameter of type {0} was registered, but call to get{1} (sqltype={2}) was made.", ...
java
protected void checkIndex(int parameterIndex, int type, String getName) throws SQLException { checkIndex(parameterIndex); if (type != this.testReturn[parameterIndex - 1]) { throw new PSQLException( GT.tr("Parameter of type {0} was registered, but call to get{1} (sqltype={2}) was made.", ...
[ "protected", "void", "checkIndex", "(", "int", "parameterIndex", ",", "int", "type", ",", "String", "getName", ")", "throws", "SQLException", "{", "checkIndex", "(", "parameterIndex", ")", ";", "if", "(", "type", "!=", "this", ".", "testReturn", "[", "parame...
Helper function for the getXXX calls to check isFunction and index == 1. @param parameterIndex parameter index (1-based) @param type type @param getName getter name @throws SQLException if given index is not valid
[ "Helper", "function", "for", "the", "getXXX", "calls", "to", "check", "isFunction", "and", "index", "==", "1", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/PgCallableStatement.java#L382-L391
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.warnv
public void warnv(String format, Object param1, Object param2, Object param3) { if (isEnabled(Level.WARN)) { doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null); } }
java
public void warnv(String format, Object param1, Object param2, Object param3) { if (isEnabled(Level.WARN)) { doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null); } }
[ "public", "void", "warnv", "(", "String", "format", ",", "Object", "param1", ",", "Object", "param2", ",", "Object", "param3", ")", "{", "if", "(", "isEnabled", "(", "Level", ".", "WARN", ")", ")", "{", "doLog", "(", "Level", ".", "WARN", ",", "FQCN"...
Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param param1 the first parameter @param param2 the second parameter @param param3 the third parameter
[ "Issue", "a", "log", "message", "with", "a", "level", "of", "WARN", "using", "{", "@link", "java", ".", "text", ".", "MessageFormat", "}", "-", "style", "formatting", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L1330-L1334
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/helper/CSLUtils.java
CSLUtils.readURLToString
public static String readURLToString(URL u, String encoding) throws IOException { for (int i = 0; i < 30; ++i) { URLConnection conn = u.openConnection(); // handle HTTP URLs if (conn instanceof HttpURLConnection) { HttpURLConnection hconn = (HttpURLConnection)conn; // set timeouts hconn.setConn...
java
public static String readURLToString(URL u, String encoding) throws IOException { for (int i = 0; i < 30; ++i) { URLConnection conn = u.openConnection(); // handle HTTP URLs if (conn instanceof HttpURLConnection) { HttpURLConnection hconn = (HttpURLConnection)conn; // set timeouts hconn.setConn...
[ "public", "static", "String", "readURLToString", "(", "URL", "u", ",", "String", "encoding", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "30", ";", "++", "i", ")", "{", "URLConnection", "conn", "=", "u", ".", ...
Reads a string from a URL @param u the URL @param encoding the character encoding @return the string @throws IOException if the URL contents could not be read
[ "Reads", "a", "string", "from", "a", "URL" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/helper/CSLUtils.java#L38-L64
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PtoPInputHandler.java
PtoPInputHandler.reportResolvedGap
@Override public void reportResolvedGap(String sourceMEUuid, long filledGap) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "reportResolvedGap", new Object[] { sourceMEUuid, new Long(filledGap) }); if (_isLink) { //The gap star...
java
@Override public void reportResolvedGap(String sourceMEUuid, long filledGap) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "reportResolvedGap", new Object[] { sourceMEUuid, new Long(filledGap) }); if (_isLink) { //The gap star...
[ "@", "Override", "public", "void", "reportResolvedGap", "(", "String", "sourceMEUuid", ",", "long", "filledGap", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "ent...
Issue an all clear on a previously reported gap in a GD stream (510343) @param sourceMEUuid @param filledGap
[ "Issue", "an", "all", "clear", "on", "a", "previously", "reported", "gap", "in", "a", "GD", "stream", "(", "510343", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PtoPInputHandler.java#L3538-L3565
primefaces/primefaces
src/main/java/org/primefaces/expression/SearchExpressionFacade.java
SearchExpressionFacade.resolveClientIds
public static String resolveClientIds(FacesContext context, UIComponent source, String expressions) { return resolveClientIds(context, source, expressions, SearchExpressionHint.NONE); }
java
public static String resolveClientIds(FacesContext context, UIComponent source, String expressions) { return resolveClientIds(context, source, expressions, SearchExpressionHint.NONE); }
[ "public", "static", "String", "resolveClientIds", "(", "FacesContext", "context", ",", "UIComponent", "source", ",", "String", "expressions", ")", "{", "return", "resolveClientIds", "(", "context", ",", "source", ",", "expressions", ",", "SearchExpressionHint", ".",...
Resolves a list of {@link UIComponent} clientIds and/or passtrough expressions for the given expression or expressions. @param context The {@link FacesContext}. @param source The source component. E.g. a button. @param expressions The search expressions. @return A {@link List} with resolved clientIds and/or passtrough...
[ "Resolves", "a", "list", "of", "{", "@link", "UIComponent", "}", "clientIds", "and", "/", "or", "passtrough", "expressions", "for", "the", "given", "expression", "or", "expressions", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/expression/SearchExpressionFacade.java#L152-L155
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java
CommerceOrderItemPersistenceImpl.removeByC_S
@Override public void removeByC_S(long commerceOrderId, boolean subscription) { for (CommerceOrderItem commerceOrderItem : findByC_S(commerceOrderId, subscription, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceOrderItem); } }
java
@Override public void removeByC_S(long commerceOrderId, boolean subscription) { for (CommerceOrderItem commerceOrderItem : findByC_S(commerceOrderId, subscription, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceOrderItem); } }
[ "@", "Override", "public", "void", "removeByC_S", "(", "long", "commerceOrderId", ",", "boolean", "subscription", ")", "{", "for", "(", "CommerceOrderItem", "commerceOrderItem", ":", "findByC_S", "(", "commerceOrderId", ",", "subscription", ",", "QueryUtil", ".", ...
Removes all the commerce order items where commerceOrderId = &#63; and subscription = &#63; from the database. @param commerceOrderId the commerce order ID @param subscription the subscription
[ "Removes", "all", "the", "commerce", "order", "items", "where", "commerceOrderId", "=", "&#63", ";", "and", "subscription", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java#L2682-L2688
sababado/CircularView
library/src/main/java/com/sababado/circularview/CircularViewObject.java
CircularViewObject.updateDrawableState
public void updateDrawableState(int state, boolean flag) { final int oldState = mCombinedState; // Update the combined state flag if (flag) mCombinedState |= state; else mCombinedState &= ~state; // Set the combined state if (oldState != mCombinedState) { set...
java
public void updateDrawableState(int state, boolean flag) { final int oldState = mCombinedState; // Update the combined state flag if (flag) mCombinedState |= state; else mCombinedState &= ~state; // Set the combined state if (oldState != mCombinedState) { set...
[ "public", "void", "updateDrawableState", "(", "int", "state", ",", "boolean", "flag", ")", "{", "final", "int", "oldState", "=", "mCombinedState", ";", "// Update the combined state flag", "if", "(", "flag", ")", "mCombinedState", "|=", "state", ";", "else", "mC...
Either remove or add a state to the combined state. @param state State to add or remove. @param flag True to add, false to remove.
[ "Either", "remove", "or", "add", "a", "state", "to", "the", "combined", "state", "." ]
train
https://github.com/sababado/CircularView/blob/c9ab818d063bcc0796183616f8a82166a9b80aac/library/src/main/java/com/sababado/circularview/CircularViewObject.java#L230-L240
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/application/ResourceHandlerWrapper.java
ResourceHandlerWrapper.createResource
@Override public Resource createResource(String resourceName, String libraryName) { return getWrapped().createResource(resourceName, libraryName); }
java
@Override public Resource createResource(String resourceName, String libraryName) { return getWrapped().createResource(resourceName, libraryName); }
[ "@", "Override", "public", "Resource", "createResource", "(", "String", "resourceName", ",", "String", "libraryName", ")", "{", "return", "getWrapped", "(", ")", ".", "createResource", "(", "resourceName", ",", "libraryName", ")", ";", "}" ]
<p class="changed_added_2_0">The default behavior of this method is to call {@link ResourceHandler#createResource(String, String)} on the wrapped {@link ResourceHandler} object.</p>
[ "<p", "class", "=", "changed_added_2_0", ">", "The", "default", "behavior", "of", "this", "method", "is", "to", "call", "{" ]
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/application/ResourceHandlerWrapper.java#L109-L114
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java
OdsElements.writeMeta
public void writeMeta(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException { this.logger.log(Level.FINER, "Writing odselement: metaElement to zip file"); this.metaElement.write(xmlUtil, writer); }
java
public void writeMeta(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException { this.logger.log(Level.FINER, "Writing odselement: metaElement to zip file"); this.metaElement.write(xmlUtil, writer); }
[ "public", "void", "writeMeta", "(", "final", "XMLUtil", "xmlUtil", ",", "final", "ZipUTF8Writer", "writer", ")", "throws", "IOException", "{", "this", ".", "logger", ".", "log", "(", "Level", ".", "FINER", ",", "\"Writing odselement: metaElement to zip file\"", ")...
Write the meta element to a writer. @param xmlUtil the xml util @param writer the writer @throws IOException if write fails
[ "Write", "the", "meta", "element", "to", "a", "writer", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L399-L402
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java
SegmentFelzenszwalbHuttenlocher04.initialize
protected void initialize(T input , GrayS32 output ) { this.graph = output; final int N = input.width*input.height; regionSize.resize(N); threshold.resize(N); for( int i = 0; i < N; i++ ) { regionSize.data[i] = 1; threshold.data[i] = K; graph.data[i] = i; // assign a unique label to each pixel since...
java
protected void initialize(T input , GrayS32 output ) { this.graph = output; final int N = input.width*input.height; regionSize.resize(N); threshold.resize(N); for( int i = 0; i < N; i++ ) { regionSize.data[i] = 1; threshold.data[i] = K; graph.data[i] = i; // assign a unique label to each pixel since...
[ "protected", "void", "initialize", "(", "T", "input", ",", "GrayS32", "output", ")", "{", "this", ".", "graph", "=", "output", ";", "final", "int", "N", "=", "input", ".", "width", "*", "input", ".", "height", ";", "regionSize", ".", "resize", "(", "...
Predeclares all memory required and sets data structures to their initial values
[ "Predeclares", "all", "memory", "required", "and", "sets", "data", "structures", "to", "their", "initial", "values" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L170-L184
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.getStatusesAsync
public com.squareup.okhttp.Call getStatusesAsync(String tid, Integer count, Integer offset, String status, String dids, final ApiCallback<TaskStatusesEnvelope> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener prog...
java
public com.squareup.okhttp.Call getStatusesAsync(String tid, Integer count, Integer offset, String status, String dids, final ApiCallback<TaskStatusesEnvelope> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener prog...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "getStatusesAsync", "(", "String", "tid", ",", "Integer", "count", ",", "Integer", "offset", ",", "String", "status", ",", "String", "dids", ",", "final", "ApiCallback", "<", "TaskStatusesEnvelope",...
Returns the details and status of a task id and the individual statuses of each device id in the list. (asynchronously) Returns the details and status of a task id and the individual statuses of each device id in the list. @param tid Task ID. (required) @param count Max results count. (optional) @param offset Result st...
[ "Returns", "the", "details", "and", "status", "of", "a", "task", "id", "and", "the", "individual", "statuses", "of", "each", "device", "id", "in", "the", "list", ".", "(", "asynchronously", ")", "Returns", "the", "details", "and", "status", "of", "a", "t...
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L927-L952
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftComaniciu2003.java
TrackerMeanShiftComaniciu2003.distanceHistogram
protected double distanceHistogram(float histogramA[], float histogramB[]) { double sumP = 0; for( int i = 0; i < histogramA.length; i++ ) { float q = histogramA[i]; float p = histogramB[i]; sumP += Math.abs(q-p); } return sumP; }
java
protected double distanceHistogram(float histogramA[], float histogramB[]) { double sumP = 0; for( int i = 0; i < histogramA.length; i++ ) { float q = histogramA[i]; float p = histogramB[i]; sumP += Math.abs(q-p); } return sumP; }
[ "protected", "double", "distanceHistogram", "(", "float", "histogramA", "[", "]", ",", "float", "histogramB", "[", "]", ")", "{", "double", "sumP", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "histogramA", ".", "length", ";", "i",...
Computes the difference between two histograms using SAD. This is a change from the paper, which uses Bhattacharyya. Bhattacharyya could give poor performance even with perfect data since two errors can cancel each other out. For example, part of the histogram is too small and another part is too large.
[ "Computes", "the", "difference", "between", "two", "histograms", "using", "SAD", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftComaniciu2003.java#L325-L333
LearnLib/learnlib
commons/acex/src/main/java/de/learnlib/acex/analyzers/AcexAnalysisAlgorithms.java
AcexAnalysisAlgorithms.exponentialSearchBwd
public static <E> int exponentialSearchBwd(AbstractCounterexample<E> acex, int low, int high) { assert !acex.testEffects(low, high); int ofs = 1; E effHigh = acex.effect(high); int highIter = high; int lowIter = low; while (highIter - ofs > lowIter) { int n...
java
public static <E> int exponentialSearchBwd(AbstractCounterexample<E> acex, int low, int high) { assert !acex.testEffects(low, high); int ofs = 1; E effHigh = acex.effect(high); int highIter = high; int lowIter = low; while (highIter - ofs > lowIter) { int n...
[ "public", "static", "<", "E", ">", "int", "exponentialSearchBwd", "(", "AbstractCounterexample", "<", "E", ">", "acex", ",", "int", "low", ",", "int", "high", ")", "{", "assert", "!", "acex", ".", "testEffects", "(", "low", ",", "high", ")", ";", "int"...
Search for a suffix index using an exponential search. @param acex the abstract counterexample @param low the lower bound of the search range @param high the upper bound of the search range @return an index <code>i</code> such that <code>acex.testEffect(i) != acex.testEffect(i+1)</code>
[ "Search", "for", "a", "suffix", "index", "using", "an", "exponential", "search", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/commons/acex/src/main/java/de/learnlib/acex/analyzers/AcexAnalysisAlgorithms.java#L90-L111
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Popups.java
Popups.centerOn
public static <T extends PopupPanel> T centerOn (T popup, int ypos) { boolean wasHidden = !popup.isShowing(); boolean wasVisible = popup.isVisible(); if (wasVisible) { popup.setVisible(false); } if (wasHidden) { popup.show(); } int left...
java
public static <T extends PopupPanel> T centerOn (T popup, int ypos) { boolean wasHidden = !popup.isShowing(); boolean wasVisible = popup.isVisible(); if (wasVisible) { popup.setVisible(false); } if (wasHidden) { popup.show(); } int left...
[ "public", "static", "<", "T", "extends", "PopupPanel", ">", "T", "centerOn", "(", "T", "popup", ",", "int", "ypos", ")", "{", "boolean", "wasHidden", "=", "!", "popup", ".", "isShowing", "(", ")", ";", "boolean", "wasVisible", "=", "popup", ".", "isVis...
Centers the supplied vertically on the supplied trigger widget. The popup's showing state will be preserved. @return the supplied popup.
[ "Centers", "the", "supplied", "vertically", "on", "the", "supplied", "trigger", "widget", ".", "The", "popup", "s", "showing", "state", "will", "be", "preserved", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Popups.java#L240-L264
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.location_pccZone_hypervisor_shortName_GET
public OvhOs location_pccZone_hypervisor_shortName_GET(String pccZone, String shortName) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/hypervisor/{shortName}"; StringBuilder sb = path(qPath, pccZone, shortName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(re...
java
public OvhOs location_pccZone_hypervisor_shortName_GET(String pccZone, String shortName) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/hypervisor/{shortName}"; StringBuilder sb = path(qPath, pccZone, shortName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(re...
[ "public", "OvhOs", "location_pccZone_hypervisor_shortName_GET", "(", "String", "pccZone", ",", "String", "shortName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/location/{pccZone}/hypervisor/{shortName}\"", ";", "StringBuilder", "sb", "=", ...
Get this object properties REST: GET /dedicatedCloud/location/{pccZone}/hypervisor/{shortName} @param pccZone [required] Name of pccZone @param shortName [required] Short name of hypervisor
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L3081-L3086
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/SharesInner.java
SharesInner.beginRefreshAsync
public Observable<Void> beginRefreshAsync(String deviceName, String name, String resourceGroupName) { return beginRefreshWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response)...
java
public Observable<Void> beginRefreshAsync(String deviceName, String name, String resourceGroupName) { return beginRefreshWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response)...
[ "public", "Observable", "<", "Void", ">", "beginRefreshAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ")", "{", "return", "beginRefreshWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "resourceGroupName",...
Refreshes the share metadata with the data from the cloud. @param deviceName The device name. @param name The share name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Refreshes", "the", "share", "metadata", "with", "the", "data", "from", "the", "cloud", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/SharesInner.java#L786-L793
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.loadClose
static Properties loadClose(final InputStream in, final Object source) { final Properties props = new Properties(); if (null != in) { try { props.load(in); } catch (final IOException e) { LowLevelLogUtil.logException("Unable to read " + source, e);...
java
static Properties loadClose(final InputStream in, final Object source) { final Properties props = new Properties(); if (null != in) { try { props.load(in); } catch (final IOException e) { LowLevelLogUtil.logException("Unable to read " + source, e);...
[ "static", "Properties", "loadClose", "(", "final", "InputStream", "in", ",", "final", "Object", "source", ")", "{", "final", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "if", "(", "null", "!=", "in", ")", "{", "try", "{", "props", "...
Loads and closes the given property input stream. If an error occurs, log to the status logger. @param in a property input stream. @param source a source object describing the source, like a resource string or a URL. @return a new Properties object
[ "Loads", "and", "closes", "the", "given", "property", "input", "stream", ".", "If", "an", "error", "occurs", "log", "to", "the", "status", "logger", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L77-L93
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/server/mvc/RepresentationModelAssemblerSupport.java
RepresentationModelAssemblerSupport.createModelWithId
protected D createModelWithId(Object id, T entity) { return createModelWithId(id, entity, new Object[0]); }
java
protected D createModelWithId(Object id, T entity) { return createModelWithId(id, entity, new Object[0]); }
[ "protected", "D", "createModelWithId", "(", "Object", "id", ",", "T", "entity", ")", "{", "return", "createModelWithId", "(", "id", ",", "entity", ",", "new", "Object", "[", "0", "]", ")", ";", "}" ]
Creates a new resource with a self link to the given id. @param entity must not be {@literal null}. @param id must not be {@literal null}. @return
[ "Creates", "a", "new", "resource", "with", "a", "self", "link", "to", "the", "given", "id", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/server/mvc/RepresentationModelAssemblerSupport.java#L78-L80
sebastiangraf/jSCSI
bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java
AbstractMessageParser.serializeBasicHeaderSegment
final void serializeBasicHeaderSegment (final ByteBuffer dst, final int offset) throws InternetSCSIException { dst.position(offset); dst.putInt(offset, dst.getInt() | serializeBytes1to3()); dst.position(offset + BasicHeaderSegment.BYTES_8_11); dst.putInt(serializeBytes8to11()); ...
java
final void serializeBasicHeaderSegment (final ByteBuffer dst, final int offset) throws InternetSCSIException { dst.position(offset); dst.putInt(offset, dst.getInt() | serializeBytes1to3()); dst.position(offset + BasicHeaderSegment.BYTES_8_11); dst.putInt(serializeBytes8to11()); ...
[ "final", "void", "serializeBasicHeaderSegment", "(", "final", "ByteBuffer", "dst", ",", "final", "int", "offset", ")", "throws", "InternetSCSIException", "{", "dst", ".", "position", "(", "offset", ")", ";", "dst", ".", "putInt", "(", "offset", ",", "dst", "...
This method serializes the whole BHS to its byte representation. @param dst The destination <code>ByteBuffer</code> to write to. @param offset The start offset in <code>dst</code>. @throws InternetSCSIException If any violation of the iSCSI-Standard emerge.
[ "This", "method", "serializes", "the", "whole", "BHS", "to", "its", "byte", "representation", "." ]
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java#L112-L129
janus-project/guava.janusproject.io
guava/src/com/google/common/util/concurrent/MoreExecutors.java
MoreExecutors.shutdownAndAwaitTermination
@Beta public static boolean shutdownAndAwaitTermination( ExecutorService service, long timeout, TimeUnit unit) { checkNotNull(unit); // Disable new tasks from being submitted service.shutdown(); try { long halfTimeoutNanos = TimeUnit.NANOSECONDS.convert(timeout, unit) / 2; // Wait fo...
java
@Beta public static boolean shutdownAndAwaitTermination( ExecutorService service, long timeout, TimeUnit unit) { checkNotNull(unit); // Disable new tasks from being submitted service.shutdown(); try { long halfTimeoutNanos = TimeUnit.NANOSECONDS.convert(timeout, unit) / 2; // Wait fo...
[ "@", "Beta", "public", "static", "boolean", "shutdownAndAwaitTermination", "(", "ExecutorService", "service", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "checkNotNull", "(", "unit", ")", ";", "// Disable new tasks from being submitted", "service", ".",...
Shuts down the given executor gradually, first disabling new submissions and later cancelling existing tasks. <p>The method takes the following steps: <ol> <li>calls {@link ExecutorService#shutdown()}, disabling acceptance of new submitted tasks. <li>waits for half of the specified timeout. <li>if the timeout expires,...
[ "Shuts", "down", "the", "given", "executor", "gradually", "first", "disabling", "new", "submissions", "and", "later", "cancelling", "existing", "tasks", "." ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/util/concurrent/MoreExecutors.java#L939-L961
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/http/IdleConnectionReaper.java
IdleConnectionReaper.registerConnectionManager
public static boolean registerConnectionManager(HttpClientConnectionManager connectionManager, long maxIdleInMs) { if (instance == null) { synchronized (IdleConnectionReaper.class) { if (instance == null) { instance = new IdleConnectionReaper(); ...
java
public static boolean registerConnectionManager(HttpClientConnectionManager connectionManager, long maxIdleInMs) { if (instance == null) { synchronized (IdleConnectionReaper.class) { if (instance == null) { instance = new IdleConnectionReaper(); ...
[ "public", "static", "boolean", "registerConnectionManager", "(", "HttpClientConnectionManager", "connectionManager", ",", "long", "maxIdleInMs", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "synchronized", "(", "IdleConnectionReaper", ".", "class", ")", ...
Registers the given connection manager with this reaper; @param connectionManager Connection manager to register @param maxIdleInMs Max idle connection timeout in milliseconds for this connection manager. @return true if the connection manager has been successfully registered; false otherwise.
[ "Registers", "the", "given", "connection", "manager", "with", "this", "reaper", ";" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/IdleConnectionReaper.java#L105-L115
Alluxio/alluxio
shell/src/main/java/alluxio/cli/fs/command/CpCommand.java
CpCommand.copyFile
private void copyFile(AlluxioURI srcPath, AlluxioURI dstPath) throws AlluxioException, IOException { try (Closer closer = Closer.create()) { FileInStream is = closer.register(mFileSystem.openFile(srcPath)); FileOutStream os = closer.register(mFileSystem.createFile(dstPath)); try { IO...
java
private void copyFile(AlluxioURI srcPath, AlluxioURI dstPath) throws AlluxioException, IOException { try (Closer closer = Closer.create()) { FileInStream is = closer.register(mFileSystem.openFile(srcPath)); FileOutStream os = closer.register(mFileSystem.createFile(dstPath)); try { IO...
[ "private", "void", "copyFile", "(", "AlluxioURI", "srcPath", ",", "AlluxioURI", "dstPath", ")", "throws", "AlluxioException", ",", "IOException", "{", "try", "(", "Closer", "closer", "=", "Closer", ".", "create", "(", ")", ")", "{", "FileInStream", "is", "="...
Copies a file in the Alluxio filesystem. @param srcPath the source {@link AlluxioURI} (has to be a file) @param dstPath the destination path in the Alluxio filesystem
[ "Copies", "a", "file", "in", "the", "Alluxio", "filesystem", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/shell/src/main/java/alluxio/cli/fs/command/CpCommand.java#L535-L549
httl/httl
httl/src/main/java/httl/util/ConcurrentLinkedHashMap.java
ConcurrentLinkedHashMap.moveTasksFromBuffer
int moveTasksFromBuffer(Task[] tasks, int bufferIndex) { // While a buffer is being drained it may be concurrently appended to. // The // number of tasks removed are tracked so that the length can be // decremented // by the delta rather than set to zero. Queue<Task> buff...
java
int moveTasksFromBuffer(Task[] tasks, int bufferIndex) { // While a buffer is being drained it may be concurrently appended to. // The // number of tasks removed are tracked so that the length can be // decremented // by the delta rather than set to zero. Queue<Task> buff...
[ "int", "moveTasksFromBuffer", "(", "Task", "[", "]", "tasks", ",", "int", "bufferIndex", ")", "{", "// While a buffer is being drained it may be concurrently appended to.", "// The", "// number of tasks removed are tracked so that the length can be", "// decremented", "// by the delt...
Moves the tasks from the specified buffer into the output array. @param tasks the ordered array of the pending operations @param bufferIndex the buffer to drain into the tasks array @return the highest index location of a task that was added to the array
[ "Moves", "the", "tasks", "from", "the", "specified", "buffer", "into", "the", "output", "array", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/util/ConcurrentLinkedHashMap.java#L463-L502
EdwardRaff/JSAT
JSAT/src/jsat/text/ClassificationHashedTextDataLoader.java
ClassificationHashedTextDataLoader.addOriginalDocument
protected int addOriginalDocument(String text, int label) { if(label >= labelInfo.getNumOfCategories()) throw new RuntimeException("Invalid label given"); int index = super.addOriginalDocument(text); synchronized(classLabels) { while(classLabels.size() < index...
java
protected int addOriginalDocument(String text, int label) { if(label >= labelInfo.getNumOfCategories()) throw new RuntimeException("Invalid label given"); int index = super.addOriginalDocument(text); synchronized(classLabels) { while(classLabels.size() < index...
[ "protected", "int", "addOriginalDocument", "(", "String", "text", ",", "int", "label", ")", "{", "if", "(", "label", ">=", "labelInfo", ".", "getNumOfCategories", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"Invalid label given\"", ")", ";", "int...
To be called by the {@link #initialLoad() } method. It will take in the text and add a new document vector to the data set. Once all text documents have been loaded, this method should never be called again. <br> This method is thread safe. @param text the text of the document to add @param label the classification la...
[ "To", "be", "called", "by", "the", "{", "@link", "#initialLoad", "()", "}", "method", ".", "It", "will", "take", "in", "the", "text", "and", "add", "a", "new", "document", "vector", "to", "the", "data", "set", ".", "Once", "all", "text", "documents", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/text/ClassificationHashedTextDataLoader.java#L101-L116
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java
MetadataCache.getCacheFormatEntry
private String getCacheFormatEntry() throws IOException { ZipEntry zipEntry = zipFile.getEntry(CACHE_FORMAT_ENTRY); InputStream is = zipFile.getInputStream(zipEntry); try { Scanner s = new Scanner(is, "UTF-8").useDelimiter("\\A"); String tag = null; if (s.hasN...
java
private String getCacheFormatEntry() throws IOException { ZipEntry zipEntry = zipFile.getEntry(CACHE_FORMAT_ENTRY); InputStream is = zipFile.getInputStream(zipEntry); try { Scanner s = new Scanner(is, "UTF-8").useDelimiter("\\A"); String tag = null; if (s.hasN...
[ "private", "String", "getCacheFormatEntry", "(", ")", "throws", "IOException", "{", "ZipEntry", "zipEntry", "=", "zipFile", ".", "getEntry", "(", "CACHE_FORMAT_ENTRY", ")", ";", "InputStream", "is", "=", "zipFile", ".", "getInputStream", "(", "zipEntry", ")", ";...
Find and read the cache format entry in a metadata cache file. @return the content of the format entry, or {@code null} if none was found @throws IOException if there is a problem reading the file
[ "Find", "and", "read", "the", "cache", "format", "entry", "in", "a", "metadata", "cache", "file", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java#L454-L465
JDBDT/jdbdt
src/main/java/org/jdbdt/DB.java
DB.logQuery
void logQuery(CallInfo callInfo, DataSet data) { if (isEnabled(Option.LOG_QUERIES)) { log.write(callInfo, data); } }
java
void logQuery(CallInfo callInfo, DataSet data) { if (isEnabled(Option.LOG_QUERIES)) { log.write(callInfo, data); } }
[ "void", "logQuery", "(", "CallInfo", "callInfo", ",", "DataSet", "data", ")", "{", "if", "(", "isEnabled", "(", "Option", ".", "LOG_QUERIES", ")", ")", "{", "log", ".", "write", "(", "callInfo", ",", "data", ")", ";", "}", "}" ]
Log query result. @param callInfo Call info. @param data Data set.
[ "Log", "query", "result", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/DB.java#L468-L472
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/JDBCUtils.java
JDBCUtils.release
public static void release(Statement statement, Connection connection) { if (statement != null) { try { statement.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { JDBCUtils.rel...
java
public static void release(Statement statement, Connection connection) { if (statement != null) { try { statement.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { JDBCUtils.rel...
[ "public", "static", "void", "release", "(", "Statement", "statement", ",", "Connection", "connection", ")", "{", "if", "(", "statement", "!=", "null", ")", "{", "try", "{", "statement", ".", "close", "(", ")", ";", "}", "catch", "(", "SQLException", "e",...
关闭与数据库的连接资源,包括‘Statement’‘Connection’ 的实例对象所占用的资源,注意顺序不能颠倒 @param statement 执行SQL语句的Statement对象 @param connection 连接数据库的连接对象
[ "关闭与数据库的连接资源,包括‘Statement’‘Connection’", "的实例对象所占用的资源,注意顺序不能颠倒" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/JDBCUtils.java#L234-L247
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java
Transform1D.setTranslation
@Inline(value = "setTranslation($1, null, $2)") public void setTranslation(List<? extends S> path, Tuple2D<?> position) { setTranslation(path, null, position); }
java
@Inline(value = "setTranslation($1, null, $2)") public void setTranslation(List<? extends S> path, Tuple2D<?> position) { setTranslation(path, null, position); }
[ "@", "Inline", "(", "value", "=", "\"setTranslation($1, null, $2)\"", ")", "public", "void", "setTranslation", "(", "List", "<", "?", "extends", "S", ">", "path", ",", "Tuple2D", "<", "?", ">", "position", ")", "{", "setTranslation", "(", "path", ",", "nul...
Set the position. <p>If the given <var>path</var> contains only one segment, the transformation will follow the segment's direction. @param path the path to follow. @param position where <code>x</code> is the curviline coordinate and <code>y</code> is the shift coordinate.
[ "Set", "the", "position", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L341-L344
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listClosedListsAsync
public Observable<List<ClosedListEntityExtractor>> listClosedListsAsync(UUID appId, String versionId, ListClosedListsOptionalParameter listClosedListsOptionalParameter) { return listClosedListsWithServiceResponseAsync(appId, versionId, listClosedListsOptionalParameter).map(new Func1<ServiceResponse<List<ClosedL...
java
public Observable<List<ClosedListEntityExtractor>> listClosedListsAsync(UUID appId, String versionId, ListClosedListsOptionalParameter listClosedListsOptionalParameter) { return listClosedListsWithServiceResponseAsync(appId, versionId, listClosedListsOptionalParameter).map(new Func1<ServiceResponse<List<ClosedL...
[ "public", "Observable", "<", "List", "<", "ClosedListEntityExtractor", ">", ">", "listClosedListsAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListClosedListsOptionalParameter", "listClosedListsOptionalParameter", ")", "{", "return", "listClosedListsWithSe...
Gets information about the closedlist models. @param appId The application ID. @param versionId The version ID. @param listClosedListsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the...
[ "Gets", "information", "about", "the", "closedlist", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L1848-L1855
OpenLiberty/open-liberty
dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLog.java
FileLog.getPrintStream
private synchronized PrintStream getPrintStream(long numNewChars, String header) { switch (currentStatus) { case INIT: return createStream(header); case ACTIVE: if (maxFileSizeBytes > 0) { long bytesWritten = currentCountingStream.count...
java
private synchronized PrintStream getPrintStream(long numNewChars, String header) { switch (currentStatus) { case INIT: return createStream(header); case ACTIVE: if (maxFileSizeBytes > 0) { long bytesWritten = currentCountingStream.count...
[ "private", "synchronized", "PrintStream", "getPrintStream", "(", "long", "numNewChars", ",", "String", "header", ")", "{", "switch", "(", "currentStatus", ")", "{", "case", "INIT", ":", "return", "createStream", "(", "header", ")", ";", "case", "ACTIVE", ":", ...
Obtain the current printstream: called from synchronized methods @param requiredLength @return
[ "Obtain", "the", "current", "printstream", ":", "called", "from", "synchronized", "methods" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLog.java#L240-L263
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java
AttributeDefinition.correctValue
protected final ModelNode correctValue(final ModelNode newValue, final ModelNode oldValue) { if (valueCorrector != null) { return valueCorrector.correct(newValue, oldValue); } return newValue; }
java
protected final ModelNode correctValue(final ModelNode newValue, final ModelNode oldValue) { if (valueCorrector != null) { return valueCorrector.correct(newValue, oldValue); } return newValue; }
[ "protected", "final", "ModelNode", "correctValue", "(", "final", "ModelNode", "newValue", ",", "final", "ModelNode", "oldValue", ")", "{", "if", "(", "valueCorrector", "!=", "null", ")", "{", "return", "valueCorrector", ".", "correct", "(", "newValue", ",", "o...
Corrects the value if the {@link ParameterCorrector value corrector} is not {@code null}. If the {@link ParameterCorrector value corrector} is {@code null}, the {@code newValue} parameter is returned. @param newValue the new value. @param oldValue the old value. @return the corrected value or the {@code newValue} if ...
[ "Corrects", "the", "value", "if", "the", "{", "@link", "ParameterCorrector", "value", "corrector", "}", "is", "not", "{", "@code", "null", "}", ".", "If", "the", "{", "@link", "ParameterCorrector", "value", "corrector", "}", "is", "{", "@code", "null", "}"...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L1162-L1167
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/property/PropertyInfo.java
PropertyInfo.setPropertyValue
public void setPropertyValue(Object instance, Object value, boolean forceDirect) { try { if (!forceDirect && instance instanceof IPropertyAccessor) { ((IPropertyAccessor) instance).setPropertyValue(this, value); return; } Method me...
java
public void setPropertyValue(Object instance, Object value, boolean forceDirect) { try { if (!forceDirect && instance instanceof IPropertyAccessor) { ((IPropertyAccessor) instance).setPropertyValue(this, value); return; } Method me...
[ "public", "void", "setPropertyValue", "(", "Object", "instance", ",", "Object", "value", ",", "boolean", "forceDirect", ")", "{", "try", "{", "if", "(", "!", "forceDirect", "&&", "instance", "instanceof", "IPropertyAccessor", ")", "{", "(", "(", "IPropertyAcce...
Sets the property value for a specified object instance. @param instance The object instance. @param value The value to assign. @param forceDirect If true, a forces a direct write to the instance even if it implements IPropertyAccessor
[ "Sets", "the", "property", "value", "for", "a", "specified", "object", "instance", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/property/PropertyInfo.java#L223-L250
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractSuperTypeSelectionDialog.java
AbstractSuperTypeSelectionDialog.createSearchScope
public static IJavaSearchScope createSearchScope(IJavaProject project, Class<?> type, boolean onlySubTypes) { try { final IType superType = project.findType(type.getName()); return SearchEngine.createStrictHierarchyScope( project, superType, // only sub types onlySubTypes, // include th...
java
public static IJavaSearchScope createSearchScope(IJavaProject project, Class<?> type, boolean onlySubTypes) { try { final IType superType = project.findType(type.getName()); return SearchEngine.createStrictHierarchyScope( project, superType, // only sub types onlySubTypes, // include th...
[ "public", "static", "IJavaSearchScope", "createSearchScope", "(", "IJavaProject", "project", ",", "Class", "<", "?", ">", "type", ",", "boolean", "onlySubTypes", ")", "{", "try", "{", "final", "IType", "superType", "=", "project", ".", "findType", "(", "type",...
Creates a searching scope including only one project. @param project the scope of the search. @param type the expected super type. @param onlySubTypes indicates if only the subtypes of the given types are allowed. If <code>false</code>, the super type is allowed too. @return the search scope.
[ "Creates", "a", "searching", "scope", "including", "only", "one", "project", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractSuperTypeSelectionDialog.java#L99-L114
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
TriangleListing.runInternal
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // u, v, bitmask where u < v DataSet<Tuple3<K, K, ByteValue>> filteredByID = input .getEdges() .map(new OrderByID<>()) .setParallelism(parallelism) .name("Order by ID") .groupBy(0, 1) .reduceGroup(new ...
java
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // u, v, bitmask where u < v DataSet<Tuple3<K, K, ByteValue>> filteredByID = input .getEdges() .map(new OrderByID<>()) .setParallelism(parallelism) .name("Order by ID") .groupBy(0, 1) .reduceGroup(new ...
[ "@", "Override", "public", "DataSet", "<", "Result", "<", "K", ">", ">", "runInternal", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "input", ")", "throws", "Exception", "{", "// u, v, bitmask where u < v", "DataSet", "<", "Tuple3", "<", "K", ",", ...
/* Implementation notes: The requirement that "K extends CopyableValue<K>" can be removed when Flink has a self-join and GenerateTriplets is implemented as such. ProjectTriangles should eventually be replaced by ".projectFirst("*")" when projections use code generation.
[ "/", "*", "Implementation", "notes", ":" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java#L81-L136
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/LocalDocumentStore.java
LocalDocumentStore.performOnEachDocument
public DocumentOperationResults performOnEachDocument( BiFunction<String, EditableDocument, Boolean> operation ) { DocumentOperationResults results = new DocumentOperationResults(); database.keys().forEach(key -> runInTransaction(() -> { // We operate upon each document with...
java
public DocumentOperationResults performOnEachDocument( BiFunction<String, EditableDocument, Boolean> operation ) { DocumentOperationResults results = new DocumentOperationResults(); database.keys().forEach(key -> runInTransaction(() -> { // We operate upon each document with...
[ "public", "DocumentOperationResults", "performOnEachDocument", "(", "BiFunction", "<", "String", ",", "EditableDocument", ",", "Boolean", ">", "operation", ")", "{", "DocumentOperationResults", "results", "=", "new", "DocumentOperationResults", "(", ")", ";", "database"...
Perform the supplied operation on each stored document that is accessible within this process. Each document will be operated upon in a separate transaction, which will be committed if the operation is successful or rolledback if the operation cannot be complete successfully. <p> Generally, this method executes the ope...
[ "Perform", "the", "supplied", "operation", "on", "each", "stored", "document", "that", "is", "accessible", "within", "this", "process", ".", "Each", "document", "will", "be", "operated", "upon", "in", "a", "separate", "transaction", "which", "will", "be", "com...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/LocalDocumentStore.java#L249-L269
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TFIDF.java
TFIDF.prepare
public StringWrapper prepare(String s) { lastVector = new UnitVector(s, tokenizer.tokenize(s)); return lastVector; }
java
public StringWrapper prepare(String s) { lastVector = new UnitVector(s, tokenizer.tokenize(s)); return lastVector; }
[ "public", "StringWrapper", "prepare", "(", "String", "s", ")", "{", "lastVector", "=", "new", "UnitVector", "(", "s", ",", "tokenizer", ".", "tokenize", "(", "s", ")", ")", ";", "return", "lastVector", ";", "}" ]
Preprocess a string by finding tokens and giving them TFIDF weights
[ "Preprocess", "a", "string", "by", "finding", "tokens", "and", "giving", "them", "TFIDF", "weights" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TFIDF.java#L39-L42
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java
HttpComponentsClientHttpRequestFactory.createHttpUriRequest
protected HttpUriRequest createHttpUriRequest(HttpMethod httpMethod, URI uri) { switch (httpMethod) { case GET: return new HttpGetHC4(uri); case DELETE: return new HttpDeleteHC4(uri); case HEAD: return new HttpHeadHC4(uri); case OPTIONS: return new HttpOptionsHC4(uri); case POST: return new H...
java
protected HttpUriRequest createHttpUriRequest(HttpMethod httpMethod, URI uri) { switch (httpMethod) { case GET: return new HttpGetHC4(uri); case DELETE: return new HttpDeleteHC4(uri); case HEAD: return new HttpHeadHC4(uri); case OPTIONS: return new HttpOptionsHC4(uri); case POST: return new H...
[ "protected", "HttpUriRequest", "createHttpUriRequest", "(", "HttpMethod", "httpMethod", ",", "URI", "uri", ")", "{", "switch", "(", "httpMethod", ")", "{", "case", "GET", ":", "return", "new", "HttpGetHC4", "(", "uri", ")", ";", "case", "DELETE", ":", "retur...
Create a Commons HttpMethodBase object for the given HTTP method and URI specification. @param httpMethod the HTTP method @param uri the URI @return the Commons HttpMethodBase object
[ "Create", "a", "Commons", "HttpMethodBase", "object", "for", "the", "given", "HTTP", "method", "and", "URI", "specification", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java#L226-L247
TrueNight/Utils
android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java
PermissionRequest.getPermission
public static void getPermission(@NonNull Activity context, @NonNull String[] permissions, @NonNull Response response) { if (Build.VERSION.SDK_INT < 23) { response.permissionGranted(); } else { HashSet<String> permissionSet = new HashSet<>(); for (String permission ...
java
public static void getPermission(@NonNull Activity context, @NonNull String[] permissions, @NonNull Response response) { if (Build.VERSION.SDK_INT < 23) { response.permissionGranted(); } else { HashSet<String> permissionSet = new HashSet<>(); for (String permission ...
[ "public", "static", "void", "getPermission", "(", "@", "NonNull", "Activity", "context", ",", "@", "NonNull", "String", "[", "]", "permissions", ",", "@", "NonNull", "Response", "response", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", "<",...
Request Android Permissions. @param context The Context of the Activity or the Fragment. @param permissions The Permissions you are need. @param response Result callback.
[ "Request", "Android", "Permissions", "." ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java#L137-L161
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java
UpgradeScanner10.openRead
private ReadStream openRead(long address, int size) { InStore inStore = _store.openRead(address, size); InStoreStream is = new InStoreStream(inStore, address, address + size); return new ReadStream(new VfsStream(is)); }
java
private ReadStream openRead(long address, int size) { InStore inStore = _store.openRead(address, size); InStoreStream is = new InStoreStream(inStore, address, address + size); return new ReadStream(new VfsStream(is)); }
[ "private", "ReadStream", "openRead", "(", "long", "address", ",", "int", "size", ")", "{", "InStore", "inStore", "=", "_store", ".", "openRead", "(", "address", ",", "size", ")", ";", "InStoreStream", "is", "=", "new", "InStoreStream", "(", "inStore", ",",...
Open a read stream to a segment. @param address file address for the segment @param size length of the segment @return opened ReadStream
[ "Open", "a", "read", "stream", "to", "a", "segment", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L740-L747
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/interfaces/SubnetMatchInterfaceCriteria.java
SubnetMatchInterfaceCriteria.isAcceptable
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { return verifyAddressByMask(address.getAddress()) ? address : null; }
java
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { return verifyAddressByMask(address.getAddress()) ? address : null; }
[ "@", "Override", "protected", "InetAddress", "isAcceptable", "(", "NetworkInterface", "networkInterface", ",", "InetAddress", "address", ")", "throws", "SocketException", "{", "return", "verifyAddressByMask", "(", "address", ".", "getAddress", "(", ")", ")", "?", "a...
{@inheritDoc} @return <code>address</code> if the <code>address</code> is on the correct subnet.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/interfaces/SubnetMatchInterfaceCriteria.java#L70-L73