repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
FrodeRanders/java-vopn
src/main/java/org/gautelis/vopn/lang/Date.java
Date.convertDate
public static java.sql.Date convertDate(String date, Locale locale) { SimpleDateFormat df; java.util.Date dbDate = null; java.sql.Date sqldate = null; try { if (date == null || date.equals("")) { return null; } df = (SimpleDat...
java
public static java.sql.Date convertDate(String date, Locale locale) { SimpleDateFormat df; java.util.Date dbDate = null; java.sql.Date sqldate = null; try { if (date == null || date.equals("")) { return null; } df = (SimpleDat...
[ "public", "static", "java", ".", "sql", ".", "Date", "convertDate", "(", "String", "date", ",", "Locale", "locale", ")", "{", "SimpleDateFormat", "df", ";", "java", ".", "util", ".", "Date", "dbDate", "=", "null", ";", "java", ".", "sql", ".", "Date", ...
Converts the users input date value to java.sql.Date @param date Date to convert @return The converted date in java.sql.date format
[ "Converts", "the", "users", "input", "date", "value", "to", "java", ".", "sql", ".", "Date" ]
train
https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/lang/Date.java#L116-L136
samskivert/samskivert
src/main/java/com/samskivert/swing/util/TaskMaster.java
TaskMaster.invokeTask
public static void invokeTask (String name, Task task, TaskObserver observer) { // create a task runner and stick it in our task table TaskRunner runner = new TaskRunner(name, task, observer); _tasks.put(name, runner); // then start the runner up runner.start(); }
java
public static void invokeTask (String name, Task task, TaskObserver observer) { // create a task runner and stick it in our task table TaskRunner runner = new TaskRunner(name, task, observer); _tasks.put(name, runner); // then start the runner up runner.start(); }
[ "public", "static", "void", "invokeTask", "(", "String", "name", ",", "Task", "task", ",", "TaskObserver", "observer", ")", "{", "// create a task runner and stick it in our task table", "TaskRunner", "runner", "=", "new", "TaskRunner", "(", "name", ",", "task", ","...
Instructs the task master to run the supplied task. The task is given the supplied name and can be referenced by that name in subsequent dealings with the task master. The supplied observer (if non-null) will be notified when the task has completed.
[ "Instructs", "the", "task", "master", "to", "run", "the", "supplied", "task", ".", "The", "task", "is", "given", "the", "supplied", "name", "and", "can", "be", "referenced", "by", "that", "name", "in", "subsequent", "dealings", "with", "the", "task", "mast...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/TaskMaster.java#L35-L42
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generatePrices
private void generatePrices(final Metadata m, final Element e) { for (final Price price : m.getPrices()) { if (price == null) { continue; } final Element priceElement = new Element("price", NS); if (price.getType() != null) { priceE...
java
private void generatePrices(final Metadata m, final Element e) { for (final Price price : m.getPrices()) { if (price == null) { continue; } final Element priceElement = new Element("price", NS); if (price.getType() != null) { priceE...
[ "private", "void", "generatePrices", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "Price", "price", ":", "m", ".", "getPrices", "(", ")", ")", "{", "if", "(", "price", "==", "null", ")", "{", "continue",...
Generation of backLinks tag. @param m source @param e element to attach new element to
[ "Generation", "of", "backLinks", "tag", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L469-L485
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/widget/FacebookDialog.java
FacebookDialog.canPresentMessageDialog
public static boolean canPresentMessageDialog(Context context, MessageDialogFeature... features) { return handleCanPresent(context, EnumSet.of(MessageDialogFeature.MESSAGE_DIALOG, features)); }
java
public static boolean canPresentMessageDialog(Context context, MessageDialogFeature... features) { return handleCanPresent(context, EnumSet.of(MessageDialogFeature.MESSAGE_DIALOG, features)); }
[ "public", "static", "boolean", "canPresentMessageDialog", "(", "Context", "context", ",", "MessageDialogFeature", "...", "features", ")", "{", "return", "handleCanPresent", "(", "context", ",", "EnumSet", ".", "of", "(", "MessageDialogFeature", ".", "MESSAGE_DIALOG", ...
Determines whether the version of the Facebook application installed on the user's device is recent enough to support specific features of the native Message dialog, which in turn may be used to determine which UI, etc., to present to the user. @param context the calling Context @param features zero or more features ...
[ "Determines", "whether", "the", "version", "of", "the", "Facebook", "application", "installed", "on", "the", "user", "s", "device", "is", "recent", "enough", "to", "support", "specific", "features", "of", "the", "native", "Message", "dialog", "which", "in", "t...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/widget/FacebookDialog.java#L384-L386
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/AdapterUtil.java
AdapterUtil.translateSQLException
public static ResourceException translateSQLException( SQLException se, Object mapper, boolean sendEvent, ...
java
public static ResourceException translateSQLException( SQLException se, Object mapper, boolean sendEvent, ...
[ "public", "static", "ResourceException", "translateSQLException", "(", "SQLException", "se", ",", "Object", "mapper", ",", "boolean", "sendEvent", ",", "Class", "<", "?", ">", "caller", ")", "{", "return", "(", "ResourceException", ")", "mapException", "(", "new...
Translates a SQLException from the database. The exception mapping methods have been rewritten to account for the error detection model and to consolidate the RRA exception mapping routines into a single place. See the AdapterUtil.mapException method. @param SQLException se - the SQLException from the database @param ...
[ "Translates", "a", "SQLException", "from", "the", "database", ".", "The", "exception", "mapping", "methods", "have", "been", "rewritten", "to", "account", "for", "the", "error", "detection", "model", "and", "to", "consolidate", "the", "RRA", "exception", "mappin...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/AdapterUtil.java#L768-L778
appium/java-client
src/main/java/io/appium/java_client/pagefactory/AppiumElementLocator.java
AppiumElementLocator.getBy
private static By getBy(By currentBy, SearchContext currentContent) { if (!ContentMappedBy.class.isAssignableFrom(currentBy.getClass())) { return currentBy; } return ContentMappedBy.class.cast(currentBy) .useContent(getCurrentContentType(currentContent)); }
java
private static By getBy(By currentBy, SearchContext currentContent) { if (!ContentMappedBy.class.isAssignableFrom(currentBy.getClass())) { return currentBy; } return ContentMappedBy.class.cast(currentBy) .useContent(getCurrentContentType(currentContent)); }
[ "private", "static", "By", "getBy", "(", "By", "currentBy", ",", "SearchContext", "currentContent", ")", "{", "if", "(", "!", "ContentMappedBy", ".", "class", ".", "isAssignableFrom", "(", "currentBy", ".", "getClass", "(", ")", ")", ")", "{", "return", "c...
This methods makes sets some settings of the {@link By} according to the given instance of {@link SearchContext}. If there is some {@link ContentMappedBy} then it is switched to the searching for some html or native mobile element. Otherwise nothing happens there. @param currentBy is some locator strategy @param curre...
[ "This", "methods", "makes", "sets", "some", "settings", "of", "the", "{", "@link", "By", "}", "according", "to", "the", "given", "instance", "of", "{", "@link", "SearchContext", "}", ".", "If", "there", "is", "some", "{", "@link", "ContentMappedBy", "}", ...
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/pagefactory/AppiumElementLocator.java#L84-L91
whitesource/agents
wss-agent-report/src/main/java/org/whitesource/agent/report/FileUtils.java
FileUtils.copyResource
public static void copyResource(String resource, File destination) throws IOException { InputStream is = null; FileOutputStream fos = null; try { is = FileUtils.class.getResourceAsStream("/" + resource); fos = new FileOutputStream(destination); final...
java
public static void copyResource(String resource, File destination) throws IOException { InputStream is = null; FileOutputStream fos = null; try { is = FileUtils.class.getResourceAsStream("/" + resource); fos = new FileOutputStream(destination); final...
[ "public", "static", "void", "copyResource", "(", "String", "resource", ",", "File", "destination", ")", "throws", "IOException", "{", "InputStream", "is", "=", "null", ";", "FileOutputStream", "fos", "=", "null", ";", "try", "{", "is", "=", "FileUtils", ".",...
Copy a classpath resource to a destination file. @param resource Path to resource to copy. @param destination File to copy resource to. @throws IOException exception2
[ "Copy", "a", "classpath", "resource", "to", "a", "destination", "file", "." ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-report/src/main/java/org/whitesource/agent/report/FileUtils.java#L38-L56
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/Captcha.java
Captcha.generateImage
public static byte[] generateImage(String text) { int w = 180, h = 40; BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = image.createGraphics(); g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); ...
java
public static byte[] generateImage(String text) { int w = 180, h = 40; BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = image.createGraphics(); g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); ...
[ "public", "static", "byte", "[", "]", "generateImage", "(", "String", "text", ")", "{", "int", "w", "=", "180", ",", "h", "=", "40", ";", "BufferedImage", "image", "=", "new", "BufferedImage", "(", "w", ",", "h", ",", "BufferedImage", ".", "TYPE_INT_RG...
Generates a PNG image of text 180 pixels wide, 40 pixels high with white background. @param text expects string size eight (8) characters. @return byte array that is a PNG image generated with text displayed.
[ "Generates", "a", "PNG", "image", "of", "text", "180", "pixels", "wide", "40", "pixels", "high", "with", "white", "background", "." ]
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/Captcha.java#L50-L81
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/property/PropertyCollection.java
PropertyCollection.getValue
public int getValue(String name, int dflt) { try { return Integer.parseInt(getValue(name, Integer.toString(dflt))); } catch (Exception e) { return dflt; } }
java
public int getValue(String name, int dflt) { try { return Integer.parseInt(getValue(name, Integer.toString(dflt))); } catch (Exception e) { return dflt; } }
[ "public", "int", "getValue", "(", "String", "name", ",", "int", "dflt", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "getValue", "(", "name", ",", "Integer", ".", "toString", "(", "dflt", ")", ")", ")", ";", "}", "catch", "(", "...
Returns an integer property value. @param name Property name. @param dflt Default value if a property value is not found. @return Property value or default value if property value not found.
[ "Returns", "an", "integer", "property", "value", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/property/PropertyCollection.java#L162-L168
alkacon/opencms-core
src/org/opencms/main/OpenCmsCore.java
OpenCmsCore.updateContext
protected CmsObject updateContext(HttpServletRequest request, CmsObject cms) throws CmsException { // get the right site for the request String siteRoot = null; boolean isWorkplace = cms.getRequestContext().getUri().startsWith("/system/workplace/") || request.getRequestURI().startsW...
java
protected CmsObject updateContext(HttpServletRequest request, CmsObject cms) throws CmsException { // get the right site for the request String siteRoot = null; boolean isWorkplace = cms.getRequestContext().getUri().startsWith("/system/workplace/") || request.getRequestURI().startsW...
[ "protected", "CmsObject", "updateContext", "(", "HttpServletRequest", "request", ",", "CmsObject", "cms", ")", "throws", "CmsException", "{", "// get the right site for the request", "String", "siteRoot", "=", "null", ";", "boolean", "isWorkplace", "=", "cms", ".", "g...
This method updates the request context information.<p> The update information is:<br> <ul> <li>Requested Url</li> <li>Locale</li> <li>Encoding</li> <li>Remote Address</li> <li>Request Time</li> </ul> @param request the current request @param cms the cms object to update the request context for @return a new updated...
[ "This", "method", "updates", "the", "request", "context", "information", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCmsCore.java#L2253-L2272
spacecowboy/NoNonsense-FilePicker
library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java
FilePickerFragment.compareFiles
protected int compareFiles(@NonNull File lhs, @NonNull File rhs) { if (lhs.isDirectory() && !rhs.isDirectory()) { return -1; } else if (rhs.isDirectory() && !lhs.isDirectory()) { return 1; } else { return lhs.getName().compareToIgnoreCase(rhs.getName()); ...
java
protected int compareFiles(@NonNull File lhs, @NonNull File rhs) { if (lhs.isDirectory() && !rhs.isDirectory()) { return -1; } else if (rhs.isDirectory() && !lhs.isDirectory()) { return 1; } else { return lhs.getName().compareToIgnoreCase(rhs.getName()); ...
[ "protected", "int", "compareFiles", "(", "@", "NonNull", "File", "lhs", ",", "@", "NonNull", "File", "rhs", ")", "{", "if", "(", "lhs", ".", "isDirectory", "(", ")", "&&", "!", "rhs", ".", "isDirectory", "(", ")", ")", "{", "return", "-", "1", ";",...
Compare two files to determine their relative sort order. This follows the usual comparison interface. Override to determine your own custom sort order. <p/> Default behaviour is to place directories before files, but sort them alphabetically otherwise. @param lhs File on the "left-hand side" @param rhs File on the "r...
[ "Compare", "two", "files", "to", "determine", "their", "relative", "sort", "order", ".", "This", "follows", "the", "usual", "comparison", "interface", ".", "Override", "to", "determine", "your", "own", "custom", "sort", "order", ".", "<p", "/", ">", "Default...
train
https://github.com/spacecowboy/NoNonsense-FilePicker/blob/396ef7fa5e87791170791f9d94c78f6e42a7679a/library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java#L346-L354
litsec/eidas-opensaml
opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/attributes/AttributeUtils.java
AttributeUtils.createAttribute
public static Attribute createAttribute(String name, String friendlyName) { return createAttribute(name, friendlyName, Attribute.URI_REFERENCE); }
java
public static Attribute createAttribute(String name, String friendlyName) { return createAttribute(name, friendlyName, Attribute.URI_REFERENCE); }
[ "public", "static", "Attribute", "createAttribute", "(", "String", "name", ",", "String", "friendlyName", ")", "{", "return", "createAttribute", "(", "name", ",", "friendlyName", ",", "Attribute", ".", "URI_REFERENCE", ")", ";", "}" ]
Creates an {@code Attribute} with the given name (and friendly name) and with a name format of {@value Attribute#URI_REFERENCE}. @param name the attribute name @param friendlyName the attribute friendly name (may be {@code null}) @return an {@code Attribute} object @see #createAttribute(String, String, String)
[ "Creates", "an", "{", "@code", "Attribute", "}", "with", "the", "given", "name", "(", "and", "friendly", "name", ")", "and", "with", "a", "name", "format", "of", "{", "@value", "Attribute#URI_REFERENCE", "}", "." ]
train
https://github.com/litsec/eidas-opensaml/blob/522ba6dba433a9524cb8a02464cc3b087b47a2b7/opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/attributes/AttributeUtils.java#L71-L73
datacleaner/DataCleaner
desktop/api/src/main/java/org/datacleaner/widgets/properties/PropertyWidgetCollection.java
PropertyWidgetCollection.registerWidget
public void registerWidget(final ConfiguredPropertyDescriptor propertyDescriptor, final PropertyWidget<?> widget) { if (widget == null) { _widgets.remove(propertyDescriptor); } else { _widgets.put(propertyDescriptor, widget); @SuppressWarnings("unchecked") final Prope...
java
public void registerWidget(final ConfiguredPropertyDescriptor propertyDescriptor, final PropertyWidget<?> widget) { if (widget == null) { _widgets.remove(propertyDescriptor); } else { _widgets.put(propertyDescriptor, widget); @SuppressWarnings("unchecked") final Prope...
[ "public", "void", "registerWidget", "(", "final", "ConfiguredPropertyDescriptor", "propertyDescriptor", ",", "final", "PropertyWidget", "<", "?", ">", "widget", ")", "{", "if", "(", "widget", "==", "null", ")", "{", "_widgets", ".", "remove", "(", "propertyDescr...
Registers a widget in this factory in rare cases when the factory is not used to actually instantiate the widget, but it is still needed to register the widget for compliancy with eg. the onConfigurationChanged() behaviour. @param propertyDescriptor @param widget
[ "Registers", "a", "widget", "in", "this", "factory", "in", "rare", "cases", "when", "the", "factory", "is", "not", "used", "to", "actually", "instantiate", "the", "widget", "but", "it", "is", "still", "needed", "to", "register", "the", "widget", "for", "co...
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/api/src/main/java/org/datacleaner/widgets/properties/PropertyWidgetCollection.java#L84-L93
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java
Utils.matches
public static boolean matches(final String text1, final String text2, final Configuration config){ if(config.isRegexLabelText() && text2.startsWith("/") && text2.endsWith("/")){ return normalize(text1, config).matches(text2.substring(1, text2.length() - 1)); } else { return n...
java
public static boolean matches(final String text1, final String text2, final Configuration config){ if(config.isRegexLabelText() && text2.startsWith("/") && text2.endsWith("/")){ return normalize(text1, config).matches(text2.substring(1, text2.length() - 1)); } else { return n...
[ "public", "static", "boolean", "matches", "(", "final", "String", "text1", ",", "final", "String", "text2", ",", "final", "Configuration", "config", ")", "{", "if", "(", "config", ".", "isRegexLabelText", "(", ")", "&&", "text2", ".", "startsWith", "(", "\...
システム設定に従いラベルを比較する。 <p>正規表現や正規化を行い指定する。 @since 1.1 @param text1 セルのラベル @param text2 アノテーションに指定されているラベル。 {@literal /<ラベル>/}と指定する場合、正規表現による比較を行う。 @param config システム設定 @return true:ラベルが一致する。
[ "システム設定に従いラベルを比較する。", "<p", ">", "正規表現や正規化を行い指定する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java#L240-L247
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_serviceMonitoring_monitoringId_GET
public OvhServiceMonitoring serviceName_serviceMonitoring_monitoringId_GET(String serviceName, Long monitoringId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}"; StringBuilder sb = path(qPath, serviceName, monitoringId); String resp = exec(qPath, "GET", sb.t...
java
public OvhServiceMonitoring serviceName_serviceMonitoring_monitoringId_GET(String serviceName, Long monitoringId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}"; StringBuilder sb = path(qPath, serviceName, monitoringId); String resp = exec(qPath, "GET", sb.t...
[ "public", "OvhServiceMonitoring", "serviceName_serviceMonitoring_monitoringId_GET", "(", "String", "serviceName", ",", "Long", "monitoringId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}\"", ";", "...
Get this object properties REST: GET /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId} @param serviceName [required] The internal name of your dedicated server @param monitoringId [required] This monitoring id
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2268-L2273
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/RemoteResourceFileLocationDB.java
RemoteResourceFileLocationDB.addNameUrl
public void addNameUrl(final String name, final String url) throws IOException { doPostMethod(ResourceFileLocationDBServlet.ADD_OPERATION, name, url); }
java
public void addNameUrl(final String name, final String url) throws IOException { doPostMethod(ResourceFileLocationDBServlet.ADD_OPERATION, name, url); }
[ "public", "void", "addNameUrl", "(", "final", "String", "name", ",", "final", "String", "url", ")", "throws", "IOException", "{", "doPostMethod", "(", "ResourceFileLocationDBServlet", ".", "ADD_OPERATION", ",", "name", ",", "url", ")", ";", "}" ]
add an Url location for an arcName, unless it already exists @param name @param url @throws IOException
[ "add", "an", "Url", "location", "for", "an", "arcName", "unless", "it", "already", "exists" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/RemoteResourceFileLocationDB.java#L137-L140
srikalyc/Sql4D
Sql4Ddriver/src/main/java/com/yahoo/sql4d/sql4ddriver/OverlordAccessor.java
OverlordAccessor.fireTask
public String fireTask(CrudStatementMeta meta, Map<String, String> reqHeaders, boolean wait) { CloseableHttpResponse resp = null; String url = format(overlordUrl, overlordHost, overlordPort); try { resp = postJson(url, meta.toString(), reqHeaders); if (resp.getStatusLine(...
java
public String fireTask(CrudStatementMeta meta, Map<String, String> reqHeaders, boolean wait) { CloseableHttpResponse resp = null; String url = format(overlordUrl, overlordHost, overlordPort); try { resp = postJson(url, meta.toString(), reqHeaders); if (resp.getStatusLine(...
[ "public", "String", "fireTask", "(", "CrudStatementMeta", "meta", ",", "Map", "<", "String", ",", "String", ">", "reqHeaders", ",", "boolean", "wait", ")", "{", "CloseableHttpResponse", "resp", "=", "null", ";", "String", "url", "=", "format", "(", "overlord...
Task means an indexer task(goes straight to overlord). @param meta @param reqHeaders @param wait @return
[ "Task", "means", "an", "indexer", "task", "(", "goes", "straight", "to", "overlord", ")", "." ]
train
https://github.com/srikalyc/Sql4D/blob/2c052fe60ead5a16277c798a3440de7d4f6f24f6/Sql4Ddriver/src/main/java/com/yahoo/sql4d/sql4ddriver/OverlordAccessor.java#L51-L81
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_conf_download_policy.java
ns_conf_download_policy.update
public static ns_conf_download_policy update(nitro_service client, ns_conf_download_policy resource) throws Exception { resource.validate("modify"); return ((ns_conf_download_policy[]) resource.update_resource(client))[0]; }
java
public static ns_conf_download_policy update(nitro_service client, ns_conf_download_policy resource) throws Exception { resource.validate("modify"); return ((ns_conf_download_policy[]) resource.update_resource(client))[0]; }
[ "public", "static", "ns_conf_download_policy", "update", "(", "nitro_service", "client", ",", "ns_conf_download_policy", "resource", ")", "throws", "Exception", "{", "resource", ".", "validate", "(", "\"modify\"", ")", ";", "return", "(", "(", "ns_conf_download_policy...
<pre> Use this operation to set the polling frequency of the Netscaler configuration file. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "set", "the", "polling", "frequency", "of", "the", "Netscaler", "configuration", "file", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_conf_download_policy.java#L126-L130
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.setLayerInset
public void setLayerInset(int index, int l, int t, int r, int b) { setLayerInsetInternal(index, l, t, r, b, UNDEFINED_INSET, UNDEFINED_INSET); }
java
public void setLayerInset(int index, int l, int t, int r, int b) { setLayerInsetInternal(index, l, t, r, b, UNDEFINED_INSET, UNDEFINED_INSET); }
[ "public", "void", "setLayerInset", "(", "int", "index", ",", "int", "l", ",", "int", "t", ",", "int", "r", ",", "int", "b", ")", "{", "setLayerInsetInternal", "(", "index", ",", "l", ",", "t", ",", "r", ",", "b", ",", "UNDEFINED_INSET", ",", "UNDEF...
Specifies the insets in pixels for the drawable at the specified index. @param index the index of the drawable to adjust @param l number of pixels to add to the left bound @param t number of pixels to add to the top bound @param r number of pixels to subtract from the right bound @param b number of pix...
[ "Specifies", "the", "insets", "in", "pixels", "for", "the", "drawable", "at", "the", "specified", "index", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L671-L673
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/SessionProxy.java
SessionProxy.getRemoteTable
public RemoteTable getRemoteTable(String strRecordName) throws RemoteException { BaseTransport transport = this.createProxyTransport(GET_REMOTE_TABLE); transport.addParam(NAME, strRecordName); String strTableID = (String)transport.sendMessageAndGetReply(); // See if I have this one a...
java
public RemoteTable getRemoteTable(String strRecordName) throws RemoteException { BaseTransport transport = this.createProxyTransport(GET_REMOTE_TABLE); transport.addParam(NAME, strRecordName); String strTableID = (String)transport.sendMessageAndGetReply(); // See if I have this one a...
[ "public", "RemoteTable", "getRemoteTable", "(", "String", "strRecordName", ")", "throws", "RemoteException", "{", "BaseTransport", "transport", "=", "this", ".", "createProxyTransport", "(", "GET_REMOTE_TABLE", ")", ";", "transport", ".", "addParam", "(", "NAME", ",...
Get this table for this session. @param strRecordName Table Name or Class Name of the record to find
[ "Get", "this", "table", "for", "this", "session", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/SessionProxy.java#L60-L70
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkCase
public static boolean checkCase(final File file, String pathToTest) { if (pathToTest == null || pathToTest.isEmpty()) { return true; } if (IS_OS_CASE_SENSITIVE) { // It is assumed that the file exists. Therefore, its case must // match if we know that the f...
java
public static boolean checkCase(final File file, String pathToTest) { if (pathToTest == null || pathToTest.isEmpty()) { return true; } if (IS_OS_CASE_SENSITIVE) { // It is assumed that the file exists. Therefore, its case must // match if we know that the f...
[ "public", "static", "boolean", "checkCase", "(", "final", "File", "file", ",", "String", "pathToTest", ")", "{", "if", "(", "pathToTest", "==", "null", "||", "pathToTest", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "IS_O...
The artifact API is case sensitive even on a file system that is not case sensitive. This method will test that the case of the supplied <em>existing</em> file matches the case in the pathToTest. It is assumed that you already tested that the file exists using the pathToTest. Therefore, on a case sensitive files syste...
[ "The", "artifact", "API", "is", "case", "sensitive", "even", "on", "a", "file", "system", "that", "is", "not", "case", "sensitive", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1252-L1279
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.getFlakeIdGeneratorConfig
public FlakeIdGeneratorConfig getFlakeIdGeneratorConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, flakeIdGeneratorConfigMap, name, FlakeIdGeneratorConfig.class, new BiConsumer<FlakeIdGeneratorConfig, String>() { @Override public voi...
java
public FlakeIdGeneratorConfig getFlakeIdGeneratorConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, flakeIdGeneratorConfigMap, name, FlakeIdGeneratorConfig.class, new BiConsumer<FlakeIdGeneratorConfig, String>() { @Override public voi...
[ "public", "FlakeIdGeneratorConfig", "getFlakeIdGeneratorConfig", "(", "String", "name", ")", "{", "return", "ConfigUtils", ".", "getConfig", "(", "configPatternMatcher", ",", "flakeIdGeneratorConfigMap", ",", "name", ",", "FlakeIdGeneratorConfig", ".", "class", ",", "ne...
Returns the {@link FlakeIdGeneratorConfig} for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name} without the partition qualifier (the part of the name after {@code '@'}...
[ "Returns", "the", "{", "@link", "FlakeIdGeneratorConfig", "}", "for", "the", "given", "name", "creating", "one", "if", "necessary", "and", "adding", "it", "to", "the", "collection", "of", "known", "configurations", ".", "<p", ">", "The", "configuration", "is",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L3052-L3060
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.symmLowerToFull
public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw ) { ImplCommonOps_DSCC.symmLowerToFull(A, B, gw); }
java
public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw ) { ImplCommonOps_DSCC.symmLowerToFull(A, B, gw); }
[ "public", "static", "void", "symmLowerToFull", "(", "DMatrixSparseCSC", "A", ",", "DMatrixSparseCSC", "B", ",", "@", "Nullable", "IGrowArray", "gw", ")", "{", "ImplCommonOps_DSCC", ".", "symmLowerToFull", "(", "A", ",", "B", ",", "gw", ")", ";", "}" ]
Given a symmetric matrix, which is represented by a lower triangular matrix, convert it back into a full symmetric matrix @param A (Input) Lower triangular matrix @param B (Output) Symmetric matrix. @param gw (Optional) Workspace. Can be null.
[ "Given", "a", "symmetric", "matrix", "which", "is", "represented", "by", "a", "lower", "triangular", "matrix", "convert", "it", "back", "into", "a", "full", "symmetric", "matrix" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L323-L326
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
AbstractHttp2ConnectionHandlerBuilder.codec
protected B codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) { enforceConstraint("codec", "server", isServer); enforceConstraint("codec", "maxReservedStreams", maxReservedStreams); enforceConstraint("codec", "connection", connection); enforceConstraint("codec", "fram...
java
protected B codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) { enforceConstraint("codec", "server", isServer); enforceConstraint("codec", "maxReservedStreams", maxReservedStreams); enforceConstraint("codec", "connection", connection); enforceConstraint("codec", "fram...
[ "protected", "B", "codec", "(", "Http2ConnectionDecoder", "decoder", ",", "Http2ConnectionEncoder", "encoder", ")", "{", "enforceConstraint", "(", "\"codec\"", ",", "\"server\"", ",", "isServer", ")", ";", "enforceConstraint", "(", "\"codec\"", ",", "\"maxReservedStre...
Sets the {@link Http2ConnectionDecoder} and {@link Http2ConnectionEncoder} to use.
[ "Sets", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java#L254-L274
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.updateServiceInstanceInternalStatus
public void updateServiceInstanceInternalStatus(String serviceName, String instanceId, OperationalStatus status){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.UpdateServiceInstanceInternalStatus); UpdateServiceInstanceInternalStatusProtocol protocol = new UpdateServ...
java
public void updateServiceInstanceInternalStatus(String serviceName, String instanceId, OperationalStatus status){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.UpdateServiceInstanceInternalStatus); UpdateServiceInstanceInternalStatusProtocol protocol = new UpdateServ...
[ "public", "void", "updateServiceInstanceInternalStatus", "(", "String", "serviceName", ",", "String", "instanceId", ",", "OperationalStatus", "status", ")", "{", "ProtocolHeader", "header", "=", "new", "ProtocolHeader", "(", ")", ";", "header", ".", "setType", "(", ...
Update ServiceInstance internal status. @param serviceName the service name. @param instanceId the instanceId. @param status the OeperationalStatus.
[ "Update", "ServiceInstance", "internal", "status", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L452-L458
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java
KeyStore.getKey
public final Key getKey(String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { if (!initialized) { throw new KeyStoreException("Uninitialized keystore"); } return keyStoreSpi.engineGetKey(alias, password)...
java
public final Key getKey(String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { if (!initialized) { throw new KeyStoreException("Uninitialized keystore"); } return keyStoreSpi.engineGetKey(alias, password)...
[ "public", "final", "Key", "getKey", "(", "String", "alias", ",", "char", "[", "]", "password", ")", "throws", "KeyStoreException", ",", "NoSuchAlgorithmException", ",", "UnrecoverableKeyException", "{", "if", "(", "!", "initialized", ")", "{", "throw", "new", ...
Returns the key associated with the given alias, using the given password to recover it. The key must have been associated with the alias by a call to <code>setKeyEntry</code>, or by a call to <code>setEntry</code> with a <code>PrivateKeyEntry</code> or <code>SecretKeyEntry</code>. @param alias the alias name @param ...
[ "Returns", "the", "key", "associated", "with", "the", "given", "alias", "using", "the", "given", "password", "to", "recover", "it", ".", "The", "key", "must", "have", "been", "associated", "with", "the", "alias", "by", "a", "call", "to", "<code", ">", "s...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java#L827-L835
arquillian/arquillian-extension-warp
impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SecurityActions.java
SecurityActions.newInstance
static <T> T newInstance(final String className, final Class<?>[] argumentTypes, final Object[] arguments, final Class<T> expectedType) { if (className == null) { throw new IllegalArgumentException("ClassName must be specified"); } if (argumentTypes == null) { thr...
java
static <T> T newInstance(final String className, final Class<?>[] argumentTypes, final Object[] arguments, final Class<T> expectedType) { if (className == null) { throw new IllegalArgumentException("ClassName must be specified"); } if (argumentTypes == null) { thr...
[ "static", "<", "T", ">", "T", "newInstance", "(", "final", "String", "className", ",", "final", "Class", "<", "?", ">", "[", "]", "argumentTypes", ",", "final", "Object", "[", "]", "arguments", ",", "final", "Class", "<", "T", ">", "expectedType", ")",...
Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation. @param className Full classname of class to create @param argumentTypes The constructor argument types @param arguments The constructor arguments @return a new instance @throws IllegalArgume...
[ "Create", "a", "new", "instance", "by", "finding", "a", "constructor", "that", "matches", "the", "argumentTypes", "signature", "using", "the", "arguments", "for", "instantiation", "." ]
train
https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SecurityActions.java#L120-L150
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.getObjectMetadata
public ObjectMetadata getObjectMetadata(String bucketName, String key) { return this.getObjectMetadata(new GetObjectMetadataRequest(bucketName, key)); }
java
public ObjectMetadata getObjectMetadata(String bucketName, String key) { return this.getObjectMetadata(new GetObjectMetadataRequest(bucketName, key)); }
[ "public", "ObjectMetadata", "getObjectMetadata", "(", "String", "bucketName", ",", "String", "key", ")", "{", "return", "this", ".", "getObjectMetadata", "(", "new", "GetObjectMetadataRequest", "(", "bucketName", ",", "key", ")", ")", ";", "}" ]
Gets the metadata for the specified Bos object without actually fetching the object itself. This is useful in obtaining only the object metadata, and avoids wasting bandwidth on fetching the object data. <p> The object metadata contains information such as content type, content disposition, etc., as well as custom use...
[ "Gets", "the", "metadata", "for", "the", "specified", "Bos", "object", "without", "actually", "fetching", "the", "object", "itself", ".", "This", "is", "useful", "in", "obtaining", "only", "the", "object", "metadata", "and", "avoids", "wasting", "bandwidth", "...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L757-L759
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzleResultSet.java
DrizzleResultSet.getDate
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException { try { return getValueObject(columnIndex).getDate(cal); } catch (ParseException e) { throw SQLExceptionMapper.getSQLException("Could not parse as date"); } }
java
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException { try { return getValueObject(columnIndex).getDate(cal); } catch (ParseException e) { throw SQLExceptionMapper.getSQLException("Could not parse as date"); } }
[ "public", "Date", "getDate", "(", "final", "int", "columnIndex", ",", "final", "Calendar", "cal", ")", "throws", "SQLException", "{", "try", "{", "return", "getValueObject", "(", "columnIndex", ")", ".", "getDate", "(", "cal", ")", ";", "}", "catch", "(", ...
Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone...
[ "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "java", ".", "sql", ".", "Date<", "/", "code", ">", "object"...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleResultSet.java#L2078-L2084
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsInner.java
WorkflowRunActionRepetitionsInner.listAsync
public Observable<List<WorkflowRunActionRepetitionDefinitionInner>> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<List<WorkflowRunActionRepetiti...
java
public Observable<List<WorkflowRunActionRepetitionDefinitionInner>> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<List<WorkflowRunActionRepetiti...
[ "public", "Observable", "<", "List", "<", "WorkflowRunActionRepetitionDefinitionInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "String", "runName", ",", "String", "actionName", ")", "{", "return", "listWithServic...
Get all of a workflow run action repetitions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @param actionName The workflow action name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to th...
[ "Get", "all", "of", "a", "workflow", "run", "action", "repetitions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsInner.java#L111-L118
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.checkAndVerifyWork
private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider && executionContext != null) { //Implements WorkContextProvider and not-null Execution...
java
private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider && executionContext != null) { //Implements WorkContextProvider and not-null Execution...
[ "private", "void", "checkAndVerifyWork", "(", "Work", "work", ",", "ExecutionContext", "executionContext", ")", "throws", "WorkException", "{", "if", "(", "specCompliant", ")", "{", "verifyWork", "(", "work", ")", ";", "}", "if", "(", "work", "instanceof", "Wo...
Check and verify work before submitting. @param work the work instance @param executionContext any execution context that is passed by apadater @throws WorkException if any exception occurs
[ "Check", "and", "verify", "work", "before", "submitting", "." ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1060-L1072
alkacon/opencms-core
src/org/opencms/gwt/CmsGwtActionElement.java
CmsGwtActionElement.exportCommon
public static String exportCommon(CmsObject cms, CmsCoreData coreData) throws Exception { // determine the workplace locale String wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms).getLanguage(); if (CmsStringUtil.isEmptyOrWhitespaceOnly(wpLocale)) { // if no locale w...
java
public static String exportCommon(CmsObject cms, CmsCoreData coreData) throws Exception { // determine the workplace locale String wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms).getLanguage(); if (CmsStringUtil.isEmptyOrWhitespaceOnly(wpLocale)) { // if no locale w...
[ "public", "static", "String", "exportCommon", "(", "CmsObject", "cms", ",", "CmsCoreData", "coreData", ")", "throws", "Exception", "{", "// determine the workplace locale", "String", "wpLocale", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getWorkplaceL...
Returns the serialized data for the core provider wrapped into a script tag.<p> @param cms the CMS context @param coreData the core data to write into the page @return the data @throws Exception if something goes wrong
[ "Returns", "the", "serialized", "data", "for", "the", "core", "provider", "wrapped", "into", "a", "script", "tag", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtActionElement.java#L117-L167
tvesalainen/util
util/src/main/java/org/vesalainen/code/TransactionalSetter.java
TransactionalSetter.getInstance
public static <T extends TransactionalSetter> T getInstance(Class<T> cls, Object intf) { Class<?>[] interfaces = cls.getInterfaces(); if (interfaces.length != 1) { throw new IllegalArgumentException(cls+" should implement exactly one interface"); } boolean ...
java
public static <T extends TransactionalSetter> T getInstance(Class<T> cls, Object intf) { Class<?>[] interfaces = cls.getInterfaces(); if (interfaces.length != 1) { throw new IllegalArgumentException(cls+" should implement exactly one interface"); } boolean ...
[ "public", "static", "<", "T", "extends", "TransactionalSetter", ">", "T", "getInstance", "(", "Class", "<", "T", ">", "cls", ",", "Object", "intf", ")", "{", "Class", "<", "?", ">", "[", "]", "interfaces", "=", "cls", ".", "getInterfaces", "(", ")", ...
Creates a instance of a class TransactionalSetter subclass. @param <T> Type of TransactionalSetter subclass @param cls TransactionalSetter subclass class @param intf Interface implemented by TransactionalSetter subclass @return
[ "Creates", "a", "instance", "of", "a", "class", "TransactionalSetter", "subclass", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/code/TransactionalSetter.java#L75-L103
diegocarloslima/ByakuGallery
ByakuGallery/src/com/diegocarloslima/byakugallery/lib/TouchImageView.java
TouchImageView.computeTranslation
private static float computeTranslation(float viewSize, float drawableSize, float currentTranslation, float delta) { final float sideFreeSpace = (viewSize - drawableSize) / 2F; if(sideFreeSpace > 0) { return sideFreeSpace - currentTranslation; } else if(currentTranslation + delta > 0) { return -currentTran...
java
private static float computeTranslation(float viewSize, float drawableSize, float currentTranslation, float delta) { final float sideFreeSpace = (viewSize - drawableSize) / 2F; if(sideFreeSpace > 0) { return sideFreeSpace - currentTranslation; } else if(currentTranslation + delta > 0) { return -currentTran...
[ "private", "static", "float", "computeTranslation", "(", "float", "viewSize", ",", "float", "drawableSize", ",", "float", "currentTranslation", ",", "float", "delta", ")", "{", "final", "float", "sideFreeSpace", "=", "(", "viewSize", "-", "drawableSize", ")", "/...
The translation values must be in [0, viewSize - drawableSize], except if we have free space. In that case we will translate to half of the free space
[ "The", "translation", "values", "must", "be", "in", "[", "0", "viewSize", "-", "drawableSize", "]", "except", "if", "we", "have", "free", "space", ".", "In", "that", "case", "we", "will", "translate", "to", "half", "of", "the", "free", "space" ]
train
https://github.com/diegocarloslima/ByakuGallery/blob/a0472e8c9f79184b6b83351da06a5544e4dc1be4/ByakuGallery/src/com/diegocarloslima/byakugallery/lib/TouchImageView.java#L342-L354
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/XmlWriter.java
XmlWriter.appendEscapedString
private void appendEscapedString(String s, StringBuilder builder) { if (s == null) s = ""; int pos; int start = 0; int len = s.length(); for (pos = 0; pos < len; pos++) { char ch = s.charAt(pos); String escape; switch (ch) { ...
java
private void appendEscapedString(String s, StringBuilder builder) { if (s == null) s = ""; int pos; int start = 0; int len = s.length(); for (pos = 0; pos < len; pos++) { char ch = s.charAt(pos); String escape; switch (ch) { ...
[ "private", "void", "appendEscapedString", "(", "String", "s", ",", "StringBuilder", "builder", ")", "{", "if", "(", "s", "==", "null", ")", "s", "=", "\"\"", ";", "int", "pos", ";", "int", "start", "=", "0", ";", "int", "len", "=", "s", ".", "lengt...
Appends the specified string (with any non-XML-compatible characters replaced with the corresponding escape code) to the specified StringBuilder. @param s The string to escape and append to the specified StringBuilder. @param builder The StringBuilder to which the escaped string should be appened.
[ "Appends", "the", "specified", "string", "(", "with", "any", "non", "-", "XML", "-", "compatible", "characters", "replaced", "with", "the", "corresponding", "escape", "code", ")", "to", "the", "specified", "StringBuilder", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/XmlWriter.java#L105-L153
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_database_name_request_POST
public OvhTask serviceName_database_name_request_POST(String serviceName, String name, net.minidev.ovh.api.hosting.web.database.OvhRequestActionEnum action) throws IOException { String qPath = "/hosting/web/{serviceName}/database/{name}/request"; StringBuilder sb = path(qPath, serviceName, name); HashMap<String, ...
java
public OvhTask serviceName_database_name_request_POST(String serviceName, String name, net.minidev.ovh.api.hosting.web.database.OvhRequestActionEnum action) throws IOException { String qPath = "/hosting/web/{serviceName}/database/{name}/request"; StringBuilder sb = path(qPath, serviceName, name); HashMap<String, ...
[ "public", "OvhTask", "serviceName_database_name_request_POST", "(", "String", "serviceName", ",", "String", "name", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "hosting", ".", "web", ".", "database", ".", "OvhRequestActionEnum", "action", ")", "thro...
Request specific operation for your database REST: POST /hosting/web/{serviceName}/database/{name}/request @param action [required] Action you want to request @param serviceName [required] The internal name of your hosting @param name [required] Database name (like mydb.mysql.db or mydb.postgres.db)
[ "Request", "specific", "operation", "for", "your", "database" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1160-L1167
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTreeIndex.java
MkTabTreeIndex.createNewLeafEntry
protected MkTabEntry createNewLeafEntry(DBID id, O object, double parentDistance) { return new MkTabLeafEntry(id, parentDistance, knnDistances(object)); }
java
protected MkTabEntry createNewLeafEntry(DBID id, O object, double parentDistance) { return new MkTabLeafEntry(id, parentDistance, knnDistances(object)); }
[ "protected", "MkTabEntry", "createNewLeafEntry", "(", "DBID", "id", ",", "O", "object", ",", "double", "parentDistance", ")", "{", "return", "new", "MkTabLeafEntry", "(", "id", ",", "parentDistance", ",", "knnDistances", "(", "object", ")", ")", ";", "}" ]
Creates a new leaf entry representing the specified data object in the specified subtree. @param object the data object to be represented by the new entry @param parentDistance the distance from the object to the routing object of the parent node
[ "Creates", "a", "new", "leaf", "entry", "representing", "the", "specified", "data", "object", "in", "the", "specified", "subtree", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mktab/MkTabTreeIndex.java#L76-L78
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
Item.withBigInteger
public Item withBigInteger(String attrName, BigInteger val) { checkInvalidAttrName(attrName); return withNumber(attrName, val); }
java
public Item withBigInteger(String attrName, BigInteger val) { checkInvalidAttrName(attrName); return withNumber(attrName, val); }
[ "public", "Item", "withBigInteger", "(", "String", "attrName", ",", "BigInteger", "val", ")", "{", "checkInvalidAttrName", "(", "attrName", ")", ";", "return", "withNumber", "(", "attrName", ",", "val", ")", ";", "}" ]
Sets the value of the specified attribute in the current item to the given value.
[ "Sets", "the", "value", "of", "the", "specified", "attribute", "in", "the", "current", "item", "to", "the", "given", "value", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L296-L299
liferay/com-liferay-commerce
commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java
CommerceCurrencyPersistenceImpl.findByG_C
@Override public CommerceCurrency findByG_C(long groupId, String code) throws NoSuchCurrencyException { CommerceCurrency commerceCurrency = fetchByG_C(groupId, code); if (commerceCurrency == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("groupId=")...
java
@Override public CommerceCurrency findByG_C(long groupId, String code) throws NoSuchCurrencyException { CommerceCurrency commerceCurrency = fetchByG_C(groupId, code); if (commerceCurrency == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("groupId=")...
[ "@", "Override", "public", "CommerceCurrency", "findByG_C", "(", "long", "groupId", ",", "String", "code", ")", "throws", "NoSuchCurrencyException", "{", "CommerceCurrency", "commerceCurrency", "=", "fetchByG_C", "(", "groupId", ",", "code", ")", ";", "if", "(", ...
Returns the commerce currency where groupId = &#63; and code = &#63; or throws a {@link NoSuchCurrencyException} if it could not be found. @param groupId the group ID @param code the code @return the matching commerce currency @throws NoSuchCurrencyException if a matching commerce currency could not be found
[ "Returns", "the", "commerce", "currency", "where", "groupId", "=", "&#63", ";", "and", "code", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCurrencyException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L2011-L2037
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.homographyStereo2Lines
public static DMatrixRMaj homographyStereo2Lines( DMatrixRMaj F , PairLineNorm line0, PairLineNorm line1) { HomographyInducedStereo2Line alg = new HomographyInducedStereo2Line(); alg.setFundamental(F,null); if( !alg.process(line0,line1) ) return null; return alg.getHomography(); }
java
public static DMatrixRMaj homographyStereo2Lines( DMatrixRMaj F , PairLineNorm line0, PairLineNorm line1) { HomographyInducedStereo2Line alg = new HomographyInducedStereo2Line(); alg.setFundamental(F,null); if( !alg.process(line0,line1) ) return null; return alg.getHomography(); }
[ "public", "static", "DMatrixRMaj", "homographyStereo2Lines", "(", "DMatrixRMaj", "F", ",", "PairLineNorm", "line0", ",", "PairLineNorm", "line1", ")", "{", "HomographyInducedStereo2Line", "alg", "=", "new", "HomographyInducedStereo2Line", "(", ")", ";", "alg", ".", ...
Computes the homography induced from a planar surface when viewed from two views using correspondences of two lines. Observations must be on the planar surface. @see HomographyInducedStereo2Line @param F Fundamental matrix @param line0 Line on the plane @param line1 Line on the plane @return The homography from view ...
[ "Computes", "the", "homography", "induced", "from", "a", "planar", "surface", "when", "viewed", "from", "two", "views", "using", "correspondences", "of", "two", "lines", ".", "Observations", "must", "be", "on", "the", "planar", "surface", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L573-L580
jnidzwetzki/bitfinex-v2-wss-api-java
src/main/java/com/github/jnidzwetzki/bitfinex/v2/SimpleBitfinexApiBroker.java
SimpleBitfinexApiBroker.authenticateAndWait
private void authenticateAndWait(final CountDownLatch latch) throws InterruptedException, BitfinexClientException { if (authenticated) { return; } sendCommand(new AuthCommand(configuration.getAuthNonceProducer())); logger.debug("Waiting for connection ready events"); latch.await(10, TimeUnit.SECONDS); i...
java
private void authenticateAndWait(final CountDownLatch latch) throws InterruptedException, BitfinexClientException { if (authenticated) { return; } sendCommand(new AuthCommand(configuration.getAuthNonceProducer())); logger.debug("Waiting for connection ready events"); latch.await(10, TimeUnit.SECONDS); i...
[ "private", "void", "authenticateAndWait", "(", "final", "CountDownLatch", "latch", ")", "throws", "InterruptedException", ",", "BitfinexClientException", "{", "if", "(", "authenticated", ")", "{", "return", ";", "}", "sendCommand", "(", "new", "AuthCommand", "(", ...
Execute the authentication and wait until the socket is ready @throws InterruptedException @throws BitfinexClientException
[ "Execute", "the", "authentication", "and", "wait", "until", "the", "socket", "is", "ready" ]
train
https://github.com/jnidzwetzki/bitfinex-v2-wss-api-java/blob/2e6adf1eb6f8cd4c8722f1619f78ab2cc3c600ee/src/main/java/com/github/jnidzwetzki/bitfinex/v2/SimpleBitfinexApiBroker.java#L502-L513
marvinlabs/android-slideshow-widget
library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java
SlideShowView.displaySlide
private void displaySlide(final int currentPosition, final int previousPosition) { Log.v("SlideShowView", "Displaying slide at position: " + currentPosition); // Hide the progress indicator hideProgressIndicator(); // Add the slide view to our hierarchy final View inView = get...
java
private void displaySlide(final int currentPosition, final int previousPosition) { Log.v("SlideShowView", "Displaying slide at position: " + currentPosition); // Hide the progress indicator hideProgressIndicator(); // Add the slide view to our hierarchy final View inView = get...
[ "private", "void", "displaySlide", "(", "final", "int", "currentPosition", ",", "final", "int", "previousPosition", ")", "{", "Log", ".", "v", "(", "\"SlideShowView\"", ",", "\"Displaying slide at position: \"", "+", "currentPosition", ")", ";", "// Hide the progress ...
Display the view for the given slide, launching the appropriate transitions if available
[ "Display", "the", "view", "for", "the", "given", "slide", "launching", "the", "appropriate", "transitions", "if", "available" ]
train
https://github.com/marvinlabs/android-slideshow-widget/blob/0d8ddca9a8f62787d78b5eb7f184cabfee569d8d/library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java#L590-L649
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java
XMLAssert.assertXMLValid
public static void assertXMLValid(InputSource xml, String systemId) throws SAXException, ConfigurationException { assertXMLValid(new Validator(xml, systemId)); }
java
public static void assertXMLValid(InputSource xml, String systemId) throws SAXException, ConfigurationException { assertXMLValid(new Validator(xml, systemId)); }
[ "public", "static", "void", "assertXMLValid", "(", "InputSource", "xml", ",", "String", "systemId", ")", "throws", "SAXException", ",", "ConfigurationException", "{", "assertXMLValid", "(", "new", "Validator", "(", "xml", ",", "systemId", ")", ")", ";", "}" ]
Assert that an InputSource containing XML contains valid XML: the document must contain a DOCTYPE to be validated, but the validation will use the systemId to obtain the DTD @param xml @param systemId @throws SAXException @throws ConfigurationException if validation could not be turned on @see Validator
[ "Assert", "that", "an", "InputSource", "containing", "XML", "contains", "valid", "XML", ":", "the", "document", "must", "contain", "a", "DOCTYPE", "to", "be", "validated", "but", "the", "validation", "will", "use", "the", "systemId", "to", "obtain", "the", "...
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java#L1052-L1055
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/ApiClient.java
ApiClient.buildRequestBodyMultipart
public RequestBody buildRequestBodyMultipart(Map<String, Object> formParams) { MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); for (Entry<String, Object> param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (Fil...
java
public RequestBody buildRequestBodyMultipart(Map<String, Object> formParams) { MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); for (Entry<String, Object> param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (Fil...
[ "public", "RequestBody", "buildRequestBodyMultipart", "(", "Map", "<", "String", ",", "Object", ">", "formParams", ")", "{", "MultipartBuilder", "mpBuilder", "=", "new", "MultipartBuilder", "(", ")", ".", "type", "(", "MultipartBuilder", ".", "FORM", ")", ";", ...
Build a multipart (file uploading) request body with the given form parameters, which could contain text fields and file fields. @param formParams Form parameters in the form of Map @return RequestBody
[ "Build", "a", "multipart", "(", "file", "uploading", ")", "request", "body", "with", "the", "given", "form", "parameters", "which", "could", "contain", "text", "fields", "and", "file", "fields", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/ApiClient.java#L1072-L1086
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/SliceInput.java
SliceInput.readBytes
public int readBytes(GatheringByteChannel out, int length) throws IOException { int readBytes = slice.getBytes(position, out, length); position += readBytes; return readBytes; }
java
public int readBytes(GatheringByteChannel out, int length) throws IOException { int readBytes = slice.getBytes(position, out, length); position += readBytes; return readBytes; }
[ "public", "int", "readBytes", "(", "GatheringByteChannel", "out", ",", "int", "length", ")", "throws", "IOException", "{", "int", "readBytes", "=", "slice", ".", "getBytes", "(", "position", ",", "out", ",", "length", ")", ";", "position", "+=", "readBytes",...
Transfers this buffer's data to the specified stream starting at the current {@code position}. @param length the maximum number of bytes to transfer @return the actual number of bytes written out to the specified channel @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.available()} @thro...
[ "Transfers", "this", "buffer", "s", "data", "to", "the", "specified", "stream", "starting", "at", "the", "current", "{", "@code", "position", "}", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/SliceInput.java#L349-L355
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/termofuse/TermOfUsePanel.java
TermOfUsePanel.newRightsAndDutiesPanel
protected Component newRightsAndDutiesPanel(final String id, final IModel<RightsAndDutiesModelBean> model) { return new RightsAndDutiesPanel(id, model); }
java
protected Component newRightsAndDutiesPanel(final String id, final IModel<RightsAndDutiesModelBean> model) { return new RightsAndDutiesPanel(id, model); }
[ "protected", "Component", "newRightsAndDutiesPanel", "(", "final", "String", "id", ",", "final", "IModel", "<", "RightsAndDutiesModelBean", ">", "model", ")", "{", "return", "new", "RightsAndDutiesPanel", "(", "id", ",", "model", ")", ";", "}" ]
Factory method for creating the new {@link Component} for the rights and duties. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link Component} for the rights and duties. @param id the id @param model the model @return the new ...
[ "Factory", "method", "for", "creating", "the", "new", "{", "@link", "Component", "}", "for", "the", "rights", "and", "duties", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "ove...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/termofuse/TermOfUsePanel.java#L347-L351
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/queue/impl/RabbitMqQueue.java
RabbitMqQueue.putToQueue
protected boolean putToQueue(IQueueMessage<ID, DATA> msg) { try { byte[] msgData = serialize(msg); getProducerChannel().basicPublish("", queueName, null, msgData); return true; } catch (Exception e) { throw e instanceof QueueException ? (QueueException) e ...
java
protected boolean putToQueue(IQueueMessage<ID, DATA> msg) { try { byte[] msgData = serialize(msg); getProducerChannel().basicPublish("", queueName, null, msgData); return true; } catch (Exception e) { throw e instanceof QueueException ? (QueueException) e ...
[ "protected", "boolean", "putToQueue", "(", "IQueueMessage", "<", "ID", ",", "DATA", ">", "msg", ")", "{", "try", "{", "byte", "[", "]", "msgData", "=", "serialize", "(", "msg", ")", ";", "getProducerChannel", "(", ")", ".", "basicPublish", "(", "\"\"", ...
Puts a message to Kafka queue, partitioning message by {@link IQueueMessage#qId()} @param msg @return
[ "Puts", "a", "message", "to", "Kafka", "queue", "partitioning", "message", "by", "{", "@link", "IQueueMessage#qId", "()", "}" ]
train
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/queue/impl/RabbitMqQueue.java#L237-L245
JOML-CI/JOML
src/org/joml/Matrix3d.java
Matrix3d.scaling
public Matrix3d scaling(double x, double y, double z) { m00 = x; m01 = 0.0; m02 = 0.0; m10 = 0.0; m11 = y; m12 = 0.0; m20 = 0.0; m21 = 0.0; m22 = z; return this; }
java
public Matrix3d scaling(double x, double y, double z) { m00 = x; m01 = 0.0; m02 = 0.0; m10 = 0.0; m11 = y; m12 = 0.0; m20 = 0.0; m21 = 0.0; m22 = z; return this; }
[ "public", "Matrix3d", "scaling", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "m00", "=", "x", ";", "m01", "=", "0.0", ";", "m02", "=", "0.0", ";", "m10", "=", "0.0", ";", "m11", "=", "y", ";", "m12", "=", "0.0", ";",...
Set this matrix to be a simple scale matrix. @param x the scale in x @param y the scale in y @param z the scale in z @return this
[ "Set", "this", "matrix", "to", "be", "a", "simple", "scale", "matrix", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3d.java#L1357-L1368
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java
RolloutStatusCache.putRolloutStatus
public void putRolloutStatus(final Map<Long, List<TotalTargetCountActionStatus>> put) { final Cache cache = cacheManager.getCache(CACHE_RO_NAME); putIntoCache(put, cache); }
java
public void putRolloutStatus(final Map<Long, List<TotalTargetCountActionStatus>> put) { final Cache cache = cacheManager.getCache(CACHE_RO_NAME); putIntoCache(put, cache); }
[ "public", "void", "putRolloutStatus", "(", "final", "Map", "<", "Long", ",", "List", "<", "TotalTargetCountActionStatus", ">", ">", "put", ")", "{", "final", "Cache", "cache", "=", "cacheManager", ".", "getCache", "(", "CACHE_RO_NAME", ")", ";", "putIntoCache"...
Put map of {@link TotalTargetCountActionStatus} for multiple {@link Rollout}s into cache. @param put map of cached entries
[ "Put", "map", "of", "{", "@link", "TotalTargetCountActionStatus", "}", "for", "multiple", "{", "@link", "Rollout", "}", "s", "into", "cache", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java#L130-L133
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java
CloudMe.rawCreateFolder
private CMFolder rawCreateFolder( CMFolder cmParentFolder, String name ) { StringBuilder innerXml = new StringBuilder(); innerXml.append( "<folder id='" ).append( cmParentFolder.getId() ).append( "'/>" ); innerXml.append( "<childFolder>" ).append( XmlUtils.escape( name ) ).append( "</childFo...
java
private CMFolder rawCreateFolder( CMFolder cmParentFolder, String name ) { StringBuilder innerXml = new StringBuilder(); innerXml.append( "<folder id='" ).append( cmParentFolder.getId() ).append( "'/>" ); innerXml.append( "<childFolder>" ).append( XmlUtils.escape( name ) ).append( "</childFo...
[ "private", "CMFolder", "rawCreateFolder", "(", "CMFolder", "cmParentFolder", ",", "String", "name", ")", "{", "StringBuilder", "innerXml", "=", "new", "StringBuilder", "(", ")", ";", "innerXml", ".", "append", "(", "\"<folder id='\"", ")", ".", "append", "(", ...
Issue request to create a folder with given parent folder and name. <p/> No checks are performed before request. @param cmParentFolder folder of the container @param name base name of the folder to be created @return the new CloudMe folder
[ "Issue", "request", "to", "create", "a", "folder", "with", "given", "parent", "folder", "and", "name", ".", "<p", "/", ">", "No", "checks", "are", "performed", "before", "request", "." ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java#L476-L489
OwlPlatform/java-owl-worldmodel
src/main/java/com/owlplatform/worldmodel/client/WorldState.java
WorldState.addState
public void addState(final String id, final Collection<Attribute> attributes) { this.stateMap.put(id, attributes); }
java
public void addState(final String id, final Collection<Attribute> attributes) { this.stateMap.put(id, attributes); }
[ "public", "void", "addState", "(", "final", "String", "id", ",", "final", "Collection", "<", "Attribute", ">", "attributes", ")", "{", "this", ".", "stateMap", ".", "put", "(", "id", ",", "attributes", ")", ";", "}" ]
Binds a set of Attribute values to an identifier. @param id the identifier @param attributes the set of attributes.
[ "Binds", "a", "set", "of", "Attribute", "values", "to", "an", "identifier", "." ]
train
https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/WorldState.java#L50-L52
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.vps_serviceName_plesk_duration_GET
public OvhOrder vps_serviceName_plesk_duration_GET(String serviceName, String duration, OvhPleskLicenseDomainNumberEnum domainNumber) throws IOException { String qPath = "/order/vps/{serviceName}/plesk/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "domainNumber", domainNumber); S...
java
public OvhOrder vps_serviceName_plesk_duration_GET(String serviceName, String duration, OvhPleskLicenseDomainNumberEnum domainNumber) throws IOException { String qPath = "/order/vps/{serviceName}/plesk/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "domainNumber", domainNumber); S...
[ "public", "OvhOrder", "vps_serviceName_plesk_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhPleskLicenseDomainNumberEnum", "domainNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/vps/{serviceName}/plesk/{duration}\"...
Get prices and contracts information REST: GET /order/vps/{serviceName}/plesk/{duration} @param domainNumber [required] Domain number you want to order a licence for @param serviceName [required] The internal name of your VPS offer @param duration [required] Duration @deprecated
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3325-L3331
osglworks/java-tool
src/main/java/org/osgl/util/IO.java
IO.readContentAsString
public static String readContentAsString(File file, String encoding) { try { return readContentAsString(new FileInputStream(file), encoding); } catch (FileNotFoundException e) { throw E.ioException(e); } }
java
public static String readContentAsString(File file, String encoding) { try { return readContentAsString(new FileInputStream(file), encoding); } catch (FileNotFoundException e) { throw E.ioException(e); } }
[ "public", "static", "String", "readContentAsString", "(", "File", "file", ",", "String", "encoding", ")", "{", "try", "{", "return", "readContentAsString", "(", "new", "FileInputStream", "(", "file", ")", ",", "encoding", ")", ";", "}", "catch", "(", "FileNo...
Read file content to a String @param file The file to read @param encoding encoding used to read the file into string content @return The String content
[ "Read", "file", "content", "to", "a", "String" ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/IO.java#L1553-L1559
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.tagImage
public TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter) { return tagImageWithServiceResponseAsync(url, tagImageOptionalParameter).toBlocking().single().body(); }
java
public TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter) { return tagImageWithServiceResponseAsync(url, tagImageOptionalParameter).toBlocking().single().body(); }
[ "public", "TagResult", "tagImage", "(", "String", "url", ",", "TagImageOptionalParameter", "tagImageOptionalParameter", ")", "{", "return", "tagImageWithServiceResponseAsync", "(", "url", ",", "tagImageOptionalParameter", ")", ".", "toBlocking", "(", ")", ".", "single",...
This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but corresp...
[ "This", "operation", "generates", "a", "list", "of", "words", "or", "tags", "that", "are", "relevant", "to", "the", "content", "of", "the", "supplied", "image", ".", "The", "Computer", "Vision", "API", "can", "return", "tags", "based", "on", "objects", "li...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1584-L1586
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java
JpaControllerManagement.isUpdatingActionStatusAllowed
private boolean isUpdatingActionStatusAllowed(final JpaAction action, final JpaActionStatus actionStatus) { final boolean isIntermediateFeedback = !FINISHED.equals(actionStatus.getStatus()) && !Status.ERROR.equals(actionStatus.getStatus()); final boolean isAllowedByRepositoryConfigurat...
java
private boolean isUpdatingActionStatusAllowed(final JpaAction action, final JpaActionStatus actionStatus) { final boolean isIntermediateFeedback = !FINISHED.equals(actionStatus.getStatus()) && !Status.ERROR.equals(actionStatus.getStatus()); final boolean isAllowedByRepositoryConfigurat...
[ "private", "boolean", "isUpdatingActionStatusAllowed", "(", "final", "JpaAction", "action", ",", "final", "JpaActionStatus", "actionStatus", ")", "{", "final", "boolean", "isIntermediateFeedback", "=", "!", "FINISHED", ".", "equals", "(", "actionStatus", ".", "getStat...
ActionStatus updates are allowed mainly if the action is active. If the action is not active we accept further status updates if permitted so by repository configuration. In this case, only the values: Status.ERROR and Status.FINISHED are allowed. In the case of a DOWNLOAD_ONLY action, we accept status updates only onc...
[ "ActionStatus", "updates", "are", "allowed", "mainly", "if", "the", "action", "is", "active", ".", "If", "the", "action", "is", "not", "active", "we", "accept", "further", "status", "updates", "if", "permitted", "so", "by", "repository", "configuration", ".", ...
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java#L589-L600
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/PagedGrid.java
PagedGrid.formatCell
protected void formatCell (HTMLTable.CellFormatter formatter, int row, int col, int limit) { formatter.setHorizontalAlignment(row, col, _cellHorizAlign); formatter.setVerticalAlignment(row, col, _cellVertAlign); formatter.setStyleName(row, col, "Cell"); if (row == (limit-1)/_cols) { ...
java
protected void formatCell (HTMLTable.CellFormatter formatter, int row, int col, int limit) { formatter.setHorizontalAlignment(row, col, _cellHorizAlign); formatter.setVerticalAlignment(row, col, _cellVertAlign); formatter.setStyleName(row, col, "Cell"); if (row == (limit-1)/_cols) { ...
[ "protected", "void", "formatCell", "(", "HTMLTable", ".", "CellFormatter", "formatter", ",", "int", "row", ",", "int", "col", ",", "int", "limit", ")", "{", "formatter", ".", "setHorizontalAlignment", "(", "row", ",", "col", ",", "_cellHorizAlign", ")", ";",...
Configures the formatting for a particular cell based on its location in the grid.
[ "Configures", "the", "formatting", "for", "a", "particular", "cell", "based", "on", "its", "location", "in", "the", "grid", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/PagedGrid.java#L99-L111
geomajas/geomajas-project-client-gwt2
server-extension/src/main/java/org/geomajas/gwt2/client/GeomajasServerExtension.java
GeomajasServerExtension.initializeMap
public void initializeMap(final MapPresenter mapPresenter, String applicationId, String id) { initializeMap(mapPresenter, applicationId, id, new DefaultMapWidget[] { DefaultMapWidget.ZOOM_CONTROL, DefaultMapWidget.ZOOM_TO_RECTANGLE_CONTROL, DefaultMapWidget.SCALEBAR }); }
java
public void initializeMap(final MapPresenter mapPresenter, String applicationId, String id) { initializeMap(mapPresenter, applicationId, id, new DefaultMapWidget[] { DefaultMapWidget.ZOOM_CONTROL, DefaultMapWidget.ZOOM_TO_RECTANGLE_CONTROL, DefaultMapWidget.SCALEBAR }); }
[ "public", "void", "initializeMap", "(", "final", "MapPresenter", "mapPresenter", ",", "String", "applicationId", ",", "String", "id", ")", "{", "initializeMap", "(", "mapPresenter", ",", "applicationId", ",", "id", ",", "new", "DefaultMapWidget", "[", "]", "{", ...
Initialize the map by fetching a configuration on the server. This method will create a map and add the default map widgets (zoom in/out, zoom to rectangle and scale bar). @param mapPresenter The map to initialize. @param applicationId The application ID in the backend configuration. @param id The map ID in the backen...
[ "Initialize", "the", "map", "by", "fetching", "a", "configuration", "on", "the", "server", ".", "This", "method", "will", "create", "a", "map", "and", "add", "the", "default", "map", "widgets", "(", "zoom", "in", "/", "out", "zoom", "to", "rectangle", "a...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/server-extension/src/main/java/org/geomajas/gwt2/client/GeomajasServerExtension.java#L146-L149
Netflix/zeno
src/examples/java/com/netflix/zeno/examples/framework/IntSumFrameworkSerializer.java
IntSumFrameworkSerializer.serializePrimitive
@Override public void serializePrimitive(IntSumRecord rec, String fieldName, Object value) { /// only interested in int values. if(value instanceof Integer) { rec.addValue(((Integer) value).intValue()); } }
java
@Override public void serializePrimitive(IntSumRecord rec, String fieldName, Object value) { /// only interested in int values. if(value instanceof Integer) { rec.addValue(((Integer) value).intValue()); } }
[ "@", "Override", "public", "void", "serializePrimitive", "(", "IntSumRecord", "rec", ",", "String", "fieldName", ",", "Object", "value", ")", "{", "/// only interested in int values.", "if", "(", "value", "instanceof", "Integer", ")", "{", "rec", ".", "addValue", ...
We need to implement serializePrimitive to describe what happens when we encounter one of the following types: Integer, Long, Float, Double, Boolean, String.
[ "We", "need", "to", "implement", "serializePrimitive", "to", "describe", "what", "happens", "when", "we", "encounter", "one", "of", "the", "following", "types", ":", "Integer", "Long", "Float", "Double", "Boolean", "String", "." ]
train
https://github.com/Netflix/zeno/blob/e571a3f1e304942724d454408fe6417fe18c20fd/src/examples/java/com/netflix/zeno/examples/framework/IntSumFrameworkSerializer.java#L43-L49
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptControlImplementation.java
AptControlImplementation.getControlInterface
public AptControlInterface getControlInterface() { if ( _implDecl == null || _implDecl.getSuperinterfaces() == null ) return null; Collection<InterfaceType> superInterfaces = _implDecl.getSuperinterfaces(); for (InterfaceType intfType : superInterfaces) { ...
java
public AptControlInterface getControlInterface() { if ( _implDecl == null || _implDecl.getSuperinterfaces() == null ) return null; Collection<InterfaceType> superInterfaces = _implDecl.getSuperinterfaces(); for (InterfaceType intfType : superInterfaces) { ...
[ "public", "AptControlInterface", "getControlInterface", "(", ")", "{", "if", "(", "_implDecl", "==", "null", "||", "_implDecl", ".", "getSuperinterfaces", "(", ")", "==", "null", ")", "return", "null", ";", "Collection", "<", "InterfaceType", ">", "superInterfac...
Returns the ControlInterface implemented by this ControlImpl.
[ "Returns", "the", "ControlInterface", "implemented", "by", "this", "ControlImpl", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptControlImplementation.java#L283-L298
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java
CPDisplayLayoutPersistenceImpl.findByC_C
@Override public CPDisplayLayout findByC_C(long classNameId, long classPK) throws NoSuchCPDisplayLayoutException { CPDisplayLayout cpDisplayLayout = fetchByC_C(classNameId, classPK); if (cpDisplayLayout == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.app...
java
@Override public CPDisplayLayout findByC_C(long classNameId, long classPK) throws NoSuchCPDisplayLayoutException { CPDisplayLayout cpDisplayLayout = fetchByC_C(classNameId, classPK); if (cpDisplayLayout == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.app...
[ "@", "Override", "public", "CPDisplayLayout", "findByC_C", "(", "long", "classNameId", ",", "long", "classPK", ")", "throws", "NoSuchCPDisplayLayoutException", "{", "CPDisplayLayout", "cpDisplayLayout", "=", "fetchByC_C", "(", "classNameId", ",", "classPK", ")", ";", ...
Returns the cp display layout where classNameId = &#63; and classPK = &#63; or throws a {@link NoSuchCPDisplayLayoutException} if it could not be found. @param classNameId the class name ID @param classPK the class pk @return the matching cp display layout @throws NoSuchCPDisplayLayoutException if a matching cp displa...
[ "Returns", "the", "cp", "display", "layout", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPDisplayLayoutException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java#L1501-L1527
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.VarArray
public JBBPDslBuilder VarArray(final String name, final int size) { return this.VarArray(name, arraySizeToString(size), null); }
java
public JBBPDslBuilder VarArray(final String name, final int size) { return this.VarArray(name, arraySizeToString(size), null); }
[ "public", "JBBPDslBuilder", "VarArray", "(", "final", "String", "name", ",", "final", "int", "size", ")", "{", "return", "this", ".", "VarArray", "(", "name", ",", "arraySizeToString", "(", "size", ")", ",", "null", ")", ";", "}" ]
Create named var array with fixed size. @param size size of the array, if negative then read till end of stream. @return the builder instance, must not be null
[ "Create", "named", "var", "array", "with", "fixed", "size", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L439-L441
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.hypergeometricCdf
public static double hypergeometricCdf(int k, int n, int Kp, int Np) { if(k<0 || n<0 || Kp<0 || Np<0) { throw new IllegalArgumentException("All the parameters must be positive."); } Kp = Math.max(k, Kp); Np = Math.max(n, Np); /* //slow! $proba...
java
public static double hypergeometricCdf(int k, int n, int Kp, int Np) { if(k<0 || n<0 || Kp<0 || Np<0) { throw new IllegalArgumentException("All the parameters must be positive."); } Kp = Math.max(k, Kp); Np = Math.max(n, Np); /* //slow! $proba...
[ "public", "static", "double", "hypergeometricCdf", "(", "int", "k", ",", "int", "n", ",", "int", "Kp", ",", "int", "Np", ")", "{", "if", "(", "k", "<", "0", "||", "n", "<", "0", "||", "Kp", "<", "0", "||", "Np", "<", "0", ")", "{", "throw", ...
Returns the cumulative probability of hypergeometric @param k @param n @param Kp @param Np @return
[ "Returns", "the", "cumulative", "probability", "of", "hypergeometric" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L300-L320
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java
ZipChemCompProvider.addToZipFileSystem
private synchronized boolean addToZipFileSystem(Path zipFile, File[] files, Path pathWithinArchive) { boolean ret = false; /* URIs in Java 7 cannot have spaces, must use Path instead * and so, cannot use the properties map to describe need to create * a new zip archive. ZipChemCompProvider.initilizeZip to c...
java
private synchronized boolean addToZipFileSystem(Path zipFile, File[] files, Path pathWithinArchive) { boolean ret = false; /* URIs in Java 7 cannot have spaces, must use Path instead * and so, cannot use the properties map to describe need to create * a new zip archive. ZipChemCompProvider.initilizeZip to c...
[ "private", "synchronized", "boolean", "addToZipFileSystem", "(", "Path", "zipFile", ",", "File", "[", "]", "files", ",", "Path", "pathWithinArchive", ")", "{", "boolean", "ret", "=", "false", ";", "/* URIs in Java 7 cannot have spaces, must use Path instead\n\t\t * and so...
Add an array of files to a zip archive. Synchronized to prevent simultaneous reading/writing. @param zipFile is a destination zip archive @param files is an array of files to be added @param pathWithinArchive is the path within the archive to add files to @return true if successfully appended these files.
[ "Add", "an", "array", "of", "files", "to", "a", "zip", "archive", ".", "Synchronized", "to", "prevent", "simultaneous", "reading", "/", "writing", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java#L271-L312
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.isSystemHeaderAndNotGruu
public static boolean isSystemHeaderAndNotGruu(ModifiableRule modifiableRule, Parameterable parameterable) { boolean isSettingGruu = false; if(modifiableRule == ModifiableRule.ContactSystem && (parameterable.getParameter("gruu") != null || parameterable.getParameter("gr") != null)) { isSettingGruu = tru...
java
public static boolean isSystemHeaderAndNotGruu(ModifiableRule modifiableRule, Parameterable parameterable) { boolean isSettingGruu = false; if(modifiableRule == ModifiableRule.ContactSystem && (parameterable.getParameter("gruu") != null || parameterable.getParameter("gr") != null)) { isSettingGruu = tru...
[ "public", "static", "boolean", "isSystemHeaderAndNotGruu", "(", "ModifiableRule", "modifiableRule", ",", "Parameterable", "parameterable", ")", "{", "boolean", "isSettingGruu", "=", "false", ";", "if", "(", "modifiableRule", "==", "ModifiableRule", ".", "ContactSystem",...
Support for GRUU https://github.com/Mobicents/sip-servlets/issues/51 if the header contains one of the gruu, gr, temp-gruu or pub-gruu, it is allowed to set the Contact Header as per RFC 5627
[ "Support", "for", "GRUU", "https", ":", "//", "github", ".", "com", "/", "Mobicents", "/", "sip", "-", "servlets", "/", "issues", "/", "51", "if", "the", "header", "contains", "one", "of", "the", "gruu", "gr", "temp", "-", "gruu", "or", "pub", "-", ...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L1800-L1810
icode/ameba-utils
src/main/java/ameba/captcha/audio/Sample.java
Sample.getStereoSamples
public void getStereoSamples(double[] leftSamples, double[] rightSamples) throws IOException { long sampleCount = getSampleCount(); double[] interleavedSamples = new double[(int) sampleCount * 2]; getInterleavedSamples(0, sampleCount, interleavedSamples); for (int i = 0; i < ...
java
public void getStereoSamples(double[] leftSamples, double[] rightSamples) throws IOException { long sampleCount = getSampleCount(); double[] interleavedSamples = new double[(int) sampleCount * 2]; getInterleavedSamples(0, sampleCount, interleavedSamples); for (int i = 0; i < ...
[ "public", "void", "getStereoSamples", "(", "double", "[", "]", "leftSamples", ",", "double", "[", "]", "rightSamples", ")", "throws", "IOException", "{", "long", "sampleCount", "=", "getSampleCount", "(", ")", ";", "double", "[", "]", "interleavedSamples", "="...
Convenience method. Extract left and right channels for common stereo files. leftSamples and rightSamples must be of size getSampleCount() @param leftSamples leftSamples @param rightSamples rightSamples @throws java.io.IOException java.io.IOException
[ "Convenience", "method", ".", "Extract", "left", "and", "right", "channels", "for", "common", "stereo", "files", ".", "leftSamples", "and", "rightSamples", "must", "be", "of", "size", "getSampleCount", "()" ]
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/captcha/audio/Sample.java#L204-L213
actframework/actframework
src/main/java/act/event/EventBus.java
EventBus.emitSync
public EventBus emitSync(EventObject event, Object... args) { return _emitWithOnceBus(eventContextSync(event, args)); }
java
public EventBus emitSync(EventObject event, Object... args) { return _emitWithOnceBus(eventContextSync(event, args)); }
[ "public", "EventBus", "emitSync", "(", "EventObject", "event", ",", "Object", "...", "args", ")", "{", "return", "_emitWithOnceBus", "(", "eventContextSync", "(", "event", ",", "args", ")", ")", ";", "}" ]
Emit a event object with parameters and force all listeners to be called synchronously. @param event the target event @param args the arguments passed in @see #emit(EventObject, Object...)
[ "Emit", "a", "event", "object", "with", "parameters", "and", "force", "all", "listeners", "to", "be", "called", "synchronously", "." ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/event/EventBus.java#L1105-L1107
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Searcher.java
Searcher.addViewsToList
private void addViewsToList(List<WebElement> allWebElements, List<WebElement> webElementsOnScreen){ int[] xyViewFromSet = new int[2]; int[] xyViewFromScreen = new int[2]; for(WebElement textFromScreen : webElementsOnScreen){ boolean foundView = false; textFromScreen.getLocationOnScreen(xyViewFromScreen); ...
java
private void addViewsToList(List<WebElement> allWebElements, List<WebElement> webElementsOnScreen){ int[] xyViewFromSet = new int[2]; int[] xyViewFromScreen = new int[2]; for(WebElement textFromScreen : webElementsOnScreen){ boolean foundView = false; textFromScreen.getLocationOnScreen(xyViewFromScreen); ...
[ "private", "void", "addViewsToList", "(", "List", "<", "WebElement", ">", "allWebElements", ",", "List", "<", "WebElement", ">", "webElementsOnScreen", ")", "{", "int", "[", "]", "xyViewFromSet", "=", "new", "int", "[", "2", "]", ";", "int", "[", "]", "x...
Adds views to a given list. @param allWebElements the list of all views @param webTextViewsOnScreen the list of views shown on screen
[ "Adds", "views", "to", "a", "given", "list", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Searcher.java#L250-L272
sniffy/sniffy
sniffy-core/src/main/java/io/sniffy/LegacySpy.java
LegacySpy.expectAtMostOnce
@Deprecated public C expectAtMostOnce(Threads threadMatcher, Query query) { return expect(SqlQueries.atMostOneQuery().threads(threadMatcher).type(adapter(query))); }
java
@Deprecated public C expectAtMostOnce(Threads threadMatcher, Query query) { return expect(SqlQueries.atMostOneQuery().threads(threadMatcher).type(adapter(query))); }
[ "@", "Deprecated", "public", "C", "expectAtMostOnce", "(", "Threads", "threadMatcher", ",", "Query", "query", ")", "{", "return", "expect", "(", "SqlQueries", ".", "atMostOneQuery", "(", ")", ".", "threads", "(", "threadMatcher", ")", ".", "type", "(", "adap...
Alias for {@link #expectBetween(int, int, Threads, Query)} with arguments 0, 1, {@code threads}, {@code queryType} @since 2.2
[ "Alias", "for", "{" ]
train
https://github.com/sniffy/sniffy/blob/7bdddb9593e6b6e9fe5c7c87519f864acbc3a5c0/sniffy-core/src/main/java/io/sniffy/LegacySpy.java#L244-L247
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MatchAllScorer.java
MatchAllScorer.calculateDocFilter
private void calculateDocFilter() throws IOException { PerQueryCache cache = PerQueryCache.getInstance(); @SuppressWarnings("unchecked") Map<String, BitSet> readerCache = (Map<String, BitSet>)cache.get(MatchAllScorer.class, reader); if (readerCache == null) { re...
java
private void calculateDocFilter() throws IOException { PerQueryCache cache = PerQueryCache.getInstance(); @SuppressWarnings("unchecked") Map<String, BitSet> readerCache = (Map<String, BitSet>)cache.get(MatchAllScorer.class, reader); if (readerCache == null) { re...
[ "private", "void", "calculateDocFilter", "(", ")", "throws", "IOException", "{", "PerQueryCache", "cache", "=", "PerQueryCache", ".", "getInstance", "(", ")", ";", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Map", "<", "String", ",", "BitSet", ">", "r...
Calculates a BitSet filter that includes all the nodes that have content in properties according to the field name passed in the constructor of this MatchAllScorer. @throws IOException if an error occurs while reading from the search index.
[ "Calculates", "a", "BitSet", "filter", "that", "includes", "all", "the", "nodes", "that", "have", "content", "in", "properties", "according", "to", "the", "field", "name", "passed", "in", "the", "constructor", "of", "this", "MatchAllScorer", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MatchAllScorer.java#L148-L201
JM-Lab/utils-java8
src/main/java/kr/jm/utils/JMProgressiveManager.java
JMProgressiveManager.registerCountChangeListener
public JMProgressiveManager<T, R> registerCountChangeListener(Consumer<Number> countChangeListener) { return registerListener(progressiveCount, countChangeListener); }
java
public JMProgressiveManager<T, R> registerCountChangeListener(Consumer<Number> countChangeListener) { return registerListener(progressiveCount, countChangeListener); }
[ "public", "JMProgressiveManager", "<", "T", ",", "R", ">", "registerCountChangeListener", "(", "Consumer", "<", "Number", ">", "countChangeListener", ")", "{", "return", "registerListener", "(", "progressiveCount", ",", "countChangeListener", ")", ";", "}" ]
Register count change listener jm progressive manager. @param countChangeListener the count change listener @return the jm progressive manager
[ "Register", "count", "change", "listener", "jm", "progressive", "manager", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/JMProgressiveManager.java#L248-L251
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.restoreKeyAsync
public Observable<KeyBundle> restoreKeyAsync(String vaultBaseUrl, byte[] keyBundleBackup) { return restoreKeyWithServiceResponseAsync(vaultBaseUrl, keyBundleBackup).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBundle> respons...
java
public Observable<KeyBundle> restoreKeyAsync(String vaultBaseUrl, byte[] keyBundleBackup) { return restoreKeyWithServiceResponseAsync(vaultBaseUrl, keyBundleBackup).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBundle> respons...
[ "public", "Observable", "<", "KeyBundle", ">", "restoreKeyAsync", "(", "String", "vaultBaseUrl", ",", "byte", "[", "]", "keyBundleBackup", ")", "{", "return", "restoreKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyBundleBackup", ")", ".", "map", "(", ...
Restores a backed up key to a vault. Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its...
[ "Restores", "a", "backed", "up", "key", "to", "a", "vault", ".", "Imports", "a", "previously", "backed", "up", "key", "into", "Azure", "Key", "Vault", "restoring", "the", "key", "its", "key", "identifier", "attributes", "and", "access", "control", "policies"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2080-L2087
bazaarvoice/emodb
common/zookeeper/src/main/java/com/bazaarvoice/emodb/common/zookeeper/Sync.java
Sync.synchronousSync
public static boolean synchronousSync(CuratorFramework curator, Duration timeout) { try { // Curator sync() is always a background operation. Use a latch to block until it finishes. final CountDownLatch latch = new CountDownLatch(1); curator.sync().inBackground(new Backgroun...
java
public static boolean synchronousSync(CuratorFramework curator, Duration timeout) { try { // Curator sync() is always a background operation. Use a latch to block until it finishes. final CountDownLatch latch = new CountDownLatch(1); curator.sync().inBackground(new Backgroun...
[ "public", "static", "boolean", "synchronousSync", "(", "CuratorFramework", "curator", ",", "Duration", "timeout", ")", "{", "try", "{", "// Curator sync() is always a background operation. Use a latch to block until it finishes.", "final", "CountDownLatch", "latch", "=", "new"...
Performs a blocking sync operation. Returns true if the sync completed normally, false if it timed out or was interrupted.
[ "Performs", "a", "blocking", "sync", "operation", ".", "Returns", "true", "if", "the", "sync", "completed", "normally", "false", "if", "it", "timed", "out", "or", "was", "interrupted", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/zookeeper/src/main/java/com/bazaarvoice/emodb/common/zookeeper/Sync.java#L18-L38
infinispan/infinispan
core/src/main/java/org/infinispan/xsite/BackupReceiverRepositoryImpl.java
BackupReceiverRepositoryImpl.getBackupReceiver
@Override public BackupReceiver getBackupReceiver(String remoteSite, String remoteCache) { SiteCachePair toLookFor = new SiteCachePair(remoteCache, remoteSite); BackupReceiver backupManager = backupReceivers.get(toLookFor); if (backupManager != null) return backupManager; //check the default...
java
@Override public BackupReceiver getBackupReceiver(String remoteSite, String remoteCache) { SiteCachePair toLookFor = new SiteCachePair(remoteCache, remoteSite); BackupReceiver backupManager = backupReceivers.get(toLookFor); if (backupManager != null) return backupManager; //check the default...
[ "@", "Override", "public", "BackupReceiver", "getBackupReceiver", "(", "String", "remoteSite", ",", "String", "remoteCache", ")", "{", "SiteCachePair", "toLookFor", "=", "new", "SiteCachePair", "(", "remoteCache", ",", "remoteSite", ")", ";", "BackupReceiver", "back...
Returns the local cache defined as backup for the provided remote (site, cache) combo, or throws an exception if no such site is defined. <p/> Also starts the cache if not already started; that is because the cache is needed for update after this method is invoked.
[ "Returns", "the", "local", "cache", "defined", "as", "backup", "for", "the", "provided", "remote", "(", "site", "cache", ")", "combo", "or", "throws", "an", "exception", "if", "no", "such", "site", "is", "defined", ".", "<p", "/", ">", "Also", "starts", ...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/xsite/BackupReceiverRepositoryImpl.java#L63-L95
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.addToTimeLimitDaemon
@Override public void addToTimeLimitDaemon(Object id, long expirationTime, int inactivity) { final String methodName = "addToTimeLimitDaemon()"; if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it should not be called"); } }
java
@Override public void addToTimeLimitDaemon(Object id, long expirationTime, int inactivity) { final String methodName = "addToTimeLimitDaemon()"; if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it should not be called"); } }
[ "@", "Override", "public", "void", "addToTimeLimitDaemon", "(", "Object", "id", ",", "long", "expirationTime", ",", "int", "inactivity", ")", "{", "final", "String", "methodName", "=", "\"addToTimeLimitDaemon()\"", ";", "if", "(", "tc", ".", "isDebugEnabled", "(...
This method is used only by default cache provider (cache.java). Do nothing.
[ "This", "method", "is", "used", "only", "by", "default", "cache", "provider", "(", "cache", ".", "java", ")", ".", "Do", "nothing", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L1528-L1534
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java
CouchClient.getDocRevisions
public DocumentRevs getDocRevisions(String id, String rev) { return getDocRevisions(id, rev, new CouchClientTypeReference<DocumentRevs>(DocumentRevs.class)); }
java
public DocumentRevs getDocRevisions(String id, String rev) { return getDocRevisions(id, rev, new CouchClientTypeReference<DocumentRevs>(DocumentRevs.class)); }
[ "public", "DocumentRevs", "getDocRevisions", "(", "String", "id", ",", "String", "rev", ")", "{", "return", "getDocRevisions", "(", "id", ",", "rev", ",", "new", "CouchClientTypeReference", "<", "DocumentRevs", ">", "(", "DocumentRevs", ".", "class", ")", ")",...
Get document along with its revision history, and the result is converted to a <code>DocumentRevs</code> object. @see <code>DocumentRevs</code>
[ "Get", "document", "along", "with", "its", "revision", "history", "and", "the", "result", "is", "converted", "to", "a", "<code", ">", "DocumentRevs<", "/", "code", ">", "object", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/mazha/CouchClient.java#L721-L724
OpenLiberty/open-liberty
dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/ThreadPool.java
ThreadPool.executeOnDaemon
public void executeOnDaemon(Runnable command) { int id = 0; final Runnable commandToRun = command; synchronized (this) { this.daemonId++; id = this.daemonId; } final String runId = name + " : DMN" + id; // d185137.2 Thread t = (Thread) AccessCo...
java
public void executeOnDaemon(Runnable command) { int id = 0; final Runnable commandToRun = command; synchronized (this) { this.daemonId++; id = this.daemonId; } final String runId = name + " : DMN" + id; // d185137.2 Thread t = (Thread) AccessCo...
[ "public", "void", "executeOnDaemon", "(", "Runnable", "command", ")", "{", "int", "id", "=", "0", ";", "final", "Runnable", "commandToRun", "=", "command", ";", "synchronized", "(", "this", ")", "{", "this", ".", "daemonId", "++", ";", "id", "=", "this",...
Dispatch work on a daemon thread. This thread is not accounted for in the pool. There are no corresponding ThreadPoolListener events. There is no MonitorPlugin support.
[ "Dispatch", "work", "on", "a", "daemon", "thread", ".", "This", "thread", "is", "not", "accounted", "for", "in", "the", "pool", ".", "There", "are", "no", "corresponding", "ThreadPoolListener", "events", ".", "There", "is", "no", "MonitorPlugin", "support", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/ThreadPool.java#L1066-L1089
google/closure-compiler
src/com/google/javascript/jscomp/CollapseProperties.java
CollapseProperties.flattenSimpleStubDeclaration
private void flattenSimpleStubDeclaration(Name name, String alias) { Ref ref = Iterables.getOnlyElement(name.getRefs()); Node nameNode = NodeUtil.newName(compiler, alias, ref.getNode(), name.getFullName()); Node varNode = IR.var(nameNode).useSourceInfoIfMissingFrom(nameNode); checkState(ref.getNode().g...
java
private void flattenSimpleStubDeclaration(Name name, String alias) { Ref ref = Iterables.getOnlyElement(name.getRefs()); Node nameNode = NodeUtil.newName(compiler, alias, ref.getNode(), name.getFullName()); Node varNode = IR.var(nameNode).useSourceInfoIfMissingFrom(nameNode); checkState(ref.getNode().g...
[ "private", "void", "flattenSimpleStubDeclaration", "(", "Name", "name", ",", "String", "alias", ")", "{", "Ref", "ref", "=", "Iterables", ".", "getOnlyElement", "(", "name", ".", "getRefs", "(", ")", ")", ";", "Node", "nameNode", "=", "NodeUtil", ".", "new...
Flattens a stub declaration. This is mostly a hack to support legacy users.
[ "Flattens", "a", "stub", "declaration", ".", "This", "is", "mostly", "a", "hack", "to", "support", "legacy", "users", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CollapseProperties.java#L274-L284
lucee/Lucee
core/src/main/java/lucee/commons/io/res/type/ram/RamResourceProviderOld.java
RamResourceProviderOld.createCore
RamResourceCore createCore(String path, int type) throws IOException { String[] names = ListUtil.listToStringArray(path, '/'); RamResourceCore rrc = root; for (int i = 0; i < names.length - 1; i++) { rrc = rrc.getChild(names[i], caseSensitive); if (rrc == null) throw new IOException("can't create resource ...
java
RamResourceCore createCore(String path, int type) throws IOException { String[] names = ListUtil.listToStringArray(path, '/'); RamResourceCore rrc = root; for (int i = 0; i < names.length - 1; i++) { rrc = rrc.getChild(names[i], caseSensitive); if (rrc == null) throw new IOException("can't create resource ...
[ "RamResourceCore", "createCore", "(", "String", "path", ",", "int", "type", ")", "throws", "IOException", "{", "String", "[", "]", "names", "=", "ListUtil", ".", "listToStringArray", "(", "path", ",", "'", "'", ")", ";", "RamResourceCore", "rrc", "=", "roo...
create a new core @param path @param type @return created core @throws IOException
[ "create", "a", "new", "core" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceProviderOld.java#L110-L119
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.setPreferredRoadColor
public static void setPreferredRoadColor(RoadType roadType, Integer color) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null || color.intValue() == DEFAULT_ROAD_CO...
java
public static void setPreferredRoadColor(RoadType roadType, Integer color) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null || color.intValue() == DEFAULT_ROAD_CO...
[ "public", "static", "void", "setPreferredRoadColor", "(", "RoadType", "roadType", ",", "Integer", "color", ")", "{", "final", "RoadType", "rt", "=", "roadType", "==", "null", "?", "RoadType", ".", "OTHER", ":", "roadType", ";", "final", "Preferences", "prefs",...
Set the preferred color to draw the content of the roads of the given type. @param roadType is the type of road for which the color should be replied. @param color is the color or <code>null</code> to restore the default value.
[ "Set", "the", "preferred", "color", "to", "draw", "the", "content", "of", "the", "roads", "of", "the", "given", "type", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L195-L210
UrielCh/ovh-java-sdk
ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java
ApiOvhEmailmxplan.service_domain_domainName_disclaimer_POST
public OvhTask service_domain_domainName_disclaimer_POST(String service, String domainName, String content, Boolean outsideOnly) throws IOException { String qPath = "/email/mxplan/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); HashMap<String, Object>o = new HashMap...
java
public OvhTask service_domain_domainName_disclaimer_POST(String service, String domainName, String content, Boolean outsideOnly) throws IOException { String qPath = "/email/mxplan/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); HashMap<String, Object>o = new HashMap...
[ "public", "OvhTask", "service_domain_domainName_disclaimer_POST", "(", "String", "service", ",", "String", "domainName", ",", "String", "content", ",", "Boolean", "outsideOnly", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/mxplan/{service}/domain/{...
Create organization disclaimer of each email REST: POST /email/mxplan/{service}/domain/{domainName}/disclaimer @param content [required] Signature, added at the bottom of your organization emails @param outsideOnly [required] Activate the disclaimer only for external emails @param service [required] The internal name ...
[ "Create", "organization", "disclaimer", "of", "each", "email" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java#L702-L710
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setMetadata
public Operation setMetadata(Map<String, String> metadata, OperationOption... options) { return setMetadata(getMetadata().toBuilder().setValues(metadata).build(), options); }
java
public Operation setMetadata(Map<String, String> metadata, OperationOption... options) { return setMetadata(getMetadata().toBuilder().setValues(metadata).build(), options); }
[ "public", "Operation", "setMetadata", "(", "Map", "<", "String", ",", "String", ">", "metadata", ",", "OperationOption", "...", "options", ")", "{", "return", "setMetadata", "(", "getMetadata", "(", ")", ".", "toBuilder", "(", ")", ".", "setValues", "(", "...
Sets the metadata for this instance, fingerprint value is taken from this instance's {@code tags().fingerprint()}. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "metadata", "for", "this", "instance", "fingerprint", "value", "is", "taken", "from", "this", "instance", "s", "{", "@code", "tags", "()", ".", "fingerprint", "()", "}", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L371-L373
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.createFundamental
public static DMatrixRMaj createFundamental(DMatrixRMaj E, DMatrixRMaj K) { DMatrixRMaj K_inv = new DMatrixRMaj(3,3); CommonOps_DDRM.invert(K,K_inv); DMatrixRMaj F = new DMatrixRMaj(3,3); PerspectiveOps.multTranA(K_inv,E,K_inv,F); return F; }
java
public static DMatrixRMaj createFundamental(DMatrixRMaj E, DMatrixRMaj K) { DMatrixRMaj K_inv = new DMatrixRMaj(3,3); CommonOps_DDRM.invert(K,K_inv); DMatrixRMaj F = new DMatrixRMaj(3,3); PerspectiveOps.multTranA(K_inv,E,K_inv,F); return F; }
[ "public", "static", "DMatrixRMaj", "createFundamental", "(", "DMatrixRMaj", "E", ",", "DMatrixRMaj", "K", ")", "{", "DMatrixRMaj", "K_inv", "=", "new", "DMatrixRMaj", "(", "3", ",", "3", ")", ";", "CommonOps_DDRM", ".", "invert", "(", "K", ",", "K_inv", ")...
Computes a Fundamental matrix given an Essential matrix and the camera calibration matrix. F = (K<sup>-1</sup>)<sup>T</sup>*E*K<sup>-1</sup> @param E Essential matrix @param K Intrinsic camera calibration matrix @return Fundamental matrix
[ "Computes", "a", "Fundamental", "matrix", "given", "an", "Essential", "matrix", "and", "the", "camera", "calibration", "matrix", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L687-L695
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/fastagi/AbstractAgiServer.java
AbstractAgiServer.createPool
protected ThreadPoolExecutor createPool() { return new ThreadPoolExecutor(poolSize, (maximumPoolSize < poolSize) ? poolSize : maximumPoolSize, 50000L, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>(), new DaemonThreadFactory()); }
java
protected ThreadPoolExecutor createPool() { return new ThreadPoolExecutor(poolSize, (maximumPoolSize < poolSize) ? poolSize : maximumPoolSize, 50000L, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>(), new DaemonThreadFactory()); }
[ "protected", "ThreadPoolExecutor", "createPool", "(", ")", "{", "return", "new", "ThreadPoolExecutor", "(", "poolSize", ",", "(", "maximumPoolSize", "<", "poolSize", ")", "?", "poolSize", ":", "maximumPoolSize", ",", "50000L", ",", "TimeUnit", ".", "MILLISECONDS",...
Creates a new ThreadPoolExecutor to serve the AGI requests. The nature of this pool defines how many concurrent requests can be handled. The default implementation returns a dynamic thread pool defined by the poolSize and maximumPoolSize properties. <p> You can override this method to change this behavior. For example ...
[ "Creates", "a", "new", "ThreadPoolExecutor", "to", "serve", "the", "AGI", "requests", ".", "The", "nature", "of", "this", "pool", "defines", "how", "many", "concurrent", "requests", "can", "be", "handled", ".", "The", "default", "implementation", "returns", "a...
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/AbstractAgiServer.java#L293-L297
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java
ColumnList.getAlias
private String getAlias(String schema, String table, String column, int stepDepth) { //PropertyType is not part of equals or hashCode so not needed for the lookup. Column c = new Column(schema, table, column, null, stepDepth); return columns.get(c); }
java
private String getAlias(String schema, String table, String column, int stepDepth) { //PropertyType is not part of equals or hashCode so not needed for the lookup. Column c = new Column(schema, table, column, null, stepDepth); return columns.get(c); }
[ "private", "String", "getAlias", "(", "String", "schema", ",", "String", "table", ",", "String", "column", ",", "int", "stepDepth", ")", "{", "//PropertyType is not part of equals or hashCode so not needed for the lookup.", "Column", "c", "=", "new", "Column", "(", "s...
get an alias if the column is already in the list @param schema @param table @param column @return
[ "get", "an", "alias", "if", "the", "column", "is", "already", "in", "the", "list" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java#L152-L156
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java
RaftLock.acquire
AcquireResult acquire(LockInvocationKey key, boolean wait) { LockEndpoint endpoint = key.endpoint(); UUID invocationUid = key.invocationUid(); RaftLockOwnershipState memorized = ownerInvocationRefUids.get(Tuple2.of(endpoint, invocationUid)); if (memorized != null) { AcquireSt...
java
AcquireResult acquire(LockInvocationKey key, boolean wait) { LockEndpoint endpoint = key.endpoint(); UUID invocationUid = key.invocationUid(); RaftLockOwnershipState memorized = ownerInvocationRefUids.get(Tuple2.of(endpoint, invocationUid)); if (memorized != null) { AcquireSt...
[ "AcquireResult", "acquire", "(", "LockInvocationKey", "key", ",", "boolean", "wait", ")", "{", "LockEndpoint", "endpoint", "=", "key", ".", "endpoint", "(", ")", ";", "UUID", "invocationUid", "=", "key", ".", "invocationUid", "(", ")", ";", "RaftLockOwnershipS...
Assigns the lock to the endpoint, if the lock is not held. Lock count is incremented if the endpoint already holds the lock. If some other endpoint holds the lock and the second argument is true, a wait key is created and added to the wait queue. Lock count is not incremented if the lock request is a retry of the lock ...
[ "Assigns", "the", "lock", "to", "the", "endpoint", "if", "the", "lock", "is", "not", "held", ".", "Lock", "count", "is", "incremented", "if", "the", "endpoint", "already", "holds", "the", "lock", ".", "If", "some", "other", "endpoint", "holds", "the", "l...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java#L95-L129
jMotif/SAX
src/main/java/net/seninp/util/UCRUtils.java
UCRUtils.datasetStats
public static String datasetStats(Map<String, List<double[]>> data, String name) { int globalMinLength = Integer.MAX_VALUE; int globalMaxLength = Integer.MIN_VALUE; double globalMinValue = Double.MAX_VALUE; double globalMaxValue = Double.MIN_VALUE; for (Entry<String, List<double[]>> e : data.entr...
java
public static String datasetStats(Map<String, List<double[]>> data, String name) { int globalMinLength = Integer.MAX_VALUE; int globalMaxLength = Integer.MIN_VALUE; double globalMinValue = Double.MAX_VALUE; double globalMaxValue = Double.MIN_VALUE; for (Entry<String, List<double[]>> e : data.entr...
[ "public", "static", "String", "datasetStats", "(", "Map", "<", "String", ",", "List", "<", "double", "[", "]", ">", ">", "data", ",", "String", "name", ")", "{", "int", "globalMinLength", "=", "Integer", ".", "MAX_VALUE", ";", "int", "globalMaxLength", "...
Prints the dataset statistics. @param data the UCRdataset. @param name the dataset name to use. @return stats.
[ "Prints", "the", "dataset", "statistics", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/util/UCRUtils.java#L78-L112
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/script/Script.java
Script.getSigOpCount
private static int getSigOpCount(List<ScriptChunk> chunks, boolean accurate) throws ScriptException { int sigOps = 0; int lastOpCode = OP_INVALIDOPCODE; for (ScriptChunk chunk : chunks) { if (chunk.isOpCode()) { switch (chunk.opcode) { case OP_CHECKSIG...
java
private static int getSigOpCount(List<ScriptChunk> chunks, boolean accurate) throws ScriptException { int sigOps = 0; int lastOpCode = OP_INVALIDOPCODE; for (ScriptChunk chunk : chunks) { if (chunk.isOpCode()) { switch (chunk.opcode) { case OP_CHECKSIG...
[ "private", "static", "int", "getSigOpCount", "(", "List", "<", "ScriptChunk", ">", "chunks", ",", "boolean", "accurate", ")", "throws", "ScriptException", "{", "int", "sigOps", "=", "0", ";", "int", "lastOpCode", "=", "OP_INVALIDOPCODE", ";", "for", "(", "Sc...
//////////////////// Interface used during verification of transactions/blocks ////////////////////////////////
[ "////////////////////", "Interface", "used", "during", "verification", "of", "transactions", "/", "blocks", "////////////////////////////////" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L510-L534
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotGetNullableOptional
public static <T> Optional<T> dotGetNullableOptional( final Map map, final String pathString, final Class<T> clazz ) { return dotGetNullable(map, Optional.class, pathString); }
java
public static <T> Optional<T> dotGetNullableOptional( final Map map, final String pathString, final Class<T> clazz ) { return dotGetNullable(map, Optional.class, pathString); }
[ "public", "static", "<", "T", ">", "Optional", "<", "T", ">", "dotGetNullableOptional", "(", "final", "Map", "map", ",", "final", "String", "pathString", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "return", "dotGetNullable", "(", "map", ","...
Get optional value by path. @param <T> optional value type @param clazz type of value @param map subject @param pathString nodes to walk in map @return value
[ "Get", "optional", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L254-L258
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java
AbstractCSSGenerator.generateResourceForDebug
protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) { // Rewrite the image URL StringWriter writer = new StringWriter(); try { IOUtils.copy(rd, writer); String content = rewriteUrl(context, writer.toString()); rd = new StringReader(content); } catch (IOException e) { thro...
java
protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) { // Rewrite the image URL StringWriter writer = new StringWriter(); try { IOUtils.copy(rd, writer); String content = rewriteUrl(context, writer.toString()); rd = new StringReader(content); } catch (IOException e) { thro...
[ "protected", "Reader", "generateResourceForDebug", "(", "Reader", "rd", ",", "GeneratorContext", "context", ")", "{", "// Rewrite the image URL", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ";", "try", "{", "IOUtils", ".", "copy", "(", "rd", ...
Returns the resource in debug mode. Here an extra step is used to rewrite the URL in debug mode @param reader the reader @param context the generator context @return the reader
[ "Returns", "the", "resource", "in", "debug", "mode", ".", "Here", "an", "extra", "step", "is", "used", "to", "rewrite", "the", "URL", "in", "debug", "mode" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java#L76-L89
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_PUT
public OvhOperation serviceName_PUT(String serviceName, String displayName, Boolean isCapped) throws IOException { String qPath = "/dbaas/logs/{serviceName}"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "displayName", displayName); addBody(...
java
public OvhOperation serviceName_PUT(String serviceName, String displayName, Boolean isCapped) throws IOException { String qPath = "/dbaas/logs/{serviceName}"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "displayName", displayName); addBody(...
[ "public", "OvhOperation", "serviceName_PUT", "(", "String", "serviceName", ",", "String", "displayName", ",", "Boolean", "isCapped", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}\"", ";", "StringBuilder", "sb", "=", "path", ...
Update the service properties REST: PUT /dbaas/logs/{serviceName} @param serviceName [required] Service name @param displayName [required] Service custom name @param isCapped [required] If set, block indexation when plan's limit is reached
[ "Update", "the", "service", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L1011-L1019
molgenis/molgenis
molgenis-core-ui/src/main/java/org/molgenis/core/ui/MolgenisMenuController.java
MolgenisMenuController.forwardMenuPlugin
@SuppressWarnings("squid:S3752") // multiple methods required @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/{menuId}/{pluginId}/**") public String forwardMenuPlugin( HttpServletRequest request, @Valid @NotNull @PathVariable String menuId, @Valid @NotNull ...
java
@SuppressWarnings("squid:S3752") // multiple methods required @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/{menuId}/{pluginId}/**") public String forwardMenuPlugin( HttpServletRequest request, @Valid @NotNull @PathVariable String menuId, @Valid @NotNull ...
[ "@", "SuppressWarnings", "(", "\"squid:S3752\"", ")", "// multiple methods required", "@", "RequestMapping", "(", "method", "=", "{", "RequestMethod", ".", "GET", ",", "RequestMethod", ".", "POST", "}", ",", "value", "=", "\"/{menuId}/{pluginId}/**\"", ")", "public"...
Forwards to the specified plugin in the specified menu. This may be a submenu. Only the last two levels of the possibly very deep menu tree are used to construct the URL. @param menuId ID of the menu parent of the pluginID @param pluginId ID of the plugin
[ "Forwards", "to", "the", "specified", "plugin", "in", "the", "specified", "menu", ".", "This", "may", "be", "a", "submenu", ".", "Only", "the", "last", "two", "levels", "of", "the", "possibly", "very", "deep", "menu", "tree", "are", "used", "to", "constr...
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-core-ui/src/main/java/org/molgenis/core/ui/MolgenisMenuController.java#L153-L170
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.getOffsetUnsafe
public static long getOffsetUnsafe(DataBuffer shapeInformation, int row, int col) { long offset = 0; int size_0 = sizeUnsafe(shapeInformation, 0); int size_1 = sizeUnsafe(shapeInformation, 1); if (row >= size_0 || col >= size_1) throw new IllegalArgumentException("Invalid ind...
java
public static long getOffsetUnsafe(DataBuffer shapeInformation, int row, int col) { long offset = 0; int size_0 = sizeUnsafe(shapeInformation, 0); int size_1 = sizeUnsafe(shapeInformation, 1); if (row >= size_0 || col >= size_1) throw new IllegalArgumentException("Invalid ind...
[ "public", "static", "long", "getOffsetUnsafe", "(", "DataBuffer", "shapeInformation", ",", "int", "row", ",", "int", "col", ")", "{", "long", "offset", "=", "0", ";", "int", "size_0", "=", "sizeUnsafe", "(", "shapeInformation", ",", "0", ")", ";", "int", ...
Identical to {@link Shape#getOffset(DataBuffer, int, int)} but without input validation on array rank
[ "Identical", "to", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L1002-L1016
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/HBaseUtils.java
HBaseUtils.count
@Override public long count(String tableName, String familyName, XPath condition) throws IOException { logger.debug("NATIVE Begin count"); // clone the current conf org.apache.hadoop.conf.Configuration customConf = new org.apache.hadoop.conf.Configuration(super.getHbcfg()); // Increase RPC timeout, in case of a...
java
@Override public long count(String tableName, String familyName, XPath condition) throws IOException { logger.debug("NATIVE Begin count"); // clone the current conf org.apache.hadoop.conf.Configuration customConf = new org.apache.hadoop.conf.Configuration(super.getHbcfg()); // Increase RPC timeout, in case of a...
[ "@", "Override", "public", "long", "count", "(", "String", "tableName", ",", "String", "familyName", ",", "XPath", "condition", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"NATIVE Begin count\"", ")", ";", "// clone the current conf", "org", ...
Gets a number of record of tableName matching condition @param tableName the table name @param familyName the family @param condition to match @throws IOException
[ "Gets", "a", "number", "of", "record", "of", "tableName", "matching", "condition" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/HBaseUtils.java#L246-L272
samskivert/pythagoras
src/main/java/pythagoras/d/Box.java
Box.intersectionX
protected double intersectionX (IRay3 ray, double x) { IVector3 origin = ray.origin(), dir = ray.direction(); double t = (x - origin.x()) / dir.x(); if (t < 0f) { return Float.MAX_VALUE; } double iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z(); return...
java
protected double intersectionX (IRay3 ray, double x) { IVector3 origin = ray.origin(), dir = ray.direction(); double t = (x - origin.x()) / dir.x(); if (t < 0f) { return Float.MAX_VALUE; } double iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z(); return...
[ "protected", "double", "intersectionX", "(", "IRay3", "ray", ",", "double", "x", ")", "{", "IVector3", "origin", "=", "ray", ".", "origin", "(", ")", ",", "dir", "=", "ray", ".", "direction", "(", ")", ";", "double", "t", "=", "(", "x", "-", "origi...
Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray intersects the box at the plane where x equals the value specified, or returns {@link Float#MAX_VALUE} if there is no such intersection.
[ "Helper", "method", "for", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Box.java#L480-L489
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getResourceAsFile
public static File getResourceAsFile(String name) { URL resourceURL = getResource(name); if(resourceURL == null) { throw new NoSuchBeingException("Resource |%s| not found.", name); } String protocol = resourceURL.getProtocol(); if("file".equals(protocol)) try { return new File(...
java
public static File getResourceAsFile(String name) { URL resourceURL = getResource(name); if(resourceURL == null) { throw new NoSuchBeingException("Resource |%s| not found.", name); } String protocol = resourceURL.getProtocol(); if("file".equals(protocol)) try { return new File(...
[ "public", "static", "File", "getResourceAsFile", "(", "String", "name", ")", "{", "URL", "resourceURL", "=", "getResource", "(", "name", ")", ";", "if", "(", "resourceURL", "==", "null", ")", "{", "throw", "new", "NoSuchBeingException", "(", "\"Resource |%s| n...
Get file resource, that is, resource with <em>file</em> protocol. Try to load resource throwing exception if not found. If resource protocol is <em>file</em> returns it as {@link java.io.File} otherwise throws unsupported operation. @param name resource name. @return resource file. @throws NoSuchBeingException if name...
[ "Get", "file", "resource", "that", "is", "resource", "with", "<em", ">", "file<", "/", "em", ">", "protocol", ".", "Try", "to", "load", "resource", "throwing", "exception", "if", "not", "found", ".", "If", "resource", "protocol", "is", "<em", ">", "file<...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L1090-L1104
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper._hasSideEffects
protected Boolean _hasSideEffects(XConstructorCall expression, ISideEffectContext context) { for (final XExpression ex : expression.getArguments()) { if (hasSideEffects(ex, context)) { return true; } } return false; }
java
protected Boolean _hasSideEffects(XConstructorCall expression, ISideEffectContext context) { for (final XExpression ex : expression.getArguments()) { if (hasSideEffects(ex, context)) { return true; } } return false; }
[ "protected", "Boolean", "_hasSideEffects", "(", "XConstructorCall", "expression", ",", "ISideEffectContext", "context", ")", "{", "for", "(", "final", "XExpression", "ex", ":", "expression", ".", "getArguments", "(", ")", ")", "{", "if", "(", "hasSideEffects", "...
Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects.
[ "Test", "if", "the", "given", "expression", "has", "side", "effects", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L481-L488
VoltDB/voltdb
src/frontend/org/voltdb/NonVoltDBBackend.java
NonVoltDBBackend.isBigintColumn
private boolean isBigintColumn(String columnName, List<String> tableNames, boolean debugPrint) { List<String> bigintColumnTypes = Arrays.asList("BIGINT"); return isColumnType(bigintColumnTypes, columnName, tableNames, debugPrint); }
java
private boolean isBigintColumn(String columnName, List<String> tableNames, boolean debugPrint) { List<String> bigintColumnTypes = Arrays.asList("BIGINT"); return isColumnType(bigintColumnTypes, columnName, tableNames, debugPrint); }
[ "private", "boolean", "isBigintColumn", "(", "String", "columnName", ",", "List", "<", "String", ">", "tableNames", ",", "boolean", "debugPrint", ")", "{", "List", "<", "String", ">", "bigintColumnTypes", "=", "Arrays", ".", "asList", "(", "\"BIGINT\"", ")", ...
Returns true if the <i>columnName</i> is of column type BIGINT, or equivalents in a comparison, non-VoltDB database; false otherwise.
[ "Returns", "true", "if", "the", "<i", ">", "columnName<", "/", "i", ">", "is", "of", "column", "type", "BIGINT", "or", "equivalents", "in", "a", "comparison", "non", "-", "VoltDB", "database", ";", "false", "otherwise", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L570-L573
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getObjectIndex
@Deprecated public static Object getObjectIndex(Object obj, double dblIndex, Context cx) { return getObjectIndex(obj, dblIndex, cx, getTopCallScope(cx)); }
java
@Deprecated public static Object getObjectIndex(Object obj, double dblIndex, Context cx) { return getObjectIndex(obj, dblIndex, cx, getTopCallScope(cx)); }
[ "@", "Deprecated", "public", "static", "Object", "getObjectIndex", "(", "Object", "obj", ",", "double", "dblIndex", ",", "Context", "cx", ")", "{", "return", "getObjectIndex", "(", "obj", ",", "dblIndex", ",", "cx", ",", "getTopCallScope", "(", "cx", ")", ...
A cheaper and less general version of the above for well-known argument types. @deprecated Use {@link #getObjectIndex(Object, double, Context, Scriptable)} instead
[ "A", "cheaper", "and", "less", "general", "version", "of", "the", "above", "for", "well", "-", "known", "argument", "types", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L1631-L1636
twilio/authy-java
src/main/java/com/authy/api/Users.java
Users.requestSms
public Hash requestSms(int userId, Map<String, String> options) throws AuthyException { MapToResponse opt = new MapToResponse(options); final Response response = this.get(SMS_PATH + Integer.toString(userId), opt); return instanceFromJson(response.getStatus(), response.getBody()); }
java
public Hash requestSms(int userId, Map<String, String> options) throws AuthyException { MapToResponse opt = new MapToResponse(options); final Response response = this.get(SMS_PATH + Integer.toString(userId), opt); return instanceFromJson(response.getStatus(), response.getBody()); }
[ "public", "Hash", "requestSms", "(", "int", "userId", ",", "Map", "<", "String", ",", "String", ">", "options", ")", "throws", "AuthyException", "{", "MapToResponse", "opt", "=", "new", "MapToResponse", "(", "options", ")", ";", "final", "Response", "respons...
Send token via sms to a user with some options defined. @param userId @param options @return Hash instance with API's response.
[ "Send", "token", "via", "sms", "to", "a", "user", "with", "some", "options", "defined", "." ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/Users.java#L80-L84
op4j/op4j
src/main/java/org/op4j/functions/Call.java
Call.setOf
public static <R> Function<Object,Set<R>> setOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) { return methodForSetOf(resultType, methodName, optionalParameters); }
java
public static <R> Function<Object,Set<R>> setOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) { return methodForSetOf(resultType, methodName, optionalParameters); }
[ "public", "static", "<", "R", ">", "Function", "<", "Object", ",", "Set", "<", "R", ">", ">", "setOf", "(", "final", "Type", "<", "R", ">", "resultType", ",", "final", "String", "methodName", ",", "final", "Object", "...", "optionalParameters", ")", "{...
<p> Abbreviation for {{@link #methodForSetOf(Type, String, Object...)}. </p> @since 1.1 @param methodName the name of the method @param optionalParameters the (optional) parameters of the method. @return the result of the method execution
[ "<p", ">", "Abbreviation", "for", "{{", "@link", "#methodForSetOf", "(", "Type", "String", "Object", "...", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/Call.java#L676-L678